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:32 | deech | The compileTime pragma needs to be fired into the sun. |
01:44:20 | deech | Currently 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:15 | FromGitter | <kaushalmodi> @GULPF Adding `timezones` adds about 2.5MB to my binary even in release mode |
02:50:39 | FromGitter | <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:13 | FromGitter | <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:32 | FromGitter | <kaushalmodi> The said snippet: http://ix.io/1L6u/nim |
02:56:13 | FromDiscord_ | <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:51 | leorize[m] | yes, if you have 64bit gcc around |
03:03:11 | * | laaron joined #nim |
03:04:12 | FromDiscord_ | <citycide> oh so it doesn't install 64-bit c compiler |
03:07:31 | shashlick | nope, right now it only installs 64-bit if gcc is detected and is 64-bit |
03:08:05 | shashlick | we 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:23 | FromDiscord_ | <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:56 | FromGitter | <Kvothe87> Hello everyone |
04:11:07 | * | theelous3_ quit (Ping timeout: 248 seconds) |
04:11:23 | FromGitter | <Kvothe87> Congrats for the new important release |
04:13:20 | FromGitter | <Kvothe87> about nimpretty: is it ready and available? |
04:13:39 | leorize | it's available as part of the standard installation now |
04:14:01 | FromGitter | <Kvothe87> I looked around but could not find some minimal documnetation |
04:14:17 | leorize | nimpretty --help is the documentation for now :p |
04:15:00 | FromGitter | <Kvothe87> i was expecting to find something here |
04:15:20 | FromGitter | <Kvothe87> https://nim-lang.org/docs/tools.html |
04:15:59 | leorize | narimiran: we'll need online doc for nimpretty |
04:16:21 | FromGitter | <Kvothe87> even without extended doc a bullet in the tools section would be good enough |
04:16:45 | leorize | well nimpretty is still alpha atm |
04:17:02 | FromGitter | <Kvothe87> yesterday i used for the first time nim doc and it was awesome |
04:17:16 | leorize | I don't think there are many people using nimpretty yet, but I've seen several bugs being ironed out |
04:17:29 | FromGitter | <Kvothe87> just to be curious, how much alpha? |
04:17:39 | FromGitter | <Kvothe87> ok i will wait for the moment |
04:17:59 | leorize | you can help by using nimpretty and report for bugs :) |
04:18:26 | leorize | also nim got a new --styleCheck:warning flag |
04:18:35 | leorize | but Araq forgot to mention it :p |
04:19:12 | FromGitter | <Kvothe87> i tried nimpretty --help from vscode |
04:19:31 | FromGitter | <Kvothe87> but it does not recognize the command |
04:19:38 | FromGitter | <Kvothe87> i installed nim with choosenim |
04:20:12 | leorize | dom96: did you forget to release the new choosenim? |
04:20:50 | leorize | @Kvothe87: the code for installing nimpretty is only in the latest commit of choosenim... |
04:21:09 | leorize | you can install it like this I believe: nimble install 'choosenim@#head' |
04:22:15 | leorize | wait, choosenim 0.4.0 should have got the nimpretty installation code |
04:22:26 | leorize | @Kvothe87: are you using the latest choosenim? |
04:24:20 | FromGitter | <Kvothe87> just checked, stuck on 0.3.2 |
04:24:42 | leorize | you got to update to 0.4.0 :p |
04:25:02 | leorize | https://github.com/dom96/choosenim/releases |
04:25:06 | leorize | ^ can be downloaded there |
04:25:38 | FromGitter | <Kvothe87> i tried choosenim update self |
04:25:53 | FromGitter | <Kvothe87> but it gets 404 not found |
04:26:50 | leorize | it's a known bug https://github.com/dom96/choosenim/issues/116 |
04:29:46 | FromGitter | <Kvothe87> no deal. Tried to download the exe file for windows, but double click gives an error |
04:30:14 | leorize | sounds like a bug |
04:30:18 | leorize | what did you get? |
04:31:21 | FromGitter | <Kvothe87> something like "parameter not correct" translated from local language |
04:32:47 | FromGitter | <Kvothe87> can i ask you a couple of extra simple questions? |
04:33:02 | leorize | sure :) that's what this irc channel is for |
04:33:16 | FromDiscord_ | <citycide> if you're talking about the choosenim 0.4.0 binary for windows, that's not an installer |
04:33:43 | FromGitter | <Kvothe87> in the page generate by doc |
04:34:18 | FromGitter | <Kvothe87> there are the search and group by element |
04:34:36 | * | dddddd quit (Remote host closed the connection) |
04:35:38 | FromGitter | <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:15 | FromDiscord_ | <citycide> there's a file called `dochack.js` that's missing when you generate docs, afaik that was never fixed |
04:36:21 | FromGitter | <Kvothe87> @FromIRC citycide that explains a lot |
04:36:34 | FromGitter | <kdheepak> Congrats on the v0.20.0 / v1.0.0rc release! |
04:36:40 | leorize | search requires idx files |
04:36:54 | leorize | it's only generated on demand |
04:37:23 | FromDiscord_ | <citycide> leorize: is that documented anywhere? and imo the search box shouldn't even be there if it won't work |
04:37:52 | FromGitter | <Kvothe87> that would be a good behaviour |
04:38:47 | leorize | it's in nim fullhelp |
04:38:51 | leorize | --index:on|off |
04:39:35 | leorize | but searching would requires the dochack.nim to be installed for it to be generated |
04:40:01 | leorize | I think an issue should be filed on github for this |
04:40:53 | FromDiscord_ | <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:35 | FromDiscord_ | <citycide> maybe it's this one https://github.com/nim-lang/Nim/issues/8952 |
04:56:10 | FromGitter | <Kvothe87> updated choosenim |
04:56:31 | FromGitter | <Kvothe87> update nim stable |
04:56:48 | FromGitter | <Kvothe87> when i run nimpretty now i get a different error |
04:57:16 | FromGitter | <Kvothe87> requested executable is missing |
04:57:23 | FromGitter | <Kvothe87> and in fact it is not there |
04:58:00 | leorize | now that's weird, tried to restart your cmd? |
05:00:09 | FromGitter | <Kvothe87> i did, and nothing changed, the file is not in the supposed folder. So i don't expect any improvements |
05:01:30 | leorize[m] | that's weird, maybe @citycide or dom96 can help, since I don't use windows myself |
05:03:46 | FromDiscord_ | <citycide> what's missing exactly? |
05:06:42 | FromGitter | <Kvothe87> nimpretty.exe |
05:07:37 | FromGitter | <Kvothe87> i give up for now, it was just an extra and i don't need it |
05:08:01 | FromDiscord_ | <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:36 | FromDiscord_ | <citycide> @Kvothe87 you may want to open an issue because it seems like it should be included but I'm not sure |
05:12:09 | FromGitter | <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:48 | FromGitter | <Kvothe87> nothing fancy, it is just for personal culture |
05:13:46 | FromGitter | <Kvothe87> I'm slowly following exercism track but, this is outside the track |
05:14:10 | FromDiscord_ | <citycide> @Kvothe87 try making a post on the nim forum, I'm sure you'd get some feedback there |
05:14:13 | FromDiscord_ | <citycide> https://forum.nim-lang.org/ |
05:22:15 | jasper_ | 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:45 | jasper_ | 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:24 | FromGitter | <Kvothe87> @jasper just did. Scarce information but i hope is enough. I believe it is only missing the file. |
05:30:19 | jasper_ | 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:58 | FromDiscord_ | <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:45 | Araq | no, 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:25 | FromDiscord_ | <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:10 | FromDiscord_ | <Stuffe> It was easy though, although how come choosenim doesn't automatically add to the $PATH? |
06:28:52 | Araq | I don't know, missing feature probably. We only know how to set the PATH on Windows :P |
06:29:30 | leorize | *nix with their many shells aren't the best place for PATH manipulation |
06:31:01 | Araq | on OSX you can edit /etc/bananajoe/PATH to do it |
06:31:35 | leorize | that'd requires root |
06:32:52 | Araq | well there is also /home/user/etc/bananajoe/PATH for the current user |
06:40:35 | * | jasper_ quit (Ping timeout: 256 seconds) |
06:43:21 | FromDiscord_ | <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:54 | Araq | thanks! |
07:41:21 | * | couven92 joined #nim |
07:46:36 | Zevv | what's "leanCompiler"? |
07:47:31 | FromDiscord_ | <niv> hello. is there a way to promote deprecation warnings to complilation errors? |
07:50:17 | leorize | Zevv: 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:40 | Zevv | yeah, "sans several" is what I figured :) |
07:51:08 | Zevv | ah it's support stuff like doc building etc |
07:51:20 | leorize | @niv: I don't think we have a -Werror equivalent |
07:51:36 | * | laaron joined #nim |
07:51:47 | leorize | but since all of them share the [Deprecated] tag, you could just pipe nim's output to grep |
07:53:34 | FromDiscord_ | <niv> ta |
07:55:22 | * | laaron quit (Remote host closed the connection) |
07:55:57 | * | leorize quit (Remote host closed the connection) |
07:57:28 | PMunch | I keep forgetting that Python don't have UFC syntax: http://ix.io/1L7s |
07:57:41 | narimiran | :) |
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:17 | dom96 | leorize[m], just so you know, you can update choosenim via `choosenim update self` :) |
08:49:40 | leorize[m] | dom96: don't forget choosenim#116 :P |
08:50:22 | * | leorize joined #nim |
08:52:27 | dom96 | oh yeah :/ |
08:55:20 | * | chemist69 quit (Ping timeout: 258 seconds) |
09:01:23 | * | abm joined #nim |
09:02:30 | FromGitter | <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:05 | leorize | !eval echo NimVersion |
09:12:08 | NimBot | 0.19.6 |
09:13:32 | Zevv | !eval NimVersion = "0.20.0" |
09:13:34 | NimBot | Compile failed: in.nim(1, 1) Error: 'NimVersion' cannot be assigned to |
09:13:39 | Zevv | :/ |
09:28:41 | narimiran | Zevv: = != == |
09:30:27 | leorize | !eval discard execShellCmd "curl https://nim-lang.org/choosenim/init.sh -sSf | sh" |
09:30:30 | NimBot | Compile failed: in.nim(1, 9) Error: undeclared identifier: 'execShellCmd' |
09:30:37 | leorize | !eval import os; discard execShellCmd "curl https://nim-lang.org/choosenim/init.sh -sSf | sh" |
09:30:37 | Zevv | narimiran: yeah, sure. I was just trying to do a poor mans upgrade |
09:30:41 | NimBot | <no output> |
09:30:45 | * | jjido quit (Quit: Connection closed for inactivity) |
09:30:56 | leorize | :p guess I can't cheat |
09:35:56 | PMunch | Hmm, is there a library for doing interactive REPL style things in Nim? |
09:36:11 | PMunch | With support for up/down/left/right navigation |
09:36:40 | clyybber | !eval import os; echo execShellCmd "curl https://nim-lang.org/chosenim/init.sh -sSf | sh" |
09:36:44 | NimBot | 0 |
09:37:09 | leorize[m] | rdstdin? |
09:37:11 | leorize[m] | but I think you should use a line editing library |
09:37:18 | leorize | PMunch: ^ |
09:37:21 | leorize | matrix lag :p |
09:37:52 | leorize | !eval discard execShellCmd "ls /nim" |
09:37:54 | NimBot | Compile failed: in.nim(1, 9) Error: undeclared identifier: 'execShellCmd' |
09:38:00 | leorize | !eval import os; discard execShellCmd "ls /nim" |
09:38:04 | NimBot | bin↵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:18 | PMunch | leorize, why is that? |
09:39:12 | leorize | PMunch: rdstdin is not in the stdlib roster |
09:39:27 | leorize | it uses linenoise for backend anw, so you might get more features by using those directly |
09:39:33 | PMunch | Hmm |
09:39:38 | PMunch | But it's cross platform.. |
09:40:06 | leorize | pretty sure the other libs is cross-platform too |
09:42:38 | PMunch | Hmm, maybe |
09:42:54 | PMunch | Hmm, with rdstdin I have to hit enter once first to get it going.. |
09:43:34 | leorize | PMunch: 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:56 | ehmry | is there a way to assert --multimethods:on at compile time? |
10:13:28 | leorize | when not compileOptions("multimethods"): {.error: "Must be compiled with --multimethods:on" .} |
10:14:27 | leorize | alternatively, you could just add --multimethods:on to your project configuration file |
10:15:55 | leorize | it should be compileOption |
10:16:03 | leorize | without the `s` :p |
10:17:58 | ehmry | leorize: 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:52 | FromGitter | <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:42 | FromGitter | <GULPF> I responded in the forum thread a bit earlier |
11:57:15 | FromGitter | <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:57 | FromGitter | <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:54 | FromGitter | <kaushalmodi> @GULPF I missed that response (Nim forum needs a notification system). I see, I understand your design decision. |
11:59:51 | lqdev[m] | bobeff: it only disables checks, so you can use it without `-d:release` |
11:59:53 | lqdev[m] | also afaik `-d:debug` is not a thing |
12:00:43 | FromGitter | <bobeff> @liquid600pgm 10x |
12:08:22 | def- | 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:56 | narimiran | lqdev[m], @bobeff: d:danger implies d:release AFAIK |
12:16:16 | narimiran | but --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:03 | alexander92 | hey so |
12:19:25 | alexander92 | i updated to 0.20 and i got some random "strVal field error" |
12:19:27 | alexander92 | errors |
12:19:33 | alexander92 | which 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:53 | alexander92 | what i dont understand is, why doesn't sysFatal generate location info for the field error |
12:25:15 | alexander92 | it generates a new exception which is not helpful |
12:25:21 | alexander92 | because 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:23 | jjido | What is the error about? |
12:29:43 | * | joshii joined #nim |
12:30:08 | joshii | Hi |
12:30:22 | alexander92 | basically "fieldError : strVal not accesssible" |
12:31:00 | jjido | Visibility error is it? |
12:31:35 | joshii | in documentation it is said that the --run switch can take in arguments |
12:32:05 | joshii | but i doesnt take when i use readLine example |
12:32:16 | jjido | It 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:16 | alexander92 | probably, the problem is that it doesn't generate a proper stacktrace/origin path:line |
12:34:33 | alexander92 | @krux02 do you know a workaround, or am i mistaken |
12:34:43 | alexander92 | (^ the sysFatal fieldError file info) |
12:35:00 | * | sealmove joined #nim |
12:36:42 | * | nc-x joined #nim |
12:38:34 | nc-x | has 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:54 | narimiran | nc-x: try with -d:danger and see if there's any difference |
12:40:06 | alexander92 | yes, @bobeff had similar issues iirc |
12:40:50 | joshii | can anyone help me? |
12:41:31 | narimiran | joshii: link to documentation example? |
12:41:50 | joshii | https://nim-lang.org/docs/tut1.html |
12:42:13 | Araq | alexander92: report it with a small test program please |
12:44:19 | * | envoyt quit (Read error: Connection reset by peer) |
12:44:27 | Araq | do we have 32bit testing now? can't remember |
12:44:39 | * | envoyt joined #nim |
12:45:02 | narimiran | joshii: i'm guessing this line (`nim compile --run greetings.nim arg1 arg2`) is the problem? |
12:45:08 | krux02 | alexander92, well I cannet say anything if you don't show me an example to reproduce the problem |
12:45:30 | joshii | @narimiran yes |
12:45:34 | krux02 | nc-x: bootstrapping is slower, yes |
12:45:53 | krux02 | nc-x, it is because of some checks that are enabled by default, even in release mode |
12:46:26 | Araq | not "some checks", all of them, including integer overflow checking |
12:46:33 | narimiran | joshii: the original example doesn't use any arguments. so `arg1` and `arg2` will just be ignored |
12:46:38 | FromGitter | <bobeff> @narimiran 10x You are correct. Passing only `-d:danger` produces `Dangerous Release Build` as well passing `-d:release -d:danger`. |
12:48:03 | joshii | narimiran: but the readLine does take in strings right |
12:48:26 | FromGitter | <jrfondren> it doesn't take them from the command line. |
12:48:48 | nc-x | krux02: 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:50 | FromGitter | <jrfondren> use paramStr() and paramCount() for that. |
12:50:04 | alexander92 | sorry, i'll try to make a repro |
12:50:38 | alexander92 | it 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:42 | narimiran | btw, 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:50 | narimiran | @jrfondren, joshii we should maybe remove that `nim compile --run greetings.nim arg1 arg2` part, just not to confuse people |
12:53:37 | alexander92 | @krux02 @Araq sorry, my fault: i didnt compile nim with debugInfo, now i see the full trace |
12:54:06 | alexander92 | it 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:38 | FromGitter | <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:02 | dom96 | Nice :O |
13:01:37 | nc-x | Well, 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:32 | lqdev[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:56 | lqdev[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:56 | laaron | why nimble broken after 0.20 |
13:26:48 | clyybber | lqdev[m]: That's awesome, wish there were something like this for midi |
13:28:10 | * | PMunch joined #nim |
13:29:47 | laaron | > Error: unhandled exception: assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period [FieldError] |
13:31:40 | narimiran | laaron: https://nim-lang.org/blog/2019/06/06/version-0200-released.html#installing-0200 |
13:32:32 | lqdev[m] | clyybber: it supports mod and xm, I think it's close enough ;) |
13:32:34 | disruptek | jasper_: https://gist.github.com/disruptek/0576f449ec24801abc545a59ef513ab7 -- minimal reproducable example demonstrating two surprises. |
13:33:14 | laaron | i update use choosenim: $ choosenim update stable |
13:34:44 | narimiran | laaron: see the note. `choosenim #v0.20.0` |
13:36:27 | FromGitter | <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:43 | lqdev[m] | by the way |
13:39:43 | lqdev[m] | > `discard x` is now illegal when `x` is a function symbol. |
13:39:44 | lqdev[m] | what did this do anyways? |
13:40:07 | lqdev[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:57 | laaron | seems i need reinstall something |
13:49:58 | narimiran | laaron: before reinstalling, see if `rm ~/.choosenim/channels/stable` would do the trick |
13:51:05 | laaron | ok, only keep choosenim, trying reinstall |
13:55:05 | jken | if 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:36 | jken | Or 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:08 | FromGitter | <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:33 | laaron | fine, nimble works after a fresh reinstall |
14:00:37 | FromGitter | <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:09 | Zevv | jken: your answer should be in https://nim-lang.github.io/Nim/manual.html#overloading-resolution |
14:01:35 | Araq | lqdev[m]: consistency, 'f' is the first class function and you then discard this value |
14:01:48 | jken | Zevv, exactly what I was looking for. Thank you! |
14:02:00 | FromGitter | <jrfondren> @lqdev, it was a no-op, but if you saw it in code, someone probably got confused |
14:02:27 | Zevv | jken: but I don't see your exact case in the docs; if it is not there we should add it |
14:06:49 | Araq | btw we have new rules: every commit should contain either [bugfix], [feature] or [refactoring] |
14:07:08 | Araq | so 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:43 | Zevv | Also, 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:09 | Zevv | But better to do it once when commiting, then 20 people having to look it up afterwards, maybe? |
14:09:39 | narimiran | Zevv: 'fixes #12345' has a mouse-over pop-up on github, as a first aid |
14:09:57 | Araq | well I think 'fixes #123' without the [bugfix] means it's a fix not to be backported |
14:10:04 | Araq | narimiran? |
14:11:40 | narimiran | '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:13 | Zevv | but you will do the tagging at merge time, right? Not something individual contributors need to add |
14:12:52 | narimiran | both, ideally |
14:13:20 | alexander92 | guys i managed to |
14:13:25 | alexander92 | break nim |
14:13:31 | alexander92 | because i had a line with 130000 characters |
14:13:35 | alexander92 | i am proud |
14:13:43 | narimiran | congrats on your success :P |
14:14:51 | alexander92 | honestly i think it should produce some kind of meaningful error in newLineInfo in debug mode |
14:15:07 | alexander92 | but i can see that this is a quite ridicilous scenario |
14:15:43 | Zevv | alexander92: how does it break? value out of range? |
14:16:03 | Araq | excuse 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:18 | alexander92 | newLineInfo converts col and line to (u?)int16 |
14:16:34 | Araq | see? you don't believe in this bullshit either... :P |
14:17:02 | alexander92 | but i never said that, this is a great example for exception raising |
14:17:09 | alexander92 | i am for a mixed system |
14:17:35 | alexander92 | exceptional errors, exceptional people |
14:18:05 | alexander92 | you should respect people with 130000 char lines Araq, the backbone of society |
14:21:24 | Araq | I do respect you. |
14:21:57 | * | NimBot joined #nim |
14:22:28 | Araq | but the compiler respects your RAM moreso |
14:24:07 | * | PMunch quit (Remote host closed the connection) |
14:25:00 | alexander92 | respect.js |
14:25:25 | alexander92 | ok, can i parseStmt(staticRead()) them |
14:31:26 | FromDiscord_ | <qiib> from strutils import parseInt |
14:31:26 | FromDiscord_ | <qiib> |
14:31:26 | FromDiscord_ | <qiib> let num = parseInt(readLine(stdin)) |
14:31:26 | FromDiscord_ | <qiib> |
14:31:27 | FromDiscord_ | <qiib> if num < 10 and num > 0: |
14:31:27 | FromDiscord_ | <qiib> |
14:31:27 | FromDiscord_ | <qiib> case num |
14:31:28 | FromDiscord_ | <qiib> |
14:31:28 | FromDiscord_ | <qiib> of 1..5: |
14:31:30 | FromDiscord_ | <qiib> echo "foo" |
14:31:31 | FromDiscord_ | <qiib> |
14:31:33 | FromDiscord_ | <qiib> of 6..8,9: |
14:31:34 | FromDiscord_ | <qiib> echo "also foo" |
14:31:38 | FromDiscord_ | <qiib> why doesn't this work |
14:33:30 | * | josii joined #nim |
14:34:22 | FromDiscord_ | <qiib> it throws an error |
14:35:28 | narimiran | 1st: use some pasting service, please |
14:35:54 | narimiran | 2nd: try with `if num in 1..9` |
14:37:06 | narimiran | 3rd: 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:17 | FromDiscord_ | <qiib> https://pastebin.com/NZEuzkAG |
14:38:08 | narimiran | ok, compiler cannot conclude that you're in 1..9 range, so you need `else: discard` |
14:38:35 | Zevv | Well, 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:39 | Zevv | :) |
14:39:49 | FromDiscord_ | <qiib> or you could make the else part mandatory |
14:40:40 | narimiran | it is not mandatory when there is limited number of options |
14:41:11 | narimiran | furthermore, in the new nim version it is even an error if you have `else` when not needed |
14:42:15 | narimiran | see this: https://nim-lang.org/blog/2019/06/06/version-0200-released.html#better-error-message-for-case-statements |
14:44:23 | FromDiscord_ | <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:17 | lqdev[m] | that's strange, since ma_rb is declared in `miniaudio.h` |
14:45:32 | leorize | maybe the definition is not being generated |
14:45:41 | leorize | shashlick: ^ |
14:45:47 | lqdev[m] | seems like that |
14:46:09 | lqdev[m] | reading the output `cDebug()` I can't see `ma_rb` anywhere |
14:49:27 | lqdev[m] | nimterop also doesn't report any errors |
14:51:57 | leorize | nimterop has a habit of skipping without errors |
14:53:05 | Araq | https://forum.nim-lang.org/t/4914 what's up with that 'X' module name? |
14:54:43 | Araq | qiib: 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:14 | lqdev[m] | https://github.com/nim-lang/opengl/blob/master/src/opengl/private/prelude.nim#L5 |
14:55:16 | lqdev[m] | X related stuff |
14:56:22 | shashlick | What does ma_rb look like |
14:56:25 | narimiran | Araq: change like this one is needed: https://github.com/yglukhov/nimx/commit/dcfca737458fab089e90d30a71e36c26d4ecaecd |
14:56:40 | narimiran | i.e. case sensitivity |
14:57:25 | * | a_b_m joined #nim |
14:57:33 | * | floppydh joined #nim |
14:57:42 | alexander92 | Araq, a=$b now is parsed as |
14:57:48 | alexander92 | a `=$` b (infix) |
14:57:51 | alexander92 | is this intended |
14:58:32 | alexander92 | it was a = ($b) before |
14:59:47 | Araq | are you sure? I don't remember changing that |
15:00:09 | leorize | !eval var a=$"string" |
15:00:11 | NimBot | Compile failed: in.nim(1, 8) Error: ':' or '=' expected, but got 'string' |
15:00:22 | leorize | !eval echo NimVersion |
15:00:26 | NimBot | 0.19.6 |
15:00:37 | FromDiscord_ | <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:10 | leorize | !eval var a = $"string" |
15:01:13 | NimBot | <no output> |
15:01:15 | narimiran | qlib lol no |
15:01:23 | leorize | alexander92: ^ seems to be like that since 0.19 |
15:01:33 | FromDiscord_ | <qiib> otherwise there is no need to enforce this case when the compiler is not sure of the possible value |
15:01:39 | FromDiscord_ | <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:06 | Zevv | !eval c_memcpy(addr("0.20.0")[0], unsafeAddr(getNimVersion()[0], 6); echo NimVersion |
15:02:08 | NimBot | Compile failed: in.nim(1, 63) Error: expected: ')', but got: ';' |
15:02:08 | narimiran | qlib so you're claiming that `case` is useless :D :D |
15:02:17 | leorize | shashlick: look at lqdev[m] message |
15:02:56 | shashlick | What does ma_bool32 ownsBuffer : 1; mean |
15:03:06 | sealmove | oh, docs are updated with `owned`, nice |
15:03:08 | shashlick | The : 1 |
15:03:13 | lqdev[m] | it's a bitfield |
15:03:17 | shashlick | I don't think nimterop understands that |
15:03:46 | lqdev[m] | that means the bool only takes 1 bit |
15:03:57 | lqdev[m] | instead of 8 |
15:04:02 | lqdev[m] | it should be compiled to the {.bitfield.} pragma |
15:04:37 | lqdev[m] | {.bitsize.}* |
15:04:54 | lqdev[m] | https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-bitsize-pragma |
15:05:08 | pyotr | Hello there, nim comunity!! |
15:05:20 | pyotr | Newcomer here! |
15:05:39 | lqdev[m] | hello! |
15:05:48 | jken | welcoem! |
15:06:25 | shashlick | Ok what's the equivalent Nim for it? |
15:06:26 | pyotr | Can you give me some advice? |
15:06:46 | narimiran | pyotr: that's why we're here ;) |
15:07:18 | lqdev[m] | `ownsBuffer {.bitsize: 1.}: ma_bool32` |
15:07:53 | pyotr | I use neovim what is the best plugin or plugins to code nim in neovim? |
15:08:16 | narimiran | pyotr: ah, that one is easy :) https://github.com/narimiran/opengl |
15:08:19 | narimiran | oops |
15:08:26 | shashlick | Ok let me take a look, hopefully tree-sitter should recognize it |
15:08:31 | narimiran | old 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:26 | narimiran | btw, leorize, why is nim >= 0.20 a requirement? plugin doesn't work on 0.19.x branch of code? |
15:10:29 | FromGitter | <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:10 | leorize | narimiran: yea, the new nimsuggest addition was only available on devel |
15:11:20 | * | I_Right_I joined #nim |
15:11:24 | narimiran | @Vindaar introducing one line, to save another :D |
15:11:39 | FromGitter | <Vindaar> yes, in this case it's stupid, but who knows what he plans to do :P |
15:11:48 | sealmove | congrats on v20.0!! \o/ |
15:11:51 | narimiran | @Vindaar but you're too late, he now wants to ban `case` altogether :P :D |
15:12:00 | leorize | sealmove: not there yet :p |
15:14:54 | Araq | we use 'case' 895x in the compiler |
15:15:06 | Araq | doesn't seem useless to me. |
15:15:20 | narimiran | not good enough reason, throw it away! |
15:15:48 | narimiran | if it doesn't work in this example inside of `if` branch, it is completely useless |
15:16:05 | Araq | the 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:40 | leorize | if you didn't wrote the compiler in pascal I wouldn't know the existance of Nim |
15:17:56 | Araq | it was also a reason not to write it in C++ ... (switch/case/break? fuck you) |
15:18:29 | alexander92 | 3AAraq i am sure yeah |
15:18:40 | alexander92 | dumpTree shows that at least |
15:18:48 | alexander92 | but not sure if it changed after 0.19 |
15:19:06 | alexander92 | but at least some previous patched version of nim i have shows =$ in a different way :D |
15:19:48 | alexander92 | but on the other hand =@[] is `=@` .. from a long time |
15:23:04 | FromDiscord_ | <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:30 | FromDiscord_ | <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:32 | Araq | qiib: 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:04 | shashlick | @lqdev - can you share your wrapper so i can test easier |
15:32:38 | alexander92 | Araq, and also is it possible for system to recognize to not include jssys in vm.nim |
15:32:44 | alexander92 | when nimVM* not vm.nim |
15:33:47 | Araq | sure, somehow, 'when not defined(nimscript): include jssys' |
15:35:33 | * | a_b_m quit (Quit: Leaving) |
15:36:35 | alexander92 | my problem is that sometimes on macro time nim tries to invoke jssys javascript code |
15:36:57 | alexander92 | so 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:39 | sealmove | It's weird that python doesn't have `case` but has `while ... else`. |
16:07:38 | clyybber | Araq: 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:57 | clyybber | As 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:10 | shashlick | cool thanks |
16:16:24 | lqdev[m] | sorry it took me so long btw, I was afk |
16:16:31 | shashlick | np |
16:19:57 | FromGitter | <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:14 | FromGitter | <xmonader> is there `unquote` for macros in nim? |
17:06:22 | FromGitter | <xmonader> e.g ⏎ ⏎ ```result = quote do: ⏎ type unquote(enumName) = enum unquote(enumValsString) ``` [https://gitter.im/nim-lang/Nim?at=5cfa998e65392c3b60d797cb] |
17:06:25 | narimiran | PSA: nim 0.20.0 has hit manjaro unstable - so soon it will be in manjaro testing, and after that manjaro stable |
17:08:25 | sealmove | xmonader: unquote? |
17:11:29 | FromGitter | <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:21 | sealmove | xmonader: sorry I don't understand lisp. but maybe you just want what you passed in the macro as a string? |
17:14:39 | sealmove | in that case `$` works |
17:14:46 | sealmove | or repr() |
17:16:12 | FromGitter | <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:54 | sealmove | ok I see, there is proc for that |
17:18:01 | sealmove | forgot name w8 |
17:20:09 | sealmove | parseExpr() and parseStmt should do |
17:20:37 | sealmove | you construct your code as string and pass it to these procs and they give you the ast |
17:20:43 | FromGitter | <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:36 | FromGitter | <xmonader> parseExpr didn't evaluate within quoted value @sealmove |
17:23:52 | FromGitter | <xmonader> @Vindaar that worked so backtick unquotes ? |
17:24:03 | FromGitter | <Vindaar> yes, exactly |
17:25:14 | FromGitter | <xmonader> but adding this line ⏎ ⏎ ``` echo `1+2```` ⏎ ⏎ didn't work add `echo 3` [https://gitter.im/nim-lang/Nim?at=5cfa9dfa82c2dc79a56995f6] |
17:26:30 | FromGitter | <Vindaar> oh yes, that doesn't work unfortunately |
17:26:49 | FromGitter | <Vindaar> the argument to the stuff in ` ` ` must be a `NimNode` already |
17:27:32 | FromGitter | <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:50 | FromGitter | <xmonader> I see thanks a lot :) |
17:27:55 | FromGitter | <jrfondren> https://nimses.com/en/ <- a lot of talk about "nim" here, but not the programming language. |
17:31:28 | sealmove | xmonader my bad, I had seen the operator but have never used it so it slipped mind |
17:32:54 | FromGitter | <xmonader> no problem at all many thanks @sealmove |
17:34:37 | sealmove | btw how does one open a file of unknown size? |
17:34:49 | FromGitter | <jrfondren> same way one opens a file of known size |
17:34:57 | FromGitter | <jrfondren> why do you think that matters? |
17:35:45 | FromGitter | <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:46 | sealmove | sorry not open file, I mean read a file |
17:36:02 | sealmove | current I do this: https://termbin.com/3b33 |
17:36:23 | sealmove | But 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:26 | FromGitter | <xmonader> @sealmove read with a stream |
17:36:44 | sealmove | yeah I tried stream but it only has a readAll that returns a string |
17:36:52 | sealmove | I want seq[bytes] |
17:37:04 | sealmove | should I do readAll and then cast to seq of byteS? |
17:37:23 | sealmove | seq[byte] * |
17:38:45 | FromGitter | <jrfondren> the size in readBuffer isn't the size of the file. it's the size of the buffer. Just keep reading |
17:38:50 | FromGitter | <xmonader> @sealmove https://nim-lang.org/docs/streams.html#readData%2CStream%2Cpointer%2Cint doesn't work for you |
17:42:11 | sealmove | hmm, I guess casting readAll() does the trick. |
17:42:45 | sealmove | oh lol |
17:43:09 | sealmove | readAll impl is same as the code I just pasted |
17:43:14 | sealmove | https://github.com/nim-lang/Nim/blob/master/lib/pure/streams.nim#L240 |
17:44:00 | * | leorize joined #nim |
17:45:09 | sealmove | So I guess my question is, what is a good buffer size? I see readAll() uses 1024. |
17:45:52 | FromGitter | <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:35 | Araq | clybber: huh? nkHiddenSubConv is movable too |
18:13:22 | shashlick | is bitsize pragma only for fields or any type |
18:14:23 | Araq | only for fields, we map it to C's mechanism which has the same restriction |
18:14:46 | shashlick | okay thanks |
18:15:07 | shashlick | does the bitsize in C have to be a number or can it be a variable? |
18:15:32 | Araq | a number |
18:16:07 | shashlick | cool |
18:16:40 | Zevv | variable would be cooler |
18:17:07 | Zevv | varsize bitfields, wohoo |
18:20:24 | shashlick | Could 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:30 | dom96 | Nice, 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:58 | kuon | hello. 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:22 | kuon | I found https://github.com/bmollot/nim-loader but I am more interested about the bigger picture (source map, how tooling scale...). |
18:51:08 | dom96 | @alehander42 should have some tips here |
18:53:44 | Araq | kuon: 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:45 | FromGitter | <alehander42> Source maps almost worked |
18:54:55 | FromGitter | <alehander42> But in a bit more hacky way |
18:55:06 | FromGitter | <alehander42> And I wanted to rewrite the whole js backend |
18:55:16 | FromGitter | <alehander42> But I never finished the rewrite |
18:55:40 | FromGitter | <alehander42> So I can add the simpler sourcemap eventually |
18:56:34 | kuon | So at present it is usable, but with no or little tooling? |
18:57:02 | kuon | I mean source map, incremental compilation, automatic recompilation, tree shaking... |
18:58:04 | FromGitter | <alehander42> So I think hot come reloading could work for js |
18:58:38 | FromGitter | <alehander42> Tree shaking is true for nim code anyway I thin |
18:58:46 | disruptek | hot what? |
18:58:58 | FromGitter | <alehander42> Hot code reloading |
18:59:01 | FromGitter | <alehander42> Sorry |
19:00:53 | Araq | we have a different mechanism to produce stack traces that refer to the Nim source files, it predates sourcemaps |
19:01:20 | Araq | we do dead code elimination (what's tree shaking?) |
19:01:50 | Araq | we compile big JS system in under a second so there is no need to "incremental" build stuff. |
19:02:09 | Araq | much of what you're used to doesn't apply, give Nim a try. |
19:02:19 | kuon | Araq, it's the reverse of dead code elimination, it's like live code inclusion. |
19:03:10 | kuon | Araq, well, yeah, incremental might not be needed, right now my JS app takes 3 minutes to compile (I hate JS tooling). |
19:04:02 | kuon | tree 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:55 | Araq | there is no difference between dead code elimination and live code inclusion, it's not the "reverse" |
19:09:01 | kuon | well yeah, it's kinda "marketing" name :P |
19:09:21 | FromGitter | <alehander42> Yes tree shaking is the same afaik |
19:10:14 | FromGitter | <alehander42> But yeah compilation is faster |
19:10:18 | FromGitter | <alehander42> Than typescript |
19:10:42 | kuon | Do you have experience with this webpack nim-loader? |
19:10:43 | FromGitter | <alehander42> I never had speed problems with js compilation with a computer in release mode |
19:10:57 | FromGitter | <jrfondren> nah tree shaking predates google, in the Lisp community. |
19:11:28 | FromGitter | <alehander42> Not really I use nim for front-end in electron and browser apps |
19:11:40 | FromGitter | <alehander42> But I haven't used webpaxk |
19:12:13 | FromGitter | <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:02 | kuon | I'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:00 | kuon | jrfondren Ok, I have to admit I never wrote any lisp. |
19:15:53 | FromGitter | <jrfondren> that's not as shocking a confession as you might think :) I only mention it because someone credited Google with something. |
19:17:16 | disruptek | anyone have a source of documentation for .locks.? |
19:17:37 | FromGitter | <jrfondren> I've only seen what's in the manual. that seemed OK |
19:17:38 | leorize | it's in manual_experimental I think |
19:17:45 | disruptek | danke. |
19:18:39 | FromGitter | <alehander42> Kuon what does webpaxk need to load a component |
19:19:15 | FromGitter | <alehander42> You can try the lib from github |
19:19:28 | FromGitter | <alehander42> And say if it.lacks |
19:19:35 | FromGitter | <alehander42> Something |
19:19:45 | disruptek | i had no problem generating js and webpack'ing it. |
19:19:46 | kuon | jrfondren 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:01 | kuon | alehander42 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:33 | disruptek | it works identically to the packing of any other js file. |
19:21:47 | kuon | jrfondren 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:26 | kuon | disruptek, yeah, I guess it should work, maybe I am just over thinking it. |
19:23:04 | * | Vladar joined #nim |
19:25:17 | leorize | narimiran: alright, so how would you like to split our current CI into? |
19:26:30 | narimiran | leorize: to optimize it to make it as fast as possible. we have 4x travis, 10x azure, 1x appveyor, right? |
19:27:01 | leorize | yea |
19:27:12 | leorize | well if needed circleci can also be tossed into the mix |
19:27:18 | * | laaron quit (Remote host closed the connection) |
19:27:20 | leorize | circleci got 4x like travis |
19:28:15 | narimiran | ok, and we have currently 6 different tests (4 by travis and 2 by appveyor) |
19:29:10 | * | laaron joined #nim |
19:31:29 | leorize | circleci can do linux jobs at an extraordinary speed |
19:31:43 | leorize | so we might as well just move linux jobs there :p |
19:32:07 | narimiran | leorize: did you already setup it and tested it or do you base that on some specifications? |
19:32:19 | sealmove | just to clarify.. what's the relation between newruntime and nim v0.20? |
19:35:40 | sealmove | I 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:06 | leorize | sealmove: 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:53 | shashlick | okay interested in the CI discussion |
19:57:04 | narimiran | leorize, shashlick: you two continue the CI discussion, it is getting too late for me.... |
19:57:33 | shashlick | okay take care |
19:57:45 | shashlick | okay am testing build on my 32core machine |
19:57:54 | shashlick | 18 seconds to build csources with make -j 32 |
19:58:48 | leorize | 4 more cores and it'd just took 3s :) (tested with circleci) |
19:59:13 | federico3 | leorize: circleci is indeed faster, I've been saying it for a while |
19:59:28 | shashlick | 51 seconds to koch boot |
19:59:49 | leorize | I like how they said they're only letting you use 4 cores but nproc still said 36 |
20:00:21 | federico3 | leorize: that does not mean you are using them |
20:00:27 | shashlick | 44 seconds to koch tools |
20:01:24 | leorize | federico3: make -j 36 gives much different results than make -j 4 :) |
20:01:48 | federico3 | leorize: and with 12, 20, 24? |
20:02:29 | leorize | haven't tried :p but at least with other CI it doesn't scale further than nproc |
20:03:46 | federico3 | distributed 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:51 | shashlick | why do I get this - https://pastebin.com/b8J6bEyT |
20:22:59 | shashlick | on rhel |
20:24:16 | Araq | wrong stdlib setup? |
20:24:39 | shashlick | i just cloned devel and tried |
20:24:43 | shashlick | koch test |
20:31:22 | shashlick | never mind, two nims, wrong one in path |
20:31:38 | shashlick | just want to test how fast this machine can run koch test |
20:32:04 | * | a_b_m joined #nim |
20:36:42 | shashlick | okay ran really fast but forgot to time |
20:36:55 | shashlick | how to get testament to run multiple tests in parallel |
20:37:01 | shashlick | gc tests seem to run in sequence |
20:38:19 | shashlick | i have 32 cores but still doesn't seem to run too many processes |
20:39:22 | shashlick | do categories run in parallel but each category runs tests in sequence? |
20:41:02 | shashlick | so 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:39 | Araq | '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:39 | deech | What does the ';' do in function arguments? |
22:08:51 | FromGitter | <kaushalmodi> it breaks the flow of types |
22:10:20 | FromGitter | <kaushalmodi> https://nim-lang.github.io/Nim/manual#procedures |
22:10:37 | FromGitter | <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:25 | FromGitter | <kaushalmodi> I use it mainly give a visual distinction that "hey, now the type is changing" |
22:12:52 | deech | Got it, thanks! |
22:14:02 | deech | And what does '`' in 'proc `name rec`(...) ...' do? I guess the ` designates an infix function but I didn't know spaces were allowed. |
22:15:30 | deech | Holy 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:32 | Araq | no, it's a primitive form of token concatenation |
22:17:46 | Araq | comparable to C's preprocessor ## operator |
22:18:43 | * | laaron joined #nim |
22:19:55 | shashlick | xz has a `-T 0` flag which will run it multi-threaded, runs much faster |
22:20:01 | shashlick | should make that change in niminst |
22:20:10 | shashlick | also, nim doc could do with some parallelization as well |
22:20:19 | deech | Apparently 'proc `1`() = discard' is legal. |
22:20:21 | Araq | koch docs runs in parallel |
22:22:21 | shashlick | I meant koch csources |
22:28:51 | * | luis_ quit (Read error: Connection reset by peer) |
22:38:09 | Araq | hmm what's this https://github.com/nim-lang/Nim/pull/11417 ? bugfix? feature? something else? |
22:38:49 | shashlick | @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:39 | shashlick | have 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:40 | shashlick | let'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:25 | deech | Araq, (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:01 | deech | There'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:17 | deech | s/time/them/ |
23:43:44 | FromGitter | <Gooseus> anyone here using spacemacs by chance? |
23:48:05 | FromGitter | <kaushalmodi> `s/spac//` |
23:48:25 | * | krux02_ joined #nim |
23:50:51 | * | krux02 quit (Ping timeout: 248 seconds) |
23:52:22 | FromGitter | <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:50 | FromGitter | <kaushalmodi> Disable nimsuggest |
23:55:45 | FromGitter | <kaushalmodi> Look up the defcustom to disable the nimsuggest-mode. |