00:01:09 | FromDiscord | <Elegantbeef> you can just do `substr buffer` but I do not get why you're mutating the parameters |
00:05:18 | FromDiscord | <albassort> im using var buffer because it needs to write into the buffer and why make new ones |
00:05:40 | FromDiscord | <albassort> var a because i dont wanna make a new int to make sure its littleEndian |
00:07:04 | FromDiscord | <Elegantbeef> It's an array what are you really saving? |
00:07:22 | FromDiscord | <albassort> 4 cpu cycleds |
00:07:24 | FromDiscord | <albassort> (edit) "cycleds" => "cycles" |
00:07:28 | FromDiscord | <albassort> maybe more |
00:09:12 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=ptyUJxPfIqhH |
00:09:22 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#pasty=cqKcOxZufEBe" => "https://play.nim-lang.org/#pasty=ObIyEoGcIGQq" |
00:10:08 | FromDiscord | <tsoj> what does the `version = "0.1.0"` thing in a nimble file do? |
00:10:24 | FromDiscord | <albassort> specifies the release version |
00:11:01 | FromDiscord | <Elegantbeef> It's a dumb thing that you need to babysit |
00:11:17 | FromDiscord | <albassort> you don't need to babysit smart thing beef |
00:11:35 | FromDiscord | <albassort> (edit) "thing" => "things" |
00:11:47 | FromDiscord | <tsoj> But which implication does this have? If I understand correctly, nimble will look at the git tags anyway to determine which version to install |
00:11:59 | FromDiscord | <tsoj> In reply to @albassort "specifies the release version": But which implication does this have? If I understand correctly, nimble will look at the git tags anyway to determine which version to install |
00:12:08 | FromDiscord | <albassort> i forgor |
00:12:14 | FromDiscord | <albassort> oh |
00:12:15 | FromDiscord | <albassort> i remember |
00:12:18 | FromDiscord | <albassort> its for nimble installer |
00:12:25 | FromDiscord | <albassort> controls when people update |
00:12:51 | FromDiscord | <tsoj> so I can leave it if it's a binary project? |
00:12:53 | FromDiscord | <Elegantbeef> It's not for nimble cause nimble uses the git tags |
00:13:10 | FromDiscord | <Elegantbeef> I mean you can leave it but I do suggest properly versioning somewhere |
00:13:11 | FromDiscord | <albassort> idk what a binary project is |
00:13:32 | FromDiscord | <albassort> its probably fine if you're not releasing it for others |
00:22:30 | FromDiscord | <kdot_227> will it ever be possible to build static binaries in nim without needing the respective dll files in the same directory? |
00:22:47 | FromDiscord | <Elegantbeef> You can make static libraries already |
00:22:51 | FromDiscord | <kdot_227> (it probably is possible now just very complicated) |
00:23:03 | FromDiscord | <kdot_227> In reply to @Elegantbeef "You can make static": please point me to the documentation for this |
00:23:11 | FromDiscord | <Elegantbeef> static binaries\ |
00:23:28 | FromDiscord | <Elegantbeef> https://scripter.co/nim-deploying-static-binaries/ for musl |
00:24:18 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import mentions `--dynliboverride` |
00:24:29 | FromDiscord | <Elegantbeef> As does https://nim-lang.org/docs/nimc.html#dynliboverride |
00:26:23 | FromDiscord | <kdot_227> In reply to @Elegantbeef "https://nim-lang.org/docs/manual.html#foreign-funct": so using this I can specify the libraries to link for the linker? |
00:26:46 | FromDiscord | <Elegantbeef> You can override dynamically linked libraries and tell the linker to statically link them yes |
00:27:04 | FromDiscord | <kdot_227> In reply to @Elegantbeef "You can override dynamically": thank you for the info 👍 |
00:28:46 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1221254344519843841/image.png?ex=6611e8bd&is=65ff73bd&hm=5980c48648ba9f7bb51a3a84e0d202e40bdc8bd293eac6fe564eef783ff2ce2e& |
00:28:48 | FromDiscord | <albassort> static is pretty easuy |
00:28:50 | FromDiscord | <albassort> (edit) "easuy" => "easy" |
00:28:58 | FromDiscord | <albassort> well |
00:29:00 | FromDiscord | <albassort> semi-static |
00:29:16 | FromDiscord | <albassort> because of gnu internal politics, you need muslc |
00:29:18 | FromDiscord | <Robyn [She/Her]> MC Rcon? Any reason why you're implementing that? :P |
00:29:19 | FromDiscord | <albassort> (edit) "because of gnu internal politics, you need muslc ... " added "or something else" |
00:29:43 | FromDiscord | <albassort> so I can use it in server daemon scripts |
00:29:57 | FromDiscord | <albassort> i also didn't like any of the other implementations |
00:30:01 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "because of gnu internal": Politics? There's drama regarding static linking of glibc? |
00:30:18 | FromDiscord | <albassort> gnu is anti-static linking but has internal factions which are pro |
00:30:23 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "i also didn't like": Fair enough, was just curious since I'm slowly working on an MC server in Nim :p |
00:30:25 | FromDiscord | <albassort> its kinda "political thing" |
00:30:31 | FromDiscord | <Robyn [She/Her]> Ah |
00:30:59 | FromDiscord | <albassort> In reply to @chronos.vitaqua "Fair enough, was just": theres a rust minecraft server |
00:31:12 | FromDiscord | <Robyn [She/Her]> Feather-rs, I'm assuming? |
00:31:26 | FromDiscord | <albassort> i think the concept of foreign language implementations of minecraft are pretty cool |
00:31:34 | FromDiscord | <albassort> anything to get away from java |
00:32:22 | FromDiscord | <Robyn [She/Her]> Fair lol, yeah I'm working on a server slowly and have a few libs related to it |
00:32:29 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1221255282890375248/MCRconImp.nim?ex=6611e99d&is=65ff749d&hm=876466a119dd3a0ee7a884cb0d3bc9416b7e4bd98ac023f8bf6dc1d0afbd6dc4& |
00:32:34 | FromDiscord | <Robyn [She/Her]> (TagForge for NBT and ModernNet for networking-related shenanigans) |
00:32:38 | FromDiscord | <albassort> heres my implementation |
00:32:43 | FromDiscord | <albassort> pretty sure its a fully functional client |
00:32:57 | FromDiscord | <albassort> gonna write some tests after i wake up then make a CLI tool and maybe put it on the AUR |
00:33:04 | FromDiscord | <albassort> and then use it for some scripts |
00:34:14 | FromDiscord | <albassort> need to figure out if multi-line commands are supported and how to do that |
00:34:20 | FromDiscord | <albassort> (edit) "multi-line" => "multi-packet" |
00:34:38 | FromDiscord | <Robyn [She/Her]> Wait does RCON use the same/similar format that MC's Java protocol uses for packets and stuff? |
00:34:58 | FromDiscord | <albassort> no |
00:35:03 | FromDiscord | <albassort> its modern so its little endian |
00:35:10 | FromDiscord | <Robyn [She/Her]> Ooh okay |
00:35:20 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1221255999105536110/image.png?ex=6611ea48&is=65ff7548&hm=b319b50aaf4fdedf89055b84f4464430ba918ebd059e5378017e32eda98fd370& |
00:35:32 | FromDiscord | <albassort> pretty standard packet foramt |
00:37:33 | FromDiscord | <Robyn [She/Her]> Fair enough |
00:38:21 | FromDiscord | <albassort> honestly robyn what i would do for a nim implementation of minecraft |
00:38:26 | FromDiscord | <kdot_227> In reply to @albassort "": would that give me the same output as using dynlibOverride? |
00:38:30 | FromDiscord | <albassort> is i would replace modules in spigot / paper |
00:38:58 | FromDiscord | <albassort> use java FFI and just slowly replace its inner functions |
00:39:11 | FromDiscord | <albassort> (edit) "use java FFI and just slowly replace its inner functions ... " added "with native binaries" |
00:39:20 | FromDiscord | <albassort> that way you can bug test as you go along |
00:39:34 | FromDiscord | <Elegantbeef> Kdot if you're using libc requring dependencies yes |
00:40:04 | FromDiscord | <kdot_227> In reply to @Elegantbeef "Kdot if you're using": I'm trying with the example code for httpclient |
00:40:09 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "that way you can": Reflection would be a pain in the ass, but a Spigot compatibility layer would be super interesting |
00:40:27 | FromDiscord | <Robyn [She/Her]> Probably won't be possible though |
00:40:30 | FromDiscord | <kdot_227> which also requires the cacert.pem file |
00:40:40 | FromDiscord | <albassort> I did some testing with a native mc mod |
00:40:42 | FromDiscord | <albassort> it worked |
00:40:44 | FromDiscord | <Robyn [She/Her]> I am hoping to make whatever MC makes data-driven, the same here |
00:40:51 | FromDiscord | <albassort> although it had to go through tcp |
00:41:00 | FromDiscord | <Robyn [She/Her]> Oh wait I misunderstood what you meant :P |
00:41:20 | FromDiscord | <albassort> yeah i mean literally going into a file, and just replace all the files and logic |
00:41:23 | FromDiscord | <Elegantbeef> kdot you're on windows so you need to have the static libraries built for your C compiler |
00:41:26 | FromDiscord | <albassort> and then hook it up |
00:41:37 | FromDiscord | <albassort> (edit) removed "files and" |
00:41:40 | FromDiscord | <␀ Array 🇵🇸 🍉> java is the only reason i havent made mods for the game↵(@albassort) |
00:42:02 | FromDiscord | <albassort> honestly modding games is just not fun |
00:42:08 | FromDiscord | <albassort> feels like a job |
00:42:11 | FromDiscord | <Robyn [She/Her]> JNI would kill perf I'd imagine |
00:42:22 | FromDiscord | <Robyn [She/Her]> In reply to @albassort "honestly modding games is": What if: WASM plugin API for Java :) |
00:42:37 | FromDiscord | <Robyn [She/Her]> I've wanted to do it before but touching Java makes me feel like I'm dying |
00:42:45 | FromDiscord | <albassort> you'd need to fork the jvm |
00:42:46 | FromDiscord | <Robyn [She/Her]> I really want to do modding but 😔 |
00:43:03 | FromDiscord | <kdot_227> In reply to @Elegantbeef "kdot you're on windows": I just tested with -static and it is working 👍 |
00:43:05 | FromDiscord | <zumi.dxy> wasm for executables feels cursed for some reason↵but theoretically it'd make it portable↵if only because they're literally just >bytecode |
00:43:23 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "JNI would kill perf": Panama is gonna fix that tho |
00:43:27 | FromDiscord | <albassort> well if you expose the internal api to the wasm you can use nim for it |
00:43:32 | FromDiscord | <albassort> hence the JVM hooks |
00:43:36 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "wasm for executables feels": Oh definitely but for a plugin API it'd be rad |
00:43:57 | FromDiscord | <zumi.dxy> what if nim compiled to jvm bytecode 🤔 |
00:44:03 | FromDiscord | <albassort> was about to say |
00:44:14 | FromDiscord | <albassort> you can also use that for a real nim script |
00:44:21 | FromDiscord | <albassort> people have tried and many have failed |
00:44:31 | FromDiscord | <albassort> by many i mean like 1 |
00:44:51 | FromDiscord | <zumi.dxy> nim at one point compiled to php↵so, not the most cursed thing ever |
00:45:18 | FromDiscord | <albassort> nim running on a python interpreter |
00:45:20 | FromDiscord | <albassort> best timeline |
00:45:44 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "what if nim compiled": Would be cool but it's hard |
00:45:47 | FromDiscord | <zumi.dxy> does nimpy count? |
00:45:49 | FromDiscord | <zumi.dxy> or did you mean nim to pyc |
00:45:49 | FromDiscord | <Robyn [She/Her]> I tried but gave up :P |
00:45:55 | FromDiscord | <albassort> https://github.com/mratsim/photon-jit |
00:46:05 | FromDiscord | <zumi.dxy> i've got the feeling jvm is more stable than pyc |
00:46:06 | FromDiscord | <␀ Array 🇵🇸 🍉> why doesnt the offical nim compiler do llvm? |
00:46:09 | FromDiscord | <albassort> what the mratsim |
00:46:13 | FromDiscord | <albassort> (edit) "what the mratsim ... " added "doin" |
00:46:14 | FromDiscord | <albassort> (edit) removed "" |
00:46:20 | FromDiscord | <zumi.dxy> In reply to @␀ Array 🇵🇸 🍉 "why doesnt the offical": C has more targets |
00:46:54 | FromDiscord | <Robyn [She/Her]> ^^^ |
00:47:01 | FromDiscord | <albassort> c is based |
00:47:04 | FromDiscord | <albassort> c++ cringe |
00:47:06 | FromDiscord | <albassort> frfr |
00:47:08 | FromDiscord | <zumi.dxy> not enough languages compile to C anyway |
00:47:18 | FromDiscord | <␀ Array 🇵🇸 🍉> sure but couldnt c be the default but also have llvm as an option↵(@zumi.dxy) |
00:47:22 | FromDiscord | <albassort> i want a language that compiles to lua |
00:47:26 | FromDiscord | <albassort> so i dont have to write lua |
00:47:37 | FromDiscord | <Robyn [She/Her]> In reply to @␀ Array 🇵🇸 🍉 "sure but couldnt c": Nlvm is a separate thing to be fair |
00:48:01 | FromDiscord | <Robyn [She/Her]> But the reasoning for why Nim doesn't support LLVM directly is because Clang exists, probably |
00:48:04 | FromDiscord | <zumi.dxy> NIR is slowly emerging from the horizon anyway |
00:48:15 | FromDiscord | <albassort> https://github.com/hengestone/lua-languages woah |
00:48:17 | FromDiscord | <albassort> anyway offtopic |
00:48:21 | FromDiscord | <albassort> 👋 |
00:48:23 | FromDiscord | <zumi.dxy> nim -> NIR -> LLVM IR -> native binary ??? |
00:48:24 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "NIR is slowly emerging": Is it? Haven't checked in a bit |
00:48:31 | FromDiscord | <zumi.dxy> I did give it a try one time |
00:48:38 | FromDiscord | <determiedmech1> In reply to @albassort "so i dont have": haxe? |
00:48:40 | FromDiscord | <zumi.dxy> i think i have its output somewhere |
00:48:56 | FromDiscord | <determiedmech1> lua is fun tho |
00:49:17 | FromDiscord | <zumi.dxy> 2023-12-30 https://media.discordapp.net/attachments/371759389889003532/1221259505166450699/tryfinally.nir.txt?ex=6611ed8b&is=65ff788b&hm=91f59019c03ff03cd33c056b88bd3b40a33b11d8fbfd0566e1764e2fb5564835& |
00:50:01 | FromDiscord | <zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=zKlcaRZnTvNj |
00:50:09 | FromDiscord | <Robyn [She/Her]> Hm neat |
00:50:27 | FromDiscord | <zumi.dxy> it might have changed in the meantime |
00:50:48 | FromDiscord | <Robyn [She/Her]> I am tempted to work on a JVM backend for Nim again, tbf... Not sure if it'd be worth it |
00:51:57 | FromDiscord | <zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=kcXDCzFvfNah |
00:54:13 | FromDiscord | <Robyn [She/Her]> Huh... |
00:54:24 | FromDiscord | <Robyn [She/Her]> Just type defs |
01:00:02 | * | nazgulsenpai quit (Quit: ZNC 1.8.2 - https://znc.in) |
01:02:57 | * | nazgulsenpai joined #nim |
01:04:10 | FromDiscord | <kdot_227> @ElegantBeef im slow it isn't working with httpclient anymore |
01:05:24 | FromDiscord | <kdot_227> does this only work for linux? |
01:05:59 | FromDiscord | <Elegantbeef> No |
01:06:43 | FromDiscord | <kdot_227> sent a code paste, see https://play.nim-lang.org/#pasty=ghvWoUGILhQv |
01:07:04 | FromDiscord | <kdot_227> now lets say for libcrypto |
01:07:07 | FromDiscord | <Elegantbeef> Yes for windows you need to provide the static libraries that support your compiler |
01:07:12 | FromDiscord | <kdot_227> would I do |
01:07:33 | FromDiscord | <Elegantbeef> you do `--dynlibOverride:crypt --passL:libcrypto.a` or w/e windows calls it's static libraries |
01:07:45 | FromDiscord | <Elegantbeef> There are multiple pages for 'static linking openssl' on the forum |
01:08:05 | FromDiscord | <kdot_227> In reply to @Elegantbeef "There are multiple pages": it's also sqlite3 |
01:08:10 | FromDiscord | <kdot_227> and pcre |
01:08:11 | FromDiscord | <Elegantbeef> There are also alternative http clients like the one in chronos, or treeform's puppy |
01:08:20 | FromDiscord | <kdot_227> im sorry I'm just confused atm |
01:08:23 | FromDiscord | <Elegantbeef> Right you have to statically link all your libraries if you want to |
01:08:34 | FromDiscord | <Elegantbeef> The convention on windows is to dynamically link but ship the .dlls |
01:08:42 | FromDiscord | <Elegantbeef> So when in rome |
01:29:32 | FromDiscord | <kdot_227> In reply to @Elegantbeef "Right you have to": I tried the command you sent but it doesn't seem to be working |
01:29:51 | FromDiscord | <kdot_227> it's still looking for the libcrypto.dll |
01:31:47 | FromDiscord | <Robyn [She/Her]> I wonder if first making some code to turn Nim AST to JVM bytecode would be smarter than diving into the compiler straight away |
01:32:14 | FromDiscord | <Robyn [She/Her]> Probably would be smarter lol, but I wonder how much is applicable |
04:32:01 | FromDiscord | <Ethin> zevv\: when using `>1` instead of matching a rule in npeg do you need to return a bool value? Or what's the return type in the case of that example you showed me? |
04:47:11 | FromDiscord | <zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=EjuVuyRMTHoN |
04:48:48 | FromDiscord | <Elegantbeef> Yea not nil annotation is a pipedream and you're better off doing `Option[T]` 😄 |
04:49:00 | FromDiscord | <zumi.dxy> lmfao |
04:49:44 | FromDiscord | <zumi.dxy> how much overhead does the `results` package incur over `std/option`? i'm hoping it's negligible |
04:49:53 | FromDiscord | <Elegantbeef> No clue |
04:54:17 | FromDiscord | <zumi.dxy> `Error: type mismatch: got 'Option[typeof(nil)]' for 'some(nil)' but expected 'Option[ref int]'`↵lmao you're right |
04:55:27 | FromDiscord | <Elegantbeef> I mean `Option[T]` is a 'zero cost' on top of `ref T` |
04:55:35 | FromDiscord | <Elegantbeef> It's really just a `distinct ref T` in a trenchcoat |
05:47:19 | FromDiscord | <MDuardo> Is possible to display in the same line using the JS backend?`stdout.writeLine` doesn't workSays↵Error\: undeclared identifier 'stdout' |
05:47:20 | FromDiscord | <MDuardo> C backend works fine |
05:50:59 | FromDiscord | <Elegantbeef> You need to use whatever mechanism your JS runtime has |
06:26:44 | Zevv | Ethin: https://github.com/zevv/npeg?tab=readme-ov-file#custom-match-validations |
06:26:59 | Zevv | officialy you call 'validate(true)' or `validate(false)` |
06:27:21 | Zevv | the code block is currently implemented as a closure that can return a value, but that's no guarentee for the future |
06:27:33 | Zevv | https://github.com/zevv/npeg?tab=readme-ov-file#custom-match-validations |
06:43:53 | * | FromDiscord quit (Remote host closed the connection) |
06:44:07 | * | FromDiscord joined #nim |
06:55:06 | FromDiscord | <odexine> What? |
07:02:52 | * | advesperacit joined #nim |
07:10:11 | * | junaid_ joined #nim |
07:13:24 | * | ntat joined #nim |
07:32:30 | FromDiscord | <Phil> @the_mnc I'm handing you your first warning. This is 1) out of topic for this server in general 2) is flame bait and as such will lead to a ban for repeat infractions given rule 1,2,3 and 4 |
09:22:12 | FromDiscord | <whisperecean> I am trying to use https://github.com/status-im/nim-confutils but if I define a version command and call a proc in the defaultValue it does not print anything |
09:22:16 | FromDiscord | <whisperecean> Am I doing something wrong? |
10:09:48 | FromDiscord | <penguinite> Can you share your code via the nim playground? |
10:20:41 | FromDiscord | <whisperecean> Not at my pc but i just took the example and instead of the first logLevel i put version and in the same file i created a proc getVersion(): string = echo “1.2.3” and put the defaultValue |
10:21:22 | FromDiscord | <whisperecean> This is only for assigning the values probably right? But i thought this is also a cli library and i can just call a proc to print stuff on the command line |
10:28:36 | FromDiscord | <penguinite> Hm, you probably want to change `echo` to `return` in that getVersion proc. |
10:28:54 | FromDiscord | <whisperecean> I think i did but that wont print it only assigns to version |
10:29:56 | FromDiscord | <penguinite> what if you do both? You will have to return something because the proc is supposed to return a string. So try adding a `echo` before `return` |
10:30:10 | FromDiscord | <whisperecean> Ill try that! |
10:30:48 | FromDiscord | <whisperecean> But would not echo automatically get assigned to result? |
10:31:19 | * | junaid_ quit (Remote host closed the connection) |
10:31:40 | FromDiscord | <penguinite> No, echo does not automatically assign anything, it has no return value |
10:33:36 | FromDiscord | <whisperecean> Great ill try that |
10:33:37 | advesperacit | echo is a macro to stdout.writeLine() |
10:36:35 | FromDiscord | <whisperecean> What would return be for that version with just echo? Empty string? |
10:37:59 | advesperacit | Actually, I misremember, echo is "roughly equivalent to writeLine(stdout, x); flushFile(stdout)" |
10:38:30 | FromDiscord | <penguinite> Yes, since result is unmodified it just returns an empty string. |
10:38:52 | FromDiscord | <penguinite> (edit) "Yes, since ... result" added "the" |
11:02:29 | FromDiscord | <penguinite> Also I am not sure if this bug has been reported before, but this bit code causes Nim's compiler to segfault.↵https://play.nim-lang.org/#pasty=tqcWFbeArXBU↵↵I am a bit busy to look deep into it. But the part that makes the compiler crash is most likely the second argument to varargs. |
11:10:22 | FromDiscord | <whisperecean> Ok i tried it but it does not work that way |
11:37:20 | advesperacit | If you gave a play.nim-lang.org link with an example of what you are trying to do it would be easier to help you |
11:52:39 | FromDiscord | <whisperecean> I solved it. I think I just misunderstood how to use the library |
11:55:35 | * | une left #nim (#nim) |
12:40:09 | FromDiscord | <srabb> how do i add 10 to a variable if "up" is true https://media.discordapp.net/attachments/371759389889003532/1221438404588339280/image.png?ex=66129428&is=66001f28&hm=295deb8faeab6ff15869d1c7bf2a402ed278d4721cc63b792b51a7644e6b57c7& |
12:52:12 | FromDiscord | <odexine> = not == |
12:52:13 | FromDiscord | <determiedmech1> +=? https://media.discordapp.net/attachments/371759389889003532/1221441439318147162/image.png?ex=661296fc&is=660021fc&hm=dce4e5f408ba0e809c6f0fa23a9f096b8ef45c36271c95e5e2595ee7340851c8& |
12:52:37 | FromDiscord | <determiedmech1> (edit) "+=?" => "+=" |
12:52:44 | FromDiscord | <determiedmech1> (edit) |
12:53:29 | FromDiscord | <srabb> In reply to @determiedmech1 "you can use +=": it works, thanks |
12:54:20 | FromDiscord | <determiedmech1> np |
13:00:02 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
13:00:24 | * | Jhonny2x4 joined #nim |
13:01:20 | FromDiscord | <srabb> https://media.discordapp.net/attachments/371759389889003532/1221443733070024794/Screencast_from_24-03-2024_025414_.webm?ex=6612991f&is=6600241f&hm=ed91d237b82ad731fb8d3d2e48509a0bd584e66ec16280a5555b3fa60b7c6a1c& |
13:02:08 | FromDiscord | <srabb> im trying to change this triangle's points' positions so that i can control it with the arrow keys (please tell me theres an easier way to do it) |
13:02:13 | FromDiscord | <srabb> im gonna ask in gamedev to |
13:02:15 | FromDiscord | <srabb> (edit) "to" => "too" |
13:02:53 | * | advesperacit quit (Ping timeout: 240 seconds) |
13:03:48 | FromDiscord | <Jotrorox> I'm new to nim but would you use a single equals and plus sign? |
13:04:45 | * | krux02 joined #nim |
13:27:05 | FromDiscord | <Phil> For what? |
13:27:16 | FromDiscord | <Phil> For assignments, sure, for equality checks the `==` is used |
13:27:36 | FromDiscord | <Phil> (edit) "For assignments, sure, for equality checks the `==` ... is" added "operator" |
14:08:59 | * | advesperacit joined #nim |
15:06:29 | FromDiscord | <myxi> make sure the variable is mutable and use += i think |
15:08:08 | FromDiscord | <Robyn [She/Her]> Anyone know if Norm supports an easy way of adding constraints to fields? |
15:08:40 | FromDiscord | <Robyn [She/Her]> I don't want to execute raw SQL but not opposed to it if I have to |
15:12:35 | * | advesperacit quit (Ping timeout: 260 seconds) |
15:33:14 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Anyone know if Norm": Beyond making a field a pk field - no. |
15:33:22 | FromDiscord | <Phil> (edit) "pk" => "pk/fk" |
15:34:02 | FromDiscord | <Phil> I would not use norm to create the database.↵I'd do that with raw-sql and manage the evolution of my database-schema with something like liquibase or flyway |
15:40:39 | FromDiscord | <Robyn [She/Her]> Fair |
15:41:48 | FromDiscord | <griffith1deadly> i love nim errors https://media.discordapp.net/attachments/371759389889003532/1221484115354849400/image.png?ex=6612bebb&is=660049bb&hm=cb6f0408900a03ffdeb3ac8e431456befdcbcfc61b12391e8bd0f26d27fc79b5& |
15:42:51 | FromDiscord | <1234789> sent a code paste, see https://play.nim-lang.org/#pasty=HKejeerioTDq |
15:43:50 | FromDiscord | <solitudesf> In reply to @1234789 "Hi. I am new": https://nim-lang.org/docs/manual.html#procedures-export-marker |
15:43:53 | * | advesperacit joined #nim |
15:47:45 | FromDiscord | <1234789> In reply to @solitudesf "https://nim-lang.org/docs/manual.html#procedures-ex": Thank you! |
17:46:02 | * | dtomato quit (Ping timeout: 264 seconds) |
17:50:12 | * | dtomato joined #nim |
17:55:01 | NimEventer | New Nimble package! pmath - library that resolves the inaccuracies of normal float math. , see https://github.com/nlits-projects/pmath |
18:23:25 | Amun-Ra | from abnormal import math; missed opportunity |
18:26:28 | * | krux02_ joined #nim |
18:29:34 | * | krux02 quit (Ping timeout: 268 seconds) |
19:35:40 | * | ntat quit (Quit: Leaving) |
20:01:03 | NimEventer | New question by MatrixManAtYrService: Flake fails on update, nimPackages is missing, where has it gone?, see https://stackoverflow.com/questions/78215937/flake-fails-on-update-nimpackages-is-missing-where-has-it-gone |
20:25:18 | NimEventer | New Nimble package! avrman - A tool for managing nim and c projects targetting AVR microcontrollers., see https://github.com/Abathargh/avrman |
21:10:47 | * | arkanoid quit (Ping timeout: 264 seconds) |
21:15:54 | FromDiscord | <zumi.dxy> one of the QRTs of this tweet says it's "a GC'd language problem"↵in Nim I really had to try in order to have this kind of behavior↵https://x.com/i/status/1770528106513600636 |
21:16:02 | FromDiscord | <zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=wjLXNXewsuAI |
21:16:19 | FromDiscord | <zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=tqaeAZhWDXtX |
21:17:04 | FromDiscord | <zumi.dxy> i'm curious↵can getting the behavior of the first one be made easier |
21:19:44 | * | advesperacit quit () |
21:20:08 | FromDiscord | <zumi.dxy> honestly, i'd say this is more a "dynamically typed language" problem or something |
21:20:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=qpNkYkTMbUIH |
21:20:19 | FromDiscord | <Elegantbeef> It's not even dynamic type problem |
21:20:22 | FromDiscord | <Elegantbeef> It's a class based problem |
21:20:33 | FromDiscord | <Elegantbeef> Any language that makes it's data types `ref` will have this problem |
21:20:41 | FromDiscord | <Elegantbeef> It also arises in C# if you use `List<T>` |
21:24:43 | FromDiscord | <zumi.dxy> is there a "non-ref" equivalent of `List<T>` there?↵or is it just its array type |
21:25:08 | FromDiscord | <Elegantbeef> Even arrays are refs |
21:25:19 | FromDiscord | <Elegantbeef> Since C# does not have value type arrays |
21:26:10 | FromDiscord | <zumi.dxy> oh boy |
21:26:54 | FromDiscord | <zumi.dxy> hang on, seqs are refs in nim right?↵except that you can't just do `[[]] 4` |
21:27:12 | FromDiscord | <Elegantbeef> No |
21:27:19 | FromDiscord | <Elegantbeef> In Nim seqs are treated as value types |
21:27:39 | FromDiscord | <zumi.dxy> 🤔 |
21:28:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=VctiTvvDBpCZ |
21:29:59 | FromDiscord | <zumi.dxy> so to make `b == a` you either have to copy the seq or make `b` a reference to `a` right? |
21:32:17 | FromDiscord | <Elegantbeef> Right |
21:32:31 | FromDiscord | <Elegantbeef> Or use a ptr but even then you'd have to do `b[] == a` |
21:32:39 | FromDiscord | <zumi.dxy> yeah |
21:36:03 | FromDiscord | <Elegantbeef> People often like blaming GC for no reason other than it's a scary word |
21:36:04 | FromDiscord | <Elegantbeef> It's the "thanks obama" of the programming world |
21:36:38 | FromDiscord | <zumi.dxy> lmao |
21:36:40 | FromDiscord | <haywiressc> sent a code paste, see https://play.nim-lang.org/#pasty=CHOkvNzfVPwJ |
21:36:49 | FromDiscord | <haywiressc> I am having a simple problem with openarray |
21:37:16 | FromDiscord | <haywiressc> I create the variable game and it is of type seq[Board] |
21:37:35 | FromDiscord | <Elegantbeef> hopefully `type` is not a field name |
21:37:42 | FromDiscord | <haywiressc> sent a code paste, see https://play.nim-lang.org/#pasty=VXPwQhFzwhEf |
21:37:48 | FromDiscord | <haywiressc> it does not let me |
21:37:58 | FromDiscord | <Elegantbeef> Of course it won't |
21:38:04 | FromDiscord | <Elegantbeef> you're doing `newSeq[Board]` |
21:38:33 | FromDiscord | <haywiressc> oops |
21:38:33 | FromDiscord | <haywiressc> lmao |
21:38:35 | FromDiscord | <Elegantbeef> That allocates a sequence of `Board`s which means it's `seq[Board]` |
21:38:44 | FromDiscord | <haywiressc> i genuinely thought I had written Game and not board |
21:38:52 | FromDiscord | <Elegantbeef> `openArray` also can only be a parameter |
21:38:58 | FromDiscord | <haywiressc> In reply to @haywiressc "i genuinely thought I": i was stuck for like 20 mins |
21:39:01 | FromDiscord | <Elegantbeef> There is no reason to use openarray in the above |
21:39:09 | FromDiscord | <Elegantbeef> `game` will always be `seq[Board]` |
21:39:15 | FromDiscord | <haywiressc> In reply to @haywiressc "i was stuck for": nvm |
21:39:22 | FromDiscord | <haywiressc> (edit) "https://play.nim-lang.org/#pasty=UczzQBLOftWi" => "https://play.nim-lang.org/#pasty=nfMsNxHMAnfb" |
21:39:34 | FromDiscord | <haywiressc> In reply to @Elegantbeef "`openArray` also can only": oh right |
21:39:35 | FromDiscord | <Elegantbeef> The reason for openArray is to allow a procedure to accept either `seq[T]` or `array[I, T]` or a 0 cost slice of them |
21:39:46 | FromDiscord | <haywiressc> so my type has to be either seq or array then ig |
21:39:52 | FromDiscord | <Elegantbeef> Correct |
21:39:57 | FromDiscord | <haywiressc> thanks |
21:40:18 | FromDiscord | <haywiressc> sent a code paste, see https://play.nim-lang.org/#pasty=CjrlYqRIqJPm |
21:40:35 | FromDiscord | <Elegantbeef> If you say so |
21:41:02 | FromDiscord | <Elegantbeef> `Board = set[0..63]` is much better |
21:41:22 | FromDiscord | <Elegantbeef> It's much smaller 😄 |
21:41:58 | FromDiscord | <haywiressc> In reply to @Elegantbeef "`Board = set[0..63]` is": really? |
21:42:15 | FromDiscord | <Elegantbeef> If we care about performance and allocations, yes |
21:42:22 | FromDiscord | <Elegantbeef> It's only 8 bytes vs. 64bytes |
21:42:31 | FromDiscord | <haywiressc> like different int for each piece and include it in the set if the bool in my code would had been true? |
21:42:39 | FromDiscord | <haywiressc> In reply to @Elegantbeef "If you say so": i mean not much better but it works xd |
21:42:43 | FromDiscord | <Elegantbeef> You do need to do `(x + y width) in mySet` |
21:43:10 | FromDiscord | <Elegantbeef> In Nim a `set` is a bitset so in the above you have a 64bit integer internally to represent all the state instead of 64 bools |
21:43:10 | FromDiscord | <haywiressc> In reply to @Elegantbeef "You do need to": wdym |
21:43:48 | FromDiscord | <haywiressc> 8 8 sizeof bool amount of boards? |
21:44:04 | FromDiscord | <haywiressc> In reply to @Elegantbeef "In Nim a `set`": ohhh i see |
21:44:05 | FromDiscord | <haywiressc> nice |
21:44:09 | FromDiscord | <haywiressc> 1 bit insted of 8 |
21:44:10 | FromDiscord | <Elegantbeef> vs 8 \ amount of boards |
21:44:27 | FromDiscord | <haywiressc> yeah |
21:44:35 | FromDiscord | <Elegantbeef> You do have to convert the xy into a single integer but the math is simple |
21:45:08 | FromDiscord | <haywiressc> yeah |
21:45:22 | FromDiscord | <haywiressc> i mean what I am doing is code to test other code so performance is not important but why not |
21:47:07 | FromDiscord | <Elegantbeef> You can almost play an entire game of chess just sending an integer of the board state each move! |
21:47:18 | FromDiscord | <MDuardo> For a moment I thought you were compiling to a Commodore 64 or something |
21:47:45 | FromDiscord | <Elegantbeef> Hey we have bitsets so we best use them |
21:47:54 | FromDiscord | <Elegantbeef> Pretty much no other language has builtin bitsets |
21:47:56 | FromDiscord | <zumi.dxy> if i'm reading this correctly, sets don't store positional information right? |
21:47:59 | FromDiscord | <Elegantbeef> Hold it over them! |
21:48:19 | FromDiscord | <zumi.dxy> In reply to @Elegantbeef "Pretty much no other": it's a really handy feature |
21:48:22 | FromDiscord | <Elegantbeef> Sets are bitsets they're either an integer of the smallest size that can hold each entry or an array of `uint8` |
21:48:44 | FromDiscord | <Elegantbeef> Atleast on the C/C++ backend |
21:48:48 | FromDiscord | <Elegantbeef> In the VM they're just a sequence |
21:49:07 | FromDiscord | <Elegantbeef> On JS they're probably also a sequence, but I do not know |
21:49:17 | FromDiscord | <zumi.dxy> `if {someDisplayFlag, otherDisplayFlag} in someIOaddrThatControlsDisplays` |
21:49:38 | FromDiscord | <Elegantbeef> Yep they're so much nicer since they're more structured |
21:49:51 | FromDiscord | <zumi.dxy> looks more obvious than playing around with boolean operations |
21:50:19 | FromDiscord | <zumi.dxy> In reply to @MDuardo "For a moment I": now I imagine C64 demos written in Nim… |
21:50:39 | FromDiscord | <Elegantbeef> https://github.com/beef331/reflector/blob/master/reflector.nim#L251-L253 Thanks to them I wrote a very simple router using inotify 😄 |
21:50:56 | FromDiscord | <Elegantbeef> Can just use any set of events you want to care about and you can assign a procedure to them |
21:51:30 | FromDiscord | <zumi.dxy> the compile-time facilities would come in really handy there↵LUTs for complex math operations… |
21:53:03 | FromDiscord | <Elegantbeef> Can also abstract much more tedious things with macros but get optimised code |
21:54:04 | FromDiscord | <Elegantbeef> There's even that lovely hidden goto feature using case statements and enums instead of labels 😄 |
21:57:03 | FromDiscord | <Elegantbeef> https://github.com/mratsim/constantine/blob/976c8bb215a3f0b21ce3d05f894eb506072a6285/constantine/math/arithmetic/bigints.nim#L744 for an example of that goto |
21:57:42 | FromDiscord | <Elegantbeef> It uses case branches and enum values to indicate goto, which means it's again more structured than the conventional method |
21:59:19 | FromDiscord | <MDuardo> Why has to explain why used Nim?↵Guys over Rust do entire just rewrites just do say it's written in Rust™ |
21:59:44 | FromDiscord | <Elegantbeef> It's an obscure language people will always go "but yea why not the more popular Z" |
22:00:41 | FromDiscord | <MDuardo> Wish a company boosted Nim's popularity a little bit |
22:01:05 | FromDiscord | <MDuardo> Or a large project |
22:06:13 | FromDiscord | <Elegantbeef> Sorry the best that we can do is use a shitty heuristic and report all Nim software as malware |
22:07:00 | FromDiscord | <zumi.dxy> In reply to @MDuardo "Or a large project": Nitter is probably the closest thing to a large Nim project with tons of exposure |
22:07:32 | FromDiscord | <zumi.dxy> it's a twitter proxy↵elon's changes to twitter has rendered it very useful for all of 10 seconds |
22:07:40 | FromDiscord | <zumi.dxy> (edit) "even ifit's ... a" added "just" |
22:09:17 | FromDiscord | <zumi.dxy> In reply to @MDuardo "Wish a company boosted": Meanwhile, this would be status.im↵I'm not sure how much reach they have but they are at least taking Nim seriously |
22:09:54 | FromDiscord | <haywiressc> In reply to @Elegantbeef "Pretty much no other": To be fair it's not hard to do something similar for this in c |
22:10:09 | FromDiscord | <Elegantbeef> No one said it was hard |
22:10:12 | FromDiscord | <Elegantbeef> But it's not structured |
22:10:34 | FromDiscord | <zumi.dxy> it's the kind of thing you may need comments above the line that does it |
22:10:35 | FromDiscord | <Elegantbeef> You can take any ordinal and make a set of a range in Nim |
22:10:43 | FromDiscord | <Elegantbeef> This gives you type safety |
22:11:02 | FromDiscord | <Elegantbeef> you can never do 'a' in {0u8}\` |
22:11:28 | FromDiscord | <Elegantbeef> Plus you can just do `{0u8 .. 10u8}` and don't have to futz around 😛 |
22:11:49 | FromDiscord | <zumi.dxy> 'cept if you cast it probably, but that's an explicitly unsafe operation :p |
22:12:30 | FromDiscord | <zumi.dxy> people say we need `unsafe` blocks, but if we had they won't be happy anyway |
22:12:35 | FromDiscord | <haywiressc> In reply to @Elegantbeef "Plus you can just": I haven't used nim in a while, the .. means range so that makes bitset including 0 through to 10? |
22:12:46 | FromDiscord | <Elegantbeef> Yes |
22:13:30 | FromDiscord | <zumi.dxy> i forgot if mojo offered `unsafe` blocks↵given it's whole "Rust but with Python syntax" thing |
22:13:49 | FromDiscord | <Elegantbeef> It's also `u8` which means you cannot do `someInt in mySet` |
22:13:56 | FromDiscord | <Elegantbeef> It must be a `uint8` |
22:14:14 | FromDiscord | <Elegantbeef> Zumi I do think it'd be cool if Nim used it's effect tracking to tag unsafe operations with `unsafe` |
22:14:42 | FromDiscord | <Elegantbeef> But you can always just `grep` for `addr` `cast` `ptr` |
22:15:23 | FromDiscord | <Elegantbeef> Before you say "But what about style insensitivity" fairly certain someone made a script that'd convert an identifier to a style insensitive regex pattern |
22:15:50 | FromDiscord | <haywiressc> In reply to @zumi.dxy "Nitter is probably the": Surely nim will grow eventually |
22:16:18 | FromDiscord | <haywiressc> I mean like it's such a nice language to use |
22:29:06 | FromDiscord | <MDuardo> It's great that this exist, but as I don't use cryto, I have no use for this↵(@zumi.dxy) |
22:31:50 | FromDiscord | <zumi.dxy> In reply to @Elegantbeef "Before you say "But": that's just called `nimgrep` 😛 |
22:32:02 | FromDiscord | <Elegantbeef> I mean no, but yes |
22:32:17 | FromDiscord | <zumi.dxy> In reply to @haywiressc "Surely nim will grow": it's been here for quite a while |
22:36:43 | FromDiscord | <zumi.dxy> In reply to @Elegantbeef "Zumi I do think": you're saying the compiler should be like: "I've got at least one instance of `addr` `cast` `ptr` so I have an `UnsafeEffect`"↵wonder how much it would break existing code |
22:36:49 | FromDiscord | <zumi.dxy> (edit) "`UnsafeEffect`"↵wonder" => "`UnsafeEffect`"?↵wonder" |
22:37:08 | FromDiscord | <Elegantbeef> It wouldn't |
22:37:26 | FromDiscord | <Elegantbeef> It only breaks code that uses `tags: []` which is pretty much none |
22:37:40 | FromDiscord | <zumi.dxy> ah |
22:38:15 | FromDiscord | <zumi.dxy> oh yeah, `forbids: [Unsafe]` would be cool to see |
22:38:48 | FromDiscord | <zumi.dxy> but then there's safe code wanting to call unsafe code... |
22:39:00 | FromDiscord | <zumi.dxy> because it should be a safe abstraction over it |
22:39:20 | FromDiscord | <zumi.dxy> btw, i forgot what the difference is between `pointer` and `ptr` |
22:39:25 | FromDiscord | <Elegantbeef> Imagine if there was a way to tell the compiler "I know it's not safe but I want it to be safe" 😄 |
22:39:35 | FromDiscord | <Elegantbeef> `pointer` is `void` in C |
22:39:39 | FromDiscord | <Elegantbeef> `ptr T` is `T` in C |
22:39:45 | FromDiscord | <zumi.dxy> ah |
22:40:08 | FromDiscord | <zumi.dxy> `tags: [TrustMeBroImSafe]` |
22:40:18 | FromDiscord | <Elegantbeef> No |
22:40:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=czNHpAHQfith |
22:41:06 | FromDiscord | <zumi.dxy> wait, can you actually cast tags...? |
22:41:23 | FromDiscord | <Elegantbeef> You can cast raises |
22:41:25 | FromDiscord | <Elegantbeef> So I don't see why not |
22:41:30 | FromDiscord | <zumi.dxy> hmm... |
22:42:24 | FromDiscord | <zumi.dxy> y'know, people bring up the "what if the libraries you're pulling up are unsafe" thing↵but uhh↵quite a few rust libs have `unsafe{}` in them by necessity or otherwise |
22:42:56 | FromDiscord | <Elegantbeef> That's the entire point of `unsafe` though |
22:43:14 | FromDiscord | <Elegantbeef> The thing is though in the Rust world unsafe blocks are hidden |
22:43:22 | FromDiscord | <zumi.dxy> and a portion of `cve-rs` could also hide in some packages because compiler bugs, but miri would catch it |
22:44:29 | FromDiscord | <zumi.dxy> cue the "actix, y u use unsafu?????" shenanigans of yesteryear |
22:44:42 | FromDiscord | <Elegantbeef> I think the elimination of `unsafe` is a fine idea but this means that all your code has to be compiled in one shot |
22:44:54 | FromDiscord | <Elegantbeef> If you want 0 unsafe code no component you rely on must use unsafe code |
22:45:12 | FromDiscord | <Elegantbeef> Which means everything from the kernel to your system libraries need some mark of "this is not unsafe" 😄 |
22:45:38 | FromDiscord | <Elegantbeef> Plus Rust does not have overflow checks in release builds so.... what is unsafe? |
22:48:42 | FromDiscord | <zumi.dxy> some things still need to be checked at run time it turns out 😏 |
22:50:09 | FromDiscord | <zumi.dxy> In reply to @Elegantbeef "That's the entire point": i thought it was for basically sectioning off the unsafe parts of the code so that inspection can be made easier, because anything outside it is guaranteed to be Safe™️ |
22:51:26 | FromDiscord | <Elegantbeef> Unsafe exists to be used |
22:51:44 | FromDiscord | <Elegantbeef> If you need to do something that the Rust language considers unsafe but you know is safe you need to be able to tell it that |
22:51:59 | FromDiscord | <zumi.dxy> yeah |
22:52:03 | FromDiscord | <Elegantbeef> If a library uses unsafe blocks what is a reasonable person supposed to do |
22:52:12 | FromDiscord | <zumi.dxy> "i paid for the unsafe i'm gonna use the whole unsafe" |
22:52:20 | FromDiscord | <Elegantbeef> Lol |
22:52:40 | FromDiscord | <Elegantbeef> Rewrite everything in Rust and compile everything into a single unit to ensure the code has no unsafe |
22:54:51 | FromDiscord | <zumi.dxy> people unironically want that↵"if there is no more C in this world we wouldn't have to use unsafe" |
22:55:01 | FromDiscord | <zumi.dxy> something something cross language exploits |
22:55:22 | FromDiscord | <Elegantbeef> Ah yes the only way to write code is my way to write code |
22:55:58 | FromDiscord | <zumi.dxy> i wonder how rust programs interact with redox syscalls |
22:56:42 | FromDiscord | <zumi.dxy> In reply to @Elegantbeef "Ah yes the only": there's also the fact that dealing directly with hardware is inherently unsafe↵at some point there has to be an interface between the two |
22:57:07 | FromDiscord | <Elegantbeef> Nah just use a rust covered iron beam |
22:57:10 | FromDiscord | <zumi.dxy> zero probably doesn't actually mean zero, just "reduced surface area" |
22:58:01 | FromDiscord | <Elegantbeef> Is this where I mention linked lists exist |
22:59:25 | FromDiscord | <zumi.dxy> the rust people would say linked lists are terrible so it doesn't count :p |
23:00:01 | FromDiscord | <zumi.dxy> have a big array of things instead that is never reallocated if the capacity happens to be smaller |
23:00:18 | FromDiscord | <zumi.dxy> (which i think is what nim also does anyway) |
23:00:25 | FromDiscord | <Elegantbeef> Eh data oriented design is nice |
23:02:53 | FromDiscord | <Elegantbeef> I'm just annoyed at how tedious it is to get a cstring in Rust 😛 |
23:03:40 | FromDiscord | <Elegantbeef> I've wrote a small thing to use a dynamic library and just wanted to use cstrings, but you have to use a procedure to allocate them then get use `c_str()` on them |
23:12:34 | FromDiscord | <MDuardo> What data oriented is supposed to be?↵Odin is advertised as such |
23:13:15 | FromDiscord | <Elegantbeef> Data oriented design is about designing the solution to a problem to be the most cache efficient for the cpu |
23:13:23 | FromDiscord | <Elegantbeef> This reduces pointer chasing and cache trashing |
23:13:49 | FromDiscord | <Elegantbeef> Since most systems have a 64byte cache line if your data is small enough querying a single element of a sequence can get you the ones in front of it |
23:14:17 | FromDiscord | <Elegantbeef> It's pretty much why linked lists are slower than sequences |
23:14:35 | FromDiscord | <Elegantbeef> Pointer indirection means you're very unlikely to get any useful information when you query memory |
23:34:04 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Since most systems have": i just learned that the ARM/Apple M-cpus all have 128-byte cache-lines. |
23:40:08 | FromDiscord | <Elegantbeef> Big cache lines and bigger caches really are magical |
23:43:37 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "Big cache lines and": i like big-stuff, too. BTW: the latest ARM SIMD/Vector-extensions give you the avail. vector-length at runtime - not before. And intel announced they will do the same, soon.. thats funny for people who do anything with SIMD |
23:47:51 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "i wonder how rust": Redox? |
23:50:47 | FromDiscord | <zumi.dxy> Redox OS |
23:51:45 | FromDiscord | <zumi.dxy> the "you want a kernel written in Rust? you got a kernel written in Rust" OS |