<< 20-06-2024 >>

00:03:00FromDiscord<leorize> you almost can never have a stateless parser \:p↵(@Robyn [She/Her])
00:03:32FromDiscord<leorize> the term you want is context-sensitive
00:04:52FromDiscord<Robyn [She/Her]> Ah okay, then yeah, can I have a context insensitive parser that can handle whitespace? :p
00:05:32FromDiscord<leorize> depends on what the whitespace does
00:05:56FromDiscord<Robyn [She/Her]> Thinking about it, especially considering how I want to implement indentation, I'll need a context object anyway
00:08:08FromDiscord<leorize> context sensitive is not that kind of context if you are wondering \:p
00:10:17FromDiscord<Robyn [She/Her]> Huh
00:10:28FromDiscord<Robyn [She/Her]> I don't know the terminology 😭
00:10:47FromDiscord<leorize> don't worry too much about it
00:11:39FromDiscord<leorize> you're writing a recursive descent parser, right? then context sensitivity is more or less an academic classification
00:12:27FromDiscord<Robyn [She/Her]> I think so? I'm writing a simple parser combinator that consumes input as it reaches the parser so probably
00:13:05FromDiscord<Robyn [She/Her]> What does recursive descent mean, exactly? Just going from left to right, downwards?
00:13:58FromDiscord<leorize> https://en.m.wikipedia.org/wiki/Recursive_descent_parser
00:14:54*SchweinDeBurg joined #nim
00:16:49FromDiscord<Robyn [She/Her]> I can't use a browser rn aha
00:17:02FromDiscord<Robyn [She/Her]> I'll try to remember to read it later on
00:17:42FromDiscord<leorize> it's more or less a parsing pattern
00:18:01FromDiscord<leorize> if you want to handle indentation like in nim, then I do have the goods for you
00:18:11FromDiscord<Robyn [She/Her]> Oh?
00:18:24FromDiscord<leorize> https://michaeldadams.org/papers/layout_parsing_2/
00:18:39FromDiscord<Robyn [She/Her]> I have managed to write an indent parser already which is neat at least
00:19:18FromDiscord<Robyn [She/Her]> In reply to @leorize "https://michaeldadams.org/papers/layout_parsing_2/": I'm gonna save that in a note, seems useful
00:45:11FromDiscord<Robyn [She/Her]> In reply to @leorize "https://michaeldadams.org/papers/layout_parsing_2/": Rip I can't view the pdf on this phone
01:52:01FromDiscord<leorize> what ancient phone are you using
02:03:22*SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev)
03:40:37*SchweinDeBurg joined #nim
04:02:43FromDiscord<threefour> Moto Razr
04:11:09FromDiscord<threefour> Oh what the, they make smartphone Razrs now? Well nvm then lol
05:15:02*ntat joined #nim
05:30:08FromDiscord<morgan> hm so it seems that for bgfx i will have to link to the separately compiled library
05:30:31FromDiscord<morgan> but i do have a .h i can probably give to futhark
05:30:59FromDiscord<morgan> but ofc i get that answer around when im winding down for the night lol
05:56:01NimEventerNew Nimble package! cloths - Cloths provides the way to process and structure string easily., see https://github.com/panno8M/cloths
06:08:21*rockcavera quit (Remote host closed the connection)
06:10:03FromDiscord<Elegantbeef> Hmph odd choice of design, they're using OOP to merge `style` into a single type instead of just pointerprocs
06:10:13FromDiscord<Elegantbeef> Not that I really understand what that does
06:10:25*PMunch joined #nim
07:22:11*Jjp137 quit (Ping timeout: 264 seconds)
07:22:13*krux02_ quit (Remote host closed the connection)
07:30:57*jjido joined #nim
07:31:01*Jjp137 joined #nim
07:53:57*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
08:15:01FromDiscord<frusadev> sent a code paste, see https://play.nim-lang.org/#pasty=MFAWXJWJ
08:15:19FromDiscord<frusadev> (edit) "https://play.nim-lang.org/#pasty=cANVqJRp" => "https://play.nim-lang.org/#pasty=gkYkqCAd"
08:16:03FromDiscord<frusadev> (edit) "https://play.nim-lang.org/#pasty=WiyVPbaz" => "https://play.nim-lang.org/#pasty=OaxfAltZ"
08:16:42FromDiscord<leorize> your Token is a ref type, right?
08:16:49FromDiscord<frusadev> yes
08:17:06NimEventerNew thread by firyx: Openziti (zero trust networking), see https://forum.nim-lang.org/t/11802
08:17:08FromDiscord<leorize> then the problem is that you never changed your currentToken ref
08:17:24FromDiscord<leorize> so for the entire loop you operated on one token
08:17:59FromDiscord<frusadev> 🫤
08:18:07FromDiscord<leorize> the fix is actually very simple\: just move currentToken into the loop
08:19:18FromDiscord<frusadev> I thought about it, but i wanted to avoid recreating the variable at every iteration...
08:19:31FromDiscord<frusadev> Let me test it
08:20:21FromDiscord<leorize> you can't avoid allocating different tokens for well, different tokens \:p
08:21:32FromDiscord<frusadev> It works!!😋
08:21:33FromDiscord<mratsim> In reply to @leorize "you can't avoid allocating": memory pool / token pool to reuse memory without realloc
08:22:10FromDiscord<leorize> I'm pretty sure that's implementation details and doesn't detract from my statement
08:22:20FromDiscord<frusadev> In reply to @leorize "you can't avoid allocating": @leorize I get that 😆
08:23:02FromDiscord<frusadev> Thank you for the help 👌
09:53:35*jjido joined #nim
10:07:06*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
11:57:44FromDiscord<Robyn [She/Her]> In reply to @leorize "what ancient phone are": Samsung J2 Core
11:58:24FromDiscord<Robyn [She/Her]> It barely runs Discord, let alone Spotify Lite, Spotify just kept crashing
12:03:13FromDiscord<Robyn [She/Her]> How does quirky exception handling work in Nim?
12:11:38*pmp-p joined #nim
12:16:50FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=xWjsPtMN I feel like I can implement `link` better...
12:20:53FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=BDhKCWiv
12:21:17*fallback quit (Quit: IRCNow and Forever!)
13:24:05*rockcavera joined #nim
13:37:11*ntat_ joined #nim
13:37:27*ntat quit (Ping timeout: 260 seconds)
14:02:50FromDiscord<double_spiral> Can someone link me docs on nimble files?
14:12:54FromDiscord<Robyn [She/Her]> In reply to @double_spiral "Can someone link me": Have you checked https://github.com/Nim-lang/Nimble ?
14:28:37*krux02 joined #nim
14:44:02*lucasta joined #nim
15:06:49strogon14https://nim-lang.github.io/nimble/create-packages.html
15:06:49strogon14https://nim-lang.org/docs/nims.html
15:06:49strogon14https://nim-lang.org/docs/nimscript.html
15:06:58FromDiscord<ptramo> any special care to compile against a static libssl on windows?
15:07:50FromDiscord<ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=dWuAUdAi
15:08:21FromDiscord<ptramo> (edit) "https://play.nim-lang.org/#pasty=WdasRJlm" => "https://play.nim-lang.org/#pasty=PKETBYNy"
15:15:27FromDiscord<spotlightkid> Maybe try `--dynlibOverrideAll`?
15:15:35FromDiscord<ptramo> that breaks spectacularly
15:16:14FromDiscord<ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=cbKywUcl
15:23:33FromDiscord<leorize> the override should for windows is stupid
15:23:51FromDiscord<leorize> you need to specify exactly libssl-1\_1-x64
15:24:09FromDiscord<leorize> and that's not to mention that the wrapper itself is a walking hazard
15:24:09FromDiscord<leorize> good luck
15:47:13FromDiscord<ptramo> `switch("dynlibOverride", "(libssl")` seems like progress
15:57:08FromDiscord<ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=qJzgvyqU
15:59:15FromDiscord<leorize> opting for libressl is an interesting choice
15:59:25FromDiscord<leorize> you should get the compiler to print the entire link command
16:00:06FromDiscord<leorize> it's likely that libssl got introduced too early in the link command
16:00:50FromDiscord<leorize> the ordering of files in the link command matters, basically
16:01:52*beholders_eye joined #nim
16:08:57FromDiscord<Robyn [She/Her]> In Nim, there's types for params that can move data around instead of copying it, right? I can't remember what it was though
16:10:03FromDiscord<Robyn [She/Her]> I don't mind having the caller's ownership of the data revoked since if the call fails, the data is useless to them, and if it succeeds, it'll be returned in a type anyway
16:12:24FromDiscord<ptramo> @leorize it's at the very end? https://media.discordapp.net/attachments/371759389889003532/1253381951658917898/message.txt?ex=6675a667&is=667454e7&hm=3523ab98116f2e0e4c63e0a448c93e363da9f905deb15e558fdfeefc406d38d2& https://media.discordapp.net/attachments/371759389889003532/1253381951973494794/message.txt?ex=6675a668&is=667454e8&hm=0544db62feeb5c30f04e8177975f69f12a1ffaa5568d9d5ee0682d94a80dc8e7&
16:14:13FromDiscord<leorize> then I'm not sure how it's failing either
16:14:47FromDiscord<leorize> make your type non copyable and moves will be used everywhere↵(@Robyn [She/Her])
16:16:35FromDiscord<Robyn [She/Her]> In reply to @leorize "make your type non": With `proc `=copy`(_: MyType): MyType {.error: "Can't copy MyType".}`?
16:16:43FromDiscord<Robyn [She/Her]> Does that apply to ref types only?
16:16:55FromDiscord<leorize> yea but you don't need an error message
16:17:11FromDiscord<leorize> it does not work for refs
16:17:14FromDiscord<Robyn [She/Her]> Gucci
16:17:37FromDiscord<Robyn [She/Her]> Oh good to know, saves me from having to bother with ref types
16:28:44*fallback joined #nim
16:38:01*fallback quit (Ping timeout: 268 seconds)
16:38:18*lucasta quit (Quit: Leaving)
16:42:27*PMunch quit (Quit: Leaving)
16:43:32FromDiscord<ptramo> well, kinda desperate about statically linking against libressl. too bad.
16:43:41FromDiscord<ptramo> (edit) "libressl." => "libressl on windows." | "libressl on windows.too bad. ... " added "started too easy 😄"
17:06:16FromDiscord<leorize> libressl support in nim is not that great tbf
17:09:55FromDiscord<Robyn [She/Her]> Just realised I could make a macro to rewrite proc names, that might actually save me from entering macro hell again
17:13:41FromDiscord<leorize> mistake #1 of macro usage is thinking that you need macros \:p
17:15:58FromDiscord<Robyn [She/Her]> In reply to @leorize "mistake #1 of macro": Can I rewrite proc names without macros? My reasoning for having macros is that it'll give me much more freedom to optimise the generated code if I really wanted that (I don't) and it'll give me a much nicer way to jump through the call stacktrace dumped by Nim, without going to `gdb` or similar first
17:16:05FromDiscord<Robyn [She/Her]> It was an issue with my last combinator
17:17:17FromDiscord<leorize> maybe make it so that you don't have to rewrite proc names?
17:19:22FromDiscord<Robyn [She/Her]> In reply to @leorize "maybe make it so": Can't, I have to return procs for my combinator and I have to name them something, and I'd prefer descriptive names more than generic names
17:19:34FromDiscord<leorize> and optimizing generated code with macros is rarely the correct choice
17:19:54FromDiscord<nervecenter> Maybe just use a `Table` to associate procs to variously combined string keys at runtime
17:19:57FromDiscord<leorize> s/generated//
17:20:15FromDiscord<nervecenter> `Table`s can store procs as values
17:20:39FromDiscord<Robyn [She/Her]> In reply to @leorize "and optimizing generated code": I could merge proc bodies into one at compile-time :>
17:20:54FromDiscord<leorize> have you benchmarked it?
17:21:11FromDiscord<Robyn [She/Her]> Nope! That's what I'll do if I optimise it, but I'm not doing that anyway
17:21:28FromDiscord<Robyn [She/Her]> In reply to @nervecenter "Maybe just use a": I still need a macro to generate the names anyway
17:21:38FromDiscord<Robyn [She/Her]> Rewriting the proc names just cuts out the middleman
17:21:45FromDiscord<leorize> the trick with most parser combinators is to fuse ops iirc
17:21:55FromDiscord<Robyn [She/Her]> Oh? Wdym?
17:22:03FromDiscord<leorize> optimize the graph and the code will follow
17:22:24FromDiscord<Robyn [She/Her]> Optimise the graph?
17:23:49FromDiscord<leorize> combinators link operations together as a decision graph
17:24:55FromDiscord<Robyn [She/Her]> In my code it's just a bunch of `if` statements
17:25:15FromDiscord<leorize> if you look at the graph, you can easily add caching and/or fusing parsers in different leaves together
17:25:21FromDiscord<Robyn [She/Her]> Isn't a graph a data structure of how data relates to other data?
17:25:53FromDiscord<leorize> if you draw a tree, well that's a graph
17:26:12FromDiscord<Robyn [She/Her]> That loosely makes sense to me
17:26:15FromDiscord<leorize> your if jungle is an ordered graph
17:26:37FromDiscord<leorize> you have an entry point and depends on what happens different branches are taken
17:27:07FromDiscord<Robyn [She/Her]> That makes sense
17:27:23FromDiscord<Robyn [She/Her]> Then the macro is the correct choice to fuse them together, no?
17:27:40FromDiscord<leorize> nope
17:27:55FromDiscord<leorize> well I mean, it can be, but it doesn't have to
17:28:20FromDiscord<Robyn [She/Her]> Then how do I fuse them together without a macro then?
17:28:38FromDiscord<leorize> just normal procs that generate a final `Parser` object
17:28:48FromDiscord<leorize> then `const parser = makeParser()`
17:29:36FromDiscord<Robyn [She/Her]> Oh damn, then the code for combining it runs in the VM?
17:30:06FromDiscord<Robyn [She/Her]> I didn't think of that originally :p
17:30:50FromDiscord<leorize> this is similar to what parsec does, though iirc parsec assemble the final parser at runtime
17:31:29FromDiscord<leorize> you're trying too hard to generate code, that's why \:p
17:32:00FromDiscord<Robyn [She/Her]> Yeah makes sense
17:32:23FromDiscord<Robyn [She/Her]> Oh well, with what you've told me, I should be able to reduce macro usage to a single macro :p
17:32:42FromDiscord<leorize> the only time I've ever do macro chaining is with cps
17:32:55FromDiscord<Robyn [She/Her]> Oh? Why's that?
17:33:03FromDiscord<Robyn [She/Her]> Because `cps` needs macros to transform code?
17:33:38FromDiscord<leorize> cps is more of a nim compiler written in macros
17:34:26FromDiscord<leorize> chaining macros allow for a rather unique layered processing approach that scales extremely well
17:36:17FromDiscord<Robyn [She/Her]> Wdym by layered processing?
17:36:20FromDiscord<leorize> cps processing language have a low level IR that all transformers understand, and what we do is to reduce complex constructs into a simpler IR before handing it off to the next stage
17:36:57FromDiscord<leorize> which reduces the code further until it reaches the baseline language, where we can then stitch the processed regions together
17:38:29*beholders_eye quit (Ping timeout: 240 seconds)
17:38:42*SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev)
17:40:29FromDiscord<double_spiral> Do I have this layout correct? https://media.discordapp.net/attachments/371759389889003532/1253404118232469634/image.png?ex=6675bb0c&is=6674698c&hm=bdd2179bbef00d2872746ae1589bf756f73c91454bdee147e1d66e7cd7604a0e&
17:40:47FromDiscord<leorize> it depends
17:41:08FromDiscord<Robyn [She/Her]> In reply to @leorize "which reduces the code": Huh, neat, and that's why it's fairly easy to pass continuations around, too?
17:41:31FromDiscord<leorize> continuations are easy to pass around because they're meant for that
17:41:37FromDiscord<leorize> the processing stuff is not related \:p
17:43:08FromDiscord<leorize> the layout is dictated by /how/ you want to use the library↵(@double_spiral)
17:43:30FromDiscord<leorize> do you want to just `import x` and then go to town? then you should bundle everything in one file or make it a massive import/export endeavor
17:43:34rockcaveraptramo see this https://github.com/nim-lang/Nim/issues/15220
17:44:15FromDiscord<leorize> do you intend to write a high-level wrapper on top? then it might not make sense to even bother splitting, you can split things up at the higher level wrapper
17:44:25FromDiscord<sOkam! 🫐> or use `treeform/puppy` and not need to link to openssl
17:44:52FromDiscord<leorize> do you intend to just write your code like C? then keeping the structure of the library intact is recommended
17:45:27FromDiscord<double_spiral> In reply to @leorize "do you want to": Thats how the original library works so yeah thats what i was planning
17:45:29rockcaveraptramo I have already managed to link wolfssl instead of openssl from the Nim standard library
17:45:51FromDiscord<double_spiral> How would i go about organizing that one nim file, that would get messy quickly
17:45:55rockcaveraptramo since libressl also has a compatibility layer with openssl, it should be easy
17:46:13FromDiscord<leorize> you could still split it, but then `include` it all in the main file
17:46:25FromDiscord<leorize> rockcavera\: the compat layer is a lie
17:46:53FromDiscord<leorize> it's one of the reasons why distros ceased to attempt libressl support
17:47:01FromDiscord<leorize> they promised not to break 1.1.1 compat and then they just went ahead and do it
17:47:42FromDiscord<leorize> but I'd echo sokam's recommendation, use puppy
17:48:02rockcaveraleorize well, I have no knowledge of libressl
17:48:11FromDiscord<leorize> I consider the Nim's implementation of SSL in std/net to be highly insecure and riddled with potential bugs
17:48:23FromDiscord<leorize> it's best that you don't depend on it
17:48:29FromDiscord<Robyn [She/Her]> In reply to @leorize "the processing stuff is": Fair enough :p
18:15:11*ntat_ is now known as ntat
18:21:00*fallback joined #nim
18:26:47*coldfeet joined #nim
18:36:35*fallback quit (Ping timeout: 260 seconds)
18:47:16FromDiscord<ptramo> mouah ah ah it builds
18:47:23NimEventerNew Nimble package! aptos - aptos library for nim lang, see https://github.com/C-NERD/nimAptos
18:47:29FromDiscord<ptramo> libressl with `-DENABLE_ASM=OFF`
18:47:52FromDiscord<ptramo> In reply to @rockcavera "ptramo I have already": wrong license for me
18:48:06FromDiscord<ptramo> In reply to @rockcavera "ptramo since libressl also": not a compat layer as much as a shared history 🙂
18:49:33FromDiscord<ptramo> puppy looks good, but I'd muuuch rather not depend on libcurl on linux
18:59:26FromDiscord<ptramo> In reply to @leorize "I consider the Nim's": the way it uses the openssl API is unsafe?
19:00:30FromDiscord<leorize> a lot of misuse, rather
19:02:45FromDiscord<ptramo> OK. is there a better HTTP client without messy dependencies?
19:03:08FromDiscord<ptramo> I just packaged static builds of lmdb, lua, libressl, tweetnacl and zstd, I could seriously do without libcurl-like deps 😄
19:03:46rockcaverachronos?
19:03:51FromDiscord<leorize> why would you not want libcurl \:p
19:04:06FromDiscord<leorize> it implements HTTP better than anything nim
19:04:27rockcaverahttps://github.com/status-im/nim-chronos/blob/master/chronos/apps/http/httpclient.nim
19:04:41FromDiscord<ptramo> how closely have you looked at libcurl? 😄
19:05:04FromDiscord<ptramo> `#ifdef LIBRARY_NOBODY_USES #ifdef OS_DEAD_FOR_20_YEARS`
19:05:38FromDiscord<leorize> how closely have you looked at nim stdlib?
19:05:49FromDiscord<ptramo> because everybody needs their downloader CLI to support LDAP and RTSP
19:05:55FromDiscord<leorize> `when not defined(windows): # Disable certificate verification on Windows because of old OpenSSL`
19:05:57FromDiscord<ptramo> (edit) "downloader CLI" => "download CLI/lib"
19:06:12FromDiscord<ptramo> @leorize0713 that's just not true though, AFAICT
19:06:47FromDiscord<ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=OgOVfxRj
19:07:12FromDiscord<leorize> https://github.com/nim-lang/Nim/blob/646bd99d461469f08e656f92ae278d6695b35778/lib/pure/net.nim#L836
19:07:13FromDiscord<leorize> you can find a bunch of those in std/net
19:07:32FromDiscord<ptramo> (edit) "https://play.nim-lang.org/#pasty=YptmGLGB" => "https://play.nim-lang.org/#pasty=lARkYetD"
19:07:58FromDiscord<ptramo> oh damn
19:07:58FromDiscord<ptramo> so it checks that there's a valid cert but not that it's for the correct hostname!?!
19:08:44FromDiscord<leorize> and here's openssl itself
19:08:44FromDiscord<leorize> https://github.com/nim-lang/Nim/blob/646bd99d461469f08e656f92ae278d6695b35778/lib/wrappers/openssl.nim#L832-L834
19:08:44FromDiscord<leorize> welcome to nim
19:09:00FromDiscord<ptramo> OK OK
19:09:03FromDiscord<leorize> and do you know you can perform downgrade attacks with Nim's implementation of SSL?
19:10:20FromDiscord<leorize> and I'm pretty sure TLS 1.3 doesn't work on Windows right now due to a little bug in how OpenSSL 1.1.1 handles ciphersuite configuration
19:10:54FromDiscord<ptramo> and it works with libcurl? 😄
19:10:54FromDiscord<leorize> I even wrote a PR to solve this one, but it's ignored forever so it's dead now
19:11:10FromDiscord<leorize> yea, like it or not libcurl actually knows how to use openssl
19:11:32FromDiscord<leorize> and if you use openssl \> 3.0.2, it doesn't even require cacert.pem because it could pull straight from Windows' CA repository
19:11:35FromDiscord<leorize> neat, isn't it?
19:12:06FromDiscord<ptramo> yeaaah OK I guess I'm game to package yet another lib
19:12:38FromDiscord<ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=XWOVYYlY
19:12:52FromDiscord<ptramo> should I worry about the security of `std/uri` or anything other than `httpclient`?
19:12:56*disso-peach joined #nim
19:14:01FromDiscord<leorize> you'll have to audit that code yourself
19:14:18FromDiscord<leorize> I think there isn't much to mess up with those but you never know
19:16:44FromDiscord<Robyn [She/Her]> In reply to @ptramo "OK. is there a": Puppy fits your need
19:16:55FromDiscord<ptramo> stuff like path normalization is certainly full of gotchas I've never considered, IDK how much I want to audit that. but I guess I bind libcurl's URL handling API instead
19:17:36FromDiscord<Robyn [She/Her]> https://github.com/treeform/puppy?tab=readme-ov-file#about uses different APIs for different platforms
19:17:41FromDiscord<ptramo> (edit) "stuff like path normalization is certainly full of gotchas I've never considered, IDK how much I want to audit that. but I guess I ... bindURI" added "can" | "URL handling" => "URI" | "instead" => "for URIs"
19:17:47FromDiscord<ptramo> does puppy support streaming of the response body?
19:18:06FromDiscord<Robyn [She/Her]> Nope, that's something I wanted as well, unfortunately
19:18:14FromDiscord<ptramo> OK, I'm gonna libcurl everywhere 🙂
19:29:25FromDiscord<Robyn [She/Her]> There's also `curly` which only implements libcurl support
19:45:33*m5zs7k quit (Ping timeout: 252 seconds)
19:47:48*m5zs7k joined #nim
19:51:12*cm quit (Quit: Bye.)
19:52:14*cm joined #nim
19:53:01FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=cVBqdBnc
19:54:04FromDiscord<leorize> use nitely/nim-regex instead
19:54:43FromDiscord<aintea> aren't the standard libraries supposed to work ?
19:55:04FromDiscord<leorize> sure, if it's not called nim
19:55:14FromDiscord<aintea> :kekw:
19:55:23FromDiscord<aintea> thanks mate
19:56:00FromDiscord<leorize> the stdlib is just very under-maintained and efforts to improve it never go far
19:56:41FromDiscord<leorize> for `re`, the problem is that it's fundamentally a C library, so it wouldn't work with `const`
19:57:10FromDiscord<leorize> `const` requires the compiler to be able to run the code at compile-time, which it cannot do for C libraries
19:57:30FromDiscord<leorize> swap `const` to `let` and your code should work
19:58:05FromDiscord<leorize> I'd still recommend nim-regex so that you don't have to carry around a pcre.dll or require libpcre.so wherever you deploy your program
20:00:13FromDiscord<aintea> thanks for the precisions
20:00:18FromDiscord<ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=CUWIatwa
20:00:30FromDiscord<ptramo> seriously. build works for windows and linux but not mac, because of amigaos.c.
20:00:39FromDiscord<aintea> nim was too good, they had to nerf it by giving it bad std libs
20:03:32FromDiscord<leorize> I would've sweared I saw a zig port of curl once
20:03:49FromDiscord<leorize> but now I look at this and it's nowhere to be found\: https://github.com/allyourcodebase
20:10:45FromDiscord<ptramo> OK I've been fighting builds all day, I'm losing my sanity
20:11:34*ntat quit (Quit: Leaving)
20:11:59FromDiscord<Elegantbeef> Well you're using regex so the compiler is just course correcting you 😄↵(@aintea)
20:17:29FromDiscord<leorize> just use vcpkg \:p↵(@ptramo)
20:27:41*coldfeet quit (Remote host closed the connection)
20:30:14FromDiscord<Robyn [She/Her]> I can't figure out why my parse int function goes one beyond the given number in a string...
20:31:14FromDiscord<Robyn [She/Her]> Like, I have the string `"0b110 a_cd"`, and that should go to position 5, but for some reason it keeps going to position 6 with no obvious reason why?
20:31:18FromDiscord<Robyn [She/Her]> I'ma post code
20:32:36FromDiscord<nervecenter> In reply to @aintea "nim was too good,": To be fair this seems like an edge case, I've gotten an enormous amount of mileage out of the stdlib. For example, `std/json` often gets complaints about its speed, but I don't parse huge blobs of JSON data and use it often for its dynamic variant node type, not just for JSON data but as a dynamic map/table. I've even gotten great mileage out of `std/times` but I had to write my own timezone
20:32:56FromDiscord<nervecenter> I also compile with musl statically and have had precious few dependency problems.
20:33:27FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=gfORVXMU
20:33:31FromDiscord<nervecenter> Or really NONE with the standard library, but also with arraymancer and datamancer surprisingly enough.
20:33:37FromDiscord<Robyn [She/Her]> Also seems like the server is down :p
20:36:44FromDiscord<Robyn [She/Her]> For running Nim code in the playground
20:40:32FromDiscord<Robyn [She/Her]> Aah, `parseChar` is running twice
20:40:42*fallback joined #nim
20:41:15FromDiscord<Robyn [She/Her]> Easy fix
21:21:15FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=GCzPQYrJ
21:21:32FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=QElERGDa
21:22:16FromDiscord<Robyn [She/Her]> I was hoping to use a concept here so I didn't need to do `AstNodes = Identifier | String | ...`
21:22:41FromDiscord<Robyn [She/Her]> Oh wait
21:23:10FromDiscord<Robyn [She/Her]> Importing `typetraits` now makes the compiler hang instead of throwing an error
21:23:25FromDiscord<Robyn [She/Her]> The hell-
21:28:29FromDiscord<Robyn [She/Her]> Trying to get a minimal reproduction gives `/home/chronos/test/main.nim(24, 18) Error: object constructor needs an object type [object declared in /home/chronos/test/main.nim(7, 3)]` :/
21:28:52FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=KWtahMPo the code if anyone wants to take a peek
21:32:31FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=XRsYnhsf
21:33:56FromDiscord<Robyn [She/Her]> Ah I wrote it wrong that's why :p
21:35:54FromDiscord<Elegantbeef> ` of {ankIdentifier, ankString}:` the `{}` are redundant btw
21:49:49FromDiscord<Robyn [She/Her]> Didn't know that
21:49:59FromDiscord<Robyn [She/Her]> But yeah, I can't make a minimal reproduction then
21:50:08FromDiscord<Robyn [She/Her]> Since it succeeds there
21:56:50*fallback quit (Ping timeout: 268 seconds)
22:00:48FromDiscord<Robyn [She/Her]> ...oh okay then
22:00:53FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=YsPIJZhP
22:01:13FromDiscord<Robyn [She/Her]> Using a macro avoids this but uuuuuh that's not great
22:01:22FromDiscord<Elegantbeef> Someone is trying to use closures in `const`
22:01:32FromDiscord<Elegantbeef> Or is that 2.0.4
22:02:52FromDiscord<Robyn [She/Her]> It's 2.0.4
22:02:59FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Someone is trying to": That is also me
22:03:07FromDiscord<Robyn [She/Her]> :P
22:06:31FromDiscord<Robyn [She/Her]> Well, now for me to actually implement syntax!
22:06:40FromDiscord<Robyn [She/Her]> I am going to cry! :'D
22:06:47FromDiscord<Robyn [She/Her]> I should implement maths first
22:11:59FromDiscord<monofuel> 🥳 got the new edition of araq's Mastering Nim book
22:21:43FromDiscord<Robyn [She/Her]> Why is Nim's helper procs for macros kinda... Meh?
22:22:07FromDiscord<Robyn [She/Her]> Is it because it didn't start off with a focus on nice API? Or are the helpful APIs internal only?
22:33:38*fallback joined #nim
22:46:57FromDiscord<planetis_m> In reply to @monofuel "🥳 got the": remind me what was added? cause I am not buying it again
22:48:09FromDiscord<monofuel> In reply to @planetis_m "remind me what was": It's very similar, but there's a new section on multithreading
22:48:33FromDiscord<planetis_m> oh ok the thing that doesn't work without -d:usemalloc lol
22:49:00FromDiscord<monofuel> I need to work more on my nim cuda / rocm library sometime. Too many projects
22:49:58FromDiscord<planetis_m> oh shit do tell, do you have a public repo?
22:50:57FromDiscord<monofuel> In reply to @planetis_m "oh shit do tell,": I got some basic examples working https://github.com/monofuel/hippo
22:52:13FromDiscord<monofuel> I had to make some tweaks to nim to work with nvcc and hipcc, i need to tidy up my changes
22:52:29FromDiscord<planetis_m> nice I am just torturing myself with compute shaders https://github.com/planetis-m/vulkan-tut to get to hip I will need a new gpu
22:53:45FromDiscord<monofuel> My linux install is having issues after a fedora update, i need to fix that so i can test things again
22:54:19FromDiscord<leorize> webgpu is a good way to try out some compute \:p
23:45:28FromDiscord<planetis_m> In reply to @leorize "webgpu is a good": Why?
23:48:53FromDiscord<leorize> runs everywhere, have a good native impl, less setup compared to vk
23:51:24FromDiscord<planetis_m> We will see how it goes, I think it's experimental and I don't like my pc crashing and having to restart.
23:53:27FromDiscord<Elegantbeef> I have not had hard crashes from my shaders since using Unity
23:53:46FromDiscord<Elegantbeef> Those were the days, attempt to make a shell renderer that had too many iterations, and my gpu just hard crashed
23:55:43*SchweinDeBurg joined #nim
23:57:53FromDiscord<Robyn [She/Her]> In reply to @planetis_m "We will see how": It's experimental? Haven't heard of that
23:58:19FromDiscord<planetis_m> I had one with a compute example but with a mesa upgrade it works