<< 19-11-2018 >>

00:03:23FromGitter<zetashift> W/e the outcome will be I hope this gets squashed soon I don't like dragging these kind of things out
00:08:15*PMunch joined #nim
00:10:17sendell[m]grepping is actually harder because of underscores, IMO
00:10:46sendell[m]plus you could easily miss occurences because of typos
00:11:25*shashlick_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
00:12:02*shashlick_ joined #nim
00:13:04sendell[m]but I get the point about using libs the way you want, that's rather nice
00:13:20shashlick_use nimgrep
00:13:57sendell[m]yeah I'll have a look at it
00:14:16shashlick_its quite nice actually, like most Araq Inc products
00:14:55sendell[m]ahah :P
00:17:16sendell[m]we should have the "find all occurences" and "rename all occurences" working in vscode pluggin, that would help too
00:20:05*ng0 quit (Quit: Alexa, when is the end of world?)
00:28:47*wildlander quit (Quit: Konversation terminated!)
00:32:06*rockcavera joined #nim
00:35:28FromGitter<zetashift> Can I do an early return in nim?
00:35:54FromGitter<zetashift> eg in a proc `if myBool: #break early out of the proc`
00:36:47FromGitter<kayabaNerve> return
00:36:53FromGitter<zetashift> nvm got it needed `return none(bool)`
00:37:00FromGitter<zetashift> :D
00:37:12FromGitter<kayabaNerve> Plain return returns result
00:37:52FromGitter<zetashift> ay thanks!
00:43:21FromGitter<arnetheduck> @Varriount anything that the compiler doesn't enforce in terms of consistency is something that eventually will be used within a project ;)
00:44:51*PMunch quit (Remote host closed the connection)
01:03:49FromGitter<yyyc514> what is the compiler option to see the actual source macros generate in the compiler output?
01:03:51FromGitter<yyyc514> i can't find it
01:05:08shashlick_echo X.repr
01:05:08FromGitter<yyyc514> ah maybe ?
01:06:04*theelous3 quit (Ping timeout: 246 seconds)
01:10:21FromGitter<yyyc514> ok one can learn a lot when you dump the code that async generates :)
01:27:17FromGitter<m4d3bug> hi guys,I having some question about why my smtp's code can't work
01:27:32FromGitter<m4d3bug> https://github.com/nim-lang/Nim/issues/9728
01:29:09FromGitter<m4d3bug> hi guys,I am having some question about why my smtp's code can't work
01:35:02FromGitter<Varriount> @m4d3bug You mean, how to initialize thread local storage?
01:49:45FromGitter<m4d3bug> why i change the sslcontext's code in my local version like http work so work it in compile time
01:49:52FromGitter<m4d3bug> @Varriount
01:50:20FromGitter<Varriount> I don't understand what you are typing.
01:51:47FromGitter<m4d3bug> Did Andreas means the change in my local version is unnecessary?
01:52:45FromGitter<m4d3bug> the local version of nim's code
01:52:51FromGitter<Varriount> Both versions are wrong
01:53:51FromGitter<Varriount> `defaultSSLContext` needs to be initialized in each thread's running procedure
01:53:53*xace quit (Remote host closed the connection)
01:54:22FromGitter<Varriount> Not in the global module scope.
01:56:16FromGitter<m4d3bug> but one of the versions is the source code of the nim,that is wrong too?
01:56:31*xace joined #nim
01:57:58FromGitter<Varriount> Look at line 76 in smtp.nim
02:01:00shashlick_time to name a new library
02:07:42FromGitter<m4d3bug> Would u mind explain this line more clearly? @Varriount
02:10:47FromGitter<Varriount> `proc getSSLContext(): SSLContext =` is used to get the SSL context in the library.
02:11:24FromGitter<Varriount> It checks if `defaultSSLContext` is nil, and if it is, initializes it.
02:11:40FromGitter<Varriount> then it returns defaultSSLContext.
02:12:36FromGitter<Varriount> When a new thread starts, `defaultSSLContext` is nil. When the smtp module needs to get the context, it will call that procedure and intitialize it and retrieve it.
02:23:02*dddddd quit (Remote host closed the connection)
02:31:49FromGitter<yyyc514> damn async driving me nuts
02:37:40*vlad1777d quit (Ping timeout: 268 seconds)
02:39:40FromGitter<m4d3bug> @Varriount so i should wait Andreas to fix this bug?
02:53:26*Shadow__ quit (Quit: Page closed)
03:05:39*banc quit (Quit: ZNC - http://znc.in)
03:21:48*banc joined #nim
03:32:42FromGitter<Varriount> @m4d3bug this only occurs in your code?
04:16:38FromGitter<m4d3bug> (https://files.gitter.im/nim-lang/Nim/egj2/image.png)
04:16:43FromGitter<m4d3bug> (https://files.gitter.im/nim-lang/Nim/WnLd/image.png)
04:17:47FromGitter<m4d3bug> @Varriount My colleague nim's version is nim 0.19.0 just causing this error
04:18:20FromGitter<m4d3bug> why my version is 0.19.1
04:20:04FromGitter<m4d3bug> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf239f4b86c70503f52625b]
04:20:24FromGitter<m4d3bug> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf23a0880e46b4266d35ae8]
04:24:13FromGitter<m4d3bug> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf23aedf9993b426730451f]
04:24:47FromGitter<m4d3bug> here is my line 70-76 in smtp.nim
04:37:18*nsf joined #nim
05:25:22leorizem4d3bug: I think you're running an outdated devel version
05:25:26leorizedevel is now 0.19.9
06:05:49*muffs joined #nim
06:08:53*muffs left #nim (#nim)
06:50:02FromGitter<zacharycarter> anyone have any experience with c2nim and C++
06:50:08FromGitter<zacharycarter> specifically regarding tildes and destructors
06:51:59FromGitter<zacharycarter> hmm i'm probably not accurately identifying what is going on / wrong with my nimgen script
06:52:05FromGitter<zacharycarter> getting too tired for this anyway
07:09:22FromGitter<gogolxdong> Is there a x509 library?
07:12:13*stefanos82 joined #nim
07:14:25*dddddd joined #nim
07:25:11FromGitter<gogolxdong> Does openssl module support TLS 1.3?
07:26:35leorizeif the openssl library in your system supports it
07:31:52FromGitter<gogolxdong> const versions = "(.1.1|.38|.39|.41|.43|.44|.45|.46|.10|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|)"
07:34:47*krux02 joined #nim
07:38:41FromGitter<gogolxdong> 1) 3 is quite different from 1.1 or 1.2, is a new built openssl-1.3 .so enough?
07:39:38*vlad1777d joined #nim
08:01:46FromGitter<gogolxdong> openssl 1.1.1 supports TLS 1.3
08:03:48FromGitter<gogolxdong> openssl s_client -connect intl.jdair.net:443 -tls1_3
08:12:59*c15ade4 quit (Quit: WeeChat 2.0)
08:31:08FromGitter<gogolxdong> @PMunch Would mind looking at a custom parser like what you did in supportedVersions?
08:31:10FromGitter<gogolxdong> http://ix.io/1syi
08:31:41FromGitter<xmonader> is it possible to have separate loggers (one always print to the console and the other one print to a file (with extra details) )
08:35:43leorizeobviously depends on how you're doing the logging
08:36:01leorizeusually people seperate it to different levels
08:36:11leorizeso yea, it's possible
08:51:38FromGitter<xmonader> @leorize Ah it's called levelThreshold I see thanks ..
09:01:34*floppydh joined #nim
09:28:50Araq<insert obligatory "don't log, write to a db" rant here>
09:31:50FromGitter<AchalaSB> Hey, Im trying to run simple Nim code. ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Getting an error `test1.nim(3, 3) Error: invalid indentation` [https://gitter.im/nim-lang/Nim?at=5bf28306ddad8777ef8914e6]
09:33:28FromGitter<AchalaSB> The keyword check is not supporting. What will be the alternative?
09:35:33Araqthere is no alternative, indent your code
09:49:21*salewski joined #nim
09:49:32FromGitter<Varriount> @AchalaSB Indent the third line by two spaces
09:56:51*salewski quit (Quit: WeeChat 2.2)
09:58:54FromGitter<AchalaSB> Spacing is not an issue here.
09:59:43FromGitter<AchalaSB> Is there any way to call function `getWelcomeMessage` inside the main proc?
09:59:52FromGitter<narimiran> of course it is
10:13:53leorizeAchalaSB: spacing is the issue here
10:14:14leorizea block cannot be empty
10:14:22leorizeeither you give it something
10:14:24leorizeor remove it
10:17:10FromGitter<alehander42> what are you trying to do overally?
10:17:45FromGitter<alehander42> @AchalaSB probably you want to just call a function and check manually if it gives you a certain output
10:23:45FromGitter<alehander42> ok, it seems you can actually run `test` directly in a proc, I didn't know that
10:24:50FromGitter<alehander42> nvm
10:51:12sendell[m]do we have a sorted deque somewhere?
10:56:22FromGitter<narimiran> @sendell[m] there is deque module: https://nim-lang.org/docs/deques.html#%24%2CDeque[T]
10:56:48FromGitter<narimiran> correct link: https://nim-lang.org/docs/deques.html
10:56:55sendell[m]I know about this one, but it's more a rinbuffer actually
10:57:24sendell[m]what I'm looking for is a real linked list, that sorts on insertion
10:59:27FromGitter<narimiran> there is lists module too, implementing singly and doubly linked lists, but AFAIK it doesn't sort on insertion
11:00:55sendell[m]I'll have a look at it :)
11:01:35FromGitter<narimiran> would heap queue do the trick for you?
11:07:29sendell[m]anything that guarantees sort on insertion, and that is implemented in a way that it doesnt require to shift everything on random insertion. That's why I'm talking about linked list but it might be some kind of sorted tree or anything else :)
11:07:55sendell[m]not sure what a heap queue is, I'll check
11:08:52sendell[m]oh actually the correct term of what I'm looking for is "priority queue" :)
11:10:30*rokups joined #nim
11:16:57sendell[m]looks like nim's heapqueue is just what I was looking for, thank you !
11:21:04FromGitter<narimiran> cheers!
11:34:38*ng0 joined #nim
11:36:40*qwertfisch is now known as qwretfisch
12:01:40FromGitter<AchalaSB> How to fix this error `../../../../.choosenim/toolchains/nim-0.19.0/lib/pure/unicode.nim(252, 3) Error: type mismatch: got <seq[char]> but expected'string' ` ⏎ Here is my code ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2a6242ef5b06e408d9e6a]
12:04:14*ng0 quit (Remote host closed the connection)
12:04:18leorizewhat's the implementation of `getWelcomeMessage()`?
12:06:02*ng0 joined #nim
12:06:03FromGitter<AchalaSB> Its just a procedure call. Here it is `proc getWelcomeMessage*(): string = "Hello, World!" ` ⏎ The main code will execute if test is passed
12:06:36leorizecan you paste the entire build log?
12:06:53leorizeI suspect it has something to do with the exportwasm macro
12:07:47FromGitter<AchalaSB> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2a7934bad337eb902ed9c]
12:08:17FromGitter<AchalaSB> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2a7b12735965dfefcd277]
12:08:38leorizenow this is weird
12:08:43leorizemay I have the entire build log?
12:10:06FromGitter<AchalaSB> Im just importing above code in my main code using `import ` command
12:12:21leorizeI can't reproduce it here
12:12:34leorizethe everything compiles here
12:12:51leorizeso the entire build log will definitely be useful
12:13:51FromGitter<narimiran> @AchalaSB when you edit your message on gitter, people on IRC don't see the edited version, IIRC
12:14:21leorizeneither could you delete your messages ;)
12:14:33FromGitter<AchalaSB> Can you let me know why this error is comming. ⏎ `../../../../.choosenim/toolchains/nim-0.19.0/lib/pure/unicode.nim(252, 3) Error: type mismatch: got <seq[char]> but expected'string' `
12:15:17leorizeeverything is in there
12:15:42leorizesomething is calling runeStrAtPos on a seq[char] and not string
12:16:22FromGitter<AchalaSB> How to call String explicitly in Nim? Im thinking it may solve this issue
12:16:32FromGitter<narimiran> @AchalaSB without `{.exportwasm.}` your example works fine
12:16:45leorizeyou can't get the same error even with it
12:16:49FromGitter<narimiran> `[OK] correct welcome` is printed
12:16:57FromGitter<AchalaSB> Ya it was working fine
12:17:03leorizeso some other code must be acting up
12:17:39leorizeAchalaSB: convert `seq[byte]` to string, that's all
12:17:54leorize`seq[char]`*
12:19:25FromGitter<AchalaSB> I didn't mention `seq[char] ` in my code
12:19:39leorizeso, again, the entire build log would be useful
12:19:46leorizesince we can see what modules blown up
12:22:11leorizebbl
12:22:32FromGitter<AchalaSB> this is my `.nimble` file ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2ab085f5c9250407ffe22]
12:26:31leorizeagain, having the entire build log would be useful
12:26:40leorizethat `.nimble` file alone wouldn't be useful
12:26:54FromGitter<narimiran> @AchalaSB rename `main()` to something else and try it
12:27:13FromGitter<narimiran> this is what solved it for me
12:28:59FromGitter<alehander42> @AchalaSB by build log , leorize means the entire output of your compilation
12:30:58FromGitter<AchalaSB> Renaming `main` doesnt work for me
12:31:12FromGitter<AchalaSB> Here is log ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2ad102735965dfefcf305]
12:35:30FromGitter<zacharycarter> shashlick: if you're around at all today - I have a few nimgen questions - I guess anyone with experience using c2nim in cpp mode could probably help me out
12:36:19FromGitter<alehander42> @AchalaSB are you sure you are actually chaning
12:36:27FromGitter<alehander42> `/home/achala/Codes/kip-gitlab/leypa-nim-packages/tests/test1.nim `
12:36:54FromGitter<AchalaSB> That is my folder
12:36:55FromGitter<alehander42> and not test1.nim in a local or different path?
12:37:13FromGitter<alehander42> ok
12:38:13FromGitter<alehander42> so your test1.nim looks like https://gist.github.com/alehander42/cd341735fa2887f587396024255383d8 ?
12:38:46FromGitter<alehander42> if so, can you just run `nim c <put here path to the nim file>`
12:40:09FromGitter<narimiran> @AchalaSB i've tested it on a file similar/identical to the one @alehander42 just posted
12:40:24FromGitter<narimiran> ...and i added `{.exportwasm.}` pragma to `main`
12:41:09FromGitter<narimiran> running it, it raises gcc error, but changing `main` to `maine` works fine and the test passes
12:42:17*newbie_user joined #nim
12:44:01FromGitter<AchalaSB> No im getting the same error ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2b0119f5a9e6e410c1d67]
12:44:54FromGitter<narimiran> hmmm, `lib/pure/unicode.nim`
12:45:17FromGitter<narimiran> can you please post/share your whole file?
12:45:31FromGitter<alehander42> yes, main is special in C, and exportwasm adds exportc: main wouldn't work
12:45:49*newbie_user quit (Client Quit)
12:46:14FromGitter<alehander42> yes, please just copy & paste in a gist or something else the full test1.nim
12:50:06FromGitter<AchalaSB> https://gist.github.com/alehander42/cd341735fa2887f587396024255383d8
12:52:54FromGitter<narimiran> works on my end
12:53:29FromGitter<narimiran> i'm running `nim c -r filename.nim`
12:53:57FromGitter<AchalaSB> Is it giving `.wasm` file?
12:55:08FromGitter<narimiran> no, it just runs the `filename.nim` and prints `[OK] correct welcome`
12:55:42leorizeofc it's won't give the `.wasm` file when you compile it normally
12:56:00leorizeAchalaSB: try reinstalling `nim`
12:56:00FromGitter<AchalaSB> Ohk. But it is not giving that msg as well.
12:56:36FromGitter<narimiran> before that, let us see what is in: `kip-gitlab/leypa-nim-packages/tests/config.nims`
12:57:30FromGitter<AchalaSB> Config.nims contain `switch("path", "$projectDir/../src")`
12:58:09FromGitter<narimiran> ok, to be sure, just copy-paste your `test1.nim` file somewhere else on your computer and try to compile and run it there
12:58:44FromGitter<AchalaSB> The problem is it not supportin g `string` ⏎ How can I write string type instead?
12:58:57leorizethat's not the problem
12:59:04FromGitter<alehander42> this is not the problem, there is something wrong with your build
12:59:05leorizeyour code does not do anything that's triggering this
12:59:10FromGitter<alehander42> can you also just check what is actually on line 252of unicode.nim?
12:59:23FromGitter<alehander42> is it possible that you somehow changed something in the stdlib while experimetning
12:59:42FromGitter<alehander42> because in 0.19 it seems there is no function defined there
13:00:10FromGitter<narimiran> @AchalaSB "The problem is it not supporting string" strings are supported, and i cannot reproduce your error, based on the stuff you have given us
13:01:02FromGitter<narimiran> if there are any special flags, options, imports, etc. which you are using - we need to know so we can reproduce
13:01:16FromGitter<AchalaSB> ```code paste, see link``` ⏎ ⏎ Its my unicode.nim line 252 contains this proc [https://gitter.im/nim-lang/Nim?at=5bf2b41c1ad4155d3aeb57ac]
13:02:01FromGitter<narimiran> but why is unicode even called? there's no `import unicode` in the example you have shown us
13:02:28leorizeand inspection on both `macros` and `unittest` shows that unicode aren't used
13:03:10FromGitter<alehander42> nope
13:03:18FromGitter<alehander42> unittest imports strutils
13:03:26FromGitter<alehander42> which seems to sometimes import stuff from unicode
13:03:31*qwretfisch is now known as qwertfisch
13:03:31FromGitter<alehander42> ```when defined(nimVmExportFixed): ⏎ from unicode import toLower, toUpper ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5bf2b4a3b86c70503f5567e9]
13:03:56FromGitter<alehander42> always keep in mind the full module tree
13:04:05leorizeoops :P
13:04:17FromGitter<narimiran> but i've tested it both in 0.19.0 and the latest devel, with no error whatsoever
13:04:42FromGitter<narimiran> there's no automatic conversion from a string to seq[char] on my end
13:10:26FromGitter<alehander42> @AchalaSB can you please upload your `unicode.nim` file
13:10:32FromGitter<alehander42> literally `../../../../.choosenim/toolchains/nim-0.19.0/lib/pure/unicode.nim`
13:12:15FromGitter<alehander42> the only way I can trigger such an error (with the bizarre wrong line, which is a compiler bug probably) is if the function body tries to return `seq[char]` instead of the promised `string`
13:14:25FromGitter<alehander42> so my theory is that somehow your unicode.nim is wrong: so please try to upload/copy paste it
13:16:42FromGitter<narimiran> isn't a simpler way to remove `import unittest` and just use `assert` to see if the same error is still there?
13:17:30FromGitter<narimiran> if now there's no error - it's a problem with `unittest`, if the error is still there, then we can start looking elsewhere
13:19:05*dom96_w joined #nim
13:19:27*rokups quit (Quit: Connection closed for inactivity)
13:19:43FromGitter<narimiran> @AchalaSB can you try to run this: http://ix.io/1szu does it work? (prints 'true')
13:58:27*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:01:15*vlad1777d quit (Ping timeout: 264 seconds)
14:01:39*dom96_w joined #nim
14:08:54*ng0 quit (Remote host closed the connection)
14:25:50*nsf quit (Quit: WeeChat 2.3)
14:41:47*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:47:03*rokups joined #nim
15:01:30*dom96_w joined #nim
15:03:43*floppydh quit (Quit: WeeChat 2.3)
15:13:27shashlick@zacharycarter: I'm here what's up
15:30:02FromGitter<zacharycarter> I have a few sections in a nimgen project I don't know how to fix
15:30:42FromGitter<zacharycarter> it's c2nim related though
15:30:49shashlickSure gist?
15:30:53FromGitter<zacharycarter> sure
15:39:42FromGitter<zacharycarter> shashlick: https://gist.github.com/zacharycarter/59ba56a9a2831424651d1807d4a7558b
15:42:47shashlickCan you share the cfg
15:45:16*Vladar joined #nim
15:45:49shashlickugh joys of C++
15:50:51FromGitter<zacharycarter> yes
15:51:03FromGitter<zacharycarter> sorry - work is bugging me too haha - about to update the gist
15:51:05shashlickok seems beyond me
15:52:00FromGitter<zacharycarter> shashlick: updated
15:52:09FromGitter<zacharycarter> well - I can comment out all of those lines one by one and it will eventually compile
15:52:22FromGitter<zacharycarter> I think it's because of C++14 usage
15:52:29FromGitter<zacharycarter> but I also don't know C++14 that well... so haha
15:52:43FromGitter<zacharycarter> or any variant of C++ for that matter
15:53:37shashlickwell, right now i'm working on a tree-sitter based real-time conversion to nim
15:53:47shashlickbut still in C world
15:56:42FromGitter<zacharycarter> I could just go against the bgfx C api
15:56:48FromGitter<zacharycarter> but then I can't do this whole amalgamated build thing
15:57:07FromGitter<zacharycarter> or maybe I can
16:00:06FromGitter<zacharycarter> my main goal here is to prevent the user from having to build the bx and bimg libraries into shared libraries before being able to build bgfx
16:00:26FromGitter<zacharycarter> but I might still be able to accomplish that with the C api - although I'd still like to understand these errors...
16:00:42FromGitter<zacharycarter> if I'm going to be able to wrap bullet3 with nimgen - I'm going to need more C++ knowledge
16:00:51shashlickwell they are c2nim limitations - it cannot recognize the syntax
16:01:08shashlickso you either have to rewrite it in recognizable format or comment it out
16:01:25shashlickcan add a reset = true so that any h file hacks can be reverted at the end
16:02:23FromGitter<zacharycarter> yeah - I just need to know what to replace the offending lines of code with
16:03:07FromGitter<zacharycarter> for instance - ⏎ ⏎ ```// { ⏎ // }``` - not sure what to do about that - seems like an inline destructor to me``` [https://gitter.im/nim-lang/Nim?at=5bf2debb6183a977eee059ae]
16:03:42FromGitter<zacharycarter> so do I just put a nim proc in there and mark it with the destructor pragma and importcpp it?
16:05:54leorizeshouldn't RAII take care of that automatically?
16:06:05leorizeyou shouldn't have to import it at all
16:07:15FromGitter<zacharycarter> ah yeah - that makes sense
16:07:23FromGitter<zacharycarter> no one is going to actually call that
16:07:36FromGitter<zacharycarter> I can probably just comment that section out then?
16:07:46FromGitter<zacharycarter> if that's the case - that's good because I think that was the most perplexing of the errors
16:08:39*narimiran joined #nim
16:09:12leorizeI think the manual for `importcpp` also said that you shouldn't import destructors
16:11:26FromGitter<zacharycarter> 👍 thanks leorize - saved me some headache :)
16:14:36FromGitter<zacharycarter> I'm assuming the next one - `bool init(const Init& _init = {});` has to do with a default value in the constructor
16:14:46FromGitter<zacharycarter> errr sorry
16:14:50FromGitter<zacharycarter> err the method signature
16:19:24FromGitter<zacharycarter> https://blog.johnnovak.net/2018/07/07/creating-a-nim-wrapper-for-the-fmod/ - just stumbled upon this
16:19:28FromGitter<zacharycarter> wasn't previously aware of its existencew
16:25:44Araqcompile time with caching: 0.176s
16:25:52Araqcompile time without caching: 0.173s
16:26:06Araqpretty good... (?)
16:26:20shashlick_!
16:26:58Araqthe C codegen step is not cached at all yet
16:27:29FromGitter<zacharycarter> https://en.cppreference.com/w/cpp/language/aggregate_initialization - I guess that's what I'm dealing with
16:28:55shashlickare pipes cmd 1 | cmd 2 slower than using an intermediate file?
16:30:16Araqshashlick, unlikely but benchmark it
16:33:03*enthus1ast quit (Ping timeout: 252 seconds)
16:33:29FromGitter<alehander42> is this for nim symbolfile caching?
16:35:44Araqyes
16:39:04shashlicklooks like not much diff - i'm using multiReplace() and split() which are taking a long time
16:39:25shashlickneed a better algorithm - perhaps later
16:40:16shashlickAraq: I'm using the macros method for the wrappers lib we discussed earlier, is coming along pretty nicely
16:40:32shashlickseparate executable to do C -> AST with tree-sitter
16:40:42shashlickand convering AST -> nim using macros
16:40:49Araqaye
16:41:24shashlickso far I am parsing #define for numbers, typedef structs and enums
16:41:58Araqc2nim can do the same so far :P
16:42:15shashlickany suggestions for a good package name? i have tonim tentatively
16:42:26shashlickoh c2nim can do much more, but slow and steady
16:42:52AraqnimSitter
16:44:24shashlickthat doesn't capture the intent to interop
16:44:31shashlicki was thinking interop
16:44:35shashlickimport interop/cimport
16:44:46Araqnimterop
16:45:56shashlickNice
16:46:50*enthus1ast joined #nim
16:46:52FromGitter<zacharycarter> yeah - not using a aggregate initializer but using a value initializer worked to fix that error
16:47:26FromGitter<tim-st> when using `fmt"{expr}"` what can I use as `expr` besides variable names?
16:47:55leorizeany expr
16:48:01leorizeany possible expression
16:48:12FromGitter<tim-st> I tried `fmt"hello {someVar and 1}"`
16:48:32*Trustable joined #nim
16:50:01FromGitter<zacharycarter> any idea why c2nim might blow up on - `RendererType::Enum getRendererType();` in cpp mode?
16:50:34FromGitter<tim-st> hm, now it seems to work
16:50:34FromGitter<zacharycarter> I do have - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2e9da9f5a9e6e410dc419]
16:52:08FromGitter<tim-st> ah, it only fails for `fmt"hello {(someVar and 1)}"` with `(...)`
16:54:02FromGitter<tim-st> lol, dont know why it's marked as an error sometimes and sometimes not
16:55:10FromGitter<tim-st> ok, it was my mistake, I simply missed a bracket :\
17:06:50*ng0 joined #nim
17:08:05FromGitter<tim-st> strformat works good btw :)
17:08:25shashlickya i've also started using it, more readable
17:12:02FromGitter<brentp> I have a lib that uses .unchecked., is there a way I can used `defined` or something to support the old unchecked and the new UncheckedArray?
17:12:41narimiran@brentp maybe something like nilseq options are currently implemented in stdlib?
17:13:37FromGitter<brentp> I mean how can I check at compile time if .unchecked. is supported?
17:15:26narimiranthis is the example i was talking about: `when defined(nimNoNilSeqs): result.data = @[] else: result.data = nil`, i don't know if there's something for unchecked
17:15:41FromGitter<mratsim> I don’t think so
17:15:56FromGitter<mratsim> I checked the commit one week ago but didn’t remember sseing a defined flag
17:19:37narimiran@brentp maybe a switch depending on the nim version?
17:20:22FromGitter<tim-st> in worst case I think a `when compiles(...)` could work
17:22:20leorizenarimiran: it's `nimUncheckedArrayTyp`
17:22:35leorizebrentp: ^
17:23:49FromGitter<brentp> so what exactly goes in the `when compiles(???)`
17:24:07leorize`when defined(nimUncheckedArrayTyp)`
17:24:43leorizethat should do for checking for the new `UncheckedArray`
17:25:03FromGitter<brentp> aye. perfect. thanks all.
17:27:35FromGitter<brentp> https://github.com/brentp/hts-nim/commit/df14b1efffa4022d30b052f7912735852321ffb9
17:31:03Araqwhen declared(system.UncheckedArray) should also be possible
17:36:09*Trustable quit (Remote host closed the connection)
17:40:05FromGitter<brentp> ah. ok. I was originally trying `when defined(UncheckedArray)`
17:43:33Araqhmm my hello world program outputs its old version and the new version at the same time
17:44:12Araqthat can't be right
17:47:31narimiranVCS compiler :D
17:48:34narimirangreat for testing the changes in the code :)
17:50:54Araqit was some old code that continued to "work" :-)
17:51:09Araqso ... incremental compilation works.
17:51:28Araqwas that so hard?
17:51:53narimiran:D
17:52:02krux02shashlick, pipes should be faster than an intermediate file, because the data cannot possibly be written on the real harddrive, it is all streamed. But the disadvantage is that it is blocking io. a write blocks until the data is consumed at the same time from the reader, with probably a small buffer in the middle.
17:52:57*oprypin quit (Disconnected by services)
17:52:57Araqfiles can be lazily written from RAM to disk, depending on the OS and setup
17:54:45FromGitter<timotheecour> @araq regarding incremental compilation, I was trying to see if it fixed https://github.com/nim-lang/Nim/pull/9715 but still facing issues ; how can I take advantage of it (say, in that PR) ?
17:57:23FromGitter<timotheecour> also, —incremental:on is still not in —fullhelp and I don’t see any documentation on how to use (or what to expect from) incremental compilation; is there any scratch doc/blurb/whatever piece of info ?
17:57:56leorizefor a WIP stuff I don't think Araq would want to expose it yet
17:59:16FromGitter<timotheecour> well even WIP stuff can benefit from documentation (so long it’s marked as WIP/experimental); otherwise less eyeballs on it, meaning less opportunities to find bugs early
17:59:44*oprypin joined #nim
17:59:47Araqwell I wasn't serious, it only works for my "hello world" toy
17:59:57Araqdocumentation is in the RFC, I guess
18:00:42FromGitter<timotheecour> where is the hello world toy? ( i didn’t see a test case in 6acffcd28f3217cc2b146154358f6a5550423ed1)
18:01:12leorizepretty sure it's `echo "hello, world!"` lol
18:01:27leorizetimotheecour: try `--gc:destructors`
18:01:43leorizeit doesn't even work for anything beyond hello world
18:01:46narimiran...and here i am thinking that was just a joke and nothing more than that
18:01:54*Vladar quit (Remote host closed the connection)
18:11:56*Vladar joined #nim
18:17:27FromGitter<timotheecour> well a hello world for me demonstrates a feature in its simplest form; how is that the case for the hello world example? ⏎ I tried: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5bf2fe372735965dfeff2f32]
18:18:23leorizeit's pretty much in pre-alpha state
18:18:38leorizeI don't expect it to even work
18:18:58leorizeonce it's ready for testing, Araq will document it I believe
18:19:04FromGitter<timotheecour> Ok, I guess I got a bit too excited by 6acffcd28f3217cc2b146154358f6a5550423ed1
18:19:14shashlickkrux02: my issue turned out to be slow parsing within Nim using multireplace and split, so replaced that code, it's much faster now
18:20:40*nsf joined #nim
18:21:08krux02yea creating a lot of intermediate objects with split is often very slow. But that is how I made my first parser as well.
18:23:23FromGitter<timotheecour> (slicable string based on Nim-ranges would solve that issue of creating intermediate objects with split)
18:35:03*shashlick_ quit (Ping timeout: 252 seconds)
18:36:36krux02timotheecour: constant nagging about what is missing doesn't help to make it better
18:38:12FromGitter<timotheecour> it’s not intended as nagging; i’ve been working on proof of concept based on that (string slices based on nim-ranges) and it seems promising; it’s more meant as indicator that it’d be worth looking into it
18:38:44*shashlick_ joined #nim
18:39:33krux02it's not about finding something to look it, it is a matter of priorizing what to look at next.
18:41:08FromGitter<timotheecour> anyway, slicable strings could start as a nimble package
18:41:25FromGitter<tim-st> what was the reason that there is no `uint64.high`?
18:41:42krux02the best way to can help is if you find a solution that does not need any fixing in the standard library and lives happily as it's own module. When there is i single missing piece that prevents you from implementing it, I am happy to fix nim and bring it to live.
18:42:02krux02tim-st: it is not an int
18:42:13*zachk joined #nim
18:42:29FromGitter<tim-st> and returning uint64 wouldnt work?
18:42:45leorizetim-st: It's not an Ordinal I think
18:42:54leorizethere's `high[T: Ordinal]`
18:43:03leorizebut `uint64` doesn't match
18:43:07FromGitter<tim-st> but I assume an uint has a highest value?
18:43:16narimiran@timotheecour ...and if we can do something to fix/close/implement some of those 200+ open issues, it would be great :)
18:43:18FromGitter<tim-st> this seems to work: `template high*(_: type uint64): uint64 = (-1.int64).uint64`
18:43:29krux02there is an issue about it
18:43:36*zachk quit (Changing host)
18:43:36*zachk joined #nim
18:45:05krux02https://github.com/nim-lang/Nim/issues/6840
18:45:21krux02sorry wrong one
18:45:26FromGitter<timotheecour> @narimiran since you’ve been working a lot on improving testament tests lately, what do you think of the approach I outlined in https://github.com/nim-lang/Nim/issues/9581#issuecomment-439785885
18:45:48narimiranwell, most i did was just a manual labor
18:46:16narimirani haven't tried to use your proposed changes
18:47:12FromGitter<timotheecour> it gave 5X speedups on compiling/running tests in tests/stdlib/*.nim
18:47:31krux02wasn't it 20?
18:47:43FromGitter<timotheecour> that was for tests in lib/std/*.nim
18:47:52FromGitter<timotheecour> (and that was 15X, not 20x)
18:48:48FromGitter<tim-st> here is the issue regarding uint64.high: https://github.com/nim-lang/Nim/issues/6620
18:49:42narimiran@tim-st krux02 and this also: https://github.com/nim-lang/Nim/issues/725
18:49:53narimiranheh, you just posted there :)
18:49:57FromGitter<tim-st> xD
18:50:49krux02well we can all agree that `high(uint64)` not working is annoying.
18:52:04krux02but you can define you own high ore maxValue definition that doesn't try to return an int, but a value of the exact same type.
18:52:13krux02shouldn't be too hard.
18:53:01FromGitter<tim-st> I dont understand why it isnt available in system.nim for uint64
18:57:53*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:16:44*rokups quit (Quit: Connection closed for inactivity)
19:39:28sendell[m]was is the command to reverse "nimble develop" ?
19:39:46sendell[m]to cancel it
19:53:43*abm joined #nim
20:00:04*Vladar quit (Ping timeout: 246 seconds)
20:16:51*nsf quit (Quit: WeeChat 2.3)
20:21:19*Vladar joined #nim
20:27:55FromGitter<SolitudeSF> `nimble uninstall`
20:37:32FromGitter<xmonader> I wrote a simple asciitable library for nim today https://github.com/xmonader/nim-asciitables hope you guys find it helpful
21:03:15*a_b_m joined #nim
21:07:03*abm quit (Ping timeout: 268 seconds)
21:08:02*krux02 quit (Remote host closed the connection)
21:17:37*narimiran quit (Remote host closed the connection)
21:30:32*stefanos82 quit (Quit: Quitting for now...)
21:30:36*V-X joined #nim
21:31:56V-XWhat is the best way to keep track of procs that have a custom pragma applied to them? They're all multi-methods for the same base type but I can't figure out how to get ahold of them via AST
21:45:27*Vladar quit (Remote host closed the connection)
21:48:24sendell[m]SolitudeSF, I'm talking about the "nimble develop" command inside a directory, not "nimble develop packageName"
21:48:53sendell[m](since the package I use it on is actually a private git repo)
21:49:15FromGitter<SolitudeSF> whats the difference? just uninstall that package
21:49:54FromGitter<SolitudeSF> when you `develop` it, it install by symlinking files, and then behaves like regular package
21:51:10*a__b__m joined #nim
21:52:57*a__b__m quit (Client Quit)
21:54:07*a_b_m quit (Ping timeout: 240 seconds)
22:12:29sendell[m]oh yeah actually it works, wasn't sure how to "target" it but its just the #head version. thx :)
22:13:13sendell[m]have to say nimble looks just as awesome as nim :D
22:17:59*jjido joined #nim
22:26:16*vlad1777d joined #nim
22:28:35FromGitter<pr-yemibedu> so I wanted to use a decamped sequence in a case statement. What is the correct syntax?
22:28:59FromGitter<pr-yemibedu> sorry. decomposed sequence.
22:33:46FromGitter<pr-yemibedu> example would be ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ can we decompose this and other structures? [https://gitter.im/nim-lang/Nim?at=5bf33a4addad8777ef8e0071]
22:34:37*mech422__ joined #nim
22:34:43*cozachk joined #nim
22:37:30*onionhammer joined #nim
22:39:46*tribly quit (Ping timeout: 268 seconds)
22:39:47*dddddd quit (Ping timeout: 268 seconds)
22:39:47*onionhammer1 quit (Ping timeout: 268 seconds)
22:39:47*edcragg_ quit (Ping timeout: 268 seconds)
22:39:47*zachk quit (Ping timeout: 268 seconds)
22:39:47*mech422_ quit (Ping timeout: 268 seconds)
22:39:47*cavariux quit (Ping timeout: 268 seconds)
22:40:15xacethe dlls.zip for windows, wgere am i suppose to exfract the dlls to?
22:40:23*dddddd joined #nim
22:40:35*cavariux joined #nim
22:41:07*edcragg_ joined #nim
22:41:50*tribly joined #nim
22:42:34shashlickyou can put it in ~/.nimble/bin
22:42:39*V-X quit (Remote host closed the connection)
22:42:40shashlickthat's where I have since it is in the path anyway
22:42:43shashlickor should be
22:43:12shashlickof course I'm a choosenim user so - if you aren't you can put them in .../nim/bin
22:43:37xacedoes choosenim work for windows?
22:44:03xacedoesnt seem like it does
22:44:24FromGitter<pr-yemibedu> choosenim is suppose to help and path alias for windows users.
22:45:19*abm joined #nim
22:45:35*jjido quit (Remote host closed the connection)
22:47:03xaceoh its available on github
22:49:25*cozachk quit (Quit: Leaving)
22:49:53*zachk joined #nim
22:51:20*zachk quit (Changing host)
22:51:20*zachk joined #nim
22:53:50FromGitter<alehander42> @pr-yemibedu that's not builtin, you can use a lib like https://github.com/alehander42/gara for capturing matches like that
22:54:55FromGitter<alehander42> of @[@x, *@xs]: ⏎ ..
22:58:08shashlickxace: it works great in windows
23:00:36xaceHmm, i find the windows installation process very confusing. the zip provided on the website, does it also contain the dlls.zip that is at the bottom of the page? and i cant see if choosenim correctly setup all the required dlls for it either
23:01:10shashlickChoosenim will take care of all of it
23:01:25shashlickIncluding mingw if you don't have it already
23:01:40shashlickThe zip doesn't have the dlls I don't think
23:01:59xaceshashlick: https://github.com/dom96/choosenim according to the readme, it doesnt handle libcurl if I understand it correctly
23:02:17shashlickJust need to add ~/.nimble/bin to path
23:02:49xaceshashlick: the download link for windows does contain dlls that also exist in dlls.zip
23:04:36FromGitter<pr-yemibedu> @alehander42 thank you. I like it. It is like F# pattern matching a little.
23:08:30FromGitter<pr-yemibedu> have you seen https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/pattern-matching and https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/active-patterns which are similar?
23:10:14FromGitter<pr-yemibedu> @alehander42 do I just add your project to nimble by name?
23:33:32FromDiscord_<treeform> So I had some issues with https://github.com/cheatfate/asyncpg so I made my own: https://github.com/treeform/pg
23:34:23FromDiscord_<treeform> Its only 87 lines of code, if any one needs async db support, please consider my tiny wrapper.
23:34:24FromDiscord_<treeform> https://github.com/treeform/pg/blob/master/src/pg.nim
23:36:12*shashlick_ quit (Ping timeout: 252 seconds)
23:40:54*shashlick_ joined #nim
23:42:30dom96xace: choosenim downloads the DLLs too