<< 08-06-2022 >>

00:03:54FromDiscord<huantian> wdym?
00:04:14FromDiscord<huantian> like
00:04:32FromDiscord<Elegantbeef> No when statement does not work inside parameter lists or return types
00:06:56FromDiscord<Elegantbeef> Alea what're you after API wise?
00:13:01FromDiscord<Girvo> Hello 🙂
00:13:10FromDiscord<Elegantbeef> Hello
00:13:45FromDiscord<Girvo> Question: does anyone have a repo I can look at for setting up a "monorepo" style thing? I need to write a comms server, and a shared comms protocol library, all around my firmware. Wondering what the best way to structure it would be
00:14:53FromDiscord<Elegantbeef> make a new project with a nimble file that depends on your firmware then just write `mylibrary/server.nim` and `mylibrary/protocol.nim` 😄
00:15:54FromDiscord<Girvo> I'll have a look haha the only fun bit is the firmware doesnt follow regular nimble structure because its a seperate build system lol
00:16:19FromDiscord<Elegantbeef> Well what i did for the picostdlib was make my own build tool
00:16:23FromDiscord<Elegantbeef> So perhaps consider that 😄
00:17:33FromDiscord<Girvo> Tahts basically what I've done hahaha
00:17:37FromDiscord<Elegantbeef> If it doesnt use nimble though you can just use git submodules
00:18:02FromDiscord<Elegantbeef> git sub modules like it's 2008
00:38:44*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
00:39:41*lumo_e joined #nim
02:54:55*kayabaNerve_ is now known as kayabaNerve
03:11:05*lumo_e quit (Ping timeout: 244 seconds)
03:49:53*vicfred joined #nim
04:30:37*xet7 joined #nim
05:39:29*rockcavera quit (Remote host closed the connection)
05:41:33*madprog joined #nim
05:46:46FromDiscord<Paul (pmo) ♗> sent a code paste, see https://paste.rs/Gtv
05:47:09FromDiscord<Elegantbeef> No problem
05:47:18FromDiscord<Elegantbeef> It worked fine with arc/orc but yea refc is funny with destructors
05:47:56FromDiscord<Paul (pmo) ♗> what is the difference between arc/orc and refc? how do I use one or the other?
05:48:16FromDiscord<Paul (pmo) ♗> is it a different garbage collector?
05:48:42FromDiscord<Elegantbeef> refc is a conventional garbage collector. arc is a reference counting move semantic based memory management system. orc is arc with a cycle collector
05:49:02FromDiscord<Elegantbeef> Yes `--mm:arc` enables arc and i'll let you figure out how to enable orc
05:49:25FromDiscord<Paul (pmo) ♗> `mm` for memory management, I guess?
05:49:36FromDiscord<Elegantbeef> yep or `--gc`(deprecated)
05:50:50FromDiscord<Elegantbeef> they behave differently and have different benefit's features
05:51:00FromDiscord<Elegantbeef> Each memory mangement system thais
05:51:17FromDiscord<Elegantbeef> https://nim-lang.org/docs/mm.html can read about them here
06:19:38*PMunch joined #nim
06:35:33*vicfred quit (Quit: Leaving)
06:40:42NimEventerNew thread by Clavismax: 'import os' not used. Wrong Error Message, see https://forum.nim-lang.org/t/9217
06:45:07*ltriant quit (Ping timeout: 260 seconds)
07:40:44*jjido joined #nim
07:53:18*gsalazar quit (Quit: Leaving)
07:53:33*gsalazar joined #nim
07:55:23FromDiscord<Elegantbeef> Oh hey zoom your PR finally got accepted! 😄
08:08:53FromDiscord<jmgomez> Hey guys, is there a way to test at compile time if two types are compatibles (i.e. if a converter exists)?
08:09:28FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/JSi
08:10:19FromDiscord<jmgomez> cool! Didnt know about compiles. Thanks man!
08:21:04*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:34:13FromDiscord<Zoom> After a month I broke and pinged.
08:42:43*lumo_e joined #nim
08:57:08FromDiscord<luteva> @ElegantBeef what is the 'vershun' ment to be used for? sounds like a lib for migrating? migrating data or types or procs? Or all of them? any example or usecase?
08:57:39FromDiscord<Elegantbeef> It's a toy example of versioned data
08:58:09FromDiscord<Elegantbeef> It may eventually be used for game saves, but it was just something i had an idea to write so i wrote it to test it
09:00:45FromDiscord<Elegantbeef> There's a big benefit in having typesafe versioned data that automatically allows migration and errors when it cannot
09:02:58FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/pJU
09:03:36FromDiscord<Elegantbeef> It's not easily maintained imo, and doesnt compose well, there is no automated way of knowing what the highest data is and the path to get there
09:06:21FromDiscord<Elegantbeef> Oh and pmunch by duplicate types i meant i now need a new definition of the type in the file i'm working with so i can write a destructor
09:07:17FromDiscord<Elegantbeef> Wonder if `type MyObject {.pure, inheritable.} = object` would be too dangerous
09:08:02FromDiscord<Elegantbeef> Actually i think i like that more than the distincts, less manual converting to use procedures
09:08:45FromDiscord<Elegantbeef> For the confused pmunch i mean make futhark emit inheritable objects so that you can declare destructors easily and still call the base functions
09:10:21PMunch@Elegantbeef, that's actually not a bad idea
09:10:28PMunchI would like a nice way to add destructors
09:10:39FromDiscord<Elegantbeef> Yea that seems to be the best way
09:10:45FromDiscord<Elegantbeef> It just generally increases the quality of life
09:10:58FromDiscord<Elegantbeef> Just need to ensure fuckwits dont add fields
09:12:25FromDiscord<Elegantbeef> Jeez i must be tired, now think "fuckwits" was a bit too offensive 😄
09:13:09FromDiscord<Elegantbeef> Anyway seems like a much much cleaner way to handle destructor, even with the possible issues from people adding fields
09:13:51PMunchWhy would adding fields be an issue?
09:14:43FromDiscord<Elegantbeef> Well people might have like a `copyMyType(a, b)` which will not copy the added fields
09:15:43FromDiscord<Elegantbeef> Some unexpected behaviour may arise depending on the libraries they use and the code they write is all
09:17:12FromDiscord<Elegantbeef> This also makes some of your code less complicate, right?
09:17:30FromDiscord<Elegantbeef> I know you were adding fields and having the object be a field
09:28:03PMunchYeah, I guess I could inherit from the Futharkd objects instead
09:28:13PMunchOr wait, that wouldn't work
09:28:42FromDiscord<Elegantbeef> You still want distinctness?
09:31:17FromDiscord<Zectbumo> So, I'm getting the nim build to be compatible with BSD and I found that the `build_all.sh` is depending on `.` being in `$PATH`. Does nim not have a library path and use `$PATH` for its library search path? What's the best way to add this back in. I'm thinking of adding the build directory in to `$PATH` or pass some build parameter to nim. I see that the `build_all.sh` is generated from `tools/ci_generate.nim` so whatever is decided goe
09:31:53FromDiscord<Elegantbeef> "library path"?
09:32:14FromDiscord<Elegantbeef> Do you mean nim's include file path or system libraries?
09:33:08FromDiscord<Zectbumo> system libraries. right now the bin/nim that is compiled can't even import std/os
09:34:08FromDiscord<Elegantbeef> those arent system libraries
09:34:15FromDiscord<Elegantbeef> Nim has `--path` to add include paths
09:35:19FromDiscord<Zectbumo> oh standard libraries I mean
09:36:20FromDiscord<Elegantbeef> Sounds like the config isnt setup properly
09:36:38FromDiscord<Elegantbeef> Actually doesnt nim by default add it's system to `--path`
09:40:18FromDiscord<Zectbumo> I would have thought that
09:41:13FromDiscord<Zectbumo> but maybe not when bootstrapping?
09:42:38FromDiscord<Elegantbeef> No clue
10:19:12*jmdaemon quit (Ping timeout: 260 seconds)
10:29:24*arkurious joined #nim
10:53:47FromDiscord<Zectbumo> hmm, maybe nim does add its system to path. I just specified nim manually to `koch --nim:bin/nim` and now it can find the libs
11:53:19*lumo_e quit (Ping timeout: 256 seconds)
12:02:18*jjido joined #nim
12:13:12FromDiscord<Zoom> `tables.withValue` is a dirty uncomposable hack 😬 Just because someone doesn't like `options` I get to see another meaningless `do:` in my code and need to use another temp var instead of a block being an expression
12:15:17FromDiscord<exelotl> yeah it sucks lol
12:17:41FromDiscord<exelotl> it's frustrating because whenever `getOrDefault` is N/A, it's the only way to get a value from the table without doing 2 lookups (1 to see if the key exists, another to get the value)
12:20:53FromDiscord<Zoom> https://github.com/nim-lang/RFCs/issues/351> First we should get view types into the state where Option[var T] and Option[lent T] do work reliably and then this RFC has my blessing.
12:22:11FromDiscord<Zoom> I bithched about it being inferior to Rust's `Entry` some time earlier and was explained there's some obstacles to implementing it efficiently, but can't remember what it was \:P
12:24:39FromDiscord<Zoom> Ah, here it is\:> Rust can do it because it can expose interior pointers in a type-safe manner (it's called "borrow checking") and Nim's still catching up with that (it's called "view types"). It's experimental, there is a spec which could be compared to Rust's borrow checker... Feel free to help.↵https://forum.nim-lang.org/t/8110#52041
12:26:22FromDiscord<Zoom> Good thread, btw.
12:37:16*ltriant joined #nim
12:38:44*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:39:45*jjido joined #nim
12:53:17FromDiscord<exelotl> mmh yeah, view types have been slowly getting there, but still kind of a mess, there's a gap between the spec and implementation
12:53:23PMunchHmm, does destructors have to be exported in order to be called?
12:53:30*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:13:27NimEventerNew question by Shoaib Mirzaei: initialize an argument of a proc, but not in it&#39;s definition line, see https://stackoverflow.com/questions/72546323/initialize-an-argument-of-a-proc-but-not-in-its-definition-line
13:22:32*cornfeedhobo quit (Quit: ZNC - https://znc.in)
13:52:23PMunchIf anyone got IKEA Home Smart bulbs in their house: https://github.com/PMunch/ikeahomesmart
13:52:35PMunchI plan to add that and my coap library to nimble shortly
13:55:14*PMunch quit (Quit: Leaving)
13:56:51*cornfeedhobo joined #nim
14:02:00*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:02:21*ehmry joined #nim
14:17:04*rockcavera joined #nim
14:17:05*rockcavera quit (Changing host)
14:17:05*rockcavera joined #nim
14:28:12*derpydoo joined #nim
14:58:25*vicfred joined #nim
15:24:40FromDiscord<Zoom> Hm, devel broke `repeat` resolution for strings. Now it returns a `seq[string]` instead of a string.
15:25:22FromDiscord<Zoom> !eval echo typeof(" ".repeat(5))
15:25:22NimBotCompile failed: Unable to open output log
15:26:22FromDiscord<Zoom> Ah, right, playground has a siesta again...
15:38:05*krux02 joined #nim
15:40:07FromDiscord<jmgomez> hey guys, when doing ↵let str : string = $ cstr ↵it doesnt copy/allocate, does it?
15:40:33FromDiscord<Zoom> Turns out my choosenim stalled and couldn't upgrade my devel. On latest devel repeat works fine
15:48:55FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=3ZHg
15:52:53ehmryif I write `proc foo(T: static typedesc)` in a module, can I write another `foo` that only matches values, not types? is it a bug if the first matches values?
15:56:01FromDiscord<Yardanico> you don't need `static` for typedesc, it's already a compile-time only value
15:56:13FromDiscord<Yardanico> but yes, you can of course write the one that matches the value itself
15:56:29FromDiscord<Yardanico> `typedesc` and `typedesc[T]` match for the type itself, not values of that type
16:03:09ehmryYardanico_: you are right, I don't need static, and that fixes it. I had some problems with macros that went away with static but thats not the case anymore
16:04:06*xet7 quit (Remote host closed the connection)
16:08:21*noeontheend joined #nim
16:21:04*noeontheend quit (Ping timeout: 244 seconds)
16:27:44ehmryI get `Error: cannot evaluate at compile time: T` for `typedesc` but not `static typedesc`, odd
16:31:11*noeontheend joined #nim
16:32:14FromDiscord<Yardanico> can you show the code?
16:34:12ehmryhttps://git.syndicate-lang.org/ehmry/syndicate-nim/src/branch/trunk/src/syndicate.nim#L37
16:34:24ehmrywhatever, I can work around it
16:34:34FromDiscord<Yardanico> but why doesn't it work without static
16:34:34FromDiscord<Rika> cool
16:34:42FromDiscord<Rika> i mean the syndicate thing sorry
16:34:50FromDiscord<Rika> caught my eye a few months ago
16:35:12FromDiscord<Rika> might try it for a project
16:35:14FromDiscord<Yardanico> I just hoped for a smaller repro code :P
16:37:00ehmryyea, its some compile time spaghetti
16:38:03ehmryRika: its sort of usable?
16:38:19FromDiscord<Rika> why only sort of?
16:39:38ehmrysometimes you get compile errors :)
17:03:45*noeontheend quit (Remote host closed the connection)
17:04:26*noeontheend joined #nim
17:17:27*noeontheend quit (Ping timeout: 256 seconds)
18:07:02*smvg joined #nim
18:25:09*derpydoo quit (Ping timeout: 258 seconds)
19:24:43*xet7 joined #nim
20:01:22FromDiscord<Luckayla> does nim have a standard tool for creating projects/managing dependencies such as rust's Cargo?
20:02:24FromDiscord<konsumlamm> nimble
20:02:39FromDiscord<Andreas> In reply to @Luckayla "does nim have a": well, sort of, look at nimble https://github.com/nim-lang/nimble#readme
20:02:51FromDiscord<Luckayla> sweet, thanks
20:13:34FromDiscord<Luckayla> using the terminal in my text editor to edit a file using nano instead of using the editor...
20:13:46FromDiscord<Luckayla> then subsequently realizing I'm actually stupid
20:24:27*jjido joined #nim
20:37:33*kayabaNerve_ joined #nim
20:40:18*kayabaNerve quit (Ping timeout: 276 seconds)
20:51:56FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3ZIM
20:56:53FromDiscord<ynfle> The issue is the generiv or the 2 param?
20:56:55FromDiscord<ynfle> (edit) "generiv" => "generic"
20:57:04FromDiscord<jmgomez> the generic being void
20:57:28FromDiscord<gibson> Help 😕 `std/zip` package needs the `zlib1.ddl` that comes with nim on windows. But when I put that lib and my exe in the same place, I get `could not load: zlib1.dll\n(bad format; library may be wrong architecture)` What gives? Win11 64-bit. Compiled exe w/ `--cc:vcc`.
20:57:38*jmdaemon joined #nim
20:57:43FromDiscord<gibson> (edit) "`zlib1.ddl`" => "`zlib1.dll`"
21:03:01FromDiscord<gibson> ..because vcc places the exe in the src dir and it's not the same as the other .exe... solved.
21:09:16FromDiscord<Luckayla> interesting thing
21:14:29FromDiscord<Luckayla> what am I missing here?
21:14:33FromDiscord<Luckayla> sent a code paste, see https://play.nim-lang.org/#ix=3ZIV
21:14:58FromDiscord<Elegantbeef> `requires "jester >= theVersionItsAt"` in your nimble file
21:15:32FromDiscord<Luckayla> Ah, I'm used to package managers doing that for you when you install them in a project
21:15:32FromDiscord<Luckayla> noted
21:15:40FromDiscord<Elegantbeef> Nimble installs globally
21:15:46FromDiscord<Luckayla> Ooooh
21:16:01FromDiscord<Luckayla> I'll macro something then. Cool
21:16:03FromDiscord<Luckayla> Thanks for the info
21:16:49FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3ZIX
21:17:24FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3ZIY
21:23:37FromDiscord<ajusa> It seems to work under -d:danger
21:25:08NimEventerNew thread by Jmgomez: Nim producing void as template argument instead of the type, see https://forum.nim-lang.org/t/9218
21:47:39FromDiscord<Zoom> `isAbsolute` on Linux stops working for Windows paths, that's a bummer. I didn't ask this proc to check the path for validity \:P
21:54:02FromDiscord<wioenena.q> sent a long message, see http://ix.io/3ZJ7
21:55:44*smvg quit (Quit: smvg)
21:58:02*LuxuryMode joined #nim
22:01:01FromDiscord<kaddkaka> This Lobster comparison talks about Nim's ownership model, is that something that exists? https://news.ycombinator.com/item?id=19570282
22:02:35FromDiscord<Generic> it might be a reference to the experiment with the dingle bacon owned references thing
22:02:59FromDiscord<kaddkaka> dingle bacon? o.O
22:03:05FromDiscord<wioenena.q> sorry for auto message
22:03:07FromDiscord<Generic> it's the name of the authors of a paper
22:03:11FromDiscord<wioenena.q> i change my password
22:03:36FromDiscord<Generic> the idea was in the end replaced but what's become gc:arc/orc
22:03:51FromDiscord<kaddkaka> ok
22:04:39*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:04:44FromDiscord<Generic> (edit) "but" => "with"
22:05:21FromDiscord<kaddkaka> There is a momentum to introduce Rust at work (and move away from c++). I'm not sure if I should argue for Nim instead 😸
22:06:09FromDiscord<Generic> you can try, though I wouldn't put my hopes up
22:07:37FromDiscord<Generic> I've thrown Nim into discussions many times in the past and unless it's with people who are asking for things to try, it they're not really interested
22:07:42*jjido joined #nim
22:08:45FromDiscord<Generic> what I deem most effective at this point is to just make things people are interested in
22:09:40FromDiscord<Generic> for what value the thing itself has, which is a bit of a trojan horse approach
22:10:27FromDiscord<Generic> not that I had immense success with this, it just seems more effective to me than playing the missionary
22:11:27FromDiscord<j-james> In reply to @kaddkaka "There is a momentum": you could certainly bring it up
22:11:35FromDiscord<j-james> but rust also has its tooling going for it
22:12:58FromDiscord<ieltan> In reply to @Generic "what I deem most": Well, webassembly seems like a perfect fit for nim
22:13:20FromDiscord<ieltan> Nim both compiles to C and LLVM IR (unofficially though)
22:13:27FromDiscord<kaddkaka> I haven't really tried rust, but I'm not too keen on wrestling a borrow checker. And our thing can certainly do with a GC so
22:13:43FromDiscord<kaddkaka> is LLVM IR a current target?
22:14:50FromDiscord<j-james> it's unofficial, but yes: https://github.com/arnetheduck/nlvm
22:14:53FromDiscord<ieltan> There is an LLVM Nim compiler in github but it's not official
22:14:55FromDiscord<kaddkaka> In reply to @Generic "I've thrown Nim into": Yeah, I've started mentioning Nim and had a learning session with my team. I accidentally mentioned the case/underscore-insensitive part and I think some people freaked 😢
22:15:00FromDiscord<ieltan> It can compile to wasm
22:15:06FromDiscord<kaddkaka> nice 🙂
22:15:25FromDiscord<ieltan> Nim seems to be interested in web applications because it compiles to Javascript.
22:15:41FromDiscord<kaddkaka> oh, I'm not into that :p
22:15:58FromDiscord<ieltan> I'm just throwing some ideas out there
22:16:08FromDiscord<j-james> what would your team be using nim for?
22:16:33FromDiscord<ieltan> Ahaha I'm a mere sysadmin so not much
22:16:44FromDiscord<ieltan> I'm just trying to get into dev in my free time
22:16:59FromDiscord<ieltan> And I've done embedded dev before
22:17:08FromDiscord<ieltan> So I have some notions of C and C++
22:17:15NimEventerNew thread by Xigoi: Cursed: Working braces in Nim, see https://forum.nim-lang.org/t/9219
22:17:18FromDiscord<ieltan> Nim seemed like a nice language
22:17:57FromDiscord<kaddkaka> In reply to @j-james "what would your team": Hardware simulation (systemC) or to speedup slow python tooling
22:18:06FromDiscord<Yardanico> In reply to @NimEventer "New thread by Xigoi:": man made horrors beyond comprehension
22:19:05FromDiscord<Yardanico> https://c.tenor.com/uaXul54ckrkAAAAi/clueless-aware.gif
22:19:41FromDiscord<j-james> In reply to @kaddkaka "Hardware simulation (systemC) or": one plus of nim is that it wraps c/c++ code nicely
22:20:06FromDiscord<j-james> so if you have a bunch of legacy code, you could rewrite incrementally
22:20:26FromDiscord<Generic> wrapping C++ code in Nim can be quite an adventure
22:20:47FromDiscord<kaddkaka> Yeah, we have proof-of-concept `c++ <-> rust <-> c++` today
22:21:16FromDiscord<kaddkaka> putting Nim there instead should be doable if it's easy to generate wrapper/interface code
22:21:33FromDiscord<j-james> In reply to @Generic "wrapping C++ code in": ooh, really 🙁
22:21:52FromDiscord<j-james> i've only wrapped c code and thought it'd be similar
22:21:54FromDiscord<kaddkaka> there is some cbindgen-ish stuff going on to glue it together with C functions
22:22:00FromDiscord<j-james> i guess classes would be a pain
22:22:45FromDiscord<j-james> (edit) "thought" => "assumed"
22:23:07FromDiscord<kaddkaka> I really gotta sleep, already 00:20 here :'(, I'll be dead tomorrow. good night 😴
22:23:16FromDiscord<Generic> when you have to interface classes is where it gets hairy
22:23:25FromDiscord<Generic> (edit) "when you have to ... interface" added "implement"
22:23:52FromDiscord<ieltan> I've wondered how Rust achieve C imports while still being safe, or is it not?
22:24:28FromDiscord<Elegantbeef> It's not
22:24:37FromDiscord<ieltan> Ah
22:24:45FromDiscord<Elegantbeef> C code is by definition unsafe in rustland
22:24:54FromDiscord<Elegantbeef> So most of it is done inside unsafe blocks 😄
22:28:14FromDiscord<ieltan> Very interested in rust memory safety and how they achieve it, it's an elegant solution but the syntax reminds me a little bit of c++
22:28:37FromDiscord<Elegantbeef> Yea it's not a very ergonomic language imo
22:28:52FromDiscord<ieltan> Nim syntax has less cognitive overhead
22:29:10FromDiscord<ieltan> How does Nim achieve memory safety? Like Rust?
22:29:10FromDiscord<j-james> nim does similar stuff to rust when it can
22:29:52FromDiscord<Elegantbeef> Nim has a bunch of similar features though locked behind switches, and also not as developed
22:30:25FromDiscord<Elegantbeef> Like Nim has a borrow checker in the experimental view types, and it has not nil types
22:30:59FromDiscord<Elegantbeef> It also has features that prevent you from doing unsafe thing with managed types
22:31:14FromDiscord<ieltan> By nil you mean null or something else?
22:31:17FromDiscord<Elegantbeef> Like without unsafe mechanisms you cannot take the pointer to a stack value and get a dangling pointer
22:31:24FromDiscord<Elegantbeef> Nil is what nim calls null
22:31:29FromDiscord<ieltan> Ah, figured
22:31:53FromDiscord<j-james> it's just that Nim's fallback are Copies and reference counting
22:31:59FromDiscord<Elegantbeef> There's an experimental feature to ensure that you never have a nilable type
22:32:00FromDiscord<j-james> instead of compiler errors
22:32:06FromDiscord<Elegantbeef> nilable type nil'd\
22:32:27FromDiscord<ieltan> In reply to @Elegantbeef "Like Nim has a": Do you have a link so I can read more about that?
22:32:29FromDiscord<Elegantbeef> Yea Nim's move semantics do not error when a move cannot be done it copies quietly
22:32:53FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#strict-not-nil-checking↵https://nim-lang.org/docs/manual_experimental.html#view-types
22:32:54*sagax quit (Excess Flood)
22:33:11FromDiscord<ieltan> Thanks!
22:33:28FromDiscord<dom96> In reply to @kaddkaka "Yeah, I've started mentioning": that's a shame 😢
22:33:50FromDiscord<Elegantbeef> They arent reliable which is why they're experimental, but they do atleast exist
22:35:21FromDiscord<gibson> Well, thought I'd fixed it, but not. My win exe still cannot load `zlib1.dll` as it complains that the one shipped with nim is an invalid architecture. Hmm. How can I compile something that can load the shipped dlls?
22:38:07FromDiscord<ieltan> Also, going back to wasm
22:38:21FromDiscord<ieltan> I think this could be a good start:↵https://github.com/wasmerio/wasmer/issues/2120
22:38:37FromDiscord<ieltan> I could do it once I get familiar enough with programming in Nim
22:38:50FromDiscord<Elegantbeef> Maybe if wasmer actually documented their shit
22:39:03FromDiscord<Elegantbeef> https://github.com/beef331/wasmedge_playground started playing with the wasmedge runtime myself
22:39:16FromDiscord<ieltan> In reply to @Elegantbeef "Maybe if wasmer actually": Ahahaha
22:39:25FromDiscord<ieltan> Well wasm moves fast from what I've heard
22:39:40FromDiscord<ieltan> They have some good concepts
22:39:41FromDiscord<Elegantbeef> I spent a solid week looking at C-APIs for wasm runtimes
22:39:52FromDiscord<Elegantbeef> wasmedge was the first i found that actually provided explanations and a usable API
22:40:21FromDiscord<ieltan> I'll look into that though I'm not sure if I'll get all of it!
22:41:18FromDiscord<Elegantbeef> Like i'm glad they have their docgen setup, but like i couldnt figure out how anything worked cause they dont have any actual useful explanation of the api
22:41:18FromDiscord<Elegantbeef> Eh i've wrapped a lot of the api that i needed for scripting programs with wasm
22:41:57FromDiscord<Elegantbeef> Like it's a pretty usable API imo, though might have some issues somewhere 😄 https://github.com/beef331/wasmedge_playground/blob/master/tests/tmaths.nim#L33-L65
22:42:46FromDiscord<Elegantbeef> And i've started a project using it https://github.com/beef331/aiarena here, though mostly focusing on my proper game and not this wasm scripting testy
22:43:47FromDiscord<j-james> In reply to @dom96 "that's a shame 😢": i'd imagine style insensitivity is far less useful to corporations
22:44:06FromDiscord<j-james> if you're mostly using internal libraries with consistent styles anyway
22:44:25FromDiscord<Elegantbeef> Well good thing there is the usage check
22:46:00FromDiscord<j-james> yea
22:54:59FromDiscord<exelotl> In reply to @Generic "what I deem most": Yeah I agree, best way to get more people interested in Nim is to make stuff with it
22:57:21NimEventerNew thread by Ggibson: Win nim included dlls fail to load, see https://forum.nim-lang.org/t/9220
23:06:54FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3ZJs
23:07:13FromDiscord<Elegantbeef> It goes away with danger cause assertions are off in danger
23:08:22FromDiscord<ajusa> Oh, okay. But the code functions fine even without the assertion, so why is it there then?
23:12:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZJu
23:13:19FromDiscord<ajusa> I see
23:13:28FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZJv
23:13:52FromDiscord<Elegantbeef> No clue if it should work, or what the issue is
23:13:55FromDiscord<ajusa> So something is likely breaking in the background which may not matter to me, or will eventually matter to me
23:14:16FromDiscord<ajusa> Nim's async is still kinda painful, the error trace didn't help all that much
23:14:22FromDiscord<Elegantbeef> Something might be incorrect that may result in issues down the line perhaps
23:14:25FromDiscord<ajusa> I wonder if using prologue would fix it
23:14:44FromDiscord<Elegantbeef> Could use status' async or rewrite your code with CPS 😄
23:15:18FromDiscord<ajusa> If there are any frameworks that support CPS or Status async I'd gladly try that
23:15:34FromDiscord<Elegantbeef> Status' async is a drop in replacement afaik
23:23:17FromDiscord<👾 br4n_d0n> How would one go about doing this in Nim?↵https://www.cprogramming.com/tutorial/c/lesson17.html
23:24:11FromDiscord<huantian> like <https://nim-lang.org/docs/manual.html#types-varargs>?
23:24:38FromDiscord<huantian> I didn't read your link except for like the first 3 words
23:24:54FromDiscord<Elegantbeef> You use varargs
23:25:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZJx
23:26:28FromDiscord<👾 br4n_d0n> Thanks, I wasn't sure if varargs was the correct approach or not
23:27:36FromDiscord<👾 br4n_d0n> BTW, what is `` items() `` in the link @huantian gave?
23:28:20FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=3ZJy
23:28:37*kayabaNerve_ is now known as kayabaNerve
23:28:42FromDiscord<ynfle> It's an iterator that yields each item in the seq
23:29:12FromDiscord<👾 br4n_d0n> Thanks everyone
23:29:36FromDiscord<Elegantbeef> depending who you ask you should use `items` explicitly
23:30:18FromDiscord<Luckayla> Welp, I've successfully ported my web app server over from Haskell to Nim
23:30:29FromDiscord<Luckayla> and it seems to be running great
23:30:37FromDiscord<👾 br4n_d0n> In reply to @Elegantbeef "depending who you ask": What's the reasoning?
23:31:26FromDiscord<Luckayla> actually, it seems like it's faster than Haskell even, and the Haskell implementation was not noticeably slow
23:33:15FromDiscord<michaelb.eth> In reply to @Luckayla "Welp, I've successfully ported": seems like a big change re: programming paradigms! do you code Nim in a mostly functional style or for the port did you adopt a more imperative style?
23:33:35FromDiscord<Elegantbeef> Inside generics implicit `items` can cause bugs↵(@👾 br4n_d0n)
23:35:15FromDiscord<👾 br4n_d0n> Seems Nim has issues with Generics in general...
23:35:36FromDiscord<👾 br4n_d0n> Is this something that's being worked on?
23:36:16FromDiscord<Luckayla> In reply to @michaelb.eth "seems like a big": I started by considering the implementation in a functional style, but ended up using a more imperative approach as it worked nicer.
23:36:39FromDiscord<Luckayla> It is in fact a big change, however the paradigm was not the reason I was using haskell originally, just that Haskell fit the niche of my use case well
23:36:55FromDiscord<Luckayla> That use case being a higher-level applications language that easily compiled to Windows, MacOS, and Linux target platforms with little fuss
23:37:11FromDiscord<Elegantbeef> Small bugs arent really touched often↵(@👾 br4n_d0n)
23:37:37FromDiscord<👾 br4n_d0n> That's sad to hear, but understandable
23:37:48FromDiscord<Luckayla> I had previously ignored nim due to its advertisement as a "systems language" but someone tipped me off that it wasn't such a low level language as I thought
23:37:54FromDiscord<Elegantbeef> I did look at it once but i'm too daft to know how to fix it
23:37:56FromDiscord<Luckayla> glad I listened to them, I'm loving the language so far.
23:40:41FromDiscord<Elegantbeef> It can be it just doesnt have to be 😛↵(@Luckayla)
23:41:13FromDiscord<Luckayla> yeah, a lot of nice stuff in the nim world.
23:41:20FromDiscord<Elegantbeef> It's at a nice place where the defaults are generally good but if you need to get lower you always can
23:41:26FromDiscord<Luckayla> and some syntax that reminds me of ruby's niceness without ruby's badnes
23:41:30FromDiscord<Elegantbeef> Unlike C++/C/Oddin/Zig 😄
23:41:41FromDiscord<Luckayla> Yeah, I never enjoy using C/C++ much
23:41:46FromDiscord<Luckayla> I use Rust whenever I can for those jobs
23:41:59FromDiscord<Luckayla> Zig seems like a rust-like, but I never saw any reason to use it over Rust
23:42:00FromDiscord<Elegantbeef> Now Nim? 😛
23:42:15FromDiscord<Luckayla> Nah, I will probably stick to Rust for my lower-level things.
23:42:21FromDiscord<Luckayla> I really do like that language quite a lot for different reasons
23:42:28FromDiscord<Luckayla> but for apps, nim is probably going to be my go-to
23:42:51FromDiscord<Luckayla> Python is my normal tool for server-side stuff, I'd use it for apps but packaging is still not great.
23:43:33FromDiscord<Elegantbeef> Shame
23:44:11FromDiscord<👾 br4n_d0n> cRustaceans are for eating, not being understandable to humans
23:46:59FromDiscord<Luckayla> lol
23:50:21FromDiscord<exelotl> since Hare dropped the other week it made me think, a qbe backend for Nim would be pretty cool
23:52:57FromDiscord<exelotl> I guess the closest thing we have right now is using tcc with the C backend
23:54:03FromDiscord<Elegantbeef> "dropped the other week" hasnt devault dropped it like 10 times now?! 😄
23:56:34FromDiscord<exelotl> it was secret (unless you knew where to look) until about 5 weeks ago :P
23:56:41FromDiscord<exelotl> though there were some teaser articles written about it
23:57:17FromDiscord<exelotl> (I did not know where to look)
23:57:25FromDiscord<Elegantbeef> Ah i've seen it since like the first mention of it
23:58:24FromDiscord<Elegantbeef> Though i mean the biggest Nim compile time issue is Nim itself
23:58:26FromDiscord<Elegantbeef> Turns out using a bunch of pointers for the AST isnt smart for performance