<< 20-05-2023 >>

00:00:11FromDiscord<Rika> make a method for each object and call that instead of using nn of TT?
00:02:06FromDiscord<System64 ~ Flandre Scarlet> In reply to @Rika "make a method for": I have this problem https://media.discordapp.net/attachments/371759389889003532/1109269782726983700/message.txt
00:05:22FromDiscord<System64 ~ Flandre Scarlet> https://github.com/nimgl/imgui↵I use that if it can help
00:11:30FromDiscord<@theperfectcomputer-628303036da0> does anybody here know how to use microparsec?
00:11:38FromDiscord<@theperfectcomputer-628303036da0> https://github.com/schneiderfelipe/microparsec
00:14:09FromDiscord<@theperfectcomputer-628303036da0> Can you install packages in nim playground?
00:14:35FromDiscord<Elegantbeef> Nope
00:14:43FromDiscord<Elegantbeef> It has a preset list of 'important' packages
00:17:01FromDiscord<Elegantbeef> @Prestige\: so I discovered that Nim does have a sort of multiple inheritance, though it presently falls apart if you add more generic parameters
00:17:11FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4wdT
00:17:52FromDiscord<Elegantbeef> I've been using it for a sort of dependency injection in my GUI rewrite
00:17:52FromDiscord<@theperfectcomputer-628303036da0> Elegantbeef\: how come you're always online?
00:17:57FromDiscord<Elegantbeef> I have no life
00:17:57FromDiscord<@theperfectcomputer-628303036da0> Are you hUMan?
00:18:10FromDiscord<Elegantbeef> I have no life, so perhaps not
00:18:27FromDiscord<@theperfectcomputer-628303036da0> Well - I remember you being always online two years ago
00:18:41FromDiscord<@theperfectcomputer-628303036da0> and I came back in 2023 - you're still online
00:19:33FromDiscord<Elegantbeef> Yea I have not gained a life in that time
00:19:38FromDiscord<Elegantbeef> Thanks for calling me out!
00:19:53FromDiscord<@theperfectcomputer-628303036da0> Well - I didn't mean to call you out
00:19:57FromDiscord<@theperfectcomputer-628303036da0> I was just curious
00:20:05FromDiscord<Graveflo> To me, both of you have [BOT] next to your name so I find this convo sus
00:20:14FromDiscord<Elegantbeef> We're both on matrix
00:20:25FromDiscord<Graveflo> ye ik 😛
00:20:28FromDiscord<Elegantbeef> Well they're on gitter, which uses matrix
00:20:34FromDiscord<Elegantbeef> Hey they have computer in their name
00:20:44FromDiscord<@theperfectcomputer-628303036da0> I am the perfect computer
00:20:49FromDiscord<Elegantbeef> Doubtful
00:20:57FromDiscord<@theperfectcomputer-628303036da0> Oh?
00:20:59FromDiscord<huantian> In reply to @@theperfectcomputer-628303036da0 "Well - I didn't": don't worry I don't think it's possible to offend beef
00:21:01FromDiscord<Elegantbeef> The perfect computer is shutoff
00:21:08FromDiscord<@theperfectcomputer-628303036da0> https://theperfect.computer/
00:21:18FromDiscord<Elegantbeef> You cannot offend me with words, you can only offend me with horrendous code
00:21:24FromDiscord<@theperfectcomputer-628303036da0> oooh
00:22:35FromDiscord<@theperfectcomputer-628303036da0> Although I've since hopped of the Rust bandwagon
00:22:38FromDiscord<@theperfectcomputer-628303036da0> of -\> off
00:23:01FromDiscord<@theperfectcomputer-628303036da0> seL4 exists - also Rust foundation is cray cray
00:23:07FromDiscord<Elegantbeef> You really should just use matrix
00:23:13FromDiscord<Elegantbeef> It really is terrible on the bridge apparently
00:48:37FromDiscord<jmgomez> sent a code paste, see https://paste.rs/09sw1
00:51:43*derpydoo joined #nim
00:54:50FromDiscord<Elegantbeef> No clue about C++
01:04:21*krux02_ quit (Remote host closed the connection)
01:10:25FromDiscord<Prestige> @Elegantbeef#0000 woah that's awesome
01:10:59FromDiscord<Elegantbeef> Sadly like I said there are some compiler bugs around it
01:11:09FromDiscord<Elegantbeef> But i'm trying to fix them
01:11:21FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/issues/21864 for instance fails
01:18:24FromDiscord<Nlits (Ping on reply)> How would I go about wrapping a C lib in nim?
01:18:38FromDiscord<Nlits (Ping on reply)> The makefile produces a .a file, but idk what to do with it
01:19:03FromDiscord<Elegantbeef> That's a static library, you statically link it and use `importc` to define the procedures you want to use
01:19:44FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "That's a static library,": So how would i link it?
01:20:01FromDiscord<Elegantbeef> The same way you would with C with `passL` to pass to the linker
01:20:08FromDiscord<Nlits (Ping on reply)> and does anyone who wants to use the wrapper have to get the .a file?
01:20:19FromDiscord<Elegantbeef> Yes
01:20:49FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "The same way you": I don't use C. So like `nim c --passL:theClib.a main `
01:20:52FromDiscord<Nlits (Ping on reply)> (edit) "`" => "`?"
01:21:09FromDiscord<Elegantbeef> I said that so you'd look up how to statically link a file using C
01:21:53FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4we0
01:23:04FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "I said that so": oh, ok. I looked and up and it looks like i need to do this:↵`nim c --passL:libNameWithoutTheLibOrA main`
01:26:04FromDiscord<Nlits (Ping on reply)> Is it possible to make nim use a config.nims file inside a nimble package?
01:26:16FromDiscord<Nlits (Ping on reply)> Like, if the code imports the config file, use it
01:26:32FromDiscord<Elegantbeef> Nope `config.nims` is used regardless
01:28:33FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "Nope `config.nims` is used": ???↵So I stick it in my nimble pkg, and then even if someone is compiling something unrelated, they will have to use my package's config file?
01:28:47FromDiscord<Nlits (Ping on reply)> (edit) "unrelated," => "unrelated and has it installed,"
01:29:36FromDiscord<Elegantbeef> No
01:32:17FromDiscord<demotomohiro> In reply to @not logged in "How would I go": I wrote an article about how to use C static library from Nim:↵https://internet-of-tomohiro.netlify.app/nim/gccguide.en.html↵https://internet-of-tomohiro.netlify.app/nim/clibrary.en.html
01:33:36FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "No": idk what you mean then
01:34:20FromDiscord<demotomohiro> You can put passL in nim code: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-passl-pragma
01:36:26FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro "You can put passL": that is what i wanted, so the users don't have to worry about linking
01:37:04FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro "I wrote an article": I looked at one of those, and setup the static lib like you did. 1 problem, it compiled and ran even when the lib did not exist
01:37:54FromDiscord<enigma> sent a code paste, see https://play.nim-lang.org/#ix=4we1
01:38:12FromDiscord<enigma> I do not understand how to pinpoint what said service does/doesnt exist
01:38:24FromDiscord<enigma> sent a code paste, see https://play.nim-lang.org/#ix=4we2
01:38:36FromDiscord<enigma> version 1.6.12
01:38:38FromDiscord<Rika> Means DNS failed for the domain name
01:39:04FromDiscord<enigma> ah, perfect. will try an alternate URL. thank you.
01:39:10FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro "I wrote an article": Also, does the .h file come from the .a file or do I need both
01:39:14NimEventerNew question by still_dreaming_1: How to run (not igore) runnableExamples in nim, see https://stackoverflow.com/questions/76293220/how-to-run-not-igore-runnableexamples-in-nim
01:39:57FromDiscord<Rika> In reply to @not logged in "Also, does the .h": You need both to compile the source but neither once it’s compiled
01:40:09FromDiscord<Nlits (Ping on reply)> (edit) "both" => "both, in your thing it is linking to a .a file, but your code is using the .h file"
01:40:39FromDiscord<demotomohiro> In reply to @not logged in "Also, does the .h": .h file is usually distributed with c source code.
01:42:14FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro ".h file is usually": there are several .h files and idk which one to use
01:42:56FromDiscord<Rika> Usually the one with the same name
01:44:47FromDiscord<demotomohiro> In reply to @not logged in "there are several .h": Read the manual of the C library. Or run `make install` and see which .h file is installed.
01:45:42FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro "Read the manual of": I am 99% sure the makefile deleted itself after the build
01:47:14FromDiscord<demotomohiro> In reply to @not logged in "I am 99% sure": What kind of build system is it use?↵I have never saw makefile that delete itself.
01:58:04*rockcavera quit (Remote host closed the connection)
02:07:20FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4we8
02:16:51FromDiscord<demotomohiro> In reply to @not logged in "idk, here is the": It doesn't have install target.↵I cannot tell which .h you need only from it.
02:20:49FromDiscord<demotomohiro> .h files that declares types, constants or functions that you want to use in Nim are what you need.↵And .h files that are included from these files.
02:21:45*lucasta quit (Quit: Leaving)
02:30:00FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro "It doesn't have install": here is the git repo:↵https://github.com/hhatto/peg-rst↵rst_lib.h seems most lekly
03:33:15FromDiscord<Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4weh
03:50:31FromDiscord<Elegantbeef> Quit using generics for overloads
03:51:35FromDiscord<Graveflo> yea I assume that Option is the way to go here.. but I also assume that the compiler shouldn't die trying to do this. Also the whole options solution is functional but very ugly, but thats just my opinion
03:51:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4wej
03:52:16FromDiscord<Graveflo> oh right. overloads LOL i missed that somehow
03:53:08FromDiscord<Graveflo> Still though, the compiler should be able to compile that mess anyways right? Even if it's just a toy example
03:54:32FromDiscord<Elegantbeef> `int = nil` is just wrong
03:55:16FromDiscord<Graveflo> it looks wrong but this is not the only case where the pattern is used. Why have union types in the first place. I see it used in the std
03:55:33FromDiscord<Elegantbeef> They're typeclasses
03:56:22FromDiscord<Elegantbeef> Which is to say they're generic constraints
03:56:27FromDiscord<Elegantbeef> They're not like TS unions
03:58:45FromDiscord<Graveflo> Not sure I totally understand but I'm assuming you mean that int is a primitive and that pattern is meant for types that have are essentially "generically compatible with one another" ?
03:58:54FromDiscord<Rika> No
03:59:14FromDiscord<Rika> Basically the types will be chosen and the code within must be valid for the concrete type
03:59:31FromDiscord<Rika> (edit) "chosen" => "consolidated"
04:00:12FromDiscord<Rika> You cannot nil it no matter what constraints you put because it’ll resolve strongly
04:00:15FromDiscord<Graveflo> okay so all of the code must be generically compatible with all types in the union for it to make sense and "when" is used only when more fine grain logic is needed?
04:01:02FromDiscord<Rika> When can be used to choose the code that would be valid per the type
04:01:20FromDiscord<Rika> And by the way, nil doesn’t have a concrete type on its own
04:01:49FromDiscord<Graveflo> what is type(nil) then?
04:02:25FromDiscord<Elegantbeef> A hack to allow `nil`
04:02:30FromDiscord<Elegantbeef> `something(nil)`
04:03:10FromDiscord<Graveflo> So why does the first example compile and run as expected then given this information?
04:03:32FromDiscord<Graveflo> well, as might kinda expected
04:04:05FromDiscord<Elegantbeef> No clue it's mostly a hack so using it is just off
04:04:13FromDiscord<Rika> I think the hack using type nil is just too much of a hack for the default parameter to work
04:04:28FromDiscord<Rika> (edit) "using" => "(using" | "nil" => "nil)"
04:04:43FromDiscord<Graveflo> So I have hurt myself in confusion. Ideally I suppose this should be banned from compiling
04:04:56FromDiscord<Elegantbeef> Generic code isnt checked until instantiation
04:04:59FromDiscord<Rika> There are option types in the Nim standard library so maybe you can use that if you want
04:05:51FromDiscord<Graveflo> yea that's what I'll do. I was trying to worm my way around it but its nbd
04:06:17FromDiscord<Graveflo> or ill just overload like beef said and sac a stack frame
04:13:06FromDiscord<Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4wem
04:15:25FromDiscord<Rika> Well in this case it works due to the when statements distinguishing which block will be checked and compiled
04:15:31FromDiscord<Graveflo> I'm not trying to make this work btw more so just interested. I assume it is basically creating two different procs and linking to the appropriate one basic on their type at compile time, but if that is true, I dont understand why the original didnt work
04:15:39FromDiscord<Rika> Yes
04:16:22FromDiscord<Rika> I made a mistake above, the code with the default value doesn’t work likely just because the nil type is buggy and hacky
04:17:18FromDiscord<Graveflo> okay fair enough. I'm sure it's overly pedantic to criticize the correctness of the syntax knowing that type(nil) is just a weirdo. Thanks for the help guys
04:20:13FromDiscord<Rika> It would work otherwise I believe, as in had you used another type and value
05:31:07FromDiscord<enigma> https://media.discordapp.net/attachments/371759389889003532/1109352583933481001/image.png
05:31:17FromDiscord<enigma> is there not a way to know how many downloads per package there is
05:31:23FromDiscord<enigma> or which one is preferred
05:34:18FromDiscord<enigma> <https://github.com/nim-lang/nimble#readme>
05:34:32FromDiscord<enigma> how do I know if a package is authentic and not malicious o.O
05:35:02FromDiscord<enigma> sent a code paste, see https://play.nim-lang.org/#ix=4weB
05:37:12FromDiscord<Elegantbeef> You look at the code an validate it
05:39:56FromDiscord<enigma> so if a module has 1000+ files ill just look at the code and validate it
05:40:06FromDiscord<enigma> (edit) "1000+" => "1000000000000000000000000000+"
05:40:18FromDiscord<enigma> down bad replying to a bot
05:40:28FromDiscord<Elegantbeef> I mean how else do you ensure code is not malicious
05:40:35FromDiscord<enigma> reviews
05:40:38FromDiscord<Elegantbeef> You have to audit code to ensure it's not malicious
05:40:48FromDiscord<enigma> dont hurt the messenger please
05:40:55FromDiscord<Elegantbeef> What?
05:40:59FromDiscord<enigma> ever
05:51:39FromDiscord<Rika> In reply to @enigma "is there not a": No, downloads are decentralised
05:51:52FromDiscord<Rika> Aka via git or other SCMs
05:52:02FromDiscord<Rika> So there isn’t exactly a way to track it
05:52:35FromDiscord<Rika> In reply to @enigma "so if a module": How else should it be done?
05:54:34FromDiscord<Graveflo> You could always rely on anecdotal things like people referencing using it online .. in forums and stuff. Besides that beggars cant be choosers
05:55:50FromDiscord<Graveflo> or just code a code repo version of yelp. I think that might help some people vent their frustrations too
05:55:53FromDiscord<enigma> nobodys begging 🤔
05:55:58FromDiscord<enigma> seems pretty standard to me though
05:57:59FromDiscord<enigma> https://media.discordapp.net/attachments/371759389889003532/1109359344321040484/image.png
05:58:14FromDiscord<enigma> by stars it is 🫡
06:02:24FromDiscord<voidwalker> yeah it sucks that you can't sort by downloads/stars, trending etc. Also sucks that you don't have the repo link always on the main package page, sometime it links to docs hosted on another site
06:02:46FromDiscord<voidwalker> Also sucks that there's no active curation effort to remove lower quality duplicates
06:04:24FromDiscord<enigma> https://kerkour.com/rust-crate-backdoor#/typosquatting↵↵@Graveflo @Rika 👀
06:06:14FromDiscord<enigma> although not rust obvs, a still good read
06:11:55FromDiscord<PunchCake> i love nim
06:12:00FromDiscord<PunchCake> who else loves nim here
06:12:03*Guest54 joined #nim
06:12:44*Guest54 quit (Client Quit)
06:12:53FromDiscord<Elegantbeef> I tolerate it
06:13:51FromDiscord<JJ> nim? oh sick, sometimes i write code in that
06:14:01FromDiscord<JJ> cool to see other nim fans
06:14:05FromDiscord<PunchCake> foreal
06:14:11FromDiscord<Rika> In reply to @voidwalker "Also sucks that there's": I think it would be unfair to do so, but I agree on the download count
06:14:16FromDiscord<PunchCake> i thought the rustacanes invaded
06:14:59FromDiscord<Elegantbeef> Yea as much as I think only quality software should be in a software registry, it's undemocratic to remove "lesser quality"
06:15:02FromDiscord<JJ> In reply to @voidwalker "yeah it sucks that": so this is because of the structure of nimble.directory
06:16:43FromDiscord<Rika> In reply to @apropos "so this is because": No, it’s because of how Nim does package distribution
06:17:36FromDiscord<JJ> it basically is a frontend to making requests to github. and iirc star counts are not provided by the github api in search results, so in order to get them you have to make an additional request for each repo
06:18:48FromDiscord<JJ> In reply to @Rika "No, it’s because of": yeah, i think totally revamping that would be a good idea but probably too much effort for too few benefits
06:19:39FromDiscord<JJ> In reply to @apropos "it basically is a": then that doesn't scale to searches with like 500 requests or what no so star counts are not included there. glad to see the redesign finally got merged though
06:19:54FromDiscord<Elegantbeef> I mean changing how Nim does packaging is pointles
06:20:07FromDiscord<Elegantbeef> A decentralised package management is nice imo
06:22:44FromDiscord<JJ> ah i should really fix readme generation also, i wasn't happy with how it turned out but then got busy
06:26:18FromDiscord<PunchCake> is nim fourms made with nim
06:28:26FromDiscord<michaelb.eth> In reply to @PunchCake "is nim fourms made": indeed
06:29:12FromDiscord<PunchCake> nice
06:29:14FromDiscord<PunchCake> feels fast
06:29:32FromDiscord<Rika> It’s an old version with a long-standing bug regarding registration
06:30:01FromDiscord<PunchCake> In reply to @Rika "It’s an old version": whats the bug
06:33:38FromDiscord<Rika> If the registration link sent in the email expires you cannot do anything other than ask an admin to override
06:33:50FromDiscord<Rika> I think that’s the bug but I don’t recall
06:38:20FromDiscord<JJ> yeah it's redeployed only for cves or something
06:38:58FromDiscord<JJ> i remember i had to wait about a year and a half to make an account after pr'ing support for my username (it previously contained a dash)
06:41:35FromDiscord<PunchCake> In reply to @apropos "i remember i had": lmao
06:41:42FromDiscord<PunchCake> i just made one in seconds
06:45:44FromDiscord<JJ> (dashs were previously prohibited because usernames were nim identifiers)
06:46:42FromDiscord<Elegantbeef> That's a funny thing
06:46:56FromDiscord<Elegantbeef> Were passwords also valid identifiers aswell?
06:48:04FromDiscord<JJ> your password is
06:48:21FromDiscord<JJ> ah, beef, do you know the current state of documentation projects?
06:48:33FromDiscord<Elegantbeef> nimib/book is good use that
06:48:45FromDiscord<Elegantbeef> https://www.jasonbeetham.com/codereuse.html i use it for my silly one off articles
06:49:02FromDiscord<JJ> i know treeform has his nimdocs but i don't know if he was planning on rolling it out to arbitrary repos, and i thought somebody else was also working on something similar
06:49:11FromDiscord<Elegantbeef> Oh right you mean that
06:49:19FromDiscord<Elegantbeef> nimble.directory should support it
06:49:24FromDiscord<Elegantbeef> There's a long standing bug that doesnt generate docs
06:49:49FromDiscord<Elegantbeef> I know nim.town exists and is in a similar vein but you request a url and host stuff there
06:50:36FromDiscord<Elegantbeef> Seems whoever was hosting that has gone radio silent
06:50:46FromDiscord<JJ> oh fun, that's very cute
06:51:37FromDiscord<JJ> i set up something similar with toki.la actually
06:52:08FromDiscord<JJ> for the toki pona community, in a similar fashion to sona.la (which actually has people using it)
06:52:16FromDiscord<JJ> (edit) "sona.la" => "pona.la"
06:53:41FromDiscord<Elegantbeef> Ugh I'm questioning using bindless textures for my GUI.... it prevents using render doc, and is an opengl extension which means it only has a subset of support(AMD and Nvidia certainly support it)
06:54:00FromDiscord<Elegantbeef> I wonder if Intel's Arc gpus support it 😄
06:54:06FromDiscord<Elegantbeef> Probably explodes in a glorious inferno
06:56:10FromDiscord<Elegantbeef> I suppose given how I'm doing this I can technically make a SDL backend and use that for debugging.... hmmm
06:57:59FromDiscord<JJ> In reply to @Elegantbeef "Seems whoever was hosting": hopefully they'll come back, but it looks like they set it up in a remarkably bus-ready fashion
06:58:21FromDiscord<JJ> everything's just in a github repo
07:03:14FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4weJ
07:06:31FromDiscord<JJ> `BitVecS or BitVec` looks like a boolean value
07:06:34FromDiscord<Rika> Can you give us the type definitions
07:06:39FromDiscord<Rika> In reply to @apropos "`BitVecS or BitVec` looks": It is valid
07:07:11FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4weK
07:07:17FromDiscord<JJ> In reply to @Rika "It is valid": what? that's weird
07:07:24FromDiscord<Rika> In reply to @apropos "what? that's weird": It is a type class
07:07:33FromDiscord<JJ> oh i see
07:08:00FromDiscord<voidwalker> edited code above with proc definition
07:08:02FromDiscord<Rika> In reply to @voidwalker "I have two things": Is B restrained to only the three types?
07:08:17FromDiscord<Rika> What issues are you getting
07:08:50FromDiscord<voidwalker> well, it should be restrained, since I call the proc with "AnyBitVec" type var
07:09:12FromDiscord<voidwalker> As I said, I do not understand why those two are not equivalent. I get different error messages
07:09:39FromDiscord<Rika> Which are
07:20:03FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4weL
07:20:21FromDiscord<voidwalker> If I do the `else` I get `Error: expression has no address`
07:20:22FromDiscord<Elegantbeef> In the case both whens fail you do not have a `w`
07:21:37FromDiscord<voidwalker> so they both fail, that's why I don't have w ? that was my second question, why is w out of scope
07:21:46FromDiscord<Elegantbeef> Did you read the rest of the message?
07:22:12FromDiscord<Elegantbeef> I assume `bv` is a parameter passed in without `var`?
07:23:03FromDiscord<Elegantbeef> If so pass in `bv` as a var
07:23:07FromDiscord<Elegantbeef> then you can use `addr`
07:28:35FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4weO
07:30:08NimEventerNew thread by Angluca: Teach you to write nim code comfortably use vim if you like vim you must try :), see https://forum.nim-lang.org/t/10206
07:33:53FromDiscord<voidwalker> ok so can you explain again ? I am still as confused
07:43:15FromDiscord<least antisemitic pole> is {.push warning[UnusedImport]: off.}` supposed to work? it doesn't for me
07:52:14NimEventerNew thread by domogled: I came across a strange behavior of httpClient with Uri type parameter, see https://forum.nim-lang.org/t/10207
07:52:50FromDiscord<voidwalker> my bad, I used the wrong entity in when, B instead of the var bv
08:19:44*azimut quit (Ping timeout: 240 seconds)
08:36:59*Notxor joined #nim
08:46:31*derpydoo quit (Ping timeout: 268 seconds)
09:00:45FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4wf7
09:01:41FromDiscord<voidwalker> (edit) "https://play.nim-lang.org/#ix=4wf7" => "https://paste.rs/eQUUu"
09:01:46FromDiscord<mratsim> why `type T = B`
09:02:01FromDiscord<voidwalker> I changed the first template to use generic param instead of typedesc. But if I call the other template with `newVLA(B, blocks, init)` I get:
09:02:15FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4wfa
09:02:19FromDiscord<voidwalker> If I do type T = B and then call it with T, it works
09:02:29FromDiscord<mratsim> ah
09:03:14FromDiscord<voidwalker> mratsim it's good that you are here, I wanted to ask you about your suggestion to use openArray
09:04:30FromDiscord<voidwalker> but first, do you have any idea what could be happening here ? I have no idea how to debug 'types'
09:05:25FromDiscord<mratsim> In reply to @voidwalker "but first, do you": you're encountering typesystem aliasing bugs, see item 5 of https://github.com/status-im/nimbus-eth2/issues/2219 https://media.discordapp.net/attachments/371759389889003532/1109406511895171132/image.png
09:07:20FromDiscord<mratsim> In reply to @voidwalker "but first, do you": basically, static + typedesc + generics can be very finicky, I'm sure I raised dozens of bugs maybe even a hundred with one or the other tag
09:07:48FromDiscord<voidwalker> ok. I am happy it works like this for the moment, not a big problem
09:07:58FromDiscord<voidwalker> https://play.nim-lang.org/#ix=4wfd - this is the code as I have it now
09:08:04FromDiscord<mratsim> I have a pretty good idea on what to try, but it's a bit hard to explain
09:08:49FromDiscord<voidwalker> how do you suggest I implement openArray ? Make the base type openArray ?
09:10:37FromDiscord<mratsim> no, have all your inner proc work on openArray[T]
09:10:54FromDiscord<mratsim> call them `fooImpl` for example
09:11:23FromDiscord<voidwalker> oh so they are more "basic", taking just the data type they operate on, not a higher one
09:11:26FromDiscord<mratsim> and then the outer public proc just call the inner proc. Make sure outer proc are inlined to avoid extra function calls
09:11:28FromDiscord<voidwalker> (edit) "oh so they are more "basic", taking just the data type they operate on, not a higher ... one" added "level"
09:12:05FromDiscord<voidwalker> less code generated this way since they are not duplicated with generics.. I see
09:12:08FromDiscord<mratsim> small inner procs can also be made inline so that if lengths are known at compile-time, compiler can do loop unrolling
09:12:20FromDiscord<mratsim> but it leaves the decision to the compiler.
09:12:59FromDiscord<voidwalker> you might be right, it's not a bad idea..
09:13:08FromDiscord<voidwalker> it's more "correct" I guess
09:13:31FromDiscord<voidwalker> Although my rogue uncheckedArray will not fit in openArray, right ?
09:13:39FromDiscord<voidwalker> it's a lower level type I think
09:14:07FromDiscord<voidwalker> well it can be converted to openarray
09:14:09FromDiscord<mratsim> there is a toOpenArray(ptr UncheckedArray, low, high)
09:14:12FromDiscord<voidwalker> yeah
09:14:21FromDiscord<voidwalker> `template asOpenArray[T](a: VarLengthArray[T]): openarray[T] =↵ toOpenArray(addr a.data, 0, a.len)`
09:14:29FromDiscord<mratsim> the codegen is easily optimizable away, I looked at it the otherday
09:14:57FromDiscord<mratsim> https://github.com/mratsim/constantine/blob/1c5341fd7e8af9084223b5bce616b4a8262eab14/constantine/platforms/views.nim#L24-L30
10:15:04*krux02_ joined #nim
11:30:49*krux02_ quit (Remote host closed the connection)
12:49:17FromDiscord<least antisemitic pole> is there any way to provide a jsdoc comment for an exported proc for js backend?
12:49:33FromDiscord<least antisemitic pole> i tried {.emit.}, but the comment would end up in a completely different place in the generated .js file
12:52:39FromDiscord<jmgomez> In reply to @least antisemitic pole "i tried {.emit.}, but": Not sure if codegenDecl is available in the js backend. But you can try that one out if so
13:30:48*fallback quit (Ping timeout: 240 seconds)
13:33:32FromDiscord<least antisemitic pole> that seems to work, thanks @jmgomez
13:35:06*fallback joined #nim
13:37:51*Notxor quit (Remote host closed the connection)
13:43:36*Cagalations3-16 joined #nim
13:48:05FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4wgf
13:48:31FromDiscord<ieltan> ah wait its not `int` its `string` for the key
13:48:57FromDiscord<ieltan> (edit) "https://play.nim-lang.org/#ix=4wgf" => "https://play.nim-lang.org/#ix=4wgg"
13:49:07FromDiscord<ieltan> still have the issue
13:51:52Cagalations3-16I have some great news guys!
13:52:07Cagalations3-16A new season of Malcolm in the Middle is coming out!
13:52:08Cagalations3-16Malcolm in the Middle Season 8 Episodes 1 and 2: 2. Reese Wilkerson Teams with Canadian Mountie Secret Agents to Trap and Torture Pedophile Tom Cruise https://justpaste.it/Tom_Cruise_BDSM_Tortured_Reese 1. Reese meets Edna Skilton, Fills Her Pussy with Shit, and Fucks that poopy cooter! https://justpaste.it/Reese_Fucks_Edna_Skilton_Malcolm
13:52:15Cagalations3-16Check out these episode story lines!
13:52:17Cagalations3-16genius!
13:54:05FromDiscord<amadan> <@&371760044473319454>
13:57:35FromDiscord<Chronos [She/Her]> In reply to @Cagalations3-16 "Malcolm in the Middle": Whatt the fuck
14:04:55*Cagalations3-16 quit (K-Lined)
14:12:57FromDiscord<demotomohiro> In reply to @ieltan "How can i make": I think you need to explicitly convert `MessageEvent` to `AwaitableEvent` so that type of `mys` become `seq[AwaitableEvent]`.
14:16:05FromDiscord<jmgomez> It's kinda of a shame but you could get around it by doing `cast[seq[AwaitableEvent]](mys)`
14:18:36FromDiscord<ieltan> In reply to @demotomohiro "I think you need": oh i see
14:18:51FromDiscord<ieltan> How do i get data back later ?
14:19:04FromDiscord<ieltan> recasting ?
14:26:01FromDiscord<demotomohiro> In reply to @ieltan "oh i see": Convert like `(MessageEvent)mys[0]`.
14:26:37FromDiscord<demotomohiro> Or `MessageEvent(mys[0])`.
14:29:02FromDiscord<ieltan> In reply to @jmgomez "It's kinda of a": Yes, I'm not worried about casting to the wrong type because I know in advance what type of event I will get/store. But I do wonder if there is a performance cost
14:31:02FromDiscord<ieltan> In reply to @demotomohiro "Convert like `(MessageEvent)mys[0]`.": Alright thanks!
14:31:54FromDiscord<jmgomez> In reply to @ieltan "Yes, I'm not worried": There isnt
14:33:53FromDiscord<ieltan> In reply to @jmgomez "There isnt": Nice, thanks for the help!
14:53:40FromDiscord<sOkam!> Is it possible to map a struct type from C with `importc` and be able to access its fields in some way?
14:54:17FromDiscord<sOkam!> its a big type, so looking for a way to not have to convert the whole thing manually to an object to be able to use it
14:59:01FromDiscord<jmgomez> In reply to @sOkam! "Is it possible to": not following, what do you mean by accessing its fields? like `importedType.fieldDefiendInC` ?
15:00:22FromDiscord<sOkam!> yeah
15:01:54FromDiscord<jmgomez> you should be able to access the field just by defining them, if you have another name for them you can modify the name by using `import` again in the name
15:02:04FromDiscord<jmgomez> (edit) "`import`" => "`importc`"
15:02:37FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4wgI
15:03:32FromDiscord<sOkam!> what about the other elements of the object? the ones omitted
15:04:32FromDiscord<jmgomez> what do you mean?
15:05:03FromDiscord<jmgomez> like what happens to them?
15:05:54FromDiscord<sOkam!> as in does it crash if I don't define the others?
15:06:05FromDiscord<sOkam!> (edit) "others?" => "others in nim?"
15:06:33FromDiscord<jmgomez> oh no, since the C compiler already knows about them Nim doesnt produce new code for their definition
15:07:36FromDiscord<sOkam!> kk ty ✍️
15:10:45FromDiscord<tsoj> How can do memory cache prefetchs like gcc's builtin_prefetch?
15:26:22FromDiscord<demotomohiro> In reply to @tsoj "How can do memory": Probably you can importc `builtin_prefetch` and call it from Nim code.
15:33:31*azimut joined #nim
15:59:55FromDiscord<chmod222> If all else fails, `{.emit.}`
16:00:09FromDiscord<Nlits (Ping on reply)> How would I wrap a C enum in nim?
16:00:15FromDiscord<Nlits (Ping on reply)> Using the header pragma
16:01:07FromDiscord<Nlits (Ping on reply)> also, what is a GString?
16:01:28FromDiscord<chmod222> Since a C enum is just a weakly typed wrapper over an int (until C23 at least), you can just `FooNum {.size: sizeof(cint).} = enum ...`
16:01:48FromDiscord<chmod222> And replicate the enum fields
16:03:11FromDiscord<chmod222> I don't think you can `.header:` enums
16:03:31FromDiscord<chmod222> Well, maybe you can and it'll `#include` the header, but you'll need to define the values anyways
16:04:04NimEventerNew thread by ITwrx: Why does Nim source code filter add a newline at the end of the last line?, see https://forum.nim-lang.org/t/10208
16:07:51FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4wgU
16:08:21FromDiscord<chmod222> You'll have to add the values for rst\_extensions at least, since it starts at 1 and nim at 0
16:08:23FromDiscord<Nlits (Ping on reply)> (edit) "https://play.nim-lang.org/#ix=4wgU" => "https://play.nim-lang.org/#ix=4wgV"
16:09:20FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "You'll have to add": so i just do the same = 0x01 in nim?
16:09:38FromDiscord<chmod222> Yep
16:10:44FromDiscord<chmod222> Just replicate the values and make sure the size matches the one in C, which will probably be `cint` unless you deal with C23 where enums can be other things
16:10:45FromDiscord<chmod222> The names do not have to match
16:10:45FromDiscord<chmod222> Just the number
16:10:56FromDiscord<chmod222> Since again, to C enums are basically just very weakly typed ints
16:12:40FromDiscord<chmod222> One sticky issue you may run into is that in C, enums may have duplicate values, which nim forbids
16:13:32FromDiscord<chmod222> I work around that by declaring the duplicate values as `consts` of the same type as the enum, but there are other ways
16:18:33FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4wgW
16:18:57FromDiscord<chmod222> That'll work
16:19:15FromDiscord<chmod222> C strings, as in `char ` for Nim is just `cstring`
16:21:20FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "C strings, as in": 👍↵What about gstrings?
16:21:36FromDiscord<chmod222> I don't know what gstrings are
16:21:45FromDiscord<chmod222> glib?
16:22:31FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "glib?": yes
16:22:43FromDiscord<Nlits (Ping on reply)> are those easier to convert to nimstrings/safer
16:22:53FromDiscord<Nlits (Ping on reply)> Idk what they are but it has a function for it
16:23:51FromDiscord<chmod222> If you know where they are defined and don't care all too much about what's inside because you'll use them from behind a pointer, `GString {.importc: "header.h", "gstring".} = object` but you probably only want to use them when talking to some code in C that already uses them
16:23:56FromDiscord<chmod222> Nim has `string`
16:24:38FromDiscord<chmod222> there's probably already Nim bindings for glib somewhere on nimble though
16:24:52FromDiscord<chmod222> Glib is a massive library so I'd not bother with doing it myself
16:25:04FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "If you know where": So i should not even wrap the function that uses GString instead? I should just use cstring
16:25:29FromDiscord<chmod222> gstring is not `const char ` so cstring won't work there
16:27:46FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "gstring is not `const": no I mean, there are 2 c functions that do the same thing except one uses Gstring and the other uses char
16:36:02FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "Since a C enum": Just realized that the enum is meant to hold multiple values (via the | operator in C) and that `0` is for none and ` 0xFFFFFF` is for all
16:36:11FromDiscord<Nlits (Ping on reply)> How do I properly wrap this?
16:36:41FromDiscord<chmod222> You can use `set[ThatEnum]` to represent this
16:37:10FromDiscord<chmod222> https://nim-lang.org/docs/manual.html#set-type-bit-fields
16:37:16FromDiscord<chmod222> This is exactly what you want
16:37:54FromDiscord<chmod222> Doesn't work if the enum is too large though, you'll need to see if it works for you
16:39:39FromDiscord<chmod222> sent a code paste, see https://paste.rs/nbO7M
16:40:20FromDiscord<chmod222> Since it's `cint`, C will eat it
16:40:30FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "Doesn't work if the": the enum has 6 options that can be combined
16:40:36FromDiscord<chmod222> Again, enums are just ints as far as C is concerned, how they came about doesn't really matter
16:40:47FromDiscord<chmod222> The set thing will probably work in your case
16:41:38FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "The set thing will": how you represent "all" without just adding all the of them in a set.
16:41:46FromDiscord<jmgomez> @Nlits (Ping on reply) I do this at it has proven to work just fine: https://github.com/jmgomez/NimForUE/blob/master/src/nimforue/unreal/coreuobject/uobjectflags.nim
16:42:11FromDiscord<Nlits (Ping on reply)> A shortcut type would be nice for "all"
16:42:17FromDiscord<chmod222> 0xfffffff...↵(@Nlits (Ping on reply))
16:42:38FromDiscord<chmod222> or \~0
16:42:46FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "0xfffffff... (<@910899642236043294>)": yeah, but how would I put that into a type...
16:42:50FromDiscord<chmod222> well, `not 0`
16:43:14FromDiscord<chmod222> `const AllFlags = cast[FlagsEnum](0xffffffff)`
16:43:25FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "`const AllFlags = cast[FlagsEnum](0xffffffff)`": thanks you
16:44:09FromDiscord<Nlits (Ping on reply)> wait, is flagsEnum the set
16:44:16FromDiscord<Nlits (Ping on reply)> or just the enum
16:44:30*lucasta joined #nim
16:44:30FromDiscord<chmod222> Cast to the set
16:45:26FromDiscord<Nlits (Ping on reply)> Also, are there any inefficiencies with using `$` to convert between cstring and string?
16:46:31FromDiscord<demotomohiro> `cast[FlagEnum](-1)` would be simpler
16:46:45FromDiscord<chmod222> Some I believe, Nim strings are represented differently
16:46:56FromDiscord<chmod222> But I wouldn't worry about that unless you do it billions of times per second
16:48:36FromDiscord<demotomohiro> string is already zero terminated so string to cstring is just return pointer to content of the string.
16:49:43FromDiscord<demotomohiro> cstring to string might requires copying as Nim doesn't know what kind of memory cstring points to.
16:50:53FromDiscord<chmod222> I'm pretty sure it will copy because Nim will want to own the memory for the new `string`
16:51:42FromDiscord<chmod222> But again, it's the kind of overhead you only want to look to closely at if you know from profiling that it's a factor
16:52:09FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4wgZ
16:52:11FromDiscord<Nlits (Ping on reply)> Guess that does not work?
16:52:19FromDiscord<Nlits (Ping on reply)> Or is it supposed to be a const
16:52:47FromDiscord<chmod222> i64 may be too large, since that's not cint anymore
16:53:13FromDiscord<Nlits (Ping on reply)> In reply to @chmod222 "i64 may be too": I never set it to i64
16:53:28FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4wh0
16:54:32FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro "`cast[FlagEnum](-1)` would be simpler": tried that, did not work either
16:55:58FromDiscord<demotomohiro> In reply to @not logged in "tried that, did not": If you using `set[]`, https://nim-lang.org/docs/setutils.html#fullSet%2Ctypedesc%5BT%5D
17:09:30FromDiscord<jmgomez> In reply to @not logged in "And const gives this": why dont you just do importc?
17:10:45FromDiscord<jmgomez> For cpp this works just fine: `{. importcpp, nodecl size:sizeof(TheSize).}`
17:11:16FromDiscord<jmgomez> (edit) "nodecl" => "nodecl,"
17:22:16FromDiscord<Nlits (Ping on reply)> In reply to @demotomohiro "If you using `set[]`,": ok, I don't need it then
17:22:28FromDiscord<Nlits (Ping on reply)> In reply to @jmgomez "For cpp this works": for the enum?
17:23:04FromDiscord<jmgomez> In reply to @not logged in "for the enum?": Yes, posted a file above
17:24:10FromDiscord<jmgomez> There is also a macro that defines some operation on them and generates a few converters so they can be used at compile time (but I dont think you need the later)
17:24:19FromDiscord<Nlits (Ping on reply)> In reply to @jmgomez "Yes, posted a file": does it have any explicit benefits?
17:25:36FromDiscord<Nlits (Ping on reply)> it breaks stuff, idk if i should use it
17:26:09FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4whb
17:27:16FromDiscord<jmgomez> importc them breaks things? Sounds like the compiler doesnt locate where the original lives
17:27:41FromDiscord<jmgomez> you would need to have that file in the search path of the c compiler
17:28:15FromDiscord<Nlits (Ping on reply)> In reply to @jmgomez "you would need to": idk where that is. I placed in the nimble bin hoping the c compiler would find it, but it seems it does not work
17:28:22FromDiscord<jmgomez> I also use PCH for all the headers. So the C/C++ compiler doesnt compile redundant stuff
17:29:51FromDiscord<jmgomez> there is `--passC` and `-t` to pass parameters to the compiler. I think there is also one specific for includes in the nim compiler, `cIncludes`?
17:31:03FromDiscord<Nlits (Ping on reply)> I still dk where my nimble package needs to put the .h file
17:33:21FromDiscord<jmgomez> You have a file with your c sources?
17:33:30FromDiscord<jmgomez> (edit) "file" => "folder"
17:35:05FromDiscord<Nlits (Ping on reply)> In reply to @jmgomez "You have a folder*": Yes, idk why but I put both my .a file and my .h file in `.nimble/bin` (I was trying to make it install them when you install the nimble package)
17:36:10FromDiscord<jmgomez> ahh, I see. Then you would need to add that nimble/bin to the search paths in the C compiler and watch out how rst_lib.h is used, if it's just like that you could add it directly in there
17:37:48FromDiscord<Nlits (Ping on reply)> In reply to @jmgomez "ahh, I see. Then": so, I looked it up and I need to pass a `-I` flag to the c comp, is there a good way to do this in the lib? (Kind of like passl pragma)
17:38:10FromDiscord<Nlits (Ping on reply)> Also, do you happen to know why the passL pragma does not error when the lib does not exist?
17:38:53FromDiscord<Nlits (Ping on reply)> ok, nvm: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-passc-pragma
17:40:48FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4whi
17:45:19FromDiscord<Nlits (Ping on reply)> works
17:46:33FromDiscord<pinkdev> any example of embedding nimscript or whatever its called?
17:48:17FromDiscord<Nlits (Ping on reply)> In reply to @pinkdev "any example of embedding": what do you mean embedding?
17:48:36FromDiscord<pinkdev> as a scripting language in my application
17:48:46FromDiscord<Elegantbeef> https://github.com/beef331/nimscripter
17:48:55FromDiscord<pinkdev> oh thanks
17:48:59FromDiscord<pinkdev> ill check that!
17:59:17FromDiscord<Nlits (Ping on reply)> do .a files work on windows?
17:59:30FromDiscord<Elegantbeef> If you use mingw
17:59:47FromDiscord<Elegantbeef> And it was compiled with mingw
18:00:19FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "And it was compiled": so I need to compile 1 version of the c lib for linux, and one for windows
18:00:27FromDiscord<Nlits (Ping on reply)> I am assuming the .h file works for both
18:00:28FromDiscord<sOkam!> @PMunch could you give a simple example of how you would access the code in here with futhark?↵https://github.com/godotengine/godot-headers/blob/master/godot/gdnative_interface.h
18:00:54FromDiscord<sOkam!> in order to avoid having to do a c2nim pass
18:01:16FromDiscord<sOkam!> (it absolutely obliterates the format, even with c2nim 😭
18:01:25FromDiscord<sOkam!> (edit) "😭" => "😭)"
18:01:42FromDiscord<sOkam!> (edit) "(it" => "(c2nim" | "c2nim" => "Nep1"
18:02:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4whn
18:02:32FromDiscord<sOkam!> how are the functions accessed after?
18:03:00FromDiscord<jmgomez> In reply to @not logged in "so I need to": why dont you use `.lib` on win?
18:03:00FromDiscord<Elegantbeef> verbatim name
18:03:20FromDiscord<Elegantbeef> Mingw makes a `.a` afaik so that's one reason
18:03:32FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4wgI
18:03:42FromDiscord<jmgomez> In reply to @Elegantbeef "Mingw makes a `.a`": well, there is `clang` and `msvc`
18:03:55FromDiscord<Elegantbeef> Sure
18:03:59FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4who
18:04:04FromDiscord<Elegantbeef> But mingw is better cause i can use it on linux 😛
18:04:11*Guest15 joined #nim
18:04:30*Guest15 quit (Client Quit)
18:04:36FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "But mingw is better": how do you even install mingw
18:04:47FromDiscord<Elegantbeef> `yay mingw`
18:05:08FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "`yay mingw`": ;-;
18:05:11FromDiscord<Nlits (Ping on reply)> not a command
18:05:23FromDiscord<Elegantbeef> Use a better OS
18:06:10FromDiscord<Elegantbeef> Wait @sOkam! what was wrong with the c2nim'd file?
18:06:11FromDiscord<Elegantbeef> Seems fine to me
18:06:15FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "Use a better OS": I can't really
18:06:40FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4whp
18:06:43FromDiscord<Nlits (Ping on reply)> The header file legit defines it
18:08:00FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4whq
18:08:55FromDiscord<Elegantbeef> Are you really that concerned with the format of mostly typedefs 😄
18:09:09FromDiscord<sOkam!> its fucking unreadable beyond reason
18:09:21FromDiscord<sOkam!> i cannot even navigate it without losing track of where i am
18:09:42FromDiscord<Elegantbeef> Futhark isnt going to do any better
18:09:53FromDiscord<Elegantbeef> Actually maybe it will with the new features pmunch added
18:09:55FromDiscord<sOkam!> no but it will avoid me having to rename everything
18:10:11FromDiscord<Elegantbeef> "rename everything"?
18:10:34FromDiscord<Elegantbeef> `c2nim --stdints ./the.h` solves the int mismatch
18:10:38FromDiscord<sOkam!> slow coder brain issues. i cannot live with the mess
18:10:47FromDiscord<Elegantbeef> wchar\_t requires looking at what type of wchar they use
18:10:58FromDiscord<Nlits (Ping on reply)> 🤦‍♂️ I just realized I had extra quotes
18:11:28FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4whr
18:15:30FromDiscord<Nlits (Ping on reply)> I got it working
18:15:58FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4whs
18:16:24FromDiscord<Elegantbeef> I'm surprised there isnt a `--lineLength` or similar flag to stop the odd formatting
18:23:01*ttkap joined #nim
19:02:08FromDiscord<enigma> In reply to @not logged in "🤦‍♂️ I just realized": single quotes are for char ↵doulble for strings
19:02:21FromDiscord<enigma> (edit) "↵doulble" => "↵double"
19:09:46FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4whC
19:25:54FromDiscord<enigma> sent a code paste, see https://play.nim-lang.org/#ix=4whG
19:26:43FromDiscord<enigma> so i just compiled w/ separated options,..but not seeing a `cache`
19:26:47FromDiscord<michaelb.eth> I don't think you can combine them
19:26:47FromDiscord<enigma> my goal was to get the c files
19:27:15FromDiscord<michaelb.eth> by default the c files are in `~/.cache/nim` on non-Windows
19:27:17FromDiscord<enigma> (edit) "`cache`" => "`nimcache`"
19:27:29FromDiscord<michaelb.eth> you can, though, control where the cache directory resides, just a sec
19:30:23FromDiscord<enigma> sent a code paste, see https://play.nim-lang.org/#ix=4whH
19:30:55FromDiscord<enigma> (edit) "https://play.nim-lang.org/#ix=4whH" => "https://play.nim-lang.org/#ix=4whI"
19:31:43FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4whJ
19:34:42FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4whK
19:35:27FromDiscord<enigma> In reply to @michaelb.eth "if you have a": I do not have one, so I'll look into that too. ↵thank you for the tip!
19:44:55*Notxor joined #nim
19:55:44*azimut quit (Ping timeout: 240 seconds)
19:56:54*azimut joined #nim
20:48:43*lucasta quit (Quit: Leaving)
21:10:52FromDiscord<Chronos [She/Her]> What's a very simple library to use for API stuff?
21:11:09FromDiscord<Chronos [She/Her]> Rather not use Prologue when in reality all I need is JSON requests and stuff
21:11:23FromDiscord<Chronos [She/Her]> Sending and fetching JSON data from an API, I mean
21:13:49FromDiscord<Chronos [She/Her]> May use httpx tbh
21:47:18*Notxor quit (Remote host closed the connection)
21:47:35*Notxor joined #nim
21:56:59*lucasta joined #nim
22:08:26FromDiscord<jmgomez> In reply to @Hourglass, When the Hour Strikes "Rather not use Prologue": What's wrong with using Prologue for that? Is not like you were pulling unnecessary stuff
22:20:03*Notxor quit (Remote host closed the connection)
22:20:53FromDiscord<michaelb.eth> In reply to @Hourglass, When the Hour Strikes "What's a very simple": how about nim-json-rpc?↵https://github.com/status-im/nim-json-rpc
22:42:26FromDiscord<Kirik> Hi, I wonder where is that "sk" folder on my disk, can anyone claify what is "sk" in this path config if its not a forler ?↵` export PATH=/home/sk/.nimble/bin:$PATH`↵Thanks a lot
22:42:53FromDiscord<Kirik> (edit) "claify" => "clarify" | "forler" => "real folder"
22:43:22FromDiscord<Kirik> (edit) "PATH=/home/sk/.nimble/bin:$PATH`↵Thanks" => "PATH=/home/sk/.nimble/bin:$PATH`↵Linux install / Thanks"
22:44:04FromDiscord<Kirik> (edit) "its not" => "it ain't"
23:02:47FromDiscord<michaelb.eth> `sk` is the name of a user on the Linux system, is that the username you use on your system?
23:02:53FromDiscord<Graveflo> idk what did `~` evaluate to when the config file was dropped?
23:03:06FromDiscord<Nlits (Ping on reply)> In reply to @enigma "single quotes are for": Ik, I meant I mixed up some stuff, I was using double for everything
23:05:27FromDiscord<Graveflo> In reply to @Kirik "Hi, I wonder where": try running this in terminal: `cat /etc/passwd | grep ^sk`
23:06:36FromDiscord<Kirik> In reply to @Graveflo "try running this in": nothin happens...
23:07:57FromDiscord<Graveflo> welp that is odd. Are they any account names of which "sk" is a substring?
23:08:43FromDiscord<Kirik> In reply to @Graveflo "welp that is odd.": dont know, i usually dont mix at all with user account creation or edition...
23:09:11FromDiscord<Kirik> nim works and compile fine though...
23:09:43FromDiscord<Graveflo> if you type `sudo ls -an /home` in terminal do you see anything different?
23:10:47FromDiscord<Kirik> diferent than previously or what ?
23:11:30FromDiscord<Graveflo> well you sad that the folder isn't on your disk. is it present in that output? what flavor so linux is this btw
23:11:48FromDiscord<Graveflo> (edit) "so" => "of"
23:12:02FromDiscord<Kirik> mint, no, I dont see any sk folder
23:12:30FromDiscord<Kirik> it does say > total 4...but only list 3 lines
23:12:40FromDiscord<Graveflo> oh ok. try `which nim`
23:13:41FromDiscord<Kirik> > > /home/mint/.nimble/bin/nim
23:13:49FromDiscord<Kirik> still no "sk"
23:14:21FromDiscord<Graveflo> okay so it seems that config file was made on a different computer that had a different file structure. So it basically wont do anything unless that path exists at some point.
23:15:49FromDiscord<Kirik> ok, i've just made this fresh installation of nim, maybe i should reboot and see if the .config/bashrc still works or need a new edition with the correct path...