00:01:09 | FromDiscord | <planetis_m> In reply to @chronos.vitaqua "It's experimental? Haven't heard": very much bleading edge |
00:01:21 | FromDiscord | <planetis_m> I am not becoming their beta tester |
00:01:55 | FromDiscord | <Robyn [She/Her]> Lol fair enough |
00:02:03 | FromDiscord | <Robyn [She/Her]> Isn't Dawn also a thing? |
00:02:29 | FromDiscord | <Robyn [She/Her]> There's WGPU and Dawn iirc, both implement WebGPU? |
00:03:09 | FromDiscord | <planetis_m> Not my problem, again not messing with new tech |
00:04:18 | FromDiscord | <Robyn [She/Her]> Suit yourself |
00:05:47 | FromDiscord | <planetis_m> Sure sure, I will be "missing out" blah blah |
00:07:29 | FromDiscord | <Elegantbeef> Me deeply sniffing opengl fumes\: "Missing out?!" |
00:07:36 | FromDiscord | <Robyn [She/Her]> Nah, if you wanna not use something, it's your choice and you have your reasons and that's fine |
00:25:53 | FromDiscord | <leorize> uh webgpu is just vulkan on \nix and dx12 on windows |
00:26:30 | FromDiscord | <Elegantbeef> It's not vulkan on mac silly guy |
00:27:56 | FromDiscord | <leorize> the point is that it doesn't do anything you can't with vulkan \:p |
00:27:57 | FromDiscord | <MDuardo> Metal? |
00:28:19 | FromDiscord | <Elegantbeef> Right we just write opengl and use zink to get vulkan 😛 |
00:28:25 | FromDiscord | <Elegantbeef> We being me |
00:28:43 | FromDiscord | <leorize> webgpu doesn't use global context though xd |
00:28:44 | FromDiscord | <Elegantbeef> Is there any benefit... no, but can I falsely say it's a vulkan compute system... also no |
00:29:33 | FromDiscord | <Robyn [She/Her]> Does Zink give better perf than just OpenGL? |
00:29:39 | FromDiscord | <leorize> no |
00:29:48 | FromDiscord | <Elegantbeef> Cmon leo modern opengl only loosely uses the global contexty |
00:29:49 | FromDiscord | <leorize> webgpu is really just vulkan for dumb people |
00:30:09 | FromDiscord | <leorize> and I love that shit xd |
00:30:12 | FromDiscord | <Elegantbeef> Zink gives you software support on platforms with bad or lacking opengl drivers |
00:30:26 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "and I love that": Fair |
00:30:37 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Zink gives you software": Fair |
00:30:47 | FromDiscord | <leorize> zink might give you better perf if you use Intel arc \:p |
00:30:56 | FromDiscord | <Elegantbeef> Yea |
00:31:01 | FromDiscord | <Elegantbeef> But no one uses arc |
00:31:05 | FromDiscord | <Elegantbeef> So no one gets benefits |
00:31:27 | FromDiscord | <Elegantbeef> On mac though you cannot use zink, you can on android though |
00:31:50 | FromDiscord | <leorize> see you just have to zink -\> moltenvk |
00:31:56 | FromDiscord | <leorize> easy peasy |
00:32:23 | FromDiscord | <Elegantbeef> I say you can but https://github.com/AOF-Dev/mesa-swdroid is a fork and not official |
00:32:29 | FromDiscord | <Elegantbeef> So whether it works is another thing |
02:09:56 | * | SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev) |
03:43:01 | * | redj_ quit (Remote host closed the connection) |
03:44:23 | * | redj joined #nim |
03:44:52 | * | SchweinDeBurg joined #nim |
05:06:20 | * | ntat joined #nim |
05:08:12 | * | rockcavera quit (Remote host closed the connection) |
05:36:13 | * | krux02 quit (Remote host closed the connection) |
05:58:33 | FromDiscord | <maxb0tbeep> hey, when i use `execCmdEx()` the command doesnt retain, like for example, if i run a cd command it will not stay in that directory afterwards |
05:59:17 | FromDiscord | <maxb0tbeep> is there any way to change this behavior, other than adding `&&` and running all commands in the same line? |
06:04:58 | FromDiscord | <m4ul3r> In reply to @maxb0tbeep "is there any way": There should be a change directory command that you can run |
06:05:47 | FromDiscord | <m4ul3r> (edit) "command" => "proc" |
06:05:59 | FromDiscord | <m4ul3r> setCurrentDir |
06:07:08 | FromDiscord | <m4ul3r> https://nim-lang.org/docs/dirs.html#setCurrentDir%2CPath |
06:16:54 | FromDiscord | <maxb0tbeep> yeah but like other commands too |
06:19:16 | FromDiscord | <m4ul3r> The commands will run and you’ll get output and the return code returned, is there something else that’s not persistent across running shell commands? |
06:20:31 | FromDiscord | <Elegantbeef> The shell manages path for it's instance, if you want to change what directory a shell opens in you need to use `setCurrentDir` |
06:20:39 | FromDiscord | <Elegantbeef> Or the shell's arguments |
06:21:02 | FromDiscord | <maxb0tbeep> In reply to @m4ul3r "The commands will run": actually cd is the only thing that comes to mind |
06:21:52 | FromDiscord | <maxb0tbeep> i was doing `execCmdEx("cd <something> && <something else>") |
06:22:00 | FromDiscord | <maxb0tbeep> (edit) "else>")" => "else>")`" |
06:22:29 | FromDiscord | <maxb0tbeep> but `setCurrentDir` isnt actually any different? |
06:22:38 | FromDiscord | <Elegantbeef> It's no different to running `bash -c "cd /tmp; exit"` |
06:22:47 | FromDiscord | <Elegantbeef> you are not going to move path from the program |
06:22:51 | FromDiscord | <maxb0tbeep> the directory changes back to the original one after the program ends |
06:22:53 | FromDiscord | <Elegantbeef> `setCurrentDir` does set path |
06:22:55 | FromDiscord | <m4ul3r> It changes the current dir of the child process |
06:23:03 | FromDiscord | <m4ul3r> Ie the bash command ran |
06:23:06 | FromDiscord | <Elegantbeef> You cannot permanently change the path |
06:23:12 | FromDiscord | <m4ul3r> Then that child process will exit |
06:23:15 | FromDiscord | <Elegantbeef> You need to return the path then do `cd $(myProgram)` |
06:23:36 | FromDiscord | <Elegantbeef> So if you did `echo getCurrentDir()` at the end of the program it'd set the path |
06:25:25 | FromDiscord | <maxb0tbeep> sorry, i'm not following |
06:25:38 | FromDiscord | <maxb0tbeep> is there a way to set the path after the program exits? |
06:25:44 | FromDiscord | <Elegantbeef> No |
06:25:48 | FromDiscord | <maxb0tbeep> ok |
06:27:58 | FromDiscord | <m4ul3r> It’s possible, but not in nim stdlib I believe |
06:28:28 | FromDiscord | <Elegantbeef> It's not possible cause shells do not enable it |
06:28:45 | FromDiscord | <Elegantbeef> You can `putEnv("PWD", ...)` and you get nowhere |
06:28:47 | FromDiscord | <m4ul3r> You would be able to just change the cwd of the parent process? |
06:29:46 | FromDiscord | <Elegantbeef> I mean you'd write out to the stdout the desired path then do `cd $(myProcess)` |
06:30:08 | FromDiscord | <Elegantbeef> There is no way to tell the parent shell to change it's directory |
06:30:50 | FromDiscord | <Elegantbeef> You can obviously cheat and use debug utils to attach to the parent process and call specific code, but that's not portable, silly, and likely to explode |
06:52:59 | FromDiscord | <m4ul3r> Yeah you right. There’s checky ways to do it but good and most likely have to run as root |
07:16:10 | FromDiscord | <nnsee> sent a long message, see https://pasty.ee/hNzayWYK |
07:16:26 | * | disso-peach quit (Quit: Leaving) |
07:17:17 | FromDiscord | <nnsee> child processes inherit the parent's cwd _when they start_. this pretty obviously can't work the other way around because the parent is already running |
07:21:50 | FromDiscord | <nnsee> In reply to @maxb0tbeep "i was doing `execCmdEx("cd": so here, when you were doing `cd`, you were doing it in a child process (or, well, child of a child, since it spawns a new shell for each command executed), and obviously that can't propagate up to the parent process _unless_ you specially make the parent process listen to what directory the child wants to change the cwd to, and executes `cd` itself when the child exits. this is what b |
07:23:54 | FromDiscord | <nnsee> making a shell script that wraps your nim program and does that is trivial, however, you'd have to use `source [file]` or `. [file]` to execute it, otherwise the cd would yet again only affect the subshell in which the script is running, and not the parent shell itself |
07:24:46 | FromDiscord | <nnsee> my phone keeps wanting to correct shell to she'll and it's infuriating |
08:21:23 | FromDiscord | <basilajith> While inserting values into Postgres using db_postgres, how do I insert the Postgres datatype NULL? Would the string "NULL" suffice? |
08:28:06 | * | redj quit (Quit: No Ping reply in 180 seconds.) |
08:29:33 | * | redj joined #nim |
10:13:06 | * | beholders_eye joined #nim |
11:34:11 | * | beholders_eye quit (Ping timeout: 264 seconds) |
12:12:39 | * | SebastianM joined #nim |
12:17:30 | * | SebastianM quit (Ping timeout: 256 seconds) |
12:18:48 | * | coldfeet joined #nim |
12:25:54 | * | SebastianM joined #nim |
13:09:11 | * | SebastianM quit (Ping timeout: 268 seconds) |
13:13:31 | FromDiscord | <albassort> In reply to @basilajith "While inserting values into": i would insert a null byte? |
13:13:44 | FromDiscord | <albassort> Do tell me what you ended up doing |
13:14:02 | * | rockcavera joined #nim |
14:12:19 | FromDiscord | <xtrayambak> Is there a way to get debugging symbols that gdb can understand? |
14:17:13 | FromDiscord | <albassort> In reply to @xtrayambak "Is there a way": --debugger:native -use:malloc |
14:17:17 | FromDiscord | <albassort> (edit) "-use:malloc" => "--use:malloc" |
14:17:24 | FromDiscord | <xtrayambak> ah |
14:17:25 | FromDiscord | <xtrayambak> thanks |
14:17:25 | FromDiscord | <albassort> gdb can work with that |
14:17:53 | FromDiscord | <xtrayambak> shouldn't it be `-d:useMalloc`? |
14:17:58 | FromDiscord | <xtrayambak> or I'm wrong |
14:18:05 | FromDiscord | <griffith1deadly> In reply to @xtrayambak "shouldn't it be `-d:useMalloc`?": should |
14:18:33 | FromDiscord | <xtrayambak> yep, seems to work perfectly now |
14:18:35 | FromDiscord | <xtrayambak> thank you |
14:20:40 | FromDiscord | <albassort> sorry for the typo lol |
14:21:17 | FromDiscord | <albassort> pretty sure i got it confused with --gc:malloc |
14:21:41 | FromDiscord | <albassort> (edit) "--gc:malloc" => "--gc:" |
14:29:18 | FromDiscord | <xtrayambak> by the way, is there a way to cast a block of memory to a function pointer? |
14:29:36 | FromDiscord | <xtrayambak> it's already marked as an executable region and stuff |
14:33:56 | FromDiscord | <albassort> uhhh |
14:35:37 | FromDiscord | <albassort> I don't think you would be able to execute it |
14:35:40 | FromDiscord | <albassort> (edit) "I don't think you would be able to execute it ... " added "in nim" |
14:35:42 | FromDiscord | <albassort> but im not sure |
14:36:25 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "by the way, is": `cast[yourProcSignature](memoryAddress)`? |
14:36:30 | FromDiscord | <albassort> i tried this |
14:36:37 | FromDiscord | <xtrayambak> weirdly enough, that causes a segfault |
14:36:47 | FromDiscord | <Robyn [She/Her]> Just make sure you use whatever the calling convention for C is, in Nim |
14:36:52 | FromDiscord | <xtrayambak> I poked at the memory and I'm probably doing something wrong |
14:36:59 | FromDiscord | <xtrayambak> it has a single `jo` instruction |
14:37:18 | FromDiscord | <xtrayambak> hold on |
14:37:21 | FromDiscord | <Robyn [She/Her]> You can always emit C code if needed |
14:37:36 | FromDiscord | <albassort> share your code |
14:37:38 | FromDiscord | <xtrayambak> is it even proper to read a `.o` file, turn it into a sequence of bytes and try to execute that? |
14:37:40 | FromDiscord | <albassort> i wanna see this |
14:37:52 | FromDiscord | <albassort> In reply to @xtrayambak "is it even proper": very improper |
14:38:02 | FromDiscord | <albassort> I don't know why you would do that |
14:38:02 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "is it even proper": Aren't .o files for linking? |
14:38:04 | FromDiscord | <xtrayambak> In reply to @albassort "very improper": don't be half asleep whilst writing code, kids |
14:38:16 | FromDiscord | <albassort> also yes, .o are for linking |
14:38:22 | FromDiscord | <albassort> you'd want a .so or a .d, at the very least |
14:38:25 | FromDiscord | <xtrayambak> ah |
14:38:28 | FromDiscord | <Robyn [She/Her]> Yeah exactly |
14:38:40 | FromDiscord | <xtrayambak> what should I trigger after the assembler to do that, then? |
14:38:40 | FromDiscord | <albassort> but we have ways to actually use dynamic objects and static objects |
14:38:42 | FromDiscord | <.lisuwu_> what is a .d |
14:38:46 | FromDiscord | <albassort> static binary |
14:38:48 | FromDiscord | <xtrayambak> (sorry, I'm pretty inexperienced with stuff) |
14:38:52 | FromDiscord | <albassort> (edit) "binary" => "library" |
14:38:58 | FromDiscord | <xtrayambak> In reply to @albassort "but we have ways": the `dlopen` stuff? |
14:39:01 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "(sorry, I'm pretty inexperienced": No sweat, so am I xD |
14:39:10 | FromDiscord | <albassort> I haven't done it in years... |
14:39:11 | FromDiscord | <xtrayambak> (edit) "(sorry, I'm pretty inexperienced with ... stuff)" added "this" |
14:39:14 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "the `dlopen` stuff?": There's `std/dynlib` |
14:40:16 | * | xet7 quit (Remote host closed the connection) |
14:40:17 | FromDiscord | <xtrayambak> can it load a `.o` file and run a symbol/function inside of it, though? |
14:40:28 | FromDiscord | <xtrayambak> I'm trying to cheese my way out of this problem right now 😅 |
14:40:43 | FromDiscord | <albassort> yeah it can load any c things inside a library, but not a .o its only the linkers output |
14:40:54 | FromDiscord | <albassort> .o's make .so and .ds |
14:40:57 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "can it load a": You'd need to link it together aha |
14:40:58 | FromDiscord | <albassort> (edit) ".ds" => ".d's" |
14:41:03 | FromDiscord | <xtrayambak> ah |
14:41:15 | FromDiscord | <xtrayambak> I'm actually generating the ASM code for it dynamically and assembling it at runtime |
14:41:34 | FromDiscord | <albassort> this sounds... dangerous |
14:41:39 | FromDiscord | <Robyn [She/Her]> Huh, you making a JIT? |
14:41:47 | FromDiscord | <albassort> thats like taking ASM at run- |
14:41:47 | FromDiscord | <xtrayambak> In reply to @chronos.vitaqua "Huh, you making a": Yep |
14:41:49 | FromDiscord | <albassort> robyn got me |
14:42:00 | FromDiscord | <xtrayambak> I'm basically going in blindfolded |
14:42:06 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "Yep": Nice! |
14:42:10 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "robyn got me": :> |
14:42:18 | FromDiscord | <albassort> we stand on the backs of giants, you should read up on the literature first |
14:42:25 | FromDiscord | <Robyn [She/Her]> You should probably look up- |
14:42:45 | FromDiscord | <xtrayambak> In reply to @albassort "we stand on the": Going in blindfolded, making a dumpster fire and revising it later to be less awful later on is usually how I do it |
14:42:50 | FromDiscord | <Robyn [She/Her]> Yeah :p↵She says, rarely looking up shit |
14:42:53 | FromDiscord | <xtrayambak> (edit) removed "later" |
14:42:53 | FromDiscord | <albassort> you may make something work but you'll waste your time |
14:43:03 | FromDiscord | <albassort> because you'll know how stupid you a re |
14:43:07 | FromDiscord | <albassort> in like 48 hours |
14:43:11 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "Going in blindfolded, making": Make it work, make it clean, make it fast |
14:43:25 | FromDiscord | <albassort> think about it, write something now, feel bad 2 days later |
14:43:34 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "in like 48 hours": Always provides knowledge though |
14:43:38 | FromDiscord | <albassort> its like the opposite of delayed gratification |
14:44:41 | FromDiscord | <Robyn [She/Her]> I wonder if there'd be any use in JITing functions written in Nim so it generates code at runtime :P |
14:44:57 | FromDiscord | <xtrayambak> In reply to @chronos.vitaqua "I wonder if there'd": I'm actually writing an interpreter 😄 |
14:45:02 | FromDiscord | <nimaoth> well, for a repl that would be useful |
14:45:28 | FromDiscord | <xtrayambak> I've written a small bytecode language around it and interpretation works fine but it's awfully slow |
14:45:45 | FromDiscord | <Robyn [She/Her]> In reply to @nimaoth "well, for a repl": For a repl, we'd just want Nimscript to have access to the entirety of the stdlib and then do some black magic to link to C code written in libraries xD |
14:45:48 | FromDiscord | <xtrayambak> (I'm not gonna reap small optimizations in the interpreter because this is all just an excuse to try writing a JIT compiler) |
14:46:32 | FromDiscord | <Robyn [She/Her]> Fair, I wish you luck with that! I want to try doing the same soon anyway, even if I don't write my own JIT |
14:46:52 | FromDiscord | <albassort> In reply to @chronos.vitaqua "For a repl, we'd": err, thats very unsafe. We cant expose the entire stdlib because that would mean our jit isn't running in a VM |
14:46:54 | FromDiscord | <Robyn [She/Her]> I'll probably write bindings to Cranelift for Nim |
14:47:12 | FromDiscord | <xtrayambak> In reply to @chronos.vitaqua "I'll probably write bindings": isn't that the WASM engine or something? |
14:47:21 | FromDiscord | <xtrayambak> if I remember correctly it's a LLVM rewrite in Rust |
14:47:22 | FromDiscord | <xtrayambak> I think |
14:47:37 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "err, thats very unsafe.": For a repl that's fine |
14:47:54 | FromDiscord | <albassort> I think maybe nim's typing is too computationally intense for a scripting lang |
14:49:01 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "if I remember correctly": It does what LLVM does but with more consideration to compile times, so some tradeoffs are made for performance but it's still pretty damn good, iirc |
14:49:18 | FromDiscord | <Robyn [She/Her]> There's no C compiler that uses Cranelift for the backend though :P |
14:49:42 | FromDiscord | <xtrayambak> Someone better not rewrite the entire Nim compiler in Rust (🚀) |
14:49:48 | FromDiscord | <Robyn [She/Her]> Rust has debug builds compiled with Cranelift, iirc? Or it's something they plan to do↵Wasmtime does use Cranelift for it's JIT too, possibly for AOT? |
14:50:17 | FromDiscord | <xtrayambak> In reply to @chronos.vitaqua "Rust has debug builds": Rust's already integrated Cranelift? |
14:50:27 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "Someone better not rewrite": Why would anyone do that? The language is perfect smh /j |
14:50:44 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "Rust's already integrated Cranelift?": They might have, not sure, but I think it was planned at some point |
14:50:57 | FromDiscord | <Robyn [She/Her]> No idea, might be spouting bullshit so take it with a pinch of salt |
14:51:13 | FromDiscord | <xtrayambak> I just checked an example on how someone implemented a JIT compiler, seems identical to how I did it |
14:51:20 | FromDiscord | <xtrayambak> (except for the entire assembler part) |
14:51:22 | FromDiscord | <ieltan> In reply to @xtrayambak "Someone better not rewrite": Might as well just fix the Nim compiler to stabilize views and concepts |
14:51:37 | FromDiscord | <xtrayambak> In reply to @ieltan "Might as well just": I don't really get why borrow checking is so liked |
14:51:56 | FromDiscord | <xtrayambak> I like Nim's approach to memory management much better than overglorified enforced RAII |
14:52:02 | FromDiscord | <ieltan> But I think any PR at this point is bound to get rejected cause Araq plans to have everything rely on NIR or something |
14:52:20 | FromDiscord | <xtrayambak> In reply to @ieltan "But I think any": What's NIR exactly? |
14:52:32 | FromDiscord | <xtrayambak> Is it just an intermediate representation that all the backends will use in the future? |
14:52:40 | FromDiscord | <xtrayambak> (edit) "Is it just an intermediate representation that all the ... backends" added "codegen/emission" |
14:52:45 | FromDiscord | <ieltan> In reply to @xtrayambak "I don't really get": Borrowing is good, Nim's approach is just that lifetimes are implicit rather than explicit like in Rust |
14:53:21 | FromDiscord | <ieltan> In reply to @xtrayambak "Is it just an": I'm not sure exactly but it seems to be it yeah? |
14:53:31 | FromDiscord | <xtrayambak> What's the benefit? |
14:53:42 | FromDiscord | <xtrayambak> I think araq said that it brings better IC support or something |
14:53:56 | FromDiscord | <vhalragnarok> Doesn't GC also increase the binary size? |
14:54:09 | FromDiscord | <xtrayambak> In reply to @vhalragnarok "Doesn't GC also increase": Yes |
14:54:30 | FromDiscord | <vhalragnarok> So Borrow Checking would be more efficient since the compiler runs the checks and no code is really needed to handle it from there. |
14:54:45 | FromDiscord | <ieltan> Hell if I know. I've read on it but I kind of forgot about it, probably makes it more easier to develop future features |
14:54:52 | FromDiscord | <ieltan> In reply to @xtrayambak "What's the benefit?": . |
14:55:12 | FromDiscord | <Robyn [She/Her]> In reply to @ieltan "Might as well just": And fix the compiler in general, the type system explodes if you look at it wrong |
14:55:13 | FromDiscord | <vhalragnarok> Rust's Borrow Checker & Lifetimes and all of that are hella complex. |
14:55:36 | FromDiscord | <xtrayambak> In reply to @chronos.vitaqua "And fix the compiler": Combining generics with templates is like putting lithium in water |
14:55:40 | FromDiscord | <xtrayambak> it never goes well |
14:55:41 | FromDiscord | <vhalragnarok> It's nice that the compiler holds your hand as much as it does, because you absolutely need it at times lol. |
14:56:02 | FromDiscord | <xtrayambak> I learnt it the hard way by spending 3 hours fixing the obscene amount of generics abuse I had committed |
14:56:13 | FromDiscord | <Robyn [She/Her]> In reply to @xtrayambak "Combining generics with templates": Funnily enough, never had an issue with those |
14:56:13 | FromDiscord | <zumi.dxy> In reply to @vhalragnarok "Rust's Borrow Checker &": taking "if the compiler can't reason about it, neither can you" to another level↵apparently sometimes the borrow checker doesn't believe you and you have to "convince" it somehow |
14:56:28 | FromDiscord | <vhalragnarok> Yeeeah |
14:56:47 | FromDiscord | <xtrayambak> In reply to @zumi.dxy "taking "if the compiler": They're reworking the borrow checker to make it less strict and allow for more ways to write code apparently |
14:57:01 | FromDiscord | <ieltan> In reply to @chronos.vitaqua "And fix the compiler": I know what you mean but in my case I was abusing the type system quite a bit :p |
14:57:02 | FromDiscord | <vhalragnarok> GC however is way simpler lol. |
14:57:18 | FromDiscord | <xtrayambak> Nim's GC doesn't carry a huge performance penalty either, surprisingly |
14:57:34 | FromDiscord | <ieltan> In general what I learned is that the type system becomes brittle once you deal with non-concrete types. |
14:57:54 | FromDiscord | <vhalragnarok> I've not looked into how well Nim handles stuff manually, but Zig's approach is very sane. |
14:57:54 | FromDiscord | <zumi.dxy> In reply to @xtrayambak "They're reworking the borrow": nightly users rejoice |
14:58:10 | FromDiscord | <zumi.dxy> In reply to @xtrayambak "Nim's GC doesn't carry": not even refc? |
14:58:22 | FromDiscord | <zumi.dxy> i know `arc` is supposed to be as light as it can be |
14:58:25 | FromDiscord | <Robyn [She/Her]> In reply to @ieltan "In general what I": Yeah, I had an issue with macros where I was working on an implementation of sum types, but generic sum types exploded |
14:58:31 | FromDiscord | <xtrayambak> In reply to @zumi.dxy "not even refc?": dunno, I've never really benchmarked Nim code before ORC became the main GC |
14:58:38 | FromDiscord | <xtrayambak> In reply to @vhalragnarok "I've not looked into": araq's response to zig was funny |
14:58:40 | FromDiscord | <vhalragnarok> I will give Rust 1 thing... Their documentation for new people is unparalleled . The Rust Book is so, so, so good. |
14:58:59 | FromDiscord | <vhalragnarok> Along with Rustlings and what not. |
14:59:00 | FromDiscord | <xtrayambak> https://media.discordapp.net/attachments/371759389889003532/1253725864881950730/CNTXN3s.png?ex=6676e6b3&is=66759533&hm=132d2dbf77b67567afaea744f825032c3aeac3fc0f7c87a8a7a032ba32be0221& |
14:59:02 | FromDiscord | <zumi.dxy> +rustonomicon |
14:59:02 | FromDiscord | <Robyn [She/Her]> In reply to @vhalragnarok "I've not looked into": Zig has no macros at all, right? |
14:59:04 | FromDiscord | <xtrayambak> In reply to @vhalragnarok "I will give Rust": Seriously. |
14:59:18 | FromDiscord | <ieltan> In reply to @xtrayambak "araq's response to zig": He really doesn't like allocator parameters |
14:59:18 | FromDiscord | <vhalragnarok> In reply to @chronos.vitaqua "Zig has no macros": Not to my knowledge yet. |
14:59:21 | FromDiscord | <xtrayambak> 90% of people I recommend Nim get demotivated due to how scattered Nim docs are |
14:59:48 | FromDiscord | <xtrayambak> I have to manually feed them examples to get them to get used to it |
14:59:54 | FromDiscord | <Robyn [She/Her]> In reply to @ieltan "He really doesn't like": I don't get why though, it wouldn't do any harm, especially since default parameters exist |
15:00:00 | FromDiscord | <xtrayambak> and I'm not a good example giver anyway 😅 |
15:00:14 | FromDiscord | <Robyn [She/Her]> Though I guess it would be a bit ugly if everything had an allocator param |
15:00:15 | FromDiscord | <zumi.dxy> "here's a company using nim"↵"hmm, they actively avoid stdlib features"↵huh?" |
15:00:23 | FromDiscord | <xtrayambak> In reply to @zumi.dxy ""here's a company using": Status IM moment |
15:00:24 | FromDiscord | <ieltan> In reply to @xtrayambak "90% of people I": This is even worse once you deal with multithreading lol |
15:00:38 | FromDiscord | <xtrayambak> In reply to @ieltan "This is even worse": I don't even touch multithreading because of how difficult it is to deal with |
15:00:44 | FromDiscord | <xtrayambak> 99% of my Nim code is single threaded |
15:00:52 | FromDiscord | <xtrayambak> the 1% is multi-processed instead of multi threaded |
15:00:57 | FromDiscord | <vhalragnarok> If I want Multithreading I'll pull out Go. |
15:00:59 | FromDiscord | <vhalragnarok> Lol. |
15:01:02 | FromDiscord | <ieltan> In reply to @zumi.dxy ""here's a company using": Nim probably needs an alternative stdlib managed by the community |
15:01:17 | FromDiscord | <vhalragnarok> (edit) "Lol." => "From the sounds of it lol." |
15:01:27 | FromDiscord | <zumi.dxy> In reply to @xtrayambak "Status IM moment": the more I think about exceptions vs results the more I want backtraces |
15:01:46 | FromDiscord | <xtrayambak> In reply to @zumi.dxy "the more I think": I prefer both |
15:01:50 | FromDiscord | <xtrayambak> depending on what I'm doing |
15:01:59 | FromDiscord | <xtrayambak> (yes, I'm a psychopath) |
15:02:02 | FromDiscord | <zumi.dxy> even status made nim bindings to `libbacktrace` to slightly ease the pain of backtraces |
15:02:16 | FromDiscord | <xtrayambak> I'm surprised they even use Nim |
15:02:19 | FromDiscord | <xtrayambak> but I'm glad they do |
15:02:29 | FromDiscord | <xtrayambak> they've given so much to the community :3 |
15:02:37 | FromDiscord | <zumi.dxy> if I want `Result` I probably need manual calls to print backtraces |
15:02:50 | FromDiscord | <zumi.dxy> In reply to @xtrayambak "but I'm glad they": someone has to use it after all |
15:03:24 | FromDiscord | <xtrayambak> honestly though, Nim needs a proper big tech sponsor |
15:03:34 | FromDiscord | <xtrayambak> imagine all the manpower that'd come along with it |
15:04:02 | FromDiscord | <xtrayambak> hell, even D has Facebook backing it |
15:04:19 | FromDiscord | <xtrayambak> though last I checked (and from my friend's mishaps) D isn't exactly very usable |
15:04:30 | FromDiscord | <xtrayambak> plus they have 80 different compilers |
15:04:42 | FromDiscord | <Robyn [She/Her]> In reply to @ieltan "Nim probably needs an": It could be an interesting thing tbf, using `Option`s and `Result`s too |
15:04:58 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "the more I think": Backtraces? |
15:05:31 | FromDiscord | <ieltan> The good thing about result is that it allows you have finer error handling vs exceptions. But pmunch made `labeltry` which pretty much combines the best of both worlds |
15:05:46 | FromDiscord | <zumi.dxy> I can consider nim's shortcomings and papercuts to be an advantage↵it can prevent me from being so full of myself that I end up being insufferable↵because I know what I chose is not ✨perfect✨ and ✨the only thing Ever™✨ |
15:06:01 | FromDiscord | <Robyn [She/Her]> In reply to @ieltan "The good thing about": I haven't used labeltry tbh, also isn't there the issue of exceptions being allocated on the heap and all that? |
15:06:13 | FromDiscord | <xtrayambak> In reply to @zumi.dxy "I can consider nim's": most of Nim's shortcomings don't bother me much so it's fine with me |
15:06:37 | FromDiscord | <xtrayambak> I don't contribute to the Nim compiler so I could care less what state it's in |
15:06:48 | FromDiscord | <xtrayambak> monke run `nim c`, monke get C code, monke happy. |
15:06:55 | FromDiscord | <Robyn [She/Her]> I want to make my own language solely so I can avoid the shortcomings of Nim :p |
15:07:01 | FromDiscord | <Robyn [She/Her]> I love Nim, so, so much |
15:07:11 | FromDiscord | <Robyn [She/Her]> But sometimes I'd rather not fight against the compiler |
15:07:25 | FromDiscord | <xtrayambak> I love how much time Nim saves me |
15:07:32 | FromDiscord | <ieltan> In reply to @chronos.vitaqua "I haven't used labeltry": I see heap allocation in exceptions as a non-issue tbh. Unless you're in embedded so you'll have to disable them |
15:07:33 | FromDiscord | <zumi.dxy> i could try kitlang sometime |
15:07:34 | FromDiscord | <xtrayambak> I can write it muuuch faster than I can write C |
15:08:07 | FromDiscord | <zumi.dxy> what I love about Nim https://media.discordapp.net/attachments/371759389889003532/1253728156750450758/image.png?ex=6676e8d5&is=66759755&hm=25d92cd28e568b369b8c03158bdb62a9899bbe0ae1215d91b1e58ee3ed5f9996& |
15:08:14 | FromDiscord | <Robyn [She/Her]> In reply to @ieltan "I see heap allocation": ✨ but muh allocationless code ✨ |
15:08:17 | FromDiscord | <ieltan> In reply to @chronos.vitaqua "It could be an": There are a lot of things that can be done and it could also even benefits the stdlib |
15:08:30 | FromDiscord | <xtrayambak> In reply to @zumi.dxy "what I love about": ah yes, casually writing down entire expression evaluations for call arguments |
15:08:34 | FromDiscord | <xtrayambak> that's my favourite thing |
15:08:49 | FromDiscord | <Robyn [She/Her]> Honestly I also wanna see how much of Nim's magic can be implemented without it |
15:09:04 | FromDiscord | <xtrayambak> my favourite Nim feature is the UFCS abuse |
15:09:18 | FromDiscord | <zumi.dxy> re:3rd party stdlib↵well, there's the problem of the `system` module always being loaded in |
15:09:32 | FromDiscord | <ieltan> In reply to @chronos.vitaqua "✨ but muh allocationless": I think it's better to strive for less allocation rather than allocation-less code :p |
15:09:34 | FromDiscord | <zumi.dxy> dunno if nimskull plans to change that |
15:09:50 | FromDiscord | <xtrayambak> with the few strokes of your keys, you too can make niklaus wirth roll in his grave again!↵↵click here to find out today! |
15:09:53 | FromDiscord | <zumi.dxy> In reply to @ieltan "I think it's better": stack is an allocation↵checkmate lizard people |
15:10:22 | FromDiscord | <ieltan> Well I've read that it's so fast it's like there is no allocation at all so 😄 |
15:10:28 | FromDiscord | <xtrayambak> In reply to @zumi.dxy "re:3rd party stdlib well,": and it's damn annoying 😄 |
15:10:58 | FromDiscord | <ieltan> In reply to @zumi.dxy "re:3rd party stdlib well,": `from system import nil`? |
15:11:19 | FromDiscord | <zumi.dxy> well it's implicit and it's full of compiler magic |
15:11:32 | FromDiscord | <ieltan> You can try and see |
15:11:43 | FromDiscord | <zumi.dxy> `nimPreviewSlimSystem` is appreciated |
15:12:51 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "re:3rd party stdlib well,": There's a flag to disable that |
15:13:19 | FromDiscord | <Robyn [She/Her]> Can't remember which one though |
15:15:32 | FromDiscord | <Robyn [She/Her]> Maybe there isn't a flag for it... |
15:42:57 | FromDiscord | <leorize> it's not like no one ever tried to make "3rd party stdlib" a thing |
15:44:52 | FromDiscord | <leorize> the problem has always been that you plan things in nim, not executing it |
15:46:02 | FromDiscord | <leorize> and well, I wouldn't say that Status is all good |
15:46:20 | FromDiscord | <leorize> past discussions about stdlib\: https://github.com/nim-lang/RFCs/issues/310 |
15:51:42 | FromDiscord | <Clonkk> In reply to @leorize "the problem has always": Almost like there is no org that can help dispatch & delegate everything "non-compiler-dev" related while retaining a unified vision you mean ? |
15:55:39 | FromDiscord | <leorize> I just think that people like talking it but no one wants to do it |
15:55:58 | FromDiscord | <leorize> my head canon is that the people with the know how just isn't interested in nim |
15:58:16 | FromDiscord | <leorize> some previous initiatives did produce something |
15:58:18 | FromDiscord | <Robyn [She/Her]> Wouldn't be surprising, Nim has quite a few smaller issues that join together :P |
15:58:35 | FromDiscord | <leorize> but as far as I know many contributors just left |
15:58:46 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "but as far as": Like dom96? |
15:59:30 | FromDiscord | <leorize> I wouldn't classify dom as "left" |
15:59:44 | FromDiscord | <Robyn [She/Her]> Why not? |
16:03:08 | FromDiscord | <leorize> dom's involvement become more or less non existent after he went and work for facebook |
16:03:08 | FromDiscord | <leorize> which is fine |
16:03:39 | FromDiscord | <leorize> the problem is that dom likes to feel important and frequently block discussions that involved his code |
16:06:26 | FromDiscord | <leorize> and as you can see, literally nothing happened after dom cut ties with nim |
16:07:12 | FromDiscord | <leorize> he wasn't there to begin with |
16:08:26 | FromDiscord | <odexine> "it was so gradual a leave that it didnt really feel like anything" kinda vibe right |
16:10:56 | FromDiscord | <leorize> dude doesn't even use nim yet likes to flaunt his weight around |
16:12:17 | FromDiscord | <leorize> there are reasons why old members don't like him that much \:p |
16:13:32 | FromDiscord | <odexine> yeah i kinda figured from d\\\\\\\k |
16:13:46 | FromDiscord | <threefour> Didn't know there was drama surrounding him |
16:14:13 | FromDiscord | <odexine> theres quite a lot of drama |
16:14:29 | FromDiscord | <leorize> nim have more new blood today than old |
16:14:30 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
16:14:31 | FromDiscord | <odexine> there's the exiled one and the one banned on what seemed to be a whim |
16:14:42 | FromDiscord | <leorize> so stories like these are just gone now |
16:14:51 | * | Jhonny2x4 joined #nim |
16:16:06 | FromDiscord | <leorize> I never know why but a bunch of old influential nim devs just, uh, move on to zig |
16:16:12 | FromDiscord | <leorize> a language that's 180 from nim |
16:16:36 | FromDiscord | <odexine> wait really |
16:16:38 | FromDiscord | <planetis_m> In reply to @leorize "I never know why": Who ? |
16:16:39 | FromDiscord | <odexine> who did |
16:16:48 | FromDiscord | <odexine> hey dont steal my questions |
16:17:08 | FromDiscord | <leorize> lemonboy, dataman, and a couple more that I forgot |
16:17:10 | FromDiscord | <zumi.dxy> i keep trying to get into zig but i just couldn't↵its docs seem even more scattered than nim's is |
16:17:21 | FromDiscord | <leorize> and to \nix ricer, yes we did have the lemonboy of lemonbar fame |
16:17:24 | FromDiscord | <zumi.dxy> not to mention it's not even "stabilized" a bit |
16:17:39 | FromDiscord | <zumi.dxy> i'm glad bun exists in spite of that though |
16:17:40 | FromDiscord | <planetis_m> In reply to @odexine "hey dont steal my": What why, when, how? Niw I stole all of your questions. Wygd? |
16:18:12 | FromDiscord | <odexine> In reply to @planetis_m "What why, when, how?": have you? ha! i had one more question |
16:18:42 | FromDiscord | <planetis_m> In reply to @leorize "lemonboy, dataman, and a": Eh these didn't stay that long they were passing |
16:19:16 | FromDiscord | <zumi.dxy> bun's also got a pretty ingenious crash handler too |
16:19:20 | FromDiscord | <sOkam! 🫐> In reply to @leorize "a language that's 180": it does make sense if you think of nim as a more ergonomic C with good C.ffi |
16:22:17 | FromDiscord | <leorize> they drove nim progress during the 0.x era as compiler devs, wrote some pretty good libs and was extremely active around here↵(@planetis_m) |
16:22:29 | FromDiscord | <leorize> so I'd say they stayed long enough to leave a lot of marks |
16:25:23 | FromDiscord | <planetis_m> I suppose you mean lemonboy |
16:25:26 | FromDiscord | <planetis_m> Sure |
16:26:13 | FromDiscord | <planetis_m> But he was hired not by he's own |
16:26:51 | FromDiscord | <leorize> hired? |
16:28:21 | FromDiscord | <planetis_m> To work on bugfixes yes |
16:29:02 | FromDiscord | <leorize> first time I've heard about lemonboy being hired |
16:29:53 | FromDiscord | <leorize> Araq didn't want to spend even a penny back then and took him forever to on board two new core devs |
16:31:00 | FromDiscord | <leorize> though tbf nim's finances was pretty tight |
16:31:57 | FromDiscord | <planetis_m> "Hired by someone else. I guess we will never know |
16:36:22 | FromDiscord | <leorize> just noticed that nim is finally using OC funds |
16:36:24 | FromDiscord | <leorize> it was pretty depressing seeing money pooling up and not invested in devs |
16:50:00 | FromDiscord | <threefour> In reply to @odexine "there's the exiled one": Say hwat |
16:52:03 | FromDiscord | <leorize> quite literally the only permanent ban in this community |
16:53:02 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=BgJDwwES |
16:53:11 | FromDiscord | <threefour> In reply to @leorize "quite literally the only": Who? |
16:54:50 | FromDiscord | <leorize> did you accidentially put your channels in a `const`?↵(@threefour) |
16:54:59 | FromDiscord | <leorize> disruptek↵(@threefour) |
16:59:14 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "there are reasons why": Ah |
16:59:38 | FromDiscord | <threefour> I don't have any `const` touching anything related to channels. Only for lookup tables for something completely unrelated. |
17:03:53 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=BqnpIGBi |
17:05:00 | FromDiscord | <Phil> I'd be curious about a couple more opinions about this given I'm currently very much in "developer tunnel vision" |
17:05:12 | FromDiscord | <leorize> time to use the `as` operator |
17:05:31 | FromDiscord | <Phil> The what now? |
17:05:50 | FromDiscord | <leorize> `Box() as box:` works |
17:06:43 | FromDiscord | <Phil> Ohhhhhhhh that is really nice!↵Will take some finagling with the GUI DSL but I'll just discuss this with can.l, pretty sure he'd agree this is sound |
17:07:35 | FromDiscord | <leorize> it does require you to be a little careful about your ref's lifetime |
17:07:41 | FromDiscord | <leorize> but your framework probably handled it already |
17:07:54 | FromDiscord | <Phil> The "Ref" is a mini observable |
17:08:10 | FromDiscord | <Phil> Because I can't make any assumptions on if you start wanting to do sth before the ref is assigned or not |
17:08:13 | FromDiscord | <albassort> what type is nil? I want an optional object passed into a procedure |
17:08:19 | FromDiscord | <albassort> my solution is type or nil |
17:08:22 | FromDiscord | <albassort> (edit) "my solution is type or ... nil" added "cstring =" |
17:08:42 | FromDiscord | <kots> In reply to @threefour "Also sorry but side": Const is not the only way to trigger compile time evaluation. Do you have any code we can look at? |
17:08:46 | FromDiscord | <leorize> `typeof(nil)` |
17:08:51 | FromDiscord | <albassort> nil |
17:08:53 | FromDiscord | <albassort> right |
17:09:02 | FromDiscord | <leorize> nil is also an implicit value of any `ref` types |
17:09:37 | FromDiscord | <albassort> i will keep type or cstring = nil until i think of something easier |
17:09:57 | FromDiscord | <leorize> my concern is more with if you have any way of handling refs attached to other widgets in ways that are not managed by the framework↵(@Phil) |
17:10:08 | FromDiscord | <leorize> but I think gtk is sane enough so you don't have to worry |
17:10:30 | FromDiscord | <albassort> gtk? sane? |
17:10:38 | FromDiscord | <albassort> nah gtk is pretty robust |
17:10:47 | FromDiscord | <albassort> writing it though... |
17:11:25 | FromDiscord | <Phil> In reply to @leorize "`Box() as box:` works": Would most likely look more like `Box() as app.box` but I think that should still work |
17:13:26 | FromDiscord | <Robyn [She/Her]> I get suck a weird error I can't even begin to figure out how to replicate |
17:13:26 | FromDiscord | <leorize> if you want to go fancy, you can copy jetpack compose |
17:13:54 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=rGVkEJQz |
17:13:58 | FromDiscord | <leorize> actually maybe not jetpack compose |
17:14:07 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=cELytzGW |
17:14:23 | FromDiscord | <leorize> is this typed ast? |
17:14:25 | FromDiscord | <Robyn [She/Her]> But only when I add `state: ParserState` to a type |
17:14:36 | FromDiscord | <Phil> In reply to @leorize "if you want to": I want to just be understandable.↵The prior setup was not all that clear where the `as` syntax very much is |
17:14:57 | FromDiscord | <Phil> Fancy means effort and I prefer keeping it simple, I'm not capable enough for fancy in this setup, too many moving, semi-fragile parts |
17:15:19 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "is this typed ast?": It's a normal type definition :p |
17:15:52 | FromDiscord | <albassort> better solution: take ref |
17:15:57 | FromDiscord | <albassort> (edit) "better solution: take ref ... " added "= nil" |
17:16:14 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=IDqqIUmI |
17:17:26 | FromDiscord | <leorize> that's not the kind of fancy I'm talking about↵(@Phil) |
17:17:30 | FromDiscord | <Robyn [She/Her]> Might just make an `init` proc for `ParserState` |
17:18:28 | FromDiscord | <leorize> sent a long message, see https://pasty.ee/NxvZJphY |
17:18:44 | FromDiscord | <leorize> though now that I think about it, the \`as\` stuff still works better |
17:19:20 | FromDiscord | <Robyn [She/Her]> If you're looking for chaining something together, why not look at https://github.com/khchen/chain ? |
17:19:27 | FromDiscord | <Robyn [She/Her]> See how that lib does it and maybe steal it |
17:19:50 | FromDiscord | <Robyn [She/Her]> It was designed to be used with `wNim` in mind too |
17:21:12 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=blIhhQaP |
17:21:13 | FromDiscord | <Phil> In reply to @leorize "though now that I": The reason I liked it is because Angular uses the same semantics in its templating language.↵Further, you already are aware of "as" in nim via imports where they have a similar usage: Take x and give it a different name to be accessible under. So the intuitive connection is just already there |
17:21:23 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=eZEjrBtD |
17:22:44 | FromDiscord | <leorize> that's a weird macro↵(@Robyn [She/Her]) |
17:22:52 | FromDiscord | <leorize> as in I don't see why you needed one |
17:23:19 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=AphbaRrN |
17:23:30 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=josLdtfK |
17:23:48 | FromDiscord | <Robyn [She/Her]> I'm on 2.0.4 so maybe 2.0.6 fixes this but I can't be bothered to upgrade |
17:27:13 | * | ntat quit (Quit: Leaving) |
17:28:25 | FromDiscord | <Robyn [She/Her]> Might have to use the state to store nodes instead of just returning a `ParseSuccess(nodes: @[...])` and flattening it, it'd make indexing easier |
17:29:03 | FromDiscord | <Robyn [She/Her]> Just need to remember to fail early as possible before adding nodes so that I can avoid needing to copy or create a new state |
17:29:45 | FromDiscord | <leorize> you can study parsec design for this \:p |
17:30:10 | FromDiscord | <Robyn [She/Her]> I probably could buuuut where's the fun in research :P |
17:30:44 | FromDiscord | <leorize> is that not research? |
17:33:49 | FromDiscord | <Robyn [She/Her]> Wdym? |
17:34:20 | FromDiscord | <leorize> I mean studying parsec is research \:p |
17:35:11 | FromDiscord | <Robyn [She/Her]> Yeah, where's the fun in research |
17:35:16 | FromDiscord | <Robyn [She/Her]> That's what I said :P |
17:35:37 | FromDiscord | <leorize> I guess my English comprehension needs work |
17:36:39 | FromDiscord | <Robyn [She/Her]> Perhaps |
17:37:36 | FromDiscord | <thepuzzleddev> how can I make a u16 type |
17:37:47 | FromDiscord | <Robyn [She/Her]> `uint16` |
17:37:59 | FromDiscord | <Robyn [She/Her]> In reply to @thepuzzleddev "how can I make": Do you mean an alias? |
17:38:16 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=qFboiDOx |
17:54:25 | FromDiscord | <threefour> What's the idiomatic way to do multiline proc arguments so I don't have a 200-column line? |
17:55:00 | FromDiscord | <albassort> i have a 315 column line |
17:55:04 | FromDiscord | <albassort> for a proc |
17:55:13 | FromDiscord | <threefour> You should be ashamed |
17:55:28 | FromDiscord | <threefour> Jk but 🤢 |
17:55:28 | FromDiscord | <albassort> i forget the way you make them multiline and i'll fix it eventually |
17:55:52 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=kTptoFqx |
17:57:05 | FromDiscord | <leorize> just new line after comma |
17:57:43 | FromDiscord | <leorize> indentation doesn't matter inside parentheses |
17:58:37 | FromDiscord | <albassort> hmm wonder what i was doing wrong earlier |
17:58:38 | FromDiscord | <albassort> ¯\_(ツ)_/¯ |
17:59:45 | FromDiscord | <albassort> ah i see, the return type has to be on the same linee |
18:00:38 | FromDiscord | <leorize> if you're a masochist, return type can be on it's own line |
18:01:01 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=NSarhcPE |
18:01:45 | FromDiscord | <albassort> In reply to @leorize "if you're a masochist,": no? |
18:01:55 | FromDiscord | <albassort> oh |
18:01:56 | FromDiscord | <albassort> just the type |
18:01:58 | FromDiscord | <albassort> err... |
18:02:04 | FromDiscord | <albassort> i am a masochist |
18:02:13 | FromDiscord | <leorize> sent a long message, see https://pasty.ee/OQxSpbPJ |
18:02:14 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=dsTnFBFm |
18:02:20 | FromDiscord | <threefour> (edit) "https://play.nim-lang.org/#pasty=IIuAspbX" => "https://play.nim-lang.org/#pasty=yOQDxvGM" |
18:02:31 | FromDiscord | <threefour> (edit) "https://play.nim-lang.org/#pasty=ZbesUVFU" => "https://play.nim-lang.org/#pasty=NiUxIUQf" |
18:02:42 | FromDiscord | <threefour> I can't decide which I find more hideous. |
18:02:46 | * | SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev) |
18:02:57 | FromDiscord | <albassort> sent a code paste, see https://paste.rs/yBFmi |
18:07:45 | FromDiscord | <Elegantbeef> K&R Nim |
18:08:25 | FromDiscord | <kots> sent a code paste, see https://play.nim-lang.org/#pasty=GfaXFvlH |
18:09:36 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
18:10:02 | * | Jhonny2x4 joined #nim |
18:10:45 | FromDiscord | <Robyn [She/Her]> I don't think result types are playing nicely with non-copyable types :/ |
18:11:05 | FromDiscord | <leorize> welcome to the fascinating world of nim |
18:11:38 | FromDiscord | <leorize> if you want it to work, it must be possible to move the data out |
18:16:08 | FromDiscord | <Robyn [She/Her]> Hm, if I use sink params, it'll avoid copying when being passed into a function, right? Means while there isn't no copying, there's less than what would've happened? Though, `sink` inference is a thing so probably doesn't help much |
18:16:32 | FromDiscord | <Robyn [She/Her]> Oh that's behind a flag |
18:16:44 | FromDiscord | <Robyn [She/Her]> Meh, `sink` should be enough for my purposes |
18:24:06 | FromDiscord | <Robyn [She/Her]> I need to figure out how to use VSC's debugger stuff now :| |
18:26:20 | FromDiscord | <Robyn [She/Her]> `No module named 'lldb.embedded_interpreter'` |
18:35:27 | FromDiscord | <Robyn [She/Her]> I am so lost, no variables or anything is showing up... |
18:40:14 | FromDiscord | <Robyn [She/Her]> Ah, `lldb-mi` is different from `lldb-server` |
18:41:19 | FromDiscord | <Robyn [She/Her]> I need to build it myself?? |
18:41:57 | FromDiscord | <Robyn [She/Her]> I'm just gonna use `gdb` |
18:43:02 | FromDiscord | <Robyn [She/Her]> gdb works |
18:45:07 | FromDiscord | <Robyn [She/Her]> Is there any way to get the callstack to show nicer names like the name and the signature instead of the mangled C names? |
18:49:14 | FromDiscord | <basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=vNSEpZek |
18:49:50 | FromDiscord | <planetis_m> In reply to @chronos.vitaqua "Is there any way": Works better on devel, but they look like C++ namespaces |
18:50:08 | FromDiscord | <Robyn [She/Her]> Good to know, thanks planetis! |
18:51:06 | FromDiscord | <planetis_m> In reply to @basilajith "Help! I'm getting": -d:debug prints no stacktrace? |
18:52:46 | FromDiscord | <planetis_m> There's also writeStacktrace() which you can add in strategic places |
18:54:29 | FromDiscord | <planetis_m> And and `-d:useMalloc -t:"-fsanitize=address,undefined" -l:"-fsanitize=address,undefined" -d:nosignalhandler -d:release -g ` which depending on the bug it might point you to the right direction immediately |
18:54:43 | FromDiscord | <basilajith> Is this how?↵`nimble build -d:danger -d:debug`↵↵If so, it's not working. |
18:54:48 | FromDiscord | <planetis_m> (edit) removed "And" |
18:55:12 | FromDiscord | <planetis_m> In reply to @basilajith "Is this how? `nimble": No you can't have -d: danger in there |
18:55:59 | FromDiscord | <basilajith> Can I have -d:release instead? Without these optmisation flags, its taking forever to load the file (It's an Excel file with 0.5 million rows). |
18:56:22 | FromDiscord | <planetis_m> In reply to @planetis_m "and `-d:useMalloc -t:"-fsanitize=address,undefined"": Do this instead |
18:56:32 | FromDiscord | <planetis_m> Or liad a smaller file |
18:56:38 | FromDiscord | <planetis_m> (edit) "liad" => "load" |
18:59:28 | FromDiscord | <basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=pISKAPlf |
19:00:21 | FromDiscord | <planetis_m> Now you have to fix your indexing |
19:01:15 | FromDiscord | <basilajith> Got it... thanks! |
19:06:48 | FromDiscord | <Elegantbeef> @Robyn [She/Her] sink inference just explodes code anyway |
19:07:44 | FromDiscord | <Elegantbeef> When something like `proc doThing(typ: MyType): string` internally becomes `sink MyType` the signature does not match and Nim does not know how to make 'thunked' procs |
19:08:31 | FromDiscord | <Elegantbeef> Tangentaly related I really should take another look at thunking all calling conventions |
19:08:40 | FromDiscord | <Robyn [She/Her]> Aah, fun |
19:24:41 | FromDiscord | <threefour> What's the point of the new `Chan` anyways? |
19:24:57 | FromDiscord | <Elegantbeef> @planetis_m I assume your aligned alloc is due to GL interop? |
19:26:08 | FromDiscord | <Elegantbeef> want for aligned alloc\ |
19:26:54 | FromDiscord | <Elegantbeef> Threefour the new channels use move semantics |
19:28:43 | FromDiscord | <planetis_m> no I am just making a pool alocator just to learn how it work |
19:28:46 | FromDiscord | <planetis_m> (edit) "work" => "works" |
19:29:15 | FromDiscord | <planetis_m> But sure that would also be a reason I assume |
19:29:39 | FromDiscord | <planetis_m> I have needed it for ages but there's little progress |
19:32:36 | FromDiscord | <Robyn [She/Her]> What's the best way to get a reference to an existing object type? Do I just need to recreate it? |
19:32:58 | FromDiscord | <Elegantbeef> make a new reference then move it over |
19:33:44 | FromDiscord | <Robyn [She/Her]> Any easy way to automate that with a variant object? Does `fieldPairs` work on object variants? |
19:34:02 | FromDiscord | <Elegantbeef> Yes dereference the object |
19:34:10 | FromDiscord | <Elegantbeef> There is no need to use field pairs |
19:34:26 | FromDiscord | <Robyn [She/Her]> It's an `object` I wanna make into a `ref` |
19:34:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=IhtGiKmF |
19:34:49 | FromDiscord | <Elegantbeef> We're thinking with portals |
19:34:49 | FromDiscord | <Robyn [She/Her]> Oh wait yeah, I forgot about that |
19:34:53 | FromDiscord | <Robyn [She/Her]> xD |
19:45:45 | * | SchweinDeBurg joined #nim |
19:49:54 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RyFbuRrk |
19:50:14 | FromDiscord | <Robyn [She/Her]> Still super helpful compared to my first attempt, but also ugly as hell to read |
19:57:15 | FromDiscord | <Robyn [She/Her]> How would I get the default behaviour for `$` to work on my ref type? `proc `$`(src: ref ParseFailureSource): string = $src[]` causes a type mismatch to happen |
20:01:34 | FromDiscord | <Elegantbeef> Well that's how you'd do it |
20:04:49 | * | coldfeet quit (Remote host closed the connection) |
20:10:05 | FromDiscord | <Robyn [She/Her]> I shouldn't be getting an error here then :/ |
20:30:04 | FromDiscord | <Elegantbeef> @Robyn [She/Her] what's the error? |
20:56:37 | * | pbsds34 joined #nim |
20:57:14 | * | pbsds3 quit (Ping timeout: 268 seconds) |
20:57:14 | * | pbsds34 is now known as pbsds3 |
21:14:05 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=JVdExqiJ |
21:14:19 | FromDiscord | <Robyn [She/Her]> But without that proc, it works as it would normally |
21:14:35 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=UXutwoWt |
21:14:49 | FromDiscord | <Robyn [She/Her]> This is the definition of the type |
21:15:00 | FromDiscord | <Robyn [She/Her]> `ParserFailureCombinatorSide` is just an enum of `Left` and `Right` |
21:17:09 | FromDiscord | <Robyn [She/Her]> Might just be worth making an error message generator, not too sure how I'm supposed to assemble one if I get an error message that's like `AndCombinator(AndCombinator(OrCombinator(IdentParser(), IdentParser())))` or something tho |
21:17:20 | FromDiscord | <Robyn [She/Her]> I could hide that part away using debug messages I guess |
21:19:23 | FromDiscord | <Elegantbeef> @Robyn [She/Her] what happens when you do `echo $res`? |
21:21:31 | * | disso-peach joined #nim |
21:23:02 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=KaWydDPe |
21:23:03 | FromDiscord | <Robyn [She/Her]> Aaaah |
21:23:15 | FromDiscord | <Robyn [She/Her]> It's `results` causing the issue because it's all marked as `func`s |
21:23:19 | FromDiscord | <Robyn [She/Her]> I've had this issue before |
21:23:20 | FromDiscord | <Elegantbeef> Mark with `{.noSideEffect.}` since it's recursive |
21:23:58 | FromDiscord | <Elegantbeef> I believe ringabout has started on work to make this no longer the case, but yea recursive calls destroy the effect tracking |
21:24:33 | FromDiscord | <Robyn [She/Her]> Making it a `func` also works |
21:24:41 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "I believe ringabout has": Makes sense, thanks Beef |
21:24:47 | FromDiscord | <Elegantbeef> That's literally the same thing |
21:25:11 | FromDiscord | <Robyn [She/Her]> Beautiful: `err((state: (nodes: @[], indentStack: @[0], indentType: itUnset), source: (kind: pfsAndCombinator, acSide: Right, acFailure: (kind: pfsAccQuoteParser)), position: 5, kind: ExpectedChar, ecFoundChar: ' ', ecExpectedChar: '`'))` |
21:25:20 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "That's literally the same": Yes but one looks nicer :P |
21:27:01 | FromDiscord | <Elegantbeef> That has a face that only a mother could love |
21:35:19 | FromDiscord | <Array up in this Matrix 🇵🇸🍉> just double checking, func is a proc with the no side effect pragma? |
21:35:26 | * | krux02 joined #nim |
21:35:40 | FromDiscord | <Elegantbeef> How do I say RTFM nicely |
21:35:45 | FromDiscord | <Array up in this Matrix 🇵🇸🍉> lol |
21:35:49 | FromDiscord | <Array up in this Matrix 🇵🇸🍉> i will go read it then |
21:37:22 | FromDiscord | <Robyn [She/Her]> I should probably stop obsessing over giving my parser combinator a perfect design, and actually begin working on my lang now |
21:40:48 | * | krux02 quit (Remote host closed the connection) |
21:41:08 | * | krux02 joined #nim |
21:41:13 | FromDiscord | <Robyn [She/Her]> Huh, my and combinator is acting funky rn |
21:41:39 | FromDiscord | <Robyn [She/Her]> Aaah, it's my `many0` |
21:41:47 | FromDiscord | <Robyn [She/Her]> I forgot to pass the position to it :p |
21:41:53 | FromDiscord | <Robyn [She/Her]> So it used the default parameter `0` |
21:42:03 | FromDiscord | <Robyn [She/Her]> I should making that explicit |
21:42:23 | FromDiscord | <Elegantbeef> Default parameters are a mistake |
21:42:38 | FromDiscord | <leorize> it's always scary to see people write parser combinators before the language \:p |
21:42:59 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "it's always scary to": Dw, my parser combinator is a private thing anyway |
21:43:08 | FromDiscord | <Elegantbeef> You don't put the toilet down before building the house? |
21:43:11 | FromDiscord | <Robyn [She/Her]> Plus I did write a lexer and parser for my language |
21:44:15 | FromDiscord | <Array up in this Matrix 🇵🇸🍉> https://nim-lang.org/docs/manual.html#procedures-func↵says its the same? |
21:44:28 | FromDiscord | <Robyn [She/Her]> Removing the default param also caught another place where I forgot to pass it, nice |
21:45:49 | FromDiscord | <Elegantbeef> Yes |
21:46:23 | FromDiscord | <Elegantbeef> How does one forget to pass an optional parameter and have it cause issues? 😄 |
21:47:16 | FromDiscord | <leorize> looks like it's not optional anymore xd |
21:48:16 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RvWwnCqA |
21:48:22 | FromDiscord | <Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=TFhVxSLi" => "https://play.nim-lang.org/#pasty=kLATTEoZ" |
21:49:51 | FromDiscord | <Robyn [She/Her]> So what happened here is that the call to `p` (which is stored in the `res` variable) is supposed to have `result.unsafeGet().position` passed to the position param, but since I forgot that, it defaulted to 0 |
21:51:40 | FromDiscord | <Robyn [She/Her]> I have this parser `many0(charParser(' ')).label("skipWhitespace")` named as `skipWhitespace` in a constant, and in my main file, I test the combinator with `parseNumber and skipWhitespace and parseAccQuote`, which was causing an error before because it wasn't incrementing `position` before, which lead to it always failing because the space had to be consumed for me to be able to parse the accquote |
21:51:55 | FromDiscord | <Robyn [She/Her]> `"0b110 `a_cd`"` this was the input |
22:12:43 | FromDiscord | <Robyn [She/Her]> I'm not sure how to handle maths in a combinator :P |
22:13:12 | FromDiscord | <Robyn [She/Her]> Google go brrr |
22:14:24 | FromDiscord | <the_real_hypno> Ask ChatGPT to Google it for you |
22:14:50 | FromDiscord | <the_real_hypno> 10/10 quality result |
22:14:55 | FromDiscord | <Robyn [She/Her]> ChatGPT can be wrong, but good point |
22:14:57 | FromDiscord | <the_real_hypno> I promise |
22:15:26 | FromDiscord | <the_real_hypno> It was particially ironic but sometimes it really yields valuable infos |
22:15:34 | FromDiscord | <the_real_hypno> Cause of the simplicity |
22:15:45 | FromDiscord | <Robyn [She/Her]> Yeah that's true |
22:16:12 | FromDiscord | <the_real_hypno> It "thinks" outside of your bubble, thats what I actually value about the AI hype |
22:18:54 | FromDiscord | <Robyn [She/Her]> Fair, I only really used it to do simple research to avoid spending hours on college assignments xF |
22:19:44 | FromDiscord | <Robyn [She/Her]> For code I don't tend to use it much, but I do use stuff like Codeium purely because it can automate the most tedious parts for me |
22:29:21 | FromDiscord | <leorize> read up on Pratt parser ig↵(@Robyn [She/Her]) |
22:29:55 | FromDiscord | <leorize> expression parsing is always a pain |
22:30:03 | FromDiscord | <leorize> unless it's LR(k) ig |
22:31:14 | FromDiscord | <Robyn [She/Her]> `LR(k)`? |
22:31:38 | FromDiscord | <leorize> it's a family of languages |
22:32:30 | FromDiscord | <leorize> the LR method of parsing allow expressions to be solved rather neatly |
22:32:33 | FromDiscord | <Robyn [She/Her]> Does it mean 'Left Recursive' something? |
22:32:53 | FromDiscord | <Robyn [She/Her]> I'm assuming right to left? Oooor? |
22:35:17 | FromDiscord | <leorize> > An LR parser (left-to-right, rightmost derivation in reverse) reads input text from left to right without backing up (this is true for most parsers), and produces a rightmost derivation in reverse\: it does a bottom-up parse – not a top-down LL parse or ad-hoc parse. |
22:35:21 | FromDiscord | <leorize> from wikipedia |
22:35:57 | FromDiscord | <Robyn [She/Her]> Huh, weird |
23:05:30 | FromDiscord | <Robyn [She/Her]> How does Nim parse expressions :p |
23:05:46 | FromDiscord | <Robyn [She/Her]> Maths, specifically |
23:11:39 | FromDiscord | <leorize> you can read the code |
23:11:50 | FromDiscord | <leorize> it's actually not that bad (maybe) |
23:15:54 | FromDiscord | <Robyn [She/Her]> > (maybe) |
23:16:02 | FromDiscord | <Robyn [She/Her]> Hmmm |
23:18:24 | FromDiscord | <leorize> it's like using rust |
23:18:27 | FromDiscord | <leorize> you read it |
23:18:31 | FromDiscord | <leorize> you got it |
23:18:46 | FromDiscord | <leorize> and you might have tricked yourself into thinking that it's fine |
23:19:25 | FromDiscord | <albassort> its ok, I've unittested the fuck out of my code rust, im pretty sure its fine but im not fully sure |
23:19:45 | FromDiscord | <albassort> (edit) removed "code" |
23:21:39 | FromDiscord | <zumi.dxy> In reply to @leorize "and you might have": "if it compiles, it works" |
23:23:02 | FromDiscord | <leorize> it's ok, people trick themselves into thinking that nim is fine as well |
23:23:06 | FromDiscord | <leorize> I know I do |
23:23:45 | FromDiscord | <Elegantbeef> A spoonful of sugar makes the medicine go down |
23:34:01 | FromDiscord | <Elegantbeef> It's now that I write more code using it, but having a `InsensitiveString` seems like a very cursed data type outside of a TUI game 😄 |
23:41:56 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "and you might have": XD |
23:43:01 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "it's ok, people trick": I can't anymore, I want my 'perfect' (very opinionated and geared to my tastes) language now |
23:43:09 | FromDiscord | <Robyn [She/Her]> It might even look good on my portfolio! |
23:46:56 | FromDiscord | <Elegantbeef> To talk about any more inanity, what level of information do you provide in your unimplemented logic messaging? |
23:47:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EXSkHeVZ |
23:48:15 | FromDiscord | <Elegantbeef> Guess I can remove `stringIt` just by doing `.astToStr` |
23:49:39 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "It's now that I": What's an InsensitiveString? :p |
23:49:55 | FromDiscord | <Robyn [She/Her]> Also didn't Nim used to have tainted strings? What were those anyway? |
23:49:59 | FromDiscord | <Elegantbeef> One that does is case insensitive |
23:50:18 | FromDiscord | <Elegantbeef> Tainted strings were untyped binary blobs that you were supposed to sanitise before use |
23:50:57 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "One that does is": Why not just `toLowerAscii` the string? |
23:51:10 | FromDiscord | <Elegantbeef> Cause that's error prone |
23:51:13 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Tainted strings were untyped": So what strings are now? |
23:51:29 | FromDiscord | <Elegantbeef> Untyped binary blobs that you are supposed to sanitise before use |
23:51:33 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Cause that's error prone": How so? Was InsensitiveString to ensure type safety? |
23:51:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=tcMxmQlV |
23:52:13 | FromDiscord | <Elegantbeef> It does not change the the internal data it just compares and hashes insensitively |
23:52:15 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Untyped binary blobs that": What was the point of removing them then?- |
23:52:28 | FromDiscord | <Elegantbeef> They were distinct types that made it harder to do operations |
23:52:48 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "It does not change": Hm, fair |
23:53:01 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "They were distinct types": But it provided type safety, right? |
23:53:12 | FromDiscord | <Robyn [She/Her]> Ig people can always make their own tainted string :P |
23:53:21 | FromDiscord | <Elegantbeef> The reason I'm using insensitive strings is I want to have things like `TARGET wbay1 Carrier3` work so case only benefits reading |
23:53:39 | FromDiscord | <Elegantbeef> It did provide typesafety but it polluted everything and made it a massive noob trap |
23:54:05 | FromDiscord | <Elegantbeef> Cause in a text based environment typing casing properly is going to end badly |
23:54:43 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "The reason I'm using": Fair |
23:55:04 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "It did provide typesafety": Oof |