<< 21-06-2024 >>

00:01:09FromDiscord<planetis_m> In reply to @chronos.vitaqua "It's experimental? Haven't heard": very much bleading edge
00:01:21FromDiscord<planetis_m> I am not becoming their beta tester
00:01:55FromDiscord<Robyn [She/Her]> Lol fair enough
00:02:03FromDiscord<Robyn [She/Her]> Isn't Dawn also a thing?
00:02:29FromDiscord<Robyn [She/Her]> There's WGPU and Dawn iirc, both implement WebGPU?
00:03:09FromDiscord<planetis_m> Not my problem, again not messing with new tech
00:04:18FromDiscord<Robyn [She/Her]> Suit yourself
00:05:47FromDiscord<planetis_m> Sure sure, I will be "missing out" blah blah
00:07:29FromDiscord<Elegantbeef> Me deeply sniffing opengl fumes\: "Missing out?!"
00:07:36FromDiscord<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:53FromDiscord<leorize> uh webgpu is just vulkan on \nix and dx12 on windows
00:26:30FromDiscord<Elegantbeef> It's not vulkan on mac silly guy
00:27:56FromDiscord<leorize> the point is that it doesn't do anything you can't with vulkan \:p
00:27:57FromDiscord<MDuardo> Metal?
00:28:19FromDiscord<Elegantbeef> Right we just write opengl and use zink to get vulkan 😛
00:28:25FromDiscord<Elegantbeef> We being me
00:28:43FromDiscord<leorize> webgpu doesn't use global context though xd
00:28:44FromDiscord<Elegantbeef> Is there any benefit... no, but can I falsely say it's a vulkan compute system... also no
00:29:33FromDiscord<Robyn [She/Her]> Does Zink give better perf than just OpenGL?
00:29:39FromDiscord<leorize> no
00:29:48FromDiscord<Elegantbeef> Cmon leo modern opengl only loosely uses the global contexty
00:29:49FromDiscord<leorize> webgpu is really just vulkan for dumb people
00:30:09FromDiscord<leorize> and I love that shit xd
00:30:12FromDiscord<Elegantbeef> Zink gives you software support on platforms with bad or lacking opengl drivers
00:30:26FromDiscord<Robyn [She/Her]> In reply to @leorize "and I love that": Fair
00:30:37FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Zink gives you software": Fair
00:30:47FromDiscord<leorize> zink might give you better perf if you use Intel arc \:p
00:30:56FromDiscord<Elegantbeef> Yea
00:31:01FromDiscord<Elegantbeef> But no one uses arc
00:31:05FromDiscord<Elegantbeef> So no one gets benefits
00:31:27FromDiscord<Elegantbeef> On mac though you cannot use zink, you can on android though
00:31:50FromDiscord<leorize> see you just have to zink -\> moltenvk
00:31:56FromDiscord<leorize> easy peasy
00:32:23FromDiscord<Elegantbeef> I say you can but https://github.com/AOF-Dev/mesa-swdroid is a fork and not official
00:32:29FromDiscord<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:33FromDiscord<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:17FromDiscord<maxb0tbeep> is there any way to change this behavior, other than adding `&&` and running all commands in the same line?
06:04:58FromDiscord<m4ul3r> In reply to @maxb0tbeep "is there any way": There should be a change directory command that you can run
06:05:47FromDiscord<m4ul3r> (edit) "command" => "proc"
06:05:59FromDiscord<m4ul3r> setCurrentDir
06:07:08FromDiscord<m4ul3r> https://nim-lang.org/docs/dirs.html#setCurrentDir%2CPath
06:16:54FromDiscord<maxb0tbeep> yeah but like other commands too
06:19:16FromDiscord<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:31FromDiscord<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:39FromDiscord<Elegantbeef> Or the shell's arguments
06:21:02FromDiscord<maxb0tbeep> In reply to @m4ul3r "The commands will run": actually cd is the only thing that comes to mind
06:21:52FromDiscord<maxb0tbeep> i was doing `execCmdEx("cd <something> && <something else>")
06:22:00FromDiscord<maxb0tbeep> (edit) "else>")" => "else>")`"
06:22:29FromDiscord<maxb0tbeep> but `setCurrentDir` isnt actually any different?
06:22:38FromDiscord<Elegantbeef> It's no different to running `bash -c "cd /tmp; exit"`
06:22:47FromDiscord<Elegantbeef> you are not going to move path from the program
06:22:51FromDiscord<maxb0tbeep> the directory changes back to the original one after the program ends
06:22:53FromDiscord<Elegantbeef> `setCurrentDir` does set path
06:22:55FromDiscord<m4ul3r> It changes the current dir of the child process
06:23:03FromDiscord<m4ul3r> Ie the bash command ran
06:23:06FromDiscord<Elegantbeef> You cannot permanently change the path
06:23:12FromDiscord<m4ul3r> Then that child process will exit
06:23:15FromDiscord<Elegantbeef> You need to return the path then do `cd $(myProgram)`
06:23:36FromDiscord<Elegantbeef> So if you did `echo getCurrentDir()` at the end of the program it'd set the path
06:25:25FromDiscord<maxb0tbeep> sorry, i'm not following
06:25:38FromDiscord<maxb0tbeep> is there a way to set the path after the program exits?
06:25:44FromDiscord<Elegantbeef> No
06:25:48FromDiscord<maxb0tbeep> ok
06:27:58FromDiscord<m4ul3r> It’s possible, but not in nim stdlib I believe
06:28:28FromDiscord<Elegantbeef> It's not possible cause shells do not enable it
06:28:45FromDiscord<Elegantbeef> You can `putEnv("PWD", ...)` and you get nowhere
06:28:47FromDiscord<m4ul3r> You would be able to just change the cwd of the parent process?
06:29:46FromDiscord<Elegantbeef> I mean you'd write out to the stdout the desired path then do `cd $(myProcess)`
06:30:08FromDiscord<Elegantbeef> There is no way to tell the parent shell to change it's directory
06:30:50FromDiscord<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:59FromDiscord<m4ul3r> Yeah you right. There’s checky ways to do it but good and most likely have to run as root
07:16:10FromDiscord<nnsee> sent a long message, see https://pasty.ee/hNzayWYK
07:16:26*disso-peach quit (Quit: Leaving)
07:17:17FromDiscord<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:50FromDiscord<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:54FromDiscord<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:46FromDiscord<nnsee> my phone keeps wanting to correct shell to she'll and it's infuriating
08:21:23FromDiscord<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:31FromDiscord<albassort> In reply to @basilajith "While inserting values into": i would insert a null byte?
13:13:44FromDiscord<albassort> Do tell me what you ended up doing
13:14:02*rockcavera joined #nim
14:12:19FromDiscord<xtrayambak> Is there a way to get debugging symbols that gdb can understand?
14:17:13FromDiscord<albassort> In reply to @xtrayambak "Is there a way": --debugger:native -use:malloc
14:17:17FromDiscord<albassort> (edit) "-use:malloc" => "--use:malloc"
14:17:24FromDiscord<xtrayambak> ah
14:17:25FromDiscord<xtrayambak> thanks
14:17:25FromDiscord<albassort> gdb can work with that
14:17:53FromDiscord<xtrayambak> shouldn't it be `-d:useMalloc`?
14:17:58FromDiscord<xtrayambak> or I'm wrong
14:18:05FromDiscord<griffith1deadly> In reply to @xtrayambak "shouldn't it be `-d:useMalloc`?": should
14:18:33FromDiscord<xtrayambak> yep, seems to work perfectly now
14:18:35FromDiscord<xtrayambak> thank you
14:20:40FromDiscord<albassort> sorry for the typo lol
14:21:17FromDiscord<albassort> pretty sure i got it confused with --gc:malloc
14:21:41FromDiscord<albassort> (edit) "--gc:malloc" => "--gc:"
14:29:18FromDiscord<xtrayambak> by the way, is there a way to cast a block of memory to a function pointer?
14:29:36FromDiscord<xtrayambak> it's already marked as an executable region and stuff
14:33:56FromDiscord<albassort> uhhh
14:35:37FromDiscord<albassort> I don't think you would be able to execute it
14:35:40FromDiscord<albassort> (edit) "I don't think you would be able to execute it ... " added "in nim"
14:35:42FromDiscord<albassort> but im not sure
14:36:25FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "by the way, is": `cast[yourProcSignature](memoryAddress)`?
14:36:30FromDiscord<albassort> i tried this
14:36:37FromDiscord<xtrayambak> weirdly enough, that causes a segfault
14:36:47FromDiscord<Robyn [She/Her]> Just make sure you use whatever the calling convention for C is, in Nim
14:36:52FromDiscord<xtrayambak> I poked at the memory and I'm probably doing something wrong
14:36:59FromDiscord<xtrayambak> it has a single `jo` instruction
14:37:18FromDiscord<xtrayambak> hold on
14:37:21FromDiscord<Robyn [She/Her]> You can always emit C code if needed
14:37:36FromDiscord<albassort> share your code
14:37:38FromDiscord<xtrayambak> is it even proper to read a `.o` file, turn it into a sequence of bytes and try to execute that?
14:37:40FromDiscord<albassort> i wanna see this
14:37:52FromDiscord<albassort> In reply to @xtrayambak "is it even proper": very improper
14:38:02FromDiscord<albassort> I don't know why you would do that
14:38:02FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "is it even proper": Aren't .o files for linking?
14:38:04FromDiscord<xtrayambak> In reply to @albassort "very improper": don't be half asleep whilst writing code, kids
14:38:16FromDiscord<albassort> also yes, .o are for linking
14:38:22FromDiscord<albassort> you'd want a .so or a .d, at the very least
14:38:25FromDiscord<xtrayambak> ah
14:38:28FromDiscord<Robyn [She/Her]> Yeah exactly
14:38:40FromDiscord<xtrayambak> what should I trigger after the assembler to do that, then?
14:38:40FromDiscord<albassort> but we have ways to actually use dynamic objects and static objects
14:38:42FromDiscord<.lisuwu_> what is a .d
14:38:46FromDiscord<albassort> static binary
14:38:48FromDiscord<xtrayambak> (sorry, I'm pretty inexperienced with stuff)
14:38:52FromDiscord<albassort> (edit) "binary" => "library"
14:38:58FromDiscord<xtrayambak> In reply to @albassort "but we have ways": the `dlopen` stuff?
14:39:01FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "(sorry, I'm pretty inexperienced": No sweat, so am I xD
14:39:10FromDiscord<albassort> I haven't done it in years...
14:39:11FromDiscord<xtrayambak> (edit) "(sorry, I'm pretty inexperienced with ... stuff)" added "this"
14:39:14FromDiscord<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:17FromDiscord<xtrayambak> can it load a `.o` file and run a symbol/function inside of it, though?
14:40:28FromDiscord<xtrayambak> I'm trying to cheese my way out of this problem right now 😅
14:40:43FromDiscord<albassort> yeah it can load any c things inside a library, but not a .o its only the linkers output
14:40:54FromDiscord<albassort> .o's make .so and .ds
14:40:57FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "can it load a": You'd need to link it together aha
14:40:58FromDiscord<albassort> (edit) ".ds" => ".d's"
14:41:03FromDiscord<xtrayambak> ah
14:41:15FromDiscord<xtrayambak> I'm actually generating the ASM code for it dynamically and assembling it at runtime
14:41:34FromDiscord<albassort> this sounds... dangerous
14:41:39FromDiscord<Robyn [She/Her]> Huh, you making a JIT?
14:41:47FromDiscord<albassort> thats like taking ASM at run-
14:41:47FromDiscord<xtrayambak> In reply to @chronos.vitaqua "Huh, you making a": Yep
14:41:49FromDiscord<albassort> robyn got me
14:42:00FromDiscord<xtrayambak> I'm basically going in blindfolded
14:42:06FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "Yep": Nice!
14:42:10FromDiscord<Robyn [She/Her]> In reply to @albassort "robyn got me": :>
14:42:18FromDiscord<albassort> we stand on the backs of giants, you should read up on the literature first
14:42:25FromDiscord<Robyn [She/Her]> You should probably look up-
14:42:45FromDiscord<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:50FromDiscord<Robyn [She/Her]> Yeah :p↵She says, rarely looking up shit
14:42:53FromDiscord<xtrayambak> (edit) removed "later"
14:42:53FromDiscord<albassort> you may make something work but you'll waste your time
14:43:03FromDiscord<albassort> because you'll know how stupid you a re
14:43:07FromDiscord<albassort> in like 48 hours
14:43:11FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "Going in blindfolded, making": Make it work, make it clean, make it fast
14:43:25FromDiscord<albassort> think about it, write something now, feel bad 2 days later
14:43:34FromDiscord<Robyn [She/Her]> In reply to @albassort "in like 48 hours": Always provides knowledge though
14:43:38FromDiscord<albassort> its like the opposite of delayed gratification
14:44:41FromDiscord<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:57FromDiscord<xtrayambak> In reply to @chronos.vitaqua "I wonder if there'd": I'm actually writing an interpreter 😄
14:45:02FromDiscord<nimaoth> well, for a repl that would be useful
14:45:28FromDiscord<xtrayambak> I've written a small bytecode language around it and interpretation works fine but it's awfully slow
14:45:45FromDiscord<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:48FromDiscord<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:32FromDiscord<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:52FromDiscord<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:54FromDiscord<Robyn [She/Her]> I'll probably write bindings to Cranelift for Nim
14:47:12FromDiscord<xtrayambak> In reply to @chronos.vitaqua "I'll probably write bindings": isn't that the WASM engine or something?
14:47:21FromDiscord<xtrayambak> if I remember correctly it's a LLVM rewrite in Rust
14:47:22FromDiscord<xtrayambak> I think
14:47:37FromDiscord<Robyn [She/Her]> In reply to @albassort "err, thats very unsafe.": For a repl that's fine
14:47:54FromDiscord<albassort> I think maybe nim's typing is too computationally intense for a scripting lang
14:49:01FromDiscord<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:18FromDiscord<Robyn [She/Her]> There's no C compiler that uses Cranelift for the backend though :P
14:49:42FromDiscord<xtrayambak> Someone better not rewrite the entire Nim compiler in Rust (🚀)
14:49:48FromDiscord<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:17FromDiscord<xtrayambak> In reply to @chronos.vitaqua "Rust has debug builds": Rust's already integrated Cranelift?
14:50:27FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "Someone better not rewrite": Why would anyone do that? The language is perfect smh /j
14:50:44FromDiscord<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:57FromDiscord<Robyn [She/Her]> No idea, might be spouting bullshit so take it with a pinch of salt
14:51:13FromDiscord<xtrayambak> I just checked an example on how someone implemented a JIT compiler, seems identical to how I did it
14:51:20FromDiscord<xtrayambak> (except for the entire assembler part)
14:51:22FromDiscord<ieltan> In reply to @xtrayambak "Someone better not rewrite": Might as well just fix the Nim compiler to stabilize views and concepts
14:51:37FromDiscord<xtrayambak> In reply to @ieltan "Might as well just": I don't really get why borrow checking is so liked
14:51:56FromDiscord<xtrayambak> I like Nim's approach to memory management much better than overglorified enforced RAII
14:52:02FromDiscord<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:20FromDiscord<xtrayambak> In reply to @ieltan "But I think any": What's NIR exactly?
14:52:32FromDiscord<xtrayambak> Is it just an intermediate representation that all the backends will use in the future?
14:52:40FromDiscord<xtrayambak> (edit) "Is it just an intermediate representation that all the ... backends" added "codegen/emission"
14:52:45FromDiscord<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:21FromDiscord<ieltan> In reply to @xtrayambak "Is it just an": I'm not sure exactly but it seems to be it yeah?
14:53:31FromDiscord<xtrayambak> What's the benefit?
14:53:42FromDiscord<xtrayambak> I think araq said that it brings better IC support or something
14:53:56FromDiscord<vhalragnarok> Doesn't GC also increase the binary size?
14:54:09FromDiscord<xtrayambak> In reply to @vhalragnarok "Doesn't GC also increase": Yes
14:54:30FromDiscord<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:45FromDiscord<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:52FromDiscord<ieltan> In reply to @xtrayambak "What's the benefit?": .
14:55:12FromDiscord<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:13FromDiscord<vhalragnarok> Rust's Borrow Checker & Lifetimes and all of that are hella complex.
14:55:36FromDiscord<xtrayambak> In reply to @chronos.vitaqua "And fix the compiler": Combining generics with templates is like putting lithium in water
14:55:40FromDiscord<xtrayambak> it never goes well
14:55:41FromDiscord<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:02FromDiscord<xtrayambak> I learnt it the hard way by spending 3 hours fixing the obscene amount of generics abuse I had committed
14:56:13FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "Combining generics with templates": Funnily enough, never had an issue with those
14:56:13FromDiscord<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:28FromDiscord<vhalragnarok> Yeeeah
14:56:47FromDiscord<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:01FromDiscord<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:02FromDiscord<vhalragnarok> GC however is way simpler lol.
14:57:18FromDiscord<xtrayambak> Nim's GC doesn't carry a huge performance penalty either, surprisingly
14:57:34FromDiscord<ieltan> In general what I learned is that the type system becomes brittle once you deal with non-concrete types.
14:57:54FromDiscord<vhalragnarok> I've not looked into how well Nim handles stuff manually, but Zig's approach is very sane.
14:57:54FromDiscord<zumi.dxy> In reply to @xtrayambak "They're reworking the borrow": nightly users rejoice
14:58:10FromDiscord<zumi.dxy> In reply to @xtrayambak "Nim's GC doesn't carry": not even refc?
14:58:22FromDiscord<zumi.dxy> i know `arc` is supposed to be as light as it can be
14:58:25FromDiscord<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:31FromDiscord<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:38FromDiscord<xtrayambak> In reply to @vhalragnarok "I've not looked into": araq's response to zig was funny
14:58:40FromDiscord<vhalragnarok> I will give Rust 1 thing... Their documentation for new people is unparalleled . The Rust Book is so, so, so good.
14:58:59FromDiscord<vhalragnarok> Along with Rustlings and what not.
14:59:00FromDiscord<xtrayambak> https://media.discordapp.net/attachments/371759389889003532/1253725864881950730/CNTXN3s.png?ex=6676e6b3&is=66759533&hm=132d2dbf77b67567afaea744f825032c3aeac3fc0f7c87a8a7a032ba32be0221&
14:59:02FromDiscord<zumi.dxy> +rustonomicon
14:59:02FromDiscord<Robyn [She/Her]> In reply to @vhalragnarok "I've not looked into": Zig has no macros at all, right?
14:59:04FromDiscord<xtrayambak> In reply to @vhalragnarok "I will give Rust": Seriously.
14:59:18FromDiscord<ieltan> In reply to @xtrayambak "araq's response to zig": He really doesn't like allocator parameters
14:59:18FromDiscord<vhalragnarok> In reply to @chronos.vitaqua "Zig has no macros": Not to my knowledge yet.
14:59:21FromDiscord<xtrayambak> 90% of people I recommend Nim get demotivated due to how scattered Nim docs are
14:59:48FromDiscord<xtrayambak> I have to manually feed them examples to get them to get used to it
14:59:54FromDiscord<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:00FromDiscord<xtrayambak> and I'm not a good example giver anyway 😅
15:00:14FromDiscord<Robyn [She/Her]> Though I guess it would be a bit ugly if everything had an allocator param
15:00:15FromDiscord<zumi.dxy> "here's a company using nim"↵"hmm, they actively avoid stdlib features"↵huh?"
15:00:23FromDiscord<xtrayambak> In reply to @zumi.dxy ""here's a company using": Status IM moment
15:00:24FromDiscord<ieltan> In reply to @xtrayambak "90% of people I": This is even worse once you deal with multithreading lol
15:00:38FromDiscord<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:44FromDiscord<xtrayambak> 99% of my Nim code is single threaded
15:00:52FromDiscord<xtrayambak> the 1% is multi-processed instead of multi threaded
15:00:57FromDiscord<vhalragnarok> If I want Multithreading I'll pull out Go.
15:00:59FromDiscord<vhalragnarok> Lol.
15:01:02FromDiscord<ieltan> In reply to @zumi.dxy ""here's a company using": Nim probably needs an alternative stdlib managed by the community
15:01:17FromDiscord<vhalragnarok> (edit) "Lol." => "From the sounds of it lol."
15:01:27FromDiscord<zumi.dxy> In reply to @xtrayambak "Status IM moment": the more I think about exceptions vs results the more I want backtraces
15:01:46FromDiscord<xtrayambak> In reply to @zumi.dxy "the more I think": I prefer both
15:01:50FromDiscord<xtrayambak> depending on what I'm doing
15:01:59FromDiscord<xtrayambak> (yes, I'm a psychopath)
15:02:02FromDiscord<zumi.dxy> even status made nim bindings to `libbacktrace` to slightly ease the pain of backtraces
15:02:16FromDiscord<xtrayambak> I'm surprised they even use Nim
15:02:19FromDiscord<xtrayambak> but I'm glad they do
15:02:29FromDiscord<xtrayambak> they've given so much to the community :3
15:02:37FromDiscord<zumi.dxy> if I want `Result` I probably need manual calls to print backtraces
15:02:50FromDiscord<zumi.dxy> In reply to @xtrayambak "but I'm glad they": someone has to use it after all
15:03:24FromDiscord<xtrayambak> honestly though, Nim needs a proper big tech sponsor
15:03:34FromDiscord<xtrayambak> imagine all the manpower that'd come along with it
15:04:02FromDiscord<xtrayambak> hell, even D has Facebook backing it
15:04:19FromDiscord<xtrayambak> though last I checked (and from my friend's mishaps) D isn't exactly very usable
15:04:30FromDiscord<xtrayambak> plus they have 80 different compilers
15:04:42FromDiscord<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:58FromDiscord<Robyn [She/Her]> In reply to @zumi.dxy "the more I think": Backtraces?
15:05:31FromDiscord<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:46FromDiscord<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:01FromDiscord<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:13FromDiscord<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:37FromDiscord<xtrayambak> I don't contribute to the Nim compiler so I could care less what state it's in
15:06:48FromDiscord<xtrayambak> monke run `nim c`, monke get C code, monke happy.
15:06:55FromDiscord<Robyn [She/Her]> I want to make my own language solely so I can avoid the shortcomings of Nim :p
15:07:01FromDiscord<Robyn [She/Her]> I love Nim, so, so much
15:07:11FromDiscord<Robyn [She/Her]> But sometimes I'd rather not fight against the compiler
15:07:25FromDiscord<xtrayambak> I love how much time Nim saves me
15:07:32FromDiscord<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:33FromDiscord<zumi.dxy> i could try kitlang sometime
15:07:34FromDiscord<xtrayambak> I can write it muuuch faster than I can write C
15:08:07FromDiscord<zumi.dxy> what I love about Nim https://media.discordapp.net/attachments/371759389889003532/1253728156750450758/image.png?ex=6676e8d5&is=66759755&hm=25d92cd28e568b369b8c03158bdb62a9899bbe0ae1215d91b1e58ee3ed5f9996&
15:08:14FromDiscord<Robyn [She/Her]> In reply to @ieltan "I see heap allocation": ✨ but muh allocationless code ✨
15:08:17FromDiscord<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:30FromDiscord<xtrayambak> In reply to @zumi.dxy "what I love about": ah yes, casually writing down entire expression evaluations for call arguments
15:08:34FromDiscord<xtrayambak> that's my favourite thing
15:08:49FromDiscord<Robyn [She/Her]> Honestly I also wanna see how much of Nim's magic can be implemented without it
15:09:04FromDiscord<xtrayambak> my favourite Nim feature is the UFCS abuse
15:09:18FromDiscord<zumi.dxy> re:3rd party stdlib↵well, there's the problem of the `system` module always being loaded in
15:09:32FromDiscord<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:34FromDiscord<zumi.dxy> dunno if nimskull plans to change that
15:09:50FromDiscord<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:53FromDiscord<zumi.dxy> In reply to @ieltan "I think it's better": stack is an allocation↵checkmate lizard people
15:10:22FromDiscord<ieltan> Well I've read that it's so fast it's like there is no allocation at all so 😄
15:10:28FromDiscord<xtrayambak> In reply to @zumi.dxy "re:3rd party stdlib well,": and it's damn annoying 😄
15:10:58FromDiscord<ieltan> In reply to @zumi.dxy "re:3rd party stdlib well,": `from system import nil`?
15:11:19FromDiscord<zumi.dxy> well it's implicit and it's full of compiler magic
15:11:32FromDiscord<ieltan> You can try and see
15:11:43FromDiscord<zumi.dxy> `nimPreviewSlimSystem` is appreciated
15:12:51FromDiscord<Robyn [She/Her]> In reply to @zumi.dxy "re:3rd party stdlib well,": There's a flag to disable that
15:13:19FromDiscord<Robyn [She/Her]> Can't remember which one though
15:15:32FromDiscord<Robyn [She/Her]> Maybe there isn't a flag for it...
15:42:57FromDiscord<leorize> it's not like no one ever tried to make "3rd party stdlib" a thing
15:44:52FromDiscord<leorize> the problem has always been that you plan things in nim, not executing it
15:46:02FromDiscord<leorize> and well, I wouldn't say that Status is all good
15:46:20FromDiscord<leorize> past discussions about stdlib\: https://github.com/nim-lang/RFCs/issues/310
15:51:42FromDiscord<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:39FromDiscord<leorize> I just think that people like talking it but no one wants to do it
15:55:58FromDiscord<leorize> my head canon is that the people with the know how just isn't interested in nim
15:58:16FromDiscord<leorize> some previous initiatives did produce something
15:58:18FromDiscord<Robyn [She/Her]> Wouldn't be surprising, Nim has quite a few smaller issues that join together :P
15:58:35FromDiscord<leorize> but as far as I know many contributors just left
15:58:46FromDiscord<Robyn [She/Her]> In reply to @leorize "but as far as": Like dom96?
15:59:30FromDiscord<leorize> I wouldn't classify dom as "left"
15:59:44FromDiscord<Robyn [She/Her]> Why not?
16:03:08FromDiscord<leorize> dom's involvement become more or less non existent after he went and work for facebook
16:03:08FromDiscord<leorize> which is fine
16:03:39FromDiscord<leorize> the problem is that dom likes to feel important and frequently block discussions that involved his code
16:06:26FromDiscord<leorize> and as you can see, literally nothing happened after dom cut ties with nim
16:07:12FromDiscord<leorize> he wasn't there to begin with
16:08:26FromDiscord<odexine> "it was so gradual a leave that it didnt really feel like anything" kinda vibe right
16:10:56FromDiscord<leorize> dude doesn't even use nim yet likes to flaunt his weight around
16:12:17FromDiscord<leorize> there are reasons why old members don't like him that much \:p
16:13:32FromDiscord<odexine> yeah i kinda figured from d\\\\\\\k
16:13:46FromDiscord<threefour> Didn't know there was drama surrounding him
16:14:13FromDiscord<odexine> theres quite a lot of drama
16:14:29FromDiscord<leorize> nim have more new blood today than old
16:14:30*Jhonny2x4 quit (Quit: Jhonny2x4)
16:14:31FromDiscord<odexine> there's the exiled one and the one banned on what seemed to be a whim
16:14:42FromDiscord<leorize> so stories like these are just gone now
16:14:51*Jhonny2x4 joined #nim
16:16:06FromDiscord<leorize> I never know why but a bunch of old influential nim devs just, uh, move on to zig
16:16:12FromDiscord<leorize> a language that's 180 from nim
16:16:36FromDiscord<odexine> wait really
16:16:38FromDiscord<planetis_m> In reply to @leorize "I never know why": Who ?
16:16:39FromDiscord<odexine> who did
16:16:48FromDiscord<odexine> hey dont steal my questions
16:17:08FromDiscord<leorize> lemonboy, dataman, and a couple more that I forgot
16:17:10FromDiscord<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:21FromDiscord<leorize> and to \nix ricer, yes we did have the lemonboy of lemonbar fame
16:17:24FromDiscord<zumi.dxy> not to mention it's not even "stabilized" a bit
16:17:39FromDiscord<zumi.dxy> i'm glad bun exists in spite of that though
16:17:40FromDiscord<planetis_m> In reply to @odexine "hey dont steal my": What why, when, how? Niw I stole all of your questions. Wygd?
16:18:12FromDiscord<odexine> In reply to @planetis_m "What why, when, how?": have you? ha! i had one more question
16:18:42FromDiscord<planetis_m> In reply to @leorize "lemonboy, dataman, and a": Eh these didn't stay that long they were passing
16:19:16FromDiscord<zumi.dxy> bun's also got a pretty ingenious crash handler too
16:19:20FromDiscord<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:17FromDiscord<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:29FromDiscord<leorize> so I'd say they stayed long enough to leave a lot of marks
16:25:23FromDiscord<planetis_m> I suppose you mean lemonboy
16:25:26FromDiscord<planetis_m> Sure
16:26:13FromDiscord<planetis_m> But he was hired not by he's own
16:26:51FromDiscord<leorize> hired?
16:28:21FromDiscord<planetis_m> To work on bugfixes yes
16:29:02FromDiscord<leorize> first time I've heard about lemonboy being hired
16:29:53FromDiscord<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:00FromDiscord<leorize> though tbf nim's finances was pretty tight
16:31:57FromDiscord<planetis_m> "Hired by someone else. I guess we will never know
16:36:22FromDiscord<leorize> just noticed that nim is finally using OC funds
16:36:24FromDiscord<leorize> it was pretty depressing seeing money pooling up and not invested in devs
16:50:00FromDiscord<threefour> In reply to @odexine "there's the exiled one": Say hwat
16:52:03FromDiscord<leorize> quite literally the only permanent ban in this community
16:53:02FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=BgJDwwES
16:53:11FromDiscord<threefour> In reply to @leorize "quite literally the only": Who?
16:54:50FromDiscord<leorize> did you accidentially put your channels in a `const`?↵(@threefour)
16:54:59FromDiscord<leorize> disruptek↵(@threefour)
16:59:14FromDiscord<Robyn [She/Her]> In reply to @leorize "there are reasons why": Ah
16:59:38FromDiscord<threefour> I don't have any `const` touching anything related to channels. Only for lookup tables for something completely unrelated.
17:03:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=BqnpIGBi
17:05:00FromDiscord<Phil> I'd be curious about a couple more opinions about this given I'm currently very much in "developer tunnel vision"
17:05:12FromDiscord<leorize> time to use the `as` operator
17:05:31FromDiscord<Phil> The what now?
17:05:50FromDiscord<leorize> `Box() as box:` works
17:06:43FromDiscord<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:35FromDiscord<leorize> it does require you to be a little careful about your ref's lifetime
17:07:41FromDiscord<leorize> but your framework probably handled it already
17:07:54FromDiscord<Phil> The "Ref" is a mini observable
17:08:10FromDiscord<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:13FromDiscord<albassort> what type is nil? I want an optional object passed into a procedure
17:08:19FromDiscord<albassort> my solution is type or nil
17:08:22FromDiscord<albassort> (edit) "my solution is type or ... nil" added "cstring ="
17:08:42FromDiscord<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:46FromDiscord<leorize> `typeof(nil)`
17:08:51FromDiscord<albassort> nil
17:08:53FromDiscord<albassort> right
17:09:02FromDiscord<leorize> nil is also an implicit value of any `ref` types
17:09:37FromDiscord<albassort> i will keep type or cstring = nil until i think of something easier
17:09:57FromDiscord<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:08FromDiscord<leorize> but I think gtk is sane enough so you don't have to worry
17:10:30FromDiscord<albassort> gtk? sane?
17:10:38FromDiscord<albassort> nah gtk is pretty robust
17:10:47FromDiscord<albassort> writing it though...
17:11:25FromDiscord<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:26FromDiscord<Robyn [She/Her]> I get suck a weird error I can't even begin to figure out how to replicate
17:13:26FromDiscord<leorize> if you want to go fancy, you can copy jetpack compose
17:13:54FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=rGVkEJQz
17:13:58FromDiscord<leorize> actually maybe not jetpack compose
17:14:07FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=cELytzGW
17:14:23FromDiscord<leorize> is this typed ast?
17:14:25FromDiscord<Robyn [She/Her]> But only when I add `state: ParserState` to a type
17:14:36FromDiscord<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:57FromDiscord<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:19FromDiscord<Robyn [She/Her]> In reply to @leorize "is this typed ast?": It's a normal type definition :p
17:15:52FromDiscord<albassort> better solution: take ref
17:15:57FromDiscord<albassort> (edit) "better solution: take ref ... " added "= nil"
17:16:14FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=IDqqIUmI
17:17:26FromDiscord<leorize> that's not the kind of fancy I'm talking about↵(@Phil)
17:17:30FromDiscord<Robyn [She/Her]> Might just make an `init` proc for `ParserState`
17:18:28FromDiscord<leorize> sent a long message, see https://pasty.ee/NxvZJphY
17:18:44FromDiscord<leorize> though now that I think about it, the \`as\` stuff still works better
17:19:20FromDiscord<Robyn [She/Her]> If you're looking for chaining something together, why not look at https://github.com/khchen/chain ?
17:19:27FromDiscord<Robyn [She/Her]> See how that lib does it and maybe steal it
17:19:50FromDiscord<Robyn [She/Her]> It was designed to be used with `wNim` in mind too
17:21:12FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=blIhhQaP
17:21:13FromDiscord<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:23FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=eZEjrBtD
17:22:44FromDiscord<leorize> that's a weird macro↵(@Robyn [She/Her])
17:22:52FromDiscord<leorize> as in I don't see why you needed one
17:23:19FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=AphbaRrN
17:23:30FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=josLdtfK
17:23:48FromDiscord<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:25FromDiscord<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:03FromDiscord<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:45FromDiscord<leorize> you can study parsec design for this \:p
17:30:10FromDiscord<Robyn [She/Her]> I probably could buuuut where's the fun in research :P
17:30:44FromDiscord<leorize> is that not research?
17:33:49FromDiscord<Robyn [She/Her]> Wdym?
17:34:20FromDiscord<leorize> I mean studying parsec is research \:p
17:35:11FromDiscord<Robyn [She/Her]> Yeah, where's the fun in research
17:35:16FromDiscord<Robyn [She/Her]> That's what I said :P
17:35:37FromDiscord<leorize> I guess my English comprehension needs work
17:36:39FromDiscord<Robyn [She/Her]> Perhaps
17:37:36FromDiscord<thepuzzleddev> how can I make a u16 type
17:37:47FromDiscord<Robyn [She/Her]> `uint16`
17:37:59FromDiscord<Robyn [She/Her]> In reply to @thepuzzleddev "how can I make": Do you mean an alias?
17:38:16FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=qFboiDOx
17:54:25FromDiscord<threefour> What's the idiomatic way to do multiline proc arguments so I don't have a 200-column line?
17:55:00FromDiscord<albassort> i have a 315 column line
17:55:04FromDiscord<albassort> for a proc
17:55:13FromDiscord<threefour> You should be ashamed
17:55:28FromDiscord<threefour> Jk but 🤢
17:55:28FromDiscord<albassort> i forget the way you make them multiline and i'll fix it eventually
17:55:52FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=kTptoFqx
17:57:05FromDiscord<leorize> just new line after comma
17:57:43FromDiscord<leorize> indentation doesn't matter inside parentheses
17:58:37FromDiscord<albassort> hmm wonder what i was doing wrong earlier
17:58:38FromDiscord<albassort> ¯\_(ツ)_/¯
17:59:45FromDiscord<albassort> ah i see, the return type has to be on the same linee
18:00:38FromDiscord<leorize> if you're a masochist, return type can be on it's own line
18:01:01FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=NSarhcPE
18:01:45FromDiscord<albassort> In reply to @leorize "if you're a masochist,": no?
18:01:55FromDiscord<albassort> oh
18:01:56FromDiscord<albassort> just the type
18:01:58FromDiscord<albassort> err...
18:02:04FromDiscord<albassort> i am a masochist
18:02:13FromDiscord<leorize> sent a long message, see https://pasty.ee/OQxSpbPJ
18:02:14FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=dsTnFBFm
18:02:20FromDiscord<threefour> (edit) "https://play.nim-lang.org/#pasty=IIuAspbX" => "https://play.nim-lang.org/#pasty=yOQDxvGM"
18:02:31FromDiscord<threefour> (edit) "https://play.nim-lang.org/#pasty=ZbesUVFU" => "https://play.nim-lang.org/#pasty=NiUxIUQf"
18:02:42FromDiscord<threefour> I can't decide which I find more hideous.
18:02:46*SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev)
18:02:57FromDiscord<albassort> sent a code paste, see https://paste.rs/yBFmi
18:07:45FromDiscord<Elegantbeef> K&R Nim
18:08:25FromDiscord<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:45FromDiscord<Robyn [She/Her]> I don't think result types are playing nicely with non-copyable types :/
18:11:05FromDiscord<leorize> welcome to the fascinating world of nim
18:11:38FromDiscord<leorize> if you want it to work, it must be possible to move the data out
18:16:08FromDiscord<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:32FromDiscord<Robyn [She/Her]> Oh that's behind a flag
18:16:44FromDiscord<Robyn [She/Her]> Meh, `sink` should be enough for my purposes
18:24:06FromDiscord<Robyn [She/Her]> I need to figure out how to use VSC's debugger stuff now :|
18:26:20FromDiscord<Robyn [She/Her]> `No module named 'lldb.embedded_interpreter'`
18:35:27FromDiscord<Robyn [She/Her]> I am so lost, no variables or anything is showing up...
18:40:14FromDiscord<Robyn [She/Her]> Ah, `lldb-mi` is different from `lldb-server`
18:41:19FromDiscord<Robyn [She/Her]> I need to build it myself??
18:41:57FromDiscord<Robyn [She/Her]> I'm just gonna use `gdb`
18:43:02FromDiscord<Robyn [She/Her]> gdb works
18:45:07FromDiscord<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:14FromDiscord<basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=vNSEpZek
18:49:50FromDiscord<planetis_m> In reply to @chronos.vitaqua "Is there any way": Works better on devel, but they look like C++ namespaces
18:50:08FromDiscord<Robyn [She/Her]> Good to know, thanks planetis!
18:51:06FromDiscord<planetis_m> In reply to @basilajith "Help! I'm getting": -d:debug prints no stacktrace?
18:52:46FromDiscord<planetis_m> There's also writeStacktrace() which you can add in strategic places
18:54:29FromDiscord<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:43FromDiscord<basilajith> Is this how?↵`nimble build -d:danger -d:debug`↵↵If so, it's not working.
18:54:48FromDiscord<planetis_m> (edit) removed "And"
18:55:12FromDiscord<planetis_m> In reply to @basilajith "Is this how? `nimble": No you can't have -d: danger in there
18:55:59FromDiscord<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:22FromDiscord<planetis_m> In reply to @planetis_m "and `-d:useMalloc -t:"-fsanitize=address,undefined"": Do this instead
18:56:32FromDiscord<planetis_m> Or liad a smaller file
18:56:38FromDiscord<planetis_m> (edit) "liad" => "load"
18:59:28FromDiscord<basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=pISKAPlf
19:00:21FromDiscord<planetis_m> Now you have to fix your indexing
19:01:15FromDiscord<basilajith> Got it... thanks!
19:06:48FromDiscord<Elegantbeef> @Robyn [She/Her] sink inference just explodes code anyway
19:07:44FromDiscord<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:31FromDiscord<Elegantbeef> Tangentaly related I really should take another look at thunking all calling conventions
19:08:40FromDiscord<Robyn [She/Her]> Aah, fun
19:24:41FromDiscord<threefour> What's the point of the new `Chan` anyways?
19:24:57FromDiscord<Elegantbeef> @planetis_m I assume your aligned alloc is due to GL interop?
19:26:08FromDiscord<Elegantbeef> want for aligned alloc\
19:26:54FromDiscord<Elegantbeef> Threefour the new channels use move semantics
19:28:43FromDiscord<planetis_m> no I am just making a pool alocator just to learn how it work
19:28:46FromDiscord<planetis_m> (edit) "work" => "works"
19:29:15FromDiscord<planetis_m> But sure that would also be a reason I assume
19:29:39FromDiscord<planetis_m> I have needed it for ages but there's little progress
19:32:36FromDiscord<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:58FromDiscord<Elegantbeef> make a new reference then move it over
19:33:44FromDiscord<Robyn [She/Her]> Any easy way to automate that with a variant object? Does `fieldPairs` work on object variants?
19:34:02FromDiscord<Elegantbeef> Yes dereference the object
19:34:10FromDiscord<Elegantbeef> There is no need to use field pairs
19:34:26FromDiscord<Robyn [She/Her]> It's an `object` I wanna make into a `ref`
19:34:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=IhtGiKmF
19:34:49FromDiscord<Elegantbeef> We're thinking with portals
19:34:49FromDiscord<Robyn [She/Her]> Oh wait yeah, I forgot about that
19:34:53FromDiscord<Robyn [She/Her]> xD
19:45:45*SchweinDeBurg joined #nim
19:49:54FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RyFbuRrk
19:50:14FromDiscord<Robyn [She/Her]> Still super helpful compared to my first attempt, but also ugly as hell to read
19:57:15FromDiscord<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:34FromDiscord<Elegantbeef> Well that's how you'd do it
20:04:49*coldfeet quit (Remote host closed the connection)
20:10:05FromDiscord<Robyn [She/Her]> I shouldn't be getting an error here then :/
20:30:04FromDiscord<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:05FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=JVdExqiJ
21:14:19FromDiscord<Robyn [She/Her]> But without that proc, it works as it would normally
21:14:35FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=UXutwoWt
21:14:49FromDiscord<Robyn [She/Her]> This is the definition of the type
21:15:00FromDiscord<Robyn [She/Her]> `ParserFailureCombinatorSide` is just an enum of `Left` and `Right`
21:17:09FromDiscord<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:20FromDiscord<Robyn [She/Her]> I could hide that part away using debug messages I guess
21:19:23FromDiscord<Elegantbeef> @Robyn [She/Her] what happens when you do `echo $res`?
21:21:31*disso-peach joined #nim
21:23:02FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=KaWydDPe
21:23:03FromDiscord<Robyn [She/Her]> Aaaah
21:23:15FromDiscord<Robyn [She/Her]> It's `results` causing the issue because it's all marked as `func`s
21:23:19FromDiscord<Robyn [She/Her]> I've had this issue before
21:23:20FromDiscord<Elegantbeef> Mark with `{.noSideEffect.}` since it's recursive
21:23:58FromDiscord<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:33FromDiscord<Robyn [She/Her]> Making it a `func` also works
21:24:41FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "I believe ringabout has": Makes sense, thanks Beef
21:24:47FromDiscord<Elegantbeef> That's literally the same thing
21:25:11FromDiscord<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:20FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "That's literally the same": Yes but one looks nicer :P
21:27:01FromDiscord<Elegantbeef> That has a face that only a mother could love
21:35:19FromDiscord<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:40FromDiscord<Elegantbeef> How do I say RTFM nicely
21:35:45FromDiscord<Array up in this Matrix 🇵🇸🍉> lol
21:35:49FromDiscord<Array up in this Matrix 🇵🇸🍉> i will go read it then
21:37:22FromDiscord<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:13FromDiscord<Robyn [She/Her]> Huh, my and combinator is acting funky rn
21:41:39FromDiscord<Robyn [She/Her]> Aaah, it's my `many0`
21:41:47FromDiscord<Robyn [She/Her]> I forgot to pass the position to it :p
21:41:53FromDiscord<Robyn [She/Her]> So it used the default parameter `0`
21:42:03FromDiscord<Robyn [She/Her]> I should making that explicit
21:42:23FromDiscord<Elegantbeef> Default parameters are a mistake
21:42:38FromDiscord<leorize> it's always scary to see people write parser combinators before the language \:p
21:42:59FromDiscord<Robyn [She/Her]> In reply to @leorize "it's always scary to": Dw, my parser combinator is a private thing anyway
21:43:08FromDiscord<Elegantbeef> You don't put the toilet down before building the house?
21:43:11FromDiscord<Robyn [She/Her]> Plus I did write a lexer and parser for my language
21:44:15FromDiscord<Array up in this Matrix 🇵🇸🍉> https://nim-lang.org/docs/manual.html#procedures-func↵says its the same?
21:44:28FromDiscord<Robyn [She/Her]> Removing the default param also caught another place where I forgot to pass it, nice
21:45:49FromDiscord<Elegantbeef> Yes
21:46:23FromDiscord<Elegantbeef> How does one forget to pass an optional parameter and have it cause issues? 😄
21:47:16FromDiscord<leorize> looks like it's not optional anymore xd
21:48:16FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RvWwnCqA
21:48:22FromDiscord<Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=TFhVxSLi" => "https://play.nim-lang.org/#pasty=kLATTEoZ"
21:49:51FromDiscord<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:40FromDiscord<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:55FromDiscord<Robyn [She/Her]> `"0b110 `a_cd`"` this was the input
22:12:43FromDiscord<Robyn [She/Her]> I'm not sure how to handle maths in a combinator :P
22:13:12FromDiscord<Robyn [She/Her]> Google go brrr
22:14:24FromDiscord<the_real_hypno> Ask ChatGPT to Google it for you
22:14:50FromDiscord<the_real_hypno> 10/10 quality result
22:14:55FromDiscord<Robyn [She/Her]> ChatGPT can be wrong, but good point
22:14:57FromDiscord<the_real_hypno> I promise
22:15:26FromDiscord<the_real_hypno> It was particially ironic but sometimes it really yields valuable infos
22:15:34FromDiscord<the_real_hypno> Cause of the simplicity
22:15:45FromDiscord<Robyn [She/Her]> Yeah that's true
22:16:12FromDiscord<the_real_hypno> It "thinks" outside of your bubble, thats what I actually value about the AI hype
22:18:54FromDiscord<Robyn [She/Her]> Fair, I only really used it to do simple research to avoid spending hours on college assignments xF
22:19:44FromDiscord<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:21FromDiscord<leorize> read up on Pratt parser ig↵(@Robyn [She/Her])
22:29:55FromDiscord<leorize> expression parsing is always a pain
22:30:03FromDiscord<leorize> unless it's LR(k) ig
22:31:14FromDiscord<Robyn [She/Her]> `LR(k)`?
22:31:38FromDiscord<leorize> it's a family of languages
22:32:30FromDiscord<leorize> the LR method of parsing allow expressions to be solved rather neatly
22:32:33FromDiscord<Robyn [She/Her]> Does it mean 'Left Recursive' something?
22:32:53FromDiscord<Robyn [She/Her]> I'm assuming right to left? Oooor?
22:35:17FromDiscord<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:21FromDiscord<leorize> from wikipedia
22:35:57FromDiscord<Robyn [She/Her]> Huh, weird
23:05:30FromDiscord<Robyn [She/Her]> How does Nim parse expressions :p
23:05:46FromDiscord<Robyn [She/Her]> Maths, specifically
23:11:39FromDiscord<leorize> you can read the code
23:11:50FromDiscord<leorize> it's actually not that bad (maybe)
23:15:54FromDiscord<Robyn [She/Her]> > (maybe)
23:16:02FromDiscord<Robyn [She/Her]> Hmmm
23:18:24FromDiscord<leorize> it's like using rust
23:18:27FromDiscord<leorize> you read it
23:18:31FromDiscord<leorize> you got it
23:18:46FromDiscord<leorize> and you might have tricked yourself into thinking that it's fine
23:19:25FromDiscord<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:45FromDiscord<albassort> (edit) removed "code"
23:21:39FromDiscord<zumi.dxy> In reply to @leorize "and you might have": "if it compiles, it works"
23:23:02FromDiscord<leorize> it's ok, people trick themselves into thinking that nim is fine as well
23:23:06FromDiscord<leorize> I know I do
23:23:45FromDiscord<Elegantbeef> A spoonful of sugar makes the medicine go down
23:34:01FromDiscord<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:56FromDiscord<Robyn [She/Her]> In reply to @leorize "and you might have": XD
23:43:01FromDiscord<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:09FromDiscord<Robyn [She/Her]> It might even look good on my portfolio!
23:46:56FromDiscord<Elegantbeef> To talk about any more inanity, what level of information do you provide in your unimplemented logic messaging?
23:47:17FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EXSkHeVZ
23:48:15FromDiscord<Elegantbeef> Guess I can remove `stringIt` just by doing `.astToStr`
23:49:39FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "It's now that I": What's an InsensitiveString? :p
23:49:55FromDiscord<Robyn [She/Her]> Also didn't Nim used to have tainted strings? What were those anyway?
23:49:59FromDiscord<Elegantbeef> One that does is case insensitive
23:50:18FromDiscord<Elegantbeef> Tainted strings were untyped binary blobs that you were supposed to sanitise before use
23:50:57FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "One that does is": Why not just `toLowerAscii` the string?
23:51:10FromDiscord<Elegantbeef> Cause that's error prone
23:51:13FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Tainted strings were untyped": So what strings are now?
23:51:29FromDiscord<Elegantbeef> Untyped binary blobs that you are supposed to sanitise before use
23:51:33FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Cause that's error prone": How so? Was InsensitiveString to ensure type safety?
23:51:58FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=tcMxmQlV
23:52:13FromDiscord<Elegantbeef> It does not change the the internal data it just compares and hashes insensitively
23:52:15FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Untyped binary blobs that": What was the point of removing them then?-
23:52:28FromDiscord<Elegantbeef> They were distinct types that made it harder to do operations
23:52:48FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "It does not change": Hm, fair
23:53:01FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "They were distinct types": But it provided type safety, right?
23:53:12FromDiscord<Robyn [She/Her]> Ig people can always make their own tainted string :P
23:53:21FromDiscord<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:39FromDiscord<Elegantbeef> It did provide typesafety but it polluted everything and made it a massive noob trap
23:54:05FromDiscord<Elegantbeef> Cause in a text based environment typing casing properly is going to end badly
23:54:43FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "The reason I'm using": Fair
23:55:04FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "It did provide typesafety": Oof