<< 15-03-2023 >>

00:26:42*jmdaemon quit (Ping timeout: 250 seconds)
00:27:04NimEventerNew thread by Naterlarsen: Wish to use nim to take a screenshot of my desktop background , see https://forum.nim-lang.org/t/9999
00:28:07*jmdaemon joined #nim
00:33:32*sagax quit (Quit: Konversation terminated!)
00:35:48FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4qQo
00:36:16FromDiscord<Elegantbeef> How is arc complaining you're making a cycle?
00:36:29FromDiscord<Ayy Lmao> This shouldn't be making a cycle correct?
00:36:44FromDiscord<Ayy Lmao> It's saying `Warning: ':env.info1.createInstance = (:anonymous, :env)' creates an uncollectable ref cycle; annotate 'info1' with .cursor`
00:36:51FromDiscord<Elegantbeef> Arc doesnt track manually managed memory
00:37:13FromDiscord<Ayy Lmao> Info is a ref btw
00:37:17FromDiscord<Elegantbeef> Oh it has cycle analysis for closures it seems
00:37:33FromDiscord<Elegantbeef> If you want to remove the cycle give the proc a parameter that is `info`
00:38:18FromDiscord<Ayy Lmao> I'll see if I can do that
00:38:37FromDiscord<Elegantbeef> The cycle is created cause `info -> closure -> closureEnv -> infoField -> info ->...`
00:40:28FromDiscord<Ayy Lmao> In reply to @Elegantbeef "If you want to": That seems to fix it, thanks!
00:46:24NimEventerNew Nimble package! jsFetchMock - A simple lib to intercept Javascript fetch to capture or edit the data, see https://git.ozzuu.com/thisago/jsfetchMock
01:01:09*derpydoo joined #nim
01:20:56*Nick62 joined #nim
01:22:29*azimut joined #nim
01:22:58FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4qQA
01:23:08FromDiscord<Ayy Lmao> (edit) "https://play.nim-lang.org/#ix=4qQA" => "https://play.nim-lang.org/#ix=4qQB"
01:25:47FromDiscord<Elegantbeef> `test(cast[pointer](dog))`
01:25:54FromDiscord<Elegantbeef> References are pointer equals
01:26:03FromDiscord<Elegantbeef> You took an address to the stack value
01:26:42FromDiscord<Ayy Lmao> Ah that makes sense
01:26:47FromDiscord<Elegantbeef> I am scared that you're doing a cast and using \`pointer
01:29:00FromDiscord<Ayy Lmao> I am trying to use dynamic dispatch with a user pointer in a c library.
01:31:07FromDiscord<pattmax> Can Nim's compiler pedigree be traced back?
01:34:55FromDiscord<Elegantbeef> Meaning what exactly
01:37:28NimEventerNew thread by elcritch: Cheerp 3.0? C++ to WASM compiler, see https://forum.nim-lang.org/t/10000
01:49:40FromDiscord<pattmax> In reply to @Elegantbeef "Meaning what exactly": Nim's compiler was originally bootstrapped with this old C implementation, compiled with GCC
01:49:49FromDiscord<pattmax> so you can recreate the steps to get the current compiler
01:50:14FromDiscord<Elegantbeef> https://github.com/nim-lang/csources_v2
01:50:26FromDiscord<Elegantbeef> Nim's compiler was never written in C
01:50:41FromDiscord<Elegantbeef> It was written in Pascal transpiled to Nim then generates Cc
01:51:21FromDiscord<pattmax> got it, thank you
01:51:46FromDiscord<Elegantbeef> You can clone the repo and use `./build_all.sh` to bootstrap and everything
01:55:46*jmdaemon quit (Ping timeout: 276 seconds)
01:57:02*azimut quit (Ping timeout: 255 seconds)
01:58:08*azimut joined #nim
02:22:25*jmdaemon joined #nim
02:52:04*Nick62 quit (Quit: Client closed)
03:05:03*Nick62 joined #nim
03:05:10FromDiscord<Takemichi Hanagaki> In reply to @Elegantbeef "It was written in": I'm curious now, what is the reason of the pascal choice?
03:07:42FromDiscord<Elegantbeef> If you havent noticed the entire language is pascal
03:08:01FromDiscord<Elegantbeef> Araq liked turbo(or object?) pascal
03:24:54FromDiscord<Takemichi Hanagaki> Got it!
03:30:02FromDiscord<Rika> pretty sure it was object
04:16:36*lumo_e quit (Quit: Quit)
04:17:30FromDiscord<sOkam!> Is there a way to check if the file is compiled with -gc:none in a define?↵i know you can do `when defined(orc):`, etc... but what about lack of a gc?
04:19:06*Nick62 quit (Quit: Client closed)
04:19:33FromDiscord<Elegantbeef> https://nim-lang.org/docs/compilesettings.html#querySetting%2CSingleValueSetting
04:26:25*arkurious quit (Quit: Leaving)
04:37:54*Zevv_ is now known as Zevv
04:41:12FromDiscord<sOkam!> ty ✍️
04:54:19*Nick62 joined #nim
05:10:41*rockcavera quit (Remote host closed the connection)
05:47:15*fallback quit (Ping timeout: 260 seconds)
05:55:05*fallback joined #nim
06:12:02FromDiscord<JeysonFlores> Which is the best tooling (Editor, lsp) for developing in Nim?
06:18:17FromDiscord<amadan> vscode with the nim plugin by saem with either nimlsp or nimlangserver is what I think most poeple use
06:21:46*Nick62 quit (Quit: Client closed)
06:26:09*derpydoo quit (Quit: derpydoo)
06:27:22NimEventerNew thread by alexeypetrushin: Nim ORC example benchmark, see https://forum.nim-lang.org/t/10001
06:41:08*Nick62 joined #nim
06:55:31FromDiscord<sOkam!> can a `ptr int` reference a `array[N, int]`?
06:56:21FromDiscord<Rika> What do you mean?
06:56:32FromDiscord<sOkam!> in C, an array is just a pointer
06:56:49FromDiscord<Rika> A ptr int is a ptr int. There is no other interpretation unless you use cast
06:56:59FromDiscord<sOkam!> so was wondering if I can use it as a way to pass an array of unkown size, but known type, to a proc as input
06:57:02FromDiscord<Elegantbeef> You can do `myArray[0].addr` if you want
06:57:11FromDiscord<Elegantbeef> But it's just pointer to an element
06:57:24FromDiscord<Rika> Beef say the sacred type name
06:57:29FromDiscord<Rika> Unchecked array
06:57:42FromDiscord<Elegantbeef> Yep use `ptr UncheckedArray[int]` and be sane
06:57:44FromDiscord<sOkam!> oh didn't remember about those
06:57:49FromDiscord<Elegantbeef> Do not fall into C's untyped madness
06:57:52FromDiscord<sOkam!> tyty
06:58:01FromDiscord<sOkam!> yeah, i really want them to be typed
06:58:14FromDiscord<Elegantbeef> Then whatever you write make an alias that takes `var openarray[int]`
06:59:07FromDiscord<Elegantbeef> https://www.jasonbeetham.com/codereuse.html has a section on openArray if you care
06:59:13FromDiscord<Elegantbeef> Gotta whore shitty writing
07:18:47*PMunch joined #nim
07:22:26FromDiscord<sOkam!> feels like openArray is like `SomeNumber` for array types? or am i misunderstanding
07:22:41FromDiscord<Elegantbeef> It's not
07:22:44FromDiscord<Elegantbeef> It's not generic
07:25:41FromDiscord<sOkam!> kk
07:26:12FromDiscord<sOkam!> do streams work in gc:none, btw?
07:26:31FromDiscord<Elegantbeef> StringStreams obviously do not
07:26:38FromDiscord<sOkam!> im used to working with files as raw strings, or seq[uint8], but without the gc don't know what to do with them
07:26:58FromDiscord<Elegantbeef> Streams are also ref objects
07:27:31FromDiscord<sOkam!> how do you do io in gcnone then 🤔
07:28:17PMunchLow-level file IO I guess
07:28:27PMunchWhy are you using gc:none?
07:28:31FromDiscord<Elegantbeef> https://nim-lang.org/docs/io.html#readBytes%2CFile%2CopenArray%5B%5D%2CNatural%2CNatural↵https://nim-lang.org/docs/io.html#readBuffer%2CFile%2Cpointer%2CNatural
07:28:33FromDiscord<sOkam!> learning
07:28:44PMunchAh right
07:30:13FromDiscord<sOkam!> wait, `File` are not streams?
07:30:47FromDiscord<sOkam!> im confused
07:31:02FromDiscord<Elegantbeef> Files are not streams
07:31:05FromDiscord<Elegantbeef> That's why filestreams exist
07:31:23FromDiscord<Elegantbeef> Files are the lowest level Nim's IO gets
07:31:25FromDiscord<sOkam!> https://media.discordapp.net/attachments/371759389889003532/1085465258396745728/image.png
07:31:36FromDiscord<sOkam!> i saw "stream" there, and got giga-confused
07:31:50FromDiscord<sOkam!> kk, all good then
07:32:11FromDiscord<Elegantbeef> The only thing is you need some API to get a filehnalde
07:32:12FromDiscord<Elegantbeef> handle even
07:32:53FromDiscord<sOkam!> what do you mean by api? the one that io provides, or one that i need to write for gcnone?
07:33:09FromDiscord<Elegantbeef> `open` uses a `string`
07:33:21FromDiscord<Elegantbeef> So you have to use some other method of getting the file opened
07:33:54FromDiscord<Elegantbeef> This is why I say there is little value in learning without arc
07:34:02FromDiscord<Elegantbeef> You equally can treat `newSeq` as `malloc`
07:34:05FromDiscord<Elegantbeef> or `new` as malloc
07:34:17FromDiscord<Elegantbeef> Then you can use the pointer operating procedures
07:34:28FromDiscord<sOkam!> why would i write arc, when i can write orc
07:34:29FromDiscord<Elegantbeef> And you get the exact same learning without having to rewrite from scratch
07:34:34FromDiscord<sOkam!> i have no need for arc
07:34:41FromDiscord<sOkam!> its the same idea as orc, just lower level
07:34:54FromDiscord<Elegantbeef> It's the same level as orc
07:35:10FromDiscord<sOkam!> then more on my point 🙈
07:35:29FromDiscord<sOkam!> i know gc:none is dumb, but the point of it is not usefulness, its the learning
07:35:37FromDiscord<Elegantbeef> Sure you can also use orc and do the same as i suggested
07:36:04FromDiscord<Elegantbeef> If you read my point I did not say "Just use arc"
07:36:09FromDiscord<Elegantbeef> I said use arc with pointer procedures
07:36:20FromDiscord<Elegantbeef> Treat Nim types as allocators and use them as such
07:36:23FromDiscord<sOkam!> also, whats the fun of a challenge if you are allowed to break the rules as you see fit? there is no fun in that
07:36:34FromDiscord<Elegantbeef> Instead of using `readFile` you use `readBuffer`
07:37:01FromDiscord<Elegantbeef> Then check your program with valgrind and other tools to see if you did something wrong
07:37:19FromDiscord<sOkam!> kk
07:39:29FromDiscord<Elegantbeef> Plus if you use arc, you can learn how to properly make custom collections with hooks that function for arc + orc
07:39:38FromDiscord<Elegantbeef> It's just better for learning anyway
07:39:57FromDiscord<Elegantbeef> Afterall manual memory management is mostly just inserting `malloc` and `free` in a RAII like fashion
07:41:33FromDiscord<sOkam!> Afterall hardcore minecraft is mostly just playing minecraft normally, in a more careful fashion
07:41:37FromDiscord<sOkam!> same deal
07:41:49FromDiscord<Elegantbeef> You are missing the point
07:41:54FromDiscord<sOkam!> no i see it
07:42:07FromDiscord<sOkam!> i just want to play the gc:none game, that's all
07:42:35FromDiscord<sOkam!> its not for the usefulness, its for the fun challenging learning
07:42:56FromDiscord<sOkam!> i could probably learn more efficiently in arc, but that's missing the point of the idea
07:51:56FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4qRq
07:52:29FromDiscord<Elegantbeef> If something doesnt work it's not "non covered functionality" it's a the broken nimsuggest
07:53:22FromDiscord<sOkam!> yeah but sometimes its hard to know if typo or actual error
07:54:43*kenran joined #nim
08:06:11PMunchI have to say, I'm still shocked by how well Futhark works. Currently doing some work in Gtk with webview and I can just throw in extra imports and everything just works
08:06:49*rmt joined #nim
08:07:22PMunchBut I might have to change out the JSON parser..
08:07:35PMunchThe built in Nim one is pretty slow at compile-time
08:07:58PMunchBut that might just be compile-time slowness in general..
08:10:03PMunchHmm, I am throwing 981031 lines of JSON at it though, so that might be why it takes a while..
08:10:18FromDiscord<Elegantbeef> Well being the slowest parser doesnt help regardless 😄
08:31:06*Notxor joined #nim
08:31:36PMunchWhat other compile-time JSON parsers are there out there?
08:31:38PMunchjsony?
08:35:14FromDiscord<sOkam!> pmunch, ever tested futhark in gc:none, or only on usual gc?
08:35:32PMunchI haven't tested it, but it should work fine
08:35:45PMunchI mean it just wraps C code, and C code doesn't have GC anyways
08:44:15NimEventerNew thread by grd: A list of programs, see https://forum.nim-lang.org/t/10002
08:49:43*Notxor quit (Read error: Connection reset by peer)
08:49:45*Notxor_ joined #nim
09:18:49FromDiscord<ieltan> Hello
09:20:50FromDiscord<ieltan> I was wondering if `break`ing from a try block if a condition fails was good practice ? or does this falls into the "don't use exceptions for control flow" category ?
09:22:40PMunchBreaking from a try block?
09:22:46PMunchIs that even possible?
09:23:24PMunchAh, no that's not possible
09:24:02PMunchOr did you mean to wrap the entire try statement in block?
09:24:41FromDiscord<Elegantbeef> It is possible to break flow control from a try block
09:25:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4qRL
09:25:40FromDiscord<Elegantbeef> I think it's likely fine, but ymmv
09:26:15PMunchThat's not breaking though, that's just throwing an exception :P
09:26:33PMunchhttps://play.nim-lang.org/#ix=4qRN
09:26:35FromDiscord<ieltan> https://play.nim-lang.org/#ix=4qRM
09:26:50FromDiscord<ieltan> you cannot break from a bare try block
09:26:51FromDiscord<ieltan> my bad
09:26:58PMunchExactly
09:27:17PMunchWhat I normally do is to break from a block (named or otherwise)
09:27:41FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4qRO
09:28:02PMunchThe benefit of this over an exception is that there is no expensive stack trace gathering/object creation stuff. But of course you don't get bubbling
09:28:24FromDiscord<ieltan> In reply to @PMunch "What I normally do": I just started experimenting with this too
09:28:52PMunchNamed blocks are great because then you don't have to worry about suddenly having a for loop in your code which breaks things
09:29:03FromDiscord<ieltan> I just wrapped a bunch of early return in a `block` and replaced `return`with `break`
09:29:06FromDiscord<ieltan> this is really great
09:32:13PMunchOf course if you don't want to name every block you can do something like this: https://play.nim-lang.org/#ix=4qRP
09:32:33PMunch@ieltan, also keep in mind that blocks implicitly return their last element
09:32:52PMunchhttps://peterme.net/tips-and-tricks-with-implicit-return-in-nim.html
09:33:07PMunchSo you can have complex logic which puts a value into an immutable variable
09:45:02*azimut quit (Quit: ZNC - https://znc.in)
09:48:57*azimut joined #nim
10:02:00*Nick62 quit (Quit: Client closed)
10:22:21FromDiscord<sOkam!> is there a version of `echo` without `\n` added?
10:22:30PMunchstdout.write
10:24:35FromDiscord<sOkam!> worked, ty ✍️
10:33:47FromDiscord<djazz> It doesnt flush I think? stdout.flushFile()
10:35:19PMunchIndeed it doesn't auto-flush, but that's rarely an issue IME
10:36:39*Nick62 joined #nim
10:47:48*Nick62 quit (Quit: Client closed)
10:51:54Zevvit's an issue when you don't emit a newline
10:52:49*derpydoo joined #nim
11:03:06PMunchTrue
11:03:23PMunchI tend to use stdout.write to build up strings in the output without having to concatenate them first
11:09:42PMunchSo at some point I will output a newline
11:12:04PMunchWhat do people use in Nim to store simple program state across runs?
11:12:38PMunchA database would of course work, but I'm just curious if people are using something more specific for the task
11:20:34FromDiscord<sOkam!> how can you buildup a cstring of some sort when using gcnone?
11:21:06FromDiscord<sOkam!> i guess you preallocate a string big enough?
11:21:16FromDiscord<sOkam!> (edit) "a string" => "an array"
11:21:37FromDiscord<ieltan> In reply to @PMunch "What do people use": I would assume json since it's "simple state".
11:21:50FromDiscord<ieltan> Also thanks for the link you have sent to me
11:22:11PMunchLink?
11:22:19PMunchOh, to my website :P No problem
11:22:23FromDiscord<ieltan> In reply to @PMunch "<@256520101015060480>, also keep in": this
11:22:35PMunchYeah JSON would probably be an okay choice
11:22:41FromDiscord<ieltan> I really love this "exception-free" programming
11:22:55PMunchsOkam, yeah pretty much
11:23:00PMunch@ieltan, good to hear :)
11:23:26FromDiscord<ieltan> also you can sort of do the same thing with `while true:` in Python, very intriguing that i only hear about this technique now
11:23:34PMunchsOkam, you can of course also pass in a pointer to anything to stuff which takes a cstring
11:24:01FromDiscord<ieltan> of course in python you cannot name the while loop
11:24:04PMunchSo you could have a global array with some set capacity and just build all your messages there if you don't want to malloc/free all the time
11:24:11FromDiscord<ieltan> so it is kinda limited
11:24:20FromDiscord<sOkam!> ah good idea for bigger tasks
11:24:21PMunch@ieltan, well you can't name loops in Nim either
11:24:34PMunchBut you can always add a block :)
11:25:02FromDiscord<sOkam!> in this case im building up a file, and have known size, so should be fine with an array. just have to go back to thinking in C land, Nim has spoiled me with comfort 🙂
11:25:19PMunchsOkam, if you want to go real crazy you can build your own strutils lib of sorts which just acts on the global string buffer :P
11:25:22FromDiscord<ieltan> yes, i was saying that because to my knowledge there is no `block` in python
11:25:47PMunchsOkam, well in that case you can just write directly to the file
11:26:48PMunch@ieltan, yeah it's not a super common feature
11:26:52FromDiscord<sOkam!> isn't that gonna be super slow
11:26:55PMunchReally useful though
11:27:15PMunchsOkam, why would that be slow? If you need to write to the file anyways
11:27:25PMunchYour OS should buffer the file for you
11:27:28FromDiscord<sOkam!> yeah but with the array you write all at once
11:30:01FromDiscord<sOkam!> sent a code paste, see https://paste.rs/3OW
11:31:49PMunchAre w and h cstrings as well?
11:31:57FromDiscord<sOkam!> numbers
11:32:07FromDiscord<sOkam!> but will be chars too
11:32:17PMunchThen I believe you have to turn them into cstrings manually
11:32:28PMunchI don't think there is a cstrutils anywhere
11:32:41PMunchThis has annoyed me a bit when doing stuff with Ratel as well
11:32:50FromDiscord<Rika> In reply to @PMunch "I don't think there": 🙂
11:32:53FromDiscord<Rika> Check again
11:33:11FromDiscord<sOkam!> #sendlinks 🙂
11:33:13FromDiscord<Rika> I was pretty sure theres smth like such but much more basic
11:33:27PMunchHoly shit: https://github.com/nim-lang/Nim/blob/devel/lib/pure/cstrutils.nim
11:33:38FromDiscord<sOkam!> oh niice
11:33:39FromDiscord<Rika> 😂
11:33:40PMunchEh, okay
11:33:47PMunchThat wasn't as useful as I expected
11:33:47FromDiscord<Rika> Not a lot in it
11:33:54FromDiscord<Rika> Theres smth though, needs more
11:33:58PMunchSure
11:34:10PMunchBut for turning e.g. a number into a cstring it doesn't help much
11:34:53FromDiscord<sOkam!> oh its only basic comparisons 😔
11:37:40FromDiscord<sOkam!> i guess i can always wrap some things in <string.h>
11:40:28PMunchYeah that's pretty common
11:40:34PMunchA lot of sprintf
12:10:32FromDiscord<sOkam!> man i completely forgot how damn painful char are in C 😭
12:11:35NimEventerNew thread by exelotl: .o files going missing before linking?, see https://forum.nim-lang.org/t/10004
12:33:48*derpydoo quit (Ping timeout: 255 seconds)
12:44:39PMunchsOkam, that's why we use Nim :P
12:44:50FromDiscord<System64 ~ Flandre Scarlet> https://nim-lang.org/blog/2020/06/30/ray-tracing-in-nim.html↵Faster than C++? Is that true?
12:45:35PMunch@System64_~_Flandre_Scarlet, sure, why wouldn't it be?
12:45:44PMunchA weird thing to lie about in an article..
12:46:22FromDiscord<System64 ~ Flandre Scarlet> That's pretty impressive since I thought C/C++ were the fastests
12:47:20PMunchIndeed. The reason Nim is able to get an edge is because it outputs C code you wouldn't dream of writing by hand
12:47:52PMunchYou could of course write the same thing it C/C++, but it wouldn't be very readable
12:52:03FromDiscord<System64 ~ Flandre Scarlet> So high level language that optimize your output C/C++ Code and then you also have GCC that optimize your code again
12:52:12*derpydoo joined #nim
12:52:20FromDiscord<0ffh> In reply to @System64 "That's pretty impressive since": Classically, it's more like FORTRAN is the fastest, though with modern C (with the restricted keyword, etc) you might get there.
12:53:06FromDiscord<System64 ~ Flandre Scarlet> In reply to @0ffh "Classically, it's more like": Oh interesting↵And is FORTRAN as hard as C?
12:53:07FromDiscord<0ffh> Most C++ features tend to make it slower than C.
12:53:37FromDiscord<0ffh> In reply to @System64 "Oh interesting And is": What is hard? You mean hard to learn or?
12:54:06FromDiscord<System64 ~ Flandre Scarlet> In reply to @0ffh "What is hard? You": to learn and to master
12:54:24PMunchNim Fortran target when?
12:54:44FromDiscord<0ffh> In reply to @System64 "to learn and to": I honestly don't know. I suppose it depends.
12:57:20FromDiscord<System64 ~ Flandre Scarlet> Btw, how does ARC/ORC work? And does it have impact on performances?
12:58:25FromDiscord<Nerve> In reply to @System64 "Btw, how does ARC/ORC": https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
13:03:58*randomuser464876 joined #nim
13:04:16*Notxor_ quit (Quit: Leaving)
13:07:49FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4qT4
13:07:57PMunchDefinitely has an impact on performance, but mostly a positive one
13:08:29FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "Definitely has an impact": I thought GCs has negative impacts on performances?
13:16:35*randomuser464876 quit (Quit: Client closed)
13:17:03PMunchWell, it depends
13:17:03*randomuser464876 joined #nim
13:17:16PMunchI really meant compared to the refc GC
13:17:21PMunchThe original one
13:18:21PMunchARC does automatic reference counting (kinda in the name), which means that things will get freed as they drop out of the scope. This won't really add any more overhead on runtime than what manual reference counting does
13:18:44FromDiscord<auxym> I mean, you can absolutely write poorly performing code with manual MM, too. Allocating all the time in a hot loop, for example. Memory leaks aren't great for performance, either.
13:19:18PMunchWith ORC it has to scan for cycles, which is a hit to performance, but it shouldn't be that much
13:20:04FromDiscord<auxym> In reply to @System64 "Oh this is interesting": Nim doesn't support cyclical imports, yet. It's on the roadmap for 2.2 or something like that IIRC
13:21:55FromDiscord<auxym> https://github.com/nim-lang/RFCs/issues/503
13:22:25FromDiscord<jmgomez> What a paint it was to get rid of cycles on NimForUE
13:22:47FromDiscord<jmgomez> (edit) "paint" => "pain"
13:30:23PMunchDamn, my Futhark'd Gtk wrapper is over 200k lines.. Glad I didn't have to write that by hand
13:37:40FromDiscord<ShalokShalom> Hnn, both open() and readFile() complain about an "unhandled exception"
13:37:47FromDiscord<jmgomez> In reply to @PMunch "Damn, my Futhark'd Gtk": How long does it takes you to compile it?
13:38:10FromDiscord<ShalokShalom> sent a code paste, see https://play.nim-lang.org/#ix=4qTc
13:38:25FromDiscord<ShalokShalom> https://nim-by-example.github.io/files/
13:38:36PMunchWithout the cache it takes a little while :P
13:38:51FromDiscord<jmgomez> I mean the Nim part
13:39:01PMunchHold on, let me time it
13:39:24PMunchWhat do you mean? When Futhark has already run the compilation takes seconds, if that
13:39:48FromDiscord<jmgomez> yeah, like if you do it with `--compileOnly`
13:40:12FromDiscord<jmgomez> I had to really split and hack around the NUE bindings to get decent Nim comp times
13:40:34FromDiscord<jmgomez> It is true that its probably 1M+ LoC
13:41:02PMunchHow did you wrap that?
13:41:34FromDiscord<jmgomez> the bindings? With UE's reflection APIs
13:41:40PMunchAah right
13:41:51FromDiscord<Nerve> In reply to @System64 "I thought GCs has": This entirely depends on how many allocations and deallocations your code is doing. For example, if a Java program were to create a number of objects using `new` and those objects and their references never went out of scope, the GC would never run. A GC only runs under two conditions: 1) It is set to periodically run, for example each frame in a game, 2) you attempt to allocate something new and
13:41:57PMunchWait, do you run reflection on every compilation?
13:42:13FromDiscord<Nerve> Nim heavily prefers allocating to the stack, not the heap, so it's very easy to keep allocation, and thus GC activity, very low
13:42:44FromDiscord<jmgomez> Nope, I have a process that introspect the whole engine (including the user code looking for changes) and it something changes or runs another process where a Nim macro outputs Nim code that the user can consume to interop with UE
13:43:02FromDiscord<jmgomez> (edit) "it" => "if"
13:43:43FromDiscord<jmgomez> The whole thing, taking into account basic plugins and the fix of cycles, takes a few minutes to run on the first run
13:44:04PMunchOh right, because this is within the UE editor?
13:44:26FromDiscord<jmgomez> In reply to @ShalokShalom "Hnn, both open() and": runtime? what's the stacktrace
13:44:53FromDiscord<ShalokShalom> idk
13:44:56FromDiscord<ShalokShalom> how to check this?
13:45:08FromDiscord<ShalokShalom> I just hit F6 in VSCode 😛
13:45:17FromDiscord<ShalokShalom> So nim c -r
13:45:35*rockcavera joined #nim
13:45:40PMunchOkay, without cache (and it has to rebuild the binding) this program takes 93s to compile. With cache it's 5.5s
13:46:03FromDiscord<jmgomez> In reply to @PMunch "Oh right, because this": Kind off, I managed to run it without the editor but yes, you need to start up the engine so it collects the metadata. They have a really hacky way of doing reflection
13:46:20PMunchI see
13:46:23FromDiscord<jmgomez> In reply to @PMunch "Okay, without cache (and": 5.5 should be the Nim part without minor changes?
13:46:55FromDiscord<jmgomez> if you change a file, like a leaf, what's the timing?
13:47:07FromDiscord<jmgomez> In reply to @ShalokShalom "So nim c -r": shouldnt that produce something on the console?
13:47:07PMunchA leaf?
13:47:15FromDiscord<jmgomez> yeah, like the entry point
13:47:37PMunchHuh?
13:47:54FromDiscord<ShalokShalom> In reply to @jmgomez "shouldnt that produce something": Yes?
13:47:55PMunchI just tried changing something in my main program it took 2.36s :P
13:48:12FromDiscord<jmgomez> ahh that's good then!
13:48:15FromDiscord<jmgomez> nice
13:48:20FromDiscord<ShalokShalom> In reply to @ShalokShalom "Hnn, both open() and": .
13:48:24PMunchYeah, it's pretty nice :)
13:48:39FromDiscord<ShalokShalom> Error: unhandled exception: cannot open: config.toml [IOError]↵Error: execution of an external program failed: '/home/matthias/Documents/crown/backend '
13:48:49FromDiscord<jmgomez> In reply to @ShalokShalom "Error: unhandled exception: cannot": yes, that
13:49:05FromDiscord<ShalokShalom> Idk why its complaining about an unhandled exception. How is an exception involved in this?
13:49:10FromDiscord<jmgomez> but the full thing if any. Can you open another file?
13:49:24FromDiscord<jmgomez> well, if there is an issue with the OS it should raise, shouldnt it?
13:49:41FromDiscord<ShalokShalom> there is nothing else
13:50:05FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4qTh
13:50:25FromDiscord<ShalokShalom> https://paste.ee/p/PRmQK
13:51:22FromDiscord<jmgomez> it says that it cant open it. It may be the file missing or the path wrong or permissions? Not sure
13:51:38FromDiscord<ShalokShalom> Same thing with another file
13:51:47FromDiscord<jmgomez> try to use a full path
13:51:49FromDiscord<ShalokShalom> The files are in the same directory
13:52:03FromDiscord<ShalokShalom> Well, the error message isnt really saying anything in that regards
13:52:14FromDiscord<ShalokShalom> Why unhandled exception?
13:52:17FromDiscord<ShalokShalom> I will try
13:52:17FromDiscord<jmgomez> `/home/matthias/.choosenim/toolchains/nim-1.6.12/lib/system/io.nim(760) open`
13:52:27FromDiscord<jmgomez> `Error: unhandled exception: cannot open: config.toml [IOError]`
13:52:27FromDiscord<Gabben> sent a code paste, see https://play.nim-lang.org/#ix=4qTi
13:53:30FromDiscord<ShalokShalom> Yeah, seems to work with full path
13:53:41FromDiscord<ShalokShalom> Why not within the same directory, and the file name alone?
13:53:47FromDiscord<ShalokShalom> And why this error message?
13:54:33FromDiscord<ShalokShalom> Is this something that I considering worth reporting, or just the type of errors that are considered sufficient?
13:54:33FromDiscord<jmgomez> do `echo getCurrentDir()` (with OS imported)
13:54:38FromDiscord<ShalokShalom> thanks
13:55:21FromDiscord<ShalokShalom> /home/matthias
13:55:31FromDiscord<ShalokShalom> It seems to think its somewhere else
13:55:37FromDiscord<jmgomez> Not sure, I mean it's kind of clear if you are use to it. But it can be improved for sure, feel free to report an issue if you feel like it should be better
13:55:56FromDiscord<ShalokShalom> thanks a lot
13:56:15FromDiscord<ShalokShalom> https://nim-by-example.github.io/files/
13:56:36FromDiscord<ShalokShalom> this article mentions "Suppose we have a file in the same directory as our nim program..."
13:56:51FromDiscord<ShalokShalom> So is the article incorrect, or..?
13:57:25FromDiscord<ShalokShalom> > Hint: /home/matthias/Documents/crown/backend [Exec]↵> /home/matthias
13:57:35FromDiscord<ShalokShalom> (second line is that getCurrentDir())
13:59:29FromDiscord<jmgomez> 🤷‍♂️
13:59:53FromDiscord<gogolxdong> `/home/ubuntu/flarenfts-backend/main.nim(3, 8) Error: cannot open file: web3`
14:00:11*jmdaemon quit (Ping timeout: 264 seconds)
14:00:28FromDiscord<gogolxdong> with latest devel and nimble
14:00:39FromDiscord<gogolxdong> (edit) "with latest devel ... and" added "Nim"
14:01:31FromDiscord<gogolxdong> (edit) "with latest devel Nim and nimble ... " added "and packages installed under NIMBLE_DIR/pkgs2"
14:04:52FromDiscord<System64 ~ Flandre Scarlet> In reply to @auxym "Nim doesn't support cyclical": Oh alright, it would be nice to have it!
14:05:45*kenran quit (Remote host closed the connection)
14:07:45FromDiscord<ShalokShalom> where do Nim programs usually put their configuration files?
14:07:54FromDiscord<ShalokShalom> is there some universal "for all OS" thing?
14:09:00PMunchhttps://nim-lang.org/docs/os.html#getConfigDir
14:09:05PMunchThat's a good place to start
14:10:26FromDiscord<ShalokShalom> thanks a lot
14:12:19*Notxor joined #nim
14:15:27FromDiscord<gogolxdong> https://media.discordapp.net/attachments/371759389889003532/1085566935133077544/image.png
14:15:55FromDiscord<gogolxdong> Any idea to make it right?
14:16:49FromDiscord<Phil> `import pkg/[... packages...]`
14:16:57FromDiscord<Phil> with ...packages... being what you're listing there
14:17:24FromDiscord<Phil> I generally recommend:↵- When importing from std-lib, import with `import std/[...package...]`
14:17:48FromDiscord<gogolxdong> yes, I've tried and got `/home/ubuntu/flarenfts-backend/main.nim(2, 11) Error: cannot open file: pkg/web3`
14:17:52FromDiscord<Phil> (edit) "std/[...package...]`" => "std/[...package...]`↵- When importing locally, import with `import ./<package_name>`↵- when importing another lib, import with `import pkg/[...packges..]`"
14:18:06FromDiscord<Phil> I assume you have done `nimble install web3`?
14:18:12FromDiscord<gogolxdong> sure
14:18:34FromDiscord<djazz> Added web3 to nimble file?
14:19:00FromDiscord<gogolxdong> https://media.discordapp.net/attachments/371759389889003532/1085567830239498314/image.png
14:19:31FromDiscord<gogolxdong> https://media.discordapp.net/attachments/371759389889003532/1085567960334213120/image.png
14:20:06FromDiscord<djazz> Making a library?
14:20:23FromDiscord<Phil> Okay, weird, hmmmmm
14:20:33FromDiscord<Phil> Nah, it's a general problem, in a minimal example for me on devel it doesn't work either
14:21:12FromDiscord<Phil> Actually, that's just for web3
14:21:50FromDiscord<Phil> I can compile `import pkg/prologue` on devel
14:21:51FromDiscord<Phil> weird
14:22:41FromDiscord<gogolxdong> It's for whatever move to the first place
14:22:48FromDiscord<gogolxdong> (edit) "move" => "moved"
14:22:56FromDiscord<Phil> One sec, I'm installing the libs you specified here
14:22:59FromDiscord<Phil> and the web3 takes ages
14:23:13FromDiscord<gogolxdong> `/home/ubuntu/flarenfts-backend/main.nim(2, 11) Error: cannot open file: pkg/prologue`
14:23:14FromDiscord<Phil> quite literally, it's been a hot minute now
14:24:47FromDiscord<Phil> What's your devel version?
14:25:17FromDiscord<gogolxdong> sent a code paste, see https://play.nim-lang.org/#ix=4qTy
14:26:18FromDiscord<Phil> Just updated, you might be running into entirely different issues as well:↵> .....................................................................................................................................................................................................................................fatal.nim(51) sysFatal↵> Error: unhandled exception: field 'sym' is not accessible for type 'TNode' using 'kind = 65' [Field
14:27:26FromDiscord<Phil> with web3 I start running into ↵> /home/philipp/.nimble/pkgs/httputils-0.3.0/httputils.nim(607, 14) Error: undeclared identifier: 'shallowCopy'↵Which is fascinating because I'm on devel on the same version as you
14:28:25FromDiscord<Phil> Chronos has the same issue of shallowCopy not being defined, does that require some kind of flag?
14:28:57FromDiscord<gogolxdong> shallow should be removed due to ORC
14:29:29FromDiscord<gogolxdong> what's your nimble version, I noticed your packages installed under pkgs/
14:29:43FromDiscord<gogolxdong> mine are installed under pkgs2/
14:30:15FromDiscord<gogolxdong> sent a code paste, see https://play.nim-lang.org/#ix=4qTC
14:30:18FromDiscord<Phil> nimble automatically swaps when you use choosenim devel
14:30:33FromDiscord<Phil> So I agree that it's weird it's looking up under pkg and not pkgs2
14:30:36FromDiscord<Phil> (edit) "pkg" => "pkgs"
14:31:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4qTE
14:31:52FromDiscord<Phil> > nimble v0.14.0 compiled at 2023-03-14 01:05:49↵> git hash: couldn't determine git hash
14:32:23FromDiscord<gogolxdong> Ok, got the same error, I have a fork of web3 fixed shallow things.
14:34:18FromDiscord<gogolxdong> (edit) "Ok, ... goterror" added "after cp whatever under pkgs2/ to pkgs/ , I" | "error," => "error with yours,"
14:55:09FromDiscord<gogolxdong> Thanks for your help! I'm try to manage the rest.
15:02:45FromDiscord<Phil> Sorry I couldn't do more and good luck!
15:07:23*jmdaemon joined #nim
15:17:21*randomuser464876 quit (Quit: Client closed)
15:26:40*Notxor quit (Remote host closed the connection)
16:06:00*zgasma joined #nim
16:09:55FromDiscord<Nerve> Is there absolutely no way to get compile-time constant `JsonNode`s?
16:10:31FromDiscord<Nerve> I have some dynamic configurations for which I have presets, and having to instantiate them with `let` is slowing down my program's startup time
16:24:12FromDiscord<planetis> you can use std/marshal at compile time
16:26:15*arkurious joined #nim
16:27:35*PMunch quit (Quit: leaving)
16:34:32FromDiscord<Nerve> The point is that at runtime I am using the `JsonNode`s for configuration, and to have pre-made configurations I have to declare those with `let`. Unless you're saying it's possible to marshal JSON strings into const `JsonNode`s at compile time? So `%` is the thing that can't run at compile-time?
16:34:48FromDiscord<Nerve> (edit) "const `JsonNode`s" => "`const JsonNode`s"
16:34:49*Notxor joined #nim
16:44:23FromDiscord<Phil> In reply to @Nerve "Is there absolutely no": Best I can do you is read in at compile time and convert to JsonNode at runtime
16:44:52FromDiscord<Phil> Second best I can do you is: use jsony and stick with a static json setup
16:45:24FromDiscord<Nerve> It looks like `parse_json` can be called at compile time, seeing if it will work but I think I have some curly brace issues
16:47:19FromDiscord<Nerve> Okay nevermind, `JsonNode` is not a valid compile-time type
16:47:32FromDiscord<Nerve> `Error: invalid type: 'JsonNode' in this context: 'Table[system.string, json.JsonNode]' for const`
16:48:04FromDiscord<Nerve> I could store them as const strings and only parse them at runtime when I actually use them
16:48:15FromDiscord<Nerve> (edit) "const strings" => "`const string`s"
16:49:00FromDiscord<Nerve> Like you said above
16:49:31*jmdaemon quit (Ping timeout: 276 seconds)
16:50:09*jmdaemon joined #nim
16:50:32FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4qUD
16:51:07FromDiscord<Phil> If you can live with your json file being explicitly typed like the `Config` type here, then I highly recommend just using the jsony approach
16:51:48FromDiscord<Phil> I'd argue that it's more sensible to have your config file static like this either way, because then you don't need to wonder if config of name "x" actually exists, the compiler checks that for you
16:53:44FromDiscord<Phil> And that is just the minor benefits on top of the jsony way doing exactly what you originally wanted to do 😛
17:02:12FromDiscord<Nerve> It's not a config file
17:02:19FromDiscord<Nerve> I'm not reading anything from file
17:02:36FromDiscord<Nerve> I have `JsonNode` literals using `%`
17:02:44FromDiscord<Nerve> Should have clarified that in the beginning, sorry
17:03:00FromDiscord<Nerve> This is not user-configurable stuff, they're pre-made so they're hard-coded
17:03:52FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4qUG
17:04:19FromDiscord<Nerve> In reply to @jmgomez "<@143177514385145856> you sure you": I don't know, what does this do?
17:04:38FromDiscord<jmgomez> it should give you your JsonNode at comp time
17:04:41FromDiscord<Nerve> Relative to const
17:04:47FromDiscord<Nerve> (edit) "const" => "`const`"
17:05:10FromDiscord<jmgomez> I think a ref object cant be const
17:05:28FromDiscord<jmgomez> which makes sense
17:14:59FromDiscord<Ntsékees> I've successfully compiled regexps at compile time in my last Nim project
17:15:00NimEventerNew thread by noah: Testament + valgrind: importing asyncdispatch or threadpool causes valgrind to throw?, see https://forum.nim-lang.org/t/10005
17:15:44FromDiscord<Ntsékees> so I don't see a reason you couldn't parse a JSON string at compile time
17:18:36FromDiscord<jmgomez> In reply to @jmgomez "": I mean..
17:35:49FromDiscord<Hourglass [She/Her]> Question: Would it be better to do `Nim -> Java source code -> JVM bytecode`? Or directly to JVM bytecode?
17:52:31FromDiscord<turbo> I have an old bit of Nim code that invokes `.shallow` on a string. That doesn't seem to exist anymore. What did it do?
17:54:11FromDiscord<Phil> In reply to @Hourglass, When the Hour Strikes "Question: Would it be": For your users, going directly to JVM bytecode would be preferred under the assumption that Nim --> JVM bytecode is faster than Nim --> Java --> JVM Bytecode↵Compilation times can be a factor for folks.↵However, going directly to Bytecode may be harder than going to Java, so going first the easier route so that it at least exists could be saner.
17:54:38FromDiscord<Phil> (edit) "In reply to @Hourglass, When the Hour Strikes "Question: Would it be": For your users, going directly to JVM bytecode would be preferred under the assumption that Nim --> JVM bytecode is faster than Nim --> Java --> JVM Bytecode↵Compilation times can be" => "sent" | "factor for folks.↵However, going directly to Bytecode may be harder than going to Java, so going first the easier route so that it at least exists could be sane
17:54:57FromDiscord<turbo> Actually it seems to exist and not exist at the same time: https://media.discordapp.net/attachments/371759389889003532/1085622176444584091/image.png
17:55:58FromDiscord<Phil> I ran into an issue like that for the first time this noon, so I don't know much more about that yet.↵@gogolxdong might if he figured something out yet as he ran into the same problem 3 hours ago
17:56:48FromDiscord<turbo> Ah I see we came to the same conclusion, it went out the window with ORC
17:57:44FromDiscord<turbo> > .shallow predates move semantics and is a deadend. We should simply remove it.↵- Araq
17:57:50FromDiscord<turbo> I guess that settles it 😄
18:02:24*jmdaemon quit (Ping timeout: 252 seconds)
18:06:31*rockcavera quit (Remote host closed the connection)
18:14:26*azimut quit (Ping timeout: 255 seconds)
18:17:27*azimut joined #nim
18:31:14*Notxor quit (Remote host closed the connection)
18:37:31*LyndsySimon quit (Quit: Connection closed for inactivity)
18:37:51*rmt quit (Ping timeout: 255 seconds)
18:42:04FromDiscord<I have 50GB of nothing on my PC> std/terminal getch() can't detect arrow keys, can it?
18:51:11*cnx quit (Ping timeout: 264 seconds)
18:53:24*cnx joined #nim
19:01:50FromDiscord<Livid> I'm writing tests that testament can run, and I'm writing them for a project that has a .nimble file and a config file for nim (project was made using the playdate-nim template projects). However, when there are things in that config file, the tests can't compile or their executables go elsewhere and I don't know where. How could I get testament to work?
19:06:12FromDiscord<Livid> Oops! I got it.
19:06:46FromDiscord<Livid> I spent a while on this and didn't find a minor problem. For those wondering, the template provided a config.nim file for the tests, but I needed to change a path in the file.
19:06:48FromDiscord<Nerve> Is there any way to use a timezone string to get a timezone type back using only procedures in `std/times`? I have a UTC timestamp and a UTC offset and want to format that into a local time string.
19:14:13*rockcavera joined #nim
19:14:38FromDiscord<Phil> In reply to @Livid "I spent a while": If you spent a while on this and this turns out to be a not that specific issue, you could jot it down in a self-answered SO question for easier searchability with search-engines like google 😉
19:15:05FromDiscord<Elegantbeef> @Nerve\: `parseTime` takes a string a format and a timezone
19:15:57FromDiscord<Nerve> Yes, but the timezone of the timestamp is UTC. I need to offset it after I've parsed it as UTC.
19:18:08FromDiscord<Elegantbeef> Add the timezone to the string, parse it as utc then use `local(parsedTime)`?
19:21:19*Notxor joined #nim
19:23:19FromDiscord<Hourglass [She/Her]> In reply to @Isofruit "For your users, going": That makes sense yeah
19:26:06FromDiscord<Phil> In reply to @Hourglass, When the Hour Strikes "That makes sense yeah": Always keep in mind:↵The best product in many cases is the one that exists
19:26:20FromDiscord<Phil> Having something that works imperfectly is better than having nothing
19:27:00FromDiscord<Phil> That among many other things is why keeping in mind how easy it is to write software is fairly important
19:27:31FromDiscord<Phil> (edit) "important" => "important.↵In economic terms, how much does it cost you (in this case in terms of time) to develop X.↵If going the route of compiling to java is significantly faster to develop, do that."
19:27:47*azimut quit (Ping timeout: 255 seconds)
19:31:19FromDiscord<Gumbercules> I'd probably just compile Nim to C and use JNI
19:31:54FromDiscord<Gumbercules> But I'm not sure what the requirements / project is about.
19:32:02FromDiscord<Gumbercules> (edit) "But I'm not sure what the requirements ... /" added "are"
19:35:25FromDiscord<Phil> If that's easier/less work, that'd be even more preferrable
19:50:43FromDiscord<Nerve> In reply to @Elegantbeef "Add the timezone to": Okay, I need to try this
19:57:23*jmdaemon joined #nim
20:03:27FromDiscord<Nerve> In reply to @Elegantbeef "Add the timezone to": Does not work. Also I'm not trying to convert to the program's local time, I'm trying to convert to the timestamp that I have on-hand which accompanies the UTC timestamp (separated piece of data, they're not in the same string)
20:03:49FromDiscord<Nerve> (edit) "work." => "work, prints as if UTC time but also prints the timestamp, which is...confusing."
20:04:10FromDiscord<Nerve> (edit) "(separated" => "(separate"
20:05:22FromDiscord<Elegantbeef> Well you then need to make a timezone object and use `parse` with that
20:06:14FromDiscord<Nerve> Yes, how do I do that
20:07:07FromDiscord<Nerve> Without `timezones`, only with `std/times`
20:09:07FromDiscord<Elegantbeef> No clue really, my guess would be `newTimeZone`
20:09:08*Notxor quit (Remote host closed the connection)
20:09:57FromDiscord<Elegantbeef> That plus `zonedTimeFromTime` perhaps
20:10:00*Guest6 joined #nim
20:10:03FromDiscord<Elegantbeef> Just read the docs and take a stab at it 😄
20:11:20*rockcavera quit (Read error: Connection reset by peer)
20:12:39*rockcavera joined #nim
20:12:39*rockcavera quit (Changing host)
20:12:39*rockcavera joined #nim
20:23:04*Notxor joined #nim
20:28:59*arkanoid quit (Ping timeout: 248 seconds)
20:37:41*arkanoid joined #nim
20:44:54NimEventerNew thread by PMunch: Moderator updates, see https://forum.nim-lang.org/t/10006
20:54:39*arkanoid quit (Ping timeout: 268 seconds)
20:56:48*arkanoid joined #nim
20:57:25*Notxor quit (Remote host closed the connection)
20:57:43*Notxor joined #nim
21:54:11*adium quit (Ping timeout: 264 seconds)
21:55:07*adium joined #nim
22:00:17*ltriant quit (Ping timeout: 246 seconds)
22:14:25*ltriant joined #nim
22:22:37termerI seem to recall there was a compile time thing I could use to check if something compiles
22:22:48termerdoes anyone know what that was, or whether I'm remembering something that doesn't exist?
22:23:23FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4qVA
22:23:59FromDiscord<Phil> I have been told that "compiles" is a mean but incredibly useful hack for the record
22:26:20termeraha
22:26:21termerthanks
22:26:51termerI wanted to use it to check for a proc that works on a specific data type, but whose existence is optional
22:47:15*dv^_^ joined #nim
22:55:15*dv^_^ quit (Quit: dv^_^)
23:05:00*Notxor quit (Quit: Leaving)
23:22:11*Guest6 quit (Quit: Client closed)
23:28:04FromDiscord<Patitotective> is there some way i could program nim in the cloud like collab or jupyter?
23:31:48anddamElegantbeef: ping
23:32:51FromDiscord<Elegantbeef> Pong
23:33:51anddamn0ice
23:34:21anddamElegantbeef: apropos the nim/imgui thingy from the other day, I have been tweaking around with the example, all fine and dandy, and I used the cpp backend
23:34:28anddamin order to not needing the cimgui.dll
23:35:05anddamnow I wonder how can I get the .exe and send it to a friend, I expected to navigate my nice ~/.nimble/pkgs directory, find some imgui.dll someplace and put it near the executables
23:35:11anddamx/les/ c/le/
23:35:18anddamI find no such thing
23:35:31FromDiscord<Elegantbeef> If you use C++ you do not need a .dll
23:35:36anddamI don't
23:35:40anddamand other people?
23:35:41FromDiscord<Elegantbeef> The `.exe` Nim builds is all you need
23:35:54anddamthat's swell
23:36:10FromDiscord<Elegantbeef> The C++ backend compiles the C++ code into the Nim binary, it's no different to using dear-imgui directly in C++
23:36:30anddamok, I assumed that using dear-imgui one had to ship the library as well
23:36:38anddamusing in C++
23:37:00anddamI mean seems to good, so probably it is not true
23:37:12anddamx/to / c/too/
23:37:17*dv^_^ joined #nim
23:37:33FromDiscord<Elegantbeef> Nope
23:37:38FromDiscord<Elegantbeef> You only need the library for cimgui
23:37:52FromDiscord<Elegantbeef> Cause it is a dynamically library, dear-imgui is a source library
23:38:01FromDiscord<Elegantbeef> Which means it's no different to `import std/strutils` in Nim
23:38:05anddamoh a 2.5MB .exe
23:38:10FromDiscord<Elegantbeef> You do not need a `libnimstrutils.dll`
23:39:07FromDiscord<Elegantbeef> Exactly it's going to be a big boy, especially if you statically link glfw or whatever you use for context management
23:40:53anddamthis is beautiful
23:40:59anddamnow I only need to learn me some nim
23:41:06anddamthanks
23:41:22FromDiscord<Elegantbeef> I didnt do anything 😛
23:41:56FromDiscord<Patitotective> In reply to @Patitotective "is there some way": repl seems to do the deed
23:42:19anddamwops, I just added a random unicode char to a text label and the compiler choked
23:42:53anddam→ for the record, igText() did *not* like it
23:43:02anddamPatitotective: there's a nim repl?
23:45:53FromDiscord<Elegantbeef> There is inim, but it still recompiles the source file so it's not that fast
23:45:57FromDiscord<Elegantbeef> Though you can use tcc with it