00:00:14 | FromGitter | <kayabaNerve> Thanks for the info |
00:00:56 | FromGitter | <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:32 | xace | jrfondren, 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:38 | xace | guess i should scrape the terminfo for what `\e[?1000l` really means) |
00:42:34 | FromGitter | <kaushalmodi> xace: did you see my message about smenu? |
00:43:05 | xace | kaushalmodi: no i did not. did you write about it recently? |
00:43:29 | FromGitter | <kaushalmodi> No, I didn't do anything |
00:43:39 | FromGitter | <kaushalmodi> Thinking of wrapping it in Nim |
00:43:49 | FromGitter | <kaushalmodi> Search for smenu GitHub |
00:44:19 | xace | oh, do you intend to interface with it by re-compiling it from source or calling the binary? |
00:44:32 | FromGitter | <kaushalmodi> It has header file |
00:44:45 | FromGitter | <kaushalmodi> So should be easy to use nimterop on it |
00:45:07 | xace | my 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:10 | FromGitter | <kaushalmodi> Nimterop can clone from source and build the .so |
00:45:40 | FromGitter | <kaushalmodi> My idea is that direct C interface might be more efficient? |
00:45:52 | xace | ah, 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:41 | xace | (i wasn't reading as i was writing that, im on a phone and very distracted) |
00:52:45 | shashlick | It's possible cause go can be called from C |
00:52:56 | shashlick | But it's convoluted |
00:54:21 | xace | shashlick: 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:40 | rayman22201 | @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:50 | FromGitter | <kaushalmodi> shashlick: are you here? |
03:20:58 | shashlick | what's up |
03:22:13 | FromGitter | <kaushalmodi> :) |
03:22:18 | FromGitter | <kaushalmodi> I am attempting this: https://github.com/kaushalmodi/nim-smenu/blob/master/src/smenu.nim |
03:22:37 | FromGitter | <kaushalmodi> smenu.h has a regex_t type that's coming from <regex.h> |
03:23:11 | FromGitter | <kaushalmodi> I tried adding `#include <regex.h>` to `smenu.h` (it doesn't have it originally) but that didn't work |
03:23:27 | FromGitter | <kaushalmodi> so how do I `cImport` `<foo.h>`? |
03:23:52 | FromGitter | <kaushalmodi> if you clone that repo and run nimble build, you will see the error |
03:24:17 | FromGitter | <kaushalmodi> ah! I have the gitpull commented out |
03:24:35 | FromGitter | <kaushalmodi> just letting you know (that's not the cause of the problem of course) |
03:25:34 | shashlick | am looking |
03:26:01 | leorize | just a note, regex.h is a gnu-extension, so it's not available on non-gnu systems |
03:26:34 | shashlick | remember you have to run things in a static block for it to happen at compile time |
03:26:35 | FromGitter | <kaushalmodi> smenu probably won't work cross-platform |
03:26:38 | shashlick | also, nimterop has configure support |
03:26:54 | FromGitter | <kaushalmodi> shashlick: oh, I never looked for it |
03:27:33 | FromGitter | <kaushalmodi> leorize: smenu builds and runs fine on my system |
03:27:50 | FromGitter | <kaushalmodi> on Windows though, it would probably run only in the WSL env |
03:28:42 | FromGitter | <kaushalmodi> shashlick: what should I be doing in static block? |
03:28:54 | FromGitter | <kaushalmodi> i.e. I have always run cImport outside static |
03:29:20 | shashlick | cimport is fine |
03:29:42 | leorize | please add macros / template for this |
03:29:59 | leorize | keep reminding everyone to add `static` means something is really wrong with the interface |
03:33:45 | shashlick | blame that tim guy 😞 |
03:34:23 | leorize | you have commit access :p |
03:34:48 | shashlick | setCurrentDir won't work |
03:34:52 | shashlick | use configure |
03:38:13 | FromGitter | <kaushalmodi> shashlick: actually configure is working.. |
03:38:20 | FromGitter | <kaushalmodi> it's creating config.h |
03:38:33 | FromGitter | <kaushalmodi> and the build.sh is also running.. I am finally getting the smenu.so |
03:38:46 | FromGitter | <kaushalmodi> failure happens at cInclude |
03:38:55 | * | dddddd quit (Remote host closed the connection) |
03:40:44 | FromGitter | <kaushalmodi> in any case, I switched to using `configure` as it makes the code concise |
03:40:54 | FromGitter | <kaushalmodi> but I still get the same error: ⏎ ⏎ > Error: undeclared identifier: 'regex_t' |
03:41:07 | FromGitter | <kaushalmodi> I have updated that nim-smenu repo with this last suggested change |
03:41:31 | shashlick | can you push after fixing configure? I can try it out |
03:41:37 | FromGitter | <kaushalmodi> just did |
03:41:37 | shashlick | oh okay let me try |
03:41:56 | FromGitter | <kaushalmodi> I somehow need to do `cImport("<regex.h>")` before `cImport(.."smenu.h")` |
03:47:05 | FromGitter | <kaushalmodi> in parallel, I thought.. let me just create a regex_t equivalent type in Nim |
03:47:09 | FromGitter | <kaushalmodi> so I find https://github.com/openbsd/src/blob/master/include/regex.h#L52 |
03:47:39 | FromGitter | <kaushalmodi> and then looking for `re_guts`, I get to http://llvm.org/doxygen/structllvm__regex.html !! |
03:47:49 | shashlick | why do you have the files copied into the src dir |
03:48:39 | FromGitter | <kaushalmodi> the naming might be confusing |
03:48:57 | FromGitter | <kaushalmodi> here, `srcDir` is `<repo>/build/smenu` |
03:49:24 | FromGitter | <kaushalmodi> https://github.com/kaushalmodi/nim-smenu/blob/07eedc43dffed40a3e5acfbd26310e4d99020215/src/smenu.nim#L4-L6 |
03:49:57 | shashlick | no i get config.h and configure and other files in the src/smenu.nim directory |
03:51:19 | FromGitter | <kaushalmodi> ah, I see.. let me fix that |
03:52:20 | FromGitter | <kaushalmodi> I think that did not happen earlier when I ran changecurrentdir |
03:52:21 | shashlick | and build.sh doesn't run so smenu isn't built |
03:52:39 | shashlick | you need to `cd xyz && ./build.sh` |
03:53:24 | FromGitter | <kaushalmodi> yes, earlier I did `setCurrentDir(srcDir)` outside static, and ran configure, etc outside |
03:53:35 | FromGitter | <kaushalmodi> fixing it |
03:55:59 | shashlick | I don't think that will run at compile time |
03:56:46 | FromGitter | <kaushalmodi> yeah, that didn't work |
03:56:55 | FromGitter | <kaushalmodi> so doing the cd srcDir && |
03:57:01 | FromGitter | <kaushalmodi> I have pushed that fix |
03:57:14 | FromGitter | <kaushalmodi> now smenu is compiled, which I mv to smenu.so |
03:57:31 | FromGitter | <kaushalmodi> but still the same issue about regex_t |
03:59:21 | shashlick | if you don't intend creating regex_t objects, you can just get away with `type regex_t = object` |
04:04:23 | FromGitter | <kaushalmodi> makes sense |
04:04:35 | FromGitter | <kaushalmodi> that let me get past and now I get: ⏎ ⏎ > Error: undeclared identifier: 'home' |
04:04:48 | FromGitter | <kaushalmodi> let me try to work it out .. |
04:09:54 | FromGitter | <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:05 | FromGitter | <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:01 | FromGitter | <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:35 | FromGitter | <kaushalmodi> it finally compiles but I realize late that I probably cannot just wrap smenu :/ |
04:23:21 | FromGitter | <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:33 | FromGitter | <kaushalmodi> oh well |
04:29:42 | shashlick | you could always just comment that portion out with a /* */ combo and build as a lib |
04:32:14 | FromGitter | <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:38 | shashlick | you can also include regex.h with cAddStdDir() within static and then cImport(cSearchPath "regex.h") |
04:32:54 | FromGitter | <kaushalmodi> regex_t is not the issue any more |
04:32:58 | shashlick | is the main code in the main function? |
04:33:04 | FromGitter | <kaushalmodi> yeah .. |
04:33:42 | FromGitter | <kaushalmodi> https://github.com/p-gen/smenu/blob/master/smenu.c#L4666 |
04:33:52 | FromGitter | <kaushalmodi> it's kinda heart-breaking, heh |
04:33:59 | shashlick | you could rename main to something else no? |
04:34:01 | FromGitter | <kaushalmodi> that main func keeps on going for thousands of lines |
04:34:11 | shashlick | really well architected eh |
04:35:30 | FromGitter | <kaushalmodi> I was hoping that internally it did something like C equivalent of `proc(inputs: seq[string], smenuOpt1: bool, ...): seq[string]` |
04:41:17 | shashlick | it'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:59 | FromGitter | <kaushalmodi> I didn't understand |
04:44:06 | shashlick | well 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:13 | shashlick | and then call it with the right params |
04:47:23 | * | envoyt quit (Ping timeout: 248 seconds) |
04:48:22 | FromGitter | <kaushalmodi> I'll need to revisit this late |
04:48:24 | FromGitter | <kaushalmodi> later |
04:48:50 | FromGitter | <kaushalmodi> So cCompile compiles into the nim binary? |
04:49:04 | shashlick | ya it will get compiled into a .o file and then linked in |
04:49:22 | FromGitter | <kaushalmodi> oh ok |
04:49:34 | FromGitter | <kaushalmodi> but the build.sh is already compiling it |
04:49:59 | * | envoyt joined #nim |
04:50:34 | shashlick | ya but that's compiling it into an executable binary |
04:50:35 | FromGitter | <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:39 | shashlick | with a main function |
04:51:12 | FromGitter | <kaushalmodi> I had made a weak attempt of compiling the smenu.c, but it didn't work |
04:51:20 | shashlick | you 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:30 | shashlick | need to see what build.sh does |
04:51:36 | FromGitter | <kaushalmodi> yeah |
04:51:50 | FromGitter | <kaushalmodi> will need to do a separate cCompile for each .c file in order |
04:53:30 | FromGitter | <kaushalmodi> it's calling the makefile, which has: https://github.com/p-gen/smenu/blob/a5856a023b42d3fa8c1198571e395da11d009bf3/Makefile#L310-L312 |
04:53:47 | FromGitter | <kaushalmodi> so I'll need to call cCompile for each .c there? |
04:54:18 | shashlick | you can just say *.c |
04:54:53 | FromGitter | <kaushalmodi> ok |
04:55:11 | FromGitter | <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:05 | leorize | narimiran: feels adventurous enough to enable azure for Nim? :p |
06:03:33 | leorize | I can make the errors disappear for now for testing how flaky are those tests :) |
06:06:15 | narimiran | the more the merrier (that's for the number of CIs, not for errors :P) |
06:09:11 | leorize | you 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:37 | narimiran | btw, any news on cirrus? |
06:21:10 | leorize | not working on it yet :p |
06:21:18 | leorize | I'm waiting for reviews on azure |
06:21:38 | leorize | then I'll split the setup steps in to reusable scripts |
06:21:55 | leorize | then we can implement any kind of CI out there |
06:22:00 | leorize | into* |
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:04 | narimiran | leorize: 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:54 | leorize | yea, we download openblas just to pick out openssl |
06:48:02 | leorize | the dlls bundle on nim-lang.org contains all of them |
06:48:15 | narimiran | openblas is used to test some packages |
06:49:21 | leorize | how so, it's not even in PATH |
06:49:33 | leorize | we only pick out openssl dlls from it afaict |
06:49:50 | narimiran | https://github.com/unicredit/neo/blob/master/neo.nimble |
06:50:28 | leorize | appveyor for neo is passing :) |
06:50:39 | narimiran | yeah, that's the strangest part :) |
06:51:03 | leorize | well, it's never used since openblas dlls weren't in PATH |
06:51:29 | leorize | and it even passes on azure :p |
06:51:31 | narimiran | in devel, package testing has stopped after 41 packages, now i'm trying to figure out why |
06:52:15 | narimiran | ahh, nimly sigsegv's |
06:52:35 | leorize | Error: unhandled exception: The filename or extension is too long. |
06:52:37 | leorize | :P |
06:53:56 | * | envoyt quit (Ping timeout: 272 seconds) |
06:54:21 | narimiran | ...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:21 | FromGitter | <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:41 | FromGitter | <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:15 | FromGitter | <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:30 | FromGitter | <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:44 | Araq | we're looking into it |
07:54:52 | Araq | but it's not the only problem with 0.20 ... :-/ |
08:01:48 | * | floppydh joined #nim |
08:05:50 | FromGitter | <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:03 | FromGitter | <mratsim> I think it's just the generics that broke the camel back so to speak |
08:07:23 | FromGitter | <mratsim> probably sigmatch or something allocates a lot in the VM |
08:07:48 | FromGitter | <mratsim> I put some figures here: https://github.com/mratsim/Arraymancer/issues/359#issuecomment-500108767 |
08:10:38 | FromGitter | <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:13 | leorize | sounds 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:30 | PMunch | Just 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:24 | leorize | :D |
09:08:44 | PMunch | This is the second time I've found someone who's tried Nim in the wild |
09:08:49 | PMunch | And both were at work |
09:15:24 | * | laaron quit (Remote host closed the connection) |
09:18:50 | Zevv | I just got stubborn C++ guys here. "Yeah, C++ can do that in C++20" |
09:20:35 | * | fredrik92 joined #nim |
09:20:49 | leorize | and then "C++ can do that in C++23", and so on |
09:21:00 | PMunch | Haha, know the kind from my first job |
09:22:46 | * | couven92 quit (Ping timeout: 272 seconds) |
09:23:17 | * | laaron joined #nim |
09:25:08 | Zevv | https://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:32 | lqdev[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:32 | Zevv | length changing might cause allocs |
10:33:20 | Zevv | read lib/core/seqs.nim, it's not much |
10:35:12 | FromGitter | <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:33 | leorize[m] | lqdev: shrinking them is harmless as cap is kept, but adding might cause allocs |
11:04:28 | lqdev[m] | so, say, if a seq's length is expanded to 512 and then shrinked to 256 its capacity stays at 512? |
11:04:34 | leorize[m] | NamPNQ: well it would help if we can know what's the exact problem :p |
11:04:47 | leorize[m] | lqdev: yea, there's also newSeqWithCap as well |
11:05:52 | lqdev[m] | it should be fine then for my use case |
11:06:40 | FromGitter | <gogolxdong> should we keep using --gc:regions utils newruntime |
11:12:35 | * | Acid147 joined #nim |
11:14:19 | leorize[m] | there are use case for gc regions that can't be done w new runtime afaict |
11:18:05 | Araq | gogolxdong: if --gc:regions works for you, don't change it (yet) |
11:22:16 | * | laaron quit (Remote host closed the connection) |
11:26:39 | FromGitter | <NamPNQ> @leorize i cant capture this exception, it crash my program with unhandle exception |
11:29:51 | leorize[m] | can you create a small reproducible example? |
11:31:15 | * | laaron joined #nim |
11:34:21 | * | sealmove joined #nim |
11:36:12 | FromGitter | <kaushalmodi> Araq: I've removed the unnecessary call to split in the unsetEnv PR: https://github.com/nim-lang/Nim/pull/11466 |
11:36:19 | FromGitter | <kaushalmodi> And it passes |
11:40:10 | lqdev[m] | I just found a way of wrapping miniaudio successfully. No nimterop, unfortunately |
11:40:22 | lqdev[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:46 | shashlick | That'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:36 | shashlick | Another one is to optionally offer var params instead of ptrs |
12:30:19 | PMunch | Hmm, "includes" in Nim are case sensitive on Linux but not on Windows? |
12:37:48 | leorize[m] | ntfs is case-insensitive |
12:38:37 | * | Snircle joined #nim |
12:42:44 | PMunch | Yeah I know |
12:43:01 | PMunch | I think FAT is also case-insensitive |
12:43:34 | PMunch | But it would be nice if Nim could at least produce a warning. Easy mistake to make since Nim is case-insensitive itself |
12:44:00 | PMunch | People 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:30 | PMunch | So 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:54 | FromGitter | <kaushalmodi> PMunch: there's an open issue for that, look for issues opened by nc-x |
12:56:23 | * | laaron joined #nim |
12:57:23 | PMunch | Ah okay |
12:58:12 | PMunch | Ah, gotta love a good error message: "Cannot Import dll:C:\users\peter\Temp\is-81PRK.tmp\MyNimDll.dll" |
12:58:17 | PMunch | Why?! |
13:02:09 | Araq | https://youtu.be/8qdagbtgl-8 |
13:02:29 | Araq | as promised |
13:03:09 | * | AndChat|624225 joined #nim |
13:04:13 | sealmove | yaaayyy! |
13:05:36 | * | envoyt quit (Ping timeout: 248 seconds) |
13:09:33 | * | Senketsu joined #nim |
13:31:32 | Araq | http://pubs.opengroup.org/onlinepubs/009695399/functions/unsetenv.html |
13:31:39 | Araq | [EINVAL] |
13:31:39 | Araq | The name argument is a null pointer, points to an empty string, or points to a string containing an '=' character. |
13:31:48 | Araq | so ... env vars cannot contain '=' |
13:32:07 | Araq | ah my bad, I misread |
13:32:27 | Araq | environment variable *names* cannot contain '=' |
13:34:12 | * | solitudesf- quit (Ping timeout: 245 seconds) |
13:34:57 | PMunch | Hmm, is the creator of wnim ever here? |
13:36:18 | livcd | I have never seen Ward here |
13:37:36 | * | laaron quit (Remote host closed the connection) |
13:39:35 | PMunch | Drats |
13:39:45 | * | laaron joined #nim |
13:39:49 | PMunch | Trying to get his wNim to run in a DLL imported by InnoSetup |
13:40:08 | PMunch | I can use winim directly, but wNim just hangs |
13:40:19 | PMunch | Huh, can't nim cpp cross compile? |
13:40:42 | PMunch | I get an error that it can't use g++ when I specify -d:mingw |
13:40:56 | livcd | PMunch: are you using latest winim ? |
13:41:01 | PMunch | Or rather an error message from g++ saying it can't find Windows.h |
13:41:07 | Araq | Nim can always cross-compile, bug mingw/gcc can't |
13:41:15 | PMunch | livcd, yes, just installed it a couple minutes ago |
13:41:24 | FromGitter | <kaushalmodi> Araq: so all good related to unsetEnv? |
13:41:39 | PMunch | Via Nimble though, so if there is a newer version on GitHub than what Nimble grabs then no |
13:41:59 | narimiran | nimble install foo@#head |
13:42:08 | PMunch | Araq, well nim c -d:mingw works like a charm |
13:42:57 | livcd | but winim was just updated, wNim is maybe not updated to reflect changes on stable |
13:44:10 | PMunch | Well it works if I just compile it to an exe |
13:44:21 | PMunch | Just not when I run it as a DLL under InnoSetup |
13:45:28 | PMunch | Araq, http://ix.io/1LG7 |
13:45:51 | PMunch | It seems like the cpp target tries to use Linux g++ instead of mingw |
13:46:44 | * | leorize joined #nim |
13:51:59 | Araq | PMunch: fix config/nim.cfg |
13:55:49 | leorize | narimiran: I can see how your nimsuggest crashes all the time :p |
13:56:11 | narimiran | leorize: hehe, i was wondering if you would notice that :) |
13:59:01 | PMunch | Hmm, 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:12 | leorize | narimiran: you should have fixed your nimsuggest beforehand :p any demo is good for PR :p |
13:59:13 | FromGitter | <mratsim> gcc.cpp.exe |
14:00:08 | narimiran | leorize: 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:29 | leorize | np :) |
14:01:11 | leorize | I heard that neovim got gdb integration now, gotta try it sometimes :) |
14:01:25 | narimiran | at first, i thought it doesn't work because i was switching to 0.19, only to realize later it is always |
14:01:54 | PMunch | mratsim, thanks :) |
14:02:13 | PMunch | I tried that but I had an issue elsewhere which make me think it was wrong |
14:02:37 | leorize | someone on the forum managed to trip up some range errors in the compiler |
14:02:46 | leorize | https://forum.nim-lang.org/t/4933 |
14:03:50 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:04:21 | PMunch | Hmm: http://ix.io/1LGd |
14:04:22 | * | laaron joined #nim |
14:04:42 | PMunch | So I managed to get it compiled, but not to get it running.. |
14:05:03 | PMunch | (Those errors show up on a virtual machine as well) |
14:05:15 | leorize | you needs those dll next to the .exe |
14:05:29 | PMunch | Next to it? |
14:05:36 | leorize | in the same folder |
14:05:46 | leorize | those are mingw's |
14:06:01 | leorize | you could probably salvage some from the installation of mingw already in your machine |
14:06:37 | leorize | a way to package these things for windows is to use msys2, or just bundles dlls + licenses |
14:07:17 | PMunch | Aha, okay so that worked |
14:08:10 | PMunch | I was only wanting to try this to see if I could get wnim to work if I compiled to cpp |
14:08:15 | PMunch | But I guess it's not worth the hassle |
14:08:22 | PMunch | Back to the drawing board.. |
14:09:19 | leorize | use vcc and you won't have to worry about mingw :) |
14:09:40 | leorize | or clang for windows if it can use windows c++ runtime |
14:10:21 | PMunch | I'm fine with using the C target :) |
14:10:27 | PMunch | Which "just works" |
14:10:39 | PMunch | Apart from the fact that wNim doesn't work.. |
14:10:50 | PMunch | But I'm off now |
14:10:51 | leorize | until gcc realizes that it needs some "helper" functions in libgcc_s :) |
14:10:55 | PMunch | Bye |
14:11:05 | PMunch | I did compile it with --static-libgcc |
14:11:12 | PMunch | So I think that would be fine :) |
14:11:40 | * | PMunch quit (Remote host closed the connection) |
14:11:41 | leorize | :) |
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:04 | FromGitter | <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:20 | FromGitter | <rauny-brandao> my code: `echo "Hello World!"` |
15:41:44 | * | xet7 joined #nim |
15:41:45 | FromGitter | <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:13 | FromGitter | <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:08 | FromGitter | <rauny-brandao> ah btw, this is the command that I've used: `nim c --verbosity:3 hello.nim` |
15:44:51 | FromGitter | <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:21 | FromGitter | <rauny-brandao> hmm @Vindaar ok, thank you! |
15:46:21 | * | Senketsu joined #nim |
15:46:38 | FromGitter | <alehander42> i guess you can just use the default verbosity for now |
15:48:27 | FromGitter | <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:13 | FromGitter | <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:00 | leorize | NamPNQ: 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:37 | FromGitter | <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:47 | leorize | ? there's no unhandled exception |
18:15:47 | leorize | oh, it's in the debug view |
18:15:50 | leorize | missed that |
18:15:56 | leorize | so you'd like to capture this exception? |
18:16:25 | FromGitter | <NamPNQ> we can use try-except to capture exception |
18:16:35 | FromGitter | <NamPNQ> but it's wrong what we need |
18:16:38 | FromGitter | <NamPNQ> The docs say |
18:16:49 | FromGitter | <NamPNQ> `The most reliable way to handle exceptions is to use yield on a future then check the future's failed property.` |
18:17:35 | FromGitter | <NamPNQ> And I rethink how we deal with it |
18:17:36 | FromGitter | <NamPNQ> https://github.com/nim-lang/Nim/blob/master/lib/pure/smtp.nim#L152 |
18:17:53 | * | Vladar joined #nim |
18:20:34 | leorize | uhmmm, the exception is unhandled because you didn't handle it? |
18:21:03 | leorize | wrap 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:51 | FromGitter | <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:35 | leorize | you can try doing so and see if the testsuites scream at you |
18:34:51 | leorize | dom96 might be able to answer your question |
18:36:33 | FromGitter | <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:34 | FromGitter | <NamPNQ> currently i think this is a limit of language implement |
18:36:52 | leorize | I've traced down the commit that introduced this |
18:37:03 | leorize | it's from 5 yrs ago |
18:37:10 | leorize | back when async doesn't support exceptions |
18:37:38 | FromGitter | <NamPNQ> async still dont support exception? |
18:37:46 | FromGitter | <jrfondren> ah that's how it's implemented anyway. |
18:38:05 | leorize | @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:49 | Acid147 | How 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:07 | leorize | what exactly are you trying to do? |
19:03:22 | * | al_ joined #nim |
19:04:51 | Acid147 | I'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:58 | leorize | yea, for those things you can't do it like that |
19:09:39 | Acid147 | Oh, 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:55 | FromGitter | <kayabaNerve> You can try/except around await just fine. I've never had an issue. |
19:48:50 | FromGitter | <dom96> Acid147: leorize: you can do that. Just put your --os:standalone in a mainFile.nim.cfg file |
19:49:25 | FromGitter | <dom96> @NamPNQ you can use try except in async these days. We need to update docs. |
19:50:13 | leorize | you 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:10 | dom96 | leorize: you could give us a hand :) |
20:08:55 | Acid147 | dom96 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:19 | dom96 | Acid147, how would you normally compile it (without Nimble)? |
20:10:20 | Acid147 | I've only tried it with nimble (nimble build) |
20:10:32 | Acid147 | And nimble build does recognize the config file and fails |
20:11:23 | dom96 | try it with `nim c` (or `nimble c`) and figure out what options you need |
20:12:51 | lqdev[m] | does Nim have something similar to `__has_include`? |
20:17:12 | Acid147 | nim c needs --os:standalone to fail (without nim.cfg), so it's the same as nimble build |
20:18:18 | Acid147 | Oh, I think I found the problem |
20:18:35 | narimiran | some very nice words here: http://codeninja.blog/2019/exploring-nim/ |
20:19:24 | Acid147 | nimble build uses the repository as a source and not the directory, and I didn't commit these changes -.- |
20:19:58 | Acid147 | *nimble install, not nimble build |
20:20:47 | * | neceve quit (Read error: Connection reset by peer) |
20:23:01 | dom96 | Acid147, run `nimble install` without any parameters in your package's dir |
20:23:06 | dom96 | and it'll install that dir |
20:23:55 | * | narimiran quit (Ping timeout: 248 seconds) |
20:24:16 | Acid147 | I got it to work as expected after a commit |
20:40:59 | PMunch | narimiran, yes I saw that :) |
20:41:02 | PMunch | Nice 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:42 | rayman22201 | @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:08 | PMunch | Oh thanks :) |
20:59:59 | PMunch | I think the format was the v2 |
21:00:20 | rayman22201 | excellent. Exactly what I need :-) |
21:00:45 | PMunch | And key file support, not really sure |
21:01:06 | PMunch | It's probably not that tricky though |
21:02:26 | jjido | I use pwsafe, KeePass looks similar |
21:03:51 | rayman22201 | I 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:58 | rayman22201 | I was just curious if you had looked into it |
21:04:16 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:05:17 | PMunch | Ah, yeah that sounds simple enough |
21:06:06 | rayman22201 | I 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:08 | PMunch | Haven'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:25 | rayman22201 | lol, that's similar to what I want to do |
21:06:30 | PMunch | Haha, pretty much yeah :) |
21:06:58 | rayman22201 | I 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:13 | PMunch | I 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:02 | rayman22201 | awesome! |
21:08:14 | rayman22201 | unfortunately, 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:48 | FromGitter | <kaushalmodi> narimiran: cool writeup on that codeninja blog |
21:51:18 | FromGitter | <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:39 | federico3 | github sponsors? |
22:21:00 | dom96 | narimiran[m], ooh, nice article |
22:21:43 | skrylar[m] | i used to use uh. "pass" i think? which is a thin script over some gpg files in a folder |
22:21:58 | dom96 | federico3, new GitHub feature |
22:22:27 | dom96 | jivank: 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:55 | skrylar[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:03 | federico3 | skrylar[m]: I've been always wondering why there aren't more stateless password managers |
22:33:15 | rayman22201 | masterpassword 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:17 | rayman22201 | @narimiran +1 to the code ninja blog. glowing reviews are awesome |
22:36:50 | FromGitter | <kaushalmodi> dom96: regarding https://github.com/massung/hn-reader/issues/2 |
22:37:04 | FromGitter | <kaushalmodi> cfg vs nims :) |
22:37:23 | dom96 | yeah, .nims isn't as easy to explain |
22:37:31 | dom96 | That's why I opted for .nim.cfg |
22:37:40 | dom96 | Since you can always just copy and paste the options without worries |
22:39:18 | FromGitter | <kaushalmodi> At times I wonder if it's just me using the config.nims and @juancarlospaco :) |
22:40:49 | rayman22201 | +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:18 | dom96 | +1 to kaushalmodi to going even further and creating a PR :D |
22:50:08 | * | lf-araujo quit (Ping timeout: 248 seconds) |
23:03:03 | FromGitter | <jivank> federico3, it looks like github has a sponsor program that takes no fee and they are doubling any contributions |
23:03:42 | FromGitter | <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:36 | skrylar[m] | federico3: brainwallet could be an argument against it; someone once tried the stateless method for bitcoin, and it was greatly broken |
23:17:05 | skrylar[m] | gdk3 bindings soon.. rounding off a few edges |
23:26:45 | * | krux02 quit (Remote host closed the connection) |