<< 15-01-2021 >>

00:03:27*def- quit (*.net *.split)
00:03:27*FromDiscord quit (*.net *.split)
00:03:27*Zevv quit (*.net *.split)
00:03:28*so quit (*.net *.split)
00:03:28*actuallybatman quit (*.net *.split)
00:03:28*lritter quit (*.net *.split)
00:03:28*piron quit (*.net *.split)
00:03:28*Q-Master quit (*.net *.split)
00:03:29*nekits07 quit (*.net *.split)
00:03:29*wasted_youth quit (*.net *.split)
00:03:29*muffindrake quit (*.net *.split)
00:03:29*Jjp137 quit (*.net *.split)
00:03:29*opal quit (*.net *.split)
00:03:29*saem quit (*.net *.split)
00:03:30*nikki93 quit (*.net *.split)
00:03:30*Evolver quit (*.net *.split)
00:03:30*jholland__ quit (*.net *.split)
00:03:30*surma quit (*.net *.split)
00:03:30*ormiret quit (*.net *.split)
00:03:30*qwertfisch quit (*.net *.split)
00:03:30*cmc[m] quit (*.net *.split)
00:03:30*Clonkk[m] quit (*.net *.split)
00:03:30*VijayMarupudi[m] quit (*.net *.split)
00:03:32*planetis[m] quit (*.net *.split)
00:03:32*juanfra__ quit (*.net *.split)
00:05:49*wasted_youth joined #nim
00:05:49*muffindrake joined #nim
00:05:49*Jjp137 joined #nim
00:05:49*opal joined #nim
00:05:49*saem joined #nim
00:05:49*nikki93 joined #nim
00:05:49*Evolver joined #nim
00:05:49*jholland__ joined #nim
00:05:49*surma joined #nim
00:05:49*ormiret joined #nim
00:05:51*qwertfisch joined #nim
00:05:51*Clonkk[m] joined #nim
00:05:51*cmc[m] joined #nim
00:05:51*VijayMarupudi[m] joined #nim
00:05:51*juanfra__ joined #nim
00:05:51*planetis[m] joined #nim
00:06:22disrupteksome asshole.
00:06:37*lritter joined #nim
00:06:38*piron joined #nim
00:06:38*Q-Master joined #nim
00:06:38*def- joined #nim
00:06:38*FromDiscord joined #nim
00:06:38*Zevv joined #nim
00:06:38*nekits07 joined #nim
00:06:38*so joined #nim
00:06:38*actuallybatman joined #nim
00:06:49*GitterIntegratio quit (Ping timeout: 244 seconds)
00:06:49*unclechu quit (Ping timeout: 244 seconds)
00:07:02*MTRNord1 quit (Ping timeout: 260 seconds)
00:07:09*cadmium[m] quit (Ping timeout: 246 seconds)
00:07:10*Avahe[m] quit (Ping timeout: 246 seconds)
00:07:14*Kurre[m] quit (Ping timeout: 258 seconds)
00:07:15*leorize[m] quit (Ping timeout: 258 seconds)
00:07:19*vindaar[m] quit (Ping timeout: 244 seconds)
00:07:19*j-james[m] quit (Ping timeout: 244 seconds)
00:07:19*Zoom[m] quit (Ping timeout: 244 seconds)
00:07:20*Avatarfighter[m] quit (Ping timeout: 244 seconds)
00:07:20*lnxw37d4 quit (Ping timeout: 244 seconds)
00:07:25*cmc[m] quit (Ping timeout: 240 seconds)
00:07:25*Clonkk[m] quit (Ping timeout: 240 seconds)
00:07:26*planetis[m] quit (Ping timeout: 240 seconds)
00:07:26*juanfra__ quit (Ping timeout: 240 seconds)
00:07:30*Juno[m] quit (Ping timeout: 246 seconds)
00:07:30*lytedev[m] quit (Ping timeout: 246 seconds)
00:07:30*jaens[m] quit (Ping timeout: 246 seconds)
00:07:37*dilawar_uchiha[m quit (Ping timeout: 268 seconds)
00:07:38*reversem3 quit (Ping timeout: 268 seconds)
00:07:50*matthias[m]2 quit (Ping timeout: 244 seconds)
00:07:53*nikki93[m] quit (Ping timeout: 260 seconds)
00:07:57*wasted_youth quit (Remote host closed the connection)
00:08:14*JochenSchroeder[ quit (Ping timeout: 268 seconds)
00:08:14*xigoi[m] quit (Ping timeout: 268 seconds)
00:08:19*wasted_youth joined #nim
00:09:25*VijayMarupudi[m] quit (Ping timeout: 240 seconds)
00:09:28*hoek quit (Ping timeout: 268 seconds)
00:09:38*d10n-work quit (Ping timeout: 260 seconds)
00:10:42*BitPuffin quit (Ping timeout: 268 seconds)
00:11:58*d10n-work joined #nim
00:12:01disruptekleorize: don't be afraid of writing a dispatcher. it's trivial.
00:12:02*hoek joined #nim
00:12:37disrupteklqdev: is it still the case that, for you, software that takes 10-20 seconds to compile is "excruciatingly slow to compile"?
00:33:27*matthias[m]2 joined #nim
00:33:28*Zoom[m] joined #nim
00:33:28*vindaar[m] joined #nim
00:33:32*Avatarfighter[m] joined #nim
00:33:51*Juno[m] joined #nim
00:33:51*cadmium[m] joined #nim
00:34:09*JochenSchroeder[ joined #nim
00:34:11*dilawar_uchiha[m joined #nim
00:35:22*MTRNord1 joined #nim
00:35:49*leorize[m] joined #nim
00:35:50*nikki93[m] joined #nim
00:37:35*Kurre[m] joined #nim
00:39:35*xet7 quit (Quit: Leaving)
00:40:29*unclechu joined #nim
00:43:47*Avahe[m] joined #nim
00:46:37*j-james[m] joined #nim
00:47:47*abm joined #nim
00:51:25*MTRNord1 quit (Ping timeout: 240 seconds)
00:51:26*Zoom[m] quit (Ping timeout: 240 seconds)
00:51:26*vindaar[m] quit (Ping timeout: 240 seconds)
00:51:45*unclechu quit (Ping timeout: 240 seconds)
00:51:45*Avatarfighter[m] quit (Ping timeout: 244 seconds)
00:51:56*leorize[m] quit (Ping timeout: 240 seconds)
00:52:01*Kurre[m] quit (Ping timeout: 268 seconds)
00:52:01*matthias[m]2 quit (Ping timeout: 268 seconds)
00:52:05*j-james[m] quit (Ping timeout: 258 seconds)
00:52:05*cadmium[m] quit (Ping timeout: 258 seconds)
00:52:16*nikki93[m] quit (Ping timeout: 244 seconds)
00:52:16*Juno[m] quit (Ping timeout: 244 seconds)
00:52:18*Avahe[m] quit (Ping timeout: 246 seconds)
00:52:32*dilawar_uchiha[m quit (Ping timeout: 260 seconds)
00:52:32*JochenSchroeder[ quit (Ping timeout: 260 seconds)
00:56:46FromDiscord<VVX7> quick dumb question. what does `echo hostOS` output on a Mac?
00:57:38FromDiscord<VVX7> should be `macosx` or `macosx` ? I dont have a Mac to check it on.
00:58:29FromDiscord<VVX7> (edit) "`macosx`" => "`macos`"
01:00:12FromDiscord<VVX7> nvm I guess it's documented here: https://github.com/nim-lang/Nim/blob/1d8b7aa07ca9989b80dd758d66c7f4ba7dc533f7/lib/system.nim#L1062
01:03:56*oneark joined #nim
01:05:32*Tanger joined #nim
01:08:45FromDiscord<ElegantBeef> https://nim-lang.org/docs/system.html#hostOS
01:39:51leorizedisruptek: sure, I can give it a go
01:39:59leorizeany bug in cps that I should know about?
01:40:40leorizeand I heard you said something about "multi dispatcher" for cps and I have yet to understand how would that work
01:40:57FromDiscord<Avatarfighter> i think for loops don't work still in cps but that's not really a cps bug
01:41:00leorizeor are you gonna provide a dispatcher for dispatcher? :P
01:47:28*joast joined #nim
01:48:55*juanfra__ joined #nim
01:48:55*GitterIntegratio joined #nim
01:48:56*unclechu joined #nim
01:48:56*MTRNord joined #nim
01:48:56*Avahe[m] joined #nim
01:48:56*Avatarfighter[m] joined #nim
01:48:56*BitPuffin joined #nim
01:48:56*lnxw37d4 joined #nim
01:48:56*matthias[m] joined #nim
01:48:56*jaens[m] joined #nim
01:48:57*Zambyte[m] joined #nim
01:48:57*VijayMarupudi[m] joined #nim
01:48:57*xigoi[m] joined #nim
01:48:57*reversem3 joined #nim
01:48:57*lytedev[m] joined #nim
01:48:57*leorize[m] joined #nim
01:48:58*planetis[m] joined #nim
01:48:58*k0mpjut0r joined #nim
01:48:58*Zoom[m] joined #nim
01:49:01*dilawar_uchiha[m joined #nim
01:49:01*leorize[m]1 joined #nim
01:49:01*stisa[m] joined #nim
01:49:01*cadmium[m] joined #nim
01:49:01*JochenSchroeder[ joined #nim
01:49:01*slackytude[m] joined #nim
01:49:01*Clonkk[m] joined #nim
01:49:02*ee7[m] joined #nim
01:49:02*guelosk[m] joined #nim
01:49:02*vindaar[m] joined #nim
01:49:02*silvernode[m] joined #nim
01:49:02*neceve joined #nim
01:49:03*xicheng[m] joined #nim
01:49:03*cmc[m] joined #nim
01:49:03*Kurre[m] joined #nim
01:49:03*swamptest1[m] joined #nim
01:49:03*j-james[m] joined #nim
01:49:03*j4nvkvc joined #nim
01:49:03*sendell joined #nim
01:49:03*codic joined #nim
01:49:03*rridley[m] joined #nim
01:49:03*skrylar[m] joined #nim
01:49:04*Juno[m] joined #nim
01:49:04*nikki93[m] joined #nim
01:49:04*wontruefree[m] joined #nim
01:49:05*watzon joined #nim
02:01:23*abm quit (Quit: Leaving)
02:01:57*NimBot joined #nim
02:06:39*adnan338 joined #nim
02:06:45*adnan338 left #nim (#nim)
02:08:47disruptekleorize: if it's too big a pita, show me and i'll write it.
02:09:34disruptekfor loops don't work and it might be a bit before they do.
02:09:53disrupteki mean, they code works, but you cannot suspend a continuation inside a for.
02:11:06disruptekwe tried just rewriting the transform that rewrites the for loop in the first place, but the transform the compiler gives us is not valid ast, so we'd have to rewrite /that/ at a minimum and, i dunno, i think i'd rather not rely on broken code in in the first place.
02:12:19disruptekleorize: the two bugs i posted to nim today are the main things to be wary of -- shadowing (try not to) and a compiler crash that might be tricky to code around.
02:12:46leorize[m]luckily the kind of IO I do doesn't use for loops
02:12:56disruptekthere can be as many dispatchers in cps as you want.
02:13:45disruptekeventqueue offers both two dispatchers, for example: trampoline() is a dispatcher, as is run()
02:15:08disruptekso .gitmodules is not parseable by parsecfg. 😢
02:15:40leorize[m]just call git to query for it
02:15:48leorize[m]git is like the ultimate cli tool out there
02:15:59disrupteki can't; foreach is based upon /checked-out/ submodules.
02:16:24disruptekmight be able to use the json-based cli interface.
02:16:43disruptekelse, just parse the .gitmodules naively. it's not /that/ hard, christ.
02:17:54disruptekor maybe we just use `git submodule` output; no less crude, but probably more robust.
02:28:49FromDiscord<flywind> I already made a PR to track testament regression.
02:29:04FromDiscord<flywind> https://github.com/nim-lang/Nim/pull/16679
02:29:05disbotadd error messages
02:29:35FromDiscord<flywind> `testament r single_test_file` even doesn't work for compiler tests for me.
02:34:05disruptekflywind: what are your thoughts on #16447?
02:34:07disbothttps://github.com/nim-lang/Nim/issues/16447 -- 3testament fails for packages that require $NIMBLE_DIR/bin in PATH ; snippet at 12https://play.nim-lang.org/#ix=2LQ3
02:37:17FromDiscord<flywind> no idea, but I can check it later.
02:37:43leorize[m]in a way I think it could be nimble issue also
02:38:16leorize[m]npm for example add into PATH any binaries installed via it before running tasks
02:38:52leorize[m]they even provide a simple npx wrapper that basically just add things to PATH then run whatever executable you specified
02:45:33FromDiscord<flywind> After my PR, it does hint me what the error is
02:45:35FromDiscord<flywind> Error: unhandled exception: testament.nim(798, 13) `dirExists(nimRoot / testsDir)` D:\a\nightlies\nightlies\nim-1.5.1\tests\ doesn't exist! [AssertionDefect]
02:46:13FromDiscord<flywind> It is really terrible I think;
02:47:05FromDiscord<flywind> https://github.com/nim-lang/Nim/pull/16679
02:47:05disbotadd error messages
03:12:22*lritter quit (Ping timeout: 246 seconds)
03:13:18*lritter joined #nim
03:19:14*muffindrake quit (Ping timeout: 264 seconds)
03:20:01leorize[m]@flywind imo you should just get rid of that check
03:20:06leorize[m]it's stupid
03:20:33*muffindrake joined #nim
03:20:40leorize[m]or you can make it so that it checks if the file is in the `tests` folder relative to the current directory
03:23:54FromDiscord<flywind> I see, will try it.
03:24:35leorize[m]timothee abused compile time in that proc
03:27:12*shirty joined #nim
03:31:58*BauxnaMatrix[m] joined #nim
03:32:31*shirty quit (Quit: Going offline, see ya! (www.adiirc.com))
03:34:14*shirty joined #nim
03:42:51*shirtyx joined #nim
03:46:03*shirty quit (Ping timeout: 260 seconds)
03:58:46*shirtyx quit (Quit: Going offline, see ya! (www.adiirc.com))
03:59:05*shirty joined #nim
04:01:29leorize[m]disruptek: what exactly is the cpsmagic macro?
04:01:56disruptekit just rewrites a proc so that it can be called with the continuation inside cps.
04:02:04disruptekor something.
04:02:36disruptek ## upgrade cps primitives to generate errors out of context
04:02:37disruptek ## and take continuations as input inside {.cps.} blocks
04:04:34*wasted_youth quit (Quit: Leaving)
04:05:00disruptekanyone here have experience with strscans?
04:05:21leorize[m]ok, so basically I would want to use it for creating primitives for my dispatcher?
04:05:28disruptekexactly, yes.
04:06:01disruptekyou can rip a lot of code from eventqueue or just copy it and rewrite it to your purposes.
04:06:35leorize[m]sure, but I gotta think it out a bit more first
04:06:37disruptekit's probably not a great piece of engineering, though.
04:06:50leorize[m]windows iocp is a pain
04:07:06disrupteki know. flywind knows about this stuff, too, i think.
04:07:53leorize[m]mainly because of the way you would use it
04:08:02leorize[m]but I think I will figure out an api
04:09:20disruptekwhaddya mean?
04:13:48leorize[m]IOCP is: do this action then wait for signal that it is finished
04:14:06disruptekdo you poll for the signal or...?
04:14:09leorize[m]POSIX is: do this action when the device is not busy
04:20:18*spiderstew joined #nim
04:22:07*spiderstew_ quit (Ping timeout: 272 seconds)
05:00:50ForumUpdaterBotNew post on r/nim by comsiccuttlefish: Why Go instead of Nim?, see https://www.reddit.com/r/nim/comments/kxngyv/why_go_instead_of_nim/
05:03:13*shirty quit (Quit: Going offline, see ya! (www.adiirc.com))
05:12:57*lritter quit (Quit: Leaving)
05:20:47disruptekError: unhandled exception: timotheecour was here [Defect]
05:20:52disruptekyou hate to see it.
06:03:29*vicfred quit (Quit: Leaving)
06:15:47*narimiran joined #nim
06:26:16*habamax joined #nim
06:38:26*waleee-cl quit (Quit: Connection closed for inactivity)
06:44:36*Gustavo6046_ joined #nim
06:45:53*Gustavo6046 quit (Ping timeout: 272 seconds)
06:46:42*Gustavo6046_ is now known as Gustavo6046
06:46:47*Gustavo6046 quit (Remote host closed the connection)
06:47:25*Gustavo6046 joined #nim
07:08:53ForumUpdaterBotNew thread by Lotzz: NiGUI: Custom widgets, see https://forum.nim-lang.org/t/7389
07:22:20*oculux quit (Ping timeout: 256 seconds)
07:46:10*oculux joined #nim
07:46:40FromDiscord<Varriount> You can poll for the signal, or have a callback be called (though I don't remember how that works precisely).
07:46:53*xet7 joined #nim
07:47:24FromDiscord<Varriount> You can also wait for the signal, rather than polling.
07:49:54*PMunch joined #nim
08:09:03*haxscramper joined #nim
08:11:10haxscramperdisruptek: It helped partially - I missed `notes*` fields, so now I know how to configure hints, but the problem is `hintLineTooLong` is emited by parser/lexer directly, and there is only check for error handler (e.g. configuration is not accessed in `dispMessage` for lexer, even though it is present).
08:11:27haxscramperMaybe I missed something, but removing `hintLineTooLong` didn't help
08:13:17haxscrampershadow: C++ bindings are working, but not exactly finished - I've already used them to wrap https://github.com/haxscramper/nimtrail , but there are a lot of rough edges that need to be addressed before I can claim it working
08:16:03haxscrampershadow.: So for now I would recommend wrapping things manually
08:16:16disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek
08:16:28disruptekadded much more documentation for haxscramper.
08:16:50FromDiscord<haxscramper> @shadow.
08:24:40*shirty joined #nim
08:43:20FromDiscord<lqdev> disruptek: still very much yes. keep in mind that i write games and software. so i compile my program, wait 10 seconds until that finishes, and test. it looks off, so i go back to my text editor to tweak it by some amount. now i have to wait another 10 seconds until i can continue! not to mention the fact that i have to wait 10 seconds until my editor shows me whether i made an error or not!
08:44:46FromDiscord<ElegantBeef> Seems like you need a dev UI editor
08:48:16FromDiscord<lqdev> yes beef, what else, switch to Qt?
08:54:09FromDiscord<ElegantBeef> I mean an GUI inspection system
08:54:40*shirty quit (Quit: Going offline, see ya! (www.adiirc.com))
08:59:22saemThat feels like a work around.
09:00:07*oneark quit (Quit: Idle for 30+ days)
09:01:34FromDiscord<ElegantBeef> Well if he's recompiling just to change values it seems like a serialized inspector that can reload the values is less of a work around and just a solution
09:05:48FromDiscord<lqdev> quite an expensive solution though
09:06:16FromDiscord<lqdev> i'm not feeling up to the task of writing a tool like this.
09:07:03*Vladar joined #nim
09:07:33ForumUpdaterBotNew question by Alex Craft: How to write function similar to `echo` in Nim?, see https://stackoverflow.com/questions/65733219/how-to-write-function-similar-to-echo-in-nim
09:11:21FromDiscord<ElegantBeef> Yea i think impbox was thinking about something similar, and i like the idea so i might try to make a serializing library eventually to do it
09:11:22*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:29:23*Tanger quit (Remote host closed the connection)
10:01:47*adnan338 joined #nim
10:02:04adnan338Just submitted my first nim app to flatpak :)
10:02:35FromDiscord<ElegantBeef> Congrats
10:03:05FromDiscord<ElegantBeef> What's the application?
10:03:54adnan338It's just a personal invoice generation tool, thought it'd be cool to experiment with nim and gtk and do something that's personally useful
10:08:10*Q-Master quit (Ping timeout: 246 seconds)
10:24:59*piron quit (Quit: leaving)
10:41:22*Q-Master joined #nim
10:44:14*adnan338_ joined #nim
10:46:25*Q-Master quit (Ping timeout: 264 seconds)
10:47:48*adnan338 quit (Ping timeout: 256 seconds)
10:47:49*adnan338_ is now known as adnan338
10:49:17*antranigv quit (Ping timeout: 260 seconds)
10:53:50*antranigv joined #nim
11:00:12*leorize quit (Remote host closed the connection)
11:02:44adnan338Hello, is https://github.com/nim-lang/Nim/releases only for x86_64 builds? Where are the prebuilt binaries for AArch64?
11:09:30ForumUpdaterBotNew thread by Adnan: Where are the prebuilt binaries for AArch64?, see https://forum.nim-lang.org/t/7390
11:14:50PMunchHmm, have anyone written anything on multi-threading with ARC/ORC in Nim yet?
11:19:01*Q-Master joined #nim
11:25:14*Torro joined #nim
11:25:20*leorize joined #nim
11:29:44*Vladar quit (Remote host closed the connection)
11:32:04*Vladar joined #nim
11:38:35FromDiscord<lqdev> speaking of which
11:38:48FromDiscord<lqdev> why is allocShared a thing?
11:39:08FromDiscord<lqdev> i mean, if you're allocating memory why would it belong to a specific thread
11:39:12FromDiscord<lqdev> it's just memory
11:49:23PMunchEach thread has its own heap in Nim
11:49:58PMunchI'm guessing alloc would allocate on the thread-specific heap and allocShared would allocate it outside of any particular threads heap
11:50:00*PMunch quit (Quit: leaving)
11:52:06*PMunch joined #nim
12:06:34*habamax quit (Ping timeout: 260 seconds)
12:10:22FromGitter<gogolxdong> What is `Error: internal error: yield in expr not lowered`
12:12:26FromDiscord<lqdev> @gogolxdong it's a bug.
12:12:52FromDiscord<lqdev> PMunch: well but then why allocate outside of a particular thread's heap, what advantages does it have
12:13:03FromDiscord<lqdev> memory allocated with alloc isn't GC'd anyways
12:13:32FromGitter<gogolxdong> when will it be fixed?
12:13:51FromGitter<gogolxdong> It seems from parseInt?
12:15:58*natrys joined #nim
12:20:07PMunch@lqdev, dunno
12:20:46*T0rr0 joined #nim
12:20:52*Torro quit (Disconnected by services)
12:21:03*T0rr0 is now known as Torro
12:30:22FromDiscord<ag> Maybe memory sharing for lock-free concurrent data structures?
12:30:58*haxscramper quit (Ping timeout: 246 seconds)
12:32:30FromDiscord<ag> I'm just guessing, never implemented something like that. I did shared memory stuff in C, for sending messages between processes in school. Maybe allocShared is used for things like that
12:32:32*Vladar quit (Remote host closed the connection)
12:37:01PMunch@lqdev, apparently allocShared allocates memory in a shared memory region behind a lock: https://github.com/nim-lang/Nim/blob/version-1-4/lib/system/alloc.nim#L1066
12:39:25FromDiscord<lqdev> hm, but what would be the point
13:02:00FromDiscord<Rika> Sharing a heap object across threads?
13:02:56FromDiscord<Rika> Oh I assume it’s just a separation thing
13:14:52*wasted_youth joined #nim
13:24:30FromGitter<gogolxdong> Is there any workaround for this bug?
13:31:27FromDiscord<apollo> someone recommended the Nim In Action book for me. is that a good place to start as a beginner.
13:38:06*Vladar joined #nim
13:38:53FromDiscord<haxscramper> yes
13:38:58Clonkk[m]You can preview it at Mannings I believe
13:39:11FromDiscord<apollo> okay
13:39:14FromDiscord<haxscramper> Though you can view any links from
13:39:16FromDiscord<haxscramper> ~learn
13:39:16disbotlearn: 11contains links to lots of interesting articles and tutorials to get started with nim -- haxscramper
13:39:16disbotlearn: 11https://nim-lang.org/learn.html
13:39:29FromDiscord<haxscramper> Specifically nim by example
13:41:43Oddmongerapollo : yes , go and buy it. It has not everything but it's a good start for a newcomer.
13:41:45Clonkk[m]See for yourself
13:42:23Oddmongerthe only real thing which annoy me is the very poor index
13:43:10FromDiscord<apollo> yeah i'll check it out and see for myself before purchasing
13:44:00Oddmongerthe metaprogramming part (chapt.9, about macros) is very interesting
13:44:34Oddmongermuch better explanations than in the official tutorial, which is rather dry on the subject
13:44:49Clonkk[m]I mostly read the manual these days
13:45:24Oddmongerthe manual is good as a reference, once you have understand the subjects it contains
13:45:32Clonkk[m]You also have https://devdocs.io/nim/ that has been updated
13:45:55*shirty joined #nim
13:46:05Clonkk[m]If you prefer the devdocs format
13:46:43Oddmongerthis one is good too: https://github.com/StefanSalewski/NimProgrammingBook
13:47:07Oddmongervery didactic, it should be printed and sold imho
13:48:16Clonkk[m]https://zevv.nl/nim-memory/#_introduction That talks about how memory is used in Nim also quite interesting to understand what's going on under the hood
13:48:38Clonkk[m]Are also interesting read
13:55:35FromDiscord<lqdev> @gogolxdong kinda hard to tell when we don't have the code
13:57:24*vicfred joined #nim
14:15:44FromDiscord<dom96> Btw if you’re buying Nim in action. Check out the links in https://book.picheta.me, you might be able to get it cheaper through Amazon (and if you use the manning link there I also get an affiliate payout :))
14:16:17FromDiscord<dom96> I also link to useful resources there
14:21:52*adnan338 quit (Quit: adnan338)
14:22:09*adnan338 joined #nim
14:34:23*pietroppeter joined #nim
14:46:13FromDiscord<whisperdev> I am banging my head against desk but I cant compile a dll for fswatch 😄
14:51:52PMunchDry banging it at a wall instead
14:53:59PMunchBut seriously, what is your issue with it? I'm compiling Nim DLLs so I might be able to help
14:56:53Clonkk[m]Dry banging sounds like a very different activity
15:00:44PMunchAnd an uncomfortable one at that
15:01:04FromDiscord<whisperdev> How do you compile fswatch?
15:01:04PMunchNot that banging your head into a desk sounds particularly comfortable :P
15:01:12PMunchOh I haven't compiled fswatch
15:01:18PMunchBut I compile other DLLs
15:01:47FromDiscord<whisperdev> This is the biggest weakness of Nim. Non-pure Nim libraries with their specific installation requirements :/. Go is clearly superior here
15:02:18PMunchHow is Go better at that?
15:02:20FromDiscord<lqdev> nah it's the library's fault that it's not user-friendly
15:02:55FromDiscord<whisperdev> Go usually uses pure Go libs
15:04:28PMunchEh, pros and cons
15:05:14*liblq-dev joined #nim
15:05:16*liblq-dev quit (Client Quit)
15:06:03FromDiscord<lqdev> Araq: how would i go about embedding my app's version in both my app and its nimble file?
15:06:26FromDiscord<lqdev> a while ago i said you wrote you can just create a common module that's imported by the nimble file and the app
15:07:17PMunchI think Nimble sets a define
15:07:23FromDiscord<lqdev> but that doesn't seem to work for me. i've put a version.nim inside of src/myapp, but then i can't really access it via the nimble file
15:07:56Oddmongerwith event…mods as uint16, i try this boolean comparison: if event.key.keysym.mods and cast[uint16](KMOD_SHIFT):
15:08:13PMunchYeah, nimble sets: -d:NimblePkgVersion=0.7.0
15:08:17FromDiscord<lqdev> no matter what i try `import src/myapp/version as v`, `import myapp/version as v`, `import pkg/myapp/version as v` all fail at some point during `nimble install`
15:08:26FromDiscord<lqdev> PMunch: but that's only when compiling via nimble, no?
15:08:33Oddmongerand i got : «got uint16 but expected bool»
15:08:35PMunchWell yes
15:09:25*xet7 quit (Quit: Leaving)
15:09:41PMunchUnless of course you pass that switch if you're not compiling via Nimble (but why would you?)
15:10:15PMunchBut yeah, if you add this: `const NimblePkgVersion {.strdefine.} = ""` to your project it will be set up Nimble
15:11:05*xet7 joined #nim
15:17:42FromDiscord<dk> Is there some secret way of dealing with stuck nimsuggest processes other than killing them manually from time to time?
15:18:30FromDiscord<Rika> you uh dont use nimsuggest
15:18:32FromDiscord<Rika> xd
15:18:46FromDiscord<lqdev> Yes
15:18:54FromDiscord<Rika> srs tho avoid macros and templates and shit if you want nimsuggest not to shit itself
15:19:07saem@dk: that's exactly how you deal with it, bring out the kill
15:19:54FromDiscord<exelotl> Yeah I stopped using nimsuggest when the frequency of hangs got too high
15:20:06FromDiscord<dk> pretty much the only thing I miss from other languages is better editor stuff
15:20:11saemYeah no, those are bugs, especially if you have an easy repro file them.
15:20:53FromDiscord<dk> the only hangs I can repro are the ones that make nimsuggest consume all memory
15:21:14FromDiscord<dk> usually it's a guess if the nimsuggest processes will end after closing the editor
15:21:33saemWhat editor?
15:21:44FromDiscord<dk> VSCode
15:22:21FromDiscord<dk> But I didn't get the impression that only people using VSCode have these problems
15:22:35saemI thought I improved the termination, but which extension?
15:22:41FromDiscord<dk> yours :)
15:23:41saemYeah, it's common to nimsuggest, which will struggle on certain code. I've been plodding along fixing nimsuggest bugs.
15:24:40saemSo they're slowly going away, the easier way to raise the priority for an issue you're encountering is if you can create a minimal failing case.
15:25:34FromDiscord<dk> Another big issue with the tool is that if I modify module A and save it, any compilation errors introduced to modules importing it are not instantly visible
15:25:53FromDiscord<dk> I have to save a file to see if any new errors came up
15:26:04saemThat's also a vscode-ism
15:26:11FromDiscord<dk> Oh
15:26:13saemWell partially
15:26:20FromDiscord<dk> Do other editors fix that?
15:26:53saemIIRC it does a Nim check on your projects, which of you haven't defined is the file you're looking at.
15:27:53FromDiscord<dk> But if I define it does the file I'm looking at also get checked?
15:29:24saemKinda, if it gets imported then it's be checked, but only for the posts that aren't hidden by conditional compilation
15:30:00saemSo when isMainModule isn't going to get checked.
15:31:21saemUsually not a big deal as running the file will show the errors and I added partial log message parsing to also linking to files
15:32:57saemBut ugh, the log output in Nim is annoying as hell to parse when it's multiple lines. Something I'll have to fix later.
15:35:44FromDiscord<dk> Nice, this project setting does what I wanted it to
15:36:44saemHonestly, half the blockers I've had working on the extension itself or the compiler go away after that.
15:38:19saemIt means I can focus on issues that aren't easy to work around.
15:38:25FromDiscord<dk> Would it be possible for the extension to automatically treat files declared in `bin` as project files?
15:38:42saemFirst, fuck nimble
15:38:55saemSorry, I need to get that out of my system
15:39:08FromDiscord<dk> I'm curious
15:39:13saemYeah, as a shitty heuristic I can
15:39:19FromDiscord<dk> I have no opinion on it
15:39:49saemBut there are issues, they're needless, and I don't want to bother with that tar pit because of it
15:40:05saemBut here is the issue
15:40:25saemSo the bin works as long as you don't map it
15:40:36*zarlet quit (Quit: WeeChat 2.9)
15:41:06saemIf you map it then the json dump no longer shows the original unmapped
15:41:27saemWhich means I gotta parse the fucker as text
15:41:42Oddmongeris it possible to compare a int and an enum ?
15:42:12Oddmongerthe int can be the enum ORed
15:42:43Oddmongera:int, b:myenum -> if a and b # forbidden
15:42:50saemI also have read the code base and ... I don't believe in the approach and just can't get motivated to touch it unless I'm given the all clear to rip shit up.
15:43:21Oddmongerah to get the ordinal, i had forgotten this, thank you
15:44:14FromDiscord<dk> you mean the nimble source in general?
15:44:42FromDiscord<dk> would you recommend nimph?
15:45:47saemI haven't used it and so I honestly can't. I only disagree on one thing when it comes to it which is the hard git dependency.
15:46:54disruptekdk: if you can build it easily (run one of the bootstraps), it's worth having around. maybe you will agree with its approach.
15:47:01disruptekif you can't build it, don't worry about it.
15:47:08disruptekplenty of people don't miss it.
15:47:20*tane joined #nim
15:47:32*waleee-cl joined #nim
15:48:57*shirty quit (Quit: Going offline, see ya! (www.adiirc.com))
15:50:09saemThere is a lot to like about the approach I just wish git wasn't the only source of metadata/thing it understood
15:51:08saemThat wish might just need me to go fix it. 😅😝
15:51:50disruptekwe talked about breaking it out to run git as a subprocess, like gitnim.
15:51:51FromGitter<gogolxdong> `import wNim/private/winimx except ShellExecute` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=6001ba169632f63d871c0106]
15:52:03disruptekthe problem is that it's not very fast to spawn git so many times.
15:52:31FromDiscord<dom96> > First, fuck nimble↵That’s a strong reaction. Can you elaborate on it?
15:52:34disruptekhaving git embedded is an enabling feature that allows for more sophisticated and performant behavior.
15:52:53FromGitter<gogolxdong> import has excluded ShellExecute , compiler still give me the same error.
15:57:38saemdom96: it's entirely the wrong data model. Every time I try to interact with it as a person developing tools all the pain and compromises some through.
15:58:24saemThere are just gotchas at every corner that I can't even begin to enumerate
15:58:29saemThe bin thing
15:58:49saemThe incomplete introspection and dumps
15:59:44saemIt's very imperative when it comes to tasks
15:59:48disruptekthat's not fair.
15:59:59disruptekthere are nearly 900 gotchas enumerated in the git repo's issues section.
16:00:26saemTrue, but they're around the problems and rarely at the heart of it
16:00:31*jkiesian joined #nim
16:01:49FromGitter<gogolxdong> I'm not using the shellapi. qualifier, because it probably relatives to `Error: internal error: yield in expr not lowered`
16:02:36saemI mean, I might start believing in nimble if someone can show me a data model (type section) that's shows the fundamental domain model/philosophy and are willing to significantly update it where it went wrong.
16:02:52FromDiscord<dom96> @saem is there is one fundamental design of nimble you’d change, what would it be?
16:03:58FromDiscord<dom96> A few of your points are just bugs, and may or may not be due to how Nimble functions. But rather a consequence of how it was developed (by multiple volunteers)
16:06:34saemHave a fundamental data model and have the nimble file be a truly declarative way to specify it. Starting with, "what is a nimble package"
16:07:21saemThat's The crux of it, presently there is no core set of types to reason about our debate
16:08:32*abm joined #nim
16:08:35FromDiscord<dom96> So effectively you want to strip away nimscript from Nimble?
16:09:25saemI mean, likely an escape hatch is required, but contain the ever living fuck out of it
16:09:41federico3saem: I tried to create some distinction between "git repo" and "nimble package" in https://github.com/nim-lang/RFCs/issues/179 and it didn't work...
16:09:41disbotNim source packages
16:09:44saemShit is radio active
16:10:03Araqoh it's this again
16:10:12*hmmm joined #nim
16:10:29FromDiscord<Rika> oh hi there
16:10:35Araqother PMs manage with a scripting language too iirc
16:10:49Araqso write an RFC an gain consensus on removing NimScript from Nimble
16:11:05FromDiscord<lqdev> i don't remember any other PM i've ever used use a scripting language
16:11:09FromDiscord<lqdev> maybe maven and gradle
16:11:15Araqand yeah, you can blame me for that
16:11:23FromDiscord<lqdev> but maven't xml can barely be called a scripting lang
16:11:30FromDiscord<lqdev> so it doesn't count
16:11:37Clonkk[m]<FromDiscord "<lqdev> maybe maven and gradle"> Ivy too
16:11:42Araqit's all my fault, because I've yet to see a "declarative" model that isn'st bad
16:11:55FromDiscord<dom96> @lqdev huh. Most allow at least an external file like setup.py
16:12:18FromDiscord<lqdev> well personally i've never had the need for a setup.py
16:12:32FromDiscord<lqdev> what would such a setup file do anyways?
16:12:45FromDiscord<Rika> an n=1 isnt that high of an n
16:12:46FromDiscord<dom96> The heart of nimble is still declarative though.
16:12:55Araqevery PM tool immediately grows support for scripting, Cargo also supports it
16:13:18federico3 setup.py is crucial to most Python packaging and deployment tools
16:13:21FromDiscord<Rika> and dont pms outside of proglangs have a scripting lang in them as well
16:13:30saemThe question is not when, but how soon does one need to reach for it
16:13:35FromDiscord<lqdev> pacman sure does
16:13:36FromDiscord<lqdev> brew too
16:14:04FromDiscord<Rika> i believe when and how soon are essentially the same questions
16:14:11Araqsaem, the real question is why NimScript is a problem
16:14:12FromDiscord<Clyybber> whats the problem with nimscript in nimble?
16:14:15federico3there's nothing wrong in the scripting per-se, as long as there are standard interfaces to extract the information needed by other tools
16:14:47hmmmanyone knows if the leorize nvim extension autofolds code?
16:15:00saemAraq: because how does a tool begin to make sense of it?
16:15:00AraqNimble doesn't even run the NimScript, it asks the Nim compiler to evaluate it, it's rather clean, IMO
16:15:01disruptekit does.
16:15:11federico3and also standards on how to tell the scripts what to do and not to do
16:15:29hmmmmy buddy tek! how do I tell I don't want any folding
16:15:54saemI read the code for that, it wraps the file, overrides a bunch of declarations, and that acts sorta like an interpreter
16:15:55FromDiscord<Clyybber> saem: By evaluating it?
16:16:01Araqsaem, the tool asks nimble to "dump" it
16:16:08disruptekhmmm: set nofoldenable
16:16:17Clonkk[m]<hmmm "anyone knows if the leorize nvim"> If you are having issue with Alaviss plugin aut ofolding by default there is a very simple fix. you can just add ``set local foldlevel=99`` to ftplugin/nim.vim
16:16:19disruptekhmmm: in your .vimrc or whatever.
16:17:00Araqcd projects/karax
16:17:01Clonkk[m]set nofoldenable will remove your ability to fold entirely
16:17:05Araqnimble dump --json
16:17:14saemAraq: the dump is largely useless, even if improved, because it doesn't really let you do more that get some bins and some tasks.
16:17:21FromDiscord<Rika> didnt know about nofe
16:17:24hmmmClonkk ty that's what I want, ty tek too
16:17:34*Clonkk[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/LmreLvxxIhtNLzXphJYSSyGH/message.txt >
16:17:37Clonkk[m]THis is the gitdiff
16:17:45FromDiscord<Rika> i checked in the vim docs, nofe doesnt disable folding
16:17:54Araqsaem, it contains the requirements and everything that your "declarative data model" would contain
16:18:33FromDiscord<Rika> ah wait no it does
16:18:38FromDiscord<Rika> i misunderstood lol
16:19:26*haxscramper joined #nim
16:19:37saemAraq I agree it needs an RFC, but no I think it definitely falls short of said model as evidenced by how quickly and often test and build tasks are overridden
16:19:43hmmmit work'd! ty all
16:19:47Araq "requires": [
16:19:48Araq {
16:19:48Araq "name": "nim",
16:19:48Araq "str": ">= 0.18.0",
16:19:48Araq "ver": {
16:19:49Araq "kind": "verEqLater",
16:19:52Araq "ver": "0.18.0"
16:19:54Araq }
16:19:56Araq },
16:20:03saemI've parsed that json plenty
16:20:35Araqexcellent output... even the version syntax tree inside
16:21:42federico3...but it contains a fraction of the information that other tools might need
16:22:11saemThat about sums it up
16:22:14FromDiscord<Rika> whats missing?
16:23:06Araqyeah, what is missing?
16:23:18haxscramperFor custom compiler pass I need to create context on each `passOpen`, correct?
16:23:51haxscramperAnd if I need some data to persist between contexts that's my responsibility to handle this
16:24:10disruptekwhere is `nimble dump --json` documented? i've never seen it before.
16:24:12haxscrampercreate new custom context object on each `passOpen`*
16:24:22disrupteki'm parsing all that shit by hand (well, npeg, but still...)
16:24:23Araq"build tasks" I guess but then 'test' and 'docs' are standard
16:24:42Araqdisruptek, dunno, I simply tried the command and it worked
16:25:03FromDiscord<dom96> disruptek: https://github.com/nim-lang/nimble#nimble-dump
16:25:04Clonkk[m]If you type ``nimble`` the helper fives you the list of command
16:25:07Clonkk[m]Dump is listed
16:25:18federico3tons of metadata, and information on generated file, their use-cases...
16:25:23disrupteki hate that i have to run nimscript on every single package just to evaluate its configuration.
16:26:24FromDiscord<dom96> federico3: can you give specific examples?
16:27:00disruptekoh, that was added after nimph was written.
16:27:10disruptekjeeze, i was about to say... i must be the biggest idiot.
16:28:03*fanta1 joined #nim
16:29:01FromDiscord<dom96> The json variant was implemented more recently, yes. 61 LOC. Could've saved yourself a lot of time.
16:29:01federico3dom96: for example a "hybrid" package can generate a bunch of binaries. Given a binary, is this an application to be installed for the end user? Or demo to be shipped in a different way? Or maybe a unit test tool not to be installed?
16:29:38FromDiscord<dom96> federico3: that's not something that even Nimble knows right now
16:29:46federico3@dom96: I know
16:29:50saemWhat's missing are a declaration for how to build. The build task doesn't work, it needs to be reasonable to know what's there and parametrize it
16:30:00saemThe list of supported backends
16:30:12Araq "backend": "c" is in the json
16:30:24FromDiscord<dom96> You can build by calling Nimble
16:30:50saemIDEs don't just build a package
16:31:10federico3@dom96: next example: I want to discover and run lightweight unit tests (real unit tests without side effects) for 200 nimble packages
16:31:15saemThey do a myriad of other builds that are flavors on top of what the main build concept is
16:31:27FromDiscord<dom96> saem: you can achieve everything you can with Nim
16:31:39FromDiscord<dom96> Nimble passes all flags straight to Nim
16:32:02saemHow do I figure out what it's assuming?
16:32:04Araq'nimble build' is the *standard* build command
16:32:30FromDiscord<dom96> federico3: okay, but that's not something that most people do.
16:32:33Araqyou don't need to figure it out at all, it's always that. But I understand what you need
16:32:56Araqyou want a list of tasks for IDE support, got it. It's a reasonable thing to ask for
16:33:17Araqbut my point is at least right now you already have *1* such build command
16:33:27FromDiscord<dom96> Doesn't `dump` provide those?
16:33:33saemI don't disagree with that
16:33:37federico3@dom96 it's common enough that various PM have a standard hook for unit tests
16:33:56saemdom96: no and the tasks output relies on spacing and that is fragile
16:34:10Araq'nimble test' is the other standard command iirc
16:34:13FromDiscord<dom96> federico3: yes, and I'm not saying it shouldn't be provided
16:34:17Araqand 'nimble docs'
16:34:24FromDiscord<dom96> saem: Don't worry, I won't ask you to parse `nimble tasks`
16:34:28saembuild, test, tasks, docs
16:34:45saemdom96: I already did, I hate myself for it
16:34:53FromDiscord<dom96> But adding a list of tasks to the json output should be trivial
16:34:59saemI know
16:35:13*disruptek sighs.
16:35:21saemI looked at the code and that didn't help my frustration
16:35:47federico3Araq: there's "nimble test" but without a clear standard on what it can and cannot do
16:36:01federico3same for "nimble docs"
16:36:41saemIt's easy to nibble on these things but it's not a particularly composeable model.
16:36:42haxscramperThere is no nimble docs by default, isn't it?
16:36:48FromDiscord<dom96> saem: You can't expect everything to be available and get frustrated when it's not. We're not Go.
16:37:23haxscramperIt is possible to write `task docs`, but by default project-wide documentation generation is not supported with nimble
16:37:44haxscramperor I'm missing something?
16:38:07saemdom96: my dude, I ported the extension, I'm starting in nimsuggest bugs, that's my greeting card to the community, are you seriously saying I'm not also directly working on this?
16:38:38saemI know you're not Go. But also screw Go
16:39:06saemThe thing is, it's not me and you. I'm willing and am working on it.
16:39:28Araqsaem, I know who you are and I love your work
16:40:29saemAraq: I know, I'm super grateful for the attention, I can see my prs get quick attention and I don't know if they deserve it. So thanks for the support.
16:41:08Araqfederico3, sure but then after we wrote these standard design documents we need to enforce them somehow I guess and it feel like another rabbit hole, frankly
16:41:18saemAgain, if I poop on something is because I'm also running it around in my head to fix it.
16:42:02*rockcavera joined #nim
16:42:04Araqsaem, also, it's easy to use words like "particularly composeable model" because they don't mean much
16:42:36Araqthey sound good but in the end it might just be "Nimble json dump needs to include tasks"
16:42:41federico3Araq: what do you mean with "enforce" exactly?
16:42:55Araqor "Nimble's codebase is a mess, can we refactor it"
16:43:45Araqfederico3, unit tests vs integration tests
16:44:11saemAraq that's fair, it's not much without context. In my ideal world all this can be a single typed memory model, that things like nimble can convey enough meaning that in many cases tools on top can add to it. The json is an ok starting interchange.
16:46:15saemSo things like, I support the following backends, allow/deny/default list. Or I use x to test and if that is known and understood then great. We might be able to do run tests, run with coverage, debug, etc...
16:46:28federico3Araq: if you mean "ensure developers implement those": all these would be optional. If something is not implemented Nimble can return some "NotImplemented" return code that is semantically different from "I tried running it and crashed badly"
16:47:42FromDiscord<dom96> saem: I understand the frustration, and I think there is a right and a wrong way to air it. Do consider that next time, especially in the context of open source work that is solely done by volunteers.
16:48:01disrupteki could teach you a thing or two about airing frustration.
16:48:19disruptekmaybe we can talk about a standard for tests.
16:48:58saemImma ignore the tone police
16:48:59federico3...and if there are documented, standardized entry points and the implementation does something incorrect it becomes clear that it can be treated as a bug
16:49:02disruptektestes implements the following standard: build/run t*.nim in tests/; failing any detected, build/run project-named .nim file or, failing the uniqueness of this, all the .nim files.
16:50:08Araqsorry, bbl
16:50:19FromDiscord<dom96> saem: tone police?
16:50:20saemAraq laters
16:50:21disrupteki'd like it to run foo.nims to test project foo despite foo.nim, but this seems to conflict with the compiler's config resolution methodology.
16:50:30saemdom96: your previous message
16:51:38FromDiscord<dom96> saem: I'm not forbidding you from doing anything, I am just asking you to reconsider how you air your frustrations.
16:52:29hmmm*munching pocorns while eyeing disruptek*
16:54:21disruptek!repo ups
16:54:22disbothttps://github.com/dmknght/UPS -- 9UPS: 11Super stupid secret 15 1⭐ 1🍴 7& 1 more...
16:54:30disruptek!repo disruptek/ups
16:54:31disbothttps://github.com/disruptek/ups -- 9ups: 11a package handler 15 1⭐ 0🍴
16:54:44disrupteki'm putting packaging types and utility in there.
16:55:49disruptekit will eventually have the dependency graph (which means lockfiles) and all that sort of middleweight complexity.
17:02:20*Torro quit (Quit: bye)
17:11:25saemdom96: by that token I'm asking you to reconsider your approach. You spoke of a fabric of volunteers, as if I'm not one and it sure seems like you're continuing to do so.
17:12:13FromDiscord<dom96> saem: In that case let me say that this was certainly not my intention. Anybody who contributes to Nim is a volunteer to its cause, yourself included.
17:17:57disruptekdom96: what was the last work you did on nimble?
17:24:04*pietroppeter quit (Quit: Connection closed for inactivity)
17:24:34FromDiscord<zetashift> So I don't know much about the advanced stuff of package managers, but what exactly is the difference between nimph and ups?
17:25:45disruptekups is the library that shashlick and i talked about making; a place to unify and standardize the models for how we talk about nim software.
17:26:28disrupteki'm moving nimph's guts into ups so that i can use that work in other tools without requiring nimterop and libgit2.
17:27:16*jkiesian quit (Ping timeout: 240 seconds)
17:32:10*adnan338 quit (Quit: adnan338)
17:32:28*adnan338 joined #nim
17:34:02FromDiscord<zetashift> Sounds very modular
17:35:24disruptekit's not rocket science. nimph already exposes all this stuff; it's just that, y'know, i can't depend on being able to include it as a nimble dependency.
17:47:00ForumUpdaterBotNew post on r/nim by Turbulent_Passion_77: A simple search engine made with nim, see https://www.reddit.com/r/nim/comments/kxznfu/a_simple_search_engine_made_with_nim/
17:49:40hmmmhmm dudes can I make a proc that returns either a string or false :o
17:50:26FromDiscord<Rika> make an object variant
17:50:38hmmmhi rika :3
17:50:42hmmmthat's pretty obscure to me
17:50:50FromDiscord<Rika> hello /hm+/
17:51:53FromDiscord<dk> you propably don't want to
17:51:57FromDiscord<exelotl> hmmm: sounds like you want an Option[string]
17:52:04FromDiscord<dk> you can do proc(result: var string): bool
17:52:33hmmmI remember something about Option
17:52:37hmmmImma check the manual
17:53:32FromDiscord<exelotl> I think you won't find it in the manual, but it's part of the standard library
17:53:33FromDiscord<exelotl> https://nim-lang.org/docs/options.html
18:02:09*natrys quit (Quit: natrys)
18:04:23*natrys joined #nim
18:06:27disruptek!repo badresults
18:06:29disbothttps://github.com/disruptek/badresults -- 9badresults: 11a less fascist fork of nim-result 15 1⭐ 0🍴
18:10:22disruptekwho can recommend a really good piece of web-cam hardware that is hacker-friendly?
18:16:15saemI too would like to know this
18:18:30FromDiscord<Avatarfighter> disruptek: are you making a webcam
18:18:53FromDiscord<Avatarfighter> cuz you can buy the tiny webcam board from laptops and connect it to a usb cable
18:22:21disruptekno, i need a webcam and i'm willing to pay for something that is high-quality and which i can really exploit under linux. i would prefer something network-based but i won't be surprised if it makes more sense given today's codecs to let the computer do the work and simply connect via usb3 or whatever.
18:26:49FromDiscord<Avatarfighter> Hm im not sure about hackable premade webcams unless you want to RE drivers if there are any
18:27:24disrupteknot that kind of hackable. just, y'know, something open enough that i don't need anything proprietary to use it on linux.
18:27:30FromDiscord<Avatarfighter> ohhh
18:27:37FromDiscord<Avatarfighter> i understand 😛
18:28:00FromDiscord<Avatarfighter> i think any usb camera should work tbh
18:28:25disruptekyes, they should. but opinions are like assholes.
18:28:27FromDiscord<Avatarfighter> if you want you could buy something like a VoCore2 SBC with a camera module lol
18:28:39FromDiscord<Avatarfighter> its a tiny sbc
18:28:46disrupteksbc? small-block chevy?
18:29:06FromDiscord<Avatarfighter> https://ameridroid.com/products/vocore2-ultimate-linux-sbc-with-wifi-and-dock
18:29:11FromDiscord<Avatarfighter> Single board computer
18:29:12*vicfred quit (Quit: Leaving)
18:30:02disruptekhmm, not crazy i guess.
18:30:12*vicfred joined #nim
18:30:29disruptekyes, crazy. i don't have time for this.
18:31:34*idf joined #nim
18:36:09FromDiscord<Avatarfighter> Haha
18:37:52Oddmongerseriously… i declare a type object in a module, i put the * after its name. And then for accessing its fields, i have to put * them one by one ?
18:38:22FromDiscord<haxscramper> yes
18:38:26FromDiscord<Avatarfighter> yeah
18:38:51Oddmongeri wish i was wrong on this *
18:39:03FromDiscord<Avatarfighter> its one of those features that is imo annoying but when you gotta keep one field private its useful af
18:39:17Oddmongerok it's by design
18:39:30FromDiscord<haxscramper> yes, there is no `public:` section os something like that
18:39:51Oddmongeri'm sure i can write obscure macro to get rid of it, but the remedy would be worst than the symptom :)
18:40:06FromDiscord<haxscramper> well, it is not that bad
18:40:19FromDiscord<Avatarfighter> It only gets bad if your type is massive
18:40:33FromDiscord<haxscramper> And IMO type declaration sytax is off-limit for macro use tbh
18:40:51FromDiscord<Avatarfighter> for most people they define a type once and dont touch it ever again so manually typing the asterisks isnt too bad
18:40:54FromDiscord<dom96> Bet you a macro for this exists already
18:41:04FromDiscord<Avatarfighter> i say most people in relation to myself
18:41:15FromDiscord<haxscramper> like all other declarations tbh, except for variable declaration
18:41:17FromDiscord<Avatarfighter> type macros are hot @haxscramper
18:41:24FromDiscord<haxscramper> well
18:41:27FromDiscord<Avatarfighter> !repo NESM
18:41:28FromDiscord<haxscramper> Too hot for me
18:41:29disbothttps://github.com/xomachine/NESM -- 9NESM: 11NESM stands for Nim's Easy Serialization Macro. The macro that allowing generation of serialization functions by one line of code! (It is a mirror of https://gitlab.com/xomachine/NESM) 15 41⭐ 2🍴
18:41:34FromDiscord<Avatarfighter> peep that macro
18:41:37FromDiscord<Avatarfighter> its really cool lol
18:41:37FromDiscord<haxscramper> !repo nimtraits
18:41:39disbothttps://github.com/haxscramper/nimtraits -- 9nimtraits: 11Automatic trait implementation for nim types 15 4⭐ 0🍴
18:41:43FromDiscord<haxscramper> I can play this game too
18:41:47FromDiscord<Avatarfighter> Hahaha
18:42:23FromDiscord<haxscramper> But after writing this I realized it is just changing language syntax too much
18:42:44FromDiscord<haxscramper> Even for comparatively mild differences like trait annotations
18:43:07FromDiscord<Avatarfighter> I fully agree
18:43:26Oddmongeris it possible to reset an object (all fields zeroed or emptied at once)
18:43:39Oddmongerwithout using a temp object of same type for copying
18:44:12FromDiscord<haxscramper> https://nim-lang.org/docs/system.html#zeroMem%2Cpointer%2CNatural
18:44:51FromDiscord<haxscramper> By default all memory is zero-initialized, so this is identical to constructing new object
18:44:57Oddmongerhum do you thing it would work with an object composed of booleans fields ?
18:45:04FromDiscord<haxscramper> at the moment, in future it might change
18:45:28Oddmongerhum ok
18:45:31FromDiscord<haxscramper> Oddmonger: I think it would work for anything
18:45:51FromDiscord<haxscramper> Though I'd just copy from default value
18:47:55FromDiscord<dk> valueless `return` not allowed in iterators 😳
18:48:15Oddmongerbut the guardian of Nim is going to whip my *** because it's unsafe
18:49:57Oddmongerdk : i cannot imagine an iterator which returns nothing. It would be curious
18:50:17*hnOsmium0001 joined #nim
18:51:19FromDiscord<haxscramper> to break out of iterator use `break`
18:51:32FromDiscord<haxscramper> or just dont `yeild` anymore
18:54:08FromDiscord<dk> I know, it just surprised me
18:55:09FromDiscord<dk> If the entire body depends on a condition, it looks better with result instead of indenting the whole thing
18:55:15FromDiscord<dk> with return
18:56:06FromDiscord<dk> And it seems I can't do that with `break`
19:05:21*hmmm quit (Quit: WeeChat 2.8)
19:10:08FromGitter<sdmcallister> Does anyone know of a way to add in-line svg in Karax?
19:25:34*fanta1 quit (Quit: fanta1)
19:30:16*hmmm joined #nim
19:34:01*hmmm quit (Client Quit)
19:49:19*lritter joined #nim
20:03:34FromDiscord<Quibono> sent a code paste, see https://play.nim-lang.org/#ix=2M8z
20:04:00FromDiscord<haxscramper> How you declare it?
20:05:08FromDiscord<Quibono> D'oh it's an openarray that exists outside the function scope, how do I modify values that are outside the function?
20:05:57FromDiscord<haxscramper> This is an view-type openarray, or you have `arg: openarray[int]`?
20:06:00FromDiscord<haxscramper> Show the code
20:06:21FromDiscord<Quibono> sent a code paste, see https://play.nim-lang.org/#ix=2M8A
20:06:41FromDiscord<haxscramper> You need to use `var seq` or view types (EXPERIMENTAL) or `var array` as first argument
20:07:10FromDiscord<haxscramper> Otherwise, you are passing immutable `array | seq`
20:07:33FromDiscord<Quibono> So like (arr: var seq...)?
20:07:36FromDiscord<haxscramper> Yes
20:09:43*Obshio joined #nim
20:11:13FromDiscord<dk> In `after build` in a .nimble file, can I see which file has just been built?
20:11:18FromDiscord<Quibono> Thank you, now I just need to handle the index errors lol
20:14:16FromDiscord<haxscramper> You can inspect list of bin files
20:14:33FromDiscord<haxscramper> IIRC `after build` runs after all binary compilations
20:18:22*shirty joined #nim
20:22:02*Obshio quit (Quit: Connection closed)
20:27:00*hmmm joined #nim
20:28:45*xet7 quit (Quit: Leaving)
20:47:57*adnan338 quit (Quit: adnan338)
20:48:14*adnan338 joined #nim
20:50:30*hmmm quit (Quit: WeeChat 3.0)
20:57:34*natrys quit (Quit: natrys)
20:59:52*Vladar quit (Quit: Leaving)
20:59:57FromDiscord<lqdev> damn, my render needs too much memory to succeed >_<
21:00:17FromDiscord<lqdev> what i have right now is that every thread gets a new freshly allocated video frame
21:00:30FromDiscord<lqdev> but this quickly consumes all of my memory
21:01:43FromDiscord<lqdev> because frames are 1920 1080 4 bytes in size
21:01:47FromDiscord<lqdev> and there's 2160 of them
21:01:52FromDiscord<lqdev> which is roughly 17GB
21:02:06FromDiscord<lqdev> i'm wondering how i could implement a pool of frames somehow
21:02:50FromDiscord<lqdev> so that at most maybe 200 frames are being rendered at a time, and subsequent frames reuse memory
21:03:34adnan338Hi, not related to nim but what's the difference between a global singleton and a global variable?
21:04:42FromDiscord<iWonderAboutTuatara> is gc:orc suitable for gamedev?
21:04:51FromDiscord<iWonderAboutTuatara> suitable is the wrong word
21:05:00FromDiscord<iWonderAboutTuatara> should I use ORC, ARC, or the standard GC?
21:05:28FromDiscord<lqdev> doesn't matter ime
21:05:41FromDiscord<lqdev> also depends on what sort of game dec
21:05:42FromDiscord<lqdev> (edit) "dec" => "dev"
21:05:52FromDiscord<iWonderAboutTuatara> simple 2d game
21:05:58FromDiscord<iWonderAboutTuatara> nothing special
21:06:00FromDiscord<lqdev> ah then default GC is more than enough
21:06:03FromDiscord<iWonderAboutTuatara> ok solid
21:06:12FromDiscord<iWonderAboutTuatara> without touching collection time etc?
21:06:29FromDiscord<lqdev> yeah
21:06:55FromDiscord<iWonderAboutTuatara> ok solid
21:06:58FromDiscord<iWonderAboutTuatara> thanks
21:07:12FromDiscord<lqdev> this game of mine uses the default GC and manages to run at a silky smooth 60 fps, even on low end hardware https://lqdev.itch.io/memrecall
21:07:21FromDiscord<lqdev> so don't worry about it too much
21:08:22FromDiscord<iWonderAboutTuatara> ah excellent
21:08:23FromDiscord<iWonderAboutTuatara> thank you!
21:09:31FromDiscord<lqdev> np
21:11:20*haxscramper quit (Remote host closed the connection)
21:12:45*narimiran quit (Quit: leaving)
21:59:22Araqif you interface with C(++) you should use --gc:orc just for the superior valgrind support
22:00:14Araqonce valgrind is happy you can switch to the GC that performs best for your code
22:01:55FromDiscord<treeform> (which is probably still --gc:orc)
22:02:20disruptekwho has a new name for my test framework?
22:03:32AraqI like 'smoke'
22:03:53disruptekmore than balls?
22:04:07FromDiscord<Avatarfighter> RIP testes
22:06:28Araqanything that is not obscene will do
22:06:34Araqthat rules out "ohfuck"
22:09:55Araqgood night
22:11:43Prestigedisruptek: disruptest?
22:13:18FromDiscord<Avatarfighter> disruptest ™️
22:13:21FromDiscord<Avatarfighter> I like it
22:13:32FromDiscord<Avatarfighter> disruptek: capitalize on this opportunity asap
22:14:44Prestigeeven 'disrupt' is not bad
22:15:15disrupteki think we have to go with balls; i just don't want to replace my testes unless i can replace them with balls.
22:15:38Prestigehow about goose eggs
22:16:11FromDiscord<ElegantBeef> testerino
22:16:30FromDiscord<Avatarfighter> lmao
22:16:34FromDiscord<ElegantBeef> just add "erino" to anything and you get a named package
22:16:46FromDiscord<Avatarfighter> testiclerino
22:17:20FromDiscord<ElegantBeef> testicles but it's pronounce as if it was a greek name so test-i-cles
22:17:29FromDiscord<Avatarfighter> yeah
22:18:54FromDiscord<Avatarfighter> cojones
22:19:01Prestigedisruptek: I think 'ballocks' is not obscene
22:19:07FromDiscord<Avatarfighter> bollocks
22:19:21FromDiscord<Avatarfighter> unless you were making a pun
22:19:45Prestigenah there's ballocks and bollocks
22:19:55disrupteki already have a cojones package.
22:20:00FromDiscord<Avatarfighter> hm
22:20:03FromDiscord<Avatarfighter> ballocks/bollocks
22:20:14FromDiscord<Avatarfighter> honestly just name it TESTicool
22:20:17FromDiscord<Avatarfighter> (edit) "TESTicool" => "`TESTicool`"
22:20:29*jkiesian joined #nim
22:20:55FromDiscord<Avatarfighter> capitalize the word test so you can argue your intent was to have it be a testing framework and it just so happens the name sounds vulgar
22:21:22FromDiscord<Avatarfighter> TESTiscool ?
22:21:31FromDiscord<Avatarfighter> sounds like testicles if you say it fast
22:21:42disruptekargue to whom?
22:21:49FromDiscord<Avatarfighter> yes
22:33:14PrestigeI think 'arbiter' would be a good testing framework name
22:38:05FromDiscord<Zachary Carter> @shashlick - with nimterop, is there a way to specify what generator CMake uses in `getHeader`? I tried with `-G` but it seems `-G "MinGW Makefiles"` is passed to cmake no matter what?
22:38:22*beatmox quit (Quit: ZNC 1.8.0 - https://znc.in)
22:38:31*beatmox joined #nim
22:39:24FromDiscord<Zachary Carter> I want to be able to do something like - `cmake -G "Visual Studio 16 2019" -A x64 -S \path_to_source\ -B "build64"` and then execute `cmake --build build64 --config Release` afterwards
22:39:28*jkiesian quit (Remote host closed the connection)
22:40:15*xicheng[m] quit (Ping timeout: 246 seconds)
22:40:15*cmc[m] quit (Ping timeout: 246 seconds)
22:40:15*guelosk[m] quit (Ping timeout: 246 seconds)
22:40:15*juanfra__ quit (Ping timeout: 246 seconds)
22:40:37*Northstrider[m] quit (Ping timeout: 246 seconds)
22:42:04disrupteki'm making an effort to be less obscene.
22:42:13FromDiscord<Zachary Carter> Meh screw this - I don't even know why I'm building the library in the first place. I'll just grab a pre built library.
22:42:30disrupteki'm with you.
22:42:44*abm quit (Quit: Leaving)
22:43:17FromDiscord<Zachary Carter> do you ever stream anymore?
22:43:40disruptekonly in the morning.
22:43:57disruptekdamnit, i didn't even make it 2mins.
22:44:05disruptekthis is going to be harder than i thought.
22:44:20disruptekahh, there i go again.
22:44:27FromDiscord<Zachary Carter> I mean it was pretty much over before it began
22:46:59FromDiscord<Avatarfighter> Disruptek needs to stream more
22:47:03FromDiscord<Avatarfighter> content is content
22:48:10*abm joined #nim
22:50:52FromDiscord<ElegantBeef> Well there we go got everything setup for that community showcase idea
22:51:09FromDiscord<ElegantBeef> Got a blog post announcing it, and instructions to add to it 😄
22:52:35*cmc[m] joined #nim
22:52:38*xicheng[m] joined #nim
22:52:45*juanfra__ joined #nim
22:52:50*guelosk[m] joined #nim
22:54:00*Northstrider[m] joined #nim
22:57:48*rayman22201 quit (Read error: Connection reset by peer)
22:57:51*notchris quit (Ping timeout: 268 seconds)
22:57:58*rayman22201 joined #nim
22:58:12*zielmicha__ quit (Read error: Connection reset by peer)
22:58:20*zielmicha__ joined #nim
22:58:23*hpyc9 quit (Quit: 420)
22:58:32*hpyc9 joined #nim
22:58:32*notchris joined #nim
22:58:34*Fish-Face quit (Quit: No Ping reply in 180 seconds.)
22:59:21FromDiscord<ElegantBeef> Well waiting for the PR to be accepted
22:59:49*Fish-Face joined #nim
23:00:12FromDiscord<ElegantBeef> But you can always read the post on github i guess https://github.com/nim-lang/website/blob/eaf13db79aa7695548d1870aecb95174feb78fc3/jekyll/_posts/2021-01-15-this-month-with-nim.md
23:00:19*juanfra__ quit (Ping timeout: 268 seconds)
23:00:56*Northstrider[m] quit (Ping timeout: 268 seconds)
23:00:56*BauxnaMatrix[m] quit (Ping timeout: 268 seconds)
23:00:56*Kurre[m] quit (Ping timeout: 268 seconds)
23:00:56*cadmium[m] quit (Ping timeout: 268 seconds)
23:00:56*JochenSchroeder[ quit (Ping timeout: 268 seconds)
23:00:57*lnxw37d4 quit (Ping timeout: 268 seconds)
23:00:57*jaens[m] quit (Ping timeout: 268 seconds)
23:01:33*FromGitter quit (Ping timeout: 268 seconds)
23:03:25*FromGitter joined #nim
23:03:30disruptekavatarfighter: you were around when i used to stream, right?
23:03:42*watzon quit (Ping timeout: 260 seconds)
23:03:42*wontruefree[m] quit (Ping timeout: 260 seconds)
23:03:42*dilawar_uchiha[m quit (Ping timeout: 260 seconds)
23:03:42*leorize[m]1 quit (Ping timeout: 260 seconds)
23:03:42*stisa[m] quit (Ping timeout: 260 seconds)
23:03:43*Zoom[m] quit (Ping timeout: 260 seconds)
23:03:44*MTRNord quit (Ping timeout: 260 seconds)
23:03:45*planetis[m] quit (Ping timeout: 260 seconds)
23:04:17*xicheng[m] quit (Ping timeout: 260 seconds)
23:06:37*PMunch quit (Quit: leaving)
23:09:50FromDiscord<Avatarfighter> yeah
23:10:45*Northstrider[m] joined #nim
23:13:32*Kurre[m] joined #nim
23:14:01*JochenSchroeder[ joined #nim
23:14:02*cadmium[m] joined #nim
23:16:10*NimBot joined #nim
23:17:03*leorize quit (Ping timeout: 240 seconds)
23:17:25*juanfra__ joined #nim
23:19:37*BauxnaMatrix[m] joined #nim
23:20:52*sknebel quit (*.net *.split)
23:20:52*acidx quit (*.net *.split)
23:20:52*voltist quit (*.net *.split)
23:21:11*sknebel joined #nim
23:21:12*voltist joined #nim
23:21:26*acidx joined #nim
23:21:33*leorize joined #nim
23:21:45*jaens[m] joined #nim
23:21:56*lnxw37d4 joined #nim
23:24:16*planetis[m] joined #nim
23:25:32*stisa[m] joined #nim
23:25:32*MTRNord joined #nim
23:25:33*leorize[m]1 joined #nim
23:25:37*wontruefree[m] joined #nim
23:26:01*dilawar_uchiha[m joined #nim
23:26:03*Zoom[m] joined #nim
23:26:46*watzon joined #nim
23:26:52leorizedisruptek: re: cps, if the user wanna run an operation synchronously, my dispatcher would have to provide it?
23:27:07leorizeI'm hoping to not have to expose things like `readFileSync()` that node have
23:28:08*xicheng[m] joined #nim
23:33:00*adnan338_ joined #nim
23:36:46*adnan338 quit (Ping timeout: 256 seconds)
23:36:47*adnan338_ is now known as adnan338
23:40:53FromDiscord<Avatarfighter> leorize: whatchu doing with cpus
23:40:55FromDiscord<Avatarfighter> (edit) "cpus" => "cps"
23:43:06leorizelooking for a replacement to asyncdispatch
23:43:24leorizeI'm redoing stdlib io
23:43:33FromDiscord<Avatarfighter> aren't we all leorize, aren't we all...
23:43:53FromDiscord<Avatarfighter> Got a repo I can look at while you work ?
23:46:40leorize!repo alaviss/nim-sys
23:46:41disbothttps://github.com/alaviss/nim-sys -- 9nim-sys: 11Abstractions for common operating system interfaces 15 7⭐ 0🍴
23:46:54FromDiscord<Avatarfighter> thanks 😄
23:50:51*tane quit (Quit: Leaving)