<< 04-02-2020 >>

00:01:39*lritter quit (Ping timeout: 240 seconds)
00:05:37leorizeok I kinda give up on nimph
00:09:39shashlickwhat's wrong
00:20:36leorizefor some reason, nimph keeps trying to do nimble dump on the Nim source tree
00:21:10leorizeI moved the tree to an another location, and now it's trying to nimble dump the nimble packages that I have in /usr/share/nimble/pkgs (yes, I do have nimble packages installed globally)
00:21:47leorizeand I don't even know what it's trying to do :/
00:33:53disruptekleorize: yes, it will try to learn the versions of anything in its path. that's how it figures out what dependencies are available to your package and what their versions are.
00:34:33disruptekif you limit the compiler's search path with a nim.cfg then nimph will similarly limit the packages it looks at.
00:34:52leorizemy search path don't have ~/source/Nim/lib...
00:35:03leorizeI don't know how it figured to look in there
00:35:23disruptekit's likely a path setup by the compiler.
00:35:36disrupteksee `nim dump` to confirm, or run nimph with --log=lvlDebug
00:36:05disruptekif you really think it's a bug, then build it with -d:debugPaths -d:debug and you'll get tons of path-related output.
00:37:23*krux02 quit (Remote host closed the connection)
00:37:33leorizehow can I pass --log=lvlDebug when I don't specify any subcommand for nimph?
00:37:42leorizeit just passes that to nimble for whatever reasons
00:37:46disruptek`nimph nurse`
00:38:48leorizeit doesn't print anything more important
00:39:00leorizeand nim dump don't show any directory that nimph has tried to look at
00:39:40disruptekreally.
00:40:01leorizeyep, I'll try to compile with a bunch of flags
00:41:37disruptek`nim dump` doesn't show your nim library directories?
00:41:49disrupteki don't know how that's possible, honestly.
00:42:18leorizeit just show the standard library paths, not any of the paths that nimph looked at though
00:42:31disruptekcan you paste some output somewhere?
00:44:07disruptekwhen nimph look at path X, it will also search X's parents to find a source .nimble. but, the compiler includes a compiler.nimble, so i don't really understand how it could not find that.
00:45:17disruptekalso, afaik $nim works anywhere the other path subs work. i don't think there's any special code for it; it's equivalent to config.libpath iirc.
00:45:44leorizeit's equivalent to getPrefixDir
00:45:58disruptekokay, sure.
00:46:01leorizewhich is /usr for nim installed in /usr/bin/nim
00:46:10leorizeand I don't have "compiler" there :P
00:46:51disrupteki don't think i've ever tested nimph against a nim installed outside of its git tree; you're basically on your own, there.
00:47:24leorizeadd my gentoo overlay, it has a nim-9999.ebuild :P
00:48:16leorizeI'll probably have to "fix" this by just do a copy of Nim source to /usr/lib then symlink the rest
00:48:33disrupteki'm told that no one important wants to use nimph, so it no longer needs to serve any such strange use-case. yay!
00:50:06disrupteki'm sure there's an easier solution in src/nimph/config.nim if you really want to pursue it.
00:53:15leorizedisruptek: I figured out one problem
00:53:23leorizelooks like nimph hardcodes the compiler path...
00:55:35disruptekprobably, yes.
00:55:57leorizeit hardcodes the path of the compiler used to compile it...
00:56:05leorizeand that one is in the source tree
00:56:06disruptekyes, that was my understanding.
00:58:11leorizethat's where 90% of my troubles came from
00:58:34disruptekthis `make -j 4 -l 4` stuff is silly.
00:58:59leorizethe other 10% is from nimble attempting to create a temporary file in a read-only folder...
00:59:15disruptekyes, there's an open ticket for that.
00:59:26disruptekplease create a ticket for the nimph bug and i will fix it.
00:59:42disrupteki mean, there's an open ticket to fix nimble.
01:00:30disruptek!search permission denied fatal
01:00:31disbothttps://github.com/nim-lang/nimble/issues/748 -- 3permission denied to ~/.nimble/pkgs is fatal 7& 4 more...
01:00:54*rockcavera joined #nim
01:02:00leorizeI'll probably fix nimble myself, I'm gonna use Nim in a shared project and I'd like it to be as frictionless for others as possible
01:02:44leorizemeanwhile what would you like me to file for nimph? :P
01:02:44disruptekwell, that would be awesome. that bug really annoys me because i never let nimble write anywhere.
01:03:01disruptekthat the compiler path shouldn't be hardcoded if we can help it.
01:03:16leorizeI'll have to fix that bug anyway if I want nimble to support global package directory
01:03:31disruptekthat one and several others.
01:05:20*nullwarp joined #nim
01:06:04*disrupteq joined #nim
01:08:00leorizedone disruptek/nimph#118
01:08:12disruptekthanks. 👍
01:15:14*icebattle quit (Ping timeout: 240 seconds)
01:15:16dom96Cool, my talk is up https://mirror.as35701.net/video.fosdem.org/2020/AW1.125/asyncawaitnim.mp4
01:20:16*Hideki_ joined #nim
01:24:52*Hideki_ quit (Ping timeout: 265 seconds)
01:34:40ftsf@dom96, ooh, keen to watch it after work
01:39:31*cgfuh joined #nim
01:41:34*k4k0 joined #nim
01:42:21*k4k0 left #nim (#nim)
01:55:48*a_b_m quit (Read error: Connection reset by peer)
02:10:47*thomasross quit (Ping timeout: 265 seconds)
02:13:08FromDiscord_<Fern & Simula (They/Them)> whats the difference between `quote` and `quote do`?
02:27:17*chemist69_ joined #nim
02:30:36*chemist69 quit (Ping timeout: 265 seconds)
02:40:57ftsf@dom96, https://play.nim-lang.org/#ix=28pQ doesn't seem to work "Unable to load ix paste, file too large, or download is too slow"
02:41:44ftsfahh, a few reloads and it worked
02:41:57ftsfwhen running: /usercode/in.nim(11, 19) Error: undeclared identifier: 'Future'
02:42:53ftsfseems to need import asyncdispatch
02:44:45ftsfwould be good to include an example of what getMagicalInt might look like so the playground is functional
02:47:05ftsf*applause* good talk @dom96
02:49:46nisstyreyeah it was great, I just watched it all
02:50:03nisstyreI didn't know async/await were just macros
02:50:12ftsfsame, impressed!
03:00:55*cgfuh quit (Quit: WeeChat 2.6)
03:01:15*cgfuh joined #nim
03:03:26*endragor joined #nim
03:04:40*ptdel joined #nim
03:05:07*cgfuh quit (Client Quit)
03:05:25*cgfuh joined #nim
03:11:34*icebattle joined #nim
03:16:08*icebattle quit (Ping timeout: 260 seconds)
03:23:20*rockcavera quit (Remote host closed the connection)
03:37:18*muffindrake quit (Ping timeout: 265 seconds)
03:39:02*muffindrake joined #nim
03:43:01leorizeshashlick: you around?
03:50:12shashlickSup
03:50:50leorizewhy does nimble copy the generated .nims file to it's original directory before running?
03:52:37leorizeI'm reading that code and also traced your commits, ended up with a helpful "Initial version" commit :P
03:53:19shashlick🙂
03:53:28disrupteqprobably so that a current dir assumption works.
03:53:35shashlickya cause the nimble file is there and that's the only way to ensure that relative paths work
03:53:51leorizehmmm does --path not work?
03:53:58shashlickif i run it from temp, all existing nimble files that imported or referred to relative paths won't work
03:54:43disrupteqmaybe --path doesn't do what you think it does.
03:54:49shashlicklike if you run a cpFile or similar commands
03:55:07*greenfor` joined #nim
03:56:24leorizeshashlick: is there any nimscript function to get the current script folder?
03:57:57shashlickcurrentSourcePath.parentDir() probably
03:59:06leorizeit's thisDir() for nimscript
03:59:12leorizewe could fake that
03:59:22leorizecurrentSourcePath is a different story though :/
03:59:55leorizeI'm looking into how to avoid copying the file back to the package directory
04:00:02*disrupteq quit (Ping timeout: 240 seconds)
04:00:11shashlickwill be great if you can figure that out
04:00:16shashlicki'm not happy with that hack
04:03:48*disrupteq joined #nim
04:04:32disruptekshashlick: why do you think that's the wrong approach?
04:28:53*thomasross joined #nim
04:38:50*nsf joined #nim
04:48:12shashlickIt's not perfect, having to copy files over for relative paths instead of just setting cwd
04:48:52disruptekcan you just run it from the same directory as the project file?
04:49:41disruptekie. `cd /some/where; nim e /some/other/path/foo.nims`
04:54:28shashlickNo relative paths don't work
04:54:56shashlickAny code context in any Nim file is relative to that file
04:55:23disruptekthat's... surprising.
04:58:41*sentreen quit (Ping timeout: 272 seconds)
04:59:08*sentreen joined #nim
04:59:20disruptekso maybe you should setCurrentDir in the generated script?
05:01:46*ltriant quit (Quit: leaving)
05:14:25*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
05:18:02*gmpreussner quit (Ping timeout: 240 seconds)
05:18:16leorizefor include and import, I think --path should do
05:18:46*gmpreussner joined #nim
05:19:36*sentreen quit (Ping timeout: 265 seconds)
05:20:01*sentreen joined #nim
05:40:40*marmotini_ joined #nim
05:51:29*narimiran joined #nim
05:51:30*endragor quit (Read error: Connection reset by peer)
05:56:12*Jjp137_ joined #nim
05:56:17*Jjp137 quit (Read error: Connection reset by peer)
06:13:27*cgfuh quit (Quit: WeeChat 2.6)
06:14:30*thomasross quit (Killed (verne.freenode.net (Nickname regained by services)))
06:14:30*thomasross joined #nim
06:19:54*endragor joined #nim
06:41:45*s3govesus joined #nim
07:02:20*marmotini_ quit (Remote host closed the connection)
07:21:21FromDiscord_<Rika> are `cast`s normally unsafe
07:21:28FromDiscord_<Rika> or are they considered "safe"
07:21:47Araqit's Nim's most unsafe feature.
07:22:07FromDiscord_<Rika> i see
07:22:41FromDiscord_<Rika> how would i go by changing an object to another object, knowing that the 2nd object only adds fields
07:23:11FromDiscord_<Rika> https://play.nim-lang.org/#ix=2aKm something akin to this
07:24:02leorizeI think the compiler is permitted to rearrange the field, even though it doesn't do so atm
07:24:12leorizeuse inheritance for this
07:24:19leorize`cast` is unsafe by design
07:24:40FromDiscord_<Rika> well i assumed it was but was unsure if it was
07:25:32FromDiscord_<Rika> also i have Test2 first, and cannot inherit Test1
07:26:06Zevvleorize: afaik there is no rearranging as objects are guaranteed to map on the underlying C struct
07:26:16Zevvthere might be packing though, but that does not affect augmentation
07:26:25leorizeI thought that's only applicable to tuples?
07:28:01*dddddd quit (Remote host closed the connection)
07:28:03Zevvgood point, can't find it in the manual though
07:53:04*solitudesf joined #nim
07:54:21Araqthe spec in my head says "layout is compatible for .bycopy" objects
07:55:01Araqbut it kinda sucks, we need ".clayout" for that. however since every version uses clayout probably something like .freeToReorder makes more sense
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:41*gmpreussner joined #nim
08:04:57Zevvbut since nothing is reordering yet, we need nothing at this time and we can document that the default is .clayout
08:06:21*vesper11 quit (Ping timeout: 265 seconds)
08:07:03*PMunch joined #nim
08:07:48*vesper11 joined #nim
08:12:05PMunchBack to work after a great time at FOSDEM2020! Two of the four Nim talks are already available online for those who would like to watch them: https://fosdem.org/2020/schedule/event/nimoneverything/ https://fosdem.org/2020/schedule/event/nimoneverything/
08:12:23PMunchWoops, same link twice: https://fosdem.org/2020/schedule/event/asyncawaitnim/
08:12:27Zevvcmon dude. You can't fool us
08:12:29Zevvright
08:12:33Zevv:)
08:13:09PMunchHaha, cut me some slack, I got home after midnight yesterday and is running on about 5 hours of sleep :P
08:13:21PMunchs/is/am
08:13:22ZevvYou can't even english anymore
08:13:41PMunchHaha, exactly!
08:14:00ZevvThe Delirium Tremens must be getting to you - better take it easy for a few days
08:14:55AraqPMunch, do I need to do anything to get my talk online?
08:15:01PMunchAnd of course it's been snowing non-stop while I was gone, so had to shovel my driveway to get the car out this morning. And had to pull a taxi free from another driveway as he was stuck (yay for having a good car and a tow-rope)
08:15:09*hax-scramper quit (Ping timeout: 268 seconds)
08:15:19PMunchAraq, you should've gotten a link to review the video
08:15:23*hax-scramper joined #nim
08:15:49PMunchThere you can make sure that the start/stop times are good and check that the audio sounds fine
08:16:05PMunchIf you haven't gotten it try asking over in #fosdem-video here on Freenode
08:16:27PMunchZevv, yeah that stuff hits hard :S
08:17:12Araqhaven't checked my emails yet...
08:20:30*chenhq2005 joined #nim
08:21:20PMunchAh right, yeah as soon as you finish the review process it will get sent of for rendering, and then it will be made available in about a day it seems
08:37:28*JustASlacker joined #nim
08:38:08*chenhq2005 quit (Ping timeout: 260 seconds)
08:43:14*floppydh joined #nim
08:43:20*thomasross quit (Ping timeout: 268 seconds)
08:46:15FromGitter<alehander92> yeah norway sounds fun
08:46:18FromGitter<alehander92> for driving
08:47:24*thomasross joined #nim
08:50:01PMunchHaha, it's definitely an experience
08:59:16*Vladar joined #nim
08:59:37ZevvI'm having some macro headaches. I have a snippet of Nim that works, and I am trying to generate the same code from a macro. My AST is the same according to dumpAstGen, only I have some newIdentNode()s where the original AST has newSymNode(). What is newSymNode(), and where does that come from? My problem now is "inconsistent typing for reintroduced symbol"
09:03:46PMunchA symbol is a looked-up ident
09:04:02PMunchThat is an ident that's been resolved to a type
09:04:17FromDiscord_<mratsim> you probably either need to transform everything as a newIdentNode or you are using the same name twice and need to "let foo = newNimNode("foo")" and need to reuse that
09:12:38*chenhq2005 joined #nim
09:17:39ZevvOk, let me dump my code
09:17:55Zevvneed to cleanup a bit first
09:19:55Zevvhttp://ix.io/2aKD
09:20:11ZevvI must say the error message eludes me
09:20:23Zevvso can I force the lookup of an ident to fix this?
09:20:25ZevvbindSym?
09:23:02*Pqzcih5 joined #nim
09:28:12*chemist69_ quit (Ping timeout: 265 seconds)
09:29:02*chemist69 joined #nim
09:36:48*skrylar joined #nim
09:40:19*NimBot joined #nim
09:41:08ZevvI think I do, otherwise I do not know what Box[T] to put it into
09:41:13ZevvgetType needs typed
09:41:16FromGitter<Vindaar> Ah, yes just saw that too
09:41:52ZevvI have a working alternative that works with untyped, by doing Box[typeof(v)], but I need some glue there to automatically convert strings to cstrings
09:42:01Zevvso for that I want to know it it is a string
09:42:06FromGitter<Varriount> We need a "guide to macros for the unenlightened" detailing these things. I don't think the difference between a symbol and an identifier is spelled out anywhere
09:42:34ZevvI touch these things every now and then, but there are just a lot of relevant details
09:42:38ZevvI never said it was simple ;)
09:43:32ZevvBut your point 2 explains the error message, which is nice. thanks
09:44:36FromGitter<Vindaar> no worries. you could come up with some naming convention and return e.g. the result as `aBox` or something
09:55:58*chenhq2005_ joined #nim
09:56:20FromGitter<Vindaar> or you leave it untyped and add an `initBox` proc: https://ix.io/2aKJ/nim
09:56:39FromGitter<Vindaar> http://ix.io/2aKJ/nim
09:57:11FromGitter<Vindaar> however that errors when compiling the C code. But I guess that's because of the pragma? works without it at least
09:59:13*chenhq2005 quit (Ping timeout: 260 seconds)
10:03:03*natrys joined #nim
10:04:42Zevvyeah it's for a specific cpu only, but that is the whole point. This data gets stored in a magic place that is not mapped to memory, and I'm trying to hide that fact
10:05:35ZevvinitBox does the job - thanks for that
10:05:56FromGitter<Vindaar> yep, cool!
10:14:35skrylarmailed the new build scripts for alpine off to the maintainer
10:42:04*abm joined #nim
10:50:07FromGitter<Varriount> Mailed as in, emailed, or physically mailed?
10:50:28FromGitter<Varriount> skrylar: ^
10:51:07Araqwhy would it mean "physically mailed"?
10:51:51*skrylar pontificates.
10:52:20skrylare-mailed, but that might not be minimalist enough for them ^_~
10:53:09dom96PMunch any ideas when these talks make it to YouTube?
10:53:22skrylari did notice that the async tests seem to hang indefinitely (or at least for longer than 20 minutes) so i have checks turned off :/
10:55:11*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
10:56:29*pbb joined #nim
11:14:09*pigmej quit (*.net *.split)
11:14:10*chenhq2005_ quit (*.net *.split)
11:14:10*skrylar quit (*.net *.split)
11:14:21*PMunch quit (*.net *.split)
11:14:21*muffindrake quit (*.net *.split)
11:14:21*letto_ quit (*.net *.split)
11:14:21*matti quit (*.net *.split)
11:14:21*uvegbot quit (*.net *.split)
11:14:21*FromGitter quit (*.net *.split)
11:14:21*nuxdie quit (*.net *.split)
11:14:21*msmorgan quit (*.net *.split)
11:14:21*tefter quit (*.net *.split)
11:14:21*oprypin quit (*.net *.split)
11:14:21*moon-chilled quit (*.net *.split)
11:14:21*dom96 quit (*.net *.split)
11:14:21*bozaloshtsh quit (*.net *.split)
11:14:21*r4vi quit (*.net *.split)
11:14:21*jwm224 quit (*.net *.split)
11:14:21*silvernode[m] quit (*.net *.split)
11:14:21*BitPuffin quit (*.net *.split)
11:14:21*skelett quit (*.net *.split)
11:14:21*Ckat quit (*.net *.split)
11:14:21*pbb quit (*.net *.split)
11:14:21*hax-scramper quit (*.net *.split)
11:14:21*gmpreussner quit (*.net *.split)
11:14:21*endragor quit (*.net *.split)
11:14:21*ehmry quit (*.net *.split)
11:14:21*ikan-keli_ quit (*.net *.split)
11:14:21*gangstacat quit (*.net *.split)
11:14:21*Yardanico quit (*.net *.split)
11:14:21*disbot quit (*.net *.split)
11:14:21*blueberrypie quit (*.net *.split)
11:14:21*hpyc9 quit (*.net *.split)
11:14:21*EastByte quit (*.net *.split)
11:14:21*cyraxjoe quit (*.net *.split)
11:14:21*d10n-work quit (*.net *.split)
11:14:21*zielmicha__ quit (*.net *.split)
11:14:21*WilhelmVonWeiner quit (*.net *.split)
11:16:07*dom96 joined #nim
11:16:07*dom96 quit (Changing host)
11:16:07*dom96 joined #nim
11:17:08*hohlerde quit (*.net *.split)
11:17:08*Yardanico[m] quit (*.net *.split)
11:17:51*r4vi joined #nim
11:17:51*jwm224 joined #nim
11:17:51*silvernode[m] joined #nim
11:17:51*BitPuffin joined #nim
11:17:51*skelett joined #nim
11:17:51*Ckat joined #nim
11:18:01*pigmej joined #nim
11:18:01*natrys quit (*.net *.split)
11:18:02*thomasross quit (*.net *.split)
11:18:02*vesper11 quit (*.net *.split)
11:18:02*narimiran quit (*.net *.split)
11:18:02*arecaceae quit (*.net *.split)
11:18:03*mal`` quit (*.net *.split)
11:18:03*Amun_Ra quit (*.net *.split)
11:18:04*kadin quit (*.net *.split)
11:18:04*blackbeard420 quit (*.net *.split)
11:18:04*d10n_ quit (*.net *.split)
11:18:05*Eyess quit (*.net *.split)
11:18:07*shashlick quit (*.net *.split)
11:18:08*GaveUp quit (*.net *.split)
11:18:11*s3govesus quit (Ping timeout: 247 seconds)
11:18:13*d10n joined #nim
11:18:17*setenforce joined #nim
11:18:27*chenhq2005_ joined #nim
11:18:27*skrylar joined #nim
11:18:27*PMunch joined #nim
11:18:27*muffindrake joined #nim
11:18:27*letto_ joined #nim
11:18:27*uvegbot joined #nim
11:18:27*FromGitter joined #nim
11:18:27*msmorgan joined #nim
11:18:27*tefter joined #nim
11:18:27*oprypin joined #nim
11:18:27*moon-chilled joined #nim
11:18:46*bozaloshtsh joined #nim
11:18:48*natrys joined #nim
11:18:53*pbb joined #nim
11:18:53*hax-scramper joined #nim
11:18:53*gmpreussner joined #nim
11:18:53*endragor joined #nim
11:18:53*ehmry joined #nim
11:18:53*ikan-keli_ joined #nim
11:18:53*gangstacat joined #nim
11:18:53*Yardanico joined #nim
11:18:53*disbot joined #nim
11:18:53*blueberrypie joined #nim
11:18:53*hpyc9 joined #nim
11:18:53*EastByte joined #nim
11:18:53*cyraxjoe joined #nim
11:18:53*zielmicha__ joined #nim
11:18:53*WilhelmVonWeiner joined #nim
11:19:01*matti joined #nim
11:19:09*GaveUp joined #nim
11:19:13*Amun_Ra joined #nim
11:19:48*d10n quit (Changing host)
11:19:48*d10n joined #nim
11:20:18*noonien quit (Ping timeout: 245 seconds)
11:20:36*r4vi quit (Ping timeout: 248 seconds)
11:20:47*mal`` joined #nim
11:21:12*gsingh93 quit (Ping timeout: 268 seconds)
11:21:35*MD87 quit (Ping timeout: 252 seconds)
11:21:43*r4vi joined #nim
11:21:45*SunDwarf joined #nim
11:21:47*LyndsySimon quit (Ping timeout: 260 seconds)
11:21:49*narimiran joined #nim
11:21:52*arecaceae joined #nim
11:21:52*blackbeard420 joined #nim
11:22:03*npgm quit (Ping timeout: 260 seconds)
11:22:10*SunDwarf is now known as Guest89399
11:22:21*MD87 joined #nim
11:22:31*LyndsySimon joined #nim
11:22:32*vesper11 joined #nim
11:23:14*gsingh93 joined #nim
11:23:14*msmorgan quit (Ping timeout: 265 seconds)
11:23:43*npgm joined #nim
11:23:48*noonien joined #nim
11:23:52*shashlick joined #nim
11:24:23*msmorgan joined #nim
11:24:37*d10n-work joined #nim
11:24:38*nuxdie joined #nim
11:32:34*natrys quit (Quit: natrys)
11:32:52*natrys joined #nim
11:38:36*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
11:39:04*pbb joined #nim
11:47:58*pbb_ joined #nim
11:50:11*pbb quit (Ping timeout: 252 seconds)
11:59:57PMunchdom96, no idea really. Think it's probably a couple of days
12:01:32PMunchVarriount, yes a guide like that would be helpful. But the difference in this case is kinda outlined in the description of the NimSym type: "Represents a Nim symbol in the compiler; a symbol is a looked-up ident."
12:03:28PMunchAnd Zevv, probably the easiest way to achieve that is to create a macro makeBox that takes a typed argument and returns "Box[thetype](val: thevalue)" and then have your current macro expand to "let a {.codegenDecl: "...".} = makeBox(thevalue)"
12:04:00*FromGitter quit (Remote host closed the connection)
12:04:18*FromGitter joined #nim
12:04:54*nsf quit (Quit: WeeChat 2.7)
12:12:13*abm quit (Ping timeout: 260 seconds)
12:12:58*krux02 joined #nim
12:20:12*endragor quit (Remote host closed the connection)
12:20:39*couven92 joined #nim
12:27:41ZevvPMunch: yeah, that is what I discussed with Vindaar this morning, should work. It was just that I was a bit flabbergasted with the error I had never met before
12:28:44PMunchYeah, macros can be a bit complex :P
12:28:53*endragor joined #nim
12:29:06PMunchCan't really think of a way to make them much easier either..
12:30:06ZevvGiven my npeg adventures with macros I already counted myself as "one of the guys", but my naivity was again showing
12:30:36ZevvBut really, I think I know my way around, but *always* its something type related if I run into problems
12:31:00PMunchHaha, working with the typed inputs are always a bit harder
12:31:04ZevvAnd I am not ashamed of my self: https://github.com/nim-lang/RFCs/issues/44
12:31:06disbot[RFC] Working with types in macro is difficult.
12:31:49PMunchBut yeah, the trick is just to "defer" the little type-checking you normally need to the output of your main macro.
12:33:19*endragor quit (Ping timeout: 265 seconds)
12:33:24PMunchI think it's mostly a documentation error, but maybe we should have a NimNode[typed] vs. NimNode[untyped] distinction that makes it a bit more obvious to the user what they are working with
12:33:52ZevvThat would help indeed
12:39:46*cgfuh joined #nim
12:50:25*PMunch quit (Read error: Connection reset by peer)
12:50:30*PMunch_ joined #nim
12:50:38*PMunch_ is now known as PMunch
12:54:36Araqit's what OCaml does internally
12:54:41AraqI'm not sure if it helps or not
12:55:01Araqbut types are really much harder than ASTs
12:58:22Araq"I ran that with nimble build which omits the compilation messages"
12:58:32Araqcan somebody fix nimble please?
13:07:07dom96Why?
13:07:26dom96if you want output you can use `nimble c`
13:13:44leorizeAraq: nimble build --debug
13:13:47leorizeyou're welcome
13:14:10leorizeI'm aliasing nimble to nimble --debug so I can see the important stuff now
13:17:37*icebattle joined #nim
13:22:27*icebattle quit (Ping timeout: 265 seconds)
13:28:21*Kaivo joined #nim
13:29:40*kungtotte quit (Read error: Connection reset by peer)
13:30:22*kungtotte joined #nim
13:31:36Araqleorize, it's not about me
13:31:55AraqI quoted somebody from the forum. people run into this quite often.
13:32:01leorizenimble has this weird principle of "hiding the compiler" for whatever reason
13:32:15leorizethis is a design decision and you'll have to convince it's author to change it
13:32:32Araqyes, that's exactly what I'm trying to do.
13:32:41Araqthe design decision has no merit.
13:37:40*shashlick quit (Quit: quit)
13:38:34*shashlick joined #nim
13:39:48*marmotini_ joined #nim
13:40:35*marmotini_ quit (Remote host closed the connection)
13:41:09*marmotini_ joined #nim
13:41:16*marmotini_ quit (Remote host closed the connection)
13:41:18Araqfeedback welcome: https://github.com/nim-lang/Nim/pull/13309
13:41:21disbotnew outplace operator: `doAssert @[2,1,3].@sort() == @[1,2,3]` ; snippet at 12https://play.nim-lang.org/#ix=2aLi
13:41:31*marmotini_ joined #nim
13:44:01*Vladar quit (Quit: Leaving)
13:44:30PMunchWait, what exactly does that do?
13:44:55leorizebasically an operator for the new outplace macro
13:44:57dom96what is the point of this?
13:44:58dom96We've already got two different ways to do sorting
13:44:59dom96why add a third?
13:45:12leorizebecause it's not restricted to only sorting?
13:45:24PMunchOooh, so it allows you to do dot-chain calls that take a var parameter?
13:45:28narimiranmy concern is that `@` now would mean two completely different things
13:46:57dom96leorize and what does `outplace` accomplish?
13:47:14leorizecopy the parameter and pass it to a var function
13:47:15dom96Outplace operator: turns an `in-place`:idx: algorithm into one that works on a copy and returns this copy.
13:47:57leorizeallowing you to not have to write two versions of the same proc for example
13:48:29dom96I'd rather get a macro which follows our conventions
13:48:41leorizewhat conventions?
13:48:56dom96i.e. sort vs. sorted
13:49:01dom96sort takes a `var`, sorted makes a copy.
13:49:10leorizeplease no
13:49:19dom96It's simple and we can have a macro that means you don't have to duplicate code
13:49:30dom96even though the duplication is so minor
13:49:45dom96Please no from me on this operator
13:50:55dom96Rather, a big no. This has such a small use case which is already handled by our convention that it doesn't make sense to introduce an obscure operator that everyone will need to learn
13:51:00Araq"minor duplication"?
13:51:09Araqit's a factor of 2 for almost every API
13:51:33*nsf joined #nim
13:51:34leorizelook no further: strutils
13:52:20dom964 lines: https://github.com/nim-lang/Nim/blob/devel/lib/pure/algorithm.nim#L437-L457
13:52:58dom96which could be easily abstracted away by a `copy` proc
13:53:19Araqoh really? and how do you write this 'copy' proc?
13:53:25Araqsmartass :P
13:53:53Araqever considered the people involved were not morons?
13:53:56FromDiscord_<Rika> oof
13:54:13dom96*shrug* 4 lines is still nothing
13:54:45Araqit's not how to count this.
13:55:09FromDiscord_<Rika> you're only accounting for that one specific case
13:55:30leorizeare you gonna introduce removedPrefix, removedSuffix? :)
13:55:46Araqnarimiran, it's '.@' vs '@'
13:56:05FromGitter<Vindaar> I like the `@` operator for this. To me it feels sort of natural that it should be `@`. While not restricted to procs working on `var seq[T]` this is certainly a major use case. And then `@` just means "make me a tmp seq please!"
13:56:10leorizewe need to operator to screams "copying" :P
13:56:28FromDiscord_<Rika> Vindaar, but it's for anything mutable afaik, not just seqs
13:56:35FromGitter<Vindaar> that's what I said
13:56:55FromDiscord_<Rika> but then the meaning wouldnt always mean "make me a temp seq"
13:56:56dom96also, if a macro can be made to copy things generically why can't an actual `copy` macro be amde?
13:56:57dom96*made
13:57:15dom96Indeed, the `@` implies seqs, which apparently is just one specific case, right? :)
13:57:15Araqlook, the operator is '.@'
13:57:31Araqyou don't have to like it, but you can surely get the facts right
13:57:56narimiranAraq: i know it is really a `.@`, but to an "untrained eye" it looks like @ following the usual dot
13:58:05AraqI personally would use something else too
13:58:22FromDiscord_<Rika> i really think "outOfPlace" would be the best name for this
13:58:40FromGitter<Vindaar> @Rika: of course not, but a majority of use cases involve those. So (to me anyways) it makes sense that this is where the idea for `.@` comes from
13:58:42*dddddd joined #nim
13:58:44Araqwe already have the named version, 'outplace' is the best term for it
13:58:56dom96`outplace` means nothing to me
13:58:59Araqproblem with the named version is usability
13:59:11dom96why not `copied` or something?
13:59:40narimiranhow about `.!` ?
13:59:40dom96and yeah, I don't care if it's there as a non-operator
13:59:42Araqit was considered to be more confusing. at least 'outplace' screams "ok, ok, I'm gonna look this one up"
13:59:54FromDiscord_<Rika> `.!` what's the inspiration for this
14:00:05Araqwhereas 'copied' might give you the wrong idea
14:00:22dom96what idea could it give you that would be wrong?
14:00:26narimiraninspiration for `.!` are languages which have `mutating!` vs `nonmutating`
14:00:41Araqit's not about the copy, the copy is an unfortunate artifact
14:00:44FromDiscord_<Rika> can i have a language name for those
14:00:59Araqit's about "don't mutate x here"
14:01:18FromDiscord_<Rika> what about "noMut" or some sorta thing like that
14:01:19dom96`copy` implies that perfectly
14:01:36dom96s/copy/copied/
14:01:42Araqalgorithms can be in-place and we like them, but usability of them is worse, so we have outplace
14:02:37narimiran@Rika julia
14:03:06FromDiscord_<Rika> i'll check their docs out a bit
14:03:40FromDiscord_<Rika> hmm, it seems kinda localized to julia
14:03:48FromDiscord_<Rika> i dont think rust does something like that?
14:03:58FromDiscord_<Rika> hmm but rust doesnt have the best naming either
14:04:21Araqthe point of this PR is to introduce an operator for usability
14:04:26FromDiscord_<Rika> i think it's okay, the `.!`
14:04:32Araqand now you discuss a "better name for outplace"
14:04:52Araqhave fun with that, but I'm out, have stuff to do.
14:04:54*Vladar joined #nim
14:05:06FromDiscord_<Rika> see you
14:05:07narimiran@Rika https://docs.julialang.org/en/v1/manual/style-guide/#Append-!-to-names-of-functions-that-modify-their-arguments-1
14:05:23dom96same. I've given my opinion. I don't think this deserves an operator, at least for now.
14:08:26*ftsf quit (Ping timeout: 240 seconds)
14:09:57FromDiscord_<Rika> narimiran i think it looks good honestly
14:10:08narimiran:)
14:10:11FromDiscord_<Rika> but i think the after-function-name works better than the macro sadly
14:11:29narimiranto me `foo.@bar(baz)` would be confusing if i just came to nim and learnt that `$` converts to string, and `@` converts to seq. and now somebody is converting a function to a seq?!?!
14:12:56dom96agree completely
14:20:46FromDiscord_<kodkuce> still no araq fosdem video or i blind?
14:20:55FromDiscord_<Clyybber> the name outplace is about the "inversion" of inplace mutation
14:22:15FromDiscord_<Clyybber> I also like .! more than .@
14:22:38*chenhq2005_ quit (Read error: Connection reset by peer)
14:23:32FromDiscord_<Clyybber> .~ looks fine to me too
14:24:29PMunchBy the way Araq, I tested casting a `ptr MyType` to an `Option[ptr MyType]` and it worked fine. So apart from being horrible it can actually make some code a bit nicer :)
14:25:00PMunchYou can for example use my ?. conditional chaining operator on pointers that you get from C interop code
14:36:52*ofelas quit (Ping timeout: 268 seconds)
14:43:04narimiranleorize: i have a nim.nvim bug to report :)
14:50:39*marmotini_ quit (Remote host closed the connection)
14:53:05*marmotini_ joined #nim
14:57:14FromGitter<nixfreakz_twitter> Holy shit python versions of driving me crazy
14:57:27FromGitter<nixfreakz_twitter> now 3_8 is breaking everything
15:01:56FromGitter<alehander92> guys
15:02:00FromGitter<alehander92> so many operators
15:02:09FromGitter<alehander92> lets be calmer on this `@` thing
15:02:57FromGitter<alehander92> and `!`
15:03:14FromGitter<alehander92> as i expect `!` to mean "mutate/make something mutable"
15:03:21FromGitter<alehander92> and outplace iirc is the opposite?
15:05:38FromGitter<alehander92> `.~` maybe makes sense? just imo
15:10:03ZevvWhat is the reason to give this an operator at all then?
15:14:32FromGitter<alehander92> the problem i see is that for most algorithms
15:14:39FromGitter<alehander92> i expect the outplaced version to be default..
15:15:01leorize[m]narimiran: :) please tell
15:15:25FromGitter<alehander92> e.g. map, filter, search, find, and for the inplace ones, it just makes sense to be delete vs deleted etc
15:15:41narimiranyou are in the middle of your file, you press `gd` to go to definition, and then you hit ctrl+o to take you back where you've been. nope.
15:15:55leorize[m]Zevv: @timotheecour started the idea, we are just debating it
15:16:05FromGitter<alehander92> and such a scheme would mean that idiomatic would be to do a.filter(b) => changes a, a.~filter(b) => return new
15:16:16FromGitter<alehander92> which might make sense, i am just not sure about it
15:16:30FromGitter<alehander92> (talking as an example user)
15:17:01FromGitter<alehander92> otherwise, its very elegant to be able to automatically outplace them
15:17:36leorize[m]narimiran: hmm, I'll look into it when I get home, but I'm pretty sure I set the ' register before I move the cursor
15:17:37ZevvHa just got a message from the CTO from https://eclypsium.com/, they want to go run Nim in the linux kernel.
15:17:50FromGitter<alehander92> a.with(delete(b)) a.with(sort(b)) ?
15:18:21leorize[m]Zevv: nice :) you suddenly have a potential paying customer
15:20:29PMunchOh cool, and they are serious about it?
15:20:34ZevvWell, I have no shortage of *actual" paying customers as of yet, but it is nice to keep that warm
15:21:09ZevvPMunch: no clue, just got a "Hey we found this, what is the status" about something I did a year ago. So the new --gc:arc --os:any stuff comes in just in time for that
15:21:32FromGitter<kristianmandrup> How can I make a template or macro that takes a table (Object/Hashmap) and spits it out again in some different AST or emit context?
15:21:52Zevvhow do you mean 'different context'?
15:22:00ZevvYou want to eat it here and emit it in a different place?
15:22:02PMunchOh cool
15:22:51FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e398c4b58f02e349761bea3]
15:23:31FromGitter<kristianmandrup> For some reason Nim playground gives me a 502 error when trying to share
15:23:38*ng0_ joined #nim
15:24:08narimiranleorize[m]: now i tried '' (double single quote) to take me back after `gd`, and it took me to some random position
15:24:13FromGitter<kristianmandrup> I'm trying to make Nim emit a JS decorator syntax for a decorator name, arguument(s) and a proc
15:26:49*ng0 quit (Ping timeout: 268 seconds)
15:27:12disrupteknarimiran: use ctrl-o to jump backwards to previous positions in vi.
15:27:27narimirandisruptek: read the whole discussion first :P
15:28:08disruptekahh
15:29:07*ng0_ is now known as ng0
15:31:10disruptekalehander92: yeah, i don't want more operators yet. let me assign them myself until they are defacto.
15:32:22leorize[m]narimiran: looks like I'm not setting it correctly
15:32:37narimiranleorize[m]: i want my full refund!!
15:33:50disruptekwow, nimnode[typed|untyped]; that sounds really interesting.
15:34:24FromGitter<alehander92> hmmmmm
15:36:14*JustASlacker quit (Remote host closed the connection)
15:37:11*Vladar quit (Quit: Leaving)
15:41:24disrupteknarimiran: missed you at fosdem. 🙁
15:41:46narimiransorry :)
15:43:16disruptekwe have sneaky untyped/typeclassed dispatch in templates like untyped{nkIdent}; can we do something similar for nimnode?
15:43:19AraqPMunch, got no email from FOSDEM :-(
15:44:38*couven92 quit (Read error: Connection reset by peer)
15:45:02*lritter joined #nim
15:45:03Araqdom96, I want your opinion after you understood the problem. And I want your opinion specialized to the situation. I already know that don't like new operators
15:46:18Araqand yeah, other languages simply don't solve the problem, ok. fair enough. we could be better than the others but whatever.
15:46:47Araqlet's all strive for mediocrity everywhere because somebody could be confused or scared
15:47:05disruptekon it. 👍
15:48:26disruptekAraq: it would be good to see more examples of how this stuff would look in real code; ie. what's the value of the enhancement.
15:48:40disruptekjust looking at one-liners doesn't really impress.
15:48:49*floppydh quit (Quit: WeeChat 2.7)
15:48:50Araqwe can remove sorted() from the stdlib
15:49:16Araqand don't need removedPrefix (vs removePrefix), see strutils, it's full of this problem
15:49:47disruptekyes, but the solution isn't as simple as s/ed/@/
15:50:42lqdev[m]is $ for floats locale-independent?
15:50:53Araqlqdev[m], no, it is not.
15:50:59Araqer
15:51:05Araqyes it is *in*dependent
15:51:12Araqsorry I misread.
15:51:41Araqa couple of years ago I actually wanted to make this a language feature, disruptek
15:51:43lqdev[m]glad to hear that Nim's fixing C's mistakes again.
15:52:01Araqthe language rule would have been something like:
15:52:44disruptekyes, and it's a good feature. but it was already added in `outplace`. let's see how to use it before we commit our first sigil operator to it.
15:52:57Araq"if f(args) returns void and is used in a non-void context, it is rewritten to (let tmp; f(tmp, args); tmp)"
15:53:57Araqmy point is: I personally care a lot about this feature.
15:53:58Zevvthat makes me seriously ambivalentic. I hate that but I'd use the hell out of it.
15:54:14disruptekAraq: then you should make it work exactly the way you expect.
15:54:33disruptekyou probably understand it much better than anyone else; let's be realistic.
15:55:16Araqa special language rule bites our philosophy though, "Nim = small core + macro system"
15:55:40Araqand yeah I know we don't have a "small core" anymore but this cannot be an excuse for bloating it more than necessary
15:56:01Araqso a specialized operator is actually quite close to my ideal
15:56:25disruptekwell, you know my opinion: if you want to use it in the compiler, it's okay in stdlib.
15:57:16dom96Araq: ping me in 4 hours, can't spend too much time on it right now
15:57:34Zevvbut hey, it goes into sugar and not in system
15:59:27Araqwe can also make it an 'outplace' module
15:59:34Araqand all it contains is .@
16:00:27disruptekthat sounds better to me.
16:00:45Araqit's syntax, we can bikeshed about it, but I think Timothee is right
16:01:00Araqbefore we can say "ok, it's not used much" we need to make it convenient
16:01:20Araqand then we can still say "ok, nobody cared" and later on deprecate it again
16:01:40Zevvor upgrade and move it into system
16:01:46disruptekplease no.
16:02:41disruptekanyway, if you want to use it, please do use it. otherwise, it's like saying a package manager is unsuitable because it uses packages.
16:03:11disruptekit makes no sense to carefully hone sharp code and then leave it in the corner because it's too sharp.
16:04:26disruptekspend a week building a ladder and then cut it in half so you can fit it in the elevator.
16:08:40FromDiscord_<Clyybber> disruptek: Thing is, outplace only really makes sense with an operator
16:08:52FromDiscord_<Clyybber> since it mimics UFCS
16:14:50ZevvHa, now the guy asked me if I would recommend using Rust or Nim for kernel driver develoment.
16:15:32Zevvpretty great that he is even *considering* not using C
16:18:20FromDiscord_<Clyybber> muh safety
16:20:38AraqClyybber: does that mean you like .@ too?
16:20:56*ptdel joined #nim
16:23:43FromDiscord_<Clyybber> I like having an operator for it, but I think .! or .~ would fit better
16:24:09FromDiscord_<Rika> .! makes at least more sense than .@
16:28:58shashlick@Araq - $13307 is ready to go
16:29:04shashlick#13307
16:29:05disbothttps://github.com/nim-lang/Nim/pull/13307 -- 3Fix #10717, fix #13284
16:29:30FromDiscord_<exelotl> lol I want $13307
16:29:32AraqI just played with it, for me ./ looks best
16:30:05Araqit's like "oh yeah, use 'x' as the current operand" :P
16:32:07Araqbtw (a & b) == a ./add b
16:32:08FromDiscord_<Clyybber> Yep ./ i like too
16:32:35Araqadd vs &, the full += family of operators from C ... it's everywhere
16:37:21*Vladar joined #nim
16:38:06FromGitter<kristianmandrup> Any videos up from FOSDEM?
16:39:18FromDiscord_<Clyybber> doms and pmunchs
16:39:58Araqstill got no email from them :-(
16:42:56disrupteki guess ./ won't work with operateOn, then.
16:43:16Araqlol
16:46:19lqdev[m]if I want to hash a custom AST node using `hashes`, would I do it like this? http://ix.io/2aLz
16:46:26lqdev[m]or do I need to put some special care into it
16:46:37lqdev[m]forgot to !$ the hash at the end
16:48:00dom96Araq join #fosdem-video and ask there
16:48:14FromDiscord_<Clyybber> Ideally operatoeOn wouldn't be needed anymore
16:48:21dom96and double check your spam folder, it went there for me and I couldn't find it even when searching for the email until I went straight into the folder
16:49:15disruptekclyybber: whoosh
16:49:46FromGitter<kristianmandrup> Can I `break` from a for loop? what is the best way in Nim to iterate through a list and add to `result` while each item matches condition, then "break out" when condition no longer. ⏎ I'd think a `while` loop should do?
16:50:13disruptekyou can break. sadly, there is no named continue, but there are named breaks.
16:50:22disruptekAraq: named continue?
16:50:54lqdev[m]disruptek: how'd you expect that to work?
16:51:01disruptekalso, see the sequtils module and keepIf or whatever.
16:51:46disrupteklqdev: it's a java feature.
16:52:24FromGitter<kaushalmodi> @kristianmandrup Yes, use `break`
16:53:25lqdev[m]lqdev: but java also has named loops.
16:53:35disruptekyou tell him, lqdev!
16:53:50*ptdel quit (Ping timeout: 265 seconds)
16:55:48FromDiscord_<Clyybber> no named loops, no named continue?
16:55:59FromDiscord_<Clyybber> just use a break?
16:56:49FromDiscord_<Clyybber> leorize: Yo, what should I use for make then?
16:57:03FromDiscord_<Clyybber> Instead of -j -l (nproc) ?
16:58:16leorizeClyybber: make -j (nproc) optionally with -l (nproc)
16:58:23disrupteki usually use nproc*1.25.
16:58:34leorizethe unofficial algo is -j nproc + 2 -l nproc
16:58:48FromGitter<kristianmandrup> Is this even remotely possible in Nim? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39a2c873ddad4acd90ff7d]
16:58:50leorizethat's used by ninja iirc
16:59:35FromGitter<kristianmandrup> Trying to extend Nim OOP macro example: https://nim-by-example.github.io/oop/
17:00:24leorize@kristianmandrup: I'm not even sure what you're trying to achieve here
17:00:31*matti quit ()
17:00:42disruptekthat `for node, index of` dog won't hunt.
17:01:02*matti joined #nim
17:01:35disruptekneither will your incomplete case statement. who wrote this and can i get some of whatever they were smoking?
17:03:09FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39a3cddc52c34ace462cfc]
17:03:23FromGitter<kristianmandrup> Just "sketching" for now...
17:03:47FromGitter<kristianmandrup> Trying to add decorator support for JavaScript OOP methods, building on OOP macro
17:04:21FromDiscord_<Clyybber> ok, I'll do -j (nproc + 2) -l (nproc) then
17:04:22disruptekoh, i see.
17:04:45FromGitter<Vindaar> @kristianmandrup I'm not familiar with JS decorators. Can you give an example of what kind of code you want to generate?
17:04:56FromGitter<kristianmandrup> A lot of modern JavaScript libraries rely on/require decorators
17:05:39FromGitter<kristianmandrup> https://netbasal.gitbook.io/akita/core-concepts/store
17:05:44FromGitter<Varriount> Araq: For what it's worth, I also don't agree that outplace should have an operator yet
17:06:44FromGitter<kristianmandrup> @Vindaar here
17:06:53FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39a4acdc52c34ace462f3e]
17:07:08leorizeI though decorators are still in the "proposal" state?
17:07:12FromGitter<kristianmandrup> But there are similar cases with decorators for methods
17:07:22disruptekthese are manual-hack decorators.
17:07:22leorizeis there any web browser that actually support this?
17:07:33FromGitter<kristianmandrup> Yeah, but being used heavily with Babel and Typescript, such as in NestJS, Angular etc.
17:08:02AraqVarriount: it's always fine to disagree with me, once you understood the problem.
17:08:09disrupteknot sure how you can control placing the decorator adjacent to the proc in the generated code.
17:08:31FromGitter<kristianmandrup> Well, that's my question - if that is even possible?
17:08:44disruptekmaybe you can do this with a proc prototype.
17:08:56FromGitter<kristianmandrup> if I can combine `emit` macro with macro AST output somehow?
17:09:09leorizegenerate emit statements yourself
17:09:14disruptekhe is.
17:10:02disrupteki guess i would start by seeing if you can inject anything at all in the proper spot; a comment, perhaps.
17:10:59leorizehttps://play.nim-lang.org/#ix=2aLD
17:11:09leorizejust generate the right AST nodes
17:11:15*Trustable joined #nim
17:11:26leorizeI'm not sure if the resulting statements will be at where you expect it to be though
17:13:07leorizeit'd be easier if you can scope the decorator with (ie. {})
17:15:20FromDiscord_<Rika> oh hey the discord update also made it easier to read the irc logs now
17:15:58FromGitter<kristianmandrup> @leorize when I click run in the playground, I don't see any output
17:16:19FromGitter<kristianmandrup> When I try to run it locally
17:16:22FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39a6e6f301780b8366a502]
17:16:23leorizekristimandrup: switch to debug view
17:16:35leorizethe default output view doesn't show compiler messages
17:16:52disruptekrika: huh?
17:17:00FromGitter<kristianmandrup> I see
17:17:05FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39a71173ddad4acd910c57]
17:17:10leorizealso nim module name has to be a valid identifier
17:17:44leorizeand `macro-emit-ast` is not a valid nim identifier :P
17:17:48FromGitter<kristianmandrup> So I can just output the raw AST nodes that the `emit` would generate sprinkled around the rest of the target AST...
17:18:18FromGitter<kristianmandrup> `invalid command: macro_emit_ast.nim`
17:18:29leorizealso not `-c` but `c`
17:18:30FromGitter<kristianmandrup> No underscore allowed in file names?
17:18:43FromGitter<kristianmandrup> ok, works now
17:19:50leorizei don't think the js generator is designed for anything other than web though
17:20:21leorizeI don't think it can generate proper typescript fwiw
17:20:49FromGitter<kristianmandrup> `Unable to load ix paste, file too large, or download is too slow`
17:20:57leorizebut I'm not too familiar with all these stuff so *shrug*
17:21:23leorizekristianmandrup: just reload, ix.io can be overloaded at times
17:22:04leorizenarimiran: I... can't reproduce the bug
17:23:09FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39a87d594a0517c2682394]
17:23:15FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39a883e8a83835591614de]
17:23:35FromGitter<kristianmandrup> ah, perhaps just `string`?
17:25:36leorizetry this: https://play.nim-lang.org/#ix=2aLG
17:27:22narimiranleorize: hmm, interesting.
17:27:40FromGitter<kristianmandrup> cool, How would I parameterise the raw StrLit AST node?
17:27:57leorizeuse newStrLit() :P
17:28:47FromGitter<Vindaar> @kristianmandrup the problem I see is that even if you define e.g. your procs also in the same template / macro, the emitted code will end up anywhere, not necessarily above the proc
17:29:28FromGitter<kristianmandrup> @Vindaar I get this output now
17:29:37FromGitter<kristianmandrup> ```@decoratorName( ⏎ rawEcho();``` [https://gitter.im/nim-lang/Nim?at=5e39aa01dc52c34ace463f2b]
17:29:41FromGitter<kristianmandrup> Not too far off
17:30:58FromGitter<Vindaar> ```code paste, see link``` ⏎ ⏎ for instance. Look at the output in the shell and then at the generated JS file (when compiling with `nim js ...`) [https://gitter.im/nim-lang/Nim?at=5e39aa5258f02e3497621019]
17:31:19FromGitter<Vindaar> the decorator appears anywhere, but not where I put it
17:31:24leorizenarimiran: can I have your reproduction sequence?
17:31:53narimiranleorize: i don't know if it makes a difference, this is a long file where i lose syntax highlighting in the middle of it
17:33:21narimiranto reproduce it: open testament/testament.nim, go to line 630, over `gTargets`. press `gd`, then `C-o` and it will take you back to `gTargets` on line 503
17:33:24FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39aae3594a0517c2682b37]
17:33:56FromGitter<kristianmandrup> why can't I concatenate a string? I need to use `$name` ?
17:34:05narimiranoh, and it is vice-versa! `gd` on line 503, `C-o` puts you on line 630
17:34:25FromDiscord_<Clyybber> Araq: Can I merge https://github.com/nim-lang/Nim/pull/13320 ?
17:34:26disbotbuild_all.sh update
17:34:38FromDiscord_<Clyybber> when the CI's have finished of course
17:35:00narimirannvm, it is a coincidence, because that's where i was
17:35:13leorizenarimiran: reproduced
17:35:49narimiranit seems like C-o takes you two steps back (where you were before `gd`), not one
17:36:24leorizeit appears to me that my changes to the ' mark wasn't sticking
17:38:55FromGitter<kristianmandrup> https://play.nim-lang.org/#ix=2aLH
17:44:06*ptdel joined #nim
17:46:13FromGitter<kennymalac> any reason there isn't a decodeQuery counterpart to https://nim-lang.org/docs/uri.html#encodeQuery%2CopenArray%5B%5D ⏎ uri
17:46:38leorizedom96 wrote one but it got stuck in the pr queue iirc
17:46:42leorize!search decodeQuery
17:46:44disbothttps://github.com/smola/galimatias/issues/31 -- 3Add encoding/decoding utils 7& 29 more...
17:46:51leorize!search decodeQuery nim-lang/Nim
17:46:52disbotno results 😢
17:46:55FromGitter<kristianmandrup> How can I make the `StrLit` dynamic
17:47:03leorize!search decode query nim-lang/Nim
17:47:03disruptek!pull decodeQuery
17:47:03disbotno results 😢
17:47:04disbothttps://github.com/nimterop/nimterop/issues/120 -- 5recursion: undeclared identifier 7& 2 more...
17:47:46FromGitter<Vindaar> @kristianmandrup what do you mean dynamic? a `StrLit` is a string *literal* and thus static by definition
17:48:44FromGitter<kristianmandrup> https://play.nim-lang.org/#ix=2aLH
17:48:54leorize#7761
17:48:54disruptekthe !search is for any issue in any nim repo, with fallback to any issue anywhere. !issue(s) is for nim issue; !pull(s) is for nim PRs.
17:48:55disbothttps://github.com/nim-lang/Nim/pull/7761 -- 3Implements parseQuery in uri module.
17:49:39leorizekennymalac: ^ you can try to base a new PR over that to get it into the stdlib
17:49:58FromGitter<Vindaar> @kristianmandrup I don't understand the problem. Give an example of what you want to do
17:51:22FromGitter<kennymalac> I'll comment on the issue
17:51:43FromGitter<kennymalac> not sure I'm comfortable enough to be merging into and devving on the stdlib XD
17:52:22FromGitter<kristianmandrup> @Vindaar I want to replace the pragma emit output with AST nodes in the macro
17:52:47FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39af6f433e1d40399612d2]
17:53:29FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39af9958f02e3497621dbd]
17:53:41FromGitter<kristianmandrup> Playground keeps crashing on my end :P
17:54:30FromGitter<Vindaar> you mean you want the value of the string literal `name` and not `"name"`, right? have you looked at the code I posted further up?
17:57:11FromGitter<kristianmandrup> yes exactly, I used your code as a foundation, but I need the AST nodes, not emit, as I need to integrate the "decorator AST" with the `body` arg, ideally
17:59:37FromGitter<kristianmandrup> I guess I need to use the `nnk` functions
17:59:44FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39b110bfe65274eadd00b6]
18:00:19*jjido joined #nim
18:00:55FromGitter<Vindaar> ```code paste, see link``` ⏎ ⏎ you mean this? [https://gitter.im/nim-lang/Nim?at=5e39b157bfe65274eadd0100]
18:01:24FromGitter<Vindaar> otherwise I don't get what you mean, sorry :|
18:02:15madpropshow can I get the last n items of a seq?
18:02:45narimirans[s.len-n ..< s.len]
18:03:07FromGitter<kristianmandrup> Thanks @Vindaar - getting close
18:03:08FromGitter<kristianmandrup> /usercode/in.nim(2, 19) Error: undeclared identifier: 'quote'
18:03:17madpropsI think there's a shortcut
18:03:17FromGitter<Vindaar> @kristianmandrup you have to `import macros`
18:03:31FromGitter<Vindaar> @madprops `s[^n .. ^1]`
18:03:53narimiranyep, what @Vindaar said
18:04:46madpropsthat's the one. It's hard to remember
18:04:58madpropsi find stuff like ..-n or something more natural
18:05:28madpropsim guessing ^1 means: start at the very end
18:05:42FromDiscord_<Recruit_main_70007> yep
18:07:08narimiranmadprops: you can't use `-3..-1` in nim, because we have arrays with custom indices
18:07:24narimirane.g. array[-5..5, int]
18:07:56FromGitter<kristianmandrup> @Vindaar yes, got it to run and output AST locally
18:09:15*drewr joined #nim
18:11:39FromGitter<kristianmandrup> But I would still like the `info` (decorator name) to be dynamic, ie. passed as an argument to a template, macro or similar
18:12:09madpropsis there a variation of [^n..^1] that doesn't fail depending on the number of items?
18:12:26madpropslike get 4 items if n is 10 and the list has 4 items
18:12:34FromGitter<Vindaar> @kristianmandrup when you say dynamic, do you mean dynamic in the sense of "at runtime" or just taken as a variable? The former isn't possible, but the latter should be easy
18:13:08FromGitter<Vindaar> but keep in mind that the value of that variable has to be defined at compile time too!
18:13:58FromGitter<kristianmandrup> compile time macro function with argument?
18:14:31FromGitter<kristianmandrup> yes, compile time dynamic
18:15:26FromGitter<kristianmandrup> Here example from react binding lib
18:15:27FromGitter<Vindaar> yeah, that's fine. ⏎ But just a tip from me: before you start writing macros, write the exact code you want to generate by hand. When you have a couple of cases where you do the same, with exchangeable parts *then* start thinking about a macro. If you don't know exactly what code to generate there's no hope to succeed
18:15:43FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39b4ceea9ba00b84afc0b6]
18:15:47FromGitter<Vindaar> (unless you know exactly in your head what you want to generate and know it's possible of course)
18:16:17FromGitter<kristianmandrup> I wan't sth very similar, just with decorator syntax in output (or `@` prefix for identifier essentially)
18:17:29FromGitter<Vindaar> but again, are you sure you know how to generate the correct JS code given some Nim code?
18:17:53FromGitter<Vindaar> that is fix the decorator to the proc in the way it's required
18:25:26FromGitter<kristianmandrup> @Vindaar no, Im not sure. I'm trying and learning...
18:26:13FromGitter<kristianmandrup> but a js decorator call is just a normal function call, with a prefix `@` on the function name (identifier)
18:26:38FromGitter<Vindaar> @kristianmandrup I'm not trying to criticize you, sorry if I sound harsh. I'm just trying to tell you that templates and macros are not a magical solution. They help to reduce boilerplate, but only if one understands the problem
18:27:46leorizenarimiran: fixed
18:27:47FromGitter<kristianmandrup> ok, I just realised all I need is a macro/template to prefix a Nim function call (identifier) with a `@` so that `x(2)` becomes `@x(2)`
18:27:52FromGitter<Vindaar> wait, it's like a function call? I thought it was something similar to python's @ decorators
18:28:54narimiranleorize: thanks!
18:28:58FromGitter<kristianmandrup> Just need to transform the function call identifier (first node of body)
18:30:10FromGitter<kristianmandrup> ```if body.children[0].kind === Ident: ⏎ # transform Ident so that x becomes @x``` [https://gitter.im/nim-lang/Nim?at=5e39b832ea9ba00b84afcbe2]
18:30:53FromGitter<Vindaar> if it's only (!) for a call, even:
18:31:01FromGitter<Vindaar> ```code paste, see link``` ⏎ ⏎ is enough [https://gitter.im/nim-lang/Nim?at=5e39b86540da694c5e097997]
18:31:22FromGitter<Vindaar> generates ⏎ ⏎ ```var x_94285 = 5; ⏎ @someProc(5)``` [https://gitter.im/nim-lang/Nim?at=5e39b87adc52c34ace466856]
18:31:36FromGitter<kristianmandrup> cool :)
18:31:43FromGitter<Vindaar> oh, weird, that the 5 is inserted there
18:31:51FromGitter<Vindaar> haha
18:31:53FromGitter<Vindaar> nvm
18:32:06FromGitter<Vindaar> should have been `someProc(x)` of course in the arg
18:34:10FromGitter<kristianmandrup> VERY NICE
18:34:26FromGitter<kristianmandrup> Can you do sth similar for `import`? `import { Store } from '@datorama/akita';`
18:35:43*Pqzcih5 quit (Ping timeout: 240 seconds)
18:36:23FromGitter<kristianmandrup> My previous "attempt" ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39b9a7f6945f41ef5b508f]
18:37:24*Pqzcih5 joined #nim
18:40:33FromGitter<Vindaar> you mean like this? ⏎ ⏎ ```import { Stuff } from '@aba/bcb';``` [https://gitter.im/nim-lang/Nim?at=5e39baa1594a0517c26852d7]
18:43:18FromGitter<kristianmandrup> yes
18:43:30FromGitter<kristianmandrup> exactly, except without the `@`
18:46:30Zevvdamn ix.io is so flaky
18:48:17FromGitter<kristianmandrup> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e39bc71fe0e6f74e9007470]
18:48:28FromGitter<kristianmandrup> I get `Error: cannot evaluate at compile time: name`
18:51:09FromGitter<kristianmandrup> ah yes, needs to be a template to be called compile time ;)
18:52:38FromGitter<Vindaar> well you could make the args be `static string`, but then it'd still be a proc and the emitted code would be emitted inside of that proc. But I assume you want to emit it globally
18:53:06*Ckatt joined #nim
18:54:08disruptekyou guys are making my teeth hurt.
18:56:14FromGitter<kristianmandrup> @Vindaar https://play.nim-lang.org/#ix=2aLY
18:56:32*Ckat quit (Disconnected by services)
18:56:32*Ckatt is now known as Ckat
18:56:38FromDiscord_<itmuckel> Hey guys! When I'm executing this code, it throws an OS error (invalid argument or so, it's in german unfortunately). I can't figure out which argument is wrong. I thought this would block until a udp packet was received. 🤔
18:56:38FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/674327466697031690/unknown.png
18:56:41FromGitter<kristianmandrup> Error: invalid pragma: "# = x_"
18:57:33FromDiscord_<itmuckel> (it fails in the recvFrom-line)
18:58:53FromGitter<Vindaar> @kristianmandrup where is that `importjs` pragma defined?
18:59:13FromGitter<Vindaar> in any case there has to be a `:` after `importjs`
18:59:46FromDiscord_<Recruit_main_70007> @itmuckel try to do:
18:59:46FromDiscord_<Recruit_main_70007> socket.connect(add, port)
18:59:46FromDiscord_<Recruit_main_70007>
18:59:46FromDiscord_<Recruit_main_70007> and then just socket.recv(2)
18:59:48*pigmej quit (*.net *.split)
19:00:30*Kaivo quit (*.net *.split)
19:00:31*jwm224 quit (*.net *.split)
19:00:32*silvernode[m] quit (*.net *.split)
19:00:32*BitPuffin quit (*.net *.split)
19:00:32*skelett quit (*.net *.split)
19:01:57*pigmej joined #nim
19:02:15*Kaivo joined #nim
19:02:15*jwm224 joined #nim
19:02:15*silvernode[m] joined #nim
19:02:15*BitPuffin joined #nim
19:02:15*skelett joined #nim
19:03:34FromDiscord_<Clyybber> huh why is it in german tho
19:03:47FromDiscord_<itmuckel> Okay, now it hangs indefinitely, and my message doesn't arrive
19:04:07FromDiscord_<itmuckel> That's the sending code
19:04:07FromDiscord_<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/674329353688973364/unknown.png
19:05:01FromDiscord_<itmuckel> And why must I connect? I thought UDP is connectionless and I can just recv from any address and sendTo any address without setup.
19:05:42FromDiscord_<itmuckel> @Clyybber 😏
19:06:23FromDiscord_<Clyybber> ah deshalb
19:06:53FromGitter<kennymalac> Anyone looking for nim gigs? Looking for some devs to do some cool stuff.
19:07:28FromDiscord_<Clyybber> @itmuckel you are not using the deprecated sockets module are you?
19:07:31narimiran@kennymalac can you be more specific than "some cool stuff"? :)
19:07:52FromGitter<kristianmandrup> @Vindaar Still struggling :P
19:08:14FromGitter<kristianmandrup> https://play.nim-lang.org/#ix=2aM2
19:09:00FromDiscord_<Clyybber> @itmuckel ~you are not using the deprecated sockets module are you?~ nevermind
19:09:13FromDiscord_<Clyybber> @itmuckel ~~you are not using the deprecated sockets module are you?~~ nevermind
19:09:19FromDiscord_<itmuckel> @Clyybber `import net`
19:09:27FromDiscord_<Clyybber> ok
19:09:28FromGitter<Vindaar> @kristianmandrup what kind of code do you need for the import of variables?
19:11:04FromGitter<kennymalac> @namiran web service pieces for a Big Data visualiztaion startup
19:11:09FromGitter<kennymalac> visualization*
19:12:06FromGitter<kristianmandrup> @Vindaar I need to dynamically link (assign) a Nim `var x` to the emitted imported JS identifier `x$$` or whatever I decide to name it (shadowed var)
19:12:30FromGitter<kristianmandrup> ie. `var x = x$$` while being able to access `x` as a Nim variable
19:15:49FromDiscord_<itmuckel> @Clyybber @Recruit_main_70007 got it working. Had to replace `socket.connect()` with `socket.bindAddr(Port(1234), address)`.
19:16:38FromDiscord_<itmuckel> The sender didn't had to call bindAddr, but it probably will once it wants to recv messages too. 🤷‍♂️
19:20:36FromGitter<kristianmandrup> JSFFI, JQuery example no longer works
19:20:37FromGitter<kristianmandrup> https://play.nim-lang.org/#ix=2aM6
19:21:13FromGitter<kristianmandrup> Complains about unescaped `$` Error: invalid extern name: '$(#)'. (Forgot to escape '$'?)
19:21:29FromGitter<kristianmandrup> From https://nim-lang.org/docs/jsffi.html
19:23:40FromGitter<Vindaar> no clue about that. I'm don't know the syntax of the `importcpp` pragma. Also not sure how you'd want to refer to an imported statement by a Nim var, since we use emit and thus the nim compiler doesn't really know anything about what you import
19:32:50FromDiscord_<Clyybber> @itmuckel nice
19:37:02*nsf quit (Quit: WeeChat 2.7)
19:38:13*leorize quit (Quit: WeeChat 2.6)
19:42:13FromDiscord_<Lantos> are fosdem videos up yet?
19:44:50Araqsome
19:44:59Araqnot mine tough...
19:45:06FromDiscord_<Clyybber> @Lantos Two of them: https://video.fosdem.org/2020/AW1.125/nimoneverything.mp4 and https://video.fosdem.org/2020/AW1.125/asyncawaitnim.mp4
19:45:30FromDiscord_<Lantos> thanks clyybber
19:45:35FromDiscord_<Clyybber> @mratsim You had a talk too right?
19:45:39FromDiscord_<Clyybber> np
19:45:44FromGitter<mratsim> I did
19:45:58FromGitter<mratsim> but I guess I’m supposed to validate some stuff so that it’s published
19:46:23FromDiscord_<Lantos> hmmm mirror is dead will have to try again leter
19:47:15FromDiscord_<Clyybber> works for me
19:47:16FromDiscord_<Lantos> ahh *.webm works
19:47:18FromDiscord_<Lantos> just me
19:58:17*tane joined #nim
19:59:44Araqhttp://stratus3d.com/blog/2020/01/20/applying-the-let-it-crash-philosophy-outside-erlang/
20:01:00FromDiscord_<Lantos> nice talk dom!
20:08:47*rockcavera joined #nim
20:09:39disruptek--exceptions:teflon
20:10:01disruptekwe run finally: clauses but not except: clauses.
20:10:03*jjido quit (Quit: Connection closed for inactivity)
20:11:17FromDiscord_<Clyybber> Araq: Whats the operator precedence of `.` ?
20:15:17AraqOP6, see the manual
20:15:41FromDiscord_<Clyybber> Araq: Yeah, I mean the method call dot
20:15:48FromDiscord_<Clyybber> I guess its above OP10
20:16:05Araqyes, it's part of 'primary expression' iirc
20:16:39FromDiscord_<Clyybber> I see, What I was about to suggest is that we introduce OP11 for operators that start with `.` but not `..` ?
20:16:44Araqrule 'primarySuffix'
20:16:52FromDiscord_<Clyybber> so that we can have the right precedence for the outplace operator
20:17:28Araqask mratsim about it
20:17:50disruptek^
20:18:00Araqif you don't touch .. nor ..* it should work out fine
20:18:06FromDiscord_<Clyybber> Nice
20:18:10FromDiscord_<Clyybber> @mratsim ping
20:18:42AraqI think "slice like" vs "dot like" makes sense
20:18:47FromDiscord_<Clyybber> nice
20:18:51FromDiscord_<Clyybber> I'll make a PR
20:19:29Araqcan't you take over my "scope based destructor injections"
20:19:49Araqin principle thanks to your refactoring it's rather simple, only 4 different cases
20:20:11Araqand some bail out mechanism is required for 'or' and 'elif cond'
20:20:12FromDiscord_<Clyybber> I can, I'm kinda busy rn. but can work on big things again in 2 weeks or so
20:20:18disruptekis the cfg a separate representation of the ast or is it a logical view of same?
20:20:26Araqdisruptek, separate
20:20:39disruptekkk thanks
20:20:47Araqand it's stable enough IME, usually you don't have to touch it
20:20:47disruptekso it's phase-specific?
20:21:00Araqyeah, only destructor injection uses it
20:21:43disruptekcurrently. 😏
20:25:03*actuallybatman joined #nim
20:26:24Zevvmratsim: what was this list of benchmarks of various implementations you showed at the end of your talk?
20:32:38FromDiscord_<Chiqqum_Ngbata> Araq's talk posted yet?
20:33:59FromDiscord_<Chiqqum_Ngbata> A: Doesn't look like it
20:34:36dom96If it's up you will see it on the event page, like you can see it on mine: https://fosdem.org/2020/schedule/event/asyncawaitnim/
20:34:53*actuallybatman left #nim (#nim)
20:36:51zedeusI've been getting openssl double free segfaults when closing httpclients pretty often lately, obv it causes a program crash which is unfortunate. Any idea? I was hesitant to open an issue yet as it's very undeterministic
20:36:53zedeus*** Error in `./nitter': free(): invalid pointer: 0x0000561a5506f3e0 ***
20:40:01Araqzedeus, openssl update?
20:41:39zedeusit happens with latest version (1.1.1.d) and 1.1.0
20:41:52zedeusah here it is, doesn't always print, Error: unhandled exception: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init [SslError]
20:42:39zedeusmight be a separate error even, no clue. when searching for that you can find various issues in other projects, but they all seemed to fix it
20:43:30zedeushmm https://github.com/dom96/choosenim/issues/61
20:43:31disbot`choosenim update devel` results in "Error: unhandled exception: error: ... [SslError]"
20:44:45zedeushttps://github.com/nim-lang/Nim/issues/9867#issuecomment-473902394
20:44:47disbotLong-lived application occasionally dies with SIG_PIPE when calling httpclient.request ; snippet at 12https://play.nim-lang.org/#ix=2aMk
20:45:22disruptekzedeus: that looks like a similar issue to one that treeform struggled with.
20:45:43disruptekwhere did you escape to after the nim talks, anyway? missed you that evening.
20:45:50shashlickzedeus: https://github.com/nim-lang/Nim/issues/9419#issuecomment-580994111
20:47:03zedeusdisruptek: talked to mratsim for a bit then said hello to the group, I was with a friend so had to leave and catch a bus a few hours later
20:47:25zedeusI'll try to stay around longer next year
20:48:56zedeusshashlick: that looks like a different issue, this is on shutdown and only happens once every ~1k(?) requests, according endragor in the comment I linked it's when the server closes the connection first
20:49:27FromDiscord_<Clyybber> Araq: Should I add OP11 to the operator precedence table? It doesn't currently have any operators that use it, so the operators field would be empty
20:53:19Araqlet's use BearSSL instead, I'm tired of this
20:53:44Araqopenssl is security by obscurity
20:54:59xacehttps://blog.discordapp.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f # does anyone know if nim would suffer the same consequences as Go did in this scenario?
20:55:19*Pqzcih5 quit (Remote host closed the connection)
20:56:22FromDiscord_<Clyybber> I read it
20:56:24FromDiscord_<Clyybber> It wouldn't
20:56:32FromDiscord_<Recruit_main_70007> maybe it would have, but with gc:arc i think that problem is sloved if its as good as i am hearing, since it even runs no bare metal now
20:58:13FromDiscord_<Clyybber> They are also using an old go version
20:58:34xaceI see
20:58:41FromDiscord_<Recruit_main_70007> bruh, if they are changing, why not just update lol
20:58:54FromDiscord_<Recruit_main_70007> or use Nim :p
21:01:40Araqyeah, with --gc:arc we've become "hard realtime" capable
21:02:15Araqand narimiran is working on our secret weapon on top of that *cough*
21:02:22FromDiscord_<Recruit_main_70007> nim 1.0.6 comes with it?
21:02:28*narimiran no pressure
21:02:43FromDiscord_<Recruit_main_70007> at all, i will love you anyway
21:02:58Araqno, 1.0.6 is a bugfix release
21:03:05Araqwe will have arc in 1.2
21:03:05FromDiscord_<Recruit_main_70007> :/
21:03:17Araqstill scheduled for Q1 2020
21:03:53FromDiscord_<Recruit_main_70007> will it make echo and things like that work on, lets say, a kernel?
21:04:32Araqyes, maybe Zevv will ask for .weak symbols first
21:04:35Araqbut yes
21:05:20FromDiscord_<Clyybber> Araq: So the last round is ./ vs .~
21:05:39FromDiscord_<Clyybber> I guess .~ is a bit more distinct from path operators
21:05:39Araqx.~sort()
21:05:43Araqx./sort()
21:05:44FromDiscord_<Clyybber> yep
21:06:03Araqfor me ~ is either for negation or for "ropes"
21:06:09Araqor for "approx."
21:06:12FromDiscord_<Clyybber> yeah
21:06:14FromDiscord_<Clyybber> alright
21:06:29Araqx|>sort
21:06:38Araqsome arrow like thing could also work
21:06:43narimiranoooh, nice
21:06:55Araqlol
21:06:56FromDiscord_<Clyybber> hmm, I guess so
21:07:17narimiran(for those new here, i really like pipes :))
21:07:17Araqx |> insert(10) |> sort
21:07:42zedeus|> looks like separate (copy) and redirect, which is basically what outplace does
21:07:48zedeusso +1 from me
21:07:54narimiran+10 from me :D
21:08:02FromDiscord_<Clyybber> Maybe we can combine it with a dot somehow
21:08:20Araqx .> insert(10) .> sort
21:08:40FromDiscord_<Clyybber> Yeah, in fact I originally envisioned .< for outplace
21:08:48FromDiscord_<Clyybber> But .> is alright too
21:08:56AraqI don't really care all that much as long as Leibniz and Newton used the same notation for their "inplace vs outplace" problems
21:09:07narimiran:D
21:09:54FromDiscord_<Clyybber> .| could also work, but its a bit high
21:10:13narimirandoes it have to use the dot?
21:10:19FromDiscord_<Clyybber> yeah
21:10:22FromDiscord_<Clyybber> for operator precedence
21:10:34FromDiscord_<Clyybber> and also for mimicking UFCS
21:10:35Araqbecause new syntax should be reserved for the 1600ies
21:11:10narimiranfoo .|> bar .|> baz ?
21:11:21FromDiscord_<Clyybber> is a bit long
21:11:26FromDiscord_<Clyybber> two chars would be best no?
21:11:27FromDiscord_<exelotl> I like .>
21:11:39narimirananother case of "& is too hard to type"? :D
21:11:46FromDiscord_<Clyybber> hehe
21:12:02FromDiscord_<Clyybber> nah, more about the visuals
21:12:08FromDiscord_<Clyybber> .> I like too
21:12:27narimiran"best nim meme of 2019" award definitely goes to "& is too hard to type" if you ask me :)
21:12:31AraqI like .> too, |> in F# does something different anyway
21:12:58narimiranfoo .> bar .> baz
21:13:06Araqbut .> introduces a new problem: spaces around it or not?
21:13:09narimiranok, it looks ok, and it is very easy to type
21:13:16narimirandot, shift+dot
21:13:33FromDiscord_<Clyybber> Araq: Shouldn't matter?
21:13:37FromDiscord_<Clyybber> But normally no spaces
21:13:41FromDiscord_<Clyybber> for dot-like operators
21:14:02FromDiscord_<Clyybber> I guess
21:14:14Araqfoo.>insert(10).>sort()
21:14:20Araqmaybe, ok
21:15:34FromDiscord_<Clyybber> foo./insert(10)./sort() vs foo.>insert(10).>sort() vs foo.!insert(10).!sort() vs foo.|insert(10).|sort() vs foo.~insert(10).~sort()
21:15:36FromDiscord_<Clyybber> hmm
21:15:46FromDiscord_<Clyybber> I think .> really is the best
21:19:04FromDiscord_<Recruit_main_70007> Error: unhandled exception: packedjson.nim(771, 9) `node.kind == JArray`
21:19:04FromDiscord_<Recruit_main_70007> pls help.
21:20:04Araquse j[i] for json arrays
21:20:17Araqand j["foo"] for json objects
21:20:43Araqit's usually not that hard to understand, field names are not integers and indexes are not strings
21:22:02*narimiran quit (Ping timeout: 260 seconds)
21:26:19FromDiscord_<exelotl> now that we've got all that bikeshedding out the way, I have to say say I'd rather use cascade lol
21:26:28FromDiscord_<Recruit_main_70007> i dont know whats wrong, i have this message:
21:26:28FromDiscord_<Recruit_main_70007> {"type":"Update", ... }
21:26:28FromDiscord_<Recruit_main_70007>
21:26:28FromDiscord_<Recruit_main_70007> and then:
21:26:28FromDiscord_<Recruit_main_70007> if packet["type"].getStr() == "Update":
21:29:14FromDiscord_<exelotl> need more info tbh, can you reduce it to a minimal example that runs in the playground?
21:29:42FromDiscord_<Recruit_main_70007> hmm, i can give you only that function
21:30:57FromDiscord_<Recruit_main_70007> https://play.nim-lang.org/#ix=2aMr
21:30:57FromDiscord_<Recruit_main_70007> i gave you two just in case
21:31:32FromDiscord_<Recruit_main_70007> broken...
21:31:39FromDiscord_<Recruit_main_70007> wait a sec
21:33:02Araqexelotl: cool but now "your opinion is more valuable once you understood the problem" applies again :P
21:34:00FromDiscord_<Recruit_main_70007> https://pastebin.com/0fqsv9xz
21:37:02FromDiscord_<Clyybber> @timotheecour Are you there?
21:37:11FromGitter<timotheecour> ya
21:37:18FromDiscord_<Clyybber> sup
21:37:26FromDiscord_<Clyybber> in your outplace PR
21:37:35FromDiscord_<Clyybber> you don't need to deprecated outplace
21:37:38FromDiscord_<exelotl> in particular I think chaining outplace seems like it would be really wasteful, you're cloning the seq every time when you most likely only needed to clone it once
21:37:44FromDiscord_<Clyybber> its `since (1, 1)` anyways
21:37:54FromDiscord_<Clyybber> @exelotl I have an idea on how to optimize that
21:38:52FromDiscord_<Clyybber> But its gonna be moved anyways
21:39:21FromDiscord_<Clyybber> @timotheecour Then you can use std/outplace instead of std/outplaces as a module name
21:39:41FromDiscord_<Clyybber> Also .> is now the operator :p
21:39:42disruptek~&
21:39:42disbot&: 11unreachable
21:39:48FromDiscord_<Clyybber> classic
21:39:56FromDiscord_<exelotl> lmao
21:40:37disruptekanything with ligature is a win. 😁
21:46:16*marmotini_ quit (Remote host closed the connection)
21:46:19Zevvoh yes, .weak symbols FTW \o/
21:46:51*marmotini_ joined #nim
21:46:54shashlicknim compiled binaries are blocked by IT
21:47:00disrupteknice.
21:47:14FromGitter<timotheecour> > you don't need to deprecated outplace ⏎ ⏎ => https://github.com/nim-lang/Nim/pull/13309#issuecomment-581367385 (and i agree)
21:47:15disbotnew outplace operator: `doAssert @[2,1,3].@sort() == @[1,2,3]` ; snippet at 12https://play.nim-lang.org/#ix=2aLi
21:47:43disruptekshashlick: time to send out resumes.
21:48:03Zevv"secret weapon" (*cough*)?
21:48:46FromGitter<timotheecour> ( i mean i agree with araq that we shouldn’t have 2 ways to do same thing; so i deprecated outplace; the operator is always more conventient for this particular feature as it avoids 1 level of nesting and is shorted)
21:48:49FromGitter<timotheecour> *shorter
21:49:01FromGitter<Clyybber> Yeah, I meant instead of deprecating it
21:49:05FromGitter<Clyybber> just remove it outright
21:49:09Araqyup
21:49:15Araqit's Nim devel
21:49:41FromGitter<Clyybber> its freedom!!
21:50:07FromDiscord_<exelotl> {.deprecated.} is now deprecated
21:50:57FromDiscord_<Recruit_main_70007> then add two of them
21:50:58FromGitter<timotheecour> so @araq; shall i remove sugar/outplace or keep it as deprecated
21:51:07FromDiscord_<Clyybber> remove it
21:51:24*marmotini_ quit (Ping timeout: 265 seconds)
21:51:37FromDiscord_<Clyybber> > it's Nim devel
21:52:00FromGitter<Clyybber> araq just seconds ago :p
21:52:14FromGitter<timotheecour> personally i like the philosophy of: whatever hasn’t been released yet (only in devel) can be removed IF (big IF) it can be easily replaced by something better; which is the case here
21:52:22FromGitter<Clyybber> yep
21:53:00FromGitter<Clyybber> I like your _ thing. Great solution!
21:54:35FromGitter<timotheecour> thx ya, was better than an index; ok will update pr with removed std/outplace, now left to do is decide bw `.^` (my favorite, see my latest PR msg) vs alternatives like (`.>` which isn’t bad either but a bit less obvious visually)
21:55:03FromGitter<Clyybber> .^ doesn't "point" to the right
21:55:30FromGitter<kaushalmodi> @timotheecour Yep, I don't see a reason to "deprecate" it.. it's only on devel
21:55:36*Vladar quit (Quit: Leaving)
21:56:15FromGitter<Clyybber> @timotheecour .> looks a bit like "inserting" something (the intermediate) into the rhs (the inplace) proc
21:56:37FromGitter<Clyybber> thats why IMO it fits just perfectly :)
21:57:24*marmotini_ joined #nim
22:00:58FromGitter<Varriount> I say keep outplace
22:01:36FromGitter<Varriount> shashlick: Windows laptop?
22:01:38*marmotini_ quit (Ping timeout: 240 seconds)
22:01:49FromGitter<Varriount> Any idea what they are using? Group policy? Fireeye?
22:03:09FromGitter<Clyybber> @Varriount Its gonna be replaced by its operator
22:07:04*greenfor` quit (Read error: Connection reset by peer)
22:08:29FromDiscord_<exelotl> lol at school I would work around the executable restrictions by putting the exe inside zip file and double clicking on it from there
22:08:32FromDiscord_<Rika> it will be removed no matter what
22:08:59FromDiscord_<Rika> but which operator it gets replaced by is mainly the choice of the community
22:10:13FromDiscord_<exelotl> system behaviour was to extract the exe to a temporary folder on the C drive, which evidently didn't have the same restrictions as the network drive
22:10:38FromDiscord_<exelotl> it was so dumb but it worked great for self-contained programs such as putty
22:10:43*greenfor` joined #nim
22:18:42*filcuc joined #nim
22:19:36*natrys quit (Ping timeout: 265 seconds)
22:29:17*ptdel quit (Ping timeout: 265 seconds)
22:33:16*tane quit (Quit: Leaving)
22:34:36*icebattle joined #nim
22:34:44FromGitter<Varriount> exelotl: I remember doing something similar to retrieve a JAR file
22:34:52FromGitter<Varriount> But in reverse
22:37:49*marmotini_ joined #nim
22:48:57FromDiscord_<exelotl> another funny thing was when I managed to install opera on one of the computers
22:50:04FromDiscord_<exelotl> first I used the zip trick above to launch the installer
22:51:23FromDiscord_<exelotl> but I got stuck at the part where it asked to choose an install directory, because some policy would cause the directory text field to be emptied immediately
22:52:01FromDiscord_<exelotl> I worked around it by... clicking really fast
22:52:07shashlickVarriount: windows
22:52:15shashlickMcAfee and defender
22:52:30shashlickNot clear what's blocking, nothing in their logs
22:52:41shashlickEven with admin access
22:54:05leorize[m]you're in for a bad time then
22:54:07FromDiscord_<Recruit_main_70007> @exelotl it’s hilarious the number of places you can do that, I did it in eve online w/ a bad connection, I felt so intelligent that it actually worked XD
22:54:35FromDiscord_<Recruit_main_70007> (Not installing it, but within the game)
22:56:41*skrylar quit (Quit: WeeChat 2.7)
22:56:48*solitudesf quit (Ping timeout: 268 seconds)
22:57:05*ftsf joined #nim
22:58:48*Trustable quit (Remote host closed the connection)
23:05:41*filcuc quit (Quit: Konversation terminated!)
23:24:31*Kaivo_ joined #nim
23:24:38*Kaivo_ quit (Client Quit)
23:24:56*Kaivo_ joined #nim
23:27:32*Kaivo quit (Ping timeout: 248 seconds)
23:32:32*ptdel joined #nim
23:39:48*Sembei joined #nim
23:43:03*disrupteq quit (Ping timeout: 265 seconds)
23:43:28*disrupteq joined #nim
23:46:10FromGitter<jyapayne> @timotheecour I found out how to compile libffi to a dll for Windows 32 bit and 64 bit
23:46:32FromGitter<kristianmandrup> @jyapayne :)
23:47:09FromGitter<kristianmandrup> I wish someone in the community could do an in-depth macro/templates tutorial
23:47:38*disrupteq quit (Ping timeout: 240 seconds)
23:48:33FromGitter<jyapayne> @timotheecour I followed the instructions here: https://proj.goldencode.com/projects/p2j/wiki/Building_and_Installing_libffi_on_Windows ⏎ Making sure to configure using the MSYS as suggested. But I used the tar.gz from https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz
23:49:48*disrupteq joined #nim
23:50:59FromGitter<jyapayne> @timotheecour also, the command to configure for 32 bit (via MSYS terminal) is: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e3a0363f301780b836798c8]
23:51:21FromDiscord_<Rika> kristianmandrup treeRepr is your best friend
23:51:45FromGitter<jyapayne> @timotheecour Not sure if the libs are portable or not, but I could upload them if needed
23:52:32FromGitter<jyapayne> Also @kristianmandrup Rika is right. treeRepr and toStrLit are the best way to learn
23:58:28*disrupteq quit (Ping timeout: 268 seconds)