<< 06-05-2022 >>

00:04:18*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
00:17:06*vicfred quit (Quit: Leaving)
01:28:22*ltriant joined #nim
01:29:40*ltriant_ quit (Ping timeout: 248 seconds)
01:51:32*ltriant quit (Ping timeout: 248 seconds)
01:52:21*ltriant joined #nim
02:32:17*arkurious quit (Quit: Leaving)
03:04:10*duuuuuude quit (Ping timeout: 260 seconds)
03:11:37*Perryman_ quit (Remote host closed the connection)
03:14:52*Perryman joined #nim
03:58:15FromDiscord<pls use my ruby nimble package> Ugh. Idk why the form isn't sending me a confirmation email for my account, but it's super annoying.
03:59:16FromDiscord<pls use my ruby nimble package> sent a code paste, see https://play.nim-lang.org/#ix=3X5t
03:59:29FromDiscord<pls use my ruby nimble package> (edit) "form" => "forum"
04:03:58FromDiscord<pls use my ruby nimble package> sent a code paste, see https://play.nim-lang.org/#ix=3X5v
04:04:14FromDiscord<Elegantbeef> That doesnt really work 😄
04:04:34FromDiscord<Elegantbeef> It's ambiguous between the present generic type classes and a union
04:05:07FromDiscord<Rika> the first one seems ok
04:05:15FromDiscord<Rika> `Null = nil`↵`of Null: discard`
04:05:29FromDiscord<Rika> = nil or = discard, not sure which would be nicer
04:05:41FromDiscord<Elegantbeef> I dont like that you can define types in the first
04:05:45FromDiscord<Elegantbeef> How does exporting work there
04:05:48FromDiscord<Rika> beef, its a proposal
04:05:55FromDiscord<Rika> rfc
04:05:59FromDiscord<Rika> nim 2 idea
04:06:00FromDiscord<Elegantbeef> Yea i know
04:06:04FromDiscord<Elegantbeef> I'm just commenting
04:06:44FromDiscord<Rika> i guess the anonymous type part shouldnt be
04:06:53FromDiscord<pls use my ruby nimble package> In reply to @Elegantbeef "How does exporting work": Same way a `tuple` field works in an object
04:07:35FromDiscord<pls use my ruby nimble package> Just without the ability to pull the field out of its parent. First idea is basically just a Rust enum
04:07:36FromDiscord<Rika> tuple behaviour should not be default
04:08:06FromDiscord<Elegantbeef> Tuples cannot have exported/unexported fields
04:08:21FromDiscord<Elegantbeef> Types can be exported
04:08:22FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/fe4
04:08:24FromDiscord<pls use my ruby nimble package> Okay maybe that was a bad explanation
04:08:35FromDiscord<pls use my ruby nimble package> Just think about it like a rust enum
04:08:42FromDiscord<Rika> we do not know rust
04:08:47FromDiscord<pls use my ruby nimble package> O
04:08:49FromDiscord<Rika> do not expect us to know rust
04:08:50FromDiscord<Elegantbeef> I know rust enums
04:09:15FromDiscord<Rika> if theyre just functional-style enums then okay
04:09:26FromDiscord<Elegantbeef> They're ADTs so yea
04:09:35FromDiscord<Rika> okay
04:10:07FromDiscord<Rika> hmm
04:10:12FromDiscord<Elegantbeef> The issue i see with that in Nim is that you'd expect to be able to instantiate the object type, but you'd not be able to and cannot dispatch on it
04:11:17FromDiscord<pls use my ruby nimble package> It's just an example 😂 i threw that together in 2 minutes on my phone
04:11:51FromDiscord<pls use my ruby nimble package> So some parts of it probably aren't perfect.
04:12:34FromDiscord<yoyojambo> what do you guys use to debug in nim?
04:12:45FromDiscord<Elegantbeef> Hey i'm just saying what i think about it. Speaking of this i'd probably just go with something like https://github.com/alaviss/union and a case statement macro
04:13:02FromDiscord<Elegantbeef> I generally just do echo debugging since Nim's echo is powerful
04:13:13FromDiscord<Rika> there's a gdb compat layer for nim
04:13:23FromDiscord<Rika> In reply to @Elegantbeef "I generally just do": doesnt work too well in many cases
04:13:42FromDiscord<Elegantbeef> Eh i've never reached for a debugger to use with Nim
04:13:49FromDiscord<yoyojambo> In reply to @Rika "there's a gdb compat": do I just google it like that?
04:14:06FromDiscord<Rika> nim gdb on youtube i believe theres a video on it
04:14:14FromDiscord<Elegantbeef> Your distribution of Nim should have a `nim_gdb.py` script that can be used with GDB
04:14:20FromDiscord<yoyojambo> In reply to @Rika "nim gdb on youtube": perfect, thank you
04:14:30FromDiscord<pls use my ruby nimble package> In reply to @yoyojambo "what do you guys": Nim-gdb works great. Getting it set up almost gave me an aneurysm because the script is missing from choosenim for some reason, but it works great after I fixed it
04:14:33FromDiscord<yoyojambo> In reply to @Elegantbeef "Your distribution of Nim": It gave me an error :/
04:14:36FromDiscord<yoyojambo> a syntax error
04:16:37FromDiscord<yoyojambo> sent a code paste, see https://paste.rs/HTu
04:16:57FromDiscord<yoyojambo> (edit) "https://play.nim-lang.org/#ix=3X5x" => "https://play.nim-lang.org/#ix=3X5y"
04:17:35FromDiscord<yoyojambo> maybe I am doing something wrong but I tried this and that's the error I am talking about
04:19:32FromDiscord<yoyojambo> In reply to @evan "Nim-gdb works great. Getting": are you also talking about the nim_gdb.py script?
04:20:10FromDiscord<pls use my ruby nimble package> Yep. Typucally you can just run `nim-gdb` directly from the terminal
04:20:23FromDiscord<yoyojambo> In reply to @yoyojambo "maybe I am doing": I barely tried tho. ill later get back to it
04:20:39FromDiscord<yoyojambo> In reply to @evan "Yep. Typucally you can": ohhh didnt know that
04:21:38FromDiscord<pls use my ruby nimble package> give that a shot. If it gives you an error about a missing nim_gdb.py file, you might need to symlink it to wherever gdb is trying to find it
04:24:14FromDiscord<yoyojambo> In reply to @evan "give that a shot.": sure think, thanks a lot
04:27:57*slowButPresent quit (Quit: leaving)
04:31:13FromDiscord<yoyojambo> what is supposed to happen when I run it?
04:31:43FromDiscord<Elegantbeef> It starts GDB
04:32:28FromDiscord<yoyojambo> I ran nim-gdb and it tried to look for itself in the choosenim directory as you mentioned, so I copied it there, and ran it, and just froze
04:32:39FromDiscord<yoyojambo> In reply to @Elegantbeef "It starts GDB": hmmm ok lemme look into what went wrong then
04:36:18FromDiscord<yoyojambo> sent a code paste, see https://play.nim-lang.org/#ix=3X5B
04:38:29*rockcavera quit (Remote host closed the connection)
05:14:14FromDiscord<d4rckh> It's mad at you haha
05:16:27FromDiscord<Rika> SSSSSSSIGINT
06:18:44*PMunch joined #nim
06:29:18PMunchHmm, has there been a breaking change to config.nims in the latest version?
06:31:03FromDiscord<Elegantbeef> Is this in reference to ratel or what?
06:31:08PMunchYeah
06:33:03FromDiscord<Elegantbeef> Perhaps there is
06:33:24FromDiscord<Prestige> Maybe an unintentional breaking change
06:37:23PMunchHmm, doesn't look like it
06:39:47PMunchI'm trying to define `avr.any.gcc.path = "/usr/bin"` in config.nims
06:39:53PMunchBut that doesn't work..
06:40:19FromDiscord<Elegantbeef> you need to use `put` i think
06:41:23FromDiscord<Elegantbeef> config.nims doesnt support the dots like that afaik, you might be thinking of `nim.cfg`?
06:43:01FromDiscord<Elegantbeef> actually you can use `--av.any.gcc.path = "/usr/bin"`
06:44:21PMunchAh right
06:44:37PMunchYeah I migrated from a nim.cfg to a config.nims at some point
06:45:01PMunchAnd I just have them in my global nim.cfg, so it's just a matter of me messing up the documentation
06:48:34PMunchHmm, can I undo a --noMain from another config?
06:48:52FromDiscord<Elegantbeef> `--noMain:on`
06:48:53FromDiscord<Elegantbeef> or `off`
06:48:54PMunchAnd --noMain:off
06:49:17FromDiscord<Elegantbeef> I think it should override
06:49:21FromDiscord<Elegantbeef> If it's loaded after that is
07:04:56*haliucinas joined #nim
07:06:58*gsalazar_ joined #nim
07:11:00*jjido joined #nim
07:20:36*fowl quit (Ping timeout: 276 seconds)
07:31:21*krux02 quit (Remote host closed the connection)
07:34:23FromDiscord<Asbjørn F> I'm poo at docker
07:34:41PMunch@Elegantbeef, yeah that worked
07:34:54FromDiscord<Elegantbeef> I dont even think it exists
07:35:31FromDiscord<Asbjørn F> any good books on docker?
07:36:20FromDiscord<Elegantbeef> Ah good to hear pmunch
07:36:21FromDiscord<Yardanico> @ash42 please ask that in #offtopic, especially because there's an on-topic discussion going on here
07:36:33FromDiscord<Yardanico> @Asbjørn F i meant ^
07:36:37FromDiscord<Elegantbeef> Theree's an on topic discussion?
07:36:43FromDiscord<Elegantbeef> Is the bridge hiding messages?
07:36:44FromDiscord<Asbjørn F> Sorry, my b
07:36:58FromDiscord<Elegantbeef> Nope no hidden messages
07:37:38FromDiscord<Elegantbeef> Comically it turns out that i've been using wasmedge 0.9.1 and was going to move to 0.1.0, but i dont have the willpower to play with docker
07:42:43*fowl joined #nim
07:52:22*gsalazar_ quit (Quit: Leaving)
07:52:38*gsalazar joined #nim
07:53:00PMunch@Elegantbeef, is 0.1.0 higher than 0.9.1?
07:53:04PMunchOr did I read that wrong?
07:53:14PMunchAnd Yardanico, there wasn't really anything on-topic going on here :P
07:53:44PMunch@Asbjørn_F, don't really have any docker books to recommend, I just sorta picked it up as I went along
07:55:05PMunchThe core concept is rather simple, it's like a bash script to set up a Linux machine. You base it on some image, which can be anything from just a Linux distro, all the way to something like the Dotnet based containers that comes with a specific setup already defined.
07:55:47FromDiscord<Elegantbeef> Yea their versioning is weird
07:55:48PMunchThen you build from there, and at the end you have an image you can create containers from (like a distro you can install on machines)
07:57:14FromDiscord<Elegantbeef> Yea i couldnt get docker to even work so i just toyed with my game a bit instead
07:57:17PMunchOf course there is a lot more details to get into if you want, I also recommend creating a "build" image which does all the building for you (if any) and then copy the artifacts from that into a "run" container which is then much lighter. Makes deployment faster :)
07:57:32PMunch@Elegantbeef, I mean that's not weird, that's just wrong :P
07:57:55FromDiscord<Elegantbeef> Yea i know what docker is supposed to do but i apparently fucked up
07:58:16PMunch@Elegantbeef, of yeah I was talking to @Asbjørn_F
07:59:24PMunchUhm, are you sure 0.1.0 is newer? Looking at their GitHub releases it seems 0.9.1 is the newest version
08:00:25FromDiscord<Elegantbeef> 0.10.0 whoops 😄
08:03:00FromDiscord<Asbjørn F> In reply to @PMunch "<@145405730571288577>, of yeah I": Oh yeah, sorry, I was looking to be a good boy #offtopic ↵I'm just trying to figure out all the CI/CD stuff, like if I should have a client per image, or all clients on same image, how to setup nginx, postgresql and all that. If I should let my image build from git or if I should have a build happen somewhere else, stuff like that
08:05:07FromDiscord<Asbjørn F> also how people setup backups
08:07:11FromDiscord<Asbjørn F> I don't know if replies show up in the bridge @PMunch
08:07:16PMunchAh I see, slightly different use-case from what I've been using it for. Not sure really how people do backups
08:08:33PMunchYeah replies show up as "In reply to <user> "<start of message>": <your reply>
08:08:40FromDiscord<Asbjørn F> Neat
08:12:56*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:16:34*jjido joined #nim
08:16:50*analogsalad joined #nim
08:29:30*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:30:48FromDiscord<Andreas> sent a long message, see http://ix.io/3X68
08:31:09FromDiscord<Andreas> (edit) "http://ix.io/3X68" => "http://ix.io/3X69"
08:31:50FromDiscord<Elegantbeef> The first is a typeclass and not a union
08:31:54FromDiscord<Yardanico> not sure I understand, in Nim object variants are defined by defining an enum for all possible kinds, and then the object itself with different fields depending on the enum kind
08:32:04FromDiscord<Andreas> (edit) "http://ix.io/3X69" => "https://paste.rs/nY9"
08:32:15FromDiscord<Elegantbeef> If you're talking about the union packaged i linked it generates the same as a manual object variant
08:33:50FromDiscord<Elegantbeef> The typeclass is for constraining generics, and not for unions 😄
08:33:57FromDiscord<Andreas> In reply to @Elegantbeef "If you're talking about": yes, the one from above.. so i guess i'm fine with what i have..
08:35:13FromDiscord<Elegantbeef> Yea you're they're all tagged unions internally
08:35:30FromDiscord<Andreas> sent a long message, see http://ix.io/3X6a
08:36:06FromDiscord<Elegantbeef> Three ticks before and after code blocks 😛
08:36:19FromDiscord<Elegantbeef> Yea that's what you need to do here anyway, `union`s doesnt give you that
08:36:25FromDiscord<Andreas> (edit) "long message," => "code paste," | "http://ix.io/3X6a" => "https://play.nim-lang.org/#ix=3X6b"
08:36:49FromDiscord<Elegantbeef> that spacing from `[]` drives me up the wall
08:36:57FromDiscord<Andreas> (edit)
08:37:52FromDiscord<Prestige> lol
08:38:44FromDiscord<Andreas> In reply to @Elegantbeef "*that spacing from `[]`": ohh, i love it when theres some air in-between
08:39:15FromDiscord<Elegantbeef> Chooses to keep his feelings to himself for once
08:39:56FromDiscord<Rika> youre getting smarter
08:40:29FromDiscord<Yardanico> beefier
08:40:43FromDiscord<Elegantbeef> Damn i knew these pants made my ass look fat
09:03:47FromDiscord<Xzayler> When should I be using procs and when should I be using methods?
09:04:01FromDiscord<Xzayler> Mind you I'm very mush a beginner, using godot nim bindings
09:04:05FromDiscord<Xzayler> (edit) "mush" => "much"
09:04:14FromDiscord<Asbjørn F> Nim has methods?
09:04:38FromDiscord<Rika> yes but they are very very very very rarely used
09:04:53FromDiscord<Xzayler> in the godot-nim stub example they use methods
09:05:02FromDiscord<Elegantbeef> Methods are to be used in OOP cases
09:05:06FromDiscord<Elegantbeef> If you need to override behaviour
09:05:16FromDiscord<Elegantbeef> In godot you'll almost always use methods inside `gdObj`
09:05:19FromDiscord<Xzayler> yeah I do because there's a lot of inheritance going on
09:05:47FromDiscord<Xzayler> ok, when would I not use it? for eample if I'm making a function that doesn't override the inherited object's functions?
09:05:52FromDiscord<Xzayler> like a completely new one I write?
09:06:01FromDiscord<Xzayler> (edit) "eample" => "example"
09:06:06FromDiscord<Asbjørn F> Oh the postfix syntax is called methods? I thought it's just alias for calling a proc like a function though
09:06:39FromDiscord<Elegantbeef> No Nim has `method` and `proc`
09:06:51FromDiscord<Elegantbeef> They're declared the same but `method` is dynamically dispatched
09:08:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3X6h
09:08:45FromDiscord<Elegantbeef> that can also be called `getStr(data[0])`
09:09:39FromDiscord<Asbjørn F> oh
09:09:51FromDiscord<Asbjørn F> I totally skipped over that part in the docs, wow
09:10:10FromDiscord<Asbjørn F> Thanks for showing
09:10:45FromDiscord<Elegantbeef> No problem
09:15:37FromDiscord<Zectbumo> does nim executables have dependancies?
09:16:11FromDiscord<Yardanico> depends on the libraries you use
09:16:20FromDiscord<dom96> In reply to @Zectbumo "hi <@132595483838251008> , I": Can you create a new account with a different username? I'd have to go into the db to restore your account unfortunately so it's just faster if you create a new one.
09:16:27FromDiscord<Zectbumo> I'm trying to execute a compiled nim program and I get "Abort Trap" while in a chroot. I am just doing echo "hello world"
09:16:46FromDiscord<Yardanico> In reply to @Zectbumo "I'm trying to execute": can you show the command you used to compile the binary, and the full error?
09:17:07FromDiscord<Yardanico> if you just compile `nim c file.nim` (or with flags like -d:release or -d:danger) it just dynamically links against the libc
09:17:10FromDiscord<Zectbumo> In reply to @dom96 "Can you create a": 😿 pretty please. i like my username
09:17:27FromDiscord<Yardanico> so if you compile it on ubuntu/arch, it won't run on alpine because alpine uses musl
09:17:45FromDiscord<Zectbumo> @dom96 is there a timeout, like deleted accounts expunge after so much time?
09:18:10FromDiscord<dom96> In reply to @Zectbumo "😿 pretty please. i": I'll see what I can do.
09:22:14FromDiscord<jmgomez> Hey guys, how can I pass a parameter to a macro pragma? I mean how do I define it?
09:24:20FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3X6l
09:24:20FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/h1F
09:24:32FromDiscord<Elegantbeef> First!
09:24:40FromDiscord<Yardanico> i'm first in discord :)
09:24:49FromDiscord<Elegantbeef> Yea i figured
09:24:55FromDiscord<Yardanico> 😔
09:25:06FromDiscord<jmgomez> lol thank you guys!
09:25:56FromDiscord<Elegantbeef> No thank me
09:26:27FromDiscord<Zectbumo> In reply to @mothumix "can you show the": nim c go.nim
09:26:47FromDiscord<Zectbumo> "Abort trap"
09:26:56FromDiscord<Yardanico> what chroot are you running it in?
09:27:11FromDiscord<Yardanico> and what host did you compile it on? I mean OS
09:27:59FromDiscord<Zectbumo> OpenBSD
09:28:17FromDiscord<Zectbumo> I copied over gdb and ran that and it's Abort Trap too. so maybe unrelated to nim after all
09:28:34FromDiscord<Zectbumo> chroot /var/www
09:28:35FromDiscord<Yardanico> @Zectbumo so is both the host and guest openbsd?
09:29:34FromDiscord<Zectbumo> uhm host I forget now. Some debian or ubuntu
09:29:43FromDiscord<Yardanico> well, that's the problem
09:29:49FromDiscord<Yardanico> binaries compiled for linux can only run on linux
09:29:58FromDiscord<Yardanico> OpenBSD isn't Linux, you need to cross-compile for it
09:30:04FromDiscord<Elegantbeef> Unles you use the linuxlator 😛
09:30:10FromDiscord<Yardanico> does that exist for openbsd?
09:30:17FromDiscord<Elegantbeef> It's for one of the BSD
09:30:25FromDiscord<Yardanico> i know it on FreeBSD
09:30:27FromDiscord<Zectbumo> oh you mean where I compiled it from. yes both host and guest are openbsd. I thought you meant the VMM
09:31:10FromDiscord<Yardanico> still weird, but why'd you want to chroot /var/www ?
09:31:20FromDiscord<Zectbumo> it's what the web server does
09:31:34FromDiscord<Zectbumo> (cgi)
09:32:06*duuuuuude joined #nim
09:33:35FromDiscord<Zectbumo> @Yardanico okay, I just did a ldd on my exec and it has libc.so dependancies. I think that's my source of headache
09:33:38FromDiscord<enthus1ast> better do reverse proxy, cgi is quite uncommon these days
09:34:22FromDiscord<Zectbumo> is there a --static compile option?
09:35:44FromDiscord<Yardanico> In reply to @Zectbumo "is there a --static": you just pass "-static" to the C compiler usually
09:36:01FromDiscord<Zectbumo> what's the nim option for that?
09:36:02FromDiscord<Yardanico> but I don't know if your openbsd c compiler can link libc statically
09:36:31FromDiscord<Yardanico> In reply to @Zectbumo "what's the nim option": `--passC:"argument"` passes arguments to the C compiler, `--passL:"linker"` passes optons to the linker
09:36:39FromDiscord<Yardanico> so in your case try `--passC:"-static"`
09:36:56*jmdaemon quit (Ping timeout: 248 seconds)
09:37:08FromDiscord<jmgomez> Can you define a variable in a nim script (i.e. config.nims) file and get the value at compile time inside the compiled nim file?
09:37:21FromDiscord<Yardanico> yes, if you mean config specifically
09:37:32FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas
09:38:49FromDiscord<jmgomez> Wonderful
09:39:20FromDiscord<Yardanico> you can just pass that define in your config file with e.g. `switch("define", "myValue:10")` and get it with `const MyVal {.intdefine.}: int = 5`
09:39:20*analogsalad quit (Quit: bye)
09:39:39FromDiscord<Elegantbeef> or just `--define:myValue:10`
09:40:02FromDiscord<Elegantbeef> I think that works
09:40:08FromDiscord<Yardanico> that doesn't work in nimscript @ElegantBeef
09:40:26FromDiscord<jmgomez> In reply to @mothumix "you can just pass": yeah, I figured when I saw the docs
09:41:24FromDiscord<jmgomez> can you read those defines from other nims file? Like if they were some sort of env variables?
09:43:21FromDiscord<jmgomez> I mean, I have a task define in a nimble file that uses a nims file that depends on a file path. That same file path is used at compile time to output stuff from the pragmas. I would like to define the path in only one place (via a define)
09:43:32FromDiscord<Elegantbeef> Hey it actually does yard
09:43:33FromDiscord<Elegantbeef> https://wandbox.org/permlink/7BygdrXNBiXdB5dg
09:43:57FromDiscord<Yardanico> > strdefine
09:44:01FromDiscord<Yardanico> try with intdefine bro
09:44:19FromDiscord<Xzayler> sent a code paste, see https://play.nim-lang.org/#ix=3X6s
09:44:30FromDiscord<Elegantbeef> Ah
09:44:32FromDiscord<Elegantbeef> Fuck!
09:44:41FromDiscord<Yardanico> also wat is this https://media.discordapp.net/attachments/371759389889003532/972071392751284265/unknown.png
09:44:43FromDiscord<Elegantbeef> You do not add `self` to procedures inside `gdObj`
09:44:55FromDiscord<Xzayler> In reply to @Elegantbeef "You do not add": so just leave it empty?
09:45:03FromDiscord<Elegantbeef> the macro adds it
09:45:12FromDiscord<Elegantbeef> It emulates a class / gdscript script
09:45:16FromDiscord<Xzayler> ah ok, thanks a lot I'll try fixing everything then
09:45:39FromDiscord<Elegantbeef> The macro could check for it, but it doesnt 😄
09:46:34FromDiscord<Elegantbeef> High qwallitea code↵(@Yardanico)
09:46:42FromDiscord<Elegantbeef> Or is it koalaty
09:46:46FromDiscord<Zectbumo> In reply to @enthus1ast "better do reverse proxy,": what do you use for your server?
09:48:27FromDiscord<Zectbumo> In reply to @mothumix "`--passC:"argument"` passes arguments to": this did the trick. thank you Yardanico: nim c --passL:-static go.nim
09:48:56FromDiscord<Yardanico> yeah, just keep it mind that if you e.g. want to use httpclient with -d:ssl, you'll also need to statically link openssl, and it might not be done automatically with -static
09:49:07FromDiscord<Yardanico> or std/re module, because it depends on pcre
09:49:24FromDiscord<Yardanico> (as a pure-nim std/re alternative there is https://github.com/nitely/nim-regex)
09:51:07FromDiscord<Zectbumo> thx, I should be home free now with passL static. but good to know about the ssl client
09:53:42FromDiscord<Elegantbeef> Yardanico someone really needs to explain what that style RFC actually entails and what style insensitivity actually is
09:53:47FromDiscord<Elegantbeef> It's really getting silly 😄
09:54:26FromDiscord<dom96> In reply to @Zectbumo "what do you use": nginx works well as a reverse proxy
09:55:15FromDiscord<Zectbumo> is there a nim plugin for nginx?
09:59:36FromDiscord<dom96> You don't need one, you just run a Nim http server and ask nginx to proxy connections there
10:34:34PMunchI've managed to do the same thing in Apache, but I don't remember how off the top of my head :P
10:39:54FromDiscord<dom96> yeah, all http servers support this
10:40:15FromDiscord<enthus1ast> yes nginx↵(@Zectbumo)
10:41:09FromDiscord<enthus1ast> and i usually use systemd on linux to start/stop control the nim applications, for bsd i have no clue ;)
10:48:23FromDiscord<enthus1ast> ah, and i also tend to use certbot with its nginx "plugin/feature", ↵this way also the https setting is a breeze
10:49:47FromDiscord<dom96> you could probably even get away with simply using cloudflare as a proxy in front of your Nim http server, you'll likely want cloudflare in front of your server anyway
10:51:39FromDiscord<enthus1ast> for stuff that is really public maybe. For most of my own stuff (that i use privately) i do not use cloudflare.Also, when cloudflare does ssl for you it will also be terminated at cloudflare, so the data from cloudflare to your server is then unencrypted.↵(@dom96)
10:51:54PMunchcertbot is great, works for Apache as well
11:06:28*analogsalad joined #nim
11:07:42PMunchHmm, this is interesting
11:07:44PMunchhttps://eugenkiss.github.io/7guis/tasks/
11:08:00PMunchCould be cool to compare GUI toolkits using that as a benchmark
11:13:27FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3X6I
11:14:00FromDiscord<jmgomez> (edit) "https://play.nim-lang.org/#ix=3X6I" => "https://paste.rs/LPx"
11:18:34PMunch@jmgomez, I believe you can't push macros
11:19:55FromDiscord<Yardanico> @PMunch you can, just not custom ones
11:20:04FromDiscord<Yardanico> ah yeah, you can't push macros like that
11:20:12FromDiscord<Yardanico> i thought your msg said "pragmas" :P
11:20:18duuuuuudedom96: why wouldn't they directly connect to the nim http server?
11:20:30FromDiscord<Yardanico> In reply to @duuuuuude "<@132595483838251008>: why wouldn't they": for better safety/performance
11:20:31PMunchYardanico, it's a bit annoying actually that you can't
11:20:36PMunchI've run into this in the past as well
11:20:37FromDiscord<Yardanico> yep
11:20:41FromDiscord<Yardanico> same
11:20:43duuuuuudewouldn't nginx be just overhead in this case?
11:20:50FromDiscord<Yardanico> In reply to @duuuuuude "wouldn't nginx be just": no
11:21:04FromDiscord<Yardanico> it offers support for SSL, multiple versions of HTTP, compression, etc
11:21:27PMunchduuuuuude, nginx (and the other HTTP servers) would make sure that the HTTP requests aren't malformed and such. And would support things like SSL, compression, etc. like Yardanico pointed out
11:21:36FromDiscord<Rika> nim http doesnt have http2 or 3 or compression
11:21:42*analogsalad quit (Quit: bye)
11:21:56FromDiscord<Rika> ssl is probably better on nginx
11:22:00FromDiscord<Rika> much better
11:22:06FromDiscord<Rika> its no doubt better but how much i do not know
11:22:18FromDiscord<Yardanico> nim http servers don't support ssl, not sure about chronos though
11:22:37FromDiscord<Yardanico> they don't either it seems
11:23:17*Zectbumo joined #nim
11:24:02FromDiscord<jmgomez> sent a code paste, see https://paste.rs/LGY
12:02:12FromDiscord<Tanguy> Pretty sure chronos supports https↵https://github.com/status-im/nim-chronos/blob/0fc82049ac17175dd156e9ce6778bb15734be6fc/tests/testshttpserver.nim#L106
12:02:16FromDiscord<Tanguy> (edit) "https↵https://github.com/status-im/nim-chronos/blob/0fc82049ac17175dd156e9ce6778bb15734be6fc/tests/testshttpserver.nim#L106" => "https server↵https://github.com/status-im/nim-chronos/blob/0fc82049ac17175dd156e9ce6778bb15734be6fc/tests/testshttpserver.nim#L106"
12:02:54FromDiscord<Yardanico> oh, interesting, didn't find because it thought it'd be right in httpsserver
12:03:16FromDiscord<Yardanico> httpserver
12:04:30FromDiscord<Tanguy> Actual code is here: https://github.com/status-im/nim-chronos/blob/master/chronos/apps/http/shttpserver.nim sent a test to show usage
12:06:02FromDiscord<Yardanico> yeah i know, already found it
12:06:39FromDiscord<Tanguy> Is someone familiar with the compiler around? I'm trying to fix https://github.com/nim-lang/Nim/issues/19766 (the "typing pass" looses pragma info for var / let / const), but I'm getting lost and not sure where to look for at this point
12:07:09FromDiscord<Tanguy> (edit) "Is someone familiar with the compiler around? I'm trying to fix https://github.com/nim-lang/Nim/issues/19766 (the "typing pass" looses pragma info for var / let / const), but I'm getting lost ... and" added "in the compiler code"
12:27:33PMunchHmm, I believe those are baked into the symbol
12:28:02FromDiscord<Yardanico> so maybe it's just a matter of fixing the representer ?
12:28:13FromDiscord<Yardanico> shouldn't be too hard considering it already supports pragmas for procs
12:28:17FromDiscord<Yardanico> just check how it's done for them
12:28:33FromDiscord<Yardanico> renderer i mean of course
12:30:43FromDiscord<Yardanico> @Tanguy it might be wrong, but I do think it's an issue in the renderer, it's the thing that "renders" the AST into Nim code
12:30:50FromDiscord<Yardanico> it's used for both docgen and `repr` in macros
12:30:59FromDiscord<Yardanico> renderer.nim in compiler
12:31:58FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3X72
12:32:08FromDiscord<Yardanico> yes, but again, `repr` here uses the renderer
12:32:23FromDiscord<Tanguy> Yes, but that works fine with `untyped`
12:33:29FromDiscord<Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3X73
12:33:32FromDiscord<Yardanico> but if they're lost, how do they still work?
12:33:42FromDiscord<Yardanico> e.g. you can have `codegenDecl` on a variable and it'll propagate all the way to the backend
12:34:59FromDiscord<Tanguy> From what I can tell, the "official ones" are transfered into the symbol indeed:↵https://github.com/nim-lang/Nim/blob/devel/compiler/pragmas.nim#L1111-L1113↵↵But they're still lost for the documentation, and the custom one are simply lost
12:37:10PMunchLooking at the implementation of "hasCustomPragma" from the macros module it appears it just goes looking for the implementation in certain cases. This also works for the symbol of a variable. So I guess something similar has to be done for the documentation generation
12:42:22*Zectbumo quit (Remote host closed the connection)
12:42:32FromDiscord<Tanguy> Indeed, hasCustomPragma works on variables, so it's probably saved somewhere. What I find weird is that on procs, the PragmaExpr stays in the "typed" phase. So there is a discrepancy here between proc & var↵Not sure what's the best way to fix the doc, do something like hasCustomPragma, or fix the discrepancy..
12:43:06FromDiscord<Tanguy> (edit) "stays" => "is still here"
12:43:52PMunchI would assume it is just `repr` which is programmed to extract the data for procedures but not for variables
12:44:01PMunchLikely someone just forgot to implement the latter
12:44:57FromDiscord<Tanguy> treeRepr too, though? It should not try to be smart, just show the tree
12:48:32PMunchAh, yes this is a bit of an unfortunate thing in Nim
12:49:35PMunchEssentially when pragma was added to variables the tree structure for those where already specified and used by macros. In order to not break all macros that handled variable definitions it was decided to instead attach the pragma directly to the symbol in a sort-of hidden way.
12:49:52PMunchAt least I think that's how the story goes, I might be mixing it up with something else
12:52:18FromDiscord<Tanguy> Mhh, ok, make sense. Well, I'm in over my head, I'll let someone with a better knowledge of the compiler find a proper solution 🙂 Thanks for the infos!
12:58:12*slowButPresent joined #nim
13:33:43FromDiscord<FireLite> sent a code paste, see https://paste.rs/XOU
13:37:00*rockcavera joined #nim
13:37:00*rockcavera quit (Changing host)
13:37:00*rockcavera joined #nim
13:47:12*PMunch quit (Quit: Leaving)
13:51:11FromDiscord<dom96> @Zectbumo You should be able to re-register now.
13:52:29*arkurious joined #nim
13:55:53duuuuuudedoes anyone use nim on node.js?
13:58:31FromDiscord<mratsim> In reply to @duuuuuude "does anyone use nim": nim -r -d:nodejs yourfile.nim
13:58:56FromDiscord<mratsim> see for example: https://github.com/Vindaar/NeuralNetworkLiveDemo/
13:59:41*kenran joined #nim
14:00:42*kenran quit (Client Quit)
14:00:51*kenran joined #nim
14:01:10*kenran quit (Client Quit)
14:01:46*kenran joined #nim
14:03:28FromDiscord<dom96> Does that repo use node.js? I don't see any mention of it
14:04:06FromDiscord<dom96> For what it's worth I don't think there is much reason to use Nim on Node
14:04:23FromDiscord<dom96> You're better off just compiling to C
14:05:33NimEventerNew Nimble package! nimwave - A TUI -> GUI library, see https://github.com/ansiwave/nimwave
14:05:33NimEventerNew Nimble package! illwave - A cross-platform terminal UI library, see https://github.com/ansiwave/illwave
14:05:33NimEventerNew Nimble package! ansiutils - Utilities for parsing CP437 and ANSI escape codes, see https://github.com/ansiwave/ansiutils
14:07:15FromDiscord<vindaar> Nope, it does not. Just a server compiled on the C backend and a client compiled using JS↵(@dom96)
14:08:42FromDiscord<xflywind> In reply to @duuuuuude "does anyone use nim": https://github.com/juancarlospaco/nodejs
14:23:32FromDiscord<Zectbumo> In reply to @dom96 "<@157415492812800000> You should be": That worked. Now I'm waiting for my confirmation link in my email
14:33:40*xaltsc quit (Read error: Connection reset by peer)
15:15:02FromDiscord<d4rckh> do macros get cached?
15:20:06FromDiscord<d4rckh> i am reading some files in a macro, but when i remove a file that was read and recompile the entire program its telling me that the file doesnt exist and fails to compile
15:24:48FromDiscord<Tanguy> No, they don't, you'll have to keep the file around
15:26:40FromDiscord<Yardanico> they do get cached if you don't change that file
15:26:52FromDiscord<Yardanico> but still, that's only until you modify that file or a modification in another file modifies this file as well
15:29:44FromDiscord<d4rckh> weird
15:29:53FromDiscord<d4rckh> i edited something in my macro and it works now
15:48:31*noeontheend joined #nim
15:54:48*kenran quit (Quit: WeeChat info:version)
15:55:22FromDiscord<Xzayler> How do I implement that `mouse_entered()` piece of code into my godot-nim code? I can't find where it is defined, or even how to use is as CollisionObject2d is a child of the node for which I wrote the script. https://media.discordapp.net/attachments/371759389889003532/972164680749563964/Screenshot_2022-05-06_at_17.54.15.png
16:11:28FromDiscord<System64 ~ Flandre Scarlet> In reply to @Xzayler "How do I implement": Godot?
16:15:01*noeontheend quit (Ping timeout: 256 seconds)
16:16:51*jjido joined #nim
16:20:45FromDiscord<untoreh> is there any package that does lazy json parsing?
16:21:22*gsalazar quit (Ping timeout: 246 seconds)
16:28:06FromDiscord<enthus1ast> Think you can parse it in chunks, but must check the module name
16:29:02FromDiscord<enthus1ast> https://nim-lang.org/docs/parsejson.html
16:30:14FromDiscord<enthus1ast> ^ @untoreh
16:30:30*duuuuuude quit (Ping timeout: 276 seconds)
16:44:36FromDiscord<geekrelief> is there an append version of `writeFile`. I need it to run at compile time.
16:47:16FromDiscord<Yardanico> In reply to @geekrelief "is there an append": hmm, didn't I respond earlier?
16:47:26FromDiscord<Yardanico> one way you can do it is by reading the file and writing it again with appended stuff
16:48:54FromDiscord<geekrelief> In reply to @Yardanico "hmm, didn't I respond": not sure what you're referring to, but thanks for the read and write suggestion, I guess writeFile is the only option. I was thinking about using macrocache too
16:52:03*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
16:54:35*duuuuuude joined #nim
17:10:13NimEventerNew thread by Carterza: Why I left the Nim community, see https://forum.nim-lang.org/t/9145
17:15:27FromDiscord<Xzayler> In reply to @System64 "Godot?": Yes, using the nim bindings
17:15:34*xet7 quit (Remote host closed the connection)
17:16:41*xet7 joined #nim
17:25:34*droidrage joined #nim
17:54:25FromDiscord<Alea> In reply to @NimEventer "New thread by Carterza:": I member seeing that profile around the discord back in the day a few months ago
17:56:54FromDiscord<Yardanico> what profile?
17:57:28FromDiscord<Alea> The cartezera guy
17:57:42FromDiscord<Alea> Hadn't noticed that he's been gone for a while
17:58:27FromDiscord<Yardanico> In reply to @Alea "The cartezera guy": he's been around for years, https://github.com/zacharycarter
17:59:41FromDiscord<Alea> His post definitely raises some interesting concerns too :peepowtf:
18:05:07*kenran joined #nim
18:05:15*kenran quit (Client Quit)
18:05:49*qwestion joined #nim
18:06:16*kenran joined #nim
18:16:30*jmdaemon joined #nim
18:29:07FromDiscord<d4rckh> @Yardanico i fricking love your nuglifier!
18:29:31FromDiscord<Yardanico> why 😨
18:29:42FromDiscord<Yardanico> you sure have interesting... tastes
18:30:30FromDiscord<d4rckh> :Think:
18:33:39FromDiscord<d4rckh> did you consider adding a recursive option?
18:35:40FromDiscord<Yardanico> huh?
18:38:19FromDiscord<d4rckh> for example, to nuglify an entire project. it would search for nim files in a folder, and make another folder with the same folder structure, with the nuglified files
18:38:55FromDiscord<Yardanico> i hope you're not planning to use nuglifier for any real purposes, it's just a joke about case insensitivity
18:39:38FromDiscord<d4rckh> oh...
18:40:06FromDiscord<Yardanico> @d4rckh it won't help with obfuscation at all
18:40:18FromDiscord<enthus1ast> but your strenc will \:)
18:40:19FromDiscord<Yardanico> it changes the nim code a bit, but the resulting C code will be almost the same really
18:40:27FromDiscord<Yardanico> it'll be much better if you strip the binary
18:40:37FromDiscord<Yardanico> than just trying some weird identifier-changing tools
18:40:51FromDiscord<enthus1ast> @d4rckh\: please do not deploy your viruses
18:42:06FromDiscord<d4rckh> i have 0 malicious intent
18:43:06FromDiscord<enthus1ast> we have enough antivirus issues \:/
18:43:22FromDiscord<Yardanico> well intent is intent, but if AVs get your malicious binary (even if it wasn't mean for malicious issues), they'll probably detect even more innocent nim binaries :(
18:44:14FromDiscord<d4rckh> i have automatic sample submission disabled on my defender
18:44:39FromDiscord<System64 ~ Flandre Scarlet> In reply to @Xzayler "Yes, using the nim": Oh nice
19:20:44*rockcavera quit (Remote host closed the connection)
19:41:51*ehmry quit (Ping timeout: 256 seconds)
19:55:51*Zectbumo joined #nim
20:05:54FromDiscord<Zectbumo> @dom96 I created my forum account and waited 6 hours for my email confirmation link and I haven't received it. I checked trash/all mail/and spam @Zectbumo ↵would you be able to send me a new one? I much appreciate your assistance
20:06:48FromDiscord<Yardanico> In reply to @Zectbumo "<@132595483838251008> I created my": let me manually activate you
20:06:59FromDiscord<Yardanico> done
20:07:59FromDiscord<Zectbumo> In reply to @Yardanico "let me manually activate": thank you! it's been a bit of a headache (that I caused) and some how I got behind the curve on this one
20:08:03FromDiscord<dom96> Was just about to do that :)
20:08:15FromDiscord<dom96> You’re too fast Yardanico
20:08:32FromDiscord<Zoom> The forum needs attention. Especially since all those not-rendered messages started to appear.
20:08:33FromDiscord<dom96> But yeah, the emails are always spotty unfortunately
20:09:55FromDiscord<Prestige> Is there a way to have `nimble develop` create and symlink the binary from a binary or hybrid package?
20:10:32FromDiscord<Xzayler> is nim as a language growing? what do you guys think?
20:11:18FromDiscord<Prestige> Yep it's growing - I wish it was growing faster though
20:11:25FromDiscord<Xzayler> I really like it so far but it's hard to find information for it as a beginner. It has been relatively easy to learn the basics though
20:11:27FromDiscord<Prestige> Hopefully the coming changes help adoption
20:11:53FromDiscord<frobnicate> In reply to @Avahe "Yep it's growing -": you need a marketing budget for that, like Google with Go
20:12:25FromDiscord<Prestige> I think our tooling is holding us back a lot as well. But yeah, market definitely would help
20:12:56FromDiscord<Prestige> (edit) "market" => "marketing"
20:18:27FromDiscord<frobnicate> What tooling are you lacking?
20:19:31FromDiscord<Clonkk> If only there was an existing solution who not only provide more feature and but that didn't require maintenance... Too bad we're the first one to ever develop a forum online and no such things exists
20:19:47FromDiscord<Prestige> Syntax highlighting often breaks, nimsuggest reports false errors and crashes often, jump to definition etc doesn't work reliably↵It's the reason why a lot of devs I know either didn't give Nim a try, or stopped using it after a few weeks
20:20:10FromDiscord<Prestige> I hear IC is supposed to help with editor support but it's still in the works
20:20:19FromDiscord<Clonkk> Also nimsuggest will hog all the RAM on big file / project
20:20:22*noeontheend joined #nim
20:20:46*duuuuuude quit (Remote host closed the connection)
20:21:10*duuuuuude joined #nim
20:24:36FromDiscord<Zoom> Heh, Dlang forum is very nice indeed, at least from the lurker's perspective.
20:24:37FromDiscord<Zoom> Don't tell me there's others.
20:24:37FromDiscord<Zoom> Seriously, if we had a tool valuable to other smaller language communities it would be super cool to amicably support and promote each other this way
20:25:26FromDiscord<Zectbumo> @dom96 I made my forum post! thank you. And now that I'm familiar with the team I just noticed this post I've been trying to respond to all this week was made by you 😄↵I hope my idea is worthwhile 😅
20:25:38*rockcavera joined #nim
20:25:38*rockcavera quit (Changing host)
20:25:38*rockcavera joined #nim
20:32:08FromDiscord<Bubblie> how can I make nim give me more info about na error, its giving me hint: used file
20:32:24FromDiscord<Bubblie> (edit) "na" => "an"
20:33:07FromDiscord<Zectbumo> "used file" is your hint??
20:33:28FromDiscord<Bubblie> used config file nim.cfg... yeah
20:33:49FromDiscord<Bubblie> im using vulkan bindings and this happens only when I do import vulkan, so its clear something happened wih the bindings
20:33:57FromDiscord<Bubblie> when I don't import its fine
20:34:00FromDiscord<Bubblie> which is odd
20:34:16FromDiscord<Bubblie> I got glfw working with futhark but the problem now is that I thought the vulkan bindings were working except uh
20:34:19FromDiscord<Bubblie> they arent
20:35:19FromDiscord<Bubblie> let me try forking these bindings and seeing
20:35:28FromDiscord<Zoom> Wait, @Bubblie you're reusing your files? Weirdo
20:35:35FromDiscord<Bubblie> ?
20:35:37FromDiscord<Bubblie> what
20:37:51FromDiscord<Bubblie> I cant tell if this is me being stupid, or something with the bindings
20:37:53FromDiscord<Bubblie> most likely me being stupid
20:38:26FromDiscord<Bubblie> oh nvm
20:38:52FromDiscord<Bubblie> found the issues, its the bindings I think actually
20:39:00FromDiscord<Bubblie> wow this vscode plugin is great
20:43:29FromDiscord<Bubblie> ah okay
20:43:51FromDiscord<Bubblie> so, instead of {.union} should I remove it and keep it as object?
20:43:57FromDiscord<Bubblie> .union is deprecated it seems
20:44:14FromDiscord<Yardanico> `union` isn't deprecated, it's for C FFI only
20:44:35FromDiscord<Yardanico> Can you share the exact warning/error message that the compiler shows?
20:44:43FromDiscord<Yardanico> Not from the vscode plugin, but from the compiler
20:45:13FromDiscord<Bubblie> yeah sure give me one sec
20:48:28*lumo_e joined #nim
20:48:43FromDiscord<Bubblie> okay this is a bit embarassing but how do I get more intricate errors, it only tells me hints
20:49:04FromDiscord<Yardanico> can you show a screenshot?
20:49:10FromDiscord<Yardanico> maybe it compiled without error or the compiler crashed
20:50:22FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8H
20:50:28FromDiscord<Yardanico> maybe you just didn't scroll the terminal?
20:51:19FromDiscord<Bubblie> oh, LMAO the god its been a while since I used vscode, yeah you have to click the confs and it tells you where everything is
20:51:29FromDiscord<Bubblie> or where exactly it sees the error
20:52:51FromDiscord<Bubblie> okay it seems to be the fact that its getting the wrong path lol
20:59:00*nerthus joined #nim
21:03:56FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8J
21:04:06FromDiscord<Bubblie> this right here in config.nims of nimeous's vulkan
21:04:08FromDiscord<Bubblie> seems to be the issue
21:05:15FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8K
21:05:27*noeontheend quit (Ping timeout: 276 seconds)
21:05:32FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8L
21:05:44FromDiscord<Yardanico> again, are you looking at vscode errors? this is a nimscript config file
21:05:52FromDiscord<Yardanico> check the actual nim compiler output
21:06:14FromDiscord<Yardanico> vscode plugin will show errors in .nims files because it uses `nim check` and nimcheck had a bug about not being able to check nimscript files that was only fixed in devel
21:06:45FromDiscord<Bubblie> hold on can I send a hastebin?
21:06:48FromDiscord<Yardanico> ah actually it is backported to 1.6.6, so you shouldn't really see that
21:06:56FromDiscord<Yardanico> yes, or just code paste here @Bubblie
21:07:15FromDiscord<Bubblie> https://www.toptal.com/developers/hastebin/wusehedote.yaml this is the output from the compiler
21:07:34FromDiscord<Yardanico> this is only the end of the output, it can't find some identifier so it's showing the alternatives
21:07:38FromDiscord<Yardanico> can you paste the whole output?
21:09:25FromDiscord<Bubblie> well from the undeclared switch error thats all that comes after, Im clearly not getting all of the output for some reason
21:09:48FromDiscord<Yardanico> In reply to @Bubblie "well from the undeclared": are you compiling the .nims file itself or something?
21:09:59FromDiscord<Yardanico> can you please show the full command you're using along with its full output
21:10:00*duuuuuude quit (Ping timeout: 276 seconds)
21:10:07FromDiscord<Yardanico> you can censor out your username if you want
21:10:51*noeontheend joined #nim
21:14:07FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8P
21:14:39FromDiscord<Yardanico> the link shows you compiling the nims file
21:14:50FromDiscord<Yardanico> the paste you showed in discord just says that the file is missing
21:14:56FromDiscord<Yardanico> are you sure "instance.nim" is in the Documents\vulkan folder?
21:15:02FromDiscord<Yardanico> maybe you had a typo in the filename or something
21:15:28FromDiscord<Bubblie> oh yeah im an absolute idiot
21:17:03FromDiscord<Yardanico> also you don't really need the code runner or whatever extension you're using (for the thing in the hastebin paste), you can just press F6
21:17:14FromDiscord<Yardanico> that's the nim extension's shortcut for compiling and running the currently opened .nim file
21:22:47FromDiscord<Bubblie> oh I did not know that, thanks! I am getting another error though due to the path, apparantly when it reads the config.nims to properly run instance.nim this happens↵https://www.toptal.com/developers/hastebin/hihotihise.apache
21:23:08FromDiscord<Yardanico> do you actually have vulkan-1.lib in the folder it searches it in?
21:23:17FromDiscord<Bubblie> yes
21:24:04FromDiscord<Bubblie> https://media.discordapp.net/attachments/371759389889003532/972247402377543710/unknown.png
21:24:22FromDiscord<Yardanico> hmm, maybe it's the wrong architecture
21:24:25FromDiscord<Yardanico> but i'm not sure
21:24:38FromDiscord<Bubblie> wait hold on, I think im being stupid again
21:24:40FromDiscord<Bubblie> give me one sec
21:27:06*jjido joined #nim
21:27:54FromDiscord<Bubblie> yard
21:27:55FromDiscord<Bubblie> I got it
21:29:27FromDiscord<Bubblie> In reply to @Bubblie "the regex are wrong": so my dumbass right forgot the r right in front here, and apparantly the string regex wasn't needed because usually when I was installing things for nim I needed a \\ because of the fact that nim would often be like string regex moment
21:29:51FromDiscord<Bubblie> (edit) "In reply to @Bubblie "the regex are wrong": so my dumbass right forgot the r right in front here, and apparantly the string regex wasn't needed because usually when I was installing things for nim I needed a ... \\" added "double"
21:30:05FromDiscord<Bubblie> here its not needed because its a config.nims
21:30:22FromDiscord<Yardanico> yeah, just fyi, `r` in Nim isn't about regexes :)
21:30:39FromDiscord<Yardanico> it's about raw string literals, so there are no escape sequences like `\n`
21:31:13FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3X8S
21:31:35FromDiscord<Yardanico> this is needed on Windows because it uses \ as a path separator which is also used for escape sequences
21:31:41FromDiscord<Yardanico> unless you do double quotes of course
21:32:00FromDiscord<Bubblie> I did not know that that is great
21:34:35FromDiscord<Bubblie> I really love this language
21:38:44*noeontheend quit (Ping timeout: 248 seconds)
21:40:46*kenran quit (Quit: WeeChat info:version)
21:42:01*ehmry joined #nim
21:44:40FromDiscord<Bubblie> this is so weird
21:45:38FromDiscord<Bubblie> apparantly the vulkan.nim is different than that of the vulkan.nim it should be getting from the repo
21:45:44FromDiscord<Bubblie> like it has different code
21:46:09FromDiscord<Yardanico> and how did you install it?
21:46:14FromDiscord<Bubblie> nimble install https://github.com/nimious/vulkan.git
21:46:25FromDiscord<Yardanico> yeah that installed the last release which is from 2016
21:46:35FromDiscord<Yardanico> `nimble install https://github.com/nimious/vulkan@#ead`
21:46:50FromDiscord<Yardanico> if a repo has tags (and it does in this case), nimble will install the last tag by default
21:47:04FromDiscord<Yardanico> In reply to @Yardanico "`nimble install https://github.com/nimious/vulkan@#": head
21:47:10FromDiscord<Yardanico> `nimble install https://github.com/nimious/vulkan@#head`
21:47:17FromDiscord<Bubblie> Ah okay, that is actually great wow
21:47:24*duuuuuude joined #nim
21:51:54FromDiscord<exelotl> sent a code paste, see https://paste.rs/iPP
21:52:22FromDiscord<Yardanico> In reply to @exelotl "if I stick `{.raises:": hmm, it usually already should show that, but the "dumb" way is to just add this pragma to the procs called by your main proc to see if they're faulty
21:52:42FromDiscord<Yardanico> also in general it's callbacks/closures that add Exception to the raises list of a proc
21:52:58FromDiscord<Yardanico> for that there's https://nim-lang.org/docs/manual.html#effect-system-effectsof-annotation
21:56:09FromDiscord<exelotl> ah, yeah slapping the pragma further down the chain does reveal more info, cheers
22:10:25*analogsalad joined #nim
22:11:36FromDiscord<Bubblie> WOooo vulkan works now
22:11:41FromDiscord<Bubblie> @Yardanico thank you for everything yard
22:14:25*analogsalad left #nim (#nim)
22:20:13FromDiscord<Alea> Why does `importedModule.pubProc()` work? Is it just a side effect of some other rule or..?
22:21:19FromDiscord<Yardanico> In reply to @Alea "Why does `importedModule.pubProc()` work?": ? it is supposed to work
22:21:28FromDiscord<Yardanico> you can fully qualify symbols by using the module name they're coming from
22:22:10FromDiscord<Alea> Makes sense, imports always work standalone so I just assumed that was the default
22:29:51*vicfred joined #nim
22:49:16FromDiscord<Alea> does a 1.5x increase in font size correspond to a 1.5x increase in the pixel height of characters?
22:50:36FromDiscord<Recruit_main707> hmm
22:50:52FromDiscord<Recruit_main707> proceeds to open paint
23:13:31FromDiscord<Recruit_main707> https://media.discordapp.net/attachments/371759389889003532/972274941250658305/unknown.png
23:15:12FromDiscord<Yardanico> Sometimes I feel like #main and #offtopic swap places xD (it's all fine though)
23:16:58FromDiscord<Alea> In reply to @Yardanico "Sometimes I feel like": it's technically nim related :hmmNoted: https://media.discordapp.net/attachments/371759389889003532/972275809819709450/unknown.png
23:17:44FromDiscord<Alea> In reply to @Recruit_main707 "": so I presume that last one is 20↵weird that it's 1 pixel off
23:17:53FromDiscord<Alea> unlike the others
23:18:29FromDiscord<Yardanico> In reply to @Alea "it's technically nim related": What's toSeq?
23:18:43FromDiscord<Alea> https://media.discordapp.net/attachments/371759389889003532/972276252096466964/unknown.png
23:18:50FromDiscord<Yardanico> to convert a string into a seq of chara you can just use the `@` operator
23:18:56FromDiscord<Yardanico> (edit) "chara" => "chars"
23:19:13FromDiscord<Yardanico> In @[1, 2] `@` is also an operator btw
23:19:26FromDiscord<Yardanico> `echo @"hi"`
23:19:26FromDiscord<Alea> that's probably much faster tbh
23:21:55FromDiscord<Alea> actually I can't tell which one of these would be faster since toSeq doesn't say anything about copies
23:23:10FromDiscord<Alea> also the @ doesn't seem to work on this https://media.discordapp.net/attachments/371759389889003532/972277373208780820/unknown.png
23:24:19FromDiscord<Alea> guess it's because a slice isn't equivalent to an openarray while a string is?
23:25:02FromDiscord<Yardanico> yes
23:25:16FromDiscord<Yardanico> also why create a seq of glyphs, just make a set?
23:25:20FromDiscord<Yardanico> it will be more efficient
23:25:30FromDiscord<Yardanico> since you're using chars only anyway
23:25:55FromDiscord<Yardanico> `{' '..'~'}`
23:28:04FromDiscord<Yardanico> And yes, it's faster, it's also faster than having chars in an array
23:28:30FromDiscord<Elegantbeef> It's also smaller!
23:28:39FromDiscord<Elegantbeef> by a factor of 8
23:29:00FromDiscord<Alea> That case didn't really matter since it's only used once to load the glyphs, but I'll keep that in mind
23:32:55FromDiscord<Yardanico> In reply to @Elegantbeef "by a factor of": 😍
23:33:04FromDiscord<Yardanico> yes, good stuff
23:33:31FromDiscord<Yardanico> Just don't use them with int16 or int32 as that'll very slow of you do copying
23:33:43FromDiscord<Yardanico> (edit) "Just don't use them with int16 or int32 as that'll ... veryif" added "be" | "of" => "if"
23:34:01FromDiscord<TryAngle> can I somehow create a generic tuple from a string at runtime?
23:34:02FromDiscord<Elegantbeef> You can only use them with a range of uint16
23:34:15FromDiscord<Yardanico> In reply to @Elegantbeef "You can only use": int16 as well
23:34:30FromDiscord<Yardanico> !eval echo {1.int16}
23:34:33NimBot{1}
23:35:02FromDiscord<Elegantbeef> int16 does have a range of int16 yes
23:35:06FromDiscord<Yardanico> In reply to @TryAngle "can I somehow create": You can't create a "type" at runtime if that's what you're asking
23:35:23FromDiscord<Yardanico> Can you explain what you need this for?
23:38:38FromDiscord<TryAngle> I wanna create a toy graph db
23:39:33FromDiscord<TryAngle> so the best way is to create "virtual types" by just making the fields of runtime types to bytes?
23:41:21FromDiscord<TryAngle> something like sqllite
23:42:09FromDiscord<Andreas> Puh, so since iterators cannot be recursive - how would one then traverse a graph ? In a sane way - could smbd. pls give some advice here ?
23:43:06FromDiscord<demotomohiro> You can call procedures recursively.
23:43:39FromDiscord<Prestige> Can't you just do it without recursion?
23:44:44FromDiscord<Andreas> In reply to @demotomohiro "You can call procedures": ok, but can i do 'generator-like-thinggy somehow ?
23:45:29FromDiscord<Andreas> In reply to @Avahe "Can't you just do": well, i would not know a way yet... how would you approach it ?
23:45:49FromDiscord<TryAngle> how do you get the underlying bytes of an object?
23:49:34*Zectbumo quit (Remote host closed the connection)
23:50:14FromDiscord<Elegantbeef> `cast[ptr UncheckedArray[byte]](myObj.addr)`
23:52:14FromDiscord<aboisvert (Alex Boisvert)> Example here\: https://github.com/brianshannan/nim-trees/blob/master/nimtrees/trees/red_black.nim#L277
23:52:15FromDiscord<aboisvert (Alex Boisvert)> You can store your iteration state in local variables and use looping constructs instead of using recursion↵(@Andreas)
23:52:45FromDiscord<aboisvert (Alex Boisvert)> (Example is for a tree structure but would be similar for a graph)
23:55:05FromDiscord<Andreas> In reply to @aboisvert (Alex Boisvert) "(Example is for a": thx, that looks sweet, i did this here, https://discord.com/channels/371759389889003530/371759389889003532/972053966009557002