<< 09-12-2019 >>

00:04:04*manjaro-user- joined #nim
00:04:05*manjaro-user- is now known as alphazino
00:04:39*alphazino quit (Client Quit)
00:05:32*Alphazino joined #nim
00:06:44*Alphazino quit (Client Quit)
00:17:52*clyybber quit (Quit: WeeChat 2.6)
00:26:33*norm joined #nim
00:26:48*norm is now known as Guest17824
00:27:50*Guest17824 quit (Client Quit)
00:34:55*couven92 joined #nim
00:43:35*norm joined #nim
00:43:51*norm is now known as Guest68252
00:46:12FromGitter<kayabaNerve> Anyone have experience with stack smashing?
00:46:38FromGitter<kayabaNerve> Because I think this is Nim's fault but I don't know enough to diagnose/submit it.
00:47:06FromGitter<kayabaNerve> My echo statement at the end of my function prints, yet then the returned value is not set. AFAICT, the popFrame function is the problem.
00:48:22FromGitter<kayabaNerve> GDB says the issue is in the standard lib's arithm.nim, L338, which is blank :/
00:48:40FromGitter<kayabaNerve> Valgrind gives this fun error.
00:48:43FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ded99eb550662459891fbae]
00:49:15FromGitter<kayabaNerve> There's 10 more question marks after that, one at address 0x5.
00:53:39FromGitter<kayabaNerve> So the arithm is addInt while the system is `template dotdotLessImpl(t) {.dirty.} =`. The code block at the end of the function consistently causing crashes is: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ To be clear, print statements after the for loop do print, `s` is not used elsewhere or accessed outside of scope, and that if statement is never triggered. The add call is to a C FFI but neither GDB or
00:53:39FromGitter... Valgrind point the finger there. [https://gitter.im/nim-lang/Nim?at=5ded9b12d64a052fb6de11c5]
01:00:13*dwdv quit (Ping timeout: 268 seconds)
01:03:14*Guest68252 quit (Quit: Leaving)
01:11:15*Hideki_ joined #nim
01:15:37*Hideki_ quit (Ping timeout: 250 seconds)
01:49:07*ng0 quit (Quit: Alexa, when is the end of world?)
02:13:59*couven92 quit (Read error: Connection reset by peer)
02:14:26*couven92 joined #nim
02:30:16FromGitter<kayabaNerve> Never mind. It was an FFI issue that just didn't pop up until popFrame was called :/
02:47:48*rockcavera joined #nim
02:54:51*sealmove joined #nim
02:58:57*dddddd quit (Ping timeout: 246 seconds)
03:24:33sealmovehello world works! https://github.com/sealmove/nimitai 🎉
03:24:44disrupteknice!
03:24:53disruptekcongrats, that was a long time coming.
03:29:36sealmoveit's more work than expected, I had to use some IR
03:29:52disruptekinfra-red, huh? wow, that /is/ a lot of work.
03:30:21sealmovetext -> IR -> ast -> nim ast
03:34:03*drewr quit (Ping timeout: 245 seconds)
03:35:57FromDiscord<Rika> So, why does nim enforce space indentation
03:37:47sealmoveit doesn't
03:37:50sealmoveyou can use `;`
03:38:30sealmovepairing it with parenthesis of course
03:41:29*kevinchau joined #nim
03:47:16FromDiscord<Rika> I mean vs tab indentation
03:47:27FromDiscord<Rika> Tab usage is an error from what I recall
03:47:58disruptekyou can use a source code filter to get around it, but from experience, it's not worth it.
03:53:38*endragor joined #nim
04:01:27FromGitter<gogolxdong> Is there any AEAD implementation?
04:09:23FromGitter<gogolxdong> conforms to TLS1.3
04:14:41nisstyrelink with openssl?
04:18:20*nsf joined #nim
04:20:13*drewr joined #nim
04:32:16*kevinchau quit (Ping timeout: 240 seconds)
04:40:30*crem quit (Read error: Connection reset by peer)
04:45:22*crem joined #nim
04:50:32*rockcavera quit (Remote host closed the connection)
04:52:38*couven92 quit (Quit: Client Disconnecting)
04:54:31*narimiran joined #nim
04:59:33*leorize joined #nim
05:01:06*chemist69 quit (Ping timeout: 246 seconds)
05:03:07*chemist69 joined #nim
05:12:54*Hideki_ joined #nim
05:16:56*Hideki_ quit (Ping timeout: 240 seconds)
05:47:39*nif quit (Quit: ...)
05:47:48*nif joined #nim
06:02:27*ltriant quit (Quit: leaving)
06:05:23FromGitter<gogolxdong> How to change the [n.prepare] section in .cfg file generated by nimgen , aside which the git repo has been cloned ?
06:06:53shashlickn.prepare isn't generated - it is hand created right?
06:07:17FromGitter<gogolxdong> as for nimssl, it's generated.
06:08:52FromGitter<gogolxdong> I am trying to copy it to openssl directory and run nimgen manually.
06:09:19FromGitter<gogolxdong> openssl is so big that it could fail while cloning.
06:11:00shashlickI see
06:11:45shashlickyou just need to modify the output in n.global
06:12:08shashlickjust remove it and nimgen will look in local directory for openssl code
06:13:57FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dede625d75ad3721d7d9071]
06:30:56shashlickRemove output = from the cfg file
06:31:08shashlickPut it below openssl directory
06:31:29shashlickOr use a symlink
06:39:31FromGitter<gogolxdong> yes, I removed output=nimssl and put nimssl.cfg below openssl directory
06:48:02shashlickwhat parts of openssl do you want to use
06:48:15*solitudesf joined #nim
06:50:16FromGitter<gogolxdong> what do you mean
07:25:55leorizedon't we have openssl bindings in the stdlib already?
07:27:13FromGitter<gogolxdong> I'm afraid it's not conforming to TLS1.3
07:29:29leorizeif you're working on a new project I'd suggest to not use openssl
07:30:25FromGitter<gogolxdong> It's the specification of QUIC-TLS
07:33:00*PMunch joined #nim
07:35:25*Vladar joined #nim
07:53:51*solitudesf quit (Ping timeout: 250 seconds)
08:00:00*gmpreussner quit (Quit: kthxbye)
08:05:08*gmpreussner joined #nim
08:11:56YardanicoWhat the heck is this https://github.com/nim-lang/Nim/commit/bef1c4437db3ec2afdcc0180c9eefb87aaf8fba6#commitcomment-36330963
08:12:25YardanicoAnd https://github.com/nim-lang/Nim/commit/bec82254486a72c34bc2c78a8aa841d1eca498fd#commitcomment-36330960
08:13:33AraqI reported him multiple times now
08:32:00shashlick@gogolxdong I'm asking what parts of openssl do you need wrapped
08:44:28*lritter joined #nim
08:46:04*ng0 joined #nim
08:54:56PMunchYardanico, Araq, uhm am I missing something here?
08:55:30PMunchOh, there were some comments on those commits that were deleted?
08:58:58*floppydh joined #nim
09:09:10*Hideki_ joined #nim
09:10:39*leorize quit (Quit: WeeChat 2.6)
09:12:49aeverr[m]how bad were the comments
09:13:36FromGitter<gogolxdong> aes gcm sha256, pkcs7 is related
09:13:38*Hideki_ quit (Ping timeout: 245 seconds)
09:15:15*thomasross_ joined #nim
09:15:15*thomasross is now known as Guest14973
09:15:15*thomasross_ is now known as thomasross
09:16:28shashlickI need to see how easy it is to wrap openssl with nimterop
09:16:34shashlickNimgen method is obsolete
09:17:52*Guest14973 quit (Ping timeout: 268 seconds)
09:19:46FromDiscord<yewpad> I actually thought you'd report rayman22201 but it seems like this all was about some weird ass comments which have been deleted already
09:19:53FromGitter<gogolxdong> oh, I forgot nimterop. Will you update your repo to use nimterop?
09:21:58shashlickNeed to try it out
09:22:15*kevinchau joined #nim
09:22:42*dwdv joined #nim
09:23:08FromGitter<gogolxdong> ok, thanks.
09:30:06*kevinchau quit (Ping timeout: 265 seconds)
09:58:55*ikan-keli_2 joined #nim
09:58:59*dddddd joined #nim
10:01:56*ikan-keli_ quit (Ping timeout: 240 seconds)
10:04:06PMunchAraq, robustified the fixed size integer support a lot more in my PR: https://github.com/nim-lang/Nim/pull/12817
10:04:08disbotFix AVR target to define ints properly @11PMunch
10:14:29*nc-x joined #nim
10:14:59nc-xWhat does a `var T` parameter do in a template? I thought `var` is not required for template?
10:16:04*GitterIntegratio quit (Quit: killed)
10:16:09*salotz[m] quit (Quit: killed)
10:16:09*Balu[m] quit (Quit: killed)
10:16:13*aeverr[m] quit (Quit: killed)
10:16:15*k0mpjut0r quit (Quit: killed)
10:16:16*isaac[m]1 quit (Quit: killed)
10:16:19*BitPuffin quit (Write error: Connection reset by peer)
10:16:19*lqdev[m] quit (Quit: killed)
10:16:20*Demos[m] quit (Quit: killed)
10:16:23*lasso[m] quit (Quit: killed)
10:16:23*TheManiac[m] quit (Quit: killed)
10:16:31*meff[m] quit (Quit: killed)
10:16:36*zielmicha[m]1 quit (Quit: killed)
10:16:36*LEdoian[m] quit (Quit: killed)
10:16:36*Miguelngel[m] quit (Quit: killed)
10:16:36*yglukhov[m] quit (Quit: killed)
10:16:39*Connor[m] quit (Quit: killed)
10:16:39*Mike[m]2 quit (Quit: killed)
10:16:42*xomachine[m] quit (Quit: killed)
10:16:42*spymasterd[m] quit (Quit: killed)
10:16:42*macsek1911[m] quit (Quit: killed)
10:16:42*planetis[m] quit (Quit: killed)
10:16:43*leorize[m] quit (Quit: killed)
10:16:44*nergal[m]1 quit (Quit: killed)
10:16:44*zacharycarter[m] quit (Quit: killed)
10:16:44*pigmej quit (Quit: killed)
10:16:45*d-nice2[m] quit (Write error: Connection reset by peer)
10:16:45*nc-x[m] quit (Quit: killed)
10:16:46*skrylar[m] quit (Quit: killed)
10:16:46*Manny8888 quit (Quit: killed)
10:19:46nc-xAraq: How would https://github.com/nim-lang/Nim/pull/12860#issuecomment-563159360 work? `os.nim` does not have an implementation of those procs for nimscript.
10:19:47disbotUndefine `paramCount` & `paramStr` in os.nim for *.nims @11nc-x
10:20:25*voidlinux-free joined #nim
10:20:32voidlinux-freehello
10:21:25voidlinux-freesetCookie(user, "admin"; expires = "";
10:21:26voidlinux-free secure = true; httpOnly = true)
10:21:29nc-xAlso is this patch good or do you want different behaviour? https://github.com/nim-lang/Nim/pull/12861 If this is good, I need the answer to the above template var parameter question so that I can send PR to the packages.
10:21:30disbotError on invalid var typeclass syntax in proc arguments @11nc-x
10:21:38*nc-x quit (Remote host closed the connection)
10:21:38voidlinux-freewhy does ^ this fail?
10:22:24voidlinux-freeit says expected setCookie(string, string) got (string, string; expires = string...)
10:37:46Araqvoidlinux-free, use ',' instead of ';'
10:38:07Araqnc-x: 'var' parameters in templates still influence overloading resolution
10:38:44*tklohna joined #nim
10:38:45Araqnc-x: os.nim should get impls for paramStr and paramCount at compile-time for API consistency
10:39:13voidlinux-freesorry i mixed 2 lines; when ';' is used it says expected ')' at end
10:39:49voidlinux-freewhen',' is used it says Error type mismatch
10:40:22voidlinux-freegot (string, string, expires: string, secure: bool..) expected proc setCookie(name, value: string)
10:40:48voidlinux-freemy line: setCookie("test", "tests", expires = "",....)
10:41:03voidlinux-freeimporting strtabs and cgi at top
10:42:43*nc-x joined #nim
10:42:50nc-xvoidlinux-free: fix your string
10:43:02nc-xby escaping " characters properly
10:43:59*lqdev[m] joined #nim
10:43:59lqdev[m]nc-x: I assume it affects type checking, just like any other type you can specify as a template param
10:45:04nc-xAraq, lqdev[m]: in that case I guess instead of producing error (https://github.com/nim-lang/Nim/pull/12861), it would be better to actually make it work?
10:45:05disbotError on invalid var typeclass syntax in proc arguments @11nc-x
10:45:43*voidlinux-free quit (Remote host closed the connection)
10:47:03*voidlinux-free joined #nim
10:47:10voidlinux-freesorry i got disconnected
10:47:29voidlinux-freeafter escaping " it says Error: closing " expected
10:47:39voidlinux-free^ same error with ';' and ','
10:48:09voidlinux-freeline: setCookie(\"test\", \"test\", httpOnly = true....)
10:49:36nc-xyou are not doing it properly
10:49:58voidlinux-freewhats wrong?
10:50:02nc-xsetCookie requires two strings
10:50:30voidlinux-freeyes i am passing it two strings, test and test
10:50:55nc-xyou can't escape the first and last quote
10:51:04nc-xbecause they mean that it is a string
10:51:08voidlinux-freeyeah passing only those two strings works, it sets the cokkie but then how do i set other values httpOnly ..?
10:51:24nc-xyou have to escape any extra code inside the string
10:51:28nc-x*quote
10:51:30*nc-x quit (Remote host closed the connection)
10:51:49voidlinux-freethere is no extra quote inside the string
10:52:03voidlinux-freesetCookie("test, "test,) ___ this works
10:52:28voidlinux-freesetCookie("test", "test"; httpOnly = false) # this doesnt work
10:57:53AraqsetCookie("test", "test; httpOnly = false")
10:58:05Araqor better use multiple setCookie calls
10:59:12voidlinux-freeAraq: like setCookie("test", "test) # line break # setCookie(httpOnly = false; ....) this?
11:00:06Araqno...
11:01:14voidlinux-freehmm yeah that would be wrong, then what did you sayabout multiple setcookie calls?
11:03:53voidlinux-freesorry i am new to this, just want a cgi page up and running
11:04:36sealmovecan I create a dll out of macros?
11:05:30Araqsealmove, ha, how could that work?
11:05:42FromGitter<vinodvinu> Hi
11:06:02FromGitter<vinodvinu> Nimsuggest is eating memory
11:06:09FromGitter<vinodvinu> What to do ?
11:06:37voidlinux-freeyou mean memory leak?
11:07:02FromDiscord<mratsim> kill it with fire
11:07:06FromGitter<vinodvinu> Yup, its start from 100 MBs and growing to 2 GB in seconds
11:07:16voidlinux-freelol report it
11:07:31sealmovemy use-case is that I want to produce a test-suite file based on other (spec) files. The number of files are 100+ so I don't want to do I/O for them every single time.
11:07:44voidlinux-freefile an issue on github
11:07:47FromGitter<vinodvinu> First of all, please tell me to how to disable nimsuggest
11:07:49FromDiscord<yewpad> @Araq: https://github.com/nim-lang/Nim/pull/12816
11:07:51disbotfeature dracula themed doc 👑11Araq
11:07:54FromDiscord<mratsim>
11:07:54FromDiscord<mratsim> https://cdn.discordapp.com/attachments/371759389889003532/653553402600488970/DeepinScreenshot_select-area_20191208230303.png
11:07:59FromDiscord<mratsim> ^ look what it did to me
11:09:24FromGitter<vinodvinu> Is there any way to disable this memory eater ?
11:09:52sealmoveshould I print the test-suite to a file using `toStrLit()` or something?
11:10:27voidlinux-freeyeah uninstall it, or maybe report it
11:12:32*nergal[m]1 joined #nim
11:12:32*isaac[m]1 joined #nim
11:12:32*leorize[m] joined #nim
11:12:32*Demos[m] joined #nim
11:12:32*k0mpjut0r joined #nim
11:12:32*LEdoian[m] joined #nim
11:12:33*GitterIntegratio joined #nim
11:12:33*BitPuffin joined #nim
11:12:38*zacharycarter[m] joined #nim
11:12:38*zielmicha[m]1 joined #nim
11:12:38*nc-x[m] joined #nim
11:12:38*meff[m] joined #nim
11:12:38*salotz[m] joined #nim
11:12:39*spymasterd[m] joined #nim
11:12:39*skrylar[m] joined #nim
11:12:39*lasso[m] joined #nim
11:12:39*pigmej joined #nim
11:12:39*aeverr[m] joined #nim
11:12:39*Connor[m] joined #nim
11:12:39*d-nice2[m] joined #nim
11:12:39*Miguelngel[m] joined #nim
11:12:40*planetis[m] joined #nim
11:12:40*macsek1911[m] joined #nim
11:12:40*Manny8888 joined #nim
11:12:40*xomachine[m] joined #nim
11:12:40*yglukhov[m] joined #nim
11:12:40*Mike[m]2 joined #nim
11:12:40*TheManiac[m] joined #nim
11:12:40*Balu[m] joined #nim
11:13:22FromGitter<vinodvinu> nimsuggest is not in the "instaled" programs list
11:13:24sealmoveso anyone has an idea how I can do this?
11:13:51aeverr[m]vinodvinu how did you install nim
11:14:05aeverr[m]choosenim, apt, what?
11:14:50voidlinux-freevinodvinu: https://github.com/nim-lang/nimsuggest/issues/85
11:14:51disbotnimsuggests consumes too much memory @11xmonader
11:14:57sealmove100 files -> macro -> test-code in AST form -> (now need a way to execute this AST without necessarily having to run the macro)
11:15:05FromGitter<vinodvinu> @aeverr, Just downloaded Nim from the web and extracted & run the finish.exe
11:15:14voidlinux-freeadd your issue there, if possible describe e it briefly
11:15:57voidlinux-freevinodvinu: link to the website?
11:16:18FromGitter<vinodvinu> @voidlinux, Nim home
11:16:34Araqyewpad: I want to move the CSS out of nimdoc.cfg first before merging
11:16:47voidlinux-freecan you please give a diret link?
11:16:53FromGitter<vinodvinu> Sure
11:16:59voidlinux-freei dont see nimsuggest link inn downloads
11:17:07FromDiscord<yewpad> Araq: https://media.giphy.com/media/RuUcPEjyJzA52/giphy.gif
11:17:27FromGitter<vinodvinu> https://nim-lang.org/install.html
11:17:56FromGitter<vinodvinu> I downloaded nim fro this link
11:18:16FromGitter<vinodvinu> I think nimsuggest is icluded in that installation
11:18:18sealmoveok rephrasing: how can I *permanently* cache the AST I build in a macro?
11:18:40voidlinux-freeyeah it was merged to base, readme says that
11:18:56voidlinux-freethen you have to remove nim to remove nimsugeest (if it was included)
11:19:00FromGitter<vinodvinu> Anyway, now i am managed to suspend nimsuggest with "Process Hacker" and i can work with nim
11:19:10voidlinux-freejust dont use it,
11:19:19voidlinux-freeyou dont have to use nimsuggest to work with nim
11:19:49FromGitter<vinodvinu> I am not using intentionally. It is starting with VS Code
11:19:59Araqsealmove, good question, you can store it via writeFile and load it back
11:20:28voidlinux-freevinodvinu ask vscode to not start it, there should be a config somewhere
11:20:38FromGitter<vinodvinu> I cant find a way to remove it. Still suspended
11:20:44voidlinux-freehttps://github.com/nim-lang/nimsuggest/issues/75
11:20:45disbotMemory leak with `staticRead` @11GULPF
11:21:05FromGitter<vinodvinu> Let me check
11:21:18voidlinux-freeask on vscode channels on how to disable it, i dont know vscode
11:21:37voidlinux-freehttps://github.com/nim-lang/nimsuggest/issues/49 ; related
11:21:38disbotExcessive memory usage @11Krognol
11:22:01FromGitter<vinodvinu> I am also planning to quit vs code because of lag in intellisense
11:22:52voidlinux-freeyeah it should allow you to just write nim code without starting nimsuggest
11:22:54FromDiscord<yewpad> Never had problems with vscode and nimsuggest lol
11:22:55FromGitter<vinodvinu> voidlinux - Thanks for links and quick replys. :)
11:23:08voidlinux-freenp;)
11:23:47voidlinux-freeAraq: will cgi stay in base modules?
11:24:48Araqunknown
11:25:06*tklohna quit (Ping timeout: 252 seconds)
11:25:24*Vladar quit (Quit: Leaving)
11:25:27sealmovestore ast in a file? hmm, how do I do this?
11:25:39voidlinux-freeoh, thats my only use. python is removing their module with 3.10
11:25:58AraqlispRepr it and parse it back, sealmove ?
11:26:01voidlinux-freeare there plans to remove it?
11:26:13sealmoveAraq: aha! got it, thx
11:26:23Araqvoidlinux-free, not really, we said v1 froze the stdlib for better or worse
11:27:05*tklohna joined #nim
11:27:22Araqcgi.nim doesn't say "unstable API", so we're committed to keep it
11:29:14*voidlinux-free quit (Remote host closed the connection)
11:30:36FromDiscord<yewpad> Always thinking of "Computer Generated Imagery".. I wish there was a better name for it
11:31:19*voidlinux-free joined #nim
11:31:52voidlinux-freeAraq: that would be awesome, so frozen means: will it be maintained? or just frozen as is
11:33:06AraqI think in this case "maintained" means "it's done"
11:33:20Araqno changes planned, it does what it does
11:33:30Araqbut we won't remove it either
11:33:38FromDiscord<yewpad> 🤔
11:34:23voidlinux-freethanks that "test" "test; expires=..." worked
11:35:07sealmovedo we have a standard lisp ast parser (reverse of lispRepr)?
11:35:34sealmovei know it's probably very simple to parse, but still, maybe we should have one?
11:41:11*ehmery is now known as ehmry
11:42:47*nc-x joined #nim
11:43:40voidlinux-freewhats the difference b/w stdout.write "" and echo "" ? which should be used if writing .cgi ?
11:43:56nc-xAraq: how would defining paramStr and paramCount in os.nim for nimscript work? nimscript cannot access the ffi, or otherwise it would already be working.
11:45:18*Hideki_ joined #nim
11:46:29*thomasross quit (Ping timeout: 268 seconds)
11:47:35FromDiscord<mratsim> stdout.write is a thin wrapper around the OS syscall, also it doesn't auto add new lines
11:48:10voidlinux-freeyeah there is also writeLine that adds new line, so its okay to use both?
11:50:19*thomasross joined #nim
11:50:28*nc-x quit (Remote host closed the connection)
11:52:21*tklohna quit (Ping timeout: 246 seconds)
11:54:45sealmovehmm, maybe I can directly load and run the code produced by `dumpAstGen()`?
11:58:16sealmoveor astGenRepr() I anyways
11:58:22*clyybber joined #nim
12:00:53Araqsealmove, we don't have it
12:01:04*krux02 joined #nim
12:01:16Araqvoidlinux-free, stdout.write is better style IMO
12:01:40Araqnc-x[m], not hard to do
12:02:00sealmovebut after parsing lisp ast you want to write code that produces it right? doest astGenRepr already do this? :D
12:02:27Araqhow do you think nimscript.paramStr works? it's known by the VM as a registered callback
12:06:37*tklohna joined #nim
12:11:47*voidlinux-free quit (Ping timeout: 260 seconds)
12:12:58clyybberAraq: Sup, do you have an idea why the .sym of a node would be nil?
12:13:40Araqwhich node, what's the context?
12:15:44clyybberCurrently trying to figure that out. The context is that it ends up as an def in the dfa
12:16:17clyybberAnd I can't access its id
12:16:23Araqbetter use the node in the DFA not the sym field
12:17:03clyybberAlright. Why does the sym field exist in the dfa then? Is it redundant?
12:17:29Araq of def, use: sym*: PSym # 'sym' can also be 'nil' and
12:17:29Araq # then 'n' contains the def/use location.
12:17:29Araq # This is used so that we can track object
12:17:29Araq # and tuple field accesses precisely.
12:18:12clyybberAh, thanks. Missed that
12:18:50*tklohna quit (Ping timeout: 276 seconds)
12:19:14Araqif sym == nil it's definitely not a local and not of your interest
12:19:24Araqthere is some redudancy here but it's valuable info
12:21:46*nc-x joined #nim
12:22:27nc-xAraq: done https://github.com/nim-lang/Nim/pull/12860 (I previously thought that you want to remove the callback and implement it properly)
12:22:28disbotUndefine `paramCount` & `paramStr` in os.nim for *.nims @11nc-x
12:23:32*nc-x quit (Remote host closed the connection)
12:33:44FromGitter<phillvancejr> Hello all, just wanted to say hi. I've just started using Nim and I really like it. Regards to all
12:39:51Araqhi, welcome
12:41:37*Vladar joined #nim
12:43:07sealmovethe good thing with Nim is that once you try it it's almost impossible to not stick around
12:43:18sealmovethe bad thing with Nim is that not enough people try it
12:49:23*Hideki_ quit (Ping timeout: 276 seconds)
12:49:59lqdev[m]sealmove: so true
12:53:15*Romanson joined #nim
13:01:43clyybbernc-x[m]: Does that mean that one cant use paramCount or paramStr in nimscript anymore?
13:03:45Araqclyybber, no it means you need to import os to get it
13:03:58clyybbernice
13:04:01Araqno difference between nimscript and ordinary nim, always a good thing
13:04:07clyybberyeah
13:08:26FromDiscord<mratsim> Famous last words
13:09:40*tklohna joined #nim
13:12:27PMunchHmm, how do I run all the tests and see the results?
13:14:17FromGitter<phillvancejr> speaking of the paramstr in nimscript, whenever I try to use it I get an OSError saying that it is not defined for nintendoswitch, how can I get around this?
13:14:40FromGitter<phillvancejr> I'm working on and compiling for MacOS
13:17:56FromGitter<phillvancejr> PMunch thanks for the wxWidgets bindings. I'm using them successfully on MacOS
13:21:28*solitudesf joined #nim
13:27:16PMunchphillvancejr, good to hear that they still work fine. Been a while since I've tested more than the examples :)
13:27:42PMunchBut I wasn't the one who made the bindings, I just started maintaining them after I wrote the genui macro :)
13:37:21sealmovenever tried dynamic linking in nim, how does it work?
13:37:34PMunchPretty well, if you know what you're doing
13:37:53PMunch(And good luck figuring that out, not a whole bunch of documentation on the topic)
13:38:24sealmoveyeah, we should make one
13:39:02PMunchDocumentation for dynamic libraries?
13:39:13PMunchYeah, it's on my ever growing list of things to write about :P
13:39:14*vycb[m] joined #nim
13:40:01sealmovehehe, just added it to mine ;P
13:40:36sealmoveI realized people will want to produce parsers with nimitai and link them dynamically
13:40:59FromDiscord<mratsim> do you need to NimMain() the dll your linking to if you are already using Nim?
13:41:02sealmovebecause if your project is big you don't want to re-generate 10 parsers every time
13:41:17sealmoveusing Nim only
13:42:05sealmovejust want compile modules
13:42:21sealmoveimport dll instead of .nim
13:43:11sealmovecompiled*
13:43:43*banc joined #nim
13:44:35PMunchmratsim, think so yeah
13:44:40PMunchBut not 100% sure
13:47:32sealmovebut dynamic linking doesn't seem hot for Nim, isn't that so?
13:47:41sealmoveI don't see many people doing it
13:49:53PMunchI just moved a Python script over to a Nim DLL for work :)
13:51:24*abm joined #nim
13:53:49*endragor quit (Remote host closed the connection)
13:55:45Araqthis is the weirdest bug ever
13:56:38Araqclyybber, https://play.nim-lang.org/#ix=23XT
13:56:57Araqnode how the declaration order inside 'type' influences the destructor generation
13:57:14Araqnow that wouldn't be too hard to explain in itself
13:57:35Araqexcept when I look at the produced C code it looks entirely correct in both cases
13:59:34Araqnever mind, found it
13:59:39Araqit is wrong
14:01:01*banc quit (Quit: Bye)
14:01:05shashlickHow do you sign your exe files on windows
14:01:24PMunchThere is a signtool
14:01:27shashlickSo that the virus scanner stops irritating
14:01:53livcdDont you need like an official cert ?
14:01:54shashlickMy IT has made local dev a nuisance
14:03:28PMunchCrap.. This nimbase.h type stuff is surprisingly hard to get right with C++..
14:03:47PMunchStupid namespaces..
14:05:01shashlickTrying to update tree sitter in nimterop
14:05:11shashlickGosh doing anything is a pain
14:05:23shashlickWonder why I code sometimes
14:05:45Araqsame here, everything is so hard
14:06:33shashlickEspecially since I'm trying to work on my Linux machine remotely across the planet
14:15:23*rockcavera joined #nim
14:16:59PMunchshashlick, `C:\"Program Files (x86)"\"Windows Kits"\10\bin\10.0.17763.0\x64\signtool.exe sign /f cert.pfx /p password123 /t http://timestamp.globalsign.com/scripts/timestamp.dll /v file_to_sign.exe
14:17:01PMunch`
14:17:47*tklohna quit (Ping timeout: 276 seconds)
14:23:29Araqrubber duck bugfixing, it works so well
14:23:41Araq20 minutes later and I have a bugfix
14:25:57FromDiscord<mratsim> Everything is easy compared to debugging a multithreaded memory manager, you get the best of two wolrds: memory bugs and threading bugs 😉
14:27:49shashlickThanks @PMunch, will try it out some day
14:29:14Araqmratsim: what's wrong with my wrapper for mimalloc?
14:40:18clyybberAraq: Is that the fix: https://github.com/nim-lang/Nim/pull/12823/commits/6d87e9c421598a3ac89b465e079d46a0345c6819 ?
14:40:19disbotARC: cycle detector 👑11Araq
14:45:28Araqyes
14:47:00*junland quit (Quit: %ZNC Disconnected%)
14:47:33*tane joined #nim
14:48:16*junland joined #nim
14:50:39clyybberAraq: It just occured to me that eliding initalization seems impossible.
14:51:10clyybberBecause then =sink and = would check uninitialized memory and do things that shant be done
14:51:40clyybberWell, it would be possible with the section approach you mentioned
14:52:04PMunchWhy is fixed sized integers so hard in C/C++
14:52:14PMunchSuch a simple thing, which is so hard to do..
14:54:47tanePMunch, they're available?
14:55:20*endragor joined #nim
14:55:48PMunchtane, what do you mean?
14:56:03PMunchInclude stdint.h and use uintX_t and you have them
14:56:03tanefixed size types are available and work fine
14:56:10tanesure
14:56:14taneso I don't see what's hard
14:56:14PMunchYeah, unless Nim is creating a namespace
14:56:22PMunchOr your compiler doesn't have stdint.h
14:56:29PMunchOr any of a number of other weird edge cases
14:56:44taneis stdint optional in any current standard?
14:56:46sealmovecan I interact with filesystem at compile time?
14:56:53sealmovewalkFiles doesn't seem to work
14:57:11PMunchAnd the compiler always knows the sizes it will apply to the different short/int/long keywords, but why would it tell you it's secrets!
14:57:22PMunchtane, well it is optional in C++11
14:57:51tanehm, then you probably need to call the compiler once up front and query the info, just to be safe :)
14:58:31PMunchAnd in C++98 it is placed in the regular C stdint.h, while in C++11 you should use cstdint. But of course the AVR (arduino) compiler doesn't include cstdint even when using C++11.
14:58:44FromDiscord<snluu> Hello! Random newbie question. What’s the idiomatic way to pass a sequence by reference and have it immutable (as in, I don’t want to copy the sequence to the caller)? I know we can use `proc doX(s: var seq[...])`, but that gives the function the ability to modify the sequence.
14:58:59tanelol ok, sounds like a lot of work, I understand the hardness now :)
14:59:20*ng0_ joined #nim
14:59:23*ng0 quit (Disconnected by services)
14:59:26*ng0_ is now known as ng0
14:59:32PMunchYeah Nim should just ship a "printf("%ld", sizeof(short/int/long))" file that got compiled and run on compile-time to get these secret sizes and build the proper integer sizes..
14:59:32sealmove`Error: cannot 'importc' variable at compile time; glob`
14:59:53taneyeah
14:59:54clyybberAraq: How do you imagne the section approach to be implemented? magic templates/macros?
15:00:16sealmovesnluu: just pass by value, the compilers always knows how to optimize it
15:00:21PMunchsnluu, just pass it normally. Nim will see that it is not something that should be copied and use a pointer behind the scenes
15:00:50Araqclyybber, it's simpler than you think
15:01:10Araqan init + =sink pair must be turned into a plain copyMem (= nkAsgn)
15:01:36sealmovedo we have walkFiles() or similar for CT?
15:01:36Araqno sections required, we will say in the spec that copyMem are the semantics
15:01:39*endragor quit (Remote host closed the connection)
15:02:21clyybberAraq: Ah right. Ok.
15:02:38clyybberAraq: What about = tho
15:02:49FromDiscord<snluu> Ah thanks! I come from a C++ world so kind of itching to be implicitly “const ref”. I assume the compiler will detect that the proc does not modify the sequence and thus passes by pointer?
15:02:49FromDiscord<snluu>
15:02:49FromDiscord<snluu> How does it deal with multithreading then? Does at least one copy always happen if the sequence is sent to a different thread?
15:02:54sealmovealso something else: why can't macros module be used in runtime? (if you just want to play around with nodes and not run ast code; for example print the string repr)
15:03:22clyybbersealmove: Thats a compiler :) embed it
15:04:10sealmovebut it could be possible right? it's not because we are reusing parts of the compiler
15:04:42clyybbersealmove: It *is* possible. If you embed the compiler.
15:05:09*endragor joined #nim
15:05:18PMunchsnluu, you can't share things between threads without either explicitly copying them, or by sharing a pointer.
15:05:52sealmoveoh hmm, but I suspect there should be a simpler solution for my case... I just want to walkFiles(), make AST out of them, and print Nim code on a file with toStrLit.strval
15:05:54sealmoveany ideas?
15:06:04PMunchAnd yes, it will check that you aren't messing with the data that got passed in (however it is still possible to edit the data if you use ugly pointer casting hacks).
15:06:20*PMunch quit (Quit: Leaving)
15:06:32sealmovewalkFiles() complains for importc and newStmtList() complains for "can't do at runtime", lol...
15:08:26FromDiscord<mratsim> @PMunch ugliness is in the eye of the beholder 😉
15:08:52FromDiscord<snluu> Thanks PMunch! I’ll read more on multi-threading. Still has some unanswered questions, mostly around the unexplicit/undocumented behavior of how & when the compiler would copy
15:09:24sealmoveis `import nimscript` legit to do?
15:10:38*NimBot joined #nim
15:11:04FromDiscord<mratsim> below it's passed by the default calling convention, i.e. registers or stack
15:11:24clyybberAraq: I think the section approach is a better idea because otherwise we can't optimize away the initialization of `b` in the following: let a = ...; let b = a; echo a; echo b`
15:11:29FromDiscord<mratsim> Seq are just pointer+len+reserved on the stack
15:11:41FromDiscord<mratsim> that's the only thing that is copied when you pass them around
15:11:49*endragor quit (Remote host closed the connection)
15:11:50Araq"that's not all", we also got move semantics, 'lent T', .acyclic, sink parameters
15:12:14Araqand maybe soon .new to give us unique ownership
15:12:23FromDiscord<mratsim> yes but he was talking about parameter passing, not assignment
15:12:49Araqthe general philosphy is to turn imperative code into declarative code by telling the compiler more about your program
15:13:21FromDiscord<snluu> @mratsim I guess that makes, since parameters are by default immutable so the C code can easily pass by pointer/reference under the hood
15:13:30FromDiscord<mratsim> if you want to make sure that there is no copy, just have your proc accept openarrays instead of seq
15:13:53Araqand it's working out so far, I'm about to publish results where we get down to no overhead
15:14:01FromDiscord<mratsim> ref seq is costly because that means 2 pointers indirections
15:14:38Araqso we optimize the "GC" code down to malloc/free performance levels (latency, throughput and memory consumption)
15:14:48Araq... famous last words ... *cough*
15:14:49FromDiscord<mratsim> otherwise use seqs packaged in a {.shallow.} object like I do there if you want reference semantics: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/data_structure.nim#L21-L30
15:15:15FromDiscord<snluu> ::nod:: Thanks! That makes a lot of sense. Just takes a little mental gymnastic, coming from a different set of languages 🙂
15:15:27FromDiscord<snluu> languages/semantics
15:15:31FromDiscord<mratsim> The hard part about the GC or malloc/free is the freeing memory from remote thread part :/
15:16:25FromDiscord<mratsim> in my memory pool, I'm 3x to 5x faster than malloc/free for blocks allocated/released from the same thread, but I'm only as "slow" as malloc/free when those blocks are released from a thread that did not allocate them.
15:16:43*njoseph quit (Ping timeout: 250 seconds)
15:17:16FromDiscord<mratsim> Coming from C++, Nim low-level details should be relatively straightforward
15:17:46FromDiscord<mratsim> you just need someone to explain them and/or time to experiments because they are pretty much only known by people not laid out in some overarching document
15:18:17FromDiscord<snluu> Yeah, it makes sense now. Just need to think through how the compiler reasons about things, since the language itself is not as explicit (which is probably a good thing)
15:19:03FromDiscord<snluu> Thanks for your help! 😄
15:19:08sealmoveok I give up, how do I embed the compiler and use macros module as normal at runtime?
15:19:14FromDiscord<mratsim> it depends on what you need, actually, I would say it's not explicit because it lets the dev roam free
15:19:27FromGitter<alehander92> you dont use the macros module sealmove
15:19:35FromGitter<alehander92> you use `parser` etc
15:19:46sealmovethat's painful
15:19:49FromDiscord<mratsim> @sealmove, if you can make "import compiler/nimeval" working 😉
15:20:02FromGitter<alehander92> sealmove why?
15:20:06clyybbersealmove: Thats expected. What you are trying to do is probably a really bad idea.
15:20:10FromGitter<alehander92> you just use the compiler module as a lib
15:20:32FromDiscord<mratsim> but if you embed the compiler you don't need macros
15:21:00sealmoveI'd rather not import the compiler, but I don't see a solution since I can't use walkFiles() at CT
15:21:11FromGitter<alehander92> i remember that setting up the code for parseString was a bit annoying, but you can abstract it away in a function
15:21:22FromGitter<alehander92> but i think this was made easier
15:21:50FromDiscord<mratsim> search for compileTime FFI, it's a doubly hidden option by timotheecour, you need an experimental flag and a command-line flag
15:21:54FromGitter<alehander92> yeah
15:22:10FromDiscord<snluu> @mratsim definitely. it’s refreshing to write code like python and have the compiler do the right thing. granted, g++ -O3 probably does the same thing, but the C++ mindset is always to be explicit because you don’t know what other compilers would do
15:22:11FromDiscord<mratsim> this will allow you to importc at compile-time and you will be able to use IO at compile-time
15:22:47sealmovethat's a relief
15:22:52clyybbersealmove: May I ask what your endgoal is?
15:22:52sealmovethx
15:23:59shashlick@sealmove what exactly are you trying to do
15:24:18FromDiscord<mratsim> @snluu I often have to drop down being explicit in Nim as well, but with Nim it's good that I have the large spectrum of being C-like when needed (i.e. low-level memory, multithreading or GPU work) or Python-like otherwise.
15:24:50sealmoveclyybber: ok so... I have some files based on which I want to generate a unittest suite
15:24:53FromDiscord<mratsim> + the ability to create your own mini declarative languages via macros is great
15:25:23FromDiscord<snluu> Thanks! I’ll play with Nim some more. Have been going through the Advent of Code this year to learn Nim 🙂
15:25:29sealmovethe files look like this: https://play.nim-lang.org/#ix=23Yb
15:25:45FromDiscord<mratsim> Have fun, the problems seem quite headscratching :p
15:25:46sealmoveobviously I don't want to print a .nim file using strings
15:26:13sealmoveI want to make the Nim code at AST level and use toStrLit().strval to print it
15:26:26clyybbersealmove: Why not do that at compile time?
15:26:40sealmovebecause walkFiles() doesn't work :D
15:26:50sealmoveit's over 100 files which might change anytime
15:26:59FromDiscord<snluu> @mratsim ^^ I’m only at day 3 so far. I have to say though, it’s so much more joyous compared to when I used Rust for the 2018 AoC. Rust trades developer happiness for safety, it feels like 😛
15:27:15shashlick@sealmove - https://github.com/nimterop/nimterop/blob/master/nimterop/cimport.nim#L47
15:27:38FromGitter<alehander92> why not staticExec?
15:27:56shashlickPoor man's walkDir, you can repurpose
15:27:58*endragor joined #nim
15:28:19sealmovealehander92: ohh to find the files? didn't think that, seems like a good option!
15:29:05FromGitter<alehander92> yeah, it seems the shashlick example invokes something similar
15:29:22sealmovebut.. I'd need to parse the result manually and extract filenames, which is inheritely problematic
15:29:50clyybberwhy?
15:29:52FromGitter<alehander92> well, you just call a command which returns only filenames
15:29:57FromGitter<alehander92> look at shashlick's link
15:30:14Araqsealmove, we do have
15:30:30Araqproc listFiles*(dir: string): seq[string]
15:30:33Araqin nimscript.nim
15:31:14sealmoveAraq: I saw it, naively tried `import nimscript`, didn't work, I gave up, lol
15:31:37Araqand also oswalkdir.nim
15:34:11*endragor quit (Remote host closed the connection)
15:35:05sealmoveok so I probably have to ship nimscript.nim with my project
15:36:13*zyklon quit (Ping timeout: 250 seconds)
15:38:07sealmovewow wtf, importing nimscript is not even necessary, this works:
15:38:09sealmovetemplate builtin = discard
15:38:11sealmoveproc listFiles*(dir: string): seq[string] =
15:38:13sealmove builtin
15:38:29*zyklon joined #nim
15:38:49sealmovesorry I am very confused, I will shut up
15:43:02*njoseph joined #nim
15:45:18Araqany git bisect masters around?
15:52:20*clyybber quit (Quit: WeeChat 2.6)
15:55:59FromDiscord<mratsim> why do you need a master? you just need to do git bisect start, bit bisect good, git bisect bad and git bisect reset
15:56:16*endragor joined #nim
15:56:18FromDiscord<mratsim> the only difficult thing is if you need to rebuild your koch with older csources
15:56:31disrupteksshhh, we masters need job security.
15:58:45Araqwell I dunno if I ever had a "good commit"
15:58:56Yardanicolol
15:58:58Araqso I don't know a commit range
15:59:00stefantalpalaruSometimes it's more intuitive to use "old" and "new" instead of "good" and "bad". (Had to use git bisect to locate the commit that accidentally fixed a Nim compiler bug, so it got confusing.)
16:00:10stefantalpalaruYou also need to know about "git bisect skip", when a certain commit can't be tested.
16:00:36*endragor quit (Ping timeout: 240 seconds)
16:01:43*Romanson quit (Quit: Connection closed for inactivity)
16:01:56FromDiscord<mratsim> yeah I agreee, when you want to locate fixes, bad/good gets super confusing
16:02:24FromDiscord<mratsim> skip was very useful during the "not nil" time when changes where breaking left and right
16:06:52sealmoveoswalkdir is the perfect solution after all
16:10:08*nsf quit (Quit: WeeChat 2.6)
16:11:07AraqI realized I'm happier without git bisect and found the problem on my own
16:11:16*clyybber joined #nim
16:11:39YardanicoI'm trying my hands on fixing #12820 (PR by cooldome didn't work for me), and it turns out the code in sempass2.nim at line 762 gets "proc (s: var seq[empty], newlen: Natural){.noSideEffect.}" as one of the values in `n`. Does that mean that the type was incorrectly chosen before sempass2 or somewhere in it?
16:11:41disbothttps://github.com/nim-lang/Nim/issues/12820 -- 3@[] is a problem for --gc:destructors @11cooldome; snippet at 12https://play.nim-lang.org/#ix=23Yu
16:16:19*azed joined #nim
16:17:18AraqYardanico, yeah, I think so
16:19:06Araqclyybber, ping
16:22:21Araqclyybber, https://play.nim-lang.org/#ix=23Yx you forgot to destroy nkObjConstr and friends when not passed to a sink location
16:24:09disruptekoh shoot!
16:26:31clyybberAraq: pong, huh, no idea how I missed that :)
16:26:58AraqI had an unsubmitted test case that is now failing
16:27:14Araqif only I had submitted it
16:27:53*Araq sighs
16:28:07Araqstill such a piece of junk
16:28:19Araqafter all these months
16:33:02clyybbershould be easy to fix
16:33:52Araqthe fix breaks the 'echo' impl in the backend
16:34:43disruptekAraq: your piece of junk looks great. it's what's on the outside that counts.
16:38:51clyybberAraq: Ah, I hit that error too while working on it
16:38:52*floppydh quit (Quit: WeeChat 2.6)
16:39:33clyybberccgexprs:1032 is that right?
16:42:01Araqyes
16:45:55lqdev[m]Araq: what's the difference between `type(x)` and `typeof(x)`? they behave quite differently when used in macros. https://play.nim-lang.org/#ix=23YC
16:46:37Araquse typeof
16:48:22disruptekone is unfortunately named and the other isn't.
16:50:10lqdev[m]yeah, took me a while to figure out that `typeof(x)` should be generated as an nnkCall to `typeof` instead of an nnkTypeOfExpr
16:50:16lqdev[m]until I looked at the .repr output.
16:50:35Araqlqdev[m], I think that's an error in renderer.nim
16:50:48AraqI also think I fixed it...
16:51:20disrupteki found a compiler segfault involving once: and defer: in a template, but i can't create a minimal example.
16:52:21*dddddd quit (Ping timeout: 268 seconds)
16:54:59lqdev[m]Araq: yeah, but I'm referring to the fact that `typeof(x)` is reported as a nnkTypeOfExpr by .treeRepr which is confusing
16:56:37disruptekwhat do you think it should be?
17:03:34*dddddd joined #nim
17:04:38nisstyreis there an up to date version of this? https://github.com/VPashkov/awesome-nim
17:04:42nisstyrelooks like the owner archived it
17:04:47nisstyreoh derp, I can't read
17:04:53FromDiscord<michalm> Hi. I have a really strange error message from my nim compiler. https://pastebin.com/6qGr5csf Do you know what is wrong with my code?
17:08:06Yardanico@michalm your Params type is not really correct since Param is a generic type
17:08:47Yardanico(I think)
17:09:35YardanicoIf you want to be able to store different types in Param, you might want to use an object variant
17:09:35Yardanicohttps://nim-lang.org/docs/manual.html#types-object-variants
17:10:19*Trustable joined #nim
17:10:26Yardanicobut the compiler doesn't give a good error message, I agree :)
17:10:38FromGitter<alehander92> well this shouldn't be a problem in general
17:10:45FromGitter<alehander92> like you should be able to have generic fields etc
17:11:00FromGitter<alehander92> i guess that something with this particular scenario
17:11:10FromDiscord<michalm> Hmm this is the first time where Nim solution is not the most elegant one IMHO. But community once again have save my day. Thx 🙂
17:11:16FromGitter<alehander92> is wrong, but you havent provided actual calls of generateTemplate
17:11:37FromGitter<alehander92> michalm: maybe if you write down your `[T]` in types explicitly it might be easier
17:12:00FromDiscord<michalm> what do you mean ?
17:12:35FromGitter<alehander92> type Params*[T] = Table[string, Param[T]]
17:12:35FromGitter<alehander92> etc
17:12:56Yardanicowell yeah, but that way Params can only contain Param of one type, I think that's not what michalm wants
17:13:08FromGitter<alehander92> i prefer this style, but i know some people prefer omitting it indeed
17:13:10Yardanico@michalm you want to store different types as values in a Params table ?
17:13:23Yardanicolike key1 is int, key2 is bool?
17:13:39FromGitter<alehander92> hm, i thought he wants just a generic table and decided to use implicitness (typeclass?)
17:18:52*njoseph quit (Ping timeout: 268 seconds)
17:25:01AraqI think he wants JsonNode
17:25:10Yardanicosealmove: rip MIT in nimitai :D
17:25:18AraqI always think that people re-invent Json, poorly
17:26:56Yardanicosealmove: but doesn't GPL v3 in nimitai mean that if you use nimitai in your app it should be open source?
17:31:35*njoseph joined #nim
17:33:03Araqwhat's nimitai?
17:33:15Yardanicohttps://github.com/sealmove/nimitai
17:33:34Yardanicoa nim lib for parsing files from https://kaitai.io/ ksy grammar
17:34:00sealmoveYardanico: I had to, because I added some files from Kaitai Struct, which is GPLv3
17:34:15Yardanicosealmove: well, that's a bummer since most of nim libs/apps are MIT :(
17:34:56sealmovesorry :| I wonder if I can license files within the project differently, then I can make it MIT again
17:35:13clyybberAraq: How do you think the section approach can be implemented the best? (I don't know if you received my message before, but we need the section approach to elide inits in the presence of `=`)
17:36:16Araqsealmove: oh, please put the files from Katai Struct in a different repo under a different license then
17:36:33Araqclyybber: I didn't understand your remark
17:38:57FromDiscord<mratsim> @Araq, we need to remove the CFI directives, etc in the produce ASM, this is a mess:
17:38:59FromDiscord<mratsim>
17:38:59FromDiscord<mratsim> https://cdn.discordapp.com/attachments/371759389889003532/653651824364093470/DeepinScreenshot_select-area_20191209183747.png
17:39:20clyybberAraq: The problem is that `=`(a: var T, b: T) checks a and destroys it when necessary. When we elide of a however, it will check and destroy random memory. Thus we need to remove the "check and destroy" part of `=` when eliding the initialization of `a`
17:41:59FromGitter<alehander92> mratsim but debugging?
17:42:05FromGitter<alehander92> or you mean only in the asm output
17:47:45FromGitter<Varriount> Araq: I vaguely recall asking why refcounting wasn't enough, and why possible cycles couldn't be detected at compile-time (or the opposite, situations where cycles could never occur)
17:48:15FromGitter<Varriount> I don't know if I ever suggest just using ARC and a mark/sweep collector
17:48:34disruptekgreat, someone else to blame.
17:49:45Araqmratsim: yeah, PR please, no idea what's all that junk in there
17:50:06Araqclyybber: well but '=' is not common
17:50:20Araqmost assignments are turned into =sink
17:50:30sealmoveok ready: https://github.com/sealmove/nimitai
17:51:09FromDiscord<mratsim> @alehander92 I only want the ASM, all those locs are used by the linker to create the exception unwinding table
17:51:21FromDiscord<mratsim> and also for debugging symbols
17:51:58FromDiscord<mratsim> that means we can't have both debugging and ASM output in the same command but if people are ready to use GDB they probably don't mind doing one compilation for ASM and one usable for GDB
17:52:12clyybberAraq: Still seems like a worthwile optimization IMO. Also it makes the spec more elegant IMO.
17:52:26clyybberIMO IMO IMO :p
17:52:40FromDiscord<mratsim> should be IMHO
17:53:28Yardanicoyeah, we should be honest IMHO
17:53:44Yardanicoor humble 🤔
17:55:15clyybberAraq: It also makes the analysis a bit more complicated since we have to check if it gets sinked or = then.
17:55:43clyybberAnd only one path wich `=` is enough to make the elision impossible
17:55:50clyybberEven if all other paths `=sink`
18:16:53Araqclyybber: related is also the common and important "emplace_back" optimization
18:21:07*nsf joined #nim
18:26:11AraqVarriount: one thing I learned in the last months is that the heap topology with closures and closure iters is untractable, it makes my head hurt
18:26:38Araqso if you use these features there is little hope but to also add a cycle detector. which I did last weekend
18:32:14clyybberAraq: Is
18:32:26clyybber"emplace back" constructing in-place?
18:32:47Araqconstructing in-place at the end of the seq
18:33:03Araqso you don't have to zeroMem the seq's storage
18:33:47Araqbeating C++ is not as easy as people think, it's actually a beautiful design behind a layer of C based bullshit
18:35:36clyybberhmm
18:36:17clyybberAraq: Btw a `try: ... except: ...` is not slower than a `try: ... finally: ...` right?
18:40:16*azed quit (Read error: Connection reset by peer)
18:44:40*tane quit (Quit: Leaving)
18:47:26Araqcorrect
18:50:29clyybberCool
18:51:03*azed joined #nim
18:51:13*Trustable quit (Remote host closed the connection)
18:56:22*rockcavera is now known as Guest45301
18:56:22*tiorock joined #nim
18:56:22*Guest45301 quit (Killed (karatkievich.freenode.net (Nickname regained by services)))
18:56:22*tiorock is now known as rockcavera
18:59:34Araqok, now to answer your question
18:59:48Araqif we want sections, here is how to do it
18:59:59Araqtemplate section(body) =
19:00:21Araq {.newPragmaName.}: body
19:00:39Araqthis way we don't have to add new keywords
19:00:50clyybberNice, good idea thanks!
19:17:28FromGitter<mratsim> When you push a pragma and then import, does the push pragma apply to the imported module/proc/globals? Can we control that?
19:19:41disruptek#12862 harks back to the point i was trying to make 6 months ago.
19:19:43disbothttps://github.com/nim-lang/Nim/issues/12862 -- 3The Defect exceptions are not consistently tracked @11zah; snippet at 12https://play.nim-lang.org/#ix=23Zp
19:20:19Araqdisruptek: in this case there was no consensus on what to do
19:20:38AraqDefects shouldn't be tracked IMO.
19:21:11disruptekagree. but a decision, however damaging, is more important at this point.
19:28:35AraqPRs are welcome
19:28:45AraqI can guide you if you want to help out
19:29:21disruptekpretty focused on nimph, but my vote is for quirky. maybe it could be the only supported option for arc?
19:30:14Araqquirky is independent of how we do the exception tracking
19:30:35disruptekno one else needs to know that.
19:32:43*MarquisdeFalbala joined #nim
19:37:39*tiorock joined #nim
19:37:39*tiorock quit (Changing host)
19:37:39*tiorock joined #nim
19:37:39*rockcavera is now known as Guest3855
19:37:39*Guest3855 quit (Killed (cherryh.freenode.net (Nickname regained by services)))
19:37:39*tiorock is now known as rockcavera
19:39:13*tiorock joined #nim
19:39:13*tiorock quit (Changing host)
19:39:13*tiorock joined #nim
19:39:13*rockcavera quit (Killed (wolfe.freenode.net (Nickname regained by services)))
19:39:13*tiorock is now known as rockcavera
19:39:55*azed quit (Read error: Connection reset by peer)
19:40:12disruptekError: unhandled exception: int128.nim(383, 11) `false` overflow [AssertionError]
19:41:18*tiorock joined #nim
19:41:18*rockcavera quit (Killed (adams.freenode.net (Nickname regained by services)))
19:41:18*tiorock is now known as rockcavera
19:41:18*rockcavera quit (Changing host)
19:41:18*rockcavera joined #nim
19:45:33*azed joined #nim
19:55:12*azed quit (Quit: WeeChat 2.6)
19:55:52FromDiscord<mratsim> don't multiply a negative number by 0 in the VM
19:56:07disruptekbingo, thank you!
19:56:24disruptekffi symbol must be 0.
19:56:47disruptekyep, that was it.
19:58:20FromDiscord<mratsim> you can use a constant proc as a workaround, the C compiler should constant fold it
19:58:26*PMunch joined #nim
19:59:35FromDiscord<mratsim> otherwise, use latest devel: https://github.com/nim-lang/Nim/issues/12783
19:59:37disbotsemfold bug with negative value * 011mratsim; snippet at https://play.nim-lang.org/#ix=23ZP
19:59:59disruptekmy solution was to simply not * by -n.
20:14:39PMunchHmm
20:15:04PMunchMy 2FA code for the GitHub authenticator app is gone..
20:15:14PMunchAnd none of the recovery codes seem to work..
20:16:41*kevinsjoberg left #nim ("Textual IRC Client: www.textualapp.com")
20:17:15*banc joined #nim
20:20:15FromDiscord<mratsim> github has an authenticator app?
20:20:19FromDiscord<mratsim> I use andOTP
20:21:05sealmovehow do I create a typedesc node literal?
20:21:37FromDiscord<mratsim> typedesc can only exist as function parameter
20:21:48PMunchmratsim, well I use Google Authenticator
20:21:49FromDiscord<mratsim> so newIdentDef(ident"T", ident"typedesc")
20:22:02PMunchBut I recently switched phones and need to transfer the key
20:22:04PMunchOh wait
20:22:07PMunchI'm an idiot..
20:22:09FromDiscord<mratsim> ah that's the issue, Google Authenticator is notoriously bad at backups
20:22:23PMunchI can just grab my old phone..
20:24:28sealmovethx mratsim
20:26:21sealmovehmm but...
20:28:32*banc quit (Quit: Bye)
20:29:29PMunchHmm my PR https://github.com/nim-lang/Nim/pull/12817 seems to have failed because of the CI
20:29:30disbotFix AVR target to define ints properly @11PMunch
20:35:01*nsf quit (Quit: WeeChat 2.6)
20:37:43PMunchCould someone re-run them?
20:51:14*narimiran quit (Ping timeout: 252 seconds)
20:54:11*sagax joined #nim
20:57:21FromDiscord<kodkuce> what
21:00:25*Vladar quit (Quit: Leaving)
21:01:04PMunchkodkuce, what what?
21:01:31sealmovei don't really understand the private directory convension of nimble
21:01:58clyybberits where you put files you don't want people to import
21:01:58sealmovehow is "private" special?
21:02:02clyybberits not
21:02:12sealmoveso i can name it "priv" and nothing changes?
21:02:16clyybberyeah
21:02:23clyybberI named it 'imnothere'
21:02:33PMunchI think nimble will complain though
21:02:37clyybberits just a convention as you said yourself
21:02:39PMunchThat you are not following the convention
21:03:50sealmoveit's confusing because... when reading documentation i thought that
21:04:10sealmoveif you do `import myproject` then `myproject/mymodule` is also imported
21:04:26sealmovebut you still have to do `import myproject/mymodule`
21:04:58disruptekit's a death trap;
21:05:03disruptekit's a suicide rap.
21:05:43sealmoveall I am saying is I can't see how someone will mistakenly import something that he shouldn't, and why we need "private" convension.
21:06:12sealmovewhich makes me think this is not its intention
21:06:39sealmovei guess it is for developers to have a clearer image of what symbols they expose
21:06:51clyybbersealmove: No
21:06:53FromDiscord<kodkuce> rerun what
21:06:53disruptekit's silly.
21:07:02clyybberWhen you have a project myproject/mymodule
21:07:10clyybberyou should be able to do `import mymodule`
21:07:38disruptekif you have it in the path, sure.
21:07:48clyybberthats the purpose of nimblePaths
21:07:59disrupteknah, that's the purpose of --path.
21:08:07clyybbershould be
21:08:09clyybber:)
21:08:10disruptek--nimblePath is a globbing construct.
21:08:29clyybberif I install a nimble pkg
21:08:31disruptekwhat's annoying is that if --nimblePath finds a directory it cannot process, it crashes the nim.cfg parser.
21:08:34disruptekto me, that's a bug.
21:08:40clyybberoof
21:08:44clyybberthat sounds bad
21:09:08disrupteki'm talking a directory named "foo" will crash it. nothing in it, just an empty directory.
21:09:15disrupteksilliness.
21:10:26sealmoveclyybber: oh so it's indeed what I originally thought! nice, hmm, but when testing my package how do I enable this feature? I should use nimble command while developing?
21:10:32*lritter quit (Quit: Leaving)
21:11:05clyybbernimble develop
21:11:07clyybberI think
21:11:40clyybbersealmove: But tbh if you want to KISS use git submodules :)
21:11:47clyybberor if you want it to just work use nimph :)
21:12:27sealmovehmm
21:12:33sealmovefood for thought you gave me
21:13:44sealmovewhat is nimph?
21:13:55*filcuc joined #nim
21:14:02disruptek!repo nimph
21:14:04disbothttps://github.com/disruptek/nimph -- 9nimph: 11a nim package hierarchy manager from the future 🧚 15 8⭐ 0🍴 7& 1 more...
21:15:55*ltriant joined #nim
21:16:15FromDiscord<michalm> Anyone from Zurich or surroundings? Maybe some small Nim based meetup?
21:17:58sealmovedisruptek, can you give a tl;dr overview of nimph?
21:18:07sealmovepersude me to use it
21:18:40disruptekit's a package manager that integrates tightly with git, github, and the compiler. so that you don't have to use it as often as you use nimble.
21:19:21disruptekit's like a developer-oriented package manager, as opposed to the other kind.
21:19:24sealmovemy only concern is that nimble is the mainstream (I think?)
21:19:38disrupteksure.
21:19:54disruptekyou can use both at the same time.
21:20:41sealmovewell, I just want people to be able to install my repo as easily/conveniently/familiarly as possible
21:20:51disruptekweird.
21:21:30disrupteknimph doesn't change any of that. you still use the .nimble file and all that bullshit.
21:21:46disruptekit just yields useful information about your environment and helps you keep it sane.
21:21:47sealmoveyes I realized it uses .nimble, which is encouraging
21:22:12clyybber
21:22:23sealmoveso... people will be able to install it using nimble? even if I am not?
21:22:42clyybberyeah
21:22:46sealmovegreat! <3
21:22:54disruptekwhy can't you install your repo with nimble?
21:23:18sealmovei didn't try, not used to package managers
21:23:51disruptekyeah, they are dumb.
21:24:17sealmovethis is not my opinion, i don't have an opinion yet, since i haven't tried
21:24:33sealmovemight as well start with nimph
21:25:15disruptekno, it's my opinion.
21:25:30disrupteki would rather just have symlinks, but i know araq would never go for that.
21:25:32*thomasross quit (Ping timeout: 268 seconds)
21:26:15AraqI would use relative addressing, project foo, dependency bar in ../bar, problem solved.
21:26:39disruptekwhere my code sits has little to do with what i need it to provide.
21:27:55Araqwell you can put your symlinks in ../ then :P
21:28:06disruptekthe fact is that the world is flat as far as the compiler is concerned. ../bar is the same as bar or ../../bar.
21:28:45clyybber?
21:29:13disruptekbar == bar == bar
21:29:48clyybberfoo
21:30:18*thomasross joined #nim
21:30:31clyybberdisruptek: Reminds me.. I wanted to make a not-sure-how-that-operator-thing-is-called macro
21:30:42clyybberthat allows you to write `a < b < c
21:30:49clyybberor `a == b == c`
21:30:50disruptekah, yeah, cool.
21:31:02clyybberjust to see if it *can* be done
21:31:07disruptekhmm, i wonder about that.
21:31:21PMunchA term rewriting macro?
21:31:35clyybberI wonder if haskell supports that syntax
21:31:39clyybberPMunch: Yeah
21:31:44clyybberIdeally I guess
21:32:14disruptekseems like you can do it with your own operators, but i dunno about using existing ones with it.
21:32:47Araqyou can do chain(x < y < z)
21:32:56disruptekclearly.
21:33:00Araqbut IMHO it's silly
21:34:04disruptekclearly!
21:34:14Araqand math only has it because it's a legacy. plenty of math syntax is tasteless
21:34:50Araq"let's use ab for a*b and then run out of single letter vars and so we'll use Greek and Arabic letters"
21:35:09disruptekpretty sure that /adds/ flavor.
21:35:11disruptekso to speak.
21:35:27clyybberIts handy for cartesian products
21:35:31clyybberA x B x C
21:35:59Araqas much as I dislike the word, it really doesn't "scale". at all.
21:36:18PMunchAraq, can you re-run this: https://github.com/nim-lang/Nim/pull/12817 or should I just force push to trigger it?
21:36:20disbotFix AVR target to define ints properly @11PMunch
21:36:41PMunchdisruptek, I like how disbot works now :)
21:36:51PMunchIt's actually useful instead of just annoying :D
21:37:06disruptekyou mean, the way it messages /me/ when someone posts an ix link?
21:37:23PMunchHuh?
21:38:03AraqPMunch: tests/compiler/tcppCompileToNamespace.nim is failing
21:38:12disruptekit doesn't post ix links to the playground and then reproduce them here. instead, it posts links to the playground and then sends them to me alone.
21:38:14Araqhttps://dev.azure.com/nim-lang/Nim/_build/results?buildId=1123
21:38:19PMunchStill? I thought I fixed that..
21:39:04PMunchWhere do you see what fails?
21:39:47*thomasross quit (Ping timeout: 276 seconds)
21:40:04Araqfollow my link
21:40:14Araqclick on one job
21:40:38Araqscroll down, click on "Run CI - Failed"
21:40:54PMunchAnd then just go scrolling through the log into you find something that seems out of order?
21:41:03PMunchI mean I got that far intuitively..
21:41:33Araqsearch for 'FAIL'
21:42:11Araqdisruptek: does nimph work on Windows?
21:42:20disruptekdunno.
21:42:32Araqwould you accept patches?
21:42:35disrupteki don't know of a good reason it wouldn't.
21:42:42disruptekwhy not?
21:42:52PMunchAraq, oh great.. That test runs fine on my machine
21:42:54FromDiscord<mratsim> @Clyybber I have one
21:43:22disrupteki need a patch to fix this dirty repo issue.
21:43:23clyybberone <...> ?
21:43:24rayman22201so happy PMunch is doing the hard work of making Nim work on Arduino because it's something I want to play with one day :-P
21:43:29*thomasross joined #nim
21:43:38FromDiscord<mratsim> Had to parse this for my misguided attempt at a polyhedral compiler: https://github.com/mratsim/hydra/blob/master/tests/test_sets.nim#L52
21:43:39PMunchrayman22201, it actually works pretty well
21:43:59PMunchThis is just some weird edge-case issue that is easy to work around with a compiler define :)
21:44:06FromDiscord<mratsim> macro for chained a < b < c
21:44:18clyybbermratsim: NIce
21:44:18PMunchBut come to my talk at FOSDEM for more details :)
21:44:41FromDiscord<mratsim> it's surprisingly a pain: https://github.com/mratsim/hydra/blob/master/hydra/ilp/constraints.nim#L28-L152
21:45:19rayman22201If only I could fly to Brussels from the US cheaply... I will have to hope somebody records it :-)
21:45:32Araqclyybber: waiting for your p(ObjectRef(...)) patch
21:45:55FromDiscord<mratsim> but the basic strategy is that you just do comparisons from left to right and you return the right operand
21:45:57PMunchrayman22201, don't worry all the talks are live-streamed and later uploaded to YouTube :)
21:46:51clyybberAraq: Thought you'd fixed it yourself :p
21:47:15FromDiscord<mratsim> you could create your custom one that returns both the comparison result and the right operand and have a converter that discards the right operand automatically
21:47:26FromDiscord<mratsim> to create the illusion of native Nim support
21:47:32clyybberHmm
21:48:08FromDiscord<mratsim> that would only works on your custom types of course
21:48:14AraqI suppose I programmed for too long, a < b < c makes no sense to me anymore
21:48:31Araqwhy compare '<' against a bool?
21:48:55PMunchHmm, what distro are the azure jobs running on?
21:49:14disruptekto see if one bool is larger than the other.
21:49:28clyybberAraq: Thats what I think too when I see stuff like |A| < |P(A)| = |A^A|
21:49:36disruptekthere are some crazy big bools rollin' aroun' here.
21:50:05AraqPMunch: "Zealot Linux"
21:50:19clyybberAraq: Is there some fancy printing for PContexts?
21:50:43AraqI never printed a PContext, ever.
21:51:13Araqit contains the symbol table, usually it's so big that you get lost
21:51:52clyybberNice.
21:52:22PMunchHmm okay, I'll set up a VM and try to figure out why it fails tomorrow
21:52:42clyybberAraq: I want to check that the section pragma is used in a =sink or `=` context
21:52:51clyybberSo I thought I'd take a peek in PContext
21:53:01clyybbersince there is no sym I could look at the owner of
21:53:29Araqc.p.owner.name.s in ["=sink", "="]
21:53:36clyybberNice, thanks
21:53:44*nif quit (Quit: ...)
21:53:53*nif joined #nim
21:54:31clyybberAraq: One quick last qeustion: Should I check for that in semstmts or in sempass2? Or would it make no difference?
21:55:07Araqfor sempass2 the check looks different
21:55:30*thomasross_ joined #nim
21:55:30*thomasross quit (Killed (wolfe.freenode.net (Nickname regained by services)))
21:55:30*thomasross_ is now known as thomasross
21:55:47Araqand sempass2 already checks for body pragmas
21:56:07Araqso it's probably easier to add to sempass2.
21:56:19Araqbut semantically it makes no difference
21:56:43clyybberok :)
21:59:31sealmoveclyybber: the submodules are not imported after all, what am I missing?
22:00:10clyybbersealmove: You place git submodules where you want them to be
22:00:27sealmovei mean nimble. as documentation says:
22:00:29sealmove├── src
22:00:31sealmove│ ├── foobar
22:00:33sealmove│ │ ├── utils.nim # Imported via `import foobar/utils`
22:00:35sealmove│ │ └── common.nim # Imported via `import foobar/common`
22:00:37sealmove│ └── foobar.nim # Imported via `import foobar`
22:00:39sealmoveso `import foobar` doesn
22:00:42sealmove't pull submodules
22:00:51clyybbersubmodules?
22:00:56clyybberah you don't mean git submodules
22:01:14clyybbersealmove: Yeah you are right
22:01:31clyybberI was referring to the fact that you don't have to do import foobar/src/foobar
22:01:45sealmoveah i see
22:01:45clyybberor foobar/foobar in the case of a different repo layout
22:01:49disruptekif you put src in the path, sure.
22:02:05clyybberdisruptek: Which nimble does
22:02:10clyybberin nimblePath I guess
22:02:18clyybberor rather nimblePath does
22:02:20clyybberwhatever
22:02:22clyybber :p
22:02:58disruptekhere's an easy way to remember it: nimble doesn't use nimblePath. 😉
22:03:09*PMunch quit (Quit: leaving)
22:03:32clyybberaight
22:04:00*dwdv quit (Quit: quit)
22:26:35sealmoveanyone knows any good guides for versioning?
22:26:49disruptek!repo bump
22:26:50disbothttps://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 6⭐ 1🍴
22:27:07disrupteksee the semver link therein.
22:27:55sealmovethanks!
22:29:10FromDiscord<mratsim> Disruptek is trying to silently takeover all Nim packages. A package manager, a versioning system, soon a package search. I know another company who did that, shhhhh it's called Google
22:29:28clyybberAraq: Instead of the section approach we can also introduce a =initSink and =initCopy . The section thing is basically syntax sugar around it.
22:29:35disruptekpackage search is built into both irc and nimph. 😜
22:29:41clyybberIt's an optional optimization after all
22:29:55FromDiscord<mratsim> for me optimizations are not optional 😉
22:30:06clyybbermratsim: For you I'm doing this :)
22:30:39*david_ joined #nim
22:30:47david_hello
22:31:04sealmovehi
22:32:38david_got hex chat to work on this little terminal i have, so i figured i would go to an IRC that i can talk about what im programming. How general is the conversation in here?
22:32:42FromDiscord<mratsim> well I don't know if I how much I will use them, weave is actually too low-level and only uses trivial types because multithreading. And Laser is now becoming a custom compiler
22:33:10clyybbermratsim: I'm working on init elision
22:33:19FromDiscord<mratsim> I'd rather think it's for the naive soul that is trying to do functional programming with strings and is paying memory allocation at every function that is not updated in-place
22:33:25clyybberSo we don't zeromem stuff that is later overwritten by anyways
22:33:30FromDiscord<mratsim> ah nice
22:34:05clyybberbut to make that work I need to have a =sink and `=` variant that does not destroy the previous location
22:34:13clyybberas that location will contain uninit memory
22:34:44disruptekuninit memory makes my heels throb.
22:34:53disruptekbut, like, in a good way.
22:35:11clyybbersurprise surprise
22:35:18david_exit
22:35:20*david_ quit (Remote host closed the connection)
22:35:24disrupteklol
22:35:35clyybberyou enter
22:35:38clyybberenter
22:35:48*clyybber enters the matrix
22:37:26clyybberthe fastest "random" number generator is reading uninitialized memory, fite me
22:41:21*david_ joined #nim
22:42:01david_does anyone know of any "Neural Network" modules written in nim?
22:42:42david_i am just looking for some examples of what is possible and doing some reasearch, but i am having a hard time finding anything
22:43:55disruptek!repo arraymancer
22:43:57disbothttps://github.com/mratsim/Arraymancer -- 9Arraymancer: 11A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends 15 527⭐ 48🍴 7& 6 more...
22:44:30david_ok thanks! i will look into it
22:44:44disruptekno problem.
22:46:48*david_ quit (Remote host closed the connection)
22:49:54sealmoveanyone knows what's the deal with Lox? https://www.craftinginterpreters.com/the-lox-language.html
22:53:15sealmove:S I wonder if I should break compatibility with Kaitai Struct grammar... They used weird/undocumented expression language where I can just use Nim expressions
22:53:35sealmovealso there are undocumented features which I have to support if I don't want to break compatibility
22:56:25FromGitter<kaushalmodi> How do I profile a Nim code's performance?
22:56:52disruptekthere's a profiling section in the manual.
22:56:55FromDiscord<mratsim> Since I'm writing a profiler, I can say
22:57:00FromDiscord<mratsim> not with nim
22:57:13rayman22201lol. What happened to Golden disruptek?
22:57:19FromDiscord<mratsim> use perf record + perf annotate, or Apple isntruments or intel VTune or Valgrind
22:57:32FromGitter<kaushalmodi> mratsim: thanks will have a look
22:57:35*MarquisdeFalbala quit ()
22:57:40disruptekit works, but it's unfinished. i'm focussed on nimph at the moment.
22:57:52FromGitter<kaushalmodi> This thread made me think of profiling my AoC code: https://www.reddit.com/r/adventofcode/comments/e8etjl/rustcc_users_how_long_does_your_day_9_part_2_take/
22:58:11FromDiscord<mratsim> I tried nimprof like 3 hours ago and deadlocked my program, + it requires stacktraces which are a big source of slowdown themselves so ....
22:58:22FromGitter<kaushalmodi> My code takes 120ms, whereas the OP's code there takes 9ms
22:58:42rayman22201I was looking into to profiling and flamegraphs myself. @kuashalmodi and @mratsim you might appreciate this blog: http://www.brendangregg.com/flamegraphs.html
22:58:55rayman22201for performance profiling
23:00:00FromDiscord<mratsim> I've never understood the appeal of flamegraphs personally
23:00:01FromGitter<kaushalmodi> I've never done profiling before.. would it list which line/block of the Nim code took how long? By correlating it with the compiled C?
23:00:19FromDiscord<mratsim> give me the line <-> Assembly any day, and also the cache misses
23:00:30FromDiscord<mratsim> what platform are you on?
23:01:11FromDiscord<mratsim> perf/Intel VTune and Apple Instruments can correlate directly with the Nim code if you compile with --debugger:native
23:01:18FromDiscord<mratsim> you don't have to go through C
23:01:34FromGitter<kaushalmodi> I'm on RHEL 6.8
23:02:17FromDiscord<mratsim> then compile with --debugger:native
23:02:25FromDiscord<mratsim> do "perf record yourbinary"
23:02:36FromDiscord<mratsim> it will create a per profile
23:02:42FromDiscord<mratsim> and then "perf annotate"
23:03:13FromGitter<kaushalmodi> Thanks, I'll try these out when I get to my PC
23:03:27FromGitter<kaushalmodi> Also reading this: https://nim-lang.org/docs/estp.html
23:05:23*clyybber quit (Quit: WeeChat 2.7)
23:06:40*azed joined #nim
23:13:11sealmoveoh I wasn't aware of:
23:13:19sealmove!repo binaryparse
23:13:19disbothttps://github.com/PMunch/binaryparse -- 9binaryparse: 11Binary parser for Nim 15 30⭐ 2🍴
23:13:33FromDiscord<mratsim> I didn't try the ESTP but just nimprof results in empty calls for me
23:19:17*solitudesf quit (Ping timeout: 240 seconds)
23:20:04*filcuc quit (Quit: Konversation terminated!)
23:35:45*lkw_ quit (Quit: ZNC 1.7.3 - https://znc.in)
23:36:50*lkw joined #nim
23:38:31*thomasross quit (Ping timeout: 250 seconds)
23:48:06FromDiscord<Fern & Simula (They/Them)> any chance nim has anonymous functions?
23:48:09*thomasross joined #nim
23:48:44FromDiscord<Fern & Simula (They/Them)> oh, it's in sugar
23:52:21*thomasross_ joined #nim
23:52:21*thomasross is now known as Guest73229
23:52:21*Guest73229 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
23:52:21*thomasross_ is now known as thomasross
23:57:11*abm quit (Quit: Leaving)
23:57:29FromGitter<Willyboar> ```the doctor wasn't able to fix everything ``````
23:58:33FromDiscord<mratsim> @david_ also had this demo to your NN in Nim: https://github.com/Vindaar/NeuralNetworkLiveDemo