<< 29-10-2023 >>

00:20:34FromDiscord<cyberlis (cyber_lis)> I tried to add `sink` to `createThread` with `not void`. It worked, but I had to add `sink` to `Thread`'s `dataFn`↵It doesn't work well with backwards compatibility.I guess it can be done via some build flag like `-d:sinkThreadArgs`. But I don't think Araq will be happy to see such PR \:)
00:21:08FromDiscord<Elegantbeef> Yea it's not ideal
00:21:42FromDiscord<Elegantbeef> Pre 2.0 there wasnt really much of "Giving up resources" though, so making nim 2.x better is a nice path
00:32:18FromDiscord<Elegantbeef> Likely best to make your own library if you really want this API
00:32:35*beholders_eye quit (Ping timeout: 255 seconds)
00:38:35FromDiscord<cyberlis (cyber_lis)> Interesting idea. Maybe I will try
00:58:10arkanoidI have a very large object (the object representing the context of a scientific simulation) that needs to be accessed by the main loop of the simulation, that needs to run as fast as possible. I can take that large object to the main loop function as a ref object by parameter, or as a global, or as a non-var stack parameter. Which of these is better/faster in your opinion?
01:02:48FromDiscord<Elegantbeef> Just take it as the type
01:02:53FromDiscord<Elegantbeef> `proc doThing(bleh: Type)`
01:03:29arkanoidok, but this takes in 2 of the 3 options above. Type is a ref type, or lives on the stack?
01:03:49FromDiscord<Elegantbeef> It doesnt matter
01:04:05FromDiscord<Elegantbeef> If you do not care about the stack implications and do not copy it it couldnt matter leess
01:04:10FromDiscord<Elegantbeef> less\
01:04:11arkanoidis a non var param always an hidden pointer?
01:04:27FromDiscord<Elegantbeef> When the size is large enough(\> 3 floats)
01:04:48arkanoidok, thanks
01:05:25arkanoidthis stack+hidden ref vs ref type thing alwasy confuse me
01:05:40FromDiscord<Elegantbeef> It shouldnt
01:05:41arkanoidNim makes like you don't need the heap
01:05:46NimEventerNew Nimble package! stackclosures - Allocate closures on stack, see https://github.com/guibar64/stackclosures
01:05:52FromDiscord<Elegantbeef> In Nim if you need reference semantics you don't use `ref`
01:06:24FromDiscord<Elegantbeef> I mean if you need them 😄
01:06:24FromDiscord<Elegantbeef> Otherwise you should not need `ref`
01:07:06arkanoidit makes me feel noob after months of writing nim not having a very clear picture of "when I need reference semantics"
01:08:17FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/8426#54529
01:10:26arkanoidthis is gold, thanks again
01:13:04FromDiscord<Elegantbeef> It's at most silver
01:17:07arkanoideven better, cheaper and always beats rust
01:17:14arkanoidba-dum-tss
01:20:35FromDiscord<Elegantbeef> Anyway in Nim with Arc/Orc there is very little reason to use `ref` unless you want to have a many to 1 relation or are using inheritance
01:20:38FromDiscord<Elegantbeef> There is a caveat, but meh
01:23:56FromDiscord<michaelb.eth> I have a `type Foo = Table[string, seq[int]]`. I'm using arc and when looking up a value in instance of Foo, how can I avoid copying the sequence?
01:24:22FromDiscord<Elegantbeef> modifying tables to return a `lent T`
01:24:26FromDiscord<Elegantbeef> Which has been done in tables iirc
01:25:53FromDiscord<michaelb.eth> I'm still seeing copy behavior in both 2.0 and devel, at least I think I am re: `--expandArc`
01:26:09FromDiscord<Elegantbeef> Yea it's not `lent` in 2.0
01:26:11FromDiscord<Elegantbeef> It's lent in devel
01:26:15FromDiscord<michaelb.eth> I mean I expect it in 2.0, like you say, but in devel shouldn't it be lent?
01:26:20FromDiscord<michaelb.eth> right
01:26:40FromDiscord<Elegantbeef> I might be misremembering but yea
01:27:17arkanoidto ensure you're not copying you can disable the relevant hook procs on that type, then you get compile error
01:27:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Kcq
01:28:10FromDiscord<Elegantbeef> whoops `tables.[](t.addr[], key)`
01:28:50FromDiscord<michaelb.eth> https://github.com/nim-lang/Nim/pull/22812/files
01:28:55FromDiscord<michaelb.eth> In reply to @Elegantbeef "You could define your": will try, thanks
01:33:56FromDiscord<Yardanico> https://github.com/nim-lang/Nim/issues/19572 that's not really a bug, right? SslContext just doesn't have a destructor and instead has an explicit `destroyContext` proc, so if anything, this issue is about getting a default destructor and not a memory leak per se?
01:35:27FromDiscord<Elegantbeef> Seems like it to me, nim2.x feature request 😄
01:46:19FromDiscord<michaelb.eth> In reply to @Elegantbeef "whoops `tables.[](t.addr[], key)`": thanks so much, shaved like 200ms off a big run
01:48:34FromDiscord<Yardanico> also maybe `withValue` can help?
01:48:49FromDiscord<Yardanico> it essentially does the same (takes an addr) and just provides a nicer template sugar over that
01:49:15FromDiscord<Yardanico> it's also a way to check if a value exists and get it without checking if a key is in the table twice
01:49:56FromDiscord<michaelb.eth> good idea, and actually using that already, this is a different case where I'm trying to shave off time in lookups where I know 100% that the key is there
01:50:21FromDiscord<Yardanico> hmm
02:31:34FromDiscord<michaelb.eth> tried to answer my own question by experimenting, but... I have `type Foo = object` and from `seq[Foo]` I'd like to return `lent Foo` instead of copying
02:31:55FromDiscord<michaelb.eth> I tried similar to what was suggested and works for Table above
02:32:24FromDiscord<michaelb.eth> but I couldn't get my proc to run, i.e. not seeing the debugEcho I stuck in there to make sure it's what was being used
02:35:12FromDiscord<Elegantbeef> huh?
02:39:45FromDiscord<michaelb.eth> so I've got this `let foos = ...` that's a `seq[Foo]` and currently I store some non-copying references via `ptr Foo`. Maybe that's the best I can do, wasn't sure if I could override `[]` with return of `lent Foo` so I don't have to explicitly use addr/ptr
02:40:03FromDiscord<michaelb.eth> but that may be a misunderstanding of what lent can do for me
02:40:28FromDiscord<Elegantbeef> `let a = ...` always copies
02:40:41FromDiscord<Elegantbeef> Nim does not have any borrow checking as such there is no safe way to take a reference
02:41:10FromDiscord<Yardanico> In reply to @Elegantbeef "Nim does not have": i mean, don't views have it in a very early phase?
02:41:14FromDiscord<Yardanico> although you have to explicitly enable them
02:43:46FromDiscord<michaelb.eth> In reply to @Elegantbeef "`let a = ...`": no I meant the the seq[Foo] is already setup with let, but I want to reference members of the seq elsewhere
02:44:20FromDiscord<michaelb.eth> ptr works, it's fine, I just was experimenting after reducing copying overhead with help of lent for my table
02:44:24FromDiscord<Elegantbeef> Views do exist, but let's be honest it'll explode in your face 9/10 times
02:45:18FromDiscord<Yardanico> true
02:46:40FromDiscord<Elegantbeef> Oh right `[]` cannot be overidden for `seq`/`array`/`openArray` iirc
02:47:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4KcE
02:50:41FromDiscord<Elegantbeef> Though replacing with `[]` does not cause a error
03:01:43FromDiscord<michaelb.eth> tried it, still seeing `=copy` in --expandArc output, though I'm doing like `b = a{1}`
03:01:56FromDiscord<michaelb.eth> so maybe I can't avoid it in that situation because it's assignment?
03:10:28FromDiscord<Elegantbeef> Like i said
03:10:36FromDiscord<Elegantbeef> Any variable assignment requires a copy
03:10:57FromDiscord<michaelb.eth> got it
03:13:14FromDiscord<michaelb.eth> beef, would you like me to give credit in an `@` mention when I submit the PR that makes use of the table lent thing?
03:13:25FromDiscord<michaelb.eth> (edit) "beef, would you like me to give ... credit" added "you"
03:13:40FromDiscord<Elegantbeef> I couldn't care less
03:14:17FromDiscord<michaelb.eth> okay, just didn't want to do it if you don't want me to
03:14:41FromDiscord<takemichihanagaki3129> sent a code paste, see https://play.nim-lang.org/#ix=4KcM
03:15:04FromDiscord<takemichihanagaki3129> What should I do?
03:16:07FromDiscord<intellij_gamer> Make it be `config.nims` instead of `test.nims` so that it gets automatically loaded
03:16:23FromDiscord<takemichihanagaki3129> In reply to @intellij_gamer "Make it be `config.nims`": Hmmm, thank you a lot!
03:17:16FromDiscord<Elegantbeef> name it `config.nims`
03:20:25FromDiscord<takemichihanagaki3129> Worked! But, is it possible to mix `task`s with optional arguments?
03:20:45FromDiscord<takemichihanagaki3129> sent a code paste, see https://play.nim-lang.org/#ix=4KcO
03:25:22FromDiscord<Elegantbeef> Think you have to manually parse
03:28:50FromDiscord<takemichihanagaki3129> In reply to @Elegantbeef "Think you have to": Yes! I'll try to create my own `task`-like template to it. Thanks again!
05:09:23*CO2 quit (Quit: WeeChat 4.1.0)
05:14:28FromDiscord<nasuray> In reply to @takemichihanagaki3129 "Yes! I'll try to": I've used something similar to this in a custom `build` task. https://stackoverflow.com/a/74919237
05:18:17*jkl joined #nim
05:18:22FromDiscord<0_archkubi_0> sent a code paste, see https://paste.rs/e8119
05:19:02FromDiscord<0_archkubi_0> (edit) "https://play.nim-lang.org/#ix=4Kdi" => "https://play.nim-lang.org/#ix=4Kdh"
05:20:41FromDiscord<0_archkubi_0> broo my computer slow now why ?
05:23:42FromDiscord<0_archkubi_0> helloooooo somone tell me why this is use too much cpu ?
05:27:38FromDiscord<0_archkubi_0> helooooooo why only ouput is Downloading https://github.com/nim-lang/Nim.git using git and still say Downloading https://github.com/nim-lang/Nim.git using git ? and use %100 cpu what is this gta 5 ? help me please ?
05:32:01FromDiscord<0_archkubi_0> i hope my cpu not dead ... still Downloading https://github.com/nim-lang/Nim.git using git
05:34:35FromDiscord<demotomohiro> When Nim compile Nim code, Nim calls gcc and gcc calls cc1.
05:34:54FromDiscord<0_archkubi_0> and old legends say still Downloading https://github.com/nim-lang/Nim.git using git
05:35:48FromDiscord<0_archkubi_0> my computer never be slow i install software in arch linux aur from source
05:36:45FromDiscord<0_archkubi_0> why here is no progress output for this ?
05:38:13FromDiscord<demotomohiro> I don't know what you are compiling, but if you are compiling Nim from source, it takes long time and calls gcc at same time and uses many cores.
05:39:05FromDiscord<0_archkubi_0> if i can see % something left this is can be good
05:39:21FromDiscord<demotomohiro> I guess there is no progress output because it is very hard to predict how long time it takes.
05:40:28FromDiscord<0_archkubi_0> anything better than this Downloading https://github.com/nim-lang/Nim.git using git zero output. finish now finaly
05:44:04FromDiscord<0_archkubi_0> Unable to find nimlangserver, trying to install it via '/usr/bin/nimble install nimlangserver --accept' nice
05:46:38FromDiscord<0_archkubi_0> https://tenor.com/view/%E7%9A%849-gif-27299608
05:47:09FromDiscord<0_archkubi_0> i jut want to autocomplete in vscode bruh
05:50:26FromDiscord<0_archkubi_0> The Nim Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. bruh
05:52:45NimEventerNew thread by dwhall256: How to get rid of "_ZL10nimZeroMemPvl" in an embedded target?, see https://forum.nim-lang.org/t/10576
06:07:36FromDiscord<0_archkubi_0> sent a code paste, see https://play.nim-lang.org/#ix=4Kdq
06:31:34FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#ix=4Kdu
06:36:41FromDiscord<0_archkubi_0> sent a code paste, see https://play.nim-lang.org/#ix=4Kdv
06:36:53FromDiscord<0_archkubi_0> i hope this is right works but
06:38:32FromDiscord<0_archkubi_0> I tried to guess this value like type something like
06:56:55FromDiscord<ingo_61476> sent a code paste, see https://play.nim-lang.org/#ix=4Kdz
07:37:35FromDiscord<0_archkubi_0> sent a code paste, see https://play.nim-lang.org/#ix=4KdI
08:01:18FromDiscord<0_archkubi_0> sent a code paste, see https://play.nim-lang.org/#ix=4KdT
08:25:32FromDiscord<0_archkubi_0> invalid type: 'object' in this context: 'seq[object]' for var how i do that ?
08:26:03FromDiscord<0_archkubi_0> sent a code paste, see https://play.nim-lang.org/#ix=4KdY
08:26:37FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#ix=4KdZ
08:27:04FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Ke0
08:27:08*krobelus joined #nim
08:27:50FromDiscord<Phil> In this particular instance it's that `seq[object]` is not a valid type because it's not specific.
08:27:51FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#ix=4Ke1
08:28:29FromDiscord<Phil> Types in nim must be specific unless you're getting into generics, which you haven't been so far and I'd only recommend getting into generics once you've understood the basics
08:28:37krobelusI created a binary module with "nimble init" but "nimble build" does not seem to work and there is no intelligible error message. See https://github.com/kak-lsp/kak-lsp/issues/695#issuecomment-1784000940
08:29:01krobelusIt just says "Error: Build failed for the package: nim", no reason
08:29:18*Qaziquza joined #nim
08:29:19FromDiscord<0_archkubi_0> i just want finish my game nim is to hard language c easy than nim
08:30:34krobelusMy goal is to set up a minimal working Nim project
08:30:42FromDiscord<nnsee> In reply to @krobelus "It just says "Error:": wild guess - maybe use another project name
08:30:43FromDiscord<Phil> That isn't really the case given the memory gymnastics C requires at even medium proficiency.
08:31:13FromDiscord<nnsee> maybe there's a dependency clusterfuck if you name it `nim`
08:31:48FromDiscord<Phil> What you're running into is the difference between C's "who knows" type system and nim's static type system for the most part.↵The latter of which allows you to notice certain issues at compiletime so you don't have to figure them out at runtime
08:31:53FromDiscord<nnsee> In reply to @0_archkubi_0 "i just want finish": as with any language, you need to learn the syntax to use it
08:32:22FromDiscord<nnsee> and nim's syntax is not exactly hard to learn
08:32:31FromDiscord<0_archkubi_0> i don't know what language make list to hard you gimve example for this
08:32:32krobelusnnsee: you're right, thanks so much!
08:32:42FromDiscord<Elegantbeef> I mean they've explicitly said "Quick just fix my code" that's a sign that they don't want to learn
08:33:12FromDiscord<nnsee> In reply to @krobelus "<@961485620075720734>: you're right, thanks": great! glad you got it working
08:33:13FromDiscord<0_archkubi_0> (edit) "gimve" => "give me"
08:33:19*Qaziquza quit (Client Quit)
08:34:29FromDiscord<cephonaltera> In reply to @0_archkubi_0 "i don't know what": my dude, object is a keyword, its like typeing `struct[100]`
08:34:38FromDiscord<cephonaltera> (edit) "typeing" => "typing"
08:34:52FromDiscord<0_archkubi_0> okay what type i need for this ?
08:35:04FromDiscord<Elegantbeef> Then bitching that C is harder than ASM\
08:35:06FromDiscord<cephonaltera> the type you defined, `AstroObject`
08:35:08FromDiscord<nnsee> In reply to @0_archkubi_0 "okay what type i": i literally told you my friend
08:35:34FromDiscord<nnsee> In reply to @nnsee "If you want a": here
08:35:56FromDiscord<0_archkubi_0> i'm little tired you know i'm not sleep 27 hour
08:36:11FromDiscord<nnsee> er, maybe you should take a break
08:36:19FromDiscord<Phil> Please just work your ways through the tutorials to learn nim syntax basics.↵And yeah, sleep.
08:36:49*cnx quit (Remote host closed the connection)
08:37:08FromDiscord<0_archkubi_0> i just write game nim/raylib thats it nim not for me
08:37:36FromDiscord<Elegantbeef> You went 0-100 writing a game inside Nim without learning Nim
08:37:37*cnx joined #nim
08:38:13FromDiscord<0_archkubi_0> i finish simple gameplay in c,python,rust,go and nim finish i hope
08:38:24FromDiscord<nnsee> writing a game in any language is hard, but it's infinitely harder without knowing the language's syntax
08:39:04FromDiscord<Elegantbeef> I've been rolling a dice for every character I type in my games
08:39:05FromDiscord<Elegantbeef> Worked so far
08:39:20FromDiscord<0_archkubi_0> nice
08:39:30FromDiscord<nnsee> In reply to @nnsee "writing a game in": like trying to write a novel in a language you can't speak
08:39:57FromDiscord<Elegantbeef> Die red car was very blitz
08:40:18FromDiscord<0_archkubi_0> i know c,python little go and rust i never write code like nim
08:40:37FromDiscord<Elegantbeef> This is just a lie now
08:40:53FromDiscord<Elegantbeef> In rust you declare a struct then would do `vec<StructName>`
08:40:55FromDiscord<0_archkubi_0> i can show you my language scripts
08:41:05FromDiscord<Elegantbeef> I mean Rust and Nim are not disimilar
08:41:05FromDiscord<0_archkubi_0> i'm noob in rust
08:41:20FromDiscord<Phil> In reply to @Elegantbeef "I've been rolling a": For you? Makes sense
08:42:14FromDiscord<Phil> The difference here is I roll 2 d100's for entire words to glue together, much more readable
08:42:49FromDiscord<Elegantbeef> 200 words? Hardly can count with that few
08:43:25FromDiscord<Phil> My dude, 2d100's is 100^2 possibilities!
08:44:20FromDiscord<Phil> Wait, fuck, that's dungeons and dragons dice notation, I forgot that's not wide-spread
08:44:29FromDiscord<Phil> 2d200 = two dice with 100 sides
08:44:37FromDiscord<cephonaltera> I can see the confusion if he maybe learned something like Java first. is `new Object[]();` valid in Java or is Object abstract?
08:44:43FromDiscord<Phil> (edit) "2d200" => "2d100"
08:45:04FromDiscord<Phil> You would never ever ever ever ever do new Object()
08:45:08FromDiscord<Phil> (edit) "You would never ever ever ever ever do new Object() ... " added "in java"
08:45:17FromDiscord<cephonaltera> oh but i would, im daring like that
08:45:30FromDiscord<Phil> It's possible, but you would always make an explicit type with the fields you need and a constructor
08:45:46FromDiscord<Phil> An object on its own is basically useless, can't even be used as a data vehicle
08:46:33FromDiscord<Phil> Similarly in java you wouldn't do `List<Object>`, you would do `List<ExplicitType>` or `List<SomeInterface>`
08:47:20FromDiscord<Elegantbeef> Object boxes all types in Java so yea you'd never do that 😄
08:47:50FromDiscord<Elegantbeef> Oh wait that's `Object[]` 😄
08:47:58FromDiscord<Elegantbeef> I can read
08:48:19FromDiscord<Elegantbeef> read, reid, reed, read
08:49:12FromDiscord<gyatsoyt> Okay so I am using a library python chess through nimpy so I already have a chess engine made in python which is ridiculously slow so I tried making it in nim but can you tell me I am still using the same library but the algorithms the engine has is all written in nim so will this make the engine faster cz algorithms are written in nim like minimax l,alpha-beta pruning and stuffs . Or it will have the same performance as python.
08:49:15FromDiscord<0_archkubi_0> sent a long message, see http://ix.io/4Ke5
08:49:48FromDiscord<Elegantbeef> I mean if you want it faster writing it in Nim will likely be faster
08:50:00FromDiscord<0_archkubi_0> i'm not lier bro
08:50:07FromDiscord<Elegantbeef> No one called you a liar
08:50:09FromDiscord<0_archkubi_0> but yes i'm dumb
08:50:23FromDiscord<Elegantbeef> We just said your saying "Nim is not like the others" is absolute bullshite
08:50:37krobelusOn a minimal nim binary project, I run "nimsuggest totallynotnim.nimble --v3 --autobind" but it just exits with status 1, no indication of what's wrong
08:50:54FromDiscord<Elegantbeef> In C you'd never do `struct` you'd do `MyStruct` in Rust you'd do `vec<MyStruct>`, ....
08:51:16FromDiscord<0_archkubi_0> In reply to @Elegantbeef "This is just a": 🙄
08:51:39FromDiscord<Elegantbeef> > i never write code like nim
08:51:44krobelussame if I pass src/*.nim instead of the nimble file
08:51:44FromDiscord<Phil> In reply to @gyatsoyt "Okay so I am": Could you rephrase that? I'm not entirely sure I get what you're writing.↵So basically you used a python lib for chess, then swapped to nim and are still calling the python lib and want to ask if that's faster?↵Likely yes, but only the parts of the code that are nim will execute faster than their python counterparts
08:51:45FromDiscord<Elegantbeef> you wrote Rust and C
08:51:53FromDiscord<Elegantbeef> Those are both like Nim
08:52:30FromDiscord<0_archkubi_0> there is no var astros: seq[AstroObject]↵astros = @[] this is rust or c ?
08:53:08FromDiscord<Elegantbeef> Lol
08:53:14FromDiscord<0_archkubi_0> let mut astros: Vec<AstroObject> = Vec::new();
08:53:25FromDiscord<Elegantbeef> `let mut astros = vec<AstroObject>()` seems very similar
08:53:31FromDiscord<Elegantbeef> Like shockingly similar
08:53:38FromDiscord<Phil> `var astros: seq[AstroObject] = @[]`
08:53:59FromDiscord<Elegantbeef> Or `AstroObject astros = 0;`
08:54:04FromDiscord<Elegantbeef> Damn these are all similar
08:54:14FromDiscord<Elegantbeef> or rather `{}`
08:54:18FromDiscord<0_archkubi_0> let mut astros: Vec<AstroObject> = Vec::new(); this and var astros: seq[AstroObject] = @[] how similar you guys know better than me
08:54:26FromDiscord<cephonaltera> sent a long message, see http://ix.io/4Ke6
08:54:39FromDiscord<cephonaltera> In reply to @0_archkubi_0 "let mut astros: Vec<AstroObject>": yes these are identical
08:54:41FromDiscord<Elegantbeef> Let's see both Nim and Rust have generics
08:54:47FromDiscord<Elegantbeef> You do not use `vec<struct>`
08:54:49FromDiscord<Elegantbeef> You use `vec<AstroObject>`
08:55:20FromDiscord<0_archkubi_0> seq is vec?
08:55:28FromDiscord<Elegantbeef> It's just so inane to act like they're vastly different
08:55:34FromDiscord<Phil> ... why wouldn't it be?
08:55:46FromDiscord<Elegantbeef> How did you even stumble on `seq` if you didn't read about it being a dynamic array
08:56:28FromDiscord<0_archkubi_0> i watch youtube tutorial
08:56:37FromDiscord<Elegantbeef> https://nim-lang.org/docs/tut1.html
08:56:59FromDiscord<Elegantbeef> https://nim-lang.org/documentation.html
08:57:18FromDiscord<Phil> sent a long message, see http://ix.io/4Ke7
08:57:24FromDiscord<Phil> (edit) "http://ix.io/4Ke7" => "http://ix.io/4Ke8"
08:57:38FromDiscord<Phil> The above basically describe vectors
08:57:43FromDiscord<Elegantbeef> https://www.nimprogrammingbook.com/book/nimprogramming_rouge_molokai.html
08:57:54FromDiscord<Phil> Okay that link looks exotic
08:57:56FromDiscord<Elegantbeef> There you go, have yourself a merry little christmas with good tutorials
08:58:34FromDiscord<Elegantbeef> That's Salewski's book
08:58:51FromDiscord<Phil> Huh, I could've sworn I found it under a different URL way back when
08:58:51FromDiscord<Elegantbeef> https://www.nimprogrammingbook.com/ actual site has a bunch of things to choose from
08:59:15FromDiscord<Elegantbeef> Themes for Html, PDF, a place to order it
09:00:35FromDiscord<0_archkubi_0> i read doc later i'm go sleep thanks for help
09:00:54FromDiscord<Elegantbeef> Though given that he's started using chatgpt for generating things I'm a bit weary about suggesting the book anymore
09:02:02FromDiscord<0_archkubi_0> bro chatgpt is bad i watch video anyway good day
09:02:15FromDiscord<Elegantbeef> Don't watch videos to learn
09:02:44FromDiscord<Elegantbeef> There is very little reason to watch a video to learn a programming language
09:04:15FromDiscord<Phil> I like talks for architecture talks about programming languages
09:04:28FromDiscord<Phil> Still love Raymond Hattinger talk videos
09:04:40FromDiscord<Elegantbeef> Right but no one should ever sit through "How to program in X"
09:04:51FromDiscord<Phil> "Let the pattern discover itself" is maxime I still use
09:04:59FromDiscord<Phil> (edit) ""Let the pattern discover itself" is ... maxime" added "a"
09:05:18FromDiscord<Elegantbeef> Here I thought I invented that 😛
09:06:08FromDiscord<nnsee> In reply to @isofruit "An object on its": as a pentester, it's not useless to me - it can be used to reach `(java.lang.Runtime).getRuntime().exec()` 😅
09:07:58FromDiscord<Phil> In reply to @Elegantbeef "Here I thought I": You're too much of a youngin for that 😛
09:08:39FromDiscord<Elegantbeef> Eh people throw darts and generally go into many ranges of ages
09:08:40FromDiscord<Elegantbeef> So perhaps I'm not a zoomer afterall
09:18:17*aa204 joined #nim
09:25:03*aa204 quit (Quit: Client closed)
09:54:25*junaid_ joined #nim
10:00:09FromDiscord<Phil> At this point I need to write myself a memo given how often I forget and look up again how to read in a file
10:00:53FromDiscord<Phil> Oh wow, stab in the dark `readFile("<filePath>")` was it already
10:01:01FromDiscord<Phil> Now I also remember why I never write myself a memo
10:06:13FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4Kew
10:06:15FromDiscord<gyatsoyt> Any idea
10:06:27*CO2 joined #nim
10:08:22FromDiscord<inventormatt> sent a code paste, see https://play.nim-lang.org/#ix=4Kex
10:17:12*junaid_ quit (Remote host closed the connection)
10:17:12FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4Kez
10:18:10FromDiscord<Phil> Always remember:↵Python code returns pyobjects, to get a useable "nim-type" out of that you got to convert via `.to(<nimtype>)`
10:18:54FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KeA
10:19:21FromDiscord<gyatsoyt> I mean in python we can define functions anywhere in the code and it still works but here It seems to be a little problematic
10:20:26FromDiscord<Phil> In reply to @gyatsoyt "I have a proc": Yeah in nim a proc can only access things that came before it.↵To escape that you can engage in what's called "forward declarations"
10:20:47FromDiscord<gyatsoyt> In reply to @isofruit "Yeah in nim a": I would likely wanna know about forward declarations
10:20:55FromDiscord<Phil> Gimme a sec to cook up examples
10:21:06FromDiscord<inventormatt> sent a code paste, see https://play.nim-lang.org/#ix=4KeB
10:22:01FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4KeC
10:22:14FromDiscord<Phil> A forward declaration is basically just a copy-paste of the proc signature without the `=` at the end
10:22:30FromDiscord<Phil> Note that the order of forward declarations is completely irrelevant
10:23:59FromDiscord<Phil> A forward declaration tells the compiler "These procs will exist". So the compiler may not yet know what they'll do, but it'll know that they exist, so it doesn't throw errors when you reference a proc that hasn't yet been defined since it knows "Wait, he told me before that it'll be there"
10:24:26FromDiscord<Phil> However if you then fail to provide an implementation for a proc you forward declared the compiler will find you and it will complain
10:24:48FromDiscord<gyatsoyt> Ohk understand
10:25:04FromDiscord<gyatsoyt> So it's like declaring empty variables in python
10:25:11FromDiscord<gyatsoyt> And then using it whenever we want
10:25:13FromDiscord<gyatsoyt> Understood
10:25:14FromDiscord<Phil> Kinda
10:25:22FromDiscord<gyatsoyt> Thankss
10:25:43FromDiscord<Phil> Happy to help, I mean I learned how to actually make use of forward declarations like a week ago myself 😛
10:26:16FromDiscord<Phil> I prefer reordering my code and only use them where some procs cross-reference each other in certain ways
10:28:56FromDiscord<gyatsoyt> In reply to @isofruit "I prefer reordering my": Oh
10:32:12*junaid_ joined #nim
10:33:55FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KeK
10:33:56FromDiscord<gyatsoyt> I might be a bit annoying 💀
10:35:46*krobelus left #nim (WeeChat 2.8)
10:35:57*junaid_ quit (Remote host closed the connection)
10:38:38FromDiscord<Phil> I mean, it helps if you copy paste the text in a codeblock rather than screenshot it 😛
10:39:03FromDiscord<gyatsoyt> In reply to @isofruit "I mean, it helps": Sure lemme do it
10:39:34FromDiscord<Phil> In reply to @gyatsoyt "Sure lemme do it": chess.PAWN is a PyObject
10:39:37FromDiscord<Phil> got to convert it back to int
10:39:49FromDiscord<gyatsoyt> So
10:39:54FromDiscord<gyatsoyt> .to(int)
10:39:58FromDiscord<Phil> Always remember that everything comming out of chess is a PyObject
10:40:09FromDiscord<Phil> yeah, that should do it
10:40:18FromDiscord<Phil> You may get a runtime error if it doesn't
10:41:04FromDiscord<gyatsoyt> In reply to @isofruit "You may get a": /home/runner/Engine/evaluate.nim:125:21 Error: type mismatch: got '(string, int)' for 'pieceValue[to(getAttr(chess, "PAWN"), int)]' but expected 'float'
10:41:05FromDiscord<gyatsoyt> This
10:41:18FromDiscord<gyatsoyt> (edit) "In reply to @isofruit "You may get a": /home/runner/Engine/evaluate.nim:125:21 Error: type mismatch: got '(string, int)' for 'pieceValue[to(getAttr(chess, "PAWN"), int)]' but expected 'float'" => "sent a code paste, see https://play.nim-lang.org/#ix=4KeL"
10:42:21FromDiscord<Phil> I mean, that one's almost obvious
10:42:51FromDiscord<Phil> Of your prior error message, read the first line, that tells you the type that is inside of the array
10:43:08FromDiscord<Phil> And then ask yourself if that can be converted into a float willy nilly or if you need to do something 😛
10:50:08FromDiscord<Phil> Honestly for your own sanity I'd recommend not doing so much in a single line of code
10:50:15FromDiscord<Phil> Makes debugging and reading easier
10:50:49FromDiscord<gyatsoyt> In reply to @isofruit "Honestly for your own": Umm
10:51:04FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4KeO
10:51:43FromDiscord<Phil> Would be a different way of writing the same, assuming that even works
10:53:57FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KeP
10:53:58FromDiscord<gyatsoyt> What is the problem with tis
10:53:59FromDiscord<gyatsoyt> This
10:54:08FromDiscord<gyatsoyt> It wants float so I am giving it a float
10:54:13FromDiscord<gyatsoyt> It still seems to give error
10:54:59FromDiscord<Phil> I dunno what piecevalue does
10:55:12FromDiscord<gyatsoyt> In reply to @isofruit "I dunno what piecevalue": Its a constant value
10:55:36FromDiscord<gyatsoyt> Thus
10:55:37FromDiscord<Phil> In that case chess.PAWN is still a PyObject
10:55:39FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KeR
10:55:44FromDiscord<gyatsoyt> (edit) "Thus" => "This"
10:56:12FromDiscord<Phil> What you need is a string
10:56:21FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4KeS
10:56:33FromDiscord<gyatsoyt> Uhm
10:56:54FromDiscord<gyatsoyt> What can I do then
10:57:08FromDiscord<Phil> make it a table
10:57:34FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4KeT
10:57:46FromDiscord<Phil> You were basically only like 20 characters or so off the finish line ^^
10:57:52FromDiscord<Phil> (edit) "You were basically only like 20 characters or so off the finish line ... ^^" added "for that particular thing"
10:58:19FromDiscord<Phil> Tables are roughly similar to python dictionaries
10:58:33FromDiscord<Phil> They have some limitations that python dictionaries don't have by virtue of being statically typed
10:58:37FromDiscord<gyatsoyt> Phl
10:59:46FromDiscord<Phil> I don't think that will fully resolve your problem though because chess.PAWN is still a pyobject.↵I honestly have no clue what is in that value, if you can `to(int)` or `to(string)` it and what it will pump out in each scenario
10:59:58FromDiscord<Phil> And I don't want to set up a virtual environment to find out
11:04:34FromDiscord<gyatsoyt> The errors are annoying me now ngl
11:05:48FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4KeW
11:06:27FromDiscord<Phil> Note: Chances are you'll get a runtime error for either of those
11:11:01FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KeX
11:13:28FromDiscord<Phil> The second one likely means you're only getting ints out of there.↵Could you run the echo command for me please though?
11:13:39FromDiscord<Phil> I want to see the exact value this spits out
11:14:27FromDiscord<Phil> If I'm right it should return "1"
11:14:43FromDiscord<gyatsoyt> echo doesn't show anything
11:14:48FromDiscord<gyatsoyt> It directly shows this error
11:15:19FromDiscord<Phil> ... Fine I look into how to set up a damn virtual env
11:15:54FromDiscord<gyatsoyt> Sorry for the inconveniences
11:16:11FromDiscord<gyatsoyt> If you want I can give the whole evaluate.nim file
11:17:30FromDiscord<Phil> Just confirm to me that this is the lib https://python-chess.readthedocs.io/en/latest/core.html
11:18:30FromDiscord<Phil> And hand me the pyimport statement
11:18:47FromDiscord<gyatsoyt> In reply to @isofruit "Just confirm to me": Yes it is
11:19:10FromDiscord<gyatsoyt> Here you go
11:19:12FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KeZ
11:20:36FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Kf1
11:20:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Kf2
11:21:34FromDiscord<gyatsoyt> Yes
11:22:32FromDiscord<Phil> Trying to access a table with string keys with an int is not in the cards.↵I'm not seeing how you'd get the string value from the python lib as apparently not even the `str` function returns `"PAWN"`
11:22:51FromDiscord<gyatsoyt> So can I do
11:24:06FromDiscord<gyatsoyt> ?
11:24:07FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4Kf4
11:24:17FromDiscord<gyatsoyt> Now I am not using strings at all
11:25:26FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4Kf5
11:25:35FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Kf6
11:25:41FromDiscord<Phil> Well, need to adjust pieceVAlue
11:26:25FromDiscord<odexine> You don’t need the table anymore
11:26:34FromDiscord<odexine> Remove the table part and use [] instead of {}
11:26:45FromDiscord<odexine> Then replace the strings with the enum values
11:26:49FromDiscord<Phil> Actually fair, I forget that for enums basically always
11:27:42FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Kf8
11:27:56FromDiscord<Phil> Note that a fair bit of magic happens in `chess.PAWN.to(Piece)` in one go
11:28:34FromDiscord<Phil> It takes chess.PAWN (PyObject), converts it to int (int, value 1) and then for the compiler converts it to the enum-value whose implicit value (based on the order of the enum) is 1, which is Pawn
11:29:02FromDiscord<Phil> (edit) "It takes chess.PAWN (PyObject), converts it to int (int, value 1) and then for the compiler converts it to the enum-value whose implicit ... value" added "associated int"
11:30:21FromDiscord<Phil> Actually this makes me wonder why implicit int-values associated with enums start at 1 and not at 0
11:30:54FromDiscord<0ffh> sent a code paste, see https://play.nim-lang.org/#ix=4Kfa
11:31:00FromDiscord<odexine> In reply to @isofruit "Actually this makes me": They do?
11:31:35FromDiscord<Phil> Oh woops, they don't
11:31:38FromDiscord<Phil> I just didn't read the terminal output correctly
11:33:13FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Kfb
11:34:27FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4Kfb" => "https://play.nim-lang.org/#ix=4Kfc"
11:34:44FromDiscord<Phil> The python... enum? Something starts at 1, in nim they start at 0.↵You can adjust that as I have above
11:35:03FromDiscord<Phil> (edit) "above" => "above.↵The previous version I gave you returned `Rook` for `chess.PAWN`"
11:47:48FromDiscord<0ffh> Okay, explicitly hinting the type for concat solved it.
11:50:04FromDiscord<0ffh> At least the error message is gone.
11:50:18FromDiscord<Chronos [She/Her]> Hey @treeform do you know what to do about the test on MySQL failing specifically? The tests I added related to `dumpHook` instead of `$` would fail on all of the supported dbs before
11:50:56FromDiscord<Chronos [She/Her]> Should I just exclude MySQL from the tests? It feels a bit bad to do that but I don't know how to even go about fixing that
11:51:53FromDiscord<gyatsoyt> Its so hard to use python and nim at the same time 😞
11:52:07FromDiscord<gyatsoyt> There is no specified Library like python-chess
11:52:17FromDiscord<gyatsoyt> (edit) "There is no specified Library like python-chess ... " added "in nim"
11:52:27FromDiscord<gyatsoyt> But python is very slow for the development I want to do
11:52:36FromDiscord<gyatsoyt> And merging both just doesn't work out
11:52:48FromDiscord<gyatsoyt> Any other way I can do this
11:53:04FromDiscord<gyatsoyt> And please don't say to write whole python chess library into nim
11:53:29FromDiscord<gyatsoyt> I cannot do it by myself because a Library with 150+ contributors and a dev team
11:53:42FromDiscord<gyatsoyt> Cannot be easily made
11:53:58FromDiscord<Phil> I mean for the most part it's a lot of typing because essentially it's writing first a "glue" layer so you can easily call the python procs from nim without needing to think about PyObject all the time
11:54:24FromDiscord<gyatsoyt> Elaborate?
11:55:17FromDiscord<gyatsoyt> I heard about py2nim is it a real thing? Like does it really change python code into nim or python projects into nim
11:57:23FromDiscord<Phil> Basically you make a "bindings" module similar to what one does when wrapping C-code.↵You basically write e.g. a `move` proc that accepts nim types, converts them to the necessary PyObject types and calls the python `move` function from there.↵And then in your actual code you only work with those "wrapper" procs and types
11:59:46arkanoidwhy https://play.nim-lang.org/#ix=4Kfh prints "foo.bar: foo.bar = 42" instead of "foo.bar = 42" ?
11:59:54FromDiscord<Phil> I haven't used py2nim so I can't say anythinga bout it
12:03:44FromDiscord<Phil> In reply to @arkanoid "why https://play.nim-lang.org/#ix=4Kfh prints "foo.": I mean, depends on the dumpToString implementation:↵To me it looks like it just follows the pattern of `<statement that is being dumped> : <statement with variables swapped out for values> = <value of statement >`
12:04:00FromDiscord<Phil> (edit) "values>" => "values / expanded>"
12:04:51FromDiscord<Phil> Which makes sense since foo.bar "expands" to foo.bar I guess, there are no variables to replace, the value of that is 42 in the end
12:08:25arkanoidmmm, ok
12:15:16FromDiscord<Chronos [She/Her]> In reply to @gyatsoyt "And please don't say": That's basically the only thing you can do, you're probably better off writing it in Python otherwise imo
12:23:03FromDiscord<Phil> In reply to @gyatsoyt "Its so hard to": Note, if you're fine with implicit conversion you can reduce the typing with converters
12:23:15FromDiscord<Phil> Note that that will make some things harder to debug because it'll not be obvious what was when called
12:24:13FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Kfq
12:26:02FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4Kfq" => "https://play.nim-lang.org/#ix=4Kfr"
12:56:06FromDiscord<gyatsoyt> Is anyone interested in developing chess engine in nim 😞
12:57:56FromDiscord<Chronos [She/Her]> Not really aha
12:58:36FromDiscord<gyatsoyt> In reply to @chronos.vitaqua "Not really aha": As expected
13:00:21FromDiscord<gyatsoyt> If only nim had libraries like python has
13:00:31FromDiscord<gyatsoyt> I would have completed the engine till now
13:00:46FromDiscord<gyatsoyt> Atleast a working engine
13:06:04NimEventerNew thread by icedquinn: Stack-walking variables and Dependency Injection, see https://forum.nim-lang.org/t/10577
13:10:05FromDiscord<hotdog6666> In reply to @gyatsoyt "Is anyone interested in": https://www.chessprogramming.org/Nalwald
13:16:53FromDiscord<gyatsoyt> Well
13:16:57FromDiscord<gyatsoyt> I have no words
13:17:11FromDiscord<gyatsoyt> I have to do it myself
13:17:43FromDiscord<Phil> On the one hand yeah, on the other the python community is like 3 or 4 orders of magnitude larger than nim's
13:18:52FromDiscord<Chronos [She/Her]> Hm, if you could find a C library you could always make a binding to that?
13:19:41FromDiscord<Phil> Would even be a ton faster since no python code were involved.↵It does however mean dealing with C and learning about C for a decent part
13:31:15FromDiscord<Chronos [She/Her]> Yeah
13:44:07FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4KfH
13:44:34NimEventerNew post on r/nim by itsmekalisyn: For all the Nim devs here, What's a "killer feature" for you in nim?, see https://reddit.com/r/nim/comments/17j3833/for_all_the_nim_devs_here_whats_a_killer_feature/
13:46:43FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4KfI
13:50:14FromDiscord<Phil> In reply to @chronos.vitaqua "Why a tuple?": Context is owlkettle. ↵It's easier to assign that way
13:50:33FromDiscord<Chronos [She/Her]> Hm fair
13:52:09FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4KfJ
13:52:26FromDiscord<Phil> Particularly since you likely do not give a fuck about the type that I use under the hood
13:52:41FromDiscord<Phil> (edit) "Particularly since you ... likely(as" added "(as a lib user)" | "(as a lib user)likely do not give a fuck about the type that I ... use" added "(as the person providing the widget)"
14:00:28FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KfM
14:05:04FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4KfQ
14:05:22FromDiscord<Chronos [She/Her]> Rn I'm wondering if using pubkeys as IDs for servers is a smart thing to do hm...
14:05:44FromDiscord<Phil> Time to aaaaaaaask jtv
14:05:56FromDiscord<Phil> or mratsim
14:06:23FromDiscord<Phil> What you're trying to do seems to me like it's in their domain, with the entire "should not be easily spoofable"
14:06:43FromDiscord<Chronos [She/Her]> This is what I have for the auth flow https://media.discordapp.net/attachments/371759389889003532/1168189172587180042/Initial_Authentication.png?ex=6550dbf2&is=653e66f2&hm=964520e9cf606eed0fc4719bce2c0d62f782ebe941e3e9f96ef981cdd13b4f30&
14:06:52FromDiscord<Chronos [She/Her]> In reply to @isofruit "Time to aaaaaaaask jtv": Idk how to ping them lol
14:07:10FromDiscord<Phil> insert blinking person gif
14:07:18FromDiscord<Phil> Why would it be different for them than for any other user?
14:07:23FromDiscord<Chronos [She/Her]> Idk what platform they use tho?
14:07:29FromDiscord<Phil> both use discord
14:07:34FromDiscord<Chronos [She/Her]> Oh then easy
14:07:56FromDiscord<Chronos [She/Her]> Ah but who wouldn't mind being bothered-
14:08:53FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4KfR
14:34:09FromDiscord<odexine> In reply to @chronos.vitaqua "This is what I": why?
14:34:34FromDiscord<odexine> are you using HTTPS? if not why? if so then there isnt much reason to do that no?
14:48:07FromDiscord<Chronos [She/Her]> In reply to @odexine "are you using HTTPS?": Need a way to ban entire instances of users
14:48:44FromDiscord<odexine> i fail to see how that system solves your problem
14:49:12FromDiscord<gyatsoyt> In reply to @isofruit "I mean, what's the": I am using the old approach
14:49:28FromDiscord<Chronos [She/Her]> In reply to @odexine "i fail to see": It means even if the domain or IP they're using changes, they can still keep an instance banned
14:49:50FromDiscord<gyatsoyt> In reply to @gyatsoyt "I am using the": But with the enum stuff
14:49:55FromDiscord<odexine> yes but what difference does it make from using HTTPS and just sending IDs
14:50:02FromDiscord<Chronos [She/Her]> Though it doesn't really help if they change their pub and private key, I can keep it the same
14:50:02FromDiscord<Phil> Always show code.
14:50:49FromDiscord<Chronos [She/Her]> In reply to @odexine "yes but what difference": Anyone with a Serverspace can grab an ID and then send it at any time
14:51:02FromDiscord<Chronos [She/Her]> While pretendon to be a Userspace
14:51:25FromDiscord<odexine> with HTTPS?
14:51:39FromDiscord<odexine> well sure that makes sense, so just add a nonce
14:54:01FromDiscord<Chronos [She/Her]> Nonce?
14:57:20FromDiscord<odexine> unique value sent on request
14:57:29FromDiscord<odexine> if it is reused it is invalid
14:58:00FromDiscord<odexine> i'm not too sure how you've structured your system
15:08:36*disso-peach joined #nim
15:09:57*disso-peach quit (Client Quit)
15:27:50FromDiscord<Chronos [She/Her]> In reply to @odexine "if it is reused": I don't get how that helps with unique identification
15:28:30FromDiscord<Chronos [She/Her]> In reply to @odexine "i'm not too": Userspace = Auth server↵Serverspace = Chat server ig?↵↵Serverspaces can have users from multiple Userspaces join
15:31:54FromDiscord<odexine> i see what you mean then
15:32:05FromDiscord<odexine> how do you verify that the key pairs are authentic?
15:36:09FromDiscord<.aingel.> In reply to @chronos.vitaqua "It means even if": You want the user to be able to keep an instance banned?
15:36:17FromDiscord<.aingel.> Or the server to keep a user banned
15:37:01FromDiscord<treeform> In reply to @chronos.vitaqua "Hey <@107140179025735680> do you": Try to do less in one PR and make sure it works. I don't like the exclude MYSQL define
15:38:10FromDiscord<Chronos [She/Her]> In reply to @.aingel. "Or the server to": Serverspace to keep a Userspace banned
15:38:28FromDiscord<Chronos [She/Her]> In reply to @treeform "Try to do less": That's fine, I can also rollback the previous changes too so it's not all bunched together
15:39:40FromDiscord<Chronos [She/Her]> But this is a major issue in the library too tbh, because before it was objectively wrong behaviour since `$` is very different from how it's stored in the db
15:40:35FromDiscord<treeform> Yeah, lets tackle one problem at a time
15:40:36FromDiscord<odexine> In reply to @chronos.vitaqua "Userspace = Auth server": idk, but if you ban a single "userspace", what prevents that server from creating a different key pair and registering itself again as a different "userspace" then registering its users into the "serverspace" again
15:41:03FromDiscord<Chronos [She/Her]> In reply to @treeform "Yeah, lets tackle one": Alright 👍
15:41:13FromDiscord<Chronos [She/Her]> In reply to @odexine "idk, but if you": Will also have to allow IP bans too
15:41:22FromDiscord<Chronos [She/Her]> Not sure how else to go about this tbh :p
15:41:37FromDiscord<odexine> so then we're back to square one? and IP bans are kinda getting less useful aint they, due to NAT?
15:41:59FromDiscord<odexine> and of course VPNs
15:49:11FromDiscord<Chronos [She/Her]> Yeah
15:50:52FromDiscord<Chronos [She/Her]> In reply to @treeform "Yeah, lets tackle one": Okay, you should be able to merge now, CI on my fork is running and succeeds↵Though, I wish the tests for PostgreSQL, SQLite and MySQL were seperated into different tasks, would show what the tests are failing for, specifically
15:51:07FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4Kgm
15:51:11FromDiscord<Chronos [She/Her]> Wait crap forgot something
15:51:28*derpydoo joined #nim
15:51:52FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4Kgn
15:51:55FromDiscord<Chronos [She/Her]> Sorry... 😓 it should be done now
15:52:25FromDiscord<gyatsoyt> In reply to @odexine "i think you keep": Yes the problem is which nim type
15:52:41FromDiscord<odexine> if statements take `bool`s
15:52:46FromDiscord<odexine> `or` also takes `bool`s
15:53:17FromDiscord<odexine> `isNone` sounds like a function that would return a `bool`
15:53:23FromDiscord<gyatsoyt> I tried using `.to(bool) but it doesn't fix the error
15:53:30FromDiscord<gyatsoyt> (edit) "`.to(bool)" => "`.to(bool)`"
15:53:35FromDiscord<odexine> did the error change or is it the same
15:53:42FromDiscord<gyatsoyt> In reply to @odexine "did the error change": It changed
15:53:54FromDiscord<odexine> then it's likely a different issue?
15:54:07FromDiscord<odexine> well whats the new error after adding .to(bool)
15:55:56FromDiscord<gyatsoyt> In reply to @odexine "well whats the new": This https://media.discordapp.net/attachments/371759389889003532/1168216655248232448/Screenshot_2023_1029_212531.png?ex=6550f58b&is=653e808b&hm=e16a6b04c34d41d679b6a548ccb7a92da30c077aa06750d0193510f96daa6354&
15:56:19FromDiscord<gyatsoyt> I don't think it will be bool
15:56:39FromDiscord<odexine> no
15:56:41FromDiscord<␀ Array> is there a nim matrix sdk or binding?↵i want to create bots using nim
15:56:44FromDiscord<takemichihanagaki3129> Is there a way to convert a procedure to a `NimNode`?↵↵I'm trying to use `extractDocCommentsAndRunnables` to get the documentation from a generic procedure.
15:56:47FromDiscord<odexine> i know what your issue
15:56:49FromDiscord<odexine> (edit) "i know what your issue ... " added "is"
15:57:05FromDiscord<odexine> or rather an informed guess ig
15:57:05FromDiscord<odexine> you named your variable `to`
15:57:14FromDiscord<gyatsoyt> In reply to @odexine "you named your variable": Yes
15:57:16FromDiscord<odexine> probably not a good idea since there's the `to` function as well
15:57:30FromDiscord<odexine> name clash i'd assume? doesnt make too much sense to me though
15:57:36FromDiscord<odexine> what code did you write
15:58:15FromDiscord<gyatsoyt> That
15:58:17FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4Kgp
15:58:44FromDiscord<odexine> no thats not what i meant
15:59:03FromDiscord<gyatsoyt> So what do you mean?
15:59:15FromDiscord<odexine> remove the .to(bool) you wrote, and move it `to.isNone().to(bool)`
15:59:24FromDiscord<gyatsoyt> Ohk
16:00:13FromDiscord<gyatsoyt> Yah fixed that error
16:07:57FromDiscord<takemichihanagaki3129> sent a code paste, see https://play.nim-lang.org/#ix=4Kgt
16:08:12FromDiscord<takemichihanagaki3129> (edit) "https://play.nim-lang.org/#ix=4Kgt" => "https://play.nim-lang.org/#ix=4Kgu"
16:22:49FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4Kgz
16:24:05*derpydoo quit (Ping timeout: 240 seconds)
16:26:13FromDiscord<treeform> In reply to @chronos.vitaqua "Okay, you should be": what about nested it? https://github.com/treeform/debby/pull/5/commits/2ddd5c88ddb45f16412d92b06e61eabad74ddd13
16:27:17FromDiscord<Chronos [She/Her]> Ah, I haven't checked for that, I'll add that when I get back on my PC
16:27:55FromDiscord<Chronos [She/Her]> Ah you did it
16:29:20FromDiscord<treeform> Do you think that completes the calling stuff?
16:29:37FromDiscord<treeform> Then lets move onto the string $ things
16:32:45FromDiscord<Chronos [She/Her]> It should, I've also responded to the comments on the code
16:34:26FromDiscord<gyatsoyt> sent a code paste, see https://paste.rs/L9HQy
16:34:32FromDiscord<odexine> sent a code paste, see https://paste.rs/HWRFW
16:34:38FromDiscord<gyatsoyt> I am already changing it to int still it gives error
16:34:42FromDiscord<odexine> you are not
16:34:50FromDiscord<gyatsoyt> Ummm
16:34:52FromDiscord<odexine> do you remember how to change a pyobject into another type
16:34:57FromDiscord<odexine> with the
16:34:58FromDiscord<gyatsoyt> .to?
16:35:00FromDiscord<odexine> yes\
16:35:09FromDiscord<gyatsoyt> So you mean
16:35:17FromDiscord<odexine> to.piece_type.to(int)
16:37:16FromDiscord<gyatsoyt> In reply to @odexine "to.piece_type.to(int)": I get this after the change https://media.discordapp.net/attachments/371759389889003532/1168227057050857472/Screenshot_2023_1029_220653.png?ex=6550ff3b&is=653e8a3b&hm=0ffd6139536b1886983dc360720f7597537893cc18422934151659ffa86d2a22&
16:38:20FromDiscord<odexine> okay now i have no idea what's wrong
16:39:31FromDiscord<gyatsoyt> Ehm
16:45:22FromDiscord<Chronos [She/Her]> In reply to @treeform "Do you think that": It should complete it all yeah
16:50:40FromDiscord<treeform> In reply to @chronos.vitaqua "It *should* complete it": Ok I see the name issue now, thank you! I added more tests for that: https://github.com/treeform/debby/pull/5/files
16:51:01FromDiscord<that_dude.> In reply to @gyatsoyt "Ehm": I do suggest renaming the `to` var to something else. Overload symbols like that are way more likely to cause issues that are harder to decipher. A common convention is to use src and dest instead
16:51:01FromDiscord<treeform> I am using app.database to test that I don't reply on global db name
16:52:44FromDiscord<Chronos [She/Her]> In reply to @treeform "Then lets move onto": As for this, I'm not too sure how to go about it tbh... Tbh
16:52:52FromDiscord<Chronos [She/Her]> In reply to @treeform "Ok I see the": Epic!
16:53:56FromDiscord<treeform> The $ is tricky because for binary: you found a mysql issue, sqlite takes a pointer, pg wants it encoded with base16...
16:54:09FromDiscord<treeform> Every db wants some thing different
16:54:52FromDiscord<treeform> i'll try making it a non string thing and waiting as far as possible until the prepare statements, which are per db, and maybe it sort it out then?
16:56:51FromDiscord<gyatsoyt> In reply to @that_dude. "I do suggest renaming": I changed it to `too`
16:56:55FromDiscord<gyatsoyt> And I get this
16:57:48FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=4KgD
17:00:01FromDiscord<that_dude.> Is `too` a pyobject?
17:01:00FromDiscord<that_dude.> Because I don't think there is a `piece_type` proc defined for it that returns an int
17:02:39FromDiscord<that_dude.> But if it's supposed to be a pyobject, don't you need to convert the returned pyobject to an int vio `to` (I think)?
17:03:28FromDiscord<that_dude.> `too.piece_type.to(int) is int`
17:04:19FromDiscord<that_dude.> `to(too.piece_type, int) is int`
17:04:45FromDiscord<Chronos [She/Her]> In reply to @treeform "The $ is tricky": Aah... During my own testing though, PostgreSQL and SQLite both passed the tests even with binary data, so I'd imagine it's just a MySQL issue?
17:05:05FromDiscord<Chronos [She/Her]> In reply to @treeform "i'll try making it": That sounds good to me 👍
17:06:28FromDiscord<Chronos [She/Her]> Also, any remaining changes you want me to make in my PR?↵And tbh, I think that you should replace `$` with `sqlDump` anyway for now, because otherwise custom dump hooks are ignored during comparison which I had a test for too
17:07:25FromDiscord<treeform> yeah i'll do that next
17:07:31FromDiscord<treeform> trying to clean up the warnings in another PR
17:09:10FromDiscord<Chronos [She/Her]> Alright 👍
17:09:55FromDiscord<Chronos [She/Her]> If I can be of any help, please let me know!
17:10:51FromDiscord<treeform> Your PR is very helpful
17:10:53FromDiscord<treeform> thank you
17:12:34FromDiscord<Chronos [She/Her]> Unrelated question, but does anyone know if it's possible to override a function defined in another library?
17:12:48FromDiscord<Chronos [She/Her]> (Not overload, specifically overriding it)
17:14:31Amun-RapatchFile
17:15:34FromDiscord<Chronos [She/Her]> Oh that's useful! But that seems to be for the whole file sadly, oh well it works well enough
17:15:40Amun-RaI had to patch cmdline to test my getopt parser:
17:15:42Amun-RapatchFile("stdlib", "cmdline", "patches/cmdline")
17:15:57Amun-Rayes
17:16:05Amun-Rait's either all or nothing
17:16:15FromDiscord<Chronos [She/Her]> In reply to @Amun-Ra "patchFile("stdlib", "cmdline", "patches/cmdline")": Oh? What did you have to patch it for?
17:16:20FromDiscord<treeform> In reply to @chronos.vitaqua "If I can be": Thoughts on warning removal: https://github.com/treeform/debby/pull/8/files
17:16:56Amun-RaChronos: yes, to inject my own cli args for testing
17:17:17FromDiscord<.lithiumfrost> Quick question: What's recommended for connecting to mssql these days from nim?
17:17:41FromDiscord<Chronos [She/Her]> In reply to @treeform "Thoughts on warning removal:": It looks good to me 👍
17:17:57FromDiscord<.lithiumfrost> There was an coffeepots/odbc library, but that hasn't seen a commit in a few years
17:20:04FromDiscord<treeform> In reply to @.lithiumfrost "There was an coffeepots/odbc": I have written a wrapper for mysql, sqlite and pg... I say just use the C dll api directly if you want mssql?
17:20:05FromDiscord<nasuray> In reply to @chronos.vitaqua "Unrelated question, but does": You could just not import the function
17:21:04FromDiscord<.lithiumfrost> In reply to @treeform "I have written a": Ok, thanks
17:21:26FromDiscord<Chronos [She/Her]> Oh Treeform, do you think it'd be possible to separate tests into their own tasks or jobs is possible? Not sure how it works exactly but, I'm suggesting this so it's clearer at a glance about what test is failing specifically
17:21:55FromDiscord<Chronos [She/Her]> In reply to @nasuray "You could just not": It's not for the user-facing code, it's for code within another library, I want to override that so the behaviour there is different
17:23:51NimEventerNew thread by GyatsoYT: Error: type mismatch: got 'PyObject' for 'getAttr(to,"piece_type")' but expected 'int', see https://forum.nim-lang.org/t/10579
17:33:40FromDiscord<nasuray> In reply to @chronos.vitaqua "It's not for the": Ah I see. Could always maintain a soft-fork of the library with your patch
17:34:32FromDiscord<Chronos [She/Her]> True
17:57:40FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=4Kh0
18:03:36FromDiscord<Chronos [She/Her]> In reply to @treeform "Wow mysql is very": Ah, so that was the issue?
18:03:50FromDiscord<Chronos [She/Her]> I'm guessing you need to special case it for other types too? Like binary types?
18:07:10*xet7 joined #nim
18:26:16FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Kh5
18:36:38FromDiscord<treeform> I basically need to know what the type is before knowing what the type is?
18:36:50FromDiscord<treeform> I tried a complex dump with type, but that seems to not work too.
18:37:52FromDiscord<treeform> This PR works for everything https://github.com/treeform/debby/pull/9/files but mysql requires a stupid hack to check if input looks json enough. I don't like it!
18:45:30FromDiscord<Chronos [She/Her]> In reply to @treeform "This PR works for": Does it work for binary types though?
19:05:09FromDiscord<treeform> it works for complex types
19:05:27FromDiscord<treeform> it appears to work for binary types too as I have test for that and it passes
19:05:36FromDiscord<Chronos [She/Her]> Hm alright then, that's great!
19:05:48FromDiscord<Chronos [She/Her]> I wonder why MySQL does things differently yhough
19:05:55FromDiscord<Chronos [She/Her]> (edit) "yhough" => "though"
19:05:56FromDiscord<treeform> Because its mysql
19:06:02FromDiscord<Chronos [She/Her]> Seems like a weird design choice
19:06:02FromDiscord<treeform> all of them do some thing differently
19:06:08FromDiscord<Chronos [She/Her]> Fair
19:06:13FromDiscord<treeform> would not be the first time 🙂
19:06:35FromDiscord<treeform> I think I solved the problem please review: https://github.com/treeform/debby/pull/9/files
19:06:38FromDiscord<Chronos [She/Her]> Fair haha, I don't know much when it comes to the dbs themselves really, besides a basic understanding
19:07:12FromDiscord<treeform> I create special `Argument` that carries around its type, then do `args: varargs[Argument, toArgument]`
19:07:29FromDiscord<Chronos [She/Her]> In reply to @treeform "I think I solved": I've compiled my code agsinst the dev branch on your repo and it seems to work great for me, so I'd think it's doing fine
19:08:08FromDiscord<Chronos [She/Her]> Looks fine to me!
19:11:44FromDiscord<treeform> I am going to add your a complex test as well: https://github.com/treeform/debby/pull/9
19:12:32FromDiscord<Chronos [She/Her]> Epic!
19:13:18FromDiscord<Chronos [She/Her]> It passes the tests, very nice
19:14:24FromDiscord<treeform> Ok, done for now. Happy bug hunting!
19:14:48FromDiscord<treeform> I started working on a sort of lightweight admin
19:15:05FromDiscord<treeform> Kind of like django admin
19:15:11FromDiscord<Chronos [She/Her]> Haha, I'll report them as I encounter them, though I won't be doing much really
19:15:23FromDiscord<treeform> Maybe check it out?
19:15:25FromDiscord<Chronos [She/Her]> In reply to @treeform "Kind of like django": I've never used Django tbh
19:15:47FromDiscord<treeform> My hope is that you just use the same objects to create an admin.
19:15:58FromDiscord<treeform> A little user interface to see whats in the db
19:15:58FromDiscord<Chronos [She/Her]> In reply to @treeform "Maybe check it out?": I've checked out the code and it looks good to me and I can't see any obvious issues
19:16:03FromDiscord<Chronos [She/Her]> Aah
19:16:52FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/1168267221705957396/image.png?ex=655124a3&is=653eafa3&hm=1ccb22e4ea510543f03c06b797e1b50d54b86842b0d78a519ec1855a078e84f1&
19:17:42FromDiscord<Chronos [She/Her]> Oh that's good! I don't think that'd work with inputting binary data though?
19:17:49FromDiscord<treeform> nope
19:17:54FromDiscord<treeform> but most data isn't binary
19:17:55FromDiscord<Chronos [She/Her]> Yeah thought so aha
19:18:09FromDiscord<Chronos [She/Her]> In reply to @treeform "but most data isn't": Fair, looks good to me!
19:18:25FromDiscord<Chronos [She/Her]> May be useful during testing for me
19:20:54*neceve joined #nim
19:25:16Amun-Ratreeform: thanks to your debby project I found out about github.io, thanks! :)
19:26:02Amun-Raand I was looking for a place to store ma APIs
19:42:51*krux02 joined #nim
19:54:11FromDiscord<treeform> In reply to @Amun-Ra "<@107140179025735680>: thanks to your": Cool I am glad you found it useful!
19:59:33Amun-Ra;>
19:59:46FromDiscord<Chronos [She/Her]> In reply to @Amun-Ra "and I was looking": Do you mean docs? :p
20:00:20*beholders_eye joined #nim
20:05:24Amun-Rayes
20:11:21FromDiscord<Chronos [She/Her]> Ah
20:11:52FromDiscord<Chronos [She/Her]> I have a slightly modified version of Treeform's GitHub Action for docs if you want it :p
20:12:56Amun-RaI have nimble task for that :)
20:13:18FromDiscord<Chronos [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/NULID/blob/main/.github/workflows/docs.yml
20:13:21FromDiscord<Chronos [She/Her]> Oh nice then!
20:14:22Amun-RaChronos: https://pastebin.com/0xVzKj2r
20:15:05FromDiscord<Chronos [She/Her]> Ah, my Action also includes the tag name so that the docs always line up with the source of the release
20:15:35FromDiscord<Chronos [She/Her]> That's one thing that frustrated me with that Action, as well as the fact the repo name has to be the package name exactly :p
20:16:08Amun-RaI use github only as a mirror
20:28:43FromDiscord<Chronos [She/Her]> `/home/chronos/Projects/Nim/NULID/src/nulid/private/constants.nim(11, 26) Error: invalid pragma: hint[UnusedImport]: off`↵This is a pain oof
20:28:56FromDiscord<Chronos [She/Her]> In reply to @Amun-Ra "I use github only": Oh? What do you host on, then↵?
20:34:40FromDiscord<Chronos [She/Her]> Ah, it's a warning not a hint
20:34:49Amun-RaChronos: https://about.gitea.com/ on one of my vpses
20:36:04FromDiscord<Chronos [She/Her]> Oh Gitea is cool! Iirc people are switching to Forgejo tho since it went for profit
20:36:35Amun-Raforgejo? that's the name I've never heard of
20:36:50Amun-Rathanks for the info
20:37:11FromDiscord<Chronos [She/Her]> Np!
20:37:44FromDiscord<Chronos [She/Her]> https://forgejo.org/ this is the site btw
20:38:10Amun-RaI'm going to try that out
20:41:09FromDiscord<Chronos [She/Her]> Epic!
20:43:54FromDiscord<ElegantBeouf> @takemichihanagaki3129 https://play.nim-lang.org/#ix=4KhA guess the matrix bridge dieded 😄
20:45:38FromDiscord<takemichihanagaki3129> In reply to @elegantbeef "<@890300313729400832> https://play.nim-lang.org/#ix": You're the best! 🙂
20:46:16FromDiscord<nnsee> In reply to @Amun-Ra "Chronos: https://about.gitea.com/ on one": are you me?
20:46:46FromDiscord<nnsee> have https://git.dog running for myself and just use GitHub as a mirror
20:47:04Amun-Ra;)
20:47:37FromDiscord<nnsee> Amun-Ras
20:47:56FromDiscord<nnsee> actually, you probably won't get that joke because IRC shows my username, not my nick
20:48:06FromDiscord<nnsee> (but it's Ras)
20:48:57FromDiscord<takemichihanagaki3129> In reply to @elegantbeef "<@890300313729400832> https://play.nim-lang.org/#ix": This's very clear now to me!
20:50:14Amun-Rannsee: right :P
20:53:50FromDiscord<Chronos [She/Her]> Wish I could shut the `UnusedImport` warning off in my project without affecting every project using it oof
20:56:50Amun-Raadd --hint[UnusedImport]:off in config.nims, it shouldn't populate outside the projects
20:56:55Amun-Raproject*
21:05:05Amun-RaChronos: try this: https://play.nim-lang.org/#ix=4KhJ
21:13:49*neceve quit (Ping timeout: 255 seconds)
21:25:37FromDiscord<Chronos [She/Her]> Oh? Is that only for a specific file then?
21:29:43Amun-Rayes
21:30:29FromDiscord<Chronos [She/Her]> Epic!
21:59:05FromDiscord<Chronos [She/Her]> New release of https://github.com/Yu-Vitaqua-fer-Chronos/NULID :D
21:59:27FromDiscord<Chronos [She/Her]> It, in theory, should support the Nim VM, but I'm not sure how to test that rn
22:00:01FromDiscord<Chronos [She/Her]> It could also support the JS backend, but the issue with that is the fact that `nint128` doesn't support that currently :p
22:00:26FromDiscord<Chronos [She/Her]> Yes I am procrastinating a lot lol
22:02:41Amun-Rayou could wrap BigInt for JS target
22:05:56FromDiscord<Chronos [She/Her]> Oh? I could tbf
22:06:19FromDiscord<Chronos [She/Her]> https://nim-lang.org/docs/jsbigints.html Oh this exists
22:07:46Amun-Ranim 2 uses bigint for integer types under the hood
22:08:12Amun-Rajs integer type is "special"
22:11:13FromDiscord<Chronos [She/Her]> Aaah okay
22:11:30FromDiscord<Chronos [She/Her]> Good to know! I'll implement it some day but not today aha
22:12:24Amun-Ra:)
22:16:19FromDiscord<kerplunkx> Is there some extra steps you need to do when importing glm? I get: `Error: cannot open file: glm`
22:16:35*krux02 quit (Ping timeout: 240 seconds)
22:17:02Amun-Ranimble installglm?
22:17:07Amun-Ranimble install glm
22:17:52FromDiscord<kerplunkx> Nope, already tried that
22:18:21FromDiscord<Phil> JS integer type is basically float64
22:18:30FromDiscord<Phil> Because there are no js ints
22:18:32FromDiscord<kerplunkx> Just trying to run a nimgl example
22:21:18Amun-Rait should work ootb
22:23:07FromDiscord<Chronos [She/Her]> In reply to @isofruit "Because there are no": I mean fair
22:23:37FromDiscord<Phil> In reply to @chronos.vitaqua "I mean fair": You missspelled "terrible idea"
22:23:40FromDiscord<Phil> (edit) "missspelled" => "misspelled"
22:24:47FromDiscord<Chronos [She/Her]> 🤷‍♀️
22:27:06*beholders_eye quit (Quit: WeeChat 3.6)
22:45:35FromDiscord<kerplunkx> In reply to @Amun-Ra "it should work ootb": I forgot to add the requirement to the nimble file 🤦‍♂️
22:45:39FromDiscord<kerplunkx> Thanks for the help
23:03:36FromDiscord<Chronos [She/Her]> https://play.nim-lang.org/#ix=4Kk8 this gives `/usercode/in.nim(1, 22) Error: illegal context for 'nimvm' magic`, isn't that a bit dumb? :p
23:04:15FromDiscord<Elegantbeef> no
23:04:22FromDiscord<Elegantbeef> Nimvm can only be used inside a `when nimvm` block
23:04:41FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-nimvm-statement
23:05:57FromDiscord<Chronos [She/Her]> But why? I don't understand that
23:06:19FromDiscord<Chronos [She/Her]> Since sometimes you want code that only runs on JS or the Nim VM (as rare as that is)
23:06:22FromDiscord<Elegantbeef> Cause it's for adding runtime and compiletime support for a proc
23:06:58FromDiscord<Chronos [She/Her]> Aaaah okay I get it now
23:07:01FromDiscord<Elegantbeef> `when nimvm` is when you are using a native backend but want different code to run in the VM
23:07:07FromDiscord<Chronos [She/Her]> Does `nimscript` function the same or?
23:07:22FromDiscord<Chronos [She/Her]> `define(nimscript)`
23:07:26FromDiscord<Elegantbeef> `defined(nimscript)` will work when the backend is nimscript
23:08:20FromDiscord<Chronos [She/Her]> Alright then, nice
23:09:07*derpydoo joined #nim
23:09:20FromDiscord<Elegantbeef> But if you are using native code and call your code at CT you will want the nimvm stuff
23:10:17FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/version-2-0/lib/pure/json.nim#L1269-L1276 an example how you might do what you want
23:33:37FromDiscord<Chronos [She/Her]> Ah thanks!