<< 22-12-2023 >>

00:31:39FromDiscord<sOkam! 🫐> In reply to @arnetheduck "or rather, the ideas": yeah that's what lead me to the wrong expectation, and therefore frustation when my hopes were shattered right after 😭↵But it's great to hear that you left room for customization in the codebase! that's really really great news, and a huge improvement over nimpretty just by itself. ty for that!
00:32:32FromDiscord<sOkam! 🫐> When I read that it has "no options" immediately assumed that you wouldn't have cared about leaving any option flexibility in there, and focused on making it as dead simple as possible. I guess I assumed wrong, great to hear
00:33:35FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
00:33:58FromDiscord<sOkam! 🫐> (edit)
01:10:42FromDiscord<Elegantbeef> @sOkam! 🫐 I know it's not the same but `strscans` does provide an API that does sorta work here https://hatebin.com/ivdofuttam
01:14:05FromDiscord<sOkam! 🫐> its definitely not the same, agreed
01:15:13FromDiscord<Elegantbeef> I do think the strscans is a better approach as it does not use regex 😄
01:15:28FromDiscord<sOkam! 🫐> I have used strscans a lot, though. its great for some tasks
01:15:29FromDiscord<Elegantbeef> Which means it's pluggable with captures
01:16:08FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "I do think the": whats wrong about regex, other than the cR$yp1c:^ syntax?
01:16:37FromDiscord<Elegantbeef> It's slower and also does not have any parsing logic built in
01:21:14FromDiscord<Elegantbeef> Which means you cannot do like `line.scanf("$[skip(Letters)]:$i${either({'c', 'f'})} $+", temp, name)` where the input is like "Edmonton\:-10c Cloudy"
01:21:52FromDiscord<Elegantbeef> Guess that should be `temp, unit, name`
01:23:03FromDiscord<Elegantbeef> I mean regex is of course fine when all you're doing is searching, but if parsing is involved I think strscans is just more appropriate
01:45:02*antranigv_ is now known as antranigv
02:18:28*antranigv is now known as antranigv_
02:19:08*antranigv_ is now known as antranigv
03:35:45*derpydoo quit (Ping timeout: 260 seconds)
04:31:56FromDiscord<Phil> I may need to take a dive into the dark arts again
04:31:59FromDiscord<Phil> untyped macros
04:32:52FromDiscord<Elegantbeef> Nah you don't need em
04:38:39FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
04:39:00FromDiscord<Phil> (edit)
04:39:33FromDiscord<Phil> Note, neither of the actor macros generate code, they just collect it in macrocaches that is used when the generateCode() macro is called
04:39:49FromDiscord<Phil> Or rather that's the goal, I haven't implemented that syntax yet
04:41:24FromDiscord<Phil> The problem is mostly that you can't use the type of another actor in your handler before the other actor is defined, so I kinda need to have non-sem-checked code be the input so that I can reshape the code from all the actor macro calls into one where first all the message types get defined, and then all the handlers
04:43:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
04:43:54FromDiscord<Phil> Anyway, the current approach feels less... "clean" from the mental model
04:45:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
04:46:09FromDiscord<Phil> That might actually work out way nicer
04:46:42FromDiscord<Phil> ... How the fuck did you not even dunk on me and somehow the problem still got solved
04:47:23FromDiscord<Elegantbeef> Lol
04:48:20FromDiscord<Phil> Props to michaelb btw., he made me take a look at pony and their syntax for actor inspired very much how I restructured my own way of doing this
04:50:15FromDiscord<Phil> Wait, can I even do that with the nested stuff like this?
04:51:28FromDiscord<Elegantbeef> 1 master macro that emits any more macros and converts the DSL to something else
04:51:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
04:51:52FromDiscord<Elegantbeef> Correct you need to change it from untyped to valid macro calls chained
04:52:16FromDiscord<Phil> So I'd need macros "messageTypes" and "handlers" ?
04:52:34FromDiscord<Elegantbeef> Not really
04:52:48FromDiscord<Elegantbeef> You call them anything and just unpack `messageTypes` and `handlers` to what you want
04:56:11FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
04:56:34FromDiscord<Elegantbeef> `typed` will expand all the code so not what you want likely
04:58:02FromDiscord<Phil> How so?
04:58:47FromDiscord<Phil> Ah you mean it'll expand macros which may cause problems
04:58:58FromDiscord<Phil> it'll expand macros used inside of handlers
04:59:26FromDiscord<Elegantbeef> `echo body.treeRepr` inside `actor`
04:59:54FromDiscord<Phil> That's one big tree
05:00:10FromDiscord<Elegantbeef> Is it empty?
05:00:38FromDiscord<Phil> No because I added "return body" to the "handlers" macro ^^
05:00:48FromDiscord<Phil> Which means it returns the handler-procs in a stmtlist
05:00:58FromDiscord<Phil> inside of actor I mean
05:01:15FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:05:28FromDiscord<Elegantbeef> The issue will be doesn't `messageTypes` introduce `Request` in the future?
05:05:44FromDiscord<Elegantbeef> IE when you run `generateCode`
05:05:48FromDiscord<Elegantbeef> The awfully named macro
05:06:16FromDiscord<Phil (he/him)> The inbox for naming suggestions is still open \:-D
05:06:40FromDiscord<Elegantbeef> well it's called actors so `action` is a grand name 😛
05:07:07FromDiscord<Phil (he/him)> As for Request, the only reason that section needs to even exist is to be able to generate an object variant out of all of them
05:07:31FromDiscord<Elegantbeef> Right but doesnt `actor` introduce `Request` in real code
05:08:14FromDiscord<Phil (he/him)> Define what you mean by real code.↵Code inside of a handler proc?↵Or a proc defined outside of actor that gets called by a handler proc?
05:08:26FromDiscord<Elegantbeef> I mean in a real application
05:08:40FromDiscord<Elegantbeef> What is the purpose of `messageTypes`?
05:09:31FromDiscord<Phil (he/him)> Allows me to generate an object variant to wrap data in and send through a Channel↵Where I promptly unwrap the object variant with a generated switch-case statement that calls the corresponding handler
05:10:25FromDiscord<Phil (he/him)> Other actors will also need to use `Request`, but that is why I jumped to types needing to be defined in a separate file\: They can import that file for usage
05:10:31FromDiscord<Elegantbeef> Right but why does that block exist?
05:14:14FromDiscord<Phil (he/him)> Honestly it doesn't have to, just the handlers could do it and I just analyze the type of the first parameter. But I like the explicitness of it
05:14:16FromDiscord<Elegantbeef> Arent the handlers always `msg: MessageType, hub: ChannelHub`
05:14:18FromDiscord<Elegantbeef> Ok
05:14:19FromDiscord<Elegantbeef> Seems like a source of error
05:14:21FromDiscord<Phil (he/him)> I mean we can definitely have a debate about whether that makes sense to have, imo having a section of "This is what I accept, below how I deal with each of these" seems nice
05:14:23FromDiscord<Phil (he/him)> And yeah, would be a potential source of compiletime errors if you add a type in messagetypes and forget to provide a handler for it (or have a handler for a not previously defined type)
05:14:24FromDiscord<Elegantbeef> I'd probably just do a proc macro and have `{.actor: X.}` like a numpty 😄
05:14:26FromDiscord<Elegantbeef> But anyway I'll shush
05:14:28FromDiscord<Elegantbeef> you do you and all you want
05:34:55FromDiscord<Phil> Hmm looking through it for more actor related libs to see if I'm reinventing the wheel.↵I'm spotting synthesis and syndicate-nim↵https://git.syndicate-lang.org/ehmry/syndicate-nim
05:35:41FromDiscord<Phil> And https://github.com/mratsim/Synthesis
05:41:42FromDiscord<Phil> ... While I appreciate that there are docs and that the repo of syndicate-nim and that the wording is trying to go for correctness↵> The Ref is something that we can observe and publish assertions at, and a Turn is special type for temporal scoping and transactional semantics.↵↵My eyes glazed over at half the sentence consisting of not-that-simple technical terms
05:42:13FromDiscord<Phil> (edit) "... While I appreciate that there are docs and that the repo of syndicate-nim ... and" added "exists"
05:44:09FromDiscord<Phil> I mean, I get it after breaking the sentence down for a hot minute, but that was not an easy sentence to digest
05:52:20FromDiscord<Elegantbeef> Remember you should dump a spoonful on your eyes to make the medicine go down
05:58:38FromDiscord<Phil> Okay I may be reinventing the wheel but at least I'll get the mental model of that wheel
06:00:27FromDiscord<Phil> I'm almost 100% certain that I'm not deep enough in the material to understand how it benefits me, but for what I want to achieve the syntax and mental model requested seems a bit much
06:05:15FromDiscord<michaelb.eth> In reply to @Elegantbeef "Remember you should dump": never put salt in your eyes
06:05:42FromDiscord<Elegantbeef> Anything is better than reading Phils messages
06:06:29FromDiscord<michaelb.eth> https://www.youtube.com/watch?v=_83MEuLoz9Y
06:18:25*rockcavera quit (Remote host closed the connection)
07:51:01FromDiscord<Phil> TFW I just innocently type messages and get slandered in return!
07:56:14*antranigv is now known as antranigv_
07:56:31*antranigv_ is now known as antranigv
07:58:31FromDiscord<Elegantbeef> You now what you did wrong
08:01:26*PMunch joined #nim
08:03:34FromDiscord<Phil> I don't this time in fact
08:04:30FromDiscord<Elegantbeef> Who are you??
08:04:39PMunchWho who
08:05:07FromDiscord<Elegantbeef> Oh yay the owls have awoken
08:05:11NimEventerNew thread by Duboak: Parallelism in Nim: trying to call proc with my argument, see https://forum.nim-lang.org/t/10796
08:05:29PMunchHaha
09:05:24*antranigv is now known as antranigv_
09:05:42*antranigv_ is now known as antranigv
09:10:27*antranigv is now known as antranigv_
09:10:51*antranigv_ is now known as antranigv
09:37:51*antranigv is now known as antranigv_
09:49:03*jmdaemon quit (Ping timeout: 256 seconds)
10:39:50PMunchDamn it.. walkDirRec with {pcDir} only return directories with no further directories in them
10:42:10madpropswalk_dir_rec
10:42:16madpropsoh
10:46:45*junaid_ joined #nim
10:54:03*antranigv_ is now known as antranigv
10:54:07*antranigv is now known as antranigv_
11:31:27*junaid_ quit (Remote host closed the connection)
12:24:24FromDiscord<gogolxdong666> Is there any way to reverse json array in Nim
12:29:02FromDiscord<Phil> In reply to @gogolxdong666 "Is there any way": Parse into nim array, invert, parse back to JSON?
12:29:09FromDiscord<Phil> Well, nim seq, not array
13:03:16FromDiscord<gogolxdong666> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:04:04FromDiscord<gogolxdong666> (edit)
13:04:41FromDiscord<gogolxdong666> (edit)
13:05:49FromDiscord<gogolxdong666> compared with `transactions[(page-1)pageSize..pagepageSize]`
13:25:06*rockcavera joined #nim
13:58:27PMunchwtf..
13:58:29PMunchThis is really weird
13:59:17PMunchI've got this code in my config.nims: https://paste.rs/Y4vsX.txt
13:59:52PMunchI can see it echo out all the folders just fine. But it fails because it can't find some header files and looking at the command it fails with not all the files that where listed out are present
13:59:55PMunchBut some of them are..
14:00:13PMunchSo `switch("passC", importDir)` only sometimes adds the statement..
14:13:33PMunchAnyone knows what's going on here?
14:15:38PMunchHmm, strange. Now I tried to pass it manually and it still doesn't take
14:28:07*azimut quit (Ping timeout: 240 seconds)
14:32:52FromDiscord<srabb> happy holidays everyone
14:32:59FromDiscord<Phil> I don't do anything with switches
14:33:10FromDiscord<Phil> ~~For good reason~~
14:33:44PMunchTry saying that to microcontroller programming..
14:33:57PMunch@srabb, happy holidays!
14:34:15FromDiscord<Phil> I mean I tend to be able to get around everything by having a bajillion nimble tasks and explicit exec statements
14:34:26FromDiscord<srabb> In reply to @PMunch "<@1111512879049490514>, happy holidays!": :)
14:34:38FromDiscord<Phil> In reply to @srabb "happy holidays everyone": Happy holidays, though its still a bit 😉
14:35:22FromDiscord<maker_of_mischief> What's the best way to store many strings at once for caching purposes?
14:35:55FromDiscord<maker_of_mischief> I'm trying to balance ease of use for me and memory use for user
14:36:51FromDiscord<Phil> Without having done any benchmarks or deeper analysis on the topic:↵Storing in a seq.↵Index access is afaik always the fastest thing
14:37:01FromDiscord<Phil> Regard the index on the seq as an "id" for the string
14:40:53PMunchRegarding memory use it would probably be some kind of in-memory LZ77
14:59:31PMunch@nnsee, now the JSON file system can create new files and folders! https://github.com/PMunch/libfuse-nim/
14:59:41PMunchCan currently actually be used to edit JSON with :P
15:00:45PMunchYou can get some input from a program, mount it as a filesystem, change it however you like (with some limitations) and on unmount it will print out the JSON to stdout
15:01:41PMunchThe limitations are basically that all values are tried to be parsed as JSON. So it's not possible to have a string key with the value 100 for example, that would be converted to an integer.
15:02:03PMunchAnd you can't write a non-numbered file to an array, and you have to write the files in order
15:02:23PMunchAnd there is no way to create empty arrays, all empty folders are empty objects
15:03:16*PMunch quit (Quit: Leaving)
15:05:33FromDiscord<Chronos [She/Her]> Python feels so odd to use now that I've been using Nim for ages
15:09:09FromDiscord<rakgew> when switching back, I am frequently missing ucs in python land.. \:-D
15:09:40FromDiscord<Clonkk> UCS and case insensitive are so good once you're used to it
15:10:05FromDiscord<rakgew> fully agree!
15:10:15FromDiscord<Chronos [She/Her]> In reply to @rakgew "when switching back, I": Same though
15:12:01FromDiscord<Chronos [She/Her]> In reply to @Clonkk "UCS and case insensitive": I can live without case insensitivity tbh, but it is nice to have
15:13:43FromDiscord<Chronos [She/Her]> UCS is very nice though
15:22:27FromDiscord<Clonkk> Yeah case insensitivity can be solved by a good auto completion on an IDE↵(@Chronos [She/Her])
15:26:06FromDiscord<Chronos [She/Her]> In reply to @Clonkk "Yeah case insensitivity can": Definitely
15:38:40*azimut joined #nim
15:45:41Amun-RaI often start writing in python with "proc main() ="
15:54:23*derpydoo joined #nim
15:58:42FromDiscord<odexine> Hey I mean it’s just a difference of a keyword and a character/operator
16:00:07*azimut quit (Ping timeout: 240 seconds)
16:01:18*azimut joined #nim
16:03:14Amun-Ramhm
16:18:23FromDiscord<Chronos [She/Her]> In reply to @odexine "Hey I mean it’s": I'm using classes
16:18:45FromDiscord<Chronos [She/Her]> And also I keep forgetting to not do `let`/`var`/`const` :P
16:19:01FromDiscord<Chronos [She/Her]> I'm also using explicit type annotations out of familiarity
16:24:18FromDiscord<odexine> In reply to @chronos.vitaqua "I'm using classes": I mean to Amun
16:25:50FromDiscord<Chronos [She/Her]> ah
16:27:42FromDiscord<Chronos [She/Her]> Honestly I heavily prefer & for concat instead of +, ngl
16:32:03FromDiscord<Phil> Hmmm what's a good nimnode that'll let me keep a symnode to a typedesc around but still compile
16:44:17FromDiscord<griffith1deadly> love new inline hints https://media.discordapp.net/attachments/371759389889003532/1187797769977598033/image.png?ex=659831e0&is=6585bce0&hm=be3c84c15a8b8729bde2d1eb7b014c363a07fcfe1dd291bbf12ffadc244b16e2&
16:44:22FromDiscord<Chronos [She/Her]> In reply to @isofruit "Hmmm what's a good": Elaborate? :p
16:46:21FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:46:40FromDiscord<Phil> to be typed
16:47:40FromDiscord<Chronos [She/Her]> Ah then I have no idea :p
16:50:59FromDiscord<piqueiras> you know you're doing weird stuff when "generic methods are deprecated [Deprecated]"
16:52:43FromDiscord<piqueiras> cause if i have a class Father with subclasses Child1,Child2,Child3 with some different attributes
16:52:53FromDiscord<piqueiras> i gotta do a cmp for each combination??
17:00:04FromDiscord<Phil> Going untyped may just be easier =/
17:03:27FromDiscord<piqueiras> xD
17:03:43FromDiscord<piqueiras> with which approach
17:03:53FromDiscord<Phil> Ah sorry, was that stating more regarding my own problem
17:04:01FromDiscord<Phil> I was stating that
17:04:17FromDiscord<Phil> Yours would be one where I'd look into not using inheritance and rather object variants tbh
17:04:49FromDiscord<Phil> Basically the non-inheritance way.↵If that's not an option I'd like into generating the methods via macro with quote-do
17:05:13FromDiscord<Phil> or rather genAst since that's supposedly better 😄
17:07:02FromDiscord<piqueiras> huh
17:07:06FromDiscord<piqueiras> hows object variants
17:07:28FromDiscord<piqueiras> i mean im doing AoC trying to add some weird language stuff every day dont mind inefficiency or so
17:08:14FromDiscord<piqueiras> In reply to @piqueiras "hows object variants": oooh
17:08:28FromDiscord<Phil> I mean, for splitting out scenario-subtypes with their own logic inheritance uses methods and knowing the subclass at runtime, object variants use gigantic switch-cases which are definitely more verbose
17:08:36FromDiscord<piqueiras> ooooh https://media.discordapp.net/attachments/371759389889003532/1187803891128074340/image.png?ex=65983793&is=6585c293&hm=885ba02f9d3f1e33ca2d33888b08e4101fd407ba0438ddbe398ab4ac8c5be7f4&
17:10:13FromDiscord<piqueiras> cause this does some.. weird things https://media.discordapp.net/attachments/371759389889003532/1187804298701189140/image.png?ex=659837f5&is=6585c2f5&hm=3e1f29240555116124bc88d9783aed71b104ec9f38f15dff7d6f5bbb3f8b7fa6&
17:19:57FromDiscord<piqueiras> why does it not magically work
17:21:27FromDiscord<piqueiras> https://media.discordapp.net/attachments/371759389889003532/1187807123443290132/image.png?ex=65983a96&is=6585c596&hm=624ec559e84391092adb51953bfb2d1551b3b5a4e4bdf8a4f511cb4cb0209730&
17:34:13FromDiscord<alohaer> I don’t know your familiarity with nim but I think you need to pass a compiler flag. —multimethods:on or close to
17:35:28FromDiscord<piqueiras> huh
17:44:28FromDiscord<piqueiras> okay i think it works
17:59:45FromDiscord<odexine> Multi methods are deprecated in Nim
17:59:52FromDiscord<odexine> IIRC
18:02:58FromDiscord<piqueiras> yea
18:03:05FromDiscord<piqueiras> since like 0.20
18:03:22FromDiscord<piqueiras> i should not be doing this but its working
18:04:03FromDiscord<piqueiras> it just crossed my mind that instead of tuple with x,y,z:Slice[int] I could have fun with inheritance
18:09:39*antranigv_ is now known as antranigv
18:13:57Amun-RaI've not used method even once yet
18:40:35FromDiscord<albassort> kinda makes me sad that the language i know most about is a language my job interviewers go "so you wrote that in uh... Nim?"
18:41:08FromDiscord<albassort> "can you do that in c"#
18:41:10FromDiscord<albassort> (edit) "c"#" => "c3""
18:41:13FromDiscord<albassort> (edit) "c3"" => "c<#null>"
18:41:19FromDiscord<albassort> (edit) "c<#null>" => "d#>"
18:41:23FromDiscord<albassort> (edit) "d#>" => "C<#null>"
18:41:26FromDiscord<albassort> ??????
18:41:46FromDiscord<albassort> (edit) "C<#null>" => "C.#"
18:42:14FromDiscord<albassort> you cant write csharp anyore
18:42:18FromDiscord<albassort> (edit) "anyore" => "anymore"
18:46:51*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
18:49:58*Lord_Nightmare joined #nim
19:12:00FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
19:12:09FromDiscord<Phil> (edit)
19:12:56FromDiscord<Phil> Also maybe rename actor to threadServer
19:16:37FromDiscord<odexine> therver
19:17:02FromDiscord<Phil> I mean, it's called threadbutler.↵Could call it "butler"
19:17:07FromDiscord<Phil> But I doubt that makes sense for anyone
19:17:50FromDiscord<odexine> threaver
19:18:27FromDiscord<odexine> threadler
19:18:44FromDiscord<odexine> thrutler
19:20:46FromDiscord<maker_of_mischief> sent a code paste, see https://play.nim-lang.org/#ix=html>
19:21:26FromDiscord<Phil> I mean you, you get a future back right?
19:21:29FromDiscord<Phil> Can check future.finished
19:21:30FromDiscord<maker_of_mischief> yeah
19:21:31FromDiscord<maker_of_mischief> oh
19:21:46FromDiscord<Phil> That's how `waitFor` works
19:22:13FromDiscord<Phil> That while-loops against future.finished, polling against the async-dispatcher over and over again
19:22:17FromDiscord<odexine> There’s a lot of ways to express what you want
19:22:24FromDiscord<Phil> (edit) "That" => "That's a"
19:22:35FromDiscord<Phil> (edit) "That's a while-loops against future.finished, polling against the async-dispatcher over and over again ... " added "until future.finished is true"
19:23:53FromDiscord<maker_of_mischief> sent a code paste, see https://play.nim-lang.org/#ix=html>
19:24:02FromDiscord<odexine> No
19:24:04FromDiscord<maker_of_mischief> (edit)
19:24:25FromDiscord<Phil> Got to put poll in that loop as well
19:24:36FromDiscord<odexine> No
19:24:44FromDiscord<Phil> What, yes? Literally waitfor
19:24:55FromDiscord<maker_of_mischief> what im doing is running a TUI and getting key inputs in that loop
19:25:18FromDiscord<odexine> packetFut = ws.receivePacket()↵while not packetFut.finished:↵ ...↵packet = await packetFut
19:25:29FromDiscord<maker_of_mischief> In reply to @odexine "packetFut = ws.receivePacket() while": thanks
19:25:30FromDiscord<Phil> Ahh, missed the await at the start
19:25:49FromDiscord<odexine> Add lets or vars as appropriate
19:26:00FromDiscord<Phil> But you still have to poll otherwise your future is never getting worked on, no?
19:26:07FromDiscord<maker_of_mischief> yeah
19:26:09FromDiscord<odexine> Plus you need to await in the loop
19:26:22FromDiscord<Phil> It ain't going to set itself to finished
19:26:47FromDiscord<odexine> In reply to @isofruit "It ain't going to": It will if you give the dispatcher back control... By yielding/awaiting
19:27:25FromDiscord<maker_of_mischief> sent a code paste, see https://play.nim-lang.org/#ix=html>
19:27:26FromDiscord<odexine> A simple await sleepAsync(some time) would work
19:27:31FromDiscord<maker_of_mischief> (edit)
19:27:40FromDiscord<maker_of_mischief> (edit)
19:28:20FromDiscord<odexine> In reply to @isofruit "But you still have": I would recommend never polling when in an async proc, pretty much dont need to ever if my assumptions are correct
19:28:22FromDiscord<Phil> That requires an async proc
19:28:44FromDiscord<odexine> Yes, and since theres already an await it is safe to assume that …
19:28:46FromDiscord<Phil> In reply to @odexine "I would recommend never": I mean I agree, but there was no mention he's in an async proc
19:29:25FromDiscord<Phil> I mean, are you @maker_of_mischief ? In an async proc I mean
19:29:27FromDiscord<maker_of_mischief> In reply to @isofruit "I mean I agree,": i am
19:30:08FromDiscord<Phil> In that case await is the way to go, the caller of the proc will need to take care of doing the async-dispatcher work somehow
19:30:28FromDiscord<odexine> Easiest is just to wait for, or run forever
19:30:33FromDiscord<odexine> Depending on what you want to do
19:30:45FromDiscord<odexine> I’ve virtually never needed to run poll manually
19:33:34FromDiscord<odexine> I have to sleep now, good bye
19:41:41FromDiscord<_goel_> How do you get the memory adress of a pointer? Using with `echo repr p` just shows `ptr x`↵I mean the usual visual rapresentation like in C++ `0xc000018030`
19:42:25FromDiscord<_goel_> (edit) "x`↵I" => "p`↵I"
19:43:13FromDiscord<Phil> Honestly I typically just cast to uint64, for the classic representation you'll likely need to transform that uint64 a bit
19:43:33FromDiscord<Phil> Or cast maybe to 8 bytes and encode in hex?
19:43:40FromDiscord<_goel_> I'll try
19:48:13NimEventerNew thread by CardealRusso: Binaries does not correctly display dependencies, see https://forum.nim-lang.org/t/10798
20:03:05FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=html>
20:03:25FromDiscord<albassort> What is an actor.
20:03:51FromDiscord<albassort> Is this a 2.0 thing
20:04:03FromDiscord<Phil> Essentially a single thread with a while loop inside of which it fetches and processes messages from a channel and runs its own async loop
20:04:06FromDiscord<Phil> Nope
20:04:24FromDiscord<Phil> Custom DSL on my end that I'm working on
20:04:37FromDiscord<Phil> Well, "DSL"
20:04:44FromDiscord<albassort> Ah that sounds useful you should publish that
20:05:16FromDiscord<albassort> Infact I think I can use that for mouse code
20:05:17FromDiscord<Phil> It's pretty much mid-work.↵I have the general concept down, just trying to figure out the frontend to be in a manner that I like
20:05:42FromDiscord<albassort> Code that monitors the mouse independently, in my IME.
20:06:30FromDiscord<Phil> Pretty much have got a first pre-alpha version including docs and nimibook docs and 5-6 examples, I'm in the process of overhauling its current syntax and adding support for tasks so you can inside of a thread just spawn a new thread and have it send you a message back with its results when its done
20:06:31FromDiscord<albassort> I think its just a loop that connects to xcb that sets a bool n the shared heap
20:06:44FromDiscord<albassort> (edit) "bool" => "type" | "typen the shared heap ... " added "for every click"
20:07:03FromDiscord<albassort> I could use that and remove the shared value and make it safer
20:07:16FromDiscord<albassort> For example.
20:07:43FromDiscord<Phil> Basically give me a couple weeks to polish it to not be hot garbage
20:09:10FromDiscord<Phil> Particularly since nothing of it is tested yet
20:09:24FromDiscord<Phil> Just functional examples
20:55:24FromDiscord<Phil> Man I need a good metaphor.↵Like, naming these things threadservers, you then define threadservers, prepare them and then you can init and run them.↵In terms of metaphor for wording that's... I mean it's workable, but not particularly great or memorable or intuitive
20:55:33FromDiscord<Phil> Namings things is hard
20:56:16FromDiscord<Phil> (edit) "Namings" => "Naming"
20:59:04FromDiscord<0ffh> In reply to @isofruit "Naming things is hard": The second of the two hard things, iirc.
20:59:37FromDiscord<Phil (he/him)> I know the quote but forgot what the other thing was
20:59:46FromDiscord<Phil (he/him)> I'mma just bet on concurrency since that's hard as balls
21:00:14FromDiscord<0ffh> In reply to @Phil (he/him) "I know the quote": The two things are cache invalidation, naming things, and off-by-one errors.
21:01:08FromDiscord<0ffh> (Though the last one is a jokular later addition...)
21:24:26FromDiscord<nnsee> In reply to @PMunch "<@961485620075720734>, now the JSON": very nice!
21:25:22FromDiscord<nnsee> In reply to @maker_of_mischief "i am": yo, is that a goddamn i n t e r f a c e reference
21:25:39FromDiscord<maker_of_mischief> In reply to @nnsee "yo, is that a": hell yeah
21:25:46FromDiscord<maker_of_mischief> another fellow interface fan
21:26:10FromDiscord<nnsee> interface was really good. i like all of umami's stuff
21:26:38FromDiscord<maker_of_mischief> hard for for humanity was really good
21:26:39FromDiscord<nnsee> have been following him since lmao the mcdonalds clown car video
21:26:50*koperak joined #nim
21:26:50FromDiscord<maker_of_mischief> (edit) "for" => "fork"
21:27:28FromDiscord<maker_of_mischief> he even got picked up by adult swim for some stuff
21:28:55FromDiscord<maker_of_mischief> Is there a method to poll if a Future is finished?
21:32:15FromDiscord<Phil> Poll (either by calling directly or through stuff that calls it like waitfor) is the thing that finishes the future, so kinda no 😄↵You can reduce the time given to block though.
21:33:25FromDiscord<Phil> Note that you you're likely better off using waitfor or similar.↵Poll is mostly useful if you need to set up your own event loop for an entire thread
21:36:09FromDiscord<systemonia> Been thinking quite a lot about this issue https://github.com/nim-lang/Nim/issues/23058 and the best way to solve it. The easiest way would be to define a `remoteInstall` boolean when installing anything non-local and to just check for its existence (or lack thereof)
21:36:26FromDiscord<systemonia> The only thing stopping me is that the nimble test suite is giving me an error about lock files.
21:37:02FromDiscord<systemonia> I wanna fix that ideally before I submit my PR to the nimble repo.
21:46:17FromDiscord<Phil> In reply to @pengwyns "Been thinking quite a": I feel like this issue is kinda missing a section explaining the benefit
21:47:33FromDiscord<systemonia> Im not sure either, I can only speculate. But this looked easy to implement.
21:47:44FromDiscord<systemonia> And I want to close down one more issue
21:48:05FromDiscord<Phil> Not that it's not valid, just before proposing something you typically first have a pitch to sell them on it😄
21:48:38FromDiscord<Phil> Fair
21:48:42FromDiscord<Phil> Hm
21:49:11FromDiscord<systemonia> Im gonna ask them about it, I hope its something worth working on and not just a thing that can be solved easily.
21:58:20*koperak quit (Remote host closed the connection)
22:06:30*koperak joined #nim
22:08:14*koperak quit (Remote host closed the connection)
22:35:40FromDiscord<Phil> Man, I wonder why my async proc doesn't properly work on my client thead, and why awaiting is eternally blocking
22:36:09FromDiscord<Phil> Right up until realizing that I'm working in an example where the client has a custom-loop for which I did not include a poll-call which would make async functional
22:58:00*tiorock joined #nim
22:58:00*tiorock quit (Changing host)
22:58:00*tiorock joined #nim
22:58:00*rockcavera is now known as Guest9372
22:58:00*Guest9372 quit (Killed (cadmium.libera.chat (Nickname regained by services)))
22:58:00*tiorock is now known as rockcavera
23:01:49*derpydoo quit (Ping timeout: 256 seconds)