<< 09-06-2022 >>

00:03:33FromDiscord<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:23FromDiscord<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:22FromDiscord<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:58FromDiscord<eggmilksoup> is #internals the correct place to discuss my near-complete port of nim to a new platform?
00:11:23FromDiscord<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:35FromDiscord<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:30FromDiscord<Luckayla> many thanks. Really enjoying it so far
00:55:43FromDiscord<Luckayla> I even found a nice lib that makes writing python c extensions quite nice
00:55:51FromDiscord<Luckayla> so it can make my python projects nicer too.
00:57:46*BEST_Flibra_Gaia is now known as ED45D1840EE724BE
01:04:26FromDiscord<Zoom> Judging from the amount of open issues, I shouldn't hope getting rid of hangs using `startProcess`, right?
01:07:51FromDiscord<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:05FromDiscord<Zoom> Detached processes hang uncontrollably, waitForExit misbehaves
01:17:17FromDiscord<Yepoleb> Nim was all nice and easy until i started using arc and threadpool, now i get random segmentation violations 🥲
01:18:32FromDiscord<Zoom> Yep, last time I checked threadpool simply doesn't pass tests on orc
01:22:05FromDiscord<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:34FromDiscord<Yepoleb> It's this shit <https://github.com/nim-lang/Nim/issues/19105>
01:27:43FromDiscord<!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:21FromDiscord<!Patitotective> can i limit `varargs` to at least have one element?
02:01:45FromDiscord<👾 br4n_d0n> I was under the impression it needed at least one
02:01:47FromDiscord<Elegantbeef> Yea put an assertion in
02:02:24FromDiscord<!Patitotective> `assert args.len > 0`?
02:02:39FromDiscord<!Patitotective> it does not solve ambiguous calls :[
02:03:19*TUNTAN joined #nim
02:04:04FromDiscord<Elegantbeef> you know you can do `openarray[T]` ehg
02:04:05FromDiscord<Elegantbeef> eh even
02:04:15FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZJS
02:04:25TUNTANHey everyone happy to join the Nim community on IRC here
02:04:32*arkurious quit (Quit: Leaving)
02:04:37FromDiscord<Elegantbeef> Hello
02:04:43FromDiscord<!Patitotective> In reply to @Elegantbeef "you know you can": i guess :[
02:05:02FromDiscord<!Patitotective> In reply to @Patitotective "why do i get": beef, do you understand what this error means?
02:05:25FromDiscord<Elegantbeef> Yes your `==` is not pure
02:05:39FromDiscord<!Patitotective> pure 🤔 k
02:05:41FromDiscord<!Patitotective> (edit) removed "k"
02:05:45FromDiscord<TheEngin33r> In reply to @TUNTAN "Hey everyone happy to": Hy
02:06:00FromDiscord<Elegantbeef> Pure functions do not mutate global stat
02:09:01TUNTANHow do I reply to specifc discord messages from the IRC channel? Thanks anyone, I am new to all of this.
02:09:29FromDiscord<Elegantbeef> You just say the person's name and your response
02:09:33FromDiscord<Elegantbeef> Irc doesnt have threads or similar
02:09:42TUNTANIt seems there is a "Bot" buffering between me and the discord users
02:10:36TUNTANFromDiscord: Elegantbeef Thank you
02:11:10TUNTANFromDiscord: <Elegantbeef> .
02:11:32FromDiscord<Elegantbeef> You can just write "ElegantBeef" 😄
02:11:59FromDiscord<Elegantbeef> Anyway anything else or just learning the IRC ropes?
02:12:47TUNTANExcluding the quotes ? Of course?
02:13:27TUNTANI know how to respond to users on IRC using the @ symbol but not responding into discord user from IRC
02:13:59TUNTAN** but dont know responding into discord users from IRC
02:14:45FromDiscord<Elegantbeef> You just type their name, so yep no quotes
02:15:41TUNTAN@Elegantbeef Thank you
02:15:43TUNTANElegantbeef Thank you
02:16:53FromDiscord<Elegantbeef> Yea you pinged me on discord atleast once 😄
02:17:04TUNTANIt 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:25TUNTANMuch thanks again 🙏
02:19:11FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZJT
02:19:34FromDiscord<!Patitotective> `tablesVal` is `seq[TomlTableRef]` 🤷‍♂️
02:20:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZJU
02:21:15FromDiscord<!Patitotective> same error :[
02:21:30FromDiscord<Elegantbeef> Well the error is inside the stdlib so i dont know
02:21:35FromDiscord<Elegantbeef> I've never seen this issue before
02:35:29FromDiscord<Zectbumo> sent a code paste, see https://paste.rs/iRM
02:37:32FromDiscord<Zectbumo> https://github.com/nim-lang/Nim/blob/v1.6.6/lib/std/jsonutils.nim#L424
02:38:26FromDiscord<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:53FromDiscord<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:16FromDiscord<Luckayla> in theory yes, in practice It Depends™️
06:03:18FromDiscord<Elegantbeef> Yes it'll be more difficult
06:03:19FromDiscord<Elegantbeef> And it's Nim 😄
06:03:25FromDiscord<Not Saucx> In reply to @Luckayla "in theory yes, in": On?
06:03:39FromDiscord<Not Saucx> I haven’t seen many obfuscators for nim either which is understandable
06:03:48FromDiscord<Not Saucx> Since the language is newer
06:04:38FromDiscord<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:11FromDiscord<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:34FromDiscord<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:07FromDiscord<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:18FromDiscord<Elegantbeef> Nim can be heavily optimized for memory usage
06:06:27FromDiscord<Not Saucx> Ahh okay, that’s great
06:06:34FromDiscord<Elegantbeef> Reading big files is just a general issue
06:06:35FromDiscord<Luckayla> Memory usage will be far better than python thanks to it being a compiled language
06:06:38FromDiscord<Elegantbeef> Dont read them all in memory
06:06:55FromDiscord<Not Saucx> In reply to @Elegantbeef "Dont read them all": I tried buffering with python however it’s no good
06:06:58FromDiscord<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:21FromDiscord<Luckayla> Python has a pretty good ecosystem for chunking large data
06:07:22FromDiscord<Luckayla> things like Dask
06:07:36FromDiscord<Not Saucx> Hmmm, does nim have a library similar to “hashlib”?
06:07:36FromDiscord<Elegantbeef> You have to stream large files regardless
06:07:57FromDiscord<Luckayla> Nam has hashing libraries yes
06:08:02FromDiscord<Elegantbeef> Well hopefulyl luckayla can answer your python ecosystem questions cause i dont fucking know anything about python 😄
06:08:22FromDiscord<Not Saucx> In reply to @Elegantbeef "Well hopefulyl luckayla can": Are you ai or something cause I never seen a bot curse
06:08:25FromDiscord<Not Saucx> 😭
06:08:26FromDiscord<Luckayla> I've been a python dev for something like 13 years
06:08:32FromDiscord<Luckayla> In reply to @Not Saucx "Are you ai or": it's an IRC bridge
06:08:34FromDiscord<Elegantbeef> I'm using matrix
06:08:39FromDiscord<Luckayla> Matrix bridge
06:08:45FromDiscord<Not Saucx> In reply to @Luckayla "I've been a python": What’s the name of the hashing Library btw?
06:08:47FromDiscord<Luckayla> it shows up as a bot because it's a webhook
06:08:50FromDiscord<Not Saucx> For NIM
06:09:04FromDiscord<Luckayla> In reply to @Not Saucx "What’s the name of": https://github.com/nim-lang/Nim/wiki/Curated-Packages
06:09:08FromDiscord<Elegantbeef> Nim has hashing in the stdlib
06:09:17FromDiscord<Elegantbeef> Though it's not sha256 or anything 😄
06:09:18FromDiscord<Luckayla> ^ which is listed at the above link
06:09:34FromDiscord<enthus1ast> also just search for the hash algo that you wanna use, nim has them all (pretty much)
06:09:52FromDiscord<enthus1ast> and if not, just wrap a c lib, they're mostly quite easy to wrap
06:10:14FromDiscord<Not Saucx> Cause I need MD4/5, SHA1-512, etc…
06:10:45FromDiscord<Not Saucx> Wait so @Luckayla you said something about nim being a intermediate language, so something similar to C#?
06:10:58FromDiscord<Not Saucx> But it’s also possible to compile to LLVM?
06:11:20FromDiscord<Elegantbeef> Nim has NLVM but it generally uses C as a backend
06:11:28FromDiscord<Elegantbeef> It's intermediate like Rust is 😄
06:11:30FromDiscord<enthus1ast> and js
06:11:49FromDiscord<Elegantbeef> It's a relatively high level system language but you can get into the nitty gritty if you need
06:12:56FromDiscord<Not Saucx> So hold on, it’s comparable to rust with syntax to that of python 😳
06:13:03FromDiscord<Elegantbeef> Yes
06:13:28FromDiscord<Elegantbeef> You can write code as efficient as Rust/C/C++/Insert your favourite high level language here
06:13:29FromDiscord<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:41FromDiscord<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:00FromDiscord<enthus1ast> but its not needet for hashing
06:14:07FromDiscord<Luckayla> https://github.com/yglukhov/nimpy
06:14:15FromDiscord<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:46FromDiscord<jmgomez> Hey guys, I was wondering if the latest work in the inc compiler is in devel?
08:31:01FromDiscord<Elegantbeef> Yes
08:32:14FromDiscord<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:24FromDiscord<jmgomez> (also on the tooling?)
08:32:32FromDiscord<Elegantbeef> Of course i have used it 😄
08:32:44FromDiscord<Elegantbeef> No you wont get much compilation time improvment
08:33:14FromDiscord<Elegantbeef> If you do it'll me a mild improvement
08:33:52FromDiscord<jmgomez> ohh, just to be clear Im not talking about the nim compilation but the cpp one
08:34:28FromDiscord<Elegantbeef> Is there a TCC equivlent for C++?
08:34:54FromDiscord<jmgomez> I dont think so and I also have to stick (on this particular project) to what UE uses
08:35:08FromDiscord<Elegantbeef> Well then you're in a shitty spot
08:35:21FromDiscord<jmgomez> xD
08:35:37FromDiscord<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:55FromDiscord<Elegantbeef> Are you making debug releases?
08:36:20FromDiscord<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:24FromDiscord<jmgomez> since it's a lib
08:36:29FromDiscord<jmgomez> yes
08:36:33FromDiscord<Elegantbeef> Clang should do that automatically
08:37:11FromDiscord<Elegantbeef> I'm fairly certain clang caches
08:37:21FromDiscord<jmgomez> but it takes around 5-10 seconds (on a fast machine) I see purely cpp compiling faster
08:37:50FromDiscord<jmgomez> that's why I assumed it's building the whole thing everytime
08:39:15*sagax joined #nim
08:40:29FromDiscord<Elegantbeef> You can try `--passC:"-mincremental-linker-compatible"`
08:40:32FromDiscord<Elegantbeef> That might make it a bit faster
08:43:29*ltriant joined #nim
08:45:38FromDiscord<jmgomez> Unfortunately it's pretty much the same
08:45:48FromDiscord<Elegantbeef> That's what i figured
08:46:39PMunchFun, the playground had crashed because the log had grown too big :P
08:46:59FromDiscord<Elegantbeef> You're welcome
08:47:30FromDiscord<Elegantbeef> To answer your question from just after i left, no destructors dont need to be exported, they type bound operations
08:47:45FromDiscord<Elegantbeef> they're type bound\ 😄
08:48:46PMunchNice
08:49:20FromDiscord<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:55FromDiscord<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:29FromDiscord<demotomohiro> !eval echo static staticExec "df -h"
09:41:29NimBotCompile failed: <no output>
09:42:23*wallabra quit (Client Quit)
09:43:38FromDiscord<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:51FromDiscord<IzanamiのMegumi> I think I've downloaded everything I need
09:44:26FromDiscord<dom96> In reply to @demotomohiro "!eval echo static staticExec": playground still down
09:49:09FromDiscord<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:31FromDiscord<IzanamiのMegumi> In reply to @j-james "install choosenim either through": it says "unable to find package choosenim"
09:53:55FromDiscord<IzanamiのMegumi> i've managed to download "nim" via the terminal though
09:54:16FromDiscord<IzanamiのMegumi> oh
09:54:17FromDiscord<IzanamiのMegumi> nvm
09:54:41FromDiscord<IzanamiのMegumi> missed the choosenim installer on the top section of the page
09:54:45FromDiscord<Zoom> https://github.com/dom96/choosenim
09:56:38FromDiscord<IzanamiのMegumi> it asks me to place a line on the ~/.profile or ~/.bashrc file
09:56:48FromDiscord<IzanamiのMegumi> what does it mean by that?
09:57:27FromDiscord<Rika> open the file and place the line
09:57:40FromDiscord<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:00FromDiscord<j-james> it likely wants you to add nimble's binary directory to your PATH
09:58:30FromDiscord<IzanamiのMegumi> export PATH=/home/user/.nimble/bin:$PATH
09:58:36FromDiscord<IzanamiのMegumi> that's the line
10:00:36FromDiscord<j-james> yeah, add it to the end of your ~/.profile and reboot
10:01:55FromDiscord<Rika> no need to reboot, just reopen your terminal usually
10:19:26PMunchdom96, yeah I know..
10:19:54PMunch@demotomohiro, I'm doing a bit of maintenance so the playground is down until further notice
10:36:00FromDiscord<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:30FromDiscord<jmgomez> sent a code paste, see https://paste.rs/AeP
10:39:39FromDiscord<jmgomez> typName is what gets replaced
10:41:26FromDiscord<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:25FromDiscord<blashyrk> https://play.nim-lang.org/ playground is down 😦 502 from cloudflare
13:08:18FromDiscord<Yardanico> In reply to @blashyrk "https://play.nim-lang.org/ playground is down": yes, it's under maintenance
13:08:22FromDiscord<blashyrk> @jmgomez good luck with NimForUe, can't wait to try it out ^_^
13:08:27FromDiscord<Yardanico> as alternatives there is repl.it, wandbox, tio, and others
13:15:26FromDiscord<jmgomez> In reply to @blashyrk "<@726017160115126333> good luck with": thanks! still lot to do yet but it's getting there
13:35:27FromDiscord<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:49FromDiscord<Yardanico> there are raylib bindings
13:40:17PMunchThere are a couple different bindings to C libraries
13:40:34PMunchThen there's also Nico and some other native Nim game frameworks/libraries
13:43:42PMunchPlayground maintenance complete, rebooting the machine now then everything should be back up and running
13:44:15PMunchNote that only the 1.6.6 version now has packages installed. This is also the default
14:17:34NimEventerNew Nimble package! coap - libcoap C library wrapped in Nim with full async integration, see https://github.com/PMunch/libcoap
14:17:34NimEventerNew Nimble package! ikeahomesmart - IKEA Home Smart library to monitor and control lights through the IKEA Gateway, see https://github.com/PMunch/ikeahomesmart
14:24:07FromDiscord<ajusa> In reply to @dom96 "Definitely do report it.": Works fine in Prologue, but I did need to annotate it with gcsafe
14:27:06FromDiscord<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:22FromDiscord<sOkam!> sent a code paste, see https://paste.rs/kAR
14:48:01FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZLN" => "https://play.nim-lang.org/#ix=3ZLM"
14:48:52*jjido joined #nim
14:52:30FromDiscord<Rika> `&`?
14:53:28FromDiscord<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:43FromDiscord<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:55FromDiscord<dom96> (edit) "In reply to @ajusa "For now I'm just": Is there more to the ... example" added "repro"
16:13:18FromDiscord<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:28FromDiscord<ajusa> As it is in a different route
16:20:10FromDiscord<dom96> Can you repro with just that route?
16:20:54FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZMp
16:22:36FromDiscord<huantian> Nope Nim doesn’t know about nimble package versions
16:23:15FromDiscord<!Patitotective> and is there a way to switch between library versions? or will it always select the latest?
16:23:44FromDiscord<Yardanico> In reply to @Patitotective "and is there a": you can put specific versions into your nimble file
16:23:56FromDiscord<Yardanico> nim doesn't know about package versions, it's all on nimble
16:24:25FromDiscord<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:40FromDiscord<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:05FromDiscord<!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:05FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZMt
16:39:44FromDiscord<Yardanico> In reply to @sOkam! "I'm getting this error,": you're trying to execute your .nims as a bash script?
16:40:04FromDiscord<sOkam!> no, just calling it directly
16:40:21FromDiscord<Yardanico> can you show the start of it?
16:40:28FromDiscord<Yardanico> of ./src/build.nims I mean
16:40:32FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=
16:41:03FromDiscord<Yardanico> well, I don't know, but that error doesn't look like it's coming from nim
16:41:39FromDiscord<sOkam!> where then? im only using nimscript 🤔
16:41:59FromDiscord<Yardanico> Nim has no "syntax error near unexpected token" error, I think your shell is trying to execute your .nims
16:42:05FromDiscord<Yardanico> I don't know why, but that's how it is
16:42:10FromDiscord<sOkam!> ah
16:44:09FromDiscord<demotomohiro> How about to adding shebang after your code runs collectly with `nim e build.nims`.
16:46:18FromDiscord<sOkam!> It was running correctly before, and that shebang had worked for me in the past 🤷‍♂️
16:46:45FromDiscord<sOkam!> But ye, calling `nim thefile.nims` directly worked fine for whatever reason
17:10:12FromDiscord<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:45FromDiscord<Yardanico> You can generally use strformat to format strings to your liking
17:12:06FromDiscord<Yardanico> And you can replicate what `setw` does with it easily
17:12:21FromDiscord<Yardanico> See e.g. https://nim-lang.org/docs/strformat.html#formatting-strings
17:12:42FromDiscord<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:49FromDiscord<dziki> sent a code paste, see https://play.nim-lang.org/#ix=3ZMF
17:23:01FromDiscord<Yardanico> just num, no need for $ or converting it to a string
17:23:12FromDiscord<Yardanico> strformat calls $ on variables passed to it automatically
17:24:06FromDiscord<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:22FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3ZMG
17:25:32FromDiscord<Yardanico> `f` is only valid for floating point
17:25:44FromDiscord<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:24FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3ZMK
17:41:16FromDiscord<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:59FromDiscord<dziki> seekAndDestroy
17:49:38FromDiscord<huantian> destroyButWereDoingCInterop
18:16:35*pro joined #nim
18:23:39FromDiscord<sOkam!> How would you handle a file download from nimscript?↵Is there std procs for it, or would it need something external?
18:24:16FromDiscord<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:04FromDiscord<Sebastian Valmont> file download can be done a million of different ways
18:48:40FromDiscord<Sebastian Valmont> it largely depends on the protocol of the website/backend
18:50:03FromDiscord<Sebastian Valmont> for example, if you need to download from ftp, you can use ftp library
18:57:28FromDiscord<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:07NimEventerNew 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:26FromDiscord<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:01FromDiscord<Yardanico> just call your function recursively?
19:39:26FromDiscord<sOkam!> I've never done recursion, I don't know how to do it
19:39:54FromDiscord<Yardanico> call the procedure from itself
19:40:02FromDiscord<Yardanico> also, I'm going to ask again - why are you doing it as NimScript?
19:40:08FromDiscord<Yardanico> you're clearly calling nim itself to run the NimScript fles anyway
19:40:18FromDiscord<Yardanico> so you can just do `nim r` instead and have access to all of nim stdlib
19:40:54FromDiscord<sOkam!> because its a bash-like file. i don't want to compile it
19:41:00FromDiscord<Yardanico> but why?
19:41:11FromDiscord<Yardanico> it can be "bash-like" even when it's natively compiled
19:42:52FromDiscord<sOkam!> In reply to @Yardanico "call the procedure from": do you have a dummie example of this?
19:43:24FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3ZN9
19:43:39FromDiscord<Yardanico> anyway, IMO you're just limiting yourself with NimScript at this point
19:46:11FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNa
19:46:23FromDiscord<Yardanico> you can pass it recursively with `var` in argument type i guess
19:46:28FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZNa" => "https://play.nim-lang.org/#ix=3ZNb"
19:47:25FromDiscord<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:32FromDiscord<Yardanico> just get them like you do normally
19:55:03FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNf
20:04:26FromDiscord<sOkam!> Could this iterator be useful for this?↵https://nim-lang.org/docs/os.html#walkDirRec.i%2Cstring
20:05:07FromDiscord<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:40FromDiscord<Yardanico> yes that will be very useful, but i don't know if it works in nimscript
20:07:43FromDiscord<Yardanico> but it 100% works in normal nim
20:24:04FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNq
20:25:07FromDiscord<Yardanico> what line is 84
20:25:08FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZNq" => "https://play.nim-lang.org/#ix=3ZNs"
20:25:15FromDiscord<Yardanico> ah yeah you have "id, it"
20:25:21FromDiscord<Yardanico> walkDirRec only returns 1 string
20:29:19FromDiscord<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:19FromDiscord<!Patitotective> https://github.com/Patitotective/niprefs/releases/tag/0.3.0 👀
20:46:24FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNy
20:47:21FromDiscord<Elegantbeef> Iterators cannot be filtered
20:47:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZNz
20:48:03*ltriant joined #nim
20:48:26FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZNA
20:48:51FromDiscord<Elegantbeef> Well you're doing something wrong then
20:52:09FromDiscord<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:34FromDiscord<sOkam!> sent a code paste, see https://paste.rs/vca
21:08:53FromDiscord<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:25FromDiscord<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:52FromDiscord<huantian> I guess that's to be expanded huh 😛
23:12:07FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZO5
23:12:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZO6
23:14:26FromDiscord<Elegantbeef> Cmon huan fix the tests for me 😛
23:14:39*ltriant joined #nim
23:15:12FromDiscord<huantian> do you have a PR already?
23:15:25FromDiscord<huantian> also that is pretttty nice
23:15:35FromDiscord<Elegantbeef> I have a branch no PR yet https://github.com/beef331/Nim/tree/unexpandmacros
23:16:09FromDiscord<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:36FromDiscord<huantian> kinda funny https://media.discordapp.net/attachments/371759389889003532/984597158839857162/unknown.png
23:18:11FromDiscord<huantian> In reply to @Elegantbeef "I dont know if": hmm...
23:22:22FromDiscord<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:38FromDiscord<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:42FromDiscord<Girvo> Hello 🙂
23:28:12FromDiscord<Elegantbeef> Uh oh
23:28:27FromDiscord<Girvo> haha good morning to you too 😉
23:28:31FromDiscord<Elegantbeef> Girvo's hellos are always followed by some question!
23:28:37FromDiscord<Girvo> Not this morning 😄
23:28:42FromDiscord<Girvo> (not yet anyway lol)
23:28:51FromDiscord<Elegantbeef> Damn i knew i woke up late but jeez 530pm is morning?!
23:28:51FromDiscord<Girvo> (guarantee I'll have one at some point)
23:29:01FromDiscord<Girvo> In reply to @Elegantbeef "Damn i knew i": Yeah welcome to programmer life 😉
23:29:12FromDiscord<Girvo> (Its 9.30am here, work day just started)
23:29:31FromDiscord<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:56FromDiscord<Elegantbeef> Yea this is the culprit, it doesnt do anything but stringify variables
23:30:58FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/sugar.nim#L174-L181
23:35:30FromDiscord<huantian> yeah interesting macro
23:35:37FromDiscord<huantian> i've never actually used it
23:37:57*noeontheend joined #nim
23:41:00FromDiscord<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:09FromDiscord<Elegantbeef> You can just use `std/net`
23:57:30FromDiscord<Elegantbeef> Or asyncnet or netstreams 😄
23:58:03FromDiscord<j-james> beef, what extensions do you use for kate?
23:58:05FromDiscord<j-james> just nimlsp?
23:58:13FromDiscord<Elegantbeef> Yep