<< 05-01-2024 >>

00:00:33FromDiscord<Phil> (edit) "Because turns out that no, no peek proc ... " added "or equivalent"
00:02:23FromDiscord<Phil> It is kinda satisfying to just bonk down those asan stacktraces
00:02:43FromDiscord<Phil> And get what I previously thought impossible - a clean billl of health from asan
00:03:07FromDiscord<leorize> time for tsan!
00:03:30FromDiscord<Phil> Honestly that abbreviation reminds me of a name from the dragonrider of pern books
00:03:59FromDiscord<Phil> However, the time for tsan is tomorrow
00:04:08FromDiscord<Phil> For today asan has been defeated and its 1am
00:04:27FromDiscord<Elegantbeef> let me make a program that uses the md5 of a program to randomly point at N lines and say something is wrong
00:04:27FromDiscord<Elegantbeef> Phil would have so much fun
00:04:52FromDiscord<Phil> That might just be enough to make me want to find out where you live and book a ticket
00:05:04FromDiscord<Phil> New year, new vacation days
00:05:18FromDiscord<Phil> (edit) "New year, new ... vacation" added "budget of"
00:05:33FromDiscord<Elegantbeef> Leo how does nimskull handle thread globals, does it emit a `proc() = =destroy(theGlobal)`?
00:05:34FromDiscord<leorize> that's the plan
00:05:36FromDiscord<Elegantbeef> Just book a flight to "near bumfuck nowhere Canada"
00:05:50FromDiscord<leorize> we already have them emitted for globals
00:06:08FromDiscord<leorize> so should just be a simple filter to catch threadvar and group it to its own thing
00:06:22FromDiscord<Phil (he/him)> ~~Beef, that's all of Canada, that doesn't narrow it down~~
00:06:29FromDiscord<Elegantbeef> Nah there are places with people
00:06:37FromDiscord<Phil (he/him)> All 5 of them
00:07:03FromDiscord<Elegantbeef> I mean there are nearly 40 million people
00:07:06FromDiscord<Elegantbeef> That's like half a germany
00:07:18FromDiscord<Phil (he/him)> For what.... 3 times the size?
00:07:31FromDiscord<Elegantbeef> You think germany is that big?
00:07:47FromDiscord<Elegantbeef> My province is the pretty much the same area as france and has 4 million in it
00:08:03FromDiscord<Phil (he/him)> Holy shit that's a lot of difference
00:08:31FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1192620609818079352/image.png?ex=65a9bd7f&is=6597487f&hm=089feb11e03767cf5ea08414814b6f90928b83172c780d61869a72d7f90b3f35&
00:08:37FromDiscord<Elegantbeef> Only a small margin of error you have there
00:08:38FromDiscord<Phil (he/him)> I tend to underestimate northern nations because I over-estimate the effect that flattening the world map has on enlargening northern countries
00:09:01FromDiscord<Elegantbeef> Mercator is a hell of a projection
00:09:09FromDiscord<ezquerra> https://brilliantmaps.com/half-canada/
00:09:36FromDiscord<Elegantbeef> Of course most Canadians live 300km from the border
00:09:48FromDiscord<Elegantbeef> Who wants to live where it regularly gets -40 in the winter 😛
00:09:51FromDiscord<Phil (he/him)> And then there's willy, deep in the woods
00:10:54FromDiscord<leorize> just go underground, you can't get cold if the cold can't touch you
00:11:09FromDiscord<Elegantbeef> Let me introduce you to cold cellars
00:12:02FromDiscord<Phil (he/him)> ... wasn't the idea of holes in the ground in a room to let the cold air sink into it to have warmer air remaining in the upper areas where the people are?
00:12:36FromDiscord<leorize> that sounds like fiction to me
00:12:39FromDiscord<Elegantbeef> Cellars were meant for storing food in a cold environment
00:12:47FromDiscord<Elegantbeef> Circulation would make your theory pointless
00:13:04FromDiscord<Elegantbeef> For any amount of cold air that falls hot air would rise
00:13:08FromDiscord<leorize> and like, once the volume increases, more air would come in
00:13:12FromDiscord<Elegantbeef> Circulating the room
00:13:51FromDiscord<Elegantbeef> If you have sufficient cooling in the floor you might be able to make a free 'fan'
00:14:07FromDiscord<Elegantbeef> But something tells me the scale you'd need is crazy
00:14:09FromDiscord<leorize> that reminds me of that passively cooled mini pc thing
00:14:37FromDiscord<Elegantbeef> I can only think of those solid state 'fans' at the moment
00:14:54FromDiscord<Elegantbeef> No clue if you're just talking about a minipc with a massive heatsink
00:15:14FromDiscord<leorize> https://fit-iot.com/web/products/airtop3/
00:15:37FromDiscord<leorize> looks like they took down the consumer pages
00:15:50FromDiscord<Phil> It's actually how igloos work. Wow I carried that knowledge with me for like 15years to finally have it be useful
00:15:58FromDiscord<Phil> Or in part how they work rather
00:15:59FromDiscord<Phil> https://wardsworld.wardsci.com/home/igloos-the-chillest-form-of-engineering-plus-activity
00:16:27FromDiscord<leorize> but their marketing used to have this examples of a pinwheel spinning from the rising air
00:58:17*edr quit (Quit: Leaving)
01:05:25*jmdaemon joined #nim
01:47:12*nazgulsenpai quit (Ping timeout: 252 seconds)
01:57:46*nazgulsenpai joined #nim
02:25:23FromDiscord<4zv4l> why is https://nim-lang.org/docs/syncio.html#readLines.t%2Cstring↵deprecated ? its really useful to slurp a file easily
02:32:02FromDiscord<4zv4l> also is it possible to importc without caring about the `main` function in the file ?
02:33:56FromDiscord<huantian> In reply to @4zv4l "why is https://nim-lang.org/docs/syncio.html#readLi": wdym? this overload only reads one line
02:36:03FromDiscord<huantian> you can just copy exactly what it does yourself
02:36:26FromDiscord<Elegantbeef> > also is it possible to importc without caring about the main function in the file ?↵What?
02:42:01FromDiscord<4zv4l> In reply to @huantian "wdym? this overload only": it does not↵`template readLines(filename: string): seq[string]`
02:42:07FromDiscord<4zv4l> it reads the file into a seq of line
02:42:10FromDiscord<4zv4l> I just used it
02:42:22FromDiscord<4zv4l> but it says its deprecated and needs to specify the number of line to read
02:42:32FromDiscord<huantian> am i tripping? https://media.discordapp.net/attachments/371759389889003532/1192659367149977610/image.png?ex=65a9e197&is=65976c97&hm=38cf3aec5e3191939702ac2feb413589c5d85a0dd39a1bc621d97a071ee20445&
02:43:00FromDiscord<4zv4l> In reply to @Elegantbeef "> also is it": if I `importc` from a `.c` file which contains a `main` function, then it is annoyed during compile time since there are two main functions
02:43:03FromDiscord<4zv4l> In reply to @huantian "am i tripping?": what
02:43:29FromDiscord<Elegantbeef> The c file should have a `#ifndef lib`↵(@4zv4l)
02:44:10FromDiscord<4zv4l> so if I wanna read the whole file, how do I do ?
02:44:17FromDiscord<4zv4l> why they made the one without a line number deprecated ?
02:44:39FromDiscord<4zv4l> In reply to @Elegantbeef "The c file should": will do, thanks for the tips ~
02:44:59FromDiscord<4zv4l> In reply to @Elegantbeef "The c file should": Nim will define `lib` when using `importc` ?
02:45:23FromDiscord<huantian> In reply to @4zv4l "so if I wanna": `filename.lines.toSeq` is what I usually do i can't remember if theres a different way
02:45:34FromDiscord<Elegantbeef> No
02:45:43FromDiscord<huantian> In reply to @4zv4l "why they made the": no idea probably because the default value of reading 1 line was bad
02:45:43FromDiscord<Elegantbeef> Your C file should define that it does not need main if it's built as a lib
02:45:49FromDiscord<Elegantbeef> Why are you importing a C file with a `main`
02:45:53FromDiscord<huantian> (edit) "bad" => "unintuitive"
02:46:18FromDiscord<4zv4l> In reply to @Elegantbeef "Why are you importing": small project without a header file
02:46:52FromDiscord<Elegantbeef> so then wrap your C main with `#ifdef myprojectlib`
02:46:56FromDiscord<4zv4l> In reply to @huantian "`filename.lines.toSeq` is what I": I need to import sequtils to get `toSeq` right ?
02:47:16FromDiscord<Elegantbeef> rather `#ifndef myprojectlib`
02:47:47FromDiscord<huantian> In reply to @4zv4l "I need to import": yes
02:47:47FromDiscord<Elegantbeef> Then from Nim you can do `{.compile("myproject.c", "-Dmyprojectlib").}`
02:48:16FromDiscord<Elegantbeef> Your project layout sounds hellish though
02:48:48FromDiscord<4zv4l> thats a very small project
02:48:52FromDiscord<4zv4l> one file project
02:49:09FromDiscord<4zv4l> just wanted to show a friend how easy it is to move some part of the code from C to Nim and vice versa
02:49:17FromDiscord<Elegantbeef> Well like I said wrap the main in C with
02:49:20FromDiscord<Elegantbeef> the def\
02:49:30FromDiscord<Elegantbeef> For Nim -\> C do I have a possible toy project for you
02:49:38FromDiscord<Elegantbeef> https://github.com/beef331/seeya
02:50:03FromDiscord<Elegantbeef> https://github.com/beef331/seeya/blob/master/tests/mylib.nim generates↵https://github.com/beef331/seeya/blob/master/tests/mylib.h
02:50:53FromDiscord<auxym> In reply to @Elegantbeef "<@882793909246369864> is clearly": I basically rewrote everything having to do with descriptors in pure nim for this: https://github.com/auxym/nim-tinyusb
02:51:21FromDiscord<Elegantbeef> Still a better person than I 😛
02:51:23FromDiscord<auxym> it was, uhm, a lot of reading the USB spec
02:52:23FromDiscord<auxym> that thing should work, if anyone is interested. I had tested it on the pico.
02:52:29FromDiscord<auxym> for CDC and HID at least
02:54:53FromDiscord<4zv4l> In reply to @Elegantbeef "For Nim -\> C": thanks !
02:55:29FromDiscord<4zv4l> yeah I never did the reverse step actually↵just did C- > Nim, never Nim -> C
02:56:13FromDiscord<auxym> for nim -> C there's also https://github.com/treeform/genny
02:56:36FromDiscord<auxym> also does nim -> python and nim -> node.js infact
02:57:43FromDiscord<4zv4l> In reply to @4zv4l "yeah I never did": ooh actually I did but since the Nim code was a dll, didnt have issue to make the C program that calls it
02:57:50FromDiscord<4zv4l> (edit) "calls" => "load"
02:59:56FromDiscord<Elegantbeef> Well you should be compiling your C into a dll or static library aswell
03:00:02FromDiscord<Elegantbeef> Just cause Nim can compile C directly does not mean you should 😄
03:00:34FromDiscord<4zv4l> I meant Nim -> DLL↵C loads the dll and use it↵so I didnt have to link anything special to my C program
03:00:57FromDiscord<Elegantbeef> Atleast for a single file without a build system there is not much reason not to build the C code into a library
03:02:13FromDiscord<4zv4l> In reply to @4zv4l "I meant Nim ->": that was for another project
03:02:24FromDiscord<4zv4l> In reply to @Elegantbeef "Atleast for a single": I didnt need to make it into a library but yeah I see
03:42:33*hernan quit (Remote host closed the connection)
03:48:31*azimut quit (Ping timeout: 240 seconds)
03:59:31*ehmry quit (Ping timeout: 245 seconds)
04:57:06FromDiscord<kdot_227> nim is very cool 👍
05:10:34*jkl quit (Quit: Gone.)
05:11:58*jkl joined #nim
05:36:47FromDiscord<lorangeve_24442> sent a long message, see <!doctype html>
05:37:16FromDiscord<lorangeve_24442> (edit)
06:11:57*flouer__ joined #nim
06:11:58*flouer quit (Read error: Connection reset by peer)
06:16:33NimEventerNew thread by Freeways1234: Can't run nim, see https://forum.nim-lang.org/t/10851
06:25:55*xet7 joined #nim
06:27:29FromDiscord<lorangeve_24442> 🥺
06:57:14*wheatengineer joined #nim
07:02:07*rockcavera quit (Remote host closed the connection)
07:05:20*PMunch joined #nim
07:05:51FromDiscord<4zv4l> In reply to @lorangeve_24442 "Hello guys, I would": what is the code ?
07:06:52FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=html>
07:13:04FromDiscord<4zv4l> it works on my side↵did you do like this ? https://media.discordapp.net/attachments/371759389889003532/1192727445611216996/image.png?ex=65aa20fe&is=6597abfe&hm=a477854f2dfd1a9abb35ba228d6b5f5924ed6ea69dc7e67eab9dbecb9df8377a&
07:16:11FromDiscord<lorangeve_24442> sent a code paste, see https://play.nim-lang.org/#ix=html>
07:18:25FromDiscord<lorangeve_24442> The compiled command line is like this, the same as the official website https://media.discordapp.net/attachments/371759389889003532/1192728795124355102/image.png?ex=65aa2240&is=6597ad40&hm=44c04d0f68b12c2a077e2003132a2084a52ab0b8a8a00654fe9212fae9b3dae3&
07:21:19FromDiscord<4zv4l> the website shows this `nim c --debuginfo --linedir:on adder.nim`
07:22:38FromDiscord<4zv4l> right they also say that `--debugger:native` is the same
07:22:44FromDiscord<4zv4l> let me try
07:23:26FromDiscord<4zv4l> In reply to @4zv4l "it works on my": weird since it breaks at line 3 but doesnt readline at line 2
07:23:45FromDiscord<4zv4l> I need to `next`
07:26:31FromDiscord<4zv4l> `2017` so it seems old
07:28:04FromDiscord<pmunch> In reply to @auxym "I basically rewrote everything": Holy shit, this is great! this has been on my projects list for a while now
07:28:18FromDiscord<pmunch> Maybe I can finally do my Attiny85 keyboard now
07:34:26FromDiscord<albassort> the problem with not running DDR3 in 2024 is that maybe it was cheaper to not buy a new DDR4 cpu in 2018, but now its way too expensive to by an extra 8gb
07:34:36FromDiscord<albassort> (edit) removed "not"
07:39:21FromDiscord<lorangeve_24442> sent a code paste, see https://play.nim-lang.org/#ix=html>
07:42:01FromDiscord<demotomohiro> In reply to @lorangeve_24442 "Please allow me to": https://internet-of-tomohiro.netlify.app/nim/faq.en.html#community-how-to-post-nim-code-with-syntax-highlight-on-discordqmark
07:43:24FromDiscord<4zv4l> In reply to @4zv4l "`2017` so it seems": it seems breakpoint at line 3 doesnt execute line 2 even when reaching the breakpoint↵and when analyzing the string it isnt like on the website so yeah idk xD
07:43:30FromDiscord<lorangeve_24442> sent a code paste, see https://play.nim-lang.org/#ix=html>
07:44:50FromDiscord<4zv4l> so yeah↵- need to step↵- string isnt that easy I guess https://media.discordapp.net/attachments/371759389889003532/1192735441678512259/image.png?ex=65aa2871&is=6597b371&hm=d350f2345b954e983767bc1bdec41b72746863e3aae9af7a3a0640f4a8130ce3&
07:45:37FromDiscord<Elegantbeef> Wonder if the pretty printer works with orc strings
07:46:09FromDiscord<Elegantbeef> Nim strings changed so that expr is not right
07:49:46*advesperacit joined #nim
07:52:03FromDiscord<4zv4l> oh woaw debugging in Zig is surprisingly easier than what I thought it would be xD
07:52:39FromDiscord<4zv4l> https://media.discordapp.net/attachments/371759389889003532/1192737411021672448/image.png?ex=65aa2a46&is=6597b546&hm=8949689271494a26f20bbd438724bded7c51420f4e8014fbea39684bcfe25acb&
07:52:39FromDiscord<lorangeve_24442> In reply to @4zv4l "so yeah - need": Debugging in nim is really difficult. In comparison, debugging in c language is more convenient.🥺 https://media.discordapp.net/attachments/371759389889003532/1192737407150338079/image.png?ex=65aa2a45&is=6597b545&hm=60944b90a7cfe3117a3f8f04c0ba7a9a341d68b81e86b43ba8923f33c8e705f4&
07:53:35FromDiscord<Elegantbeef> I for one rarely use a debugger
07:56:02FromDiscord<Elegantbeef> But yea Nim's debug information is lacking
07:56:56FromDiscord<lorangeve_24442> In reply to @Elegantbeef "I for one rarely": Then what other methods can be used to monitor variables? Another method I saw from the official website is to use dump, but I feel that it would be better if there is a debugger.
07:57:20FromDiscord<4zv4l> debugging is a must really
07:57:23FromDiscord<Elegantbeef> Also you should use `nim_gdb` afaik
07:58:04FromDiscord<pmunch> Yeah there is a Python script shipped with Nim which is supposed to make the output better
07:58:10FromDiscord<pmunch> But it was broken last I tried it
07:58:45FromDiscord<Elegantbeef> It's lacking a lot of support
07:58:50FromDiscord<pmunch> I'm currently using Gdb over a JLink to debug an embedded thing though, so it's definitely possible to debug with a debugger in Nim
07:58:52FromDiscord<Elegantbeef> `set`s do not print nicely, variants do not work, local variables are mangled iirc
07:59:22FromDiscord<graveflo> learning how to use a debugger is life changing. It's not something that can be swept under the rug
07:59:36FromDiscord<graveflo> and nims debugging is non-existent
08:00:20FromDiscord<Elegantbeef> I'll just put a nice echo on that line
08:00:26FromDiscord<Elegantbeef> I'm a leet developer!
08:00:34FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:00:34FromDiscord<4zv4l> xD
08:01:06FromDiscord<Phil> unnecessary charcters, `echo myVar.repr`
08:01:24FromDiscord<Elegantbeef> Unneeded call `echo myvar`
08:01:43FromDiscord<Phil> Not if myvar has no `$` which happens occasionally
08:01:57FromDiscord<Elegantbeef> So conver to string 😄
08:02:10FromDiscord<Phil> That'd mean writing more code when I just wanna debug
08:02:54FromDiscord<Elegantbeef> The compiler does need to generate some nice `debug` procs that you can call with `typeinfo` afaik
08:02:59PMunchBetter GDB support would be pretty nice though
08:03:04FromDiscord<Elegantbeef> I do not know how it's supposed to work but that's what i'd do 😄
08:03:07FromDiscord<4zv4l> @Phil, every time I see your pp I wanna believe it is a penguin with glasses and red nose↵but everytime it isnt
08:04:27FromDiscord<graveflo> I think that GDB support is a waste of time
08:04:43FromDiscord<Elegantbeef> I mean any debugger is fine!
08:04:56FromDiscord<lorangeve_24442> What is afaik? This is the first time I heard about it.🥺
08:05:01FromDiscord<graveflo> In reply to @Elegantbeef "I mean any debugger": you just said you don't use them why would you say that?
08:05:02PMunchgraveflo, huh? I thought you liked debuggers?
08:05:28PMunchlorangeve_24442, afaik = As Far As I Know
08:05:31FromDiscord<Elegantbeef> > you just said you don't use them why would you say that?↵Reread what I originally said
08:05:43FromDiscord<Elegantbeef> "rarely use a debuggerr"
08:05:48FromDiscord<graveflo> Yea but Nim has potential to have a much more robust debugging system then GDB. Plus GDB is kinda shit. Plus it only would only work for certain back ends
08:05:49FromDiscord<Elegantbeef> Not "do not use debuggers"
08:07:26FromDiscord<Phil> In reply to @lorangeve_24442 "What is afaik? This": afaik = as far as I know↵Also afaict = as far as I can tell
08:07:44FromDiscord<graveflo> Nim doesn't need a debugger that is yet another cancer lump growing off of GDB. It just needs a way to inspect the value changes and call graphs
08:08:59FromDiscord<graveflo> if the debugger is implemented correctly, it should be much easier to make a system that enables GDB debugging anyway. GDB as the target is a bad idea. We can do better then that
08:11:52FromDiscord<Elegantbeef> Yea any sound debugging needs the compiler to emit information that can be accessed
08:13:13FromDiscord<Elegantbeef> Well mostly cause Nim has a lot of abstractions
08:13:20FromDiscord<Elegantbeef> Looks at `seq[T]`
08:13:29FromDiscord<Elegantbeef> `set[T]`\
08:15:28PMunchgraveflo, well GDB is already integrated in a lot of places. The amount of work to make Nim work in GDB is probably orders of magnitude less than building a debugger from scratch
08:17:19FromDiscord<lorangeve_24442> In reply to @isofruit "afaik = as far": It's syntax that I don't understand🥲 .
08:17:31FromDiscord<graveflo> maybe, but it would be worth the extra effort to make a debugging system that is robust enough to stand on it's own. It doesn't have to have a client interface, that can be left up to specific needs. Basically, I think the debugging system should be something that is meant to be built upon. If you can GDB you make a Nim debugger -> GDB translator
08:18:03FromDiscord<lorangeve_24442> What you mean is that there is no such thing yet, right?🥲
08:19:22FromDiscord<Phil> There's a way to make GDB work with VsCode, but I couldn't tell you it, I don't use it myself.↵@.kanaxa had a setup working though
08:21:48FromDiscord<lorangeve_24442> 如果你说的是这个的话 https://media.discordapp.net/attachments/371759389889003532/1192744745080987728/image.png?ex=65aa311b&is=6597bc1b&hm=afe9e760259c2b865409779b2fc04274e877c724f0ffb71a5602cc5c8e2334a1&
08:22:01FromDiscord<lorangeve_24442> (edit) "如果你说的是这个的话" => "If that's what you're talking about"
08:23:20FromDiscord<lorangeve_24442> It's not much better than nothing, and I don't know why this can be used normally. This uses the gdb that comes with nim, and the version is lower.
08:24:03FromDiscord<Elegantbeef> is `nim_gdb` in your path?
08:24:03FromDiscord<Phil> Kanaxa would need to answer you this as I couldn't tell you, I just know that he made something debugger related work
08:24:33FromDiscord<Phil> Is this another place where no-omit-stack thingy flags would help?
08:24:54FromDiscord<Phil> I mean they help with the traces for asan
08:25:00FromDiscord<drunkenalcoholic> Hi, just wanting to know if anyone can help me out as new nim user, I am basically trying nim to retrieve online Json data, while this part is no problems, I seem to have issues(no compiler errors) when using parseJson to my created objects, its just no happening, and im not sure if its me not interpreating the json string to objects correctly or the parseJson function. anyone willing to take a look and maybe give me some clues
08:25:04FromDiscord<Elegantbeef> https://github.com/nim-lang/vscode-nim#setting-up generally worked imo
08:25:22FromDiscord<lorangeve_24442> In reply to @Elegantbeef "is `nim_gdb` in your": I added an environment variable https://media.discordapp.net/attachments/371759389889003532/1192745640111902720/image.png?ex=65aa31f0&is=6597bcf0&hm=f5694a3b943ebd19507231af85fc76b810ecb9854c06277c3d09ab311c9f1068&
08:25:33FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:25:49FromDiscord<Phil> If that even does anything on windows
08:25:49FromDiscord<Elegantbeef> not `gdb` `nim_gdb` it's a python script used for pretty printing
08:26:35FromDiscord<Phil> In reply to @drunkenalcoholic "Hi, just wanting to": You can respond to what I wrote you in #appdev here then we can have it all in one place and others might chime in 😄
08:26:36FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/tools/debug/nim-gdb.py this should be somewhere
08:26:38FromDiscord<drunkenalcoholic> https://media.discordapp.net/attachments/371759389889003532/1192745961982808074/image.png?ex=65aa323d&is=6597bd3d&hm=22db625588827758c4ce6b94a23c217d2da10e479a46a7d706695e4051fba698&
08:27:00FromDiscord<Elegantbeef> First look at this kitty user!
08:27:06FromDiscord<Elegantbeef> Secondly what's the error?
08:27:28FromDiscord<drunkenalcoholic> no errors just throwing the exception and no parsed data
08:27:33FromDiscord<Elegantbeef> That's an error
08:27:42FromDiscord<drunkenalcoholic> no errors in compiling
08:27:43PMunchKitty user?
08:27:50FromDiscord<Elegantbeef> Kitty terminal
08:27:51FromDiscord<Phil> In reply to @drunkenalcoholic "": While nice, copy pasting into a codeblock is nicer for copy pasting into a playground.↵You can spawn a background with 3 backticks↵\`\`\`nim↵\`\`\`
08:27:58FromDiscord<Phil> (edit) "background" => "codeblock"
08:28:17FromDiscord<Phil> (edit) "In reply to @drunkenalcoholic "": While nice, copy pasting into a codeblock is nicer for ... copyand" added "us since it allows us easy" | "into a playground.↵You" => "and playing around with the code↵You"
08:29:09PMunchHow did you spot that they use Kitty? (I also use it by the way)
08:29:25FromDiscord<lorangeve_24442> In reply to @Elegantbeef "not `gdb` `nim_gdb` it's": This version of my gdb should not support python
08:29:36FromDiscord<Elegantbeef> The window decorator icon
08:30:00PMunchOh yeah! Well spotted! :P
08:30:02FromDiscord<Elegantbeef> Well if your gdb does not support pretty printers uhhh....
08:30:03FromDiscord<drunkenalcoholic> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:30:18FromDiscord<that_dude.> Just double checking, any compiler crash is a bug report right?
08:30:25FromDiscord<Elegantbeef> Yes
08:30:28FromDiscord<that_dude.> Thanks
08:30:45PMunch@drunkenalcoholic, might want to remove those ID/KEY data?
08:30:55FromDiscord<drunkenalcoholic> yeah i just seen that
08:30:58FromDiscord<drunkenalcoholic> opps
08:31:48FromDiscord<drunkenalcoholic> (edit)
08:32:27FromDiscord<lorangeve_24442> In reply to @Elegantbeef "Well if your gdb": It is really difficult to find a convenient and quick way to view variables. In comparison, dump may be faster.😂
08:33:18FromDiscord<Elegantbeef> `echo` is really quick which is why people usue it
08:34:00PMunchMaybe you could use `call` in Gdb to call a Nim defined pretty printer?
08:34:07PMunchThe name might be mangled though..
08:34:44FromDiscord<Elegantbeef> If the `$` exists you can do just that
08:34:48FromDiscord<Elegantbeef> and you have the type name
08:35:05FromDiscord<Elegantbeef> The issue is you need the typename and the proc not to be removed
08:35:51FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:36:04FromDiscord<Phil> Or rather first your problem, then the advice
08:36:24FromDiscord<Elegantbeef> Something like emitting an extern `debug_type_name` procedure for all types would be beneficial but it'd also require knowing all types of all stack/heap data you want to use it on
08:36:42FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:37:11FromDiscord<drunkenalcoholic> display e.msg instead?
08:37:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:37:44FromDiscord<lorangeve_24442> In reply to @PMunch "Maybe you could use": Very good idea, I'll try it:nimpride:
08:37:58FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:38:11FromDiscord<drunkenalcoholic> nice I will do that, hopefully that will give some indication od the actual error
08:38:22FromDiscord<drunkenalcoholic> I did do -d:SSL on compile time
08:38:27FromDiscord<Phil> Ahhh check
08:38:32FromDiscord<Phil> That's where I was going next linking to https://nim-lang.org/docs/httpclient.html#sslslashtls-support
08:39:17FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:39:19FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/tools/debug/nim-gdb.py#L150-L185 atleast is how nim-gdb.py can call those `$` procs
08:40:01FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:40:39FromDiscord<drunkenalcoholic> yes I had an valid API key
08:40:59FromDiscord<Phil> Ah check, in that case you'll need to copy paste your own error here because without one I'm stuck at this point 😄
08:41:08FromDiscord<Phil> You honestly can just delete the try-catch for now and run your code without
08:41:15FromDiscord<drunkenalcoholic> I suspected the the Json string might not have matched my object types
08:41:18FromDiscord<Phil> The error message printed to the console will be far nicer looking
08:41:24FromDiscord<drunkenalcoholic> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:41:49FromDiscord<drunkenalcoholic> testing it now
08:41:56FromDiscord<lorangeve_24442> sent a long message, see <!doctype html>
08:44:38FromDiscord<drunkenalcoholic> yeap reult.time.time not found
08:44:52*xet7 quit (Remote host closed the connection)
08:45:26FromDiscord<xrfez> this formatting looks wrong to me? nph didnt like it, but nim seems to compile it?↵https://github.com/elcritch/figuro/blob/bb7fa06f50184dc720aed3dcc1f473cc71a5a0b5/figuro/renderer/opengl/fontutils.nim#L76C11-L80
08:45:29FromDiscord<Phil> In reply to @drunkenalcoholic "yeap reult.time.time not found": ahhhhahahahahahahaha, JSON format error my friend xD
08:45:39FromDiscord<Phil> I know those way too welll
08:46:08FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:46:23FromDiscord<drunkenalcoholic> Thanks Phil, I originally suspected as much, but I can't see it fromt he Json string as it looks correct {"status":"success","result":[{"time":{"time":"2024-01-05T06:41:16.461393Z","secondsAgo":49},"temperature":28.2,"humidity":62.9,"feelsLike":30.1,"rssi":-73}]}
08:46:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:46:47FromDiscord<Phil> Or rather a seq
08:47:35FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
08:48:12FromDiscord<lorangeve_24442> In reply to @Elegantbeef "https://github.com/nim-lang/Nim/blob/devel/tools/de": I can't find gdb lib 🥲 https://media.discordapp.net/attachments/371759389889003532/1192751393493241866/image.png?ex=65aa374c&is=6597c24c&hm=7967a8ab77c45a86e8c772818050c87f02599f4a0b3ae6757642e801ce768e3c&
08:48:38FromDiscord<Phil> Damn, been a while but JSON having a list somewhere you don't expect or an object with 1 field where you expected a value directly is one of those things that just catches you off guard every time
08:49:18FromDiscord<drunkenalcoholic> Phil, Bammmm that worked a treat
08:49:53FromDiscord<4zv4l> In reply to @drunkenalcoholic "": maybe an ignorant question but since you `await` every future, why need async in this case ?
08:50:04FromDiscord<drunkenalcoholic> @Phil many thanks its greatly appreciated, and I learned something(a few things)
08:50:59FromDiscord<Phil> In reply to @drunkenalcoholic "<@180601887916163073> many thanks": Happy to help 😄↵Just to make sure, you're aware of what a seq is?
08:51:09FromDiscord<Phil> Since that may otherwise stump you in the future
08:51:27FromDiscord<Phil> (Also you can make your example a lot easier by ditching async here)
08:52:15FromDiscord<drunkenalcoholic> im thinking seq[] is an array?
08:53:13FromDiscord<Phil> Async is very useful once you want to run multiple HTTP requests in parallel (Careful! There's a known trap there https://stackoverflow.com/questions/75127488/cannot-await-combined-future-of-multiple-async-requests-proc-hangs-when-doing-s) or if you want to do some heavy computation while the HTTP request is waiting, but for a single HTTP request that you just do stuff before you can just do sync. Makes it easier to debug as well.
08:53:43FromDiscord<drunkenalcoholic> Thanks for that info Phil
08:53:46FromDiscord<Phil> In reply to @drunkenalcoholic "im thinking seq[] ": Only kind of.↵Arrays are fixed-size.↵Sequences are not.↵They are more akin to Java's "ArrayList" or the like
08:53:56FromDiscord<drunkenalcoholic> Dynamic array
08:54:04FromDiscord<Phil> Yeah, that one I'll agree to
08:54:17FromDiscord<Phil> It's a distinction because nim has arrays
08:54:54FromDiscord<Phil> Which are used in e.g. more high performance scenarios or where you actually want a fixed-size list
08:57:09FromDiscord<drunkenalcoholic> I haven't gotten into all the different nim types and operators, but I will definitely keep playing around and learning nim, so far I am finding it more flexible than Delphi/Pascal
08:57:27FromDiscord<Phil> If nim is one thing, flexible is among them
08:57:57FromDiscord<drunkenalcoholic> as silly as it sounds but, "let" was a game changer for me,
08:58:23FromDiscord<Phil> Fully agree. The distinction between mutable and immutable, once you get into it, makes such a difference
09:06:09FromDiscord<gyatsoyt> how do i calculate bit_length of an integer in nim...↵python has `int.bit_length()` for it
09:08:27FromDiscord<Phil> Yeah I got no clue on that one↵Anything in here might possibly help: https://nim-lang.org/docs/bitops.html
09:14:21FromDiscord<Phil> Otherwise, this could be a very decent forum question
09:18:53FromDiscord<gyatsoyt> In reply to @isofruit "Otherwise, this could be": i guess i should go to the forum and submit this
09:19:03FromDiscord<graveflo> `sizeof`
09:21:52FromDiscord<graveflo> In reply to @gyatsoyt "i guess i should": and for the "minimum number of bits" thing I think you can do `ceil(log2(n))`
09:22:40FromDiscord<graveflo> (edit) "`ceil(log2(n))`" => "`ceil(log2(n)) + 1`"
09:23:26FromDiscord<graveflo> ah wait no you round it down bc of the +1 LOL
09:23:40FromDiscord<graveflo> (edit) "`ceil(log2(n))" => "`floor(log2(n))"
09:25:22FromDiscord<graveflo> or you can shift right until the value == 0
09:27:03FromDiscord<albassort> @Phil hows the memory, are you winning son
09:27:24FromDiscord<gyatsoyt> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:27:38FromDiscord<Phil> In reply to @albassort "<@180601887916163073> hows the memory,": I am, by brutalizing threadvars set by nim std libs
09:28:13FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:28:20FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:28:38FromDiscord<Phil> I assume a proc that returns e.g. `1` for the number `1`, `2`for the number 2 and 3 etc.
09:28:40FromDiscord<albassort> like in nim it might be sizeof(x)7
09:28:42FromDiscord<albassort> (edit) "sizeof(x)7" => "sizeof(x)8"
09:28:55FromDiscord<albassort> that would be the bit size of a given object's type
09:28:57FromDiscord<Phil> (edit) "number `1`, `2`for" => "numbers `0, 1`, `2` for" | "number 2" => "numbers `2`" | "3" => "`3`"
09:29:09FromDiscord<gyatsoyt> In reply to @albassort "what exactly is bit_length": calculates the length of bits of an integer
09:29:40FromDiscord<Phil> In reply to @gyatsoyt "calculates the length of": I mean just for reference, every integer takes up 64 bits (32 bits on some systems)
09:29:40FromDiscord<albassort> yeah sizeof(x)8 covers all primitive int types but this seems like a bad idea
09:29:42FromDiscord<gyatsoyt> like The bit length of 12345 is 16
09:29:57FromDiscord<albassort> thats the minimum bit length
09:30:08FromDiscord<albassort> not its actual size
09:30:35FromDiscord<albassort> its alloced to bit an int8, int16, int32, int64, etc
09:30:39FromDiscord<albassort> all different types in nim
09:30:45FromDiscord<albassort> (edit) "bit" => "be"
09:31:00FromDiscord<albassort> (edit) "int32, int64, etc" => "int32 or int64"
09:31:11FromDiscord<albassort> (edit) "its alloced to be an int8, int16, int32 or int64 ... " added "(int128? i forget if thats real)"
09:31:33FromDiscord<albassort> https://nim-lang.org/1.6.12/compiler/int128.html ITS REAL
09:31:55FromDiscord<Phil> "You thought there were big ints"
09:32:04FromDiscord<Phil> "Now there are really big ints"
09:32:26FromDiscord<Phil> And yep, that is available
09:33:08FromDiscord<albassort> i like how its just uint32's bitand'd together
09:33:15FromDiscord<albassort> (edit) "uint32's" => "4 uint32'd"
09:33:31FromDiscord<albassort> int128 is just smaller ints in a trench coat
09:34:16FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:34:17FromDiscord<Elegantbeef> All ints are just contiguous `int1`s
09:34:27FromDiscord<albassort> In reply to @Elegantbeef "All ints are just": not in an array tho
09:34:32FromDiscord<nnsee> how the fuck do you fit an int128 into a register
09:34:39FromDiscord<gyatsoyt> The bit_length() function in Python returns the number of bits required to represent an integer in binary, excluding the sign and leading zeros. For example, the bit_length of the integer 10 is 4, because 10 in binary is 1010, which requires 4 bits to represent.↵↵according to google^^^
09:34:41FromDiscord<albassort> by making it 4 uint32s
09:34:59FromDiscord<nnsee> i can't fit 4 uint32s into any of my registers
09:35:00FromDiscord<Elegantbeef> Using simd 😛↵(@nnsee)
09:35:03FromDiscord<nnsee> touche
09:35:10FromDiscord<Elegantbeef> If you have simd you can certainly!
09:35:17FromDiscord<albassort> idk what simd is
09:35:19FromDiscord<albassort> must google
09:35:40FromDiscord<albassort> https://tenor.com/view/ratatouille-ratatouille-chef-ratatouille-reading-shocked-gif-23517636
09:35:46FromDiscord<albassort> In reply to @albassort "https://tenor.com/view/ratatouille-ratatouille-chef": me rn
09:36:10FromDiscord<gyatsoyt> In reply to @albassort "anyway idk what you're": well i am trying to translate some old python code into nim to boost its performance
09:36:27FromDiscord<Phil> In reply to @albassort "int128 is just smaller": Beautiful metaphor
09:36:59FromDiscord<Elegantbeef> isn't msb just `log2(num)`?
09:37:37FromDiscord<albassort> In reply to @gyatsoyt "The bit_length() function in": there is nothing like that in nim because are static but the minimum number of bits required would be equal to log2(num)
09:38:06FromDiscord<Elegantbeef> Well if they want variable size integers there are packages
09:38:12FromDiscord<albassort> (edit) "log2(num)" => "log2(num), then you rize it up"
09:38:26FromDiscord<albassort> (edit) "rize" => "round" | "up" => "to the nearest 2 power of 2 upward"
09:38:35FromDiscord<Elegantbeef> https://github.com/status-im/nim-stint https://github.com/nim-lang/bigints
09:38:37FromDiscord<albassort> (edit) removed "2"
09:39:09FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:40:36FromDiscord<Elegantbeef> Shouldn't that be `if x in 0..1: return 1`? 😄
09:41:19FromDiscord<graveflo> actually it should prob be a conversion to uint and then a `<`
09:42:18FromDiscord<Elegantbeef> I can count on 2^65 hands how many times I wanted large ints
09:42:40*azimut joined #nim
09:42:59FromDiscord<albassort> but can you do it in japanese
09:43:11FromDiscord<Elegantbeef> I can hardly do it in english
09:52:22FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html>
10:00:54FromDiscord<Elegantbeef> Hey that's `0..1`
10:01:06FromDiscord<graveflo> prove it
10:01:23FromDiscord<Elegantbeef> Negatives do not exist
10:01:41FromDiscord<graveflo> are you this happy all the time?
10:01:53FromDiscord<Elegantbeef> Indeed
10:24:54FromDiscord<lukol.> Hi, i have maybe stupid question, but is there any simple way except dll injecting how to work with subversion repository? Google did not offer any NIM integration for loading data from SVN repo. Any hint where should i look or what library to use?
10:26:03FromDiscord<albassort> In reply to @lukol. "Hi, i have maybe": If its written in C, you can load the DLL and use {importc}
10:26:24FromDiscord<albassort> otherwise cpp you can do cpp integration but its more annoyin g
10:26:25FromDiscord<albassort> (edit) "annoyin g" => "annoying"
10:27:37FromDiscord<lukol.> but dll load on linux would be little problematic 🤷‍♂️ thats why i want to avoid any dll load
10:28:01FromDiscord<graveflo> you can still use `importc` and the subversion C API
10:29:33FromDiscord<albassort> In reply to @lukol. "but dll load on": its not native, you have no other option
10:29:58FromDiscord<albassort> its not that bad, you'll be fine, its only a ticking time bomb and installation headaches for arch users
10:30:27FromDiscord<Phil> Why would you bully me like that?
10:30:50FromDiscord<albassort> also idk what you mean by "dll" and "linux" here, do you mean you're using Windows .dll files on linux?
10:30:53FromDiscord<Elegantbeef> Like svn is going to change suddenly
10:30:56FromDiscord<albassort> if so then you may need wine
10:31:05FromDiscord<Elegantbeef> They likely think that there are only `dll`s and linux does not have any
10:31:29FromDiscord<albassort> ah, oops all static binaries
10:31:45FromDiscord<albassort> mom can we have dlls?↵we have dlls at home:↵.so
10:31:48FromDiscord<Phil> TBF I am on Linux and even I don't recall the file-ending of DLLs on linux
10:31:58FromDiscord<albassort> .so?
10:32:03FromDiscord<Elegantbeef> So what?
10:32:07FromDiscord<graveflo> so dont use dlls
10:32:08FromDiscord<albassort> >:(
10:32:16FromDiscord<Phil> 3 people making the same joke
10:32:18FromDiscord<Phil> 😛
10:32:21FromDiscord<Elegantbeef> Phil just `nim c --app:lib myprog.nim`
10:32:31FromDiscord<Elegantbeef> Comedy happens in 3s
10:32:46FromDiscord<Elegantbeef> The third world war is going to be hilarious
10:32:47FromDiscord<graveflo> anyway maybe it would be more helpful to let them know how to import either a dll or a so depending on the os
10:32:55FromDiscord<graveflo> oh already did it I see
10:32:57FromDiscord<lukol.> dll is windows ending. on linux it would be probably .so but injecting to library isnt so easy on linux
10:33:27FromDiscord<graveflo> are you drying to do dynamic module injection?
10:33:36FromDiscord<graveflo> or are you just calling dynamic linking injection?
10:33:47FromDiscord<albassort> do you dynamic injection to an actively running process
10:33:54FromDiscord<albassort> 🤨
10:34:03FromDiscord<albassort> what you up to there buddy
10:34:05FromDiscord<graveflo> sussy
10:34:16FromDiscord<albassort> better be a memory profiler 😠
10:34:18FromDiscord<graveflo> they're writing a debugger surely
10:34:27FromDiscord<albassort> surely\
10:34:29FromDiscord<albassort> (edit) "surely\" => "surely"
10:34:38FromDiscord<Elegantbeef> totally not malware that concerns itself with svn repos
10:35:03FromDiscord<albassort> (edit) "do you ... dynamic" added " mean"
10:35:08FromDiscord<graveflo> that sounds a lot worse then what I was thinking
10:35:12FromDiscord<lukol.> at first i dont even know if there is any dynamic module for SVN. it is from apache then it might be. but i was hoping that somebody already did something like that to see at least some POC
10:35:43FromDiscord<graveflo> I didn't see any wrapping for svn api when I searched
10:36:08FromDiscord<albassort> i remember looking this up, theres a way to do it but i forgor
10:36:36FromDiscord<albassort> strace will show you when the program access a dynamicly linked binary
10:36:40FromDiscord<lukol.> i didnt see as well. i hoped that i just googled wrong
10:36:54FromDiscord<albassort> (edit) "access" => "accesses"
10:37:05FromDiscord<Elegantbeef> Well debian has libsvn so they do exist
10:37:37FromDiscord<Elegantbeef> Throw futhark at the headers
10:38:24FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=html>
10:38:40FromDiscord<albassort> (edit) "code paste," => "long message," | "https://play.nim-lang.org/#ix=html>" => "<!doctype html> <html lang=en> <head> <meta charset=utf-8> <title>&nbsp;</title> </head> <style> body { font-family: monospace; margin: 2em; } </style> <body> <p>ix.io is taking a break &#127867;</p> <img src="/underconstruction.gif" width="200px"> </body> </html>"
10:38:41FromDiscord<Elegantbeef> > 0xDEADBEEF↵Wait no
10:39:03FromDiscord<graveflo> has a nice ring to it
10:39:05FromDiscord<albassort> so you need to talk to the kernel and tell it to use your .so file
10:39:27FromDiscord<albassort> this? i forget
10:39:29FromDiscord<albassort> (edit) "this? i forget ... " added "how to do"
10:39:36FromDiscord<albassort> im sure its easy
10:39:42FromDiscord<albassort> :)
10:40:07FromDiscord<albassort> I know windows has a whole api for it and its really good and totally hasn't caused billions of dollars in damages from keyloggers
10:40:26FromDiscord<lukol.> In reply to @albassort "im sure its easy": if you are root then maybe yes but as user with limited rights it won't be so easy
10:40:41FromDiscord<albassort> i will no longer if you my assistance
10:43:40FromDiscord<albassort> @beef whats your thoughts on this
10:43:49FromDiscord<albassort> this is pretty sus
10:48:56FromDiscord<Elegantbeef> Use a library if you want to use svn from Nim
10:48:57FromDiscord<Elegantbeef> Otherwise what the hell
10:55:45FromDiscord<fowl.mouth> On windows we use that injection method to fix old games keep them running on windows 10+, maybe its not entirely legitimate because it’s some other companies exe that we fiddle with but they’ve been out of business for over 10 years so. Is that considered bad?
10:58:25FromDiscord<albassort> there is no... reason to fuck with svn
10:58:28FromDiscord<albassort> it has an api
10:58:56FromDiscord<albassort> and if you're trying to work around not having root then its like 99.9% chance its malware
10:59:49FromDiscord<graveflo> what are you talking about messing around with the kernels load library function? It sounds like you are talking about installing a hook? I don't get what this is even about at this point. Are they trying to load a "customized" dynamic library into a remote process to mess with it?
11:00:26FromDiscord<albassort> they wanna do dynamic loading injection, a MTM attack
11:00:36FromDiscord<graveflo> right okay LOL
11:00:47FromDiscord<albassort> which happens all the time and has legitimate uses
11:00:56FromDiscord<albassort> not seemingly here though
11:01:13FromDiscord<graveflo> yea I get that but it's not how I would have interpreted the initial inquiries
11:02:58FromDiscord<albassort> light for example, theres this spelunky thing you can use to inject LUA into the C++ engine
11:03:06FromDiscord<albassort> it uses window's APIV \
11:03:08FromDiscord<albassort> (edit) "APIV \" => "API"
11:03:21FromDiscord<albassort> or DFHACK for dwarf fortress is also runtime dll injection iirc
11:03:38FromDiscord<albassort> (edit) "light" => "like"
11:03:38FromDiscord<graveflo> I mean I get that you are talking about making a dynamic library that has the same module info as another one and having the remote process load that one instead to hook functions
11:04:20FromDiscord<graveflo> I just don't understand how you figured that they were talking about that from what they said. Doesn't matter anyway
11:16:16*TheLink7 joined #nim
11:17:48*TheLink quit (Ping timeout: 256 seconds)
11:17:48*TheLink7 is now known as TheLink
11:19:55FromDiscord<lukol.> I am afraid, that there is some misunderstanding. I have some subversion repository. I need to read data from it. Then process them.↵I was considering Nim, because it should be possible for both Windows and Linux. It will be used also on AWS where all our apps are having their own user/group with limited permissions. Root is only devops and they definitely won't allow to run anything under highest priviledge.↵so no malware or MTM or an
11:57:31PMunchSo why are you talking about DLL/so injection? Sounds like you just need libsvn..
12:05:30FromDiscord<Phil> Can you actually have memory leaks under sth like refc?
12:05:43PMunchSure, `alloc(100)`
12:05:45FromDiscord<Phil> Like the entire thread-var saga, does that also apply to refc?
12:05:50PMunchBoom, memory leak
12:06:33FromDiscord<Phil> No I mean more stuff like what I was fighting the last 2-3 days:↵thread-variables of ref-types that don't get cleaned up upon the thread ending and joining with the main-thread.
12:06:54FromDiscord<Phil> Would refc take care of those automatically?
12:07:59PMunchHuh, didn't even know that was a thing
12:08:24FromDiscord<Phil> I have come to know that problem rather intimately
12:08:32PMunchTry boehm
12:09:06FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
12:09:36FromDiscord<Phil> In reply to @PMunch "Try boehm": I support arc orc and ideally also refc, never used boehm.↵The question was more whether I should even mention refc etc. in my FAQ about memory leaks with my lib
12:09:51FromDiscord<Phil> because if refc takes care of threadvars like this then I don't need to mention it
12:12:41*rockcavera joined #nim
12:13:19PMunchJudging by how refc does with threads in general I'd assume not
12:13:27PMunchBut who knows
12:14:21FromDiscord<leorize> just link the nim issue to your faq
12:14:30*pbsds quit (Quit: The Lounge - https://thelounge.chat)
12:15:05FromDiscord<Phil> Already doing that
12:15:14FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
12:16:07*pbsds joined #nim
12:16:35FromDiscord<leorize> have you tried to integrate your message queue with asyncdispatch?
12:17:25FromDiscord<Phil> I don't think I understand
12:17:41FromDiscord<Phil> Like send async events to another thread to work on them?
12:18:18FromDiscord<leorize> no, like having the queue signals asyncdispatch so you don't have to do your odd time slicing
12:18:40FromDiscord<fosster> hi guys! I wanted to ask, do you know any good and easy-to-use audio synthesis library in nim?
12:19:25FromDiscord<fosster> just some higher level library were one can easily generate synth sounds and manipulate them
12:19:56FromDiscord<Phil> ... time slicing?↵You mean me nilling the thread-variables?
12:20:08FromDiscord<Phil> timezone
12:20:11FromDiscord<Phil> (edit) "timezone ... " added "thread-variables"
12:21:30FromDiscord<Phil> In reply to @fosster "hi guys! I wanted": I'm not familiar with the domain.↵You could try searching through the package repositories either on nimble.directory or via your cli (`nimble search sound` for example).
12:21:48FromDiscord<Phil> (edit) "domain.↵You" => "problem domain of sound stuff.↵You"
12:23:16FromDiscord<leorize> basically removing the `sleep` in your runServerProc↵(@Phil)
12:23:46FromDiscord<Phil> Ohhhh like putting every message on the async loop
12:23:51FromDiscord<Phil> I have not
12:24:27FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
12:25:20FromDiscord<leorize> pointing to `reset` is probably better
12:27:40FromDiscord<Phil> ...not just probably, deinit is not findable in the general docs so... yeah
12:27:54FromDiscord<leorize> reset works on everything, except those without destructors like `File` ofc
12:28:18FromDiscord<leorize> oh... socket aren't auto closables either
12:28:52FromDiscord<Phil> I mean, if they have a destructor you can just call that directly
12:29:04FromDiscord<Phil> Or do you mean `reset` over suggesting to call the destructor?
12:29:09FromDiscord<leorize> yep
12:29:36FromDiscord<leorize> it works on refs as well
12:33:05FromDiscord<Phil> Where are the docs for the all pragma?
12:36:18FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#pragmas
12:37:48FromDiscord<Phil> That doesn't even mention the all pragma though
12:37:52FromDiscord<Phil> I did go through that list first
12:50:02FromDiscord<demotomohiro> Then, open manual page and search "{."
12:51:28FromDiscord<fosster> hm thanks anyway↵(@Phil)
12:54:14FromDiscord<Phil> sent a long message, see <!doctype html>
12:54:25FromDiscord<Phil> (edit)
12:55:49*dtomato quit (Ping timeout: 255 seconds)
12:55:51FromDiscord<Robyn [She/Her]> In reply to @isofruit "It's not mentioned in": It's probably a magic pragma
12:55:52FromDiscord<Phil> sent a long message, see <!doctype html>
12:56:24FromDiscord<Phil> No clue where I'd find those
12:56:34FromDiscord<Phil> (Directed at Robyn)
12:57:25FromDiscord<Robyn [She/Her]> No idea either, sorry :P
13:05:15FromDiscord<mratsim> In reply to @isofruit "I support arc orc": refc is imco,patible weith threads
13:05:49FromDiscord<Phil> I can understand everything except for "weith"
13:07:01FromDiscord<nnsee> refc is incompatible with threads
13:08:01FromDiscord<Phil> Ohhhhh
13:08:03FromDiscord<Phil> Wait it si?
13:08:06FromDiscord<Phil> (edit) "si?" => "is?"
13:08:20FromDiscord<Phil> Did we just not do multithreading before arc/orc?
13:21:18FromDiscord<nnsee> lol we did
13:21:22FromDiscord<4zv4l> easy way to convert `array[char]` to `array[uint8]` ?
13:21:51FromDiscord<4zv4l> why isnt `char` and `uint8` the same anyway ?
13:22:07FromDiscord<nnsee> but iirc you couldn't have things like shared memory etc with refc
13:22:17FromDiscord<nnsee> In reply to @4zv4l "easy way to convert": `cast`
13:22:36FromDiscord<odexine> In reply to @4zv4l "why isnt `char` and": it... kinda is?
13:22:41FromDiscord<4zv4l> it is
13:22:44FromDiscord<4zv4l> but not for Nim lol
13:22:52FromDiscord<odexine> it isnt for c either IIRC
13:22:53FromDiscord<nnsee> In reply to @4zv4l "why isnt `char` and": same implementation, different interface
13:23:05FromDiscord<nnsee> and char isn't always explicitly 8 bits wide
13:23:33FromDiscord<odexine> its only "at least" 8 bits
13:23:41FromDiscord<odexine> well, for c
13:23:46FromDiscord<odexine> for nim i think its defined to be 8 bits
13:24:11FromDiscord<odexine> but anyway they represent different "kinds of data"
13:24:13FromDiscord<Phil> In reply to @nnsee "lol we did": But then refc isn't incompatible with multithreading generally, just with threading/channels which lead to shared memory, no?
13:24:17FromDiscord<4zv4l> In reply to @nnsee "`cast`": can you show me an example ?↵I try to cast an `openArray` but it says it cannot, if I cast to `array` do I need to give the size as well ?
13:24:26FromDiscord<odexine> In reply to @4zv4l "can you show me": yes you do need the size as well
13:24:35FromDiscord<4zv4l> thats so annoying
13:25:07FromDiscord<nnsee> well platforms that don't have 8-bit chars are esoteric and it's a reasonable assumption that it's 8 bits, but it technically isn't "guaranteed" and in case nim code is changed in the future to accommodate such platforms, old code doesn't break
13:25:51FromDiscord<nnsee> how are you defining your uint8 array?
13:25:53FromDiscord<odexine> iirc it is guaranteed by specification tho
13:26:08FromDiscord<nnsee> maybe you can get away with using seq
13:26:34FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:27:32FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:27:38FromDiscord<odexine> cursed
13:27:52FromDiscord<odexine> whats wrong about the digest
13:27:53FromDiscord<nnsee> any reason you're not just reading into a string? that's a seq
13:28:06FromDiscord<odexine> probably for allocation reasons
13:28:16FromDiscord<odexine> though i dont really understand the reasoning
13:28:18FromDiscord<4zv4l> https://media.discordapp.net/attachments/371759389889003532/1192821880424501398/image.png?ex=65aa78f1&is=659803f1&hm=43469bffdcb6f0bf4df3efdabe38c52e3b2d1594a52a2ffaf750584c19372ff4&
13:28:21FromDiscord<4zv4l> they dont have the same result
13:28:41FromDiscord<4zv4l> In reply to @odexine "probably for allocation reasons": indeed
13:28:52FromDiscord<nnsee> does it work if you pass exactly 1024 or 2048 chars
13:29:05FromDiscord<odexine> md5update is likely reading the extra 0 bytes in the last chunk
13:29:17FromDiscord<odexine> since it doesnt take in a length
13:30:00FromDiscord<odexine> `buff[0..len-1]` probably also doesnt return an array but a seq so the cast is invalid
13:30:19FromDiscord<nnsee> ah yes, that's a slice
13:30:56FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:31:14FromDiscord<odexine> no, best not to cast at all
13:31:35FromDiscord<4zv4l> but then it complains
13:31:38FromDiscord<4zv4l> because char isnt uint8
13:31:43FromDiscord<4zv4l> and update asks for uint8
13:32:33FromDiscord<4zv4l> oh wait
13:32:35FromDiscord<4zv4l> I can use readBytes
13:32:37FromDiscord<odexine> then cast to a `seq[uint8]`
13:33:42FromDiscord<4zv4l> but it will allocate memory
13:33:47FromDiscord<4zv4l> why would I allocate memory for that ?
13:35:48FromDiscord<4zv4l> well well well https://media.discordapp.net/attachments/371759389889003532/1192823766829506631/image.png?ex=65aa7ab3&is=659805b3&hm=ac632996b2271aabf0442c04437326a5778ffffbac9dcf92edf58eea46ae2d25&
13:35:50FromDiscord<4zv4l> I dont get it
13:35:50FromDiscord<4zv4l> xD
13:36:08FromDiscord<4zv4l> so much easier in C lol
13:36:52FromDiscord<odexine> In reply to @4zv4l "but it will allocate": you already are no matter what
13:37:09FromDiscord<odexine> the mere usage of md5Update will allocate memory
13:37:18FromDiscord<odexine> wait no
13:37:30FromDiscord<odexine> i mean, the usage of that indexing `[]`
13:37:34FromDiscord<4zv4l> it reads the right bytes number https://media.discordapp.net/attachments/371759389889003532/1192824212608524388/image.png?ex=65aa7b1d&is=6598061d&hm=daf392f9535b5884c5cae8c72d8d7bdc80216d2a63a8d7fc2a5954999e8c06df&
13:38:13FromDiscord<4zv4l> In reply to @odexine "the mere usage of": yeah but I wont re implement that↵but for my buffer I dont need to allocate
13:38:29FromDiscord<odexine> In reply to @4zv4l "it reads the right": this looks more correct to me
13:38:32FromDiscord<4zv4l> In reply to @odexine "i mean, the usage": yeah crazy that slicing allocate memory
13:38:47FromDiscord<4zv4l> In reply to @odexine "this looks more ": yeah but the hash isnt the same 🥹
13:40:13FromDiscord<odexine> you dont call md5Init?
13:40:59FromDiscord<odexine> before the while loop `md5Init(ctx)
13:41:01FromDiscord<odexine> (edit) "`md5Init(ctx)" => "`md5Init(ctx)`"
13:41:11FromDiscord<4zv4l> I just added it now
13:41:14FromDiscord<4zv4l> but yeah didnt change much xD
13:41:33FromDiscord<4zv4l> ok
13:41:35FromDiscord<4zv4l> now yeah
13:41:37FromDiscord<4zv4l> okok cool finally
13:41:38FromDiscord<4zv4l> xD
13:42:02FromDiscord<odexine> "didnt change much" lol
13:42:25FromDiscord<4zv4l> I changed the len↵why do I need to add `len-1` ?
13:42:26FromDiscord<4zv4l> https://nim-lang.org/docs/syncio.html#readBytes%2CFile%2CopenArray%5B%5D%2CNatural%2CNatural
13:42:30FromDiscord<4zv4l> why not len
13:42:47FromDiscord<4zv4l> I need to read the 5 bytes so why do I give 4 as length ?
13:42:56FromDiscord<4zv4l> oh wait
13:43:00FromDiscord<4zv4l> no okok my bad
13:43:02FromDiscord<4zv4l> sorry tired
13:43:02FromDiscord<4zv4l> xD
13:43:19FromDiscord<4zv4l> https://media.discordapp.net/attachments/371759389889003532/1192825656459931770/image.png?ex=65aa7c76&is=65980776&hm=dba7965ea143d81025e25bdc0aa95657d7d738a845bd2244885c6142f1d62a03&
13:44:34FromDiscord<odexine> congrats
13:47:36FromDiscord<4zv4l> thanks xD
13:47:47FromDiscord<4zv4l> finally can try to implement my C project into Nim xD
13:48:02FromDiscord<4zv4l> I find using raw bytes/array in Nim so much more complex than in C
13:48:13FromDiscord<4zv4l> like if Nim didnt want you to use array that way
13:59:19*azimut quit (Ping timeout: 240 seconds)
14:09:31*rockcavera quit (Remote host closed the connection)
14:11:11FromDiscord<nnsee> In reply to @4zv4l "I find using raw": because C is a lot more lax about types than Nim?
14:14:22*rockcavera joined #nim
14:18:20*hernan joined #nim
14:19:32*lucasta joined #nim
14:31:29FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=html>
14:47:25*azimut joined #nim
14:49:12arkanoidthis is trending on HN now https://gist.github.com/FeepingCreature/5dff669aad380a123b15659e195fb96c . Just out of curiosity, is this the reason why Nim compiler passes objects by hidden pointer if they are larger than X bytes (don't remember the exact number, but it may well be 16bytes)
15:03:04*Batzy_ joined #nim
15:06:10*Batzy quit (Ping timeout: 256 seconds)
15:11:31FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=html>
15:13:01*PMunch quit (Quit: Leaving)
15:50:21FromDiscord<Phil> The time has come... for tsan
15:53:10FromDiscord<Phil> Aaaaaan tsan immediately starts crying foul
15:55:25FromDiscord<Phil> .... it complains about a data race when I log something on startup/shutdown?
15:55:32FromDiscord<Phil> what?
15:59:50FromDiscord<Phil> Does tsan notice my set of threads constantly polling their own channels and just shouts "That's a data race" ?
16:00:03FromDiscord<Phil> (edit) "Does tsan notice my set of threads constantly polling their own channels and ... just" added "sending messages back and forth and"
16:08:01FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:08:27FromDiscord<Phil> (edit)
16:09:02FromDiscord<Phil> (edit)
16:10:23FromDiscord<Phil> Is this what you're trying to teach me here with tsan leorize? That my setup leads to tsan complaining about pseudo data-races that aren't any?↵↵Because from what I'm seeing it's just complaining about me sending a message from A to B with a setup of continuously polling the channel and then sleeping a bit before polling again.
16:10:34FromDiscord<Phil> (edit) "any?↵↵Because" => "real?↵↵Because"
16:15:31FromDiscord<Phil> It's kinda hilarious how I'm treading the path that Zevv walked before me.
16:15:57FromDiscord<Phil> And at this point I think I'm still sticking with it because I like my DSL and mental model better than annotating a single proc and using "hatch"
16:17:49FromDiscord<Phil> Huh, they just use deques directly, not stuff like loony, Channels or Chan
16:19:59FromDiscord<Phil> Hmm basically every actor contains a field with its own channel and by having the actor itself you have its channel.↵Their approach seems to significantly decouple actor instances and which thread works on them more than mine.
16:21:04*lucasta quit (Remote host closed the connection)
16:22:20FromDiscord<Phil> Is Zevv even still active here?
16:25:36FromDiscord<Phil> Man, now I want to chat with the guy so bad
16:26:36FromDiscord<gyatsoyt> How do I efficiently translate my python code into nim it's fully written in python doesn't use many packages all of them are standard (almost). I mean writing all the code from python into nim is exhausting
16:29:50FromDiscord<inventormatt> Depending on how much code there is you could ask chatgpt to translate parts of it for you. I've had moderate successes doing that
16:31:07FromDiscord<inventormatt> In reply to @isofruit "Is Zevv even still": I've seen him show up from time to time here and on the forum. Be is largely not actually in the nim community anymore
16:32:04FromDiscord<nnsee> if using chatgpt be prepared for it to hallucinate stuff and getting you to import nim packages that don't exist
16:33:33FromDiscord<danvenn> Has anyone managed to bind a .dll file in futhark? I'm struggling!
16:33:50FromDiscord<Phil> PMunch has!
16:34:01FromDiscord<Phil> This is me guessing but I'm sure he did that at one point
16:34:03FromDiscord<danvenn> https://github.com/cozodb/cozo/blob/main/cozo-lib-c/example.c↵want to get this going
16:34:59FromDiscord<danvenn> how do I link a dll? the same way as a .lib?
16:35:08FromDiscord<danvenn> {.passL: "-Llib/dyn -llibcozo_c".}?
16:35:19FromDiscord<pengwyns> I did something cursed.
16:35:21NimEventerNew thread by aSmallFrog: Help with linking DLLs/ Futhark Bindings, see https://forum.nim-lang.org/t/10852
16:35:21FromDiscord<Phil> I would assume so.↵Generally you might want to refer what demotomohirot wrote about that
16:35:27FromDiscord<pengwyns> I made npm's everything, but for nim.
16:35:40FromDiscord<danvenn> In reply to @NimEventer "New thread by aSmallFrog:": that's me
16:35:44FromDiscord<Phil> https://internet-of-tomohiro.netlify.app/nim/clibrary.en.html#sharedslashdynamicminuslink-library
16:35:58FromDiscord<danvenn> Thanks Phil I'll take a look
16:36:09FromDiscord<Phil> Ribbit Ribbit my friend
16:36:20FromDiscord<nnsee> In reply to @pengwyns "I made npm's everything,": now do `nimble install -d` and report back
16:36:22FromDiscord<pengwyns> oh god, its actually downloading every nimble package ever.
16:36:24FromDiscord<gyatsoyt> In reply to @inventormatt "Depending on how much": I have significant amount of code almost 10+ files
16:36:41FromDiscord<gyatsoyt> In reply to @nnsee "if using chatgpt be": Yes I have seen those
16:36:51FromDiscord<Phil> ... for reference, 10 files is the starting point for a medium sized project
16:37:02FromDiscord<Phil> Still on the smaller side ^^
16:37:31FromDiscord<nnsee> files is so arbitrary, i started a Deno project today that is 20 files currently but each file is tiny
16:37:42FromDiscord<nnsee> LOC is a better (but still pretty bad) indicator
16:38:01FromDiscord<Phil> ~~It works for me because my files almost always end up 50-400 loc~~
16:38:04FromDiscord<pengwyns> I sure hope no one inserted any malware into the install tasks of these packages.
16:38:17FromDiscord<pengwyns> Wait is it even possible?
16:38:20FromDiscord<danvenn> In reply to @isofruit "https://internet-of-tomohiro.netlify.app/nim/clibra": Hmm frustratingly he skips the dll part
16:38:25FromDiscord<nnsee> In reply to @pengwyns "I sure hope no": they will now
16:38:38FromDiscord<Phil> In reply to @pengwyns "I sure hope no": At this point I'd more say "Sure hope you're not running this on your raw machine"
16:38:48FromDiscord<Phil> In reply to @danvenn "Hmm frustratingly he skips": Hmmm
16:38:49FromDiscord<pengwyns> You know that would be a better idea.
16:38:50FromDiscord<nnsee> and it will be pushed before nimble gets to those deps
16:38:50FromDiscord<gyatsoyt> If I were to guess the total lines of code in all the files included it probably will be around 4k to 5k
16:39:01FromDiscord<gyatsoyt> Which is too much to translate to nim
16:39:02FromDiscord<gyatsoyt> Ngl
16:39:04FromDiscord<nnsee> that's not too much
16:39:20FromDiscord<gyatsoyt> In reply to @nnsee "that's not too much": For me it is
16:39:33FromDiscord<gyatsoyt> That's why I was searching for a faster method to do it ...
16:39:40FromDiscord<Phil> In reply to @danvenn "Hmm frustratingly he skips": I only used linux dlls so far.↵As in, .so files, not windows dlls, I'm not entirely sure if the syntax is the same there
16:39:51FromDiscord<gyatsoyt> Like I have only translated 2 files till now
16:39:52FromDiscord<Phil> I was binding a ton of gtk procs by hand
16:40:29*wheatengineer quit (Quit: Leaving)
16:40:42FromDiscord<inventormatt> In reply to @gyatsoyt "That's why I was": There are also a couple of py2nim projects that can search for but I have no idea how they successful they are
16:41:08FromDiscord<Phil> I'm only aware of py2nim directly
16:41:36FromDiscord<danvenn> In reply to @isofruit "I only used linux": did you use loadLib()
16:42:36FromDiscord<gyatsoyt> In reply to @inventormatt "There are also a": It doesn't works for me I installed it through nimble install py2nim then tried running py2nim I always get py2nim is not found as a terminal command
16:42:45FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:42:54FromDiscord<Phil> In the case above those were libadwaita bindings
16:43:05FromDiscord<Phil> The procs then look sth like this:↵` proc adw_expander_row_new(): GtkWidget`
16:43:10FromDiscord<inventormatt> In reply to @gyatsoyt "It doesn't works for": Have you tried adding the exe to your path?
16:43:22FromDiscord<danvenn> In reply to @isofruit "I did not use": I think the bindings part is working, but I'm trying to actually load the binary at compile time I think
16:43:23FromDiscord<Phil> GtkWidget being a distinct pointer in that case
16:43:37FromDiscord<Phil> In reply to @danvenn "I think the bindings": You mean you want to include the lib into your binary?
16:43:40FromDiscord<Phil> That would be static linking
16:43:42FromDiscord<danvenn> no
16:43:56FromDiscord<danvenn> but I have no idea how nim deals with .dll files is the problem - its not very clear in the manual
16:44:09FromDiscord<danvenn> I know theres a pragma for individual procs
16:44:13FromDiscord<Phil> I don't think I understand what you're trying to do anymore ^^'
16:44:15FromDiscord<danvenn> but is there a way to load the dll fully
16:44:21FromDiscord<gyatsoyt> In reply to @inventormatt "Have you tried adding": umm which exe?
16:44:41FromDiscord<danvenn> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:45:14FromDiscord<Phil> You're on linux?
16:45:31FromDiscord<danvenn> windows (but I think its probably only a matter of a file type)
16:45:51FromDiscord<danvenn> https://nim-lang.org/1.6.4/dynlib.html
16:46:12FromDiscord<danvenn> I'm guessing i use this
16:47:20FromDiscord<Phil> It should be a matter of just knowing the lib name and using passL without static
16:47:44FromDiscord<danvenn> I just get an unexplained fail to run
16:47:47FromDiscord<danvenn> when I do that
16:48:27FromDiscord<inventormatt> In reply to @gyatsoyt "umm which exe?": I'm not sure which py2nim you are using but in order for something to be called from the command line you usually need an exe file. It might be in the nimble folder you installed
16:48:29FromDiscord<Phil> I mean, is the dll file in your path?
16:48:41FromDiscord<danvenn> that's what big -L is for though right
16:49:07FromDiscord<gyatsoyt> In reply to @inventormatt "I'm not sure which": I am using Py2nim not py2nim... ↵This is confusing btw
16:49:09FromDiscord<danvenn> I don't think this practice of keeping shared libraries for many apps makes sense in the world of TB hard drives
16:49:17FromDiscord<danvenn> just causes huge headaches
16:49:19FromDiscord<Phil> > -l option links specified library. For example, -lvector3 searchs directories for libvector3.a (vector3.lib on Windows). -lm option links the library that provides functions in math.h.
16:49:36FromDiscord<danvenn> -L is different to -l
16:49:43FromDiscord<danvenn> because programmers are annoying like that 😉
16:50:06FromDiscord<Phil> Ah there we go, -L adds dirs to the Path, check
16:50:26FromDiscord<danvenn> it should be -libpath
16:50:32FromDiscord<danvenn> but that's too many letters
16:50:46FromDiscord<Phil> So basically you're looking for your file in the directory lib/static and in there should be the file libcozo_c
16:50:48FromDiscord<inventormatt> In reply to @gyatsoyt "I am using Py2nim": I'd look in the nimble folder where it was installed and check to see if there is a .exe file there
16:50:59FromDiscord<danvenn> yeah that works fine
16:51:01FromDiscord<gyatsoyt> In reply to @inventormatt "I'd look in the": Okie
16:51:12FromDiscord<danvenn> it tries to link statically , but some other failure occurs
16:51:42FromDiscord<danvenn> the lack of clarity might force me to ditch nim really, even though it seems v powerful
16:51:57FromDiscord<danvenn> trying to do the same thing with a dll just fails
16:52:02FromDiscord<Phil> Do you have a dll file (for windows) in that dir?
16:52:13FromDiscord<danvenn> i change the path to lib/dyn (where the dll is)
16:55:43FromDiscord<whisperecean> is there somewhere an easy setup to have nim with ssl + zig for crossplatform compiling?
16:56:01FromDiscord<Phil> In reply to @whisperecean "is there somewhere an": For easy usage of zig sure, ssl should just be -d:ssl
16:56:27FromDiscord<Phil> -l option links specified library. For example, -lvector3 searchs directories for libvector3.a (vector3.lib on Windows). -lm option links the library that provides functions in math.h.
16:56:30FromDiscord<Phil> (edit) "-l option links specified library. For example, -lvector3 searchs directories for libvector3.a (vector3.lib on Windows). -lm option links the library that provides functions in math.h." => "https://github.com/enthus1ast/zigcc"
16:56:55FromDiscord<Phil> Also: https://stackoverflow.com/questions/73345643/how-to-use-the-zig-compiler-in-order-to-compile-nim-code
16:59:03FromDiscord<whisperecean> Thanks I am gonna try that. Hopefully its setup is not painful
17:00:07*azimut quit (Ping timeout: 240 seconds)
17:00:18FromDiscord<Phil> In reply to @danvenn "i change the path": I think I'm lacking the futhark knowledge here.↵For manual wrapping I'm your guy, futhark you'll need to wait for PMunch, who is the most experienced person for the job
17:01:24*azimut joined #nim
17:02:27FromDiscord<danvenn> In reply to @isofruit "I think I'm lacking": I've just posted an issue in the github so he'll see it 🙂
17:02:37FromDiscord<danvenn> Thanks for trying though!
17:02:42FromDiscord<Phil> In reply to @danvenn "I've just posted an": Oh believe me he'll come here on his own 😄
17:03:26*zgasma joined #nim
17:03:29FromDiscord<whisperecean> What kind of http server should I use by default on linux and are there any nice libs to execute function periodically (cron like style?)
17:04:56FromDiscord<Phil> sent a long message, see <!doctype html>
17:05:20FromDiscord<Phil> (edit)
17:05:31FromDiscord<whisperecean> No, I just want to server karax single page app for visualization and execute a function periodically
17:05:38FromDiscord<whisperecean> the whole project will be 2 lines of nim and karax probably
17:05:53FromDiscord<Phil> ohhhhhhhh okay you just need a server to serve the karax app
17:05:56FromDiscord<Phil> Then yeah, personally nginx
17:06:01FromDiscord<whisperecean> (edit) "lines" => "files"
17:06:09FromDiscord<whisperecean> But I dont want to use nginx
17:06:16FromDiscord<whisperecean> I want it to be a self-contained app
17:06:37FromDiscord<odexine> not exactly recommended to do so
17:06:47FromDiscord<whisperecean> It wont be internet facing
17:06:57FromDiscord<Phil> So you want to serve sth on localhost
17:06:59FromDiscord<whisperecean> it will run as a pod in k8s
17:07:07FromDiscord<Phil> Ah, intranet
17:07:24FromDiscord<whisperecean> it will run some calculation and the karax page will be just for visual debugging
17:08:44FromDiscord<Phil> If you want to write 2 projects (a tiny http server that only serves a file and your karax app) then you could try your luck with asynchttpserver?↵Honestly I'd still default to nginx & friends simply because they're "standard"
17:08:52FromDiscord<Phil> (edit) "If you want to write 2 projects (a tiny http server that only serves a file and your karax app) then you could try your luck with asynchttpserver?↵Honestly I'd still default to nginx & friends simply because they're "standard" ... " added "for file serving etc."
17:09:02FromDiscord<Phil> (edit) "asynchttpserver?↵Honestly" => "std/asynchttpserver?↵Honestly"
17:09:07FromDiscord<Phil> https://nim-lang.org/docs/asynchttpserver.html
17:09:48FromDiscord<Phil> There's an implicit cost associated with using non-standard things, even if they're overkill
17:13:37NimEventerNew thread by nimaoth: Absytree: Text editor (and tree based language framework) in Nim, see https://forum.nim-lang.org/t/10853
17:17:16FromDiscord<leorize> I don't have any such intentions lol. I just thought that polling that way is too inefficient↵(@Phil)
17:17:45FromDiscord<Phil> I mean, it is, but the alternative (push) would require a queue that I register a callback with that the queue then calls, no?
17:18:09FromDiscord<Phil> I don't think any of the queue's I've integrated provide that so far
17:19:51FromDiscord<Phil> The only way to do that would be to write my own queue
17:20:06FromDiscord<Phil> Or find a project that does provide that and ditch all the queues I've provided so far
17:20:16FromDiscord<Phil> (edit) "provided" => "implemented support for"
17:20:52FromDiscord<Phil (he/him)> Bridge deded
17:21:07FromDiscord<leorize> you don't need anything that fancy...
17:21:31FromDiscord<Phil (he/him)> Why a known buggy pattern?↵It's just 2 threads entirely independently existing alongside one another, then during one of its loops thread A sends a message and thread B eventually reads it from its queue. Where's the conceptual bug?
17:22:46FromDiscord<Phil (he/him)> The pattern seemed stable enough to me that I dismissed the report from tsan as a false positive honestly
17:23:40FromDiscord<leorize> hmm I'm trying to understand the report
17:24:32FromDiscord<Phil> Want the code of the 2 loops that run?
17:24:54FromDiscord<leorize> it seems that you really have a race, but saved by the sleep, which is why it was complaining
17:25:22FromDiscord<leorize> see https://github.com/google/sanitizers/wiki/ThreadSanitizerReportFormat
17:25:54FromDiscord<leorize> > It is added in the following situation. Thread 1 had done the first conflicting memory access. Then thread 2 had executed some sleep function (sleep(), usleep(), nanosleep(), etc), and then had done the second conflicting access. The stack trace can be useful, because tests frequently "synchronize" this way.
17:27:05FromDiscord<Phil> But that's just "Thread A read from channel, then sleeps, while it sleeps Thread B writes to channel, now Thread A reads from channel again"
17:27:25FromDiscord<Phil> That's not a bug, that's the design.↵It's interpreting the continuous polling as the datarace then
17:27:47FromDiscord<Phil> (edit) "That's not a bug, that's the design.↵It's interpreting the continuous polling ... as" added "with "hotspin-prevention-sleep""
17:28:16FromDiscord<leorize> I don't think so, but ig try using a different channel and see if it's still complaining
17:28:32FromDiscord<leorize> I think threading have a different implementation?
17:29:48FromDiscord<Phil (he/him)> You'll be laughing, that was threading
17:29:59FromDiscord<Phil (he/him)> I can try with loony if you think that's safer
17:30:13FromDiscord<leorize> though fwiw the pattern is bad in the first place, not because of races but because of the arbitrary wait time↵(@Phil)
17:31:06FromDiscord<Phil (he/him)> Is this why you wanted me to go for putting things in the async-queue?
17:31:13FromDiscord<leorize> there's a couple tricks to handling this, but I'll have to check if they're safe real quick
17:31:26FromDiscord<leorize> pretty much
17:32:21FromDiscord<Phil (he/him)> But i mean I'd still need to check with "hasPendingOperations()"↵Because there may be scenarios where no message is coming and the queue is empty, calling poll on that empty queue would just error out then
17:33:27FromDiscord<Phil (he/him)> sent a code paste, see https://play.nim-lang.org/#ix=html>
17:33:49*rockcavera quit (Remote host closed the connection)
17:34:02FromDiscord<Phil (he/him)> Or I guess the try-catch block would be moved to be somewhere else
17:35:57FromDiscord<leorize> don't worry, the way I'm thinking of won't leave you with an empty queue, ever
17:36:05FromDiscord<leorize> a trick I have in mind is to use an eventfd from asyncdispatch
17:36:52FromDiscord<leorize> you then spawn an another thread that receives message to a memory location
17:37:12FromDiscord<leorize> once the message is received, signal it via the event token
17:37:23FromDiscord<leorize> and it will be pushed to asyncdispatch queue
17:37:25FromDiscord<leorize> stuff like that
17:38:15FromDiscord<Phil (he/him)> So now I have 3 threads?↵Main thread, helper thread pushing things into asyncfd and "poll" just perpetually tries to read events from asyncfd?
17:38:56FromDiscord<Phil (he/him)> Or I guess the main thread would push stuff to asyncfd
17:39:44FromDiscord<leorize> pretty much, you can implement this however
17:39:52FromDiscord<Phil (he/him)> Btw. is zevv in the cyo discord? Or active at all in any distantly related nim community?
17:40:35*rockcavera joined #nim
17:42:53NimEventerNew thread by Strinnityk: How to mock overloaded function, see https://forum.nim-lang.org/t/10855
17:43:21FromDiscord<Phil (he/him)> I mean, I don't know said corner and I'd be happy to chat assuming the fact that I mostly want to talk tech and mostly plan to remain on nim is not a problem (?)
17:43:21FromDiscord<Phil (he/him)> Thank!
17:43:21FromDiscord<leorize> I'll pm you the matrix
17:43:23FromDiscord<leorize> actually it might be faster for you to just join CPS channel\: [#cps\:matrix.org](https://matrix.to/#/#cps:matrix.org)
17:45:20FromDiscord<leorize> zevv is on the IRC side of that place, so if you ping him he should answer
17:45:40FromDiscord<asakura44> where to ask for help ?
17:45:52FromDiscord<leorize> disruptek's corner is doing LLM shenanigans so it's kinda spammy rn
17:45:53FromDiscord<Phil> This is the channel for general nim question
17:45:55FromDiscord<Phil> s
17:46:14FromDiscord<asakura44> https://media.discordapp.net/attachments/371759389889003532/1192886789254434856/214.PNG?ex=65aab565&is=65984065&hm=4170424c0d1b58bbbf9344f3bd78a3d38ed9c5160e3b72fe4c5c01cb16b30cc8&
17:46:20FromDiscord<asakura44> what is the issue here ?
17:46:56FromDiscord<pengwyns> You know what, installing every package ever is a great way to find broken packages quickly
17:47:10FromDiscord<asakura44> yeah
17:47:26FromDiscord<asakura44> can you help mate ?
17:48:18FromDiscord<khazakar> Did you installed needed package?
17:48:23FromDiscord<asakura44> yes
17:48:32FromDiscord<asakura44> nimble install nigui
17:48:35FromDiscord<asakura44> successful
17:48:42FromDiscord<pengwyns> Are you trying to build this program via nimble?
17:48:54FromDiscord<pengwyns> If so then you might have to insert your dependency into the .nimble file
17:48:58FromDiscord<asakura44> no i ran the source file from vscode
17:49:22FromDiscord<asakura44> how am i suppose to build the program ?
17:49:48FromDiscord<pengwyns> I typically build using the nimble tool but, try running just the import statement via vscode.
17:50:00FromDiscord<pengwyns> Maybe vscode isn't able to find the nigui library
17:50:16FromDiscord<asakura44> nimble build codes.nim ?
17:51:14FromDiscord<pengwyns> No, thats not the way you use nimble normally. You can also try just building using nim: "nim c -d:release codes.nim"
17:51:17FromDiscord<pengwyns> maybe that will work
17:51:48FromDiscord<asakura44> https://media.discordapp.net/attachments/371759389889003532/1192888192479805513/6354.PNG?ex=65aab6b3&is=659841b3&hm=5c8b900948dbe2a45ae7944e538b3199086784d7974bf46344bcbf4e1d06cb6b&
17:52:45FromDiscord<asakura44> same error
17:52:46FromDiscord<asakura44> https://media.discordapp.net/attachments/371759389889003532/1192888431815176202/214.PNG?ex=65aab6ec&is=659841ec&hm=68b8e560e94e10f9cf34b21829ca1abbd54a20bbea5f9f258436debd925dc1ff&
17:52:52FromDiscord<asakura44> to this
17:52:56FromDiscord<asakura44> i tried with cmd
17:53:05FromDiscord<pengwyns> Strange...
17:53:17FromDiscord<asakura44> https://media.discordapp.net/attachments/371759389889003532/1192888564556501073/312.PNG?ex=65aab70c&is=6598420c&hm=55ef7a26ceea8ed52cc85c68debd266a3a1d91296da95414c7d2b5e6c133320a&
17:54:10FromDiscord<khazakar> Check docs for version you have installed. I will test it on my side as well when I will be back at home
17:54:31FromDiscord<asakura44> In reply to @khazakar "Check docs for version": thanks mate i appreciate your comment
17:55:35FromDiscord<khazakar> https://github.com/simonkrauter/NiGui/blob/master/examples/example_01_basic_app.nim
17:55:44FromDiscord<khazakar> Run this one first
17:58:55FromDiscord<asakura44> awwwww
17:58:58FromDiscord<asakura44> it works
17:59:06FromDiscord<asakura44> https://media.discordapp.net/attachments/371759389889003532/1192890030746775633/3131313.PNG?ex=65aab86a&is=6598436a&hm=c40ad892ebc47208798b836d29910cd61a73b28246a7146b62d21029895d4fd9&
17:59:14FromDiscord<asakura44> hhhhh
17:59:16FromDiscord<asakura44> awesome
17:59:25FromDiscord<asakura44> 😃
18:00:35FromDiscord<asakura44> so coool
18:18:41*jmdaemon quit (Ping timeout: 260 seconds)
19:17:06FromDiscord<griffith1deadly> the biggest reason I love nim so much is the macros :p
19:19:16FromDiscord<srabb> In reply to @leorize "disruptek's corner is doing": what app are the bot guys using to chat
19:21:08FromDiscord<Phil (he/him)> I use fractal when I'm on matrix
19:21:26FromDiscord<Phil (he/him)> Because god damn do I love the GTK feel and how it maximized the screenspace usage
19:21:32FromDiscord<srabb> what is fractal and what is matrix
19:21:54FromDiscord<Phil (he/him)> Okay so have you ever heard of mastodon?
19:22:00FromDiscord<Phil (he/him)> Or lemmy?
19:22:08FromDiscord<srabb> ive heard of mastodon
19:22:14FromDiscord<srabb> i think its like a twitter alternative
19:22:22FromDiscord<srabb> but you host your own communities
19:22:45FromDiscord<Phil (he/him)> Matrix is to discord roughly what mastodon is to X/Twitter etc.Instead of one central server, matrix is a bunch of different servers that are easy to self-host that can talk to one another.
19:23:00Amun-Rasrabb: and there are several IRC clients
19:23:05FromDiscord<srabb> im gonna try it out
19:23:18FromDiscord<srabb> and how do i join the nim server
19:23:20FromDiscord<srabb> from matric
19:23:24Amun-RaI'm using https://weechat.org/about/screenshots/
19:23:39FromDiscord<leorize> [#nim\:envs.net](https://matrix.to/#/#nim:envs.net)
19:23:42FromDiscord<srabb> In reply to @Amun-Ra "I'm using https://weechat.org/about/screenshots/": vim
19:23:44FromDiscord<Phil (he/him)> It is easy to start up your own instance of mastodon/lemmy/matrix that can communicate with other instances to chat. Though you definitely do not need to, you can just join somebody else's instance that can communicate with the instance where the nim rooms are on
19:24:08FromDiscord<Phil (he/him)> image.png https://media.discordapp.net/attachments/371759389889003532/1192911427372069014/image.png?ex=65aacc57&is=65985757&hm=f55e4b459ababc63d52a7554e84f8414372b60168c0954845965ad06a5e07477&
19:24:23FromDiscord<srabb> In reply to @Phil (he/him) "image.png": is that cinny?
19:24:26FromDiscord<srabb> what client do you use
19:24:27FromDiscord<Phil (he/him)> Fractal btw\:
19:24:34FromDiscord<srabb> oh yeah
19:24:39FromDiscord<leorize> https://servers.joinmatrix.org/ \<- for picking a server
19:24:55FromDiscord<Phil (he/him)> Nope, fractal. Cinny is nice, but imo blocks too much when loading a server
19:25:16FromDiscord<Phil (he/him)> Fractal does not do that (as much) and the gtk base is more pleasant to use (for me, as a Gnome user that likes the DE)
19:25:17FromDiscord<leorize> cinny is dead slow somehow
19:25:20FromDiscord<srabb> what the hell is a flatpakref https://media.discordapp.net/attachments/371759389889003532/1192911728661512203/image.png?ex=65aacc9f&is=6598579f&hm=cad6bff14f6aea72d10d17e48b6cf75a5b014093f23f6ee1cb09629891475813&
19:25:45FromDiscord<srabb> oh yeah i use windows btw
19:25:46FromDiscord<Phil (he/him)> Are you on windows or on Linux?
19:25:59FromDiscord<Phil (he/him)> Well, the best client might be element anyway overall
19:27:52FromDiscord<Phil (he/him)> But I just like fractal's design
19:27:52FromDiscord<leorize> element or fluffychat are the two better ones there
19:27:54FromDiscord<leorize> I use element on desktop and fluffy on mobile
19:27:55FromDiscord<Phil (he/him)> Element on mobile and fractal on desktop
19:27:55FromDiscord<leorize> though i'd use element x if my home server can do sliding sync
19:27:55FromDiscord<Phil (he/him)> Though for moderating fractal sadly is ass, so I jump over to the element webpage when that comes up
19:27:56FromDiscord<leorize> since you're on matrix.org @[Phil (he&#47;him)], try element x
19:27:57FromDiscord<leorize> it's the fastest client I've ever used
19:27:58FromDiscord<Phil (he/him)> element x ?
19:28:12FromDiscord<Phil (he/him)> I know element, but x?
19:28:14FromDiscord<leorize> yea it's a part of the matrix 2.0 initiative
19:28:22FromDiscord<leorize> you can find it in app stores
19:28:26FromDiscord<srabb> hi
19:28:38FromDiscord<srabb> hi
19:29:18FromDiscord<srabb> why cant i see my own messages on matrix
19:32:41FromDiscord<srabb> ok, i can there is just an unbearable delay
19:32:41FromDiscord<Phil (he/him)> You can, the bridge connecting matrix and discord is just slow sometimes
19:32:42FromDiscord<srabb> can i make voice calls through matrix?
19:32:42FromDiscord<leorize> that's what happens when you use a bridge that's also used by 100+ other rooms
19:32:42FromDiscord<leorize> yes you can
19:32:43FromDiscord<srabb> cool \:P
19:35:12FromDiscord<Phil (he/him)> element x looks a lot more like stuff like signal
19:35:15FromDiscord<Phil (he/him)> huh
19:52:26FromDiscord<pengwyns> My .nimble/ folder has reached 278 megabytes, and has 236 unique packages.'
19:52:42FromDiscord<pengwyns> This was a bad idea.
19:57:41Amun-Raspeaking of nimble, is there an easy way of puging old package versions?
19:58:46FromDiscord<pengwyns> Im not sure to be honest
20:00:22Amun-RaI think I'll write a script for this
20:04:54FromDiscord<Phil (he/him)> No direct command. You could just delete the pkgs folder in your nimble dir↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
20:05:15Amun-Rathat's also the way to do it :)
20:05:28Amun-Ras/the/a/
20:08:33FromDiscord<leorize> I use nimble in localdeps mode all the time to avoid this
20:11:09Amun-Rahmm
20:15:08FromDiscord<graveflo> In reply to @NimEventer "New thread by Strinnityk:": I was just talking about doing this the other day
21:25:58FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=html>
21:31:39FromDiscord<graveflo> does it return a tuple of `(bool, string)` ? `: bool {.noSideEffect.}, string` looks weird
21:32:11FromDiscord<aintea> Nope, returns a tuple of a func and a string
21:32:27FromDiscord<graveflo> ok the seq contains tuple of of `proc` and `string`
21:33:06FromDiscord<aintea> yes
21:33:36FromDiscord<aintea> I tried adding parenthesis in case the nim compiler didn't understand well the seq type but it still doesn't works
21:33:40FromDiscord<aintea> (edit) "works" => "work"
21:34:06FromDiscord<graveflo> I'll try some stuff but i have to boot up my dev env
21:34:24FromDiscord<aintea> no problem, if you find something could you please ping me ?
21:37:09FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html>
21:37:48FromDiscord<aintea> already looks good if that works
21:38:06FromDiscord<aintea> But thanks for answering that fast
21:38:07FromDiscord<Phil> You're running into closure issues
21:38:18FromDiscord<aintea> What are closure issues ?
21:39:21FromDiscord<Phil> Essentially, it's expecting `seq[(proc (n: int): bool{.closure, noSideEffect.}, string)`↵As the return type.↵That is because proc-types by default are assumed to be closures in nim and thus the pragma implicitly gets added.↵Your procs aren't closures though, so it blows up
21:39:32FromDiscord<Phil> A "normal" proc like you have is nimcall
21:39:45FromDiscord<aintea> Ohhhhh
21:40:04FromDiscord<aintea> So what would be the non problematic way ?
21:40:16FromDiscord<Phil> Currently fiddling around there regarding that
21:40:43FromDiscord<graveflo> you can just add the `closure` pragma to the types
21:40:55FromDiscord<graveflo> but I don't like that tbh
21:41:10FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
21:41:14FromDiscord<Phil> Or make it all nimcall
21:41:32FromDiscord<leorize> or you can just use inference
21:41:33FromDiscord<Phil> (edit)
21:41:40FromDiscord<aintea> With auto ?
21:41:41FromDiscord<Phil> Don't even need the inner nimcalls that I previously added there
21:41:53FromDiscord<aintea> Or the auto keyword equivalent in nim
21:42:24FromDiscord<Phil> Auto exists in nim and does the same
21:42:33FromDiscord<Phil> It's one of like 3-4 ways of making a generic
21:43:37FromDiscord<aintea> Then thank you guys, looks like my problem is solved, thanks for answering this fast$
21:43:39FromDiscord<aintea> (edit) "fast$" => "fast"
21:43:48FromDiscord<graveflo> the bare `proc` generic that I orginally posted would be the most idiomatic way of doing "auto" liek generics here I think
21:44:11FromDiscord<Phil> Yeah, I agree on that one
21:44:45FromDiscord<Phil> The entire closure problem is just one @aintea will slam into so very often (because I certainly did) that I thought it would make sense to elaborate on it
22:37:19*azimut quit (Ping timeout: 240 seconds)
22:51:01FromDiscord<Elegantbeef> @graveflo Awww I was too optimistic with beneficial your changes would be to my GUI code. I still require procedures to call the implementation procs
22:51:58FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
22:52:17FromDiscord<Elegantbeef> But then again I'm the schmuck that made statically typed GUI framework
22:57:21FromDiscord<graveflo> hmmm. How does this work exactly?
22:57:30FromDiscord<graveflo> looks kinda weird
22:57:47FromDiscord<Elegantbeef> Generics, lots and lots of generics
22:58:40FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
22:58:57FromDiscord<albassort> beef you just made gtk but native nim
22:59:07FromDiscord<Elegantbeef> Element is a concept as is UI state
22:59:30FromDiscord<albassort> i guess in gtk its less generic
22:59:38FromDiscord<albassort> onExit would be a signal and not a state
22:59:47FromDiscord<Elegantbeef> Sadly the dispatcher does not consider `proc onEnter[Base, T](slider: HorizontalSliderBase[Base, T], uiState: var UiState)` as more of a match than the double generic
22:59:56FromDiscord<albassort> (edit) "signal and not a state" => "signal->proc"
23:00:01FromDiscord<Elegantbeef> I mean this was made for game UI so it's nothing like gtk
23:00:03FromDiscord<albassort> (edit) "signal->proc" => "signal- enum>proc"
23:00:12FromDiscord<albassort> i meant typing wise
23:00:43FromDiscord<albassort> game ui? just uhh idk
23:00:43FromDiscord<albassort> dont
23:01:42FromDiscord<Elegantbeef> Eh being able to make game UI is a nice thing to have
23:01:52FromDiscord<Elegantbeef> Whether using the system I used was intelligent is another
23:03:30FromDiscord<graveflo> if you can constrain `T` it might work.. but that is weird
23:04:16FromDiscord<Elegantbeef> It's not that weird, it's just silliness of my code design
23:04:47FromDiscord<graveflo> well maybe, but that doesn't mean much unless you want it to LOL
23:05:10FromDiscord<graveflo> maybe it has something to do with `Element` being a concept. oh well
23:05:33FromDiscord<albassort> https://www.eurogamer.net/when-the-developers-of-dwarf-fortress-die-a-museum-gets-the-game#:~:text=When%20the%20developers%20of%20Dwarf%20Fortress%2C%20one%20of%20the%20most,creator%20Tarn%20Adams%20told%20Eurogamer.
23:05:40FromDiscord<Elegantbeef> I mean I am afterall doing `type HorizontalSliderBase[Base, T] = ref object of Element[T]` 😄
23:05:40FromDiscord<Elegantbeef> Or whateve
23:06:17FromDiscord<Elegantbeef> Sorry that's `ref object of Base`
23:06:20FromDiscord<leorize> elm-style state manipulation is probably the key here
23:06:41FromDiscord<Elegantbeef> Those are words
23:07:45FromDiscord<graveflo> I still want to propose a change to generic inheritance but I haven't worked up the audacity to make an RFC yet
23:17:46FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html>
23:18:15FromDiscord<Elegantbeef> https://github.com/beef331/gooey/blob/master/example/sdlimpl.nim#L191-L197
23:18:23FromDiscord<Elegantbeef> I do not have a min example
23:21:24FromDiscord<Elegantbeef> I think it's safe to say I shall never be given a type system
23:27:18FromDiscord<auxym> In reply to @pmunch "Maybe I can finally": It's bindings to tinyusb, which doesn't support anything AVR, unfortunately (https://docs.tinyusb.org/en/latest/reference/supported.html#supported-mcus). I just re-implemented the descriptors in Nim (bunch of constants and object types) in Nim, because TinyUSB heavily uses a mess of C macros for those.
23:28:03FromDiscord<auxym> I guess you'd need bindings to V-USB rather, since attiny doesn't have USB hardware peripheral
23:28:13*advesperacit quit ()
23:29:11*azimut joined #nim
23:29:20FromDiscord<pmunch> Ah crap, I mixed up my libraries
23:29:49FromDiscord<srabb> how do i do syntax highlighting on matrix
23:30:07FromDiscord<Elegantbeef> Depends on your client, but you just use normal markdown
23:30:27FromDiscord<srabb> i use element
23:30:28FromDiscord<Elegantbeef> so three backticks before and after and the language after the first three
23:30:31FromDiscord<Elegantbeef> Though element infers language
23:31:45FromDiscord<srabb> sent a code paste, see https://play.nim-lang.org/#ix=html>
23:31:45FromDiscord<srabb> oh it works
23:31:48FromDiscord<Elegantbeef> Indeed
23:47:22FromDiscord<graveflo> In reply to @Elegantbeef "https://github.com/beef331/gooey/blob/master/exampl": did you intentionally re-declare `Element` in both `gooey.nim` and `sdlimpl.nim` ?
23:49:45FromDiscord<Elegantbeef> Yes
23:50:05FromDiscord<graveflo> ok just checking bc you said it a concept but linked a module where it isn't a concept
23:50:39FromDiscord<Elegantbeef> Right cause sdlimpl implements
23:50:50FromDiscord<Elegantbeef> Gooey is agnostic
23:50:58FromDiscord<Elegantbeef> sdlimpl solidifies that agnosticism
23:51:24FromDiscord<Elegantbeef> I guess it's more correct to say it removes that agnosticism
23:51:31FromDiscord<Elegantbeef> Given what "agnostic" means 😄
23:54:43FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>