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:15 | FromDiscord | <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:16 | FromDiscord | <pls use my ruby nimble package> sent a code paste, see https://play.nim-lang.org/#ix=3X5t |
03:59:29 | FromDiscord | <pls use my ruby nimble package> (edit) "form" => "forum" |
04:03:58 | FromDiscord | <pls use my ruby nimble package> sent a code paste, see https://play.nim-lang.org/#ix=3X5v |
04:04:14 | FromDiscord | <Elegantbeef> That doesnt really work 😄 |
04:04:34 | FromDiscord | <Elegantbeef> It's ambiguous between the present generic type classes and a union |
04:05:07 | FromDiscord | <Rika> the first one seems ok |
04:05:15 | FromDiscord | <Rika> `Null = nil`↵`of Null: discard` |
04:05:29 | FromDiscord | <Rika> = nil or = discard, not sure which would be nicer |
04:05:41 | FromDiscord | <Elegantbeef> I dont like that you can define types in the first |
04:05:45 | FromDiscord | <Elegantbeef> How does exporting work there |
04:05:48 | FromDiscord | <Rika> beef, its a proposal |
04:05:55 | FromDiscord | <Rika> rfc |
04:05:59 | FromDiscord | <Rika> nim 2 idea |
04:06:00 | FromDiscord | <Elegantbeef> Yea i know |
04:06:04 | FromDiscord | <Elegantbeef> I'm just commenting |
04:06:44 | FromDiscord | <Rika> i guess the anonymous type part shouldnt be |
04:06:53 | FromDiscord | <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:35 | FromDiscord | <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:36 | FromDiscord | <Rika> tuple behaviour should not be default |
04:08:06 | FromDiscord | <Elegantbeef> Tuples cannot have exported/unexported fields |
04:08:21 | FromDiscord | <Elegantbeef> Types can be exported |
04:08:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/fe4 |
04:08:24 | FromDiscord | <pls use my ruby nimble package> Okay maybe that was a bad explanation |
04:08:35 | FromDiscord | <pls use my ruby nimble package> Just think about it like a rust enum |
04:08:42 | FromDiscord | <Rika> we do not know rust |
04:08:47 | FromDiscord | <pls use my ruby nimble package> O |
04:08:49 | FromDiscord | <Rika> do not expect us to know rust |
04:08:50 | FromDiscord | <Elegantbeef> I know rust enums |
04:09:15 | FromDiscord | <Rika> if theyre just functional-style enums then okay |
04:09:26 | FromDiscord | <Elegantbeef> They're ADTs so yea |
04:09:35 | FromDiscord | <Rika> okay |
04:10:07 | FromDiscord | <Rika> hmm |
04:10:12 | FromDiscord | <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:17 | FromDiscord | <pls use my ruby nimble package> It's just an example 😂 i threw that together in 2 minutes on my phone |
04:11:51 | FromDiscord | <pls use my ruby nimble package> So some parts of it probably aren't perfect. |
04:12:34 | FromDiscord | <yoyojambo> what do you guys use to debug in nim? |
04:12:45 | FromDiscord | <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:02 | FromDiscord | <Elegantbeef> I generally just do echo debugging since Nim's echo is powerful |
04:13:13 | FromDiscord | <Rika> there's a gdb compat layer for nim |
04:13:23 | FromDiscord | <Rika> In reply to @Elegantbeef "I generally just do": doesnt work too well in many cases |
04:13:42 | FromDiscord | <Elegantbeef> Eh i've never reached for a debugger to use with Nim |
04:13:49 | FromDiscord | <yoyojambo> In reply to @Rika "there's a gdb compat": do I just google it like that? |
04:14:06 | FromDiscord | <Rika> nim gdb on youtube i believe theres a video on it |
04:14:14 | FromDiscord | <Elegantbeef> Your distribution of Nim should have a `nim_gdb.py` script that can be used with GDB |
04:14:20 | FromDiscord | <yoyojambo> In reply to @Rika "nim gdb on youtube": perfect, thank you |
04:14:30 | FromDiscord | <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:33 | FromDiscord | <yoyojambo> In reply to @Elegantbeef "Your distribution of Nim": It gave me an error :/ |
04:14:36 | FromDiscord | <yoyojambo> a syntax error |
04:16:37 | FromDiscord | <yoyojambo> sent a code paste, see https://paste.rs/HTu |
04:16:57 | FromDiscord | <yoyojambo> (edit) "https://play.nim-lang.org/#ix=3X5x" => "https://play.nim-lang.org/#ix=3X5y" |
04:17:35 | FromDiscord | <yoyojambo> maybe I am doing something wrong but I tried this and that's the error I am talking about |
04:19:32 | FromDiscord | <yoyojambo> In reply to @evan "Nim-gdb works great. Getting": are you also talking about the nim_gdb.py script? |
04:20:10 | FromDiscord | <pls use my ruby nimble package> Yep. Typucally you can just run `nim-gdb` directly from the terminal |
04:20:23 | FromDiscord | <yoyojambo> In reply to @yoyojambo "maybe I am doing": I barely tried tho. ill later get back to it |
04:20:39 | FromDiscord | <yoyojambo> In reply to @evan "Yep. Typucally you can": ohhh didnt know that |
04:21:38 | FromDiscord | <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:14 | FromDiscord | <yoyojambo> In reply to @evan "give that a shot.": sure think, thanks a lot |
04:27:57 | * | slowButPresent quit (Quit: leaving) |
04:31:13 | FromDiscord | <yoyojambo> what is supposed to happen when I run it? |
04:31:43 | FromDiscord | <Elegantbeef> It starts GDB |
04:32:28 | FromDiscord | <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:39 | FromDiscord | <yoyojambo> In reply to @Elegantbeef "It starts GDB": hmmm ok lemme look into what went wrong then |
04:36:18 | FromDiscord | <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:14 | FromDiscord | <d4rckh> It's mad at you haha |
05:16:27 | FromDiscord | <Rika> SSSSSSSIGINT |
06:18:44 | * | PMunch joined #nim |
06:29:18 | PMunch | Hmm, has there been a breaking change to config.nims in the latest version? |
06:31:03 | FromDiscord | <Elegantbeef> Is this in reference to ratel or what? |
06:31:08 | PMunch | Yeah |
06:33:03 | FromDiscord | <Elegantbeef> Perhaps there is |
06:33:24 | FromDiscord | <Prestige> Maybe an unintentional breaking change |
06:37:23 | PMunch | Hmm, doesn't look like it |
06:39:47 | PMunch | I'm trying to define `avr.any.gcc.path = "/usr/bin"` in config.nims |
06:39:53 | PMunch | But that doesn't work.. |
06:40:19 | FromDiscord | <Elegantbeef> you need to use `put` i think |
06:41:23 | FromDiscord | <Elegantbeef> config.nims doesnt support the dots like that afaik, you might be thinking of `nim.cfg`? |
06:43:01 | FromDiscord | <Elegantbeef> actually you can use `--av.any.gcc.path = "/usr/bin"` |
06:44:21 | PMunch | Ah right |
06:44:37 | PMunch | Yeah I migrated from a nim.cfg to a config.nims at some point |
06:45:01 | PMunch | And I just have them in my global nim.cfg, so it's just a matter of me messing up the documentation |
06:48:34 | PMunch | Hmm, can I undo a --noMain from another config? |
06:48:52 | FromDiscord | <Elegantbeef> `--noMain:on` |
06:48:53 | FromDiscord | <Elegantbeef> or `off` |
06:48:54 | PMunch | And --noMain:off |
06:49:17 | FromDiscord | <Elegantbeef> I think it should override |
06:49:21 | FromDiscord | <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:23 | FromDiscord | <Asbjørn F> I'm poo at docker |
07:34:41 | PMunch | @Elegantbeef, yeah that worked |
07:34:54 | FromDiscord | <Elegantbeef> I dont even think it exists |
07:35:31 | FromDiscord | <Asbjørn F> any good books on docker? |
07:36:20 | FromDiscord | <Elegantbeef> Ah good to hear pmunch |
07:36:21 | FromDiscord | <Yardanico> @ash42 please ask that in #offtopic, especially because there's an on-topic discussion going on here |
07:36:33 | FromDiscord | <Yardanico> @Asbjørn F i meant ^ |
07:36:37 | FromDiscord | <Elegantbeef> Theree's an on topic discussion? |
07:36:43 | FromDiscord | <Elegantbeef> Is the bridge hiding messages? |
07:36:44 | FromDiscord | <Asbjørn F> Sorry, my b |
07:36:58 | FromDiscord | <Elegantbeef> Nope no hidden messages |
07:37:38 | FromDiscord | <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:00 | PMunch | @Elegantbeef, is 0.1.0 higher than 0.9.1? |
07:53:04 | PMunch | Or did I read that wrong? |
07:53:14 | PMunch | And Yardanico, there wasn't really anything on-topic going on here :P |
07:53:44 | PMunch | @Asbjørn_F, don't really have any docker books to recommend, I just sorta picked it up as I went along |
07:55:05 | PMunch | The 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:47 | FromDiscord | <Elegantbeef> Yea their versioning is weird |
07:55:48 | PMunch | Then 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:14 | FromDiscord | <Elegantbeef> Yea i couldnt get docker to even work so i just toyed with my game a bit instead |
07:57:17 | PMunch | Of 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:32 | PMunch | @Elegantbeef, I mean that's not weird, that's just wrong :P |
07:57:55 | FromDiscord | <Elegantbeef> Yea i know what docker is supposed to do but i apparently fucked up |
07:58:16 | PMunch | @Elegantbeef, of yeah I was talking to @Asbjørn_F |
07:59:24 | PMunch | Uhm, are you sure 0.1.0 is newer? Looking at their GitHub releases it seems 0.9.1 is the newest version |
08:00:25 | FromDiscord | <Elegantbeef> 0.10.0 whoops 😄 |
08:03:00 | FromDiscord | <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:07 | FromDiscord | <Asbjørn F> also how people setup backups |
08:07:11 | FromDiscord | <Asbjørn F> I don't know if replies show up in the bridge @PMunch |
08:07:16 | PMunch | Ah I see, slightly different use-case from what I've been using it for. Not sure really how people do backups |
08:08:33 | PMunch | Yeah replies show up as "In reply to <user> "<start of message>": <your reply> |
08:08:40 | FromDiscord | <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:48 | FromDiscord | <Andreas> sent a long message, see http://ix.io/3X68 |
08:31:09 | FromDiscord | <Andreas> (edit) "http://ix.io/3X68" => "http://ix.io/3X69" |
08:31:50 | FromDiscord | <Elegantbeef> The first is a typeclass and not a union |
08:31:54 | FromDiscord | <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:04 | FromDiscord | <Andreas> (edit) "http://ix.io/3X69" => "https://paste.rs/nY9" |
08:32:15 | FromDiscord | <Elegantbeef> If you're talking about the union packaged i linked it generates the same as a manual object variant |
08:33:50 | FromDiscord | <Elegantbeef> The typeclass is for constraining generics, and not for unions 😄 |
08:33:57 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> Yea you're they're all tagged unions internally |
08:35:30 | FromDiscord | <Andreas> sent a long message, see http://ix.io/3X6a |
08:36:06 | FromDiscord | <Elegantbeef> Three ticks before and after code blocks 😛 |
08:36:19 | FromDiscord | <Elegantbeef> Yea that's what you need to do here anyway, `union`s doesnt give you that |
08:36:25 | FromDiscord | <Andreas> (edit) "long message," => "code paste," | "http://ix.io/3X6a" => "https://play.nim-lang.org/#ix=3X6b" |
08:36:49 | FromDiscord | <Elegantbeef> that spacing from `[]` drives me up the wall |
08:36:57 | FromDiscord | <Andreas> (edit) |
08:37:52 | FromDiscord | <Prestige> lol |
08:38:44 | FromDiscord | <Andreas> In reply to @Elegantbeef "*that spacing from `[]`": ohh, i love it when theres some air in-between |
08:39:15 | FromDiscord | <Elegantbeef> Chooses to keep his feelings to himself for once |
08:39:56 | FromDiscord | <Rika> youre getting smarter |
08:40:29 | FromDiscord | <Yardanico> beefier |
08:40:43 | FromDiscord | <Elegantbeef> Damn i knew these pants made my ass look fat |
09:03:47 | FromDiscord | <Xzayler> When should I be using procs and when should I be using methods? |
09:04:01 | FromDiscord | <Xzayler> Mind you I'm very mush a beginner, using godot nim bindings |
09:04:05 | FromDiscord | <Xzayler> (edit) "mush" => "much" |
09:04:14 | FromDiscord | <Asbjørn F> Nim has methods? |
09:04:38 | FromDiscord | <Rika> yes but they are very very very very rarely used |
09:04:53 | FromDiscord | <Xzayler> in the godot-nim stub example they use methods |
09:05:02 | FromDiscord | <Elegantbeef> Methods are to be used in OOP cases |
09:05:06 | FromDiscord | <Elegantbeef> If you need to override behaviour |
09:05:16 | FromDiscord | <Elegantbeef> In godot you'll almost always use methods inside `gdObj` |
09:05:19 | FromDiscord | <Xzayler> yeah I do because there's a lot of inheritance going on |
09:05:47 | FromDiscord | <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:52 | FromDiscord | <Xzayler> like a completely new one I write? |
09:06:01 | FromDiscord | <Xzayler> (edit) "eample" => "example" |
09:06:06 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> No Nim has `method` and `proc` |
09:06:51 | FromDiscord | <Elegantbeef> They're declared the same but `method` is dynamically dispatched |
09:08:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3X6h |
09:08:45 | FromDiscord | <Elegantbeef> that can also be called `getStr(data[0])` |
09:09:39 | FromDiscord | <Asbjørn F> oh |
09:09:51 | FromDiscord | <Asbjørn F> I totally skipped over that part in the docs, wow |
09:10:10 | FromDiscord | <Asbjørn F> Thanks for showing |
09:10:45 | FromDiscord | <Elegantbeef> No problem |
09:15:37 | FromDiscord | <Zectbumo> does nim executables have dependancies? |
09:16:11 | FromDiscord | <Yardanico> depends on the libraries you use |
09:16:20 | FromDiscord | <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:27 | FromDiscord | <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:46 | FromDiscord | <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:07 | FromDiscord | <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:10 | FromDiscord | <Zectbumo> In reply to @dom96 "Can you create a": 😿 pretty please. i like my username |
09:17:27 | FromDiscord | <Yardanico> so if you compile it on ubuntu/arch, it won't run on alpine because alpine uses musl |
09:17:45 | FromDiscord | <Zectbumo> @dom96 is there a timeout, like deleted accounts expunge after so much time? |
09:18:10 | FromDiscord | <dom96> In reply to @Zectbumo "😿 pretty please. i": I'll see what I can do. |
09:22:14 | FromDiscord | <jmgomez> Hey guys, how can I pass a parameter to a macro pragma? I mean how do I define it? |
09:24:20 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3X6l |
09:24:20 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/h1F |
09:24:32 | FromDiscord | <Elegantbeef> First! |
09:24:40 | FromDiscord | <Yardanico> i'm first in discord :) |
09:24:49 | FromDiscord | <Elegantbeef> Yea i figured |
09:24:55 | FromDiscord | <Yardanico> 😔 |
09:25:06 | FromDiscord | <jmgomez> lol thank you guys! |
09:25:56 | FromDiscord | <Elegantbeef> No thank me |
09:26:27 | FromDiscord | <Zectbumo> In reply to @mothumix "can you show the": nim c go.nim |
09:26:47 | FromDiscord | <Zectbumo> "Abort trap" |
09:26:56 | FromDiscord | <Yardanico> what chroot are you running it in? |
09:27:11 | FromDiscord | <Yardanico> and what host did you compile it on? I mean OS |
09:27:59 | FromDiscord | <Zectbumo> OpenBSD |
09:28:17 | FromDiscord | <Zectbumo> I copied over gdb and ran that and it's Abort Trap too. so maybe unrelated to nim after all |
09:28:34 | FromDiscord | <Zectbumo> chroot /var/www |
09:28:35 | FromDiscord | <Yardanico> @Zectbumo so is both the host and guest openbsd? |
09:29:34 | FromDiscord | <Zectbumo> uhm host I forget now. Some debian or ubuntu |
09:29:43 | FromDiscord | <Yardanico> well, that's the problem |
09:29:49 | FromDiscord | <Yardanico> binaries compiled for linux can only run on linux |
09:29:58 | FromDiscord | <Yardanico> OpenBSD isn't Linux, you need to cross-compile for it |
09:30:04 | FromDiscord | <Elegantbeef> Unles you use the linuxlator 😛 |
09:30:10 | FromDiscord | <Yardanico> does that exist for openbsd? |
09:30:17 | FromDiscord | <Elegantbeef> It's for one of the BSD |
09:30:25 | FromDiscord | <Yardanico> i know it on FreeBSD |
09:30:27 | FromDiscord | <Zectbumo> oh you mean where I compiled it from. yes both host and guest are openbsd. I thought you meant the VMM |
09:31:10 | FromDiscord | <Yardanico> still weird, but why'd you want to chroot /var/www ? |
09:31:20 | FromDiscord | <Zectbumo> it's what the web server does |
09:31:34 | FromDiscord | <Zectbumo> (cgi) |
09:32:06 | * | duuuuuude joined #nim |
09:33:35 | FromDiscord | <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:38 | FromDiscord | <enthus1ast> better do reverse proxy, cgi is quite uncommon these days |
09:34:22 | FromDiscord | <Zectbumo> is there a --static compile option? |
09:35:44 | FromDiscord | <Yardanico> In reply to @Zectbumo "is there a --static": you just pass "-static" to the C compiler usually |
09:36:01 | FromDiscord | <Zectbumo> what's the nim option for that? |
09:36:02 | FromDiscord | <Yardanico> but I don't know if your openbsd c compiler can link libc statically |
09:36:31 | FromDiscord | <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:39 | FromDiscord | <Yardanico> so in your case try `--passC:"-static"` |
09:36:56 | * | jmdaemon quit (Ping timeout: 248 seconds) |
09:37:08 | FromDiscord | <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:21 | FromDiscord | <Yardanico> yes, if you mean config specifically |
09:37:32 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas |
09:38:49 | FromDiscord | <jmgomez> Wonderful |
09:39:20 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> or just `--define:myValue:10` |
09:40:02 | FromDiscord | <Elegantbeef> I think that works |
09:40:08 | FromDiscord | <Yardanico> that doesn't work in nimscript @ElegantBeef |
09:40:26 | FromDiscord | <jmgomez> In reply to @mothumix "you can just pass": yeah, I figured when I saw the docs |
09:41:24 | FromDiscord | <jmgomez> can you read those defines from other nims file? Like if they were some sort of env variables? |
09:43:21 | FromDiscord | <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:32 | FromDiscord | <Elegantbeef> Hey it actually does yard |
09:43:33 | FromDiscord | <Elegantbeef> https://wandbox.org/permlink/7BygdrXNBiXdB5dg |
09:43:57 | FromDiscord | <Yardanico> > strdefine |
09:44:01 | FromDiscord | <Yardanico> try with intdefine bro |
09:44:19 | FromDiscord | <Xzayler> sent a code paste, see https://play.nim-lang.org/#ix=3X6s |
09:44:30 | FromDiscord | <Elegantbeef> Ah |
09:44:32 | FromDiscord | <Elegantbeef> Fuck! |
09:44:41 | FromDiscord | <Yardanico> also wat is this https://media.discordapp.net/attachments/371759389889003532/972071392751284265/unknown.png |
09:44:43 | FromDiscord | <Elegantbeef> You do not add `self` to procedures inside `gdObj` |
09:44:55 | FromDiscord | <Xzayler> In reply to @Elegantbeef "You do not add": so just leave it empty? |
09:45:03 | FromDiscord | <Elegantbeef> the macro adds it |
09:45:12 | FromDiscord | <Elegantbeef> It emulates a class / gdscript script |
09:45:16 | FromDiscord | <Xzayler> ah ok, thanks a lot I'll try fixing everything then |
09:45:39 | FromDiscord | <Elegantbeef> The macro could check for it, but it doesnt 😄 |
09:46:34 | FromDiscord | <Elegantbeef> High qwallitea code↵(@Yardanico) |
09:46:42 | FromDiscord | <Elegantbeef> Or is it koalaty |
09:46:46 | FromDiscord | <Zectbumo> In reply to @enthus1ast "better do reverse proxy,": what do you use for your server? |
09:48:27 | FromDiscord | <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:56 | FromDiscord | <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:07 | FromDiscord | <Yardanico> or std/re module, because it depends on pcre |
09:49:24 | FromDiscord | <Yardanico> (as a pure-nim std/re alternative there is https://github.com/nitely/nim-regex) |
09:51:07 | FromDiscord | <Zectbumo> thx, I should be home free now with passL static. but good to know about the ssl client |
09:53:42 | FromDiscord | <Elegantbeef> Yardanico someone really needs to explain what that style RFC actually entails and what style insensitivity actually is |
09:53:47 | FromDiscord | <Elegantbeef> It's really getting silly 😄 |
09:54:26 | FromDiscord | <dom96> In reply to @Zectbumo "what do you use": nginx works well as a reverse proxy |
09:55:15 | FromDiscord | <Zectbumo> is there a nim plugin for nginx? |
09:59:36 | FromDiscord | <dom96> You don't need one, you just run a Nim http server and ask nginx to proxy connections there |
10:34:34 | PMunch | I've managed to do the same thing in Apache, but I don't remember how off the top of my head :P |
10:39:54 | FromDiscord | <dom96> yeah, all http servers support this |
10:40:15 | FromDiscord | <enthus1ast> yes nginx↵(@Zectbumo) |
10:41:09 | FromDiscord | <enthus1ast> and i usually use systemd on linux to start/stop control the nim applications, for bsd i have no clue ;) |
10:48:23 | FromDiscord | <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:47 | FromDiscord | <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:39 | FromDiscord | <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:54 | PMunch | certbot is great, works for Apache as well |
11:06:28 | * | analogsalad joined #nim |
11:07:42 | PMunch | Hmm, this is interesting |
11:07:44 | PMunch | https://eugenkiss.github.io/7guis/tasks/ |
11:08:00 | PMunch | Could be cool to compare GUI toolkits using that as a benchmark |
11:13:27 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3X6I |
11:14:00 | FromDiscord | <jmgomez> (edit) "https://play.nim-lang.org/#ix=3X6I" => "https://paste.rs/LPx" |
11:18:34 | PMunch | @jmgomez, I believe you can't push macros |
11:19:55 | FromDiscord | <Yardanico> @PMunch you can, just not custom ones |
11:20:04 | FromDiscord | <Yardanico> ah yeah, you can't push macros like that |
11:20:12 | FromDiscord | <Yardanico> i thought your msg said "pragmas" :P |
11:20:18 | duuuuuude | dom96: why wouldn't they directly connect to the nim http server? |
11:20:30 | FromDiscord | <Yardanico> In reply to @duuuuuude "<@132595483838251008>: why wouldn't they": for better safety/performance |
11:20:31 | PMunch | Yardanico, it's a bit annoying actually that you can't |
11:20:36 | PMunch | I've run into this in the past as well |
11:20:37 | FromDiscord | <Yardanico> yep |
11:20:41 | FromDiscord | <Yardanico> same |
11:20:43 | duuuuuude | wouldn't nginx be just overhead in this case? |
11:20:50 | FromDiscord | <Yardanico> In reply to @duuuuuude "wouldn't nginx be just": no |
11:21:04 | FromDiscord | <Yardanico> it offers support for SSL, multiple versions of HTTP, compression, etc |
11:21:27 | PMunch | duuuuuude, 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:36 | FromDiscord | <Rika> nim http doesnt have http2 or 3 or compression |
11:21:42 | * | analogsalad quit (Quit: bye) |
11:21:56 | FromDiscord | <Rika> ssl is probably better on nginx |
11:22:00 | FromDiscord | <Rika> much better |
11:22:06 | FromDiscord | <Rika> its no doubt better but how much i do not know |
11:22:18 | FromDiscord | <Yardanico> nim http servers don't support ssl, not sure about chronos though |
11:22:37 | FromDiscord | <Yardanico> they don't either it seems |
11:23:17 | * | Zectbumo joined #nim |
11:24:02 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/LGY |
12:02:12 | FromDiscord | <Tanguy> Pretty sure chronos supports https↵https://github.com/status-im/nim-chronos/blob/0fc82049ac17175dd156e9ce6778bb15734be6fc/tests/testshttpserver.nim#L106 |
12:02:16 | FromDiscord | <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:54 | FromDiscord | <Yardanico> oh, interesting, didn't find because it thought it'd be right in httpsserver |
12:03:16 | FromDiscord | <Yardanico> httpserver |
12:04:30 | FromDiscord | <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:02 | FromDiscord | <Yardanico> yeah i know, already found it |
12:06:39 | FromDiscord | <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:09 | FromDiscord | <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:33 | PMunch | Hmm, I believe those are baked into the symbol |
12:28:02 | FromDiscord | <Yardanico> so maybe it's just a matter of fixing the representer ? |
12:28:13 | FromDiscord | <Yardanico> shouldn't be too hard considering it already supports pragmas for procs |
12:28:17 | FromDiscord | <Yardanico> just check how it's done for them |
12:28:33 | FromDiscord | <Yardanico> renderer i mean of course |
12:30:43 | FromDiscord | <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:50 | FromDiscord | <Yardanico> it's used for both docgen and `repr` in macros |
12:30:59 | FromDiscord | <Yardanico> renderer.nim in compiler |
12:31:58 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3X72 |
12:32:08 | FromDiscord | <Yardanico> yes, but again, `repr` here uses the renderer |
12:32:23 | FromDiscord | <Tanguy> Yes, but that works fine with `untyped` |
12:33:29 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3X73 |
12:33:32 | FromDiscord | <Yardanico> but if they're lost, how do they still work? |
12:33:42 | FromDiscord | <Yardanico> e.g. you can have `codegenDecl` on a variable and it'll propagate all the way to the backend |
12:34:59 | FromDiscord | <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:10 | PMunch | Looking 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:32 | FromDiscord | <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:06 | FromDiscord | <Tanguy> (edit) "stays" => "is still here" |
12:43:52 | PMunch | I would assume it is just `repr` which is programmed to extract the data for procedures but not for variables |
12:44:01 | PMunch | Likely someone just forgot to implement the latter |
12:44:57 | FromDiscord | <Tanguy> treeRepr too, though? It should not try to be smart, just show the tree |
12:48:32 | PMunch | Ah, yes this is a bit of an unfortunate thing in Nim |
12:49:35 | PMunch | Essentially 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:52 | PMunch | At least I think that's how the story goes, I might be mixing it up with something else |
12:52:18 | FromDiscord | <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:43 | FromDiscord | <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:11 | FromDiscord | <dom96> @Zectbumo You should be able to re-register now. |
13:52:29 | * | arkurious joined #nim |
13:55:53 | duuuuuude | does anyone use nim on node.js? |
13:58:31 | FromDiscord | <mratsim> In reply to @duuuuuude "does anyone use nim": nim -r -d:nodejs yourfile.nim |
13:58:56 | FromDiscord | <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:28 | FromDiscord | <dom96> Does that repo use node.js? I don't see any mention of it |
14:04:06 | FromDiscord | <dom96> For what it's worth I don't think there is much reason to use Nim on Node |
14:04:23 | FromDiscord | <dom96> You're better off just compiling to C |
14:05:33 | NimEventer | New Nimble package! nimwave - A TUI -> GUI library, see https://github.com/ansiwave/nimwave |
14:05:33 | NimEventer | New Nimble package! illwave - A cross-platform terminal UI library, see https://github.com/ansiwave/illwave |
14:05:33 | NimEventer | New Nimble package! ansiutils - Utilities for parsing CP437 and ANSI escape codes, see https://github.com/ansiwave/ansiutils |
14:07:15 | FromDiscord | <vindaar> Nope, it does not. Just a server compiled on the C backend and a client compiled using JS↵(@dom96) |
14:08:42 | FromDiscord | <xflywind> In reply to @duuuuuude "does anyone use nim": https://github.com/juancarlospaco/nodejs |
14:23:32 | FromDiscord | <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:02 | FromDiscord | <d4rckh> do macros get cached? |
15:20:06 | FromDiscord | <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:48 | FromDiscord | <Tanguy> No, they don't, you'll have to keep the file around |
15:26:40 | FromDiscord | <Yardanico> they do get cached if you don't change that file |
15:26:52 | FromDiscord | <Yardanico> but still, that's only until you modify that file or a modification in another file modifies this file as well |
15:29:44 | FromDiscord | <d4rckh> weird |
15:29:53 | FromDiscord | <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:22 | FromDiscord | <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:28 | FromDiscord | <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:45 | FromDiscord | <untoreh> is there any package that does lazy json parsing? |
16:21:22 | * | gsalazar quit (Ping timeout: 246 seconds) |
16:28:06 | FromDiscord | <enthus1ast> Think you can parse it in chunks, but must check the module name |
16:29:02 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/parsejson.html |
16:30:14 | FromDiscord | <enthus1ast> ^ @untoreh |
16:30:30 | * | duuuuuude quit (Ping timeout: 276 seconds) |
16:44:36 | FromDiscord | <geekrelief> is there an append version of `writeFile`. I need it to run at compile time. |
16:47:16 | FromDiscord | <Yardanico> In reply to @geekrelief "is there an append": hmm, didn't I respond earlier? |
16:47:26 | FromDiscord | <Yardanico> one way you can do it is by reading the file and writing it again with appended stuff |
16:48:54 | FromDiscord | <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:13 | NimEventer | New thread by Carterza: Why I left the Nim community, see https://forum.nim-lang.org/t/9145 |
17:15:27 | FromDiscord | <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:25 | FromDiscord | <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:54 | FromDiscord | <Yardanico> what profile? |
17:57:28 | FromDiscord | <Alea> The cartezera guy |
17:57:42 | FromDiscord | <Alea> Hadn't noticed that he's been gone for a while |
17:58:27 | FromDiscord | <Yardanico> In reply to @Alea "The cartezera guy": he's been around for years, https://github.com/zacharycarter |
17:59:41 | FromDiscord | <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:07 | FromDiscord | <d4rckh> @Yardanico i fricking love your nuglifier! |
18:29:31 | FromDiscord | <Yardanico> why 😨 |
18:29:42 | FromDiscord | <Yardanico> you sure have interesting... tastes |
18:30:30 | FromDiscord | <d4rckh> :Think: |
18:33:39 | FromDiscord | <d4rckh> did you consider adding a recursive option? |
18:35:40 | FromDiscord | <Yardanico> huh? |
18:38:19 | FromDiscord | <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:55 | FromDiscord | <Yardanico> i hope you're not planning to use nuglifier for any real purposes, it's just a joke about case insensitivity |
18:39:38 | FromDiscord | <d4rckh> oh... |
18:40:06 | FromDiscord | <Yardanico> @d4rckh it won't help with obfuscation at all |
18:40:18 | FromDiscord | <enthus1ast> but your strenc will \:) |
18:40:19 | FromDiscord | <Yardanico> it changes the nim code a bit, but the resulting C code will be almost the same really |
18:40:27 | FromDiscord | <Yardanico> it'll be much better if you strip the binary |
18:40:37 | FromDiscord | <Yardanico> than just trying some weird identifier-changing tools |
18:40:51 | FromDiscord | <enthus1ast> @d4rckh\: please do not deploy your viruses |
18:42:06 | FromDiscord | <d4rckh> i have 0 malicious intent |
18:43:06 | FromDiscord | <enthus1ast> we have enough antivirus issues \:/ |
18:43:22 | FromDiscord | <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:14 | FromDiscord | <d4rckh> i have automatic sample submission disabled on my defender |
18:44:39 | FromDiscord | <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:54 | FromDiscord | <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:48 | FromDiscord | <Yardanico> In reply to @Zectbumo "<@132595483838251008> I created my": let me manually activate you |
20:06:59 | FromDiscord | <Yardanico> done |
20:07:59 | FromDiscord | <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:03 | FromDiscord | <dom96> Was just about to do that :) |
20:08:15 | FromDiscord | <dom96> You’re too fast Yardanico |
20:08:32 | FromDiscord | <Zoom> The forum needs attention. Especially since all those not-rendered messages started to appear. |
20:08:33 | FromDiscord | <dom96> But yeah, the emails are always spotty unfortunately |
20:09:55 | FromDiscord | <Prestige> Is there a way to have `nimble develop` create and symlink the binary from a binary or hybrid package? |
20:10:32 | FromDiscord | <Xzayler> is nim as a language growing? what do you guys think? |
20:11:18 | FromDiscord | <Prestige> Yep it's growing - I wish it was growing faster though |
20:11:25 | FromDiscord | <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:27 | FromDiscord | <Prestige> Hopefully the coming changes help adoption |
20:11:53 | FromDiscord | <frobnicate> In reply to @Avahe "Yep it's growing -": you need a marketing budget for that, like Google with Go |
20:12:25 | FromDiscord | <Prestige> I think our tooling is holding us back a lot as well. But yeah, market definitely would help |
20:12:56 | FromDiscord | <Prestige> (edit) "market" => "marketing" |
20:18:27 | FromDiscord | <frobnicate> What tooling are you lacking? |
20:19:31 | FromDiscord | <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:47 | FromDiscord | <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:10 | FromDiscord | <Prestige> I hear IC is supposed to help with editor support but it's still in the works |
20:20:19 | FromDiscord | <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:36 | FromDiscord | <Zoom> Heh, Dlang forum is very nice indeed, at least from the lurker's perspective. |
20:24:37 | FromDiscord | <Zoom> Don't tell me there's others. |
20:24:37 | FromDiscord | <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:26 | FromDiscord | <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:08 | FromDiscord | <Bubblie> how can I make nim give me more info about na error, its giving me hint: used file |
20:32:24 | FromDiscord | <Bubblie> (edit) "na" => "an" |
20:33:07 | FromDiscord | <Zectbumo> "used file" is your hint?? |
20:33:28 | FromDiscord | <Bubblie> used config file nim.cfg... yeah |
20:33:49 | FromDiscord | <Bubblie> im using vulkan bindings and this happens only when I do import vulkan, so its clear something happened wih the bindings |
20:33:57 | FromDiscord | <Bubblie> when I don't import its fine |
20:34:00 | FromDiscord | <Bubblie> which is odd |
20:34:16 | FromDiscord | <Bubblie> I got glfw working with futhark but the problem now is that I thought the vulkan bindings were working except uh |
20:34:19 | FromDiscord | <Bubblie> they arent |
20:35:19 | FromDiscord | <Bubblie> let me try forking these bindings and seeing |
20:35:28 | FromDiscord | <Zoom> Wait, @Bubblie you're reusing your files? Weirdo |
20:35:35 | FromDiscord | <Bubblie> ? |
20:35:37 | FromDiscord | <Bubblie> what |
20:37:51 | FromDiscord | <Bubblie> I cant tell if this is me being stupid, or something with the bindings |
20:37:53 | FromDiscord | <Bubblie> most likely me being stupid |
20:38:26 | FromDiscord | <Bubblie> oh nvm |
20:38:52 | FromDiscord | <Bubblie> found the issues, its the bindings I think actually |
20:39:00 | FromDiscord | <Bubblie> wow this vscode plugin is great |
20:43:29 | FromDiscord | <Bubblie> ah okay |
20:43:51 | FromDiscord | <Bubblie> so, instead of {.union} should I remove it and keep it as object? |
20:43:57 | FromDiscord | <Bubblie> .union is deprecated it seems |
20:44:14 | FromDiscord | <Yardanico> `union` isn't deprecated, it's for C FFI only |
20:44:35 | FromDiscord | <Yardanico> Can you share the exact warning/error message that the compiler shows? |
20:44:43 | FromDiscord | <Yardanico> Not from the vscode plugin, but from the compiler |
20:45:13 | FromDiscord | <Bubblie> yeah sure give me one sec |
20:48:28 | * | lumo_e joined #nim |
20:48:43 | FromDiscord | <Bubblie> okay this is a bit embarassing but how do I get more intricate errors, it only tells me hints |
20:49:04 | FromDiscord | <Yardanico> can you show a screenshot? |
20:49:10 | FromDiscord | <Yardanico> maybe it compiled without error or the compiler crashed |
20:50:22 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8H |
20:50:28 | FromDiscord | <Yardanico> maybe you just didn't scroll the terminal? |
20:51:19 | FromDiscord | <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:29 | FromDiscord | <Bubblie> or where exactly it sees the error |
20:52:51 | FromDiscord | <Bubblie> okay it seems to be the fact that its getting the wrong path lol |
20:59:00 | * | nerthus joined #nim |
21:03:56 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8J |
21:04:06 | FromDiscord | <Bubblie> this right here in config.nims of nimeous's vulkan |
21:04:08 | FromDiscord | <Bubblie> seems to be the issue |
21:05:15 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8K |
21:05:27 | * | noeontheend quit (Ping timeout: 276 seconds) |
21:05:32 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8L |
21:05:44 | FromDiscord | <Yardanico> again, are you looking at vscode errors? this is a nimscript config file |
21:05:52 | FromDiscord | <Yardanico> check the actual nim compiler output |
21:06:14 | FromDiscord | <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:45 | FromDiscord | <Bubblie> hold on can I send a hastebin? |
21:06:48 | FromDiscord | <Yardanico> ah actually it is backported to 1.6.6, so you shouldn't really see that |
21:06:56 | FromDiscord | <Yardanico> yes, or just code paste here @Bubblie |
21:07:15 | FromDiscord | <Bubblie> https://www.toptal.com/developers/hastebin/wusehedote.yaml this is the output from the compiler |
21:07:34 | FromDiscord | <Yardanico> this is only the end of the output, it can't find some identifier so it's showing the alternatives |
21:07:38 | FromDiscord | <Yardanico> can you paste the whole output? |
21:09:25 | FromDiscord | <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:48 | FromDiscord | <Yardanico> In reply to @Bubblie "well from the undeclared": are you compiling the .nims file itself or something? |
21:09:59 | FromDiscord | <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:07 | FromDiscord | <Yardanico> you can censor out your username if you want |
21:10:51 | * | noeontheend joined #nim |
21:14:07 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3X8P |
21:14:39 | FromDiscord | <Yardanico> the link shows you compiling the nims file |
21:14:50 | FromDiscord | <Yardanico> the paste you showed in discord just says that the file is missing |
21:14:56 | FromDiscord | <Yardanico> are you sure "instance.nim" is in the Documents\vulkan folder? |
21:15:02 | FromDiscord | <Yardanico> maybe you had a typo in the filename or something |
21:15:28 | FromDiscord | <Bubblie> oh yeah im an absolute idiot |
21:17:03 | FromDiscord | <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:14 | FromDiscord | <Yardanico> that's the nim extension's shortcut for compiling and running the currently opened .nim file |
21:22:47 | FromDiscord | <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:08 | FromDiscord | <Yardanico> do you actually have vulkan-1.lib in the folder it searches it in? |
21:23:17 | FromDiscord | <Bubblie> yes |
21:24:04 | FromDiscord | <Bubblie> https://media.discordapp.net/attachments/371759389889003532/972247402377543710/unknown.png |
21:24:22 | FromDiscord | <Yardanico> hmm, maybe it's the wrong architecture |
21:24:25 | FromDiscord | <Yardanico> but i'm not sure |
21:24:38 | FromDiscord | <Bubblie> wait hold on, I think im being stupid again |
21:24:40 | FromDiscord | <Bubblie> give me one sec |
21:27:06 | * | jjido joined #nim |
21:27:54 | FromDiscord | <Bubblie> yard |
21:27:55 | FromDiscord | <Bubblie> I got it |
21:29:27 | FromDiscord | <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:51 | FromDiscord | <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:05 | FromDiscord | <Bubblie> here its not needed because its a config.nims |
21:30:22 | FromDiscord | <Yardanico> yeah, just fyi, `r` in Nim isn't about regexes :) |
21:30:39 | FromDiscord | <Yardanico> it's about raw string literals, so there are no escape sequences like `\n` |
21:31:13 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3X8S |
21:31:35 | FromDiscord | <Yardanico> this is needed on Windows because it uses \ as a path separator which is also used for escape sequences |
21:31:41 | FromDiscord | <Yardanico> unless you do double quotes of course |
21:32:00 | FromDiscord | <Bubblie> I did not know that that is great |
21:34:35 | FromDiscord | <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:40 | FromDiscord | <Bubblie> this is so weird |
21:45:38 | FromDiscord | <Bubblie> apparantly the vulkan.nim is different than that of the vulkan.nim it should be getting from the repo |
21:45:44 | FromDiscord | <Bubblie> like it has different code |
21:46:09 | FromDiscord | <Yardanico> and how did you install it? |
21:46:14 | FromDiscord | <Bubblie> nimble install https://github.com/nimious/vulkan.git |
21:46:25 | FromDiscord | <Yardanico> yeah that installed the last release which is from 2016 |
21:46:35 | FromDiscord | <Yardanico> `nimble install https://github.com/nimious/vulkan@#ead` |
21:46:50 | FromDiscord | <Yardanico> if a repo has tags (and it does in this case), nimble will install the last tag by default |
21:47:04 | FromDiscord | <Yardanico> In reply to @Yardanico "`nimble install https://github.com/nimious/vulkan@#": head |
21:47:10 | FromDiscord | <Yardanico> `nimble install https://github.com/nimious/vulkan@#head` |
21:47:17 | FromDiscord | <Bubblie> Ah okay, that is actually great wow |
21:47:24 | * | duuuuuude joined #nim |
21:51:54 | FromDiscord | <exelotl> sent a code paste, see https://paste.rs/iPP |
21:52:22 | FromDiscord | <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:42 | FromDiscord | <Yardanico> also in general it's callbacks/closures that add Exception to the raises list of a proc |
21:52:58 | FromDiscord | <Yardanico> for that there's https://nim-lang.org/docs/manual.html#effect-system-effectsof-annotation |
21:56:09 | FromDiscord | <exelotl> ah, yeah slapping the pragma further down the chain does reveal more info, cheers |
22:10:25 | * | analogsalad joined #nim |
22:11:36 | FromDiscord | <Bubblie> WOooo vulkan works now |
22:11:41 | FromDiscord | <Bubblie> @Yardanico thank you for everything yard |
22:14:25 | * | analogsalad left #nim (#nim) |
22:20:13 | FromDiscord | <Alea> Why does `importedModule.pubProc()` work? Is it just a side effect of some other rule or..? |
22:21:19 | FromDiscord | <Yardanico> In reply to @Alea "Why does `importedModule.pubProc()` work?": ? it is supposed to work |
22:21:28 | FromDiscord | <Yardanico> you can fully qualify symbols by using the module name they're coming from |
22:22:10 | FromDiscord | <Alea> Makes sense, imports always work standalone so I just assumed that was the default |
22:29:51 | * | vicfred joined #nim |
22:49:16 | FromDiscord | <Alea> does a 1.5x increase in font size correspond to a 1.5x increase in the pixel height of characters? |
22:50:36 | FromDiscord | <Recruit_main707> hmm |
22:50:52 | FromDiscord | <Recruit_main707> proceeds to open paint |
23:13:31 | FromDiscord | <Recruit_main707> https://media.discordapp.net/attachments/371759389889003532/972274941250658305/unknown.png |
23:15:12 | FromDiscord | <Yardanico> Sometimes I feel like #main and #offtopic swap places xD (it's all fine though) |
23:16:58 | FromDiscord | <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:44 | FromDiscord | <Alea> In reply to @Recruit_main707 "": so I presume that last one is 20↵weird that it's 1 pixel off |
23:17:53 | FromDiscord | <Alea> unlike the others |
23:18:29 | FromDiscord | <Yardanico> In reply to @Alea "it's technically nim related": What's toSeq? |
23:18:43 | FromDiscord | <Alea> https://media.discordapp.net/attachments/371759389889003532/972276252096466964/unknown.png |
23:18:50 | FromDiscord | <Yardanico> to convert a string into a seq of chara you can just use the `@` operator |
23:18:56 | FromDiscord | <Yardanico> (edit) "chara" => "chars" |
23:19:13 | FromDiscord | <Yardanico> In @[1, 2] `@` is also an operator btw |
23:19:26 | FromDiscord | <Yardanico> `echo @"hi"` |
23:19:26 | FromDiscord | <Alea> that's probably much faster tbh |
23:21:55 | FromDiscord | <Alea> actually I can't tell which one of these would be faster since toSeq doesn't say anything about copies |
23:23:10 | FromDiscord | <Alea> also the @ doesn't seem to work on this https://media.discordapp.net/attachments/371759389889003532/972277373208780820/unknown.png |
23:24:19 | FromDiscord | <Alea> guess it's because a slice isn't equivalent to an openarray while a string is? |
23:25:02 | FromDiscord | <Yardanico> yes |
23:25:16 | FromDiscord | <Yardanico> also why create a seq of glyphs, just make a set? |
23:25:20 | FromDiscord | <Yardanico> it will be more efficient |
23:25:30 | FromDiscord | <Yardanico> since you're using chars only anyway |
23:25:55 | FromDiscord | <Yardanico> `{' '..'~'}` |
23:28:04 | FromDiscord | <Yardanico> And yes, it's faster, it's also faster than having chars in an array |
23:28:30 | FromDiscord | <Elegantbeef> It's also smaller! |
23:28:39 | FromDiscord | <Elegantbeef> by a factor of 8 |
23:29:00 | FromDiscord | <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:55 | FromDiscord | <Yardanico> In reply to @Elegantbeef "by a factor of": 😍 |
23:33:04 | FromDiscord | <Yardanico> yes, good stuff |
23:33:31 | FromDiscord | <Yardanico> Just don't use them with int16 or int32 as that'll very slow of you do copying |
23:33:43 | FromDiscord | <Yardanico> (edit) "Just don't use them with int16 or int32 as that'll ... veryif" added "be" | "of" => "if" |
23:34:01 | FromDiscord | <TryAngle> can I somehow create a generic tuple from a string at runtime? |
23:34:02 | FromDiscord | <Elegantbeef> You can only use them with a range of uint16 |
23:34:15 | FromDiscord | <Yardanico> In reply to @Elegantbeef "You can only use": int16 as well |
23:34:30 | FromDiscord | <Yardanico> !eval echo {1.int16} |
23:34:33 | NimBot | {1} |
23:35:02 | FromDiscord | <Elegantbeef> int16 does have a range of int16 yes |
23:35:06 | FromDiscord | <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:23 | FromDiscord | <Yardanico> Can you explain what you need this for? |
23:38:38 | FromDiscord | <TryAngle> I wanna create a toy graph db |
23:39:33 | FromDiscord | <TryAngle> so the best way is to create "virtual types" by just making the fields of runtime types to bytes? |
23:41:21 | FromDiscord | <TryAngle> something like sqllite |
23:42:09 | FromDiscord | <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:06 | FromDiscord | <demotomohiro> You can call procedures recursively. |
23:43:39 | FromDiscord | <Prestige> Can't you just do it without recursion? |
23:44:44 | FromDiscord | <Andreas> In reply to @demotomohiro "You can call procedures": ok, but can i do 'generator-like-thinggy somehow ? |
23:45:29 | FromDiscord | <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:49 | FromDiscord | <TryAngle> how do you get the underlying bytes of an object? |
23:49:34 | * | Zectbumo quit (Remote host closed the connection) |
23:50:14 | FromDiscord | <Elegantbeef> `cast[ptr UncheckedArray[byte]](myObj.addr)` |
23:52:14 | FromDiscord | <aboisvert (Alex Boisvert)> Example here\: https://github.com/brianshannan/nim-trees/blob/master/nimtrees/trees/red_black.nim#L277 |
23:52:15 | FromDiscord | <aboisvert (Alex Boisvert)> You can store your iteration state in local variables and use looping constructs instead of using recursion↵(@Andreas) |
23:52:45 | FromDiscord | <aboisvert (Alex Boisvert)> (Example is for a tree structure but would be similar for a graph) |
23:55:05 | FromDiscord | <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 |