<< 18-12-2019 >>

00:35:22FromGitter<Milerius> Hey, everyone is sleeping ? :p
00:35:50*pbb joined #nim
00:37:00*Hideki_ joined #nim
00:39:02*seni quit (Quit: Leaving)
00:39:34*sknebel quit (*.net *.split)
00:39:47*sknebel joined #nim
00:44:53shashlickYa is midnight for many
00:44:56FromDiscord<Fern & Simula (They/Them)> Yes
00:45:00*Hideki_ quit (Remote host closed the connection)
00:45:03shashlickBut still some folks on here
00:46:57*Hideki_ joined #nim
00:51:35*Hideki_ quit (Ping timeout: 265 seconds)
00:52:09blackbeard420only 19:52 here
01:06:24*icebattle quit (Ping timeout: 246 seconds)
01:09:20*Tanger joined #nim
01:27:18*leorize joined #nim
01:32:46disruptek#12818
01:32:48disbothttps://github.com/nim-lang/Nim/issues/12818 -- 3inheritance and generics and ambiguous error message ; snippet at 12https://play.nim-lang.org/#ix=24K1
01:56:27FromGitter<gogolxdong> @disruptek /mnt/d/nimph/src/nimph/git.nim(706, 16) Error: undeclared identifier: 'git_clone_options_init'
01:56:37disruptekyou need a newer libgit2.
01:56:47FromGitter<gogolxdong> how to
01:56:48disruptek(ie. master)
01:57:05disrupteksee the src/nimph.nim.cfg
01:57:06FromDiscord<exelotl> wow it's super cool that you can do newLit(object)
01:57:33disruptek--define:git2SetVer:"master"
01:57:43FromGitter<gogolxdong> --define:git2SetVer:"master"
01:58:02FromGitter<gogolxdong> It is.
01:58:12disruptekhmm, you're right.
01:58:20disruptekand actually, i have a `when` in there to handle that.
01:58:28disruptekwhat os is this?
01:59:11FromGitter<gogolxdong> WSL ubuntu18.04
02:00:01disruptekshashlick just added ci to nimph and it tests on windows, and i test on linux. but we don't test on wsl.
02:00:30disruptekdid you use the bootstrap.sh?
02:01:00FromGitter<gogolxdong> I tried nimble install and ./bootstrap.sh both.
02:01:25disruptekyou get the same error when you run the bootstrap, right?
02:01:33FromGitter<gogolxdong> yes.
02:01:56disruptekand you also have --define:git2Git in that file, right?
02:02:00disruptekin the nimph.nim.cfg?
02:02:13FromGitter<gogolxdong> yes, I have.
02:02:36disruptekcan i see the rest of the output?
02:02:54disruptekit feels like it's not linking correctly, but i don't know why that would be.
02:03:27disruptekmaybe because nimterop stores the .so in a .cache and wsl is puking on that?
02:03:53FromGitter<gogolxdong> https://play.nim-lang.org/#ix=24K7
02:04:20FromGitter<gogolxdong> How do you handle nimgit2?
02:04:53*lkw quit (Ping timeout: 245 seconds)
02:04:58disrupteknimterop does its magic.
02:06:19disruptekthis is nim-1.0.4?
02:06:22FromDiscord<Rika> Does the bridge support images?
02:06:23FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/656678612790935562/Screenshot_20191218-110554.jpg
02:06:28FromGitter<gogolxdong> latest devel
02:06:33FromDiscord<Rika> https://dev.to/zaiste/programming-languages-to-learn-in-2020-to-boost-your-career-as-a-software-developer-56ll
02:06:33FromDiscord<Rika>
02:06:33FromDiscord<Rika> Found an article talking about Nim
02:07:59disruptekcan i see the output from the bootstrap?
02:09:03*lkw joined #nim
02:10:17FromGitter<gogolxdong> the same when I paste to playground.
02:10:19disruptek0.4.2 passed windows ci and it just uses nimble for installation.
02:10:47FromGitter<gogolxdong> nimterop building failed on Windows btw.
02:10:59disruptekah, well that's a problem.
02:11:03FromGitter<gogolxdong> ` Error: unhandled exception: cannot open: C:\Users\lxdon\nimcache\nimterop\nimterop\treesitter_c\src\api.h [IOError]`
02:12:01disruptekyour error message from nimph compilation seemed to suggest that you have a libgit2 library, though.
02:12:08disruptekdid you build that with nimterop?
02:14:06FromGitter<gogolxdong> built once with nimterop in WSL.
02:14:42FromGitter<gogolxdong> Just got the debug output of git2.h .
02:15:16disruptekoh, you built nimgit2 once.
02:15:54disruptekmy guess is that you build a 0.28.3 version, which is the default for nimgit2 iirc.
02:16:09disruptekbut you'll need to build a master for nimph.
02:16:35FromGitter<gogolxdong> What to do next?
02:16:52disruptekyou have to get nimterop building. try installing 0.3.3. that one was very stable.
02:17:21disruptekthen you should be able to build nimph and it'll build a new libgit2 so and link correctly.
02:17:33FromGitter<gogolxdong> WSL nimteop works, failed on Windows.
02:17:42disruptekmake sure you remove any nimterop-0.3.5.
02:19:16*MightyJoe quit (Ping timeout: 248 seconds)
02:19:50*cyraxjoe joined #nim
02:19:55shashlickIs 0.3.5 broken?
02:20:14disruptekhe's having trouble with it on wsl/ubuntu.
02:20:53shashlickI see, don't have that to try
02:21:00shashlickUbuntu proper works though
02:21:52shashlickCan you isolate - git clone and run nimble test just for nimterop
02:22:18FromGitter<gogolxdong> which version
02:23:06shashlickLatest
02:26:55disruptekwe're gonna have to add a lib target somehow so we can localdeps nimgit2; that's really the source of the problem here.
02:26:55FromGitter<gogolxdong> https://play.nim-lang.org/#ix=24Ka
02:28:49shashlickDo you have git, curl, wget?
02:29:25FromGitter<gogolxdong> yes
02:34:00disrupteknimph-0.4.3 (now) builds with 0.28.3, so that might solve part of the problem.
02:35:38disruptekbut, lockfiles won't work. it'll explain that you need a newer libgit2...
02:36:19disruptekalso tagging. ๐Ÿ˜ข
02:37:45FromGitter<gogolxdong> --define:git2SetVer:"v0.28.3" results the same. I didn't see how nimph use nimterop to get git_checkout_options_init identifier , as nimgit2.nim seems only get what's included in git2.h.
02:38:27disrupteki thought you have a 0.28.3 libgit2?
02:39:45shashlickdisruptek: why not always download libgit2 yourself instead of searching the standard path
02:39:59disrupteki do.
02:40:14shashlickya just saw your cfg
02:40:20disruptekgogolxdong was able to build it only once, so i just thought maybe i could get him running with it.
02:42:24FromGitter<gogolxdong> nimgit2 downloaded 0.28.3 to /root/.cache/nim/nimterop/nimgit2/
02:43:03*abm quit (Read error: Connection reset by peer)
02:43:25FromGitter<gogolxdong> I think 0.28.3 has no difference with master regarding git_checkout_options_init identifier.
02:43:52disruptekit does. it's git_checkout_init_options in one and git_checkout_options_init in the other.
02:44:35FromGitter<gogolxdong> ok, I cloned master to another directory.
02:45:09FromGitter<gogolxdong> Am I supposed to replace 0.28.3 with it under /root/.cache/nim/nimterop/nimgit2/?
02:46:45shashlickokay i still don't have enough info to debug any nimterop stuff here
02:47:58*leorize quit (Quit: WeeChat 2.6)
02:48:29disruptekwell, i'm pushing another change to support 0.28.4 and to merely warn (instead of crashing) when you have an old libgit2.
02:49:48disruptekcan we see more of the nimterop test failure?
02:53:52shashlickanyone wanting to setup travis CI for your nim package across win/lin/osx and multiple nim versions, check https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522
02:58:09*leorize joined #nim
03:08:39FromGitter<gogolxdong> https://play.nim-lang.org/#ix=24Kg build failed for 0.4.3 nimph
03:09:46disruptekyou'll have to tell it that you want libgit-0.28.3 to try to use the 0.28.3 lib you have.
03:10:08disruptekfor some reason, your git cannot checkout stuff.
03:10:14disruptekare you behind the great firewall?
03:10:21FromGitter<gogolxdong> I'm using master, is it right
03:10:36FromGitter<gogolxdong> git works
03:11:03disruptekthat error is saying that it cannot git pull.
03:11:20disruptekbut, you can skip all that and use the nimgit lib you built if you tell nimph you want 0.28.3.
03:11:27disruptekin nimph.nim.cfg
03:12:20disruptekthat might help you get a working setup from which you can build a master libgit2 and then build a fully-working nimph.
03:15:44FromGitter<gogolxdong> That might be out of timeout while cloning, but I cannot see more details.
03:15:59disruptekit looks like a directory issue.
03:16:14disruptekpermissions, maybe?
03:17:02*adelrune joined #nim
03:18:58sealmoveis "index out of bound" a catchable exception?
03:19:20disruptekwelcome to the debate.
03:19:26aeverr[m]What
03:19:28adelruneHi ! Can any one of you point me to some information on the current state of list comprehension in nim ? All the information I'm finding is either outdate or very vague. I know the compiler is telling me that lc is deprecated and I found a reddit thread about for expressions but I can't find anything in the documentation. Thanks !
03:19:33aeverr[m]I don't get why it wouldn't
03:20:00aeverr[m]Lc was removed from the standard library as far as I know
03:20:15FromGitter<gogolxdong> ah, it's permissions , lastest nimph works with lastes nimgit2 and latest libgit2
03:20:18disruptek!rfc defect tracked
03:20:18disbothttps://github.com/nim-lang/RFCs/issues/77 -- 3[RFC] Exceptions that inherit from `system.Defect` should not be tracked
03:20:25disruptek!issue defect
03:20:26disbothttps://github.com/nim-lang/Nim/issues/12862 -- 3The Defect exceptions are not consistently tracked 7& 13 more...
03:20:37disruptekgogolxdong: yay!
03:20:50aeverr[m]adelrune, https://github.com/nim-lang/graveyard
03:21:02disrupteklc should be in a nimble package now.
03:21:27disruptek!package comprehension
03:21:27disbothttps://github.com/nim-lang/graveyard/tree/master/lc -- 9list_comprehension: 11List comprehension, for creating sequences.
03:21:34sealmovedisruptek: I am running a unittest file with many tests. some throw exception and because of this the remaining tests don't run :( what can I do? try ... except obviously doesn't work...
03:21:47disruptekdisbot: there's really nothing you can't do, amiright?
03:21:48disbotyep. ๐Ÿ˜Š
03:22:21FromGitter<gogolxdong> I kind of get the point of nimph, you are using git2 protocols to maintain versions, right?
03:22:22disruptekthere are mechanisms to test for exceptions in unittest.
03:22:26adelruneso the answer is "it was removed but you can import it from the graveyard" ?
03:22:44disruptekgogolxdong: that's one feature, yes.
03:23:35disruptekit's awesome to be able to `nimph clone foo` and then decide to fix foo: `nimph fork foo; cd (nimph path foo); echo fix > foo.nim; git push`
03:23:53sealmoveadelrune: https://github.com/alehander92/comprehension, https://github.com/b3liever/comprehension
03:24:17disruptekthat's pretty comprehensive.
03:24:39adelruneok, I'll try that, thanks
03:24:40FromGitter<gogolxdong> Very close to what I'm trying to do, to improve git2 protocol in Nim. Do you know how to translate git2 into Nim as a whole?
03:24:42*adelrune left #nim (#nim)
03:25:04disruptekwhy do you want to do that? for git-inside-javascript?
03:25:56FromGitter<gogolxdong> One reason is QUIC, another is to improve Merkle DAG.
03:26:59disruptekit feels like a poor return on investment, but the code is pretty modern. have you tried c2nim?
03:27:12disrupteklibgit2 is pretty clean, i mean.
03:28:22FromGitter<gogolxdong> not yet, does c2nim translate a whole C project? I thought it handles single files.
03:28:51disruptekyes, you will have to translate all the files one at a time.
03:30:15FromGitter<gogolxdong> Do they process recursively or manually?
03:30:23disruptekmanually, most likely.
03:30:57FromGitter<gogolxdong> I need something automatically.
03:31:05disruptekwrite a shell script?
03:32:20FromGitter<gogolxdong> with c2nim ? I'm conceiving a tool translates C projects to Nim.
03:33:17disruptekyou should investigate it. i haven't used it and i could be mistaken. you might be able to just slurp up everything and output a single .nim file.
03:33:20sealmovedisruptek: unittest doesn't help. it provides a macro called `expect` for testing against exceptions, but I want to mark test as failed in case of an exception, and carry on with the rest of the tests, which is very different.
03:33:26shashlicknimterop has some code in cimport.nim to automate it but translating even headers is a challenge, let alone complete code
03:33:42disrupteksealmove: expect Failure: check false
03:33:55sealmove:O
03:35:10FromGitter<gogolxdong> yes, I can feel the difficulties.
03:35:23disruptekcue the intern.
03:37:13FromGitter<gogolxdong> I think have to look into gcc source code to find way out.
03:39:30*icebattle joined #nim
03:40:35sealmoveeh, `expect` doesn't work like that, you pass it the "test" to run, and it succeeds in cases it raises the specific exception. yep, unittest procs won't help.
03:40:54disruptekno, i'm using it that way successfully.
03:41:08disrupteki just have to remember where.
03:41:57disrupteksee bump's tests.
03:42:00disruptek!repo bump
03:42:01disbothttps://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions ๐Ÿป 15 8โญ 2๐Ÿด 7& 1 more...
03:42:14*ltriant quit (Quit: leaving)
03:42:51*icebattle quit (Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac)
03:42:52disruptekhmm, yeah, it succeeds if the exception is raised. so?
03:43:20disruptekare you saying you cannot catch IndexError? because, you can.
03:44:18sealmovefor some reason it's not catch :(
03:44:37sealmoveI use `except:` without specifying exception (should catch anything?)
03:45:05disruptekmaybe i'm wrong, but i thought Defects were catchable (which is a bug, afaic).
03:45:33aeverr[m]Some are right now yes
03:45:59disrupteksealmove: maybe you should not produce exceptions that are not catchable. ๐Ÿ˜‰
03:47:50sealmovebut I have a test suite with 132 tests
03:48:17sealmovesome of them will produce exceptions, the suite shouldn't crash
03:48:18disruptekcue the intern.
03:50:04*endragor joined #nim
03:51:55sealmoveNim/lib/system.nim(4025, 14) Error: index out of bounds, the container is empty
03:54:49sealmoveok I found the issue, apparently you can't catch an exception that happens in a macro, outside of it
03:55:20disruptekwow, exceptions cannot traverse macro boundaries.
03:56:16sealmovehttps://play.nim-lang.org/#ix=24Kp
03:56:40sealmovedisruptek, not sure if you are making fun of me :P
03:56:51disruptekno, that's surprising.
03:57:35sealmovewell, this limitation is painful for me...
03:57:58disruptekexceptions should be exceptional.
03:59:46FromDiscord<Rika> Just as exceptional as how bad that joke was
03:59:56disrupteknimph is >7k lines and i have like 25 try:s in the whole project.
04:00:04disruptekit's no joke; i don't use them.
04:00:58sealmoveok but... in testing, exceptions are not exceptional
04:01:12shashlickvoltist just converted nimssl from nimgen to nimterop and wrapped almost all of libssl and libcrypto
04:01:20disruptekvoltist?
04:01:31disrupteksealmove: if you can catch them, you should.
04:01:33voltistYo
04:01:44disruptekneat.
04:02:16disrupteksealmove: don't use exceptions for control flow. if you're going to handle an exception in a test, you can bother to write a codepath for it in your code.
04:02:38disruptekif you can handle the error at all, it's not exceptional, is it?
04:02:54voltistIt was mostly the doing of my bodged trial-and-error wrapper generator script :)
04:03:12disruptekall hail shashlick.
04:03:14disruptekPRAISE
04:03:59sealmoveerm, I just want my test suite to continue running and not crash
04:04:17sealmovei can't take care of exceptions in 132 tests right now
04:04:28sealmovei want them to all run and see what passes
04:05:01disruptekwrite a shell script to run each test individually.
04:05:35shashlickvoltist: i'm sure it was a lot of work
04:05:39sealmoveunittest doesn't support multi-file suite :(
04:05:54sealmoveit's really limited, maybe I should give testament a try
04:05:58disruptekyou run the suite with arguments to indicate which test you want.
04:06:27sealmovehmm
04:06:39sealmovethat's good, good idea
04:07:29disruptekmaybe i'll write a quality test framework next.
04:07:51disruptekthat's the kind of dead-simple code i'm good at writing.
04:07:58disrupteksomething i can design with a crayon.
04:08:43disruptekwhy can't exceptions escape macros?
04:09:01sealmovedunno, should we open an issue?
04:09:38disruptekthere's probably a good explanation (or an open issue). i'm just struggling to understand why it's a problem.
04:10:43sealmovebecause exceptions happen during runtime?
04:10:57sealmoveand macros execute at CT
04:11:00disruptekso? macros don't exist at runtime.
04:11:32sealmoveyeah, the exception happens in a sub-program in a sense
04:11:58sealmovethe sub-program being the VM execution that expands macros
04:12:37disruptekit expands them to normal code, though. when the code is fully-expanded, there's no more macro processing.
04:12:43disruptekit should be equivalent.
04:13:36disruptekit's like the exception gets tainted.
04:13:46disruptekbit by a radioactive spider, it becomes immortal.
04:14:57*nsf joined #nim
04:14:58disrupteki think it needs an issue at a minimum. the docs need to explain this, if it's desired behavior.
04:15:09aeverr[m]How do I make a converter? Are converters for implicit or explicit conversion?
04:15:20sealmoveagreed #12923
04:15:22disbothttps://github.com/nim-lang/Nim/issues/12923 -- 3Exceptions can't escape macros ; snippet at 12https://play.nim-lang.org/#ix=24Kz
04:15:29disruptekimplicit, but they only allow for a single conversion.
04:15:45disruptekreplace `proc` with `converter` and return the type you want to convert to.
04:15:45aeverr[m]What do you mean
04:16:04disruptekyou cannot implicitly convert to C from A via B.
04:16:23aeverr[m]So it has to have a direct converter
04:16:24aeverr[m]Okay
04:16:25disruptekA->C or A->B or B->C but not A->C.
04:16:28aeverr[m]Thanks
04:16:35disruptekyeah, something like that.
04:17:03disruptekthey are rarely a good idea, btw.
04:17:25disruptekor, at least, rarely a good idea to export.
04:17:31aeverr[m]Yeah, I thought they were for explicit conversion
04:17:52disruptekproc provides explicit conversion.
04:18:37aeverr[m]But then I have to name it `to{type}`
04:18:53disrupteknah, you can name it anything you want.
04:19:07aeverr[m]I mean that I cannot use the type name
04:19:24aeverr[m]Okay
04:19:28aeverr[m]It connects with me
04:19:34aeverr[m]I understand why not now
04:19:41sealmoveaeverr they are for implicit, the name exists just cause
04:19:57sealmovefor explicit just use the type name
04:20:27sealmove(without defining a convertor)
04:20:38disruptekyou can call them, too, just like procs.
04:21:08disrupteki usually call them explicitly. i just like the alternative color in my syntax highlighting; it just makes it more obvious.
04:26:12*chemist69 quit (Ping timeout: 248 seconds)
04:26:39sealmoveit's one of those feature which should be removed for making the language smaller imo
04:26:57FromDiscord<has1> Hi, is there something like this for nim? In c# I can create a class library and load the dll at runtime into my app. This allows me to have plugins for my app and add functionality to it that it would not have otherwise
04:27:32disruptekyeah, i think implicit stuff is generally more trouble than it's worth. that's why i'm not a fan of items/pairs.
04:28:02disruptekhas1: there's a neat plug-in system in feud.
04:28:05disruptek!repo feud
04:28:07disbothttps://github.com/genotrance/feud -- 9feud: 11Fed Ep with UDitors 15 20โญ 0๐Ÿด
04:28:23*chemist69 joined #nim
04:33:46*marmotini_ joined #nim
04:38:34FromDiscord<has1> Can I get a quick explanation of how it works?
04:39:46FromDiscord<has1> Does him have something built in? Like phps eval? Does nim have a plug-in system like c# that allows you to do something like assembly load a dll and call methods on it?
04:47:29shashlickhas1: there's a plugin.nim in the src directory that builds and loads the plugin dlls
04:47:37shashlickthere's also the pluginapi.nim that plugins can use
04:48:28shashlickyou'll need to extract it out of feud, it isn't standalone yet
04:58:35disruptekadded `nimph graph` ๐ŸŽ‰
05:04:49sealmovehow can I know if the command executed with staticExec was successful?
05:05:10sealmovewhat does nimph graph do?
05:09:45sealmoveoh there is gorgeEx
05:13:10disrupteknimph graph just dumps detail about the packages/projects/requirements of dependencies.
05:13:45disrupteki needed some way to inspect the dependency tree as i work on clashes, etc.
05:14:01sealmovenice
05:14:31disruptekjust another little thing.
05:14:37sealmovehmm, if `x` is a ref object, then `var y = x` does aliasing/
05:14:40sealmove?*
05:14:53sealmovehow do you hard copy?
05:15:05disruptekdereference with []
05:16:22disruptekit's not "aliasing"; think of it as copying the pointer.
05:16:45disruptekie. copying the value of the pointer to another pointer, so they both point to the same memory.
05:17:30sealmoveyup, i thought this was synonymous with aliasing
05:17:56disruptekmaybe that's what the kids are calling it these days. ๐Ÿ˜
05:19:08sealmovei need ref semantics though.. if i deref then I have an `mytypeObj` instead of a `mytype`
05:20:24sealmoveoh got it: https://nim-lang.org/docs/macros.html#copy%2CNimNode
05:24:28FromGitter<gogolxdong> @disruptek how to set github OAuth token, is it necessary?
05:57:11*narimiran joined #nim
06:05:42*couven92 quit (Read error: Connection reset by peer)
06:06:06*couven92 joined #nim
06:06:33*marmotini_ quit (Remote host closed the connection)
06:06:50*marmotini_ joined #nim
06:09:43*NimBot joined #nim
06:18:14FromGitter<gogolxdong> `please add a GitHub OAUTH token to your $NIMPH_TOKEN` I have added to ~/.bashrc, but still
06:19:11*gour joined #nim
06:20:26*marmotini_ quit (Remote host closed the connection)
06:23:15*marmotini_ joined #nim
06:28:15*dddddd quit (Remote host closed the connection)
06:32:29*marmotini_ quit (Remote host closed the connection)
06:41:33*marmotini_ joined #nim
06:42:47*marmotini_ quit (Remote host closed the connection)
06:59:28*sealmove quit (Quit: WeeChat 2.6)
06:59:31*marmotini_ joined #nim
07:11:32*fredrik92 quit (Ping timeout: 248 seconds)
07:15:24*solitudesf joined #nim
07:36:47*fredrik92 joined #nim
07:43:48*couven92 quit (Quit: Client Disconnecting)
07:44:19FromDiscord<Rika> How do I make a daemon in nim
07:44:52FromDiscord<Rika> Or maybe a better question is what approach should I take
07:47:17*PMunch joined #nim
07:48:04FromGitter<wibisono> Hi all, nim beginner here, haven't used it much but very intrigued to use it. What I noticed is that it lacks popularity and backing/funding. So maybe this info is relevant and can be explored. โŽ Community funding from RIPE NCC for internet resiliency: โŽ https://www.ripe.net/support/cpf โŽ โŽ So maybe, just maybe if there are interesting NIM based proposal for the good of the internet, it will help produce
07:48:04FromGitter... mature libraries. Example accepted proposals from previous periods: ... [https://gitter.im/nim-lang/Nim?at=5df9d9b4b1701e50ca43faf5]
07:48:58Araqwell ok, good idea, but is says "The 2019 call for applications is now closed."
07:49:07FromGitter<wibisono> Yeah sorry :(
07:49:10Araqand for 2020 there is nothing opened
07:49:19FromGitter<wibisono> so maybe for the next round, but I think it will open again
07:49:36Araqbookmarked it
07:49:53AraqRika: I don't know, same as you do it in C?
07:51:29AraqI wouldn't use daemons though because of Araq's rule 137: OSes suck and most features they offer are misdesigned.
07:51:35*Vladar joined #nim
07:53:43*marmotini_ quit (Remote host closed the connection)
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:00*marmotini_ joined #nim
08:01:19*lritter joined #nim
08:05:02*gmpreussner joined #nim
08:09:29*vesper11 quit (Ping timeout: 265 seconds)
08:14:19*vesper11 joined #nim
08:25:33*voltist quit (Quit: Leaving)
08:27:16FromGitter<Milerius> Hello !
08:27:40FromGitter<Milerius> I finally managed made my stuff work, I'm so so happy, there is the last step to do with nimterop and I got a question about it
08:30:22FromDiscord<Rika> Okay noted
08:32:22FromGitter<wibisono> @Araq I will notify you when the CPF is open, meanwhile here's another source of fund https://nlnet.nl/propose/ also internet related. โŽ โŽ https://nlnet.nl/themes/
08:32:42FromGitter<wibisono> not sure how all this will fits together but somehow it might
08:42:54PMunchI actually just contributed some code to NLNetLabs project Unbound in order to be able to use Nim with it :)
08:43:27PMunchBy the way, one of the speakers in our FOSDEM room just recently got a grant from NLNet for his project
08:49:52FromGitter<wibisono> Yup, they seem to have plenty of funding for open source
08:49:56FromGitter<wibisono> (https://files.gitter.im/nim-lang/Nim/FhlG/image.png)
08:50:31FromGitter<wibisono> Took that one from this NGI0 presentation: https://ripe79.ripe.net/wp-content/uploads/presentations/72-NGIZero-RIPE_OpenSourceWG.pdf
08:50:35FromGitter<wibisono> slide 24
08:57:17*jjido joined #nim
09:07:03*ldlework quit (Quit: co'o ro do)
09:10:36FromGitter<bung87> ```type ContextFactory* = proc(): net.SslContext``` โŽ โŽ in another proc, i pass it as arg , and call `var ctx:net.SslContext = contextFactory()` , compiler throw `Error: expression 'contextFactory()' has no type (or is ambiguous)` [https://gitter.im/nim-lang/Nim?at=5df9ed0cc0c8ef301bd15329]
09:12:24*ldlework joined #nim
09:20:39PMunchbung87, do you have a longer example?
09:22:11FromGitter<bung87> um, hold on itโ€™s in a lib
09:22:56PMunchBecause this works just fine: https://play.nim-lang.org/#ix=24Lm
09:26:42FromGitter<bung87> https://github.com/bung87/cero , run nimble test
09:27:33FromGitter<bung87> I check your exmaple , cant figure it out.
09:33:22FromGitter<bung87> because itโ€™s in generic ?
09:34:42FromGitter<bung87> `proc startTLS[T](transport:ConnectionMixin[T], contextFactory:ContextFactory, normal:bool, bypass:type) =` I call it inside this proc
09:34:46*letto quit (Remote host closed the connection)
09:35:23*tyler569 quit (Ping timeout: 250 seconds)
09:35:44PMunchTry to create a minimal example
09:36:18*letto joined #nim
09:38:39FromGitter<Milerius> Hey
09:38:47FromGitter<Milerius> It's possible to enable verbose for nim command line ?
09:39:17FromGitter<bung87> ok, I found another proble, I โ€˜ll fix it first.
09:41:18*tyler569 joined #nim
09:42:48PMunchMilerius, what do you mean?
09:43:21PMunchYou do have "--verbosity:0|1|2|3 set Nim's verbosity level (1 is default)" from "nim --fullhelp"
09:52:26FromDiscord<gingerBill> In Nim, how often are ranges used to define the index type in an array? e.g. instead of `array[3, string]`, `array[0..2, string]`
09:53:06FromDiscord<gingerBill> I know this is from Pascal but I never particularly used this feature whatsoever. I was wondering if anyone else did use this feature.
09:53:25FromDiscord<gingerBill> I know this is from Pascal but I never particularly used this feature whatsoever in Pascal. I was wondering if anyone else did use this feature.
09:57:07PMunchYou will see it sometimes
09:57:20PMunchBut for the 0..n case it's most normal to just use a number
09:58:45PMunchHowever you can of course also do [4..10, int]
09:59:17PMunchThat will create an array with valid indices [4] through [10]
09:59:54PMunchLike so: https://play.nim-lang.org/#ix=24Lv
10:01:51*letto quit (Quit: Konversation terminated!)
10:03:16*letto joined #nim
10:10:06FromGitter<Milerius> @PMunch Thanks!
10:10:22FromGitter<Milerius> Is it possible to use an environment variable inside a pragma ?
10:12:04PMunchMilerius, sure `getEnv` works on compile-time
10:12:20PMunchFrom the os module
10:13:21FromDiscord<mratsim> @gingerBill I did, for registers for example
10:14:06FromDiscord<mratsim> See: https://github.com/mratsim/chirp8/blob/91f737d8395b89085d841643b30d6f3ecc99366d/src/datatypes.nim#L11-L20
10:14:22FromDiscord<mratsim> I can directly index with 'A'..'F' registers
10:15:35PMunchOh yeah, I've also used it for enums
10:16:50PMunchLike so: https://play.nim-lang.org/#ix=24Ly
10:18:19PMunchOh by the way gingerBill, try to not edit your messages on Discord. They are sent as a brand new mesage on IRC which can be quite annoying
10:18:45PMunchex: https://irclogs.nim-lang.org/18-12-2019.html#09:53:06
10:19:15PMunchHmm, irclogs reference links are by timestamp
10:19:24FromDiscord<Rika> Bridge that can diff with 4 character context when
10:19:32PMunchSo you could theoretically link to something that hasn't happened yet
10:20:03PMunchhttps://irclogs.nim-lang.org/18-12-2019.html#10:20:00
10:20:10PMunchhttps://irclogs.nim-lang.org/18-12-2019.html#10:20:15
10:20:13PMunchhttps://irclogs.nim-lang.org/18-12-2019.html#10:20:15
10:20:15PMunchhttps://irclogs.nim-lang.org/18-12-2019.html#10:20:15
10:20:15PMunchhttps://irclogs.nim-lang.org/18-12-2019.html#10:20:15
10:20:19PMunchHey!
10:20:37PMunchA self referencing message!
10:21:16PMunch(And yes, I realise the irony in saying that repeat messages are annoying and then following up with spamming links to the irclogs..)
10:21:20FromGitter<kayabaNerve> Lol. Congrats PMunch :P
10:25:42FromGitter<Milerius> @PMunch what is the idiomatic way to concatenate at compile time ? โŽ โŽ I'm trying something like: โŽ โŽ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df9fea6e0131f50c9647f37]
10:26:36PMunchMilerius, the string concatenation operator in Nim is `&` not `+`
10:27:50FromDiscord<gingerBill> @mratsim The register example seems to be using it as an enumerated index (e.g. have an enum representing the indices). I can see the benefit there but not necessarily the general ranges.
10:29:06FromDiscord<mratsim> AFAIK it's not buggy and doesn't require maintenance o I don't mind
10:29:07FromGitter<Milerius> Yeah that's work ! Thank's a lot @PMunch !
10:29:17PMunchNo problem :)
10:29:57*ng0 quit (Quit: Alexa, when is the end of world?)
10:30:48*ng0 joined #nim
10:35:56FromGitter<Milerius> https://image.noelshack.com/fichiers/2019/51/3/1576665315-foo.jpg โŽ โŽ Say Hello to Nim + Imgui + High DPI + Viewport and Docking :D
10:40:52PMunchNeat!
10:41:54FromGitter<Milerius> For people interested the code look like that:
10:42:04FromGitter<Milerius> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dfa027ce0131f50c9649853]
10:42:41FromGitter<Milerius> (You can code your whole program between pre update and update)
10:44:34FromGitter<Milerius> I may have a really specific question now if someone can guide me
10:44:39FromGitter<Milerius> I finished OSX and Linux support
10:44:55FromGitter<Milerius> I would love to add Windows support Through MSVC or Clang (no mingw). โŽ โŽ Is it possible ?
10:45:41FromGitter<Milerius> how i can force nim to pickup clang on windows for example
11:07:00*jjido quit (Quit: Connection closed for inactivity)
11:21:53*Vladar quit (Quit: Leaving)
11:42:39*thomasross quit (Ping timeout: 268 seconds)
11:45:58*thomasross joined #nim
11:48:47*thomasross_ joined #nim
11:48:47*thomasross quit (Killed (rajaniemi.freenode.net (Nickname regained by services)))
11:48:47*thomasross_ is now known as thomasross
11:49:59FromGitter<Willyboar> @Milerius do you want nim to recognize the current OS?
11:56:20*thomasross quit (Ping timeout: 248 seconds)
11:56:31*abm joined #nim
11:58:11FromGitter<Milerius> It's ok i find the solution
11:58:15FromGitter<Milerius> But i come with another question
11:58:32FromGitter<Milerius> Is it possible to change "\\" to "/" at compile time using getEnv ?
12:01:44FromGitter<Milerius> i tried normalize path but that doesn't work at compile time
12:03:38lqdev[m]why'd you want to do that?
12:06:55*nsf quit (Quit: WeeChat 2.6)
12:08:51FromGitter<Milerius> for passL pragma
12:09:09FromGitter<Milerius> `{.passL: "-L" & os.getEnv("ProgramFiles(x86)").normalizedPath() & "/ui_workflow/lib" & " -lui_workflow" .}`
12:22:05*Hideki_ joined #nim
12:26:17PMunchimport strutils and do .replace("\\", "/") is certainly an option
12:28:31*ponyrider joined #nim
12:29:36*Mister_Magister quit (Excess Flood)
12:30:03*Mister_Magister joined #nim
12:46:17*endragor quit (Remote host closed the connection)
12:46:46*endragor joined #nim
12:51:41*endragor quit (Ping timeout: 250 seconds)
12:52:01PMunchHmm, I want to run a thread with an asyncloop to send network requests. And then have it read from a channel and then send them over the async sender
12:54:03PMunchCurrently I have something like this http://ix.io/24Mc/nim but it obviously ends up with pegging the CPU at 100%
12:55:12dom96Why are you using drain?
12:55:28Araqdom96, just accept it, drain is awesome :P
12:55:33*Araq is kidding
12:55:55*Araq wrote 'drain' and still isn't sure about its usefulness
12:55:56*krux02 joined #nim
12:56:06dom96You should put this while loop in an async proc and use `await sleepAsync(AN_ACCEPTABLE_TIME)`. Yes, it sucks, but until we get support for channels/FlowVars in async that's the best you can do
12:56:06FromDiscord<mratsim> @Pmunch, add exponential backoff when there is nothing to read
12:56:37dom96Araq, from what I've seen it's only ever useful for some specific use cases when testing async
13:00:28PMunchHmm, wouldn't a better solution be to tryRead while hasPendingOperations. And when it doesn't have anything pending do a blocking read?
13:00:42PMunchAnd then call poll in the tryRead scenario?
13:02:02*Hideki_ quit (Remote host closed the connection)
13:02:09dom96doubt it :)
13:02:37PMunchWhy?
13:02:38dom96it all depends on what you're doing though
13:03:36PMunchI'm logging some stuff
13:05:47PMunchOr rather I'm sending some stuff to a log, but it isn't super critical if I miss some stuff
13:06:40*Hideki_ joined #nim
13:10:05FromGitter<Milerius> There is something to convert automatically a Json to a Nim structure ?
13:10:24FromGitter<Milerius> Something like: https://app.quicktype.io
13:10:25PMunchThe json module?
13:10:33FromGitter<mratsim> Use %
13:10:42FromGitter<Milerius> I mean a raw json to a nim struct
13:11:06FromGitter<mratsim> Use to(yourJson, TheTargetType)
13:11:18FromGitter<mratsim> It's in the json module
13:11:38FromGitter<Milerius> No i mean generate the target type
13:11:40FromGitter<Milerius> from the json
13:11:50PMunchOr you could call it like `yourJson.to TheTargetType` which reads a bit better :P
13:12:07PMunchMilerius, on runtime?
13:12:11FromGitter<Milerius> No
13:12:12FromGitter<Milerius> A tool
13:12:17FromGitter<Milerius> that generate the nim struct
13:12:20FromGitter<mratsim> If the json is not specified at compile time, there is no way because typesonly exist at compile-time
13:12:31FromGitter<Milerius> Please check: https://app.quicktype.io
13:12:46FromGitter<Milerius> You can type your json and it's generate the structure that you will need to use for the to_json stuff
13:13:19aeverr[m]So basically nim-protobuf but json
13:13:25PMunchAh, nothing that I know of
13:13:36FromGitter<Milerius> It's just to gain some time
13:13:56FromGitter<mratsim> AFAIK @deech has something like this because he presented it at Strange Loop conference
13:13:58FromGitter<Milerius> May be we can ask them to add nim :p
13:14:02PMunchI mean I wrote this: https://github.com/PMunch/jsonschema
13:14:08PMunchBut it's not quite what you want I think
13:14:30PMunchMilerius, should be a fairly simple macro to write
13:14:40PMunchA perfect first macro project :)
13:14:47FromGitter<Milerius> https://gist.github.com/jiro4989/a59e751c20a34f2be3aee858961cda3c i find this
13:15:43FromGitter<Milerius> Is your json schema handling optional value ? seem's really cool
13:17:04FromDiscord<mratsim> See: https://github.com/deech/LambdaWorldCadiz2019-WhatFPCanLearnFromStaticIntrospection/blob/master/json_reflection.nim
13:17:04PMunchYeah, it was written to take the TypeScript input that the Language Server Protocol specification offers
13:17:12PMunchI use it like this: https://github.com/PMunch/nimlsp/blob/master/src/nimlsp.nim#L52
13:17:16FromDiscord<mratsim> and: https://github.com/deech/LambdaWorldCadiz2019-WhatFPCanLearnFromStaticIntrospection/blob/master/json_printwithtype.nim
13:17:32FromDiscord<mratsim> you can read the slides to see example usage
13:18:09PMunchSo it checks if the data is valid, then it casts it to that schema type which then allows you to directly access any of the fields (and nothing else) with type conversions done automatically
13:18:20PMunchBut without actually marshalling the whole thing over to a new representation
13:18:30FromDiscord<mratsim> ah the video has the demo not the slides
13:18:35FromGitter<Milerius> seem's really cool
13:20:13PMunchThanks, works pretty well :) Makes working with JSON easy and type-safe
13:21:23FromGitter<Milerius> I may be interested
13:21:29FromGitter<Milerius> but i feel i'm to rookie for this advanced library ahah
13:22:48*yglukhov[m] quit (Ping timeout: 246 seconds)
13:22:48*lqdev[m] quit (Ping timeout: 246 seconds)
13:22:48*Mat42 joined #nim
13:22:54*meff[m] quit (Ping timeout: 250 seconds)
13:23:00*vycb[m] quit (Ping timeout: 252 seconds)
13:23:08FromDiscord<mratsim> THere is no way to not be a rookie with Nim macros, unless maybe you worked with Abstract Tree before (like html, xml, json)
13:23:17*salotz[m] quit (Ping timeout: 248 seconds)
13:23:18*BitPuffin quit (Ping timeout: 248 seconds)
13:23:30*spymasterd[m] quit (Ping timeout: 246 seconds)
13:23:30*Demos[m] quit (Ping timeout: 246 seconds)
13:23:30*LEdoian[m] quit (Ping timeout: 264 seconds)
13:23:32*pigmej quit (Ping timeout: 250 seconds)
13:23:32*k0mpjut0r quit (Ping timeout: 250 seconds)
13:23:39*zielmicha[m]1 quit (Ping timeout: 245 seconds)
13:23:39*nc-x[m] quit (Ping timeout: 245 seconds)
13:23:43*zacharycarter[m] quit (Ping timeout: 246 seconds)
13:23:47*macsek1911[m] quit (Ping timeout: 252 seconds)
13:23:47*Manny8888 quit (Ping timeout: 252 seconds)
13:23:47*xomachine[m] quit (Ping timeout: 252 seconds)
13:23:47*skrylar[m] quit (Ping timeout: 252 seconds)
13:23:47*lasso[m] quit (Ping timeout: 252 seconds)
13:23:49*TheManiac[m] quit (Ping timeout: 250 seconds)
13:23:49*aeverr[m] quit (Ping timeout: 250 seconds)
13:23:49*Connor[m] quit (Ping timeout: 250 seconds)
13:23:49*isaac[m]1 quit (Ping timeout: 250 seconds)
13:23:51*Balu[m] quit (Ping timeout: 248 seconds)
13:23:51*d-nice2[m] quit (Ping timeout: 248 seconds)
13:23:51*Miguelngel[m] quit (Ping timeout: 248 seconds)
13:23:52*GitterIntegratio quit (Ping timeout: 248 seconds)
13:23:55FromDiscord<Lantos> It would be awesome if pmunch did a tutorial on YouTube ;)
13:24:03FromDiscord<Lantos> About nim macros
13:24:04*planetis[m] quit (Ping timeout: 264 seconds)
13:24:04*nergal[m]1 quit (Ping timeout: 264 seconds)
13:24:04*leorize[m] quit (Ping timeout: 264 seconds)
13:24:36PMunchI have considered it, but it's a big topic
13:24:45PMunchI've written quite a bit about it though: https://peterme.net
13:27:08Mat42hello, exist there a tutorial or some documentation about cross-compilation for embedded systems, peferably with disabled garbage collection?
13:27:42FromDiscord<Lantos> Good resource but YouTube videos are really good for learning. Videos give you the feeling your stepping through the problem with a teacher
13:27:50FromDiscord<Lantos> Just my opinion
13:28:56PMunchMat42, well yes and no
13:28:59FromDiscord<Lantos> I've thought about trying to learn from your blog and try to make. YouTube series out of it. Just haven't had the time
13:29:11PMunchBut you're in luck, because I'm currently working on cross-compiling for Arduino
13:30:00PMunchLantos, never cared much for YouTube tutorials myself, always find myself pausing/unpausing them or scrubbing to the interesting bit
13:30:08Mat42PMunch: That's nice. I have ESP32 as target in mind
13:30:12FromDiscord<Lantos> Bluepill also?
13:30:19FromDiscord<Lantos> Nice
13:30:21PMunchBluepill?
13:30:29FromDiscord<Lantos> Smt32
13:30:43PMunchBut as I said, I have considered it, if I only had the time..
13:30:48FromDiscord<Lantos> Stm*
13:31:05FromDiscord<Lantos> Yeah watching at 2x speed. And scrubbing
13:31:08PMunchMat42, I think federico3 was compiling stuff for the ESP8266
13:31:28federico3yep
13:32:10federico3STM32?
13:32:11PMunchLantos, this is what I use to compile and run Nim on an Arduino Leonardo (specifically the Arduboy): http://ix.io/24Mj
13:32:20FromDiscord<Lantos> Also these style of videos are great
13:32:20FromDiscord<Lantos> https://youtu.be/lleyT7oL_og
13:33:02*Vladar joined #nim
13:33:04FromDiscord<Lantos> It's rust but you can have them running in the background at 2x and when something interesting comes up you can go back and view it
13:33:05PMunchWith something like this at the beginning of my file: http://ix.io/24Mk/nim
13:33:19Mat42federico3: No, ESP32
13:33:46FromDiscord<kodkuce> i frogot how do i wtie terary operator, i really have to start wrting a list of things i frogot
13:33:54PMunchAll those flags I've gotten from the Arduino IDE (shift+verify to see the full log with gcc commands, or change your settings to always show them)
13:33:54federico3I was asking about the bluepill
13:34:12federico3I have an esp32 but I haven't tried targeting it yet
13:34:24PMunchAnd I was taking hints from this on the way: https://disconnected.systems/blog/nim-on-adruino/
13:34:34federico3we should really have a nim CI on microcontrollers
13:34:51FromDiscord<Lantos> I'll have a go at it tonight. I've got something in mind for an Arduino projecy
13:34:53*dddddd joined #nim
13:34:59PMunchOn actual microcontrollers? Or just the compilation part?
13:35:14Zevvrun it on an emulator, should be fine for this
13:35:47FromDiscord<kodkuce> nim terary spoon me,, var some = "pera" if 1==1 else "zika"
13:36:03Mat42federico3: if it is ok for you, I will share my experiences here and ask some questions (or at some stage write a blog)
13:37:10FromDiscord<kodkuce> solve it nim playground helps
13:40:39FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dfa2c5749314a1d459c9066]
13:41:16FromGitter<bung87> have idea about this?
13:41:59FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dfa2ca7cf771f7708eca5a5]
13:46:33FromDiscord<niv> hi! if i instance a string with `newStringOfCap(20)` and then do `setLen(10)` on it, will it truncate the backing memory to 10 bytes?
13:47:09FromDiscord<niv> alternatively, is there a way to create a string view into a char array? i need to wrap a incoming recv buffer into a readonly string
13:56:00FromGitter<Willyboar> https://www.youtube.com/watch?v=XHosLhPEN3k&feature=youtu.be
13:57:24federico3Mat42, PMunch: want to contribute to a dedicated repo for microcontrollers and sensors?
13:59:57FromDiscord<kodkuce> hmm how to check if index of sequence invalid or empty , https://play.nim-lang.org/#ix=24Mr
14:00:11FromDiscord<Milerius> Hey ?
14:00:12FromDiscord<Milerius>
14:00:12FromDiscord<Milerius> How we download stuff in a Nimble scripts ? We cannot use http client alright ?
14:00:16FromDiscord<Milerius> What do you use ?
14:01:10Mat42federico3: As my project continues, yes
14:01:57FromGitter<Willyboar> https://www.youtube.com/watch?v=LJvEIjRBSDA @Araq 2:18 is for you
14:03:46FromDiscord<kodkuce> @Milerius wtf you just asked, nimble install package is normal way duno what you meant exactly
14:04:22FromDiscord<Milerius> I don't want to download packages, but files for my current project '_'
14:04:34FromDiscord<Milerius> I depends on specific zips stuff
14:05:02*Hideki_ quit ()
14:05:38FromDiscord<Milerius> I need for example to download: `http://195.201.0.6/mm2/mm2-latest-Darwin.zip` from my nimble
14:05:54FromDiscord<Milerius> Because my project will be multiprocess, so i need to launch an external process that i download here.
14:06:31FromDiscord<kodkuce> oh you mean you are pacakign your project with nimble and you want to have dependecy of that file http://195.201.0.6/mm2/mm2-latest-Darwin.zip , then duno i newer ever nibled anything ๐Ÿ™‚
14:07:01FromDiscord<Milerius> My need is as follows:
14:07:02FromDiscord<Milerius>
14:07:02FromDiscord<Milerius> I have to download three different files depending on my platform, and put them in the asset folder of my binary.
14:07:16FromDiscord<Milerius> I don't mind deploying with nimble, i'm writting a binary for the company
14:08:18FromDiscord<Milerius> I could write 2 different script (bash, powershell), and call exec from nimscript
14:08:18FromDiscord<Milerius>
14:08:18FromDiscord<Milerius> But if i can do directly from nim scripts i would love to know about.
14:10:48FromDiscord<Milerius> According to : https://nim-lang.org/docs/nims.html
14:10:48FromDiscord<Milerius>
14:10:48FromDiscord<Milerius> We cannot download, unzip stuff for the moment from nimscript
14:11:09stefantalpalaruHow do I define a proc's name on the compiler's command line? I want to do `nim c -d:foo=bar ...` and then call `foo()` inside the Nim file. Any way to get there with {.strdefine.} or some template tricks?
14:12:24PMunchMilerius, you could do staticExec with wget or curl..
14:12:45PMunchEer, not static exec, but exec I guess it is
14:12:49PMunchOr include a script that does it and run that
14:13:01FromDiscord<Milerius> @PMunch Yeah but it's a bit dirty, i need to be sure that binary are present in the operating system
14:13:01PMunchOr a Nim program that does it and then compile and run that :)
14:13:17FromDiscord<Milerius> yep i will do that
14:13:27PMunchfederico3, yeah I could contribute to a repo like that
14:13:39PMunchSo far I've very specifically targetted the Arduboy though
14:14:02FromDiscord<Pebaz> [Nimporter](https://github.com/Pebaz/nimporter) lets you compile Nim extensions for Python on import!
14:14:19FromDiscord<Pebaz> Nimporter lets you compile Nim extensions for Python on import! https://github.com/Pebaz/nimporter
14:14:21*tribly quit (Ping timeout: 268 seconds)
14:14:21*crem quit (Ping timeout: 268 seconds)
14:14:49*tribly joined #nim
14:15:31Mat42ciao and thanks
14:15:42*Mat42 left #nim ("https://quassel-irc.org - Komfortabler Chat. รœberall. ")
14:15:49*Hideki_ joined #nim
14:15:51*crem joined #nim
14:16:33*Hideki_ quit (Remote host closed the connection)
14:17:07*Hideki_ joined #nim
14:23:14FromDiscord<sealegs> hey guys, whenever I'm trying to disconnect websocket I get an error saying that index 6 not in 0 .. 5, but how can I prevent it from crashing and handle the error? I tried using the `try` block statement, but it didn't work.
14:24:29FromGitter<bung87> maybe you just need check length first
14:24:45FromDiscord<kodkuce> @sealegs for start use https://github.com/treeform/ws
14:25:12FromDiscord<kodkuce> i guessing you were using that old one thats in docs page
14:25:30FromDiscord<sealegs> I'm using niv websocket
14:26:03FromDiscord<kodkuce> ^^^ is up to date for of nivs one
14:26:06FromDiscord<sealegs> https://github.com/niv/websocket.nim
14:26:20FromDiscord<kodkuce> niv last update 2 year ago, this 15days
14:26:52FromDiscord<kodkuce> i head too some issues i dont remember right exactly, but this newer works for me np
14:27:18FromDiscord<sealegs> I'll try the new version and see if it doesn't show this error
14:27:19*sealmove joined #nim
14:28:59FromDiscord<kodkuce> somone should change in docs to point to this inste nivs
14:35:26*endragor joined #nim
14:41:19FromDiscord<sealegs> okay so I've tried the latest version and now I can't seem to handle the new error (Exception message: The network connection was aborted by the local system.), I tried the `try` block statement again, but it seems quite unpreventable.
14:41:19FromDiscord<sealegs>
14:41:19FromDiscord<sealegs> How can I prevent it from crashing?
14:41:31FromDiscord<sealegs> Okay, so I've tried the latest version and now I can't seem to handle the new error (Exception message: The network connection was aborted by the local system.), I tried the `try` block statement again, but it seems quite unpreventable.
14:41:31FromDiscord<sealegs>
14:41:31FromDiscord<sealegs> How can I prevent it from crashing?
14:42:45PMunchOh nice, nimlsp now has 100 stars :)
14:43:28PMunchsealegs, do you have some code for that?
14:43:57*nsf joined #nim
14:44:13FromDiscord<sealegs> yes
14:46:10FromDiscord<sealegs> https://play.nim-lang.org/#ix=24MB
14:46:34PMunchLantos, just had a look at that link you sent. I could definitely try to live stream myself writing a macro. Maybe the quicktype thing that Milerius posted would be a good candidate :)
14:48:25PMunchsealegs, are you sure that it is an OSError?
14:48:42PMunchTry with just Except and see if that works
14:48:49PMunchWithout the error type
14:49:09*clyybber joined #nim
14:49:46PMunchYou've also got some weird indentation in the playground snippet, but I assume that was just a copy-paste error
14:51:45disruptekgogolxdong: it's not necessary, but the README.md explains your options.
14:51:49*PMunch quit (Quit: Leaving)
14:52:03FromDiscord<sealegs> I removed the identation, and yes I am sure it is an os error, because that's the new error
14:53:16FromDiscord<sealegs> I removed the identation, and yes I am sure it is an os error, because that's the new error and it says it is
14:54:00Araqhttps://github.com/nim-lang/Nim/pull/12887 we could use some help here, feedback about how to evolve sequtils would be appreciated
14:54:01disbotโžฅ add more utilities to `sequtils`
14:54:39sealmoveis there a way to get number of items/pairs of an iterator?
14:56:09FromGitter<mratsim> only if the iterator has a way to know its end before starting
14:56:28FromGitter<mratsim> or if you return a counter besides the item/pair
14:56:51disruptekmaybe we can just add to stdlib a way to It-ify a proc. seems fairly straightforward.
14:57:14Araqdisruptek, but that would be an abstraction inversion
14:57:20FromGitter<mratsim> sequtils should become range utils
14:57:45disrupteki'd also question the wisdom of making an exception to test-in-the-crucible-of-3rd-party-libs-and-then-bring-into-stdlib.
14:58:14Araqideally we only have the It versions and then you can extract the FP versions with its callbacks from it
14:58:47disruptekthat would handily separate out those procs and give them special FP attention.
14:59:05FromGitter<mratsim> a โ€œitโ€ only sequtils would be much more useful if we could chain inline iterators
14:59:22*Araq sighs
15:00:05Araqchaining inline iterators doesn't even have an RFC iirc
15:00:07disruptekit's tricky because if they go into another lib, we'll have to deal with the clash once they go into stdlib.
15:00:49disruptekdoes .pure apply to procs?
15:01:31disrupteknot advocating, just curious.
15:01:51Araqit doesn't
15:02:06FromDiscord<mratsim> it doesn't have a RFC but it says in the manual that it's supported ๐Ÿ˜‰
15:02:14disrupteklol
15:02:22FromGitter<alehander92> Araq i agree that chaining iterators makes more sense than the it versions imho
15:02:57disruptek+1 to range utils.
15:02:57*Hideki_ quit (Remote host closed the connection)
15:03:22*ng0_ joined #nim
15:03:40FromGitter<alehander92> they're orthogonal actually, sorry, but yeah better combo, just +1 for mratsim
15:03:45*Hideki_ joined #nim
15:03:51Araqmratsim: for me these things got resolved with the new sugar.collect
15:04:05Araqwhich I'm starting to love
15:04:07*ng0 quit (Disconnected by services)
15:04:10*ng0_ is now known as ng0
15:04:30FromDiscord<mratsim> it doesn't get resolve until people stop asking for examples or about "lx is deprecated, what should I use" ๐Ÿ˜‰
15:04:34disruptekaraq would be proud; i'm making commits that do nothing but remove `return`.
15:04:39FromDiscord<mratsim> lc not lx
15:05:09disruptekthere are apparently a bunch of comprehension repositories.
15:05:13FromGitter<alehander92> `collect` is great, but they're very different
15:05:20FromGitter<alehander92> like, you can use chaining inside collect
15:05:46shashlickMilerius: check out nimterop for download and unzip
15:05:53FromGitter<alehander92> i thought about deprecating `comprehension`, i still think it shouldn't bring anything over collect
15:06:01FromDiscord<kodkuce> @sealegs hmm you on Windows or what, duno why would your system drop connection
15:06:13Araqbut look, chaining itself has its own problems, harder to debug, unclear how to indent these long expressions
15:06:52Araqunclear performance profiles (are the temporary seqs optimized out?)
15:06:54disruptekyou don't indent case because it does not precede a : (for you) so...
15:07:35FromGitter<mratsim> people want to write map(it +1).map(it * 2).reduce(sum)
15:07:56disruptekyep.
15:07:59FromGitter<alehander92> well, they should be optimized out most of the time
15:08:04FromGitter<mratsim> both sequtils and stringutils force people to do intermediate alloc at the moment
15:08:06FromGitter<alehander92> but this can be easily documented
15:08:15disruptekall we have to do is make chains more performant and araq will support the concept.
15:08:20*Hideki_ quit (Ping timeout: 248 seconds)
15:08:45FromDiscord<sealegs> I'm on windows and I am closing connection, so I can make sure it reconnects properly, @kodkuce.
15:08:50AraqI don't like designs where you can use sugar as long as you don't care about speed, I've seen it in C# with LINQ
15:09:13disruptekagree; that's part of what i love about nim. i don't feel that being sloppy is slow.
15:09:48Araqand pretty much everything we've done in the last months is moving away from this way of designing things
15:09:50FromGitter<alehander92> but instead, now you can use normal `.` syntax if you dont care about memory
15:09:56*junland quit (Quit: %ZNC Disconnected%)
15:10:07FromGitter<alehander92> speed*
15:10:46Araqand I've studied Haskell's deforestation fwiw
15:11:12*junland joined #nim
15:11:19Araqthe paper outlined no way how to apply it to an imperative, eager PL
15:11:59FromGitter<alehander92> but rust,c++,d(?) etc have some form of iterators
15:12:09FromGitter<alehander92> i cant imagine its something exotic these days
15:12:10disruptekhow inconsiderate.
15:12:39AraqD has ranges that happen to be memory-safe when you use its GC
15:12:54FromDiscord<kodkuce> @sealegs so form what i get, when you manualcy close connection vie OS netrwork disable or whatewer it shoots an "Exception message: The network connection was aborted by the local system" , but issue is it terminates whole app? did you tryed wiriting jsut 1 echo afert it?
15:13:03AraqC++ has ranges and is in need for a borrow checker for them
15:13:13AraqRust has ranges and the borrow checker
15:13:34FromDiscord<mratsim> Rust has iterators with a state machine design
15:13:39FromDiscord<mratsim> like Python, with "next"
15:13:47disruptekmaybe ... is a suitable operator ๐Ÿ˜
15:13:48*seni joined #nim
15:13:50FromDiscord<mratsim> different tradeoffs
15:14:36Araqstate machine + next is pretty nice but needs to be optimized into our inline iterators
15:15:47FromDiscord<mratsim> I don't think I could do my tree traversal with next iterators
15:15:53FromDiscord<mratsim> or not as easily
15:15:56FromGitter<alehander92> that seems most suitable to me as well
15:15:56FromDiscord<kodkuce> @sealegs did you try minimal example , that chat one, if its really creashing should open issue
15:17:39Araq> people want to write map(it + 1).map(it * 2).reduce(sum)
15:17:46Araqso maybe we should give them
15:18:13FromDiscord<sealegs> Echo after what? My issue is that the program crashes when I disconnect the websocket manually and even not manually, so what I want to do is make it reconnect to the server successfully. I am trying to make a discord bot library.
15:18:15Araqfp: map(it + 1).map(it * 2).reduce(sum)
15:18:49Araqso that we have a macro 'fp' that sees a larger picture and can optmize things properly
15:18:58Araqwe need to work smarter, not harder.
15:19:01*isaac[m]1 joined #nim
15:19:02*nergal[m]1 joined #nim
15:19:02*lqdev[m] joined #nim
15:19:03*BitPuffin joined #nim
15:19:03*Demos[m] joined #nim
15:19:03*leorize[m] joined #nim
15:19:03*GitterIntegratio joined #nim
15:19:03*k0mpjut0r joined #nim
15:19:03*Connor[m] joined #nim
15:19:07*vycb[m] joined #nim
15:19:08*skrylar[m] joined #nim
15:19:08*nc-x[m] joined #nim
15:19:08*macsek1911[m] joined #nim
15:19:08*Mike[m]3 joined #nim
15:19:08*d-nice2[m] joined #nim
15:19:08*spymasterd[m] joined #nim
15:19:08*yglukhov[m] joined #nim
15:19:08*Miguelngel[m] joined #nim
15:19:08*LEdoian[m] joined #nim
15:19:09*salotz[m] joined #nim
15:19:09*aeverr[m] joined #nim
15:19:09*Balu[m] joined #nim
15:19:09*zacharycarter[m] joined #nim
15:19:09*planetis[m] joined #nim
15:19:09*zielmicha[m]1 joined #nim
15:19:09*meff[m] joined #nim
15:19:09*xomachine[m] joined #nim
15:19:09*TheManiac[m] joined #nim
15:19:09*Manny8888 joined #nim
15:19:10*pigmej joined #nim
15:19:10*lasso[m] joined #nim
15:19:25AraqNim is about reducing the language's complexity by macros
15:20:29Araqyeah yeah, I know, I know, it's not the same thing and then you can't "compose" all your other iterators that are outside the 'fp' context
15:20:30disruptekwell, at least it could sidestep a syntax issue.
15:21:22disruptekdoes it really buy something over `...`?
15:22:26*solitudesf quit (Read error: Connection reset by peer)
15:22:43*solitudesf joined #nim
15:22:49*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
15:22:55*MightyJoe joined #nim
15:23:03Araqdisruptek, what do you mean, '...'?
15:23:40disrupteki'm picturing `...` as an operator that folds two iterators into one.
15:23:58FromGitter<mratsim> Or we can embrace the ecosystem and redirect people to โ€œrecommended librariesโ€ like zero-functional
15:25:31Araqif that worked we wouldn't get these PRs
15:25:38*cyraxjoe quit (Ping timeout: 258 seconds)
15:25:52disruptekmaybe the pr is just to the wrong project.
15:26:17Araqand I'm not blaming anybody, we have sequtils.nim already some stuff "clearly belongs into there"
15:26:30FromGitter<bung87> @mratsim do you have idea about this ? โŽ โŽ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dfa4525260751301ccd964e]
15:26:47disruptekthe compiler doesn't need any of these routines, apparently.
15:27:31Araqdisruptek, the compiler doesn't import sequtils, maybe in some section of the code where I wasn't critical enough
15:27:51Araqgg sequtils compiler
15:27:51Araqcompiler\commands.nim:30: wordrecg, parseutils, nimblecmd, parseopt, sequtils, lineinfos,
15:27:51Araqcompiler\extccomp.nim:17: lineinfos, std / sha1, streams, pathutils, sequtils, times, strtabs
15:27:52Araqcompiler\nimblecmd.nim:12: import parseutils, strutils, strtabs, os, options, msgs, sequtils,
15:27:54Araq3 matches
15:27:56Araq^ ha
15:28:16FromGitter<mratsim> @bung87 The compiler sometimes get confused when you have `Foo[T] = RooRaw` but I donโ€™t know about this issue, is that in Chronos?
15:28:17FromGitter<bung87> goโ€™s package have a rank system
15:28:59disruptekinteresting idea, but i think nim would rather limit itself to rank0.
15:29:55FromGitter<bung87> https://github.com/bung87/cero/blob/master/src/cero/internet/reactor.nim here just few lines, could you take a look at it.
15:31:25FromGitter<bung87> I think itโ€™s a good idea to have package rank system , I hate nodejs small package
15:31:48Araqcan we please focus on the issue at hand?
15:32:10disrupteki like the idea of putting this stuff in zero-functional.
15:32:13Araqsequtils exists and somebody found missing parts
15:32:14FromDiscord<kodkuce> @sealegs does same crash heppend on minimal example?
15:32:25disruptekthen it exists and it can always be brought in later.
15:32:27FromDiscord<kodkuce> @sealegs that chat one example
15:32:53Araqnow we can pretend that "go patch some other lib instead" is a nice way to manage our community
15:33:07*Vladar quit (Quit: Leaving)
15:33:08disruptekhow does it not solve the problem?
15:33:31FromDiscord<sealegs> chat one example?
15:33:33Araqor we find policies that work better
15:33:54disruptekthere's already a policy of debuting new material in 3rd-party.
15:33:58FromGitter<bung87> or like python have a community repo
15:34:11FromGitter<bung87> no ,sorry like django
15:34:52FromDiscord<kodkuce> @sealegs https://github.com/treeform/ws scroll down litte there is example
15:34:53*narimiran quit (Ping timeout: 245 seconds)
15:35:04*marmotini_ quit (Remote host closed the connection)
15:35:14disruptekthere's no reason that core can't make sure zero-functional works well, just as it'd have to do to make sure these work well in stdlib.
15:35:48disruptekor maybe you want to maintain zero-functional, too?
15:36:01Araqpkg "zero_functional", "nim c -r test.nim"
15:36:09Araq^ from important_packages.nim
15:36:20Araqwe do ensure it continues to work well to the best of our knowledge
15:36:22disruptekyes, so what's the problem. ๐Ÿ˜‰
15:36:32FromDiscord<sealegs> I haven't used treeform's ws
15:36:56disruptekwhy isn't that the right place for this?
15:37:13Araqthe problem is that sequtils already exists and could have a countIt template
15:37:30disruptekso add that one.
15:38:56disruptekyou're allowed to use 3rd-party libs, too, Araq. ๐Ÿคฃ
15:39:04Araqwell somebody did and he also added more than just that. and since he put in the effort already it's only fair to give him some influence over sequtils' evolution
15:39:10FromGitter<Willyboar> Araq search someone to give a xmas present.
15:39:51disruptekthis isn't about foldl's feelings, though i think it's pretty exceptional to give this much care to such a pr. a credit to foldl's work.
15:40:55Araqwell it's a general pattern and I have no good solutions. I can tell him to only add X, Y, Z but it feels pretty arbitrary
15:41:26*marmotini_ joined #nim
15:41:42disruptekit's not arbitrary; you have to be the gatekeeper with an overarching vision that goes beyond feelings and personal needs and wants.
15:41:53Araqand why do I get to decide this, I don't use sequtils myself anyway
15:41:57FromDiscord<mratsim> Open a RFC: future of sequtils
15:43:10disruptekyou can always add in the future, but it's damned hard to remove it later.
15:43:32*marmotini_ quit (Remote host closed the connection)
15:43:46Araqyeah I know but sequtils.countIt isn't another async framework, things are not equal
15:44:10*marmotini_ joined #nim
15:44:39disruptekokay, so the policy is that it's okay to richen stdlib.
15:44:41dom96what's this about?
15:44:54disruptek!pull sequtils
15:44:55disbothttps://github.com/nim-lang/Nim/pull/12887 -- 3add more utilities to `sequtils` 7& 29 more...
15:45:17Araqdude that bot is awesome. if only it would listen to me
15:45:22Araq!pull sequtils
15:45:23disbothttps://github.com/nim-lang/Nim/pull/12887 -- 3add more utilities to `sequtils` 7& 29 more...
15:45:27FromDiscord<Milerius> xD araq
15:45:57FromDiscord<Milerius> is it possible to speedup the downloading time of the httpclient ?
15:45:58disruptekdisbot is a fickle one.
15:46:00*yglukhov[m] quit (Remote host closed the connection)
15:46:00*isaac[m]1 quit (Read error: Connection reset by peer)
15:46:01*Demos[m] quit (Write error: Connection reset by peer)
15:46:01*Miguelngel[m] quit (Read error: Connection reset by peer)
15:46:01*TheManiac[m] quit (Read error: Connection reset by peer)
15:46:03*Mike[m]3 quit (Read error: Connection reset by peer)
15:46:03*zielmicha[m]1 quit (Read error: Connection reset by peer)
15:46:06*zacharycarter[m] quit (Remote host closed the connection)
15:46:06*Balu[m] quit (Remote host closed the connection)
15:46:06*lasso[m] quit (Remote host closed the connection)
15:46:06*planetis[m] quit (Remote host closed the connection)
15:46:17*salotz[m] quit (Read error: Connection reset by peer)
15:46:17*aeverr[m] quit (Remote host closed the connection)
15:46:18*macsek1911[m] quit (Remote host closed the connection)
15:46:18*nergal[m]1 quit (Remote host closed the connection)
15:46:19*d-nice2[m] quit (Read error: Connection reset by peer)
15:46:20*xomachine[m] quit (Read error: Connection reset by peer)
15:46:20*meff[m] quit (Read error: Connection reset by peer)
15:46:21*vycb[m] quit (Read error: Connection reset by peer)
15:46:21FromDiscord<Milerius> It's seem's really slow right now
15:46:23*lqdev[m] quit (Remote host closed the connection)
15:46:24*spymasterd[m] quit (Read error: Connection reset by peer)
15:46:24*nc-x[m] quit (Remote host closed the connection)
15:46:25*k0mpjut0r quit (Write error: Connection reset by peer)
15:46:25*BitPuffin quit (Remote host closed the connection)
15:46:26*leorize[m] quit (Read error: Connection reset by peer)
15:46:26*pigmej quit (Remote host closed the connection)
15:46:26*skrylar[m] quit (Remote host closed the connection)
15:46:26*nsf quit (Quit: WeeChat 2.6)
15:46:27*GitterIntegratio quit (Write error: Connection reset by peer)
15:46:27*Connor[m] quit (Remote host closed the connection)
15:46:27*LEdoian[m] quit (Write error: Connection reset by peer)
15:46:27*Manny8888 quit (Remote host closed the connection)
15:46:45FromDiscord<Milerius> i download a simple 5mo files it's take 30 seconds to download (i have 1Gbps/s)
15:47:35FromDiscord<kodkuce> @sealegs why dident usee treeform ws?
15:47:53dom96kodkuce: what's wrong with niv's?
15:48:20dom96Araq, cool, when did we get the {.since.} annotation?
15:49:16FromDiscord<sealegs> I liked niv's websocket.nim, but I'll try and see if treeform's ws work
15:49:39dom96sealegs: what problems are you having with niv's?
15:51:05shashlickMilerius: did you check out nimgrab
15:51:16disruptek!repo nimgrab
15:51:17disbotno results ๐Ÿ˜ข
15:51:23disruptek!package nimgrab
15:51:24disbotno packages match ๐Ÿ˜ข
15:51:27dom96Milerius: what's your code look like?
15:51:35shashlickdom96: made a choosenim PR, also we need to get 0.5.0 built
15:51:43shashlickdisruptek: it is shipped with nim
15:51:51disruptekwhat is it?
15:51:57dom96shashlick, how do we do that?
15:52:02Araqdom96, implementation here https://github.com/nim-lang/Nim/blob/devel/lib/system/inclrtl.nim#L52
15:52:07FromDiscord<Milerius> ```nim
15:52:07FromDiscord<Milerius> import os
15:52:08FromDiscord<Milerius> import asyncdispatch, httpclient
15:52:08FromDiscord<Milerius> import zip/zipfiles
15:52:08FromDiscord<Milerius>
15:52:08FromDiscord<Milerius> if os.existsDir(os.CurDir & "/assets/tools/mm2"):
15:52:08FromDiscord<Milerius> echo "Assets Already Downloaded"
15:52:10FromDiscord<Milerius> quit(0)
15:52:11FromDiscord<Milerius>
15:52:13FromDiscord<Milerius> var client = newAsyncHttpClient()
15:52:14FromDiscord<Milerius> var target_dir = os.CurDir & "/tmp"
15:52:16FromDiscord<Milerius> var target_filename = "mm2"
15:52:17FromDiscord<Milerius> var target_file_extensions = ".zip"
15:52:19FromDiscord<Milerius> var filename = ""
15:52:20FromDiscord<Milerius>
15:52:22FromDiscord<Milerius> if not os.existsDir(target_dir):
15:52:23FromDiscord<Milerius> echo "Create target dir: " & target_dir
15:52:25FromDiscord<Milerius> os.createDir(target_dir)
15:52:26FromDiscord<Milerius>
15:52:28FromDiscord<Milerius> proc onProgressChanged(total, progress, speed: BiggestInt) {.async.} =
15:52:30FromDiscord<Milerius> echo("Downloaded ", progress, " of ", total)
15:52:32FromDiscord<Milerius> echo("Current rate: ", speed div 1000, "kb/s")
15:52:33FromDiscord<Milerius>
15:52:35FromDiscord<Milerius> client.onProgressChanged = onProgressChanged
15:52:36FromDiscord<Milerius>
15:52:37FromDiscord<Milerius> proc asyncProc() {.async.} =
15:52:39FromDiscord<Milerius> echo "Downloading mm2"
15:52:40FromDiscord<Milerius> when defined(macosx):
15:52:42AraqMilerius: use a pastebin service
15:52:42FromDiscord<Milerius> filename = target_filename & "_darwin" & target_file_extensions
15:52:44FromDiscord<Milerius> await client.downloadFile("http://195.201.0.6/mm2/mm2-latest-Darwin.zip",
15:52:47FromDiscord<Milerius> target_dir & "/" & filename) <message clipped>
15:52:47FromGitter<Willyboar> Oh God!
15:52:48*Araq sighs
15:53:07shashlickdom96: you updated the github token but the build only gets posted with a tag
15:53:21dom96Maybe disruptek could help us out by writing a Discord bridge in Nim that handles long pastes sanely
15:53:32FromDiscord<Milerius> https://pastebin.com/ChtaPzxB
15:53:46disruptekis the bridge on github somewhere?
15:54:13Araqyou know what, I'm gonna add a section "evolving the stdlib" to our contributors guidelines
15:54:22disruptekgood.
15:54:37Araqand one "policy" will be "small stuff will arbitrarily rejected or accepted"
15:54:41FromDiscord<sealegs> Dom96, basically, whenever the websocket disconnects, it crashes. I tried to use the `try` block, but it still crashes. I'm trying make it reconnect when it disconnects.
15:55:13FromDiscord<sealegs> Dom96, basically, whenever the websocket disconnects, it crashes. I tried using the `try` block, but it still crashes. I'm trying make it reconnect when it disconnects.
15:55:21dom96sealegs: on which call does it crash?
15:55:27Araqdisruptek, this means 'staticGetCurrentDir' is even more likely to be accepted :P
15:55:38disruptekweeee! ๐Ÿ˜€
15:55:39dom96disruptek, the current bridge uses some Go framework
15:56:04disruptekhm, okay.
15:56:14disruptekdo you know if it has a name?
15:56:18dom96Araq, can't wait for the inevitable static/it variant explosion :P
15:56:35dom96disruptek, matterbridge
15:56:45*aeverr[m] joined #nim
15:57:01dom96Milerius: can't see anything that would slow this down. You sure the server you're requesting this from isn't just slow? :P
15:57:21FromDiscord<Milerius> @dom96 with curl it's take 2 seconds
15:57:27FromDiscord<Milerius> with the httpclient ~30
15:57:29*Hideki_ joined #nim
15:57:45FromGitter<Willyboar> disruptek you can find a lot of bridges, I saw and some python libs
15:58:13FromDiscord<sealegs> it crashes on where the line disconnects the ws manually or if not manually not sure
15:58:13dom96Milerius: can you try downloading http://speedtest-lon1.digitalocean.com/100mb.test?
15:58:36FromDiscord<Milerius> ```
15:58:36FromDiscord<Milerius> โžœ atomic_dex_desktop git:(master) time curl http://195.201.0.6/mm2/mm2-latest-Darwin.zip -o toto.zip
15:58:36FromDiscord<Milerius> % Total % Received % Xferd Average Speed Time Time Time Current
15:58:37FromDiscord<Milerius> Dload Upload Total Spent Left Speed
15:58:37FromDiscord<Milerius> 100 16.2M 100 16.2M 0 0 19.1M 0 --:--:-- --:--:-- --:--:-- 19.1M
15:58:39FromDiscord<Milerius> curl http://195.201.0.6/mm2/mm2-latest-Darwin.zip -o toto.zip 0,02s user 0,12s system 16% cpu 0,859 total
15:58:41FromDiscord<Milerius> ```
15:59:03FromDiscord<Milerius> downloaded in 2 seconds
15:59:14dom96sealegs: what's the stack trace?
15:59:26*drewr joined #nim
15:59:43FromDiscord<Milerius> ๐Ÿ˜ฎ It's faster now
15:59:44FromDiscord<kodkuce> dom96: dont remmeber exactly but i know i head some issues some stuff dident work, then i switched to treeform's and all worked np, plus i think @treeform has SSL too
15:59:51FromDiscord<Milerius> ```
15:59:51FromDiscord<Milerius> โžœ atomic_dex_desktop git:(master) โœ— time ./tools/dependencies
15:59:51FromDiscord<Milerius> Create target dir: ./tmp
15:59:51FromDiscord<Milerius> Downloading mm2
15:59:52FromDiscord<Milerius> Downloaded 4000 of 17048388
15:59:52FromDiscord<Milerius> Current rate: 4kb/s
15:59:53FromDiscord<Milerius> Downloading Finished
15:59:53FromDiscord<Milerius> Opening: ./tmp/mm2_darwin.zip
15:59:55FromDiscord<Milerius> ./tools/dependencies 0,38s user 0,31s system 63% cpu 1,097 total
15:59:57FromDiscord<Milerius> ```
15:59:57federico3urgh
15:59:58FromDiscord<Milerius> Much faster now
15:59:58disruptekmilerius: italian tune-up.
16:00:19FromGitter<Willyboar> disruptek https://github.com/milandamen/Discord-IRC-Python
16:01:01FromDiscord<Milerius> Perfect !
16:01:04FromDiscord<Milerius> I'm happy now
16:01:20dom96kodkuce: I've been using niv's for a while now for my game and it's been working fine. Tried treeform's but it had some deficiencies (not supporting PINGs properly IIRC).
16:01:42dom96Milerius: so it was just a fluke? lol
16:01:48shashlickdude use a paste service man
16:02:28shashlick@dom96 - https://github.com/dom96/choosenim/pull/150
16:02:30disbotโžฅ Cleanup CI setup
16:03:18FromDiscord<sealegs> dom96
16:03:19FromDiscord<sealegs> https://play.nim-lang.org/#ix=24N1
16:04:32FromDiscord<Milerius> dom96 yeah there is no problem finally !
16:08:22*icebattle joined #nim
16:10:00sealmovehow to see number of passed/failed/skipped tests in unittest?
16:10:30dom96sealegs: it looks like it happens on the recv call, you should be able to catch this though
16:13:52shashlickdom96: so what should we do for the choosenim release? should i build separately and send to you or do you want to delete the 0.5.0 tag and create it again?
16:15:03dom96I can re-tag I suppose
16:15:21dom96is the CI guaranteed to succeed now?
16:16:40shashlickyes it should be
16:16:54*planetis[m] joined #nim
16:16:55planetis[m]for loop macros dont work together with collect, unfortunately
16:17:06Araqplanetis[m], how come?
16:17:35planetis[m]bc the inner macro is not resolved yet? dunno
16:17:49planetis[m]but doesn't compile
16:17:49*marmotini_ quit (Read error: Connection reset by peer)
16:17:53Araqexample?
16:18:03dom96shashlick, done
16:18:13*Hideki_ quit (Ping timeout: 245 seconds)
16:18:42planetis[m]https://github.com/b3liever/looper
16:18:45planetis[m]just replace pairs in the examples with enumerate
16:18:57shashlickdom96: cool i'll keep an eye
16:19:04dom96shashlick, thanks!
16:21:06*endragor quit (Remote host closed the connection)
16:22:23*endragor joined #nim
16:22:30*luis_ joined #nim
16:23:20*luis_ quit (Remote host closed the connection)
16:24:09*clyybber quit (Quit: WeeChat 2.7)
16:26:00*luis_ joined #nim
16:26:12*luis_ quit (Read error: Connection reset by peer)
16:27:08Araqplanetis[m], for me 'enumerate' doesn't work
16:27:18Araqno matter if used inside 'collect' or not
16:28:19Araqtforloop_macro1.nim works though, how strange
16:29:06*marmotini_ joined #nim
16:29:39Araqoh, I forgot {.experimental: "forLoopMacros".}
16:30:03FromDiscord<Milerius> We cannot call copyFile from nimble nims script is normal ?
16:30:52FromDiscord<Milerius> I have to do `exec("cp data/osx/Info.plist bin/atomic_dex_desktop.app/Contents/")` instead
16:31:11Araqha and here I am thinking we already support too much things at compile-time
16:31:14FromDiscord<Milerius> of `os.copyFile("from", "to")`
16:31:32Araqnimscript has copyFile
16:31:51Araqwell it has cpFile
16:31:55Araqwhich is what you should use
16:32:00FromDiscord<Milerius> ah ?
16:32:03FromDiscord<Milerius> Because i got an error
16:32:12FromDiscord<Milerius> ` ... /Users/romanszterg/CLionProjects/atomicDEX-QT/atomic_dex_desktop/atomic_dex_desktop_92718.nims(21, 8) Error: this proc is not available on the NimScript target; usage of 'copyFile' is a user-defined error`
16:32:25FromDiscord<Milerius> so i have to use cpFile instead alright ?
16:32:31Araqright
16:32:38FromDiscord<Milerius> There is a link where i can read all the function that is supported ?
16:32:42sealmoveunittest really doesn't provide stats? at least how many tests failed/passed...
16:33:15AraqMilerius: everything in os.nim that is not marked as .noNimScript is supported
16:33:26FromDiscord<Milerius> ok thank's
16:33:28federico3sealmove: https://github.com/nim-lang/Nim/issues/5114
16:33:29disbotโžฅ unittest improvements
16:33:37federico3we really need a new unittest
16:33:56Araqthere is no documentation for it and disruptek is cleaning up the support
16:34:07sealmovewe really do
16:34:50Araqall we need is more polish for testament
16:35:33disruptekwut
16:35:48disrupteki don't even know Polish.
16:36:18*isaac[m]1 joined #nim
16:36:19*nergal[m]1 joined #nim
16:36:20*lqdev[m] joined #nim
16:36:20*BitPuffin joined #nim
16:36:20*salotz[m] joined #nim
16:36:20*Demos[m] joined #nim
16:36:20*leorize[m] joined #nim
16:36:20*GitterIntegratio joined #nim
16:36:21*k0mpjut0r joined #nim
16:36:21*Connor[m] joined #nim
16:36:24*skrylar[m] joined #nim
16:36:24*nc-x[m] joined #nim
16:36:24*macsek1911[m] joined #nim
16:36:25*vycb[m] joined #nim
16:36:25*LEdoian[m] joined #nim
16:36:25*yglukhov[m] joined #nim
16:36:25*Miguelngel[m] joined #nim
16:36:25*Mike[m]3 joined #nim
16:36:26*d-nice2[m] joined #nim
16:36:26*spymasterd[m] joined #nim
16:36:26*Manny8888 joined #nim
16:36:26*xomachine[m] joined #nim
16:36:26*Balu[m] joined #nim
16:36:26*pigmej joined #nim
16:36:27*zielmicha[m]1 joined #nim
16:36:27*zacharycarter[m] joined #nim
16:36:28*lasso[m] joined #nim
16:36:28*meff[m] joined #nim
16:36:28*TheManiac[m] joined #nim
16:36:47FromDiscord<Milerius> @araq i don't find cpFile inside the os.nim file, it's normal ?
16:37:01FromDiscord<Milerius> i can use it but i want to find the file with the supported function
16:37:18sealmoveis it possible to make testament into a stdlib and just do `import testament`?
16:37:50*endragor quit (Remote host closed the connection)
16:37:50sealmoveI mean theoretically
16:37:57sealmoveI know it doesn't work like that atm
16:38:42sealmoveMilerius: the procs have slightly different names than in nimscript, but they are essentially the same
16:39:01sealmovehttps://nim-lang.org/docs/os.html#copyFile%2Cstring%2Cstring
16:40:14Araqhttps://nim-lang.org/docs/nimscript.html#cpFile%2Cstring%2Cstring
16:40:46Araqit's inside nimscript.nim which is part of system.nim, no import required
16:40:54Araq(in retrospect ... what a bad idea...)
16:44:39*endragor joined #nim
16:44:59shashlickdisruptek: disbot needs to be able to pull documentation
16:45:19shashlick!doc cpFile
16:47:12FromDiscord<Milerius> thanks ๐Ÿ˜„
16:47:14FromDiscord<Milerius> i love !
16:47:44Araqplanetis[m], I have a fix for that
16:47:45federico3Araq: if it can replace unittest and provide the same features, yes
16:48:51Araqwhy "same features"? what's so desireable about output in [sections]
16:49:45*endragor quit (Ping timeout: 268 seconds)
16:55:44federico3huh?
16:57:51Araqas I said elsewhere, testament is what we use to ensure Nim's quality, it's actually used and gets improvements. 'unittest' is an unloved child, we accept PRs but so far nobody really fixed its bugs.
16:58:42federico3by all means it's better to have one tool only and have it well mantained
16:58:47Araqtestament also has CI integration, can run tests in parallel and offers process isolation.
16:58:52federico3sure
16:59:31federico3it does not offer the features listed in 5114 tho and it's not backward compatible / with unittest
16:59:39sealmoveAraq: testament is great, but we need to make it into an stdlib so that projects other than the Nim compiler can use it easily?
17:00:21Araqsealmove, you cannot import it but then that's not how it's designed to work. how do you get process isolation via an import? it's impossible
17:00:33FromDiscord<Milerius> Is it possible to retrieve the Executable Path using `os` (not the current dir, but the executable path)
17:00:36FromDiscord<Milerius> Is it possible to retrieve the Executable Path using `os` (not the current dir, but the executable path) ?
17:00:46Araqos.getAppDir()
17:00:49sealmoveok, we at least need good documentation for how to use in a project
17:00:57federico3that's not enough
17:01:01FromDiscord<Milerius> i see there is : getExecPath1
17:01:30federico3we need an importable component that can be used to define test syntax, and a test runner that is executed externally
17:01:58Araqwe have that, the test syntax is inside
17:01:59leorizeAraq: it can just call itself with special parameters as a way to isolate :P
17:02:05leorizethat's how autotools does it iirc
17:02:05Araqdiscard """ ... """ setions
17:02:13Araqleorize, smart :P
17:02:16federico3that's pretty horrible
17:04:01FromDiscord<Milerius> We cannot chain parent dir call ?
17:04:08Araqfederico3, *shrug*, it works pretty well IME. maybe we could add a parser so that it understands unittest sections
17:04:12FromDiscord<Milerius> Such as `os.getAppDir.parentDir.parentDir` ?
17:04:22federico3here's a good example of reasons for having test-specific syntax https://docs.pytest.org/en/latest/fixture.html
17:04:54FromDiscord<Milerius> Ah i understnad
17:05:03FromDiscord<Milerius> Ah i understand, i need to add parenthesis for the ufcs :p
17:05:21federico3among other things, pytest creates a graph of setup functions based on the needs of each test and runs only what is required
17:05:30leorize@Milerius: that doesn't sound too right :P
17:07:24federico3it also Parametrizing fixtures for an example on how useful it can be
17:08:10AraqMilerius: no, you only need () for nullary functions
17:08:35Araqas it's ambiguous otherwise since procs are also first class entities ( map(someProc) )
17:08:58AraqUCFS has nothing to do with it really
17:08:58FromDiscord<Milerius> Ok i got
17:09:02FromDiscord<Milerius> Ok i got it
17:09:07FromDiscord<Milerius> Thank's for the precision
17:11:40Araqfederico3, pytest does plenty of things I consider questionable, it's the "language inside a language" problem. so instead of calling f(3) I say @pytest.parametrize(x, 3) def f(x)
17:12:16AraqDSLs are better if they offer something the host language doesn't.
17:12:36Araqbut I already know how to call a function in Python, thanks, let me use Python inside Python.
17:13:06federico3no, that's required to make the test decarative: the pytest runner understand that a test has to be run twice and it's than able to run setup/teardown accordingly
17:13:56federico3and I agree that it's a bit of a hack because python does not support DSLs natively
17:14:27federico3but Nim *should* shine with test DSLs in comparison
17:16:40Araqmaybe if you design the DSL well. but don't make me write 'expectException FooBar' when I already know how to catch exceptions
17:17:15Araqdon't make me write 'section "desc" ' when I already know how to write 'echo'.
17:17:19federico3having a declarative syntax so that testament can understand what to do would make unittest replaceable (e.g. how to order tests/setup/teardowns)
17:18:51shashlickdom96: the lin and osx binaries were posted for choosenim, but windows failed due to a network issue - can you restart that build?
17:18:54federico3actually you are not required to use expectException, it just saves you the boilerplate of try-except-raise
17:19:02shashlickdom96: https://travis-ci.org/dom96/choosenim/jobs/626776798
17:20:39*endragor joined #nim
17:20:57madpropscourageous nim gets rid of 0-based indexing
17:21:13federico3bonus points if we can put some tests close to the real procs
17:26:20planetis[m]awesome thanks Araq
17:26:41Araqyou need to patch enumerate though
17:26:49Araqvar i = -1
17:26:55Araqfor x in a:
17:26:56FromGitter<bung87> ```code paste, see link``` โŽ โŽ where is the `Callback` type ?, I can only find it from std source and not exported. [https://gitter.im/nim-lang/Nim?at=5dfa61608897197969bb783b]
17:26:57Araq inc i
17:27:01Araq (i, x)
17:27:07Araqso that collect can handle it
17:27:27Araqfor obvious reasons
17:27:39*luis_ joined #nim
17:28:18FromGitter<bung87> I remeber I tried using async libs before, then give up.
17:30:49*krux02 quit (Remote host closed the connection)
17:31:29stefantalpalaruWhat is the "benign" pragma used for?
17:32:24disruptekdon't worry; it's harmless.
17:32:35Araq{.pragma: benign, gcsafe, locks: 0.}
17:32:44stefantalpalaruOK
17:33:13Araqbung87: not sure, Callback doesn't have to be exported though because proc types in Nim are structural types
17:33:13disruptekdisbot can pull docs once i write ndoc.
17:33:16disruptek!repo ndoc
17:33:18disbothttps://github.com/nodeca/ndoc -- 9ndoc: 11js port of pdoc, with extentions 15 93โญ 8๐Ÿด 7& 29 more...
17:33:27disrupteknope. still not that one.
17:33:31disruptek!repo disruptek/ndoc
17:33:32disbothttps://github.com/disruptek/ndoc -- 9ndoc: 11like pydoc but for nim 15 0โญ 0๐Ÿด
17:33:57disruptekif i write a unittest it will be kinda like ava
17:36:04disruptekwhat drives me nuts about unittest is that i cannot see any of my normal output while it runs.
17:36:21*mrgaturus joined #nim
17:36:22disruptekforget npeg trace, for example.
17:37:01*nsf joined #nim
17:37:17disruptektestament is too crude, imo.
17:38:40mrgaturuswhat is the equivalent of xor on sets?
17:42:03FromGitter<bung87> @Araq ok , get it , like typescript interface .
17:42:46disruptekmrgaturus: there's a difference that affects both sets.
17:43:00disrupteksee the sets module.
17:43:17disrupteksemmetricDifference()
17:49:15mrgaturusthanks, but i mean for set[T]
17:52:53*Vladar joined #nim
17:53:41FromGitter<bung87> ```code paste, see link``` โŽ โŽ do I need prevent gc collect `self `? [https://gitter.im/nim-lang/Nim?at=5dfa67a584c21677092514f3]
17:57:03FromGitter<bung87> ```code paste, see link``` โŽ โŽ it throw [https://gitter.im/nim-lang/Nim?at=5dfa686f0cb24d1d44e0c047]
18:00:05*luis_ quit (Quit: luis_)
18:00:40sealmoveweird, I made a macro that produces this code:
18:00:42sealmove let test_if_b1 = 123'i64
18:00:44sealmove result.test_if_b1 = test_if_b1y
18:00:54sealmoveand it fails with Error: type mismatch: got <NimNode> but expected 'int64'
18:00:57FromGitter<Milerius> Is it possible to compile a single file with a different compiler using nim command line ?
18:01:01*luis_ joined #nim
18:01:14leorizebung87: yes
18:01:27sealmoveresult.test_if_b1 = test_if_b1 (not test_if_b1y)
18:01:32*luis_ quit (Client Quit)
18:01:35leorizeMilerius: no
18:02:06FromGitter<Milerius> Thisi s not possible to specify nim.cfg for a single directory ? :/
18:03:49Araqunclear what you want, compile some files via VCC and others via mingw? the object files are not compatible
18:06:01sealmovehow to tell Nim compiler not to check for types?
18:06:53lqdev[m]@sealmove: why?
18:07:22sealmove let test_if_b1 = 123'i64 โ”‚ disbot
18:07:23sealmove โ”‚20:00:13 sealmove | result.test_if_b1 = test_if_b1
18:07:26sealmovesorry
18:07:46sealmove let test_if_b1 = 123'i64
18:07:48sealmove result.test_if_b1 = test_if_b1
18:07:59sealmovethis fails with `Error: type mismatch: got <NimNode> but expected 'int64'`
18:08:12FromGitter<bung87> before it throw asgnRef , I just do `self.reactor = reactor` from connectionโ€™s proc
18:08:27sealmoveso I need compiler to trust me that `test_if_b1` is an int64
18:08:44FromGitter<bung87> GC_ref(self) still not work.
18:11:12FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dfa6bc0b1701e50ca481b22]
18:14:05FromGitter<bung87> oh,my bad ,forget it
18:15:43sealmoveor maybe I need bindsym?
18:15:46sealmove:S
18:16:36leorizesealmove: uhmmmm if it said that it's not an int64, then you gotta see why :P
18:16:41leorizehow are you generating that code?
18:17:31lqdev[m]sealmove: show me how you generate your code.
18:17:36lqdev[m]aka the macro's source code
18:17:50lqdev[m]right now I can only make assumptions about what you're doing.
18:19:43*Vladar quit (Quit: Leaving)
18:23:35lqdev[m]shashlick: any ideas on how I could solve this? https://github.com/liquid600pgm/euwren/runs/355000147#step:6:100 it's basically that issue with the "non-existent" branch that actually exists not checking out properly
18:24:00mrgaturusis there a way for toggle elements (like xor does on bitflags) on set[T]?
18:27:19sealmovelqdev: the codegen is complex, I am not able to reproduce in a simple example, so it could be anything... :(
18:28:01FromDiscord<mratsim> what CI is it? Circle?
18:28:59leorizegithub actions i think
18:29:10FromDiscord<mratsim> Both Travis and Azure give no detail in the Github action tab :/
18:30:07leorizeazure gives you some :P
18:30:44leorizehttps://github.com/nim-lang/Nim/runs/349699680
18:31:07leorizebut otherwise it doesn't give you detailed build log
18:31:18FromDiscord<mratsim> huh
18:31:19leorizeyou can't fight github on their own turf :P
18:31:29FromDiscord<mratsim> I always get the same reporting as the one in the failed windows job
18:31:34FromDiscord<mratsim> "view more details on Azure"
18:31:46FromDiscord<mratsim> Github is Microsoft, Azure is Microsoft
18:31:57leorizethey are different teams
18:32:01leorizemicrosoft is big
18:35:07*mrgaturus quit (Quit: WeeChat 2.7)
18:35:42shashlick@lqdev - is that a git tag or branch?
18:37:51leorize@mratsim: if you want detailed azure errors report on github you have to integrate with azure pipelines
18:38:09leorizeI added that to testament and it's a mess because of how azure pipelines works
18:38:42lqdev[m]shashlick: it's a branch
18:39:21*narimiran joined #nim
18:39:44shashlickcan you try it manually and see?
18:40:20stefantalpalaruWhere so modules imported by passing `--import:foo` to the compiler end up being imported?
18:40:49stefantalpalaru*do
18:40:50leorizestefantalpalaru: the module you passed to the compiler for complination
18:41:04leorizeit used to add it to everything, but that changed iirc
18:41:18stefantalpalaruYes, but it doesn't look like it's imported only in the main module.
18:41:22lqdev[m]shashlick: I encountered this numerous times locally, when building on other machines. this only happens the first time you run the build, it works after that.
18:41:42lqdev[m]other people encounter that error, too, I always tell them to try again.
18:42:05shashlickthat's weird
18:44:21shashlickit works second time cause the git repo is already downloaded
18:44:29shashlickbut it is on master, not on fix-710
18:45:26lqdev[m]strange indeed
18:45:42stefantalpalaruHow do I echo something at compile time?
18:47:03shashlicklooks like we aren't pulling everything needed
18:49:26leorizestefantalpalaru: `static: echo "something"`
18:49:39shashlickeven if we do, there's no way to know if somtehing is a tag or a branch
18:49:40FromDiscord<mratsim> @leorize so how do you integrate with Github?
18:49:44shashlickand for remote branches, you need to --track
18:49:59shashlickcan you open a defect please?
18:50:08leorize@mratsim: azure's Tests system is integrated with github
18:50:20leorizethe errors message we got on github is thanks to that
18:50:30leorizelook in testament/azure.nim for more details
18:50:31stefantalpalaruleorize: thanks
18:50:38FromDiscord<mratsim> ah so I need to enable Azure tests and not just Azure Pipelines
18:50:55leorizeno
18:50:57leorizeit's a feature in pipelines
18:51:21leorizehttps://dev.azure.com/nim-lang/Nim/_build/results?buildId=1208&view=ms.vss-test-web.build-test-results-tab
18:51:25leorizea really cool one :P
18:54:24FromDiscord<mratsim> would be nice to have that @stefantalpalaru, well as always, you need to Swim into Microsoft documentation to find anything
18:56:20stefantalpalaruLooking.
18:56:42FromDiscord<mratsim> Looking as well but I don't even understand where to find this (like widgets, dashboard ...)
18:59:05FromDiscord<Milerius> Hey
18:59:10FromDiscord<Milerius> How we solve ambiguous call ?
18:59:16FromDiscord<Milerius> ```
18:59:16FromDiscord<Milerius> Error: ambiguous call; both system.fileExists(filename: string) [declared in /home/milerius/.choosenim/toolchains/nim-1.0.4/lib/system/nimscript.nim(132, 6)] and os.fileExists(filename: string) [declared in /home/milerius/.choosenim/toolchains/nim-1.0.4/lib/pure/os.nim(1002, 6)] match for: (string)
18:59:16FromDiscord<Milerius> ```
18:59:19FromDiscord<Milerius> In nims script
18:59:45FromDiscord<mratsim> Here they mention a "Tests" tab that seems well hidden: https://www.azuredevopslabs.com/labs/vstsextend/github-azurepipelines/
19:00:11leorize@Milerius: you see the different prefixes? pick one :)
19:00:12FromDiscord<mratsim> import os except fileExists
19:00:15leorizethey are the same
19:00:34FromDiscord<mratsim> or just use os.fileExists(foo)
19:00:39FromDiscord<Milerius> Ok i got it
19:00:43FromDiscord<Milerius> THanks
19:00:47FromDiscord<Milerius> i'm so noob :
19:00:49FromDiscord<Milerius> i'm so noob :p
19:00:54FromDiscord<Milerius> It's the beginning thats why
19:02:04FromDiscord<mratsim> I would say that you shouldn't have this ambiguous call and it's a bug in Nimscript
19:02:24FromDiscord<mratsim> because system reexports os.fileExists
19:04:30FromDiscord<mratsim> ah I see @leorize @stefantalpalaru you need to create specific test tasks in Azure: https://docs.microsoft.com/en-us/learn/modules/run-quality-tests-build-pipeline/4-add-unit-tests seems a bit of work
19:05:22leorize@mratsim: uh, no
19:05:41leorizethey have a test parser that can parse popular format
19:05:47leorizenone of which testament can produce
19:05:56FromDiscord<mratsim> ah
19:05:59stefantalpalaruIs this how it's done for Nim? https://github.com/nim-lang/Nim/blob/cb0a20b9b4521be066f5878f77c224540f73f779/azure-pipelines.yml#L145
19:06:01leorizeso instead I just interface with their REST api to push the result manually
19:06:33leorizehttps://github.com/nim-lang/Nim/blob/devel/testament/azure.nim
19:06:36leorize^ that's all the magic
19:07:42stefantalpalaruOh, OK. I don't think we need it that bad, @mratsim.
19:07:51FromDiscord<mratsim> yeah I agree
19:08:18FromDiscord<mratsim> I just wanted better reporting of the log details in Github instead of clicking twice (once to get to github action, once to get in Azure)
19:08:41FromDiscord<mratsim> If we write software without bugs we don't need to click :p
19:24:09FromDiscord<Milerius> `Creates the directory dir including all necessary subdirectories. If the directory already exists, no error is raised.` (mkDir)
19:24:09FromDiscord<Milerius>
19:24:09FromDiscord<Milerius> ```
19:24:10FromDiscord<Milerius> ... Evaluating as NimScript file failed with:
19:24:10FromDiscord<Milerius> ... os.nim(2133) existsOrCreateDir
19:24:10FromDiscord<Milerius> ... Error: unhandled exception: Failed to create
19:24:11FromDiscord<Milerius> ```
19:24:12FromDiscord<Milerius>
19:24:13FromDiscord<Milerius> Am i wrong ?
19:24:24disruptekyes, you should have use a paste service.
19:33:53FromGitter<Willyboar> disruptek I spit my coffee from my nose
19:34:51disruptekoh dear.
19:35:49FromGitter<Willyboar> by the way i cant wait to see ndoc
19:35:50FromGitter<Willyboar> :)
19:37:29disruptekso many projects...
19:37:42FromGitter<Willyboar> I know
19:37:44disruptekis ndoc more important than fixing unittest?
19:38:25FromGitter<Willyboar> are you gonna fix unittest for xmas?
19:38:35disrupteknope.
19:38:56FromGitter<Willyboar> after?
19:39:34disrupteki dunno, i'm thinking about getting a job.
19:40:20FromGitter<Willyboar> It's pitty there are not nim jobs for you
19:41:54disrupteknim has rekindled my enjoyment of programming and supporting developers, but i don't think that's exclusive to the language.
19:42:37*clyybber joined #nim
19:42:45FromGitter<Willyboar> well i hope to continue make the community better and after getting a job
19:44:17disruptekit's a good goal, but i don't know many people that can pull it off.
19:44:39disrupteki'm kinda one-track that way. my head is in my code all the time.
19:45:56disruptekyou find it easy to switch between dramatically different projects?
19:46:20FromGitter<Willyboar> of course not
19:46:32FromDiscord<Lantos> frick @pmunch :pmunch did you get an arduino working?
19:46:32FromDiscord<Lantos> Im hitting
19:46:32FromDiscord<Lantos>
19:46:32FromDiscord<Lantos> https://pastebin.com/kNAzEgMZ
19:46:53AraqLantos: use Nim devel or maybe 1.0.4
19:48:27*zacharycarter[m] quit (Quit: User has been idle for 30+ days.)
19:50:49FromDiscord<Lantos> sure I'll give that a shot
19:54:22salotz[m]disruptek: ask Araq how he was able to make nim
19:55:18disruptekaraq is on another level.
19:57:24disrupteki might just do something part-time, though. my time is more valuable to me than money.
19:57:33FromDiscord<Lantos> his german
19:57:52disruptekyes, i don't know why i said time. i meant, my german.
19:57:54salotz[m]my biggest issue with jobs is the time structure they force you into. 8 hrs by 5 days is really bad for multiple big projects imo
19:58:56disrupteki ran my team on a 3+1; 3 days of code, 1 day of design, and 3 day weekends.
19:59:30disruptekbut, like i said, i don't really take days off.
19:59:56FromGitter<Willyboar> I think the best is to find what fits to the team to be more productive
19:59:57salotz[m]week by week is the flaw
20:00:15salotz[m]chunking by multiple weeks is better
20:00:24disrupteksure, but 28hr days are too hard to get past management.
20:00:34disruptekeven though they make way more sense...
20:00:56FromDiscord<spook> 3+1. a scrum model?
20:00:59salotz[m]think about one thing intensely for a few weeks, then break, circle back around
20:01:00*nsf quit (Quit: WeeChat 2.6)
20:01:17FromDiscord<Milerius> is it possible to have default value for object in nim ?
20:01:30disruptekmilerius: any color you want as long as it's black.
20:01:44FromDiscord<Milerius> wut ?
20:01:57disruptek3+1 is like, my minions were available to meet with customers/management one day per week.
20:02:01FromDiscord<spook> 3 day weekends would help, stop mental blocks and force people to be more efficient with their time. like the microsoft a trail in japan
20:02:21disruptekmilerius: any value you want as long as it's zero.
20:02:31FromDiscord<Milerius> Yeah but what is the syntax ?
20:02:44disrupteksimply do not initialize.
20:02:49FromDiscord<Milerius> I have the following object:
20:02:49FromDiscord<Milerius>
20:02:49FromDiscord<Milerius> ```nim
20:02:49FromDiscord<Milerius> type
20:02:50FromDiscord<Milerius> MM2Config = object
20:02:50FromDiscord<Milerius> gui: string
20:02:50FromDiscord<Milerius> netid: int64
20:02:52FromDiscord<Milerius> userhome: string
20:02:53FromDiscord<Milerius> passphrase: string
20:02:54FromDiscord<Milerius> ```
20:02:59disruptekdude. how many times?
20:03:06disruptek!repo disruptek/xs
20:03:07disbothttps://github.com/disruptek/xs -- 9xs: 11xstreamstartup.com 15 1โญ 0๐Ÿด
20:03:13disruptekuse the ix tool in there.
20:03:14disruptekplease.
20:03:34disruptek3 day weeks work well.
20:03:37FromDiscord<Milerius> ๐Ÿ˜ฎ
20:03:41disrupteki mean, 3 day weekends.
20:04:17disrupteki'm not saying i wouldn't let people come into the office the rest of the time; it just wasn't mandatory. we didn't schedule groupthink more than one day/week.
20:04:44disruptekunder normal circumstances, i mean.
20:04:56FromGitter<Milerius> https://gist.github.com/Milerius/a6f92a7e2c218161ce69d7519771898c
20:04:59FromGitter<Milerius> Gist is ok ?
20:05:05disruptekyes.
20:05:13disruptekbut, i'm warning you. germans read irc.
20:05:26FromDiscord<Milerius> Yeah ok, no problem
20:05:37FromDiscord<Milerius> So there is a way to initialize on declaration object ?
20:05:38madpropsis there no `for x in 0..10 (but reverse)` ? I've been having to make seqs and reverse them first
20:05:52disruptekmadprops: countDown()
20:06:08disruptekmilerius: those values are all initialized to 0 or "".
20:06:11disruptekenjoy.
20:06:27madpropsdisruptek, oh nice
20:06:40disruptekvar x: MM2Config = MM2Config(netid: 33, gui: "hello there")
20:06:41FromDiscord<Milerius> Yeah but i want to initialize them to a specified value
20:06:56FromDiscord<Milerius> And if i have conditional initialization ?
20:07:04disruptekuse a conditional.
20:07:19disruptekyou can also `var x = block: ...`
20:07:55FromDiscord<Milerius> i edited my gist: https://gist.github.com/Milerius/a6f92a7e2c218161ce69d7519771898c
20:08:00FromDiscord<Milerius> I have a conditional based on the OS
20:08:02FromDiscord<Milerius> for example
20:08:29FromDiscord<Milerius> I'm supposing better to use: https://nim-lang.org/docs/os.html#getHomeDir
20:08:35FromDiscord<Milerius> Instead of conditonal stuff
20:08:42disruptekprobably a wise choice.
20:09:20FromDiscord<Lantos> well that was not fun, updating ~/.profile to point to the new nim bin folder and having a typo so I have to drop into root to fix
20:09:30FromDiscord<Fern & Simula (They/Them)> what's the most idiomatic way to handle an improper use of a macro, just raise an exception?
20:09:35FromDiscord<Lantos> anyone know of a betterway of updating $PATH
20:09:44disruptekfern: `error`.
20:09:54disruptekfern: ie macros.error
20:10:03disrupteklantos: putEnv
20:10:11FromDiscord<Fern & Simula (They/Them)> oh duh. thanks!
20:10:36disrupteksure thing.
20:11:22*marmotini_ quit (Remote host closed the connection)
20:12:00*marmotini_ joined #nim
20:12:06FromDiscord<Lantos> awesome can compile to --cpu:avr
20:12:06FromDiscord<Lantos>
20:12:06FromDiscord<Lantos> ~/Documents/code/nim/nim_arduino$ nim -v
20:12:06FromDiscord<Lantos> Nim Compiler Version 1.1.1 [Linux: amd64]
20:12:06FromDiscord<Lantos>
20:12:06FromDiscord<Lantos> built nim from source. Does this mean that araq can see me in my webcam now?
20:12:34disruptekno, he was always able to see you in your webcam.
20:12:39FromDiscord<Lantos> lol
20:13:24disruptekit's really not funny.
20:13:37disrupteksometimes i catch him looking at me from the bottom of my coffee mug.
20:13:40disruptekcreepy.
20:14:06clyybbersinister
20:15:13*Hideki_ joined #nim
20:15:14FromDiscord<Lantos> good thing I drink tea
20:16:35*marmotini_ quit (Ping timeout: 258 seconds)
20:18:44FromDiscord<Fern & Simula (They/Them)> araq likes to spy from tea even more than coffee
20:19:56federico3even from the bottom of the tea jar
20:20:02*Hideki_ quit (Ping timeout: 268 seconds)
20:20:30*endragor quit (Remote host closed the connection)
20:24:24*endragor joined #nim
20:25:43FromDiscord<Milerius> There is a defer keyword equivalent for nim ?
20:26:01clyybbernim *has* the defer keyword
20:26:01disruptekyou mean for async purposes?
20:26:15FromDiscord<Milerius> no for closing a process at the end of my scope
20:26:23disruptekyes, `defer:`
20:26:44disrupteknim really ought to provide a manual.
20:26:50FromGitter<Willyboar> disruptek I will try a different approach for my web thing
20:26:57disruptekof course, then we'd have nothing to talk about with araq.
20:27:11FromDiscord<Milerius> Thanks
20:27:55clyybberif only there was a manual...
20:28:03clyybber(where you could ctrl-f :p)
20:28:22disruptekbut we wouldn't get to meet people on irc and be spammed by them.
20:29:01*abm quit (Quit: Leaving)
20:30:33FromDiscord<Lantos> lol
20:31:06FromDiscord<Lantos> ctrl+f+disruptek "how to find nimcache"
20:31:55*marmotini_ joined #nim
20:31:57disruptekndoc, aka `disruptex`, is going to require a special "disruptek" key binding.
20:32:09disruptek๐Ÿงš
20:32:29*Mike[m]3 quit (Quit: User has been idle for 30+ days.)
20:32:45*narimiran quit (Ping timeout: 250 seconds)
20:32:59*endragor quit (Ping timeout: 268 seconds)
20:33:52FromDiscord<Lantos> ctrl+f+d+i+s+r+u+p+t+e+k "how to find nimcache"
20:34:15*disruptek sighs.
20:34:23disruptekthe best way to find nimcache is to specify it.
20:34:39FromDiscord<Lantos> --nimcache"/cache
20:35:21FromGitter<alehander92> Araq thats basically zero-functional
20:35:28FromGitter<alehander92> the fp: idea
20:35:29FromDiscord<Milerius> I also hear that there is a syntax to say: if my object is not nil please call this function
20:35:36FromDiscord<Milerius> This is true ? :p
20:35:43FromGitter<alehander92> but .. i dont get how would it
20:35:51FromGitter<alehander92> work with existing iterators
20:35:55FromGitter<alehander92> as it cant introspect
20:35:58FromGitter<alehander92> them
20:35:59FromDiscord<Milerius> (again i'm sorry, i know only C and C++ and we don't have such a syntax in those languages)
20:36:03FromGitter<alehander92> maybe if thats possible
20:36:10FromGitter<alehander92> it can generate its own iterators
20:36:52*marmotini_ quit (Remote host closed the connection)
20:37:05disruptekmilerius: nil is valid for ref object types. there's no ?. chaining though.
20:37:50disruptekit's sometimes useful to call `isNil()` on a ref type instead of testing for == nil.
20:38:08disruptekotherwise, nil should be an anticipated value for ref types.
20:38:20disruptekuntil alehander's patch goes in.
20:38:29disruptek!rfc not nil
20:38:30disbothttps://github.com/nim-lang/RFCs/issues/76 -- 3syntax request: `from std/[foo1,foo2] import nil` ; `from "." / [foo1,foo2] import bar1, bar2, bar3` 7& 27 more...
20:38:40disrupteker, not that one.
20:38:46FromGitter<Willyboar> @alehander92 how http goes?
20:38:52disruptek!rfc author:alehander42
20:38:54disbotquery failed ๐Ÿ˜ข
20:39:24FromGitter<Willyboar> !http author:alehander92
20:39:46clyybber!get to:work
20:39:59disruptek!rfc nilable author:alehander92
20:40:00disbothttps://github.com/nim-lang/RFCs/pull/169 -- 3Nilable and non-nilable types
20:40:05FromGitter<alehander92> thanks
20:40:08FromGitter<alehander92> well it waits
20:40:34FromGitter<alehander92> for people to work on it
20:40:44FromGitter<alehander92> `http`
20:40:48FromGitter<alehander92> or to design their own framework
20:40:55FromGitter<alehander92> i dont really have time sorry but
20:41:15FromDiscord<Generic> maybe someone remembers my computedGoto newruntime issue from yesterday?
20:41:18FromGitter<Willyboar> i have the time but not the knowledge
20:41:22FromGitter<Willyboar> :P
20:41:26FromGitter<alehander92> i can help you
20:41:43FromGitter<alehander92> i have some other ideas for big toolkits
20:41:43FromDiscord<Generic> I have thought a little bit more about it and it's more complicated than I thought
20:41:47FromGitter<alehander92> but i have to sit and write down
20:41:58FromGitter<alehander92> @Willyboar are you a web developer
20:42:13FromGitter<Willyboar> no professionally
20:42:22FromGitter<Willyboar> i am hobyist
20:42:37FromGitter<alehander92> do you like how certain frameworks work
20:42:42FromDiscord<Lantos> I did it, ๐ŸŽŠ blink program written in nim uploaded to arduino
20:42:53FromGitter<Willyboar> well i like things from a lot
20:43:06FromGitter<alehander92> so you can write down how you expect
20:43:10FromGitter<alehander92> a nim version to look
20:43:17FromGitter<alehander92> of a simple app
20:43:18FromGitter<alehander92> and thats mostly it
20:43:18FromGitter<Willyboar> this is what i am doing now
20:43:22FromGitter<alehander92> great!
20:43:31FromGitter<Willyboar> Reverse development
20:43:34FromGitter<alehander92> yeah
20:43:38FromGitter<alehander92> i think its a good idea sometimes
20:43:55FromGitter<alehander92> its like tdd
20:44:02FromGitter<Willyboar> RDD
20:44:04FromGitter<Willyboar> :P
20:44:12FromGitter<alehander92> result driven development :P
20:44:34FromGitter<Willyboar> or reverse driven development
20:45:03FromGitter<alehander92> well, i dont even think its reverse
20:45:18FromGitter<alehander92> you write down your design and an example result of it
20:45:28FromGitter<alehander92> this should be done more often maybe anyway
20:46:46FromGitter<Willyboar> yes but this is the easy part. I will probably write a CRUD app and all the needed flags in 2 days
20:50:24FromGitter<alehander92> yeah but its not so easy
20:50:32FromGitter<alehander92> because then you need to iterate a bit
20:50:43FromGitter<alehander92> and see what is actually useful or sensible to implement
20:51:10*meff[m] quit (Quit: User has been idle for 30+ days.)
20:54:54FromGitter<zacharycarter> does this look better?
20:55:05FromGitter<Willyboar> maybe i will create a repo with the result
20:55:08FromGitter<zacharycarter> triplanar mapping:
20:55:46FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/W3VC/image.png)
20:56:10FromGitter<zacharycarter> vs without:
20:56:14disruptekyou fixed the bug. what was it?
20:56:18FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/dWTG/image.png)
20:57:00FromGitter<zacharycarter> hrm - now I can't remember :P I think it was just using the wrong data type in a varying
20:57:21FromGitter<zacharycarter> right now I'm trying to make the textures look less like they're tiled
20:57:41disrupteki can't tell if they are just larger or superimposed or what.
20:57:50disruptekthey look a little blurrier, but maybe it's me.
20:57:51FromGitter<zacharycarter> I at first was attempting to implement: https://drive.google.com/file/d/1QecekuuyWgw68HU9tg6ENfrCTCVIjm6l/view
20:58:15FromGitter<zacharycarter> but I ran into some things that the example code was doing that I don't know how to reproduce in bgfx
20:58:28FromGitter<zacharycarter> so I instead went with: https://gamedevelopment.tutsplus.com/articles/use-tri-planar-texture-mapping-for-better-terrain--gamedev-13821
20:58:35FromGitter<zacharycarter> which is what the first screenshot is supposed to implement
20:58:52disruptekneat.
20:59:03lqdev[m]is there really no reliable way of getting the type of an nnkIdentDefs default value in a macro?
20:59:33disrupteklqdev: i thought you solved that problem.
20:59:58clyybberlqdev[m]: Untyped?
21:00:06lqdev[m]clyybber: no, typed
21:00:14lqdev[m]disruptek: I did, for primitives
21:00:29disruptekdon't you just have an ident() otherwise?
21:00:46lqdev[m]I have a `Sym`
21:01:03lqdev[m]because the default value is a variable
21:01:34lqdev[m]wrapping the type in nnkTypeOfExpr doesn't really seem to help
21:02:43lqdev[m]oh wait, it's not the issue, ha.
21:03:00lqdev[m]the issue is `sameType` not giving me reliable results
21:06:42lqdev[m]http://ix.io/24Om `same?` shows if the types are the same.
21:07:34lqdev[m]in this case https://play.nim-lang.org/#ix=24On however, `true` is returned
21:08:12lqdev[m]and yeah, the same goes for `type(x)` and `typeof(x)`.
21:18:21*voltist joined #nim
21:25:24*lritter quit (Ping timeout: 248 seconds)
21:29:33*voltist quit (Read error: Connection reset by peer)
21:30:05*voltist joined #nim
21:30:18FromDiscord<mratsim> @Clyybber, I think I hunted that damn deadlock with the backoff. While there was a possibility of deadlocking the backoff system, it was not that that was plaguing me.
21:30:18FromDiscord<mratsim> First of all the responsible was not a deadlock of the sleeping thread but a livelock of the master thread, detailed writeup here: https://github.com/mratsim/weave/issues/43#issuecomment-567219465
21:30:18disbotโžฅ Livelock with backoff on Nqueens 11
21:35:07*deepend quit (*.net *.split)
21:36:15*Trustable joined #nim
21:37:00FromDiscord<Clyybber> @mratsim Damn, nice. I'll look at your write up!
21:37:26*deepend joined #nim
21:37:38FromDiscord<mratsim> The fact that you need a very good night sleep for that sort of investigation is why I want to rewrite as a state machine
21:38:15FromDiscord<mratsim> it's too hard currently to have a good view of the control flow even for me
21:38:27FromDiscord<mratsim> I have to check with Andreas (the other one) but it's probably also in his C code
21:40:00FromDiscord<Clyybber> How would that state machine work roughly?
21:40:26FromDiscord<Clyybber> Every worker having a state machine?
21:41:27FromDiscord<Clyybber> @mratsim ping
21:41:42FromDiscord<Clyybber> always forget to tag : p
21:44:53*NimBot joined #nim
21:45:28clyybberlet his name rename
21:46:15FromDiscord<mratsim> Every worker is a state machine or an actor
21:46:26FromDiscord<mratsim> they are already a state machine
21:46:32FromDiscord<mratsim> just that it's implicit
21:47:29FromDiscord<Clyybber> I see
21:47:40FromDiscord<mratsim> This is a state machine for example: https://github.com/mratsim/weave/blob/a06469293a8c61e85d53389e073dcfce8689ed7a/weave/scheduler.nim#L170-L226
21:48:08FromDiscord<mratsim> Check your task, if you have some give them to your children, then to thieves, then run the task
21:48:17*Trustable quit (Remote host closed the connection)
21:48:38FromDiscord<mratsim> if you are out of task, become of thief, if you don't get any, sleep (if there is some backoff) or execute the task
21:48:40FromDiscord<mratsim> and repeat
21:49:22FromDiscord<mratsim> the main issue I have is that there are nested state machine that are not apparent from that loop, like the fact that in "nextTask" you also have a state machine that pops all the steal requests
21:49:45FromDiscord<mratsim> so I want all the control flow and so the "decisionTree" to happen at top level.
21:50:47FromDiscord<mratsim> because right now it's too complex to even see right away if when I touch something it's relatively safe or if i'm slipping into waters that need to be charted thoroughly
21:51:22FromDiscord<mratsim> that also means that it's very hard for outsiders to get into the code so maintenance will be bad
21:52:01FromDiscord<mratsim> obviously macros also have their cost but I think the benefits outweight the cost here
21:52:04FromDiscord<Milerius> Summary of my first real day in nim:
21:52:04FromDiscord<Milerius>
21:52:04FromDiscord<Milerius> I love, I learned a lot, I personalize my nimble with very specific tasks.
21:52:05FromDiscord<Milerius>
21:52:05FromDiscord<Milerius> I then launched a background process with osproc.
21:52:05FromDiscord<Milerius>
21:52:07FromDiscord<Milerius> I learned how to catch an exception, the defer.
21:52:07FromDiscord<Milerius>
21:52:08FromDiscord<Milerius> A good day.
21:52:10FromDiscord<Milerius>
21:52:12FromDiscord<Milerius> So far some little problem of syntax etc, everythingis new.
21:52:13FromDiscord<Milerius> Summary of my first real day in nim:
21:52:14FromDiscord<Milerius>
21:52:16FromDiscord<Milerius> I love, I learned a lot, I personalize my nimble with very specific tasks.
21:52:18FromDiscord<Milerius>
21:52:19FromDiscord<Milerius> I then launched a background process with osproc.
21:52:21FromDiscord<Milerius>
21:52:22FromDiscord<Milerius> I learned how to catch an exception, the defer.
21:52:24FromDiscord<Milerius>
21:52:25FromDiscord<Milerius> A good day.
21:52:26FromDiscord<Milerius>
21:52:28FromDiscord<Milerius> So far some little problem of syntax etc, everything is new for me.
21:52:30FromDiscord<mratsim> nice, welcome aboard ๐Ÿ™‚
21:52:52FromDiscord<Clyybber> irc quietly suffering the edits and newlines
21:52:56FromGitter<zacharycarter> oh - disruptek - I remember what was causing that issue
21:53:12FromDiscord<Clyybber> @mratsim I agree, explicit state machine seems like the way to go.
21:53:18FromDiscord<Clyybber> also easier to visualize
21:53:24*krux02 joined #nim
21:53:26FromGitter<zacharycarter> it was the size of the depth buffer - I was using a 16 bit depth buffer, which wasn't large enough given my near / far clipping planes
21:54:05FromDiscord<Clyybber> @mratsim Could even write a debug layer on top that renders the workers states and the tasks being sent around in realtime
21:54:13FromDiscord<Clyybber> well debugger "realtime"
21:55:42FromDiscord<Milerius> @mratsim Oh i just saw your library
21:55:48FromDiscord<Milerius> My god it's exactly what i nee!
21:55:52FromDiscord<Milerius> My god it's exactly what i need!
21:55:59*gour quit (Remote host closed the connection)
21:56:15FromDiscord<Milerius> I want to execute tasks every x Seconds
21:56:41FromDiscord<Milerius> Can we scheduled task every X seconds with this library ?
21:57:01FromDiscord<mratsim> No, there is no timer
21:57:50FromDiscord<mratsim> but what kind of tasks are you scheduling? Because it's for multithreading and compute tasks, if it's something with a timer I expect you want asyncdispatch (network connection, databases, writing to disk)
21:58:26FromDiscord<mratsim> https://nim-lang.org/docs/asyncdispatch.html
21:59:33FromDiscord<Milerius> I'm writting a crypto wallet / decentralised exchange for my company
21:59:52FromDiscord<Milerius> I need to retrieve informations in an async way
21:59:57FromDiscord<Milerius> and send it to the GUI to draw
22:00:13FromDiscord<mratsim> yes so you need either asyncdispatch or chronos
22:00:14FromDiscord<Milerius> For exemple retrieve all the orders, stuff like that
22:00:40FromDiscord<Milerius> How can i send data in a thread safe way in nim ?
22:00:54FromDiscord<mratsim> Weave is for tasks that uses up all your CPU (i.e. numerical computing for example)
22:00:55FromDiscord<Milerius> I'm moving from c++ @mratsim That's why
22:01:01FromDiscord<Milerius> my application is currently written in c++
22:01:17FromDiscord<mratsim> either you use channels
22:01:26FromDiscord<mratsim> or you send a raw pointer
22:01:35FromDiscord<Milerius> There is a tutorial for cannels ?
22:01:37FromDiscord<Milerius> it's seem's cool
22:01:37FromDiscord<mratsim> obviously the raw pointer is not threadsafe
22:01:46FromDiscord<Milerius> channels*
22:02:26FromDiscord<mratsim> or sockets
22:02:29FromDiscord<mratsim> see: https://livebook.manning.com/book/nim-in-action/chapter-3/346
22:03:39FromDiscord<Milerius> What is this book
22:03:40FromDiscord<Milerius> seems cool
22:04:06FromDiscord<mratsim> The only book on Nim at the moment
22:04:11FromDiscord<mratsim> and an example use of channels: https://github.com/liquid600pgm/pibench2/blob/master/src/pibench2.nim#L36
22:05:21FromDiscord<mratsim> it computes Pi in parallel and each threads sends a progress via channel
22:05:23dom96Gotta love these spammers making their posts look genuine by re-posting old threads
22:05:37FromDiscord<mratsim> the one with what language do you prefer, please discuss?
22:05:54FromDiscord<mratsim> I was really on the fence but I looked in reddit and found nothing
22:07:51FromDiscord<mratsim> Regarding the crypto wallet / Dex, make sure to check the work we do at Status https://github.com/status-im?language=nim or the fork @kayabaNerve is doing on Meros https://github.com/MerosCrypto
22:08:02*voltist quit (Read error: Connection reset by peer)
22:08:28FromDiscord<mratsim> it might help you on cryptography primitives and/or big int in particular
22:09:12FromDiscord<mratsim> soon there will be more crypto and blockchain devs in Nim than game devs ๐Ÿ˜‰
22:12:34FromDiscord<Generic> I never understood that one
22:13:00FromDiscord<Generic> I've read multiple times that Nim is used by a lot of game devs
22:13:45FromDiscord<Generic> but I always felt like scientific computing would be the big one
22:14:26FromDiscord<Generic> there are some good bindings to some engines and frameworks for Nim
22:14:56FromDiscord<Generic> and some libraries, but nothing which really sticks out
22:15:07FromDiscord<Clyybber> umm
22:15:18FromDiscord<Clyybber> mratsims work sticks out
22:15:25FromDiscord<Clyybber> also
22:19:25FromDiscord<Milerius> @mratsim I'm interested for the big int stuff.
22:20:44FromDiscord<mratsim> here you go: https://github.com/status-im/nim-stint
22:20:59FromDiscord<mratsim> it's only power of 2 but it's stack-based so no allocations at all
22:21:06FromDiscord<Milerius> i was planning to import boost multiprecision xD
22:21:31*clyybber quit (Ping timeout: 268 seconds)
22:21:57FromDiscord<mratsim> C++ templates are a bit tricky because often they have "non-trivial destructors" and Clang complains when they are put in a sequence
22:22:22FromDiscord<Milerius> i'm writting the desktop app of https://atomicdex.io
22:22:32FromDiscord<Milerius> so far i have an app that work in c++
22:22:40FromDiscord<mratsim> if you need to wrap C++ header-only libraries, here is an example of ttmath (a C++ bigint lib: https://github.com/status-im/nim-ttmath/blob/master/src/ttmath.nim)
22:22:41FromDiscord<Milerius> but threading model and lot of other stuff are painfull.
22:23:11FromDiscord<Milerius> oh i know this library
22:23:15FromDiscord<Milerius> it's supported in boost too
22:23:31FromDiscord<mratsim> otherwise you can use fragments: https://github.com/fragcolor-xyz/fragments or nimterop: https://github.com/nimterop/nimterop
22:23:47*clyybber joined #nim
22:23:54FromDiscord<Milerius> i was planning to import boost header
22:23:59FromDiscord<Milerius> and use boost multiprecision
22:24:40FromDiscord<Milerius> https://github.com/KomodoPlatform/atomicDEX-QT/blob/master/src/atomic.dex.mm2.hpp
22:24:40FromDiscord<Milerius>
22:24:40FromDiscord<Milerius> If you are interested to look at the current app
22:25:10FromDiscord<mratsim> that's fine, use what works, just be aware of non-trivial destructors/flexible array member with clanghttps://github.com/status-im/nim-ttmath/issues/10
22:25:12disbotโžฅ Clang cannot compile ttmath Uint in a seq ; snippet at 12https://play.nim-lang.org/#ix=24OX
22:26:37FromDiscord<Milerius> https://github.com/KomodoPlatform/atomicDEX-QT/blob/master/atomic_dex_desktop/src/atomic_dex_desktop/mm2/mm2.nim
22:26:37FromDiscord<Milerius>
22:26:37FromDiscord<Milerius> I started my nim port a bit
22:26:42FromDiscord<mratsim> For the threading model, I suggest you have a look at threadpools: https://github.com/yglukhov/threadpools
22:26:56FromDiscord<mratsim> the goal is to replace the standard library threadpools with this
22:27:19FromDiscord<mratsim> my own library will have a similar interface
22:27:21FromDiscord<Milerius> can i show you my current thread approach ?
22:27:26FromDiscord<mratsim> yes of course
22:27:41FromDiscord<mratsim> (also we are colleague at Status so we work full time on Nim)
22:28:02FromDiscord<Milerius> https://github.com/KomodoPlatform/atomicDEX-QT/blob/master/src/atomic.dex.mm2.cpp#L94
22:28:09FromDiscord<Milerius> It's nice !
22:28:14FromDiscord<Milerius> There is my approach
22:28:25FromDiscord<Milerius> i have 2 timer, when i reach the amount, i add a task in my thread pool
22:28:36FromDiscord<Milerius> my tasks simply insert into concurent hash map
22:28:43FromDiscord<Milerius> and the gui read the contents of the concurrent hash map
22:28:51FromDiscord<Milerius> It's a simple approach, but it's work really well
22:29:05FromDiscord<Milerius> I'm not looking for masturbating academic stuff, but simple stuff that do the job
22:29:17FromDiscord<Milerius> Araq tell me to didn't use SharedTable in nim
22:29:22FromDiscord<Milerius> because it's a mess ATM
22:29:27FromDiscord<mratsim> yeah so just try with yglukhov's threadpool
22:29:39FromDiscord<Milerius> there is a doc ?
22:29:52FromDiscord<mratsim> for hashtable nothings beat folly's in Nim ecosystem, or maybe some secret stuff from cooldome
22:30:15FromDiscord<Milerius> The things that is cool with folly hashmap
22:30:15FromDiscord<mratsim> same API as: https://nim-lang.org/docs/threadpool.html
22:30:22FromDiscord<Milerius> is that i can read/write from different thread
22:30:27FromDiscord<Milerius> they have huge optimisation barrier stuff
22:30:32FromDiscord<Milerius> hazard ptr etc
22:30:51FromDiscord<Milerius> The things is
22:31:02FromDiscord<Milerius> Even if i use this threadpool @mratsim Where i will output my data
22:31:11FromDiscord<Milerius> Since we cannot use shared table stuff
22:31:30FromDiscord<mratsim> you can wrap folly's hashtable
22:31:47FromDiscord<Milerius> yeah but i cannot use nim type as value ?
22:31:49FromDiscord<Milerius> no ?
22:31:55FromDiscord<mratsim> Yes you can
22:31:59FromDiscord<Milerius> what the hell ?
22:32:04FromDiscord<Milerius> are you joking ?
22:32:27FromDiscord<mratsim> type HashTable[T]{.importcpp:folly_Hashtable<'0>.}
22:32:31FromDiscord<mratsim> let me show you
22:32:42FromDiscord<mratsim> https://github.com/numforge/agent-smith/blob/master/third_party/std_cpp.nim#L23
22:32:53FromDiscord<Milerius> by the way, what is your approach to wrap this kind of library that have lot of dependencies ?
22:32:54FromDiscord<mratsim> this is how I use Nim values in std::vector
22:32:58FromDiscord<Milerius> I plan to use VCPKG to download dependencies
22:33:06FromDiscord<Milerius> anduse getEnv(VCPKG_ROOT) to link folly
22:33:07FromDiscord<Milerius> properly
22:33:19FromDiscord<mratsim> git submodules
22:33:46FromDiscord<Milerius> well i much prefer VCPKG in this case so
22:33:49FromDiscord<Milerius> work's really well
22:33:54FromDiscord<Milerius> and take care about lot of boring stuff
22:34:09FromDiscord<Milerius> ok it's seem's really nice but
22:34:25FromDiscord<Milerius> but nothing, it's really nice.
22:34:54FromDiscord<Milerius> so for example you create your object in nim after
22:35:01FromDiscord<Milerius> and do vector<my_object> ?
22:35:33FromDiscord<mratsim> yes
22:35:52FromDiscord<mratsim> here I've only used for stuff imported also from C++: https://github.com/numforge/agent-smith/blob/a2d9251e289f92f6b5fb68e19a98d16b00f2694c/third_party/ale_wrap.nim#L89-L94
22:35:56FromDiscord<Milerius> Man You can mix benefits of using great c++ library with syntax of nim
22:36:17FromDiscord<Milerius> loving stuff
22:36:25FromDiscord<Milerius> How much year experience you have in nim ?
22:36:35FromDiscord<Milerius> I have 5 years in C++, 3 in Golang only, i'm young ^^'
22:37:06FromDiscord<mratsim> but via fragcolor-xyz fragments they did wrap various C++ stuff with success: https://github.com/fragcolor-xyz/nimtorch/blob/5f9071ff8df33fac511fff667a84bd5b9aed46be/torch/torch_cpp.nim
22:37:30FromDiscord<mratsim> I have about 3 yers of Nim experience
22:37:45FromDiscord<Milerius> what was your programming langage before
22:37:56FromDiscord<mratsim> None :P, I wasn't a dev before
22:38:01FromDiscord<Milerius> ๐Ÿ˜ฎ
22:38:04FromDiscord<mratsim> I did tech support sysadmin
22:38:11FromDiscord<mratsim> and then project management
22:38:35FromDiscord<mratsim> I guess i could say, VBA and bash :p
22:39:19FromDiscord<Milerius> ah :p
22:39:33FromDiscord<mratsim> I did some Python as well as it was needed for data science, but otherwise I did try Rust and haskell in the past but only for like 2-3 months
22:39:45FromDiscord<Milerius> and you fall in love with nim
22:39:46FromDiscord<Milerius> :p
22:40:27FromDiscord<mratsim> yes, because I wanted to learn deep learning from scratch, and I found Python restrictive, especially in terms of speed
22:40:44FromDiscord<mratsim> and I tried Rust before and it was painful
22:40:52FromDiscord<Milerius> But you are in the crypto industry too ?
22:40:56FromDiscord<mratsim> so I tried Nim and stayed with it
22:40:59FromDiscord<mratsim> yes
22:41:06FromDiscord<mratsim> working on Ethereum 2
22:41:15FromDiscord<Milerius> ah rly cool, i'm lead dev for Komodo blockchain
22:41:21FromDiscord<Milerius> I'm rly happy
22:41:48FromDiscord<mratsim> we're about 10 Nim devs at Status working on Ethereum 1 and 2
22:42:08FromDiscord<mratsim> and there is kayabaNerve working on his own crypto as well in Nim (Meros i linked before)
22:42:12FromDiscord<Milerius> In fact they didn't ask me to do nim, i do all the project in c++, but i think nim can be usefull too.
22:43:17FromDiscord<mratsim> And regarding finance there are atleast 2 funds that I know of that are using Nim
22:43:58FromDiscord<Milerius> interesting
22:44:05FromDiscord<mratsim> (I worked as supportsysadmin in big finance before, even AS400 and COBOL ~_~)
22:44:17FromDiscord<Milerius> Just in case you will be interested i made the port for Viewport High DPI in nim
22:44:33FromDiscord<Milerius> Just in case you will be interested i made the port for Viewport High DPI GUI in nim
22:45:55FromDiscord<Milerius> what do you use for light storage in nim @mratsim
22:45:57FromDiscord<Milerius> For local DB
22:46:05FromDiscord<mratsim> we use RocksDB
22:46:13FromDiscord<mratsim> looking into lmdb as well
22:46:33FromDiscord<Milerius> This is not light ahah :p
22:46:34*solitudesf quit (Ping timeout: 252 seconds)
22:46:49FromDiscord<Fern & Simula (They/Them)> when I try to compile some code with this in it (https://pastebin.com/z79N4TDp), I get `Error: undeclared identifier: 'k'`
22:46:59FromDiscord<Fern & Simula (They/Them)> any idea why?
22:47:14disrupteki have a guess...
22:47:25FromDiscord<Fern & Simula (They/Them)> oh nevermind. bad indentation
22:48:39FromDiscord<mratsim> does `newIdent("token")` interpolation work now? I always assigned everything before using quote do because it was broken in the past
22:49:50FromDiscord<Fern & Simula (They/Them)> nah
22:50:04FromDiscord<Fern & Simula (They/Them)> also it was bad code. it's a quote block, just replace it with the word token
22:50:19FromDiscord<Fern & Simula (They/Them)> first time writing an actual non-toy macro. kinda figuring things out as i go
22:54:24FromDiscord<mratsim> welcome to the wonderful land of macros, close the door behind you, you have reached the point of no return ๐Ÿ˜‰
22:56:14FromDiscord<Fern & Simula (They/Them)> just printed the generated ast tree
22:56:20FromDiscord<Fern & Simula (They/Them)> i have no idea what broke but its bad
23:00:57FromDiscord<Fern & Simula (They/Them)> is there a way to pretty-print the lispRepr?
23:01:07FromDiscord<Fern & Simula (They/Them)> sure is, nvm
23:05:02clyybbermratsim: WDYT about a pragma for case objects that allows their discriminator to be reassigned?
23:05:11clyybberEither a pragma on the type
23:05:17clyybberor on the assignment stmt
23:05:33FromDiscord<mratsim> that sounds good
23:05:43clyybberwhich one?
23:05:50FromDiscord<mratsim> on the type
23:05:55clyybberk
23:06:02clyybberill put it in my todo list then
23:06:07clyybber(which keeps growing :p)
23:06:10FromDiscord<mratsim> it's really a pain point at Status
23:06:45FromDiscord<mratsim> see: https://github.com/status-im/nim-confutils/issues/9#issuecomment-559862829
23:06:47disbotโžฅ "assignment to discriminant changes object branch" ; snippet at 12https://play.nim-lang.org/#ix=24P7
23:07:01FromDiscord<mratsim> tag @zah when you release it
23:07:13*leorize quit (Quit: WeeChat 2.6)
23:07:26FromDiscord<mratsim> for me as well in both Weave and for lazily deserializing crypto signatures from a database
23:07:26disrupteki managed to generate an infinite look in rawAlloc.
23:07:31disruptekloop, too.
23:07:41FromDiscord<mratsim> Are you the eye of Sauron?
23:07:55disrupteki have so many names...
23:08:18FromDiscord<mratsim> so does that exhaust your memory?
23:08:24clyybbereye of sauron, infinite loop, loop, cycle, cycle checker, --gc:orc
23:08:30clyybberI like where this is going
23:08:36disruptekcall depth limit reached first.
23:08:52clyybberthey are taking nim to Isengard
23:09:14FromDiscord<mratsim> In the Depths of Helm
23:09:26FromDiscord<mratsim> where you will reach the limits of your calls
23:09:34FromGitter<Willyboar> The fellowship of nim
23:09:36disruptekthis really isn't my fault but i'm not sure i can repro it simply.
23:09:52FromDiscord<mratsim> well just screenshot it at least
23:10:25FromDiscord<mratsim> I remember seeing bugs in there that I couldn't reproduce and some magician managed to fix it
23:10:38clyybberi love magicians
23:10:49disruptekoh, it's npeg.
23:10:55FromDiscord<Fern & Simula (They/Them)> ive got this code (https://pastebin.com/Y9fgZ4j3) but i'm getting this error (https://pastebin.com/Y3R3i5Uw). no idea what i did wrong lol
23:10:57clyybbersummon le magician Zevv
23:11:08disrupteklol
23:11:25disruptek$ cat ~/toucan 18:11
23:11:28disruptekโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–„โ–„โ–„โ–€โ–€โ–€โ–„โ–„โ–ˆโ–ˆโ–ˆโ–„โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
23:11:31disruptekโ–‘โ–‘โ–‘โ–‘โ–‘โ–„โ–€โ–€โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–โ–‘โ–€โ–ˆโ–ˆโ–Œโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
23:11:34disruptekโ–‘โ–‘โ–‘โ–„โ–€โ–‘โ–‘โ–‘โ–‘โ–„โ–„โ–ˆโ–ˆโ–ˆโ–‘โ–Œโ–€โ–€โ–‘โ–€โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
23:11:37disruptekโ–‘โ–‘โ–„โ–ˆโ–‘โ–‘โ–„โ–€โ–€โ–’โ–’โ–’โ–’โ–’โ–„โ–โ–‘โ–‘โ–‘โ–‘โ–ˆโ–Œโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
23:11:40disruptekโ–‘โ–โ–ˆโ–€โ–„โ–€โ–„โ–„โ–„โ–„โ–€โ–€โ–€โ–€โ–Œโ–‘โ–‘โ–‘โ–‘โ–‘โ–โ–ˆโ–„โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
23:11:43disruptekโ–‘โ–Œโ–„โ–„โ–€โ–€โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–Œโ–‘โ–‘โ–‘โ–‘โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
23:11:46disruptekโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–โ–‘โ–‘โ–‘โ–‘โ–โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–‘โ–‘โ–‘
23:11:49disruptekโ–‘โ–‘โ–‘โ–‘โ–‘leโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–โ–‘โ–‘โ–‘โ–‘โ–โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„
23:11:52disruptekโ–‘โ–‘โ–‘โ–‘toucanโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–€โ–„โ–‘โ–‘โ–‘โ–โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„
23:11:55disruptekโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘hasโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–€โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
23:11:58disruptekโ–‘โ–‘โ–‘โ–‘โ–‘arrivedโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–ˆโ–€โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘
23:12:04disruptektoucan is always at the ready.
23:12:25clyybberlol
23:12:31clyybberits been 6 years fellow tucn
23:12:33FromDiscord<mratsim> Are you playing Path of Exile?
23:12:42disrupteknot at the moment.
23:12:45FromDiscord<mratsim> this was the magic fix: https://github.com/nim-lang/Nim/pull/8496/files#diff-bbd2d0b5f1c7d2299ad11cfed6d9a7e0
23:12:46disbotโžฅ fixes #7894
23:13:24clyybberjust because he was born
23:14:29FromDiscord<mratsim> he moved var size = size 2 lines down and magic, no more rawAlloc crash
23:15:27FromDiscord<mratsim> okay, now I need to go back to fix this annoying livelock
23:15:52FromDiscord<Fern & Simula (They/Them)> can someone help me figure out what this error means? https://pastebin.com/Y3R3i5Uw
23:16:20FromDiscord<Fern & Simula (They/Them)> i'm so lost lol
23:16:32disruptekwould be more helpful to see the code.
23:17:02FromDiscord<Fern & Simula (They/Them)> want the full code or just what's triggering the error?
23:17:48disruptekthe more the merrier; it's christmas.
23:18:00FromDiscord<Fern & Simula (They/Them)> alrighty, https://pastebin.com/yVAhfYTK
23:18:33FromDiscord<Fern & Simula (They/Them)> whoops, hang on
23:18:56FromDiscord<Fern & Simula (They/Them)> this has the correct line numbers https://pastebin.com/jEsk7pNT
23:19:22FromDiscord<Fern & Simula (They/Them)> error occurs on line 53
23:19:26disrupteki wish the playground didn't make me scroll so much.
23:22:09clyybbercase object init got smarter
23:22:10disrupteki think you're missing a string cast somewhere. you're comparing to x when you need to compare to "x".
23:22:14clyybberthe error messages dumber
23:22:31clyybberwell, not dumber since they are not emitted as often now
23:22:32disruptekprobably line 39ish
23:23:36disruptekdamn 4-digit versions. who are these people?
23:23:43FromDiscord<Fern & Simula (They/Them)> nope, `k` is the string value
23:23:59FromDiscord<Fern & Simula (They/Them)> it's in a table where the keys are strings, and the values are NimNodes
23:24:33disruptekbut is it a literal string?
23:24:36clyybberdisruptek: tell me, is this acceptable: https://paste.gg/p/anonymous/22414066a6384c7bb4b979fdba117dc2 ?
23:24:36FromDiscord<Fern & Simula (They/Them)> yes
23:25:09FromDiscord<Fern & Simula (They/Them)> `k` is the string value taken directly from the ident nodes passed to the macro
23:25:11disruptekacceptable how?
23:25:27clyybberacceptable in the sense that it degraded the error messages
23:25:30disruptekk is a string literal? not a string value.
23:25:42clyybberwell, theres no way around degrading them
23:25:43FromDiscord<Fern & Simula (They/Them)> oh. k is a string value
23:25:45clyybberafaict
23:25:50disruptekhas to be a literal.
23:25:53clyybberI guess I'll have to write some docs
23:25:58FromDiscord<Fern & Simula (They/Them)> what, why?
23:26:29disruptekbecause that's what you're trying to compare. x isn't in scope there.
23:27:00FromDiscord<Fern & Simula (They/Them)> but enclosing it in backticks should turn it into a literal, shouldnt it?
23:27:12FromDiscord<Fern & Simula (They/Them)> k isnt x, k is "x"
23:27:12disruptekclyybber: i32 is a field?
23:27:32disruptekk needs to be newStrLit(k)
23:27:42disruptekif i'm reading this right...
23:27:48FromDiscord<Fern & Simula (They/Them)> i dont think you are
23:28:00FromDiscord<Fern & Simula (They/Them)> in the error message it says if token.val == "x":, so x is a string literal
23:28:49clyybberdisruptek: Eh of course that 2nd one will be fixed. Which i32?
23:28:57disrupteknear the end.
23:28:58clyybberAh yeah
23:29:03clyybberIn that test case yeah
23:29:38disruptekwhere is the error message?
23:30:00disruptekoh, i see.
23:30:05clyybberthe ones after Expected: are the old ones
23:30:14clyybberthe ones after Gotten: the new ones
23:30:22disruptekyes, i grokked that.
23:30:27clyybberk :p
23:31:08disruptekoh, so you're trying to echo [x], right?
23:31:27FromDiscord<Fern & Simula (They/Them)> yeah
23:31:42FromDiscord<Fern & Simula (They/Them)> just as a small test. that should change in the future
23:32:11disrupteki think that body is malformed somehow, because nim is expecting an identifier and it's getting an if statement.
23:32:28disruptekprint it with `repr` or `treeRepr`
23:33:55FromDiscord<Fern & Simula (They/Them)> `(StmtList (Command))`
23:34:53FromDiscord<Fern & Simula (They/Them)> yeah i think thats the issue
23:35:02FromDiscord<Fern & Simula (They/Them)> i think i misread a previous thing and made a bad node
23:35:58FromDiscord<Fern & Simula (They/Them)> yup thats it. replaced it with mainBody = newStmtList
23:36:12disruptekyay
23:43:57FromDiscord<Fern & Simula (They/Them)> thank you so much, im so happy :)
23:44:41disruptekwith great power comes great responsibility.
23:45:11*FromDiscord <Fern & Simula (They/Them)> writes all the terrible macros
23:46:49*clyybber tests
23:46:57FromDiscord<Clyybber> nice
23:47:39disruptekhmm, nimph is letting me downgrade outside of the project's reqs but not outside of the dependency reqs.
23:48:07disruptekbut, like, it knows it's broken.
23:48:15disrupteknpeg>=0.21.3 from nimph unmet by npeg-#0.20.0
23:53:10disruptekdoesn't anyone test this stuff?