<< 12-01-2024 >>

00:02:07*azimut quit (Ping timeout: 240 seconds)
00:04:30*azimut joined #nim
00:39:39NimEventerNew question by Griffort: Is it possible to globally modify the AST in Nim?, see https://stackoverflow.com/questions/77803775/is-it-possible-to-globally-modify-the-ast-in-nim
00:42:41*jmdaemon quit (Ping timeout: 252 seconds)
00:59:00FromDiscord<girvo> In reply to @kiloneie "from what i've seen": Not that well in my experience
00:59:12FromDiscord<girvo> It'll work in some cases, but crashes were frequent and frustrating
01:01:59FromDiscord<ca_lobo_14153> can anyone explain why Nim does not get installed in the normal Linux locations, but apparently wants to reside in the ~/.nimble folder in your home directory with ~/.nimble/nim/bin being added to the your path?
01:02:17FromDiscord<ca_lobo_14153> This strategy confuses me....
01:02:40FromDiscord<girvo> Because most systems work that way unless you're installing them through a package manager?
01:05:12FromDiscord<girvo> You can of course symlink them into /usr/local/bin (or your distros equivalent) if youd like 🙂
01:05:25FromDiscord<girvo> I swear there's a `koch` command that does exactly that
01:52:34FromDiscord<girvo> sent a code paste, see https://paste.rs/BrHqK
01:53:19FromDiscord<girvo> sent a code paste, see https://paste.rs/MJIMB
01:55:14FromDiscord<leorize> they're only used for consts
01:55:40FromDiscord<leorize> N\_LIB\_PRIVATE should hide the symbols none the less
01:55:41FromDiscord<Elegantbeef> `{.codegendecl.}` is your friend likely
02:20:40FromDiscord<girvo> In reply to @Elegantbeef "`{.codegendecl.}` is your friend": Yeah I think it's the way to go for this one
02:20:58FromDiscord<girvo> Probably worth a macro/pragma
02:22:14FromDiscord<Elegantbeef> Sadly you cannot export pragmas
02:22:18FromDiscord<Elegantbeef> So would have to be a macro
02:22:52FromDiscord<Elegantbeef> But a `{.pragma: staticDecl, codegenDecl:"...}` would suffice
02:23:41FromDiscord<hugop707> In reply to @Elegantbeef "Sadly you cannot export": include enters the chat
02:25:03FromDiscord<girvo> In reply to @Elegantbeef "So would have to": indeed, thats how I've done it for some other ones
02:25:56FromDiscord<girvo> etc.
02:26:01FromDiscord<Elegantbeef> Using include is a toxic action and will result in me not responding to you
02:26:13FromDiscord<Elegantbeef> That macro will break in 2.0!
02:26:24FromDiscord<girvo> Oh will it?
02:26:35FromDiscord<girvo> One day I'll go read the breaking change list
02:28:02FromDiscord<girvo> sent a code paste, see https://paste.rs/8KIoB
02:28:32FromDiscord<Elegantbeef> var macros turned into just `typed` iirc
02:30:28FromDiscord<Elegantbeef> This fixed them to work on var sections with more than one variable and even different pragmas on different variables iirc
02:30:45FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/version-2-0/lib/std/decls.nim#L5 my reference for how it's done in 2.0
02:31:27FromDiscord<girvo> Ah okay sweet 🙂
02:31:31FromDiscord<girvo> Thanks!
03:11:52*jmdaemon joined #nim
04:08:27termerIs it possible to overload the assignment operator in Nim
04:08:50termersuppose I have var thing = MyType()
04:09:07termercan I make thing = stuff do something custom
04:11:32FromDiscord<Elegantbeef> Nope
04:11:39FromDiscord<Elegantbeef> Generally people just make a `:=` or use a \`converter
04:11:44FromDiscord<Elegantbeef> The last is dirty though
04:12:03termerConverter could work
04:12:17termerI'm seeing if I can make Nim dynamic for fun
04:12:35termerDoing this after rereading the dot overload experimental docs
04:13:25termerNext, is it possible to have a ref of an unknown type
04:13:49termerbasically a managed void*
04:13:55termerI've forgotten a lot of stuff
04:14:16FromDiscord<Elegantbeef> Only if you inherit from `RootObj`
04:14:33termerThat works
04:14:53FromDiscord<Elegantbeef> https://github.com/beef331/traitor/blob/simpler-traits/traitor.nim#L26-L30 is a nice idiom
04:17:19*azimut quit (Ping timeout: 240 seconds)
04:34:28*rockcavera quit (Remote host closed the connection)
04:47:05FromDiscord<maker_of_mischief> is there a string length reader that doesnt use the bytes so it works with comparing the lengths of unicode strings and normal ones?
04:47:12FromDiscord<maker_of_mischief> (edit) "reader" => "proc"
04:48:54FromDiscord<Elegantbeef> `std/unicode` has utf8 supporting code
04:49:25FromDiscord<Elegantbeef> Remember that `[]` and `runelen` are `O(1)` though
04:49:38FromDiscord<Elegantbeef> are not `O(1)`
04:50:10FromDiscord<Elegantbeef> Damn it I'm not equipped for this `runeAt` and `runeLen` are not `O(1)`
04:50:11FromDiscord<Elegantbeef> There we go
04:50:17FromDiscord<Elegantbeef> A full sentence that makes sense
05:25:32*xet7 quit (Remote host closed the connection)
05:26:35FromDiscord<.bobbbob> Im using prolouge with nim, Im using session keys and have a route that sets the cookie based on a query string, then redirects it to another page that does something depending on that cookie. This works perfectly on firefox, but for some reason on chromium and qtwebengine it works sometimes but very unreliably. anyone have any idea why?
06:25:33FromDiscord<nnsee> In reply to @ca_lobo_14153 "can anyone explain why": /bin et al should only have binaries managed by your package manager. If you use your package manager to install Nim instead of choosenim, it will more than likely get installed in /use/bin
06:26:14FromDiscord<nnsee> having your install script or toolchain manager drop binaries into /usr/bin directly is very bad practice
06:26:52FromDiscord<nnsee> as Girvo said, most userland toolchain managers work this way
06:27:05FromDiscord<nnsee> (edit) "/use/bin" => "/usr/bin"
06:27:38FromDiscord<arathanis> sent a code paste, see https://paste.rs/KboQL
06:28:34termerI did it, I made a dynamic type with JS heuristics
06:28:45termerthis is hilarious
06:29:29termeryou can assign it to anything, there are converters for the types it can hold, there are logic operators, etc
06:29:50FromDiscord<nnsee> In reply to @nnsee "/bin et al should": for example, expand the file list here: https://archlinux.org/packages/extra/x86_64/nim/
06:29:51FromDiscord<Robyn [She/Her]> Burn the witch!
06:29:56termereven has truthiness
06:30:18FromDiscord<Robyn [She/Her]> What is the point of that anyway
06:30:29termerto see if I could do it
06:30:39termerstill needs arbitrary propertied and procs though
06:30:50termerNot sure how I could do dynamic proc calls
06:31:19termerwould need some sort of macro to wrap procs in a runtime arg type checker
06:37:42FromDiscord<Robyn [She/Her]> Dot overloads?
06:38:43FromDiscord<Robyn [She/Her]> In reply to @termer "Not sure how I": Oh wait you might like the `()` overloading
06:38:58termerI know about that
06:38:58FromDiscord<Robyn [She/Her]> `Error: the overloaded () operator has to be enabled with {.experimental: "callOperator".}`
06:39:18termerbut the signature would need to be vararg[auto]
06:39:26FromDiscord<Robyn [She/Her]> Ah
06:39:35termerthen it would need to use a macro to generate a type guard
06:39:51FromDiscord<Robyn [She/Her]> I like your funny words magic man
06:40:33termerIt seems totally possible to do this, but I think this silliness has gone on too long
06:43:13FromDiscord<Robyn [She/Her]> Yeah that's fair, what's your code so far, out of curiosity?
06:43:40termerNot on the computer I'm typing this from
06:43:52FromDiscord<Robyn [She/Her]> Fair
06:43:55termerbut it's about 270 lines of crap
06:44:05termerlots and lots of when and case
06:44:19termerand auto
06:44:23FromDiscord<nimmy_1> the bot can talk :NAHWHAT:
06:44:29termerwhat
06:45:08FromDiscord<nimmy_1> never mind it
06:45:30termerOne mistake in my code is DynType can hold a ref DynType
06:45:39termerthat shouldn't be supported
06:46:03termerthat was because I wanted to have types that inherit from it to support maplike objects and proc objects
06:46:11termerbut those should be rolled into the type itself
06:48:23FromDiscord<Robyn [She/Her]> In reply to @nimmy_1 "never mind it": It's a bridge to IRC and Matrix
06:48:36FromDiscord<Robyn [She/Her]> In reply to @termer "but those should be": Fair
06:48:45FromDiscord<Robyn [She/Her]> In reply to @termer "One mistake in my": What if it's referencing itself though
06:48:55FromDiscord<nimmy_1> ic ic
07:05:39*baalajimaestro joined #nim
07:40:13termerIf it's referencing itself, it shouldn't
07:40:30termerJust found a compiler bug
07:45:40termervar val: DynVal = 10
07:46:01termervar coolString: DynVal = "COOL"
07:46:11*advesperacit joined #nim
07:46:36termerval = val.replace("1", "2") + 10
07:46:51termerval &= "lol"
07:47:12termerval &= 10 & coolString & "lol"
07:47:15termerecho val
07:47:27termerThis compiles
07:47:35termerInsane
07:48:04termerall these converters ruin type safety LOL
07:48:22termerecho "5" * 10
07:48:25termercompiles
08:11:18Amun-Raconverters are useful for internal use with distinct types
08:11:48Amun-Ratwo much converters and you end up with nim behaving like js… ;)
08:40:47*redj quit (Remote host closed the connection)
08:42:09*redj joined #nim
08:54:27*redj quit (Remote host closed the connection)
08:55:57*xet7 joined #nim
08:57:09*redj joined #nim
09:35:43termerThat's the plan
09:35:47termerand it ended up working like that
09:36:05termerexcept I'm hitting some compiler bugs
10:28:40FromDiscord<bigmanzmanz> Made myself a payload launcher in nim, pretter proud.
10:28:54FromDiscord<bigmanzmanz> (edit) "pretter" => "prettey"
10:28:59FromDiscord<bigmanzmanz> (edit) "prettey" => "pretey"
10:29:04FromDiscord<bigmanzmanz> (edit) "pretey" => "pretty"
10:29:11FromDiscord<Phil> Out of curiosity, what do you mean by "payload launcher" ?
10:31:21termeris this malware
10:31:28FromDiscord<bigmanzmanz> No
10:32:04FromDiscord<bigmanzmanz> Its a way to distribute code for pentesting
10:32:42FromDiscord<Phil> But more like "what is the payload" e.g.
10:32:47FromDiscord<bigmanzmanz> Most malware would be in Golang
10:33:18FromDiscord<bigmanzmanz> In reply to @isofruit "But more like "what": idk
10:33:26FromDiscord<bigmanzmanz> Its a payload launcher
10:33:34FromDiscord<bigmanzmanz> like metasploit
10:33:40FromDiscord<bigmanzmanz> But less advanced
10:33:49baalajimaestroNot in nim?
10:34:00FromDiscord<bigmanzmanz> Its in nim
10:34:21FromDiscord<bigmanzmanz> Had to make one for my course
10:43:43FromDiscord<odexine> In reply to @bigmanzmanz "Most malware would be": Why?
10:44:06FromDiscord<odexine> Just curious
10:45:27termerHere's for anyone who wants to see my dynamic typing implementation https://git.termer.net/termer/nim-dynval
10:51:04Amun-Rais var x: DynVal = 10; x == "10" true?
10:52:15Amun-Radynamic typing combined with weak typing is evil
10:57:56NimEventerNew thread by termer: Dynamic Typing in Nim, see https://forum.nim-lang.org/t/10867
10:58:40FromDiscord<Phil> In reply to @Amun-Ra "dynamic typing combined with": "This thing is evil, it is very bad and gives pain to everyone that touches it"
10:58:48FromDiscord<Phil> "I must publish this and tell the world"
10:59:16FromDiscord<pengwyns> Is there a way to work around CStringConv warnings? Like, what is the proper way to convert from cstrings?
10:59:20termerAmun-Ra I added all the funny type coercion you see in JS
10:59:25termerNot all, but a lot
10:59:28termerit makes it way funnier
10:59:31FromDiscord<Phil> Fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
10:59:49FromDiscord<Phil> I work in that shit, I have enough of that pain over there, I don't need it in nim
10:59:51FromDiscord<Phil> You sadist!
11:00:03Amun-RaI have no problem with strong dynamic typing, but weak makes the world worse (see php and js) ;)
11:00:07termerI hate JS nonsense but my hate for it turned into an obsession
11:00:19termerand then I see how far I can get making things worse for Nim
11:00:31Amun-Rahand up who remembers js/php truthy table ;)
11:00:34termerthe best part is the fact that by simply importing the module, you lose a lot of strong typing
11:00:45termerI actually remember the truthy table in JS
11:00:55termerand all the implicit primitive conversions
11:00:59termerand array conversions
11:01:18Amun-Ralike this one? https://dorey.github.io/JavaScript-Equality-Table/
11:01:19termerIn PHP, I don't know it as well but I do know it
11:01:49termerAmun-Ra I know all those, yes
11:02:00Amun-Ra:/
11:02:01termerthere are also more obscure things, like ??
11:02:13FromDiscord<pengwyns> Im not sure if i should try to modernize the nimforum codebase or start from scratch.
11:02:13termerNaN ?? 'lol' won't yield 'lol'
11:02:22termerbut NaN || 'lol' will yield 'lol'
11:02:41termerdon't forget number conversions
11:03:05termeror that ['5'] * 10 is 50
11:03:46Amun-Ra!![]+!![]
11:03:53termer2
11:04:56termerbut try out !!+[] * ['']
11:05:52termerThere are even more fun things, like differences between JS environments
11:06:07termertypeof setTimeout(() => {}, 0) is 'number' in the browser, but 'object' in Node.js
11:07:13termerpengwyns What are you trying to do
11:08:59NimEventerNew thread by drkameleon: A custom '=destroy' hook which takes a 'var T' parameter is deprecated, see https://forum.nim-lang.org/t/10868
11:10:00FromDiscord<pengwyns> Just trying to get nimforum to build without errors or warnings.
11:10:23FromDiscord<pengwyns> And with the latest packages instead of specific commits
11:11:59*jmdaemon quit (Ping timeout: 260 seconds)
12:21:48FromDiscord<nnsee> In reply to @bigmanzmanz "Made myself a payload": what is a "payload launcher"? how does it "launch" payloads?
12:42:29*azimut joined #nim
12:50:19FromDiscord<ambient3332> sent a code paste, see https://paste.rs/lk9uN
12:51:04*azimut quit (Quit: ZNC - https://znc.in)
12:51:51*azimut joined #nim
12:53:17FromDiscord<ambient3332> (edit) "https://paste.rs/rqayZ" => "https://paste.rs/6Ybyw"
12:53:24FromDiscord<ambient3332> (edit) "https://paste.rs/AkzDp" => "https://paste.rs/IslHi"
12:58:30*rockcavera joined #nim
13:02:05*rockcavera quit (Read error: Connection reset by peer)
13:02:52*rockcavera joined #nim
13:02:54termerDoes anyone (Elegantbeef) know whether I can get information about a proc's signature from a macro?
13:02:57FromDiscord<odexine> What is the variable size object supposed to be
13:03:05termerI need to get its arguments and return type
13:05:49FromDiscord<djazz> What if two procs have same name? 🤔
13:06:04termerjust need to get one passed into the macro by name
13:06:09termerhttps://stackoverflow.com/questions/76841073/how-to-get-all-fields-of-an-object-type-mytype-in-a-macro-from-a-nimnode-ident
13:06:12termerthis looks like it's what I need
13:06:16termerat least partially
13:06:27termeractually you're right, it could be overloaded
13:06:37termerI dunno, not too worried about that
13:07:40FromDiscord<demotomohiro> @termer iirc, macro parameter type must be typed.↵And call getImpl or other similar name procs in macro module.
13:08:05termerThanks
13:10:51FromDiscord<demotomohiro> In reply to @djazz "What if two procs": https://forum.nim-lang.org/t/8369
13:26:58*azimut quit (Remote host closed the connection)
13:28:28*azimut joined #nim
13:52:31*azimut quit (Ping timeout: 240 seconds)
13:53:10FromDiscord<maker_of_mischief> is there a method to make a type in nim where if you access the variable it just returns the number
13:53:21FromDiscord<maker_of_mischief> instead of neexing to just do var.x or something
13:53:26FromDiscord<maker_of_mischief> (edit) "neexing" => "neexdng"
13:53:30FromDiscord<maker_of_mischief> (edit) "neexdng" => "needing"
13:53:41FromDiscord<khazakar> Enums?
13:55:32FromDiscord<maker_of_mischief> I mean like I'm trying to make a calculator
13:55:50FromDiscord<maker_of_mischief> and i want to be able to make a degree type
13:56:21FromDiscord<Phil> So... echo x.field?
13:56:36FromDiscord<Phil> Define a `$` and that will work
13:58:31FromDiscord<maker_of_mischief> sent a code paste, see https://paste.rs/L7Qru
13:58:47FromDiscord<Phil> Or if you want the assignment to work without the degree, then you can use a converter
13:59:00FromDiscord<maker_of_mischief> oh wow
13:59:02FromDiscord<maker_of_mischief> i forgot
13:59:04FromDiscord<Phil> But note that this will reduce type safety for you because every int may not also be assigned to a Degree variable and it'll be implicitly converted
13:59:12FromDiscord<maker_of_mischief> i can redifine literally everything using backticks
13:59:15FromDiscord<maker_of_mischief> i am stupid
14:00:28FromDiscord<Phil> sent a code paste, see https://paste.rs/UwvLF
14:00:43FromDiscord<Phil> In reply to @maker_of_mischief "i am stupid": Don't worry, programming for everyone feels that way
14:01:36FromDiscord<Phil> sent a code paste, see https://paste.rs/KZfId
14:02:19FromDiscord<Phil> sent a code paste, see https://paste.rs/E7As3
14:13:01FromDiscord<nnsee> nim playground is down
14:17:09FromDiscord<Phil> huh, odd, the harddrive isn't even remotely full
14:18:19FromDiscord<Phil> Rebooting
14:48:13FromDiscord<Phil> Yep, its running
14:48:21FromDiscord<Phil> In reply to @nnsee "nim playground is down": pinging you
15:03:32*azimut joined #nim
15:06:32*azimut quit (Remote host closed the connection)
15:06:59*azimut joined #nim
15:41:26FromDiscord<srabb> how do i check all of the other channels on element
15:41:39FromDiscord<srabb> or matrix or whatever you wanna call it
15:55:23FromDiscord<Phil> By check you mean entering them?
16:09:11FromDiscord<srabb> yeah
16:18:37FromDiscord<Phil (he/him)> Hmm, there's a matrix space somewhere, leorize linked it a couple days ago I could go looking for that.↵Other than that, nim channels typically just have the nim-prefix.↵So just look for rooms called "nim".↵E.g. Nim offtopic, Nim Web Development etc.
16:18:52FromDiscord<leorize> #nim\:envs.net
16:19:03FromDiscord<Phil (he/him)> The man is faster than I ever could hope to be
16:19:12FromDiscord<Phil (he/him)> Given this keeps coming up, I'll put it in my notes
16:19:50FromDiscord<leorize> isn't this one linked pretty much everywhere?
16:20:05FromDiscord<Phil (he/him)> I struggle to find the link every time
16:20:22FromDiscord<Phil (he/him)> And it's in none of the room descriptions that I just checked
16:20:31FromDiscord<leorize> it's in the repo readme
16:21:04FromDiscord<leorize> on the homepage too
16:21:12FromDiscord<Phil (he/him)> image.png https://media.discordapp.net/attachments/371759389889003532/1195402107419889734/image.png?ex=65b3dbf7&is=65a166f7&hm=9d4301b168e4b01f0d29f1394b567cf5513017349ab452dd9d6fcc8c7e20a736&
16:21:14FromDiscord<Phil (he/him)> Ah, there we have it
16:21:17FromDiscord<Phil (he/him)> Still, best in notes
16:21:32FromDiscord<leorize> but not in the community tab
16:21:39FromDiscord<leorize> they should really fix this \:p
16:29:01FromDiscord<maker_of_mischief> is there a way to made a distinct integer type modify itself upon assignment?
16:29:45FromDiscord<maker_of_mischief> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:29:45FromDiscord<Phil> As in, if you assign an integer type to a variable sth should happen?
16:30:00FromDiscord<Phil> You could encode that into the converter
16:32:51FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:33:34FromDiscord<maker_of_mischief> wow
16:33:40FromDiscord<maker_of_mischief> is there documentation for converters?
16:33:42FromDiscord<Phil> This assumes that x > -360, for larger negative numbers you'll likely need to first make X somehow smaller
16:34:03FromDiscord<maker_of_mischief> all i see is 4 lines of code on nim-lang
16:34:06FromDiscord<maker_of_mischief> (edit) "nim-lang" => "nim-lang.org"
16:34:13FromDiscord<Phil> Yep, in the manual of everything
16:34:19FromDiscord<Phil> One sec
16:34:28FromDiscord<Phil> https://nim-lang.org/docs/manual.html#converters
16:34:39FromDiscord<Phil> Converters really aren't much more than implicitly called procedures
16:35:05FromDiscord<Phil> Which is why typically they're really dangerous and I'd not recommend them
16:35:16FromDiscord<Phil> Because seeing thing = -10 turn into 350 is really confusing
16:36:16FromDiscord<Phil> Basically its magic and magic tends to not be good unless applied very carefully and thoughtfully
16:36:27FromDiscord<Phil> I'd recommend explicitly calling `toDegree` or every time.↵But if that somehow absolutely is not necessary for you, nim can technically do it.
16:37:17FromDiscord<maker_of_mischief> thats neat
16:37:28FromDiscord<maker_of_mischief> nim is the best language
16:54:21*nazgulsenpai quit (Ping timeout: 256 seconds)
16:58:45*nazgulsenpai joined #nim
17:24:53FromDiscord<Robyn [She/Her]> You can end up with JS in Nim, if you do what termer did with them :p
17:49:09FromDiscord<ezquerra> Is it possible to make a template that generates a function _with some documentation_ that is passed as one of the template arguments?
17:51:48FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#ix=html>
17:52:21FromDiscord<Phil> Via macro, sure, via template - not even sure how to validate that since you can't see the NimNode
17:53:03FromDiscord<ezquerra> I'm trying to avoid reaching out for a macro unless it is necessary 🙂
17:53:39FromDiscord<ezquerra> Not that I would know how to do it with a macro without investigating a bit more 😅
18:30:42FromDiscord<gerydev> hey all, what possible reasons can be that when I run nimble build, it gives me this error? `ld: warning: directory not found for option '-L/li`
18:31:22FromDiscord<gerydev> I'm on mac, and I've a nim.cfg file as well specifying a lib path to nim, like:↵`passL: "-L/opt/homebrew/Cellar/nim/2.0.2/nim/lib/"`
18:31:36FromDiscord<gerydev> but still gives me headache to figure out what's his problem
18:32:32termerYou should abuse converters until you have multiple layers of them everywhere
18:32:42termerThat way, you don't need to think about types
18:37:59FromDiscord<leorize> don't put that in \:p↵(@gerydev)
18:39:08FromDiscord<leorize> add `--listCmd` to your build and post how Nim is invoking the C compiler here
18:39:37termercan you overload true and false
18:40:00FromDiscord<leorize> you can, they're just identifiers from system and not keywords
18:40:14termerI wanna do the funny C preprocessor sabotage where you replace true and false with random calls that have a small chance of not being true or false
18:41:10FromDiscord<leorize> `template true: untyped` should get you started \:p
18:41:44FromDiscord<arathanis> When you use `import X except Y` and there are overloads for Y, can you specify a specific one to omit or will it always omit all of them?
18:42:00FromDiscord<leorize> it will omit all of them
18:42:03FromDiscord<leorize> you can't select
18:42:17FromDiscord<arathanis> I figured that was going to be the case. Thanks
18:58:54FromDiscord<gerydev> In reply to @leorize "add `--listCmd` to your": How??
18:59:50FromDiscord<gerydev> In reply to @gerydev "hey all, what possible": Anyone?
19:00:46Amun-Radepends on how you build
19:01:23Amun-Raif it's nim.cfg just add --listcmd if config.nims switch "listcmd", etc.
19:01:57FromDiscord<leorize> `nimble build --listcmd` should work
19:06:53FromDiscord<Robyn [She/Her]> In reply to @ezquerra "I'm trying to avoid": Macro is required
19:07:37FromDiscord<Robyn [She/Her]> Though, only a small one is needed
19:13:44FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=html>
19:13:50FromDiscord<Robyn [She/Her]> Keyword is should
19:15:24*nmz left #nim (Ploop)
19:33:35FromDiscord<nnsee> finish my paste service, build and deploy on my server, aaaand it segfaults
19:33:38FromDiscord<nnsee> beautiful
19:34:08FromDiscord<nnsee> trying to figure out why it doesn't segfault on my local machine
19:34:38FromDiscord<Robyn [She/Her]> In reply to @nnsee "finish my paste service,": I can test locally too, if the source is public
19:36:38FromDiscord<nnsee> that's okay, thanks, I'm probably done for tonight and will have a proper look tomorrow. There's no documentation at all on how to set it up right now
19:38:02FromDiscord<Robyn [She/Her]> Fair enough, good luck :P
19:38:47FromDiscord<Robyn [She/Her]> Really wanna work on my projects but the code ends up messy and I hate it :/
19:39:02FromDiscord<Robyn [She/Her]> Really wish I could make something like Blockly and have drag and drop code blocks
19:44:27FromDiscord<nnsee> sent a long message, see <!doctype html>
19:59:36termernnsee, What's it made using?
20:00:34termerIf you're using Prologue with threads on ORC, it's liable to segfault
20:00:34FromDiscord<Phil> Prologue, so the server underneath is httpbeast
20:00:49FromDiscord<Phil> It is?
20:01:15termerJester and Prologue both segfault on ORC with threads if you have concurrency going on because of some race condition
20:01:24termerThat was true mid last year anyway
20:01:54termerBuilding with release also can increase the chance since things run faster
20:02:23termerI don't know if this is still the case, but this was true when I last used them
20:02:34FromDiscord<Phil> Ah, I likely never ran into that because my server is only one thread
20:02:42FromDiscord<Phil> as in, the vm is limited to one thread
20:03:07FromDiscord<Robyn [She/Her]> In reply to @nnsee "(... but if you": I do not understand why it won't paste the output on my local machine :p
20:03:08termerAlways test with wrk or bombardier on a machine with multiple threads
20:03:09FromDiscord<Robyn [She/Her]> Curl hangs
20:04:52termerl hate to he a downer, but Prologue and Jester both have major issues that prevent them from being good choices
20:05:30termerMummy and Gildenstern both perform well and handle common use cases much better
20:05:50FromDiscord<Robyn [She/Her]> Gildenstern?
20:06:00termerHappyX is interesting but it released some time after I was benchmarking web frameworkd
20:06:10termerGildenstern is very similar to Mummy
20:06:16FromDiscord<Robyn [She/Her]> GuildenStern, ah
20:06:39termerThere has been a lot of work put into HappyX and I'm really glad to see it
20:06:58termerit supports multiple HTTP backend, including my favorite MicroAsyncHttpServer
20:07:03FromDiscord<Robyn [She/Her]> That's fair
20:07:07FromDiscord<Robyn [She/Her]> MicroAsyncHttpServer?-
20:07:40termerhttps://github.com/philip-wernersbach/microasynchttpserver
20:07:42FromDiscord<Robyn [She/Her]> Oh nice
20:08:18termerSignificantly faster than asynchttpserver and doesn't have the same memory leak problem
20:08:30FromDiscord<Robyn [She/Her]> Oh neat
20:08:43FromDiscord<Robyn [She/Her]> Also I thought the mem leak problem was because of asyncdispatch itself
20:09:15termersomething in asyncdispatch and asyncnet, but micro allocates such little memory that it's much less of a problem
20:09:29termerIn general I wouldn't use asyncdispatch for anything
20:09:49termerChronos is better but largely undocumented
20:10:40termernim-sys is the best in terms of usability and performance, but it depends on Nimworks' CPS library, which suffers from limitations and slow compile times
20:11:02FromDiscord<Robyn [She/Her]> Fair
20:11:16FromDiscord<nnsee> In reply to @termer "If you're using Prologue": I guessed it might've been something like that, thanks
20:11:25termerTry Mummy nnsee
20:11:44FromDiscord<nnsee> although the question of why it doesn't crash on my own machine still stands
20:11:46FromDiscord<Robyn [She/Her]> Is chronos a drop-in replacement for asyncdispatch, in most cases?
20:11:52termerNo
20:12:19termerWell, if it's your own code and you don't rely on any asyncdispatch quirks, then maybe
20:12:28termerbut not for 3rd party libs
20:12:34termermost don't support chronos at all
20:13:18termerChronos has a built in HTTP server with a lot of things, and that actually is very usable
20:13:22termerPerformance sucks though
20:13:47termerNot as bad as HttpBeast, and definitely not as bad as asynchttpserver
20:14:05termerbut it still is slow compared to basically anything from the Go ecosystem
20:14:17termerits speed is comparable to Node.js's HTTP module
20:14:34FromDiscord<Robyn [She/Her]> Unfortunate
20:14:55termerBut it does handle file upload without using up insane amounts or memory and stalling
20:15:23termerhttpbeast is a hunk of garbage that can be DoS'd by simply sending it a bunch of large payloads
20:15:30FromDiscord<Robyn [She/Her]> Oh damn
20:15:49FromDiscord<Robyn [She/Her]> So Mummy or GuildenStern are the best equivalents?
20:16:04termerAlso its benchmarks are bullshit because it uses HTTP pipelining which browsers and reverse proxies don't even support
20:16:13termerMummy is a good choice for most people
20:16:35FromDiscord<Robyn [She/Her]> In reply to @termer "Also its benchmarks are": Ah
20:16:39FromDiscord<Robyn [She/Her]> In reply to @termer "Mummy is a good": air
20:16:41termerI'd also look into HappyX, although I can't vouch for it much since I only touched a little bit of it
20:16:41FromDiscord<Robyn [She/Her]> Fair
20:17:18termerHappyX is very interesting because it seems to be a fullstack framework
20:17:26FromDiscord<djazz> i have started working on an async module for embedded, Rpi Pico in this case
20:17:34termerYou should use CPS
20:17:39termerstart it off right
20:18:34FromDiscord<Phil> Personally HappyX would peak my interest because from what I can see I can only conclude Ethosa is on crack
20:18:46FromDiscord<Phil> In a good way
20:18:53termerdjazz I'm sorry I still haven't had time to try picostdlib
20:19:35termerHappyX has too much magic for my taste, but it's ambitious, and the author has even made extra tooling for it
20:19:39FromDiscord<Phil> I mean CPS is mostly useful for task parallelism no?
20:20:03FromDiscord<Phil> It doesn't epoll so you'd still need to use async if what you're doing is more IO heavy
20:20:13FromDiscord<Phil> it doesn't epoll afaik
20:20:18termeryes, CPS is just the way you manage tasks
20:20:32termerbut it can be used in tandem with async to make it nicer
20:20:51termerCompared to async/await style, it's much more efficient since there are fewer allocations
20:21:03FromDiscord<Phil> Yeh, I chat with leo & friends about CPS and the statement I heard that typically you don't want to use both
20:21:05termerAnd if you're clever, you can reuse the continuation objects
20:21:16FromDiscord<Phil> I haven't gotten far enough in my journey to conclude that
20:21:28termerDon't use async/await with CPS yeah lol
20:21:56termerYou know the memory model for closures, right?
20:22:25termerThink of a continuation like a closure with a switch statement inside of it and an into value saying which part you should execute
20:22:28FromDiscord<Phil> I'm a webdev, I'm currently branching into multithreading because I want a model of "microservice as a thread", I ain't got no clue of memory models
20:22:37termer*an int value
20:22:37FromDiscord<Phil> I watched the talk on atomic weapons by sutter like a week ago
20:22:52FromDiscord<ezquerra> In reply to @chronos.vitaqua "<@974046326088163438> this should do": Thank you. Can this be used to add a doc comment? (i.e. the equivalent of `## my doc comment`)
20:23:02termerYou should go to the CPS repo and read its intro
20:23:07termerIt's really really good
20:23:14FromDiscord<Phil> I know that a closure carries its environment around but how to fully mentally model that I do not know since given that it always works out for me its still magic half the time
20:23:20FromDiscord<Phil> I've already made my way through the tutorial
20:23:23termerIt makes very few assumptions about what you already know, and talks about how it works at a high level
20:23:33termeroh good
20:23:33FromDiscord<Phil> I speak very carefully because just because I made it through that doesn't mean I fully understand all the implications
20:24:22FromDiscord<Phil> I speak mostly from the perspective that I eventually want to set up long running threads with event-loops that support async.
20:24:24termerWell to compare it to async/await, with that you have to allocate a new Future for each call
20:24:35FromDiscord<Phil> And likely a second one that will support CPS potentially instead
20:24:52termerCPS is super simple, which is awesome
20:25:02termerthe core of it works even on the JS and NimVM backends
20:25:16FromDiscord<djazz> termer: I want to start with something, I'll have a look at cps
20:25:27FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
20:25:36FromDiscord<djazz> asyncdispatch doesnt work with pico sdk
20:25:46FromDiscord<djazz> no <socket.h>
20:26:03FromDiscord<djazz> (like with a lot of the stdlib)
20:26:10termerasyncdispatch should be avoided at all costs
20:26:15FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
20:26:29termerCPS is perfect for embedded since it has no OS dependencies at all
20:26:35FromDiscord<Phil> In reply to @termer "asyncdispatch should be avoided": Sure and then you do IO and can either face blocking IO operations or async IO
20:26:58termerAsync doesn't mean you have to use asyncdispatch
20:27:17termerI'm not arguing against async IO at all, much the opposite
20:27:18FromDiscord<Robyn [She/Her]> In reply to @ezquerra "Thank you. Can this": It is a doc comment, actually
20:27:33FromDiscord<Phil> It does if you don't want to wait for async events, as chronos poll() does not have a timeout, nor could I find a proc that checks if there's async work to be done
20:27:41FromDiscord<Robyn [She/Her]> So yeah you can just use this as a drop-in replacement for where you'd put a comment normally
20:27:57termerWhat I can say for certain is that the huge number of allocations that asyncdispatch needs to make will cause huge memory fragmentation problems on a microcontroller
20:28:31*azimut quit (Ping timeout: 240 seconds)
20:28:39termerPhil, You're mixing up async IO and asyncdispatch
20:28:45FromDiscord<djazz> yeah, sucks that it requires dynamic memory
20:28:59FromDiscord<Phil> No I'm saying for setting up your own while-loop that conditionally polls for async-work, chronos does not provide the tools
20:29:08termerOh yeah
20:29:10FromDiscord<Phil> At least not in any set up I'm familiar with I'll admit
20:29:23termerAnother reason why CPS is perfect for rolling your own
20:29:29termerit includes no IO or event loop
20:29:37termerthere are impls you can choose to use
20:29:47termerbut it's broken into constituent pieces
20:30:12FromDiscord<Phil> Yeah and then you're off with sync-io and you'll have one iteration of a CPS block your thread
20:30:15FromDiscord<gerydev> sent a code paste, see https://play.nim-lang.org/#ix=html>
20:30:21FromDiscord<Phil> until the IO operation is done
20:30:36termerI don't think you know what you're talking about here
20:30:47termerYou should read the httpbeast source
20:30:55termerIt doesn't even use asyncdispatch for its event loop
20:31:03FromDiscord<gerydev> lol the bot is aggressive xd
20:31:05FromDiscord<Phil> I barely do, but I did chat through this with leorize and co and the conclusion was pretty much that syncio will block the same
20:31:11FromDiscord<Phil> In reply to @gerydev "lol the bot is": It's a bridge
20:31:17FromDiscord<Phil> As in, IRC is being bridged to discord
20:31:23FromDiscord<khazakar> In reply to @gerydev "lol the bot is": Bridge going flamin' hot
20:31:26termerand in fact its greatest speed advantage is the fact that it cheats and doesn't allocate a Future for the request handler unless you explicitly require it
20:31:37FromDiscord<gerydev> In reply to @isofruit "As in, IRC is": IRC?
20:31:45termerInternet Relay Chat
20:31:48termerold chat protocol
20:31:57FromDiscord<khazakar> Old but gold
20:32:05FromDiscord<djazz> Relay for relay chat
20:32:11termerPhil, Async IO just means IO that you don't need to wait on before doing other work
20:32:14FromDiscord<gerydev> In reply to @gerydev "I get this, possibly": can I get help with this?
20:32:46FromDiscord<Phil> I don't use mac, I've never even seen the flag, no clue
20:32:53FromDiscord<gerydev> 😒
20:32:55FromDiscord<gerydev> :/
20:32:57FromDiscord<Phil> You wanted an answer
20:33:00FromDiscord<djazz> termer: I was also thinking wrapping this in a nice Nim way https://www.raspberrypi.com/documentation/pico-sdk/high_level.html#pico_async_context
20:33:30FromDiscord<djazz> basically IRQ switching
20:33:34termerYou could and provably should do that
20:33:40FromDiscord<djazz> between task on a single thread
20:34:04FromDiscord<djazz> (thats how wifi can work while your while true loop is chugging along)
20:34:06FromDiscord<khazakar> In reply to @termer "asyncdispatch should be avoided": Then where's GH issue about it? 😛
20:34:09FromDiscord<Phil> In reply to @gerydev "can I get help": basically leorize is your best bet here because I'm not aware of anyone else right now in chat that knows anything about that flag
20:35:06termerkhazakar, https://github.com/nim-lang/RFCs/issues/295
20:35:15FromDiscord<khazakar> In reply to @termer "<@1068255412840845362>, https://github.com/nim-lang": Thx
20:35:44termerdid the RFC link send or was this message truncated for me
20:35:44FromDiscord<gerydev> In reply to @isofruit "basically leorize is your": it was suggested by another bot.. But the flag is not that important, it doesn't work with only "nimble build" either
20:36:03termernot lol
20:36:07termer*bot
20:36:45FromDiscord<Phil> In reply to @termer "<@180601887916163073>, Async IO just": I'll dive deeper into this once I get to the point of integrating CPS with my multithreading runtime.↵Because I'll definitely want to run an example sooner or later that would use CPS without blocking IO.↵How is still a mystery to me but we'll see
20:38:57termerI really do recommend you read httpbeast's source if you want to get a feel for a real world application interfacing directly with the OS's async IO API
20:40:03termerThe stdlib selectors module provides an abstraction for various POSIX asyncio APIs without asyncdispatch
20:40:45FromDiscord<Phil> That's just not where I'm at.↵That might be where I'm going, but interfacing directly with the OS means writing special code for each OS which at this point I will not do and do not plan to.
20:41:27termerIt works for various POSIX OSs, but I'm just saying so that you can have some understanding of how it works
20:41:34termernot that you want to use it directly
20:41:40termerit's pretty cumbersome to do so
20:43:59FromDiscord<khazakar> In reply to @termer "<@1068255412840845362>, https://github.com/nim-lang": Interesting stuff. Link to on-going work: https://github.com/nim-works/cps
20:44:40termerI just wish it would be added to the compiler
20:45:35FromDiscord<khazakar> Maybe it will at some point
20:45:54termerI hope so
20:46:16FromDiscord<khazakar> So for easy to pickup and quite performant solution for production use, what would you propose?
20:46:34termerI can actually use Nim for network shit if 1. CPS is added to the compiler and 2. incremental compilation is implemented
20:46:47FromDiscord<khazakar> Since I will try at some point write at least mockup of.existing react solution, in nim
20:47:05FromDiscord<khazakar> (edit) "of.existing" => "of existing" | "solution," => "solution at work,"
20:47:12termerSomeone started wrapping React, if that's what lib you're referring to
20:47:45FromDiscord<khazakar> I'd rather not use react, I wanted to replace it using HTMX + leaflet for OSM
20:48:07termerNim for JS sucks
20:48:25termerits bundle sizes are huge, and all the stuff it adds will make it slow
20:48:25FromDiscord<khazakar> Why?
20:48:38termerLook at the main bundle for nimforum
20:48:51termerOpen it in your browser and have a look at it
20:49:10termerNo way in hell I'm shipping Nim JS
20:49:42termerwould be interested in Nim for frontend if wasm was more widely supported
20:49:46FromDiscord<khazakar> It makes JS for me at least more digestable and understandable
20:50:03termerYou should learn JS and understand it
20:50:14termerit sucks but it's very useful to know
20:50:38termerI can tell you right now that all the boilerplate and madness that Nim JS spits out will make its execution speed very slow
20:50:46FromDiscord<Phil> Personally the bundle sizes are less what I'd think about there (that becomes a concern for larger-ish applications) and more about tooling, and JS has a lot of utilities and tooling that are just more finished
20:50:51FromDiscord<khazakar> I'm more easily picking up at leat some of the JS by writing code in nim and compiling to JS
20:51:00FromDiscord<khazakar> And comparing in text editor side by side
20:51:05termerSize is less of an issue than performance
20:51:11FromDiscord<Phil> First thing that comes to mind would be storybook
20:51:24FromDiscord<Phil> And not having sth like that is a death sentence to me since I started using it
20:51:33FromDiscord<djazz> Nim to TypeScript would be better, seems like many have switched to TS
20:51:34FromDiscord<Phil> Or rather: Having non-trivial integration with it
20:51:48termerI just use TS with all the big heavy tools
20:51:51FromDiscord<khazakar> In reply to @isofruit "First thing that comes": Storybook is shady as far as I remember one of TS gurus,Theo
20:52:00termerTS has a decent type system
20:52:06FromDiscord<khazakar> Yup
20:52:13FromDiscord<khazakar> Turing complete one
20:52:14FromDiscord<Phil> In reply to @khazakar "Storybook is shady as": For?
20:52:25FromDiscord<Phil> Shady Code? Shade business practices?
20:52:30termerI just use TS with React and Solid and all is well
20:52:50FromDiscord<khazakar> In reply to @isofruit "For?": He just mentioned it and not yet releases vid about it
20:52:50FromDiscord<djazz> termer: was reading the RFC and... what? https://github.com/nim-lang/RFCs/issues/295#issuecomment-771184401
20:52:57FromDiscord<djazz> RFC thread
20:53:05termerI'm not clear on that
20:53:12termerbut there's drama behind this
20:53:32FromDiscord<Phil> Unless he's about to drop a bomb that Storybook somehow is about to hold their customer's hostage which would actually remotely matter to me, I'd not be willing to invest the minute into that
20:53:34termerAnd he is banned from the forums I think, but again, not sure
20:54:18FromDiscord<djazz> he is active working on cps though
20:54:23termerTalk to the Ninworks guys and you'll get various levels of cynicism about the state of Nim. Many of their opinions are deserved given the amount of time they've sunk into Nim
20:54:24FromDiscord<Phil> I mean, can confirm
20:54:35termerThey are also working on Nimskull
20:54:44FromDiscord<djazz> ah, nimskull
20:54:51termerwhich currently is mostly compatible and will use CPS
20:55:17termerI can't get behind Nimskull because it's too much splintering, but the reasoning behind it is solid
20:55:21FromDiscord<expert> ts sux↵(@djazz)
20:55:51FromDiscord<djazz> In reply to @expert "ts sux (<@81390960805675008>)": Do I have the project for u! https://microsoft.github.io/devicescript/
20:55:54termerNim needs its concurrency system ripped out, its compiler code to be improved (allegedly), and a bunch of legacy cruft and experimental features to be pruned
20:56:08FromDiscord<djazz> agreed
20:56:22FromDiscord<djazz> let a new stdlib rise
20:56:26termerNim defaults alone need to be changed
20:56:35termerall the stricts checks need to be default
20:56:46termerMost experimental features need to be removed
20:57:16FromDiscord<djazz> I enjoy using Nim but using stuff from std leaves me mostly disappointed
20:57:24termerI haven't worked on the compiler so I can't comment on it personally, but Nimskull guys say it's very hard to contribute to
20:57:26FromDiscord<djazz> maybe thats why I tried it for embedded
20:57:52termerNim's lack of solid core things like networking makes it only suitable for niche things
20:58:14FromDiscord<Phil> A lot of stuff requires work to be done first↵I am mostly on the periphery but e.g. updating threading lib to pass tsan went pretty smooth
20:58:17termerWould love to use Nim to write network applications, even tried in 2020 and it was such a horrible time
20:58:33termerNim threads are the easiest part of its concurrency to use
20:58:42termerNim threads are actually pretty good
20:59:04FromDiscord<khazakar> When I will learn Nim more,I will definitely touch std/net to at least add support for AF_CAN 😃
20:59:36termerstd/net is probably pretty good since it's basically a thin wrapper over POSIX APIs
20:59:45FromDiscord<khazakar> That's most lacking thing for my use case at work
20:59:50FromDiscord<khazakar> In automotive space 🙂
21:00:08termerCould you even use Nim for cars with regulatory requirements?
21:00:29FromDiscord<khazakar> They still slap C with MISRA docbook
21:00:39termerNim has no spec, and I remember reading that having a spec is important for use in vehicles
21:00:42FromDiscord<djazz> Cars today can already crash during firmware update, I think he's good
21:01:01FromDiscord<djazz> xD
21:01:05termerI'm talking from a legal standpoint, not a practical one lol
21:01:07FromDiscord<khazakar> In reply to @djazz "Cars today can already": They can crash like tesla FSD xD
21:01:25FromDiscord<djazz> Not like that xD
21:01:31FromDiscord<khazakar> Going 160 km/h while driver is sleeping
21:02:29FromDiscord<khazakar> In reply to @termer "Nim has no spec,": Rust got pretty involved when autosar show it's interest in it
21:02:48FromDiscord<khazakar> But it's mostly stalled,so you get C++ at most
21:02:58termerC++ is fairly tolerable
21:03:24termerWould love to use Rust, but then I'd be the only one able to work on most of the shit I'd write in it
21:03:39FromDiscord<khazakar> Depends which initialization technique you use out of 25
21:03:41termerThe nice thing about Nim is that the barrier to entry is low for the most psrt
21:03:43termerpart
21:04:01FromDiscord<khazakar> (edit) "Depends which initialization technique you use out of 25 ... " added "available"
21:04:12FromDiscord<khazakar> Yup, it is
21:04:29FromDiscord<khazakar> And it sparked my will to learn and do more
21:04:34FromDiscord<expert> i would love to contribute but I hate typescript↵(@djazz)
21:04:40FromDiscord<expert> and microsoft
21:04:43termerJust use it anyway
21:04:50termerTypeScript is pretty nice for what it is
21:04:59termerIt makes JS tolerable
21:05:00FromDiscord<djazz> talking about typescript reminded me of it, i havent tried it tho
21:05:15FromDiscord<khazakar> Even Prime, TS used, recommends JS + JSDoc
21:05:23FromDiscord<khazakar> (edit) "used," => "user,"
21:06:01FromDiscord<expert> mostly microsoft I love typescript
21:06:01FromDiscord<expert> nuh uh
21:06:02FromDiscord<expert> never using microsoft products
21:06:20FromDiscord<djazz> github?
21:06:45FromDiscord<khazakar> In reply to @expert "never using microsoft products": Then stop using GitHub, chatgpt and rip their code from linux kernel
21:07:17termerI use JS + JSDoc extensively
21:07:23termerbut guess what checks those types
21:07:38FromDiscord<khazakar> Tsc
21:07:40termerOur boy TypeScript at it again
21:07:42FromDiscord<khazakar> I know 😛
21:08:19termerPlus, you're probably using TS syntax inside tour JSDoc annotations
21:08:35termerstring[] is not valid JSDoc, for example
21:08:39termerit is valid TSDoc
21:08:40FromDiscord<khazakar> I don't write JS by hand
21:08:54FromDiscord<khazakar> So it does not apply to me
21:08:58FromDiscord<khazakar> 😃
21:09:14termerenjoy
21:09:41FromDiscord<khazakar> But I probably will learn some simple js to make this mockup working using nim instead of python as backbone
21:09:58FromDiscord<khazakar> To squeeze more performance out of RPi 3 🙂
21:11:48termerwould almost certainly be faster than Python
21:12:18FromDiscord<djazz> i tried nim on pi zero, slow to compile vs python prompt which seemed instant lol
21:12:20FromDiscord<khazakar> In a project which uses 3 backends at once? Definitely
21:12:46termerIf you're compiling, obviously it's gonna be slow
21:12:55FromDiscord<khazakar> This shit needs architecture first
21:13:11termeryou should be able to cross compile to ARM Linux from a PC
21:13:18FromDiscord<khazakar> Not that you get flask, fastapi and sanic running at the same time xD
21:13:54termerat least it's not Django
21:14:23FromDiscord<khazakar> I'd rather have one django for whole project than current mess
21:15:13termerDjango is my only Python experience and I hated it
21:16:56FromDiscord<khazakar> I started as test engineer, and now.I'm working on dumpsterfire python 3-backends-in-1-project + react for one of the elements, which they wanted to shove onto device, which is RPi 3 as lowest denominator
21:17:02FromDiscord<Phil> Ehhhhhhhhhhhh.↵I mean, I agree that it isn't great. But I'm not sure I'd say I hated it.
21:17:06FromDiscord<khazakar> (edit) "now.I'm" => "now I'm"
21:17:30FromDiscord<Phil> Django that is
21:17:44Amun-RaI prefer django over flask any time any day
21:18:08FromDiscord<Phil> Honestly Class Based Views are a head scratcher when you have no clue what you're doing though
21:18:30FromDiscord<khazakar> If I had a choice,I'd pick falcon
21:18:31FromDiscord<Phil> Hell, if I had to work in Django they'd still be a headscratcher because who can keep in their head the order of operations in those
21:21:47termerThere was little to no intellisense and I had to constantly be referencing the manual and crossing my fingers whether I'd have runtime errors
21:22:51FromDiscord<nnsee> I don't actually write software for a living, that's probably why I'm a terrible programmer
21:33:40FromDiscord<khazakar> You're not terrible, just not touched by professional intricacies
21:42:52FromDiscord<Robyn [She/Her]> I mean Emscripten exists tbf↵(<@709044657232936960_termer=5b=49=52=43=5d>)
21:44:01FromDiscord<Robyn [She/Her]> Apparently TS is losing traction, seems to be people talking about how they're moving back to JS after using TS for so long↵(@djazz)
21:44:40FromDiscord<Robyn [She/Her]> Also What'd be the point of generating something that'd have to be compiled again, imo it'd be better for Nim to emit a d.ts file instead of flat out typescript code
21:46:02FromDiscord<Robyn [She/Her]> Looks at EE Java↵(@nnsee)
21:46:08FromDiscord<Robyn [She/Her]> Worse than that?
21:46:48FromDiscord<Phil> In reply to @Robyn "*Looks at EE Java*": Just don't look at java
21:46:50FromDiscord<Phil> for anything
21:46:53FromDiscord<Phil> In any capacity
21:47:10FromDiscord<Phil> Not even if you want to see an example of being flattened by abstraction layers
21:47:16FromDiscord<Phil> It just does not end well
21:48:10FromDiscord<Robyn [She/Her]> Lol
21:48:14FromDiscord<nnsee> I used to be in that camp, but man... modern Java is kind of comfy though
21:49:09FromDiscord<nnsee> I do think legacy java applications have left a bad taste in everyone's mouth, though
21:49:34FromDiscord<Phil> It's just getting flattened by Spring
21:49:40FromDiscord<Phil> I see Spring and fun goes to die
21:49:47FromDiscord<nnsee> as a pentester, java projects are the ones I usually dread because the layers and layers of abstraction you have to go through when reading code
21:50:23FromDiscord<Phil> Exactly that
21:50:27FromDiscord<Phil> That drives me insane
21:50:34FromDiscord<Phil> The amount of fucking indirection
21:51:18FromDiscord<Phil> And then people get smart with injecting lists of beans etc.
21:55:10FromDiscord<ca_lobo_14153> sent a long message, see <!doctype html>
22:02:29FromDiscord<khazakar> In reply to @nnsee "I used to be": Yup, check Java 21
22:02:49FromDiscord<nnsee> sent a long message, see <!doctype html>
22:05:08FromDiscord<nnsee> I don't think I've seen toolchain multiplexers install to /usr/local/bin directly, that's new to me
22:08:39FromDiscord<khazakar> In reply to @nnsee "I don't think I've": Golang in docs suggests installing to /usr/local
22:12:19*azimut joined #nim
22:18:06*cnx quit (Ping timeout: 260 seconds)
22:28:28*cnx joined #nim
22:39:07FromDiscord<ca_lobo_14153> sent a long message, see <!doctype html>
22:40:55*azimut quit (Ping timeout: 240 seconds)
22:47:11FromDiscord<Elegantbeef> Inside Nim packages you can require a nim version
22:47:17FromDiscord<Elegantbeef> You also can check inside Nim code the version
23:04:19FromDiscord<ca_lobo_14153> In reply to @Elegantbeef "You also can check": but not for whether it was build with -d:release or debug... unless the "active boot switches: -d:release" indicates this... I can't find any docs on the what the active boot switches means...
23:04:33FromDiscord<Elegantbeef> What does that matter?
23:06:21FromDiscord<ca_lobo_14153> I don't know. I haven't done any timings re: release vs debug version.... I assume that it does... but don't have facts to back it up...
23:07:03FromDiscord<Elegantbeef> Yes debug is slower, but that's the point
23:07:13FromDiscord<Elegantbeef> It has fewer optimisations to bake the cake quicker
23:08:06FromDiscord<ca_lobo_14153> goes back to my end user vs Nim Core developer thinking... end users don't care if it's a debug version or no.. they just want to compile their code faster...
23:08:20FromDiscord<ca_lobo_14153> (edit) "no.." => "not.."
23:08:27FromDiscord<Elegantbeef> All toolchains ship a release build
23:08:55FromDiscord<Elegantbeef> The fastest nim compiler is one built with `-d:danger -d:lto --cc:clang` but it's also the most dangerous
23:09:32FromDiscord<Elegantbeef> You can make it even faster using performance guided optimisations but negligably iirc
23:09:43FromDiscord<Elegantbeef> @Yardanico knows more about how fast PGO gets you
23:12:58FromDiscord<Phil> Performance difference between debug and release tends to be somewhere in the 5x to 10x region
23:12:59FromDiscord<ca_lobo_14153> In reply to @Elegantbeef "All toolchains ship a": The crux of the problem... Nim doesn't have a release build... at least not one that I've been able to discover.
23:13:07FromDiscord<Elegantbeef> What?
23:13:10FromDiscord<Phil> What?
23:13:16FromDiscord<Elegantbeef> `-d:release` is a release build
23:14:56FromDiscord<ca_lobo_14153> by default Nim builds a debug release and where Choosenim doesn't support a platform/OS (Linux/aarch64 in my case) there is no end user installer script - the install instructions on the download page are incomplete.
23:15:45FromDiscord<ca_lobo_14153> details above at 1:55pm today in response to Ras...
23:20:07FromDiscord<Phil> I mean there's not much I can respond to that as it's not my area and not like I have the patience to spend my free time setting up windows and macos vms to figure out installing on them 🤷
23:22:20FromDiscord<Phil> Ah, for reference: I do not play much of a role in anything, I am a contributor for minor things on the sides for the most part
23:28:00FromDiscord<ca_lobo_14153> Totally understand Phil. From my perspective, as an end user, all I want is to be able to download the sources, cd into directory, sh build_all.sh -d:release, sh install_release.sh and end up with a complete working nim enviornment - Nimble included - installed to normal /user/local/bin and releated dictionaries.
23:28:39FromDiscord<Elegantbeef> Bridge died?
23:28:45FromDiscord<Phil> Bridge ate your message
23:28:46FromDiscord<Elegantbeef> Ah it's back
23:29:00FromDiscord<nasuray> Doesn't the pre built archives have an install script?
23:29:00FromDiscord<Elegantbeef> If you built using `build_all.sh` it'd have built it as release
23:29:05FromDiscord<Phil> For reference: https://media.discordapp.net/attachments/371759389889003532/1195509786423341106/image.png?ex=65b44040&is=65a1cb40&hm=445a9f11cec4b4ad98cb2fdac8e3b53859e979796db409d19c30029923b7196c&
23:29:28FromDiscord<Elegantbeef> If it's not release there is an issue with `build_all.sh` and it needs to be fixed
23:31:18FromDiscord<Elegantbeef> to the `install.sh` I can only really say you should make the shell script 😄
23:33:03FromDiscord<Elegantbeef> Worth noting that even golang does not install to the system and installs in userspace https://go.dev/doc/install/source#install
23:34:32FromDiscord<Elegantbeef> Though choosenim or similar should support all common modern CPU/OS
23:34:55FromDiscord<Elegantbeef> That support really needs people with the systems to step up and help, atleast in my view
23:52:24FromDiscord<Phil (he/him)> Out of curiosity, is logging just inherently memory-leaky business?
23:56:14FromDiscord<Elegantbeef> Uhh no
23:56:28FromDiscord<Phil (he/him)> Then I might need to investigate this timezone memory leak stuff that pops every time I forget to turn off logging with chronicles under valgrind
23:56:58FromDiscord<Elegantbeef> Did you mean general `logging` or `std/logging`? 😄
23:57:04FromDiscord<Elegantbeef> Cause generally nothing is leaky
23:57:09FromDiscord<Phil (he/him)> General logging and chronicles
23:57:12FromDiscord<Elegantbeef> Only bad code leaks
23:57:56FromDiscord<Phil (he/him)> Example\: I have a test right now that passes valgrind (after an eternity, I need to cut down the amount what that test does) only with logging disabled
23:58:05FromDiscord<ca_lobo_14153> sent a long message, see <!doctype html>
23:58:11FromDiscord<Phil (he/him)> Okay helgrind has been running for 2 minutes now I'm expecting it won't ever finish
23:58:48FromDiscord<Elegantbeef> `/usr/local` is system wide
23:59:01FromDiscord<Elegantbeef> If it requires sudo to write to it's generally not userspace
23:59:20FromDiscord<ca_lobo_14153> In reply to @Elegantbeef "If it requires sudo": Ok, I stand corrected.