<< 30-09-2021 >>

00:00:24FromDiscord<MaksimBoyarkin> By the way, how are things with coroutines in Him?
00:00:59FromDiscord<MaksimBoyarkin> (edit) "Him?" => "Nim?"
00:04:07NimEventerNew thread by Alexeypetrushin: Auto-free C pointer when Nim object gets GC, see https://forum.nim-lang.org/t/8470
00:20:27FromDiscord<exelotl> sent a long message, see http://ix.io/3AmV
00:23:30FromDiscord<exelotl> personally I'm using Nimcoro because it's the only one that's possible to use with --gc:none
00:23:52FromDiscord<exelotl> (if you modify it to use a preallocated area of memory for the stack)
00:24:06FromDiscord<exelotl> but if that wasn't a consideration I'd probably try closure iterators first
00:27:17FromDiscord<MaksimBoyarkin> In reply to @exelotl "you have a few": thx
01:20:10FromDiscord<Gumber> more than that!
01:20:18FromDiscord<Gumber> don't forget about fibers / context switching 🙂
01:20:25FromDiscord<Gumber> they'll require dropping down to asm though
01:20:50FromDiscord<Gumber> but I actually already have an implementation of a job system using fibers and system threads
01:21:13FromDiscord<Gumber> but I think closure iterators might be a bit easier to get a handle on
01:31:54*vicfred joined #nim
02:16:55*arkurious quit (Quit: Leaving)
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:08:34*rockcavera quit (Read error: Connection reset by peer)
04:09:36*rockcavera joined #nim
04:09:36*rockcavera quit (Changing host)
04:09:36*rockcavera joined #nim
04:35:41*Guest71 joined #nim
04:36:49Guest71Hello everyone. I have a naive question about the seq. Is it possible to case its type? Like: (float)mySeq
04:37:12Guest71I need to convert a float seq into complex seq.
04:37:25Guest71Thanks in advance.
04:40:36FromDiscord<Elegantbeef> You can make a conversion procedure, or just use `sequtils.map`/`sugar.collect`
04:42:27Guest71Thank you. I will look at the sequtils.map
04:42:43*Guest71 quit (Quit: Client closed)
04:47:39FromDiscord<cabboose> Sounds like you want the procedure to hold different types?
04:47:41*rockcavera quit (Remote host closed the connection)
04:47:56FromDiscord<Elegantbeef> Sounded more like they want to convert the elements to a different type
04:48:08FromDiscord<Elegantbeef> 'e' is near \`'t' case -\> cast
04:48:17FromDiscord<cabboose> Hahahahaha ofc
04:48:48FromDiscord<cabboose> When did you become a typo linguist you dastardly devil
04:48:49FromDiscord<Elegantbeef> I fuck up a lot
05:09:14FromDiscord<Yandong Zhang> [cabboose](https://matrix.to/#/@cabboose:matrix.org)\: [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org) Want to convert the real number seq into the complex seq and use the FFT. The sequtils.map works well. Thanks again.
05:09:40FromDiscord<Yandong Zhang> I just tried.
05:53:13NimEventerNew Nimble package! hottie - Sampling profiler that finds hot paths in your code., see https://github.com/treeform/hottie
05:53:16nrds<R2D299> itHub: 7"Sampling profiler that finds hot paths in your code."
05:57:52FromDiscord<impbox [ftsf]> hot
05:57:59FromDiscord<Elegantbeef> tie
06:05:14NimEventerNew Nimble package! shady - Nim to GPU shader language compiler and supporting utilities., see https://github.com/treeform/shady
06:05:16nrds<R2D299> itHub: 7"Nim to GPU shader language compiler and supporting utilities."
06:08:38FromDiscord<NullCode> Where can i learn intermediate/ advanced nim stuff
06:08:47FromDiscord<NullCode> I'm pretty sure i have the basics covered
06:09:56FromDiscord<impbox [ftsf]> have you read the book?
06:10:06FromDiscord<impbox [ftsf]> it's good
06:11:08FromDiscord<Elegantbeef> Wait impbox can read?!
06:11:45FromDiscord<impbox [ftsf]> (i assume it's good)
06:12:19FromDiscord<impbox [ftsf]> other than the book, i learn the advanced stuff from @ElegantBeef's play links
06:12:39FromDiscord<Elegantbeef> I really should make a more official source of information
06:12:56FromDiscord<Elegantbeef> Some annoying asshat in realtime chats isnt the best
06:13:18FromDiscord<Rika> In reply to @impbox "other than the book,": From what I’ve read they’re not that advanced yet
06:15:05FromDiscord<Elegantbeef> An authoritative annoying asshat's written tutorials in a blog style post seems better
06:15:16FromDiscord<NullCode> In reply to @impbox "have you read the": Nim basics pdf thingy? Yes
06:15:19FromDiscord<NullCode> I forgot exact name tho
06:15:21FromDiscord<impbox [ftsf]> Nim in Action
06:15:27FromDiscord<impbox [ftsf]> https://livebook.manning.com/book/nim-in-action/
06:15:29FromDiscord<NullCode> In reply to @impbox "Nim in Action": Can you link it
06:15:45FromDiscord<NullCode> Ok no i haven't read this
06:16:12nrds<Prestige99> Elegantbeef has a nice post about marcos on dev.to
06:16:40FromDiscord<Elegantbeef> nah the post about marcos is on 50shadesofmarcos.com
06:16:46FromDiscord<Elegantbeef> The macro post is on dev.to indeed
06:17:35FromDiscord<impbox [ftsf]> https://dev.to/beef331/demystification-of-macros-in-nim-13n8 looks to be it
06:18:06FromDiscord<Elegantbeef> Been meaning to make a more advanced macro explanation
06:18:34FromDiscord<Elegantbeef> Maybe will do if i get nimscripters interop not poop anymore
06:19:49FromDiscord<cabboose> What are you trying to learn↵(@NullCode)
06:20:16FromDiscord<cabboose> The book isn’t the best for advanced IMO (I have read it)↵(@impbox [ftsf])
06:20:29FromDiscord<cabboose> Very good to start off
06:20:35FromDiscord<Elegantbeef> Impbox was joking about not reading it
06:20:53FromDiscord<Elegantbeef> atleast i hope so
06:20:59FromDiscord<impbox [ftsf]> The metaprogramming section is good
06:21:13FromDiscord<Elegantbeef> I know i havent read it cause i'm too cool for books
06:21:25FromDiscord<cabboose> Holy shit beef does blogs
06:21:25FromDiscord<cabboose> I will consume them
06:21:32FromDiscord<Elegantbeef> I do blog()
06:21:34FromDiscord<impbox [ftsf]> the blogs or beef?
06:21:46FromDiscord<cabboose> Both
06:22:20FromDiscord<cabboose> You might be right; it was beyond me when I started but I didn’t have a very good computer science background to understand it↵(@impbox [ftsf])
06:22:44*max22- joined #nim
06:22:58FromDiscord<cabboose> The whole node structure and what not makes more sense now; but initially I was just thinking “wot”
06:23:01FromDiscord<cabboose> “I write words”
06:23:04FromDiscord<Elegantbeef> Also impbox have you got nico to work with 1.6 yet?
06:23:07FromDiscord<cabboose> “What are nodes”
06:23:34FromDiscord<impbox [ftsf]> @ElegantBeef nah i haven't got 1.6 to install yet
06:23:44FromDiscord<Elegantbeef> Ah me either
06:23:52FromDiscord<Elegantbeef> Cannot be arsed to do a work around on it either
06:24:15FromDiscord<impbox [ftsf]> onboarding for nim is a big problem
06:24:22FromDiscord<Elegantbeef> Just curious cause I wanted to try embedding nimscript + nico + wasm
06:24:34FromDiscord<impbox [ftsf]> maybe i'll try and get it working this weekend
06:24:43FromDiscord<impbox [ftsf]> currently working 5 days though so i'm le tired
06:24:52FromDiscord<impbox [ftsf]> so much for quitting my job
06:25:02FromDiscord<Elegantbeef> Yea i mean i still have to finish the interop again, so it's no big deal
06:25:51FromDiscord<impbox [ftsf]> In reply to @cabboose "The whole node structure": yeah i kinda skimmed it first time, but going back to it with a focus on learning metaprogramming it's good
06:26:01FromDiscord<cabboose> Is there an operation to get a binary with X number of bits set to 1?
06:26:04FromDiscord<impbox [ftsf]> helps if you have a goal in mind
06:26:10FromDiscord<impbox [ftsf]> learning without a goal is hard
06:26:26FromDiscord<Elegantbeef> are you on 1.5.1+ cabb?
06:26:35FromDiscord<cabboose> This↵(@impbox [ftsf])
06:27:12FromDiscord<cabboose> Yeah
06:27:13FromDiscord<cabboose> bleeding edge dude
06:27:19FromDiscord<Elegantbeef> Ah then i might have something
06:27:30FromDiscord<impbox [ftsf]> @cabboose `((1 shl 5) - 1)`
06:27:34FromDiscord<impbox [ftsf]> (edit) "5)" => "x)"
06:27:57FromDiscord<cabboose> Oooo ofc
06:28:06FromDiscord<impbox [ftsf]> https://media.discordapp.net/attachments/371759389889003532/893021368646529024/unknown.png
06:28:11FromDiscord<cabboose> Thank you; so obvious in hindsight lmao
06:28:40FromDiscord<impbox [ftsf]> i always get shl/shr mixed up because i get left and right mixed up
06:29:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3AnL
06:29:28FromDiscord<Elegantbeef> `echo` and `toBin` are just for showcase
06:29:31FromDiscord<cabboose> So verbose
06:29:44FromDiscord<impbox [ftsf]> complementary!
06:29:58FromDiscord<Elegantbeef> I mean it's not that verbose
06:29:59FromDiscord<cabboose> Fair
06:30:06FromDiscord<impbox [ftsf]> you can also just type them in as literals `0b01111`
06:30:26FromDiscord<cabboose> Yeah but it’s supposed to get the mask based on a constant
06:31:06FromDiscord<cabboose> The -1 IMO is pretty explicit
06:31:20FromDiscord<impbox [ftsf]> a bit offensive
06:31:26FromDiscord<cabboose> I didn’t think of it before but it’s the one I’ll go for
06:31:34FromDiscord<Elegantbeef> Shame!
06:31:50FromDiscord<Elegantbeef> Mine uses the new setutils!
06:31:54FromDiscord<Elegantbeef> It's clearly cooler
06:31:54FromDiscord<cabboose> Mate that’s the one you put
06:32:23FromDiscord<cabboose> I am a simple brained person beef
06:32:40FromDiscord<cabboose> Forgive me
06:32:41FromDiscord<cabboose> \:’)
06:32:57FromDiscord<Elegantbeef> I mean i forgot how i implemented complement so... 😛
06:33:18FromDiscord<cabboose> Peas in a pod
06:33:42FromDiscord<Elegantbeef> ah it's just internally `{0..11}`
06:33:53*jjido joined #nim
06:34:11*jjido quit (Client Quit)
06:34:13FromDiscord<cabboose> That does look nice 👀
06:34:46FromDiscord<Elegantbeef> Well sadly it's not that simple though since there is no type annotation
06:35:11FromDiscord<cabboose> But lower bit ops are more language agnostic
06:44:10FromDiscord<impbox [ftsf]> i think they're a bit op
06:51:56*PMunch joined #nim
06:57:49FromDiscord<Elegantbeef> Lol spent so much time trying to figure out why this wasnt working, turns out some asshat accidently did `[T: object or tuple]`
06:58:01*jjido joined #nim
06:58:11FromDiscord<treeform> who was the asshat?
06:58:24FromDiscord<Elegantbeef> I'd prefer not to self incriminate
06:59:34FromDiscord<impbox [ftsf]> is it because this is deprecated?
07:01:03FromDiscord<Elegantbeef> Nah it's just cause i thought it'd work but was making it go throw a macro which destroyed it
07:01:18FromDiscord<Elegantbeef> But now have the nimscript -\> nim rewrite done
07:01:39FromDiscord<impbox [ftsf]> \o/
07:02:43FromDiscord<Elegantbeef> Got to get the otherside done again then clean up and get to play with a better done version of nimscripter
07:03:34FromDiscord<Elegantbeef> All of this presently works
07:03:36FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/893030299171172362/image.png
07:06:10FromDiscord<impbox [ftsf]> what does the "test" argument do?
07:06:22FromDiscord<Elegantbeef> "module" it's implemented in
07:07:11FromDiscord<Elegantbeef> Makes sense for if you want a bunch of different interpreters for different things
07:07:29FromDiscord<Elegantbeef> May eventually be added to a faux module with that name aswell since i believe that's possible
07:07:40FromDiscord<Elegantbeef> So you'd do `import test` inside the nimscript
07:08:09FromDiscord<impbox [ftsf]> cool
07:08:10FromDiscord<Elegantbeef> Presently it's just to hold specific functions so you can do `implNimScriptModule(test)` and get all the functions it holds
07:10:00FromDiscord<Elegantbeef> Heavily using the macro cache to elevate some issues i had with the previous method, `implNimScriptModule` actually emits a list of lambdas that call the procedures that are stored in the macrocache, this way you dont have as many problems with needing to import X before being able to call Y
07:30:18PMunchDamn it.. How am I supposed to wrap this: `XDamageCreate(Display *dpy, Drawable drawable, int level);` and `#define X_DamageCreate 1`
07:31:52FromDiscord<Rika> thats one reason why we cant do auto-wrapping i guess
07:32:09FromDiscord<Elegantbeef> `xDamageCreate`- proc and `XDamageCreate`- const
07:32:31FromDiscord<Rika> that just shifts the problem though
07:32:37FromDiscord<Rika> what now when you have a type and a define
07:32:45PMunchI mean I could rename X_DamageCreate to XunderscoreDamageCreate
07:32:51PMunchAnd stuff like that..
07:33:06FromDiscord<Rika> so we're back to mangling
07:33:13FromDiscord<Elegantbeef> Well when you have that problem you swim over to C land and shit on the nearest C programmer
07:33:19FromDiscord<Elegantbeef> If it's yourself i'm sorry you have to
07:33:28PMunchYeah, but that's just the nature of mapping a bigger space onto a smaller one
07:33:29FromDiscord<Rika> and if its you
07:33:52FromDiscord<Elegantbeef> Time to use unicode characters pmunch
07:34:04nrds<Prestige99> emoji var names
07:34:17PMunchOh man :P That'd be a massive mess :P
07:34:22FromDiscord<Rika> unicode underscore
07:34:25FromDiscord<Rika> lets gooooo
07:34:36FromDiscord<Rika> "how to force snake case in nim"
07:34:45PMunch<_<
07:34:47FromDiscord<Rika> im sorry maybe i shouldnt have said that
07:35:17FromDiscord<Elegantbeef> It's not that worst solution to this problem, i'm more likely to copy paste anything named `XUnderscoreDamgeCreate` than manually write it 😛
07:36:01PMunchThe problem is that you're probably reading a C guide
07:36:22PMunchAnd suddenly it looks like something didn't get automatically wrapped
07:36:41FromDiscord<Rika> well what if someone has "AunderscoreA" and "A_A"
07:36:42FromDiscord<Rika> xdddd
07:37:26PMunchMy current workaround is to rename things as _1 _2 _3, etc. whenever I map something to something that already existed
07:37:40FromDiscord<Rika> works i guess
07:38:03FromDiscord<Elegantbeef> Just throw in the type `Define` `Func`....
07:38:32FromDiscord<Rika> i think it should only apply for defines
07:39:07FromDiscord<Rika> so DefXDamageCreate or so
07:40:37PMunchHmm, problem now is that if I include file X which includes file Y, the defines from file Y will get their names first, then file X will get _1 postfixes
07:45:49*jkl quit (Quit: Gone.)
07:46:40*jkl joined #nim
07:49:41*neurocyte0132 joined #nim
07:49:41*neurocyte0132 quit (Changing host)
07:49:41*neurocyte0132 joined #nim
08:08:05nrds<Prestige99> When creating an object that has a seq[Foo] property, does the seq start with a len 0 or does it alloc memory before anything is added?
08:10:10*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:12:57FromDiscord<Jonah> a user of my cli written in nim is getting `could not load: (libcrypto-1_1-x64|libeay64).dll` errors on windows, assuming it's from openssl missing. what's the easiest way for them to install that? does the nim installer for windows include it?
08:13:42FromDiscord<Yardanico> You can just ship those DLLs with your binary
08:14:25FromDiscord<Yardanico> They're available in the bin directory where nim.exe itself is located
08:14:49FromDiscord<Yardanico> Or you can also get them from https://nim-lang.org/download/dlls.zip
08:15:01FromDiscord<Yardanico> No need to ship all DLLs inside of the archive, only the ones needed
08:15:21FromDiscord<Yardanico> As another (more complicated) solution you can statically link openssl
08:15:47FromDiscord<impbox [ftsf]> @Prestige default seq will be len 0 i believe
08:15:48FromDiscord<Jonah> which dlls do you think they need
08:15:55FromDiscord<Jonah> just `libcrypto-1_1-x64.dll`?
08:16:23nrds<Prestige99> Cool - couldn't find info on it in the docs, but was hoping it'd be 0
08:16:56FromDiscord<impbox [ftsf]> afaik nim doesn't set any defaults other than zeroing memroy
08:17:09FromDiscord<NullCode> In reply to @Jonah "a user of my": It is indeed from openssl being missing
08:17:13FromDiscord<NullCode> I had that same error too
08:17:30FromDiscord<NullCode> My solution was to use `puppy` https://github.com/treeform/puppy
08:17:33nrds<R2D299> itHub: 7"Puppy fetches HTML pages for Nim."
08:18:02FromDiscord<Jonah> why would i want to use some 3rd party library for that
08:18:13FromDiscord<Jonah> if the dll is missing just provide the dll
08:18:14FromDiscord<NullCode> Because static linking is tedious
08:18:25FromDiscord<NullCode> In reply to @Jonah "if the dll is": Oh you have that kinda scenario
08:18:28FromDiscord<NullCode> In that case, sure
08:18:44FromDiscord<NullCode> Just grab dlls from `%nim_dir%\bin`
08:19:11FromDiscord<Jonah> yeah that's what yardanico said
08:19:15*Vladar joined #nim
08:20:10PMunch@Prestige, something like `var x: seq[int]` is a completely nulled out object. This means that size is 0, capacity is 0, and buffer pointer is nil.
08:22:22nrds<Prestige99> Perfect
08:23:24FromDiscord<Elegantbeef> Comically the "just provide the dll" is sadly not a common view \:D
08:26:22FromDiscord<Jonah> does this same issue happen on linux
08:27:00FromDiscord<Jonah> i guess i've never noticed since i always have nim installed which provides the deps it needs
08:27:31FromDiscord<Elegantbeef> I think openssl is typically on linux, but dont recall, can always statically link if you must have a self contained binary
08:27:56PMunchThis is usually not a problem on Linux because you normally have dependencies like this installed system-wide
08:27:58FromDiscord<Elegantbeef> Pretty tedious as i understand it, but idk never done it
08:29:00FromDiscord<Jonah> i've heard statically linking openssl specifically is irresponsible as it leaves users vulnerable to any crypto issues unless you're keeping the linked version up to date
08:29:17FromDiscord<Jonah> but telling this guy to download the dll manually is not any safer so
08:29:51FromDiscord<Yardanico> In reply to @Elegantbeef "Pretty tedious as i": I wouldn't say that it's tedious, but more complicated than normal compilation of course
08:30:02PMunchWhich is why Linux updates these dependencies system wide
08:30:24FromDiscord<Yardanico> In reply to @Jonah "does this same issue": Not really as virtually all Linux desktop distros ship with OpenSSL
08:31:15FromDiscord<Yardanico> VoidLinux used LibreSSL for a long time, which is mostly compatible with OpenSSL, but even they decided to switch back to OpenSSL because of other projects only really being tested with OpenSSL
08:31:59FromDiscord<Yardanico> https://voidlinux.org/news/2021/02/OpenSSL.html
08:32:35FromDiscord<Jonah> would nim ever consider a compiler flag to statically link those DLLs/whatever the linux equivalent is?
08:32:46FromDiscord<Jonah> so devs don't have to figure it out themselves
08:33:53FromDiscord<Yardanico> don't think so, it's on the level of the C compiler and also with static linking you should follow the licenses of the project you're linking with
08:34:10FromDiscord<Yardanico> That said, it's possible to make Nim config scripts to simplify the process
08:34:34FromDiscord<Yardanico> See e.g. https://github.com/kaushalmodi/hello_musl
08:34:37nrds<R2D299> itHub: 7"NimScript (config.nims) for building a static binary using Nim + musl + pcre + libressl/openssl"
08:38:54FromDiscord<Jonah> neat
08:56:50FromDiscord<Yardanico> @timotheecour btw, about the binary size - with latest Nim and the same cmdline the hello world binary is 7.4kb, might have something to do with newer LLVM versions in zig cc or something else
08:57:11FromDiscord<Yardanico> `nim c --os:any -d:posix -d:noSignalHandler --cc:clang --clang.exe="zigcc.sh" --clang.linkerexe="zigcc.sh" -d:danger --gc:arc -d:useMalloc --panics:on --passL:"-target x86_64-linux-musl -flto" --opt:size↵ hello.nim`↵↵zigcc.sh is because Nim doesn't accept commands in clang.exe like "zig cc"
08:57:24FromDiscord<Yardanico> I will also try with musl GCC to see if it's much different from zig cc
08:58:15FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Aol
08:58:51FromDiscord<Yardanico> ah right, forgot one more trick `strip -R .comment -R .note -R .note.ABI-tag hello` then the size is 7296
08:59:07FromDiscord<Yardanico> (this removes the comment sections from the binary that state which compiler version it was created with)
08:59:45ehmrydoes anyone remember the github issue on for making the compiler emit FILE:LINE output? or does anyone have a patch?
09:02:56PMunchFILE:LINE output?
09:08:13ehmryPMunch: "standard" compiler output for giving the location of a line within a file
09:08:34ehmrylike GCC or clang or go or pcc
09:08:59PMunchStill not sure what you want
09:09:23FromDiscord<impbox [ftsf]> makes sense to me, but i don't know of the github issue
09:10:57nrds<Prestige99> Is there a way to expose a readonly view of a seq of an object? E.g. https://play.nim-lang.org/#ix=3Aor
09:11:10nrds<Prestige99> I suppose my only other option would be to wrap the seq impl
09:11:11FromDiscord<impbox [ftsf]> ehmry https://github.com/nim-lang/Nim/issues/690 there you go
09:12:12PMunchPrestige, I mean you could put in in a different module and not export the children field?
09:12:19FromDiscord<impbox [ftsf]> Prestige, not afaik
09:12:23PMunchOh wait, you have a children template..
09:12:38nrds<Prestige99> Yeah
09:12:54nrds<Prestige99> Wanted to expose useful functions to iterate etc without allowing modifications
09:13:08nrds<Prestige99> like using things in sequtils
09:13:08FromDiscord<Elegantbeef> `lent T`
09:13:54nrds<Prestige99> ohh neat
09:13:57nrds<Prestige99> https://nim-lang.github.io/Nim/destructors#lent-type
09:14:18ehmryimpbox [ftsf]: yes, thank you!
09:14:29FromDiscord<Yardanico> anyone knows of any prebuilt clang musl toolchains?
09:14:39FromDiscord<Yardanico> there are quite a lot for GCC, but can't find any with clang
09:14:55FromDiscord<Elegantbeef> It will copy if it needs to IE\: `var a = getsomeThing()` but aside from that it will be a read only pointer
09:15:52PMunchWe seriously need more documentation for how lent and sink and ARC works..
09:15:54FromDiscord<Elegantbeef> But yea does exactly what you want https://play.nim-lang.org/#ix=3Aos
09:16:39FromDiscord<Elegantbeef> Probably
09:16:44nrds<Prestige99> hm
09:18:18nrds<Prestige99> ah it needed to be a proc, okay
09:18:20nrds<Prestige99> Thanks beef
09:18:51FromDiscord<Elegantbeef> Yea templates being code substitution cannot use stuff like that afaik
09:19:17FromDiscord<Elegantbeef> having a template return a `lent T` doesnt make sense as it's pasting the body where it's called
09:19:42nrds<Prestige99> Yeah found it interesting that it compiles but doesn't work the same way as a proc would
09:20:21FromDiscord<Elegantbeef> Arguably might be a "bug"
09:20:40FromDiscord<Elegantbeef> Though i guess you could be calling a functioning internally which does borrow
09:28:31FromDiscord<Yardanico> From https://github.com/nim-lang/website/pull/301, maybe someone will find it useful:
09:28:48FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Aoy
09:35:51FromDiscord<NullCode> In reply to @Yardanico "See e.g. https://github.com/kaushalmodi/hello_musl": Hello musl is cool
10:11:54ZevvIs it common in elixir code to whitespace align the ->'s in a case?
10:12:12Zevvoh damn EWRONGCHAN
10:12:13FromDiscord<Rika> This is the Nim channel sir
10:12:19FromDiscord<Yardanico> XDD
10:12:25FromDiscord<Yardanico> exposed
10:12:45ZevvFuck Nim
10:13:19ZevvOh wait. also the wrong channel to say that, isn't it?
10:14:01FromDiscord<Yardanico> it's the wrong universe to say that
10:14:04FromDiscord<Rika> Someone ban pls
10:14:05FromDiscord<Rika> Troll
10:14:32Zevvyeah it's about time I got banned
10:15:38*PMunch swings hammer
10:15:51PMunchAnyways, are you checking out Elixir Zevv?
10:15:51ZevvPMunch, our might local Thor
10:15:58Zevvnot checking out, I'm flying high
10:16:12Zevvthis stuff is hilarious. I'm just telling my computer *what* to do, not *how* to do it
10:16:27PMunchThat's the beauty of functional programming :)
10:16:27ZevvI played around a few months ago, ported npeg to xpeg
10:16:37PMunchAt least if you have a good functional language..
10:16:52Zevvnow I needed a distributed system for managing a fleet of embedded computers connected to a load, power supply, temp sensor etc to do battery measurements
10:16:59Zevvthis clustering stuff just _works_
10:17:05ZevvI wrote about 250 lines of elixir. It all works
10:17:19Zevvclustring. HTTP rest & json api. programmable scripting. communication with the hardware
10:17:26Zevv750 lines
10:17:31PMunchOh right, Elixir uses Erlang for the distributed bits right?
10:17:39PMunchDamn, that's impressive
10:17:41Zevvright. It lies on top of OTP
10:17:53Zevvbut the underlying framework is solid as hell.
10:18:16ZevvSupervisor trees, hot code reloading, gazillions of tasks, actors
10:18:41Zevvit really nicely matches the problem I'm working on now
10:19:35PMunchYeah it sounds like a perfect fit for the use-case you mentioned
10:20:13PMunchHow's the speed of Elixir/the Erlang VM by the way?
10:20:26PMunchNot like benchmarking speeds, but ballpark
10:33:25Zevvlatest version gained JIT this year
10:33:42Zevvits not in the rust or nim or c ballpark
10:33:55Zevvbut is much better then python, php, ruby and the likes
10:35:54PMunchCool
10:36:02Zevvits semi-dynamic so it's not light on the allocations and all
10:36:06Zevvyou pay for that, right
10:36:10PMunchI mean if it was in the C ballpark it would be amazing for a functional language
10:36:38Zevvbut I decided that raw performance is something I rarely need. And there is always FFI of course
10:36:57Zevvit makes for a nice team with Nim or Rust, for example
10:37:08PMunchYeah, most functional languages tend to have slightly worse performance in order to give the guarantees it does
10:38:49FromDiscord<hotdog> Hey @PMunch
10:39:00FromDiscord<hotdog> Futhark is awesome
10:39:06PMunchThanks :)
10:39:20PMunchHave you used it for anything particular?
10:39:28PMunchOr did you just try it out?
10:39:31FromDiscord<hotdog> I used it a couple days ago to wrap jack (audio library) headers
10:39:44FromDiscord<hotdog> I was trying to put together a quick prototype
10:39:53PMunchOh nice, did it work alright for those?
10:40:36FromDiscord<hotdog> And used some existing jack wrapper from nimble or github, but it was broken, outdated and kept segfaulting. Spent a while trying to fix it and gave up. Then decided to try futhark and in literally 2 minutes I had a fully working wrapper
10:40:55FromDiscord<hotdog> So it's ideal for prototyping
10:41:14FromDiscord<hotdog> You can just pull a library in super quickly
10:41:27PMunch@Zevv, I kinda want to see something like zero-functional expanded to an entire language. Compile-time lazy evaluation and compile-time resolution of the things zero-functional does
10:41:29*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
10:41:39FromDiscord<hotdog> I saw the mixed reactions on the forum, and I disagree with a lot of what was said
10:42:07PMunch@hotdog, that is the exact same experience I have had using Futhark :)
10:42:21FromDiscord<hotdog> For me, Nim is a swiss-army-knife that can do so much, and integrate in so many places. But it doesn't work if you have to spend 6+ hours wrapping each library you want to use
10:43:04PMunchI was a bit surprised by some of the negativity on the forum, but I guess it was a bit down to me sort-of claiming Futhark would replace c2nim and nimterop
10:43:12FromDiscord<hotdog> But before e.g. publishing to nimble, I probably would put some effort in to make it more Nim style
10:43:20FromDiscord<hotdog> My wrapper, I mean
10:43:26PMunchOh for sure
10:43:32FromDiscord<hotdog> But it's so handy to have a working library so quickly
10:43:55FromDiscord<tandy> feels like a spoiler to read this now↵(@Yardanico)
10:43:58PMunchYeah, and it's perfect if you're just making a small application for yourself. Or as you said prototyping something
10:44:02FromDiscord<Yardanico> In reply to @tandy "feels like a spoiler": why?
10:44:06FromDiscord<Yardanico> it's better to know the changes beforehand
10:44:08FromDiscord<hotdog> In reply to @PMunch "I was a bit": Yeah I can see that. I think it fills a slightly different use case
10:44:13FromDiscord<Yardanico> most of this was already in changelog.md
10:44:28FromDiscord<hotdog> In reply to @PMunch "Yeah, and it's perfect": Yeah 100%
10:44:37PMunchIt is a bit different for sure
10:44:51FromDiscord<hotdog> I've got a question for you
10:44:51PMunchHave you had a look at the cached output by the way?
10:45:32FromDiscord<hotdog> For the symbol renaming, would it be possible to have a callback? I want to e.g. change every symbol that ends in "_t" to a more nim-style type name
10:45:44FromDiscord<hotdog> But don't want to write every symbol into the wrapper
10:45:59FromDiscord<hotdog> In reply to @PMunch "Have you had a": Yeah I did, had a poke around
10:46:04PMunchI want to write a mode that doesn't output all the `when declared` shenanigans so it would be slightly better for wrapping
10:46:12PMunchOoh, that is a good idea indeed
10:46:28FromDiscord<tandy> how↵(@hotdog)
10:46:31FromDiscord<tandy> that sounds amazing
10:46:32PMunchIf you've had a look at the Futhark sources I have a "TODO: Rethink this" over the entire renaming table :P
10:46:44FromDiscord<tandy> agree↵(@hotdog)
10:46:45FromDiscord<hotdog> In reply to @PMunch "I want to write": Cool that would be good. I navigated around mostly by jump-to-definition
10:47:07PMunchAh, that is indeed the best way to navigate that mess
10:47:20FromDiscord<tandy> i mean yeah ive seen the changes before but its just exciting to read the blog posts lol↵(@Yardanico)
10:47:36PMunchIt's output that way to ensure you won't have collisions and so that you can define your own overriding types
10:48:00PMunchBut that's less of a concern if you're going to process it into a wrapper
10:48:28FromDiscord<hotdog> In reply to @PMunch "It's output that way": I see
10:48:42PMunchBut throwing some callbacks in at various points is a good idea
10:48:49FromDiscord<hotdog> Maybe a callback to handle collisions
10:48:58FromDiscord<hotdog> ah snap 🙂
10:49:06PMunchYeah, I'm actually working on some better collision handling right now..
10:49:10PMunchIt's a bit of a mess
10:51:27FromDiscord<hotdog> Cool
10:51:44FromDiscord<hotdog> I'm keen to see how it goes
10:52:22PMunchMost of the trouble comes from trying to convert C names to Nim-names without horrible mangling
10:52:43PMunchThis sometimes causes overlaps (just scroll back a bit and you'll see me mentioning some of them)
10:52:58FromDiscord<hotdog> Yeah I can imagine that
10:53:48FromDiscord<Rika> ~~damn so you didn’t opt for the Unicode underscore method~~
10:54:04PMunchBut the `when declared` stuff is just so that you'll be able to fix wrapping issues by just declaring it yourself. A feature that I missed when doing c2nim and nimterop
10:54:07FromDiscord<hotdog> I guess the main thing is handling different naming conventions used in C, there could even be a few presets for different common ones
10:54:18*neurocyte0132 quit (Ping timeout: 260 seconds)
10:54:19PMunch@Rika, haha, give me a keyboard that can output those and I'll consider it
10:54:32FromDiscord<hotdog> In reply to @PMunch "But the `when declared`": Yeah that is handy
10:54:36FromDiscord<Rika> On it chief, making the firmware right now
10:55:22PMunchDamn it, just realised that I have written keyboard firmware in Nim that would support that.. You could literally fork it and have a keyboard firmware I can flash onto my keyboard in minutes..
10:55:33FromDiscord<hotdog> Anyway, go to rush off. Just wanted to say good job on it, nice one @PMunch
10:55:37FromDiscord<Rika> Poggers
10:55:44PMunchThanks again
10:55:50PMunchGotta go to a meting myself
10:55:56FromDiscord<Rika> See you
11:01:27FromDiscord<tandy> using essentia / flucoma from nim would be amazing
11:02:23FromDiscord<Rika> ?
11:02:29FromDiscord<Rika> Reply with unknown content?
11:06:15FromDiscord<tandy> strange
11:06:30FromDiscord<tandy> i asked pmunch if they were going to support cpp
11:10:32FromDiscord<Rika> C++ is another beast
11:10:34FromDiscord<Rika> I doubt it
11:11:08FromDiscord<tandy> damn
11:11:25FromDiscord<enthus1ast> i one want to try it on windows\: https://github.com/PMunch/futhark/issues/1
11:11:33FromDiscord<Yardanico> In reply to @tandy "damn": your best bet is to hope haxscramper suceeds :)
11:11:37FromDiscord<Yardanico> (edit) "suceeds" => "succeeds"
11:11:55FromDiscord<Yardanico> he's doing the ultimate C++ wrapping tool and wants to test it on the ultimate C++ beast - Qt
11:11:58FromDiscord<tandy> where is haxscramper working on that?↵(@Yardanico)
11:12:03FromDiscord<enthus1ast> to install it i had changed the nimble file to not install opir, build it by hand, then copy opir to the nimble dir
11:12:05FromDiscord<tandy> oh my god↵(@Yardanico)
11:12:08FromDiscord<tandy> incredibly based
11:12:09FromDiscord<Yardanico> it's too early to try rn I think
11:12:27FromDiscord<Yardanico> https://github.com/haxscramper/hcparse
11:12:30nrds<R2D299> itHub: 7"High-level nim bindings for parsing C/C++ code"
11:27:43FromDiscord<cabboose> He will definitely succeed
11:27:52FromDiscord<cabboose> the question is whether he will burn down his computer before that happens
11:28:03FromDiscord<cabboose> pray for him 🙏
11:31:33FromDiscord<haxscramper> It would be pretty helpful if I wasn't the only person actually doing thinking, because all other solutions just seem to be a quick-patches, without diving deep into details of macro expansion, interfacing with virtual classes, c templates, portability and tracking of library abi changes and so on
11:32:04FromDiscord<haxscramper> Maybe I should put up more issues in "help wanted" section
11:32:48FromDiscord<haxscramper> And when 1.6 finally comes out and unbreaks my CI write documentation for the whole internal API
11:34:06FromDiscord<haxscramper> Because implementing this, given right tools is not as hard as coming up with the design
11:36:12FromDiscord<tandy> is there really no interest from araq / lead nim devs in working on the stuff ur doing?
11:36:51*Vladar quit (Remote host closed the connection)
11:38:16FromDiscord<Rika> Probably just have their hands full
11:41:03FromDiscord<tandy> makes sense↵(@Rika)
11:44:07FromDiscord<haxscramper> In reply to @tandy "is there really no": c2nim seems to be "good enough for now" for them
11:44:55FromDiscord<haxscramper> At least there was no real push for any other official tooling that involved libclang/tree-sitter/boost::wave and other tools of that sort
11:45:29FromDiscord<tandy> hmm, dont they have a lot of money in their open collective
11:45:42FromDiscord<haxscramper> c2nim is basically a lowest common denominator. It works ... often enough
11:45:43FromDiscord<tandy> would be useful to fund some ppl with that
11:45:53FromDiscord<haxscramper> Well
11:46:09FromDiscord<haxscramper> It is not exactly a problem that can be solved by throwing money at it
11:46:23FromDiscord<haxscramper> Or we would just end up with new nimterop or something like that
11:47:18FromDiscord<haxscramper> Main issue is collecting use cases and iteratively adapting the solution
11:47:26FromDiscord<haxscramper> Coming up with good base tooling and building on top of this
11:47:52FromDiscord<haxscramper> So far I haven't seen any solution that followed this procedure, it mostly just straight-up jump to codegen
12:02:01*jjido joined #nim
12:02:55*max22- quit (Ping timeout: 260 seconds)
12:04:36*jjido quit (Client Quit)
12:06:02*supakeen quit (Quit: WeeChat 3.3)
12:06:31*supakeen joined #nim
12:16:32FromDiscord<Goel> Is it possible to specify to import only a single exported procedure form another module, instead of the whole module
12:16:36FromDiscord<Goel> (edit) "module" => "module?"
12:16:51FromDiscord<enthus1ast> from module import foo
12:30:19FromDiscord<gnu+linux user> but does it do any good on terms of generated csource of module having no other code other than imported procs
12:30:31FromDiscord<gnu+linux user> (edit) "procs" => "procs?"
12:30:59FromDiscord<cabboose> Nim only compiles the code you use anyway
12:31:22FromDiscord<cabboose> Well there are exceptions to that I think
12:34:52FromDiscord<Yardanico> @gnu+linux user as cabboose said, Nim always has dead-code elimination on
12:35:04FromDiscord<Yardanico> unless the procedure is marked with `{.exportc.}`
12:40:30*arkurious joined #nim
12:47:17FromDiscord<Goel> I had to do that because i only needed a single `type = object` from another module. Instead of importing that i triet to "trick" it creating the same type object, same name, same structure and fields, withing my module, but then when i export this module with its procedures, the compiler complains. So i suppose every created object even if is exactly the same (same name and fields) of another already present in a different module, is still
12:47:19*jjido joined #nim
12:54:49FromDiscord<cabboose> Unless you have collision issues then you can still import the whole module. It doesn’t effect performance. Otherwise you can do the from module import
12:54:59FromDiscord<cabboose> All kinds of ways to be tricky about it if you need
13:01:18*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:14:20FromDiscord<Yardanico> In reply to @Goel "I had to do": yes of course, that's how it should work
13:15:10*rockcavera joined #nim
13:15:10*rockcavera quit (Changing host)
13:15:10*rockcavera joined #nim
13:18:26*Gustavo6046 quit (Ping timeout: 245 seconds)
13:20:00FromDiscord<gnu+linux user> so from is a placebo 😔
13:29:07FromDiscord<cabboose> Well no; it’s good for collisions, so like if you had two procs of the same names in module a and b
13:29:12FromDiscord<cabboose> You can either import everything except that proc from b
13:29:19FromDiscord<cabboose> Or just import the ones you want from b
13:29:23*max22- joined #nim
13:31:40FromDiscord<NullCode> but is there size reduction
13:31:44FromDiscord<NullCode> if we do from
13:31:54FromDiscord<NullCode> (edit) "from" => "`from`"
13:32:18FromDiscord<exelotl> no, Nim has dead code elimination regardless
13:32:46FromDiscord<exelotl> if you import something and don't use it, it won't show up in the generated C code
13:33:54FromDiscord<NullCode> i see
13:34:06FromDiscord<exelotl> I like to use `from` for cases where a module is just imported so that I can call a single proc on line 733
13:38:14FromDiscord<exelotl> or cases where it's really not clear where a proc came from - e.g. in my game there's a shard (currency) counter but i sometimes re-use it to show messages. So I have `from shards import showMessage` to tell the reader (e.g. my future self) that yes, this is weird and I know it
13:44:32*Schnouki joined #nim
13:59:54*PMunch quit (Quit: Leaving)
14:03:26*neurocyte0132 joined #nim
14:03:26*neurocyte0132 quit (Changing host)
14:03:26*neurocyte0132 joined #nim
14:20:34*Gustavo6046 joined #nim
14:25:26FromDiscord<Rika> when types are extremely generic in name (Image, Color) i qualify them (pixie.Image, pixie.Color), then both procs and types are obvious as to where they come from
14:36:52FromDiscord<Gumber> or you can alias the import
14:36:58FromDiscord<Gumber> `import pixie as pix` or whatever
14:37:30FromDiscord<Gumber> I don't know - I rarely find the aliasing stuff / import stuff useful and I usually just do what @Rika described above...
14:44:14FromDiscord<reilly> Are there any ways of doing a bitwise AND besides the `bitops.bitand()` macro? I think it has some pragmas that are causing me issues.
14:46:26FromDiscord<Gumber> yes
14:46:32FromDiscord<Gumber> `0 and 1`
14:47:13FromDiscord<Gumber> In reply to @reilly "Are there any ways": https://play.nim-lang.org/#ix=3ApM
14:49:16FromDiscord<reilly> Oh yeah, duh. Thanks.
14:56:48FromDiscord<reilly> So, I've got a pointer to a `uint8`. How can I access the memory located `x` bytes away from this pointer?
14:57:17FromDiscord<reilly> Specifically, I''m trying to assign to a portion of memory `x` bytes away from a pointer.
14:57:27FromDiscord<reilly> (edit) "I''m" => "I'm"
14:58:16FromDiscord<Gumber> @reilly pointer arithmetic is one option
14:58:27FromDiscord<Gumber> if you know what the underlying memory represents you could cast it to that
14:58:34FromDiscord<Gumber> so if it's like an array of uint8s or something
14:58:47FromDiscord<Gumber> and you know the size of the underlying array - you could cast it to that and access it that way
14:59:05*neurocyte0132 quit (Quit: The Lounge - https://thelounge.chat)
14:59:17FromDiscord<Gumber> you could also cast it to an `ptr UncheckedArray[uint8]` and then use the subscript operator to access the element you want
15:00:23*neurocyte0132 joined #nim
15:00:23*neurocyte0132 quit (Changing host)
15:00:23*neurocyte0132 joined #nim
15:01:02FromDiscord<Gumber> I've used this library before - https://github.com/kaushalmodi/ptr_math - with success
15:01:05nrds<R2D299> itHub: 7"Pointer arithmetic in Nim"
15:03:03FromDiscord<tandy> are there any similar language projects to nim atm?
15:05:24FromDiscord<auxym> Similar how? Nim is often lumped in with Rust, Go, Zig, D, Crystal. Whether they are "similar" is somewhat subjective and depends on what you are comparing. Some people even say Nim is "similar" to python because of whitespace syntax, despite the fact that they are pretty different languages on most other axes
15:05:55FromDiscord<tandy> i guess nice syntax, high level, general purpose?↵(@auxym)
15:06:07FromDiscord<Gumber> Nim isn't really high level....
15:06:07FromDiscord<tandy> i wouldnt say zig is an alternative to nim
15:06:15FromDiscord<tandy> it can be though
15:06:26FromDiscord<tandy> whereas zig isnt at all
15:06:36FromDiscord<Gumber> Well Zig is meant to replace C Nim isn't
15:06:43FromDiscord<Gumber> Nim will probably eventually get a Zig compiler backend
15:06:56FromDiscord<Gumber> But I mean you can compile inline assembly with Nim - I wouldn't call it high level
15:07:01FromDiscord<tandy> yee↵(@Gumber)
15:07:06FromDiscord<tandy> awesome hahah↵(@Gumber)
15:07:07FromDiscord<Gumber> semantic wise it's much closer to C++ than a lot of other languages
15:07:18FromDiscord<tandy> i suppose general purpose is better↵(@Gumber)
15:07:20FromDiscord<Gumber> so if you consider C++ high level, I guess Nim is then too, but.....
15:07:33FromDiscord<Gumber> No I don't think there are many languages like Nim - maybe the closest would be D
15:07:42FromDiscord<Gumber> but I also don't know much about D's memory model
15:07:53FromDiscord<tandy> what about crystal? i havent looked at that much↵(@Gumber)
15:07:57FromDiscord<Gumber> lol
15:08:17FromDiscord<Gumber> sorry it's just whenever I hear Crystal or V these days I chuckle
15:08:19FromDiscord<Rika> crystal is still vm based isnt it
15:08:27FromDiscord<Gumber> Crystal still doesn't support windows afaik lol
15:08:36FromDiscord<Rika> i find crystal at least much more respectable than v/
15:08:43FromDiscord<Gumber> I mean yeah - but it's still kind of a joke IMO
15:08:52FromDiscord<Gumber> been kind of sitting in the same state since it was announced for the most part
15:08:56FromDiscord<tandy> yeah its pretty funny how out of all these attempts nim is the only one that survived↵(@Gumber)
15:08:59FromDiscord<Gumber> and everyone was sooooo hyped about it
15:09:11FromDiscord<Gumber> well Nim has been around for close to two decades at this point
15:09:24FromDiscord<Gumber> or it's nearing that point anyway
15:09:39FromDiscord<Gumber> it's much older than Crystal or V or Zig or Rust
15:09:41FromDiscord<tandy> damn i didnt realise↵(@Gumber)
15:09:49FromDiscord<tandy> i thought it was only a decade
15:10:03FromDiscord<Gumber> nope
15:10:25FromDiscord<Gumber> 13 years ago it says now
15:10:29FromDiscord<Gumber> but I think that's probably wrong
15:10:30FromDiscord<Gumber> https://en.wikipedia.org/wiki/Nim_(programming_language)
15:10:40FromDiscord<Gumber> yeah it was started in 2005
15:10:43FromDiscord<Gumber> development - so 16 years now
15:10:57FromDiscord<Gumber> became public in 2008 with the name `Nimrod`
15:11:37FromDiscord<Gumber> why are you looking for alternatives anyway? what don't you like about Nim?
15:11:41FromDiscord<Gumber> or are you just curious?
15:11:46FromDiscord<dom96> In reply to @Gumber "Nim will probably eventually": seriously doubt this, far more likely we'll get a LLVM backend
15:11:52FromDiscord<Gumber> I mean we already have one
15:11:58FromDiscord<Gumber> NLVM
15:12:08FromDiscord<Gumber> and I would much prefer a Zig backend to an LLVM one
15:12:21FromDiscord<Gumber> LLVM brings all sorts of issues that Zig is already figuring out
15:12:31FromDiscord<tandy> wow↵(@Gumber)
15:13:01FromDiscord<Gumber> also zigcc exists now so.....
15:13:02FromDiscord<tandy> just curious, i love nim, but im not sure about its long term position↵(@Gumber)
15:13:22FromDiscord<Gumber> I think worrying about that kind of thing is a bit pointless if you're exploring niche languages
15:13:35FromDiscord<tandy> tru lol
15:14:20FromDiscord<Gumber> I will RFC hard for Zig compiler backend when Zig reaches a more mature state
15:14:26FromDiscord<Gumber> (edit) "I will RFC hard for ... Zig" added "a"
15:14:31nrds<Prestige99> That would be great
15:14:45FromDiscord<enthus1ast> what would be the benefit to have a zig backend over c?
15:15:23FromDiscord<tandy> zig is the future?
15:16:11FromDiscord<Gumber> Because Zig is going to be a safer alternative to C with less UB
15:16:44FromDiscord<tandy> cant wait till we fix computers
15:16:50FromDiscord<enthus1ast> would be interesting to have a direct nim -\> binary instead of a backend
15:17:11FromDiscord<enthus1ast> though nim would be the future \:)
15:17:27FromDiscord<Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3Aqa
15:17:28FromDiscord<Gumber> this is why a Zig backend is more attractive than a C one
15:17:39FromDiscord<dom96> Nim->Zig->LLVM->Binary would just be too much
15:17:42FromDiscord<Gumber> I mean we can go to LLVM and deal with long ass compile times like the Rust team has to
15:17:47FromDiscord<dom96> C UB can be avoided
15:17:48FromDiscord<Gumber> Zig is ditching LLVM
15:17:52FromDiscord<Gumber> or has been working on doing that for a while
15:18:21FromDiscord<Gumber> https://kristoff.it/blog/zig-new-relationship-llvm/
15:18:47FromDiscord<enthus1ast> UB?
15:19:11FromDiscord<Gumber> undefined behaviour
15:19:54FromDiscord<Gumber> In reply to @dom96 "C UB can be": I mean sure - but it doesn't change the fact that the language spec is full of it....
15:19:58FromDiscord<Gumber> Zig aims to completely avoid that
15:20:12FromDiscord<Gumber> I don't even know why anyone wants an LLVM backend
15:20:20FromDiscord<Gumber> like - we've seen what's happened with rust in relation to compile times....
15:20:26FromDiscord<Gumber> do we really want to go down that same road?
15:20:50FromDiscord<Gumber> (edit) "an" => "a"
15:21:01FromDiscord<dom96> > and adds an amazing feature for debug builds of your code: incremental compilation with in-place binary patching, another unique Zig feature.↵hah, that article says this and has links to "color blind async/await" + "zig comptime", pretty sure you could say Nim has both too
15:21:51FromDiscord<dom96> In reply to @Gumber "do we really want": nope, I'm happy with C compilation
15:22:02FromDiscord<Gumber> I mean me too
15:22:07FromDiscord<Gumber> but I'd be happier with Zig compil;ation
15:22:12FromDiscord<Gumber> (edit) "compil;ation" => "compilation"
15:22:18FromDiscord<Gumber> once Zig is ready anyway
15:22:55*Gustavo6046 quit (Ping timeout: 252 seconds)
15:24:10FromDiscord<dom96> at that point why not just use Zig?
15:25:08nrds<Prestige99> why not just use c?
15:25:52FromDiscord<tandy> so does zig support IC yet?↵(@Gumber)
15:26:27FromDiscord<dom96> because C has a poor type system, poor module system and is in general an archaic language
15:27:16nrds<Prestige99> So you think Nim doesn't have advantages over Zig?
15:27:33FromDiscord<Gumber> I don't know if zig has IC fully implemented yet I know they're working on it
15:27:47FromDiscord<Gumber> Look you don't use zig and you don't use C because Nim has higher level abstractions than both languages
15:27:58FromDiscord<Gumber> The point is if zig is going to eventually end up being a better C it doesn't even make sense to compile to see anymore it makes sense to compile to zig
15:28:17FromDiscord<Gumber> But we're not there yet The zig team is still working on making zig a c replacement it's obviously making a lot of progress towards that but it's not there yet
15:28:31FromDiscord<Gumber> The zig team has also made some incredible tooling like zig CC which basically eliminates the need for cross compile tool chains altogether
15:28:41*beshr joined #nim
15:28:46FromDiscord<Gumber> So zig is going to end up being like a better LLVM for Nim
15:28:51FromDiscord<haxscramper> It is harder to compiler to zig because it is harder to use it as dumb backend
15:28:54*beshr quit (Changing host)
15:28:54*beshr joined #nim
15:29:10FromDiscord<Gumber> This is true there are more language semantics and rules and everything like that it's definitely a more complex challenge than writing a C compiler back end
15:29:16FromDiscord<haxscramper> if zig code is too smart we have to transpile nim code to correct zig
15:29:18FromDiscord<Gumber> But I think in the end if it is feasible it is worth the effort
15:29:30FromDiscord<Gumber> Right but I think one of the design goals of the zig team is to keep it simple I guess we'll just have to find out how simple it ends up being
15:29:30FromDiscord<haxscramper> which is harder than converting to correct C
15:29:45FromDiscord<Gumber> Yeah I mean you're right if it ends up being a transpilation step instead of a compilation step then we will have issues for sure
15:30:04FromDiscord<haxscramper> and what benefits does zig bring to us again?
15:30:10FromDiscord<dom96> Prestige: I don't think the advantages are large enough to warrant implementing a Zig backend for Nim over simply just using Zig
15:30:16FromDiscord<haxscramper> it being better language makes harder for us to compile to it
15:30:19FromDiscord<Gumber> Well less undefined behavior more memory safety
15:30:22FromDiscord<haxscramper> the smarter zig gets
15:30:33FromDiscord<haxscramper> the worse our backend impl would have to be
15:30:45FromDiscord<haxscramper> have you seen generated C for iterators for examples?
15:30:48FromDiscord<dom96> What undefined behaviour does Nim have due to its C compilation?
15:30:50FromDiscord<Gumber> Yeah I mean I agree with and see your points I'm just optimistic that it won't be so high level and so full of abstractions that it will make targeting it difficult but I don't know I don't follow its development extremely closely
15:30:52FromDiscord<haxscramper> it is just rat's nest of gotos
15:31:06FromDiscord<Gumber> Nim doesn't have undefined behavior but it has to account for it
15:31:14FromDiscord<Gumber> Well that's probably a misnomer but
15:31:32FromDiscord<Gumber> My point is nim doesn't have to expose C'sa UB
15:31:45FromDiscord<haxscramper> In reply to @Gumber "Yeah I mean I": again, what benefits does it brings us again, except for abstract "C is UB from top to bottom"
15:31:58FromDiscord<haxscramper> does it have larger ecosystem?
15:32:16FromDiscord<haxscramper> maybe some unique libs that we would benefit from using?
15:32:26FromDiscord<haxscramper> access to new platforms that C can't compile to?
15:32:39FromDiscord<haxscramper> more performant backend for free?
15:32:43FromDiscord<Gumber> In reply to @haxscramper "it is just rat's": No on the ecosystem
15:32:54FromDiscord<Gumber> I don't know about the unique library situation but I mean there are libraries for most things in C
15:32:54FromDiscord<haxscramper> I mean zig is nice to use
15:33:19FromDiscord<haxscramper> We'd better targeting `.net` or java ecosystem
15:33:21FromDiscord<Gumber> My thinking is that platforms and available targets will become easier to write code for with a zig back end than it presently is let's see
15:33:29FromDiscord<Gumber> With C
15:33:41FromDiscord<Gumber> Well those would be transpilation
15:33:47FromDiscord<haxscramper> why?
15:33:51FromDiscord<Gumber> And I imagine just as difficult if zig ends up being very high level
15:34:03FromDiscord<Gumber> Because they're at the same abstraction level as Nim
15:34:11FromDiscord<haxscramper> they are all bytecode vm
15:34:18FromDiscord<haxscramper> we already have bytecode register vm
15:34:22FromDiscord<haxscramper> I'm talking jvm
15:34:23FromDiscord<haxscramper> etc.
15:34:25FromDiscord<Gumber> Okay I see what you're saying
15:34:28FromDiscord<Gumber> CLR and JVM
15:34:47FromDiscord<haxscramper> yes, though maybe transpilation to java is easier than jvm code generation
15:34:56FromDiscord<Gumber> I don't know I've never tried either
15:34:57FromDiscord<haxscramper> idk, so right now this is just an assumption
15:35:17FromDiscord<Gumber> Yeah it very much is and that's why I said probably it would get one but if it turns out that zig ends up being too high level to make it worth it then I'm totally wrong
15:35:47FromDiscord<Gumber> I think one of the design goals was always to replace C and b a viable compilation target but I don't know if that's changed or if it is even still something people are exploring
15:35:58FromDiscord<Gumber> I explored zig probably 3 to 4 years ago at this point when it was still just a baby
15:36:25FromDiscord<Gumber> And I know the language semantics and the project itself have changed quite rapidly since I last took a solid look at the project
15:36:52FromDiscord<Gumber> I know that when I wrote in zig I missed a lot of the abstractions in Nim, and especially Nims metaprogramming
15:37:12FromDiscord<Gumber> But writing's Zig was much nicer than writing C
15:39:09FromDiscord<Gumber> Also I have no idea how zig's standard library is going to compare to C's at the end of the day
15:40:14FromDiscord<haxscramper> I think we would get better shot at interfacing with zig
15:40:24FromDiscord<haxscramper> or generating zig APIs with something like genny
15:40:27FromDiscord<haxscramper> EEE strategy
15:40:44*Gustavo6046 joined #nim
15:41:15FromDiscord<haxscramper> well, last E is not necessary, but still
15:41:43FromDiscord<Gumber> yeah that could work well too I think and yeah might end up being better than a Zig compiler backend
15:42:36*neurocyte0132 quit (Ping timeout: 245 seconds)
16:00:38FromDiscord<Gumber> yeah but no need to extinguish zig lol
16:00:47FromDiscord<Gumber> had a meeting in the middle of those replies xD
16:10:15FromDiscord<Yandong Zhang> Hello everyone, I have a question for sequence comparing.
16:10:17FromDiscord<Yandong Zhang> assert(@[1.0,1.0,1.0,1.0,1.0] == @[1.0,1.0,1.0,1.0,1.0],"wrong!")
16:10:37FromDiscord<Gumber> you're comparing refs
16:10:41FromDiscord<Yandong Zhang> The above statement is not correct. Do anyone know how to compare the seq?
16:10:53FromDiscord<Shoto> It'd be cool if i could use C libs easily via Zig ngl
16:11:02FromDiscord<Gumber> You can use C libs easily via Nim 🙂
16:11:22FromDiscord<Gumber> In reply to @Yandong Zhang "The above statement is": sequences are ref objects you need to compare the objects the ref points to, not the refs
16:11:33FromDiscord<Shoto> In reply to @Gumber "You can use C": I haven't been able to figure that out at all lol
16:11:39FromDiscord<Gumber> do you know C?
16:11:49FromDiscord<Shoto> Enough to make a basic C program, yes
16:11:59FromDiscord<Gumber> well then learn how to use `importc`
16:12:03FromDiscord<Gumber> because it's that easy
16:12:17FromDiscord<Yandong Zhang> @Gumber\: assert([1.0,1.0,1.0,1.0,1.0] == [1.0,1.0,1.0,1.0,1.0],"wrong!")↵Still not work 🙄
16:12:35FromDiscord<Gumber> you're also comparing floating point values
16:12:44FromDiscord<Gumber> which is not going to work....
16:13:04nrds<Prestige99> seems odd, why doesn't that work?
16:13:05FromDiscord<Gumber> depending on your cpu arch and default word size
16:13:12FromDiscord<Gumber> you're either comparing sixty-four bit floating point values or 32-bit
16:13:12FromDiscord<Yandong Zhang> assert([1,2] == [1,2],"wrong!")↵ Not work too
16:13:22FromDiscord<Gumber> that should work....
16:13:23FromDiscord<Shoto> Hm alright
16:13:33FromDiscord<Gumber> give me one sec Yandong, let me take a look
16:14:14FromDiscord<Yandong Zhang> Sorry. Works now.
16:14:20FromDiscord<Yandong Zhang> Thank you
16:14:21FromDiscord<Gumber> was about to say 🙂
16:14:24FromDiscord<Gumber> yeah, no problem!
16:14:40FromDiscord<Gumber> In reply to @nrds "<Prestige> seems odd, why": because floating point units in modern CPUs don't work that way 🙂
16:14:49FromDiscord<Gumber> floating point math by nature is imprecise
16:15:11FromDiscord<Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3Aqp
16:15:24nrds<Prestige99> yeah but I'd think an expression if 1.0 == 1.0 should always be true
16:15:43FromDiscord<Gumber> one would think....
16:15:46FromDiscord<xflywind> Compare string form or using map + https://nim-lang.github.io/Nim/math.html#almostEqual%2CT%2CT%2CNatural
16:16:26FromDiscord<xflywind> (edit) "using map +" => "use"
16:16:44FromDiscord<Yandong Zhang> @xflywind\: I use the echo now. Give the assertion.
16:16:52FromDiscord<Yandong Zhang> REPL way to do the test, LoL
16:17:09FromDiscord<Yandong Zhang> give up the assertion at this moment.
16:17:25FromDiscord<Gumber> in general it's just not a good idea to use `==` when checking for equality with floating point values
16:17:33FromDiscord<Gumber> I think Nim has like `~=` or something?
16:18:16FromDiscord<Yandong Zhang> Do not know. Another question is, is there a convenient way the convert seq[float] to seq[int]?
16:18:25FromDiscord<Yandong Zhang> Maybe we need to use the map?
16:18:38FromDiscord<Gumber> maybe something in `sequtils`
16:18:44FromDiscord<Gumber> just know that it will == allocations
16:19:02FromDiscord<Gumber> because that module is full of pure functions and doesn't mutate state
16:19:19FromDiscord<Yandong Zhang> Will check the sequtils. Thanks again.
16:19:45FromDiscord<Gumber> https://rosettacode.org/wiki/Approximate_equality#Nim
16:19:46FromDiscord<Gumber> yeah np!
16:21:35FromDiscord<xflywind> In reply to @Gumber "https://rosettacode.org/wiki/Approximate_equality#N": Yeah, it is implemented as https://nim-lang.github.io/Nim/math.html#almostEqual%2CT%2CT%2CNatural
16:21:52FromDiscord<Yardanico> In reply to @Gumber "sequences are ref objects": no
16:22:00FromDiscord<Gumber> huh?
16:22:06FromDiscord<Gumber> oh yeah that changed fuck
16:22:06FromDiscord<Yardanico> nim sequences are ref objects internally, but they have value semantics in Nim
16:22:06FromDiscord<Gumber> lol
16:22:10FromDiscord<Yardanico> it never changed
16:22:13FromDiscord<Yardanico> it always was that way :)
16:22:20FromDiscord<Gumber> oh well, I barley use sequences so....
16:22:33FromDiscord<Gumber> and yes I know it's the same for strings
16:22:52FromDiscord<Gumber> I guess I just forgot seqs had the same thing - I dunno man I'm always in C land
16:22:56FromDiscord<Gumber> or C++ land
16:23:07FromDiscord<Gumber> I rarely rely on Nim strings or sequences etc....
16:23:21FromDiscord<Gumber> but thank you for clarifying my error Yard 🙂
16:24:34FromDiscord<Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3Aqr
16:24:46FromDiscord<Rika> !eval assert(@[1.0,1.0,1.0,1.0,1.0] == @[1.0,1.0,1.0,1.0,1.0],"wrong!")
16:24:48NimBot<no output>
16:24:51FromDiscord<Yardanico> yeah, it's specific to floats that it doesn't work
16:24:53FromDiscord<Gumber> right
16:24:56FromDiscord<Yardanico> @Rika different hardware
16:24:59FromDiscord<Yardanico> can yield different results
16:25:03FromDiscord<Rika> of course
16:25:11FromDiscord<Yardanico> !eval assert(@[1.0,1.0,1.0,1.0,1.0] == @[1.0,1.0,1.0,1.0,1.0],"wrong!")
16:25:13NimBot<no output>
16:25:22FromDiscord<Rika> i just sent that
16:25:25FromDiscord<Yardanico> yes
16:25:29FromDiscord<Gumber> !eval assert(@[1.0,1.0,1.0,1.0,1.0] == @[1.0,1.0,1.0,1.0,1.0],"wrong!")
16:25:31NimBot<no output>
16:25:35FromDiscord<Gumber> what hardware are we all on?
16:25:36FromDiscord<Gumber> oh weait
16:25:37FromDiscord<Gumber> lol
16:25:39FromDiscord<Gumber> it's all nimbot's hardware
16:25:40FromDiscord<Gumber> xD
16:25:42FromDiscord<Rika> xd
16:25:47FromDiscord<Gumber> god my brain sucks without my meds
16:25:55FromDiscord<Rika> why not take them
16:25:57FromDiscord<Gumber> trying not to take them every day because they're bad for you
16:26:01FromDiscord<Rika> huh okay
16:26:03FromDiscord<Gumber> being on speed every day isn't the greatest thing ever
16:26:27FromDiscord<Gumber> I'm trying to do 4x a week instead of 7x
16:26:44FromDiscord<Gumber> to avoid glaucoma, dementia, etc... later in life which stimulants put you at higher risk for
16:26:58FromDiscord<Gumber> anyway ot
16:29:13FromDiscord<Yandong Zhang> Today is my third of Nim learning/programming. I just felt that the grammar of Nim is too powerful. Thus, it may not be suitable for a team to use because everyone finally will customize their own grammar. With that said, it looks like Nim is the best tool for a small group or solo programming.
16:30:40FromDiscord<Rika> it can be suitable for a team once the proper linting tools pop up
16:31:01FromDiscord<Rika> that way you can lint for editing then lint back for committing
16:31:21FromDiscord<Rika> and there will be no preferred style issues
16:36:59FromDiscord<Yandong Zhang> @Rika\: Any lint recommendation? I did not go that far yet. 3x
16:38:53FromDiscord<Rika> not as of now, the linters are very basic as of now
16:39:02FromDiscord<Rika> and theres pm just two of them too
16:39:14FromDiscord<Rika> nimpretty and morepretty (which is just an extension of nimpretty)
16:40:19*kobi7 joined #nim
16:40:46kobi7Hello everyone!
16:41:11FromDiscord<Rika> hello, whats up?
16:41:46kobi7good! I am seeking information about fidget the gui lib
16:42:15kobi7anybody has experience with it, here?
16:43:04FromDiscord<Rika> afaik its currently undermaintained because the author is busy, but thats just from what i hear
16:43:16FromDiscord<Rika> i havent actually confirmed it from the author themself...
16:43:40kobi7is treeform around sometime? maybe I should ask my question in the forum
16:44:25FromDiscord<Rika> he is sometimes but not as often nowadays as i remember
16:44:31FromDiscord<dom96> just ask your questions, treeform will respond eventually I'm sure
16:44:43kobi7thanks dom, so here goes
16:44:52FromDiscord<Rika> @treeform a question for you below
16:45:15FromDiscord<Rika> im not sure if he backreads so just in case...
16:45:38kobi7the dsl in fidget is basically templates of an id which is the name of the control, and a block of code that describes it and its procs
16:46:22kobi7the way to do a binding to a var, is mentioning that var, which is a global or in the higher scope.
16:46:34FromDiscord<Shoto> Probably a stupid question but if i wanted to make a plugin for this Python server software (https://github.com/Podrum/podrum-docs/blob/main/plugins/creating.rst) with Nimpy, how would i actually get the code to work?
16:46:56kobi7Now I am interested in reusing controls, so I want to pass the binding part (passing that variable to the dsl template)
16:47:25FromDiscord<Shoto> Would i have to wrap it up in a Python file or can i use the new Types system in Nimpy to emulate a class (i genuinely don't want to because OOP is meh but like, i can't see any other way around it)
16:47:33kobi7(or multiple vars)
16:48:44kobi7so that's the question, making a self contained widget/control. because from the tests and examples, I only see low level building it, which is fun but perhaps not so productive
16:50:18kobi7The gui scene in Nim is in general not very clear. Atleast wrt portable gui: I have tried Nigui and nimx a while ago, but they had very few controls. Maybe it's better to interface with python or something?
16:52:06FromDiscord<Gumber> what GUI scene in any language is clear?
16:52:07FromDiscord<Shoto> If you're looking for a GUI library maybe check nimraylib_now? Iirc they have RayGUI
16:52:10FromDiscord<Gumber> (edit) "what ... GUI" added "cross platform"
16:52:17kobi7Oh, I spoke too soon, looking at available pkgs I see "spinner":Spinner is a companion library for the wonderful Fidget
16:53:05FromDiscord<Gumber> (edit) "what cross platform GUI scene in any ... language" added "compiled native"
16:53:52kobi7Gumber, well there are mature libraries like wx, fox toolkit, gtk, qt, iup, first that come to mind.
16:54:06FromDiscord<Gumber> Nim has bindings to wx
16:54:11FromDiscord<Gumber> I don't know what fox toolkit is
16:54:13kobi7of course i prefer the simpler solutions
16:54:15FromDiscord<Gumber> I think Nim has bindings to gtk too
16:54:23FromDiscord<Gumber> qt is not simple - but bindings are in the work
16:54:27FromDiscord<Gumber> and I wouldn't call that a clear picture lol
16:54:43FromDiscord<Gumber> (edit) "work" => "works I believe"
16:55:04FromDiscord<Gumber> also GUI requirements differ vastly between use cases
16:55:12kobi7a clear picture, I mean mature or "battle tested" as they say, with enough controls to make a non-trivial gui app
16:55:24kobi7today the android case is also important
16:55:27FromDiscord<Gumber> I mean you're free to wrap whatever C/C++ library you want
16:55:32FromDiscord<Gumber> well maybe to you 🙂
16:55:40FromDiscord<treeform> kobi7, about fidget, you can bind any var if you wrap your control in a function or a template.
16:55:55kobi7hi treeform
16:56:27kobi7oh, so simply to add another proc that wraps the declaring code?
16:56:59FromDiscord<treeform> in hn.nim app I pass ID, but you can pass anything: https://github.com/treeform/fidget/blob/master/examples/hn/hn.nim#L31
16:57:14FromDiscord<treeform> you can even pass a string and bind it
16:57:23FromDiscord<treeform> but it has to be a var string so that it can be modified in place
16:58:42kobi7cool, I understand now. Thanks!
16:59:11kobi7if you're here, what about themes? is there a mechanism that gets a json or a hashtable with a theme name and values?
16:59:26FromDiscord<treeform> for some thing like a toggle you might pass a `var bool` and modify it in the unclick handler
16:59:28kobi7(values for each component)
17:00:01kobi7OKay. Btw, are there more docs? couldn't find much
17:00:02FromDiscord<treeform> yeah at work where I use this lib, I have a file with common controls I use.
17:00:09FromDiscord<treeform> and they take the normal stuff in.
17:00:20FromDiscord<treeform> there isn't more docs sorry
17:00:28FromDiscord<treeform> fidget1 is on hold while I work on fidget2
17:00:46kobi7ah, will it have the same simplicity and dsl?
17:01:06FromDiscord<treeform> yes and no
17:01:12FromDiscord<treeform> its going to be different
17:01:43kobi7as long as you don't make a WPF out of it. the horror..
17:01:53kobi7:)
17:02:10kobi7your gui lib reminds me of rebol's
17:03:12FromDiscord<treeform> rebol is very short though
17:03:27FromDiscord<treeform> rebol UI takes amazingly short amount of code
17:03:37kobi7yes, and quite primitive, but the same style
17:04:27kobi7I like your thinking, what you did with that. I think it's a fun way to program
17:04:47FromDiscord<treeform> I am glad you like it.
17:07:14kobi7so, spinner lib is the way forward for more controls?
17:09:11*vicfred_ joined #nim
17:10:05*Gustavo6046_ joined #nim
17:10:32FromDiscord<enthus1ast> @treeform\: do we need figma to use fidget?
17:10:45FromDiscord<enthus1ast> or just for designing?
17:11:30kobi7it looks like the recommended way, according to the website, but you can use the dsl directly
17:12:27FromDiscord<enthus1ast> i must admit that it was a big no no for me the create an account on some website just to create guis on my machine
17:12:51*supakeen_ joined #nim
17:13:57kobi7I haven't tried figma yet, but the plugin is installed on the website. i mean, no local installation afaict
17:15:17FromDiscord<enthus1ast> thats a sign that it will be a locked garden soon
17:16:59FromDiscord<treeform> Yes the spinner library has the right idea. Bunch of functions to create controls. But really every place usually has custom buttons and controls anyways. You want to project your brand.
17:17:07kobi7i don't know, there is a free plan and an upgraded one for unlimited designs. I am not a designer so haven't yet used it, but it has a plugins section on the website, which on my account has Fidget Export
17:17:12FromDiscord<treeform> So you would have to create some thing like the spinner library
17:17:36*Gustavo6046 quit (*.net *.split)
17:17:36*supakeen quit (*.net *.split)
17:17:36*vicfred quit (*.net *.split)
17:17:36*blackbeard420 quit (*.net *.split)
17:17:36*crem quit (*.net *.split)
17:17:37*Gustavo6046_ is now known as Gustavo6046
17:18:33kobi7hmm, not so good for code reuse. perhaps flexible theming support instead? like, maybe take inspiration from css
17:18:59kobi7or some variant of it
17:19:08FromDiscord<treeform> @enthus1ast I think its terrible that in most companies designers design the UI then most of their work is thrown a way for programmers to implement (draw the UI again) it in code.
17:19:20FromDiscord<treeform> My goal is to eliminate this waste.
17:19:50FromDiscord<treeform> We used to make 3d models in code, but now we use Blender, Maya and other programs.
17:20:06FromDiscord<treeform> We used to make sound in code (chip tunes etc..) but now we use Sound editing programs.
17:20:14FromDiscord<enthus1ast> yes, i do not have the bigger picture
17:20:52FromDiscord<enthus1ast> i thought figma was a gui library itself
17:21:25FromDiscord<treeform> Because UI is now sufficiently complex ... we have left the realm of simple buttons and boxes... we need a whole profession just to position and brand the controls.
17:21:32*kinkinkijkin quit (Remote host closed the connection)
17:21:46FromDiscord<treeform> Na Figma is just an Editor that Designers really like.
17:21:52*kinkinkijkin joined #nim
17:22:05FromDiscord<treeform> Like "Adobe Photoshop" but for UI work.
17:22:07*blackbeard420 joined #nim
17:22:07*crem joined #nim
17:22:14FromDiscord<treeform> Its really taking the design world by storm.
17:22:20FromDiscord<treeform> Every one is switching to it.
17:22:40FromDiscord<treeform> I have never seen a program take over a profession (UX design) this fast.
17:23:45kobi7treeform, so in Figma, can I simply pick a theme
17:24:02kobi7d control kit and use it? is it free to use?
17:24:21FromDiscord<treeform> So Figma has like a Github for UX designers
17:24:42FromDiscord<treeform> Its called "community"
17:24:47FromDiscord<treeform> https://www.figma.com/community/explore
17:25:00FromDiscord<treeform> You can go to UI kit section:
17:25:01FromDiscord<treeform> https://www.figma.com/community/ui_kits
17:25:08FromDiscord<treeform> and there are 1000s of UI kits to choose from
17:25:14FromDiscord<treeform> you can just pick one out now
17:25:15FromDiscord<treeform> and go with it
17:25:26FromDiscord<treeform> its free to use as community requires a single license
17:25:54FromDiscord<treeform> everything in the community is: https://creativecommons.org/licenses/by/4.0/
17:25:58kobi7wow very nice
17:26:14FromDiscord<treeform> its hard of hard to switch between them
17:26:18FromDiscord<treeform> they don't use common naming theme
17:26:22FromDiscord<treeform> so its not like a theme you pick
17:26:34FromDiscord<treeform> once you pick one and use the names you are kind of stuck with it
17:26:53kobi7so after export, I only need to modify the generated code for the bindings?
17:26:58FromDiscord<treeform> Its more like picking theme from theme forest or some thing
17:27:42kobi7it does make it simpler for non-designers to do an indie gui work
17:27:56FromDiscord<enthus1ast> thank you for the insight @treeform very interesting
17:27:58FromDiscord<treeform> only if it works
17:27:59kobi7work = app
17:28:44FromDiscord<treeform> How I see it is this, say I am a programmer that knows nothing about the complex and rich field of UX. When I make UIs they look crappy.
17:28:59*supakeen_ is now known as supakeen
17:29:09FromDiscord<treeform> I go to the figma community, find a theme/app that kind of looks like what I want mine to look like.
17:29:36FromDiscord<treeform> Copy the file down, follow the license to attribute it... maybe clean it up for my needs.
17:30:06FromDiscord<treeform> Make the code for my app, but use the visuals from the UX designers so that my app looks "good".
17:30:21FromDiscord<treeform> No more programmer art and ui from me.
17:30:40kobi7sounds like an awesome deal to me
17:30:42FromDiscord<treeform> Even though I am not good at UX, I get good UX for my apps, because I just copy.
17:31:33kobi7when I need more controls though, eiher make it by hand or get from another such kit, and then have to modify all the colors etc to look similar, right?
17:31:46FromDiscord<treeform> yeah
17:32:22kobi7awesome, this changes the usual story, by a lot
17:32:23FromDiscord<treeform> If you have $ and are a company, you might even reach out to the person that made the original controls and do a deal 🙂
17:32:44FromDiscord<treeform> what kind of app thing do you want to make?
17:32:57kobi7I'd feel like I'm ripping off and want to give back to that designer
17:33:09FromDiscord<treeform> well its just like github in a way
17:33:25FromDiscord<treeform> when you use fidget are you ripping me off?
17:34:04kobi7no, but if i had $$ i'd probably donate some as either appreciation or support for dev
17:34:12FromDiscord<treeform> UX industry finally discovered the magic of open source.
17:36:27kobi7I am figuring out if I can make a side income, a work from home kind of thing, in the age of corona limitations. for now, simple frontends, an app that does one thing, and be portable to smart phone (android) and the 3 large oses (linux, mac, windows)
17:37:03FromDiscord<treeform> If you give me the type of an app you want I might find a theme that will fit.
17:38:38kobi7I think it will look like a batch converter type of app. u know, like audio convert, or image resize, audio normalize, markup to doc, all these conversions, probably useful to someone :-)
17:39:35kobi7though i haven't done android development before.
17:39:57kobi7need to see what UI changes are required, etc. but step by step...
17:40:42kobi7In any case, after these answers I feel more hopeful
17:41:09*vicfred_ quit (Quit: Leaving)
17:42:47*MightyJoe joined #nim
17:43:00*skrzyp1 joined #nim
17:43:54*mal``` joined #nim
17:44:28*cyraxjoe quit (Ping timeout: 265 seconds)
17:44:28*xet7 quit (Ping timeout: 265 seconds)
17:44:29*skrzyp quit (Ping timeout: 265 seconds)
17:44:29*mal`` quit (Ping timeout: 265 seconds)
17:45:24*xet7 joined #nim
17:45:30*asd quit (Ping timeout: 265 seconds)
17:45:45*asd joined #nim
17:48:55kobi7really nice. Thanks treeform, enthusiast. i'm off.
17:49:02*kobi7 quit (Quit: Leaving)
18:00:21FromDiscord<haxscramper> sent a code paste, see https://paste.rs/E06
18:01:48FromDiscord<haxscramper> pixie-python just imports generated bindings, without any extra setup, but this does not work for my case (or maybe I missed something)
18:01:49FromDiscord<treeform> We are fixing that like right now: hardcoded "pixie"
18:02:24FromDiscord<haxscramper> This requries more than a single fix in the file template?
18:02:45FromDiscord<haxscramper> I just fixed this, probably missed some other part that had to be edited
18:02:53FromDiscord<treeform> https://github.com/treeform/genny/pull/26/files
18:03:22FromDiscord<treeform> I just merged that PR in
18:03:56FromDiscord<treeform> are you on mac or windows?
18:04:12FromDiscord<haxscramper> linux
18:04:16FromDiscord<treeform> you need to have the dll were you .py file is
18:04:18FromDiscord<haxscramper> and no, the issue still persists
18:04:21FromDiscord<treeform> or .so in your case
18:04:34FromDiscord<treeform> `dir = os.path.dirname(sys.modules["test"].file)`
18:05:01*KainAlive joined #nim
18:05:19*jjido joined #nim
18:05:19FromDiscord<treeform> what is the actual error? It looks like your traceback is cut off
18:06:10FromDiscord<treeform> genny will generate two files .py file and the .so file for your platform.
18:06:18FromDiscord<treeform> both need to be present next to each other
18:06:30FromDiscord<haxscramper> https://github.com/treeform/genny/blob/235641dcbecface46d3d472e2dbd08dd231d72b9/src/genny/languages/python.nim#L451 um this is still hardcoded?
18:06:32FromDiscord<treeform> you might also have to add init.py when going into a folder
18:06:52FromDiscord<haxscramper> In reply to @treeform "what is the actual": this is the actuall error
18:07:10FromDiscord<haxscramper> anyway, I will look into more details about all unwritten assumptions python makes
18:07:36FromDiscord<haxscramper> I just thought it was some me-genny interaction error
18:08:32FromDiscord<treeform> Your Traceback does not appear to be complete
18:08:44FromDiscord<treeform> it needs to say what the error was on the last line
18:08:51FromDiscord<haxscramper> ah,ffs
18:09:01FromDiscord<haxscramper> anyway,
18:09:04FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Ar2
18:09:38FromDiscord<treeform> ok fixin in real time: https://github.com/treeform/genny/pull/27/files
18:09:42FromDiscord<treeform> pull and run
18:10:35*KainAlive quit (Read error: Connection reset by peer)
18:13:08FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Ar3
18:13:29FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Ar4
18:13:58FromDiscord<haxscramper> (edit) "https://play.nim-lang.org/#ix=3Ar3" => "https://play.nim-lang.org/#ix=3Ar5"
18:15:33FromDiscord<cabboose> If I try to use enums as bitfields I get VM does not support cast from tySet to tyInt32
18:17:34FromDiscord<guzba> sent a code paste, see https://play.nim-lang.org/#ix=3Ar7
18:18:50FromDiscord<guzba> you'll also need to `pip install .` each time the python changes as i am not aware of a `nimble develop` equiv for python (though there prob is one)
18:19:01FromDiscord<guzba> (edit) "you'll also need to `pip install .` each time the python changes ... as" added "in the python dir"
18:20:55FromDiscord<haxscramper> alright, seems like I'm here for quite some time until I try to figure out all of this
18:21:06FromDiscord<haxscramper> because my python experience is basically non-existent
18:21:15FromDiscord<treeform> if you have the test script in the same dir as your lib (not ideal)
18:21:16FromDiscord<treeform> it should work
18:21:28FromDiscord<haxscramper> I do have this, but it doesn't work
18:21:48FromDiscord<haxscramper> I showed my directory structure in the last question
18:22:54FromDiscord<guzba> In reply to @haxscramper "I do have this,": the python set up stuff is annoying to get right, but it is a one-time battle. I suggest matching the pixie-python repo structure as a shortcut
18:22:57FromDiscord<treeform> hmm sys.modules["genny_main"] might be breaking it
18:23:03FromDiscord<guzba> (edit) "In reply to @haxscramper "I do have this,": the python set up stuff is annoying to get right, but it is a one-time battle. I suggest matching the pixie-python repo structure as a shortcut ... " added "https://github.com/treeform/pixie-python"
18:24:10FromDiscord<guzba> you will need to move the generated python out of the nim area into the python directory structure. i do not recommend trying to intermingle
18:24:53FromDiscord<guzba> sys.modules expects a pip "genny_main" to be located somewhere, which requires the setup.py and `pip install .` on the python repo
18:25:05FromDiscord<guzba> (edit) "the" => "your"
18:28:49FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Arb
18:28:56FromDiscord<haxscramper> In the end I was planning to take a look at implementing C++ codegen anyway
18:32:11FromDiscord<treeform> at one point it worked simpler, but python packages require a more complex apporach
18:32:21FromDiscord<treeform> not our fault 🙂
18:33:13FromDiscord<Gumber> Python is the pits
18:33:39FromDiscord<Gumber> https://media.discordapp.net/attachments/371759389889003532/893203955037900800/python_environment.png
18:33:59FromDiscord<enthus1ast> thanks to this ^
18:34:03FromDiscord<enthus1ast> i found nim
18:37:57FromDiscord<haxscramper> I mean python is simple and easy to learn language
18:38:11FromDiscord<haxscramper> not their fault they have 234123123 different ways to import things
18:38:16*neurocyte0132 joined #nim
18:38:57FromDiscord<haxscramper> I've spent like 10 minutes trying to figure out why `from generated.test import ` was failing, because I thought I messed up relative imports
18:39:16FromDiscord<haxscramper> and everything I found were like some random SO answers with ten different code pieces
18:39:23FromDiscord<haxscramper> and mile-long articles
18:39:30FromDiscord<haxscramper> that can be summarized on one like
18:39:53FromDiscord<haxscramper> "hello folks, now we are going to learn how to import shit.py into your crap_pile project"
18:40:25FromDiscord<haxscramper> wall of text
18:40:30FromDiscord<enthus1ast> i cannot remember the nitty gritty of module creation in python, but back then i was not able to create a nice (importable) module of my (crap) code back then
18:40:50FromDiscord<enthus1ast> i had to rewrite large parts of the code
18:40:57FromDiscord<enthus1ast> then i found nim \:)
18:43:56*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:48:57FromDiscord<treeform> @haxscramper I am looking forward to what you do with C++
19:18:35*jjido joined #nim
19:31:40FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Aru
19:33:12FromDiscord<haxscramper> I'm trying to figure out where some generated source code comes from, and it would certainly help someone to try to contribute to improved wrapper generators for a language
19:34:17*skrzyp1 is now known as skrzyp
19:40:33FromDiscord<treeform> I don't know how helpful that will be.
19:40:53FromDiscord<treeform> We already port the doc comments, its pretty easy to figure out where the stuff came from.
19:41:28FromDiscord<haxscramper> I've spent last half an hour trying to trace back where `def get_data` exactly comes from
19:41:44FromDiscord<haxscramper> of course I'm new to the code base and all, so
19:41:53FromDiscord<treeform> genny_main_obj_get_data
19:41:55FromDiscord<haxscramper> well, I just asked, if you don't think it is useful I wont
19:42:00FromDiscord<treeform> it somes from MainObj.data
19:42:15FromDiscord<haxscramper> In reply to @treeform "genny_main_obj_get_data": no, I was talkint about `python/exportProcPy`
19:42:16FromDiscord<treeform> (edit) "somes" => "comes"
19:42:23FromDiscord<haxscramper> line 138 and previous
19:42:44FromDiscord<haxscramper> `genny/src/languages/python.exportProcPy`
19:43:00FromDiscord<treeform> but most procs come from exportProcPy ?
19:43:20FromDiscord<treeform> most procs would have `# generated from python.nim:same line`
19:43:25FromDiscord<haxscramper> i'm not really pushing for it, I just asked
19:43:39FromDiscord<haxscramper> no means no, I will just keep debugging echos to my tests
19:43:49FromDiscord<treeform> debuging echos are fine
19:44:26FromDiscord<treeform> maybe there is value to some sort of verbose output flag
19:44:35FromDiscord<treeform> but I would have to see it
19:44:46FromDiscord<treeform> I would not want to ship a file to people with those in
19:44:49FromDiscord<haxscramper> I was talking about something like this https://media.discordapp.net/attachments/371759389889003532/893221864678236180/unknown.png
19:45:10FromDiscord<treeform> that could be helpful yes
19:45:28FromDiscord<treeform> if they can be turned off for final build
19:45:44FromDiscord<treeform> a python programmer looking at this
19:45:48FromDiscord<treeform> would have no clue about nim stuff
19:46:06FromDiscord<treeform> when they just want to use the library
19:46:34FromDiscord<treeform> brb
19:48:30FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Arx
19:49:04FromDiscord<haxscramper> (edit) "https://play.nim-lang.org/#ix=3Arx" => "https://play.nim-lang.org/#ix=3ArB"
19:49:57FromDiscord<haxscramper> (edit) "https://play.nim-lang.org/#ix=3ArB" => "https://play.nim-lang.org/#ix=3ArF"
19:54:31FromDiscord<Shoto> I'm curious, has anyone implemented a JRE in Nim?
20:04:22*jfinkhaeuser quit (Ping timeout: 265 seconds)
20:04:53*skrzyp quit (Ping timeout: 264 seconds)
20:04:57*def- quit (Ping timeout: 268 seconds)
20:05:43*def- joined #nim
20:06:49*skrzyp joined #nim
20:06:59*neurocyte01326 joined #nim
20:06:59*neurocyte01326 quit (Changing host)
20:06:59*neurocyte01326 joined #nim
20:08:19*neurocyte0132 quit (Ping timeout: 252 seconds)
20:08:19*neurocyte01326 is now known as neurocyte0132
20:08:40FromDiscord<Yardanico> no
20:08:49FromDiscord<Yardanico> implementing something like that takes a lot of effort
20:09:00FromDiscord<Yardanico> In reply to @Shoto Todoroki "I'm curious, has anyone": maybe you just want to interface with Java code?
20:09:06FromDiscord<Yardanico> https://github.com/yglukhov/jnim
20:09:09nrds<R2D299> itHub: 7"Nim - Java bridge"
20:09:37*jfinkhaeuser joined #nim
20:11:27FromDiscord<Shoto> Nah was just legit curious
20:12:02FromDiscord<SivadNai> Does anyone use winim a lot? I was trying to adapt one of the examples, but despite what I understood worked from reading the API, i sat back and cried tears as an error appeared onsrceen https://play.nim-lang.org/#ix=3ArL
20:27:14Mister_Magisterhow do you initialize array filling it iwth one value?
20:28:27FromDiscord<haxscramper> You can fill it via loop if you are talkint about `array[N, T]`
20:28:44Mister_Magisterye but loop seems like overdoing it
20:28:49Mister_Magisterisn't there some fancy dandy wy?
20:28:51Mister_Magisterway*
20:29:07FromDiscord<haxscramper> `for it in mitems(arr): it = value`
20:29:07nrds<Prestige99> like init with ints all set to 5 for example?
20:29:13FromDiscord<haxscramper> not really fancy IMO
20:29:28Mister_Magisterfor example
20:29:29FromDiscord<haxscramper> There is `newSeqWith()`, but that is for `seq[T]`
20:29:55FromDiscord<haxscramper> `var arr: array[5, int]; for i in mitems(arr): i = 5; echo arr`
20:30:00FromDiscord<Elegantbeef> If you must make it more complicated `import std/strutils; var myArr: array[100, int]; myArray.applyit(it = 5)` 😀
20:30:16FromDiscord<Elegantbeef> No reason to make it more complicated
20:30:21nrds<Prestige99> sequtils
20:30:41FromDiscord<haxscramper> quick, patch strutils to have applyit
20:30:44FromDiscord<Elegantbeef> Yea i'm dumb
20:30:48Mister_Magisterbut looping is like
20:30:56Mister_Magistereven in C you can do it
20:31:02FromDiscord<Elegantbeef> like exactly what happens underneat
20:31:04Mister_Magisterbut not in nim
20:31:07FromDiscord<haxscramper> wel
20:31:14FromDiscord<Elegantbeef> you can do `array = [5, 5, 5, 5, 5]`
20:31:17FromDiscord<haxscramper> what do you mean even in C but not in nim
20:32:12nrds<Prestige99> Seems like newSeqWith is _almost_ what he'd want
20:32:14FromDiscord<Elegantbeef> To be fair since we left out the `{.noinit.}` we're doing twice the work
20:32:19nrds<Prestige99> https://nim-lang.org/docs/sequtils.html#newSeqWith.t%2Cint%2Cuntyped
20:32:22Mister_Magisterint array[1000] = {0}
20:32:25Mister_Magisterevery element will be 0
20:32:48FromDiscord<treeform> @haxscramper I think `types.add &"class {objName}(Structure):" & loc() & "\n"` but be better but up to you
20:32:50Mister_Magisteryou don't need to use loop like neanderthal
20:32:56FromDiscord<haxscramper> we don't have special magic syntax to splice array initialization
20:33:02Mister_Magistershiet
20:33:20nrds<Prestige99> it does default to 0 for ints if you were curious
20:33:25Mister_Magisteroh
20:33:25FromDiscord<Yardanico> @Mister_Magister https://nim-lang.org/docs/algorithm.html#fill%2CopenArray%5BT%5D%2CT
20:33:29nrds<Prestige99> Is the playground down?
20:33:29Mister_Magisterhmm
20:33:42nrds<Prestige99> nice Yard
20:33:43FromDiscord<haxscramper> In reply to @treeform "<@!608382355454951435> I think `types.add": they are literally all `loc("\n")`, so would be unnecessary clutter
20:33:45Mister_Magisterbut does it default to 0 with uint8
20:33:46FromDiscord<Yardanico> !eval echo "I'm not down"
20:33:54FromDiscord<Elegantbeef> I mean you can just do `proc newArrayWith[Idx;T](a: array[Idx, T], val: T): array[Idx, T] = for x in mitems(a): x = val`
20:33:55FromDiscord<Yardanico> @Mister_Magister all value types in nim are zero-initialized
20:33:58nrds<Prestige99> 🤔
20:34:04Mister_Magisterah
20:34:05Mister_Magisterthank
20:34:09FromDiscord<Yardanico> including uint8
20:34:12FromDiscord<Elegantbeef> "all value types" all memory is
20:34:13Mister_Magisteroki
20:34:32Mister_Magisterthank
20:34:46NimBotCompile failed: <no output>
20:34:50Mister_Magisterjust debugging some stuff and slowly going insane
20:34:55FromDiscord<haxscramper> In reply to @haxscramper "they are literally all": But I"m just testing things around, right now I'm mostly thinking about whether or not I should try to do `template <typename T> struct NimSeq() {}` and related iterator things
20:34:55Mister_Magister!eval echo "what"
20:35:20FromDiscord<Yandong Zhang> Hello everyone. I have a large float seq and I am wandering that how to save to a file effectively. In python's numpy, we can use the npy format.
20:35:45FromDiscord<Yardanico> @Yandong Zhang what do you mean by "effectively"? for binary serialization you can just use https://github.com/treeform/flatty
20:35:48nrds<R2D299> itHub: 7"Flatty - tools and serializer for plain flat binary files."
20:35:55NimBotCompile failed: <no output>
20:36:07FromDiscord<Elegantbeef> The simplest way non third party library way is to open a file stream write the length of the seq then iterate the seq writing each float
20:36:19FromDiscord<Yandong Zhang> I will try. Thank you
20:36:45FromDiscord<haxscramper> https://forum.nim-lang.org/t/8214#52833
20:36:46FromDiscord<Elegantbeef> Otherwise flatty, frosty, or any other file format saving is the best
20:37:38FromDiscord<Elegantbeef> So hax thanks again for mentioning the proper method of Nimscript interop, finally did get the Nimscript -\> Nim method finished and functioning
20:37:55FromDiscord<Elegantbeef> Have to do the otherway which will be "fun"
20:37:58FromDiscord<haxscramper> In reply to @haxscramper "But I"m just testing": `set[T]`, `seq[T]`, probably do something unholy with `mitems` and `items`
20:38:28FromDiscord<haxscramper> like mutable and immutable iterators over underlying data ...
20:38:38FromDiscord<haxscramper> I can pause/resume nim iterator evaluation
20:38:44FromDiscord<haxscramper> I can put then into closure iterators
20:39:04FromDiscord<haxscramper> but doing this in general case is basically reimplementing CPS transform
20:39:21FromDiscord<haxscramper> and `try: finally` blocks inside of nim iterators have to be ported somehow maybe
20:39:44FromDiscord<haxscramper> well, easiest way to get quick internal brain bleeding
20:40:45*rockcavera quit (Remote host closed the connection)
20:41:10*rockcavera joined #nim
20:41:10*rockcavera quit (Changing host)
20:41:10*rockcavera joined #nim
20:53:29FromDiscord<Yandong Zhang> I met an error while trying the frosty\: "frosty.nim(1, 11) Error\: cannot open file\: std/genasts
20:53:38*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
20:53:41FromDiscord<Yandong Zhang> Can anyone help?
20:53:55FromDiscord<haxscramper> it seems like you need to use lastest nim devel
20:54:00FromDiscord<haxscramper> for frosty
21:15:21FromDiscord<haxscramper> In reply to @haxscramper "`set[T]`, `seq[T]`, probably do": I think the only way to provide `NimSeq<T>` instead of creating billion identically-named-but-actually-different types is to reimplement some part of the nim sequence API in C++
21:20:10*beshr quit (Read error: Connection reset by peer)
21:20:21FromDiscord<Yandong Zhang> sent a long message, see http://ix.io/3As1
21:20:21FromDiscord<iffy (Matt Haggard)> I'm attempted to POST to a https://www.google.com address using and AsyncHttpClient and postContent, but I keep getting Additional info\: "Temporary failure in name resolution". I can ping [www.google.com](http://www.google.com) from the machine just fine. What are some other debugging steps I can try?
21:20:26FromDiscord<Yandong Zhang> It works, though not very efficient.
22:15:14kinkinkijkinis there a uint4 in nim? I could check but i wanna make sure here
22:15:26*oprypin quit (Quit: Bye)
22:15:35*oprypin joined #nim
22:23:53FromDiscord<Elegantbeef> there is not but you can use bit fields
22:24:21FromDiscord<Elegantbeef> Assuming you want it in an object
22:24:40kinkinkijkinmight just use uint8 then, just trying to fit colour information for an output interface that only accepts 4 bit colour
22:24:59kinkinkijkinbut has col1 and col2 for every position
22:25:03FromDiscord<Elegantbeef> You also can do `0u8..(0b1111)u8`
22:25:34FromDiscord<Elegantbeef> It'd accept values 0-15 that are u8
22:26:59kinkinkijkintbh the codesize penalty might be more than the datasize penalty of using u8 and just limiting 0-15
22:28:03kinkinkijkinim trying to make a media creation software to run on a particular device that comes with a max of 32MB ram in its largest configuration
22:28:58kinkinkijkinnot terribly hard considering it's just a tracker and people did this all the time a while back, it's just that id like to assure cleanliness like they would've back when such a size was big
23:13:07*max22- quit (Remote host closed the connection)
23:51:37*naquad quit (Ping timeout: 252 seconds)
23:59:41*Pyautogui joined #nim