<< 05-10-2025 >>

00:52:27FromDiscord<sunpoke04> In reply to @Elegantbeef "You could just emit": yea, I'm just using js target bc I'll need to fetch from my api
00:52:40FromDiscord<sunpoke04> but since I'm used to using pure js, meh
00:53:16FromDiscord<sunpoke04> I like using events anyways
03:38:32FromDiscord<prestosilver> In reply to @sunpoke04 "yea, I'm just using": Nim for this is better than my approach tho tbh https://media.discordapp.net/attachments/371759389889003532/1424239307417321554/Screenshot_20250817_201215_Chrome.jpg?ex=68e339b7&is=68e1e837&hm=bcadc8231b7cbedc01fd7adf2b721202f5196971d0a841c7e7df3fc75521b294&
05:15:11*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
05:15:42*SchweinDeBurg joined #nim
09:10:12*beholders_eye joined #nim
12:32:09FromDiscord<random_user1999> In reply to @sunpoke04 "in a scale of": what theme is this
12:32:23FromDiscord<random_user1999> if you dont mind
12:32:25FromDiscord<random_user1999> looks nice
12:34:02FromDiscord<tearsinrain__> hey hey digging into nim
12:34:23FromDiscord<tearsinrain__> much better than zig imo for what i want
12:34:48FromDiscord<random_user1999> welcome
12:34:51FromDiscord<tearsinrain__> is there a way i can see the momentum in nim adoption over the years (repos / lines of code written on gh, packages deployed etc)
12:35:11FromDiscord<tearsinrain__> im building some high frequency trading tooling and want to understand the landscape and ecosystem
12:35:55FromDiscord<tearsinrain__> In reply to @random_user1999 "welcome": ty ty
12:42:15FromDiscord<random_user1999> In reply to @tearsinrain__ "im building some high": y not use rust of c++
12:42:19FromDiscord<random_user1999> u need no GC
12:42:27FromDiscord<random_user1999> (edit) "of" => "or"
12:45:44FromDiscord<tearsinrain__> rust is overrated
12:45:50FromDiscord<tearsinrain__> c++ is overcomplicated
12:46:01FromDiscord<tearsinrain__> nim is cool because it has enough speed with a really good developer experience
12:46:15FromDiscord<tearsinrain__> so not only is my code fast, my development is fast
12:46:54FromDiscord<tearsinrain__> In reply to @random_user1999 "u need no GC": also from what i understand, nim is tunable in this regard and if i need to juice out performance even more, then i can take the railing i wrote in nim and optimize it further with something even lower level like c/cpp
12:47:17FromDiscord<random_user1999> In reply to @tearsinrain__ "c++ is overcomplicated": oh word?
12:47:40FromDiscord<random_user1999> this is the person that wants to build an entire trading tool
12:47:46FromDiscord<tearsinrain__> ?
12:47:51FromDiscord<tearsinrain__> are you being sarcastic
12:47:58FromDiscord<ieltan> I think it's a troll
12:48:12FromDiscord<tearsinrain__> yeah he sounds like a dipshit
12:48:17FromDiscord<random_user1999> how u gonna talk about over complicated when u already making something ridiculously hard
12:48:34FromDiscord<tearsinrain__> lmao how the fuck is a socket connection to a fix endpoint 'ridiculously hard'
12:48:41FromDiscord<lainlaylie> settle down, children...
12:48:48FromDiscord<tearsinrain__> you sound like you just graduated college and got your first job
12:48:49FromDiscord<ieltan> Anyways welcome! As far I know, Status.im is the main sponsor of Nim and have built extensive tooling and libraries to support their use cases which is crypto trading if I remember correctly
12:48:51FromDiscord<random_user1999> “high frequency trading tooling”
12:48:55FromDiscord<random_user1999> aka realtime
12:49:02FromDiscord<tearsinrain__> literally simple as fuck dude
12:49:06FromDiscord<ieltan> @random_user1999 chill out random user 999
12:49:16FromDiscord<random_user1999> aight
12:49:17FromDiscord<tearsinrain__> In reply to @ieltan "Anyways welcome! As far": thanks man!
12:49:22FromDiscord<ieltan> If you're not going to help then please don't say anything...
12:49:35FromDiscord<tearsinrain__> ah ok cool. so nim has sponsorship
12:49:43FromDiscord<tearsinrain__> and status is a cool sponsor
12:49:53FromDiscord<ieltan> https://github.com/status-im
12:49:57FromDiscord<random_user1999> In reply to @ieltan "Anyways welcome! As far": isnt there client also built with nim
12:50:27FromDiscord<tearsinrain__> In reply to @ieltan "https://github.com/status-im": oh shit ok
12:50:27FromDiscord<random_user1999> qt iirc
12:51:59FromDiscord<tearsinrain__> bro how old are you
12:53:29FromDiscord<random_user1999> i got an idea
12:53:37FromDiscord<random_user1999> if its simple as fuck why dont u go make it
12:53:44FromDiscord<tearsinrain__> i am
12:53:46FromDiscord<random_user1999> shouldnt take long
12:53:47FromDiscord<tearsinrain__> in nim
12:53:55FromDiscord<tearsinrain__> thats why im asking about the ecosystem
12:54:01FromDiscord<random_user1999> then why u ask so many pointless questions when u building it already in nim
12:54:05FromDiscord<tearsinrain__> and the support i can expect in the future
12:54:17FromDiscord<random_user1999> oh so u build something then question the support
12:54:19FromDiscord<random_user1999> interesting
12:54:23FromDiscord<tearsinrain__> because when deciding a newer language, you want to make sure that it keeps growing in 5 years
12:54:27FromDiscord<ieltan> Nim landscape currently looks like this:↵- multiple users making a whole bunch of very useful libraries still used to this day (https://github.com/treeform https://github.com/juancarlospaco https://github.com/PMunch https://github.com/beef331) might have missed a couple but these are the main users I consume libraries from ↵- status libraries ↵- anything else in nimble.directory
12:54:36FromDiscord<tearsinrain__> lest you get stuck with code you need to replace in the future
12:54:46FromDiscord<tearsinrain__> same thing for zig
12:54:52FromDiscord<tearsinrain__> or crystal or whatever
12:54:52FromDiscord<ieltan> Note that a lot of the time the stdlib I'll get you far already
12:55:04FromDiscord<ieltan> @random_user1999 can you actually stop lol
12:55:04FromDiscord<tearsinrain__> theyre all attractive but you need to make a judgement call based on how new they are
12:55:13FromDiscord<random_user1999> In reply to @ieltan "<@1298184541734834229> can you actually": hear this person out bruh
12:55:14FromDiscord<ieltan> I might have to ping the mods
12:55:16FromDiscord<tearsinrain__> In reply to @ieltan "<@1298184541734834229> can you actually": its ok. hes special needs
12:55:21FromDiscord<tearsinrain__> i dont take offense to it
12:55:26FromDiscord<tearsinrain__> my cousin is special needs
12:55:29FromDiscord<tearsinrain__> i understand
12:55:32FromDiscord<random_user1999> he builds the product THEN asks about how future proof it is
12:55:34FromDiscord<random_user1999> lmao
12:55:46FromDiscord<ieltan> I really don't want one guys first experience with the community to be one annoying dude questioning your life or something
12:55:51FromDiscord<tearsinrain__> lmao
12:56:09FromDiscord<tearsinrain__> dont worry ill just come back around when he has to go to middle school tomorrow morning
12:56:25FromDiscord<ieltan> <@&371760044473319454> might need to calm the channel down
12:56:31FromDiscord<lainlaylie> anyway... ARC is essentially destructor injection and ORC adds a cycle collector on top, so the MM overhead should be small and deterministic if you don't have cyclic structures
12:57:25FromDiscord<ieltan> @tearsinrain I'll be honest though, if there's something you don't find on nimble or from any of the guys I've posted you'll probably have to make it yourself
12:57:34FromDiscord<tearsinrain__> thats fine
12:57:38FromDiscord<tearsinrain__> im not doing anything too heavy atm
12:57:48FromDiscord<ieltan> If there's anything nim is good at is that you can make bindings for c libraries
12:58:07FromDiscord<tearsinrain__> i just want to know that the community is growing and active so that i can have confidence that my code wont have to be ported to something else in the future
12:58:26FromDiscord<tearsinrain__> but everything im doing is low level enough that i can work with the stdlib or some simple libraries
12:58:28FromDiscord<ieltan> Well it's definitely not dying if that's what you're worried about
12:58:34FromDiscord<tearsinrain__> good
12:58:42FromDiscord<tearsinrain__> i looked into it a few years ago and it seemed cool
12:58:53FromDiscord<tearsinrain__> but now i have the actual need because rust is a pain in my fucking ass
12:59:09FromDiscord<tearsinrain__> too verbose for what i want to do which is rapid development with speed
12:59:57FromDiscord<ieltan> Not sure where I can get any statistics from but my personal impression so far is that Nim's growing steadily
13:00:37FromDiscord<pmunch> In reply to @ieltan "<@&371760044473319454> might need to": Indeed, let's ease up on the name calling and general hostility.
13:00:45FromDiscord<tearsinrain__> Yeah I just checked so tags and it beats zig
13:00:58FromDiscord<tearsinrain__> And has about as many Google results as cpp
13:01:01FromDiscord<ieltan> It's ok I think it's cooled down thanks
13:01:20FromDiscord<ieltan> Since you're here maybe you could get in the conversation 😄
13:01:52FromDiscord<pmunch> And yeah, Nim is probably not going anywhere anytime soon, and there are a lot of knowledge people here and on the forums ready to help 🙂
13:02:52FromDiscord<pmunch> Documentation is going to be worse than a big language, but in my personal experience it's good enough to get you along
13:02:59FromDiscord<mitranim> TBH I wish I had found Nim years ago when I was switching from Clojure and choosing between Rust and Go (you can guess the choice). Probably would have been happier by now. But the one thing currently bugging me is the lack of an officially "production ready" HTTP server
13:03:36FromDiscord<sunpoke04> In reply to @prestosilver "Nim for this is": ouch, my heart hurts only from seeing that
13:03:58FromDiscord<sunpoke04> In reply to @random_user1999 "what theme is this": retrobox (one of neovim's default ones)
13:04:08FromDiscord<random_user1999> In reply to @sunpoke04 "retrobox (one of neovim's": thanks
13:04:35FromDiscord<random_user1999> In reply to @mitranim "TBH I wish I": mummy?
13:05:04FromDiscord<random_user1999> https://github.com/guzba/mummy
13:05:43FromDiscord<mitranim> Oh, that's nice to know about
13:05:55FromDiscord<mitranim> My bad for not searching properly
13:06:02FromDiscord<random_user1999> In reply to @mitranim "My bad for not": np man
13:10:14FromDiscord<lainlaylie> there are some very interesting repositories getting created on the nim github org..
13:12:07FromDiscord<tearsinrain__> In reply to @pmunch "Documentation is going to": Nah tbh it was fine
13:12:50FromDiscord<tearsinrain__> Maybe some video tutorials could be needed but the syntax is clear and everything is pretty basic (besides maybe getting into the ast stuff but I’m not doing any meta programming)
13:13:55FromDiscord<tearsinrain__> In reply to @mitranim "TBH I wish I": lol exactly. I was between cpp and rust for what I’m doing and cpp is has a libraries out the ass for trading applications but this is a green field codebase so that doesn’t matter
13:14:42FromDiscord<tearsinrain__> And rust felt like it was getting rammed down my throat and too “new paradigm!!!!” for me
13:15:18FromDiscord<tearsinrain__> Nim feels like a good jump off point from Python for high performance plus I really liked the nimpy package
13:15:55FromDiscord<pmunch> In reply to @tearsinrain__ "Maybe some video tutorials": Then you are missing out! Metaprogramming is a fantastic tool
13:20:19FromDiscord<kiloneie> In reply to @mitranim "TBH I wish I": I wish i found it back in high school when i found Pure Basic, BUT, the lack of documentation would of killed me, as i just came from loving GameMaker and it's documentation with examples for everything, and PB also had it, whilst Nim... not so much.
13:21:00FromDiscord<kiloneie> In reply to @tearsinrain__ "Maybe some video tutorials": My channel has some, and i was making Metaprogramming essentials... i owe that and 2 more...
13:21:18FromDiscord<kiloneie> Written version that i don't like is there...
13:21:42FromDiscord<kiloneie> https://kiloneie.github.io/Work%20in%20Progress/WIP%201/essentialKnowledge.html
13:22:06FromDiscord<kiloneie> (any problems anyone finds, please do point them out, somewhere)
13:29:43FromDiscord<prestosilver> In reply to @tearsinrain__ "Nim feels like a": Really imho the only issue nim has that python dosent is that its almost too expressive. Theres nothing forcing you to keep anything consistent, so if you have the persistence to just stay consistent then nim is great a great lang even for multi year projects. Just be super careful with it bc it always has so many ways to do things, which means theres tipically a ton of ways to set up
13:30:20FromDiscord<prestosilver> really hot take, saying something can be too expressive, but I think thats the best way to word the issues ive had with my projects throughout the years in nim
13:31:10FromDiscord<aethrvmn> In reply to @pmunch "Then you are missing": For me it's also a trap because I feel like I need to make a new DSL for every new thing
13:33:27FromDiscord<random_user1999> i mean tbh i find it hard to justify nim over go 99% of the times
13:33:50FromDiscord<random_user1999> seems like with hows fast cpus are theses days speed isnt that much of an issue
13:33:58FromDiscord<random_user1999> (edit) "hows" => "how"
13:34:06FromDiscord<random_user1999> (edit) "theses" => "these"
13:34:26FromDiscord<random_user1999> esp when all i make is cli tools
13:36:43*xet7 joined #nim
13:38:27*xet7 quit (Remote host closed the connection)
13:42:08*xet7 joined #nim
13:56:39*xet7 quit (Ping timeout: 252 seconds)
13:56:50*xet7 joined #nim
14:07:59FromDiscord<pmunch> In reply to @aethrvmn "For me it's also": Haha, yeah that's definitely a risk 😅
14:26:55FromDiscord<kiloneie> In reply to @aethrvmn "For me it's also": If you get good at it, you can send that to Araq if you want a job of that...
14:46:44FromDiscord<kiloneie> Since 1 space after `## ` documentation comments is preferred, how about normal comments ? I think i prefer no space with those...
14:48:44FromDiscord<kiloneie> Looks like 1 space for all, even the extension for zed(nimlangserver probably), makes one space indentation
15:02:45*derpydoo joined #nim
15:02:57FromDiscord<lainlaylie> 1 space
15:14:30*xet7 quit (Ping timeout: 245 seconds)
15:16:30*xet7 joined #nim
15:40:33FromDiscord<kiloneie> Is there a way that this warning goes away ? https://media.discordapp.net/attachments/371759389889003532/1424421005174247534/Screenshot_2025-10-05_17-40-08.png?ex=68e3e2f0&is=68e29170&hm=b4987a0d1e79ffad6959b0da2775c5f21b03c4759fc11d81dd905af3b664aa5c&
15:42:12Amun-Rayes, move runnableExamples before the first line of the function body
15:42:46FromDiscord<kiloneie> Is that the intended way ?...
15:43:30Amun-Rayes
15:43:32Amun-Rahttps://play.nim-lang.org/#pasty=iyEzpRIN
15:43:49Amun-Rahere's an example from stdlib: https://play.nim-lang.org/#pasty=ukIxaibt
15:44:52FromDiscord<kiloneie> I am not sure if i like it in that order...
15:45:15Amun-Raand I'm not a fan of runnableExamples at all
15:45:25FromDiscord<kiloneie> Why not ?
15:46:39Amun-Rathey make a function longer (aka less readable)
15:46:57FromDiscord<kiloneie> Well, that's why i've always placed them at the end...
15:47:02FromDiscord<mitranim> I just wish the convention was to place them at the end
15:47:08FromDiscord<mitranim> I want to read the actual code first
15:47:30Amun-Raand comments should contain only the information not the running code (separation of concerns)
15:48:21FromDiscord<kiloneie> In reply to @Amun-Ra "and comments should contain": If you are refering to my first proc at top of the screenshot, don't, that's old code, it won't stay like that.
15:48:36Amun-Raand that's what tests are for
15:48:48FromDiscord<kiloneie> i like standalone things...
15:49:55*xet7 quit (Ping timeout: 245 seconds)
15:50:50FromDiscord<tearsinrain__> In reply to @prestosilver "Really imho the only": Yeah? Do you have some examples you can share with me?
15:50:58Amun-Raimho if a runnable example takes more that a single line it should go into a dedicated test unit
15:51:08FromDiscord<tearsinrain__> In reply to @kiloneie "My channel has some,": Swag going yo check them out asap
15:52:03FromDiscord<tearsinrain__> In reply to @pmunch "Then you are missing": Hahahaha I believe it. Just I want to start small and with structured tests so I gain a mastery of the language before wanting to change it up 😁
15:53:12Amun-Ragood thing is nim allows you to refactor easily wihout rewriting a lot of code :>
15:53:20FromDiscord<kiloneie> In reply to @Amun-Ra "imho if a runnable": https://media.discordapp.net/attachments/371759389889003532/1424424226009514229/Screenshot_2025-10-05_17-53-09.png?ex=68e3e5f0&is=68e29470&hm=04313448e8e152a34d8c23efd0efe78f2928dddcc612481a924e8982ef7945ed&
15:55:22Amun-Rakiloneie: this should work too: result = keyboardStateCurrent[scancode.ord] > 0
15:55:43Amun-Raor even: keyboardStateCurrent[scancode.ord] > 0
15:56:23FromDiscord<prestosilver> In reply to @tearsinrain__ "Yeah? Do you have": Style insensitivity alone is a good one bc it is way too insensitive, but also things like mixing command syntax with normal calls can get weird if you do it alot. And if your inconsistent with indentation itll get messy fast. Theres also structural things tho too, like import loops can get pretty overboard. I think this nim playground kinda sums it. https://play.nim-lang.org/#pasty=
15:56:56FromDiscord<prestosilver> (edit) "it." => "the syntax end of it tho."
15:57:33FromDiscord<kiloneie> In reply to @Amun-Ra "<@398205119583485964>: this should work": But that then uses Scancodes(physical keyboard layout)... i want Keycodes(virtual layout based, QWERTZ, QWERTY). Or am i missing something... ?
15:58:03Amun-Rakiloneie: I mean if foo: true else: false if a little too verbose and can be written just as: foo
15:58:39FromDiscord<kiloneie> oh, that part
15:58:52FromDiscord<kiloneie> That's possible ?... https://media.discordapp.net/attachments/371759389889003532/1424425616702439536/Screenshot_2025-10-05_17-58-17.png?ex=68e3e73b&is=68e295bb&hm=d090dc710667d541e552159705e26283f297d85b3bf3ad4cbe0c88de3f340a39&
15:59:00FromDiscord<prestosilver> unfortunalty
15:59:05FromDiscord<prestosilver> (edit) "unfortunalty" => "unfortunatly"
15:59:08FromDiscord<kiloneie> i've never done .echo before either...
15:59:28FromDiscord<kiloneie> i know of UFCS, but ...
15:59:29FromDiscord<prestosilver> yea its cursed and shouldnt be done ever but works
15:59:49Amun-Rayou don't even have to use ()
16:00:05Amun-Rabtw, I use arg.func 99% of the time
16:00:25Amun-Rathen func arg, then func(…)
16:00:27FromDiscord<prestosilver> yea, nims getter setters using normal syntax are great
16:00:28FromDiscord<kiloneie> In reply to @Amun-Ra "<@398205119583485964>: this should work": But the result variable is not allowed in templates(haven't even ran it yet)
16:00:47Amun-Rakiloneie: that's why I removed it in the next line ;)
16:01:22FromDiscord<prestosilver> (edit) "yea, nims ... getter" added "ability to make"
16:01:28FromDiscord<prestosilver> (edit) "are" => "is"
16:01:51FromDiscord<kiloneie> Wait, if you have just 1 bool part, the other is implicitly placed ?
16:01:54*xet7 joined #nim
16:02:15Amun-Ra1 bool part?
16:03:02Amun-Raby default a function returns a default value (not recommended, you should always set it explicitely)
16:03:12Amun-Rafor bool it's false
16:04:56FromDiscord<kiloneie> I've forgotten why i like UFCS already... I just know, i NEED them <.<
16:20:15*derpydoo quit (Quit: derpydoo)
17:21:26FromDiscord<sunpoke04> Is there a way to load a .env file and check env on compile time?
17:27:38Amun-Rasunpoke04: getEnv works in compile time
17:28:03Amun-Ranot sure what's .env file tho
17:28:15FromDiscord<sunpoke04> In reply to @Amun-Ra "<@329770603030642689>: getEnv works in": it doesn't load from dotenv though, that's the thing
17:28:59Amun-RagetEnv is a wrapper for getenv(3)
17:29:28Amun-Raif you have env vars stored in .env file read the file directly
17:30:22FromDiscord<sunpoke04> wdym?
17:30:52Amun-Rause staticRead and parse its contents
17:31:58FromDiscord<sunpoke04> what... write a whole lexer/parser just for that seems kinda counterintuitive
17:32:19Amun-Ra¯\(ツ)/¯
17:32:40Amun-Ralexer/parser? it's a simple key=value text file
17:33:11Amun-Rawhat's the use case btw?
17:36:58FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=yuLWNMmA
17:37:53FromDiscord<sunpoke04> In reply to @Amun-Ra "lexer/parser? it's a simple": a kv text file that has multiple ways of writing a string, has different types, a lot of stuff
17:40:43Amun-Rasunpoke04: regarding the example from the paste - this will be a constant in a resulting binary code
17:40:45FromDiscord<prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=XjmxjOyU
17:41:45FromDiscord<prestosilver> (edit) "https://play.nim-lang.org/#pasty=NeTkftKy" => "https://play.nim-lang.org/#pasty=hWOZVpkn"
17:41:55Amun-Rahttps://play.nim-lang.org/#pasty=xcyIHEWF
17:42:14FromDiscord<kiloneie> There is `staticRead` too(if that helps).
17:42:59Amun-Rasunpoke04: "that has multiple ways of writing a string, has different types, a lot of stuff" so… not a .env file
17:43:14FromDiscord<sunpoke04> In reply to @Amun-Ra "<@329770603030642689>: "that has multiple": that's literally what an env file is though...
17:44:32Amun-Raah, I see it has string interpolation and multiline strings
17:44:46FromDiscord<prestosilver> Dang didnt know it was that nuanced
17:45:12Amun-Raif that's used in compile-time you control the format
17:45:12FromDiscord<prestosilver> do people even use multiline much, I mean theres problaby a usecase somewhere wild feature tho
17:46:29Amun-Raand imho getEnv("SERVER_URL") should be placed in nimble file rather that in the source
17:47:19FromDiscord<sunpoke04> In reply to @Amun-Ra "and imho getEnv("SERVER_URL") should": I'm not even using that, it's just erm... there?
17:47:57FromDiscord<sunpoke04> I haven't touched it, that's what I mean
17:53:00Amun-Rais that for docker etc?
17:53:40FromDiscord<sunpoke04> not rn, but it probably will be
17:54:13FromDiscord<sunpoke04> I hate docker, but yea
17:54:34Amun-RaI share your feelings ;)
17:55:13FromDiscord<sunpoke04> unfortunately I'm too stupid even if I have my own vps, lol
17:59:00Amun-Raif that's only for your own builds and you won't use string interpolations etc use can use my function
18:00:44Amun-Ras/use can/you can/
18:01:05FromDiscord<sunpoke04> In reply to @Amun-Ra "s/use can/you can/": that doesn't work with discord irc btw :d
18:01:29FromDiscord<sunpoke04> will try, thx
18:02:12FromDiscord<lainlaylie> the point of runnableExamples is they're part of the documentation but are compiled and run when doing `nim doc` to guarantee that they stay current
18:02:22FromDiscord<lainlaylie> so they ought to go with the rest of the docs
18:02:52Amun-Rasunpoke04: that doesn't work in irc neither; it's just a convention ;)
18:03:14Amun-Rasunpoke04: aka "I'm old" ;)
18:03:28FromDiscord<sunpoke04> aah, that's a thing on discord though, it just doesn't work though irc
18:03:57Amun-Raoh, I wasn't aware of that, thanks
18:04:18FromDiscord<mitranim> One downside of placing documentation code into actual code is that it increases compilation times outside of testing, but I suppose the effects are minor since Nim doesn't bother typechecking that stuff
18:05:52Amun-RaI guess the difference is miniscule
18:12:05FromDiscord<sunpoke04> In reply to @Amun-Ra "https://play.nim-lang.org/#pasty=xcyIHEWF": aaand I just found out that if the file doesn't exist it just kabooms and I can't use `os.fileExists` for some reason, maybe it's not comptime
18:12:46FromDiscord<sunpoke04> https://github.com/nim-lang/Nim/blob/version-2-2/lib/std/private/oscommon.nim#L111 yea, not comptime
18:14:07Amun-Raright
18:14:11Amun-Rahmm
18:16:08Amun-RaI don't know how to make it optional
18:17:50FromDiscord<sunpoke04> to the bash lords, ig?
18:18:04FromDiscord<sunpoke04> time to actually learn bash, lol
18:19:24FromDiscord<sunpoke04> surely someone has made a dotenv loader in bash, right
18:23:10*xet7 quit (Remote host closed the connection)
18:54:35*beholders_eye quit (Quit: WeeChat 4.6.3)
18:58:02*beholders_eye joined #nim
19:18:37*beholders_eye quit (Ping timeout: 264 seconds)
19:19:38FromDiscord<Robyn [She/Her]> In reply to @prestosilver "I always just do": you should use `.split(1)`
19:19:48FromDiscord<Robyn [She/Her]> it limits how many splits a string can be cut into
20:07:38anddamtrying > choosenim.exe --verbose update self on Windows I get
20:07:43anddam Info: Couldn't download file from https://github.com/dom96/choosenim/releases/download/v0.8.16/choosenim-0.8.16_windows_amd64.exe.
20:07:45anddam ... Response was: Expected HTTP code 200 got 404
20:08:26anddamnow this seems accurate since https://github.com/dom96/choosenim/releases shows last release as 0.8.4 from 2022, but where does choosenim get the notion there should be a 0.8.16?
20:10:05anddamoh nice, winget shows a ChooseNim NimLang.ChooseNim 0.8.14 winget
20:12:46anddamohh and nimbnle has a 0.8.16 version
20:12:49anddamI am confused though
20:16:40FromDiscord<lainlaylie> dom96 choosenim is dead, use the one in nim-lang
20:20:48anddammeaning https://github.com/nim-lang/choosenim
20:21:08anddamoh I see, it has proper releases
20:22:12FromDiscord<lainlaylie> as for why dom96 choosenim thinks it has a 0.8.16: https://github.com/dom96/choosenim/blob/d929b737ef6b042a946c88a5fd2cdee64af6c292/src/choosenimpkg/channel.nim#L15
20:38:46anddamI see, thx
20:39:16anddamdifferent topic, I am following nimx's README https://github.com/yglukhov/nimx
20:40:25anddaminstalling with nimble -dy I get to yglukhov/wasmrt and there I get
20:40:30anddamoserrors.nim(92) raiseOSError
20:40:32anddam Error: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
20:40:34anddam ... Additional info: ("C:\\Users\\andda\\.nimble\\pkgcache\\githubcom_yglukhovwasmrt_0.1.0\\wasmrt\\wasm2html.exe", "C:\\Users\\andda\\.nimble\\pkgs2\\wasmrt-0.1.0-cc9d38e4d7f7d71b37c0a84a2aa7bb972f26cd1e\\wasmrt\\wasm2html.exe")
20:40:51anddamwho is performing such a check?
20:51:43*beholders_eye joined #nim
21:08:17FromDiscord<Elegantbeef> Windows defender
21:42:16*beholders_eye quit (Ping timeout: 256 seconds)
21:47:20FromDiscord<sunpoke04> In reply to @anddam "trying >": just use scoop...
22:47:26FromDiscord<aintea> In reply to @sunpoke04 "surely someone has made": yes, it's called `. .env`
22:50:25FromDiscord<sunpoke04> In reply to @aintea "yes, it's called `.": `.` is a command in bash, wat
22:50:29FromDiscord<sunpoke04> I just used `source`
22:50:37FromDiscord<aintea> I think source is bash only
22:50:42FromDiscord<aintea> in shell it's `.`
22:50:45FromDiscord<aintea> afaik
22:50:55FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=hgeuSPnG
22:51:02FromDiscord<sunpoke04> source was giving some problems
22:51:35FromDiscord<aintea> yep `.` is a shell builtin
22:51:39FromDiscord<sunpoke04> don't ask me what that is, I have no idea
22:51:40FromDiscord<aintea> just checked
22:51:45FromDiscord<sunpoke04> I know it works
22:52:00FromDiscord<mitranim> Shell specifics aside, happily using `-include` in Make for years and years
22:52:01FromDiscord<aintea> just `[[ -f "$ENVFILE" ]] && . "$ENVFILE"`
22:52:10FromDiscord<aintea> (edit) "`[[" => "`[" | "]]" => "]"
22:52:13FromDiscord<aintea> shell compliant
22:52:32FromDiscord<sunpoke04> In reply to @aintea "just `[ -f "$ENVFILE"": ew... also wtf is that
22:52:34FromDiscord<mitranim> (edit) "Shell specifics aside, happily using `-include` in Make for years and years ... " added "(for `.env.properties` files)"
22:52:45FromDiscord<sunpoke04> this is a wendy's, lol
22:52:56FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=hVQyOMOs
22:53:02FromDiscord<aintea> the single bracket is shell compliant
22:53:05FromDiscord<aintea> the double is bash only
22:53:29FromDiscord<aintea> `[ -f "$ENVFILE" ] && . "$ENVFILE` does exactly what you want, just alias it to `loadenv` in your bashrc
22:53:55FromDiscord<sunpoke04> erm
22:53:56FromDiscord<aintea> (edit) ""$ENVFILE`" => ""$ENVFILE"`"
22:53:57FromDiscord<sunpoke04> windows
22:54:14FromDiscord<sunpoke04> also that just looks weird, I'll keep the if block
22:54:15FromDiscord<aintea> oh windows
22:54:24FromDiscord<aintea> In reply to @sunpoke04 "also that just looks": that's actual bash
22:54:27FromDiscord<aintea> bash is sorcery
22:54:31FromDiscord<aintea> master its magic
22:54:43FromDiscord<sunpoke04> I should've used c instead ;d
22:55:12FromDiscord<aintea> why would you
22:55:23FromDiscord<sunpoke04> nob.h and `nim c`? dunno
22:55:28FromDiscord<aintea> the whole goal of a script is to be fast to write, fast to run and fast to modify
22:56:35FromDiscord<sunpoke04> https://github.com/tsoding/nob.h I mean, this kinda does it
22:58:18*LuckyMan joined #nim
23:17:57FromDiscord<sunpoke04> Anyone that has ever worked with nim targetting js knows how events work there? I'm very used to js events but in nim I'm just very lost.↵How can I like, add data to the event or tag the event with a name? Is that event possible?
23:21:49FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=bnRoIvEZ
23:22:06FromDiscord<Robyn [She/Her]> i prolly need to handle quoted values but eh
23:22:44FromDiscord<Robyn [She/Her]> haven't tested but should work
23:23:50FromDiscord<Robyn [She/Her]> In reply to @sunpoke04 "Anyone that has ever": i believe the jsffi library has a way to bind to events
23:24:23FromDiscord<Robyn [She/Her]> nvm
23:25:45FromDiscord<Robyn [She/Her]> In reply to @sunpoke04 "Anyone that has ever": ah here: https://nim-lang.org/docs/dom.html#addEventListener%2CEventTarget%2Ccstring%2Cproc%28Event%29%2CAddEventListenerOptions
23:27:27FromDiscord<sunpoke04> In reply to @battery.acid.bubblegum "ah here: https://nim-lang.org/docs/dom.html#addEven": yea, ik that exists, but what about custom events?
23:27:43FromDiscord<sunpoke04> https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent like this guy
23:27:47FromDiscord<Robyn [She/Her]> hmm
23:28:38FromDiscord<Robyn [She/Her]> https://nim-lang.org/docs/dom.html#ClipboardEvent well if you look here, this seems to be how they implement events
23:28:42FromDiscord<Robyn [She/Her]> you can prolly do similar
23:29:33FromDiscord<sunpoke04> It needs to be ref object, but even then, how do I pass it, how do I bind it to a name
23:29:36FromDiscord<sunpoke04> that's what I mean
23:30:08FromDiscord<sunpoke04> https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent this guy accepts an event with a name
23:30:29FromDiscord<sunpoke04> I think that's the wrong one, but it has an example on the custom event one
23:31:34*LuckyMan quit (Quit: LuckyMan)
23:31:39FromDiscord<Robyn [She/Her]> ah, you mean custom fields for custom events
23:31:40FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=IVlYxsfA
23:31:43FromDiscord<sunpoke04> and names
23:31:47FromDiscord<sunpoke04> (edit) "names" => "names/tags"
23:34:43FromDiscord<Robyn [She/Her]> hmm yeahhh, sorry but I'm clueless
23:34:56FromDiscord<Robyn [She/Her]> hopefully someone else with more knowledge can help
23:35:46FromDiscord<sunpoke04> welcome to the club :
23:35:47FromDiscord<sunpoke04> (edit) ":" => ":d"
23:36:16FromDiscord<Robyn [She/Her]> 😔
23:36:39FromDiscord<Robyn [She/Her]> if it helps, you can emit straight up JS if needed, but ideally obviously don't :p
23:36:54FromDiscord<Robyn [She/Her]> just read through the docs and hope for an epiphany lel
23:39:28FromDiscord<sunpoke04> maybe I can just have something like `emitStartEvent` and implement it on js, dunno
23:40:59FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=HTIaieSa
23:41:19FromDiscord<sunpoke04> dunno how to say the functions are from elsewhere, btw
23:41:28FromDiscord<sunpoke04> I just copied what I read from std/dom