<< 07-06-2019 >>

00:01:04*deech quit (Ping timeout: 248 seconds)
00:05:30*envoyt joined #nim
00:07:13*cavariux quit (Quit: Leaving)
00:11:55*stefanos82 quit (Quit: Quitting for now...)
00:55:43*envoyt quit (Ping timeout: 258 seconds)
00:56:02*envoyt joined #nim
01:07:00*Serenitor quit (Quit: Leaving)
01:08:12*envoyt quit (Ping timeout: 272 seconds)
01:10:00*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
01:10:26*laaron joined #nim
01:12:04*laaron quit (Remote host closed the connection)
01:12:21*laaron joined #nim
01:13:08*deech joined #nim
01:29:28*c3v0axz quit (Ping timeout: 246 seconds)
01:30:04*laaron- joined #nim
01:30:33*c3v0axz joined #nim
01:32:49*laaron quit (Ping timeout: 256 seconds)
01:37:32deechThe compileTime pragma needs to be fired into the sun.
01:44:20deechCurrently when the typechecker tries to find a suitable overload candidate the compile time pragma is not taken into account. Sigh.
01:46:17*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:48:51*laaron- quit (Remote host closed the connection)
01:52:28*laaron joined #nim
01:54:03*deech quit (Remote host closed the connection)
01:54:28*deech joined #nim
01:56:25*laaron quit (Remote host closed the connection)
02:04:40*laaron joined #nim
02:05:10*deech quit (Ping timeout: 246 seconds)
02:06:32*seni quit (Quit: Leaving)
02:50:15FromGitter<kaushalmodi> @GULPF Adding `timezones` adds about 2.5MB to my binary even in release mode
02:50:39FromGitter<kaushalmodi> I would like to revisit my attempt to use `newTimeZone` in https://irclogs.nim-lang.org/06-06-2019.html#20:55:58
02:51:13FromGitter<kaushalmodi> You mentioned that I can make it work using closures, but I don't know how to do that. Would you have time to refactor that snippet to make it compilable?
02:51:32FromGitter<kaushalmodi> The said snippet: http://ix.io/1L6u/nim
02:56:13FromDiscord_<citycide> choosenim is supposed to be able to install 64-bit nim on Windows now right?
03:01:11*laaron quit (Remote host closed the connection)
03:01:51leorize[m]yes, if you have 64bit gcc around
03:03:11*laaron joined #nim
03:04:12FromDiscord_<citycide> oh so it doesn't install 64-bit c compiler
03:07:31shashlicknope, right now it only installs 64-bit if gcc is detected and is 64-bit
03:08:05shashlickwe need to add code to install gcc/nim based on arch detected and also allow 32-bit on 64-bit with a flag if desired
03:09:23FromDiscord_<citycide> ah right on, thanks
03:10:51*chemist69 quit (Ping timeout: 248 seconds)
03:12:50*chemist69 joined #nim
03:32:30*jasper_ joined #nim
04:00:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
04:03:16*laaron joined #nim
04:07:45*nsf joined #nim
04:10:56FromGitter<Kvothe87> Hello everyone
04:11:07*theelous3_ quit (Ping timeout: 248 seconds)
04:11:23FromGitter<Kvothe87> Congrats for the new important release
04:13:20FromGitter<Kvothe87> about nimpretty: is it ready and available?
04:13:39leorizeit's available as part of the standard installation now
04:14:01FromGitter<Kvothe87> I looked around but could not find some minimal documnetation
04:14:17leorizenimpretty --help is the documentation for now :p
04:15:00FromGitter<Kvothe87> i was expecting to find something here
04:15:20FromGitter<Kvothe87> https://nim-lang.org/docs/tools.html
04:15:59leorizenarimiran: we'll need online doc for nimpretty
04:16:21FromGitter<Kvothe87> even without extended doc a bullet in the tools section would be good enough
04:16:45leorizewell nimpretty is still alpha atm
04:17:02FromGitter<Kvothe87> yesterday i used for the first time nim doc and it was awesome
04:17:16leorizeI don't think there are many people using nimpretty yet, but I've seen several bugs being ironed out
04:17:29FromGitter<Kvothe87> just to be curious, how much alpha?
04:17:39FromGitter<Kvothe87> ok i will wait for the moment
04:17:59leorizeyou can help by using nimpretty and report for bugs :)
04:18:26leorizealso nim got a new --styleCheck:warning flag
04:18:35leorizebut Araq forgot to mention it :p
04:19:12FromGitter<Kvothe87> i tried nimpretty --help from vscode
04:19:31FromGitter<Kvothe87> but it does not recognize the command
04:19:38FromGitter<Kvothe87> i installed nim with choosenim
04:20:12leorizedom96: did you forget to release the new choosenim?
04:20:50leorize@Kvothe87: the code for installing nimpretty is only in the latest commit of choosenim...
04:21:09leorizeyou can install it like this I believe: nimble install 'choosenim@#head'
04:22:15leorizewait, choosenim 0.4.0 should have got the nimpretty installation code
04:22:26leorize@Kvothe87: are you using the latest choosenim?
04:24:20FromGitter<Kvothe87> just checked, stuck on 0.3.2
04:24:42leorizeyou got to update to 0.4.0 :p
04:25:02leorizehttps://github.com/dom96/choosenim/releases
04:25:06leorize^ can be downloaded there
04:25:38FromGitter<Kvothe87> i tried choosenim update self
04:25:53FromGitter<Kvothe87> but it gets 404 not found
04:26:50leorizeit's a known bug https://github.com/dom96/choosenim/issues/116
04:29:46FromGitter<Kvothe87> no deal. Tried to download the exe file for windows, but double click gives an error
04:30:14leorizesounds like a bug
04:30:18leorizewhat did you get?
04:31:21FromGitter<Kvothe87> something like "parameter not correct" translated from local language
04:32:47FromGitter<Kvothe87> can i ask you a couple of extra simple questions?
04:33:02leorizesure :) that's what this irc channel is for
04:33:16FromDiscord_<citycide> if you're talking about the choosenim 0.4.0 binary for windows, that's not an installer
04:33:43FromGitter<Kvothe87> in the page generate by doc
04:34:18FromGitter<Kvothe87> there are the search and group by element
04:34:36*dddddd quit (Remote host closed the connection)
04:35:38FromGitter<Kvothe87> what should i do to make them work ? They don't do anything right now, but i just added some comments to the procs so i expect i'm missing something
04:36:15FromDiscord_<citycide> there's a file called `dochack.js` that's missing when you generate docs, afaik that was never fixed
04:36:21FromGitter<Kvothe87> @FromIRC citycide that explains a lot
04:36:34FromGitter<kdheepak> Congrats on the v0.20.0 / v1.0.0rc release!
04:36:40leorizesearch requires idx files
04:36:54leorizeit's only generated on demand
04:37:23FromDiscord_<citycide> leorize: is that documented anywhere? and imo the search box shouldn't even be there if it won't work
04:37:52FromGitter<Kvothe87> that would be a good behaviour
04:38:47leorizeit's in nim fullhelp
04:38:51leorize--index:on|off
04:39:35leorizebut searching would requires the dochack.nim to be installed for it to be generated
04:40:01leorizeI think an issue should be filed on github for this
04:40:53FromDiscord_<citycide> right that's what I was talking about, I thought that was the main problem. seem to remember there already being an issue but I can't find one now
04:41:35FromDiscord_<citycide> maybe it's this one https://github.com/nim-lang/Nim/issues/8952
04:56:10FromGitter<Kvothe87> updated choosenim
04:56:31FromGitter<Kvothe87> update nim stable
04:56:48FromGitter<Kvothe87> when i run nimpretty now i get a different error
04:57:16FromGitter<Kvothe87> requested executable is missing
04:57:23FromGitter<Kvothe87> and in fact it is not there
04:58:00leorizenow that's weird, tried to restart your cmd?
05:00:09FromGitter<Kvothe87> i did, and nothing changed, the file is not in the supposed folder. So i don't expect any improvements
05:01:30leorize[m]that's weird, maybe @citycide or dom96 can help, since I don't use windows myself
05:03:46FromDiscord_<citycide> what's missing exactly?
05:06:42FromGitter<Kvothe87> nimpretty.exe
05:07:37FromGitter<Kvothe87> i give up for now, it was just an extra and i don't need it
05:08:01FromDiscord_<citycide> I've never actually used nimpretty, but I did check back to 0.19.0 and there were no nimpretty binaries in any of those Windows zips
05:09:36FromDiscord_<citycide> @Kvothe87 you may want to open an issue because it seems like it should be included but I'm not sure
05:12:09FromGitter<Kvothe87> last question, i hope. I am just learning to program in general, and also the tools not only nim. I'm building some small scripts for now. Would it be possible to have some kind of review? Now i get the desired results, but would like some tips and suggestions for performance and style improvements
05:12:48FromGitter<Kvothe87> nothing fancy, it is just for personal culture
05:13:46FromGitter<Kvothe87> I'm slowly following exercism track but, this is outside the track
05:14:10FromDiscord_<citycide> @Kvothe87 try making a post on the nim forum, I'm sure you'd get some feedback there
05:14:13FromDiscord_<citycide> https://forum.nim-lang.org/
05:22:15jasper_disruptek: If you think something isn't working correctly: share a reproducible example to see if its a bug/bad error message/user error. The feature is very new, so feedback is good. Thanks.
05:22:45jasper_Araq: The segfault wasn't reproduced, so it could still happen. I'm ok closing the issue, saying to open a separate issue if it still happens. I don't have closing powers, so I can't do it.
05:24:24FromGitter<Kvothe87> @jasper just did. Scarce information but i hope is enough. I believe it is only missing the file.
05:30:19jasper_That was in regards to https://github.com/nim-lang/Nim/issues/11143. I've no idea about nimpretty :)
05:32:22*leorize quit (Quit: WeeChat 2.3)
05:39:38*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
05:40:13*laaron joined #nim
05:45:58FromDiscord_<Stuffe> I installed nim using homebrew os osx, but it doesn't have the latest version, does anyone know, who/when the version is updated?
05:52:45Araqno, but installing from source is really easy, try it! or try choosenim
05:55:21*leorize joined #nim
06:03:19*narimiran joined #nim
06:14:24*vlad1777d quit (Ping timeout: 248 seconds)
06:22:25FromDiscord_<Stuffe> Ok I got it working with choosenim. I was hesitating because you never know what dependency nightmares you can get into and I dont have time for that right now
06:23:10FromDiscord_<Stuffe> It was easy though, although how come choosenim doesn't automatically add to the $PATH?
06:28:52AraqI don't know, missing feature probably. We only know how to set the PATH on Windows :P
06:29:30leorize*nix with their many shells aren't the best place for PATH manipulation
06:31:01Araqon OSX you can edit /etc/bananajoe/PATH to do it
06:31:35leorizethat'd requires root
06:32:52Araqwell there is also /home/user/etc/bananajoe/PATH for the current user
06:40:35*jasper_ quit (Ping timeout: 256 seconds)
06:43:21FromDiscord_<Stuffe> In any case thank you guys for making this language, I come from higher level languages but have been wanting to escape "kinder garden" for a while now. I wrote a bit of code in C, C++, D, Go, C# and a many others, but didn't like any of them. I tried NIM out of desperation, even though it seemed unwise to try a language that isn't version 1 yet and it relatively obscure, but I absolutely love it.
06:59:06*PMunch joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:03:14*krux02 joined #nim
07:04:13*Vladar joined #nim
07:04:44*gmpreussner joined #nim
07:21:02*jjido joined #nim
07:26:54Araqthanks!
07:41:21*couven92 joined #nim
07:46:36Zevvwhat's "leanCompiler"?
07:47:31FromDiscord_<niv> hello. is there a way to promote deprecation warnings to complilation errors?
07:50:17leorizeZevv: it's the compiler sans several functionality. just search for leanCompiler in Nim source code
07:50:33*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:50:40Zevvyeah, "sans several" is what I figured :)
07:51:08Zevvah it's support stuff like doc building etc
07:51:20leorize@niv: I don't think we have a -Werror equivalent
07:51:36*laaron joined #nim
07:51:47leorizebut since all of them share the [Deprecated] tag, you could just pipe nim's output to grep
07:53:34FromDiscord_<niv> ta
07:55:22*laaron quit (Remote host closed the connection)
07:55:57*leorize quit (Remote host closed the connection)
07:57:28PMunchI keep forgetting that Python don't have UFC syntax: http://ix.io/1L7s
07:57:41narimiran:)
07:59:46*laaron joined #nim
08:00:14*leorize joined #nim
08:20:46*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
08:20:58*laaron- joined #nim
08:35:00*leorize quit (Ping timeout: 256 seconds)
08:48:17dom96leorize[m], just so you know, you can update choosenim via `choosenim update self` :)
08:49:40leorize[m]dom96: don't forget choosenim#116 :P
08:50:22*leorize joined #nim
08:52:27dom96oh yeah :/
08:55:20*chemist69 quit (Ping timeout: 258 seconds)
09:01:23*abm joined #nim
09:02:30FromGitter<GULPF> @kaushalmodi You can pass -d:timezonesNoEmbeed to the compiler to avoid the huge binary with the timezones library. See https://github.com/GULPF/timezones/blob/0c5f270c81b798d16b4dc690bbfc0c22fcfa37ea/timezones.nim#L88 for how to capture the offset information in closures
09:04:30*clyybber joined #nim
09:07:12*natrys joined #nim
09:12:05leorize!eval echo NimVersion
09:12:08NimBot0.19.6
09:13:32Zevv!eval NimVersion = "0.20.0"
09:13:34NimBotCompile failed: in.nim(1, 1) Error: 'NimVersion' cannot be assigned to
09:13:39Zevv:/
09:28:41narimiranZevv: = != ==
09:30:27leorize!eval discard execShellCmd "curl https://nim-lang.org/choosenim/init.sh -sSf | sh"
09:30:30NimBotCompile failed: in.nim(1, 9) Error: undeclared identifier: 'execShellCmd'
09:30:37leorize!eval import os; discard execShellCmd "curl https://nim-lang.org/choosenim/init.sh -sSf | sh"
09:30:37Zevvnarimiran: yeah, sure. I was just trying to do a poor mans upgrade
09:30:41NimBot<no output>
09:30:45*jjido quit (Quit: Connection closed for inactivity)
09:30:56leorize:p guess I can't cheat
09:35:56PMunchHmm, is there a library for doing interactive REPL style things in Nim?
09:36:11PMunchWith support for up/down/left/right navigation
09:36:40clyybber!eval import os; echo execShellCmd "curl https://nim-lang.org/chosenim/init.sh -sSf | sh"
09:36:44NimBot0
09:37:09leorize[m]rdstdin?
09:37:11leorize[m]but I think you should use a line editing library
09:37:18leorizePMunch: ^
09:37:21leorizematrix lag :p
09:37:52leorize!eval discard execShellCmd "ls /nim"
09:37:54NimBotCompile failed: in.nim(1, 9) Error: undeclared identifier: 'execShellCmd'
09:38:00leorize!eval import os; discard execShellCmd "ls /nim"
09:38:04NimBotbin↵build.bat↵build.sh↵build32.bat↵build64.bat↵c_code↵compiler↵compiler.nimble↵config↵copying.txt↵deinstall.sh↵dist↵doc↵examples↵icons↵install.sh↵install.txt↵koch↵koch.nim↵lib↵makefile↵nimpretty↵nimsuggest↵readme.txt↵testament↵tests↵tools↵web
09:38:18PMunchleorize, why is that?
09:39:12leorizePMunch: rdstdin is not in the stdlib roster
09:39:27leorizeit uses linenoise for backend anw, so you might get more features by using those directly
09:39:33PMunchHmm
09:39:38PMunchBut it's cross platform..
09:40:06leorizepretty sure the other libs is cross-platform too
09:42:38PMunchHmm, maybe
09:42:54PMunchHmm, with rdstdin I have to hit enter once first to get it going..
09:43:34leorizePMunch: https://github.com/jangko/nim-noise
09:45:29*al_ joined #nim
10:00:21*stefanos82 joined #nim
10:07:26*lritter joined #nim
10:11:56ehmryis there a way to assert --multimethods:on at compile time?
10:13:28leorizewhen not compileOptions("multimethods"): {.error: "Must be compiled with --multimethods:on" .}
10:14:27leorizealternatively, you could just add --multimethods:on to your project configuration file
10:15:55leorizeit should be compileOption
10:16:03leorizewithout the `s` :p
10:17:58ehmryleorize: thanks
10:37:30*leorize quit (Quit: WeeChat 2.3)
10:46:58*deech joined #nim
10:54:16*xet7 quit (Read error: Connection reset by peer)
10:55:03*alexander92 joined #nim
10:55:25*xet7 joined #nim
11:06:24*PMunch quit (Ping timeout: 268 seconds)
11:50:43*Snircle joined #nim
11:54:58*jjido joined #nim
11:55:52FromGitter<kaushalmodi> @GULPF Thanks for that reference.. I just realized that I was confusing between gcsafe and side-effects.. see my comment here: https://forum.nim-lang.org/t/4912#30771 and also what do you think about preserving the original time zone in the string input to `parse` (see that same comment)?
11:56:42FromGitter<GULPF> I responded in the forum thread a bit earlier
11:57:15FromGitter<GULPF> I'm afraid that it would be misleading since you cannot parse the actual timezone, only the current UTC offset of the timezone
11:57:57FromGitter<bobeff> Hi. Is the new `-d:danger` flag orthogonal to the `-d:release` flag or it implies `-d:release`. Are "dangerous debug builds" possible? `-d:debug -d:danger`
11:58:54FromGitter<kaushalmodi> @GULPF I missed that response (Nim forum needs a notification system). I see, I understand your design decision.
11:59:51lqdev[m]bobeff: it only disables checks, so you can use it without `-d:release`
11:59:53lqdev[m]also afaik `-d:debug` is not a thing
12:00:43FromGitter<bobeff> @liquid600pgm 10x
12:08:22def-bobeff: something like --checks:off ?
12:11:49*dddddd joined #nim
12:13:30*laaron- quit (Remote host closed the connection)
12:14:31*alexander92 quit (Quit: WeeChat 2.4)
12:14:52*alexander92 joined #nim
12:15:56narimiranlqdev[m], @bobeff: d:danger implies d:release AFAIK
12:16:16narimiranbut --checks:off is a thing, as def- says
12:16:19*laaron joined #nim
12:18:12*laaron quit (Client Quit)
12:18:47*laaron joined #nim
12:19:03alexander92hey so
12:19:25alexander92i updated to 0.20 and i got some random "strVal field error"
12:19:27alexander92errors
12:19:33alexander92which are hard to pinpoint
12:22:05*envoyt joined #nim
12:23:11*envoyt quit (Read error: Connection reset by peer)
12:24:43*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
12:24:53alexander92what i dont understand is, why doesn't sysFatal generate location info for the field error
12:25:15alexander92it generates a new exception which is not helpful
12:25:21alexander92because it includes only fatal.nim:48
12:25:22*laaron joined #nim
12:25:23*oculux joined #nim
12:25:41*envoyt joined #nim
12:27:05*oculuxe quit (Quit: blah)
12:28:23jjidoWhat is the error about?
12:29:43*joshii joined #nim
12:30:08joshiiHi
12:30:22alexander92basically "fieldError : strVal not accesssible"
12:31:00jjidoVisibility error is it?
12:31:35joshiiin documentation it is said that the --run switch can take in arguments
12:32:05joshiibut i doesnt take when i use readLine example
12:32:16jjidoIt should be reported at compile time
12:33:12*envoyt quit (Read error: Connection reset by peer)
12:34:02*envoyt joined #nim
12:34:16alexander92probably, the problem is that it doesn't generate a proper stacktrace/origin path:line
12:34:33alexander92@krux02 do you know a workaround, or am i mistaken
12:34:43alexander92(^ the sysFatal fieldError file info)
12:35:00*sealmove joined #nim
12:36:42*nc-x joined #nim
12:38:34nc-xhas bootstrapping become too slow for anybody else? is it because release now enables some checks? or because i am on gcc 9.1 and it has some bugs? i am seeing cpu going up to 100% mostly because of cc1.exe and as.exe
12:39:54narimirannc-x: try with -d:danger and see if there's any difference
12:40:06alexander92yes, @bobeff had similar issues iirc
12:40:50joshiican anyone help me?
12:41:31narimiranjoshii: link to documentation example?
12:41:50joshiihttps://nim-lang.org/docs/tut1.html
12:42:13Araqalexander92: report it with a small test program please
12:44:19*envoyt quit (Read error: Connection reset by peer)
12:44:27Araqdo we have 32bit testing now? can't remember
12:44:39*envoyt joined #nim
12:45:02narimiranjoshii: i'm guessing this line (`nim compile --run greetings.nim arg1 arg2`) is the problem?
12:45:08krux02alexander92, well I cannet say anything if you don't show me an example to reproduce the problem
12:45:30joshii@narimiran yes
12:45:34krux02nc-x: bootstrapping is slower, yes
12:45:53krux02nc-x, it is because of some checks that are enabled by default, even in release mode
12:46:26Araqnot "some checks", all of them, including integer overflow checking
12:46:33narimiranjoshii: the original example doesn't use any arguments. so `arg1` and `arg2` will just be ignored
12:46:38FromGitter<bobeff> @narimiran 10x You are correct. Passing only `-d:danger` produces `Dangerous Release Build` as well passing `-d:release -d:danger`.
12:48:03joshiinarimiran: but the readLine does take in strings right
12:48:26FromGitter<jrfondren> it doesn't take them from the command line.
12:48:48nc-xkrux02: even -d:danger is slow for me because of 100% cpu usage. might be gcc issue. there is a newer build of gcc9.1 on msys2, i will update and try again.
12:48:50FromGitter<jrfondren> use paramStr() and paramCount() for that.
12:50:04alexander92sorry, i'll try to make a repro
12:50:38alexander92it seems to work with smalle examples, maybe its because my compiler itself is in :release, and i didnt get that the error might be from iself
12:50:41*PMunch joined #nim
12:50:42narimiranbtw, Araq, speaking of tut1.rst and -d:danger, this is in the current version: "With -d:release these checks are turned off and optimizations are turned on."
12:51:50narimiran@jrfondren, joshii we should maybe remove that `nim compile --run greetings.nim arg1 arg2` part, just not to confuse people
12:53:37alexander92@krux02 @Araq sorry, my fault: i didnt compile nim with debugInfo, now i see the full trace
12:54:06alexander92it comes from regs[ra].node.strVal = regs[rb].node.strVal
12:54:34*arnetheduck joined #nim
12:54:45*PMunch quit (Remote host closed the connection)
12:57:12*nc-x quit (Quit: Page closed)
13:00:16*nc-x joined #nim
13:00:31*joshii quit (Quit: Page closed)
13:00:38FromGitter<Vindaar> @dom96 tried to rebuilt that D lang RPN macro example in Nim: https://gist.github.com/Vindaar/0e3090b1c9ab84fec9055e673b2f0b26 ⏎ posted it below your comment on the reddit thread
13:01:02dom96Nice :O
13:01:37nc-xWell, clang (on windows) is entirely different beast. slow bootstrapping + 100% cpu + 100% disk even on -d:danger. If people can't reproduce this, then i probably need to clean up my laptop.
13:04:32lqdev[m]I recently found this: https://github.com/dr-soft/miniaudio/, it's an amazing C library I'm wrapping for rapid
13:04:53*nc-x quit (Client Quit)
13:04:56lqdev[m]it's super easy to compile
13:13:45*PMunch joined #nim
13:19:53*vlad1777d joined #nim
13:23:17*PMunch quit (Remote host closed the connection)
13:24:56laaronwhy nimble broken after 0.20
13:26:48clyybberlqdev[m]: That's awesome, wish there were something like this for midi
13:28:10*PMunch joined #nim
13:29:47laaron> Error: unhandled exception: assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period [FieldError]
13:31:40narimiranlaaron: https://nim-lang.org/blog/2019/06/06/version-0200-released.html#installing-0200
13:32:32lqdev[m]clyybber: it supports mod and xm, I think it's close enough ;)
13:32:34disruptekjasper_: https://gist.github.com/disruptek/0576f449ec24801abc545a59ef513ab7 -- minimal reproducable example demonstrating two surprises.
13:33:14laaroni update use choosenim: $ choosenim update stable
13:34:44narimiranlaaron: see the note. `choosenim #v0.20.0`
13:36:27FromGitter<Vindaar> oops, I screwed up the order in which the arguments are given to the operators. `4 - 2` is not supposed to be `-2` :P Now it's correct
13:39:43lqdev[m]by the way
13:39:43lqdev[m]> `discard x` is now illegal when `x` is a function symbol.
13:39:44lqdev[m]what did this do anyways?
13:40:07lqdev[m]I never understood its purpose
13:42:18*laaron quit (Remote host closed the connection)
13:44:49*laaron joined #nim
13:46:24*laaron quit (Remote host closed the connection)
13:48:18*laaron joined #nim
13:48:57laaronseems i need reinstall something
13:49:58narimiranlaaron: before reinstalling, see if `rm ~/.choosenim/channels/stable` would do the trick
13:51:05laaronok, only keep choosenim, trying reinstall
13:55:05jkenif I have two procs by the same name, one with no parameters and one with a single string parameter (but with a default value), and I call `myProc()` how does nim decide which proc to call?
13:55:36jkenOr can I answer my own question by saying "default parameter values are useless when there is a proc that matches the signature of the caller"
14:00:08FromGitter<jrfondren> you can also answer your question with code: `def.nim(1, 37) Error: expression 'echo [s]' has no type (or is ambiguous)`
14:00:33laaronfine, nimble works after a fresh reinstall
14:00:37FromGitter<jrfondren> or rather, `def.nim(4, 4) Error: ambiguous call; both def.foo(s: string)[declared in def.nim(1, 5)] and def.foo()[declared in def.nim(2, 5)] match for: ()`
14:01:09Zevvjken: your answer should be in https://nim-lang.github.io/Nim/manual.html#overloading-resolution
14:01:35Araqlqdev[m]: consistency, 'f' is the first class function and you then discard this value
14:01:48jkenZevv, exactly what I was looking for. Thank you!
14:02:00FromGitter<jrfondren> @lqdev, it was a no-op, but if you saw it in code, someone probably got confused
14:02:27Zevvjken: but I don't see your exact case in the docs; if it is not there we should add it
14:06:49Araqbtw we have new rules: every commit should contain either [bugfix], [feature] or [refactoring]
14:07:08Araqso that we know what to backport to 0.20
14:07:54*laaron- joined #nim
14:08:27*laaron quit (Remote host closed the connection)
14:08:43ZevvAlso, is 'fixes #12345' enough? It would be helpful to have at least the title of the original issue in the commit, although it's a pain to look that up and put it in every time.
14:09:09ZevvBut better to do it once when commiting, then 20 people having to look it up afterwards, maybe?
14:09:39narimiranZevv: 'fixes #12345' has a mouse-over pop-up on github, as a first aid
14:09:57Araqwell I think 'fixes #123' without the [bugfix] means it's a fix not to be backported
14:10:04Araqnarimiran?
14:11:40narimiran'fixes #123' without any tag means that we forgot to tag it, and that means it is better to be safe than sorry - no (automatic) backport unless double checked first
14:12:13Zevvbut you will do the tagging at merge time, right? Not something individual contributors need to add
14:12:52narimiranboth, ideally
14:13:20alexander92guys i managed to
14:13:25alexander92break nim
14:13:31alexander92because i had a line with 130000 characters
14:13:35alexander92i am proud
14:13:43narimirancongrats on your success :P
14:14:51alexander92honestly i think it should produce some kind of meaningful error in newLineInfo in debug mode
14:15:07alexander92but i can see that this is a quite ridicilous scenario
14:15:43Zevvalexander92: how does it break? value out of range?
14:16:03Araqexcuse my little trolling but no, instead newLineInfo should return an Option[T] and then we use monad combinators everywhere to pass the error around
14:16:18alexander92newLineInfo converts col and line to (u?)int16
14:16:34Araqsee? you don't believe in this bullshit either... :P
14:17:02alexander92but i never said that, this is a great example for exception raising
14:17:09alexander92i am for a mixed system
14:17:35alexander92exceptional errors, exceptional people
14:18:05alexander92you should respect people with 130000 char lines Araq, the backbone of society
14:21:24AraqI do respect you.
14:21:57*NimBot joined #nim
14:22:28Araqbut the compiler respects your RAM moreso
14:24:07*PMunch quit (Remote host closed the connection)
14:25:00alexander92respect.js
14:25:25alexander92ok, can i parseStmt(staticRead()) them
14:31:26FromDiscord_<qiib> from strutils import parseInt
14:31:26FromDiscord_<qiib>
14:31:26FromDiscord_<qiib> let num = parseInt(readLine(stdin))
14:31:26FromDiscord_<qiib>
14:31:27FromDiscord_<qiib> if num < 10 and num > 0:
14:31:27FromDiscord_<qiib>
14:31:27FromDiscord_<qiib> case num
14:31:28FromDiscord_<qiib>
14:31:28FromDiscord_<qiib> of 1..5:
14:31:30FromDiscord_<qiib> echo "foo"
14:31:31FromDiscord_<qiib>
14:31:33FromDiscord_<qiib> of 6..8,9:
14:31:34FromDiscord_<qiib> echo "also foo"
14:31:38FromDiscord_<qiib> why doesn't this work
14:33:30*josii joined #nim
14:34:22FromDiscord_<qiib> it throws an error
14:35:28narimiran1st: use some pasting service, please
14:35:54narimiran2nd: try with `if num in 1..9`
14:37:06narimiran3rd: it would be easier for me to guess (since i cannot copy-paste this) if you posted also which error does it throw
14:37:15*leorize joined #nim
14:37:17FromDiscord_<qiib> https://pastebin.com/NZEuzkAG
14:38:08narimiranok, compiler cannot conclude that you're in 1..9 range, so you need `else: discard`
14:38:35ZevvWell, technically he's right. Why is nim not smart enough to deduce that the case can only be hit with num being in the range 1..9
14:38:39Zevv:)
14:39:49FromDiscord_<qiib> or you could make the else part mandatory
14:40:40narimiranit is not mandatory when there is limited number of options
14:41:11narimiranfurthermore, in the new nim version it is even an error if you have `else` when not needed
14:42:15narimiransee this: https://nim-lang.org/blog/2019/06/06/version-0200-released.html#better-error-message-for-case-statements
14:44:23FromDiscord_<qiib> then the compiler should also know the possible values inside the if block
14:44:50*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/bpTUaNxABPavaMuLcNFeoNQG >
14:45:17lqdev[m]that's strange, since ma_rb is declared in `miniaudio.h`
14:45:32leorizemaybe the definition is not being generated
14:45:41leorizeshashlick: ^
14:45:47lqdev[m]seems like that
14:46:09lqdev[m]reading the output `cDebug()` I can't see `ma_rb` anywhere
14:49:27lqdev[m]nimterop also doesn't report any errors
14:51:57leorizenimterop has a habit of skipping without errors
14:53:05Araqhttps://forum.nim-lang.org/t/4914 what's up with that 'X' module name?
14:54:43Araqqiib: a compiler is an implementation of a programming language, languages try to prescribe a precise set of rules, "just be as smart as human" is usually not among these rules
14:55:14lqdev[m]https://github.com/nim-lang/opengl/blob/master/src/opengl/private/prelude.nim#L5
14:55:16lqdev[m]X related stuff
14:56:22shashlickWhat does ma_rb look like
14:56:25narimiranAraq: change like this one is needed: https://github.com/yglukhov/nimx/commit/dcfca737458fab089e90d30a71e36c26d4ecaecd
14:56:40narimirani.e. case sensitivity
14:57:25*a_b_m joined #nim
14:57:33*floppydh joined #nim
14:57:42alexander92Araq, a=$b now is parsed as
14:57:48alexander92a `=$` b (infix)
14:57:51alexander92is this intended
14:58:32alexander92it was a = ($b) before
14:59:47Araqare you sure? I don't remember changing that
15:00:09leorize!eval var a=$"string"
15:00:11NimBotCompile failed: in.nim(1, 8) Error: ':' or '=' expected, but got 'string'
15:00:22leorize!eval echo NimVersion
15:00:26NimBot0.19.6
15:00:37FromDiscord_<qiib> araq: this{https://nim-lang.org/blog/2019/06/06/version-0200-released.html#better-error-message-for-case-statements} could be made true only when the case of is within a block
15:00:48*abm quit (Ping timeout: 248 seconds)
15:01:10leorize!eval var a = $"string"
15:01:13NimBot<no output>
15:01:15narimiranqlib lol no
15:01:23leorizealexander92: ^ seems to be like that since 0.19
15:01:33FromDiscord_<qiib> otherwise there is no need to enforce this case when the compiler is not sure of the possible value
15:01:39FromDiscord_<qiib> 😃
15:01:46*pyotr joined #nim
15:01:47*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/HVMfNuKXRkRKitrkQTOgiTJa >
15:01:48*theelous3_ joined #nim
15:02:06Zevv!eval c_memcpy(addr("0.20.0")[0], unsafeAddr(getNimVersion()[0], 6); echo NimVersion
15:02:08NimBotCompile failed: in.nim(1, 63) Error: expected: ')', but got: ';'
15:02:08narimiranqlib so you're claiming that `case` is useless :D :D
15:02:17leorizeshashlick: look at lqdev[m] message
15:02:56shashlickWhat does ma_bool32 ownsBuffer : 1; mean
15:03:06sealmoveoh, docs are updated with `owned`, nice
15:03:08shashlickThe : 1
15:03:13lqdev[m]it's a bitfield
15:03:17shashlickI don't think nimterop understands that
15:03:46lqdev[m]that means the bool only takes 1 bit
15:03:57lqdev[m]instead of 8
15:04:02lqdev[m]it should be compiled to the {.bitfield.} pragma
15:04:37lqdev[m]{.bitsize.}*
15:04:54lqdev[m]https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-bitsize-pragma
15:05:08pyotrHello there, nim comunity!!
15:05:20pyotrNewcomer here!
15:05:39lqdev[m]hello!
15:05:48jkenwelcoem!
15:06:25shashlickOk what's the equivalent Nim for it?
15:06:26pyotrCan you give me some advice?
15:06:46narimiranpyotr: that's why we're here ;)
15:07:18lqdev[m]`ownsBuffer {.bitsize: 1.}: ma_bool32`
15:07:53pyotrI use neovim what is the best plugin or plugins to code nim in neovim?
15:08:16narimiranpyotr: ah, that one is easy :) https://github.com/narimiran/opengl
15:08:19narimiranoops
15:08:26shashlickOk let me take a look, hopefully tree-sitter should recognize it
15:08:31narimiranold paste :D here's a correct link: https://github.com/alaviss/nim.nvim
15:09:32*narimiran should really start checking what he's pasting :)
15:10:10*alexander92 quit (Ping timeout: 258 seconds)
15:10:26narimiranbtw, leorize, why is nim >= 0.20 a requirement? plugin doesn't work on 0.19.x branch of code?
15:10:29FromGitter<Vindaar> @qiib: if for some reason you really don't want that else branch, you can just put that number into a range: http://ix.io/1L91/nim
15:11:10leorizenarimiran: yea, the new nimsuggest addition was only available on devel
15:11:20*I_Right_I joined #nim
15:11:24narimiran@Vindaar introducing one line, to save another :D
15:11:39FromGitter<Vindaar> yes, in this case it's stupid, but who knows what he plans to do :P
15:11:48sealmovecongrats on v20.0!! \o/
15:11:51narimiran@Vindaar but you're too late, he now wants to ban `case` altogether :P :D
15:12:00leorizesealmove: not there yet :p
15:14:54Araqwe use 'case' 895x in the compiler
15:15:06Araqdoesn't seem useless to me.
15:15:20narimirannot good enough reason, throw it away!
15:15:48narimiranif it doesn't work in this example inside of `if` branch, it is completely useless
15:16:05Araqthe lack of 'case' in Python was a big reason why I originally wrote the compiler in Pascal and not in Python
15:17:11*alexander92 joined #nim
15:17:40leorizeif you didn't wrote the compiler in pascal I wouldn't know the existance of Nim
15:17:56Araqit was also a reason not to write it in C++ ... (switch/case/break? fuck you)
15:18:29alexander923AAraq i am sure yeah
15:18:40alexander92dumpTree shows that at least
15:18:48alexander92but not sure if it changed after 0.19
15:19:06alexander92but at least some previous patched version of nim i have shows =$ in a different way :D
15:19:48alexander92but on the other hand =@[] is `=@` .. from a long time
15:23:04FromDiscord_<qiib> Hold on i didn't mean remove "case" but remove the "Better error message for case-statements" when the "case" is in "if " or any other block
15:23:30FromDiscord_<qiib> Better error message for case-statements:https://nim-lang.org/blog/2019/06/06/version-0200-released.html#better-error-message-for-case-statements
15:23:32Araqqiib: it's fine, don't worry
15:23:35*couven92 quit (Quit: Client disconnecting)
15:23:55*i7sDream joined #nim
15:24:43*josii quit (Quit: Page closed)
15:25:04shashlick@lqdev - can you share your wrapper so i can test easier
15:32:38alexander92Araq, and also is it possible for system to recognize to not include jssys in vm.nim
15:32:44alexander92when nimVM* not vm.nim
15:33:47Araqsure, somehow, 'when not defined(nimscript): include jssys'
15:35:33*a_b_m quit (Quit: Leaving)
15:36:35alexander92my problem is that sometimes on macro time nim tries to invoke jssys javascript code
15:36:57alexander92so if this happens, in nimscript mode, would nim load the correct equivalents of cmp and other
15:40:57*pyotr quit (Quit: pyotr)
15:51:55*alexander92 quit (Ping timeout: 248 seconds)
16:04:37*jjido quit (Quit: Connection closed for inactivity)
16:06:39sealmoveIt's weird that python doesn't have `case` but has `while ... else`.
16:07:38clyybberAraq: When we do `=move`(x, y)` and y has some nkHiddenSubConv or something like that, should we try to elide the destructor for y?
16:07:57clyybberAs in elide the destructor in isAnalysableFieldAccess branches?
16:14:12*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/GVorHhhqwUFRuMZyhkuSQgVX >
16:16:10shashlickcool thanks
16:16:24lqdev[m]sorry it took me so long btw, I was afk
16:16:31shashlicknp
16:19:57FromGitter<jrfondren> nim's updated now on homebrew. Only a day behind crystal
16:23:23*al_ quit (Quit: al_)
16:24:28*couven92 joined #nim
16:24:29*laaron- quit (Remote host closed the connection)
16:27:54*laaron joined #nim
16:30:35*abm joined #nim
16:33:37*Vladar quit (Remote host closed the connection)
16:48:35*clyybber quit (Quit: WeeChat 2.4)
17:05:14FromGitter<xmonader> is there `unquote` for macros in nim?
17:06:22FromGitter<xmonader> e.g ⏎ ⏎ ```result = quote do: ⏎ type unquote(enumName) = enum unquote(enumValsString) ``` [https://gitter.im/nim-lang/Nim?at=5cfa998e65392c3b60d797cb]
17:06:25narimiranPSA: nim 0.20.0 has hit manjaro unstable - so soon it will be in manjaro testing, and after that manjaro stable
17:08:25sealmovexmonader: unquote?
17:11:29FromGitter<xmonader> @sealmove unquote evaluates code within the macro unlike the quote that stops evaluation ⏎ lisp ex: ⏎ ⏎ ```> `(0 1 2) ⏎ '(0 1 2) ⏎ ⏎ > `(1 ,(+ 1 2) 4) ⏎ '(1 3 4)``` [https://gitter.im/nim-lang/Nim?at=5cfa9ac1e41fe15e752b9ea7]
17:13:29*leorize quit (Ping timeout: 256 seconds)
17:14:21sealmovexmonader: sorry I don't understand lisp. but maybe you just want what you passed in the macro as a string?
17:14:39sealmovein that case `$` works
17:14:46sealmoveor repr()
17:16:12FromGitter<xmonader> hmm I'm trying to do something like ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ without using ast classes manually [https://gitter.im/nim-lang/Nim?at=5cfa9bdbfaac643934582f37]
17:17:54sealmoveok I see, there is proc for that
17:18:01sealmoveforgot name w8
17:20:09sealmoveparseExpr() and parseStmt should do
17:20:37sealmoveyou construct your code as string and pass it to these procs and they give you the ast
17:20:43FromGitter<Vindaar> I'm either confused or this is precisely what the `quote` proc is all about: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cfa9cebf3a60a79a46ea37d]
17:20:54*floppydh quit (Quit: WeeChat 2.4)
17:22:48*laaron quit (Remote host closed the connection)
17:23:36FromGitter<xmonader> parseExpr didn't evaluate within quoted value @sealmove
17:23:52FromGitter<xmonader> @Vindaar that worked so backtick unquotes ?
17:24:03FromGitter<Vindaar> yes, exactly
17:25:14FromGitter<xmonader> but adding this line ⏎ ⏎ ``` echo `1+2```` ⏎ ⏎ didn't work add `echo 3` [https://gitter.im/nim-lang/Nim?at=5cfa9dfa82c2dc79a56995f6]
17:26:30FromGitter<Vindaar> oh yes, that doesn't work unfortunately
17:26:49FromGitter<Vindaar> the argument to the stuff in ` ` ` must be a `NimNode` already
17:27:32FromGitter<Vindaar> so you have to work around it like e.g.: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cfa9e846f530d3b6153368a]
17:27:40*laaron joined #nim
17:27:50FromGitter<xmonader> I see thanks a lot :)
17:27:55FromGitter<jrfondren> https://nimses.com/en/ <- a lot of talk about "nim" here, but not the programming language.
17:31:28sealmovexmonader my bad, I had seen the operator but have never used it so it slipped mind
17:32:54FromGitter<xmonader> no problem at all many thanks @sealmove
17:34:37sealmovebtw how does one open a file of unknown size?
17:34:49FromGitter<jrfondren> same way one opens a file of known size
17:34:57FromGitter<jrfondren> why do you think that matters?
17:35:45FromGitter<Vindaar> although just to clarify: in the example there, you can also just write the `1 + 2` directly in the latter `quote do` branch: ⏎ ⏎ ``` result = quote do: ⏎ echo 1 + 2``` ⏎ ⏎ so the thing to keep in mind is that in either of the two ways, the actual evaluation is *not* done at compile time here [https://gitter.im/nim-lang/Nim?at=5cfaa070481ef4167be8702a]
17:35:46sealmovesorry not open file, I mean read a file
17:36:02sealmovecurrent I do this: https://termbin.com/3b33
17:36:23sealmoveBut wonder if there is a better way that let's the OS handle the buffer size. And if not, what's a good buffer size?
17:36:26FromGitter<xmonader> @sealmove read with a stream
17:36:44sealmoveyeah I tried stream but it only has a readAll that returns a string
17:36:52sealmoveI want seq[bytes]
17:37:04sealmoveshould I do readAll and then cast to seq of byteS?
17:37:23sealmoveseq[byte] *
17:38:45FromGitter<jrfondren> the size in readBuffer isn't the size of the file. it's the size of the buffer. Just keep reading
17:38:50FromGitter<xmonader> @sealmove https://nim-lang.org/docs/streams.html#readData%2CStream%2Cpointer%2Cint doesn't work for you
17:42:11sealmovehmm, I guess casting readAll() does the trick.
17:42:45sealmoveoh lol
17:43:09sealmovereadAll impl is same as the code I just pasted
17:43:14sealmovehttps://github.com/nim-lang/Nim/blob/master/lib/pure/streams.nim#L240
17:44:00*leorize joined #nim
17:45:09sealmoveSo I guess my question is, what is a good buffer size? I see readAll() uses 1024.
17:45:52FromGitter<jrfondren> a small multiple of 1024 is fine. it mostly doesn't matter, but it can matter a great deal on some platforms (like ceph). The smaller your buffer the more syscalls and syscalls are expensive.
17:48:28*nsf quit (Quit: WeeChat 2.4)
18:01:25*a_b_m joined #nim
18:05:20*abm quit (Ping timeout: 248 seconds)
18:06:48*laaron quit (Remote host closed the connection)
18:09:15*laaron joined #nim
18:10:35Araqclybber: huh? nkHiddenSubConv is movable too
18:13:22shashlickis bitsize pragma only for fields or any type
18:14:23Araqonly for fields, we map it to C's mechanism which has the same restriction
18:14:46shashlickokay thanks
18:15:07shashlickdoes the bitsize in C have to be a number or can it be a variable?
18:15:32Araqa number
18:16:07shashlickcool
18:16:40Zevvvariable would be cooler
18:17:07Zevvvarsize bitfields, wohoo
18:20:24shashlickCould be a const - #define equivalent so compile time
18:23:47*PrimHelios quit (Ping timeout: 252 seconds)
18:25:13*PrimHelios joined #nim
18:27:30dom96Nice, already more users using choosenim today than through all of yesterday
18:28:09*Jesin quit (Quit: Leaving)
18:30:52*tiorock joined #nim
18:31:06*tiorock quit (Changing host)
18:31:06*tiorock joined #nim
18:31:06*rockcavera is now known as Guest59733
18:31:06*Guest59733 quit (Killed (card.freenode.net (Nickname regained by services)))
18:31:06*tiorock is now known as rockcavera
18:39:02*Jesin joined #nim
18:47:45*kuon joined #nim
18:48:58kuonhello. I'd like to test nim in a js app that is currently built with webpack. I'd like to try to code some parts with nim. I couldn't find a lot of resources on how adapted nim is to be integrated into a larger app.
18:49:22kuonI found https://github.com/bmollot/nim-loader but I am more interested about the bigger picture (source map, how tooling scale...).
18:51:08dom96@alehander42 should have some tips here
18:53:44Araqkuon: I don't know the JS toolsets but Nim literally generates a single .js file that you can embed/use like any other in your system. Watch out to mark your procs as .exportc
18:54:45FromGitter<alehander42> Source maps almost worked
18:54:55FromGitter<alehander42> But in a bit more hacky way
18:55:06FromGitter<alehander42> And I wanted to rewrite the whole js backend
18:55:16FromGitter<alehander42> But I never finished the rewrite
18:55:40FromGitter<alehander42> So I can add the simpler sourcemap eventually
18:56:34kuonSo at present it is usable, but with no or little tooling?
18:57:02kuonI mean source map, incremental compilation, automatic recompilation, tree shaking...
18:58:04FromGitter<alehander42> So I think hot come reloading could work for js
18:58:38FromGitter<alehander42> Tree shaking is true for nim code anyway I thin
18:58:46disruptekhot what?
18:58:58FromGitter<alehander42> Hot code reloading
18:59:01FromGitter<alehander42> Sorry
19:00:53Araqwe have a different mechanism to produce stack traces that refer to the Nim source files, it predates sourcemaps
19:01:20Araqwe do dead code elimination (what's tree shaking?)
19:01:50Araqwe compile big JS system in under a second so there is no need to "incremental" build stuff.
19:02:09Araqmuch of what you're used to doesn't apply, give Nim a try.
19:02:19kuonAraq, it's the reverse of dead code elimination, it's like live code inclusion.
19:03:10kuonAraq, well, yeah, incremental might not be needed, right now my JS app takes 3 minutes to compile (I hate JS tooling).
19:04:02kuontree shaking is a term google introduced with closure script I think
19:04:33*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
19:04:55*laaron joined #nim
19:07:55Araqthere is no difference between dead code elimination and live code inclusion, it's not the "reverse"
19:09:01kuonwell yeah, it's kinda "marketing" name :P
19:09:21FromGitter<alehander42> Yes tree shaking is the same afaik
19:10:14FromGitter<alehander42> But yeah compilation is faster
19:10:18FromGitter<alehander42> Than typescript
19:10:42kuonDo you have experience with this webpack nim-loader?
19:10:43FromGitter<alehander42> I never had speed problems with js compilation with a computer in release mode
19:10:57FromGitter<jrfondren> nah tree shaking predates google, in the Lisp community.
19:11:28FromGitter<alehander42> Not really I use nim for front-end in electron and browser apps
19:11:40FromGitter<alehander42> But I haven't used webpaxk
19:12:13FromGitter<jrfondren> the term makes sense for Lisp because any "dead code" could still be used at runtime, in normal code. So you have a special mode of compilation, when you actually want to produce an application that isn't 80 TB in size.
19:14:02kuonI'd like to try nim to code a widget in a bigger app, and that app uses webpack. I'd like to integrate it with as little disturbance to the current app as possible.
19:15:00kuonjrfondren Ok, I have to admit I never wrote any lisp.
19:15:53FromGitter<jrfondren> that's not as shocking a confession as you might think :) I only mention it because someone credited Google with something.
19:17:16disruptekanyone have a source of documentation for .locks.?
19:17:37FromGitter<jrfondren> I've only seen what's in the manual. that seemed OK
19:17:38leorizeit's in manual_experimental I think
19:17:45disruptekdanke.
19:18:39FromGitter<alehander42> Kuon what does webpaxk need to load a component
19:19:15FromGitter<alehander42> You can try the lib from github
19:19:28FromGitter<alehander42> And say if it.lacks
19:19:35FromGitter<alehander42> Something
19:19:45disrupteki had no problem generating js and webpack'ing it.
19:19:46kuonjrfondren I can't find the talk I am referring to, but I remember the google guy said something like "we create a new technique we call tree shaking for the closure compiler, and now we apply it the dart compiler"
19:21:01kuonalehander42 yes, I am going to try that lib, I just wanted to discuss a bit about it, if you have experiences or things I should know beforehand. I see what I can do, and if I have the time I'll write a blog post describing the process.
19:21:33disruptekit works identically to the packing of any other js file.
19:21:47kuonjrfondren but it was like 5-7 years ago, I don't remember well, might be my memory. Anyway, it is not really important :)
19:22:26kuondisruptek, yeah, I guess it should work, maybe I am just over thinking it.
19:23:04*Vladar joined #nim
19:25:17leorizenarimiran: alright, so how would you like to split our current CI into?
19:26:30narimiranleorize: to optimize it to make it as fast as possible. we have 4x travis, 10x azure, 1x appveyor, right?
19:27:01leorizeyea
19:27:12leorizewell if needed circleci can also be tossed into the mix
19:27:18*laaron quit (Remote host closed the connection)
19:27:20leorizecircleci got 4x like travis
19:28:15narimiranok, and we have currently 6 different tests (4 by travis and 2 by appveyor)
19:29:10*laaron joined #nim
19:31:29leorizecircleci can do linux jobs at an extraordinary speed
19:31:43leorizeso we might as well just move linux jobs there :p
19:32:07narimiranleorize: did you already setup it and tested it or do you base that on some specifications?
19:32:19sealmovejust to clarify.. what's the relation between newruntime and nim v0.20?
19:35:40sealmoveI am a little confused since 0.20 is candidate for 1.0 but the blog post about 0.20 release doesn't even mention the new runtime.
19:37:06leorizesealmove: check the forum
19:42:53*laaron quit (Remote host closed the connection)
19:45:22*laaron joined #nim
19:47:23*Vladar quit (Read error: Connection reset by peer)
19:53:25*luis_ joined #nim
19:53:53shashlickokay interested in the CI discussion
19:57:04narimiranleorize, shashlick: you two continue the CI discussion, it is getting too late for me....
19:57:33shashlickokay take care
19:57:45shashlickokay am testing build on my 32core machine
19:57:54shashlick18 seconds to build csources with make -j 32
19:58:48leorize4 more cores and it'd just took 3s :) (tested with circleci)
19:59:13federico3leorize: circleci is indeed faster, I've been saying it for a while
19:59:28shashlick51 seconds to koch boot
19:59:49leorizeI like how they said they're only letting you use 4 cores but nproc still said 36
20:00:21federico3leorize: that does not mean you are using them
20:00:27shashlick44 seconds to koch tools
20:01:24leorizefederico3: make -j 36 gives much different results than make -j 4 :)
20:01:48federico3leorize: and with 12, 20, 24?
20:02:29leorizehaven't tried :p but at least with other CI it doesn't scale further than nproc
20:03:46federico3distributed Nim builds would make a cute little project
20:09:56*a_b_m quit (Ping timeout: 258 seconds)
20:19:08*luis_ quit (Ping timeout: 244 seconds)
20:22:51shashlickwhy do I get this - https://pastebin.com/b8J6bEyT
20:22:59shashlickon rhel
20:24:16Araqwrong stdlib setup?
20:24:39shashlicki just cloned devel and tried
20:24:43shashlickkoch test
20:31:22shashlicknever mind, two nims, wrong one in path
20:31:38shashlickjust want to test how fast this machine can run koch test
20:32:04*a_b_m joined #nim
20:36:42shashlickokay ran really fast but forgot to time
20:36:55shashlickhow to get testament to run multiple tests in parallel
20:37:01shashlickgc tests seem to run in sequence
20:38:19shashlicki have 32 cores but still doesn't seem to run too many processes
20:39:22shashlickdo categories run in parallel but each category runs tests in sequence?
20:41:02shashlickso koch tests ran in 3 mins 24 seconds
20:47:13*narimiran quit (Remote host closed the connection)
20:52:55*luis_ joined #nim
21:07:13*luis_ quit (Ping timeout: 246 seconds)
21:17:39Araq'tester all' runs in parallel
21:19:30*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
21:23:33*laaron joined #nim
21:26:59*lritter quit (Ping timeout: 258 seconds)
21:31:17*natrys quit (Quit: natrys)
21:35:55*envoyt quit (Ping timeout: 246 seconds)
21:43:01*stefanos82 quit (Quit: Quitting for now...)
21:51:39*luis_ joined #nim
21:57:12*luis_ quit (Quit: luis_)
21:57:46*luis_ joined #nim
22:00:39deechWhat does the ';' do in function arguments?
22:08:51FromGitter<kaushalmodi> it breaks the flow of types
22:10:20FromGitter<kaushalmodi> https://nim-lang.github.io/Nim/manual#procedures
22:10:37FromGitter<kaushalmodi> > The type applies to all parameters immediately before it, until either the beginning of the parameter list, a semicolon separator or an already typed parameter, is reached.
22:11:25FromGitter<kaushalmodi> I use it mainly give a visual distinction that "hey, now the type is changing"
22:12:52deechGot it, thanks!
22:14:02deechAnd what does '`' in 'proc `name rec`(...) ...' do? I guess the ` designates an infix function but I didn't know spaces were allowed.
22:15:30deechHoly cow, I guess they are allowed, this is a few lines below: `name rec`(...).
22:16:47*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
22:17:32Araqno, it's a primitive form of token concatenation
22:17:46Araqcomparable to C's preprocessor ## operator
22:18:43*laaron joined #nim
22:19:55shashlickxz has a `-T 0` flag which will run it multi-threaded, runs much faster
22:20:01shashlickshould make that change in niminst
22:20:10shashlickalso, nim doc could do with some parallelization as well
22:20:19deechApparently 'proc `1`() = discard' is legal.
22:20:21Araqkoch docs runs in parallel
22:22:21shashlickI meant koch csources
22:28:51*luis_ quit (Read error: Connection reset by peer)
22:38:09Araqhmm what's this https://github.com/nim-lang/Nim/pull/11417 ? bugfix? feature? something else?
22:38:49shashlick@leorize what's your plan for circleci and azure
22:42:37*a_b_m quit (Ping timeout: 268 seconds)
22:57:32*a_b_m joined #nim
23:05:27*a_chou joined #nim
23:05:47*a_chou quit (Client Quit)
23:05:52*couven92 quit (Quit: Client Disconnecting)
23:11:14*I_Right_I quit (Remote host closed the connection)
23:14:39shashlickhave requested http://travis-ci.org to enable debug mode for our projects and perhaps increase the number of parallel jobs and time limit
23:14:40shashlicklet's see
23:18:31*luis_ joined #nim
23:18:51*a_b_m quit (Quit: Leaving)
23:24:00*kuon quit (Remote host closed the connection)
23:36:23*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
23:37:25deechAraq, (or any other compiler devs) I'm going to need some help if you're up for it. I'd like to disallow case 1 but allow case 2, so the rule is to require an assignment to 'const' to access a compile time variable at runtime but allow passing time to 'static' function arugments. https://pastebin.com/ttRWmxCq
23:38:43*envoyt joined #nim
23:39:01deechThere's a few places in the compiler that seem like good places to enforce this behavior but I can't tell where is best, 'semProcTypeNode' seems promising but I need some guidance.
23:41:17deechs/time/them/
23:43:44FromGitter<Gooseus> anyone here using spacemacs by chance?
23:48:05FromGitter<kaushalmodi> `s/spac//`
23:48:25*krux02_ joined #nim
23:50:51*krux02 quit (Ping timeout: 248 seconds)
23:52:22FromGitter<Gooseus> my path has been roughly vim > sublimetext in VIntage mode > spacemacs in vi mode - with the last transition being pretty recent, everything has been pretty smooth so far, but the nim layer seems to be hanging everything
23:52:27*deech quit (Ping timeout: 248 seconds)
23:54:50FromGitter<kaushalmodi> Disable nimsuggest
23:55:45FromGitter<kaushalmodi> Look up the defcustom to disable the nimsuggest-mode.