00:52:27 | FromDiscord | <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:40 | FromDiscord | <sunpoke04> but since I'm used to using pure js, meh |
00:53:16 | FromDiscord | <sunpoke04> I like using events anyways |
03:38:32 | FromDiscord | <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:09 | FromDiscord | <random_user1999> In reply to @sunpoke04 "in a scale of": what theme is this |
12:32:23 | FromDiscord | <random_user1999> if you dont mind |
12:32:25 | FromDiscord | <random_user1999> looks nice |
12:34:02 | FromDiscord | <tearsinrain__> hey hey digging into nim |
12:34:23 | FromDiscord | <tearsinrain__> much better than zig imo for what i want |
12:34:48 | FromDiscord | <random_user1999> welcome |
12:34:51 | FromDiscord | <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:11 | FromDiscord | <tearsinrain__> im building some high frequency trading tooling and want to understand the landscape and ecosystem |
12:35:55 | FromDiscord | <tearsinrain__> In reply to @random_user1999 "welcome": ty ty |
12:42:15 | FromDiscord | <random_user1999> In reply to @tearsinrain__ "im building some high": y not use rust of c++ |
12:42:19 | FromDiscord | <random_user1999> u need no GC |
12:42:27 | FromDiscord | <random_user1999> (edit) "of" => "or" |
12:45:44 | FromDiscord | <tearsinrain__> rust is overrated |
12:45:50 | FromDiscord | <tearsinrain__> c++ is overcomplicated |
12:46:01 | FromDiscord | <tearsinrain__> nim is cool because it has enough speed with a really good developer experience |
12:46:15 | FromDiscord | <tearsinrain__> so not only is my code fast, my development is fast |
12:46:54 | FromDiscord | <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:17 | FromDiscord | <random_user1999> In reply to @tearsinrain__ "c++ is overcomplicated": oh word? |
12:47:40 | FromDiscord | <random_user1999> this is the person that wants to build an entire trading tool |
12:47:46 | FromDiscord | <tearsinrain__> ? |
12:47:51 | FromDiscord | <tearsinrain__> are you being sarcastic |
12:47:58 | FromDiscord | <ieltan> I think it's a troll |
12:48:12 | FromDiscord | <tearsinrain__> yeah he sounds like a dipshit |
12:48:17 | FromDiscord | <random_user1999> how u gonna talk about over complicated when u already making something ridiculously hard |
12:48:34 | FromDiscord | <tearsinrain__> lmao how the fuck is a socket connection to a fix endpoint 'ridiculously hard' |
12:48:41 | FromDiscord | <lainlaylie> settle down, children... |
12:48:48 | FromDiscord | <tearsinrain__> you sound like you just graduated college and got your first job |
12:48:49 | FromDiscord | <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:51 | FromDiscord | <random_user1999> “high frequency trading tooling” |
12:48:55 | FromDiscord | <random_user1999> aka realtime |
12:49:02 | FromDiscord | <tearsinrain__> literally simple as fuck dude |
12:49:06 | FromDiscord | <ieltan> @random_user1999 chill out random user 999 |
12:49:16 | FromDiscord | <random_user1999> aight |
12:49:17 | FromDiscord | <tearsinrain__> In reply to @ieltan "Anyways welcome! As far": thanks man! |
12:49:22 | FromDiscord | <ieltan> If you're not going to help then please don't say anything... |
12:49:35 | FromDiscord | <tearsinrain__> ah ok cool. so nim has sponsorship |
12:49:43 | FromDiscord | <tearsinrain__> and status is a cool sponsor |
12:49:53 | FromDiscord | <ieltan> https://github.com/status-im |
12:49:57 | FromDiscord | <random_user1999> In reply to @ieltan "Anyways welcome! As far": isnt there client also built with nim |
12:50:27 | FromDiscord | <tearsinrain__> In reply to @ieltan "https://github.com/status-im": oh shit ok |
12:50:27 | FromDiscord | <random_user1999> qt iirc |
12:51:59 | FromDiscord | <tearsinrain__> bro how old are you |
12:53:29 | FromDiscord | <random_user1999> i got an idea |
12:53:37 | FromDiscord | <random_user1999> if its simple as fuck why dont u go make it |
12:53:44 | FromDiscord | <tearsinrain__> i am |
12:53:46 | FromDiscord | <random_user1999> shouldnt take long |
12:53:47 | FromDiscord | <tearsinrain__> in nim |
12:53:55 | FromDiscord | <tearsinrain__> thats why im asking about the ecosystem |
12:54:01 | FromDiscord | <random_user1999> then why u ask so many pointless questions when u building it already in nim |
12:54:05 | FromDiscord | <tearsinrain__> and the support i can expect in the future |
12:54:17 | FromDiscord | <random_user1999> oh so u build something then question the support |
12:54:19 | FromDiscord | <random_user1999> interesting |
12:54:23 | FromDiscord | <tearsinrain__> because when deciding a newer language, you want to make sure that it keeps growing in 5 years |
12:54:27 | FromDiscord | <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:36 | FromDiscord | <tearsinrain__> lest you get stuck with code you need to replace in the future |
12:54:46 | FromDiscord | <tearsinrain__> same thing for zig |
12:54:52 | FromDiscord | <tearsinrain__> or crystal or whatever |
12:54:52 | FromDiscord | <ieltan> Note that a lot of the time the stdlib I'll get you far already |
12:55:04 | FromDiscord | <ieltan> @random_user1999 can you actually stop lol |
12:55:04 | FromDiscord | <tearsinrain__> theyre all attractive but you need to make a judgement call based on how new they are |
12:55:13 | FromDiscord | <random_user1999> In reply to @ieltan "<@1298184541734834229> can you actually": hear this person out bruh |
12:55:14 | FromDiscord | <ieltan> I might have to ping the mods |
12:55:16 | FromDiscord | <tearsinrain__> In reply to @ieltan "<@1298184541734834229> can you actually": its ok. hes special needs |
12:55:21 | FromDiscord | <tearsinrain__> i dont take offense to it |
12:55:26 | FromDiscord | <tearsinrain__> my cousin is special needs |
12:55:29 | FromDiscord | <tearsinrain__> i understand |
12:55:32 | FromDiscord | <random_user1999> he builds the product THEN asks about how future proof it is |
12:55:34 | FromDiscord | <random_user1999> lmao |
12:55:46 | FromDiscord | <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:51 | FromDiscord | <tearsinrain__> lmao |
12:56:09 | FromDiscord | <tearsinrain__> dont worry ill just come back around when he has to go to middle school tomorrow morning |
12:56:25 | FromDiscord | <ieltan> <@&371760044473319454> might need to calm the channel down |
12:56:31 | FromDiscord | <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:25 | FromDiscord | <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:34 | FromDiscord | <tearsinrain__> thats fine |
12:57:38 | FromDiscord | <tearsinrain__> im not doing anything too heavy atm |
12:57:48 | FromDiscord | <ieltan> If there's anything nim is good at is that you can make bindings for c libraries |
12:58:07 | FromDiscord | <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:26 | FromDiscord | <tearsinrain__> but everything im doing is low level enough that i can work with the stdlib or some simple libraries |
12:58:28 | FromDiscord | <ieltan> Well it's definitely not dying if that's what you're worried about |
12:58:34 | FromDiscord | <tearsinrain__> good |
12:58:42 | FromDiscord | <tearsinrain__> i looked into it a few years ago and it seemed cool |
12:58:53 | FromDiscord | <tearsinrain__> but now i have the actual need because rust is a pain in my fucking ass |
12:59:09 | FromDiscord | <tearsinrain__> too verbose for what i want to do which is rapid development with speed |
12:59:57 | FromDiscord | <ieltan> Not sure where I can get any statistics from but my personal impression so far is that Nim's growing steadily |
13:00:37 | FromDiscord | <pmunch> In reply to @ieltan "<@&371760044473319454> might need to": Indeed, let's ease up on the name calling and general hostility. |
13:00:45 | FromDiscord | <tearsinrain__> Yeah I just checked so tags and it beats zig |
13:00:58 | FromDiscord | <tearsinrain__> And has about as many Google results as cpp |
13:01:01 | FromDiscord | <ieltan> It's ok I think it's cooled down thanks |
13:01:20 | FromDiscord | <ieltan> Since you're here maybe you could get in the conversation 😄 |
13:01:52 | FromDiscord | <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:52 | FromDiscord | <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:59 | FromDiscord | <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:36 | FromDiscord | <sunpoke04> In reply to @prestosilver "Nim for this is": ouch, my heart hurts only from seeing that |
13:03:58 | FromDiscord | <sunpoke04> In reply to @random_user1999 "what theme is this": retrobox (one of neovim's default ones) |
13:04:08 | FromDiscord | <random_user1999> In reply to @sunpoke04 "retrobox (one of neovim's": thanks |
13:04:35 | FromDiscord | <random_user1999> In reply to @mitranim "TBH I wish I": mummy? |
13:05:04 | FromDiscord | <random_user1999> https://github.com/guzba/mummy |
13:05:43 | FromDiscord | <mitranim> Oh, that's nice to know about |
13:05:55 | FromDiscord | <mitranim> My bad for not searching properly |
13:06:02 | FromDiscord | <random_user1999> In reply to @mitranim "My bad for not": np man |
13:10:14 | FromDiscord | <lainlaylie> there are some very interesting repositories getting created on the nim github org.. |
13:12:07 | FromDiscord | <tearsinrain__> In reply to @pmunch "Documentation is going to": Nah tbh it was fine |
13:12:50 | FromDiscord | <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:55 | FromDiscord | <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:42 | FromDiscord | <tearsinrain__> And rust felt like it was getting rammed down my throat and too “new paradigm!!!!” for me |
13:15:18 | FromDiscord | <tearsinrain__> Nim feels like a good jump off point from Python for high performance plus I really liked the nimpy package |
13:15:55 | FromDiscord | <pmunch> In reply to @tearsinrain__ "Maybe some video tutorials": Then you are missing out! Metaprogramming is a fantastic tool |
13:20:19 | FromDiscord | <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:00 | FromDiscord | <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:18 | FromDiscord | <kiloneie> Written version that i don't like is there... |
13:21:42 | FromDiscord | <kiloneie> https://kiloneie.github.io/Work%20in%20Progress/WIP%201/essentialKnowledge.html |
13:22:06 | FromDiscord | <kiloneie> (any problems anyone finds, please do point them out, somewhere) |
13:29:43 | FromDiscord | <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:20 | FromDiscord | <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:10 | FromDiscord | <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:27 | FromDiscord | <random_user1999> i mean tbh i find it hard to justify nim over go 99% of the times |
13:33:50 | FromDiscord | <random_user1999> seems like with hows fast cpus are theses days speed isnt that much of an issue |
13:33:58 | FromDiscord | <random_user1999> (edit) "hows" => "how" |
13:34:06 | FromDiscord | <random_user1999> (edit) "theses" => "these" |
13:34:26 | FromDiscord | <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:59 | FromDiscord | <pmunch> In reply to @aethrvmn "For me it's also": Haha, yeah that's definitely a risk 😅 |
14:26:55 | FromDiscord | <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:44 | FromDiscord | <kiloneie> Since 1 space after `## ` documentation comments is preferred, how about normal comments ? I think i prefer no space with those... |
14:48:44 | FromDiscord | <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:57 | FromDiscord | <lainlaylie> 1 space |
15:14:30 | * | xet7 quit (Ping timeout: 245 seconds) |
15:16:30 | * | xet7 joined #nim |
15:40:33 | FromDiscord | <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:12 | Amun-Ra | yes, move runnableExamples before the first line of the function body |
15:42:46 | FromDiscord | <kiloneie> Is that the intended way ?... |
15:43:30 | Amun-Ra | yes |
15:43:32 | Amun-Ra | https://play.nim-lang.org/#pasty=iyEzpRIN |
15:43:49 | Amun-Ra | here's an example from stdlib: https://play.nim-lang.org/#pasty=ukIxaibt |
15:44:52 | FromDiscord | <kiloneie> I am not sure if i like it in that order... |
15:45:15 | Amun-Ra | and I'm not a fan of runnableExamples at all |
15:45:25 | FromDiscord | <kiloneie> Why not ? |
15:46:39 | Amun-Ra | they make a function longer (aka less readable) |
15:46:57 | FromDiscord | <kiloneie> Well, that's why i've always placed them at the end... |
15:47:02 | FromDiscord | <mitranim> I just wish the convention was to place them at the end |
15:47:08 | FromDiscord | <mitranim> I want to read the actual code first |
15:47:30 | Amun-Ra | and comments should contain only the information not the running code (separation of concerns) |
15:48:21 | FromDiscord | <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:36 | Amun-Ra | and that's what tests are for |
15:48:48 | FromDiscord | <kiloneie> i like standalone things... |
15:49:55 | * | xet7 quit (Ping timeout: 245 seconds) |
15:50:50 | FromDiscord | <tearsinrain__> In reply to @prestosilver "Really imho the only": Yeah? Do you have some examples you can share with me? |
15:50:58 | Amun-Ra | imho if a runnable example takes more that a single line it should go into a dedicated test unit |
15:51:08 | FromDiscord | <tearsinrain__> In reply to @kiloneie "My channel has some,": Swag going yo check them out asap |
15:52:03 | FromDiscord | <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:12 | Amun-Ra | good thing is nim allows you to refactor easily wihout rewriting a lot of code :> |
15:53:20 | FromDiscord | <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:22 | Amun-Ra | kiloneie: this should work too: result = keyboardStateCurrent[scancode.ord] > 0 |
15:55:43 | Amun-Ra | or even: keyboardStateCurrent[scancode.ord] > 0 |
15:56:23 | FromDiscord | <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:56 | FromDiscord | <prestosilver> (edit) "it." => "the syntax end of it tho." |
15:57:33 | FromDiscord | <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:03 | Amun-Ra | kiloneie: I mean if foo: true else: false if a little too verbose and can be written just as: foo |
15:58:39 | FromDiscord | <kiloneie> oh, that part |
15:58:52 | FromDiscord | <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:00 | FromDiscord | <prestosilver> unfortunalty |
15:59:05 | FromDiscord | <prestosilver> (edit) "unfortunalty" => "unfortunatly" |
15:59:08 | FromDiscord | <kiloneie> i've never done .echo before either... |
15:59:28 | FromDiscord | <kiloneie> i know of UFCS, but ... |
15:59:29 | FromDiscord | <prestosilver> yea its cursed and shouldnt be done ever but works |
15:59:49 | Amun-Ra | you don't even have to use () |
16:00:05 | Amun-Ra | btw, I use arg.func 99% of the time |
16:00:25 | Amun-Ra | then func arg, then func(…) |
16:00:27 | FromDiscord | <prestosilver> yea, nims getter setters using normal syntax are great |
16:00:28 | FromDiscord | <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:47 | Amun-Ra | kiloneie: that's why I removed it in the next line ;) |
16:01:22 | FromDiscord | <prestosilver> (edit) "yea, nims ... getter" added "ability to make" |
16:01:28 | FromDiscord | <prestosilver> (edit) "are" => "is" |
16:01:51 | FromDiscord | <kiloneie> Wait, if you have just 1 bool part, the other is implicitly placed ? |
16:01:54 | * | xet7 joined #nim |
16:02:15 | Amun-Ra | 1 bool part? |
16:03:02 | Amun-Ra | by default a function returns a default value (not recommended, you should always set it explicitely) |
16:03:12 | Amun-Ra | for bool it's false |
16:04:56 | FromDiscord | <kiloneie> I've forgotten why i like UFCS already... I just know, i NEED them <.< |
16:20:15 | * | derpydoo quit (Quit: derpydoo) |
17:21:26 | FromDiscord | <sunpoke04> Is there a way to load a .env file and check env on compile time? |
17:27:38 | Amun-Ra | sunpoke04: getEnv works in compile time |
17:28:03 | Amun-Ra | not sure what's .env file tho |
17:28:15 | FromDiscord | <sunpoke04> In reply to @Amun-Ra "<@329770603030642689>: getEnv works in": it doesn't load from dotenv though, that's the thing |
17:28:59 | Amun-Ra | getEnv is a wrapper for getenv(3) |
17:29:28 | Amun-Ra | if you have env vars stored in .env file read the file directly |
17:30:22 | FromDiscord | <sunpoke04> wdym? |
17:30:52 | Amun-Ra | use staticRead and parse its contents |
17:31:58 | FromDiscord | <sunpoke04> what... write a whole lexer/parser just for that seems kinda counterintuitive |
17:32:19 | Amun-Ra | ¯\(ツ)/¯ |
17:32:40 | Amun-Ra | lexer/parser? it's a simple key=value text file |
17:33:11 | Amun-Ra | what's the use case btw? |
17:36:58 | FromDiscord | <sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=yuLWNMmA |
17:37:53 | FromDiscord | <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:43 | Amun-Ra | sunpoke04: regarding the example from the paste - this will be a constant in a resulting binary code |
17:40:45 | FromDiscord | <prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=XjmxjOyU |
17:41:45 | FromDiscord | <prestosilver> (edit) "https://play.nim-lang.org/#pasty=NeTkftKy" => "https://play.nim-lang.org/#pasty=hWOZVpkn" |
17:41:55 | Amun-Ra | https://play.nim-lang.org/#pasty=xcyIHEWF |
17:42:14 | FromDiscord | <kiloneie> There is `staticRead` too(if that helps). |
17:42:59 | Amun-Ra | sunpoke04: "that has multiple ways of writing a string, has different types, a lot of stuff" so… not a .env file |
17:43:14 | FromDiscord | <sunpoke04> In reply to @Amun-Ra "<@329770603030642689>: "that has multiple": that's literally what an env file is though... |
17:44:32 | Amun-Ra | ah, I see it has string interpolation and multiline strings |
17:44:46 | FromDiscord | <prestosilver> Dang didnt know it was that nuanced |
17:45:12 | Amun-Ra | if that's used in compile-time you control the format |
17:45:12 | FromDiscord | <prestosilver> do people even use multiline much, I mean theres problaby a usecase somewhere wild feature tho |
17:46:29 | Amun-Ra | and imho getEnv("SERVER_URL") should be placed in nimble file rather that in the source |
17:47:19 | FromDiscord | <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:57 | FromDiscord | <sunpoke04> I haven't touched it, that's what I mean |
17:53:00 | Amun-Ra | is that for docker etc? |
17:53:40 | FromDiscord | <sunpoke04> not rn, but it probably will be |
17:54:13 | FromDiscord | <sunpoke04> I hate docker, but yea |
17:54:34 | Amun-Ra | I share your feelings ;) |
17:55:13 | FromDiscord | <sunpoke04> unfortunately I'm too stupid even if I have my own vps, lol |
17:59:00 | Amun-Ra | if that's only for your own builds and you won't use string interpolations etc use can use my function |
18:00:44 | Amun-Ra | s/use can/you can/ |
18:01:05 | FromDiscord | <sunpoke04> In reply to @Amun-Ra "s/use can/you can/": that doesn't work with discord irc btw :d |
18:01:29 | FromDiscord | <sunpoke04> will try, thx |
18:02:12 | FromDiscord | <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:22 | FromDiscord | <lainlaylie> so they ought to go with the rest of the docs |
18:02:52 | Amun-Ra | sunpoke04: that doesn't work in irc neither; it's just a convention ;) |
18:03:14 | Amun-Ra | sunpoke04: aka "I'm old" ;) |
18:03:28 | FromDiscord | <sunpoke04> aah, that's a thing on discord though, it just doesn't work though irc |
18:03:57 | Amun-Ra | oh, I wasn't aware of that, thanks |
18:04:18 | FromDiscord | <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:52 | Amun-Ra | I guess the difference is miniscule |
18:12:05 | FromDiscord | <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:46 | FromDiscord | <sunpoke04> https://github.com/nim-lang/Nim/blob/version-2-2/lib/std/private/oscommon.nim#L111 yea, not comptime |
18:14:07 | Amun-Ra | right |
18:14:11 | Amun-Ra | hmm |
18:16:08 | Amun-Ra | I don't know how to make it optional |
18:17:50 | FromDiscord | <sunpoke04> to the bash lords, ig? |
18:18:04 | FromDiscord | <sunpoke04> time to actually learn bash, lol |
18:19:24 | FromDiscord | <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:38 | FromDiscord | <Robyn [She/Her]> In reply to @prestosilver "I always just do": you should use `.split(1)` |
19:19:48 | FromDiscord | <Robyn [She/Her]> it limits how many splits a string can be cut into |
20:07:38 | anddam | trying > choosenim.exe --verbose update self on Windows I get |
20:07:43 | anddam | 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:45 | anddam | ... Response was: Expected HTTP code 200 got 404 |
20:08:26 | anddam | now 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:05 | anddam | oh nice, winget shows a ChooseNim NimLang.ChooseNim 0.8.14 winget |
20:12:46 | anddam | ohh and nimbnle has a 0.8.16 version |
20:12:49 | anddam | I am confused though |
20:16:40 | FromDiscord | <lainlaylie> dom96 choosenim is dead, use the one in nim-lang |
20:20:48 | anddam | meaning https://github.com/nim-lang/choosenim |
20:21:08 | anddam | oh I see, it has proper releases |
20:22:12 | FromDiscord | <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:46 | anddam | I see, thx |
20:39:16 | anddam | different topic, I am following nimx's README https://github.com/yglukhov/nimx |
20:40:25 | anddam | installing with nimble -dy I get to yglukhov/wasmrt and there I get |
20:40:30 | anddam | oserrors.nim(92) raiseOSError |
20:40:32 | anddam | Error: Operation did not complete successfully because the file contains a virus or potentially unwanted software. |
20:40:34 | anddam | ... 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:51 | anddam | who is performing such a check? |
20:51:43 | * | beholders_eye joined #nim |
21:08:17 | FromDiscord | <Elegantbeef> Windows defender |
21:42:16 | * | beholders_eye quit (Ping timeout: 256 seconds) |
21:47:20 | FromDiscord | <sunpoke04> In reply to @anddam "trying >": just use scoop... |
22:47:26 | FromDiscord | <aintea> In reply to @sunpoke04 "surely someone has made": yes, it's called `. .env` |
22:50:25 | FromDiscord | <sunpoke04> In reply to @aintea "yes, it's called `.": `.` is a command in bash, wat |
22:50:29 | FromDiscord | <sunpoke04> I just used `source` |
22:50:37 | FromDiscord | <aintea> I think source is bash only |
22:50:42 | FromDiscord | <aintea> in shell it's `.` |
22:50:45 | FromDiscord | <aintea> afaik |
22:50:55 | FromDiscord | <sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=hgeuSPnG |
22:51:02 | FromDiscord | <sunpoke04> source was giving some problems |
22:51:35 | FromDiscord | <aintea> yep `.` is a shell builtin |
22:51:39 | FromDiscord | <sunpoke04> don't ask me what that is, I have no idea |
22:51:40 | FromDiscord | <aintea> just checked |
22:51:45 | FromDiscord | <sunpoke04> I know it works |
22:52:00 | FromDiscord | <mitranim> Shell specifics aside, happily using `-include` in Make for years and years |
22:52:01 | FromDiscord | <aintea> just `[[ -f "$ENVFILE" ]] && . "$ENVFILE"` |
22:52:10 | FromDiscord | <aintea> (edit) "`[[" => "`[" | "]]" => "]" |
22:52:13 | FromDiscord | <aintea> shell compliant |
22:52:32 | FromDiscord | <sunpoke04> In reply to @aintea "just `[ -f "$ENVFILE"": ew... also wtf is that |
22:52:34 | FromDiscord | <mitranim> (edit) "Shell specifics aside, happily using `-include` in Make for years and years ... " added "(for `.env.properties` files)" |
22:52:45 | FromDiscord | <sunpoke04> this is a wendy's, lol |
22:52:56 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=hVQyOMOs |
22:53:02 | FromDiscord | <aintea> the single bracket is shell compliant |
22:53:05 | FromDiscord | <aintea> the double is bash only |
22:53:29 | FromDiscord | <aintea> `[ -f "$ENVFILE" ] && . "$ENVFILE` does exactly what you want, just alias it to `loadenv` in your bashrc |
22:53:55 | FromDiscord | <sunpoke04> erm |
22:53:56 | FromDiscord | <aintea> (edit) ""$ENVFILE`" => ""$ENVFILE"`" |
22:53:57 | FromDiscord | <sunpoke04> windows |
22:54:14 | FromDiscord | <sunpoke04> also that just looks weird, I'll keep the if block |
22:54:15 | FromDiscord | <aintea> oh windows |
22:54:24 | FromDiscord | <aintea> In reply to @sunpoke04 "also that just looks": that's actual bash |
22:54:27 | FromDiscord | <aintea> bash is sorcery |
22:54:31 | FromDiscord | <aintea> master its magic |
22:54:43 | FromDiscord | <sunpoke04> I should've used c instead ;d |
22:55:12 | FromDiscord | <aintea> why would you |
22:55:23 | FromDiscord | <sunpoke04> nob.h and `nim c`? dunno |
22:55:28 | FromDiscord | <aintea> the whole goal of a script is to be fast to write, fast to run and fast to modify |
22:56:35 | FromDiscord | <sunpoke04> https://github.com/tsoding/nob.h I mean, this kinda does it |
22:58:18 | * | LuckyMan joined #nim |
23:17:57 | FromDiscord | <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:49 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=bnRoIvEZ |
23:22:06 | FromDiscord | <Robyn [She/Her]> i prolly need to handle quoted values but eh |
23:22:44 | FromDiscord | <Robyn [She/Her]> haven't tested but should work |
23:23:50 | FromDiscord | <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:23 | FromDiscord | <Robyn [She/Her]> nvm |
23:25:45 | FromDiscord | <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:27 | FromDiscord | <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:43 | FromDiscord | <sunpoke04> https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent like this guy |
23:27:47 | FromDiscord | <Robyn [She/Her]> hmm |
23:28:38 | FromDiscord | <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:42 | FromDiscord | <Robyn [She/Her]> you can prolly do similar |
23:29:33 | FromDiscord | <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:36 | FromDiscord | <sunpoke04> that's what I mean |
23:30:08 | FromDiscord | <sunpoke04> https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent this guy accepts an event with a name |
23:30:29 | FromDiscord | <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:39 | FromDiscord | <Robyn [She/Her]> ah, you mean custom fields for custom events |
23:31:40 | FromDiscord | <sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=IVlYxsfA |
23:31:43 | FromDiscord | <sunpoke04> and names |
23:31:47 | FromDiscord | <sunpoke04> (edit) "names" => "names/tags" |
23:34:43 | FromDiscord | <Robyn [She/Her]> hmm yeahhh, sorry but I'm clueless |
23:34:56 | FromDiscord | <Robyn [She/Her]> hopefully someone else with more knowledge can help |
23:35:46 | FromDiscord | <sunpoke04> welcome to the club : |
23:35:47 | FromDiscord | <sunpoke04> (edit) ":" => ":d" |
23:36:16 | FromDiscord | <Robyn [She/Her]> 😔 |
23:36:39 | FromDiscord | <Robyn [She/Her]> if it helps, you can emit straight up JS if needed, but ideally obviously don't :p |
23:36:54 | FromDiscord | <Robyn [She/Her]> just read through the docs and hope for an epiphany lel |
23:39:28 | FromDiscord | <sunpoke04> maybe I can just have something like `emitStartEvent` and implement it on js, dunno |
23:40:59 | FromDiscord | <sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=HTIaieSa |
23:41:19 | FromDiscord | <sunpoke04> dunno how to say the functions are from elsewhere, btw |
23:41:28 | FromDiscord | <sunpoke04> I just copied what I read from std/dom |