<< 26-11-2022 >>

00:00:45FromDiscord<@thatrandomperson5-6310e3b26da03> Thats not gonna work if my file changes↵(@voidwalker)
00:01:13FromDiscord<voidwalker> well how are we supposed what you consider to be wrong ? the input data ? The toHex implementation ? your computer ?
00:01:22FromDiscord<voidwalker> (edit) "well how are we supposed ... what" added "to know"
00:02:41FromDiscord<@thatrandomperson5-6310e3b26da03> The tohex result is the part that is changing. The orginal data stays the same. Im asking why it changed and how to fix it↵(@voidwalker)
00:03:44FromDiscord<voidwalker> how are we supposed to know what your code does, with no context ?
00:04:06FromDiscord<voidwalker> ok then, blame it on the cosmic rays messing with your memory : )
00:07:14FromDiscord<@thatrandomperson5-6310e3b26da03> Have some bytes as input then apply toHex, what else do you need?↵(@voidwalker)
00:08:01FromDiscord<Karspep> Hello, I would like to know if someone can help me to configure a debugger for Nim in Windows 10
00:32:23*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
00:35:16*jmdaemon joined #nim
00:38:19*Ziw quit (Quit: WeeChat 2.8)
00:43:02FromDiscord<voidwalker> Is it possible to define a proc that defines what value should be returned when accessing an object variable of a certain type (just the var name, no fields) ?
00:43:27FromDiscord<Elegantbeef> What?
00:44:23arkanoidis it possible to convert a flat object to a tuple?
00:45:05FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4gSv
00:46:04FromDiscord<Elegantbeef> What doesnt work there?
00:46:20FromDiscord<voidwalker> well, for echo I can define a string return proc, but in general, would it be possible to alias x to return a certain seq ?
00:46:49arkanoidI mean, convert an object to a named tuple without manually copying each field. Even better would be to cast it to avoid copy
00:46:55FromDiscord<Elegantbeef> You can make a converter but no you cannot make `x` do something different
00:47:08FromDiscord<Elegantbeef> Objects and tuples might not be the same size↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>)
00:48:12FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4gSw
00:49:11FromDiscord<Elegantbeef> If you just want to convert an object to a tuple i'd say make a macro, or use something like `assigns`
00:49:20FromDiscord<Elegantbeef> https://github.com/metagn/assigns
00:49:55FromDiscord<voidwalker> still don't get why I should convert it into a tuple ?
00:50:12FromDiscord<Elegantbeef> Arkanoid is also asking a question
00:50:18FromDiscord<Elegantbeef> The world doesnt revolve around you VOID! 😛
00:50:21arkanoidthanks Elegantbeef. Let me explain why I need it
00:51:01FromDiscord<voidwalker> ah lol great timing
00:55:09arkanoidI'm writing nim code meant to be called from python, using nimpy {.exportpy.} macro. If I create "func test(foo: MyObject): MyOtherObject {.exportpy.}" what I get in python is "test(foo: dict): dict". If I write instead "func test(a: float, b: float, c: float): tuple[a: float, b: float, c: float] {.exportpy.}" in python I get "test(a: float, b: float, c: float): tuple[float, float, float]", which is
00:55:11arkanoidmuch more "pythonish". So what I need is a converter from MyObject/MyOtherObject to tuple, to make python happy
00:55:34FromDiscord<Elegantbeef> Well then a macro is what you need
00:56:02FromDiscord<voidwalker> so I was talking about dictionary encoding earlier, if there's any libs.. didn't get any reply, so I thought to try write a basic generic one. dictComp object is supposed to keep a sequence compressed using an index seq and a dictionary sequence of the type to be stored. Of course storing the original data itself would defeat the purpose of having lower memory usage.
00:57:42FromDiscord<voidwalker> So it seems I could write a `[]` proc for that object even though it's not a seq. Now what I want is some way to return the whole "decoded" sequence of data. One way would be to define a proc and a proc var inside the object, that returns it.
00:58:14FromDiscord<voidwalker> But I was asking if there is a way to return it simply by giving the var name
00:59:09NimEventerNew thread by RodSteward: Initial OS porting experience, see https://forum.nim-lang.org/t/9656
01:02:01FromDiscord<voidwalker> If I write a converter, that can only be used in places where the converted-to type is expected, right ?
01:06:33FromDiscord<Elegantbeef> Correct
01:06:41FromDiscord<Elegantbeef> I'm still uncertain what you're after
01:07:01FromDiscord<Elegantbeef> You could always use a sink parameter to give the memory to this new object then interface with it
01:07:09FromDiscord<Elegantbeef> This way you dont copy memory but dont reallocate
01:07:40*disso_peach joined #nim
01:09:16FromDiscord<voidwalker> don't comprehend the sink concept yet : (
01:11:03FromDiscord<Elegantbeef> sink is just an annotation which gives up memory instead of copying
01:12:30FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4gSy
01:12:57FromDiscord<Elegantbeef> Compiling with arc/orc there is no copy here which is confirmed by checking the address of the first element of data
01:14:54FromDiscord<voidwalker> gives up memory, as in, transfers the "ownership" ?
01:15:03FromDiscord<Elegantbeef> yes
01:16:05FromDiscord<Elegantbeef> Of course the above code isnt correct due to having `a` as top level
01:16:38FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4gSz
01:16:51FromDiscord<voidwalker> what's wrong with top level ?
01:17:01FromDiscord<Elegantbeef> Move semantics dont work with top level data
01:17:09FromDiscord<Elegantbeef> It's global data
01:17:20FromDiscord<Elegantbeef> Moving the data is just wrong
01:18:06FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/A4L
01:18:15FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4gSA
01:18:27FromDiscord<Elegantbeef> other than naming the type with a lowecase name 😛
01:18:56FromDiscord<Elegantbeef> What's wrong?
01:19:02FromDiscord<Elegantbeef> That code compiles, no clue if it runs
01:19:12FromDiscord<voidwalker> sent a code paste, see https://paste.rs/5sv
01:19:18FromDiscord<voidwalker> it compiles, but when i try to do an echo x, I get that
01:20:05FromDiscord<Elegantbeef> Your `[]` takes a `uint32`
01:20:32FromDiscord<Elegantbeef> Works fine
01:20:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4gSB
01:20:43FromDiscord<@thatrandomperson5-6310e3b26da03> Seriously, what other info do you need, ive been stuck on this too long. It happens every time, i don’t think it is a biflip
01:21:20FromDiscord<Elegantbeef> !eval import std/strutils; echo 24u8.toHex
01:21:27NimBot18
01:21:34FromDiscord<Elegantbeef> Works fine
01:23:31FromDiscord<Elegantbeef> Provide a case that causes the issue and we can help
01:23:38FromDiscord<Elegantbeef> Otherwise we cannot say anything but "it works"
01:29:30*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
01:32:10FromDiscord<voidwalker> alright, so now I can do echo "2" & x, or echo x. Or x.toSeq to get the actual seq
01:34:13FromDiscord<voidwalker> how come this is not in a lib somewhere though. Nobody cares about saving memory ?
01:35:43FromDiscord<Elegantbeef> Tables already sink values
01:37:17FromDiscord<voidwalker> What does sinking have to do with dictionary encoding ?
01:37:31FromDiscord<Elegantbeef> It doesnt copy the value when you move it to a dictionary
01:37:55FromDiscord<Elegantbeef> It then makes it so it's not as costly to just iterate the table
01:38:52FromDiscord<Elegantbeef> And the `values` iterator yields `lent` values
01:40:51FromDiscord<voidwalker> are we talking about the same thing here ? :\
01:41:37FromDiscord<voidwalker> I was talking about dictionary coding, that is, efficiently (space-wise) storing a large array of relateively few distinct values
01:42:05FromDiscord<Yepoleb> @voidwalker it seems like you're way overcomplicating this. just make seq of your strings, deduplicate it with the deduplicate proc, make a table which maps a string to its seq index and then encode using that table
01:42:42FromDiscord<Elegantbeef> Or continue making your own variant of dictionary coding
01:43:12FromDiscord<voidwalker> @Yepoleb how exactly I am overcomplicating it ? 🙂
01:43:47FromDiscord<voidwalker> that's what I am doing, more or less
01:45:16FromDiscord<voidwalker> @ElegantBeef as opposed to whose variant ?
01:45:40FromDiscord<Elegantbeef> Did i imply there was another version?
01:46:13FromDiscord<voidwalker> I guess not. But why isn't there one ?
01:46:27FromDiscord<Elegantbeef> All things start off unimplemented
01:46:28FromDiscord<voidwalker> This is the second non trivial project I am starting, and the second time I need this
01:46:43FromDiscord<Elegantbeef> I've literally never needed this datatype
01:48:31FromDiscord<Elegantbeef> Though `sets` really needs `sink` annotations
01:52:57FromDiscord<Yepoleb> In reply to @voidwalker "<@144300201857777664> how exactly I": i see you are ending up with quite a simple solution, sorry for my comment then
02:05:14arkanoiddo you know how can I use valgrind to check if my wannabe stack-only application accidentally performs allocations? I want to test my program to be allocation free
02:07:04FromDiscord<Elegantbeef> The dumb thing would be to use `-d:useMalloc` + patchfile to error when the allocator is called 😄
02:08:18arkanoidwell, I've never handled an allocator in my life, I guess it's kinda advanced stuff, isnt it?
02:08:33FromDiscord<Elegantbeef> In your case you dont need to allocate do you?
02:09:24FromDiscord<Elegantbeef> You can just use patchfile with this https://github.com/nim-lang/Nim/blob/141b76e36519219915ada9086d1c9b1d0b465659/lib/system/mm/malloc.nim
02:10:37FromDiscord<Elegantbeef> You probably can also use valgrind
02:10:46FromDiscord<Elegantbeef> This is just a dumb response 😄
02:11:47arkanoidnope, it's very interesting response. I'll try this route
02:12:50arkanoidin the meantime, I've just found a weird behaviour. My program compiles with --panics:off, if I enable panics it fails to compile due to "myfunc can have side effects"
02:12:57FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/7588#48280 should help
02:13:14arkanoidso apparently my funcs gain side effect powers by enabling panics?
02:13:43FromDiscord<Elegantbeef> Huh
02:16:20arkanoidlet's me try to reduce it to minimal example
02:16:27arkanoidthanks for the forum link! exactly what I need
02:20:14*wallabra quit (Ping timeout: 260 seconds)
02:20:57*wallabra joined #nim
02:23:31arkanoidhere it is: works with --panics:off (default), error: side effects with --panics:on https://play.nim-lang.org/#ix=4gSZ
02:24:09arkanoidshould I open an issue on github for this?
02:25:24arkanoiduh, wait, I'm also using some config.nims, it might be relevant, let me isolate the test
02:28:13arkanoidthe error persists even when using --skipUserCfg --skipParentCfg --skipProjCfg, so the link is still valid
02:28:50FromDiscord<Elegantbeef> Yea the issue is that with panics on a procedure calls `sysFatal` which isnt properly sideeffect free
02:29:46FromDiscord<Elegantbeef> Update to 1.6.10
02:29:50arkanoidElegantbeef, I've just found out it is solved in 1.6.10! I was still on 1.6.8
02:30:14FromDiscord<Yepoleb> apparently setting a breakpoint on `malloc` with gdb also works to trap malloc calls
02:30:55FromDiscord<Yepoleb> you can then print a backtrace to find out where it was called
02:31:03FromDiscord<voidwalker> I'm still on 1.6.6 https://archlinux.org/packages/community/x86_64/nim/ :\
02:31:17FromDiscord<Elegantbeef> Oh wow 1.6.10 got my VM `toOpenArray` work 😄
02:31:22FromDiscord<Elegantbeef> Time to use choosenim void
02:31:39FromDiscord<voidwalker> nah it's okay, I'm not bleeding edge following nim limits
02:31:51arkanoidvoidwalker, use choosenim. I've never installed nim from package, and choosenim is great for moving around versions
02:32:04FromDiscord<Elegantbeef> 1.6.10 isnt bleeding edge
02:32:08FromDiscord<Elegantbeef> It's stable
02:32:10FromDiscord<Elegantbeef> Bleeding edge is devel
02:32:13*wallabra quit (Ping timeout: 265 seconds)
02:32:20FromDiscord<voidwalker> I'd really like to not have to use anything but pacman, if it can be avoided. And with nim, so far it can : )
02:32:27*wallabra_ joined #nim
02:32:55FromDiscord<voidwalker> I used pascal's equivalent of choosenim cause there were always bugs and features missing from stable
02:33:25arkanoidvoidwalker, usually it is even better to have software installed as user in user folder. More secure, easier to move around, no root involved
02:33:50FromDiscord<Yepoleb> how is it more secure?
02:34:18FromDiscord<voidwalker> @Arkanoid indeed, I used to do that when I was on windows.. had all my software on a separate usb SSD, portable mode. On Linux, you have to have your whole ~ partition to achieve that
02:34:21arkanoidbecause you don't need admin to install it and execute it
02:34:26*wallabra_ is now known as wallabra
02:34:48FromDiscord<voidwalker> lol since when installing a package on your computer a security risk. anyway it runs as your user, not as root
02:36:35arkanoidvoidwalker, from your words I feel you're not an experienced sysadmin. It is always a security risk to move a finger as root on a shared system. Btw this is offtopic. Btw there are plenty of ways to install everything as user in user folder without messing up shared system
02:36:59FromDiscord<voidwalker> lfmao, nobody ever touches my computers, ever. shared system haha
02:37:47arkanoidnot all users on an unix system are humans :)
02:38:40FromDiscord<Yepoleb> we caring about the security of system users now?
02:42:37FromDiscord<Yepoleb> i too use nim from package
02:43:58arkanoidgood for you! There's also nix if you want best of both worlds
02:48:49FromDiscord<voidwalker> is there no macro to replace `for i in low(aSeq)..high(aSeq): dowhatever(aseq[i])` ?
02:49:21FromDiscord<voidwalker> with `aSeq.justDo(dowhatever(it))`
02:49:23FromDiscord<Yepoleb> do you even need the index?
02:49:26FromDiscord<voidwalker> no
02:50:43FromDiscord<Yepoleb> just use `for element in aSeq: doWhatever(elkement)`
02:50:48FromDiscord<Yepoleb> (edit) "doWhatever(elkement)`" => "doWhatever(element)`"
02:51:00FromDiscord<voidwalker> the ones in sequtils all seem to want to mutate the original seq or yield another seq
02:52:20FromDiscord<Yepoleb> do you not want some result from your operation?
02:52:43FromDiscord<voidwalker> in this case, obviously not
02:52:53FromDiscord<huantian> What’s wrong with just a for looo
02:52:56FromDiscord<huantian> Loop
02:53:11FromDiscord<Yepoleb> hello huantian
02:53:24FromDiscord<huantian> Ello
02:53:50FromDiscord<voidwalker> Ever since I discovered map and the other macros, I feel I am doing it wrong with the fors. Also, for takes two lines for no reason
02:54:30FromDiscord<huantian> If you’re calling the function for it’s side effect, a normal for is the idiomatic way to do it
02:54:45FromDiscord<huantian> And you can put it on one line if you want, personally I don’t but you do you
02:56:08FromDiscord<voidwalker> nah it feels wrong, it was not meant to be on one line : )
02:56:28FromDiscord<Yepoleb> 🤔
03:07:10*neceve quit (Quit: ZNC - https://znc.in)
03:08:28*neceve joined #nim
03:15:25arkanoiddamn, valgrind (massif) is able to tell me the total heap allocation bytes during program execution, but not the total number of allocations. Using arc I might be allocating/deallocating very fast and not catching the mallocs
03:15:36*arkurious quit (Quit: Leaving)
03:16:01arkanoidI just see a constant use of 72712B if heap
03:16:28arkanoiddoes this ring a bell? is 72712B the heap size required by nim runtime?
03:22:54FromDiscord<scarf> can i request rfc to be reviewed again?
03:25:20FromDiscord<Elegantbeef> You can always bump it
03:30:15FromDiscord<Yepoleb> Why do you even care about heap allocations?
03:30:31*rockcavera quit (Remote host closed the connection)
04:22:49FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4gTm
04:34:32FromDiscord<voidwalker> looks good to me
04:34:35FromDiscord<sOkam!> well it seems like that example is correct. so the issue must be with the function im calling↵https://play.nim-lang.org/#ix=4gTr
04:38:39FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4gTs
04:42:49FromDiscord<sOkam!> if I say `TileType.spike.ord` manuallly, the issue goes away. so it seems to be failing at resolving the converter 🤷‍♂️
04:43:43FromDiscord<Elegantbeef> Does turning `genSpike` into a proc fix anything?
04:45:20FromDiscord<sOkam!> it changes the nimsuggest error position to the genSpike line, instead of the call to it. but the rest stays the same (errors too)
04:45:47FromDiscord<Elegantbeef> is there a generic `mset` procedure?
04:45:56FromDiscord<Elegantbeef> converters are not used in generic procedures
04:46:04FromDiscord<sOkam!> i have no clue
04:47:23FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4gTt
04:48:20FromDiscord<Elegantbeef> is Pint a generic?
04:49:29FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4gTu
04:49:40FromDiscord<Elegantbeef> Then i dont know what to say
04:51:46FromDiscord<sOkam!> if i call for the converter directly, it also seems to work 🤷‍♂️
04:51:56FromDiscord<sOkam!> (edit) "directly," => "directly by name,"
04:56:04FromDiscord<Elegantbeef> Something is causing the converter dispatch to not fire
05:01:46FromDiscord<voidwalker> today I learned that you can have a typedesc as proc parameter, and thus be able to call a proc like `var x = DictComp.init(data)`. Sort of feels like it's a class : ) thx beef
05:05:54*Jjp137 quit (Ping timeout: 260 seconds)
05:13:28*Jjp137 joined #nim
05:27:27FromDiscord<yrashk> sent a code paste, see https://play.nim-lang.org/#ix=4gTC
05:31:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4gTE
06:57:07*rockcavera joined #nim
07:40:45NimEventerNew thread by void09: Any libraries for dictionary coding (compression) of array structures ?, see https://forum.nim-lang.org/t/9657
07:45:41*tiorock joined #nim
07:45:41*tiorock quit (Changing host)
07:45:41*tiorock joined #nim
07:45:41*rockcavera is now known as Guest5445
07:45:41*Guest5445 quit (Killed (lead.libera.chat (Nickname regained by services)))
07:45:41*tiorock is now known as rockcavera
08:29:06*junaid_ joined #nim
08:29:28FromDiscord<SteveGremory> sent a code paste, see https://play.nim-lang.org/#ix=4gU6
08:30:07FromDiscord<SteveGremory> weird how it actually works with `ForegroundColor` but not just any `Color` even though it has a declaration for it
09:53:37*pro joined #nim
10:01:26*pro left #nim (#nim)
10:05:30*dnh joined #nim
10:12:01*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:21:51*pro1 joined #nim
10:28:27*pro1 quit (Quit: pro1)
10:28:42*pro joined #nim
10:35:08FromDiscord<Corazone> Hi all, recently i posted on nim subbredit about file transfer and TCP, long story short, file transfer is working, however im not sure im doing it the right way. Here is the code:
10:35:44FromDiscord<Corazone> sent a long message, see http://ix.io/4gUp
10:36:43*dnh joined #nim
10:37:15FromDiscord<Corazone> i know for sure that client.recv(10000000) should not hold that number but i dont know how to send the file size from the client, because send() function takes socket and a string as an argument
10:38:12FromDiscord<Corazone> is there any way to send a struct or and object containing file name, file size and file content?
10:38:26FromDiscord<Corazone> any help is more than appreciated
10:40:30*pro quit (Quit: pro)
10:50:00*jmdaemon quit (Ping timeout: 264 seconds)
10:54:58*jjido joined #nim
10:59:35*jjido quit (Ping timeout: 264 seconds)
11:16:37FromDiscord<hotdog> In reply to @Corazone "i know for sure": What about sending the content length first, http header style?
11:23:37pbotfullertonDo you control the client and the server, just the server, just the client?
11:25:23*junaid_ quit (Remote host closed the connection)
11:28:43FromDiscord<Corazone> In reply to @hotdog "What about sending the": I will try that, thanks
11:28:54FromDiscord<Corazone> In reply to @pbotfullerton "Do you control the": Both
11:29:43pbotfullertonOh in that case why not send the first 4-8 bytes as the size of the rest of the content?
11:30:15pbotfullertonYou do a recv(4), get the size and recv the rest
11:37:48NimEventerNew thread by japplegame: Weird ICE, see https://forum.nim-lang.org/t/9658
11:39:24FromDiscord<Phil> ... I kinda wanna have enums with multiple values now
11:39:46FromDiscord<Phil> I know I can achieve that kind-of by doing a hashmap which takes an enum as keys, but that still feels kinda indirect
11:40:12FromDiscord<Phil> (edit) "... I kinda wanna have enums ... with" added "that I can directly associate"
11:44:51FromDiscord<Phil> sent a long message, see http://ix.io/4gUR
11:55:49FromDiscord<untoreh> sent a code paste, see https://play.nim-lang.org/#ix=4gUV
12:11:28FromDiscord<auxym> In reply to @Isofruit "... I kinda wanna": Ha, I had the same thought in a fully different context. Implementing bindings to TinyUSB, there are constants (eg device subclass) where the meaning of a value is dependent on another (eg device subclass). The best I could come up with is distinct int types and consts of that type.
12:13:55NimEventerNew thread by RodSteward: Plans for improving tagged enum (ADT) syntax?, see https://forum.nim-lang.org/t/9659
12:21:04FromDiscord<Jessa> sent a code paste, see https://paste.rs/Mzy
12:24:36FromDiscord<Rika> https://nim-lang.org/docs/strutils.html#parseEnum%2Cstring
12:25:05FromDiscord<Jessa> ah ,thank you
12:37:18*Guest8783 joined #nim
12:38:51*Guest8783 quit (Client Quit)
12:40:24FromDiscord<sOkam!> if nim is pass by reference default, when is `proc thing(num :var int)` needed?
12:50:16FromDiscord<ShalokShalom> In reply to @Isofruit "... I kinda wanna": You mean.. discriminated unions?
13:48:08FromDiscord<Rika> In reply to @sOkam! "if nim is pass": Pass by reference != mutable pass
13:58:47*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:01:06FromDiscord<Phil> In a sense but not quite. A specific page enum only makes sense with that one specific controller for example, even though the type of all controller procs is identical.
14:01:51*dnh joined #nim
14:06:47*dnh quit (Ping timeout: 264 seconds)
14:13:05FromDiscord<Corazone> In reply to @pbotfullerton "Oh in that case": I tried it, however if the file is bigger than 4-8 digits in bytes it won't send propertly
14:13:45FromDiscord<Corazone> So if the file is lets say 55000 in bytes and i do recv(4) it will read up to 5500
14:17:07*pro joined #nim
14:18:42*xet7 quit (Read error: Connection reset by peer)
14:26:01*phaleth joined #nim
14:29:07FromDiscord<ShalokShalom> In reply to @Isofruit "In a sense but": How is that not served by a DU?
14:31:52FromDiscord<Phil> By the fact (from my very superficial understanding of DU) that either whatever I'm unifying would just have the general controller type, or I'm making a distinct controller proc type for one specific proc that doesn't really enshrine into the type system that page enum X shall only be associated with that one specific controller proc
14:32:57FromDiscord<Phil> Because if I do a distinct type I am still technically able to convert other controller procs into that type
14:33:24*kotrcka joined #nim
14:34:19FromDiscord<Phil> If my understanding is wrong please describe DU in Nim specific terminology, my current association is variant objects
14:42:14*xet7 joined #nim
14:43:11FromDiscord<maria_rodriguez> Start small with a minimum of $50 for BITCOIN MINING, answer YES to be added 👇👇👇↵↵https://t.me/Stevecoldham001
14:43:11FromDiscord<ShalokShalom> Idk how object variants are implemented in Nim
14:43:19FromDiscord<ShalokShalom> <@&371760044473319454>
14:45:31FromDiscord<rakgew> is there a way of iterating over all procs↵at compile time to collect the procs with↵custom pragma without typing them all out?
14:45:36FromDiscord<Phil> <@&371760044473319454> the Bots are infiltrating!
14:46:41FromDiscord<ChocolettePalette> @Moderator hi
14:46:51FromDiscord<Phil> In reply to @rakgew "is there a way": Are the procs all with the same signature? Or are they wildly different?
14:47:57FromDiscord<yrashk> Is there a way to run a compile-time block "on exit": that is when everything is done? I am modifying some compile-time variables in my macros, and I want to capture the final results.
14:48:01FromDiscord<rakgew> the ones I am looking for have all the same custom pragma and signature (no args no returns)
14:49:17FromDiscord<Yepoleb> In reply to @Corazone "I tried it, however": can you show the code? i don't see how it wouldn't work in theory
14:49:57FromDiscord<Phil> In reply to @rakgew "the ones I am": I think then you might be able to make a seq of procs, sadly that still demands you hand write that seq though
14:51:17FromDiscord<Phil> You could write a template for these kinds of procs that, when defining the proc also adds it to such a global seq, I haven't tried such a thing so far but should be feasible
14:51:21FromDiscord<rakgew> oh ok, thx.↵I hoped there was some general collector possible (like looking through global() for functions in python)
14:52:16FromDiscord<rakgew> huh? that sounds intrigueing..
14:53:42FromDiscord<rakgew> @Phil so the proc to be registered registers itself? \:-D
14:55:44FromDiscord<Phil> In reply to @rakgew "<@180601887916163073> so the proc": Pretty much, this goes a bit into metaprogramming.↵↵If that saves you that much writing is questionable though, you'd still write it somewhat like a context manager in python
14:55:55FromDiscord<rakgew> so the template would need be able to understand from inside which proc it was called
14:56:05FromDiscord<Phil> At least that's the solution I can currently envision
14:56:52FromDiscord<rakgew> thx for the inspiration - I had not thought of that.
14:56:56*junaid_ joined #nim
14:56:56FromDiscord<Phil> You pass the template a body, you'd need to figure out how to get your actual proc from that body and call seq.add proc
14:57:15FromDiscord<Phil> Again, might not work well
14:57:48FromDiscord<rakgew> worth a try I guess - hand-typing the procs gets old quick..
14:57:55FromDiscord<yrashk> sent a code paste, see https://paste.rs/JbO
14:58:35FromDiscord<Phil> Can't really say much about that one, I don't do much coding on the level of interfacing with c
14:58:47FromDiscord<hotdog> In reply to @Corazone "So if the file": Uint32 (4 bytes) goes up to 4,294,967,295
14:59:07FromDiscord<hotdog> Are you writing the number as a string instead?
15:00:08FromDiscord<Corazone> In reply to @hotdog "Are you writing the": I am yes, i can't send the int
15:00:30FromDiscord<hotdog> In reply to @Corazone "I am yes, i": Why not?
15:00:45FromDiscord<Corazone> Send() takes socket and the string
15:01:01FromDiscord<Corazone> I take the file size and send it as a string
15:01:35FromDiscord<hotdog> In reply to @Corazone "Send() takes socket and": In the context of sockets it may help to think of sequences of bytes instead of strings
15:01:47FromDiscord<hotdog> You can send whatever bytes you want
15:03:21FromDiscord<Corazone> In reply to @Yepoleb "can you show the": I will post it later, can't right now
15:03:23FromDiscord<hotdog> But if you want to send the stringified number, do it http header style and send a line per header (e.g content-length and filename) and use recvLine on the server
15:09:15FromDiscord<Corazone> sent a long message, see http://ix.io/4gVY
15:09:42FromDiscord<hotdog> In reply to @Corazone "Can you maybe explain": Sure let me write up an example for both styles one sec
15:10:02FromDiscord<Corazone> In reply to @hotdog "Sure let me write": God bless you man
15:13:53FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4gW3
15:21:59*arkurious joined #nim
15:25:04FromDiscord<Jessa> sent a code paste, see https://paste.rs/GpE
15:33:56FromDiscord<demotomohiro> I think you can use block expression that returns `test2` to initialize const variable.
15:39:59NimEventerNew post on r/nim by Dry-Sweet7045: is it possible to use react libraries on nim, since it compiles to JS?, see https://reddit.com/r/nim/comments/z5adcx/is_it_possible_to_use_react_libraries_on_nim/
15:40:01FromDiscord<hotdog> sent a long message, see http://ix.io/4gWc
15:40:48FromDiscord<Rika> This is why it is important to use the appropriate type…
15:41:21FromDiscord<Rika> That API really should have accepted either sequence or string (wink wink nudge nudge)
15:42:04FromDiscord<hotdog> In reply to @Rika "That API really should": Yeah I agree, it is obviously a bit misleading
16:04:06FromDiscord<fwsgonzo> There seems to have been a change in Nim recently where it is pruning functions it thinks doesn't get called
16:04:12FromDiscord<fwsgonzo> it broke my shit
16:06:18FromDiscord<auxym> dead code elim has been mandatory for a while, but if its killing stuff it shouldnt, definitely report an issue
16:07:21FromDiscord<auxym> is that 1.6.10 or devel?
16:07:39FromDiscord<fwsgonzo> it's 1.6.8
16:07:49FromDiscord<fwsgonzo> I can't get it to reliably export a function in a static executable
16:08:52FromDiscord<auxym> is that function called in your code?
16:09:55FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=4gWf
16:10:20FromDiscord<fwsgonzo> it gets called at some later point - it's fine that dead code elimination can happen, but there should always be an off button
16:10:56FromDiscord<auxym> report an issue, ideally wth minimal repro code
16:10:58FromDiscord<fwsgonzo> this symbol is force-kept in the linker, so its not a massive Nim issue
16:11:08FromDiscord<fwsgonzo> (edit) "massive" => ""massive" | "issue" => "issue""
16:11:16FromDiscord<fwsgonzo> im using static executables in funny ways
16:11:26*arkanoid quit (Ping timeout: 268 seconds)
16:11:38FromDiscord<fwsgonzo> I have a CMake build system that builds the sources produced by Nim
16:12:15FromDiscord<fwsgonzo> it just seems like Nim sees it doesn't get called and removes it before I have a chance to keep it
16:12:16FromDiscord<auxym> /is the function actually called in your nim code though? before linking? if not, the nim compiler will kill it
16:12:23FromDiscord<fwsgonzo> right
16:12:32FromDiscord<auxym> you can mark it exportc though to keep it
16:12:49FromDiscord<fwsgonzo> Yep, that used to work: `proc start() {.cdecl, exportc.}`
16:13:03FromDiscord<auxym> should still work afaik
16:13:24FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=4gWg
16:13:35FromDiscord<fwsgonzo> but `hello_nim`is never exported
16:14:03FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=4gWh
16:20:52FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=4gWj
16:41:48*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:45:01*ehmry joined #nim
16:46:12*phaleth quit (Quit: WeeChat 3.0)
16:52:56FromDiscord<auxym> it might be that the pragmas in the fwd declaration aren't used? Try adding them to the actual function definition maybe. If that's the case, I'm not sure if it's expected or a bug
17:48:55FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4gWF
18:04:04*xet7 quit (Ping timeout: 260 seconds)
18:10:35FromDiscord<Generic> iirc there are some secret optimisations to transform the first case into the second one
18:11:38FromDiscord<Generic> though be aware that if they exist, they can only transform this exact thing
18:12:03FromDiscord<Generic> so if it's not `a = a & something`, but e.g. `a = b & something`
18:12:10FromDiscord<Generic> it would do a copy
18:12:40FromDiscord<Generic> so summasumarum, if you care for performance better use add/&= from the start
18:13:31FromDiscord<hmmm> hmm no it's just that I've been using type 1) and just wondered, what if type 2) was better all along and I'm doing it wrong since the start? lol 😃
18:14:06FromDiscord<Generic> well `&` is very handy
18:14:18FromDiscord<Generic> though I'd never write `a = a & "cream"`
18:14:29FromDiscord<Generic> I always write `a &= "cream"`, simply because it's shorter
18:14:40FromDiscord<hmmm> I see
18:16:04pbotfullerton@Corazone you're regularly sending files that are larger than the max size for a 32 or 64 bit unsigned integer?
18:28:17FromDiscord<arkanoid> I've finally ordered mastering Nim! Glad to support the project this way
18:30:09FromDiscord<jos> i'm trying to find a macro to generate an equality operator for ref types
18:30:30FromDiscord<jos> i want the equality operator to check deep equality of each field, like value types
18:30:38FromDiscord<jos> does anybody know where i can find a macro that does that
18:33:28FromDiscord<jos> i found this discussion but it doesn't look like anyone here knows, was last updated 2 years ago
18:33:29FromDiscord<jos> https://forum.nim-lang.org/t/6781
18:34:14*arkanoid joined #nim
18:40:21*kotrcka quit (Remote host closed the connection)
18:51:44*jmdaemon joined #nim
18:58:09FromDiscord<mantielero (mantielero)> Hello
18:58:59FromDiscord<mantielero (mantielero)> sent a code paste, see https://play.nim-lang.org/#ix=4gWX
18:59:39FromDiscord<mantielero (mantielero)> I wrapped `factory` that returns `ptr AbstractState`.
19:00:34FromDiscord<mantielero (mantielero)> sent a code paste, see https://play.nim-lang.org/#ix=4gWZ
19:00:52FromDiscord<mantielero (mantielero)> It is not working.
19:02:31FromDiscord<mantielero (mantielero)> sent a code paste, see https://play.nim-lang.org/#ix=4gX2
19:03:41FromDiscord<mantielero (mantielero)> sent a code paste, see https://paste.rs/7BM
19:12:06FromDiscord<demotomohiro> @mantielero On discord, your posted code contains html tags and hard to read.↵Could you post your code on other text sharing service?
19:49:44FromDiscord<demotomohiro> In reply to @jos "i'm trying to find": If this is what you want, you don't need to use macro:↵https://play.nim-lang.org/#ix=4gXm↵But it is not much tested.↵It might fails in more complicated types.
19:50:17*pbsds quit (Quit: The Lounge - https://thelounge.chat)
19:50:51*pbsds joined #nim
19:54:12*pro quit (Ping timeout: 264 seconds)
19:55:44*pro joined #nim
20:01:16*kenran joined #nim
20:02:23*junaid_ quit (Remote host closed the connection)
20:02:43*kenran quit (Remote host closed the connection)
20:10:18FromDiscord<Phil> Okay, adding links for nimble docs is kind of a massive pain in the keister
20:16:47*kenran joined #nim
20:20:30*junaid_ joined #nim
20:20:52FromDiscord<nixfreak> Can you use .to\_upper() to only Capitalize the first Letter ? Or would you have to do a case statement or using if logic ?
20:21:40*kenran quit (Remote host closed the connection)
20:23:43FromDiscord<Jessa> woo, made my own color printing thing for terminals
20:23:46FromDiscord<Jessa> https://media.discordapp.net/attachments/371759389889003532/1046159347111174154/unknown.png
20:24:31FromDiscord<nixfreak> Cool , https://nim-lang.org/docs/strutils.html#toUpperAscii,char nm
20:25:50FromDiscord<wick3dr0se> would std/os walkDir be the best route to get directory content. will eventually need to do something for each file returned
20:28:28FromDiscord<wick3dr0se> In reply to @Jessa "": You could use ANSI escape sequences as well. Would be neat to see this implemented in Nim. I did this script in BASH to output possible VT100 color sequences
20:28:48FromDiscord<wick3dr0se> (edit) "In reply to @Jessa "": You could use ANSI escape sequences as well. Would be neat to see this implemented in Nim. I did this script in BASH to output possible VT100 color sequences" => "sent a code paste, see https://play.nim-lang.org/#ix=4gXw"
20:28:51FromDiscord<Jessa> yes, that's what i'm using
20:29:19FromDiscord<wick3dr0se> Well maybe that can be some help then
20:29:38FromDiscord<Jessa> help for what lol?↵i'm using ANSI escape sequences in the backend
20:30:08FromDiscord<wick3dr0se> Outputting them more dynamically instead of just creating variables for each color code
20:31:13pbotfullertonIn case anyone else runs into this, I wasn't able to get nim-jwt to compile because of a bunch of errors in the crypto.nim file. bearssl-nim changed their API slightly in June and nim-jwt hasn't been updated to reflect that. Using a bearssl-nim commit before June 2022 makes it work.
20:31:18FromDiscord<wick3dr0se> I output 273 colors with only a few printf calls. It can be streamlined to accept parameters easily
20:31:28FromDiscord<Jessa> In reply to @wick3dr0se "Outputting them more dynamically": i'm not
20:31:32FromDiscord<Jessa> i'm allowing rgb & hex
20:31:42FromDiscord<Jessa> https://media.discordapp.net/attachments/371759389889003532/1046161347924205599/image.png
20:32:33FromDiscord<wick3dr0se> In reply to @Jessa "i'm allowing rgb &": i didnt see that. i saw the first line with &red; and figured you had hard named them all
20:32:49FromDiscord<wick3dr0se> thats pretty cool
20:35:01FromDiscord<Jessa> In reply to @wick3dr0se "i didnt see that.": Did it that way with an older version of it, in python↵↵which still works okay-ish, but yeah
20:36:19FromDiscord<Jessa> and that also had an entirelyy different syntax, actually↵`[R]Red, [P]Purple... [E]Reset, etc`
20:36:21FromDiscord<Phil> Anyone set up on github a pipeline to automatically generate `nimble docs` and serve them on github?
20:37:02FromDiscord<Phil> If so, I would like to copy paste that work, I know prologue does it but I'm staring at the repo and not understanding a single thing, apparently there's a docker-compose yaml somewhere and I'm not seeing where
20:38:27FromDiscord<jos> In reply to @demotomohiro "If this is what": oh cool, I didn't know this was possible
20:38:41FromDiscord<jos> I just spent two hours adding value type equality operators to every node in my AST
20:38:44FromDiscord<jos> :cartired:
20:38:52FromDiscord<jos> but at least I don't have to maintain them now ahaha
20:38:54FromDiscord<jos> thanks!!
20:41:04FromDiscord<GoMpow2> i have a problem\:↵got a array with ref items, when I iterate over them with for iv in seq\: return iv iv is the dereferenced object, not the ref, how to return a ref from a function?
20:42:02FromDiscord<GoMpow2> (I want to iterate over something and return it in a function)
20:44:55FromDiscord<GoMpow2> https://nim-lang.org/docs/manual.html#types-reference-and-pointer-types this doesnt help me \:(
20:45:56FromDiscord<Phil> As it is late where I'm from and I'm tired, I'd need to see a minimal code example
20:47:01FromDiscord<Phil> In reply to @jos "I just spent two": I raise, I wrote an entire package over several days, I aided another package to include the entire functionality of mine, making it basically obsolete
20:47:11FromDiscord<Phil> (edit) "mine," => "mine recently,"
20:47:17FromDiscord<Phil> (edit) "it" => "my own"
20:48:10pbotfullerton@GoMpow2 what's the proc declaration for the function like? Are you declaring the return value as a ref <object> or as <object>?
20:48:15FromDiscord<GoMpow2> ah I got a solution
20:48:44FromDiscord<fwsgonzo> So, Nim has gotten some kind of incremental builds now, that's super nice
20:48:45FromDiscord<GoMpow2> didnt use the ref type in the declaration of the variable iterated over
20:48:57FromDiscord<fwsgonzo> is it going to be improved in the next major version? it seems to be working OK already
20:50:50FromDiscord<Phil> In reply to @fwsgonzo "So, Nim has gotten": It does? I'm using devel and I noticed a seeming speed up since.... weeks ago I guess, but I didn't know they already had IC
20:52:17FromDiscord<fwsgonzo> maybe it got removed again, I switched to .10 and now I don't see any .ndi files anymore
20:52:37FromDiscord<fwsgonzo> (edit) "maybe it got removed again, I switched ... to" added "from .8"
20:54:34FromDiscord<fwsgonzo> I really needed incremental because I want to have hundreds of levels in a game engine, and I am currently using CMake with a C++ API (for the games script), and I am considering using Nim
20:56:01FromDiscord<ShalokShalom> @fwsgonzo which game engine?
20:56:11FromDiscord<fwsgonzo> I am making my own - this is all research
20:56:17FromDiscord<ShalokShalom> Cool
20:56:40FromDiscord<fwsgonzo> I am using a RISC-V emulator to allow systems languages as game script, and I am writing all kinds of silly things in order to make it nice, automatic and convenient
20:57:17FromDiscord<huantian> if I was beef I would say something about wasm right about now
20:57:47FromDiscord<fwsgonzo> You can read about some of the insanity here: https://fwsgonzo.medium.com/using-c-as-a-scripting-language-part-5-d60b87556562
20:58:00FromDiscord<fwsgonzo> WASM is great and all, but it's not as fun when someone already made everything for you
20:58:14FromDiscord<fwsgonzo> not to mention WASM isn't the solution to every problem 😛
20:58:23FromDiscord<huantian> yeah risc-v emulator sounds neato
20:59:11FromDiscord<fwsgonzo> you're right of course - anyone who just wants the damn thing to Just Work should use something well established
21:07:52FromDiscord<jos> wasm is cool but the spec moves sloooow and the obsession with sandboxing and security isn't ideal for every application
21:11:35FromDiscord<ShalokShalom> In reply to @huantian "if I was beef": Comment of the day 😅
21:11:51FromDiscord<Yepoleb> i am glad to see people experimenting with risc-v and wasm as scripting languages
21:11:51FromDiscord<ShalokShalom> @fwsgonzo why RISC-V exactly
21:11:59FromDiscord<ShalokShalom> I understand wasm
21:12:21FromDiscord<ShalokShalom> I just try to implement the Nim LSP into Lapce and they are using wasm
21:12:27FromDiscord<Yepoleb> we all love risc-v
21:12:37FromDiscord<ShalokShalom> I do too
21:12:57FromDiscord<ShalokShalom> I just dont understand how a CPU architecture can be used as a scripting runtime
21:13:15FromDiscord<ShalokShalom> You mean, because system level languages can compile to it?
21:13:31FromDiscord<ShalokShalom> They can to other architectures as well. What's the point?
21:14:28FromDiscord<Yardanico> probably because risc-v is fully open and new and exciting :P
21:14:46FromDiscord<Yardanico> In reply to @ShalokShalom "I just dont understand": you can just use an emulator as a "scripting runtime"
21:14:50FromDiscord<Yardanico> there won't be much difference really
21:15:03FromDiscord<Yardanico> WASM itself can be considered a "cpu architecture"
21:15:10FromDiscord<fwsgonzo> RISC-V is fairly simple, and you can implement parts of it - it's made up of extensions
21:15:19FromDiscord<Yepoleb> arm or mips would probably work just as well to be fair, but it does not have the coolness associated with it
21:15:36FromDiscord<ShalokShalom> In reply to @Yardanico "probably because risc-v is": Ah, that makes sense.
21:15:37FromDiscord<fwsgonzo> WASM is more like a wrapper around a linear arena, which is nice if you don't care about a virtual address space, which again enables languages like Go
21:15:57FromDiscord<Yardanico> good thing Nim has ARC/ORC since those work well with WASM
21:16:03FromDiscord<ShalokShalom> In reply to @fwsgonzo "RISC-V is fairly simple,": Yeah, that makes sense as well
21:16:05FromDiscord<Yardanico> refc doesn't work at all due to how it works
21:17:53FromDiscord<nixfreak> are you not allowed to assign a var to stdout.styledWriteLine({styleBright, styleBlink, styleUnderscore}, "styled text ")
21:18:26FromDiscord<Yardanico> as in?
21:18:44FromDiscord<Yardanico> `stdout.styledWriteLine` writes the line to the stdout as the code says directly
21:18:55FromDiscord<Yardanico> it doesn't return the string as a result if you mean it that way
21:20:58FromDiscord<Yardanico> terminal module doesn't really have a way to give you a ansi color-formatted string directly, there are some procs that give you the ansi codes for specific colors, but that's it
21:22:48FromDiscord<nixfreak> Ahh ok , I'm just looking to have colors for output strings
21:43:58FromDiscord<Phil> In reply to @Yardanico "WASM itself can be": WASM optimized risc-v CPU when
21:44:34FromDiscord<Phil> They always told us to optimize our code to run fast on the CPU, now we're turning the tables
21:44:34FromDiscord<Yardanico> then it will be a wasm cpu, not a risc-v cpu
21:44:54FromDiscord<Yardanico> I mean yeah it's possible to add WASM instructions directly to the RISC-V
21:44:55FromDiscord<Yardanico> like https://en.wikipedia.org/wiki/Jazelle
21:45:14FromDiscord<Phil> Was about to say, wouldn't it still be risc-v, just with a larger instructionset?
22:04:22FromDiscord<nixfreak> Ok , I figured it out kind of. Is it possible to get the first and last on one line using the colors ? https://play.nim-lang.org/#ix=4gXP
22:06:00*junaid_ quit (Remote host closed the connection)
22:13:03*krux02 joined #nim
22:22:09FromDiscord<Yardanico> In reply to @nixfreak "Ok , I figured": `stdout.styledWriteLine {styleBright}, fgBlue, $first, " ", {styleBright}, fgGreen, $last`
22:22:29FromDiscord<Yardanico> or actually just `stdout.styledWriteLine {styleBright}, fgBlue, $first, " ", fgGreen, $last`
22:22:40FromDiscord<Yardanico> `stdout.styledWriteLine styleBright, fgBlue, $first, " ", fgGreen, $last`
22:34:45*pro quit (Ping timeout: 265 seconds)
22:43:44FromDiscord<Yepoleb> In reply to @Isofruit "Was about to say,": that would go against the entire philosophy of risc because you'd just be creating a new microcode monster
22:43:57FromDiscord<.tochka> should i use implicit dereferencing? like, its planned for nim 2.0 as i understand, but is it stable enough in nightly
22:52:00FromDiscord<Elegantbeef> It's planned to be removed in 2.0 😄
22:52:10FromDiscord<.tochka> oh i read it badly then
22:52:16FromDiscord<.tochka> so dont use it then
22:52:55FromDiscord<Elegantbeef> Indeed, you can always use `dotOperators` in it's place
22:54:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4gXU
22:55:25FromDiscord<fwsgonzo> is incremental builds ready to use in 2.0?
22:55:53FromDiscord<Elegantbeef> Nope
22:55:57FromDiscord<fwsgonzo> (edit) "is" => "Will" | "Willincremental builds ... ready2.0?" added "be" | "2.0?" => "2.0?"
22:56:01FromDiscord<Elegantbeef> planned for 2.x
22:56:13FromDiscord<fwsgonzo> ah ok, well, that sounds good too
22:56:32FromDiscord<.tochka> its funny to use it rn and see all the crashes ;p
23:22:02FromDiscord<albassort> im having this weird problem
23:22:54FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4gY1
23:29:49FromDiscord<albassort> is there any viable gui platforms in nim
23:29:52FromDiscord<albassort> or should i move to node or c
23:30:03FromDiscord<albassort> well just for this segement
23:30:05FromDiscord<albassort> (edit) "segement" => "segment"
23:30:26FromDiscord<albassort> thinking of doing in C Because I may have to d a lot of stuff with x
23:32:02FromDiscord<.tochka> can always bind c to nim
23:32:11FromDiscord<albassort> ofc
23:32:13FromDiscord<albassort> thats the end goal
23:32:28FromDiscord<albassort> but working with c in nim is kinda tedious so I like to write c code and bind the high level functions to nim
23:32:42FromDiscord<albassort> (edit) "but working with c in nim is kinda tedious so I like to write c code and bind the high level functions ... to" added "i write"
23:32:59FromDiscord<Yardanico> In reply to @albassort "but working with c": there are X bindings for Nim already, there are even two X11 WMs in Nim
23:33:05FromDiscord<Yardanico> so I don't think it'd be too hard if you want to use X
23:33:21FromDiscord<Yardanico> <https://github.com/codic12/worm> and <https://github.com/avahe-kellenberger/nimdow>
23:33:44FromDiscord<albassort> I already have some code for x in c
23:35:07FromDiscord<albassort> i feel like less can go wrong if you just use C with c libraries
23:35:33FromDiscord<Yepoleb> but you need to write C 😢
23:35:40FromDiscord<albassort> C's not too bad
23:36:01FromDiscord<albassort> it could be better, and im not use why the better languages made around that time didn't prevail, but its ok
23:38:15FromDiscord<Elegantbeef> Equally as much can go wrong writing Nim as C
23:38:53FromDiscord<ShalokShalom> In reply to @albassort "is there any viable": Godot 3.
23:39:07FromDiscord<albassort> HMMMMMMMMMMMMK
23:39:09FromDiscord<albassort> maybe
23:39:29FromDiscord<albassort> Idk
23:39:30FromDiscord<Yepoleb> is that a serious suggestion?
23:39:39FromDiscord<albassort> its getting serious consideration
23:40:05FromDiscord<Yepoleb> then i'm gonna throw in sdl2
23:40:15FromDiscord<ShalokShalom> In reply to @Yepoleb "is that a serious": https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b
23:40:22FromDiscord<albassort> godot is way easier and productive than sdl2
23:40:25FromDiscord<ShalokShalom> So serious as it can get
23:40:27FromDiscord<albassort> I don't know godot is a good fit
23:40:36FromDiscord<ShalokShalom> Godot is to sdl2 what Nim is to C
23:40:37FromDiscord<Yepoleb> In reply to @albassort "godot is way easier": yes
23:40:51FromDiscord<albassort> i need something very simple and easily controllable
23:40:54FromDiscord<ShalokShalom> In reply to @albassort "I don't know godot": See the link, then decide 🙂
23:41:00FromDiscord<albassort> i actually just need something to go like this
23:41:16FromDiscord<ShalokShalom> It doesnt go simpler, also the support and tutorials are good
23:41:30FromDiscord<ShalokShalom> 🙂
23:41:44FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4gY2
23:41:59FromDiscord<ShalokShalom> How simple has the UI to be?
23:42:04FromDiscord<albassort> that simple
23:42:06FromDiscord<ShalokShalom> Like, what elements do you like
23:42:16FromDiscord<ShalokShalom> Ok, then I go with KDialog
23:42:17FromDiscord<albassort> uhh
23:42:26FromDiscord<albassort> the elements will appear like this
23:42:36FromDiscord<albassort> on the top layer
23:42:37FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4gY3
23:42:39FromDiscord<albassort> with a white background
23:42:42FromDiscord<albassort> and blue selector
23:42:48FromDiscord<albassort> controllable with ``tab``
23:42:52FromDiscord<ShalokShalom> https://develop.kde.org/deploy/kdialog/
23:43:10FromDiscord<ShalokShalom> You can code this from shell languages
23:43:18FromDiscord<ShalokShalom> I would recommend fish
23:43:26FromDiscord<albassort> fish is cool
23:43:32FromDiscord<albassort> how flexable is this
23:43:45FromDiscord<ShalokShalom> KDialog?
23:43:48FromDiscord<ShalokShalom> See this docs
23:44:03FromDiscord<ShalokShalom> There are some features, who are documented at some other places
23:44:33FromDiscord<ShalokShalom> One of the features I am missing, is an interactive search box
23:44:34FromDiscord<albassort> hmmmmm
23:44:40FromDiscord<albassort> kinda doubt this is a good fit
23:44:47FromDiscord<ShalokShalom> Idk your use case
23:44:55FromDiscord<albassort> thinking about imgui
23:44:55FromDiscord<ShalokShalom> It certainly can do what you asked for
23:44:59FromDiscord<ShalokShalom> Also good
23:45:19FromDiscord<ShalokShalom> Good inbetween Godot and KDialog
23:45:30FromDiscord<ShalokShalom> But too much code for me
23:45:43FromDiscord<ShalokShalom> GUI stuff should be created by GUI
23:45:47FromDiscord<ShalokShalom> Or very little code
23:46:04FromDiscord<ShalokShalom> Visual things dont fit literal typing
23:46:06FromDiscord<ShalokShalom> Imho
23:46:39FromDiscord<Yepoleb> for your usecase anything on the list should work↵https://github.com/ringabout/awesome-nim#gui
23:47:35FromDiscord<ShalokShalom> Some of that is unmaintained
23:48:40FromDiscord<albassort> ur unmaintained
23:48:47FromDiscord<Yepoleb> damn
23:50:09FromDiscord<Generic> listing SDL under GUI is well daring
23:51:27FromDiscord<.tochka> maintain me uwu
23:52:14FromDiscord<Yepoleb> is that a call to assistance with body hygiene?
23:52:17FromDiscord<.tochka> there's probably some gui framework on top of sdl renderer given how common it is
23:52:41FromDiscord<Generic> then you could list OpenGL there too though
23:52:44FromDiscord<Yepoleb> there's probably more to maintaining a person
23:53:31FromDiscord<.tochka> In reply to @Yepoleb "is that a call": those language hippies first coming up with macro hygiene and now making it a thing in reality? thats fucked up
23:54:09FromDiscord<Yepoleb> it's actually pretty neat