00:03:33 | FromDiscord | <dom96> In reply to @ajusa "Nim's async is still": Someday some brave soul will improve the stack traces. Although to be fair you don't need to be too brave. The current state of the stack traces is that they are just a dump of everything with no effort made to make them succinct. |
00:05:23 | FromDiscord | <exelotl> In reply to @Elegantbeef "Though i mean the": oh yeah, I'm not specifically interested in it for faster compile times, but rather from a minimalist point of view, as a way to use the language without bringing in the immense size and complexity of GCC and LLVM. |
00:07:22 | FromDiscord | <dom96> In reply to @ajusa "So something is likely": Definitely do report it. Something to try is asynchttpserver vs. httpbeast to see if one or the other triggers it. |
00:10:58 | FromDiscord | <eggmilksoup> is #internals the correct place to discuss my near-complete port of nim to a new platform? |
00:11:23 | FromDiscord | <konsumlamm> In reply to @Elegantbeef "Nim has a bunch": if only they'd work reliably... |
00:27:38 | * | BEST_Flibra_Gaia joined #nim |
00:35:00 | * | mjsir911 quit (Quit: Goodbye, World!) |
00:45:54 | * | BEST_Flibra_Gaia is now known as Polybest |
00:47:47 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
00:52:35 | FromDiscord | <michaelb.eth> In reply to @Luckayla "I started by considering": interesting! best wishes with Nim |
00:54:35 | * | Polybest quit (Quit: Ping timeout (120 seconds)) |
00:55:04 | * | BEST_Flibra_Gaia joined #nim |
00:55:30 | FromDiscord | <Luckayla> many thanks. Really enjoying it so far |
00:55:43 | FromDiscord | <Luckayla> I even found a nice lib that makes writing python c extensions quite nice |
00:55:51 | FromDiscord | <Luckayla> so it can make my python projects nicer too. |
00:57:46 | * | BEST_Flibra_Gaia is now known as ED45D1840EE724BE |
01:04:26 | FromDiscord | <Zoom> Judging from the amount of open issues, I shouldn't hope getting rid of hangs using `startProcess`, right? |
01:07:51 | FromDiscord | <Elegantbeef> No clue what do you mean? |
01:08:54 | * | ED45D1840EE724BE quit (Ping timeout: 252 seconds) |
01:16:13 | * | BEST_Flibra_Gaia joined #nim |
01:17:05 | FromDiscord | <Zoom> Detached processes hang uncontrollably, waitForExit misbehaves |
01:17:17 | FromDiscord | <Yepoleb> Nim was all nice and easy until i started using arc and threadpool, now i get random segmentation violations 🥲 |
01:18:32 | FromDiscord | <Zoom> Yep, last time I checked threadpool simply doesn't pass tests on orc |
01:22:05 | FromDiscord | <Yepoleb> I used orc for less than 5 minutes before switching to arc because the cycle collector would consistently crash after parallel reads |
01:27:34 | FromDiscord | <Yepoleb> It's this shit <https://github.com/nim-lang/Nim/issues/19105> |
01:27:43 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZJO |
01:41:56 | * | BEST_Flibra_Gaia quit (Quit: Client closed) |
01:57:54 | * | krux02 quit (Quit: Leaving) |
02:01:21 | FromDiscord | <!Patitotective> can i limit `varargs` to at least have one element? |
02:01:45 | FromDiscord | <👾 br4n_d0n> I was under the impression it needed at least one |
02:01:47 | FromDiscord | <Elegantbeef> Yea put an assertion in |
02:02:24 | FromDiscord | <!Patitotective> `assert args.len > 0`? |
02:02:39 | FromDiscord | <!Patitotective> it does not solve ambiguous calls :[ |
02:03:19 | * | TUNTAN joined #nim |
02:04:04 | FromDiscord | <Elegantbeef> you know you can do `openarray[T]` ehg |
02:04:05 | FromDiscord | <Elegantbeef> eh even |
02:04:15 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZJS |
02:04:25 | TUNTAN | Hey everyone happy to join the Nim community on IRC here |
02:04:32 | * | arkurious quit (Quit: Leaving) |
02:04:37 | FromDiscord | <Elegantbeef> Hello |
02:04:43 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "you know you can": i guess :[ |
02:05:02 | FromDiscord | <!Patitotective> In reply to @Patitotective "why do i get": beef, do you understand what this error means? |
02:05:25 | FromDiscord | <Elegantbeef> Yes your `==` is not pure |
02:05:39 | FromDiscord | <!Patitotective> pure 🤔 k |
02:05:41 | FromDiscord | <!Patitotective> (edit) removed "k" |
02:05:45 | FromDiscord | <TheEngin33r> In reply to @TUNTAN "Hey everyone happy to": Hy |
02:06:00 | FromDiscord | <Elegantbeef> Pure functions do not mutate global stat |
02:09:01 | TUNTAN | How do I reply to specifc discord messages from the IRC channel? Thanks anyone, I am new to all of this. |
02:09:29 | FromDiscord | <Elegantbeef> You just say the person's name and your response |
02:09:33 | FromDiscord | <Elegantbeef> Irc doesnt have threads or similar |
02:09:42 | TUNTAN | It seems there is a "Bot" buffering between me and the discord users |
02:10:36 | TUNTAN | FromDiscord: Elegantbeef Thank you |
02:11:10 | TUNTAN | FromDiscord: <Elegantbeef> . |
02:11:32 | FromDiscord | <Elegantbeef> You can just write "ElegantBeef" 😄 |
02:11:59 | FromDiscord | <Elegantbeef> Anyway anything else or just learning the IRC ropes? |
02:12:47 | TUNTAN | Excluding the quotes ? Of course? |
02:13:27 | TUNTAN | I know how to respond to users on IRC using the @ symbol but not responding into discord user from IRC |
02:13:59 | TUNTAN | ** but dont know responding into discord users from IRC |
02:14:45 | FromDiscord | <Elegantbeef> You just type their name, so yep no quotes |
02:15:41 | TUNTAN | @Elegantbeef Thank you |
02:15:43 | TUNTAN | Elegantbeef Thank you |
02:16:53 | FromDiscord | <Elegantbeef> Yea you pinged me on discord atleast once 😄 |
02:17:04 | TUNTAN | It worked, Thank you for the help. I was a little confused because of the BOT that handles the interoperation between the IRC channel and the discord server. |
02:17:25 | TUNTAN | Much thanks again 🙏 |
02:19:11 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZJT |
02:19:34 | FromDiscord | <!Patitotective> `tablesVal` is `seq[TomlTableRef]` 🤷♂️ |
02:20:24 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZJU |
02:21:15 | FromDiscord | <!Patitotective> same error :[ |
02:21:30 | FromDiscord | <Elegantbeef> Well the error is inside the stdlib so i dont know |
02:21:35 | FromDiscord | <Elegantbeef> I've never seen this issue before |
02:35:29 | FromDiscord | <Zectbumo> sent a code paste, see https://paste.rs/iRM |
02:37:32 | FromDiscord | <Zectbumo> https://github.com/nim-lang/Nim/blob/v1.6.6/lib/std/jsonutils.nim#L424 |
02:38:26 | FromDiscord | <Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3ZJW |
02:57:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
03:43:15 | * | rockcavera quit (Remote host closed the connection) |
05:11:51 | * | TUNTAN quit (Ping timeout: 276 seconds) |
05:19:59 | * | vicfred quit (Quit: Leaving) |
06:02:53 | FromDiscord | <Not Saucx> Hey I have a question, since nim is a compiled language, does that mean it would be more difficult to reverse engineer than a python app? Currently doing some research and I probably will start building programs in NIM |
06:03:16 | FromDiscord | <Luckayla> in theory yes, in practice It Depends™️ |
06:03:18 | FromDiscord | <Elegantbeef> Yes it'll be more difficult |
06:03:19 | FromDiscord | <Elegantbeef> And it's Nim 😄 |
06:03:25 | FromDiscord | <Not Saucx> In reply to @Luckayla "in theory yes, in": On? |
06:03:39 | FromDiscord | <Not Saucx> I haven’t seen many obfuscators for nim either which is understandable |
06:03:48 | FromDiscord | <Not Saucx> Since the language is newer |
06:04:38 | FromDiscord | <Luckayla> If szomeone wants to reverse engineer your app, nim compiles intermediately into C by standard (Though I have seen an LLVM implementation...) So it is possible to tear it down with commonly available tools. It will still be less obvious than your straight python files |
06:05:11 | FromDiscord | <Luckayla> But also, most of the time with Python you're not running it client-side, as the packaging ecosystem for python is...not very good |
06:05:34 | FromDiscord | <Luckayla> Python isn't generally the tool you reach for to build client apps, not that it isn't possible, it's just not fun. |
06:06:07 | FromDiscord | <Not Saucx> Ahh, okay that makes sense, and what about memory usage, I understand it has a decent gc? I have a python script I have coded and it needs to read big files however it eats up my memory quickly, would I be able to make something similar in nim? |
06:06:18 | FromDiscord | <Elegantbeef> Nim can be heavily optimized for memory usage |
06:06:27 | FromDiscord | <Not Saucx> Ahh okay, that’s great |
06:06:34 | FromDiscord | <Elegantbeef> Reading big files is just a general issue |
06:06:35 | FromDiscord | <Luckayla> Memory usage will be far better than python thanks to it being a compiled language |
06:06:38 | FromDiscord | <Elegantbeef> Dont read them all in memory |
06:06:55 | FromDiscord | <Not Saucx> In reply to @Elegantbeef "Dont read them all": I tried buffering with python however it’s no good |
06:06:58 | FromDiscord | <Luckayla> you can also disable GC and manually manage memory :^) (I am not recommending this, please don't hang me at the stake) |
06:07:21 | FromDiscord | <Luckayla> Python has a pretty good ecosystem for chunking large data |
06:07:22 | FromDiscord | <Luckayla> things like Dask |
06:07:36 | FromDiscord | <Not Saucx> Hmmm, does nim have a library similar to “hashlib”? |
06:07:36 | FromDiscord | <Elegantbeef> You have to stream large files regardless |
06:07:57 | FromDiscord | <Luckayla> Nam has hashing libraries yes |
06:08:02 | FromDiscord | <Elegantbeef> Well hopefulyl luckayla can answer your python ecosystem questions cause i dont fucking know anything about python 😄 |
06:08:22 | FromDiscord | <Not Saucx> In reply to @Elegantbeef "Well hopefulyl luckayla can": Are you ai or something cause I never seen a bot curse |
06:08:25 | FromDiscord | <Not Saucx> 😭 |
06:08:26 | FromDiscord | <Luckayla> I've been a python dev for something like 13 years |
06:08:32 | FromDiscord | <Luckayla> In reply to @Not Saucx "Are you ai or": it's an IRC bridge |
06:08:34 | FromDiscord | <Elegantbeef> I'm using matrix |
06:08:39 | FromDiscord | <Luckayla> Matrix bridge |
06:08:45 | FromDiscord | <Not Saucx> In reply to @Luckayla "I've been a python": What’s the name of the hashing Library btw? |
06:08:47 | FromDiscord | <Luckayla> it shows up as a bot because it's a webhook |
06:08:50 | FromDiscord | <Not Saucx> For NIM |
06:09:04 | FromDiscord | <Luckayla> In reply to @Not Saucx "What’s the name of": https://github.com/nim-lang/Nim/wiki/Curated-Packages |
06:09:08 | FromDiscord | <Elegantbeef> Nim has hashing in the stdlib |
06:09:17 | FromDiscord | <Elegantbeef> Though it's not sha256 or anything 😄 |
06:09:18 | FromDiscord | <Luckayla> ^ which is listed at the above link |
06:09:34 | FromDiscord | <enthus1ast> also just search for the hash algo that you wanna use, nim has them all (pretty much) |
06:09:52 | FromDiscord | <enthus1ast> and if not, just wrap a c lib, they're mostly quite easy to wrap |
06:10:14 | FromDiscord | <Not Saucx> Cause I need MD4/5, SHA1-512, etc… |
06:10:45 | FromDiscord | <Not Saucx> Wait so @Luckayla you said something about nim being a intermediate language, so something similar to C#? |
06:10:58 | FromDiscord | <Not Saucx> But it’s also possible to compile to LLVM? |
06:11:20 | FromDiscord | <Elegantbeef> Nim has NLVM but it generally uses C as a backend |
06:11:28 | FromDiscord | <Elegantbeef> It's intermediate like Rust is 😄 |
06:11:30 | FromDiscord | <enthus1ast> and js |
06:11:49 | FromDiscord | <Elegantbeef> It's a relatively high level system language but you can get into the nitty gritty if you need |
06:12:56 | FromDiscord | <Not Saucx> So hold on, it’s comparable to rust with syntax to that of python 😳 |
06:13:03 | FromDiscord | <Elegantbeef> Yes |
06:13:28 | FromDiscord | <Elegantbeef> You can write code as efficient as Rust/C/C++/Insert your favourite high level language here |
06:13:29 | FromDiscord | <Luckayla> In reply to @Not Saucx "Wait so <@674438327927308358> you": Nope, you just didn't read what I said, but the others have explained it. |
06:13:41 | FromDiscord | <Luckayla> In reply to @Not Saucx "So hold on, it’s": Yes, there's even a library that makes python interop super easy. |
06:14:00 | FromDiscord | <enthus1ast> but its not needet for hashing |
06:14:07 | FromDiscord | <Luckayla> https://github.com/yglukhov/nimpy |
06:14:15 | FromDiscord | <Luckayla> I will be making some good use of that |
07:33:49 | * | PMunch joined #nim |
07:37:07 | * | jmdaemon quit (Ping timeout: 258 seconds) |
07:42:16 | * | jjido joined #nim |
07:44:16 | * | TUNTAN joined #nim |
07:46:01 | * | ltriant quit (Ping timeout: 246 seconds) |
07:51:30 | * | Ekho quit (Remote host closed the connection) |
07:56:50 | * | Ekho joined #nim |
08:11:28 | * | genpaku quit (Ping timeout: 272 seconds) |
08:12:14 | * | genpaku joined #nim |
08:15:39 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:30:46 | FromDiscord | <jmgomez> Hey guys, I was wondering if the latest work in the inc compiler is in devel? |
08:31:01 | FromDiscord | <Elegantbeef> Yes |
08:32:14 | FromDiscord | <jmgomez> Cool, have you use it? I just want to test it to see if I would get an improvement on the compilation times |
08:32:24 | FromDiscord | <jmgomez> (also on the tooling?) |
08:32:32 | FromDiscord | <Elegantbeef> Of course i have used it 😄 |
08:32:44 | FromDiscord | <Elegantbeef> No you wont get much compilation time improvment |
08:33:14 | FromDiscord | <Elegantbeef> If you do it'll me a mild improvement |
08:33:52 | FromDiscord | <jmgomez> ohh, just to be clear Im not talking about the nim compilation but the cpp one |
08:34:28 | FromDiscord | <Elegantbeef> Is there a TCC equivlent for C++? |
08:34:54 | FromDiscord | <jmgomez> I dont think so and I also have to stick (on this particular project) to what UE uses |
08:35:08 | FromDiscord | <Elegantbeef> Well then you're in a shitty spot |
08:35:21 | FromDiscord | <jmgomez> xD |
08:35:37 | FromDiscord | <Elegantbeef> If Nim's not the slow part of your compilation and you cannot use a different C++ compiler you're in for a treat |
08:35:55 | FromDiscord | <Elegantbeef> Are you making debug releases? |
08:36:20 | FromDiscord | <jmgomez> I was thinking that maybe instead of telling clang to rebuild everything it would tell to just rebuild the cpp files that actually changed |
08:36:24 | FromDiscord | <jmgomez> since it's a lib |
08:36:29 | FromDiscord | <jmgomez> yes |
08:36:33 | FromDiscord | <Elegantbeef> Clang should do that automatically |
08:37:11 | FromDiscord | <Elegantbeef> I'm fairly certain clang caches |
08:37:21 | FromDiscord | <jmgomez> but it takes around 5-10 seconds (on a fast machine) I see purely cpp compiling faster |
08:37:50 | FromDiscord | <jmgomez> that's why I assumed it's building the whole thing everytime |
08:39:15 | * | sagax joined #nim |
08:40:29 | FromDiscord | <Elegantbeef> You can try `--passC:"-mincremental-linker-compatible"` |
08:40:32 | FromDiscord | <Elegantbeef> That might make it a bit faster |
08:43:29 | * | ltriant joined #nim |
08:45:38 | FromDiscord | <jmgomez> Unfortunately it's pretty much the same |
08:45:48 | FromDiscord | <Elegantbeef> That's what i figured |
08:46:39 | PMunch | Fun, the playground had crashed because the log had grown too big :P |
08:46:59 | FromDiscord | <Elegantbeef> You're welcome |
08:47:30 | FromDiscord | <Elegantbeef> To answer your question from just after i left, no destructors dont need to be exported, they type bound operations |
08:47:45 | FromDiscord | <Elegantbeef> they're type bound\ 😄 |
08:48:46 | PMunch | Nice |
08:49:20 | FromDiscord | <Elegantbeef> But it doesnt really matter since you can call them regardless |
08:50:54 | * | ltriant quit (Ping timeout: 276 seconds) |
09:27:18 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
09:29:22 | * | wallabra joined #nim |
09:32:55 | FromDiscord | <dom96> Gotta rotate your log my man |
09:38:22 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
09:40:03 | * | wallabra joined #nim |
09:41:29 | FromDiscord | <demotomohiro> !eval echo static staticExec "df -h" |
09:41:29 | NimBot | Compile failed: <no output> |
09:42:23 | * | wallabra quit (Client Quit) |
09:43:38 | FromDiscord | <IzanamiのMegumi> hi, I've just downloaded linux mint and I'm trying to make nim work in it. as both a linux and nim begginer, what exactly should I do? |
09:43:45 | * | wallabra joined #nim |
09:43:51 | FromDiscord | <IzanamiのMegumi> I think I've downloaded everything I need |
09:44:26 | FromDiscord | <dom96> In reply to @demotomohiro "!eval echo static staticExec": playground still down |
09:49:09 | FromDiscord | <j-james> In reply to @IzanamiのMegumi "hi, I've just downloaded": install choosenim either through your package manager or through its install script, and then run `choosenim stable` in the command line |
09:53:31 | FromDiscord | <IzanamiのMegumi> In reply to @j-james "install choosenim either through": it says "unable to find package choosenim" |
09:53:55 | FromDiscord | <IzanamiのMegumi> i've managed to download "nim" via the terminal though |
09:54:16 | FromDiscord | <IzanamiのMegumi> oh |
09:54:17 | FromDiscord | <IzanamiのMegumi> nvm |
09:54:41 | FromDiscord | <IzanamiのMegumi> missed the choosenim installer on the top section of the page |
09:54:45 | FromDiscord | <Zoom> https://github.com/dom96/choosenim |
09:56:38 | FromDiscord | <IzanamiのMegumi> it asks me to place a line on the ~/.profile or ~/.bashrc file |
09:56:48 | FromDiscord | <IzanamiのMegumi> what does it mean by that? |
09:57:27 | FromDiscord | <Rika> open the file and place the line |
09:57:40 | FromDiscord | <j-james> ~/.profile is a file that gets run once when you log in, ~/.bashrc is a file that gets run every time you open a terminal |
09:58:00 | FromDiscord | <j-james> it likely wants you to add nimble's binary directory to your PATH |
09:58:30 | FromDiscord | <IzanamiのMegumi> export PATH=/home/user/.nimble/bin:$PATH |
09:58:36 | FromDiscord | <IzanamiのMegumi> that's the line |
10:00:36 | FromDiscord | <j-james> yeah, add it to the end of your ~/.profile and reboot |
10:01:55 | FromDiscord | <Rika> no need to reboot, just reopen your terminal usually |
10:19:26 | PMunch | dom96, yeah I know.. |
10:19:54 | PMunch | @demotomohiro, I'm doing a bit of maintenance so the playground is down until further notice |
10:36:00 | FromDiscord | <jmgomez> hey guys any consideration when mixing generic types with genAst? I have a macro that works for regular types but doesnt with generic types. The output (repr) however works fine, the error Im getting is Error: undeclared identifier: 'TArray[FString]' which is odd because the type is available at the time it gets executed |
10:39:30 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/AeP |
10:39:39 | FromDiscord | <jmgomez> typName is what gets replaced |
10:41:26 | FromDiscord | <jmgomez> Oh I think I found the problem, obviously you cant just do ident of a generic |
11:30:49 | * | jjido joined #nim |
11:40:46 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
12:03:34 | * | dtomato quit (Remote host closed the connection) |
12:04:40 | * | dtomato joined #nim |
12:04:51 | * | dtomato quit (Remote host closed the connection) |
12:05:08 | * | dtomato joined #nim |
12:06:22 | * | dtomato quit (Remote host closed the connection) |
12:06:39 | * | dtomato joined #nim |
12:06:39 | * | dtomato quit (Read error: Connection reset by peer) |
12:07:11 | * | dtomato joined #nim |
12:07:38 | * | dtomato quit (Client Quit) |
12:08:29 | * | dtomato joined #nim |
12:15:51 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
12:16:19 | * | dtomato joined #nim |
12:23:47 | * | om3ga quit (Ping timeout: 240 seconds) |
12:39:40 | * | rockcavera joined #nim |
12:39:40 | * | rockcavera quit (Changing host) |
12:39:40 | * | rockcavera joined #nim |
12:47:25 | * | ltriant joined #nim |
12:51:56 | * | ltriant quit (Ping timeout: 255 seconds) |
12:52:05 | * | arkurious joined #nim |
13:07:25 | FromDiscord | <blashyrk> https://play.nim-lang.org/ playground is down 😦 502 from cloudflare |
13:08:18 | FromDiscord | <Yardanico> In reply to @blashyrk "https://play.nim-lang.org/ playground is down": yes, it's under maintenance |
13:08:22 | FromDiscord | <blashyrk> @jmgomez good luck with NimForUe, can't wait to try it out ^_^ |
13:08:27 | FromDiscord | <Yardanico> as alternatives there is repl.it, wandbox, tio, and others |
13:15:26 | FromDiscord | <jmgomez> In reply to @blashyrk "<@726017160115126333> good luck with": thanks! still lot to do yet but it's getting there |
13:35:27 | FromDiscord | <Rafale25> Hello, i'm new to Nim, is there some good libs for 3D graphics ? That are a little higher than raw opengl ? Similar to Pygame, Arcade, or Moderngl for Python ? |
13:35:49 | FromDiscord | <Yardanico> there are raylib bindings |
13:40:17 | PMunch | There are a couple different bindings to C libraries |
13:40:34 | PMunch | Then there's also Nico and some other native Nim game frameworks/libraries |
13:43:42 | PMunch | Playground maintenance complete, rebooting the machine now then everything should be back up and running |
13:44:15 | PMunch | Note that only the 1.6.6 version now has packages installed. This is also the default |
14:17:34 | NimEventer | New Nimble package! coap - libcoap C library wrapped in Nim with full async integration, see https://github.com/PMunch/libcoap |
14:17:34 | NimEventer | New Nimble package! ikeahomesmart - IKEA Home Smart library to monitor and control lights through the IKEA Gateway, see https://github.com/PMunch/ikeahomesmart |
14:24:07 | FromDiscord | <ajusa> In reply to @dom96 "Definitely do report it.": Works fine in Prologue, but I did need to annotate it with gcsafe |
14:27:06 | FromDiscord | <ajusa> For now I'm just compiling Jester with -a:off, will open an issue when I get around to it (bit of a hassle to reproduce as you need to be doing get requests in parallel and it is non-deterministic) |
14:37:29 | * | kenran joined #nim |
14:37:41 | * | rockcavera quit (Ping timeout: 255 seconds) |
14:47:22 | FromDiscord | <sOkam!> sent a code paste, see https://paste.rs/kAR |
14:48:01 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZLN" => "https://play.nim-lang.org/#ix=3ZLM" |
14:48:52 | * | jjido joined #nim |
14:52:30 | FromDiscord | <Rika> `&`? |
14:53:28 | FromDiscord | <sOkam!> In reply to @Rika "`&`?": ah yep! that worked. zenks 🙂 https://media.discordapp.net/attachments/371759389889003532/984470287041065080/unknown.png |
14:53:30 | * | kenran quit (Quit: WeeChat info:version) |
15:00:16 | * | rockcavera joined #nim |
15:00:16 | * | rockcavera quit (Changing host) |
15:00:16 | * | rockcavera joined #nim |
15:06:24 | * | TUNTAN quit (Ping timeout: 258 seconds) |
15:18:00 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
15:40:39 | * | xet7 quit (Remote host closed the connection) |
15:41:12 | * | om3ga joined #nim |
15:59:37 | * | derpydoo joined #nim |
16:00:11 | * | buster_blue[m] quit (Quit: You have been kicked for being idle) |
16:03:59 | * | kenran joined #nim |
16:06:43 | FromDiscord | <dom96> In reply to @ajusa "For now I'm just": Is there more to the example than just the route you’ve shared above? |
16:06:55 | FromDiscord | <dom96> (edit) "In reply to @ajusa "For now I'm just": Is there more to the ... example" added "repro" |
16:13:18 | FromDiscord | <ajusa> In reply to @dom96 "Is there more to": Technically yes, though the other code isn't being ran when I tested it |
16:13:28 | FromDiscord | <ajusa> As it is in a different route |
16:20:10 | FromDiscord | <dom96> Can you repro with just that route? |
16:20:54 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZMp |
16:22:36 | FromDiscord | <huantian> Nope Nim doesn’t know about nimble package versions |
16:23:15 | FromDiscord | <!Patitotective> and is there a way to switch between library versions? or will it always select the latest? |
16:23:44 | FromDiscord | <Yardanico> In reply to @Patitotective "and is there a": you can put specific versions into your nimble file |
16:23:56 | FromDiscord | <Yardanico> nim doesn't know about package versions, it's all on nimble |
16:24:25 | FromDiscord | <Yardanico> if you put specific versions into requires of your nimble app, then any time you run `nimble` instead of `nim` it'll only give Nim paths to the libraries you actually used |
16:24:40 | FromDiscord | <Yardanico> that's why you can't e.g. use a third-party lib you installed with `nimble` if it's not in your requires but you compile with `nimble` |
16:25:05 | FromDiscord | <!Patitotective> i dont have a nimble app :/ im running a single module↵i guess ill have to leave only the version i want |
16:37:05 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZMt |
16:39:44 | FromDiscord | <Yardanico> In reply to @sOkam! "I'm getting this error,": you're trying to execute your .nims as a bash script? |
16:40:04 | FromDiscord | <sOkam!> no, just calling it directly |
16:40:21 | FromDiscord | <Yardanico> can you show the start of it? |
16:40:28 | FromDiscord | <Yardanico> of ./src/build.nims I mean |
16:40:32 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix= |
16:41:03 | FromDiscord | <Yardanico> well, I don't know, but that error doesn't look like it's coming from nim |
16:41:39 | FromDiscord | <sOkam!> where then? im only using nimscript 🤔 |
16:41:59 | FromDiscord | <Yardanico> Nim has no "syntax error near unexpected token" error, I think your shell is trying to execute your .nims |
16:42:05 | FromDiscord | <Yardanico> I don't know why, but that's how it is |
16:42:10 | FromDiscord | <sOkam!> ah |
16:44:09 | FromDiscord | <demotomohiro> How about to adding shebang after your code runs collectly with `nim e build.nims`. |
16:46:18 | FromDiscord | <sOkam!> It was running correctly before, and that shebang had worked for me in the past 🤷♂️ |
16:46:45 | FromDiscord | <sOkam!> But ye, calling `nim thefile.nims` directly worked fine for whatever reason |
17:10:12 | FromDiscord | <dziki> Hey everyone 🙂 I have a silly question, is there an equivalent of `setw()` in Nim? I'm playing around with Nim right now doing silly things, and I wonder how to do this `cout << setw(3) << rowcolumn << " ";` in Nim |
17:11:21 | * | vicfred joined #nim |
17:11:45 | FromDiscord | <Yardanico> You can generally use strformat to format strings to your liking |
17:12:06 | FromDiscord | <Yardanico> And you can replicate what `setw` does with it easily |
17:12:21 | FromDiscord | <Yardanico> See e.g. https://nim-lang.org/docs/strformat.html#formatting-strings |
17:12:42 | FromDiscord | <Yardanico> The full description of the format specifiers is in https://nim-lang.org/docs/strformat.html#standard-format-specifiers-for-strings-integers-and-floats |
17:15:02 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
17:16:26 | * | wallabra joined #nim |
17:22:49 | FromDiscord | <dziki> sent a code paste, see https://play.nim-lang.org/#ix=3ZMF |
17:23:01 | FromDiscord | <Yardanico> just num, no need for $ or converting it to a string |
17:23:12 | FromDiscord | <Yardanico> strformat calls $ on variables passed to it automatically |
17:24:06 | FromDiscord | <dziki> ok, went a bit further, now it's a different error: Error: unhandled exception: invalid type in format string for string, expected 's', but got f [ValueError] |
17:24:22 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3ZMG |
17:25:32 | FromDiscord | <Yardanico> `f` is only valid for floating point |
17:25:44 | FromDiscord | <dziki> beautiful! Thank You! 🙂 |
17:26:42 | * | cyraxjoe quit (Ping timeout: 258 seconds) |
17:27:07 | * | cyraxjoe joined #nim |
17:29:03 | * | genpaku quit (Remote host closed the connection) |
17:32:41 | * | genpaku joined #nim |
17:39:24 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3ZMK |
17:41:16 | FromDiscord | <exelotl> I wanna say "destroy" as `create` is the stdlib function to allocate zeroed memory with the size of a type. But I already have a few procs called destroy 😅 |
17:47:33 | * | genpaku quit (Quit: leaving) |
17:48:42 | * | genpaku joined #nim |
17:48:59 | FromDiscord | <dziki> seekAndDestroy |
17:49:38 | FromDiscord | <huantian> destroyButWereDoingCInterop |
18:16:35 | * | pro joined #nim |
18:23:39 | FromDiscord | <sOkam!> How would you handle a file download from nimscript?↵Is there std procs for it, or would it need something external? |
18:24:16 | FromDiscord | <sOkam!> I can always do `exec "wget thefile"`, but wondering if there is something more system agnostic |
18:38:01 | * | Guest77 joined #nim |
18:38:49 | * | Guest77 quit (Client Quit) |
18:47:41 | * | kenran quit (Quit: WeeChat info:version) |
18:48:04 | FromDiscord | <Sebastian Valmont> file download can be done a million of different ways |
18:48:40 | FromDiscord | <Sebastian Valmont> it largely depends on the protocol of the website/backend |
18:50:03 | FromDiscord | <Sebastian Valmont> for example, if you need to download from ftp, you can use ftp library |
18:57:28 | FromDiscord | <kraptor> While fixing https://github.com/nim-lang/Nim/issues/19850, Inkscape export broke full transparency on both SVG and PNG files for the logo and I noticed right now. Can someone review and merge PR https://github.com/nim-lang/assets/pull/8 so we have a proper light/dark logo, please 🙂 |
19:20:28 | * | derpydoo quit (Quit: derpydoo) |
19:28:07 | NimEventer | New post on r/nim by NetsuDagneel: What will Nim version 2 be like?, see https://reddit.com/r/nim/comments/v8opft/what_will_nim_version_2_be_like/ |
19:38:26 | FromDiscord | <sOkam!> How could recursive file listing be achieved in nimscript?↵Can you think of a way to iterate over an arbitrary number of subfolders, to get `listFiles(".")` on each of them?↵https://nim-lang.org/docs/nimscript.html#listFiles%2Cstring |
19:39:01 | FromDiscord | <Yardanico> just call your function recursively? |
19:39:26 | FromDiscord | <sOkam!> I've never done recursion, I don't know how to do it |
19:39:54 | FromDiscord | <Yardanico> call the procedure from itself |
19:40:02 | FromDiscord | <Yardanico> also, I'm going to ask again - why are you doing it as NimScript? |
19:40:08 | FromDiscord | <Yardanico> you're clearly calling nim itself to run the NimScript fles anyway |
19:40:18 | FromDiscord | <Yardanico> so you can just do `nim r` instead and have access to all of nim stdlib |
19:40:54 | FromDiscord | <sOkam!> because its a bash-like file. i don't want to compile it |
19:41:00 | FromDiscord | <Yardanico> but why? |
19:41:11 | FromDiscord | <Yardanico> it can be "bash-like" even when it's natively compiled |
19:42:52 | FromDiscord | <sOkam!> In reply to @Yardanico "call the procedure from": do you have a dummie example of this? |
19:43:24 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3ZN9 |
19:43:39 | FromDiscord | <Yardanico> anyway, IMO you're just limiting yourself with NimScript at this point |
19:46:11 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNa |
19:46:23 | FromDiscord | <Yardanico> you can pass it recursively with `var` in argument type i guess |
19:46:28 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZNa" => "https://play.nim-lang.org/#ix=3ZNb" |
19:47:25 | FromDiscord | <sOkam!> end result would be a `seq[string]`, with each file listed in it↵but i have no clue how to get the files on each level |
19:53:32 | FromDiscord | <Yardanico> just get them like you do normally |
19:55:03 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNf |
20:04:26 | FromDiscord | <sOkam!> Could this iterator be useful for this?↵https://nim-lang.org/docs/os.html#walkDirRec.i%2Cstring |
20:05:07 | FromDiscord | <sOkam!> (edit) "this?↵https://nim-lang.org/docs/os.html#walkDirRec.i%2Cstring" => "this?↵I don't really understand what "yield for each" means↵https://nim-lang.org/docs/os.html#walkDirRec.i%2Cstring" |
20:07:40 | FromDiscord | <Yardanico> yes that will be very useful, but i don't know if it works in nimscript |
20:07:43 | FromDiscord | <Yardanico> but it 100% works in normal nim |
20:24:04 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNq |
20:25:07 | FromDiscord | <Yardanico> what line is 84 |
20:25:08 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZNq" => "https://play.nim-lang.org/#ix=3ZNs" |
20:25:15 | FromDiscord | <Yardanico> ah yeah you have "id, it" |
20:25:21 | FromDiscord | <Yardanico> walkDirRec only returns 1 string |
20:29:19 | FromDiscord | <sOkam!> `walkPattern` didn't work, it said that its not available in nimscript/js↵but `walkDirRec` seems to not be giving that err |
20:32:19 | FromDiscord | <!Patitotective> https://github.com/Patitotective/niprefs/releases/tag/0.3.0 👀 |
20:46:24 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNy |
20:47:21 | FromDiscord | <Elegantbeef> Iterators cannot be filtered |
20:47:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZNz |
20:48:03 | * | ltriant joined #nim |
20:48:26 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNA |
20:48:51 | FromDiscord | <Elegantbeef> Well you're doing something wrong then |
20:52:09 | FromDiscord | <sOkam!> now its working, same syntax 🧩↵might have forgotten to save that one time? 🤔 |
20:52:41 | * | ltriant quit (Ping timeout: 256 seconds) |
21:07:34 | FromDiscord | <sOkam!> sent a code paste, see https://paste.rs/vca |
21:08:53 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZNI" => "https://play.nim-lang.org/#ix=3ZNH" |
21:14:28 | * | pro quit (Quit: pro) |
21:33:51 | * | jmdaemon joined #nim |
22:13:31 | * | krux02 joined #nim |
22:20:07 | * | jjido joined #nim |
22:20:32 | * | PMunch quit (Quit: leaving) |
23:10:33 | * | genpaku quit (Quit: leaving) |
23:11:25 | FromDiscord | <Elegantbeef> Well @huantian it seems like it wasnt as complex to get unexpanded AST in error messages from the compiler, only issue is that it causes some issues with other things 😄 |
23:11:52 | FromDiscord | <huantian> I guess that's to be expanded huh 😛 |
23:12:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZO5 |
23:12:48 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZO6 |
23:14:26 | FromDiscord | <Elegantbeef> Cmon huan fix the tests for me 😛 |
23:14:39 | * | ltriant joined #nim |
23:15:12 | FromDiscord | <huantian> do you have a PR already? |
23:15:25 | FromDiscord | <huantian> also that is pretttty nice |
23:15:35 | FromDiscord | <Elegantbeef> I have a branch no PR yet https://github.com/beef331/Nim/tree/unexpandmacros |
23:16:09 | FromDiscord | <Elegantbeef> I dont know if my solution is even wise, i just add a PNode to the AST and if it's not a proc and it has expanded code it hold onto it's source code |
23:17:36 | FromDiscord | <huantian> kinda funny https://media.discordapp.net/attachments/371759389889003532/984597158839857162/unknown.png |
23:18:11 | FromDiscord | <huantian> In reply to @Elegantbeef "I dont know if": hmm... |
23:22:22 | FromDiscord | <huantian> I can't think of anything better off the top of my head |
23:26:44 | * | krux02 quit (Remote host closed the connection) |
23:27:38 | FromDiscord | <Elegantbeef> Consider `proc(): Future[void] {.async.}` the resultant ast is `async(proc(): Future[void])` so if you hold onto the unexpanded AST and print that in a typemismatch message you get a fucky `expected 'async(proc(): Future[void])' ...` |
23:27:42 | FromDiscord | <Girvo> Hello 🙂 |
23:28:12 | FromDiscord | <Elegantbeef> Uh oh |
23:28:27 | FromDiscord | <Girvo> haha good morning to you too 😉 |
23:28:31 | FromDiscord | <Elegantbeef> Girvo's hellos are always followed by some question! |
23:28:37 | FromDiscord | <Girvo> Not this morning 😄 |
23:28:42 | FromDiscord | <Girvo> (not yet anyway lol) |
23:28:51 | FromDiscord | <Elegantbeef> Damn i knew i woke up late but jeez 530pm is morning?! |
23:28:51 | FromDiscord | <Girvo> (guarantee I'll have one at some point) |
23:29:01 | FromDiscord | <Girvo> In reply to @Elegantbeef "Damn i knew i": Yeah welcome to programmer life 😉 |
23:29:12 | FromDiscord | <Girvo> (Its 9.30am here, work day just started) |
23:29:31 | FromDiscord | <Elegantbeef> And yea huan i didnt fix the macro i didnt realize until about now that the macro was the issue and not my changes |
23:30:56 | FromDiscord | <Elegantbeef> Yea this is the culprit, it doesnt do anything but stringify variables |
23:30:58 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/sugar.nim#L174-L181 |
23:35:30 | FromDiscord | <huantian> yeah interesting macro |
23:35:37 | FromDiscord | <huantian> i've never actually used it |
23:37:57 | * | noeontheend joined #nim |
23:41:00 | FromDiscord | <Girvo> I'm having a lot of fun (seriously, not sarcastic) writing a UDP server and packet protocol for our IoT platform. Aside from Netty, are there other examples anyones aware of around UDP in Nim? I'm basically just doing what I'd do in C at the moment lol, because we don't need the guarantees that Netty (or ENet) give us |
23:42:13 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
23:57:09 | FromDiscord | <Elegantbeef> You can just use `std/net` |
23:57:30 | FromDiscord | <Elegantbeef> Or asyncnet or netstreams 😄 |
23:58:03 | FromDiscord | <j-james> beef, what extensions do you use for kate? |
23:58:05 | FromDiscord | <j-james> just nimlsp? |
23:58:13 | FromDiscord | <Elegantbeef> Yep |