<< 10-06-2019 >>

00:03:10PMunchFinally finished with my Arduino project :) https://uploads.peterme.net/voicebox_open.jpg https://uploads.peterme.net/voicebox_lid.jpg
00:03:16PMunchNow I can get back to Nim stuff
00:03:47*disruptek quit (Ping timeout: 244 seconds)
00:06:01PMunch!eval echo NimVersion
00:06:04NimBot0.19.6
00:07:49*disruptek joined #nim
00:08:10PMunch!eval echo NimVersion
00:08:13NimBot0.20.0
00:08:20PMunchYay :)
00:08:48PMunchHad a bug in my auto-update script :( Next time the docker images update it should automatically carry over
00:09:31*deech_ quit (Ping timeout: 248 seconds)
00:12:32*PMunch quit (Remote host closed the connection)
00:27:38shashlickAwesome
00:41:06*laaron- quit (Remote host closed the connection)
00:42:07sealmoveZevv: :)
00:43:29*laaron joined #nim
00:48:33*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
00:48:55*laaron joined #nim
00:59:10*laaron quit (Remote host closed the connection)
01:01:13*laaron joined #nim
01:03:48*vlad1777d quit (Ping timeout: 245 seconds)
01:09:47*a_b_m joined #nim
01:13:52*abm quit (Ping timeout: 272 seconds)
01:17:17*laaron quit (Remote host closed the connection)
01:18:40*Jesin quit (Quit: Leaving)
01:19:33*laaron joined #nim
01:21:11*leorize quit (Ping timeout: 256 seconds)
01:22:57*Jesin joined #nim
01:23:11*deech__ joined #nim
01:26:07*leorize joined #nim
01:30:58*c3v0axz quit (Ping timeout: 272 seconds)
01:31:40*c3v0axz joined #nim
01:31:44*deech__ quit (Ping timeout: 248 seconds)
01:45:49*ng0_ joined #nim
01:48:57*ng0 quit (Ping timeout: 256 seconds)
02:05:21*deech joined #nim
02:16:00*Bast_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:40:00*a_b_m quit (Ping timeout: 248 seconds)
02:57:31*theelous3_ quit (Ping timeout: 248 seconds)
02:59:09*Bast_ joined #nim
03:07:35*dddddd quit (Remote host closed the connection)
03:46:28skrylar[m]PMunch: this is why the threaded part of my bmessage implementatino just has a big todo on it :/
04:08:25*deech quit (Ping timeout: 246 seconds)
04:18:12*fjellfras joined #nim
04:19:30*nsf joined #nim
04:28:09*NimBot joined #nim
04:44:45*fjellfras quit (Remote host closed the connection)
04:45:04*fjellfras joined #nim
04:45:10*disruptek quit (Quit: Bye)
04:49:12*disruptek joined #nim
05:02:10*fjellfras quit (Remote host closed the connection)
05:02:24*fjellfras joined #nim
05:05:28*leorize quit (Quit: WeeChat 2.3)
05:12:19skrylar[m]was just thinking about how in a derpy sort of way, you can emulate Go's interfaces with closures
05:35:00*narimiran_ joined #nim
05:35:05*Bast_ quit (Quit: Textual IRC Client: www.textualapp.com)
05:35:40*narimiran_ quit (Remote host closed the connection)
05:36:50*Serenitor quit (Quit: Leaving)
05:37:28*narimiran joined #nim
05:47:13*leorize joined #nim
06:04:09*leorize quit (Remote host closed the connection)
06:07:44*leorize joined #nim
06:11:12*Tongir joined #nim
06:16:39*leorize quit (Quit: WeeChat 2.3)
06:17:35*vlad1777d joined #nim
06:19:29*fjellfras quit (Remote host closed the connection)
06:19:46*envoyt quit (Ping timeout: 272 seconds)
06:19:49*fjellfras joined #nim
06:22:30*vlad1777d quit (Ping timeout: 244 seconds)
06:32:28*leorize joined #nim
06:36:04*arecaceae quit (Remote host closed the connection)
06:36:23*arecaceae joined #nim
06:49:12*Trustable joined #nim
06:49:36*vlad1777d joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:03:24*leorize_ joined #nim
07:03:27*leorize quit (Ping timeout: 256 seconds)
07:04:41*gmpreussner joined #nim
07:19:20*fjellfras quit (Ping timeout: 244 seconds)
07:23:55*fjellfras joined #nim
07:37:47*leorize_ is now known as leorize
07:43:22*laaron quit (Remote host closed the connection)
07:48:30*laaron joined #nim
07:58:49*neceve joined #nim
08:01:48*laaron quit (Remote host closed the connection)
08:04:34*laaron joined #nim
08:15:28*leorize quit (Remote host closed the connection)
08:18:54*leorize joined #nim
08:22:41narimiranhello.... is there anybody out there?
08:23:51FromGitter<mratsim> nooooooooo you broke the silence spell
08:23:52*rayman22201 quit (Quit: Connection closed for inactivity)
08:24:31narimiranerase and rewind
08:24:51*narimiran wonders how long can he communicate by only using song names
08:24:52Araqhow can I ask 'git diff' only about the changed lines?
08:25:11FromGitter<mratsim> git diff can give you a unix patch
08:25:35Araqwhat does that mean? I only need the line numbers
08:26:03FromGitter<mratsim> well I remember doing that, but I'm not a git magician
08:27:01*fjellfras quit (Ping timeout: 244 seconds)
08:27:41narimiranAraq: you just want the number of lines changed? e.g. "103 insertions(+), 90 deletions(-)"?
08:28:06Araqno, I mean "lines 120-140 changed"
08:38:23*mbarkhau joined #nim
08:41:21*fjellfras joined #nim
08:45:33*al_ joined #nim
09:06:19*leorize quit (Remote host closed the connection)
09:06:27*stefanos82 joined #nim
09:12:16*leorize joined #nim
09:16:32*a_b_m joined #nim
09:29:36*Tongir quit (Ping timeout: 248 seconds)
09:31:31*couven92 joined #nim
09:33:50dom96Araq: it shows that by default?
09:35:31*Vladar joined #nim
09:48:40*dwdv joined #nim
09:56:51*leorize quit (Ping timeout: 256 seconds)
10:00:58*lritter joined #nim
10:05:39*laaron quit (Remote host closed the connection)
10:08:14*laaron joined #nim
10:10:18*mbarkhau quit (Ping timeout: 272 seconds)
10:20:18Zevvnarimiran: I once did an interview for spotify. They gave me a poem and I had to collect the smallest subset of songs from their database to build the poem from song titles. I can tell you you can get a long way.
10:21:11narimiranZevv: did you first tried to do it manually to see how far can you go on your own? :)
10:22:11Zevv"the smallest subset" is quite some work to do by hand
10:22:30ZevvHm script no longer works, API changed, too bad
10:23:21narimirani didn't mean "the smallest subset" part, but just to see how many song titles you can recognize
10:45:11*arecaceae quit (Remote host closed the connection)
10:45:30*arecaceae joined #nim
10:50:11*PMunch joined #nim
10:50:18Zevvwell, about 0.1% I think
11:03:49PMunchHmm, for some reason checking if "stdin.endOfFile" and then putting a "readLineFromStdin(prompt)" it requires you to hit enter before the prompt comes up
11:06:54*fjellfras quit (Quit: Leaving)
11:11:12*laaron quit (Remote host closed the connection)
11:11:51leorize[m]it's bad to check for eof iirc
11:13:37*laaron joined #nim
11:16:30PMunchHmm, I tried to use the readLineFromStdin variant that write to a buffer and return a bool
11:16:41PMunchBut that just returned false after the first prompt..
11:17:14leorize[m]have you tried the 'noise' nimble package?
11:18:52*vegax87 quit (Ping timeout: 258 seconds)
11:19:36noonienhello folks, is there a good article on nim's async features?
11:20:02noonieni remember reading something about resuming and capturing futures, but i can't find the article
11:22:50PMunchWe were actually talking about that yesterday
11:23:06PMunchNot that article, but how Nim lacks good articles/documentation for async/threads
11:23:51PMunchNot quite sure what you mean with resume and capture a future though..
11:24:47*envoyt joined #nim
11:25:53noonieni might need to implement a poller, and i think there was some sugar for that
11:30:40narimiranPMunch: any chance that parsetoml could be updated so it works with v0.20?
11:31:37PMunchnarimiran, yeah probably, what is wrong with it?
11:31:49narimirannew caseObjects
11:32:27FromGitter<kaushalmodi> PMunch: I've opened an issue with the details
11:32:56FromGitter<kaushalmodi> https://github.com/NimParsers/parsetoml/issues/32
11:33:30narimirancurrently "parsetoml.nim(952) setEmptyTableVal" fails
11:33:44narimiranthat's `val.kind = TomlValueKind.Table`
11:36:48FromGitter<Vindaar> ahh, I actually wanted to get back to it and fix it. But I forgot. I can look at it now
11:38:15FromGitter<kaushalmodi> Thanks!
11:38:40PMunchI've already fixed it
11:38:42PMunchJust a sec
11:38:52FromGitter<Vindaar> ok, even better. thanks! :)
11:40:01narimiraneh, i thought @Vindaar would fix it, so i could tell PMunch about nimlsp failing. but in this case, i'll just keep quiet. :P
11:40:35FromGitter<Vindaar> well, since @PMunch already fixed that, he can work on nimlsp next ;)
11:41:12FromGitter<kaushalmodi> Heh, this is awesome, thanks guys!
11:41:43PMunchThere, pushed the fix for parsetoml now
11:41:49PMunchWait, nimlsp is failing?
11:42:05*PMunch grumbles something about setting up a CI for his own projects
11:42:34FromGitter<Vindaar> @PMunch: also need to fix https://github.com/NimParsers/parsetoml/blob/master/src/parsetoml.nim#L1045-L1046
11:44:03PMunchAh right
11:44:09PMunchIs this still okay? https://github.com/NimParsers/parsetoml/blob/master/src/parsetoml.nim#L1440
11:44:20narimiranit isn't
11:44:34narimiranbased on other similar stuff i had to fix that looked like that
11:45:03FromGitter<Vindaar> thats... weird. I only fixed the empty and array one and the tests ran fine locally
11:45:27narimiransee this: https://github.com/SSPkrolik/nimongo/pull/71/files
11:45:55narimiransimilar: https://github.com/jangko/msgpack4nim/pull/32/files
11:45:56FromGitter<Vindaar> yeah, I'm just surprised that for some reason this doesn't raise the error
11:46:18PMunchI only fixed the empty table thing and test1.nim ran fine..
11:46:27FromGitter<Vindaar> even weirder
11:46:55FromGitter<Vindaar> are the array and `new` procs called in the tests at all?
11:48:17FromGitter<Vindaar> nope, apparently they are not
11:50:36PMunchNot exactly 100% coverage :P
11:50:57PMunchIt really should run the TOML test suite instead
11:51:09FromGitter<Vindaar> I'm just adding some simple tests for the constructors. But yes ^ that would be even better
11:56:32*deech_ joined #nim
11:59:37sealmovePMunch: Did you try setStdIoUnbuffered()?
11:59:46PMunchNo
11:59:49PMunchWhere is that?
11:59:50sealmoveThe default is line buffering
11:59:55sealmoveio
12:01:26*nsf quit (Quit: WeeChat 2.4)
12:01:49FromGitter<Vindaar> here: https://github.com/NimParsers/parsetoml/pull/33
12:01:56PMunchThere @Vindaar and narimiran, parsetoml should be fixed now
12:02:08FromGitter<Vindaar> haha :D
12:02:40PMunchAh, you missed the TomlDateTime object ;)
12:02:46FromGitter<Vindaar> oh, indeed
12:03:02FromGitter<Vindaar> but I wrote tests :P
12:03:13*dddddd joined #nim
12:03:19FromGitter<Vindaar> I'll rebase and add tests for date too
12:03:28PMunch+1
12:03:47narimiranok, it is passing `nimble test` now, good job!
12:04:58PMunch@Vindaar, if you want to do a proper test-suite, write a script that pulls the tests from here: https://github.com/BurntSushi/toml-test and then use parsetoml and the json module to check the different files :)
12:05:13narimiranonce @Vindaar's more thorough tests are merged, i'll re-enable its testing in nim repo
12:06:13FromGitter<Vindaar> @PMunch: I won't do that today, but I'll note it down
12:07:08PMunchGood :)
12:10:11PMunchHmm, is it supposed to warn you about CaseTransition even when -d:nimOldCaseObjects is defined?
12:10:53PMunchSince nimlsp pretty much imports the entire compiler it has to wait for that to be patched before I can fix it
12:11:18AraqPMunch, -d:nimOldCaseObjects is a workaround
12:11:30PMunchYeah I know
12:11:34Araqso the warning should stay. you can switch it off in your config
12:11:40PMunchAh okay
12:12:00PMunchWell it can stay, just wanted to make sure that the switch was applied correctly
12:13:48FromGitter<Vindaar> ok, PR updated
12:15:23PMunchThere, nimlsp should be fixed for 0.20.0 now
12:16:36PMunch@Vindaar, why are you not testing the dates?
12:17:37FromGitter<Vindaar> because right now I was lazy and wasn't sure how to quickly test them *ducks and runs*
12:17:45PMunchHaha
12:18:01PMunchThat's fine, just add the proper test suite at some point :)
12:18:04*envoyt quit (Ping timeout: 246 seconds)
12:18:09FromGitter<Vindaar> yeah, that was my thought :D
12:19:48*laaron quit (Remote host closed the connection)
12:20:18FromGitter<kaushalmodi> https://github.com/nim-lang/Nim/issues/11439 was a pandora's box
12:20:33FromGitter<kaushalmodi> I was like.. adding TMPDIR support should be simple ..
12:20:46FromGitter<kaushalmodi> then I discovered that `-d:tempdir` doesn't work
12:21:00FromGitter<kaushalmodi> then I discovered that I cannot `unset` and env var in Nim :P
12:22:29AraqI simply don't use "temporary" files/dirs and I'm living a happy life
12:22:53FromGitter<kaushalmodi> I need it for cli apps
12:23:37*laaron joined #nim
12:24:41Araqafaict I develop cli apps too, still no temps in my code
12:26:56*laaron quit (Remote host closed the connection)
12:27:51FromGitter<kaushalmodi> I don't need to use them a lot, but I am come across times when I don't have an option
12:28:25*a_b_m quit (Quit: Leaving)
12:28:32FromGitter<kaushalmodi> recently I needed something like the Linux `mktemp` and I came across the `tempfile` Nimble package ( https://github.com/OpenSystemsLab/tempfile.nim ) which was really useful
12:29:18FromGitter<kaushalmodi> Araq: while you are here, can you help out with https://github.com/nim-lang/Nim/issues/11452#issuecomment-500391205 ?
12:29:24*laaron joined #nim
12:29:42Araqbut hey, I also do not use: symlinks, signal handlers, filenames with UpperCase letters, deep directory structures, overly long filenames, Bash scripts, grep, awk, Python, Perl, fork(), Ansi C, make, ...
12:30:00*Snircle joined #nim
12:30:27FromGitter<kaushalmodi> got it :) btw I don't use Python, Perl any more
12:30:43FromGitter<kaushalmodi> still resorting to the beauty of awk/sed at times
12:30:55Araqthe secret to productivity lies in avoiding Unix.
12:33:31*uvegbot quit (Ping timeout: 248 seconds)
12:35:06Araqwhat's up with #11452 ?
12:35:48Araqwe need an API like unputEnv() for that, preferably with a better name
12:37:31PMunchThe beauty of awk/sed/grep comes from their compose-ability
12:37:54FromGitter<kaushalmodi> Araq: https://github.com/nim-lang/Nim/pull/11466
12:38:16FromGitter<kaushalmodi> that PR adds `unsetEnv`.. named so because I am mapping the C `unsetenv`
12:38:23FromGitter<kaushalmodi> but that's gated by Windows support
12:38:33FromGitter<kaushalmodi> how do I pass NULL to the winlean API procs?
12:39:46AraqsetEnvironmentVariableW(newWideCString(envvarName), nil)
12:41:18FromGitter<kaushalmodi> oh
12:41:22FromGitter<kaushalmodi> let me update the PR
12:44:35FromGitter<kaushalmodi> Araq: Thanks! I have updated that PR
12:45:08Araqdid you ever notice that you can easily use a subset of C++ but not a subset of Unix?
12:45:34Araqhttps://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html so apparently TMPDIR made it to the standard
12:46:07Araqthis means that every program that uses /tmp directly is wrong as it should have queried the obscure env-var instead
12:46:08FromGitter<kaushalmodi> TMPDIR has been around for a while
12:46:17PMunchWhat do you mean you can't use a subset of Unix?
12:46:39FromGitter<kaushalmodi> > did you ever notice that you can easily use a subset of C++ but not a subset of Unix? ⏎ ⏎ I didn't follow that either
12:47:29FromGitter<kaushalmodi> PMunch: parsetoml is failing just one burntsushi test atm
12:47:40FromGitter<kaushalmodi> \*at the moment
12:47:52PMunchIt fails one?
12:47:58FromGitter<kaushalmodi> yes
12:48:04PMunchWhich one?
12:48:09FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cfe5189ff3f016baad81eac]
12:48:17FromGitter<kaushalmodi> run `nimble run_toml_test`
12:48:26Araqyou cannot have it both ways, standardize on /usr/bin and /etc and /<insert fucking up name here> but then if you use /tmp your program is wrong.
12:49:11PMunchOh, we already have the full toml test suite integrated :)
12:49:30FromGitter<kaushalmodi> you didn't know?!
12:49:38FromGitter<Vindaar> I wasn't aware either :D
12:49:45PMunchHaha, no :P
12:49:54PMunchWe were just talking about creating those tests
12:49:55FromGitter<kaushalmodi> heh
12:50:03FromGitter<kaushalmodi> see this failure: https://travis-ci.org/NimParsers/parsetoml/builds/543704030
12:50:03PMunchI get this error though: http://ix.io/1Lob
12:50:24FromGitter<kaushalmodi> that's when I opened https://github.com/NimParsers/parsetoml/issues/30
12:50:59FromGitter<kaushalmodi> PMunch: odd.. works on travis too (i.e. showing the actual error)
12:51:28PMunchWith the latest master?
12:51:45FromGitter<kaushalmodi> PMunch: ah! you need to set the $GOPATH
12:51:53FromGitter<kaushalmodi> i.e. have go installed on your system
12:51:56PMunchAaah
12:52:01PMunchSet it to where?
12:52:10PMunchJust to the go executable?
12:52:37FromGitter<kaushalmodi> you are seeing this failure: https://github.com/NimParsers/parsetoml/blob/039522190ac9b6a6db6bed1bc3c0f4f718da5ee5/parsetoml.nimble#L23
12:53:19FromGitter<kaushalmodi> ahem.. the travis env is setup for go so that `go get` works 😎
12:53:27FromGitter<Vindaar> this is the file it fails testing: https://github.com/BurntSushi/toml-test/blob/master/tests/valid/nested-inline-table-array.toml
12:54:37PMunchAha GOPATH=$HOME/go nimble run_toml_test
12:54:40PMunchNow it runs
12:56:57sealmovewow, when I use include instead of import it compiles a looooot faster
12:57:37PMunchhttp://ix.io/1Loe
12:57:58Araqalso I'm not sure why unsetenv is an API, not very Unix'y. The proper Unix way would be to write into a line based pseudo-file under /envvars/<pid> and pray the envvar never ever contains \n
13:00:24*xet7 quit (Quit: Leaving)
13:01:22*koalefant joined #nim
13:03:00koalefant@shashlick btw. I figured I could do similar to what typeId in https://gist.github.com/PhilipWitte/dd6c670fca3baf573490 does
13:04:57FromGitter<kaushalmodi> Araq: we are go on on windows vs unix.. every OS has its warts.. For me, had it not been for unix, I wouldn't be hacking on open source projects like these
13:05:01*laaron quit (Remote host closed the connection)
13:07:11*laaron joined #nim
13:07:36AraqI'm not talking about Windows vs Unix.
13:07:54AraqI'm saying that it's time to realize Unix is a clusterfuck of terrible design decisions.
13:08:43FromGitter<kaushalmodi> I see what you are saying, but I cannot judge (I couldn't have done it better)
13:09:35*koalefant quit (Ping timeout: 256 seconds)
13:09:35FromGitter<kaushalmodi> it's just mind boggling to design something that's going to be used by millions of users with different requirements, and that too for free
13:10:05stefanos82Araq: every time you say something about UNIX, as a whole or in general, it hurts like crazy...but deep down I know you are correct and surely know what you are talking about; that's why I trust your criticism and hope for a better understanding of it.
13:11:09sealmoveUnix gave birth to tons of awesome ideas, but of course it's too cryptic for today's standards. We need a new awesome OS :D
13:11:36*laaron quit (Remote host closed the connection)
13:12:09FromGitter<kaushalmodi> That said, Nim looks like a medium to unite unix, windows, .. users :D
13:12:43FromGitter<kaushalmodi> See, I submitted a PR that works for me and I asked for help on it so that it works on Windows too :)
13:15:46*laaron joined #nim
13:20:08Araq"it's just mind boggling to design something that's going to be used by millions of users with different requirements, and that too for free" well, yes, nowadays Unix is free, but it wasn't always and the problem with the whole argument by popularity is that you apply it selectively. By the same logic Windows is a good OS because it's used by millions even though it costs money
13:22:26*theelous3_ joined #nim
13:22:31FromGitter<kaushalmodi> my path into "coding outside of work" was via Emacs
13:22:35FromGitter<kaushalmodi> so I am definitely biased
13:23:34AraqEmacs emulates a Lisp machine on top of Unix
13:23:35*uvegbot joined #nim
13:25:17AraqLisp machines lost to Unix because Unix took fewer hardware resouces and Unix lost to DOS becaus DOS took fewer hardware resources. That's all there is to it really. The OS's quality had little to no influence.
13:26:56Araqyou buy the cheapest hardware, you run an OS that runs on the hardware, you forget the OS and care about the applications that the platform supports. Most people use computers to run applications, not OSes.
13:29:31*al_ quit (Quit: al_)
13:35:19FromDiscord_<koalefant> Is it possible to call overloaded proc from generic proc that was not declared in a module where generic proc is defined?
13:37:53Araqyes, use a 'mixin' declaration inside the generic
13:40:07PMunch@kaushalmodi, @Vindaar: 128 passed, 0 failed
13:40:21PMunchPushed a fix, passes all the tests now :)
13:41:19*shadowbane joined #nim
13:43:50FromGitter<kaushalmodi> PMunch: awesome!
13:44:00FromGitter<kaushalmodi> please cut a new major release of parsetoml
13:44:05PMunchAah, will do
13:44:11FromGitter<Vindaar> @PMunch: nice work! :)
13:44:48Araqalso, if you did it the way I think you did, toml still works with 0.19
13:45:59sealmoveA proc that uses a global is not a closure right?
13:46:47PMunchAraq, supports 0.18.0 and up: http://ix.io/1Lov
13:46:59FromGitter<kaushalmodi> (https://files.gitter.im/nim-lang/Nim/VkeB/image.png)
13:47:02FromGitter<kaushalmodi> PMunch: yay!
13:47:36FromGitter<kaushalmodi> PMunch: note that travis tests parsetoml only on Nim devel
13:48:22*couven92 quit (Quit: Client disconnecting)
13:48:57PMunchHmm, TOML has a 0.5.0 version
13:49:07PMunchAnd so far the version number of parsetoml has tracked the TOML version
13:49:15PMunchBut the TOML test suite is still on 0.4.0..
13:49:35PMunchI'm pretty sure I fixed parsetoml to support 0.5.0 though, but not 100% sure
13:49:55FromGitter<kaushalmodi> burntsushi needs to merge the PR for adding testsuite for 0.5.0
13:50:41FromGitter<kaushalmodi> there are a lot of tests for 0.5.0: https://github.com/BurntSushi/toml-test/pull/51
13:50:42PMunchI actually found a test tool that would generate test cases based on the TOML ABNF specification
13:50:57PMunchBut that apparently isn't 100% strict, especially dates are messed up
13:54:47PMunchHmm, apparently not.. 140 passed, 31 failed
13:55:23FromDiscord_<koalefant> @Araq thank you. Generic code compiles now, but it fails during instantiation, overload is missing from "but expected one of:"
13:55:49FromDiscord_<koalefant> Will get a better test case, never mind
13:57:40PMunchHmm, the README even says that it supports 0.5.0..
13:58:00PMunchI guess that test suite got an update since that was written..
14:00:24PMunchHmm, some of those seem to be caused by a bug in the toml-test library..
14:00:47PMunch"Malformed parser output. 'value' should be a JSON array when 'type' indicates 'array', but it is a map[string]interface {}.", but the output looks fine compared to the .json file..
14:11:40*shadowbane quit (Quit: Konversation terminated!)
14:13:40*shadowbane joined #nim
14:18:47*leorize joined #nim
14:23:35*hoijui joined #nim
14:32:16*laaron quit (Remote host closed the connection)
14:33:53*laaron joined #nim
14:45:27FromDiscord_<turbosoggy> Virgin nim vs chad zig
15:06:08*deech joined #nim
15:14:58FromGitter<jrfondren> "wasting time trying to improve docs" / "doesn't even know what documentation is"
15:17:15PMunchHmm, do we have nan float literals?
15:17:47narimiranPMunch: http://nim-lang.github.io/Nim/system.html#NaN
15:18:50PMunch!eval import strutils; echo parseFloat("nan") == NaN
15:18:54NimBotfalse
15:18:56FromGitter<jrfondren> oh, so floats don't follow the "initialized to binary zero" of the rest of nim.
15:19:21FromGitter<jrfondren> !eval import strutils; echo parseFloat("NaN") == NaN
15:19:25NimBotfalse
15:19:30PMunchOh, I'm an idiot: Note that you cannot compare a floating point value to this value and expect a reasonable result
15:19:36FromGitter<jrfondren> !eval import strutils; echo parseFloat("NaN")
15:19:37PMunchFrom the manual for NaN :P
15:19:41NimBotnan
15:20:01FromGitter<jrfondren> yeah, the capitalization doesn't matter either to parseFloat
15:21:38FromGitter<jrfondren> there's a dom.isNaN ...
15:22:19PMunchhttp://ix.io/1Lp2
15:22:36PMunchHmm, problem is that the toml tests wants to see the sign bit..
15:23:00PMunchWhich is either not parsed by strutils, or distinguished by the math module
15:27:41narimiranfor benchmarks' lovers: optimize this https://github.com/cart/godot3-bunnymark
15:30:47disruptekis there some way for me to put my `Error: target STRING not available
15:31:07disruptekoops. my tab -> spaces conversion into nim.cfg versus including it in every source file?
15:32:38laaronwhat is error: times.nim(2526, 15) Error: cannot 'importc' variable at compile time; clock_gettime
15:33:26noonienit probably means `const` isn't what you think it is
15:35:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
15:35:35FromGitter<jrfondren> !eval import times; let x = epochTime(); echo x
15:35:39NimBot1560180938.632764
15:35:44FromGitter<jrfondren> !eval import times; const x = epochTime(); echo x
15:35:48NimBotCompile failed: /nim/lib/pure/times.nim(2526, 15) Error: cannot 'importc' variable at compile time; clock_gettime
15:37:15*laaron joined #nim
15:48:25laaronseems macro related, buf this proc is in a proc which called in a macra
15:48:44FromGitter<jrfondren> it's not macro related.
15:48:58FromGitter<jrfondren> epochTime is a proc that you can't call at compile-time.
15:49:04PMunchhttp://ix.io/1Lpg
15:49:08PMunch169 passed, 2 failed
15:49:19*mbomba joined #nim
15:49:23PMunchOne I don't think I can fix, the other I'm not sure what is even wrong :P
15:49:54FromGitter<jrfondren> good ratio though.
15:50:00laaronbut i'm not called this at compile-time, or maybe some where called but i don't know
15:50:13PMunchYeah problem is that it isn't compatible with the official output..
15:51:59lqdev[m]laaron: `const` is a compile-time constant
15:52:31lqdev[m]likewise, macros are expanded at compile-time
15:53:04*mbomba quit (Quit: WeeChat 2.5)
15:54:45*ng0_ is now known as ng0
15:55:53laaronhere is macro part about this call, is that the problem: newCall("call_epochTime_proc")
15:59:12FromGitter<jrfondren> the annoying thing about this error is that it seems that you can't something like a stack trace
16:00:55laaroni see, this proc called in macro
16:03:08*natrys joined #nim
16:09:19PMunch@kaushalmodi, @Vindaar, pushed 0.5.0 of parsetoml now. It passes all but one of the new test cases :)
16:09:31PMunchI also added a nimble target to test with the new tests
16:12:26*nsf joined #nim
16:15:11*deech quit (Ping timeout: 258 seconds)
16:21:36*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
16:22:09*laaron joined #nim
16:24:54*deepend quit (Quit: o/)
16:28:42*deepend joined #nim
16:33:38*PMunch quit (Remote host closed the connection)
16:36:16*c3v0axz quit (Ping timeout: 248 seconds)
16:36:35*c3v0axz joined #nim
16:39:13*stefanos82 quit (Quit: Quitting for now...)
16:45:10FromGitter<kaushalmodi> PMunch: Thanks. I just pulled the parsetoml repo and `nimble run_new_toml_tests` gives http://ix.io/1LpB/text
16:45:46FromGitter<kaushalmodi> somehow travis is failing on `nimble run_toml_tests` (being unable to find that task).. but it's passing locally.. need to investigate
16:46:49FromGitter<kaushalmodi> > 169 passed, 2 failed ⏎ ⏎ PMunch: how are your numbers different?
16:51:21*qxxxb joined #nim
16:54:49*hoijui quit (Quit: Leaving)
17:08:41*envoyt joined #nim
17:09:08*neceve quit (Remote host closed the connection)
17:20:09FromGitter<kaushalmodi> odd, Travis is not finding the task in the nimble file: https://travis-ci.org/NimParsers/parsetoml/builds/543805185#L1388 ⏎ Here's the nimble file: https://github.com/NimParsers/parsetoml/blob/master/parsetoml.nimble
17:20:20FromGitter<kaushalmodi> I cannot reproduce that error locally
17:24:16FromGitter<kaushalmodi> interestingly `nimble install parsetoml` is installing a "0.3.2" version
17:24:17FromGitter<kaushalmodi> https://travis-ci.org/NimParsers/parsetoml/builds/543805185#L1351
17:24:24FromGitter<kaushalmodi> but the latest tag is 0.5.0
17:24:54FromGitter<kaushalmodi> .. and there has been *no* 0.3.2 version of the parsetoml package
17:34:03FromGitter<kaushalmodi> I don't understand this.. but earlier the git tag on parsetoml was "0.5.0" and `nimble install parsetoml` fetched a 0.3.2 version of parsetoml (which never existed).
17:34:39FromGitter<kaushalmodi> I deleted the "0.5.0" tag and created a "v0.5.0" tag and now `nimble install parsetoml` fetches 0.5.0 version of it (as expected)
17:34:44FromGitter<kaushalmodi> a nimble bug?
17:34:57leorizeprobably
17:35:02leorizeshashlick: ^
17:37:18FromGitter<Vindaar> @PMunch: nice!
17:38:16*luis_ joined #nim
17:38:36FromGitter<kaushalmodi> and now parsetoml passes on travis: https://travis-ci.org/NimParsers/parsetoml/builds/543840143
17:38:48FromGitter<kaushalmodi> moral of the story: prefix git tags of nimble packages with "v"
17:39:19shashlickokay so is it a nimble issue? haven't read the details
17:39:58FromGitter<kaushalmodi> looks like it
17:40:05FromGitter<kaushalmodi> I am typing the details in an issue right nows
17:40:09FromGitter<kaushalmodi> s/nows/now
17:43:43shashlickokay cool, i'll look
17:43:47shashlickwill wait for the issue
17:47:48*couven92 joined #nim
17:49:51FromGitter<kaushalmodi> issue https://github.com/nim-lang/nimble/issues/666 (cool number)
17:53:38shashlick@Araq @narimiran @dom96 - http://travis-ci.org has shown willingness to enable debug and extend our time limit
17:54:01shashlicklet me know which repos we want enabled and extended beyond 50 minutes (and a reasonable upper limit)
17:54:13shashlickthey cannot go above 5 parallel jobs though for open source projects
17:55:56Araq:O
17:55:59narimiranshashlick: once leorize does his magic, we'll have azure pipelines for all our parallel job needs :)
17:56:46Araqwell 60 minutes for timeouts should be our limit, some restrictions on our testing infrastructue keep us creative
17:57:49*i7sDream_ quit (Remote host closed the connection)
17:59:32*qxxxb quit (Quit: WeeChat 1.9.1)
18:02:11Zevvat one of my customers they were so desparate they implemented 'stochastic testing'. Just run X % of all tests on every commit, and hope for the best :)
18:03:06Araqwe optimize our tests instead
18:03:11Zevvyes please
18:03:41FromGitter<xmonader> is the tests long time because of some integration tests or benchmarks or something? 1 hour for tests non integration tests is bit long no?
18:04:06narimiranit's because travis is slow ;)
18:05:20Araqwhat do you mean "non integration tests"? Nim's tests are integration tests.
18:05:43FromGitter<xmonader> afaik the tests run sequentially with megatest no? i'm sure they can be grouped/parallized
18:06:17*narimiran tries to resist the urge to write "PRs welcome"
18:07:30leorizetestament cleanup code is never actually ran for the main process...
18:08:41FromGitter<xmonader> @Araq I mean as in pure tests and property check for procs as opposed to setting up e.g database server and check the component actually works against real thing.
18:09:36FromGitter<xmonader> @narimiran these days aside from sleep I've max 4 hours left, maybe I can try to check in the weekend with your help ofc :)
18:10:54Araqso ... how many test suites for fullblown programming languages have you looked at to make this comparison?
18:11:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
18:11:58*laaron joined #nim
18:14:05disruptekwhat's going on here? https://gist.github.com/disruptek/3e47e73f16255b1966bc0612e18ec23c
18:16:07Araqconverters do not work as you think they do?
18:16:20disruptekyeah, what am i missing? ;-)
18:16:21FromGitter<xmonader> @Araq, None, but I worked on large codebases with pure tests and integration tests too.
18:19:18disrupteki guess i'm confused as to why converters have any bearing on this code.
18:21:04*mbarkhau joined #nim
18:21:46shashlick@Araq - so doesn't look like you want to extend the timeout
18:24:01Araqdisruptek, what other 'contains' do you think should be called?
18:25:35disruptekthe one i get when i don't define converters.
18:26:00Araqproc contains*[T](a: openArray[T], item: T): bool # this one?
18:27:36Araqthat too requires a conversion and so
18:27:37Araqproc contains*(node: JsonNode, key: string): bool
18:27:40Araqis the better match
18:28:37Araqbut I agree with you, it sucks
18:28:44disrupteki see, the sig is stronger. thanks.
18:29:08Araqbut in the end, auto conversion to JSON is a super bad idea
18:29:11disruptekit makes sense. not sure there's an easy way to make it less surprising, either.
18:29:40*luis_ quit (Remote host closed the connection)
18:29:43Araqthere is a way, but it requires to change the spec...
18:29:51disruptekhow so?
18:30:07*luis_ joined #nim
18:30:16Araqwe can make "conversions through converters are worse than builtin conversions"
18:30:42disruptekthat doesn't seem right to me.
18:31:08Araqgood, because these things should be avoided like the plague for our v1 plans
18:31:21disruptekno kidding.
18:33:48*vlad1777d quit (Ping timeout: 272 seconds)
18:34:54*vlad1777d joined #nim
18:38:00FromGitter<xmonader> I tried to run gnu parallel on the test suite and i get lots of IO Errors ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cfea38882c2dc79a584199a]
18:38:27leorizethat's not how you use the test suite...
18:39:06FromGitter<xmonader> @leorize why not? the readme says ⏎ ⏎ ```koch tests cat <category>``` [https://gitter.im/nim-lang/Nim?at=5cfea3ca481ef4167b02f23f]
18:39:53leorizerun testament directly
18:40:01leorizekoch tests rebuild compiler + testament for each run
18:40:14*Trustable quit (Remote host closed the connection)
18:42:37FromGitter<xmonader> what is testament? and I'm just trying to run categories in parallel don't mind the overhead of rebuilding nim for now
18:42:43shashlicki believe testament already runs categories in parallel
18:42:49shashlickbut each category goes in sequence
18:42:54leorizetestament is the testing program
18:42:59leorizekoch is merely a build tool
18:43:05narimirantestament/tester.nim:681 # 'pcat' is used for running a category in parallel.
18:44:14FromGitter<xmonader> aha, thanks for clearing that out
18:45:23leorize`defer:` is not run when you `quit`
18:45:31leorizeis that a bug?
18:49:15Araqnah, use atQuitProc instead
18:50:08*stefanos82 joined #nim
18:58:51shashlickwe need to look into running individual tests in parallel rather than categories
18:59:08shashlicksince in the beginning, things run fast, then towards the end, the GC tests take their own sweet time in sequence
18:59:41shashlicki could run all tests in 3 minutes on my 32-core system, most of it was spent in the gc tests
19:00:00narimiranbragging time, huh? :D
19:00:09Araqmeh, we can also split up the GC tests into multiple categories :P
19:00:58leorizeo
19:01:38shashlickfor all practical purposes, we aren't going to have that many cores in our CI
19:02:18shashlickso i'm uncertain if making any changes is worthwhile
19:10:34*luis_ quit (Quit: luis_)
19:13:03*luis_ joined #nim
19:14:31shashlickAnother thing is whether I should use Travis build stages to optimize nightlies or hold off until leorize moves CI to azure
19:14:56leorizeI've actually done w the work
19:14:59shashlickThough I think he's working on our devel CI so maybe leaving nightlies on Travis is OK
19:15:22leorizenow just tweaks on the integration with azure pipelines test tab
19:15:26leorizewhich is going well
19:15:28*vlad1777d quit (Ping timeout: 245 seconds)
19:15:41shashlickOk do you think moving nightlies there is warranted
19:16:06shashlickNeed win/lin/osx and qemu support
19:17:25leorizeall of those are supported
19:17:32leorizealthough I think we should span it out
19:17:40leorize10 free jobs per org
19:18:27leorizeso if used for CI it will take 6 per build
19:25:49*luis_ quit (Ping timeout: 252 seconds)
19:32:08Araqhttps://github.com/nim-lang/Nim/issues/11434 can anybody confirm it's a choosenim bug?
19:32:41sealmoveAraq: I've been trying to find information on "Ada's second stack" but can't find anything online. Do you have any relevant link?
19:33:37leorizeAraq: c2nim is never built with the normal ./koch tools
19:34:55Araqah, we only "bundleC2nim" it
19:35:42*rayman22201 joined #nim
19:40:38*leorize quit (Remote host closed the connection)
19:41:28*leorize joined #nim
19:44:13*luis_ joined #nim
19:45:51*jjido joined #nim
19:50:56*lritter quit (Ping timeout: 248 seconds)
19:55:52shashlickbundleC2nim() is called in zip / nsis but it just pulls and builds c2nim into the dist dir
19:56:03shashlickso it isn't done for xz
19:56:19shashlickplus even on win, niminst doesn't take it along
19:56:50*I_Right_I joined #nim
19:59:01*couven92 quit (Quit: Client Disconnecting)
20:01:25*luis_ quit (Quit: luis_)
20:01:42*lf-araujo joined #nim
20:02:04*lf-araujo quit (Remote host closed the connection)
20:07:40shashlick0.16.0 had c2nim in the bin folder on windows
20:08:26shashlickbut not in linux
20:11:05*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:14:02*nsf quit (Quit: WeeChat 2.4)
20:15:16*lf-araujo joined #nim
20:19:34*lf-araujo quit (Client Quit)
20:19:51*lf-araujo joined #nim
20:22:38*vegax87 joined #nim
20:30:14lqdev[m]shashlick: any news on multidim array support in nimterop?
20:30:24*chamar joined #nim
20:31:02shashlickthat's a bigger lift, have an issue from @zestyr for it https://github.com/nimterop/nimterop/issues/54
20:31:25shashlickproblem is that it is recursive so I can add 2-dimensional then 3-dimensional won't work, etc.
20:32:01lqdev[m]ah that sucks
20:32:05shashlickadding n-dimensional requires an arch change
20:32:26shashlickbut am wondering whether i should keep it simple or make it even more complicated
20:32:37lqdev[m]I guess I'll have to resort on using a lightweight wrapper for miniaudio then
20:32:47lqdev[m]not a big deal, just a bit of C code
20:32:52shashlickyou can just wrap those separately with cOverride
20:33:05shashlickmanually, and leave the rest to nimterop
20:33:06lqdev[m]that's also an option
20:34:08shashlickthat's the difference with the nimterop method - it doesn't die if it doesn't understand stuff so it can help partially
20:34:21*vlad1777d joined #nim
20:34:27shashlickrest can be defined with cOverride and even if the feature is enabled, it will continue to work
20:35:25*I_Right_I quit (Remote host closed the connection)
20:35:38*Vladar quit (Remote host closed the connection)
20:39:52*I_Right_I joined #nim
20:41:33*lf-araujo quit (Remote host closed the connection)
20:53:57FromGitter<kaushalmodi> 7k stars!
21:00:58*envoyt quit (Ping timeout: 246 seconds)
21:03:50lqdev[m]shashlick: how can I get a #define in nimterop, to set the size of an array? I guess it just works because it's declared as a const?
21:03:55*narimiran quit (Ping timeout: 248 seconds)
21:05:49*natrys quit (Quit: natrys)
21:07:02lqdev[m]nope, I can't just use them in `cOverride`
21:11:18shashlicksnippet?
21:11:48shashlickthe problem is that cImport will happen after cOverride
21:12:00shashlickso if you want to refer to symbols before they are imported ... you know
21:12:32lqdev[m]ah man
21:12:32lqdev[m]that's annoying
21:13:08shashlickyep so part of the problem with cOverride is that you need to override more than you really need
21:14:48lqdev[m]how can I import a #define then? I want to keep it in the header
21:17:34FromGitter<brentp> anyway to set the float precision for json encoding?
21:19:56shashlickall #defines that are float, int or hex are imported by nimterop
21:20:11shashlickthey should be available after cImport
21:20:27shashlickwhich one did you want
21:20:33lqdev[m]problem is, I need them in the cOverride
21:20:55lqdev[m]I need `#define MA_MAX_CHANNELS 32`
21:24:04*lf-araujo joined #nim
21:33:22shashlickwell you need to override that too then
21:33:28dom96Was 'defer' ever allowed at the top-level?
21:34:21FromGitter<jrfondren> it used to not error at the top-level, but I'm not sure if it did anything
21:38:19*lf-araujo_ joined #nim
21:40:12*PMunch joined #nim
21:40:52*lf-araujo quit (Ping timeout: 246 seconds)
21:40:54*lf-araujo_ is now known as lf-araujo
21:44:00*PMunch quit (Remote host closed the connection)
21:46:51*sealmove quit (Quit: WeeChat 2.4)
21:47:43*lf-araujo quit (Ping timeout: 252 seconds)
21:53:34*lf-araujo joined #nim
21:56:12dom967k stargazers on GitHub!
21:56:27lqdev[m]shashlick: how do I wrap a union
21:56:31lqdev[m]?
21:57:02lqdev[m]the only way I can think of is by creating a helper object with the `{.union.}` pragma
21:58:36*shashlick quit (Remote host closed the connection)
21:58:56*shashlick joined #nim
21:59:24*jokul joined #nim
22:00:43shashlickyou looking at those nested unions?
22:00:56lqdev[m]yeah
22:01:27*lf-araujo quit (Remote host closed the connection)
22:02:06shashlickc2nim handles those just fine
22:02:08*Snircle quit (Read error: Connection reset by peer)
22:02:19shashlickmight want to run those snippets by c2nim for what it should look like
22:02:30shashlicknested structures is another todo for nimterop
22:02:48shashlickhttp://ix.io/1LrM/nim
22:03:12*Snircle joined #nim
22:07:56*smitop joined #nim
22:10:31*lf-araujo joined #nim
22:35:07*dwdv quit (Ping timeout: 248 seconds)
22:37:45*deech_ quit (Remote host closed the connection)
22:38:04*deech_ joined #nim
22:39:35*ng0 quit (Ping timeout: 256 seconds)
22:54:17*envoyt joined #nim
22:57:21disrupteknim kicking some a** in my codebase today and i just wanted to say `thanks`. :-*
23:08:38*sealmove joined #nim
23:15:28*deech_ quit (Ping timeout: 245 seconds)
23:39:12*envoyt quit (Ping timeout: 248 seconds)
23:39:36*envoyt joined #nim
23:41:24*lf-araujo quit (Remote host closed the connection)
23:44:39*deech joined #nim
23:47:06*vivus joined #nim
23:47:06*vivus quit (Read error: Connection reset by peer)
23:56:35*I_Right_I quit (Remote host closed the connection)