00:03:00 | FromDiscord | <leorize> you almost can never have a stateless parser \:p↵(@Robyn [She/Her]) |
00:03:32 | FromDiscord | <leorize> the term you want is context-sensitive |
00:04:52 | FromDiscord | <Robyn [She/Her]> Ah okay, then yeah, can I have a context insensitive parser that can handle whitespace? :p |
00:05:32 | FromDiscord | <leorize> depends on what the whitespace does |
00:05:56 | FromDiscord | <Robyn [She/Her]> Thinking about it, especially considering how I want to implement indentation, I'll need a context object anyway |
00:08:08 | FromDiscord | <leorize> context sensitive is not that kind of context if you are wondering \:p |
00:10:17 | FromDiscord | <Robyn [She/Her]> Huh |
00:10:28 | FromDiscord | <Robyn [She/Her]> I don't know the terminology 😭 |
00:10:47 | FromDiscord | <leorize> don't worry too much about it |
00:11:39 | FromDiscord | <leorize> you're writing a recursive descent parser, right? then context sensitivity is more or less an academic classification |
00:12:27 | FromDiscord | <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:05 | FromDiscord | <Robyn [She/Her]> What does recursive descent mean, exactly? Just going from left to right, downwards? |
00:13:58 | FromDiscord | <leorize> https://en.m.wikipedia.org/wiki/Recursive_descent_parser |
00:14:54 | * | SchweinDeBurg joined #nim |
00:16:49 | FromDiscord | <Robyn [She/Her]> I can't use a browser rn aha |
00:17:02 | FromDiscord | <Robyn [She/Her]> I'll try to remember to read it later on |
00:17:42 | FromDiscord | <leorize> it's more or less a parsing pattern |
00:18:01 | FromDiscord | <leorize> if you want to handle indentation like in nim, then I do have the goods for you |
00:18:11 | FromDiscord | <Robyn [She/Her]> Oh? |
00:18:24 | FromDiscord | <leorize> https://michaeldadams.org/papers/layout_parsing_2/ |
00:18:39 | FromDiscord | <Robyn [She/Her]> I have managed to write an indent parser already which is neat at least |
00:19:18 | FromDiscord | <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:11 | FromDiscord | <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:01 | FromDiscord | <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:43 | FromDiscord | <threefour> Moto Razr |
04:11:09 | FromDiscord | <threefour> Oh what the, they make smartphone Razrs now? Well nvm then lol |
05:15:02 | * | ntat joined #nim |
05:30:08 | FromDiscord | <morgan> hm so it seems that for bgfx i will have to link to the separately compiled library |
05:30:31 | FromDiscord | <morgan> but i do have a .h i can probably give to futhark |
05:30:59 | FromDiscord | <morgan> but ofc i get that answer around when im winding down for the night lol |
05:56:01 | NimEventer | New 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:03 | FromDiscord | <Elegantbeef> Hmph odd choice of design, they're using OOP to merge `style` into a single type instead of just pointerprocs |
06:10:13 | FromDiscord | <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:01 | FromDiscord | <frusadev> sent a code paste, see https://play.nim-lang.org/#pasty=MFAWXJWJ |
08:15:19 | FromDiscord | <frusadev> (edit) "https://play.nim-lang.org/#pasty=cANVqJRp" => "https://play.nim-lang.org/#pasty=gkYkqCAd" |
08:16:03 | FromDiscord | <frusadev> (edit) "https://play.nim-lang.org/#pasty=WiyVPbaz" => "https://play.nim-lang.org/#pasty=OaxfAltZ" |
08:16:42 | FromDiscord | <leorize> your Token is a ref type, right? |
08:16:49 | FromDiscord | <frusadev> yes |
08:17:06 | NimEventer | New thread by firyx: Openziti (zero trust networking), see https://forum.nim-lang.org/t/11802 |
08:17:08 | FromDiscord | <leorize> then the problem is that you never changed your currentToken ref |
08:17:24 | FromDiscord | <leorize> so for the entire loop you operated on one token |
08:17:59 | FromDiscord | <frusadev> 🫤 |
08:18:07 | FromDiscord | <leorize> the fix is actually very simple\: just move currentToken into the loop |
08:19:18 | FromDiscord | <frusadev> I thought about it, but i wanted to avoid recreating the variable at every iteration... |
08:19:31 | FromDiscord | <frusadev> Let me test it |
08:20:21 | FromDiscord | <leorize> you can't avoid allocating different tokens for well, different tokens \:p |
08:21:32 | FromDiscord | <frusadev> It works!!😋 |
08:21:33 | FromDiscord | <mratsim> In reply to @leorize "you can't avoid allocating": memory pool / token pool to reuse memory without realloc |
08:22:10 | FromDiscord | <leorize> I'm pretty sure that's implementation details and doesn't detract from my statement |
08:22:20 | FromDiscord | <frusadev> In reply to @leorize "you can't avoid allocating": @leorize I get that 😆 |
08:23:02 | FromDiscord | <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:44 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "what ancient phone are": Samsung J2 Core |
11:58:24 | FromDiscord | <Robyn [She/Her]> It barely runs Discord, let alone Spotify Lite, Spotify just kept crashing |
12:03:13 | FromDiscord | <Robyn [She/Her]> How does quirky exception handling work in Nim? |
12:11:38 | * | pmp-p joined #nim |
12:16:50 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=xWjsPtMN I feel like I can implement `link` better... |
12:20:53 | FromDiscord | <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:50 | FromDiscord | <double_spiral> Can someone link me docs on nimble files? |
14:12:54 | FromDiscord | <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:49 | strogon14 | https://nim-lang.github.io/nimble/create-packages.html |
15:06:49 | strogon14 | https://nim-lang.org/docs/nims.html |
15:06:49 | strogon14 | https://nim-lang.org/docs/nimscript.html |
15:06:58 | FromDiscord | <ptramo> any special care to compile against a static libssl on windows? |
15:07:50 | FromDiscord | <ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=dWuAUdAi |
15:08:21 | FromDiscord | <ptramo> (edit) "https://play.nim-lang.org/#pasty=WdasRJlm" => "https://play.nim-lang.org/#pasty=PKETBYNy" |
15:15:27 | FromDiscord | <spotlightkid> Maybe try `--dynlibOverrideAll`? |
15:15:35 | FromDiscord | <ptramo> that breaks spectacularly |
15:16:14 | FromDiscord | <ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=cbKywUcl |
15:23:33 | FromDiscord | <leorize> the override should for windows is stupid |
15:23:51 | FromDiscord | <leorize> you need to specify exactly libssl-1\_1-x64 |
15:24:09 | FromDiscord | <leorize> and that's not to mention that the wrapper itself is a walking hazard |
15:24:09 | FromDiscord | <leorize> good luck |
15:47:13 | FromDiscord | <ptramo> `switch("dynlibOverride", "(libssl")` seems like progress |
15:57:08 | FromDiscord | <ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=qJzgvyqU |
15:59:15 | FromDiscord | <leorize> opting for libressl is an interesting choice |
15:59:25 | FromDiscord | <leorize> you should get the compiler to print the entire link command |
16:00:06 | FromDiscord | <leorize> it's likely that libssl got introduced too early in the link command |
16:00:50 | FromDiscord | <leorize> the ordering of files in the link command matters, basically |
16:01:52 | * | beholders_eye joined #nim |
16:08:57 | FromDiscord | <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:03 | FromDiscord | <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:24 | FromDiscord | <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:13 | FromDiscord | <leorize> then I'm not sure how it's failing either |
16:14:47 | FromDiscord | <leorize> make your type non copyable and moves will be used everywhere↵(@Robyn [She/Her]) |
16:16:35 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "make your type non": With `proc `=copy`(_: MyType): MyType {.error: "Can't copy MyType".}`? |
16:16:43 | FromDiscord | <Robyn [She/Her]> Does that apply to ref types only? |
16:16:55 | FromDiscord | <leorize> yea but you don't need an error message |
16:17:11 | FromDiscord | <leorize> it does not work for refs |
16:17:14 | FromDiscord | <Robyn [She/Her]> Gucci |
16:17:37 | FromDiscord | <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:32 | FromDiscord | <ptramo> well, kinda desperate about statically linking against libressl. too bad. |
16:43:41 | FromDiscord | <ptramo> (edit) "libressl." => "libressl on windows." | "libressl on windows.too bad. ... " added "started too easy 😄" |
17:06:16 | FromDiscord | <leorize> libressl support in nim is not that great tbf |
17:09:55 | FromDiscord | <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:41 | FromDiscord | <leorize> mistake #1 of macro usage is thinking that you need macros \:p |
17:15:58 | FromDiscord | <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:05 | FromDiscord | <Robyn [She/Her]> It was an issue with my last combinator |
17:17:17 | FromDiscord | <leorize> maybe make it so that you don't have to rewrite proc names? |
17:19:22 | FromDiscord | <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:34 | FromDiscord | <leorize> and optimizing generated code with macros is rarely the correct choice |
17:19:54 | FromDiscord | <nervecenter> Maybe just use a `Table` to associate procs to variously combined string keys at runtime |
17:19:57 | FromDiscord | <leorize> s/generated// |
17:20:15 | FromDiscord | <nervecenter> `Table`s can store procs as values |
17:20:39 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "and optimizing generated code": I could merge proc bodies into one at compile-time :> |
17:20:54 | FromDiscord | <leorize> have you benchmarked it? |
17:21:11 | FromDiscord | <Robyn [She/Her]> Nope! That's what I'll do if I optimise it, but I'm not doing that anyway |
17:21:28 | FromDiscord | <Robyn [She/Her]> In reply to @nervecenter "Maybe just use a": I still need a macro to generate the names anyway |
17:21:38 | FromDiscord | <Robyn [She/Her]> Rewriting the proc names just cuts out the middleman |
17:21:45 | FromDiscord | <leorize> the trick with most parser combinators is to fuse ops iirc |
17:21:55 | FromDiscord | <Robyn [She/Her]> Oh? Wdym? |
17:22:03 | FromDiscord | <leorize> optimize the graph and the code will follow |
17:22:24 | FromDiscord | <Robyn [She/Her]> Optimise the graph? |
17:23:49 | FromDiscord | <leorize> combinators link operations together as a decision graph |
17:24:55 | FromDiscord | <Robyn [She/Her]> In my code it's just a bunch of `if` statements |
17:25:15 | FromDiscord | <leorize> if you look at the graph, you can easily add caching and/or fusing parsers in different leaves together |
17:25:21 | FromDiscord | <Robyn [She/Her]> Isn't a graph a data structure of how data relates to other data? |
17:25:53 | FromDiscord | <leorize> if you draw a tree, well that's a graph |
17:26:12 | FromDiscord | <Robyn [She/Her]> That loosely makes sense to me |
17:26:15 | FromDiscord | <leorize> your if jungle is an ordered graph |
17:26:37 | FromDiscord | <leorize> you have an entry point and depends on what happens different branches are taken |
17:27:07 | FromDiscord | <Robyn [She/Her]> That makes sense |
17:27:23 | FromDiscord | <Robyn [She/Her]> Then the macro is the correct choice to fuse them together, no? |
17:27:40 | FromDiscord | <leorize> nope |
17:27:55 | FromDiscord | <leorize> well I mean, it can be, but it doesn't have to |
17:28:20 | FromDiscord | <Robyn [She/Her]> Then how do I fuse them together without a macro then? |
17:28:38 | FromDiscord | <leorize> just normal procs that generate a final `Parser` object |
17:28:48 | FromDiscord | <leorize> then `const parser = makeParser()` |
17:29:36 | FromDiscord | <Robyn [She/Her]> Oh damn, then the code for combining it runs in the VM? |
17:30:06 | FromDiscord | <Robyn [She/Her]> I didn't think of that originally :p |
17:30:50 | FromDiscord | <leorize> this is similar to what parsec does, though iirc parsec assemble the final parser at runtime |
17:31:29 | FromDiscord | <leorize> you're trying too hard to generate code, that's why \:p |
17:32:00 | FromDiscord | <Robyn [She/Her]> Yeah makes sense |
17:32:23 | FromDiscord | <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:42 | FromDiscord | <leorize> the only time I've ever do macro chaining is with cps |
17:32:55 | FromDiscord | <Robyn [She/Her]> Oh? Why's that? |
17:33:03 | FromDiscord | <Robyn [She/Her]> Because `cps` needs macros to transform code? |
17:33:38 | FromDiscord | <leorize> cps is more of a nim compiler written in macros |
17:34:26 | FromDiscord | <leorize> chaining macros allow for a rather unique layered processing approach that scales extremely well |
17:36:17 | FromDiscord | <Robyn [She/Her]> Wdym by layered processing? |
17:36:20 | FromDiscord | <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:57 | FromDiscord | <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:29 | FromDiscord | <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:47 | FromDiscord | <leorize> it depends |
17:41:08 | FromDiscord | <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:31 | FromDiscord | <leorize> continuations are easy to pass around because they're meant for that |
17:41:37 | FromDiscord | <leorize> the processing stuff is not related \:p |
17:43:08 | FromDiscord | <leorize> the layout is dictated by /how/ you want to use the library↵(@double_spiral) |
17:43:30 | FromDiscord | <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:34 | rockcavera | ptramo see this https://github.com/nim-lang/Nim/issues/15220 |
17:44:15 | FromDiscord | <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:25 | FromDiscord | <sOkam! 🫐> or use `treeform/puppy` and not need to link to openssl |
17:44:52 | FromDiscord | <leorize> do you intend to just write your code like C? then keeping the structure of the library intact is recommended |
17:45:27 | FromDiscord | <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:29 | rockcavera | ptramo I have already managed to link wolfssl instead of openssl from the Nim standard library |
17:45:51 | FromDiscord | <double_spiral> How would i go about organizing that one nim file, that would get messy quickly |
17:45:55 | rockcavera | ptramo since libressl also has a compatibility layer with openssl, it should be easy |
17:46:13 | FromDiscord | <leorize> you could still split it, but then `include` it all in the main file |
17:46:25 | FromDiscord | <leorize> rockcavera\: the compat layer is a lie |
17:46:53 | FromDiscord | <leorize> it's one of the reasons why distros ceased to attempt libressl support |
17:47:01 | FromDiscord | <leorize> they promised not to break 1.1.1 compat and then they just went ahead and do it |
17:47:42 | FromDiscord | <leorize> but I'd echo sokam's recommendation, use puppy |
17:48:02 | rockcavera | leorize well, I have no knowledge of libressl |
17:48:11 | FromDiscord | <leorize> I consider the Nim's implementation of SSL in std/net to be highly insecure and riddled with potential bugs |
17:48:23 | FromDiscord | <leorize> it's best that you don't depend on it |
17:48:29 | FromDiscord | <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:16 | FromDiscord | <ptramo> mouah ah ah it builds |
18:47:23 | NimEventer | New Nimble package! aptos - aptos library for nim lang, see https://github.com/C-NERD/nimAptos |
18:47:29 | FromDiscord | <ptramo> libressl with `-DENABLE_ASM=OFF` |
18:47:52 | FromDiscord | <ptramo> In reply to @rockcavera "ptramo I have already": wrong license for me |
18:48:06 | FromDiscord | <ptramo> In reply to @rockcavera "ptramo since libressl also": not a compat layer as much as a shared history 🙂 |
18:49:33 | FromDiscord | <ptramo> puppy looks good, but I'd muuuch rather not depend on libcurl on linux |
18:59:26 | FromDiscord | <ptramo> In reply to @leorize "I consider the Nim's": the way it uses the openssl API is unsafe? |
19:00:30 | FromDiscord | <leorize> a lot of misuse, rather |
19:02:45 | FromDiscord | <ptramo> OK. is there a better HTTP client without messy dependencies? |
19:03:08 | FromDiscord | <ptramo> I just packaged static builds of lmdb, lua, libressl, tweetnacl and zstd, I could seriously do without libcurl-like deps 😄 |
19:03:46 | rockcavera | chronos? |
19:03:51 | FromDiscord | <leorize> why would you not want libcurl \:p |
19:04:06 | FromDiscord | <leorize> it implements HTTP better than anything nim |
19:04:27 | rockcavera | https://github.com/status-im/nim-chronos/blob/master/chronos/apps/http/httpclient.nim |
19:04:41 | FromDiscord | <ptramo> how closely have you looked at libcurl? 😄 |
19:05:04 | FromDiscord | <ptramo> `#ifdef LIBRARY_NOBODY_USES #ifdef OS_DEAD_FOR_20_YEARS` |
19:05:38 | FromDiscord | <leorize> how closely have you looked at nim stdlib? |
19:05:49 | FromDiscord | <ptramo> because everybody needs their downloader CLI to support LDAP and RTSP |
19:05:55 | FromDiscord | <leorize> `when not defined(windows): # Disable certificate verification on Windows because of old OpenSSL` |
19:05:57 | FromDiscord | <ptramo> (edit) "downloader CLI" => "download CLI/lib" |
19:06:12 | FromDiscord | <ptramo> @leorize0713 that's just not true though, AFAICT |
19:06:47 | FromDiscord | <ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=OgOVfxRj |
19:07:12 | FromDiscord | <leorize> https://github.com/nim-lang/Nim/blob/646bd99d461469f08e656f92ae278d6695b35778/lib/pure/net.nim#L836 |
19:07:13 | FromDiscord | <leorize> you can find a bunch of those in std/net |
19:07:32 | FromDiscord | <ptramo> (edit) "https://play.nim-lang.org/#pasty=YptmGLGB" => "https://play.nim-lang.org/#pasty=lARkYetD" |
19:07:58 | FromDiscord | <ptramo> oh damn |
19:07:58 | FromDiscord | <ptramo> so it checks that there's a valid cert but not that it's for the correct hostname!?! |
19:08:44 | FromDiscord | <leorize> and here's openssl itself |
19:08:44 | FromDiscord | <leorize> https://github.com/nim-lang/Nim/blob/646bd99d461469f08e656f92ae278d6695b35778/lib/wrappers/openssl.nim#L832-L834 |
19:08:44 | FromDiscord | <leorize> welcome to nim |
19:09:00 | FromDiscord | <ptramo> OK OK |
19:09:03 | FromDiscord | <leorize> and do you know you can perform downgrade attacks with Nim's implementation of SSL? |
19:10:20 | FromDiscord | <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:54 | FromDiscord | <ptramo> and it works with libcurl? 😄 |
19:10:54 | FromDiscord | <leorize> I even wrote a PR to solve this one, but it's ignored forever so it's dead now |
19:11:10 | FromDiscord | <leorize> yea, like it or not libcurl actually knows how to use openssl |
19:11:32 | FromDiscord | <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:35 | FromDiscord | <leorize> neat, isn't it? |
19:12:06 | FromDiscord | <ptramo> yeaaah OK I guess I'm game to package yet another lib |
19:12:38 | FromDiscord | <ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=XWOVYYlY |
19:12:52 | FromDiscord | <ptramo> should I worry about the security of `std/uri` or anything other than `httpclient`? |
19:12:56 | * | disso-peach joined #nim |
19:14:01 | FromDiscord | <leorize> you'll have to audit that code yourself |
19:14:18 | FromDiscord | <leorize> I think there isn't much to mess up with those but you never know |
19:16:44 | FromDiscord | <Robyn [She/Her]> In reply to @ptramo "OK. is there a": Puppy fits your need |
19:16:55 | FromDiscord | <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:36 | FromDiscord | <Robyn [She/Her]> https://github.com/treeform/puppy?tab=readme-ov-file#about uses different APIs for different platforms |
19:17:41 | FromDiscord | <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:47 | FromDiscord | <ptramo> does puppy support streaming of the response body? |
19:18:06 | FromDiscord | <Robyn [She/Her]> Nope, that's something I wanted as well, unfortunately |
19:18:14 | FromDiscord | <ptramo> OK, I'm gonna libcurl everywhere 🙂 |
19:29:25 | FromDiscord | <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:01 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=cVBqdBnc |
19:54:04 | FromDiscord | <leorize> use nitely/nim-regex instead |
19:54:43 | FromDiscord | <aintea> aren't the standard libraries supposed to work ? |
19:55:04 | FromDiscord | <leorize> sure, if it's not called nim |
19:55:14 | FromDiscord | <aintea> :kekw: |
19:55:23 | FromDiscord | <aintea> thanks mate |
19:56:00 | FromDiscord | <leorize> the stdlib is just very under-maintained and efforts to improve it never go far |
19:56:41 | FromDiscord | <leorize> for `re`, the problem is that it's fundamentally a C library, so it wouldn't work with `const` |
19:57:10 | FromDiscord | <leorize> `const` requires the compiler to be able to run the code at compile-time, which it cannot do for C libraries |
19:57:30 | FromDiscord | <leorize> swap `const` to `let` and your code should work |
19:58:05 | FromDiscord | <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:13 | FromDiscord | <aintea> thanks for the precisions |
20:00:18 | FromDiscord | <ptramo> sent a code paste, see https://play.nim-lang.org/#pasty=CUWIatwa |
20:00:30 | FromDiscord | <ptramo> seriously. build works for windows and linux but not mac, because of amigaos.c. |
20:00:39 | FromDiscord | <aintea> nim was too good, they had to nerf it by giving it bad std libs |
20:03:32 | FromDiscord | <leorize> I would've sweared I saw a zig port of curl once |
20:03:49 | FromDiscord | <leorize> but now I look at this and it's nowhere to be found\: https://github.com/allyourcodebase |
20:10:45 | FromDiscord | <ptramo> OK I've been fighting builds all day, I'm losing my sanity |
20:11:34 | * | ntat quit (Quit: Leaving) |
20:11:59 | FromDiscord | <Elegantbeef> Well you're using regex so the compiler is just course correcting you 😄↵(@aintea) |
20:17:29 | FromDiscord | <leorize> just use vcpkg \:p↵(@ptramo) |
20:27:41 | * | coldfeet quit (Remote host closed the connection) |
20:30:14 | FromDiscord | <Robyn [She/Her]> I can't figure out why my parse int function goes one beyond the given number in a string... |
20:31:14 | FromDiscord | <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:18 | FromDiscord | <Robyn [She/Her]> I'ma post code |
20:32:36 | FromDiscord | <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:56 | FromDiscord | <nervecenter> I also compile with musl statically and have had precious few dependency problems. |
20:33:27 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=gfORVXMU |
20:33:31 | FromDiscord | <nervecenter> Or really NONE with the standard library, but also with arraymancer and datamancer surprisingly enough. |
20:33:37 | FromDiscord | <Robyn [She/Her]> Also seems like the server is down :p |
20:36:44 | FromDiscord | <Robyn [She/Her]> For running Nim code in the playground |
20:40:32 | FromDiscord | <Robyn [She/Her]> Aah, `parseChar` is running twice |
20:40:42 | * | fallback joined #nim |
20:41:15 | FromDiscord | <Robyn [She/Her]> Easy fix |
21:21:15 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=GCzPQYrJ |
21:21:32 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=QElERGDa |
21:22:16 | FromDiscord | <Robyn [She/Her]> I was hoping to use a concept here so I didn't need to do `AstNodes = Identifier | String | ...` |
21:22:41 | FromDiscord | <Robyn [She/Her]> Oh wait |
21:23:10 | FromDiscord | <Robyn [She/Her]> Importing `typetraits` now makes the compiler hang instead of throwing an error |
21:23:25 | FromDiscord | <Robyn [She/Her]> The hell- |
21:28:29 | FromDiscord | <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:52 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=KWtahMPo the code if anyone wants to take a peek |
21:32:31 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=XRsYnhsf |
21:33:56 | FromDiscord | <Robyn [She/Her]> Ah I wrote it wrong that's why :p |
21:35:54 | FromDiscord | <Elegantbeef> ` of {ankIdentifier, ankString}:` the `{}` are redundant btw |
21:49:49 | FromDiscord | <Robyn [She/Her]> Didn't know that |
21:49:59 | FromDiscord | <Robyn [She/Her]> But yeah, I can't make a minimal reproduction then |
21:50:08 | FromDiscord | <Robyn [She/Her]> Since it succeeds there |
21:56:50 | * | fallback quit (Ping timeout: 268 seconds) |
22:00:48 | FromDiscord | <Robyn [She/Her]> ...oh okay then |
22:00:53 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=YsPIJZhP |
22:01:13 | FromDiscord | <Robyn [She/Her]> Using a macro avoids this but uuuuuh that's not great |
22:01:22 | FromDiscord | <Elegantbeef> Someone is trying to use closures in `const` |
22:01:32 | FromDiscord | <Elegantbeef> Or is that 2.0.4 |
22:02:52 | FromDiscord | <Robyn [She/Her]> It's 2.0.4 |
22:02:59 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Someone is trying to": That is also me |
22:03:07 | FromDiscord | <Robyn [She/Her]> :P |
22:06:31 | FromDiscord | <Robyn [She/Her]> Well, now for me to actually implement syntax! |
22:06:40 | FromDiscord | <Robyn [She/Her]> I am going to cry! :'D |
22:06:47 | FromDiscord | <Robyn [She/Her]> I should implement maths first |
22:11:59 | FromDiscord | <monofuel> 🥳 got the new edition of araq's Mastering Nim book |
22:21:43 | FromDiscord | <Robyn [She/Her]> Why is Nim's helper procs for macros kinda... Meh? |
22:22:07 | FromDiscord | <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:57 | FromDiscord | <planetis_m> In reply to @monofuel "🥳 got the": remind me what was added? cause I am not buying it again |
22:48:09 | FromDiscord | <monofuel> In reply to @planetis_m "remind me what was": It's very similar, but there's a new section on multithreading |
22:48:33 | FromDiscord | <planetis_m> oh ok the thing that doesn't work without -d:usemalloc lol |
22:49:00 | FromDiscord | <monofuel> I need to work more on my nim cuda / rocm library sometime. Too many projects |
22:49:58 | FromDiscord | <planetis_m> oh shit do tell, do you have a public repo? |
22:50:57 | FromDiscord | <monofuel> In reply to @planetis_m "oh shit do tell,": I got some basic examples working https://github.com/monofuel/hippo |
22:52:13 | FromDiscord | <monofuel> I had to make some tweaks to nim to work with nvcc and hipcc, i need to tidy up my changes |
22:52:29 | FromDiscord | <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:45 | FromDiscord | <monofuel> My linux install is having issues after a fedora update, i need to fix that so i can test things again |
22:54:19 | FromDiscord | <leorize> webgpu is a good way to try out some compute \:p |
23:45:28 | FromDiscord | <planetis_m> In reply to @leorize "webgpu is a good": Why? |
23:48:53 | FromDiscord | <leorize> runs everywhere, have a good native impl, less setup compared to vk |
23:51:24 | FromDiscord | <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:27 | FromDiscord | <Elegantbeef> I have not had hard crashes from my shaders since using Unity |
23:53:46 | FromDiscord | <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:53 | FromDiscord | <Robyn [She/Her]> In reply to @planetis_m "We will see how": It's experimental? Haven't heard of that |
23:58:19 | FromDiscord | <planetis_m> I had one with a compute example but with a mesa upgrade it works |