<<13-06-2019>>

00:00:14FromGitter<kayabaNerve> Thanks for the info
00:00:56FromGitter<kayabaNerve> Ngl, since I thought it was O(n) (likely misread getting keys as O(n), not checking a key), I've been doing this in a decently stupid way.
00:02:54*redlegion joined #nim
00:02:54*redlegion quit (Changing host)
00:02:54*redlegion joined #nim
00:09:12*envoyt quit (Ping timeout: 245 seconds)
00:09:36*envoyt joined #nim
00:19:25*sealmove quit (Quit: WeeChat 2.4)
00:20:47*lritter quit (Ping timeout: 258 seconds)
00:21:20*lritter joined #nim
00:39:32xacejrfondren, turns out you were right, ncurses-like interfaces can be proxied just by printing its output... Do you happen to know if there is a clever way to capture the output of the program? in this case `fzf` clears it's screen and resets the terminal to its original state and pipes out a line with the result. My current idea is to detect the `\e[?1000l` because it appears right before the output data... (i
00:39:38xaceguess i should scrape the terminfo for what `\e[?1000l` really means)
00:42:34FromGitter<kaushalmodi> xace: did you see my message about smenu?
00:43:05xacekaushalmodi: no i did not. did you write about it recently?
00:43:29FromGitter<kaushalmodi> No, I didn't do anything
00:43:39FromGitter<kaushalmodi> Thinking of wrapping it in Nim
00:43:49FromGitter<kaushalmodi> Search for smenu GitHub
00:44:19xaceoh, do you intend to interface with it by re-compiling it from source or calling the binary?
00:44:32FromGitter<kaushalmodi> It has header file
00:44:45FromGitter<kaushalmodi> So should be easy to use nimterop on it
00:45:07xacemy approach for `fzf` is to call the binary but have nim act as a direct proxy by giving `fzf` access to some virtual stdin/out/err
00:45:10FromGitter<kaushalmodi> Nimterop can clone from source and build the .so
00:45:40FromGitter<kaushalmodi> My idea is that direct C interface might be more efficient?
00:45:52xaceah, then the header method would make more sense... `fzf` is written in go, not sure if nim has suppose to interact with .go programs
00:46:41xace(i wasn't reading as i was writing that, im on a phone and very distracted)
00:52:45shashlickIt's possible cause go can be called from C
00:52:56shashlickBut it's convoluted
00:54:21xaceshashlick: yeah thats what i was afraid of... btw i managed to get `fzf` working, but since it was written on the phone there is a lot of junk/prototyping that needs to be cleaned up, and im not really happy with the solution, but "it works on my machine" ;)...
00:55:37*marvel_ quit (Quit: Connection closed for inactivity)
01:02:30*Acid147 quit (Remote host closed the connection)
01:04:40rayman22201@PMunch, you beautiful bastard, you wrote a keepass database lib in Nim. What version of kdbx file does it support, and how hard do you think it would be to add keyfile support?
01:10:51*lritter quit (Ping timeout: 248 seconds)
02:00:42*theelous3_ joined #nim
02:18:56*theelous3_ quit (Read error: Connection reset by peer)
02:21:53*laaron quit (Remote host closed the connection)
02:25:17*laaron joined #nim
02:35:44*deech quit (Ping timeout: 248 seconds)
02:44:29*deech joined #nim
02:47:14*abm quit (Quit: Leaving)
02:47:42*laaron quit (Remote host closed the connection)
02:53:33*laaron joined #nim
02:55:48*deech quit (Ping timeout: 272 seconds)
03:06:25*Jesin quit (Quit: Leaving)
03:16:50FromGitter<kaushalmodi> shashlick: are you here?
03:20:58shashlickwhat's up
03:22:13FromGitter<kaushalmodi> :)
03:22:18FromGitter<kaushalmodi> I am attempting this: https://github.com/kaushalmodi/nim-smenu/blob/master/src/smenu.nim
03:22:37FromGitter<kaushalmodi> smenu.h has a regex_t type that's coming from <regex.h>
03:23:11FromGitter<kaushalmodi> I tried adding `#include <regex.h>` to `smenu.h` (it doesn't have it originally) but that didn't work
03:23:27FromGitter<kaushalmodi> so how do I `cImport` `<foo.h>`?
03:23:52FromGitter<kaushalmodi> if you clone that repo and run nimble build, you will see the error
03:24:17FromGitter<kaushalmodi> ah! I have the gitpull commented out
03:24:35FromGitter<kaushalmodi> just letting you know (that's not the cause of the problem of course)
03:25:34shashlickam looking
03:26:01leorizejust a note, regex.h is a gnu-extension, so it's not available on non-gnu systems
03:26:34shashlickremember you have to run things in a static block for it to happen at compile time
03:26:35FromGitter<kaushalmodi> smenu probably won't work cross-platform
03:26:38shashlickalso, nimterop has configure support
03:26:54FromGitter<kaushalmodi> shashlick: oh, I never looked for it
03:27:33FromGitter<kaushalmodi> leorize: smenu builds and runs fine on my system
03:27:50FromGitter<kaushalmodi> on Windows though, it would probably run only in the WSL env
03:28:42FromGitter<kaushalmodi> shashlick: what should I be doing in static block?
03:28:54FromGitter<kaushalmodi> i.e. I have always run cImport outside static
03:29:20shashlickcimport is fine
03:29:42leorizeplease add macros / template for this
03:29:59leorizekeep reminding everyone to add `static` means something is really wrong with the interface
03:33:45shashlickblame that tim guy 😞
03:34:23leorizeyou have commit access :p
03:34:48shashlicksetCurrentDir won't work
03:34:52shashlickuse configure
03:38:13FromGitter<kaushalmodi> shashlick: actually configure is working..
03:38:20FromGitter<kaushalmodi> it's creating config.h
03:38:33FromGitter<kaushalmodi> and the build.sh is also running.. I am finally getting the smenu.so
03:38:46FromGitter<kaushalmodi> failure happens at cInclude
03:38:55*dddddd quit (Remote host closed the connection)
03:40:44FromGitter<kaushalmodi> in any case, I switched to using `configure` as it makes the code concise
03:40:54FromGitter<kaushalmodi> but I still get the same error: ⏎ ⏎ > Error: undeclared identifier: 'regex_t'
03:41:07FromGitter<kaushalmodi> I have updated that nim-smenu repo with this last suggested change
03:41:31shashlickcan you push after fixing configure? I can try it out
03:41:37FromGitter<kaushalmodi> just did
03:41:37shashlickoh okay let me try
03:41:56FromGitter<kaushalmodi> I somehow need to do `cImport("<regex.h>")` before `cImport(.."smenu.h")`
03:47:05FromGitter<kaushalmodi> in parallel, I thought.. let me just create a regex_t equivalent type in Nim
03:47:09FromGitter<kaushalmodi> so I find https://github.com/openbsd/src/blob/master/include/regex.h#L52
03:47:39FromGitter<kaushalmodi> and then looking for `re_guts`, I get to http://llvm.org/doxygen/structllvm__regex.html !!
03:47:49shashlickwhy do you have the files copied into the src dir
03:48:39FromGitter<kaushalmodi> the naming might be confusing
03:48:57FromGitter<kaushalmodi> here, `srcDir` is `<repo>/build/smenu`
03:49:24FromGitter<kaushalmodi> https://github.com/kaushalmodi/nim-smenu/blob/07eedc43dffed40a3e5acfbd26310e4d99020215/src/smenu.nim#L4-L6
03:49:57shashlickno i get config.h and configure and other files in the src/smenu.nim directory
03:51:19FromGitter<kaushalmodi> ah, I see.. let me fix that
03:52:20FromGitter<kaushalmodi> I think that did not happen earlier when I ran changecurrentdir
03:52:21shashlickand build.sh doesn't run so smenu isn't built
03:52:39shashlickyou need to `cd xyz && ./build.sh`
03:53:24FromGitter<kaushalmodi> yes, earlier I did `setCurrentDir(srcDir)` outside static, and ran configure, etc outside
03:53:35FromGitter<kaushalmodi> fixing it
03:55:59shashlickI don't think that will run at compile time
03:56:46FromGitter<kaushalmodi> yeah, that didn't work
03:56:55FromGitter<kaushalmodi> so doing the cd srcDir &&
03:57:01FromGitter<kaushalmodi> I have pushed that fix
03:57:14FromGitter<kaushalmodi> now smenu is compiled, which I mv to smenu.so
03:57:31FromGitter<kaushalmodi> but still the same issue about regex_t
03:59:21shashlickif you don't intend creating regex_t objects, you can just get away with `type regex_t = object`
04:04:23FromGitter<kaushalmodi> makes sense
04:04:35FromGitter<kaushalmodi> that let me get past and now I get: ⏎ ⏎ > Error: undeclared identifier: 'home'
04:04:48FromGitter<kaushalmodi> let me try to work it out ..
04:09:54FromGitter<kaushalmodi> I am confused.. the `home` identifier isn't anywhere in the smenu.h: https://github.com/p-gen/smenu/blob/master/smenu.h
04:11:05FromGitter<kaushalmodi> that error shows up at this point: http://ix.io/1LEp/text
04:13:19*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:16:47*nsf joined #nim
04:18:01FromGitter<kaushalmodi> it was the dynlib parameter to cImport; removed it for now, now it's looking for langinfo_t.. let me try to declare all the arbitrary types as just object till the whole thing compiles
04:22:35FromGitter<kaushalmodi> it finally compiles but I realize late that I probably cannot just wrap smenu :/
04:23:21FromGitter<kaushalmodi> it's main func is a huge 1000+ line blob of code (I just assumed that I can use its API from its header)
04:23:33FromGitter<kaushalmodi> oh well
04:29:42shashlickyou could always just comment that portion out with a /* */ combo and build as a lib
04:32:14FromGitter<kaushalmodi> but to get NIm to do what smenu does, I'd need to manually translate the main func there to Nim, right?
04:32:38shashlickyou can also include regex.h with cAddStdDir() within static and then cImport(cSearchPath "regex.h")
04:32:54FromGitter<kaushalmodi> regex_t is not the issue any more
04:32:58shashlickis the main code in the main function?
04:33:04FromGitter<kaushalmodi> yeah ..
04:33:42FromGitter<kaushalmodi> https://github.com/p-gen/smenu/blob/master/smenu.c#L4666
04:33:52FromGitter<kaushalmodi> it's kinda heart-breaking, heh
04:33:59shashlickyou could rename main to something else no?
04:34:01FromGitter<kaushalmodi> that main func keeps on going for thousands of lines
04:34:11shashlickreally well architected eh
04:35:30FromGitter<kaushalmodi> I was hoping that internally it did something like C equivalent of `proc(inputs: seq[string], smenuOpt1: bool, ...): seq[string]`
04:41:17shashlickit's very few C files, so you can use nim to edit the code and export a function instead of calling it main
04:42:59FromGitter<kaushalmodi> I didn't understand
04:44:06shashlickwell so i haven't looked at that main func, but you could rename it to something else, compile it into your nim binary with cCompile
04:44:13shashlickand then call it with the right params
04:47:23*envoyt quit (Ping timeout: 248 seconds)
04:48:22FromGitter<kaushalmodi> I'll need to revisit this late
04:48:24FromGitter<kaushalmodi> later
04:48:50FromGitter<kaushalmodi> So cCompile compiles into the nim binary?
04:49:04shashlickya it will get compiled into a .o file and then linked in
04:49:22FromGitter<kaushalmodi> oh ok
04:49:34FromGitter<kaushalmodi> but the build.sh is already compiling it
04:49:59*envoyt joined #nim
04:50:34shashlickya but that's compiling it into an executable binary
04:50:35FromGitter<kaushalmodi> so I need to rename the main func into something else.. like smenu and then have main just call that, I guess
04:50:39shashlickwith a main function
04:51:12FromGitter<kaushalmodi> I had made a weak attempt of compiling the smenu.c, but it didn't work
04:51:20shashlickyou need to compile into a library or compile it into your binary which makes more sense since it is so few C files
04:51:30shashlickneed to see what build.sh does
04:51:36FromGitter<kaushalmodi> yeah
04:51:50FromGitter<kaushalmodi> will need to do a separate cCompile for each .c file in order
04:53:30FromGitter<kaushalmodi> it's calling the makefile, which has: https://github.com/p-gen/smenu/blob/a5856a023b42d3fa8c1198571e395da11d009bf3/Makefile#L310-L312
04:53:47FromGitter<kaushalmodi> so I'll need to call cCompile for each .c there?
04:54:18shashlickyou can just say *.c
04:54:53FromGitter<kaushalmodi> ok
04:55:11FromGitter<kaushalmodi> btw above link won't work.. Makefile was created locally from Makefile.in
04:58:20*laaron quit (Remote host closed the connection)
04:58:48*laaron joined #nim
05:18:07*rayman22201 quit (Quit: Connection closed for inactivity)
05:18:39*narimiran joined #nim
05:25:51*leorize quit (Quit: WeeChat 2.3)
05:45:03*fjellfras joined #nim
05:47:03*Senketsu quit (Quit: WeeChat 2.4)
05:57:43*leorize joined #nim
06:03:05leorizenarimiran: feels adventurous enough to enable azure for Nim? :p
06:03:33leorizeI can make the errors disappear for now for testing how flaky are those tests :)
06:06:15narimiranthe more the merrier (that's for the number of CIs, not for errors :P)
06:09:11leorizeyou can try looking into them to see why they keeps on failing :p
06:12:04*leorize quit (Remote host closed the connection)
06:12:52*leorize joined #nim
06:19:37narimiranbtw, any news on cirrus?
06:21:10leorizenot working on it yet :p
06:21:18leorizeI'm waiting for reviews on azure
06:21:38leorizethen I'll split the setup steps in to reusable scripts
06:21:55leorizethen we can implement any kind of CI out there
06:22:00leorizeinto*
06:27:13*laaron quit (Remote host closed the connection)
06:27:34*PMunch joined #nim
06:29:30*laaron joined #nim
06:42:19*laaron quit (Remote host closed the connection)
06:44:28*jjido joined #nim
06:44:37*laaron joined #nim
06:47:04narimiranleorize: now i'm looking at "appveyor: use official dlls on nim-lang.org" PR - from what i can tell, openblas and sqlite were removed?
06:47:33*c2V0a3U quit (Ping timeout: 245 seconds)
06:47:54leorizeyea, we download openblas just to pick out openssl
06:48:02leorizethe dlls bundle on nim-lang.org contains all of them
06:48:15narimiranopenblas is used to test some packages
06:49:21leorizehow so, it's not even in PATH
06:49:33leorizewe only pick out openssl dlls from it afaict
06:49:50narimiranhttps://github.com/unicredit/neo/blob/master/neo.nimble
06:50:28leorizeappveyor for neo is passing :)
06:50:39narimiranyeah, that's the strangest part :)
06:51:03leorizewell, it's never used since openblas dlls weren't in PATH
06:51:29leorizeand it even passes on azure :p
06:51:31narimiranin devel, package testing has stopped after 41 packages, now i'm trying to figure out why
06:52:15narimiranahh, nimly sigsegv's
06:52:35leorizeError: unhandled exception: The filename or extension is too long.
06:52:37leorize:P
06:53:56*envoyt quit (Ping timeout: 272 seconds)
06:54:21narimiran...and everything was passing in the PR
06:58:03*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:59:34*dwdv joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:43*Vladar joined #nim
07:01:58*rayman22201 joined #nim
07:04:55*gmpreussner joined #nim
07:08:43*solitudesf- joined #nim
07:11:24*krux02 joined #nim
07:32:21FromGitter<mratsim> @narimiran, it's passing because OpenBLAS is only needed at runtime but for Arraymancer and I guess neo you only test that compilation works
07:32:38*neceve joined #nim
07:33:41FromGitter<mratsim> btw, for Arraymancer you test that the library compiles but I think it's better if you test that the test suite compiles even if you never run it (due to OpenBLAS install issues)
07:34:15FromGitter<mratsim> I have some anti-regression part related to symbol resolution and that can only be detected if you try to compile the test suite
07:54:30FromGitter<mratsim> ah, but the arraymancer test suite needs to be compiled by parts since I added complex. Otherwise it uses 3.5GB during compilation and crashes in Travis :/
07:54:44Araqwe're looking into it
07:54:52Araqbut it's not the only problem with 0.20 ... :-/
08:01:48*floppydh joined #nim
08:05:50FromGitter<mratsim> it's not 0.20 related, before I added complex the memory usage between 0.19.6 and 0.20 was the same
08:06:03FromGitter<mratsim> I think it's just the generics that broke the camel back so to speak
08:07:23FromGitter<mratsim> probably sigmatch or something allocates a lot in the VM
08:07:48FromGitter<mratsim> I put some figures here: https://github.com/mratsim/Arraymancer/issues/359#issuecomment-500108767
08:10:38FromGitter<mratsim> In my case I split the test suite the only annoying part is that I can't use the switch() command in nimscript and then setCommand (https://github.com/mratsim/Arraymancer/pull/360/files)
08:19:34*kungtotte quit (Ping timeout: 258 seconds)
08:21:13leorizesounds like a bug to me
08:31:11*kungtotte joined #nim
08:36:17*neceve quit (Ping timeout: 245 seconds)
08:36:42*neceve joined #nim
09:03:30PMunchJust asked someone at work how to create a custom window in an installer wizard (PascalScript programming, yay..) and he told me that he had written a DLL in Nim that could achieve the same thing without the use for PascalScript :)
09:04:24leorize:D
09:08:44PMunchThis is the second time I've found someone who's tried Nim in the wild
09:08:49PMunchAnd both were at work
09:15:24*laaron quit (Remote host closed the connection)
09:18:50ZevvI just got stubborn C++ guys here. "Yeah, C++ can do that in C++20"
09:20:35*fredrik92 joined #nim
09:20:49leorizeand then "C++ can do that in C++23", and so on
09:21:00PMunchHaha, know the kind from my first job
09:22:46*couven92 quit (Ping timeout: 272 seconds)
09:23:17*laaron joined #nim
09:25:08Zevvhttps://en.cppreference.com/w/cpp/language/coroutines
09:27:49*fredrik92 is now known as couven92
09:33:55*laaron quit (Remote host closed the connection)
09:36:29*laaron joined #nim
09:42:01*stefanos82 joined #nim
09:50:37*dddddd joined #nim
09:59:03*laaron quit (Remote host closed the connection)
10:00:48*laaron joined #nim
10:01:58*laaron quit (Remote host closed the connection)
10:08:15*laaron joined #nim
10:12:37*leorize quit (Quit: WeeChat 2.3)
10:15:33*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
10:16:12*laaron joined #nim
10:28:32lqdev[m]is it safe to use seqs in performance-critical (possibly interrupt level) code? I don't mean creating them, just modifying their contents, possibly changing their length
10:31:27*lritter joined #nim
10:31:31*rayman22201 quit (Quit: Connection closed for inactivity)
10:32:32Zevvlength changing might cause allocs
10:33:20Zevvread lib/core/seqs.nim, it's not much
10:35:12FromGitter<NamPNQ> anyidea how to fix this? https://github.com/nim-lang/Nim/blob/master/lib/pure/smtp.nim#L152
10:47:39*fjellfras quit (Quit: Leaving)
11:03:33leorize[m]lqdev: shrinking them is harmless as cap is kept, but adding might cause allocs
11:04:28lqdev[m]so, say, if a seq's length is expanded to 512 and then shrinked to 256 its capacity stays at 512?
11:04:34leorize[m]NamPNQ: well it would help if we can know what's the exact problem :p
11:04:47leorize[m]lqdev: yea, there's also newSeqWithCap as well
11:05:52lqdev[m]it should be fine then for my use case
11:06:40FromGitter<gogolxdong> should we keep using --gc:regions utils newruntime
11:12:35*Acid147 joined #nim
11:14:19leorize[m]there are use case for gc regions that can't be done w new runtime afaict
11:18:05Araqgogolxdong: if --gc:regions works for you, don't change it (yet)
11:22:16*laaron quit (Remote host closed the connection)
11:26:39FromGitter<NamPNQ> @leorize i cant capture this exception, it crash my program with unhandle exception
11:29:51leorize[m]can you create a small reproducible example?
11:31:15*laaron joined #nim
11:34:21*sealmove joined #nim
11:36:12FromGitter<kaushalmodi> Araq: I've removed the unnecessary call to split in the unsetEnv PR: https://github.com/nim-lang/Nim/pull/11466
11:36:19FromGitter<kaushalmodi> And it passes
11:40:10lqdev[m]I just found a way of wrapping miniaudio successfully. No nimterop, unfortunately
11:40:22lqdev[m]that way is to use pointers to structs
11:42:12*dddddd quit (Remote host closed the connection)
11:44:34*dddddd joined #nim
11:51:43*envoyt joined #nim
11:59:02*Vladar quit (Remote host closed the connection)
12:24:46shashlickThat's understandable, but I'm motivated to add three features as soon as time permits - N-dimensional arrays, cOverride in the right place, and nested structs in that order
12:25:36shashlickAnother one is to optionally offer var params instead of ptrs
12:30:19PMunchHmm, "includes" in Nim are case sensitive on Linux but not on Windows?
12:37:48leorize[m]ntfs is case-insensitive
12:38:37*Snircle joined #nim
12:42:44PMunchYeah I know
12:43:01PMunchI think FAT is also case-insensitive
12:43:34PMunchBut it would be nice if Nim could at least produce a warning. Easy mistake to make since Nim is case-insensitive itself
12:44:00PMunchPeople developing on Windows will need to be careful not to mistype imports if they want their code to be able to compile on Linux
12:44:30PMunchSo either Nim should handle this by itself, or at least produce a warning on Windows machine if the imported name was different from the specified name
12:51:49*laaron quit (Remote host closed the connection)
12:51:54FromGitter<kaushalmodi> PMunch: there's an open issue for that, look for issues opened by nc-x
12:56:23*laaron joined #nim
12:57:23PMunchAh okay
12:58:12PMunchAh, gotta love a good error message: "Cannot Import dll:C:\users\peter\Temp\is-81PRK.tmp\MyNimDll.dll"
12:58:17PMunchWhy?!
13:02:09Araqhttps://youtu.be/8qdagbtgl-8
13:02:29Araqas promised
13:03:09*AndChat|624225 joined #nim
13:04:13sealmoveyaaayyy!
13:05:36*envoyt quit (Ping timeout: 248 seconds)
13:09:33*Senketsu joined #nim
13:31:32Araqhttp://pubs.opengroup.org/onlinepubs/009695399/functions/unsetenv.html
13:31:39Araq[EINVAL]
13:31:39AraqThe name argument is a null pointer, points to an empty string, or points to a string containing an '=' character.
13:31:48Araqso ... env vars cannot contain '='
13:32:07Araqah my bad, I misread
13:32:27Araqenvironment variable *names* cannot contain '='
13:34:12*solitudesf- quit (Ping timeout: 245 seconds)
13:34:57PMunchHmm, is the creator of wnim ever here?
13:36:18livcdI have never seen Ward here
13:37:36*laaron quit (Remote host closed the connection)
13:39:35PMunchDrats
13:39:45*laaron joined #nim
13:39:49PMunchTrying to get his wNim to run in a DLL imported by InnoSetup
13:40:08PMunchI can use winim directly, but wNim just hangs
13:40:19PMunchHuh, can't nim cpp cross compile?
13:40:42PMunchI get an error that it can't use g++ when I specify -d:mingw
13:40:56livcdPMunch: are you using latest winim ?
13:41:01PMunchOr rather an error message from g++ saying it can't find Windows.h
13:41:07AraqNim can always cross-compile, bug mingw/gcc can't
13:41:15PMunchlivcd, yes, just installed it a couple minutes ago
13:41:24FromGitter<kaushalmodi> Araq: so all good related to unsetEnv?
13:41:39PMunchVia Nimble though, so if there is a newer version on GitHub than what Nimble grabs then no
13:41:59narimirannimble install [email protected]#head
13:42:08PMunchAraq, well nim c -d:mingw works like a charm
13:42:57livcdbut winim was just updated, wNim is maybe not updated to reflect changes on stable
13:44:10PMunchWell it works if I just compile it to an exe
13:44:21PMunchJust not when I run it as a DLL under InnoSetup
13:45:28PMunchAraq, http://ix.io/1LG7
13:45:51PMunchIt seems like the cpp target tries to use Linux g++ instead of mingw
13:46:44*leorize joined #nim
13:51:59AraqPMunch: fix config/nim.cfg
13:55:49leorizenarimiran: I can see how your nimsuggest crashes all the time :p
13:56:11narimiranleorize: hehe, i was wondering if you would notice that :)
13:59:01PMunchHmm, Araq what is the config option for the g++ exe? I can see amd64.windows.gcc.exe, but can't find anything for g++
13:59:12leorizenarimiran: you should have fixed your nimsuggest beforehand :p any demo is good for PR :p
13:59:13FromGitter<mratsim> gcc.cpp.exe
14:00:08narimiranleorize: eh, i didn't want to re-record it (one more time), but i agree it would have been better PR-wise, sorry
14:00:29leorizenp :)
14:01:11leorizeI heard that neovim got gdb integration now, gotta try it sometimes :)
14:01:25narimiranat first, i thought it doesn't work because i was switching to 0.19, only to realize later it is always
14:01:54PMunchmratsim, thanks :)
14:02:13PMunchI tried that but I had an issue elsewhere which make me think it was wrong
14:02:37leorizesomeone on the forum managed to trip up some range errors in the compiler
14:02:46leorizehttps://forum.nim-lang.org/t/4933
14:03:50*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:04:21PMunchHmm: http://ix.io/1LGd
14:04:22*laaron joined #nim
14:04:42PMunchSo I managed to get it compiled, but not to get it running..
14:05:03PMunch(Those errors show up on a virtual machine as well)
14:05:15leorizeyou needs those dll next to the .exe
14:05:29PMunchNext to it?
14:05:36leorizein the same folder
14:05:46leorizethose are mingw's
14:06:01leorizeyou could probably salvage some from the installation of mingw already in your machine
14:06:37leorizea way to package these things for windows is to use msys2, or just bundles dlls + licenses
14:07:17PMunchAha, okay so that worked
14:08:10PMunchI was only wanting to try this to see if I could get wnim to work if I compiled to cpp
14:08:15PMunchBut I guess it's not worth the hassle
14:08:22PMunchBack to the drawing board..
14:09:19leorizeuse vcc and you won't have to worry about mingw :)
14:09:40leorizeor clang for windows if it can use windows c++ runtime
14:10:21PMunchI'm fine with using the C target :)
14:10:27PMunchWhich "just works"
14:10:39PMunchApart from the fact that wNim doesn't work..
14:10:50PMunchBut I'm off now
14:10:51leorizeuntil gcc realizes that it needs some "helper" functions in libgcc_s :)
14:10:55PMunchBye
14:11:05PMunchI did compile it with --static-libgcc
14:11:12PMunchSo I think that would be fine :)
14:11:40*PMunch quit (Remote host closed the connection)
14:11:41leorize:)
14:22:25*CcxWrk quit (Read error: Connection reset by peer)
14:23:03*CcxWrk joined #nim
14:35:52*nsf quit (Quit: WeeChat 2.4)
14:40:24*xet7_ joined #nim
14:40:51*xet7_ quit (Remote host closed the connection)
14:43:45*abm joined #nim
14:48:17*neceve quit (Ping timeout: 258 seconds)
14:48:26*neceve joined #nim
14:50:08*dddddd quit (Ping timeout: 248 seconds)
14:53:22*narimiran quit (Ping timeout: 245 seconds)
14:53:29*leorize quit (Ping timeout: 256 seconds)
14:54:14*stefanos82 quit (Quit: Quitting for now...)
14:54:23*leorize joined #nim
14:55:27*rayman22201 joined #nim
15:00:51*lf-araujo joined #nim
15:01:30*Vladar joined #nim
15:03:49*dddddd joined #nim
15:11:57*xet7 quit (Quit: Leaving)
15:19:58*neceve quit (Ping timeout: 268 seconds)
15:20:04*neceve_ joined #nim
15:24:37*lf-araujo quit (Remote host closed the connection)
15:28:59*sacredfrog quit (Quit: ZNC 1.7.3 - https://znc.in)
15:32:55*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
15:34:02*laaron joined #nim
15:41:04FromGitter<rauny-brandao> hello guys! ⏎ I'm having a weird error when I add the option --verbosity:3 to the compiler ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d026e902f44e426f59a5b0e]
15:41:20FromGitter<rauny-brandao> my code: `echo "Hello World!"`
15:41:44*xet7 joined #nim
15:41:45FromGitter<rauny-brandao> and the error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d026eb9c2e5ba268cf02346]
15:41:52*Vladar quit (Remote host closed the connection)
15:42:13FromGitter<rauny-brandao> I'm really new to the language (I'm reading the Nim in Action book), so I don't know if I missed something in the installation
15:43:08FromGitter<rauny-brandao> ah btw, this is the command that I've used: `nim c --verbosity:3 hello.nim`
15:44:51FromGitter<Vindaar> Hey @rauny-brandao! That's certainly not what's supposed to happen. It's a recent regression. See also here: https://github.com/nim-lang/Nim/issues/11436
15:45:14*Senketsu quit (Quit: WeeChat 2.4)
15:45:21FromGitter<rauny-brandao> hmm @Vindaar ok, thank you!
15:46:21*Senketsu joined #nim
15:46:38FromGitter<alehander42> i guess you can just use the default verbosity for now
15:48:27FromGitter<rauny-brandao> @alehander42 yeah, with the default values everything is working fine, thank you!
15:50:02*Trustable joined #nim
16:01:23*solitudesf- joined #nim
16:20:37*Trustable quit (Remote host closed the connection)
16:31:18*theelous3 joined #nim
16:32:18*sacredfrog joined #nim
16:40:48*solitudesf- quit (Quit: Leaving)
16:41:10*solitudesf joined #nim
16:46:25*floppydh quit (Quit: WeeChat 2.4)
16:56:36*nsf joined #nim
17:02:24*neceve_ quit (Read error: Connection reset by peer)
17:06:56*neceve joined #nim
17:09:51*couven92 quit (Quit: Client disconnecting)
17:14:42*neceve quit (Ping timeout: 258 seconds)
17:15:10*neceve joined #nim
17:19:13FromGitter<NamPNQ> @leorize Here is simple snippet code: https://play.nim-lang.org/index.html?ix=1LGV
17:32:36*neceve quit (Remote host closed the connection)
17:36:01*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:36:36*laaron joined #nim
17:37:40*neceve joined #nim
17:39:37*kyby64 joined #nim
17:43:41*Jjp137 quit (Read error: Connection reset by peer)
17:44:00leorizeNamPNQ: uhmm, what's wrong?
17:44:26*Jjp137 joined #nim
17:47:49*neceve quit (Ping timeout: 246 seconds)
17:48:23*neceve joined #nim
17:48:51*m|b joined #nim
17:53:26*jjido joined #nim
17:58:33*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:01:46*bobby joined #nim
18:13:37FromGitter<NamPNQ> The wrong is unhandled exception, we should catch error on failed, on change way to raise Exception
18:14:18*Jesin joined #nim
18:14:47leorize? there's no unhandled exception
18:15:47leorizeoh, it's in the debug view
18:15:50leorizemissed that
18:15:56leorizeso you'd like to capture this exception?
18:16:25FromGitter<NamPNQ> we can use try-except to capture exception
18:16:35FromGitter<NamPNQ> but it's wrong what we need
18:16:38FromGitter<NamPNQ> The docs say
18:16:49FromGitter<NamPNQ> `The most reliable way to handle exceptions is to use yield on a future then check the future's failed property.`
18:17:35FromGitter<NamPNQ> And I rethink how we deal with it
18:17:36FromGitter<NamPNQ> https://github.com/nim-lang/Nim/blob/master/lib/pure/smtp.nim#L152
18:17:53*Vladar joined #nim
18:20:34leorizeuhmmm, the exception is unhandled because you didn't handle it?
18:21:03leorizewrap a try-except block around the waitFor and you can capture the exception
18:22:54*jjido joined #nim
18:23:11*Jesin quit (Excess Flood)
18:23:36*Jesin joined #nim
18:23:45*arecaceae quit (Remote host closed the connection)
18:24:06*arecaceae joined #nim
18:25:53*couven92 joined #nim
18:26:35*Trustable joined #nim
18:28:35*rockcavera quit (Remote host closed the connection)
18:31:51FromGitter<NamPNQ> I curious why we don't implement just like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d029697209ae3263ac32595]
18:33:43*NimBot joined #nim
18:34:35leorizeyou can try doing so and see if the testsuites scream at you
18:34:51leorizedom96 might be able to answer your question
18:36:33FromGitter<jrfondren> I'd say that sending QUIT isn't necessarily the thing I want to do on an exception, so a library shouldn't make that decision.
18:36:34FromGitter<NamPNQ> currently i think this is a limit of language implement
18:36:52leorizeI've traced down the commit that introduced this
18:37:03leorizeit's from 5 yrs ago
18:37:10leorizeback when async doesn't support exceptions
18:37:38FromGitter<NamPNQ> async still dont support exception?
18:37:46FromGitter<jrfondren> ah that's how it's implemented anyway.
18:38:05leorize@NamPNQ the sentence implies that it now supports exceptions :p
18:50:02*AndChat|624225 quit (Ping timeout: 245 seconds)
18:50:28*drewr quit (Quit: ERC (IRC client for Emacs 26.2))
18:50:40*envoyt joined #nim
18:55:49Acid147How do I get "nimble install" to use command line options for my package? I've tried adding a nim.cfg to the repository and using switch() in the nimble file, both don't seem to change the result.
19:00:07leorizewhat exactly are you trying to do?
19:03:22*al_ joined #nim
19:04:51Acid147I'm trying to create a freestanding binary with --os:standalone, which works with nimble build, but when I install it from the repository using nimble install, it's a normal Linux binary.
19:07:58leorizeyea, for those things you can't do it like that
19:09:39Acid147Oh, okay
19:14:25*nsf quit (Quit: WeeChat 2.4)
19:23:44*al_ quit (Quit: al_)
19:39:37*kyby64 quit (Ping timeout: 245 seconds)
19:41:37*narimiran joined #nim
19:47:55FromGitter<kayabaNerve> You can try/except around await just fine. I've never had an issue.
19:48:50FromGitter<dom96> Acid147: leorize: you can do that. Just put your --os:standalone in a mainFile.nim.cfg file
19:49:25FromGitter<dom96> @NamPNQ you can use try except in async these days. We need to update docs.
19:50:13leorizeyou should clean up those TODOs, now that working support for exceptions in async is around
19:54:46*m|b quit (Quit: Connection closed for inactivity)
20:02:18*PMunch joined #nim
20:06:25*laaron quit (Remote host closed the connection)
20:06:29*laaron- joined #nim
20:07:10dom96leorize: you could give us a hand :)
20:08:55Acid147dom96 I've tried that too, still a normal Linux binary file. Maybe I'm doing something wrong? I'm trying to compile an empty Nim file, which should fail for --os:standalone but doesn't...
20:09:19dom96Acid147, how would you normally compile it (without Nimble)?
20:10:20Acid147I've only tried it with nimble (nimble build)
20:10:32Acid147And nimble build does recognize the config file and fails
20:11:23dom96try it with `nim c` (or `nimble c`) and figure out what options you need
20:12:51lqdev[m]does Nim have something similar to `__has_include`?
20:17:12Acid147nim c needs --os:standalone to fail (without nim.cfg), so it's the same as nimble build
20:18:18Acid147Oh, I think I found the problem
20:18:35narimiransome very nice words here: http://codeninja.blog/2019/exploring-nim/
20:19:24Acid147nimble build uses the repository as a source and not the directory, and I didn't commit these changes -.-
20:19:58Acid147*nimble install, not nimble build
20:20:47*neceve quit (Read error: Connection reset by peer)
20:23:01dom96Acid147, run `nimble install` without any parameters in your package's dir
20:23:06dom96and it'll install that dir
20:23:55*narimiran quit (Ping timeout: 248 seconds)
20:24:16Acid147I got it to work as expected after a commit
20:40:59PMunchnarimiran, yes I saw that :)
20:41:02PMunchNice article
20:50:10*Trustable quit (Remote host closed the connection)
20:51:39*envoyt quit (Ping timeout: 248 seconds)
20:54:07*envoyt joined #nim
20:58:42rayman22201@Pmunch! you were afk when I pinged you yesterday. I saw your keepass lib and I wanted to thank you for making it! and ask some questions about it. What version of keepass database does it support? How hard do you think it is to add key file support?
20:59:08PMunchOh thanks :)
20:59:59PMunchI think the format was the v2
21:00:20rayman22201excellent. Exactly what I need :-)
21:00:45PMunchAnd key file support, not really sure
21:01:06PMunchIt's probably not that tricky though
21:02:26jjidoI use pwsafe, KeePass looks similar
21:03:51rayman22201I started to look at what the python lib does, and it doesn't seem terrible, basically read the key file, hash it, and concatenate it with the hashed password. Then use that combined key to decrypt.
21:03:58rayman22201I was just curious if you had looked into it
21:04:16*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:05:17PMunchAh, yeah that sounds simple enough
21:06:06rayman22201I have used KeePassX for a long time, but I was building some personal utility script that I want to be able to read a password from my keepass db. Really it's just for laziness :-P
21:06:08PMunchHaven't really thought about it, I wrote that lib so I could have a Nim program take my password and the file, and feed the results to xlunch for me to search and choose the one I want to write out
21:06:25rayman22201lol, that's similar to what I want to do
21:06:30PMunchHaha, pretty much yeah :)
21:06:58rayman22201I really didn't expect Nim to have a lib for this, so I was very happy when I found it on nimble.directory lol
21:07:13PMunchI have a keyboard shortcut which prompts me for a password, then it pops up xlunch with all the entries which I can directly search, selecting one writes it out in whatever field was active when I hit the shortcut
21:08:02rayman22201awesome!
21:08:14rayman22201unfortunately, I use a key file, because I'm one of "those" extra paranoid people lol. So I make extra work for myself :-P
21:13:28*PMunch quit (Remote host closed the connection)
21:23:15*jjido joined #nim
21:46:52*drewr joined #nim
21:50:48FromGitter<kaushalmodi> narimiran: cool writeup on that codeninja blog
21:51:18FromGitter<jivank> are any of the core devs on github sponsors?
22:00:53*solitudesf quit (Ping timeout: 245 seconds)
22:06:18*laaron- quit (Remote host closed the connection)
22:08:10*laaron joined #nim
22:10:25*couven92 quit (Quit: Client Disconnecting)
22:20:39federico3github sponsors?
22:21:00dom96narimiran[m], ooh, nice article
22:21:43skrylar[m]i used to use uh. "pass" i think? which is a thin script over some gpg files in a folder
22:21:58dom96federico3, new GitHub feature
22:22:27dom96jivank: not as of yet AFAIK. I wonder what my employer would say if I was on it hmmm
22:22:34*lf-araujo joined #nim
22:23:55skrylar[m]masterpassword / qmasterpassword are also nice; they generate from salts and rules so there is no actual data stored (other than for convenience) which has been useful
22:32:34*Vladar quit (Remote host closed the connection)
22:33:03federico3skrylar[m]: I've been always wondering why there aren't more stateless password managers
22:33:15rayman22201masterpassword is a cool idea. I have just been using keepass for a long long time. Long before masterpassword existed. my database is huge and I have no incentive to change lol.
22:35:17rayman22201@narimiran +1 to the code ninja blog. glowing reviews are awesome
22:36:50FromGitter<kaushalmodi> dom96: regarding https://github.com/massung/hn-reader/issues/2
22:37:04FromGitter<kaushalmodi> cfg vs nims :)
22:37:23dom96yeah, .nims isn't as easy to explain
22:37:31dom96That's why I opted for .nim.cfg
22:37:40dom96Since you can always just copy and paste the options without worries
22:39:18FromGitter<kaushalmodi> At times I wonder if it's just me using the config.nims and @juancarlospaco :)
22:40:49rayman22201+1 to Dom giving tips in to the article author lol.
22:40:59*arecaceae quit (Remote host closed the connection)
22:41:18*arecaceae joined #nim
22:43:18dom96+1 to kaushalmodi to going even further and creating a PR :D
22:50:08*lf-araujo quit (Ping timeout: 248 seconds)
23:03:03FromGitter<jivank> federico3, it looks like github has a sponsor program that takes no fee and they are doubling any contributions
23:03:42FromGitter<jivank> doubling for the first year, not sure if that means the no fee will end too
23:09:09*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
23:14:56*Acid147 quit (Quit: Acid147)
23:15:36skrylar[m]federico3: brainwallet could be an argument against it; someone once tried the stateless method for bitcoin, and it was greatly broken
23:17:05skrylar[m]gdk3 bindings soon.. rounding off a few edges
23:26:45*krux02 quit (Remote host closed the connection)