00:08:27 | FromDiscord | <sOkam! 🫐> will never ever understand why people do this to themselves↵or should I say↵i'll n e u w ppl d th t thsv 🤦♂️ 🤷♂️ https://media.discordapp.net/attachments/371759389889003532/1213639084363489370/image.png?ex=65f6347a&is=65e3bf7a&hm=d88f0271cc9cd03ef45c680c4841e642a003bc7dff1e603aa60872b223845b6a& |
00:09:25 | FromDiscord | <sOkam! 🫐> single letter acronyms are so unreadable to me 😔 |
00:09:57 | FromDiscord | <Elegantbeef> I 'll never understand why 'd one would write like that |
00:10:25 | FromDiscord | <Elegantbeef> Subtle shot off the portside! |
00:10:29 | FromDiscord | <sOkam! 🫐> I get it for heavy mathy code, with lots of repeated names |
00:10:48 | FromDiscord | <sOkam! 🫐> outside of that, its beyond me |
00:11:26 | FromDiscord | <morgan> yeah gotta strike a balance between v and myLongJavaProjectNameMyTypeIsVeryVeryLongMyVariable |
00:11:38 | FromDiscord | <sOkam! 🫐> In reply to @morganalyssa "yeah gotta strike a": tru 🙈 |
00:12:25 | FromDiscord | <morgan> but yea i often prototype stuff in desmos and it’s painful to do anything more than single letter variables and names with number suffixes |
00:12:39 | FromDiscord | <morgan> so it’s mostly all that for the names |
00:12:48 | FromDiscord | <sOkam! 🫐> JavaRepeats.JavaRepeatsThemselves.ThemselvesWayTooMuch.ThemselvesWayTooMuchForAnyonesSanity.Sanity 🙈 |
00:13:00 | FromDiscord | <morgan> exactly |
00:13:19 | FromDiscord | <Elegantbeef> I dare not say anything in attempt to not annoy sokam |
00:38:29 | FromDiscord | <Robyn [She/Her]> Say it- |
01:00:03 | * | nazgulsenpai quit (Quit: ZNC 1.8.2 - https://znc.in) |
01:03:57 | * | nazgulsenpai joined #nim |
01:08:39 | * | krux02 quit (Remote host closed the connection) |
01:49:27 | FromDiscord | <Robyn [She/Her]> I wonder if a http library using the sans-io philosophy is a good project now hmm |
01:49:55 | FromDiscord | <Robyn [She/Her]> I need a new project since I lost motivation for the MC server for now |
01:50:14 | FromDiscord | <Robyn [She/Her]> I'll probably look at doing that some time soon |
01:52:21 | FromDiscord | <hlsee> Is there any way to read assembly generated by nim? |
01:53:03 | FromDiscord | <Robyn [She/Her]> In reply to @hlsee "Is there any way": You'd do it the same way you'd do with C/C++ |
01:53:19 | FromDiscord | <Robyn [She/Her]> The generated assembly will be garbage though |
01:56:01 | FromDiscord | <zumi.dxy> wish compiler explorer had a way for me to see the intermediate C output |
01:56:29 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "wish compiler explorer had": Compiler explorer? |
01:57:09 | FromDiscord | <Robyn [She/Her]> With Nim though, you can use `--nimcache:<folder>` to place it into a folder of your choosing |
01:57:35 | FromDiscord | <zumi.dxy> yeah, that I can do |
01:57:44 | FromDiscord | <zumi.dxy> but I want <https://godbolt.org/> to have the same option |
01:58:11 | FromDiscord | <Robyn [She/Her]> Ah yeah fair |
02:03:47 | FromDiscord | <hlsee> I see, thanks↵(@Robyn [She/Her]) |
02:04:33 | FromDiscord | <Robyn [She/Her]> No worries! |
02:07:32 | FromDiscord | <demotomohiro> Here is how to generate the assembly code: https://internet-of-tomohiro.netlify.app/nim/faq.en.html#nim-compiler-how-to-produce-assembler-codeqmark |
02:08:54 | FromDiscord | <demotomohiro> Adding `-d:danger?` option generates cleaner code as runtime checks are removed. |
02:09:11 | FromDiscord | <demotomohiro> `-d:danger` |
02:24:22 | FromDiscord | <Robyn [She/Her]> Also lto does too, iirc |
02:39:35 | FromDiscord | <leorize> termer is building something like that↵(@Robyn [She/Her]) |
02:47:07 | FromDiscord | <Robyn [She/Her]> Yeah, methttp, right? Meant to be allocation free, too |
04:19:41 | * | pbsds quit (Quit: The Lounge - https://thelounge.chat) |
04:40:50 | FromDiscord | <morgan> meth ttp |
04:46:31 | * | proaxis__ quit (Quit: Leaving) |
05:15:54 | termer | morgan https://github.com/termermc/methttp |
05:16:04 | termer | and yes, your pun is correct |
05:16:24 | termer | it's not really usable right now as a full web thingy but I'm working on it |
05:36:37 | * | tc424 quit (Ping timeout: 255 seconds) |
06:23:37 | * | kenran joined #nim |
06:56:03 | FromDiscord | <cineration> How might I construct a `case` statement using nim's macros? |
06:58:40 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/staticcases.nim |
06:59:57 | FromDiscord | <cineration> In reply to @Elegantbeef "https://github.com/beef331/nimtrest/blob/master/sta": Thanks! |
07:07:31 | FromDiscord | <TӨMΛ ☠> sent a long message, see https://pasty.ee/dDKKGMiXwWKY |
07:08:39 | FromDiscord | <Elegantbeef> Toma you could've done `fb.readStr(4) == "TES3"` then just `result.head = newRecordHeader(fb.read(300))` 😄 |
07:13:02 | FromDiscord | <TӨMΛ ☠> Good point 😄 I feel like I somehow wanted to get rid of FileStream immediately↵Also `read()` can yield you specific amount of bytes you specify? Gosh, I hate how Nim documentation can't search for specific procedure name nowadays, I was unsure if there's proc for that and couldn't find any through Nim doc |
07:16:56 | FromDiscord | <TӨMΛ ☠> Could you direct me which package has that? ^^ will lose my hair before I find it via docs https://media.discordapp.net/attachments/371759389889003532/1213746916467277864/image.png?ex=65f698e7&is=65e423e7&hm=e27208093e0640051e996532af267fba294ace7971cb6e1ca45e4a61c322b9ee& |
07:17:44 | FromDiscord | <Elegantbeef> `std/streams` has `read` so you could read to an `array[300, byte]` but you could just do `readstr` |
07:19:28 | * | ntat joined #nim |
07:38:21 | FromDiscord | <TӨMΛ ☠> Oh, I see. I think I will stick to my fb/fr for now, it's a bit easier to grasp the topic with it for me. Will come back to streams later, it's not like I can escape from them anyway 😄 |
08:00:31 | * | advesperacit joined #nim |
08:01:02 | * | azimut quit (Ping timeout: 260 seconds) |
08:05:04 | * | rockcavera quit (Remote host closed the connection) |
08:54:45 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=ZZklJeEEFgmF |
08:55:47 | FromDiscord | <sOkam! 🫐> short words are always better than single letter crap, because single letter forces you to mentally parse↵you cannot skim-read with pattern matching (what our human brains are good at), and you have to stop and read letter by letter because you might misread if you skim |
08:56:35 | FromDiscord | <sOkam! 🫐> sry for the "crap" tone, it just makes no sense to me when you can use 3-4 letter shortening and remove the issue↵its frustrating 🙈 |
08:57:22 | FromDiscord | <sOkam! 🫐> it has it uses, like you mentioned, but they are super rare |
08:57:29 | FromDiscord | <sOkam! 🫐> (edit) "rare" => "rare. at least for me personally" |
08:58:22 | FromDiscord | <TӨMΛ ☠> Yeah, I don't blame you, usually I do use more than 1-2 letters, it's also not a big habit of mine 😄 ↵As said, if I need to make it short, three is my usual minimum, and maybe examples I shown above wasn't the best one, I find it also a bit mentally draining today to read |
08:59:27 | FromDiscord | <sOkam! 🫐> yeah same. three letter things are generally pretty good |
09:00:04 | FromDiscord | <sOkam! 🫐> In reply to @toma400 "Yeah, I don't blame": likely because `fr` and `fb` look way too similar |
09:00:36 | FromDiscord | <TӨMΛ ☠> I love though when two letter name explains itself naturally. For example `bg` being understood as `background` is just perfect 👌 |
09:00:47 | FromDiscord | <TӨMΛ ☠> In reply to @heysokam "likely because `fr` and": `f`ai`r` 😄 |
09:01:15 | FromDiscord | <sOkam! 🫐> yep. bg = background, fg = foreground, ct = context. there are a few that that work great with 2 |
09:13:03 | * | tc424 joined #nim |
09:16:35 | FromDiscord | <fosster> does someone know how to target wasm with llvm backend in nim? |
09:17:12 | FromDiscord | <fosster> like I know that something like this in c would be like `clang [CFLAGS] --target=wasm32 [..]` |
09:19:39 | FromDiscord | <fosster> if i can't do it this way, maybe I should be using emscripten or idk |
09:25:13 | FromDiscord | <odexine> In reply to @heysokam "yep. bg = background,": I disagree with context, to me it must be “ctx” |
09:41:58 | FromDiscord | <sOkam! 🫐> In reply to @fosster "does someone know how": idk about the llvm backend, but compiling with zigcc might give you the option 🤔↵never compiled for wasm, but I figure the option must be there if you say clang has it |
09:55:39 | FromDiscord | <fosster> someone pointed out that I could use emscripten to target wasm with nim, but tbh I don't want to use emscripten cause I want to build simple and bloat-free software |
09:59:47 | * | junaid_ joined #nim |
10:00:55 | FromDiscord | <Elegantbeef> fosster `--cpu:wasm32 --os:standalone` should be it |
10:03:41 | FromDiscord | <Elegantbeef> You also should be able to use clang with the normal nim compiler |
10:03:42 | FromDiscord | <Elegantbeef> Just requires flag twiddling |
10:04:31 | FromDiscord | <demotomohiro> In reply to @heysokam "single letter acronyms are": If you know a language that uses many characters like japanese or chinese, guessing what single character means is a lot easier than guessing single alphabet letter.↵幅 = width↵絵 = picture |
10:04:54 | FromDiscord | <fosster> what you mean with twiddling |
10:05:20 | FromDiscord | <Elegantbeef> I mean you likely need to select the proper linker and clang settings for wasm |
10:06:29 | FromDiscord | <fosster> actually runing with these flags gives me an error `Error: cannot open file: ./src/panicoverride` |
10:07:00 | FromDiscord | <Elegantbeef> `--os:any` might work |
10:07:41 | FromDiscord | <fosster> `~/.choosenim/toolchains/nim-2.0.2/lib/system/osalloc.nim(218, 10) Error: Port memory manager to your platform` |
10:08:06 | FromDiscord | <fosster> should I change memory managment tecnique? |
10:08:40 | FromDiscord | <Elegantbeef> https://github.com/arnetheduck/nlvm?tab=readme-ov-file#wasm32-support |
10:08:48 | FromDiscord | <Elegantbeef> You should use `-d:useMalloc` |
10:17:01 | FromDiscord | <Elegantbeef> Probably easier to use wasi-sdk or clang to compile the code |
10:17:46 | FromDiscord | <fosster> it's a mess to be honest |
10:18:18 | FromDiscord | <Elegantbeef> Right |
10:20:24 | FromDiscord | <fosster> furthermore I also see nlvm does not have support to any memory managment |
10:20:29 | FromDiscord | <fosster> except manual |
10:20:43 | FromDiscord | <fosster> which isn't ideal for the application I wanna build |
10:21:30 | FromDiscord | <fosster> I first though I could maybe create a script to compile to c and then use clang to compile further to wasm, but I don't know how |
10:21:40 | FromDiscord | <fosster> I first thought I could maybe create a script to compile to c and then use clang to compile further to wasm, but I don't know how |
10:25:15 | FromDiscord | <Elegantbeef> I mean you can just make a config |
10:25:18 | FromDiscord | <Elegantbeef> You don't need a script |
10:37:53 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=BhLbvzEuCHZA |
10:38:17 | FromDiscord | <Elegantbeef> Add a check before |
10:38:24 | FromDiscord | <Elegantbeef> Or throw an assertion in there |
10:38:48 | FromDiscord | <ieltan> hm right. I was just unsure if there was a better way to handle this |
10:38:50 | FromDiscord | <ieltan> thanks 🙂 |
10:39:47 | FromDiscord | <Elegantbeef> fosster https://play.nim-lang.org/#pasty=EuLeDPHViCaV for the config |
10:40:01 | FromDiscord | <Elegantbeef> you can throw that in a `when defined(wasm)` or w/e |
10:40:09 | FromDiscord | <Elegantbeef> That uses clang to wasm |
10:40:19 | FromDiscord | <Elegantbeef> You then can just do \`nim -d\:wasm project.nim |
10:41:57 | * | junaid_ quit (Remote host closed the connection) |
10:44:04 | FromDiscord | <ieltan> writting hooks for my type right now and im kinda confused.. `=dup` and `=copy` do the same thing right ? from the docs it says `=dup` is an optimization of `=copy` so if i implement it i dont need to implement `=copy` right ? |
10:44:24 | FromDiscord | <Elegantbeef> Right |
10:44:34 | FromDiscord | <ieltan> great, thanks again 🙂 |
10:44:49 | FromDiscord | <Elegantbeef> Atleast I think so... who knows with the state of the docs |
10:47:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=VTSwdgNpdjWd |
10:48:00 | FromDiscord | <Elegantbeef> I take it back |
10:48:11 | FromDiscord | <Elegantbeef> `toOpenArray(0, -1)` is an empty collection |
10:48:24 | FromDiscord | <Elegantbeef> So in that case you do not need to do anything |
10:48:39 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=AfxlLMmYzECt |
10:54:21 | FromDiscord | <fosster> thanks for the hint, however I get `command line(1, 2) Error: invalid command line option: '--sysroot'` |
10:57:47 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=SIbQZhYRDrVT |
10:58:20 | FromDiscord | <ieltan> I just did the test for uncheckedArray and it works too |
10:58:32 | FromDiscord | <ieltan> thanks a million |
11:58:01 | FromDiscord | <tauruuuuuus> is there a way to generate a compile-time error? |
12:02:09 | FromDiscord | <Robyn [She/Her]> In reply to @tauruuuuuus "is there a way": `{.error: "Your error message here".}` |
12:02:38 | FromDiscord | <Robyn [She/Her]> When the code path is triggered it'll display the error |
12:03:02 | FromDiscord | <Robyn [She/Her]> In a macro there's also `error("error message here")` which accepts a line info object |
12:04:03 | FromDiscord | <tauruuuuuus> Nice, thank you! |
12:04:23 | FromDiscord | <tauruuuuuus> I'll try it out immediately |
12:16:56 | FromDiscord | <Robyn [She/Her]> Good luck! |
13:27:07 | FromDiscord | <whisperecean> What would be the best way to pass data from python script to Nim program? |
13:27:55 | FromDiscord | <Robyn [She/Her]> In reply to @whisperecean "What would be the": There's a few options, you could use `nimpy` and import the Python script in Nim using that |
13:28:36 | FromDiscord | <Robyn [She/Her]> Or you could use `std/os` and run the Python script, redirecting the stdin and stdout |
13:28:50 | FromDiscord | <whisperecean> That sounds kinda complicated. The script I am relying to needs imap lib. |
13:28:52 | FromDiscord | <Robyn [She/Her]> There's more I can't think of at the moment |
13:29:09 | FromDiscord | <whisperecean> Yeah redirecting the std[in/out] is the easies but not sure i like it |
13:29:12 | FromDiscord | <Robyn [She/Her]> In reply to @whisperecean "That sounds kinda complicated.": Nimpy is actually really simple, look at the GitHub for it |
13:29:49 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=fPtCgGyhVGmR |
13:29:55 | FromDiscord | <Robyn [She/Her]> That's an example from the README |
13:30:46 | FromDiscord | <whisperecean> How would I import a whole script tho? |
13:31:07 | FromDiscord | <Robyn [She/Her]> What do you mean? |
13:31:27 | FromDiscord | <whisperecean> Or wait a second..this is so I can use Python and the libs in my Nim code? |
13:31:34 | FromDiscord | <Robyn [She/Her]> If you make a few functions in the script you can call from Nim, you'd be able to interop like that |
13:31:37 | FromDiscord | <Robyn [She/Her]> In reply to @whisperecean "Or wait a second..this": Yep! |
13:31:59 | FromDiscord | <Robyn [She/Her]> Ideally you'd use a Nim library when possible, but using Python modules when you need to, is an option |
14:05:31 | * | xet7 quit (Remote host closed the connection) |
14:10:25 | * | azimut joined #nim |
14:35:11 | FromDiscord | <tauruuuuuus> Robyn I don't recognize you anymore without the purple profile pic |
14:35:39 | FromDiscord | <tauruuuuuus> 🤣 |
14:36:38 | FromDiscord | <griffith1deadly> In reply to @tauruuuuuus "Robyn I don't recognize": same |
14:55:11 | * | junaid_ joined #nim |
15:44:00 | FromDiscord | <whackerz> <@&371760044473319454> there's a spammer in the element room |
16:29:36 | FromDiscord | <Robyn [She/Her]> In reply to @tauruuuuuus "Robyn I don't recognize": Aha oh well |
16:30:00 | FromDiscord | <Robyn [She/Her]> At least I didn't change my name at the same time too (@Phil) |
16:35:25 | * | om3ga joined #nim |
16:37:35 | * | xet7 joined #nim |
16:40:06 | * | advesperacit quit () |
16:41:41 | * | advesperacit joined #nim |
16:42:16 | * | xet7 quit (Remote host closed the connection) |
17:06:56 | FromDiscord | <nikita4437> how can I write to preopened fd (previous process open fd 3 and exec to my nim application)? I try open(myFile, 3, mode), but it return false when fd 3 is opened and return true if fd is not opened (I run application directly without wrapper process with exec). maybe there is some other way? |
17:11:03 | * | rockcavera joined #nim |
17:16:26 | FromDiscord | <nikita4437> sent a code paste, see https://play.nim-lang.org/#pasty=YvNbEqrfrXFj |
17:21:00 | * | kenran quit (Remote host closed the connection) |
17:25:38 | * | rockcavera quit (Remote host closed the connection) |
17:26:35 | FromDiscord | <alex.boisvert> I'm using the jsony library to serialize simple objects/structs from nim server to nim js client.... However, when I do so, my strings get weirdly mis-encoded. A string on the server such as `Hello` gets reencoded and shown on the client as `0%H0%e0%l0%l0%o`. Wondering if I'm running into some sort of byte -> UTF encoding issue? Tho, with UTF-8 being default, it seems I wouldn't get into double-byte encoding with these 0's. |
17:27:02 | FromDiscord | <alex.boisvert> Any thoughts anyone? |
17:28:48 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=McunmtHxDDdy |
17:29:00 | * | rockcavera joined #nim |
17:30:05 | FromDiscord | <alex.boisvert> More info: The string values in my json payload -- as seen through Chrome's devtools network tab -- look fine. It's just after jsony deserialization that they get mangled. |
17:30:13 | FromDiscord | <nikita4437> In reply to @demotomohiro "It is alredy wrapped": yep, I missed it, thanks |
17:40:13 | arkanoid | how does nim finds nimsugges/nimsuggest.nim during compilation? "nim dump" doesn't include the the root folder |
17:52:21 | * | krux02 joined #nim |
17:58:08 | * | junaid_ quit (Remote host closed the connection) |
17:58:41 | FromDiscord | <Robyn [She/Her]> For a `receive_bytes` callback, wouldn't it only accepting a blocking function be an issue or? |
17:59:02 | FromDiscord | <Robyn [She/Her]> For async sockets specifically |
18:00:50 | FromDiscord | <marioboi3112> sent a code paste, see https://play.nim-lang.org/#pasty=EnogNebRowua |
18:01:46 | FromDiscord | <marioboi3112> i am so confused |
18:04:04 | FromDiscord | <leorize> it shouldn't but `10` probably got promoted to float somehow |
18:05:10 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=wAAOdjXnwrbL |
18:07:13 | FromDiscord | <marioboi3112> In reply to @leorize "it shouldn't but `10`": it does work, i ran the code without the 4th line, and it printed 14.5 |
18:08:10 | FromDiscord | <marioboi3112> In reply to @chronos.vitaqua "Does `x.float` work?": yep it does work, but im confused why it didnt work for the 3rd line and it worked for the 4th line, |
18:08:14 | FromDiscord | <warcrime> hello my brothers and sisters |
18:08:48 | FromDiscord | <marioboi3112> In reply to @warcrime "hello my brothers and": Hey! 👋🏼 |
18:09:11 | FromDiscord | <warcrime> is there a channel for code reviews? |
18:09:55 | FromDiscord | <leorize> that's why I said it shouldn't, Nim does not allow mixed integer/float math↵(@marioboi3112) |
18:09:55 | FromDiscord | <warcrime> i built something very basic and i'm looking to make it more readable |
18:10:04 | FromDiscord | <warcrime> (edit) "i built something ... verycontrol" added "with" | "withvery basic ... and" added "control structures" |
18:10:09 | FromDiscord | <leorize> `10` should be int but I suppose they recently make it so that it could be promoted to float |
18:10:14 | FromDiscord | <demotomohiro> In reply to @marioboi3112 "yep it does work,": You cannot do adding between different types without convertion.↵10 in `10 + 4.5` can be converted to float losslessy at compile time. |
18:10:33 | FromDiscord | <warcrime> sent a code paste, see https://play.nim-lang.org/#pasty=aBYdXlUOqOgm |
18:10:35 | FromDiscord | <leorize> this is the channel↵(@warcrime) |
18:10:39 | FromDiscord | <marioboi3112> In reply to @leorize "`10` should be int": if that was the case, then it should've worked for line 3 |
18:11:07 | FromDiscord | <warcrime> who is leorize? |
18:11:19 | FromDiscord | <marioboi3112> In reply to @demotomohiro "You cannot do adding": so nim would convert it even if i didnt explicitly told it to, couldnt it do the same thing for line 3? |
18:12:12 | FromDiscord | <leorize> use `case` instead of `if`-`else` here and it should make the code a tad cleaner↵(@warcrime) |
18:12:42 | FromDiscord | <warcrime> In reply to @leorize "use `case` instead of": could i use an enum too? |
18:12:57 | FromDiscord | <warcrime> or a method to abstract the while loop? |
18:14:25 | FromDiscord | <demotomohiro> In reply to @marioboi3112 "so nim would convert": When you do `var x = 10`, type of x become int.↵And in general, you cannot convert between int and float without losing precision. |
18:18:14 | FromDiscord | <leorize> you can, but it's unlikely to make this any better, unless you want to build a state machine↵(@warcrime) |
18:18:24 | FromDiscord | <marioboi3112> In reply to @demotomohiro "When you do `var": oh ok i see noww, thanks a lot, so to conclude things, values that are not stored in a variable, can automatically be parsed... |
18:19:27 | * | junaid_ joined #nim |
18:21:35 | FromDiscord | <demotomohiro> In reply to @warcrime "how can i make": You don't need to use Deque for stack, you can use seq as stack.↵There are `pop` proc and `s[^1]` to peek stack top for seq. |
18:22:30 | FromDiscord | <leorize> they're using it as a queue |
18:22:47 | FromDiscord | <leorize> see `addFirst` and `popFirst` being used |
18:23:10 | FromDiscord | <leorize> oh wait they're not touching the last stuff |
18:23:35 | FromDiscord | <warcrime> i'm building a mini-lisp compiler |
18:23:59 | FromDiscord | <leorize> you'll want to build a state machine then |
18:24:09 | FromDiscord | <leorize> and something to represent your syntax tree |
18:24:24 | FromDiscord | <warcrime> yea |
18:25:01 | FromDiscord | <leorize> https://github.com/kanaka/mal/tree/master/impls/nim \<- this is a bit old but could be useful |
19:05:42 | * | azimut quit (Remote host closed the connection) |
19:06:12 | * | azimut joined #nim |
19:39:42 | FromDiscord | <guttural666> is there an easy way to loop over an object typedesc of an object and get the field names just like with the fieldPairs iterator for instantiated objects? |
19:49:40 | FromDiscord | <Robyn [She/Her]> In reply to @guttural666 "is there an easy": `default(T).fieldPairs` should work |
19:49:49 | FromDiscord | <Robyn [She/Her]> Why doesn't `T.fieldPairs` work though? |
19:50:44 | FromDiscord | <guttural666> In reply to @chronos.vitaqua "`default(T).fieldPairs` should work": that does work, but I'd prefer to loop over the compile time type, not a runtime variable |
19:50:54 | FromDiscord | <guttural666> fieldPairs just takes a value, not a typesec |
19:51:16 | FromDiscord | <leorize> because no one wrote an iterator for it \:p |
19:51:17 | FromDiscord | <Robyn [She/Her]> In reply to @guttural666 "fieldPairs just takes a": Ah |
19:51:58 | FromDiscord | <guttural666> In reply to @leorize "because no one wrote": i guess I'd have to write a macro for this |
19:52:53 | FromDiscord | <odexine> wait huh? you need a value for fieldpairs to work |
19:52:58 | FromDiscord | <odexine> fields will give just the field names |
19:53:43 | * | junaid_ quit (Remote host closed the connection) |
19:54:00 | FromDiscord | <odexine> oh fields doesnt have a typedesc iterator either |
19:54:18 | FromDiscord | <odexine> oh wait no fields gives the fields itself |
19:54:26 | FromDiscord | <odexine> that's interesting, i forgot that already |
19:54:44 | FromDiscord | <odexine> that's a good point that there should probably be a fieldNames iterator |
19:55:10 | FromDiscord | <guttural666> In reply to @odexine "fields will give just": context: I'm trying to build a SOA from a given object type |
19:55:51 | FromDiscord | <Robyn [She/Her]> SOA? |
19:56:02 | FromDiscord | <guttural666> (edit) "SOA" => "structure of arrays" |
19:56:11 | FromDiscord | <odexine> struct of arrays |
19:56:17 | FromDiscord | <guttural666> structure of arrays vs. seq[obj] |
19:56:25 | FromDiscord | <guttural666> ArrayList in zig |
19:56:26 | FromDiscord | <odexine> each field gets its own array |
19:56:35 | FromDiscord | <odexine> instead of an array of objects |
19:56:57 | FromDiscord | <Robyn [She/Her]> Ahh, why would you want that though? |
19:57:04 | FromDiscord | <guttural666> 😄 |
19:57:07 | FromDiscord | <odexine> it has performance benefits |
19:57:21 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "`default(T).fieldPairs` should work": But yeah if you do this in a macro, why would it be an issue? |
19:57:23 | FromDiscord | <odexine> processing every object is faster |
19:57:41 | FromDiscord | <guttural666> In reply to @chronos.vitaqua "But yeah if you": never used macros, trying to figure this problem out rn 😄 |
19:57:44 | FromDiscord | <Robyn [She/Her]> Ah I think I understand |
19:58:55 | FromDiscord | <guttural666> In reply to @chronos.vitaqua "Ah I think I": contiguous arrays of simple data are more cache friendly, so you can loop over an ID field faster and find the thing you're looking for faster etc. |
19:59:18 | FromDiscord | <guttural666> get the ID out, access the rest of the data with an ID etc |
19:59:22 | FromDiscord | <Robyn [She/Her]> Ah okay! |
19:59:46 | FromDiscord | <guttural666> (edit) "ID" => "index" |
20:00:23 | FromDiscord | <guttural666> I wonder why nobody has written macros to do this before in Nim, there is so much in the libs but not this |
20:00:41 | FromDiscord | <odexine> ? |
20:00:42 | FromDiscord | <guttural666> Zig supports this in the stdlib |
20:01:13 | FromDiscord | <odexine> https://github.com/liquidev/datarray |
20:01:40 | FromDiscord | <guttural666> In reply to @odexine "https://github.com/liquidev/datarray": correction: why is this not in the standard |
20:01:59 | FromDiscord | <odexine> because nim is "understaffed" ig underdevved |
20:02:27 | FromDiscord | <odexine> here in nim stdlib doesnt exactly mean better |
20:02:43 | FromDiscord | <odexine> lots of modules p much died when they got into the stdlib |
20:02:45 | FromDiscord | <guttural666> but they do have a shitload of other useful stuff written and ready to go, that why I was wondering |
20:03:13 | FromDiscord | <odexine> iirc nim is still considering whether to slim the stdlib or not, not sure |
20:03:24 | * | ntat quit (Quit: Leaving) |
20:03:28 | FromDiscord | <guttural666> okay makes sense |
20:04:24 | FromDiscord | <guttural666> I mean at least in my mind you'd have to rewrite a lot of sorting algos to support SOA, I did that once for quick sort in cpp |
20:04:41 | FromDiscord | <guttural666> every swap needs to be replicated in the other arrays etc |
20:04:44 | FromDiscord | <leorize> try PRing something in and you will figure the reason out real quick |
20:05:25 | FromDiscord | <guttural666> In reply to @leorize "try PRing something in": I mean there is so much there already, so I'm not complaining |
20:06:18 | FromDiscord | <guttural666> In reply to @odexine "https://github.com/liquidev/datarray": thanks for this |
20:07:01 | FromDiscord | <leorize> https://gist.github.com/alaviss/1e85643fda7bcc8d9d6330fed5711955 \<- try this if you want an SoA macro |
20:07:17 | FromDiscord | <leorize> I wrote it sometime ago but never put it to use, so it's probably not that good |
20:07:40 | FromDiscord | <guttural666> does Nim have a featured site, where the most popular and useful libs are displayed etc? some langs have that, it's pretty useful |
20:08:06 | FromDiscord | <guttural666> In reply to @leorize "I wrote it sometime": good learning experience for sure, so I'm going to look at it, thanks! |
20:11:26 | FromDiscord | <guttural666> I wonder if you'd have to really reimplement all the algos for arrays/vecs for SOA or if you could automate that somethow |
20:11:35 | FromDiscord | <guttural666> (edit) "somethow" => "somehow" |
20:12:09 | FromDiscord | <guttural666> maybe macros could do some wonders here |
20:12:55 | FromDiscord | <guttural666> I think quick sort was just duplicating the swap operations |
20:13:01 | FromDiscord | <leorize> if you have to do that then you might be using SoA wrong |
20:15:04 | FromDiscord | <guttural666> yeah? if you want the dependent arrays to also be sorted if you sort the ID array? |
20:15:34 | FromDiscord | <leorize> why would you sort the ids? it would invalidate all external references |
20:17:45 | FromDiscord | <guttural666> the references that hold an index? |
20:18:09 | FromDiscord | <leorize> but typically, yes, you only need to implement `swap` for sorts to work |
20:18:33 | FromDiscord | <leorize> try not to swap, though |
20:18:48 | FromDiscord | <leorize> it's slower than doing it with regular AoS |
20:20:33 | FromDiscord | <guttural666> maybe yeah |
20:22:36 | FromDiscord | <guttural666> I think I implemented that as a sort of the ID field in the past and recorded the swaps with a tuple of from to, then I applied all the swaps to the dependent arrays afterwards |
20:23:20 | FromDiscord | <leorize> that's typically a better way to do it |
20:23:27 | FromDiscord | <leorize> though just avoid it if you can afford to |
20:24:02 | FromDiscord | <guttural666> yeah for sure, but any sorting would require that |
20:25:23 | FromDiscord | <guttural666> I guess swapping everything while sorting is a cache disaster |
20:29:17 | FromDiscord | <leorize> I use a little hack some time where I create a list of sorted ids and consume those instead of touching the storage |
20:29:21 | FromDiscord | <leorize> it might even be faster to just make a new structure \:p |
20:29:25 | FromDiscord | <leorize> instead of trying to do the swaps in place |
20:32:13 | FromDiscord | <guttural666> yeah, I've thought about a seq[int] for the IDs and then a hashmap of ID->data |
20:33:23 | FromDiscord | <guttural666> but SOA would seem to solve that |
20:33:44 | FromDiscord | <leorize> there's a trick where you have internal and external ids |
20:34:27 | FromDiscord | <guttural666> oh, as an alias? that could also solve sorting |
20:35:10 | FromDiscord | <leorize> https://blog.molecular-matters.com/2013/05/17/adventures-in-data-oriented-design-part-3b-internal-references/ and https://blog.molecular-matters.com/2013/07/24/adventures-in-data-oriented-design-part-3c-external-references/ help shaped some of my designs |
20:36:12 | FromDiscord | <guttural666> bookmarking, thanks |
20:57:14 | FromDiscord | <marioboi3112> hey guys! |
20:57:40 | FromDiscord | <marioboi3112> i was wonderring if Nim was suitable for Software Development in general, would like to chat a bit with you guys about that |
20:58:21 | FromDiscord | <guttural666> what do you want to do with it? |
21:00:55 | FromDiscord | <marioboi3112> In reply to @guttural666 "what do you want": GUI/UI apps, game dev (3d and 2d) and fullstack development |
21:02:41 | FromDiscord | <leorize> nim appeal for full stack is still pretty weak imo |
21:03:24 | FromDiscord | <leorize> you can always pull it off faster with go than nim for the same or better performance |
21:03:50 | FromDiscord | <guttural666> personally as a relative noob: GUI is painful, I've tried the Qt translation lib a bit and it seems very messy / not working |
21:05:24 | FromDiscord | <odexine> IIRC people say the better libraries for Nim are mainly GTK |
21:06:13 | FromDiscord | <guttural666> for general CLI programming, I think Nim is very capable, there you can really profit from the exremely nice DX and extreme power of Nim (metaprogramming etc) |
21:06:53 | FromDiscord | <guttural666> In reply to @odexine "IIRC people say the": I'm learning so much today, thanks 😄 I really want to make my application GUI enabled and maybe that will help me |
21:07:23 | FromDiscord | <guttural666> C++ is a cluster fuck anyway, no wonder it's hard to integrate with those GUI libs |
21:07:25 | FromDiscord | <leorize> checkout owlkettle |
21:08:08 | FromDiscord | <odexine> In reply to @leorize "checkout owlkettle": git checkout owlkettle |
21:09:20 | FromDiscord | <guttural666> the nimqt stuff got me to opening a window, but I want all the tables and fancy stuff and it quickly broke down |
21:09:33 | FromDiscord | <guttural666> (edit) "window," => "window with buttons," |
21:11:33 | FromDiscord | <guttural666> In reply to @marioboi3112 "GUI/UI apps, game dev": pointers vs. references in function interfaces was an issue last time I tried |
21:11:46 | FromDiscord | <guttural666> pointers vs. references in function interfaces was an issue last time I tried |
21:32:07 | FromDiscord | <Robyn [She/Her]> Just realised my ModernNet library is missing a folder required for it to work??? |
21:33:25 | FromDiscord | <Robyn [She/Her]> I had this issue in other projects that I'm only realising now because I don't have a local copy, wtf how did I miss that |
21:44:07 | FromDiscord | <Robyn [She/Her]> Is it possible to cast a value to a type without copying it? |
21:44:23 | FromDiscord | <Robyn [She/Her]> I want to cast it, then return that value |
21:44:34 | FromDiscord | <Robyn [She/Her]> But while avoiding an unnecessary copy |
21:47:41 | FromDiscord | <Elegantbeef> @Robyn [She/Her] what's the type? |
21:50:23 | FromDiscord | <Robyn [She/Her]> I found `moveMem`, works like a charm |
21:50:46 | FromDiscord | <Elegantbeef> Uhh |
21:50:53 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "<@524288464422830095> what's the type?": Unsigned int (with a specific size) to another number type (with the same size) |
21:51:11 | FromDiscord | <Elegantbeef> Why are you worried about copying ints? |
21:51:25 | FromDiscord | <Robyn [She/Her]> Eh, bored and wanted to microoptimise |
21:51:42 | FromDiscord | <Elegantbeef> But you're doing the same work |
21:51:47 | FromDiscord | <Robyn [She/Her]> I know ints are essentially free but I have nothing else to do |
21:51:57 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "But you're doing the": Wdym? |
21:52:10 | FromDiscord | <Elegantbeef> `moveMem` on an int is identical to `cast[T](myInt)` |
21:53:18 | FromDiscord | <Robyn [She/Her]> Huh, why? |
21:53:35 | FromDiscord | <Robyn [She/Her]> Does it just do `moveMem` once optimised? |
21:53:42 | FromDiscord | <Elegantbeef> Cause integers are value types so moving mem and copying is identical |
21:54:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=nhWYdWSwmrit |
21:54:25 | FromDiscord | <Elegantbeef> assignment is the same as `moveMem` |
21:54:35 | FromDiscord | <Elegantbeef> With fewer pointers |
21:54:41 | FromDiscord | <Robyn [She/Her]> Oh okay, I'll just cast it then |
21:55:07 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=AICcIZXRovRB |
21:55:09 | FromDiscord | <Elegantbeef> Movemem is useful for when you're attempting to not disobey strict alias |
21:55:15 | FromDiscord | <Elegantbeef> But for primitives casting is fine |
21:55:31 | FromDiscord | <Elegantbeef> cute `elif` |
21:55:58 | FromDiscord | <Robyn [She/Her]> Thank you :) |
21:56:06 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Movemem is useful for": Strict alias? Wdym? |
21:57:18 | FromDiscord | <Elegantbeef> Why do you need the cast here? |
21:57:18 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=HMmLPksmxdcx |
21:57:25 | FromDiscord | <Elegantbeef> You already do range checking so you can just use the return type you're writing to |
21:57:55 | FromDiscord | <Elegantbeef> Strict aliasing is a horrendous optimisation strategy that means `cast[ptr T](somePtrToNotVoidOrChar)` is invalid and causes UB |
21:57:58 | FromDiscord | <Robyn [She/Her]> Wdym? `T` could be a `float32` so |
21:58:33 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Strict aliasing is a": Ah |
21:59:40 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=WhhdanymJvRK |
22:01:34 | FromDiscord | <Elegantbeef> It's just such an awful optimisation as it's so unexpected |
22:01:35 | FromDiscord | <Elegantbeef> Write your own allocator and throw a few casts and ... why is my code exploding |
22:02:31 | FromDiscord | <leorize> doesn't change the fact that it's still UB, though |
22:05:12 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=iIAGsLogwoPW |
22:05:14 | FromDiscord | <Robyn [She/Her]> Unfortunate |
22:05:31 | FromDiscord | <Robyn [She/Her]> I can just do a when statement but this looked cleaner |
22:05:46 | FromDiscord | <Robyn [She/Her]> A when/case statement would work |
22:05:49 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/staticcases.nim#L59-L63 |
22:06:12 | FromDiscord | <Elegantbeef> Guess that should be static case |
22:06:56 | FromDiscord | <Elegantbeef> Throw that inside a template and there you go |
22:07:10 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/staticcases.nim#L81-L92 is what you want |
22:07:58 | FromDiscord | <ezquerra> sent a code paste, see https://play.nim-lang.org/#pasty=gkWPSXpWTGDS |
22:08:25 | FromDiscord | <leorize> I think you just implemented it \:p |
22:08:26 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "https://github.com/beef331/nimtrest/blob/master/sta": Eh, a when statement worked just as well but thanks |
22:08:41 | FromDiscord | <Elegantbeef> When statements are ugly! |
22:09:39 | FromDiscord | <Elegantbeef> To check if an numeric type can be implicitly casted you can do `compiles((var i: T = default(k))` |
22:09:57 | FromDiscord | <Elegantbeef> Or use a concept |
22:10:11 | FromDiscord | <Elegantbeef> Though a concept would be ugly |
22:12:12 | FromDiscord | <ezquerra> In reply to @Elegantbeef "To check if an": What is uglier the concept or the `when compiles`? 😅 |
22:12:24 | FromDiscord | <Elegantbeef> Concept |
22:12:32 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=sepNOSaQEymx |
22:12:39 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "When statements are ugly!": It's in a template so |
22:13:00 | FromDiscord | <Elegantbeef> The check needs to be there |
22:13:12 | FromDiscord | <Elegantbeef> Atleast I imagine so |
22:13:26 | FromDiscord | <Elegantbeef> Your check is wrong |
22:13:45 | FromDiscord | <Elegantbeef> You only need to check if the smaller one is written to and you should return the amount written to |
22:13:54 | FromDiscord | <Elegantbeef> "the smaller one" ah yes brain |
22:14:01 | FromDiscord | <Elegantbeef> You only need to check if the array is large enough to write to |
22:14:28 | FromDiscord | <Robyn [She/Her]> `toBytesBE` returns an array, wouldn't that be an issue without the check? |
22:15:25 | FromDiscord | <Elegantbeef> you should do `oa[0..sizeof(T)] = value.toBytesBe(oa)` |
22:15:30 | FromDiscord | <Elegantbeef> and return `sizeof(T)` |
22:16:00 | FromDiscord | <Elegantbeef> This allows to implement this for other procedures for other types and it'll just work |
22:17:52 | FromDiscord | <Robyn [She/Her]> Alright, thanks! |
22:20:51 | * | advesperacit quit () |
22:22:41 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=emtixsCuwarK |
22:23:54 | FromDiscord | <Elegantbeef> your oa logic is wrong |
22:23:59 | FromDiscord | <Elegantbeef> `[0..<sizeof(T)]` returns a seq |
22:24:04 | FromDiscord | <Elegantbeef> But that's not causing the issue |
22:24:42 | FromDiscord | <Elegantbeef> You're passing to arguments to `toBytesBe` |
22:24:43 | FromDiscord | <Elegantbeef> two\ |
22:30:30 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=hHLbbTttewMj |
22:30:44 | FromDiscord | <Robyn [She/Her]> Can't see an obvious issue |
22:32:21 | FromDiscord | <Elegantbeef> @ezquerra to answer your question https://play.nim-lang.org/#pasty=fXBmAzTQJnlt |
22:32:26 | FromDiscord | <Elegantbeef> Also @Robyn [She/Her] why are you casting for `toBytesBe`? |
22:35:04 | FromDiscord | <Robyn [She/Her]> `toBytesBE` requires an unsigned int, it's from `endians2` |
22:35:12 | FromDiscord | <Elegantbeef> Heh |
22:37:10 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=RCFPeuRjlkCL |
22:37:36 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=ZVIYClMtcUMh |
22:37:57 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=gdzYvhUAQkQL |
22:38:21 | FromDiscord | <Elegantbeef> Atleast if my bitwise math serves is proper |
22:38:26 | FromDiscord | <Elegantbeef> Nice compiler error 😄 |
22:38:46 | FromDiscord | <Elegantbeef> Stop calling `toOpenArray` on the collection that is the size you want 😄 |
22:38:56 | FromDiscord | <Elegantbeef> your byte array is the size you want always |
22:39:02 | FromDiscord | <Elegantbeef> If it's not you have big problems that the runtime will catch |
22:39:37 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=LIpkQIZhdfLD |
22:39:51 | FromDiscord | <Elegantbeef> `array[0..0, byte]` |
22:40:09 | FromDiscord | <Robyn [She/Her]> Wait huh |
22:40:12 | FromDiscord | <Elegantbeef> methinks that's not `array[0..7, byte]` |
22:41:16 | FromDiscord | <Robyn [She/Her]> Why is that returning array[0..0]... |
22:46:45 | FromDiscord | <im__cynical> Any way to disable nim from checking for authenticode signitures? |
22:47:44 | FromDiscord | <Elegantbeef> What does that even mean |
22:50:30 | * | pbsds joined #nim |
22:55:56 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=LJwwZscuZOZx |
22:55:57 | FromDiscord | <Robyn [She/Her]> Hm |
22:56:31 | FromDiscord | <Elegantbeef> Lol |
22:56:49 | FromDiscord | <Robyn [She/Her]> I'm confused on why this doesn't Just Work™️ |
22:57:25 | FromDiscord | <Elegantbeef> Oh cause the proc I'm thinking of is only for seq and array apparently |
22:57:31 | FromDiscord | <Robyn [She/Her]> I could just use a loop and avoid this issue |
22:57:34 | FromDiscord | <Robyn [She/Her]> Ah |
22:57:46 | FromDiscord | <Robyn [She/Her]> So loop is the only way? |
22:58:04 | FromDiscord | <Elegantbeef> Apparently |
22:58:16 | FromDiscord | <Elegantbeef> Well you could use copymem |
22:58:19 | FromDiscord | <Elegantbeef> But that's just aloop |
22:59:52 | FromDiscord | <Robyn [She/Her]> How is copyMem a loop? Because it's just an array of ints? |
23:00:13 | FromDiscord | <Robyn [She/Her]> Also, wouldn't that fuck up with seqs because arrays and seqs order data differently? |
23:00:32 | FromDiscord | <Elegantbeef> They don't order data differently |
23:02:17 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=cgKqHOWMfinK |
23:02:31 | FromDiscord | <Robyn [She/Her]> Unless I'm misinterpreting what this does |
23:02:54 | FromDiscord | <Elegantbeef> Right they're different data types |
23:03:20 | FromDiscord | <Robyn [She/Her]> Didn't a seq work by storing pointers to the allocated value? |
23:03:40 | FromDiscord | <Robyn [She/Her]> So using copyMem would just change where the pointer is pointing, instead of setting the value |
23:04:19 | FromDiscord | <Elegantbeef> If you improperly use it yes |
23:04:47 | FromDiscord | <Elegantbeef> cause seq is `(len: int, data: ptr (capacity: int, data: UncheckedArray[char]))` |
23:04:54 | FromDiscord | <Elegantbeef> But you don't use `copyMem` like a neanderthal |
23:05:02 | FromDiscord | <Elegantbeef> You properly copymem to the sequential part of the data |
23:05:03 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "cause seq is `(len:": Aaah |
23:05:09 | FromDiscord | <Elegantbeef> You're using openArray anyway |
23:05:15 | FromDiscord | <Elegantbeef> So that completely removes the difference |
23:05:15 | FromDiscord | <Robyn [She/Her]> So to `data.data` |
23:05:21 | FromDiscord | <Robyn [She/Her]> Yeah :P |
23:05:26 | FromDiscord | <Elegantbeef> you `copyMem(oa[0].addr, ..., ...)` |
23:05:27 | FromDiscord | <Robyn [She/Her]> Oh wait |
23:05:30 | FromDiscord | <Robyn [She/Her]> Misunderstood |
23:05:48 | FromDiscord | <Robyn [She/Her]> Should I use `copyMem` instead of a loop? |
23:06:13 | FromDiscord | <Elegantbeef> that's between you and your god |
23:06:27 | FromDiscord | <Robyn [She/Her]> I'm an atheist- |
23:06:33 | FromDiscord | <Elegantbeef> So am I |
23:06:43 | FromDiscord | <Robyn [She/Her]> Who's my god- |
23:07:14 | FromDiscord | <Elegantbeef> I'm not going to change perfectly good language! |
23:07:31 | FromDiscord | <Elegantbeef> If you don't have a god that clearly means it's between you and you |
23:07:40 | FromDiscord | <Elegantbeef> So choose the one you prefer |
23:07:54 | FromDiscord | <Elegantbeef> I'd personally avoid `copyMem` and `addr` and any low level operation to appease the VM gods |
23:10:57 | FromDiscord | <Robyn [She/Her]> Fair |
23:11:05 | FromDiscord | <Robyn [She/Her]> But wouldn't casting anger them anyway? |
23:12:18 | FromDiscord | <Elegantbeef> Depends on the type, but probably |
23:13:55 | FromDiscord | <Elegantbeef> I think Nim implements casting for most primitives aside from `set` |
23:15:39 | FromDiscord | <Robyn [She/Her]> Oh then that's not an issue |
23:17:06 | FromDiscord | <Robyn [She/Her]> I kinda wanna use `deposit` and `extract` instead of `write` and `read` :p |
23:19:12 | FromDiscord | <Robyn [She/Her]> Would you say operating on my buffer type is fine to follow the sans-io philosophy? :p |
23:19:36 | FromDiscord | <Elegantbeef> I'm the wrong person to ask that to |
23:20:59 | FromDiscord | <Robyn [She/Her]> Yeah fair |
23:21:04 | FromDiscord | <Robyn [She/Her]> I think it's fine anyway |
23:40:33 | * | xutaxkamay quit (Read error: Connection reset by peer) |
23:41:18 | * | xutaxkamay joined #nim |