00:20:03 | FromDiscord | <leorize> a simple example of cyclic reference is a doubly linked list |
01:15:49 | FromDiscord | <4zv4l> what if you set the two pointers to null before "removing" the node form the list ?↵it would still leak ? |
01:16:07 | FromDiscord | <Elegantbeef> If you manually manage memory of course not |
01:16:19 | FromDiscord | <Elegantbeef> Arc requires you to manage your own cycles |
01:19:59 | * | krux02 quit (Remote host closed the connection) |
01:40:01 | * | rockcavera quit (Remote host closed the connection) |
01:52:11 | * | xutaxkamay quit (Ping timeout: 264 seconds) |
01:53:09 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
01:53:18 | * | SchweinDeBurg joined #nim |
01:54:50 | * | SchweinDeBurg quit (Client Quit) |
01:55:42 | * | SchweinDeBurg joined #nim |
03:00:36 | * | jmdaemon joined #nim |
03:20:51 | FromDiscord | <demotomohiro> sent a long message, see https://pasty.ee/dZmGRcIeXeNe |
03:35:17 | FromDiscord | <Elegantbeef> @demotomohiro should probably mention `{.global.}` |
03:35:58 | FromDiscord | <Elegantbeef> also typo `echo "Destory ", x.name` |
03:39:15 | FromDiscord | <demotomohiro> Thank you! I will mention about it and fix the typo. |
05:47:28 | * | khazakar joined #nim |
05:52:02 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=FEpUncTgaKYn |
05:52:32 | FromDiscord | <demotomohiro> Do I need to use macros? |
05:53:51 | FromDiscord | <Elegantbeef> You can use a template |
05:53:55 | FromDiscord | <Elegantbeef> Well likely |
05:57:06 | FromDiscord | <demotomohiro> How can template be used to solve this problem? |
05:59:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=FIAOuGdzYrxd |
06:01:33 | FromDiscord | <demotomohiro> It compiled and worked!↵Thank you! |
06:08:04 | FromDiscord | <leorize> you can also just wrap the expression in parentheses |
06:08:11 | FromDiscord | <leorize> but a template is cleaner |
06:16:05 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=laqMAMwVFyxb |
06:17:00 | FromDiscord | <leorize> looks like a sem issue |
06:17:35 | FromDiscord | <Elegantbeef> I swear this should've been fixed at some point by me |
06:17:39 | FromDiscord | <Elegantbeef> Might've been tangental |
06:51:20 | * | azimut quit (Ping timeout: 255 seconds) |
07:00:38 | * | advesperacit joined #nim |
07:02:50 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
07:10:41 | * | antranigv joined #nim |
07:31:40 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
07:42:10 | * | antranigv joined #nim |
07:44:07 | * | redj quit (Ping timeout: 276 seconds) |
07:44:31 | * | redj joined #nim |
08:04:45 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
08:05:11 | * | antranigv joined #nim |
08:20:58 | FromDiscord | <Robyn [She/Her]> Would using an NBT encoder/decoder in C to be used as a test suite for my encoder/decoder be a smart idea? |
08:21:20 | FromDiscord | <Robyn [She/Her]> Since that way I can compare a working/complete implementation against my own written in pure Nim? |
08:25:13 | FromDiscord | <nnsee> i don't see why not - that's how a lot of projects do it (for example the rust coreutils project uses the gnu test suite to check for compatibility) |
08:26:12 | FromDiscord | <demotomohiro> I don't know about NBT, but I think comparing output from existing working implementation sounds good idea. |
08:26:38 | FromDiscord | <Robyn [She/Her]> Oh good to know then |
08:26:53 | FromDiscord | <Robyn [She/Her]> Right now trying to figure out what a tag's ID is encoded as :p |
08:27:35 | FromDiscord | <nnsee> depends on the version |
08:27:48 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
08:27:49 | FromDiscord | <Robyn [She/Her]> I mean the size of it |
08:27:55 | FromDiscord | <Robyn [She/Her]> Like, is it just an int? |
08:28:00 | FromDiscord | <nnsee> since 1.8 it's a string, before it's a short |
08:28:03 | FromDiscord | <nnsee> a short |
08:28:17 | FromDiscord | <Robyn [She/Her]> Wait wdym by 1.8 it's a string? |
08:28:53 | * | antranigv joined #nim |
08:28:57 | FromDiscord | <nnsee> https://wiki.vg/NBT#Specification |
08:29:18 | FromDiscord | <nnsee> ignore that i'm full of shit |
08:29:27 | FromDiscord | <nnsee> haven't had any coffee yet |
08:30:41 | FromDiscord | <Robyn [She/Her]> Lol fair |
08:31:27 | FromDiscord | <Robyn [She/Her]> It doesn't say what the type id is stored as :p |
08:31:37 | FromDiscord | <Robyn [She/Her]> I'm assuming it's just stored as an unsigned byte I hope |
08:32:19 | FromDiscord | <nnsee> what do you mean by type id |
08:32:42 | FromDiscord | <nnsee> it's always a single byte |
08:32:59 | FromDiscord | <nnsee> see the examples |
08:33:00 | FromDiscord | <Robyn [She/Her]> Okay good to know, it wasn't clear by the spec- |
08:33:16 | FromDiscord | <nnsee> https://wiki.vg/NBT#test.nbt |
08:33:57 | FromDiscord | <Robyn [She/Her]> Wasn't clear to an overthinker like me :P |
08:34:12 | FromDiscord | <Robyn [She/Her]> I should switch off half my brain, I'd function better xD |
08:35:34 | FromDiscord | <griffith1deadly> the main thing is to disallow very large recursion in the decoder 🙂↵in my time tileentity with large nbt was abused in this way for crashes |
08:37:25 | FromDiscord | <Robyn [She/Her]> Ah, how would I stop large recursion though... Just a number to increment during encoding? |
08:37:36 | FromDiscord | <Robyn [She/Her]> And if it's over a set limit, terminate? |
08:37:44 | FromDiscord | <griffith1deadly> yep, like vanilla decoder |
08:37:52 | FromDiscord | <griffith1deadly> just throw exception |
08:37:55 | FromDiscord | <Robyn [She/Her]> What's the limit for the vanilla decoder? |
08:38:03 | FromDiscord | <Robyn [She/Her]> In reply to @griffith1deadly "just throw exception": I prefer result types :P |
08:38:17 | FromDiscord | <Robyn [She/Her]> An exception would also be fine here tho tbf |
08:38:21 | FromDiscord | <griffith1deadly> In reply to @chronos.vitaqua "What's the limit for": as i know for 1.7.10 it's 1024 |
08:38:28 | FromDiscord | <Elegantbeef> Same difference |
08:38:50 | FromDiscord | <griffith1deadly> but some guys make nbt with 1024765 recursions |
08:38:58 | FromDiscord | <Robyn [She/Her]> Oh wow |
08:39:49 | FromDiscord | <Robyn [She/Her]> Hm... Is it cleaner to use a loop or cleaner to use function recursion... |
08:40:05 | FromDiscord | <Elegantbeef> For loops are better |
08:40:14 | FromDiscord | <Elegantbeef> Atleast in Nim land |
08:40:36 | FromDiscord | <Robyn [She/Her]> A for loop seems unsuitable here since I don't know all the nodes that are gonna be traversed |
08:40:49 | FromDiscord | <Elegantbeef> Recursion grows the stack is likely slower and will almost certainly stack overflow if you dun goof |
08:40:58 | FromDiscord | <Robyn [She/Her]> Fair |
08:41:02 | FromDiscord | <Elegantbeef> Wait until you learn iterative tree traversal |
08:41:03 | FromDiscord | <Robyn [She/Her]> A while loop it is |
08:41:10 | FromDiscord | <Robyn [She/Her]> Iterative tree traversal? |
08:41:22 | FromDiscord | <Elegantbeef> Yes instead of recursive tree traversal |
08:42:23 | FromDiscord | <Robyn [She/Her]> Is iterative just a loop instead of recursive calls? |
08:42:34 | FromDiscord | <Elegantbeef> Yes |
08:43:02 | FromDiscord | <Elegantbeef> You make a queue and set, pop off the queue as you go checking if an element has been visited using the set or a flag somewhere |
08:43:39 | FromDiscord | <Elegantbeef> Depending if you use FIFO or FILO you also can get depth first or breadth first searching |
08:44:19 | FromDiscord | <Robyn [She/Her]> So would that mean I'd first use a while loop to get a list of all the nodes with untouched raw data, and then I'd use a for loop to iterate through the raw nodes to deserialised nodes? |
08:46:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=GlBVYESVkJta |
08:46:02 | FromDiscord | <Elegantbeef> There we go we have FILO so depth first if my brain wroks right now |
08:46:12 | FromDiscord | <whisperecean> Is there a library that supports configuration from file+env var? So like I have a config file but if the field is not populated it takes the value fron env var |
08:47:01 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=rdafnALRGAAm |
08:47:25 | FromDiscord | <Elegantbeef> @whisperecean https://github.com/euantorano/dotenv.nim |
08:47:36 | FromDiscord | <nnsee> In reply to @whisperecean "Is there a library": https://github.com/euantorano/dotenv.nim |
08:47:38 | FromDiscord | <nnsee> damn it beef |
08:47:47 | FromDiscord | <Elegantbeef> Sucks to suck |
08:48:09 | FromDiscord | <nnsee> do you want me to have beef with you? |
08:48:24 | FromDiscord | <Elegantbeef> If you're as strong as you think you are clever, no |
08:48:52 | FromDiscord | <Elegantbeef> If you're as strong as you really are clever, let's gooooo |
08:49:58 | FromDiscord | <Robyn [She/Her]> Daaamn, this bouta get ugly |
08:50:34 | FromDiscord | <Elegantbeef> Only if you write it that way |
08:51:30 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
08:51:31 | FromDiscord | <nnsee> In reply to @Elegantbeef "If you're as strong": 🥲 why do you hurt the ones you love |
08:51:49 | FromDiscord | <Elegantbeef> Who are you again? |
08:52:47 | FromDiscord | <Robyn [She/Her]> Daaaamn |
08:52:53 | FromDiscord | <Robyn [She/Her]> Cold shoulder |
08:56:49 | * | redj quit (Remote host closed the connection) |
08:56:50 | FromDiscord | <whisperecean> So i added it to myproj.nimble |
08:56:54 | FromDiscord | <whisperecean> and did nimble install |
08:56:59 | FromDiscord | <whisperecean> BUT MY PROJECT DOES NOT SEE IT |
08:57:02 | * | antranigv joined #nim |
08:58:13 | * | redj joined #nim |
09:07:23 | FromDiscord | <whisperecean> What am I doing wrong? |
09:09:25 | FromDiscord | <antoniguess> Anyone here has experience with netty? |
09:12:36 | FromDiscord | <nnsee> In reply to @whisperecean "What am I doing": impossible to say if you haven't posted your code |
09:13:09 | FromDiscord | <whisperecean> What should I paste? I literally just have requires "dotenv >= 2.0.0" in my nimble file and import dotenv in my main file. |
09:13:11 | FromDiscord | <whisperecean> And it does not see it. |
09:13:30 | FromDiscord | <whisperecean> cannot open file: dotenvnim(nimsuggest chk) |
09:13:33 | FromDiscord | <whisperecean> wth... |
09:14:05 | FromDiscord | <nnsee> does the compiler give you that error? or nimsuggest? |
09:14:55 | FromDiscord | <Robyn [She/Her]> In reply to @whisperecean "cannot open file: dotenvnim(nimsuggest": Oh, restart VSC, i believe this is a known issue, but whenever you install something, Nimsuggest doesn't notice it |
09:15:04 | FromDiscord | <Robyn [She/Her]> It's pretty odd but yeah |
09:15:09 | FromDiscord | <Robyn [She/Her]> I've had this issue countless times |
09:18:09 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
09:18:13 | * | antranigv_ joined #nim |
09:20:06 | FromDiscord | <whisperecean> yeah that was it...thanks |
09:21:23 | FromDiscord | <Robyn [She/Her]> Np aha |
09:29:52 | FromDiscord | <Robyn [She/Her]> > Every NBT file will always implicitly be inside a tag compound, and also begin with a TAG_Compound (except in Bedrock edition, see below)↵Does that mean that if the first type is not a tag compound, it should be treated as if it's implicitly within one? |
09:29:57 | FromDiscord | <Robyn [She/Her]> Not sure how to interpret it |
09:31:39 | FromDiscord | <nnsee> not if, always |
09:31:53 | FromDiscord | <Robyn [She/Her]> Oh |
09:32:04 | FromDiscord | <nnsee> yes, this means you will have two compounds from the root level in most cases |
09:32:17 | FromDiscord | <Robyn [She/Her]> ...why? What would the first compound even be named |
09:32:19 | FromDiscord | <nnsee> when serializing, do not serialize the outer ocmpound |
09:32:23 | FromDiscord | <nnsee> in pratcice it does not matter |
09:33:00 | FromDiscord | <nnsee> only the behaviour matters |
09:33:06 | FromDiscord | <Robyn [She/Her]> That's so unnecessary- |
09:33:10 | FromDiscord | <nnsee> ie, everything on the root level should act as if it was nested inside a compound tag |
09:33:28 | FromDiscord | <Robyn [She/Her]> Also wouldn't this cause issues when users define their own NBT data?- |
09:33:37 | FromDiscord | <Robyn [She/Her]> But oh well, can't argue with the spec |
09:36:55 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "Also wouldn't this cause": not sure what you mean by this |
09:37:37 | FromDiscord | <Robyn [She/Her]> You know how people can make `JsonNode`s themselves via stuff like `newJString` and such? |
09:37:47 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=RGqgbbahOIqh |
09:37:50 | FromDiscord | <nnsee> how do you parse this file? |
09:38:03 | FromDiscord | <nnsee> do you terminate at the end of the first compound and ignore the second one? |
09:38:15 | * | xutaxkamay joined #nim |
09:38:15 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "well, i'd argue no.": Aaah you know what, that is necessary, ignore me then |
09:41:59 | FromDiscord | <nnsee> although seeing nbts like this in the wild is rare as far as i've seen |
09:42:06 | FromDiscord | <antoniguess> Does anyone here have experience with netty? |
09:42:37 | FromDiscord | <nnsee> In reply to @antoniguess "Does anyone here have": https://dontasktoask.com/ |
09:43:40 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "although seeing nbts like": Yeah fair enough, still will implement it though |
09:55:16 | * | antranigv_ is now known as antranigv |
10:14:01 | FromDiscord | <whisperecean> i have a problem with the dotenv that I dont get the variable available |
10:14:11 | FromDiscord | <whisperecean> Could it be that .env is not loaded? |
10:17:34 | * | azimut joined #nim |
10:24:31 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
10:28:14 | * | antranigv joined #nim |
10:30:47 | FromDiscord | <griffith1deadly> In reply to @antoniguess "Does anyone here have": netty for java or netty for nim |
10:37:01 | * | jmdaemon quit (Ping timeout: 276 seconds) |
10:43:28 | FromDiscord | <nnsee> considering the server we're in... |
10:44:37 | FromDiscord | <whisperecean> ah nvm i was using it wrong |
10:46:30 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
10:51:51 | * | antranigv joined #nim |
11:06:16 | * | pmp-p quit (Quit: No Ping reply in 180 seconds.) |
11:07:28 | * | pmp-p joined #nim |
11:33:35 | FromDiscord | <antoniguess> In reply to @griffith1deadly "netty for java or": The nim one↵Asking because I need help with something↵More details in #gamedev |
11:40:21 | FromDiscord | <zumi.dxy> managed to sneak a little Nim into my day job :)↵I needed to test a C function using test cases written as a text file for some reason↵the extremely smooth FFI really helped here, and debugging is pretty straightforward as well |
11:40:35 | FromDiscord | <zumi.dxy> the little things to maintain sanity... |
11:45:10 | FromDiscord | <nnsee> it's the little wins |
11:56:54 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
11:58:31 | FromDiscord | <whisperecean> Hmm is 4 spaces standard indentation for the default Nim plugin? |
11:58:52 | FromDiscord | <nnsee> i think it uses whatever your editor's default is |
11:59:24 | FromDiscord | <whisperecean> I dont get this in dotenv...Variables do not need to be defined before usage. |
11:59:54 | FromDiscord | <whisperecean> but I cannot just use the variable from the .env can I? |
11:59:58 | FromDiscord | <whisperecean> I have to getEnv it first? |
12:00:59 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#pasty=qkvqQDJkpZav |
12:01:40 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#pasty=DpwFoksPgAMB |
12:04:03 | FromDiscord | <nnsee> In reply to @whisperecean "I dont get this": dotenv simply loads the variables into the running processes' environment |
12:04:14 | FromDiscord | <nnsee> you have to `getEnv` on them to actually get their values, just like a regular environment variable |
12:04:25 | FromDiscord | <nnsee> if it's not set, an empty string is returned |
12:05:03 | * | antranigv joined #nim |
12:06:51 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=tqKvgduBQcUp |
12:26:07 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
12:44:16 | FromDiscord | <nnsee> from the manual...↵> The nim executable processes configuration files in the following directories (in this order; later files overwrite previous settings):↵> ↵> `$nim/config/nim.cfg`, `/etc/nim/nim.cfg` (UNIX) |
12:44:18 | FromDiscord | <nnsee> well that was a fucking lie |
12:44:25 | FromDiscord | <nnsee> /etc/nim/nim.cfg is entirely ignored |
12:44:43 | FromDiscord | <nnsee> started working once i moved the same config file to `/root/.config/nim/nim.cfg` |
12:45:11 | FromDiscord | <odexine> i assume the /etc/ one is only read when installed globally? |
12:45:25 | FromDiscord | <nnsee> hrm, maybe |
12:46:29 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=cSjpkyKaGoDM |
12:47:01 | FromDiscord | <nnsee> no reason it wouldn't, really, but still |
12:55:52 | FromDiscord | <Robyn [She/Her]> Should I use option types... Probably a good idea |
12:56:34 | FromDiscord | <odexine> what compelled you to question whether you should or not |
12:56:58 | FromDiscord | <Robyn [She/Her]> For the compound tag in NBT, for 1.20.2 onwards, the name is optional in the network API |
12:57:27 | FromDiscord | <Robyn [She/Her]> So it'd probably make it sliiiightly nicer? But you could just pass an empty string instead of an option type, and it'd have the same effect |
12:57:37 | FromDiscord | <odexine> id say to model the different versions with different types |
12:57:37 | FromDiscord | <Robyn [She/Her]> (edit) "optional" => "omitted" |
12:58:00 | FromDiscord | <odexine> In reply to @chronos.vitaqua "So it'd probably make": or that, sure, if it can never be empty otherwise |
12:58:01 | FromDiscord | <Robyn [She/Her]> Different types? Why? They're still the same type with the same underlying structure otherwise |
12:58:24 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Different types? Why? They're": well theyre different versions of the same type, so does that mean theyre the same? depends on ones take on it |
12:58:36 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "or that, sure, if": It can be empty, but for 1.20.2 the size of the string + the string itself is omitted |
12:58:53 | FromDiscord | <odexine> In reply to @chronos.vitaqua "It can be empty,": how do you distinguish an empty name then? |
12:58:54 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "well theyre different versions": They have the same ID so... Yes probably? |
12:59:17 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "how do you distinguish": You have to know what MC version you're using and what format you want, I'm just letting the user pass a `networkFormat` boolean |
13:03:03 | FromDiscord | <Robyn [She/Her]> I think I'll just use an empty string for simplicity |
13:03:38 | FromDiscord | <Robyn [She/Her]> Might also have a warning saying that the name will be omitted if it's not empty when sending via the network format |
13:05:35 | * | PMunch joined #nim |
13:13:01 | * | PMunch quit (Quit: Leaving) |
13:14:16 | * | PMunch joined #nim |
13:20:05 | * | antranigv joined #nim |
13:36:39 | FromDiscord | <Robyn [She/Her]> Do I need the recursion limit if I'm not calling functions recursively? I'd assume no? |
13:40:22 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
13:45:31 | FromDiscord | <odexine> What do you mean “need”? |
13:47:14 | FromDiscord | <whisperecean> Does anybody know how to get a result with Norm when a table field is uuid? |
13:47:31 | FromDiscord | <whisperecean> I am getting this: Error: unhandled exception: field 's' is not accessible for type 'DbValue' using 'kind = dvkOther' [FieldDefect] |
13:48:34 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "What do you mean": Need as in to prevent a malicious client from sending a large NBT file to cause a stack overflow |
13:49:14 | FromDiscord | <odexine> You should still protect against such as you could have a DoS attack instead |
13:51:42 | FromDiscord | <Robyn [She/Her]> Yeah that's fair, I'll do that then |
13:55:17 | FromDiscord | <demotomohiro> In reply to @hamidb80 "hey I wanna work": Please read stdlib document:↵https://nim-lang.org/docs/osproc.html#peekableOutputStream%2CProcess |
13:56:25 | FromDiscord | <whisperecean> I'd like to define it as custom datatype like here: https://norm.nim.town/customDatatypes.html |
13:59:25 | * | antranigv joined #nim |
14:09:10 | FromDiscord | <Robyn [She/Her]> Oh god the code is spaghetti already and I haven't even handled the various NBT formats yet for bedrock and varint nbt |
14:09:52 | FromDiscord | <Robyn [She/Her]> Okay, first I'm gonna implement big endian NBT parsing |
14:10:03 | FromDiscord | <Robyn [She/Her]> Then once I have something working, I'll restructure the code |
14:10:27 | FromDiscord | <Robyn [She/Her]> And only then will I implement the little endian and varint formats |
14:15:36 | FromDiscord | <whisperecean> How can I do something like this: proc to(dbVal: DbValue, T: typedesc[UUID]): T = UUID(dbVal.s) |
14:20:15 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
14:20:40 | FromDiscord | <Phil> In reply to @whisperecean "How can I do": What is UUID? |
14:22:07 | PMunch | Like in general? |
14:22:11 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/UYATHRnJPzGT |
14:22:17 | FromDiscord | <Phil> In reply to @PMunch "Like in general?": Nah, the specific implementation |
14:22:25 | PMunch | Ah :P |
14:22:40 | PMunch | I thought it was weird that you didn't know what a UUID was :P |
14:22:42 | FromDiscord | <Phil> Could be a string alias, distinct string, some custom object type or more |
14:22:44 | FromDiscord | <whisperecean> Ah I just want it to be string i guess |
14:22:59 | FromDiscord | <Phil> In reply to @whisperecean "Ah I just want": As in, UUID is a string-type or is that a custom type of yours? |
14:23:28 | FromDiscord | <whisperecean> Norm does not implement PSQL uuid type right? |
14:23:39 | PMunch | I mean it could also be array[2, uint64] |
14:23:42 | FromDiscord | <whisperecean> So I just need to read it as string |
14:23:57 | FromDiscord | <Phil> I don't think so, but you sure can just store it in a column like that |
14:24:07 | FromDiscord | <Phil> IIRC Postgres has like half a dozen different columns that can store strings ^^' |
14:24:29 | FromDiscord | <Phil> If you want to use just the default instead of a specific column type, then you don't really need to do anything |
14:24:40 | FromDiscord | <whisperecean> Sorry I dont get it 😄 |
14:24:50 | FromDiscord | <whisperecean> I need this conversion no? |
14:25:17 | FromDiscord | <Phil> Only if you want UUID to be handled differently than any other run-of-the-mill string.↵As in, in your nim code UUID is just a string, correct? |
14:25:46 | FromDiscord | <whisperecean> It's just a string yes |
14:25:58 | FromDiscord | <Phil> Then norm will just treat it as any other string |
14:26:12 | FromDiscord | <Phil> It has default stuff for strings so you shouldn't need to define anything |
14:26:13 | * | disso-peach joined #nim |
14:27:50 | * | antranigv joined #nim |
14:27:53 | FromDiscord | <whisperecean> i dont think so |
14:27:59 | FromDiscord | <whisperecean> Why am I getting this then? Error: unhandled exception: field 's' is not accessible for type 'DbValue' using 'kind = dvkOther' [FieldDefect] |
14:28:41 | FromDiscord | <Phil> I don't do crystal ball prophecies, I need code |
14:30:24 | FromDiscord | <whisperecean> In reply to @isofruit "I may have made": Literraly this |
14:30:32 | FromDiscord | <whisperecean> (edit) "Literraly" => "Literally" |
14:31:56 | FromDiscord | <whisperecean> In reply to @isofruit "Basically, just to break": I think I need to tell it to use https://github.com/PhilippMDoerner/lowdb/blob/master/src/lowdb/postgres.nim#L516 as string |
14:37:59 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/TfceejvvowYi |
14:38:27 | FromDiscord | <Phil> (edit) "https://pasty.ee/ObULMpqwTHyt" => "https://pasty.ee/rebFEobKJoEv" |
14:40:05 | FromDiscord | <whisperecean> I want to read it from a postgres database where uuid in postgres (the column name is uuid and the type is postgres uuid) as string in my Nim code. That's what I want to do |
14:40:42 | FromDiscord | <whisperecean> In reply to @isofruit "That does not contain": Right. So for this I need to the 3 procs. |
14:40:58 | * | PMunch quit (Remote host closed the connection) |
14:41:53 | FromDiscord | <Phil> And a custom datatype, ala `type UUID = distinct string` or so. |
14:42:31 | FromDiscord | <whisperecean> Aha! |
14:42:34 | FromDiscord | <Phil> In reply to @whisperecean "I want to read": Alrighty! This is important to know since this turns around what is already there and thus what needs to be added.↵I was initially approaching this ala you having nim-data and not a DB yet |
14:42:38 | FromDiscord | <whisperecean> type UUID = string woul dbe just an alias? |
14:43:15 | FromDiscord | <Phil> In reply to @whisperecean "Right. So for this": The important bit is that nim does the...err... it's not polymorphism... my brain is dead and I forget the word... I guess "proc dispatch"...↵It does the proc dispatch based on the type |
14:43:18 | FromDiscord | <whisperecean> sorry yes...i did not even realize that the uuid in the psql db is called "uuid" and that it's also a psql type |
14:44:43 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/fMJZiKwtKgeA |
14:44:50 | FromDiscord | <Phil> In reply to @whisperecean "type UUID = string": Yeah, which means it'd try to use the string procs |
14:45:51 | FromDiscord | <whisperecean> https://glot.io/snippets/gt1g7lne8z |
14:46:17 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=rAzPEsEzVulJ |
14:47:28 | FromDiscord | <whisperecean> the hard part is the 3 procs i dont understand that voodoo XD |
14:48:27 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
14:49:00 | FromDiscord | <Phil> In reply to @whisperecean "the hard part is": The procs sort of are just like maps↵↵For your recent issue you need to copy paste the full error |
14:49:39 | FromDiscord | <Phil> Though I assume the issue you're running into that you can not do `$uuid` |
14:50:22 | FromDiscord | <whisperecean> Maybe this func dbValue(val: UUID): DbValue = dbValue(val)↵and this proc to(dbVal: DbValue, T: typedesc[UUID]): T = UUID(dbVal.s) |
14:50:35 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/yIXwbzsyMZyQ |
14:54:18 | FromDiscord | <Phil> Actually, wait, let me think |
14:54:57 | * | antranigv joined #nim |
14:55:29 | FromDiscord | <whisperecean> Waiting hopelessly |
14:57:37 | FromDiscord | <Phil> These are the 2 ma↵Nim Type <-- dbValue --> DBValue <-- (lowdb stuff || dbType) --> DB Column Type |
14:57:41 | FromDiscord | <Phil> (edit) "These are the 2 ma↵Nim" => "Nim" |
14:58:07 | FromDiscord | <Phil> (edit) "Nim Type <-- dbValue ... -->" added "\|\| to" |
14:59:43 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/kZRArHPthhiL |
15:00:45 | FromDiscord | <Phil> To store data to a column, norm needs to take the nim-type, transform it into a DbValue type (via `dbValue` proc) since it only knows how to store `DBValue` instances in a database.↵It then stores the value in DbValue in a column whose type is determined by the `dbType` proc - that one is mostly relevant when creating a new db |
15:01:25 | FromDiscord | <Phil> As for your specific error, I'd need a full copy of the stacktrace, as per the usual. |
15:01:39 | FromDiscord | <Phil> Still convinced it's the fact you're using `$` |
15:04:14 | FromDiscord | <whisperecean> ah I can remove it but still dont really have a clue how it should look like |
15:06:34 | FromDiscord | <whisperecean> https://glot.io/snippets/gt1gs696gd |
15:12:59 | FromDiscord | <whisperecean> But I have no diea what I am doing |
15:13:04 | FromDiscord | <Robyn [She/Her]> Oh Beef, what's that patch you made for storing the cache of macros for nicer stacktraces when code errors on macro code? |
15:13:21 | FromDiscord | <Robyn [She/Her]> I can't find it now :p |
15:16:04 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
15:16:28 | FromDiscord | <System64 ~ Flandre Scarlet> I don't think binaries are self contained, are they? |
15:18:40 | FromDiscord | <zumi.dxy> Maybe, assuming the same libc |
15:18:54 | FromDiscord | <Robyn [She/Her]> Wdym? With musl they can be statically linked↵(@System64 ~ Flandre Scarlet) |
15:18:55 | FromDiscord | <zumi.dxy> Or `--passL:-static` |
15:19:00 | FromDiscord | <nnsee> In reply to @sys64 "I don't think binaries": not sure what this is in response to |
15:19:12 | FromDiscord | <nnsee> but yes they can be totally statically linked |
15:19:26 | FromDiscord | <whisperecean> @Phil Yeah it compiles but does not work |
15:19:27 | FromDiscord | <Robyn [She/Her]> Openssl and glibc are more pain to statically link than it's worth |
15:20:19 | FromDiscord | <zumi.dxy> or if you happen to import any other "impure" modules :p |
15:20:33 | FromDiscord | <zumi.dxy> also there's that thing about dynamically loading libraries at runtime isn't it? |
15:20:56 | FromDiscord | <nnsee> glibc is a non-issue, just use musl, not sure what you mean by openssl? static linking that generally just works |
15:21:27 | FromDiscord | <Robyn [She/Her]> Do you have a `.env` file, and with dotenv.nim (assuming this one\: https://github.com/euantorano/dotenv.nim) are you calling `load`?↵(@whisperecean) |
15:21:39 | FromDiscord | <Robyn [She/Her]> Some can be statically linked↵(@zumi.dxy) |
15:21:46 | FromDiscord | <Robyn [She/Her]> It just requires a bit of thought I believe |
15:21:51 | FromDiscord | <Robyn [She/Her]> Wait really?↵(@nnsee) |
15:21:58 | FromDiscord | <Robyn [She/Her]> I thought it was a complex process? |
15:22:17 | * | antranigv joined #nim |
15:23:04 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "but yes they can": My program asks for a ton of dll when I compile on Windows↵Such as pthreads and so on |
15:23:44 | FromDiscord | <zumi.dxy> try compiling with `--threads:off`? |
15:24:03 | FromDiscord | <zumi.dxy> i think it's on by default these days |
15:24:24 | FromDiscord | <Robyn [She/Her]> Yep you're correct |
15:25:13 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/937692878300413992/1112881594341011506/image.png?ex=65caa640&is=65b83140&hm=880c9e5d0233f9a119a7fc79e61158d618d5dcd213035e1d589b5ff83d412c92&↵↵And for that? |
15:26:17 | FromDiscord | <Robyn [She/Her]> I have no idea about that |
15:28:15 | FromDiscord | <zumi.dxy> (insert something about mingw here) |
15:28:29 | FromDiscord | <zumi.dxy> try `--passl:"-static -static-libgcc"` ? |
15:31:23 | FromDiscord | <nnsee> oh, windows... no clue |
15:31:40 | FromDiscord | <nnsee> i don't like to torture myself so i don't use or target windows |
15:35:13 | FromDiscord | <Robyn [She/Her]> ^^^ |
15:35:57 | FromDiscord | <Robyn [She/Her]> Oh I should probably push that event system I worked on to GitHub when I get home |
15:36:17 | FromDiscord | <Robyn [She/Her]> I wonder how I'd make it threadsafe, or if it even can be threadsafe |
15:43:28 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
15:49:27 | * | antranigv joined #nim |
15:53:31 | FromDiscord | <whisperecean> @Phil any idea? |
15:54:45 | FromDiscord | <Phil> I'll repeat again:↵Full (and I mean, full, not just the last line) stacktraces at a minimum, better is also a minimal example.↵Anything else requires me doing pulling out my crystalball and we've played this song and dance often enough that I you should know my answer for that. |
15:55:16 | FromDiscord | <Phil> A description of "it doesn't work" is not actionable.↵You needs to describe what is wrong if you want help. |
15:55:29 | FromDiscord | <Phil> (edit) removed "doing" |
16:00:03 | FromDiscord | <whisperecean> Still getting the same error: Error: unhandled exception: field 's' is not accessible for type 'DbValue' using 'kind = dvkOther' [FieldDefect] |
16:02:53 | * | derpydoo joined #nim |
16:05:35 | FromDiscord | <odexine> Phil asks for the whole output |
16:05:52 | FromDiscord | <odexine> As in every single line that is printed about the error |
16:08:39 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#pasty=zpxWhWmLaqOx |
16:10:42 | FromDiscord | <Hamid_Bluri> Oh it works with `peekChar` |
16:11:30 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
16:14:22 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/JphjDuHSPfmK |
16:15:49 | FromDiscord | <odexine> In reply to @isofruit "As Rika stated. **Full**": ~~technically it’s not the last line since the stack trace usually comes after the error~~ |
16:18:20 | * | azimut quit (Ping timeout: 255 seconds) |
16:21:54 | * | antranigv joined #nim |
16:23:05 | FromDiscord | <whisperecean> I dont think there is anything relevant https://glot.io/snippets/gt1ivwpxyu |
16:42:55 | * | antranigv quit (Quit: ZNC 1.8.2 - https://znc.in) |
16:43:05 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=esQOShZPvUkl |
16:43:55 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#pasty=YUvjrjkzSxNi" => "https://play.nim-lang.org/#pasty=VRfdmAnmKwxw" |
16:44:32 | FromDiscord | <Phil> Basically anything that isn't one of the standard types appears to get pumped into `dvkOther` so you don't mix up... let's say "exotic" stuff like uuid with actual normal string values |
16:48:01 | FromDiscord | <whisperecean> Hmmm |
16:51:11 | FromDiscord | <Hamid_Bluri> sent a long message, see https://pasty.ee/CZXUKpjMwKkY |
16:51:30 | FromDiscord | <Phil> I can't really go into more detail here without taking an hour or so to dive into the lowdb code because while it is my repo, it's just a fork I took over since I needed some changes and the original author wasn't reacting |
16:51:44 | FromDiscord | <Phil> And I'm mentally fucking dead after work |
16:52:10 | * | lucasta joined #nim |
16:52:17 | FromDiscord | <Phil> (edit) "work" => "work, so the necessary juice for that, as well as the necessary interest for it, is kinda dead atm" |
16:53:57 | FromDiscord | <whisperecean> Thanks a lot anyway! |
16:54:27 | FromDiscord | <whisperecean> It compiles but i dont see the uuid as string i just get uuid: .. in the output for this code: https://glot.io/snippets/gt1jpwz90x |
16:54:30 | FromDiscord | <whisperecean> no other error |
16:54:37 | FromDiscord | <Phil> Btw. the advice on how to present your problem (full stacktrace, code-sections that blow up etc.) is pretty much universal and always appreciated.↵It'll save you from downvotes on stack overflow if you ever post there 😛 |
16:55:57 | FromDiscord | <whisperecean> The output is like this 😯 (status: 2, uuid: ..., id: 454) |
16:56:07 | FromDiscord | <Phil> In reply to @whisperecean "It compiles but i": In that case my first guess would be "Huh, so what does the actual output look like? Where can I see the direct return? Ah, normdebug!" |
16:56:12 | FromDiscord | <Phil> I see you went there as well 😄 |
16:56:50 | FromDiscord | <Phil> In that case check if maybe oid is where stuff gets put into |
16:57:01 | FromDiscord | <whisperecean> OID? 😮 |
16:58:25 | FromDiscord | <Phil> Look at the types I sent earlier. You have a DbValue of kind dvkOther, that o field contains a DbOther instance which has 2 fields: oid and value |
16:58:34 | FromDiscord | <whisperecean> aaah |
16:58:52 | FromDiscord | <Phil> Oid is a type alias over cuint (c-uint, so an unsigned integer for C, aka a number that does not know what negative values are) |
16:59:19 | FromDiscord | <Phil> Though I think that's an ID for the column-type, skimming over things |
16:59:31 | FromDiscord | <whisperecean> man this is super complicated |
17:00:56 | FromDiscord | <Phil> You're running into bugs for scenarios that aren't often traversed (or if there are it's by folks that basically already know this stuff and thus quickly fix it up themselves, but I assume this actually is a bug) |
17:01:11 | FromDiscord | <Phil> The way the code looks like to me this thing should be inside `value` |
17:02:46 | * | antranigv joined #nim |
17:14:32 | FromDiscord | <whisperecean> I can't do just UUID(dbVal.o.oid) right? |
17:32:11 | FromDiscord | <Phil> Nope, oid is a cuint, but really I think this won't be your value, it's a column-id, not a column-value |
17:32:51 | FromDiscord | <Phil> To convert ints and related types (uint, cuint) use `$` |
17:48:52 | * | azimut joined #nim |
17:51:07 | * | disso-peach quit (Quit: Leaving) |
18:38:18 | * | lucasta quit (Quit: Leaving) |
18:43:31 | * | azimut quit (Remote host closed the connection) |
18:44:01 | * | azimut joined #nim |
18:46:05 | * | lucasta joined #nim |
19:05:06 | * | madprops left #nim (Leaving) |
19:10:52 | FromDiscord | <whisperecean> But you think my actual uuid will be in this oid field? |
19:10:55 | * | krux02 joined #nim |
19:31:40 | FromDiscord | <.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=CWUqptJTJoso |
19:43:58 | NimEventer | New thread by Apsurt: 2D sequence setter, see https://forum.nim-lang.org/t/10941 |
19:53:18 | FromDiscord | <Phil> In reply to @whisperecean "But you think my": No, that's what I was trying to say.↵I think your actual value should be in the value field and something is buggy |
19:56:35 | * | azimut quit (Ping timeout: 255 seconds) |
20:22:44 | FromDiscord | <Elegantbeef> @Robyn [She/Her] https://github.com/beef331/Nim/tree/unexpandmacros |
20:23:16 | FromDiscord | <Elegantbeef> Allocator has(had) an leaky issue↵(@.bobbbob) |
20:23:57 | * | jmdaemon joined #nim |
20:26:05 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/qoJUBYtGzHQh |
20:26:11 | FromDiscord | <whisperecean> In reply to @isofruit "No, that's what I": Thought so. But still dont really have an idea what did you suggest to try as an alternative to get the real value |
20:26:15 | FromDiscord | <Phil> (edit) "https://pasty.ee/hepbTRZdokFp" => "https://pasty.ee/KUGFshwcFhKs" |
20:26:33 | FromDiscord | <Elegantbeef> Phil are you using the same valgrind version? |
20:27:21 | FromDiscord | <Phil> In reply to @whisperecean "Thought so. But still": For a brief moment before I realized what oid stood for sth that could contain your value, but I was wrong. I actually don't have an answer for you other than doing a deep dive into lowdb code and fixing this.↵Which is an amount of work and complexity I have no resources for in regards to dealing with it |
20:28:22 | FromDiscord | <Phil> You can file an issue in norm, ideally containing a minimal example and potentially somebody will pick up the mantle there.↵Note that this is potentially rooted in lowdb ultimately and how it parses data, though moigagoo also might have more of a clue here. |
20:28:40 | FromDiscord | <Phil> In reply to @Elegantbeef "Phil are you using": Same valgrind version in what sense? |
20:28:45 | FromDiscord | <Phil> Same as what? |
20:28:54 | FromDiscord | <Elegantbeef> Is your CI's valgrind the same as your local |
20:29:08 | FromDiscord | <Phil> Good question, one sec |
20:29:56 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=VbBiXMuWktQy |
20:30:29 | FromDiscord | <Phil> The CI runs on Ubuntu 22.04, so that should work alright |
20:30:57 | FromDiscord | <Phil> Though still almost 2 year older version of valgrind, it's only 4 minor version differences, seems... okay |
20:31:36 | FromDiscord | <Elegantbeef> Gotta remove that variable |
20:31:43 | FromDiscord | <Elegantbeef> Either gotta get that version for your system or the CI |
20:31:57 | FromDiscord | <Phil> Err... err... hmm |
20:34:53 | FromDiscord | <Phil> Let's see how close ubuntu-latest gets to the arch version |
20:35:07 | FromDiscord | <Elegantbeef> 5 years older 😄 |
20:37:08 | FromDiscord | <Phil> Still 3.18, dangit |
20:37:35 | FromDiscord | <Phil> ... I kinda fear building valgrind from scratch because the github action I have already looks bloated as all hell |
20:38:05 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "<@524288464422830095> https://github.com/beef331/N": Thanks! |
20:39:34 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Allocator has(had) an leaky": https://github.com/nim-lang/Nim/compare/devel...beef331:Nim:unexpandmacros.diff diff file go brrr |
20:43:49 | FromDiscord | <Robyn [She/Her]> Out of curiosity, is it possible to use curl to fetch a text file, and pipe that data into a command that accepts a file? |
20:44:06 | FromDiscord | <ElegantBeef> `man curl` |
20:47:40 | FromDiscord | <graveflo> is there a feature that is conceptually similar to `inject` for inline iterators? |
20:48:00 | FromDiscord | <Elegantbeef> nope |
20:48:18 | FromDiscord | <graveflo> nuts. Iterator template it is then |
20:48:41 | FromDiscord | <Elegantbeef> Just use a tuple |
20:48:48 | FromDiscord | <graveflo> as the return type? |
20:48:55 | FromDiscord | <Elegantbeef> yes |
20:49:10 | FromDiscord | <graveflo> wouldn't the mutable value need to be `var` in the tuple? That is what I tried first |
20:49:14 | FromDiscord | <graveflo> but nim doesn't like it |
20:49:19 | FromDiscord | <Elegantbeef> could do `ptr T` |
20:49:26 | FromDiscord | <graveflo> true |
20:49:50 | FromDiscord | <Elegantbeef> Or `ref T` if you do not want to do unsafe code |
20:49:52 | FromDiscord | <graveflo> hopefully that gets optimized away though. I feel like for inline iterators that is unnecessary. |
20:50:16 | FromDiscord | <graveflo> it's for a bool so I don't think ref is necessary |
20:50:31 | FromDiscord | <Elegantbeef> "get's optimised away" |
20:50:31 | FromDiscord | <Elegantbeef> I mean it's one pointer indirection 😄 |
20:51:04 | FromDiscord | <graveflo> I still don't like writing code that does something unnecessary like that. It's bothersome |
20:51:13 | FromDiscord | <Elegantbeef> I don't disagree |
20:51:29 | FromDiscord | <Elegantbeef> `var T` is the same as `ptr T` though |
20:51:35 | FromDiscord | <Elegantbeef> Which makes me wonder |
20:52:27 | FromDiscord | <graveflo> Is it though? I figure that `var` is not necessarily tied to that implementation. Especially when we are talking about something like an inline iterator. It just has to be semantically correct |
20:53:12 | FromDiscord | <Elegantbeef> There you go |
20:53:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=TjFNuIJInklh |
20:53:55 | FromDiscord | <graveflo> LOL that is strange |
20:54:09 | FromDiscord | <graveflo> I like it though considering the options |
20:54:22 | FromDiscord | <Elegantbeef> I |
20:54:30 | FromDiscord | <Elegantbeef> 've never thought to do that before so it's a nice solution |
20:57:05 | FromDiscord | <Phil> Fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuck |
20:57:19 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=MtsJtaCqvoCE |
20:57:23 | FromDiscord | <Phil> Valgrind, why would you do this to me |
20:57:24 | FromDiscord | <Elegantbeef> Clippy here did you mean to write "fuck" |
20:57:27 | FromDiscord | <Phil> I trusted you |
20:57:47 | FromDiscord | <Elegantbeef> So 3.18.1 is just broken? |
20:58:27 | FromDiscord | <Phil> Not a single clue, all I can tell you is if I run a binary compiled under arch via ubuntu distrobox (because I can't be arsed to set up nim on this distrobox) it fails the same way as on the CI |
20:58:57 | FromDiscord | <Elegantbeef> Locally build 3.18.1 phil |
20:59:02 | FromDiscord | <Elegantbeef> I believe in you |
20:59:11 | FromDiscord | <Phil> Find me the sources and I will |
20:59:21 | FromDiscord | <Phil> I get commands and guides for the most recent version everywhere |
20:59:32 | FromDiscord | <Phil> Googling for 3.18 lands you nowhere surprisingly |
20:59:34 | FromDiscord | <Phil> At least not for me |
20:59:35 | FromDiscord | <Elegantbeef> https://sourceware.org/pub/valgrind/ |
20:59:49 | FromDiscord | <Phil> How?! |
20:59:53 | FromDiscord | <Elegantbeef> Imagine not going to the FOSS' website and clicking "software releases" |
20:59:54 | FromDiscord | <Phil> My google fu is pretty good usually |
21:00:18 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1203082494099066940/image.png?ex=65cfcce2&is=65bd57e2&hm=9534c484cadd01c132dac8790be8e259b2f563bdb38019ea5605233369847bac& |
21:00:21 | FromDiscord | <Elegantbeef> Can you guess what I clicked? |
21:00:44 | FromDiscord | <Phil> You clicked the "Be smug to Phil" button xP |
21:00:57 | FromDiscord | <Elegantbeef> Well I typed a bit, so that was a few more buttons |
21:02:01 | FromDiscord | <Elegantbeef> Anyway I hope you hit the same bug |
21:03:37 | FromDiscord | <penguinite> For nim 2.0.0, there are only three AV detections. But for some reason 2.0.2's detections rose to 18 |
21:03:40 | FromDiscord | <penguinite> i mean 17 |
21:07:06 | FromDiscord | <Phil> Now lets just pray valgrind is not as bad a compile as openssl was |
21:22:32 | FromDiscord | <Phil> In reply to @Elegantbeef "Anyway I hope you": Nope I do not |
21:23:47 | FromDiscord | <Robyn [She/Her]> Not sure how I'm supposed to handle modified utf-8 in Nim |
21:23:58 | FromDiscord | <Robyn [She/Her]> `"\xC0\x80".toRunes().len` seems to work |
21:24:11 | FromDiscord | <Robyn [She/Her]> But idk how to output modified utf-8 with Nim |
21:24:17 | FromDiscord | <Phil> Wait, I take that back |
21:24:25 | FromDiscord | <Phil> Yes I do, my earlier terminal still used 3.22 |
21:24:40 | FromDiscord | <Phil> 3.18.1 is just fucked |
21:25:01 | FromDiscord | <Elegantbeef> > But idk how to output modified utf-8 with Nim↵You make a `type ModifiedUtf8 = distinct string` and a `$` for it that converts from fake utf8 to real utf8 |
21:28:06 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "> But idk how": Good idea |
21:28:28 | FromDiscord | <Robyn [She/Her]> https://github.com/sciencesakura/mutf-8/blob/master/src/index.ts oh this seems easy to port actually |
21:31:37 | FromDiscord | <Elegantbeef> Well happy to have narrowed down your issue phil |
21:48:06 | FromDiscord | <Robyn [She/Her]> What would fill the role of `String.fromCharCode` in Nim? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode |
21:52:21 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=tOMAEYoeMgam |
21:52:25 | FromDiscord | <Elegantbeef> It heap allocates though |
21:52:31 | FromDiscord | <Elegantbeef> but std/widestrs is utf16 |
21:53:11 | FromDiscord | <Robyn [She/Her]> Ugh... I don't wanna touch this |
22:00:30 | FromDiscord | <Phil> In reply to @Elegantbeef "Well happy to have": Thanks there, now I'll just need to figure out which of the various painful routes I wanna go |
22:03:10 | FromDiscord | <m4ul3r> I’m away from pc, but copyMem uses memcpy_chk on Linux, correct? |
22:14:15 | * | advesperacit quit () |
22:14:54 | FromDiscord | <Elegantbeef> This made me look at godbolt, and wow it's got Nim 2.0.0 |
22:15:04 | FromDiscord | <demotomohiro> That is how `peekXYZ` works. `peekXYZ` blocks until it get enough amount of data to return. Only difference between `peekXYZ` and `readXYZ` is `peekXYZ` doesn't change read position.↵This proc might be what you really need to use:↵https://nim-lang.org/docs/osproc.html#hasData%2CProcess |
22:15:46 | FromDiscord | <Elegantbeef> Did you forget to mention someone demo? |
22:17:03 | FromDiscord | <demotomohiro> I tried to reply @Hamid_Bluri but forget. |
22:21:37 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "https://github.com/nim-lang/Nim/compare/devel...bee": Uhhhh i am struggling with applying the patch- |
22:23:22 | FromDiscord | <Robyn [She/Her]> Beef, think the PR you made is broken ehe- |
22:25:17 | FromDiscord | <Elegantbeef> I mean it's multiple months old so you likely need to modify it |
22:26:22 | FromDiscord | <Elegantbeef> Wow it's actually like 1 and a half years old |
22:26:33 | FromDiscord | <Robyn [She/Her]> Oh fun |
22:26:39 | FromDiscord | <Robyn [She/Her]> Oh well I can live withut, I am lazy |
22:26:56 | FromDiscord | <Robyn [She/Her]> I also use ChatGPT to port a Python MUTF8 impl to Nim while fixing code up |
22:26:57 | FromDiscord | <Robyn [She/Her]> Fun |
22:26:58 | * | mal`` quit (Quit: Leaving) |
22:30:24 | FromDiscord | <Elegantbeef> Why understand what's happening when you can just rely on a llm |
22:33:04 | FromDiscord | <Robyn [She/Her]> Exactly! |
22:33:16 | FromDiscord | <Robyn [She/Her]> I am reading through the code to understand it of course |
22:33:23 | FromDiscord | <Robyn [She/Her]> I just cannot be bothered to implement this- |
22:43:13 | NimEventer | New thread by blackmius: Linking on Mac M1, see https://forum.nim-lang.org/t/10942 |
22:50:36 | * | mal`` joined #nim |
23:09:05 | * | disso-peach joined #nim |
23:14:42 | * | derpydoo quit (Ping timeout: 268 seconds) |
23:46:59 | * | khazakar quit (Quit: Connection closed for inactivity) |