<< 07-05-2019 >>

00:07:38*cyberjpn joined #nim
00:09:43*hecanjog joined #nim
00:16:12disruptekshashlick: you around? question about nimterop.
00:17:17*rayman22201 quit (Quit: Connection closed for inactivity)
00:22:27*cybj joined #nim
00:28:47*theelous3 quit (Ping timeout: 245 seconds)
00:33:58*cyberjpn quit (Quit: WeeChat 2.4)
00:42:03*kotrcka quit (Ping timeout: 248 seconds)
00:42:18*kotrcka joined #nim
01:05:48*rnrwashere joined #nim
01:30:41*cyberjpn joined #nim
01:47:02*cyberjpn quit (Ping timeout: 250 seconds)
01:55:53*jasper joined #nim
01:56:12*dddddd quit (Remote host closed the connection)
02:00:17*banc quit (Quit: Bye)
02:03:25*abm quit (Quit: Leaving)
02:06:08*cyberjpn joined #nim
02:11:16shashlickHey just saw this
02:11:36shashlick@disruptek ^^
02:12:34disruptekshashlick: just trying to wrap some redland stuff, but it's probably too ambitious.
02:12:58shashlickTaking a look
02:13:41shashlickShare a link?
02:13:42disruptekgetting a codegen error (well, many) but first one is due to some funky enum specification using a bit field (which is solvable).
02:14:05disrupteki don't have any paste setup, but i will try to move something by hand.
02:14:23shashlickhttp://librdf.org?
02:14:56disruptekyeah.
02:16:03disruptekhttps://gist.github.com/disruptek/43bfc48ca3248ee514c79f4072f0f36c
02:16:22disruptekso it pukes on the use of | in the rhs.
02:16:51disruptekError: target STRING not available
02:17:06disrupteki really hate trying to paste into alacritty. brb.
02:17:17shashlickWhat does your wrapper look like?
02:17:25shashlickI can try debugging in 30 minutes
02:17:35disruptek(this is gen'd by nimterop): RASQAL_TRIPLE_SUBJECT | RASQAL_TRIPLE_PREDICATE | RASQAL_TRIPLE_OBJECT* = 12.rasqal_triple_parts
02:18:29disruptekthe wrapper is just 3loc: cIncludeDir("/usr/include/rasqal"); cIncludeDir("/usr/include/raptor2"); cImport("/usr/include/rasqal/rasqal.h")
02:18:58shashlickYa that's obviously wrong, must be a bad ast or nimterop is confused
02:19:02disruptekbut, i haven't nimterop'd before, so i don't know if my expectations are correct.
02:19:12shashlickCan you run toast -ap on that file
02:19:15shashlickAny errors?
02:19:55*banc joined #nim
02:20:05disruptekyeah, that works, so it's a codegen thing on our side, right?
02:20:35disruptekfwiw, i ran `toast --includeDirs=/usr/include/rasqal --recurse /usr/include/rasqal/rasqal.h -a`
02:21:50*rnrwashere quit (Remote host closed the connection)
02:24:11shashlickWell does it print any error nodes?
02:24:16FromGitter<arnetheduck> shashlick, a thing I hit with the sql wrapper: looks like the function pointers that are struct members didn't get converted (https://github.com/arnetheduck/nim-sqlite3-abi/blob/master/sqlite3.h#L774) and those function pointers that did get convertered were done so with a `nimcall` calling convention which seems a bit odd - wasn't expecting it at least: https://github.com/arne
02:24:16FromGitter... theduck/nim-sqlite3-abi/blob/master/sqlite3_abi.nim#L365
02:24:22disrupteki mean, toast -ap doesn't work, but -a yields an s-exp.
02:25:27disruptekhmm, it is tryin to load raptor.h in -ap, which is just a 1-liner including raptor2.h. i guess it doesn't like seemingly-empty includes?
02:27:12disruptekor maybe i'm just screwing up the include dirs somehow.
02:27:31shashlickI'll check both in ten
02:27:55shashlickNo it is a nimterop issue mostly
02:28:52disruptekno rush, and thanks for checking it out. :-)
02:30:22FromGitter<arnetheduck> and one more thing: if I use a cPlugin to rename some symbol, it should really get an `importc`pragma with the original name.. tried it with a type, it got renamed in the nim file but then it uses the wrong name in the generated code (not the same as the name in the header file)
02:30:45disruptekyeah, toast needs the raptor2 include. that `|` should fix some of my issues. still missing some identifiers, but i will dig into those.
02:42:21*rnrwashere joined #nim
02:45:07*jasper quit (Ping timeout: 256 seconds)
02:59:32*vlad1777d_ quit (Ping timeout: 255 seconds)
03:01:49*cyberjpn quit (Ping timeout: 246 seconds)
03:04:42*rnrwashere quit (Remote host closed the connection)
03:12:40*Hexeratops quit (Remote host closed the connection)
03:24:50shashlickokay i'm in
03:26:33disruptekeager!
03:27:50shashlickhow did you install raptor/rasqal
03:27:53shashlickwhich distro
03:28:20disrupteki'm using gentoo, but i think it's pretty stable everywhere.
03:31:40disruptekthere are some debug statements for some of these identifiers (type aliases) that aren't getting emitted as nim code. :-/
03:44:36*rayman22201 joined #nim
03:54:54*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:15:00*nsf joined #nim
04:35:06*jasper joined #nim
04:40:46shashlick@disruptek - found a fix for the enum issue
04:48:23shashlickjust pushed the fix
04:48:30shashlickyou need to set recurse=true in cimport
04:57:17shashlickwell, you don't need recurse, but need to declare those type aliases as objects in nim code since they are defined in the c files, not h files
05:14:15*cyberjpn joined #nim
05:18:04*narimiran joined #nim
05:33:32shashlick@arnetheduck - i've put in a fix for sqlite3_io_methods
05:33:38shashlickbasically nimterop didn't know about volatile
05:34:22shashlickbut you need to comment out line 773 - if you don't, nimterop won't make the real struct since it is a duplicate name
05:39:45shashlickarnetheduck - i don't quite remember why i put in nimcall - should it always be cdecl?
05:49:49*cyberjpn quit (Ping timeout: 246 seconds)
05:55:53*kapil____ joined #nim
05:59:38*krux02 joined #nim
06:01:59*cyberjpn joined #nim
06:08:43*jasper quit (Quit: Page closed)
06:14:21*PMunch joined #nim
06:17:33*dddddd joined #nim
06:21:33*solitudesf joined #nim
06:26:56shashlick@arnetheduck - can you please give an example of the importc pragma bug?
06:28:54FromDiscord_<JGiraffe> Hey I'm trying to get nim functional on my new laptop and whenever I try to compile a helloworld.nim file it says " cannot open 'C:\Users\DELL\helloworld.nim' "
06:29:05cy1any idea how to unmangle names?
06:29:49FromDiscord_<JGiraffe> If you mean me no I'm a beginne
06:29:55FromDiscord_<JGiraffe> If you mean me no I'm a beginner
06:30:12FromGitter<jrfondren> name mangling's not related to whatever your issue is
06:30:15cy1f/i valgrind tells me "More than 1000 different errors detected." but all it says is like semTypeSection_7YxUILpPxooC5qqa89a54dw_43
06:31:06FromGitter<jrfondren> cy1, you can search for that in your nim cache and then examine it to get an idea of what it is.
06:31:08*Gertm left #nim ("Leaving")
06:31:11FromDiscord_<JGiraffe> Is there somewhere I should've downloaded nim besides the desktop?
06:31:17cy1I'm segfaulting the compiler somehow, with this macro. I think some nodes might be getting freed, despite being added elsewhere...
06:31:29cy1oh, good idea jrfondren
06:34:29FromDiscord_<JGiraffe> I'm gonna try reinstalling if running finish.exe doesn't fix it
06:34:41cy1Good luck JGiraffe
06:35:20FromGitter<alehander42> you can try the readme
06:35:21FromGitter<alehander42> method
06:36:18cy1I don't know what directory nim runs in, or how Microsoft manages that stuff. I'm guessing it's in "C:\Users\DELL" and your helloworld.nim file is not.
06:39:21FromDiscord_<JGiraffe> would it need to be in the "DELL" parent folder or does a sub folder work?
06:40:08cy1 If nim is looking in that folder, then it's looking in that folder. You might be able to use some sort of "change directory" command to move into a subfolder.
06:40:21*jjido joined #nim
06:41:24FromDiscord_<JGiraffe> at the beginning of the guide I'm following it says to "Open your terminal in the same directory where your file is"
06:41:45cy1Sounds like a plan.
06:42:32FromDiscord_<JGiraffe> So far I haven't been able to figure out how to open command prompt to any location except C:\Users\DELL
06:43:12cy1I know there's a command to change to a different directory, aka location or subfolder. Not sure what it is on Microsoft though. Try "help cd"?
06:44:28FromGitter<alehander42> so cd should work
06:45:56*lritter joined #nim
06:49:43FromDiscord_<JGiraffe> I've noticed that when try to download mingw it stops before 100% and closes the command prompt
06:50:22FromDiscord_<JGiraffe> I tried changing the directory and it kept saying path not found
06:50:38FromDiscord_<JGiraffe> now after moving the file around a bit it says " invocation of external compiler program failed. The system cannot find the file specified.
06:50:39FromDiscord_<JGiraffe> ; Additional info: "Requested command not found: \'gcc.exe -c -w -mno-ms-bitfields -IC:\\Users\\DELL\\Desktop\\NIM\\nim-0.19.4\\lib -o C:\\Users\\DELL\\nimcache\\helloworld_d\\helloworld.c.o C:\\Users\\DELL\\nimcache\\helloworld_d\\helloworld.c\'. OS error:" 2"
06:52:10FromDiscord_<JGiraffe> ok I guess it closes it at 100%
06:54:59FromDiscord_<JGiraffe> Where would you recommend extracting the nim folder to
06:55:05FromDiscord_<JGiraffe> Where would you recommend extracting the nim folder to?
07:00:00*gmpreussner_ quit (Quit: kthxbye)
07:02:40cy1man, this is way too much trouble. Just wanted a thing where you specify options like procedure(foo, bar, baz(42), name("etc")) but my god the complexity of these macros.
07:03:20*Perkol joined #nim
07:04:20FromDiscord_<JGiraffe> Every time I run finish.exe I get this message: No compatible MingW candidates found in the standard locations [Error]
07:04:32*gmpreussner joined #nim
07:05:10PerkolIn here https://github.com/status-im/nim-byteutils/blob/master/byteutils.nim How do I use variant of hexToByteArray which outputs to open array?
07:05:55FromDiscord_<JGiraffe> And that's right after I downloaded it and tried compiling my file, to which it told me nim wasn't a supported expression
07:06:06narimiranPerkol: array is already an openArray
07:06:28*cyberjpn quit (Ping timeout: 246 seconds)
07:07:49cy1JGiraffe: MingW is an open source C compiler that most people use on Microsoft systems. I'm not sure what it takes for it to be "compatible" though. But Nim compiles to C code, which then needs a C compiler to become machine code.
07:08:25FromDiscord_<JGiraffe> And that's right after I downloaded it and tried compiling my file, to which it told me 'nim' is not recognized as an internal or external command,
07:08:26FromDiscord_<JGiraffe> operable program or batch file.
07:08:28Perkolnarimiran: what do you mean?
07:08:57narimiranJGiraffe: did you follow installation instructions from https://nim-lang.org/install_windows.html ?
07:09:52narimiranPerkol: i mean that if you have some other func which takes an openArray, you can pass the array to it
07:09:56*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:10:19PerkolLet's say I have proc myproc(input: openArray[byte]) How do I pass hexToByteArray to it?
07:10:26cy1It's more political than anything, honestly. People just haven't agreed on everything, so you have to put the puzzle pieces together yourself. All the pieces are out there though.
07:10:50narimiranPerkol: have you tried it?
07:14:06Perkolnarimiran: yes, myproc(hexToByteArray("test")) gives error: cannot instantiate: 'N'
07:14:44narimiran`func hexToByteArray*[N: static[int]](hexStr: string): array[N, byte]`
07:15:22FromDiscord_<JGiraffe> Narimiran: I've run finish.exe multiple times and tried downloading mingw multiple times. First it was saying it couldn't open helloworld.nim, then it couldn't find it after I'd moved it a couple times, and now it's acting like I've never run finish.exe
07:16:28FromDiscord_<JGiraffe> I'm manually downloading mingw now but I'm not sure where it'll need to go
07:16:42Perkolnarimiran: problem is I need array which length determined at runtime
07:17:13narimiranPerkol: would `func hexToSeqByte*(hexStr: string): seq[byte]` then work for you?
07:17:31FromDiscord_<JGiraffe> Yeah I have no idea how to install mingw
07:19:04narimiranJGiraffe back when i was using windows, i just run `finish.exe` and there were no problems. maybe i had to manually add nim to PATH, i don't remember
07:19:24narimiranbut there was no manual installation of mingw involved, that's for sure
07:19:32Perkolnarimiran: I tried it, seems it doesn't work with my library. https://github.com/genotrance/nimmonocypher/blob/master/tests/tnimmonocypher.nim Let's say i want to do something like this, but accept variable length strings?
07:19:57FromDiscord_<JGiraffe> Here's what I've got with finish.exe now: bin\nim.exe is already in your PATH [Skipping]
07:19:57FromDiscord_<JGiraffe> C:\Users\DELL\.nimble\bin is already in your PATH [Skipping]
07:19:58FromDiscord_<JGiraffe> No compatible MingW candidates found in the standard locations [Error]
07:19:58FromDiscord_<JGiraffe> Do you want to download MingW from Nim's website? (y/n)
07:20:12FromDiscord_<JGiraffe> Here's what I've got with finish.exe now:
07:20:12FromDiscord_<JGiraffe> bin\nim.exe is already in your PATH [Skipping]
07:20:13FromDiscord_<JGiraffe> C:\Users\DELL\.nimble\bin is already in your PATH [Skipping]
07:20:13FromDiscord_<JGiraffe> No compatible MingW candidates found in the standard locations [Error]
07:20:13FromDiscord_<JGiraffe> Do you want to download MingW from Nim's website? (y/n)
07:21:09FromDiscord_<JGiraffe> After the download it keeps saying: 'nim' is not recognized as an internal or external command,
07:21:09FromDiscord_<JGiraffe> operable program or batch file.
07:21:17FromDiscord_<JGiraffe> After the download it keeps saying:
07:21:17FromDiscord_<JGiraffe> 'nim' is not recognized as an internal or external command,
07:21:17FromDiscord_<JGiraffe> operable program or batch file.
07:22:15narimiran"have you tried turning it off and on again?"
07:22:37FromDiscord_<JGiraffe> ok I'll restart
07:24:20FromGitter<alehander42> ok, but is nim.exe found in C:\Users\..stuff...stuff\bin
07:24:41FromGitter<alehander42> one thing i notice is \DELL.nimble\ : this doesnt seem good
07:24:56FromGitter<alehander42> i think it should be \DELL\.nimble but it might be different on windows
07:25:21FromGitter<alehander42> can you see in your file manager
07:25:51FromGitter<alehander42> what is the actual path where it's installed ? (and if there is DELL.nimble or DELL/.nimble) and
07:26:25FromGitter<alehander42> where is actually nim.exe ? because if you find out, you just need to add it to the PATH in the worst case manually
07:30:04FromDiscord_<JGiraffe> nim.exe is in downloads > nim-0.19.4 > bin
07:30:24FromGitter<alehander42> hmm ok
07:30:40FromGitter<alehander42> so if you add this to path, does it work?
07:30:41FromDiscord_<JGiraffe> nimble is there too
07:31:27FromDiscord_<JGiraffe> I don't know how to add it to path
07:31:43FromDiscord_<JGiraffe> right click didn't bring up anything like that
07:31:56narimiranLMGTFY ;)
07:33:18FromDiscord_<JGiraffe> This is what I get when trying to compile:
07:33:18FromDiscord_<JGiraffe>
07:33:18FromDiscord_<JGiraffe> Hint: used config file 'C:\Users\DELL\Downloads\nim-0.19.4\config\nim.cfg' [Conf]
07:33:18FromDiscord_<JGiraffe> Hint: system [Processing]
07:33:19FromDiscord_<JGiraffe> Hint: helloworld [Processing]
07:33:19FromDiscord_<JGiraffe> CC: helloworld
07:33:21FromDiscord_<JGiraffe> Error: invocation of external compiler program failed. The system cannot find the file specified.
07:33:25FromDiscord_<JGiraffe> ; Additional info: "Requested command not found: \'gcc.exe -c -w -mno-ms-bitfields -IC:\\Users\\DELL\\Downloads\\nim-0.19.4\\lib -o C:\\Users\\DELL\\nimcache\\helloworld_d\\helloworld.c.o C:\\Users\\DELL\\nimcache\\helloworld_d\\helloworld.c\'. OS error:" 2
07:34:08cy1JGiraffe: https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/
07:34:24FromGitter<alehander42> yea it seems you need to add the gcc.exe folder to path as well
07:34:27FromGitter<mratsim> ah windows and environment paths ....
07:34:46FromGitter<alehander42> they probably should be added by the script automatically, but not sure why it isn't happening
07:34:58cy1I think it's simple as something like "PATH=$PATH:/wherever/nim.exe/is" but Microsoft does that different too, so I dunno
07:35:14FromGitter<alehander42> that's probably just a temporary path change
07:35:44FromGitter<alehander42> not sure if there is stuff like .cmdrc :O
07:37:39*clyybber joined #nim
07:40:27FromGitter<jrfondren> yeah last time I tried Nim on Windows I couldn't get it to work either. Nim's cc installer didn't work and then when I did it myself I didn't do it enough for Nim.
07:40:30AraqJGiraffe: finish.exe can add it to your PATh
07:40:44Araqnever failed for me
07:40:57FromGitter<alehander42> but why isn't finish.exe part of the normal install script
07:41:07Araqbecause there is no "install script"
07:41:21FromGitter<alehander42> hmm
07:41:26Araqcheck the instructions, it's literally "unzip + finish.exe"
07:41:34FromGitter<alehander42> the guy was quoting some y/N stuff
07:41:41FromGitter<alehander42> so i thought he ran a script
07:41:47FromGitter<alehander42> in this case, maybe he did run finish.exe
07:41:54Araqwell finish.exe does ask questions
07:41:58Araqthat you have to answer
07:42:02FromGitter<mratsim> maybe choosenim, was the windows install updated to 64-bit?
07:42:24FromGitter<alehander42> one strange thing in his cmd was that
07:42:25FromGitter<alehander42> he got
07:42:28FromGitter<alehander42> ` C:\Users\DELL.nimble\bin is already in your PATH [Skipping]`
07:42:36FromGitter<alehander42> which doesnt seem right to me
07:42:38FromDiscord_<JGiraffe>
07:42:39FromDiscord_<JGiraffe> https://cdn.discordapp.com/attachments/371759389889003532/575225956889788416/pathshot1.png
07:42:43FromGitter<alehander42> shouldn't it be DELL/.nimble
07:43:04FromGitter<alehander42> hm maybe wrong output escaping then
07:43:09FromGitter<GULPF> @Araq: is this a bug? https://gist.github.com/GULPF/655c616fd4c19f2f138b8f48a717aa78
07:43:19FromDiscord_<JGiraffe> So should I remove the nim stuff and start over?
07:43:39FromGitter<alehander42> no, leave it there for now, and add the gcc.exe folder as well
07:43:50FromGitter<alehander42> finish.exe should do the same you did , but automatically afaik
07:44:03FromGitter<alehander42> but you say you already ran it(?)
07:44:11FromDiscord_<JGiraffe> yeah a few times
07:45:56FromDiscord_<JGiraffe> I see a vccexe but no gcc.exe
07:47:11FromGitter<alehander42> hm, so add the vccexe folder then
07:50:34FromDiscord_<JGiraffe> it just adds a duplicate of the bottom one in my screenshot
07:51:03lritteri just released 0.15 of my language, just in case someone's interested or would like to talk about it; maybe there's something that would be interesting to nimians... nimsters... nimmins http://scopes.rocks
07:51:12FromDiscord_<JGiraffe> vccexe is just an application file in my bin folder
07:51:40FromGitter<alehander42> congrats lritter!
07:51:57lritteralehandler42: thanks!
07:51:59FromGitter<alehander42> JGiraffe: hm in this case i am not really sure why nim invokes gcc.exe
07:52:14lritterthis is a 3 week bugfix release, before that i spent like 1 year without a release because we had to completely redo the IL
07:52:20FromGitter<alehander42> Araq: should nim invoke gcc.exe or vccexe on win?
07:52:46lritter...and the bootstrapping core, which was a big chunk of code. the language changed a lot.
07:53:27FromDiscord_<JGiraffe> I'm just gonna remove all the nim paths and start with a fresh download
07:53:58*Perkol quit (Quit: Leaving)
07:55:56clyybberAraq: What do you think about `static let a = 3` as a replacement for `let a {.compiletime.} = 3` ?
07:56:41clyybberreplacement/syntactic equivalent/whatever
07:57:04FromGitter<mratsim> @lritter, closures as zero cost abstraction? View propagation seems interesting
07:59:00lrittermratsim: compile time closures come with a bunch of caveats: the generated code must turn up in the same top level function.
08:00:03FromDiscord_<JGiraffe> WOWWWWW I was installing everything to "this pc" instead of DELL
08:00:41clyybberlritter: I wondered on the hacker thread: How does the view propagation work?
08:00:46FromDiscord_<JGiraffe> Though I would like to change my default directory to 'this pc' if possible
08:00:47FromGitter<mratsim> You might want to talk with @edubart, he used to contribute a lot to my Nim tensor library. He comes from a C++ and Lua background and wanted a higher perf, scripting like language hence he tried Nim but since we had to fight a lot with generics, memory allocation and other stuff at the time he started to play with his own language. It's living there: https://github.com/edubart/euluna-lang
08:00:54lrittermratsim: concerning view propagation, i don't have an exact description of how it operates yet (the last one is heavily outdated), but i have a writeup of a generic mechanism that i developed as a result https://gist.github.com/paniq/8c39baea49692dcda34b7f031eeaddfe
08:01:22lrittermratsim: which is strongly inspired by the way view propagation was implemented and can be used to implement that sort of stuff
08:01:41lrittersidebands aren't implemented yet, but i want to do it.
08:02:20lritterclyybber, i'll have some eggs for breakfast, then i'll tell you :) bbl
08:02:29clyybberbon apetit
08:03:31*Vladar joined #nim
08:08:15FromDiscord_<JGiraffe> wait a minute "this pc" and users\DELL have the same files
08:08:33FromDiscord_<JGiraffe> yet they are separate directories
08:10:44FromGitter<alehander42> probably this pc is just an alt name for the same dir
08:10:49FromGitter<alehander42> to make it simpler for users
08:11:41*neceve joined #nim
08:12:42FromGitter<alehander42> lritter: do you have a gitter room for scopes or something like that
08:13:58AraqGULPF: no, it's not a bug
08:14:19Araqx is of type 'int' and an 'int' doesn't fit in a (restricted) int8
08:14:37livcdWhat's this Sielo ?
08:14:41livcdI dont see any Nim code there
08:15:06Araq1 is of type 'int literal(1)' and does fit in a int8
08:15:58FromGitter<mratsim> @livcd, AFAIK Sielo will rewrite all the core in Nim
08:16:20FromGitter<mratsim> apart from chromium I guess :p
08:21:21FromDiscord_<JGiraffe> Alright I ran finish.exe, downloaded mingw, restarted, and I'm still getting this error:
08:21:21FromDiscord_<JGiraffe>
08:21:22FromDiscord_<JGiraffe> C:\Users\DELL>nim c helloworld.nim
08:21:22FromDiscord_<JGiraffe> Hint: used config file 'C:\Users\DELL\Desktop\nim-0.19.4\config\nim.cfg' [Conf]
08:21:22FromDiscord_<JGiraffe> Hint: system [Processing]
08:21:22FromDiscord_<JGiraffe> Hint: helloworld [Processing]
08:21:24FromDiscord_<JGiraffe> CC: helloworld
08:21:26FromDiscord_<JGiraffe> Error: invocation of external compiler program failed. The system cannot find the file specified.
08:21:30FromDiscord_<JGiraffe> ; Additional info: "Requested command not found: \'gcc.exe -c -w -mno-ms-bitfields -IC:\\Users\\DELL\\Desktop\\nim-0.19.4\\lib -o C:\\Users\\DELL\\nimcache\\helloworld_d\\helloworld.c.o C:\\Users\\DELL\\nimcache\\helloworld_d\\helloworld.c\'. OS error:" 2
08:21:53FromDiscord_<JGiraffe> The file is literally right on my desktop
08:22:44PMunchMight be that Nim can't find GCC
08:22:50PMunchHave you set up your PATH variable properly?
08:22:54livcdmratsim: oh i gound jennysis
08:23:11*arecaceae quit (Remote host closed the connection)
08:23:24FromGitter<mratsim> @JGiraffe cn you check your PATH: https://www.computerhope.com/issues/ch000549.htm
08:23:29livcdJgiraffe: it cant be that your has no access to gcc
08:23:30*arecaceae joined #nim
08:23:32livcdit can be *
08:23:36FromGitter<mratsim> seems like finish.exe didn't set it up properly
08:23:57livcdtry as administrator first then fix your user
08:23:57FromGitter<alehander42> yes he did all of this 20 minutes ago
08:24:17FromGitter<alehander42> hm can the admin thing be relevant
08:24:33FromGitter<alehander42> JGiraffe: so where is mingw downloaded? can you find gcc.exe in mingw folder?
08:24:44FromGitter<mratsim> do you need to log out and log in back again for the path to be taken into account?
08:25:07FromDiscord_<JGiraffe> Does it need to be in system because my USER path has both C:\Users\DELL\Desktop\nim-0.19.4\bin and C:\Users\DELL\.nimble\bin in it
08:25:51FromGitter<alehander42> but is mingw downloaded there?
08:26:02FromGitter<alehander42> is there an gcc.exe
08:26:13livcdit needs to be accessible to your user that runs nim c
08:26:34livcdcan you invoke gcc manually?
08:27:01FromDiscord_<JGiraffe> there's no mingw in my path or outside of zip files, and no gcc on the computer afaik
08:27:13FromDiscord_<JGiraffe> there's no mingw in my path or outside of zip files, and no gcc on the computer as far as I can tell
08:27:19FromGitter<alehander42> hmm so it didnt download it? or it didnt unzip
08:27:20FromGitter<alehander42> hm
08:27:51livcdthere is this little app I wanted to rewrite in Nim called Everything.exe
08:27:58livcdwith instant search
08:28:02livcdyou can search for your gcc.exe there
08:28:12FromDiscord_<JGiraffe> I have the zip but finish.exe isn't installing it
08:28:39FromDiscord_<JGiraffe> I don't know how or where gcc comes from
08:30:35FromDiscord_<JGiraffe> I could try installing mingw manually
08:30:36FromGitter<mratsim> it should be downloaded automatically by finish.exe from here https://nim-lang.org/download/mingw64-6.3.0.7z but it's been 2 months since my last windows install
08:31:19FromGitter<mratsim> if all else fails, use choosenim: https://github.com/dom96/choosenim#windows
08:34:34FromDiscord_<JGiraffe> does that automatically invoke mingw too?
08:34:40livcdi did my wind install like this -> git clone devel, choco install mingw, done
08:35:39FromDiscord_<JGiraffe> Not familiar with the term 'choco'
08:35:57FromGitter<mratsim> it's a windows package manager
08:36:05FromGitter<mratsim> choosenim installs mingw and gcc automatically yes
08:36:32FromDiscord_<JGiraffe> ok cool I'll try this route thanks
08:36:40livcdunless it does not and then you need to check all of these things anyway
08:36:56livcdi just added C:\ProgramData\chocolatey\bin , C:\Nim\bin to my path
08:40:40FromGitter<GULPF> @Araq: But both statements uses 'x'? there's no 'int literal(1)' involved. I would expect the code to echo false twice
08:42:36FromGitter<mratsim> the compiler does simple constant propagation
08:43:37FromGitter<mratsim> int literal(1) is probably a true static bool which is transformed into a int when crossing compile-time -> runtime boundaries
08:44:06FromGitter<mratsim> similar to: https://github.com/nim-lang/Nim/issues/7375
08:47:22FromGitter<GULPF> I don't think that's the cause. Even changing `x` to `1.int16` makes the test print false twice. I think the compiler treats 'int' as 'int literal' here which seems wrong
08:49:46AraqGULPF: ah, I missed that detail, sorry
08:49:59Araqyou're right, neither should compile, x is of type 'int'
08:51:23AraqJGiraffe: you can tell finish.exe to install mingw for you, all you have to do is to answer 'y' for all of its questions
08:53:04*hoijui joined #nim
08:53:30FromDiscord_<JGiraffe> I did and for whatever reason mingw wasn't getting installed
08:53:53FromDiscord_<JGiraffe> I'm using choosenim now and finally successfully compiled a file
08:54:13clyybberAraq: Why are there different modes in the vm for static and const expr?
08:54:22FromDiscord_<JGiraffe> Thanks everyone for the instruction
08:54:49clyybberThey are effectively the same, aren't they?
08:54:52FromGitter<mratsim> you're welcome, thank you for the grit :p
08:55:21FromGitter<mratsim> @clyybber, there is static, const and {.compileTime.} :P it's a bit messy
08:55:36clyybbermratsim: I know, I'm working rn to unify them
08:55:57FromGitter<mratsim> btw there is a case where const and let {.compileTime.} does not work
08:56:06FromGitter<mratsim> does not interchange sorry*
08:56:09FromGitter<mratsim> for ref objects
08:56:27clyybberIs ref not allowed for const or the other way around?
08:56:41FromDiscord_<JGiraffe> Does anyone have recommendations for a good ui tool I can use to build a simple app?
08:57:10clyybbermratsim: Effectively the VM calls evalConstExprAux for all of em
08:57:42FromDiscord_<JGiraffe> All I want to do is array lookups and small calculations per selection
08:59:50FromGitter<mratsim> @Clyybber: https://github.com/nim-lang/Nim/issues/11178#issuecomment-489996501
09:00:31FromGitter<mratsim> @JGiraffe, maybe: https://github.com/nim-lang/ui
09:00:52FromGitter<mratsim> see: https://github.com/andlabs/libui#screenshots
09:02:09PMunchJGiraffe, might be biased, but wxNim or Gtk with genui is pretty good
09:02:20PMunch(might be biased because I wrote those macros)
09:04:18PMunchAgain regretting that I haven't made my UI toolkit yet..
09:04:36PMunchWorst part is that I had something working that made Gtk/Karax UIs
09:06:06clyybbermratsim: Thanks, I hope to fix that
09:06:59FromGitter<mratsim> const ref object will impact code generation by the way
09:07:35FromGitter<mratsim> I like the distinction because I know that {.compileTime.} will never be realized in the binary
09:10:01clyybberHmm, yeah.
09:10:50clyybberBut why are you not using static: instead of compileTime, then?
09:10:57clyybberBecause of the added scope?
09:12:36clyybberNevermind
09:15:07FromGitter<mratsim> yes, the scope is an issue
09:15:25FromGitter<mratsim> static let would be fine
09:15:44FromGitter<mratsim> with static synonymous with "VM space"
09:15:54clyybberYeah, I just implemented that
09:16:29clyybbermratsim: But I guess the biggest problem that remains, is that you cant assign a {.compileTime.} to a const?
09:16:33FromDiscord_<JGiraffe> I'll check those out thanks!
09:17:07FromGitter<mratsim> @Clyybber I never had to do that
09:17:48FromGitter<mratsim> basically I use compileTime as input to macros, and then in the macro I can just quote do or newLit the compileTime var
09:18:22FromGitter<mratsim> so i think it's a non-problem
09:19:04clyybbermratsim: So essentially it's only the syntax which is a bit ugly/confusing
09:20:09FromGitter<mratsim> yes, const, static and {.compileTime.} are too much
09:20:20FromGitter<mratsim> we can keep compileTime for procs
09:20:33FromGitter<mratsim> but for variables const and static are enough
09:21:03clyybberDoes {.compileTime.} on a proc mean, that it can only be evaluated at compiletime?
09:21:12clyybberOr that it can be evaluated at compile and run time?
09:21:33FromGitter<mratsim> and even regarding compileTime procs they only have 2 use cases, the old one was for NimNode procs which is now not needed. And my subversion to enforce compileTime evaluation of the proc
09:21:46FromGitter<mratsim> no, it means evaluated by the VM
09:22:10FromGitter<mratsim> I also used static result for that purpose but apparently the fact that it worked is an accident
09:22:37FromGitter<mratsim> 1) static result might lead to strange static/generics/typedesc codepath which increase compilation time
09:22:40FromGitter<mratsim> +*
09:23:16clyybber`static proc name() =` for `proc name() {.compileTime.} =` could work too, I guess
09:25:01FromGitter<Vindaar> @clybber but you can assign a `var {.compileTime.}` to a const, no? I use it for some checks of existing files at compile time and runtime
09:26:23clyybberVindaar: I thought so too: But this seems to indicate otherwise: https://github.com/nim-lang/Nim/issues/10990#issuecomment-481391292
09:26:57Araq.compileTime means "compileTimy *only*"
09:27:24FromGitter<mratsim> no not static proc please :p
09:27:25clyybberVindaar: Nevermind, its the inc thats the problem
09:28:11Araqbut it would be useful to mean "I init this in the VM and then use it at runtime as a 'const'" but then why not assign it to a const for this...
09:28:15FromGitter<mratsim> I think {.compileTime.} for proc should stay to enforce compileTime evaluation of proc and static result should be prevented
09:28:18clyybberAraq: WDYT about a static prefix for `var`, `let` which acts the same as {.compileTime.} ?
09:28:31Araqplease no.
09:28:46FromGitter<Vindaar> ah, ok. I just checked again and it still works in my code :)
09:29:55Araqclyybber, I agree it's bad but I'm afraid you should start with an RFC about how static/compileTime should be used
09:32:16*kapil____ quit (Quit: Connection closed for inactivity)
09:32:23FromGitter<mratsim> and const
09:32:36FromGitter<mratsim> with separate section for var and proc
09:32:47FromGitter<mratsim> and a topic about scoping
09:32:55FromGitter<mratsim> and macro parameter :p
09:34:02clyybberAraq: IMO, static and compileTime for everything that should be done/exist *only* at compile time
09:34:22clyybberconst to embed compile time stuff into the binary for use at runtime
09:34:36clyybberso just like it is rn
09:58:31*Travis__ joined #nim
10:02:19*traviss joined #nim
10:04:43*Travis__ quit (Ping timeout: 248 seconds)
10:05:04*traviss quit (Client Quit)
10:05:27*traviss joined #nim
10:09:08*kotrcka quit (Ping timeout: 252 seconds)
10:09:10travissWhen trying to run nim-gdb.py, I'm getting 'ImportError: No module named gdb'. Does anyone have any idea which package in need to pip install so I can do 'import gdb'?
10:09:37*kotrcka joined #nim
10:18:09Araqkrux02, ping?
10:18:16Araqhttps://www.youtube.com/watch?v=sBP17HQAQjk slightly offtopic
10:18:26krux02Araq: pong
10:21:16krux02Araq: sorry I had to go for a while after the meeting
10:21:19krux02but I am back now
10:25:34Araqplease help traviss
10:26:20travissthank you Araq
10:29:55ZevvI believe it's the other way around, on my machines the python module is part of the gdb package
10:30:19Zevvtraviss: what's your OS/platform?
10:30:47travisswindows 10
10:31:18*Zevv steps aside for someone with windows knowledge
10:31:32*vlad1777d_ joined #nim
10:31:51travisstrying to run from cygwin now... i may have been going about it wrong. i just realized there is a nim-gdb in bin. i was trying to run nim-gdb.py directly before.
10:32:26Zevvnah, that doesn't work indeed
10:32:56travissthe command i'm using now is: nim-gdb --debugger:native <file>.exe
10:33:29ZevvThe --debugger:native is a Nim compiler flag
10:33:43Zevvso first you compile your binary with nim c --debugger:native file.nim
10:33:49Zevvand then you debug with nim-gdb ./file
10:34:41travissoops, ok let me see
10:38:25travissso i'm building with nim c -d:debug --debuginfo --lineDir:on --debugger:native <file>.nim
10:38:39clyybberwow, github is down
10:38:49travissthen running nim-gdb <file>.exe
10:39:04Zevvtraviss: ack
10:39:31travissand i get two errors in gdb: "F:\Users\...<file>.exe": not in executable format: file format not recognized
10:39:52Zevv can you run your binary without gdb?
10:40:19travissyes it runs fine
10:43:19Zevvhm still something with your setup I guess, but I don't have access to any windows machines here, sorry; lets see if anyone can step in to help you out
10:43:22clyybbertraviss: It could be that you have installed 32bit gdb, but try to debug a 64bit executable
10:44:45travissyes, it looks like thats the case... thank you. i'll see if i can get the 64 bit version installed.
10:52:57Zevv\o/
10:55:02*cyberjpn joined #nim
11:13:14*cyberjpn quit (Quit: WeeChat 2.4)
11:13:36*nsf quit (Quit: WeeChat 2.4)
11:23:10*abm joined #nim
11:35:32leorize[m]don't use cygwin, embrace msys2 instead :p
11:35:39*Trustable joined #nim
12:04:16*narimiran quit (Ping timeout: 252 seconds)
12:04:47PMunchleorize[m], pfft, just use Linux :)
12:04:55PMunchWell, *nix
12:06:42krux02traviss, can you run nim-gdb with an `.exe` file on windows?
12:07:16*narimiran joined #nim
12:07:36krux02nim-gdb is a bash script to start gdb correctly, I never tested or imagined it could be used on windows at all.
12:08:35*NimBot joined #nim
12:12:17*narimiran_ joined #nim
12:12:20*narimiran quit (Ping timeout: 250 seconds)
12:16:13*deech_ quit (Ping timeout: 246 seconds)
12:21:50FromGitter<kaushalmodi> Hello, does someone have tips to debug crash in Nim/C++ integration project: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd1785d5b3f941aa5f84e97]
12:22:27FromGitter<kaushalmodi> background: I have a compiled .so of a C++ project. I am wrapping a function in that library in a get_top_config proc in Nim
12:22:53FromGitter<kaushalmodi> .. I am compiling .so of this Nim project and that's being used by a 3rd party application called xmsim
12:22:59FromGitter<arnetheduck> why not just remove `compiletime`?
12:28:14clyybberarnetheduck: It has some use cases, @mratsim can tell you more about
12:28:37FromGitter<arnetheduck> do these use cases carry their weight?
12:29:04FromGitter<mratsim> I don't tend to develop useless things :p
12:29:04clyybberits a global static variable essentially
12:29:28clyybberif you want it to be global
12:29:31FromGitter<mratsim> compile-time Hashing to allow NimNode in HashTable sounds like a very useful usecase
12:29:58FromGitter<mratsim> and you cannot put ref objects in a const but you might need ref object during VM compute
12:30:56*couven92 joined #nim
12:31:12FromGitter<mratsim> basically compiletime/const are a bit like the async/await of the VM/runtime domain I guess (since someone was super confused about that on the forum this morning)
12:41:42*Snircle joined #nim
12:49:43krux02@kaushalmodi is the dubugging help still requested?
12:49:55FromGitter<kaushalmodi> yes
12:50:01FromGitter<kaushalmodi> nim-gdb.py doesn't work
12:50:11FromGitter<kaushalmodi> as the gdb is invoked by a 3rd party appl
12:50:12krux02how do you use it?
12:50:37FromGitter<kaushalmodi> xmsim calls nimcompiled.so and nimcompiled.so calls a fn from cppcompiled.so
12:50:38krux02well, I use emacs (a 3rd party appl) and nim-gdb.py works
12:51:09FromGitter<kaushalmodi> but in my case, the code entry into Nim is not from a standalone exec
12:51:25FromGitter<kaushalmodi> above back trace is all I could get
12:51:29krux02but you are right, any gdb integration that I tested screwed gdb support with custom printers up
12:52:05krux02you can hook gdb to arbitrary already running processes as well
12:52:16krux02you just have to start it differently
12:52:56FromGitter<kaushalmodi> I get this when I try to source nim-gdb.py (I already compiled the .so using the debugger switches): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd17fa8375bac74706eac1c]
12:53:10FromGitter<kaushalmodi> the gdb *is* getting hooked
12:53:16FromGitter<kaushalmodi> just that it's not showing any useful info
12:53:51krux02there is a problem in the nim-gdb.py script
12:54:02krux02the Traceback should not be there
12:54:25FromGitter<kaushalmodi> that gdb instance is invoked by the xmsim tool
12:54:36FromGitter<kaushalmodi> which apparently doesn't populate the "COMPLETE_EXPRESSION"
12:56:06clyybbermratsim: Did you mistag #9817 in your comment on {.compileTime.}?
12:56:14krux02what is your version of gdb?
12:56:32krux02I have gdb 8.2.1
12:56:43FromGitter<mratsim> @clyybber not a mistag, krux02 mentions incremental compilation concerns
12:56:46*xet7 joined #nim
12:57:04clyybbermratsim: Ah, I was confused because #9817 is fixed
12:57:14FromGitter<kaushalmodi> krux02: GNU gdb 7.6
12:57:18FromGitter<mratsim> it was also my main blocker for why I needed static return type vs {.compileTime.} regarding his PR to remove static return type
12:57:26krux02well, that is old
12:57:28FromGitter<kaushalmodi> it further says that it's a modified version for the xmsim tool
12:57:50FromGitter<kaushalmodi> to invoke gdb on xmsim, I need to run with `xmsim -gdb ..`
12:58:06FromGitter<kaushalmodi> so it has to use its own gdb
12:58:38FromGitter<kaushalmodi> that tool then invokes the Nim proc from Nim compiled .so .. and that Nim proc invokes a C++ fn from C++ compiled .so
12:58:41krux02well, the pretty printers are not written for a gdb version that old.
12:58:44FromGitter<kaushalmodi> so it's kind of complicated
12:58:45clyybbermratsim: AFAIK incremental compilation is per module, so we could just disable incremental compilation for that module if it accesses or modifies a compiletime var
13:00:01leorize[m]is there anyway to easily check if a variable is within the boundaries of a `range[]` type?
13:00:14FromGitter<mratsim> mmmm, what are the main expected benefits of incremental compilation?
13:00:48FromGitter<kaushalmodi> leorize: .high .low would work?
13:01:26FromGitter<mratsim> because I'm pretty sure lots of stuff that take time to compile are macro code, especially complex one, and most of my complex macro code need a global var for hashtables
13:02:46FromGitter<mratsim> though in Arraymancer I manage to scope it and store the hashTable in the macro itself and not globally
13:03:07krux02you might be able to make nim-gdb.py compatible for older versions of gdb, but I don't have such an old version, so I can't guarantee that I won't break it in the future
13:03:09leorize[m]@kaushalmodi yea but that's a lot of typing
13:03:21leorize[m]not to mention that those won't work for distinct ranges
13:03:42FromGitter<mratsim> anyway it's a reasonable tradeoff I'd say
13:03:53FromGitter<arnetheduck> well, if the language is not too heavy on forcing things to compile time or not, it could actually make that choice for different compiles.. ie runtime for debug compiles and compile time for the others
13:05:36FromGitter<kaushalmodi> krux02: even without pretty printers, what does this mean?: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd1829fb4700e023d38fced]
13:05:44FromGitter<kaushalmodi> "0x00000000 in ?? ()" <--
13:05:54FromGitter<kaushalmodi> get_top_config is the call to Nim proc
13:06:17FromGitter<mratsim> you're missing debugging symbols
13:06:53FromGitter<mratsim> though 0x00000000 so maybe not, I don't remember :p
13:06:59krux02mratsim: About the static return types, I was confused when I saw them the first time. First of all I was shocked to see that it is possible, and then I was confused because evaluationg function at compile tiem is supposed to be done with {.compileTime.} procs (or assignment to const), and then I saw static return values has problems that I don't want to fix since it seems to be a redundant feature.
13:07:06clyybbermratsim: you need the global hashtable to hash nimnodes right? I don't know much about what you are doing exactly, but cooldome implemented some hashing for nimNodes in the vm here: https://github.com/nim-lang/Nim/pull/10819/files#diff-3ff28bbe72b1ab26dbc8ac0d47bc1860R143
13:07:21krux02{.compiteTime.} proc seems to be the canonical way to go there
13:07:40FromGitter<mratsim> @krux02 I think everyone was surprised as well, and me too, I attempted it completely randomly
13:07:52krux02?? is usually a function pointer
13:07:55FromGitter<mratsim> TBH that's the only "feature" of static that wasn't buggy the first time I tried :p
13:08:05krux020x0 in ?? is a nil function pointer
13:08:12FromGitter<mratsim> but yeah I assume it uses weird code path in semchecks
13:08:17FromGitter<kaushalmodi> I do have Nim compiled with `-d:debug --debuginfo --lineDir:on --debugger:native`
13:08:46krux02put in all the flags ;p
13:08:56FromGitter<kaushalmodi> I did! see above :)
13:08:57krux02--debugger:native should be enough though
13:09:02FromGitter<kaushalmodi> what else can I add
13:09:53krux02and I recently added an alias for --debugger:native, it is -g
13:10:02clyybberfor glorious
13:10:14FromGitter<mratsim> @krux02: cooldome is using compileTime var for the hash tables >_> https://github.com/nim-lang/Nim/pull/10819/files#diff-74d645617ff7e5dbb145997d95952407R18
13:10:20krux02so you should be able to just used `-g` instead of `-d:debug --debuginfo --lineDir:on --debugger:native`
13:10:24leorize[m]skim your code for nilable function pointers then :p
13:10:43FromGitter<mratsim> ah it's clyyber sorry
13:10:44clyybbermratism: Oh, I see
13:10:53krux02I used compile time vars for hash tables as well.
13:11:02krux02I know the problem.
13:11:09*nais314 joined #nim
13:11:17krux02The question is just how could it be done with inclemental compilation.
13:11:22FromGitter<mratsim> there is no problem, just noise and 3 ways to do related thing
13:11:32FromGitter<mratsim> ah right incremental compilation
13:12:01clyybberkrux02: disable incremental compilation for every codepath reading or modifying a compiletime var?
13:12:03FromGitter<mratsim> well clyber proposes to not allow incremental compilation on modules that uses a compileTime global var
13:12:10clyybberyeah
13:12:32krux02and that is what I don't like
13:12:38krux02I would prefer the inverse
13:13:08krux02don't allow compile time var, unless you explicitly enable them as a compilation flag
13:13:34krux02but the point is, the compile time var solved a problem, a problem that looks for an alternative solution.
13:13:46*rnrwashere joined #nim
13:14:11krux02because I think hashing in general does not coflict with incremental compilation
13:15:02FromGitter<mratsim> PRNG needs to keep a state somewhere, if you can't scope that state you need compileTime var, that's the core issue
13:15:14krux02I am thinking in the direction of a special symbol hashing type that hides to the compiler that it actually has state
13:15:33krux02PRNG?
13:15:42FromGitter<mratsim> Pseudo Random number Generator
13:15:44clyybberpseudorandomnumbergenerator
13:16:12krux02do you generate random numbers at compile time?
13:16:40FromGitter<mratsim> var foo {.compileTime.} = initRand(1234)
13:17:02FromGitter<mratsim> and then this is the source of unique ID for hashed ref objects
13:17:14krux02yes for sure you can generate random numbers at compile time, but that is basically doom for all incremental compilation.
13:18:40FromGitter<mratsim> a compiletime source of unique id that plays well with incremental compilation would go a long way https://github.com/nim-lang/RFCs/issues/131
13:19:32*couven92 quit (Quit: Client disconnecting)
13:20:44krux02I don't get why you choose a random number generator here, it doesn't really prevent any identifier clashes, they are just very unlikely.
13:21:18FromGitter<mratsim> less likely than a tsunami is good enough for me ;)
13:21:25krux02But then you can instead use the hash value instead, it has the same attributes plus it does not depend on compile time state
13:21:48*nais314 quit (Quit: Leaving)
13:21:50FromGitter<mratsim> It won't work the the example at the bottom
13:21:50*rnrwashere quit (Remote host closed the connection)
13:22:20krux02which example?
13:22:20FromGitter<mratsim> ```code paste, see link``` ⏎ ⏎ The hash at compile time would be the same, but at runtime it would be different [https://gitter.im/nim-lang/Nim?at=5cd1868c6a84d76ed85e46e1]
13:22:56*rnrwashere joined #nim
13:23:18krux02I don't understand that block
13:23:35FromGitter<mratsim> the a variable are different
13:23:54FromGitter<mratsim> if using ref semantics
13:24:22FromGitter<mratsim> this is true at runtime
13:24:53FromGitter<mratsim> but at compileTime I must resort to a trick to assign them a unique ID
13:25:16krux02I still have no clue what you are trying to do with that block
13:25:25FromGitter<mratsim> or maybe just let a = newRef(1); let b = newRef(1); echo a == b
13:26:00FromGitter<mratsim> I'm trying to have different IDs for ref types even if the content is the same.
13:26:14krux02isn't b supposed to be new instance (different from a) when you call "new"?
13:26:21FromGitter<mratsim> yes it is
13:26:53FromGitter<mratsim> if you see the implementation of mEq, it uses rkNodeAddr
13:26:55clyybberI guess the VM has to take previous invokations into account for its hashing, and then it should work?
13:27:01krux02why don't use the address (pointer value) itself as id?
13:27:18FromGitter<mratsim> but in macros I have no magic to have this address
13:27:36FromGitter<mratsim> that's why I use compileTime state for hashing
13:27:45FromGitter<mratsim> otherwise I would just use this VM address
13:29:41FromGitter<mratsim> having a proc uuidT (x: ref T): Hash {.magic:"mUUID".} that returns the rkNodeAddr as a hash would solve my issues
13:29:48FromGitter<mratsim> argh
13:30:03FromGitter<mratsim> `proc uuidT (x: ref T): Hash {.magic:"mUUID".}`
13:30:20FromGitter<mratsim> or instanceId
13:31:19krux02mratsim: well, in the compiler the types already have unique ids, they are just not exported in the macros module, because the id's are not stable, they depend on the order of the processed modules.
13:31:34krux02(and on a lot of other factors as well)
13:32:12FromGitter<mratsim> it can be called instanceId then, we don't need stability for hashing, just that they are uniques
13:33:04krux02mratsim: but I am ok, if you would allow to cast ref types to uint/int at compile time, as I think it is really safe to do and when people use cast, they know what they are letting themselfs in to.
13:33:40krux02http://ix.io/1IiS
13:34:59FromGitter<mratsim> that would work as well though it seems overkill for that use case
13:35:41FromGitter<gogolxdong> https://github.com/microsoft/Terminal
13:36:22FromGitter<mratsim> @gogolxdong it was discussed in the nim-offtopic (IRC) nim-lang/twitch (Gitter) channel
13:38:07FromGitter<gogolxdong> nice, will check
13:41:35*narimiran_ is now known as narimiran
13:43:59*rnrwashere quit (Remote host closed the connection)
13:43:59krux02clyybber: regarding "disable incremental compilation for every codepath reading or modifying a compiletime var?"
13:44:29krux02that really defeats the point of incremental compilation.
13:45:07FromGitter<mratsim> yeah I agree with this concern
13:45:35krux02When compile time state is used everywhere, because it is so easy to use, and this affects incremental compilation to be silently turned off, then incremental compilation basically doesn't work.
13:45:46FromGitter<mratsim> > because I'm pretty sure lots of stuff that take time to compile are macro code, especially complex one, and most of my complex macro code need a global var for hashtables ⏎ > though in Arraymancer I manage to scope it and store the hashTable in the macro itself and not globally
13:46:24krux02On the other hand if there is a feature that doesn't work with incremental compilation that has to be explicity turned on while people also read about it's disadvantages. There is friction to use this feature and incremental compilation becomes much more useful.
13:46:37krux02But I understand that not everything might be possible with incremental compilation.
13:47:16krux02mratsim: yes
13:47:33krux02macros are slow to compute. Storing their result will be very beneficial.
13:48:47FromGitter<mratsim> sounds good, I'm writing a polyhedral compiler implemented as macro :P I would love caching those results :p
13:50:32krux02I have no idea what a polyhedral compiler is.
13:51:07krux02I didn't know a compiler was flat and had n corners
13:51:49narimiran:D :D
13:51:54FromGitter<mratsim> Loops and nested loops can be represented as a polyhedron
13:52:25krux02a polyhedron is still a geometry shape in my head
13:52:27FromGitter<mratsim> and we can use those to modify it without impacting read/write access dependency and also control tiling and optimize memory accesses
13:52:44FromGitter<mratsim> Yes it is
13:52:54krux02and many small shapes compose the letters and words that eventually form the loops
13:52:55FromGitter<mratsim> we use geometry to optimize loops and result are very good
13:53:05FromGitter<mratsim> Here is a playground with examples: http://playground.pollylabs.org
13:53:20FromGitter<mratsim> look into the iteration domains and schedules examples
13:53:30FromGitter<mratsim> and memory access analyses
13:57:14krux02so to sum it up, you span the entire SSA statement and then cut for redundancies?
13:59:45*PMunch quit (Remote host closed the connection)
14:00:10FromGitter<mratsim> no, it doesn't work at SSA level
14:00:36FromGitter<mratsim> I only look at iteration variable, and the statement that accesses them.
14:01:26FromGitter<mratsim> also it is only applicable to a very specific domain where you don't have control flow that does not depend on the i, j iteration variable of your loop
14:01:47FromGitter<mratsim> but this domain is perfectly suited to image processing and vector/matrix/tensor processing as well
14:07:24FromGitter<mratsim> Concrete example: original loop -
14:08:03FromGitter<mratsim> arg sorry screenshot disappeared
14:09:16FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/2EAi/DeepinScreenshot_select-area_20190507160844.png)
14:09:44FromGitter<mratsim> And rescheduled one, same final result but different order even though there is data dependency
14:09:53FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/CAFD/DeepinScreenshot_select-area_20190507160815.png)
14:09:59*rnrwashere joined #nim
14:10:39FromGitter<mratsim> and you can use that to analyze of to parallelize computation even if there are data dependency (like read after write)
14:11:04FromGitter<mratsim> introduce loop tiling/blocking to improve memory locality
14:12:29FromGitter<mratsim> original C loop does not match the "polyhedra" :/
14:12:38FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/saXP/DeepinScreenshot_select-area_20190507161211.png)
14:18:05FromGitter<arnetheduck> all this reminds me of the discussions in http://wiki.c2.com/?SufficientlySmartCompiler
14:20:56FromGitter<mratsim> It can also be useful for list comprehensions :p
14:24:12FromGitter<mratsim> Well, in that case polyhedral compilation as tremendous benefits on domain suitable for it like for image processing, you can get an order of magniture faster than OpenCV
14:24:18FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/omZX/DeepinScreenshot_select-area_20190507162313.png)
14:25:09FromGitter<mratsim> reproduction code: https://github.com/bondhugula/polymage-benchmarks and source: http://mcl.csa.iisc.ac.in/polymage.html
14:26:40*hoijui quit (Remote host closed the connection)
14:29:26*couven92 joined #nim
14:39:14*fredrik92 joined #nim
14:41:24shashlick@arnetheduck did you get my messages from last night?
14:45:53shashlick@Araq @narimiran regarding 0.19.6
14:46:09shashlickwill it use the new nimble without compiler?
14:46:23shashlickwill it contain binaries in Linux cause nightlies are built that way now?
14:46:34shashlickDo you plan on releasing arm binaries as well?
14:47:08Araqfor better or worse 0.19.6 and 0.20 will ship the latest stable Nimble
14:47:17Araqso it's up to you really
14:47:42Araqdevel always builds nimble master.
14:49:08FromGitter<iffy> Any specific reason there's no `==` for Table (but there is for OrderedTable and CountTable)?
14:49:31FromGitter<iffy> I'll submit a PR for it unless there's a reason not to
14:49:33dom96shashlick we didn't tag a version
14:49:38dom96so I doubt it
14:49:54dom96are we certain that it's stable enough?
14:49:59shashlickI've not seen any new issues with nimble head so it would be nice to use
14:50:40shashlickBut it's been only 10 odd days so I'll go by your judgment
14:50:54FromGitter<mratsim> if we start to have official ARM binaries we would probably use them in status CI
14:50:55narimiranwhen it will become "stable enough"? :P
14:51:07FromGitter<mratsim> for 0.19.6
14:52:10shashlick@mratsim we are already building in nightlies but tests aren't done yet due to time limits and bugs in tests
14:52:36FromGitter<mratsim> we use 0.19.x though, our codebase is incompatible with 0.20 at the moment.
14:53:11Araqmratsim: I'm fixing bugs but I can only fix what you reported
14:53:28Araqshashlick, devel uses Nimble master to test 70 or so Nimble packages daily
14:53:37Araqthat's a pretty good test
14:53:39FromGitter<mratsim> it's incompatible because 0.20 isn't the stable release
14:54:05FromGitter<kaushalmodi> shashlick, dom96: As a coincidence, I just tried `nimble publish` and I get: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd19c0c6a84d76ed85ee3eb]
14:54:09FromGitter<mratsim> And we target the latest stable with some stuff we need from devel: https://github.com/status-im/nim-std-shims
14:54:20FromGitter<mratsim> so we get ambiguous calls on 0.20
14:54:27FromGitter<kaushalmodi> it went all the way through create a branch in my fork of *packages* repo, just didn't make the final PR
14:54:31FromGitter<mratsim> i.e. nothing serious
14:56:56WilhelmVonWeineris there a way to access array indices starting from the end?
14:57:06dom96kaushalmodi: report it, sounds like a bug.
14:57:08WilhelmVonWeinersimilar to how in some langauges you can access arr[-1]
14:57:16narimiranWilhelmVonWeiner: ^1
14:57:19FromGitter<kaushalmodi> dom96: doing just that right now
14:58:21WilhelmVonWeinernarimiran: thanks a bunch
14:59:21WilhelmVonWeinerwhat explains that syntax?
15:00:34shashlick@Araq sounds like you are good with using the latest nimble
15:00:58shashlickif we have a clean way to upgrade nimble in place, i'd argue it is time to do it
15:01:07FromGitter<mratsim> because -a and indexing from the end are different
15:01:18shashlicknow that it is independent of the compiler, it can evolve faster
15:01:50FromGitter<mratsim> indexing from the end is not implemented in the compiler but as a standard tool
15:02:15FromGitter<mratsim> this allows people to support that in their custom types
15:03:11WilhelmVonWeinerOoh interesting
15:03:17FromGitter<mratsim> also you can create arrays indexed with negative indices like var a: array[-10..10, int]
15:03:18*fredrik92 quit (Quit: Client disconnecting)
15:03:37FromGitter<mratsim> in that case there is a difference between a[-5] and a[5]
15:04:07FromGitter<mratsim> a[^5]*
15:06:52disruptekshashlick: thanks for your help last night, i should be able to get redland running today. :-)
15:07:01*kotrcka quit (Ping timeout: 268 seconds)
15:07:11narimiranshashlick: you are on something else other than IRC so you can't see PMs, right? :D
15:07:57shashlick@disruptek - awesome 🙂
15:08:03*kotrcka joined #nim
15:08:15shashlick@narimiran - if you want to PM, please join #shashlick 🙂
15:08:29shashlickof course, make sure no one else is in there 😉
15:08:37clyybberlol
15:08:44narimiranheh, and there i was wondering why you don't reply :D
15:09:06narimiranthen i remembered you said on telegram that you're not really there either :D
15:09:09shashlicki use matterbridge to bring everything into slack
15:10:01shashlicki guess gitter and telegram can do PMs, but i'll have to go into those apps to see them
15:10:18zestyr7.6.8 I think
15:10:23zestyroops, ignore that
15:10:35narimiranzestyr: i can't ignore it, sorry :P
15:11:09shashlick@narimiran - so what did I miss?
15:11:33narimiranshashlick: you will never know! mwahaha
15:11:46shashlickoh man!
15:12:45FromGitter<arnetheduck> @shashlick yeah, cool, thanks for the fix. see https://github.com/arnetheduck/nim-sqlite3-abi/commit/38656a3c781e04472e2df270a5f1f78d7005a3ca for `importc` thing - see how the sqlite3 type is lacking its original c name
15:14:15krux02mratsim: since we talked about static return types, you reminded me that I still had this PR around where I disabled static return types.
15:14:24krux02I think it passes now the tests.
15:14:56shashlick@arnetheduck - so you capitalized it in cPlugin but it doesn't show up in the importc
15:16:18shashlicki made some changes last night but it needs more work so i'll have to test it a bit more
15:16:39FromGitter<arnetheduck> > i don't quite remember why i put in nimcall - should it always be cdecl? ⏎ ⏎ I think it should just be nothing, but I might be wrong here, don't remember what nim does exactly.. it might be that it should be different based on (compiler-specific) attributes from the header file
15:17:19shashlicki know c2nim gives you flags to tweak them --stdcall and --cdecl for example
15:17:22FromGitter<mratsim> @krux02 Can we change the error "use the {.compileTime.} pragma instead"
15:17:25FromGitter<mratsim> to*
15:18:11FromGitter<mratsim> stdcall is for Visual Studio binary and cdecl for everything alse AFAIK
15:18:35FromGitter<kaushalmodi> krux02: are you here?
15:18:46FromGitter<arnetheduck> having to comment out line 773 seems like it goes counter to the goals of nimterop.. in particular, that's a "standard" way in `C` to avoid having to type out "struct bla" every time, sounds like a pattern nimterop should be able to handle
15:19:09shashlickokay i'll make cdecl the default output and allow for others with flags
15:19:09FromGitter<kaushalmodi> krux02: About "#3 0x0000000000000000 in ?? ()" that you mentioned being nil pointer to a fn
15:19:27FromGitter<kaushalmodi> I get get that when calling a fn imported from a c++ compiled .so
15:19:57FromGitter<kaushalmodi> does that mean that somehow the .so is not found? (but I *am* updating the LD_LIBRARY_PATH as needed ..)
15:20:00FromGitter<arnetheduck> why make it add anything at all? I don't think there's need for neither cdecl nor anything else.. unless in the c header file, it spells something out, in which case the wrapper should spell it out too
15:20:34shashlickwell, it is being imported from C so nim should have to call it with cdecl
15:21:16krux02kaushalmodi: I don't know how you load your shared library
15:21:24FromGitter<kaushalmodi> dynlib
15:21:38FromGitter<kaushalmodi> and that library is in LD_LIBRARY_PATH
15:21:43krux02there are many ways to load a shared librar/dynlib/dll
15:22:36FromGitter<kaushalmodi> I am doing: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd1a2bc4b4cb471d9c2c777]
15:22:49shashlick@arnetheduck - i agree on line 773 but it isn't trivial right now
15:22:59krux02you can linke it at compile time, then the operating sytem tries to find it when the program is started, but you can also load a dll/lib*.so at runtime and get pointer addresses from individual function names
15:23:07krux02(dlopen is the second one)
15:23:29FromGitter<kaushalmodi> krux02: "you can also load a dll/lib*.so at runtime and get pointer addresses from individual function names" how?
15:23:58krux02dlopen
15:24:06FromGitter<kaushalmodi> also when I do `ldd nimcompiled.so`, I don't see that linked lib?
15:24:18FromGitter<kaushalmodi> (no question mark in that prev message)
15:25:07krux02you can also try to run ldd on your executable
15:25:08FromGitter<kaushalmodi> I'll need to grep .. `dlopen` doesn't show up on https://nim-lang.github.io/Nim/theindex.html
15:25:11FromGitter<jrfondren> @kaushalmodi dynlib: means ldopen is used instead of dynamic linking, so there's nothing to see until you run the app
15:25:13krux02ldd <binary>
15:25:23krux02it will tell you how .so files are resolved
15:25:37FromGitter<kaushalmodi> krux02: I already mentioned above that that does not show the linked .so
15:25:54FromGitter<kaushalmodi> summary: I am using `dynlib` pragma, but `ldd` does not show that linked .so
15:26:00FromGitter<jrfondren> *dlopen. it's a libc function, it needn't be in nim docs
15:26:10FromGitter<jrfondren> dynlib means dlopen, not dynamic linking.
15:26:23FromGitter<kaushalmodi> ok ..
15:26:26FromGitter<kaushalmodi> I am lost
15:26:40FromGitter<mratsim> @kaushalmodi can you try with {.link: "absolute/path/to/dll".} at the top level?
15:26:51FromGitter<jrfondren> static linking: links are resolved when app is compiled. dynamic linking: links are resolved by the system linker when the app is started. dlopen: links are resolved at runtime by the app itself.
15:27:08krux02look in dyncalls.nim, there dlopen is wrapped in nimLoadLibrary and nimGetProcAddr
15:27:36FromGitter<kaushalmodi> krux02: But @jrfondren mentioned that dynlib already calls dlopen
15:27:42FromGitter<jrfondren> a penalty of dlopen is that dlopen can't handle everything the system linker can. fedora has scripts or configuration files or something pretending to be .so files. a benefit of dlopen is that it's the only option that doesn't use a shared namespace.
15:27:43*Jesin quit (Quit: Leaving)
15:28:04FromGitter<kaushalmodi> ok, let me start with the `{.link ..` method
15:28:09FromGitter<mratsim> see: https://github.com/numforge/agent-smith/blob/master/third_party/ale_wrap.nim#L36
15:28:47FromGitter<kaushalmodi> @mratsim a complication .. can .link path contain env vars?
15:29:01FromGitter<kaushalmodi> I cannot hardcode the path as it contains my $USER
15:29:09krux02kaushalmodi: I really think shared library are a hassle that should be avoided if possible. So only when you have sound reasons for a shared library, you should go that route, otherwise just to static linking as it really simplifies the build.
15:29:11FromGitter<mratsim> I don't recommend it though because you can't move things around, in my case it was more of a workaround for dlopen issues I had
15:29:19FromGitter<kaushalmodi> because the other users will have their $USER in their paths and they cannot see into my $USER path :/
15:29:56FromGitter<mratsim> No it won't work, but at least you will now if it works for you and make sure that the DLL works
15:33:39*Jesin joined #nim
15:33:52FromGitter<arnetheduck> > well, it is being imported from C so nim should have to call it with cdecl ⏎ ⏎ cdecl might make nim put explicit `cdecl` in the `.c` file it generates which will make the C compiler *not* use its default calling convention.. ie `C` does not always use the `C` calling convention either - it depends, like @mratsim pointed out.. it's a bit of an unfortunate naming thing - `C` happened to be the one that
15:33:52FromGitter... introduced the option, but it's not always used
15:34:16FromGitter<kaushalmodi> @mratsim .link did not work .. note that I had the old .dynlib as well to import the fn symbol
15:34:57FromGitter<kaushalmodi> by "did not work", it still crashes with SIGSEGV
15:35:47FromGitter<mratsim> If you don't put cdecl you will probably have nimcall/fastcall, though I'm not sure with importc functions
15:38:11disruptekkaushalmodi must have one of the trickiest application builds in the nimiverse.
15:38:39FromGitter<kaushalmodi> disruptek: I bet!
15:38:56disruptekhave you written it up anywhere other than your slides?
15:38:58FromGitter<kaushalmodi> I'm trying to use Nim in "non-software" land
15:39:00FromGitter<mratsim> wait for the hot-code reloaded version :p
15:39:26Araqjust fyi Nim only uses fastcall on win32
15:39:35shashlick@arnetheduck - so basically i need importc there and that should be good enough
15:39:38FromGitter<kaushalmodi> disruptek: apart from the slides, the only written form is the actual code
15:39:38Araqiirc
15:40:10disrupteki think i read env in nimvm, so why can't you use $USER?
15:40:14Araqbut we'll exploit nimcall further and make it __vectorcall or whatever it's called
15:40:16FromGitter<kaushalmodi> disruptek: https://github.com/kaushalmodi/nim-systemverilog-dpic <-- but it's not much useful unless you have a systemverilog compiler
15:40:31FromGitter<mratsim> win32 as in windows (including 64-bit)?
15:40:46FromGitter<kaushalmodi> disruptek: $USER comes later, so far even the hardcoded path in .link did not work for me
15:40:53disruptekyeah, i'm just thinking there have to be some magical bits to your flow that someone else is gonna need someday.
15:42:04FromGitter<kaushalmodi> disruptek: occassionally I need `--gc:none` otherwise Nim tries to garbage collect objects used by the systemverilog compiler
15:42:12shashlick@arnetheduck is the {.header.} pragma required or when is it optional?
15:42:13FromGitter<kaushalmodi> but I cannot predict when I would need that
15:42:46disruptekwow, that seems solvable.
15:42:57disruptekie. defective. :-P
15:43:52FromGitter<jrfondren> @kaushalmodi https://nim-lang.org/docs/gc.html it *should* be predictable. you can avoid the GC with allocations that only systemverilog will know about for times
15:44:04FromGitter<arnetheduck> shashlick, I have two conflicting opinions about `{.header.}` - on the one hand, since you're parsing the C header file, you should have enough information to make a loss-free conversion from nim to c, and thus, the `{.header.}` is not needed. but on the other hand, nim doesn't support all the features of C (and vendor extensions), so there is potentially some information in the header file that you can't translate
15:44:04FromGitter... to `nim`, and therefore, using the header file has advantages
15:45:48shashlickokay so i'm trying to figure out whether everything should have an importc or not - surely needed if names are changed
15:45:49Araqmratsim: win32 is windows 32 bits, not win64
15:46:07FromGitter<mratsim> mingw somehow disagrees
15:46:57FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd1a870b489bb6ed7301c3b]
15:47:15shashlick@arnetheduck - okay, i'll make a branch and make the name importc fix and the nimcall removal - please test it and let me know if it is good
15:47:37FromGitter<iffy> What's the right way to implement proc `==` for an object? This is endlessly recursive: `a.kind == b.kind and a == b`
15:48:16FromGitter<jrfondren> compare each field
15:48:38FromGitter<iffy> right; is there an easy one line way to do that?
15:48:41FromGitter<mratsim> it's already done for object
15:48:42FromGitter<jrfondren> https://github.com/jrfondren/modsec/blob/master/src/modsec/actions.nim#L71
15:48:51FromGitter<jrfondren> there's an easy way to do that if you don't use variants
15:49:06FromGitter<jrfondren> the easy way if you don't use variants is to not definite `==` at all
15:49:07FromGitter<kaushalmodi> @iffy I don't have the full context of your question, but would .fieldPairs work?
15:49:13FromGitter<mratsim> ah variants
15:49:31FromGitter<iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd1a90ba4ef09747165dc72]
15:49:41FromGitter<iffy> bah, markdown
15:50:17FromGitter<mratsim> there is a bug on them iirc, but if you want an easy way equalMem(a.unsafeAddr, b.unsafeAddr, sizeof(a))
15:50:17shashlickfield names don't really need importc right?
15:50:19FromGitter<iffy> I'd like to not have to remember to update `==` when I add fields to my `Field`
15:50:36FromGitter<jrfondren> yeah that's variants so my link basically, with more than a single field tested for Amount
15:50:44FromGitter<iffy> rats
15:51:03FromGitter<iffy> but maybe `fieldPairs` will work, like @kaushalmodi said
15:51:21FromGitter<mratsim> equalMem wil work
15:51:49FromGitter<mratsim> or maybe not if some garbage is left
15:51:53FromGitter<mratsim> in raw memory
15:52:05FromGitter<iffy> let me try `fieldPairs`
15:52:11FromGitter<jrfondren> is equalMem OK with the strings? You can have two different pointers with the same contents
15:52:31Araqmratsim: on x86_64 __fastcall is identical to __cdecl. I think (?)
15:52:34FromGitter<arnetheduck> > okay so i'm trying to figure out whether everything should have an importc or not - surely needed if names are changed ⏎ ⏎ probably needed always when interfacing with c, to disable nim symbol mangling.. else stuff like debug information and the like will be weird (for example the name of a type doesn't matter at all in c - if two structs have the same shape you can use one instead of the other as long as
15:52:34FromGitter... their ABI's match)
15:53:27FromGitter<arnetheduck> calling conventions, like alignments, vary and differ depending on many variables: compiler, platform, compiler flags, etc
15:53:52FromGitter<mratsim> @jrfondren right equalMem won't work with strings and seq
15:54:39FromGitter<arnetheduck> > there is a bug on them iirc, but if you want an easy way equalMem(a.unsafeAddr, b.unsafeAddr, sizeof(a)) ⏎ ⏎ this will also fail if the struct members have padding and the padding is different
15:54:49FromGitter<kaushalmodi> @iffy I learned about fieldPairs as I was coming up with a way to "pretty-print" objects: http://ix.io/1Ijs
15:55:02FromGitter<jrfondren> the `==` you have to manually write for variants is regular enough that Nim should be able to do it for you, so I feel like the low-effort path is to do it manually.
15:55:10FromGitter<mratsim> apparently patty as a way: https://github.com/nim-lang/Nim/issues/6674
15:55:14FromGitter<mratsim> has*
15:55:19shashlick@arnetheduck - do struct fields need importc? and does it matter if they are renamed?
15:55:22FromGitter<iffy> @jrfondren but I'm forgetful :)
15:56:39FromGitter<mratsim> but that's the main issue with variants (also known as the expression problem). It's easy to add new proc but hard to add kinds because you need to update all existing proc. While with inheritance, it's easy to add new types but adding new proc will require you to also implement them in all types that implement the interface.
15:57:25*banc quit (Ping timeout: 246 seconds)
15:57:28FromGitter<iffy> I'm trying to use the `fieldPairs` that accepts two args: https://nim-lang.org/docs/system.html#fieldPairs.i%2CS%2CT but I'm getting `Error: wrong number of variables`
15:57:51FromGitter<jrfondren> that's the main benefit to them :) if you add new types you get a bunch of errors instead of weird behavior
15:57:57FromGitter<iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd1ab05e416b8451947a711]
15:58:14*rnrwashere quit (Remote host closed the connection)
15:58:16FromGitter<kaushalmodi> do `for x, y ..`
15:58:28FromGitter<iffy> same error
15:58:30FromGitter<kaushalmodi> fieldPairs returns a tuple of key and val
15:58:33FromGitter<kaushalmodi> hmm
15:58:42FromGitter<mratsim> the fieldPairs you are linking to is for 2 tuples
15:59:08FromGitter<iffy> isn't it `tuple | object` ?
15:59:27FromGitter<mratsim> this one is for single param
15:59:30FromGitter<kaushalmodi> it should be `obj.fieldPairs()`
15:59:41FromGitter<kaushalmodi> where obj is an *object*
15:59:49FromGitter<mratsim> there are 2 fieldPairs overload, one for a single object and one for 2 tuples
16:00:12FromGitter<iffy> hmmm... I'm seeing both as for `tuple | object`
16:00:18FromGitter<jrfondren> the for 2 tuples says object | tuple. maybe that's devel docs not matching with release.
16:01:02FromGitter<jrfondren> ...no, it's like that in 0.19.4 as well
16:01:34FromGitter<iffy> maybe the magic implementation doesn't actually support it?
16:02:59FromGitter<mratsim> oh right
16:03:11FromGitter<mratsim> ugh it's very hard to read
16:03:19FromGitter<iffy> well, if I use the single object one, how to I get the field from obj b?
16:03:22FromGitter<iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd1ac4a6a84d76ed85f63de]
16:03:26FromGitter<arnetheduck> > do struct fields need importc? and does it matter if they are renamed? ⏎ ⏎ not sure actually. generally, `importc` is only "required" for function names - the rest is mostly "quality-of-conversion" kind of stuff that makes the experience "better"
16:03:27*banc joined #nim
16:03:40FromGitter<iffy> [] (obviously) doesn't work, but is there an equivalent?
16:03:51FromGitter<iffy> like getattr?
16:04:22FromGitter<liquid600pgm> @mratsim faced a similar problem recently iirc
16:04:23FromGitter<mratsim> template identifier injection
16:04:53FromGitter<mratsim> but you have to know or compute the field at compile time
16:06:39FromGitter<iffy> that's the backtick stuff?
16:10:02FromGitter<arnetheduck> shashlick, do you need an issue opened for the typedef stuff? I'd consider it a blocker almost, considering how prevalent the pattern is in C
16:10:19FromGitter<mratsim> @iffy yes
16:11:09FromGitter<mratsim> template getAttr(o: myObj, field: untyped): untyped = o.\`field\`{.inject.}
16:16:03*krux02 quit (Remote host closed the connection)
16:17:10FromGitter<kaushalmodi> krux02, @mratsim : I figured out the nil pointer cause and I am at a loss why that is that
16:17:14FromGitter<kaushalmodi> drumroll ..
16:17:51FromGitter<kaushalmodi> I have 2 separate Nim projects .. one that wraps different things; both are compiled to separate .so and both are referenced in the xmsim compiler
16:18:22FromGitter<kaushalmodi> If I remove the reference to the earlier added .so, the current one that I am using (c++ -> nim -> sv) works great!
16:18:39shashlick@arnetheduck - i almst have a branch ready
16:18:43shashlickcould do with some testing
16:18:50FromGitter<kaushalmodi> so .. I cannot have 2 (or more) Nim compiled .so live at the same time?
16:19:48FromGitter<arnetheduck> shashlick - cool - `update.sh` in that repo will fetch latest nimterop and run it on `sqlite.h`, dead simple to test
16:20:44leorize[m]@kaushalmodi: I think it's generally safe unless you passes ref between then
16:20:48leorize[m]them*
16:20:57FromGitter<arnetheduck> for the calling conventions (cdecl vs the rest), the thing about getting them wrong is that your program will crash or misbehave randomly.. I don't remember all the details, it takes some digging if you want to get it right in all (corner) cases)
16:21:05FromGitter<kaushalmodi> flow for compiling so number 1: Matlab -> C -> .so -> Nim wrapper around that -> 1.so ⏎ flow for compiling so number 2: C++ -> .so -> Nim wrapper around that -> 2.so ⏎ xmsim (systemverilog compiler) reads both 1.so and 2.so
16:21:41FromGitter<kaushalmodi> If I compile both 1.so and 2.so, I get 0x0000000 (??) SIGSEGV fault
16:21:52FromGitter<kaushalmodi> If I remove 1.so from compilation, no fault
16:22:20leorize[m]try using --newruntime on them :p
16:23:22FromGitter<kaushalmodi> ok .. trying that
16:23:38FromGitter<kaushalmodi> just wondering if this is a limitation where 2.so treads on 1.so namespace
16:23:43leorize[m]jk, try eliminating the GC from the .so with --gc:none
16:23:52shashlick@arnetheduck - do you have a test to check the generated wrapper?
16:24:02leorize[m]--newruntime is the better solution when it starts working well
16:24:42FromGitter<jrfondren> @kaushalmodi that might be the problem. look at their symbols with nm
16:25:08leorize[m]@kaushalmodi: it's certainly possible, I've been bitten by how the init proc in Nim .so is always NimMain (and you can't change that)
16:25:57FromGitter<dawkot> What can possibly be the cause of me gettings a `The filename, directory name, or volume label syntax is incorrect` on Windows error when trying to compile a file *at random*?
16:26:14*couven92 quit (Quit: Client disconnecting)
16:26:39FromGitter<dawkot> The compiler doesn't say much else, just that the unhandled exception is raised in oserr.nim(85)
16:27:01FromGitter<jrfondren> @kaushalmodi I think your best option will be to have a single Nim .so
16:27:16leorize[m]try chkdsk?
16:27:41leorize[m]oh, then that might just be the folder you're pointing the compiler to doesn't exists
16:27:56FromGitter<kaushalmodi> @jrfondren both have `NimMain`
16:28:09FromGitter<kaushalmodi> both have `_fini` and `_init` too
16:28:17FromGitter<arnetheduck> shashlick not really - would probably make sense to add to wrap.nim though at some point, just like it checks that the version number can be called
16:28:18FromGitter<kaushalmodi> now what? :/
16:28:23FromGitter<dawkot> But, as I said, it seems to be random
16:28:45FromGitter<dawkot> Other than that the error comes up once, it usually persists for some time
16:28:50FromGitter<dawkot> *when
16:28:57FromGitter<kaushalmodi> leorize: I have `--gc:none` in both Nim projects .. didn't help
16:29:27FromGitter<kaushalmodi> Araq: any tips to make this work? https://gitter.im/nim-lang/Nim?at=5cd1b0702e2caa1aa624b3a7
16:29:31leorize[m]@kaushalmodi: NimMain can be a problem
16:29:33leorize[m]the _fini and _init are harmless
16:29:51FromGitter<kaushalmodi> backup plan: move all code to one Nim project .. but that will make things less portable
16:29:51*rnrwashere joined #nim
16:30:54*banc quit (Ping timeout: 246 seconds)
16:31:26leorize[m]can you look at the full backtrace?
16:32:05FromGitter<kaushalmodi> this is the full backtrace: https://gitter.im/nim-lang/Nim?at=5cd1785d5b3f941aa5f84e97
16:32:22FromGitter<kaushalmodi> the simulation dies as soon as Nim calls the fn from C++ compiled .so
16:32:25leorize[m]I suspect a recursion of NimMain bouncing between two .so files (got bitten by this on Haiku)
16:32:52FromGitter<kaushalmodi> ok.. let me experiment moving everything into one .so
16:32:59leorize[m]stupid matrix lag, well looks not the case
16:33:31*traviss quit (Quit: Leaving)
16:34:12FromGitter<iffy> a compile-time `fieldNames` thing would be really handy
16:34:13FromGitter<kaushalmodi> hmm, there's a `--noMain:on` .. wondering what that does
16:34:41*leorize joined #nim
16:35:10leorizeit only affects the `main()` proc for nim program
16:35:25leorizeNimMain is hard-coded in the compiler
16:36:01leorize@iffy: wouldn't that already possible with macros.getType()?
16:36:52FromGitter<iffy> oooo, maybe yes
16:37:29leorizenowadays I think those iterators should be made into ForStmtMacros
16:39:27*Jesin quit (Quit: Leaving)
16:40:54*banc joined #nim
16:41:12shashlick@arnetheduck - nimcall needs to stay for fields or they become closures by default
16:41:49Araqshashlick, no, .cdecl also is not .closure
16:42:11shashlickso should i make anything that's imported into cdecl by default or should i use nimcal
16:42:28shashlickimportc'd
16:42:36leorizeit depends on the underlying os i believe
16:42:45leorizeiirc windows uses stdcall
16:43:11leorizeor fastcall
16:43:44Araqhttps://www.python.org/dev/peps/pep-0590/
16:43:56Araqshashlick, .cdecl is the best default
16:43:56FromGitter<arnetheduck> http://llvm.org/docs/LangRef.html#calling-conventions
16:45:33*Jesin joined #nim
16:49:18FromGitter<kaushalmodi> shoot .. one Nim project needs to compile to cpp and another to c
16:49:23FromGitter<kaushalmodi> so I cannot merge both
16:50:09FromGitter<kaushalmodi> because one Nim project is importing a C compiled .so and another, a C++ compiled .so
16:50:17shashlick@arnetheduck - i've created a branch with these changes - please test and confirm i've gotten this right
16:50:18FromGitter<kaushalmodi> Araq: any help with this?
16:50:18shashlickhttps://github.com/nimterop/nimterop/tree/pragma
16:51:12leorize@kaushalmodi: then compile both as c++? :P
16:51:25FromGitter<kaushalmodi> that would work? (I haven't tried)
16:51:35FromGitter<kaushalmodi> but given that I don't see any option .. will give that a go
16:51:55Araqkaushalmodi: use --cppCompileToNamespace:namespace and compile both as C++
16:52:07Araquse two different namespaces
16:52:19Araqto make two different NimMain
16:52:21cy1aww, you can't make recursive iterators?
16:52:32FromGitter<kaushalmodi> Araq: will try that. Thanks!
16:53:01FromGitter<kaushalmodi> I hope you got a gist of my flow: https://gitter.im/nim-lang/Nim?at=5cd1b0702e2caa1aa624b3a7
16:54:06*neceve quit (Remote host closed the connection)
16:55:24*rnrwashere quit (Remote host closed the connection)
16:57:21cy1You can make closure iterators inside recursive procedures though, hmm...
16:58:05leorizecy1: can't you just use an another `for` statement to call your current iterator?
17:01:30cy1leorize: If you call your current iterator inside your current iterator, it says Error: recursive dependency:
17:02:30leorizeah, yea, Nim's iterator are inlined
17:04:34cy1leorize: not that inline iterators couldn't be recursive... but even if you specify {.closure.} it still errors out. You have to have a procedure wrapping around a closure iterator to get recursion, then add on an extra () like: for X in walk(arg1, arg2)():
17:05:25cy1and... uh...
17:05:27cy1Error: cannot generate VM code for breakstate
17:05:36cy1can iterators not be used in macros...?
17:05:42leorizewhy would you want recursive iterator though?
17:05:55FromGitter<jrfondren> macros can generate code that uses iterators
17:05:59FromGitter<kaushalmodi> Araq: with the cppcompiletonamespace, I get: ⏎ ⏎ ```.nimcache/stdlib_os.cpp:31:1: error: ‘NI’ does not name a type ⏎ NI len; ⏎ ^~``` [https://gitter.im/nim-lang/Nim?at=5cd1baf76a84d76ed85fcf76]
17:06:37FromGitter<kaushalmodi> and the same error for NIM_CHAR, NCSTRING, etc in stdlib_os.cpp
17:06:57*rnrwashere joined #nim
17:07:32leorizesounds like a bug
17:07:43leorizemaybe you should try to make a small sample and report it?
17:08:37leorizecy1: iterators can be used in macros
17:11:32*rnrwashere quit (Ping timeout: 252 seconds)
17:13:47FromGitter<kaushalmodi> issue related to cppcompiletonamespaec: https://github.com/nim-lang/Nim/issues/11194
17:21:04cy1leorize: You need a recursive iterator to walk an arbitrary tree structure, or flatten it.
17:21:11*Vladar quit (Remote host closed the connection)
17:21:30cy1Error: no tuple type for constructor
17:21:52cy1You... can't use tuples as default values?
17:23:35leorizecy1: maybe you can look at the walkDirRec iterator?
17:25:38cy1leorize: I just switched to accumulating sequences. It shouldn't eat too much memory.
17:28:53leorizeyea, and your iterator will also be stack overflow tolerant
17:29:30leorizeNim doesn't do tail opt at codegen level iirc
17:29:44*tribly quit (Quit: WeeChat 2.4)
17:30:45*tribly joined #nim
17:33:43*jjido joined #nim
17:35:15*salewski joined #nim
17:37:00salewskivar x: float; x = math.sqrt(-1.0) # is this the best way to mark x as invalid?
17:37:36salewskiThat is to set it to NAN.
17:45:15leorize[m]isn't there a NaN const in math or fenv already?
17:46:44salewskiHave not seen a const in math, will see fenv...
17:49:30salewskiNo, there is stuff to test for results like INF and NAN, but not for setting it.
17:50:28salewskiI am doing test of two lines for intersection, position can be INF
17:50:33*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:50:40leorizesalewski: system.NaN :)
17:51:27salewskiThat exists? Have searched for NAN with no result. Thanks.
17:51:44leorizeI just typed NaN on the search box :p
17:52:42salewskiIndeed, now I get it. Strange that I did not found it.
17:53:02salewskiBye.
17:53:06*salewski quit (Quit: WeeChat 2.3)
18:08:33FromGitter<iffy> okay @leorize, @mratsim and @jrfondren, here's a template that generates a `==` proc for variant objects. It probably only works for my case :) https://gist.github.com/iffy/092f5b46760d9b4ba62a649afaa69f56
18:08:45FromGitter<iffy> (scroll down to see usage)
18:10:12*theelous3 joined #nim
18:11:41FromDiscord_<Avatarfighter> Does anyone know if there is a package that allows you to draw on a canvas sort of like how tkinter canvas works, I've been looking for one for a bit :L
18:14:18FromDiscord_<Avatarfighter> Does anyone know if there is a package that allows you to draw on a canvas sort of like how tkinter canvas works, I've been looking for one for a bit but can't seem to find one :L
18:14:45*jjido joined #nim
18:23:02FromGitter<mratsim> compileToNamespace? Is that documented, I was always wondering how to combine Nim dlls without NimMain conflicts
18:23:34FromGitter<mratsim> I hope ownership + destructor will allow one to completely remove NimMain as well when possible
18:27:02shashlick@mratsim I've had no problems with dlls in feud
18:27:12shashlickBut I am using dynlib to load them
18:31:20Araqmratsim: NimMain remains but we could make it NimMain_project to prevent clashes
18:31:45Araqbut then every other system.nim identifier also needs to get some prefix and we might as well use C++ namespaces instead
18:36:41FromGitter<kaushalmodi> @leorize: finally got it working! I have to limit to just one Nim project to avoid that SIGSEGV
18:36:56FromGitter<kaushalmodi> But it works!
18:37:31FromGitter<kaushalmodi> The wrapper Nim file is just 1 line: `import foo, bar`
18:39:24*SenasOzys joined #nim
18:40:49*rnrwashere joined #nim
18:44:54clyybberbb
18:44:59*clyybber quit (Quit: WeeChat 2.4)
18:45:03*rnrwashere quit (Ping timeout: 245 seconds)
18:57:48*deech joined #nim
19:02:39*tribly quit (Quit: WeeChat 2.4)
19:03:38*tribly joined #nim
19:10:07*rnrwashere joined #nim
19:16:42*rnrwashere quit (Remote host closed the connection)
19:17:50*rnrwashere joined #nim
19:18:28noonien`Error: parallel 'fields' iterator does not work for 'case' objects`, i'm getting the following error
19:18:40noonienwhat's a parallel iterator?
19:20:18noonienhmm, this seems to happen when i try to `==` two case objects
19:20:38noonienas part of an unit test
19:21:31FromGitter<jrfondren> that's described above
19:21:38FromGitter<jrfondren> there's no default == for variant objects
19:21:54narimiranbtw, krux02 is working on those
19:22:24noonienfieldPairs seems to work
19:22:52noonienwhy would fields not work?
19:23:23FromGitter<jrfondren> semForObjectFields just explicitly fails on variant objects.
19:26:29*SenasOzys quit (Remote host closed the connection)
19:32:20FromGitter<iffy> noonien: I just barely made a `==` proc maker for variant objects if you want to use it: https://gist.github.com/iffy/092f5b46760d9b4ba62a649afaa69f56
19:42:50FromDiscord_<nothing to no one> I have this type: `HttpCode* = distinct range[0 .. 599]` and I would like to print it to stdout. It doesn't have a `$` proc defined for it though. How do I convert the range to a string?
19:44:28FromDiscord_<nothing to no one> oh, i might be dumb
19:44:56FromDiscord_<nothing to no one> yup, i was just dumb, was trying to print out the actual type instead of the variable lmao
19:47:00*narimiran quit (Ping timeout: 252 seconds)
19:52:49nooniengiven `type Foo = int | uint`, how can i get a list of the typesnames, in this case, int and uint?
20:00:01cy1Well that... could be useful I guess
20:00:27cy1https://github.com/cyisfor/unquote.nim/blob/master/tests/test_examples.nim
20:00:53cy1Takes some code, and finds spots to inject your stuff into it... no homo
20:03:20FromGitter<Vindaar> @noonien: will probably break for more complicated things, but you can do something like this: http://ix.io/1Il8/nim
20:04:28*Trustable quit (Remote host closed the connection)
20:04:44noonienwoah, awesome! thanks, that was just what i was looking for!
20:08:11FromGitter<Vindaar> :)
20:11:53*Perkol joined #nim
20:22:46cy1How would you get nimble to use a package in a subdirectory, as opposed to one uploaded to the package repository?
20:23:15*SenasOzys joined #nim
20:23:52shashlickyou can just cd to that directory and nimble install
20:23:58shashlickassuming it has a nimble file
20:36:58*xet7 quit (Quit: Leaving)
20:41:50noonienmacros are ran before instantiation, right?
20:42:04noonienbefore instantiation of generic procs*
21:00:24*SenasOzys quit (Ping timeout: 246 seconds)
21:02:06*rnrwashere quit (Remote host closed the connection)
21:08:29*tribly quit (Quit: WeeChat 2.4)
21:09:12*tribly joined #nim
21:15:47*Hexeratops joined #nim
21:23:09*[rg] joined #nim
21:26:22*solitudesf quit (Ping timeout: 252 seconds)
21:30:20dom96narimiran[m], Araq: why do the docs in https://nim-lang.org/documentation.html lead to the bleeding edge docs?
21:30:37*deech quit (Ping timeout: 246 seconds)
21:34:54*tribly quit (Quit: WeeChat 2.4)
21:35:29*tribly joined #nim
21:37:06*cybj quit (Quit: WeeChat 2.4)
21:48:13*cybj joined #nim
21:53:00shashlick@arnetheduck - i've done quite a bit of cleanup of the pragmas, appreciate a review before i push to master
21:56:18dom96yay, Firefox finally fixed the bug that meant I couldn't see who liked my posts on the forum
21:56:24dom96Glad I didn't have to do anything myself to fix that
22:02:24dom96The amount of inaccuracies in Nim's WP article
22:02:29*dom96 shakes head
22:04:09dom96oh nice to see my name in there now
22:04:33*Perkol quit (Remote host closed the connection)
22:06:14dom96"Nimble package manager was inspired by the success of Perl's package manager" lolwat
22:07:15*cyberjpn joined #nim
22:07:22FromGitter<jrfondren> post hoc ergo inspired hoc
22:10:01*lritter quit (Quit: Leaving)
22:10:24*rnrwashere joined #nim
22:10:40*rnrwashere quit (Remote host closed the connection)
22:10:53*rnrwashere joined #nim
22:17:15dom96Our wikipedia page could really use some love
22:17:28*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:22:42FromDiscord_<exelotl> wow I can't believe nim was created by hatsune miku
22:24:05*[rg] quit (Read error: Connection reset by peer)
22:24:44FromGitter<mratsim> Well on Wikipedia at one moment Nemerle language creator was Araq
22:31:33*[rg] joined #nim
22:40:41*jjido joined #nim
22:44:51*Hexeratops quit (Remote host closed the connection)
22:45:25*jjido quit (Client Quit)
22:49:30FromGitter<mratsim> Rust finally impolemented static but they also have the type vs value problem: https://github.com/rust-lang/rust/issues/44580#issuecomment-489207594
22:50:34*[rg] quit (Quit: Konversation terminated!)
22:51:31FromGitter<arnetheduck> lol nice to see, they'll finally be able to get rid of those ugly array kludges
22:52:21FromGitter<mratsim> or not: https://github.com/rust-lang/rust/pull/60466#issuecomment-490228264
22:53:57dom96ugh, I think we should make it an error to export a `proc foo(x: MyType)` if `MyType` isn't exported
22:54:22FromGitter<mratsim> we can still use it with MyType as a binary blob
22:54:30FromGitter<mratsim> opaque type*
22:54:53dom96Why would you though?
22:55:56dom96so I wonder if you guys solved this in Chronos: callbacks waiting forever on a socket becoming readable/writeable, even if that socket is closed
22:56:14FromGitter<jrfondren> it could be annoying for the user, but it can still work. you can still consumeMyType(generateMyType())
22:57:45dom96I was going to change the type of `asyncdispatch.Callback` to `proc (fd: AsyncFD, isClosing: bool): bool`
22:58:00dom96But it's used by exported procs of course...
22:58:35FromGitter<arnetheduck> shashlick, I'll take a look in a bit, busy now
22:59:09FromGitter<mratsim> It common in C library to use opaque types for library to avoid users using structs/pointer in a non-blessed way
22:59:21FromGitter<arnetheduck> dom96 I remember some discussion about a bug like that in chronos but I don't remember the details
22:59:29FromGitter<arnetheduck> @cheatfate might know better
22:59:59FromGitter<jrfondren> @mratsim the Nim equivalent there would be exporting the type but not its members
23:00:02FromGitter<mratsim> unfortunately in Nim it's almost impossible to have things private, just due to the fact that you have to have a "datatypes.nim" that export everything due to the forward declaration requirement
23:00:30dom96FYI I implemented https://github.com/status-im/nim-chronos/issues/32
23:05:46FromGitter<arnetheduck> oh, nice. we'll likely create a monitoring package as well, though I'm a bit sceptical about prometheus.. might be that we'll do a multi-backend thing so it can interface with eith prom or statsd..
23:06:00noonienwhat's OverflowError?
23:06:19*[rg] joined #nim
23:06:22FromGitter<mratsim> when a signed int overflows or underflow
23:06:40noonienhmm, it was not in the manual, but in `system`, awesome
23:07:16FromGitter<mratsim> echo high(int) + 1 will overflow
23:07:17noonieni'm getting an OverflowError in an async function, and for some reason i don't get the stacktrace of where it occurs
23:07:28FromGitter<mratsim> and not low(int) will underflo
23:08:31FromGitter<arnetheduck> it goes away if you compile in release mode :)
23:08:55FromGitter<mratsim> ... :p
23:08:59noonienhehe, sure, i'm doing some really weird math and i'm expecting over/underflows
23:09:12FromGitter<mratsim> you're doing async math?
23:09:26noonienhowever, since i get the error, i'd like to check if they're in an expected place
23:09:32noonienperhaps i really do have a bug
23:10:13noonienmratsim, hehe, i'm doing math in procs that happen to be async, does that count?
23:10:17FromGitter<mratsim> The stackTrace sometimes get eaten, I never investigated why but this is annoying, some proc names not appearing for example
23:11:17*jasper joined #nim
23:11:44noonienargh, this is annoying
23:12:12noonienwell, here goes try: catch: bisection
23:16:01*rnrwashere quit (Remote host closed the connection)
23:23:34*rnrwashere joined #nim
23:27:08*theelous3 quit (Ping timeout: 268 seconds)
23:27:55*rnrwashere quit (Ping timeout: 248 seconds)
23:28:38*theelous3 joined #nim
23:32:42noonienit was indeed an error
23:35:46noonienthis was the culprit: `arr[0..<0'u32]`
23:36:33noonienweird that the stacktrace did not show it
23:37:00noonienperhaps it just did, and it was somewhere in system, and i did not check
23:37:08*rnrwashere joined #nim
23:41:57*rnrwashere quit (Remote host closed the connection)
23:43:52*rnrwashere joined #nim
23:47:36FromGitter<jrfondren> what was the stracktrace?
23:51:57*cyberjpn quit (Ping timeout: 258 seconds)
23:57:21*rnrwashere quit (Remote host closed the connection)
23:58:41*[rg] quit (Quit: Konversation terminated!)