<< 24-03-2022 >>

00:15:58FromDiscord<auxym> iirc araq mentioned that ORC would be default in the next stable version (1.8) but that might have changed
00:16:38FromDiscord<auxym> and my understanding is that 2.0 is a vague, faraway horizon, no concrete roadmap for that ATM
00:21:18FromDiscord<Elegantbeef> It is
00:21:45FromDiscord<Elegantbeef> https://github.com/nim-lang/RFCs/issues/437 for what's needed for 2.0
00:29:30FromDiscord<auxym> interesting, I did read that a while ago but I guess memory failed me... am I correct in understanding that 2.0 is the next planned stable release then? didn't realize that
00:30:12FromDiscord<Elegantbeef> Dont know
00:30:31FromDiscord<Elegantbeef> Seems like it given the devel repo has been making relatively large changes
01:30:58*yoyojambo joined #nim
01:49:00*Zectbumo quit (Remote host closed the connection)
02:01:20*yoyojambo quit (Quit: Leaving)
02:42:06*Zectbumo joined #nim
03:11:10FromDiscord<Goat> I like how the nim compiler can shrink an executalbe that isn't even half a megabyte down 40% with some flags
03:12:14FromDiscord<Elegantbeef> What flags are you using?
03:18:21FromDiscord<Shinyzenith> In reply to @Elegantbeef "<@633967275090771971>\: send the file": https://github.com/waycrate/nim-wl/tree/devel
03:18:59FromDiscord<Elegantbeef> Where's the issue?
03:19:42FromDiscord<Shinyzenith> it segfaults on herb.nim line 24 when I added the wl_signal_add call in libherb.nim https://media.discordapp.net/attachments/371759389889003532/956391835813679144/unknown.png
03:20:07FromDiscord<Goat> In reply to @Elegantbeef "What flags are you": `nim c -r -d:release --app:console --opt:size -d:strip --passc=-flto --passl=-flto --gc:arc --deepcopy:on -o:main-tiny.exe .\main.nim`
03:20:23FromDiscord<Goat> from 320kb to 126kb
03:20:24FromDiscord<Shinyzenith> auxym said it's because my struct was in stack memory so when init_server execution completed unsafeAddr returned nothing
03:20:45FromDiscord<Elegantbeef> can also add `--d:useMalloc` though that's probably negligable
03:20:54FromDiscord<Elegantbeef> `-d`\
03:21:55FromDiscord<Elegantbeef> That sounds about right
03:23:12FromDiscord<Goat> In reply to @Elegantbeef "can also add `--d:useMalloc`": It is now 94kb
03:23:23FromDiscord<Elegantbeef> We can make it even smaller but more error pronee
03:23:44FromDiscord<Elegantbeef> well unsafeaddr will get the stack address still↵(@Shinyzenith)
03:23:54FromDiscord<Elegantbeef> But it's not what you want here probably
03:25:32FromDiscord<Elegantbeef> If you're really after the smallest binary and dont care about errors you can do `-d:danger`, but it's not really suggested since your program can just crash with 0 insight
03:25:58FromDiscord<Goat> First thing I tried, it won't even launch lmao
03:26:32FromDiscord<Elegantbeef> Are you catching `defects`?
03:26:57FromDiscord<Shinyzenith> In reply to @Elegantbeef "well unsafeaddr will get": 1 sec I'll brb, eating breakfast
03:30:18FromDiscord<huantian> sounds illegal
03:30:29FromDiscord<Elegantbeef> It should be
03:30:45FromDiscord<Elegantbeef> But nope there's a dialect where it's valid
03:37:38FromDiscord<huantian> man if only there was a compiler option that would make defects actually uncatchable
03:37:52FromDiscord<Elegantbeef> You say that like there isnt
03:38:16FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3TjM
03:38:20FromDiscord<TryAngle> (edit)
03:38:23FromDiscord<Elegantbeef> No
03:39:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TjN
03:39:22FromDiscord<Elegantbeef> Or `let` if you're using re/nre that cant compile regex statements at CT
03:39:52FromDiscord<Elegantbeef> Now there's my eternal sadness of using regex for this
03:40:02FromDiscord<TryAngle> ok so basically keep them separate?
03:40:16FromDiscord<Elegantbeef> Yes using an enum indexed array
03:40:29FromDiscord<TryAngle> In reply to @Elegantbeef "Yes using an enum": oh! totally forgot nim has that
03:40:33FromDiscord<TryAngle> 😳😳
03:40:34FromDiscord<TryAngle> (edit) "😳😳" => "😳"
03:41:43FromDiscord<Elegantbeef> Personally i'd use `array[TokenKind, proc(s: openArray[char]): bool]`
03:41:58FromDiscord<TryAngle> In reply to @Elegantbeef "Personally i'd use `array[TokenKind,": may u give an example?
03:41:58FromDiscord<Elegantbeef> But i dislike regex so i'm a silly bastard
03:42:31FromDiscord<TryAngle> In reply to @Elegantbeef "But i dislike regex": ye same tbh 😭↵but it's "industry-standard" I guess
03:45:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TjO
03:45:40FromDiscord<Elegantbeef> It's a bit more code of course but i'm a silly bastard
03:46:50FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3TjP
03:46:56FromDiscord<Elegantbeef> Yea pretty much
03:47:13FromDiscord<TryAngle> well, I did this with my markdown format but it got out of hand pretty fast and that's just markdown, so basically not that complex
03:47:17FromDiscord<TryAngle> (edit) removed "basically"
03:47:23FromDiscord<TryAngle> now I try scripting lang
03:47:26FromDiscord<TryAngle> soooo
03:47:30FromDiscord<TryAngle> I need structure
03:47:36FromDiscord<Elegantbeef> You say that like your regex isnt complex 😜
03:47:39FromDiscord<Shinyzenith> In reply to @Elegantbeef "well unsafeaddr will get": well yes but by the time the callback is called, the memory of init_server is cleared by gc
03:47:44FromDiscord<Shinyzenith> if I understand correctly
03:48:12FromDiscord<TryAngle> In reply to @Elegantbeef "You say that like": tbh I don't understand them XD↵I just found them on stackoverflow and checked if they worked and they do↵they're just magic formulas tbh.
03:48:17FromDiscord<TryAngle> (edit) "formulas tbh." => "formulas."
03:48:37FromDiscord<Elegantbeef> `"[/\\p{L}/u][/\\p{L}/u-z0-9_]"` is much more compliicated than `str.allInset {'u'..'z', '0'..'9}`
03:48:40FromDiscord<Shinyzenith> auxym told me to correct it with a ref or manual memory management
03:49:00FromDiscord<Elegantbeef> No stack is not cleared by GC↵(@Shinyzenith)
03:49:14FromDiscord<Shinyzenith> In reply to @Elegantbeef "No stack is not": huh then why the segfault?
03:49:43FromDiscord<Elegantbeef> Probably cause your pointing at bad memory and it causes it to go to bad memory
03:49:57FromDiscord<Elegantbeef> Using a reference might help, but also writing the code properly would help more
03:50:18FromDiscord<Shinyzenith> wdym by writing it properly
03:50:59FromDiscord<Elegantbeef> Not doing https://github.com/waycrate/nim-wl/blob/devel/src/libherb.nim#L133-L148 inside a function like this for instance
03:51:18FromDiscord<Shinyzenith> that's just how we're supposed to call it
03:51:30FromDiscord<Elegantbeef> No it's clearly not how you're supposed to call it
03:51:46FromDiscord<Elegantbeef> `herb_output` is stack value
03:52:12FromDiscord<Shinyzenith> straight from the wlroots devs https://media.discordapp.net/attachments/371759389889003532/956400008175951922/unknown.png https://media.discordapp.net/attachments/371759389889003532/956400008402460732/unknown.png
03:52:31FromDiscord<Shinyzenith> they assign the callback inside of the new_output callback
03:52:39FromDiscord<Shinyzenith> it's odd but it makes sense in the context
03:52:43FromDiscord<Shinyzenith> (edit) "it's odd but it makes sense in the ... context" added "given"
03:53:23FromDiscord<Elegantbeef> It doesnt make much sense as we're passing an address to a stack variable afaict
03:54:09FromDiscord<Elegantbeef> herbOutput should not be referenced after that procedure is exited, but you persist that storage
03:54:20*Zectbumo quit (Remote host closed the connection)
03:54:59FromDiscord<Shinyzenith> In reply to @Elegantbeef "It doesnt make much": are you talking about the wl_signal_add proc?
03:55:24FromDiscord<Elegantbeef> I'm talking about passing `herbOutput.newFrame`
03:55:31FromDiscord<Elegantbeef> That's just wrong since it's stack allocated
03:55:40FromDiscord<Elegantbeef> As soone as this procedure exists it's 100% unsafe
03:56:32FromDiscord<Shinyzenith> 😢
03:56:35FromDiscord<Shinyzenith> I see
03:57:14FromDiscord<Shinyzenith> so what other options do I have to fix this? I really want to keep the structure as is because I'm attempting to clone tinywl in nim
03:57:20FromDiscord<Shinyzenith> (edit) removed "other"
03:57:38FromDiscord<Shinyzenith> I'll go read up about ref first
03:57:38FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3TjQ for a runnable example of the issue
03:57:50FromDiscord<Shinyzenith> Ok, reading it
03:57:54FromDiscord<Elegantbeef> You can use ref, you can heap allocate manually, you can use more globals
03:59:08*arkurious quit (Quit: Leaving)
04:00:07FromDiscord<Shinyzenith> In reply to @Elegantbeef "https://play.nim-lang.org/#ix=3TjQ for a runnable": ok I think I understand the issue now
04:00:18FromDiscord<Shinyzenith> In reply to @Elegantbeef "You can use ref,": I'll try ref
04:00:41FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TjV
04:01:00FromDiscord<Elegantbeef> the `ptrToOutput` would be the non dereferencing version of `fieldParentPtr`
04:03:08FromDiscord<Shinyzenith> what would it's signature look like?
04:03:17FromDiscord<Elegantbeef> What do you mean?
04:03:27FromDiscord<Elegantbeef> It's identical to `fieldParentPtr` just without `[]`
04:03:33FromDiscord<Shinyzenith> Ok got it
04:04:13FromDiscord<Elegantbeef> Dont even need the cast i think
04:04:32FromDiscord<Shinyzenith> cast ptr T?
04:04:35FromDiscord<Shinyzenith> (edit) "ptr T?" => "[ptr T]?"
04:04:55FromDiscord<Elegantbeef> ugh this is somewhat complicated
04:05:07FromDiscord<Elegantbeef> maybe it's not i'm dumb
04:05:07FromDiscord<Shinyzenith> yeah definitely not a pretty fix
04:05:17FromDiscord<TryAngle> @ElegantBeef tbh I just realized in Nim regexes are not that important as in other langs because working with sets is so easy o_O
04:05:39FromDiscord<Elegantbeef> Indeed sets make it super easier↵(@TryAngle)
04:06:17FromDiscord<Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/956403555927990322/unknown.png
04:06:22FromDiscord<Elegantbeef> Well the issue is you're getting field offsets for whatever reason shiny
04:06:32FromDiscord<Elegantbeef> You didnt make it a ref
04:07:11FromDiscord<Shinyzenith> In reply to @Elegantbeef "Well the issue is": :( aaa this feels confusion I guess I have to restructure the code to be more gc friendly
04:07:24FromDiscord<Elegantbeef> You dont need to restructure the code any
04:07:31FromDiscord<Elegantbeef> I mean it's ugly code cause of what you're doing
04:07:36FromDiscord<Elegantbeef> But that's besides the point
04:07:43FromDiscord<Elegantbeef> `type HerbOutput = ref object`
04:08:05FromDiscord<Shinyzenith> ok
04:08:47FromDiscord<Elegantbeef> Now you need that fieldParentPtr that doesnt deref
04:08:53FromDiscord<Elegantbeef> That's a weird fucking design either way
04:09:21FromDiscord<Elegantbeef> I've never seen anything ever point to a field instead of an object
04:11:53FromDiscord<Shinyzenith> In reply to @Elegantbeef "`type HerbOutput = ref": https://media.discordapp.net/attachments/371759389889003532/956404966107516968/unknown.png
04:12:04FromDiscord<Shinyzenith> In reply to @Elegantbeef "I've never seen anything": welcome to libwayland 🤣
04:12:48FromDiscord<Elegantbeef> Guess i should also say @TryAngle I'd probably use https://github.com/zevv/npeg
04:12:48FromDiscord<Elegantbeef> A compiler bug, but no code so cant comment
04:13:30FromDiscord<Shinyzenith> this isn't a pretty solution, I think I'll just push the herb_output object into a seq field of the server and do the assigning in a for loop in the main file
04:13:47FromDiscord<Elegantbeef> That'd work
04:13:52FromDiscord<Elegantbeef> What's the code in that template?
04:14:47FromDiscord<Shinyzenith> In hindsight that won't work...
04:14:57FromDiscord<Shinyzenith> because if a new output is plugged in after my for loop
04:15:03FromDiscord<Shinyzenith> it won't work
04:15:16FromDiscord<Elegantbeef> Use a fixed size array and a buffer, problem solved, or just use the reference
04:16:01FromDiscord<Shinyzenith> wait why would I use a fixed size array? what if the number of outputs exceed the max index of my array?
04:16:11FromDiscord<Elegantbeef> "and a buffer"
04:16:37FromDiscord<Elegantbeef> The reference is the easier solution, or memory alloc
04:16:46FromDiscord<Elegantbeef> the memory alloc is easy aswell
04:16:57FromDiscord<Shinyzenith> Ok I'll read up on it
04:17:01FromDiscord<Shinyzenith> I just want it to be readable
04:17:09FromDiscord<Shinyzenith> ref was getting messy
04:17:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TjY
04:17:24FromDiscord<Elegantbeef> Ok
04:17:24FromDiscord<TryAngle> In reply to @Elegantbeef "Guess i should also": ye I could but it's also a learning project 😉
04:17:42FromDiscord<Elegantbeef> I dont follow
04:17:48FromDiscord<TryAngle> I don't try to reinvent the wheel with another scripting lnag that is of course better than every prior scripting lang
04:18:18FromDiscord<TryAngle> I'm more curious, what is a match of length zero? https://media.discordapp.net/attachments/371759389889003532/956406581329801216/unknown.png
04:18:24FromDiscord<Shinyzenith> sent a code paste, see https://play.nim-lang.org/#ix=3TjZ
04:18:29FromDiscord<Elegantbeef> No clue i dont use regex
04:23:57FromDiscord<Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/956408001395294229/unknown.png
04:23:59FromDiscord<Shinyzenith> I did the following
04:24:01FromDiscord<Shinyzenith> sent a code paste, see https://paste.rs/YfT
04:24:13FromDiscord<Shinyzenith> this time the callback triggered https://media.discordapp.net/attachments/371759389889003532/956408068101521419/unknown.png
04:24:18FromDiscord<Elegantbeef> Dealloc inside the notify proc
04:24:18FromDiscord<Shinyzenith> with another segfault....
04:24:23FromDiscord<Shinyzenith> Ok
04:25:03FromDiscord<Shinyzenith> In reply to @Elegantbeef "Dealloc inside the notify": like so? https://media.discordapp.net/attachments/371759389889003532/956408275862175764/unknown.png
04:26:34FromDiscord<Elegantbeef> this is where you need the non dereferencing `[]` though you can do `dealloc(fieldParentPtr(HerbOutput, newFrame, listener)[])`
04:26:34FromDiscord<Elegantbeef> Sorry `dealloc(fieldParentPtr(HerbOutput, newFrame, listener).addr)`
04:26:34FromDiscord<Elegantbeef> Atleast you should be able to
04:26:48FromDiscord<Elegantbeef> No
04:27:08FromDiscord<Elegantbeef> `dealloc(fieldParentPtr(HerbOutput, newFrame, listener).addr)`
04:27:37FromDiscord<TryAngle> anybody knows why my editor is saying this is invalid? https://media.discordapp.net/attachments/371759389889003532/956408924758741042/unknown.png
04:28:01FromDiscord<Elegantbeef> Does the compiler say the same?
04:28:33FromDiscord<Shinyzenith> In reply to @Elegantbeef "`dealloc(fieldParentPtr(HerbOutput, newFrame, liste": still segfaults
04:28:44FromDiscord<Elegantbeef> Well then i was wrong and i have no clue the cause
04:28:49*ltriant_ joined #nim
04:28:50FromDiscord<Elegantbeef> You're doing something slightly wrong then
04:28:54FromDiscord<Shinyzenith> butthis time the segfault is different
04:29:24FromDiscord<Elegantbeef> Does it still segfault without the `dealloc`?
04:30:00FromDiscord<Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/956409524930089010/unknown.png https://media.discordapp.net/attachments/371759389889003532/956409525169180692/unknown.png https://media.discordapp.net/attachments/371759389889003532/956409525383086090/unknown.png
04:30:14FromDiscord<Shinyzenith> In reply to @Elegantbeef "Does it still segfault": absolutely
04:30:27FromDiscord<Elegantbeef> Then yea there is another issue
04:30:36*ltriant quit (Ping timeout: 240 seconds)
04:30:41FromDiscord<Shinyzenith> but atleast it segfaults elsewhere now
04:30:46FromDiscord<Elegantbeef> check if `sceneOutput != nil`
04:30:47FromDiscord<TryAngle> In reply to @Elegantbeef "Does the compiler say": hmm just compiled and I'm getting a sussy error std/re error
04:30:50FromDiscord<Shinyzenith> I think i need to manually allocate my server too
04:30:54FromDiscord<TryAngle> (edit) "compiled" => "tried compiling"
04:31:18FromDiscord<Elegantbeef> Nah server is global, and should be NRVO'd if not you can make a `init(server: var HerbServer)`
04:31:26FromDiscord<Shinyzenith> In reply to @Elegantbeef "check if `sceneOutput !=": huh why https://media.discordapp.net/attachments/371759389889003532/956409887175364628/unknown.png
04:31:44FromDiscord<TryAngle> In reply to @TryAngle "hmm just tried compiling": @ElegantBeef removing re from my code, it compiles
04:31:54FromDiscord<TryAngle> also the IDE gives no error anymore, ok weird error display
04:32:10FromDiscord<Elegantbeef> I dont know anything about wayland
04:33:17nrds<Prestige99> Have you tried x11? :P
04:33:21FromDiscord<Elegantbeef> What was the error you got from `std/re`?
04:34:06FromDiscord<Shinyzenith> In reply to @Elegantbeef "I dont know anything": I hate thisss :WearyA:
04:34:17FromDiscord<Elegantbeef> Refer to prestige's comment then
04:34:26FromDiscord<Shinyzenith> 🤣
04:35:03FromDiscord<Elegantbeef> You do seemingly lack knowledge of stack/heap and nim's references
04:35:09FromDiscord<Elegantbeef> Which isnt helping you any
04:35:33FromDiscord<Shinyzenith> In reply to @Elegantbeef "You do seemingly lack": as stated earlier, I'm still really really new to nim 🤣
04:36:42FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Y1e
04:37:07FromDiscord<Elegantbeef> But that's basically the same as the pointer really
04:37:42nrds<Prestige99> Elegantbeef so I think the learning material on nim-lang.org (https://nim-lang.org/docs/tut1.html etc) is too lengthy to be on all one page. I want to break it up into smaller, one page readings. Do you want in on this undertaking?
04:37:53nrds<Prestige99> or actually we disagree on everything so maybe you think it's a bad idea lol
04:38:07FromDiscord<Elegantbeef> I dont see the difference really
04:38:14FromDiscord<Elegantbeef> Need a good search bar then
04:38:31FromDiscord<Elegantbeef> The benefit of it being all on one page is it's easier to search and download
04:38:32nrds<Prestige99> It'd be less daunting for new users I think
04:38:37FromDiscord<Shinyzenith> how about https://www.algolia.com/
04:38:38nrds<Prestige99> true to that
04:38:42FromDiscord<Elegantbeef> Remake it using nimibook
04:38:48FromDiscord<Shinyzenith> they have a doc search thing
04:38:55nrds<Prestige99> I'll look that up
04:39:15FromDiscord<Shinyzenith> https://www.algolia.com/ref/docsearch/ oops this link sorry
04:39:41FromDiscord<Shinyzenith> not sure if it's oss , I just know that djs website uses it
04:40:40nrds<Prestige99> nimibook doesn't support syntax highlighting?
04:40:56FromDiscord<Elegantbeef> It should
04:41:27FromDiscord<Elegantbeef> Seems it doesnt presently, it's jusut web tech so add it 😜
04:41:44nrds<Prestige99> hm I want to find this golang tutorial example from before..
04:41:52nrds<Prestige99> I like the way this site did it
04:43:55nrds<Prestige99> ah this https://www.learn-golang.org/en/Hello%2C_World%21
04:44:16nrds<Prestige99> We'd have to embed the playground in the bottom, effectively
04:44:28FromDiscord<Elegantbeef> Eh just use the playground then
04:44:45FromDiscord<Elegantbeef> The playground can do stuff like that
04:44:55nrds<Prestige99> But also it's broken up into small sections
04:45:21FromDiscord<Elegantbeef> The nim playground can do that
04:45:38FromDiscord<Elegantbeef> It supports a whole interactive tutorial
04:45:42FromDiscord<Elegantbeef> Not that it's well documented
04:45:45nrds<Prestige99> oh?
04:45:51nrds<Prestige99> well that would be awesome
04:46:26FromDiscord<Elegantbeef> I think you can point it using a URL to a specific format and it'll a proper interactive environment
04:48:54FromDiscord<Elegantbeef> Ping pmunch and he knows if you want to partake that
04:49:10FromDiscord<Elegantbeef> Cant find any examples
04:50:13FromDiscord<TryAngle> how do u make a set of strings?
04:50:23FromDiscord<Elegantbeef> You cant
04:50:27FromDiscord<TryAngle> 😦
04:50:32FromDiscord<Elegantbeef> `set` only works for ordinal
04:50:38FromDiscord<Elegantbeef> You can make a HashSet for strings
04:50:49FromDiscord<TryAngle> wait I'm stupid I can just do array in this case
04:50:59FromDiscord<Elegantbeef> `import std/sets; var a: HashSet[string]; a.incl "Hello"; echo a` 😛
04:51:16FromDiscord<Elegantbeef> What are you doing?
04:51:51FromDiscord<TryAngle> In reply to @Elegantbeef "`import std/sets; var a:": I'm done with regexes XD
04:51:59FromDiscord<TryAngle> so I do sets now
04:52:09FromDiscord<Elegantbeef> Ok but the array of strings?
04:53:10FromDiscord<TryAngle> sent a code paste, see https://paste.rs/tBk
04:53:26FromDiscord<TryAngle> well thinking abt it it might be easier saying one is multiline and one single line etc. 🤔
04:53:33FromDiscord<TryAngle> (edit) "well thinking abt it it might be easier saying one is multiline and one single line etc. ... 🤔" added "directly"
04:53:38FromDiscord<TryAngle> (edit) "well thinking abt it it might be easier saying one is multiline and one single line etc. directly ... 🤔" added "isntead of grouping it first"
05:11:37*slowButPresent quit (Quit: leaving)
05:37:55FromDiscord<TryAngle> is there a generic zero method for ordinals?
05:38:08FromDiscord<Elegantbeef> `low`?
05:38:28FromDiscord<TryAngle> In reply to @Elegantbeef "`low`?": exactly what I looked for thanks! 😄
05:38:51FromDiscord<Elegantbeef> For signed that returns the lowest possiblee
05:38:51FromDiscord<Elegantbeef> Probably not what you want there
05:38:56FromDiscord<TryAngle> oh true
05:39:39FromDiscord<TryAngle> I like the way of inc and dec↵so I wanted to add clr for a reset to zero for consistency XD
05:39:46FromDiscord<Elegantbeef> `cast[type](0)`
05:39:59FromDiscord<TryAngle> (edit) "of" => "how" | "dec↵so" => "dec look↵so"
05:40:05FromDiscord<Elegantbeef> The above doesnt work for holey enums
05:40:37FromDiscord<Elegantbeef> actually it might
05:40:46FromDiscord<Elegantbeef> I say holey but i meant those that dont start at `0`
05:40:50FromDiscord<TryAngle> In reply to @Elegantbeef "The above doesnt work": not my case atm luckely
05:41:19FromDiscord<TryAngle> how do I symlink my local project for other nim projects again?
05:41:36FromDiscord<Elegantbeef> `nimble develop`
05:43:44FromDiscord<TryAngle> lol https://media.discordapp.net/attachments/371759389889003532/956428079478239252/unknown.png
06:01:49FromDiscord<TryAngle> @Solitude this happens on void linux 😦↵but maybe it's a WSL error I'm not sure
06:02:00FromDiscord<TryAngle> (edit) "😦↵but maybe it's" => "😦↵(WSL and" | "WSL error I'm not sure" => "dedicated install)"
07:09:21FromDiscord<TryAngle> is there an echo that doesn't do newline?
07:09:35FromDiscord<Elegantbeef> Nope
07:09:48FromDiscord<Elegantbeef> `stdout.write("myMsg")`
07:09:58FromDiscord<Elegantbeef> Then you should do `flushFile(stdout)`
07:12:07FromDiscord<TryAngle> ok, thanks
07:12:58*rwb quit (Excess Flood)
07:13:10*rwb joined #nim
07:14:48*rwb is now known as rb
07:37:42*neurocyte0917090 joined #nim
08:25:01*TechAspirer quit (Ping timeout: 240 seconds)
08:37:59FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3TkG
08:38:51FromDiscord<Elegantbeef> Of course
08:39:15FromDiscord<hmmm> oh it works?
08:39:22FromDiscord<hmmm> I'll check
08:39:34FromDiscord<Elegantbeef> They're boolean operators
08:42:05FromDiscord<Rika> whats there to break
08:42:11FromDiscord<Rika> why did you think it wouldnt work
08:42:23FromDiscord<hmmm> because of the parenthesis lol
08:42:38FromDiscord<hmmm> didn't expect it would work the way I expected to lol
08:44:53FromDiscord<Rika> what why
08:45:10FromDiscord<hmmm> yea it was a bit awkwardly phrased
08:45:20FromDiscord<hmmm> what matters is the heart ❤️
08:48:31*PMunch joined #nim
08:57:04FromDiscord<Solitude> guys, does this work? `echo "test"`?
08:57:04NimEventerNew thread by Markus_gritsch: Try except else, see https://forum.nim-lang.org/t/9034
09:13:41PMunch@Solitude, maybe I'm OOTL here, but why wouldn't that work?
09:14:02FromDiscord<Elegantbeef> They're being passive aggressive
09:15:15PMunchAaah I see now :P
09:17:06NimEventerNew thread by Mardiyah: A = b = c = 7 Nim syntax, see https://forum.nim-lang.org/t/9035
09:29:55FromDiscord<Elegantbeef> How dare you pmunch explaining how finally works to me!
09:31:01PMunchHaha, it wasn't so much for you as for anyone else who might be reading
09:32:40FromDiscord<Elegantbeef> Mostly just dislike the `else` now that i think about it
09:32:49FromDiscord<Elegantbeef> It's a shitty name
09:33:11PMunchWell it's what should happen if nothing was caught
09:33:32FromDiscord<Elegantbeef> there is no else case of a try though
09:33:35FromDiscord<Elegantbeef> It's like python's for else
09:33:39FromDiscord<Elegantbeef> It's dumb naming
09:33:49PMunchfor..else?
09:33:54FromDiscord<Elegantbeef> `succeed` or similar is nicer to me
09:34:02FromDiscord<Phil> wait, what?
09:34:14PMunchFair enough, but that would introduce another keyword..
09:34:19FromDiscord<Elegantbeef> > for loops also have an else clause which most of us are unfamiliar with. The else clause executes after the loop completes normally. This means that the loop did not encounter a break
09:34:32PMunchHuh
09:34:39FromDiscord<Phil> That
09:34:41FromDiscord<Phil> What
09:34:41FromDiscord<Elegantbeef> Stupid names
09:34:51PMunchI mean the idea is good
09:34:56PMunchBut yeah, silly name
09:35:12FromDiscord<Phil> I don't think I know of a usecase, but I guess there are a few
09:35:27FromDiscord<Elegantbeef> Yea i dont ever see the point
09:35:48FromDiscord<Elegantbeef> can make a macro in Nim for replacing try else
09:35:57FromDiscord<Phil> There's also try else?
09:36:02FromDiscord<Phil> I thought it was try except?
09:36:14FromDiscord<Phil> My world is crumbling down around me
09:36:18FromDiscord<Elegantbeef> try else in python is "try and if anything doesnt raise do else"
09:36:24PMunch@Phil, https://forum.nim-lang.org/t/9034
09:37:51FromDiscord<Phil> In my head that's just "finally" with a different name, where am I wrong?
09:38:03FromDiscord<Elegantbeef> it's ran only if there are no exceptions
09:38:06FromDiscord<Elegantbeef> Finally is ran always
09:38:16FromDiscord<Phil> But
09:38:17FromDiscord<Phil> like
09:38:22FromDiscord<Elegantbeef> That's the delimiination it's finally with `if getCurrentException == nil`
09:38:40FromDiscord<Phil> Yeah I don't find that expressive
09:39:01FromDiscord<Phil> At the very least a different name, I agree with you on that one beef
09:39:53FromDiscord<Elegantbeef> I mean add `hasException()` and then you have nice `if hasException(): ...`
09:40:04FromDiscord<Elegantbeef> Boom we just made it nice to write without adding any code 😛
09:44:52*vicecea quit (Remote host closed the connection)
09:45:21*vicecea joined #nim
09:48:07PMunchYou still get another nesting level though
09:49:39PMunchI mean this is basically the rest of the procedure. So you're now two layers deep for your entire procedure
09:55:49*toulene quit (Ping timeout: 240 seconds)
09:55:59*toulene joined #nim
10:01:03*PMunch quit (Read error: Connection reset by peer)
10:18:46*PMunch joined #nim
10:50:56FromDiscord<sheldon> How to rename files with walkFiles?
10:59:02*PMunch_ joined #nim
11:09:31FromDiscord<demotomohiro> I guess, adding all paths you want to rename to seq and rename them after finishing `walkFiles` is safer than rename them inside `walkFiles` loop.
11:11:04*PMunch quit (Killed (NickServ (GHOST command used by PMunch_)))
11:11:10*PMunch_ is now known as PMunch
11:11:30*PMunch_ joined #nim
11:18:33FromDiscord<sheldon> Does it look like reading the content to a new named file and remove the old file?
11:23:15FromDiscord<exelotl> no, you can just use `renameFile(source, dest)`
11:23:17FromDiscord<exelotl> https://nim-lang.org/docs/os.html#moveFile%2Cstring%2Cstring
11:23:27FromDiscord<exelotl> (edit) "`renameFile(source," => "`moveFile(source,"
11:51:35NimEventerNew thread by Didlybom: Recommended protobuf library, see https://forum.nim-lang.org/t/9036
11:53:20FromDiscord<Bubblie> In reply to @TryAngle "is there an echo": This would be a nice feature without having to do stdout.write
11:53:57FromDiscord<Bubblie> Because almost all other languages offer this capability of chosing between a new line and just the same one without having to do stdout
11:56:33pchhttps://github.com/kinkinkijkin/nimsgp readme update (notice at top)
11:56:45FromDiscord<Bubblie> Cool
11:56:52FromDiscord<Bubblie> I have to check this out btw
11:56:57FromDiscord<Bubblie> Software Rendering is really intriguing
11:57:10FromDiscord<Bubblie> Also let me star it
11:58:08FromDiscord<Bubblie> Also for the stdout, I think it may be simple enough to just add functionality that prints on the same line, I mean I could just make a proc that uses stdout.write to print on the same line if I needed to
12:00:58pchnot cool
12:01:05pchnotice at top is extremely serious
12:13:34FromDiscord<Bubblie> Oh shit I read everything underneath
12:14:00FromDiscord<Bubblie> I hope everything is okay
12:14:53FromDiscord<Bubblie> Opening links on apple discord tends to be a bit shitty, so my bad
12:16:12pchno, nothing is okay
12:16:21pchnothing anyone can do about it anyways though
12:17:41*slowButPresent joined #nim
12:23:43FromDiscord<Bubblie> Im sorry
12:44:24*lumidify quit (Ping timeout: 272 seconds)
12:44:49*lumidify joined #nim
12:45:19*Gustavo6046 quit (Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world. <screw you aloo_shu my old line was better and more creative!>)
13:22:36FromDiscord<Require Support> curious what editors you guys are using with nim
13:22:47PMunchI use Vim
13:23:01PMunchBut I think most people use VSCode
13:23:33FromDiscord<Require Support> ye ive been using vscode but it feels slow
13:25:50FromDiscord<UN533N_5PY> i broke my emacs config a while ago and lost interest for a bit. ↵Came back to it a few days ago↵i was on codium tho
13:26:09FromDiscord<ynfle> In reply to @PMunch "I use Vim": me too
13:26:29FromDiscord<UN533N_5PY> installed nimlsp and it seems to be fine enough, for a long time i had no auto complete becuase i didnt setup nimlsp or lsp mode...
13:35:47NimEventerNew thread by Choltreppe: Wierd macro overloading problem, see https://forum.nim-lang.org/t/9038
13:41:04pchi use whatever i felt like installing
14:01:46FromDiscord<xflywind> https://media.discordapp.net/attachments/371759389889003532/956553410369450014/unknown.png
14:01:49NimEventerNew thread by Xflywind: [news] NimScript won't report incorrect errors in vscode with the latest devel branch, see https://forum.nim-lang.org/t/9039
14:06:49FromDiscord<Bubblie> In reply to @Require Support "curious what editors you": CLion
14:06:49FromDiscord<Bubblie> Lmao
14:18:55FromDiscord<Bubblie> How good is C2Nim vs Futhark
14:19:37FromDiscord<Bubblie> Because I know they both allow for header usage right
14:22:00PMunchWell, I wrote Futhark because I have literally never been able to get c2nim to work for me
14:22:17FromDiscord<Bubblie> Oh no
14:22:33PMunchBut Futhark feels like magic
14:22:38FromDiscord<Bubblie> 👀
14:22:46FromDiscord<Bubblie> I saw someone complaining about it yesterday though
14:22:50FromDiscord<Bubblie> Regarding some kind of issue?
14:23:05PMunchIt's not perfect, but in my opinion it's way ahead of the other options
14:23:12PMunchHmm, what was that?
14:23:13FromDiscord<Bubblie> Alright
14:23:21FromDiscord<Bubblie> I dont remember let me see if I can find the context
14:23:48FromDiscord<Bubblie> In reply to @PMunch "That's because Futhark uses": Here
14:24:08FromDiscord<Bubblie> Not sure if you can see replies on irc
14:24:11FromDiscord<xflywind> c2nim can convert simple C code to Nim. It should be fit for simple algorithms conversion from C to Nim.
14:24:12FromDiscord<Bubblie> Can you?
14:24:14PMunchNot really..
14:24:24FromDiscord<Bubblie> Let me get the discord link then
14:24:35FromDiscord<Bubblie> https://discord.com/channels/371759389889003530/371759389889003532/956233466373103627
14:24:43PMunchIt looks like this: https://irclogs.nim-lang.org/24-03-2022.html#14:23:48
14:24:44FromDiscord<Bubblie> I hope that works
14:24:57FromDiscord<Bubblie> Oh damn
14:25:04PMunchWell that would work if I logged into Discord..
14:25:07FromDiscord<Bubblie> Yeah
14:25:09FromDiscord<Bubblie> Hmmmm
14:25:17FromDiscord<xflywind> In reply to @flywind "c2nim can convert simple": For instance: https://github.com/nim-lang/Nim/blob/devel/lib/system/dragonbox.nim
14:25:21FromDiscord<Bubblie> Well im not exactly sure how to make it instant for you to look at
14:25:29FromDiscord<Bubblie> Because usually i can hit a reply and it takes me to that message
14:25:33PMunchOh, you where replying to one of my own comments :P
14:25:38FromDiscord<Bubblie> Yeah
14:25:59FromDiscord<Bubblie> I should have specified that
14:26:04FromDiscord<Bubblie> Sorry I have no idea how irc works
14:26:06PMunchWell the way to share it with me would be to find it in irclogs.nim-lang.org and share the link
14:26:10PMunchLike I did to you
14:26:20FromDiscord<Bubblie> Oh alright sure
14:26:24PMunchThis is the comment you replied to: https://irclogs.nim-lang.org/23-03-2022.html#16:50:24
14:26:35FromDiscord<Bubblie> Ye
14:26:43FromDiscord<Bubblie> Ill keep that in mind
14:26:47FromDiscord<Bubblie> Sorry about that PMunch
14:26:51PMunchAnyways, that was just that they couldn't echo out a string representation of a Futharked object
14:27:00PMunchWhich is caused by a bug in Nim I believe
14:27:05FromDiscord<Bubblie> Oh no
14:27:16FromDiscord<Bubblie> Is this bug going to be fixed soon?
14:28:58PMunchWho knows, might be
14:29:25PMunchIt's not the biggest bug in the world, but it can certainly cause some trouble
14:30:38PMunchOh, now it has gotten a tag and an assignee, so maybe it will be fixed soon
14:31:13FromDiscord<Bubblie> 👀
14:31:22FromDiscord<Bubblie> How many people work on nim?
14:35:23FromDiscord<Rika> maybe 3 fulltime
14:35:51FromDiscord<Bubblie> Damn, 3 people? Thats insane for a language this well made
14:36:03FromDiscord<Reptorian> Just discovered Nim, haven't used it yet.
14:36:26FromDiscord<willyboar> I think 2 paid
14:37:36FromDiscord<Bubblie> I need to fix this NimGL vulkan issue
14:37:45FromDiscord<Bubblie> Keep forgetting
14:38:59FromDiscord<Bubblie> NimGL hasnt been updated in a year, I hope they accept my PR
14:39:05FromDiscord<Reptorian> i know indentations matter in nim, but one liners with if else is possible in nim?
14:39:19FromDiscord<mratsim> In reply to @Reptorian "i know indentations matter": if: foo else: bar
14:39:49FromDiscord<Reptorian> In reply to @mratsim "if: foo else: bar": Got it. I think ill like it better than python.
14:40:18FromDiscord<mratsim> In reply to @Bubblie "Damn, 3 people? Thats": status.im is giving a huge amount of funding for a small lang, for ~3years now: https://nim-lang.org/sponsors.html
14:40:30FromDiscord<Bubblie> Thats awesome!
14:40:30FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/956563163497787423/unknown.png
14:40:34FromDiscord<Bubblie> 👀
14:40:55FromDiscord<Reptorian> I come from mainly G'MIC background with some C#, C++, and python skills. Just hoping to see i can get around python as i dislike it.
14:41:12FromDiscord<Bubblie> I think you will like nim
14:41:17FromDiscord<Bubblie> I have a similar background
14:42:30FromDiscord<Bubblie> I know python well, as well as java c# c++, and I was looking for languages that made using C/C++ actually bareable
14:42:41FromDiscord<Bubblie> I tried rust, and I still am, but I struggle with its syntax
14:43:02FromDiscord<Bubblie> Then I found nim just randomly looking, and its genuinely really uniquely structured, in a good way
14:43:23FromDiscord<Bubblie> I use to absolutely despise white space languages till I found nim
14:43:30FromDiscord<Bubblie> Which actually uses spaces well for once holy shit
14:44:03FromDiscord<Bubblie> You would think in years of programming proper whitespace would exist sooner
14:44:54FromDiscord<mratsim> frankly after 2 weeks you really forget about them
14:45:08FromDiscord<Bubblie> Forget about what?
14:45:15FromDiscord<mratsim> it's like switching between mac/windows/linux, familiarity
14:45:18FromDiscord<mratsim> spaces
14:45:33FromDiscord<Reptorian> In reply to @mratsim "frankly after 2 weeks": I never got over white space in python
14:45:37FromDiscord<Bubblie> Well with python definitely not, with nim I was able to get over it
14:45:43FromDiscord<Rika> i never got over braces on other languages
14:45:52FromDiscord<Bubblie> I actually love braces
14:45:54FromDiscord<Bubblie> LMAO
14:46:03FromDiscord<Bubblie> I think thats the java lover in me talking though
14:46:11FromDiscord<mratsim> For python I have issue with having to do "if is_instance_of(foo)" everywhere to catch bugs
14:46:31FromDiscord<mratsim> and docker/virtualenv
14:46:41FromDiscord<Rika> im fine with braces when it is optional or for single-line blocks, i guess
14:46:58FromDiscord<Reptorian> Same here. I like braces.
14:47:02FromDiscord<Bubblie> Does nim have something for braces, that sounds cursed
14:47:06FromDiscord<Bubblie> Though
14:47:13FromDiscord<Rika> it used to
14:47:15FromDiscord<Reptorian> (edit) removed "Same here." | "braces." => "braces too."
14:47:27FromDiscord<Rika> it was removed due to lack of maintenance
14:47:31FromDiscord<Bubblie> If nim had braces and whitespace support that would be cool
14:47:39FromDiscord<Bubblie> But I think thats too much
14:47:40FromDiscord<Bubblie> And also
14:47:43FromDiscord<Bubblie> Might lead to confusion
14:48:06FromDiscord<Reptorian> In reply to @Bubblie "Might lead to confusion": Not really. Maybe with a larger audience.
14:48:14FromDiscord<Bubblie> Yeah
14:49:11FromDiscord<Reptorian> In reply to @Bubblie "Might lead to confusion": In my case coming from a language that did not had braces support, it made my code a lot easier to read when it arrived.
14:50:05FromDiscord<Bubblie> Also I like how nim has robust opengl support, but I wish it had better vulkan and glfw because nimgl’s glfw is really weird, the way they handle GLFWwindow is not normal, you make the variable and use the variable to open and close rather than put that variable into a glfw method to open and close the window, normal glfw in every other language uses the method for easiness to just straight up use glfw docs without having to read sepera
14:50:15FromDiscord<Bubblie> And whats weird, is that those two are the only two
14:50:22FromDiscord<Bubblie> The rest do glfw methods
14:50:24FromDiscord<Bubblie> Like glfwSetCallback
14:50:26FromDiscord<Bubblie> Etc.
14:50:27FromDiscord<Bubblie> Its just weird
14:50:32FromDiscord<Bubblie> This is not the only issue
14:50:49FromDiscord<Bubblie> Im fixing it but im unsure whether I want to also fork and redo a lot of nimgl vulkan and glfw bindings
14:51:01FromDiscord<mratsim> In reply to @Bubblie "If nim had braces": oh sweet summer child
14:51:03FromDiscord<Rika> In reply to @Reptorian "In my case coming": it will lead to newbie confusion when they see two code pieces use one or the other.
14:51:16FromDiscord<Rika> i already said that nim used to have braces support
14:51:18FromDiscord<Bubblie> Yeah
14:51:21FromDiscord<mratsim> you actually can, there are Nim "skins"
14:51:21FromDiscord<Rika> but was removed for lack of maintenance
14:51:26FromDiscord<Bubblie> In reply to @mratsim "you actually can, there": NO WAY
14:51:31FromDiscord<Bubblie> 👁️👁️
14:51:40FromDiscord<Rika> mans not listening to me
14:51:48FromDiscord<Bubblie> No I am
14:51:50FromDiscord<Bubblie> LOL
14:51:51FromDiscord<mratsim> my avatar is in red
14:51:57FromDiscord<Rika> thats read?
14:51:58FromDiscord<Rika> red
14:52:05FromDiscord<Rika> thought it was orange
14:52:52FromDiscord<Bubblie> It looks red to le
14:52:55FromDiscord<Bubblie> (edit) "le" => "me"
14:53:09FromDiscord<Reptorian> In reply to @Rika "it will lead to": That is barely a issue there. Only 4 people code in said language including myself, and they're good at it. Multiple syntax for similar output is fine once you get used to it.
14:53:09FromDiscord<Bubblie> In reply to @Bubblie "Im fixing it but": I think I might end up doing this
14:53:43FromDiscord<Reptorian> Also, multiple syntax can make legible codes on hand of those who know how to use them right
14:54:35FromDiscord<Reptorian> (edit) "4" => "5"
14:54:57*arkurious joined #nim
14:55:27FromDiscord<Reptorian> Can i share python codes here? I want to see if i can convert them to nim.
14:55:52FromDiscord<Rika> In reply to @Reptorian "That is barely a": i am talking for nim
14:56:04FromDiscord<Rika> nim isnt aiming to be a "5 user language"
14:56:05FromDiscord<Bubblie> In reply to @Reptorian "Can i share python": Sure
14:56:17FromDiscord<Bubblie> I think thats fine?
14:56:29FromDiscord<Bubblie> I mean I think sharing of other languages is allowed right
14:56:48FromDiscord<Bubblie> Nothing in the rules states otherwise, and im not sure why there would
14:58:33FromDiscord<Reptorian> this is my most used python code - https://pastebin.com/pagSYLG1 . how feasible would it be to convert this to nim.
14:58:38FromDiscord<Reptorian> (edit) "nim." => "nim?"
14:59:17FromDiscord<Rika> sure why not its prolly gonna take a while though
15:01:01FromDiscord<Bubblie> If I put echo in a for loop, would it keep printing something in a new line?
15:01:43FromDiscord<Rika> echos have newlines yues
15:01:44FromDiscord<Reptorian> what that code does is add numbers or remove number from `#@gui` codes where appropriate - Sample of #@gui code here - https://pastebin.com/6n95DBqT
15:02:12FromDiscord<Bubblie> In reply to @Rika "echos have newlines yues": So, id have to use stdout if I want it on the same line
15:02:21FromDiscord<Rika> you would probably have a better time parsing strings in nim than python
15:02:38FromDiscord<Rika> there is `parseutils` and that other one i dont remember the name of but beef pushes it a lot
15:02:46FromDiscord<Rika> In reply to @Bubblie "So, id have to": stdout.write yes
15:03:01FromDiscord<Bubblie> Damn, you think nim should just add a statement for this?
15:03:07FromDiscord<huantian> strscans I’d assume
15:03:08FromDiscord<Rika> why
15:03:16FromDiscord<Rika> In reply to @huantian "strscans I’d assume": yes that
15:03:17FromDiscord<Bubblie> Every language has either print or println to specify
15:03:31FromDiscord<Bubblie> Nim is the only one ive seen that doesn’t
15:03:38FromDiscord<Bubblie> Even though you can use std
15:04:13FromDiscord<exelotl> it's not really a problem right? echo uses stdout anyways
15:04:30FromDiscord<huantian> In reply to @Bubblie "Every language has either": I mean python doesn’t, it uses a kwarg in print
15:04:33FromDiscord<Rika> i dont know what the issue is
15:04:41FromDiscord<Bubblie> In reply to @huantian "I mean python doesn’t,": Wait what
15:04:50FromDiscord<Rika> `print(xxx. end="")`
15:04:54FromDiscord<Rika> (edit) "`print(xxx." => "`print(xxx,"
15:04:55FromDiscord<Bubblie> Wait
15:04:57FromDiscord<Bubblie> Yeah you are right
15:05:29FromDiscord<Bubblie> I might as well uh
15:05:35FromDiscord<Bubblie> Use the funny stdout in that case
15:05:43FromDiscord<huantian> You can make your alias if you want
15:05:49FromDiscord<huantian> (edit) "You can make your ... alias" added "own"
15:05:55FromDiscord<Bubblie> Yeah
15:07:30FromDiscord<Bubblie> Is any of the nimgl developers in this server?
15:07:45FromDiscord<mratsim> In reply to @Bubblie "Is any of the": probably hanging in #gamedev
15:07:53FromDiscord<Bubblie> 👀
15:11:10FromDiscord<Bubblie> I cant seem to find their names in this discord
15:11:10FromDiscord<Bubblie> Damn
15:12:53FromDiscord<Solitude> there are other vulkan bindings, maybe they work out better for you https://github.com/Clyybber/vulkanim
15:13:03FromDiscord<Bubblie> 👀👀👀
15:13:06FromDiscord<Bubblie> Ill check it out
15:15:40FromDiscord<Bubblie> Holy shit
15:15:44FromDiscord<Bubblie> This just might work!
15:16:24FromDiscord<Bubblie> Now Id need to figure out glfw
15:16:59FromDiscord<Bubblie> There is a glfw 3 wrapper
15:17:19FromDiscord<Bubblie> Im assuming nimgl’s glfw bindings could work with this vulkans
15:17:22FromDiscord<Bubblie> Maybe
15:20:08FromDiscord<Bubblie> Is it possible to use futhark with glfw in this case
15:20:44FromDiscord<Bubblie> I wonder
15:22:06FromDiscord<Bubblie> Whats with both nimgl glfw wrappers and this other one I found messing with GLFWWindow? Bruh…
15:23:44FromDiscord<Bubblie> @PMunch hello, sorry to bother but is it possible to use futhark for glfw?
15:23:58FromDiscord<Rika> i dont see why not?
15:24:02FromDiscord<Rika> if its C
15:24:36FromDiscord<Bubblie> Yeah, I also think so, but glfw is a bit weird in how its made, so im unsure how well this would work, Ig I wont know unless I try.
15:25:52PMunch_I believe someone has already done that
15:26:08FromDiscord<Bubblie> With futhark?
15:26:52PMunch_Ah my mistake
15:27:01PMunch_It was raylib with the glfw backend
15:27:10PMunch_But it would have to be seriously weird to not work
15:27:38FromDiscord<Bubblie> Alright, will use futhark for this
15:27:58FromDiscord<Bubblie> Im not sure if I want to go to the full length of making my own bindings
15:28:28FromDiscord<Bubblie> I would use the other two if they didnt mess with glfwwindow weirdly
15:29:52FromDiscord<Bubblie> I hope im not coming off as “I CAN DO IT BETTER” because I don’t think that, I just feel like these bindings arent suitable in the long run of what im doing
15:30:47PMunch_What do you mean?
15:31:46*PMunch quit (Killed (NickServ (GHOST command used by PMunch_)))
15:31:52*PMunch_ is now known as PMunch
15:32:12*PMunch_ joined #nim
15:32:19FromDiscord<Ksr> sent a code paste, see https://play.nim-lang.org/#ix=3Tme
15:33:34FromDiscord<Phil> If you want to control that via compiler flags then yeah, that's the way to go I would say
15:33:45FromDiscord<Bubblie> sent a long message, see http://ix.io/3Tmf
15:33:54FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3Tmg
15:33:57FromDiscord<Ksr> In reply to @Isofruit "If you want to": Is it typically done without compiler flags?
15:34:03FromDiscord<dom96> don't miss the parens 😛
15:34:07FromDiscord<Bubblie> Another example would be using glfw with vulkan
15:34:16FromDiscord<Bubblie> Because, that was HELLA weird in nimgl
15:34:24FromDiscord<Bubblie> Because I did get that working
15:34:38FromDiscord<Bubblie> However it was like, I never had to do this in other bindings to other languages
15:34:42FromDiscord<Bubblie> Not sure why this has to happen here
15:35:42FromDiscord<Bubblie> I might use nimgl glfw anyway, to see if it works with these seperate vulkan bindings I found
15:35:52FromDiscord<Phil> I haven't seen enough code to say typically, I can name you various ways to technically do it (could have a const in a file somewhere or decide via environment variable but that looks suboptimal).
15:36:20FromDiscord<Ksr> thx!
15:36:45FromDiscord<Bubblie> (edit) "I" => "solitude"
15:36:50FromDiscord<mratsim> In reply to @Ksr "Hi :). What is": https://github.com/status-im/nim-taskpools/blob/stable/taskpools/instrumentation/loggers.nim#L20-L22
15:36:52FromDiscord<Bubblie> I was planning on pring a fix to nimgl vulkan but im gonna test these new bindings that solitude sent
15:37:06FromDiscord<Bubblie> See if a similar issue exists, or if any do
15:37:19FromDiscord<Ksr> In reply to @mratsim "https://github.com/status-im/nim-taskpools/blob/sta": thank you 🙂
15:37:41FromDiscord<mratsim> I have a small design by contract stuff here: https://github.com/status-im/nim-taskpools/blob/stable/taskpools/instrumentation/contracts.nim#L59-L108
15:38:01FromDiscord<Reptorian> nim support class?
15:38:06FromDiscord<Reptorian> (edit) "class?" => "class/struct?"
15:40:09FromDiscord<Solitude> what?
15:41:01FromDiscord<Reptorian> checked in documentation, it does. haven't seen it in examples on the website though
15:41:07FromDiscord<Bubblie> Oh nim doesnt have classes
15:41:16FromDiscord<Bubblie> Well it can with one of the add ons if you want
15:41:26FromDiscord<Bubblie> But nim uses procs and such
15:42:00FromDiscord<Bubblie> And types
15:42:15FromDiscord<Bubblie> And objects
15:42:58FromDiscord<Bubblie> In reply to @Bubblie "Well it can with": Dont reccomend, nim is structured like this for a reason
15:43:35FromDiscord<Rika> no its fine to use
15:43:43FromDiscord<Bubblie> Well its fine to use
15:43:44FromDiscord<Bubblie> Yeah
15:43:45FromDiscord<Bubblie> But
15:43:56FromDiscord<enthus1ast> what do you miss that classes provide?
15:44:14FromDiscord<Bubblie> Yeah thats kinda the point, because nim has other ways to do things classes can
15:45:02FromDiscord<Reptorian> i downloaded nim, what next so i can get started coding?
15:45:12FromDiscord<Reptorian> (edit) "coding?" => "coding to see what nim is about?"
15:45:25FromDiscord<enthus1ast> add it to the path
15:45:32FromDiscord<enthus1ast> make sure your c compiler is on the path as well
15:45:43FromDiscord<enthus1ast> install the the vscode plugin (asuming you use vscode)
15:45:51FromDiscord<enthus1ast> that it i guess
15:45:52FromDiscord<Bubblie> Nim has a thing for doing it automatically too rigjt
15:46:02FromDiscord<Reptorian> oh, so nim is a compiled language?
15:46:03FromDiscord<enthus1ast> choosenim
15:46:21FromDiscord<huantian> Then write your Nim code in a file ending with Nim, then compile it with `nim c filename.nim`
15:46:38FromDiscord<Rika> nim is compiled, yes
15:46:59FromDiscord<Reptorian> i was looking for a interpretative language that i might like more than python
15:47:27FromDiscord<Rika> is there a reason you want an interpreted language
15:47:40FromDiscord<Rika> nim has an interpreter but it is not fully one to one with the compiled version
15:48:01FromDiscord<enthus1ast> javscript, lua?
15:48:08FromDiscord<enthus1ast> javascript
15:48:31FromDiscord<enthus1ast> but since you're here i would give nim a go ;)
15:49:19FromDiscord<Reptorian> In reply to @Rika "is there a reason": my workflow is better with interpretative language. i don't like to have to compile, and then run, but rather run it straight away
15:49:31FromDiscord<Rika> nim has a "compile and run" command
15:49:46FromDiscord<enthus1ast> and its quite fast compiling
15:49:50FromDiscord<Rika> `nim c -r file` for if you want the binary to be in the directory, `nim r file` if you dont need the binary
15:50:06FromDiscord<huantian> And with an IDE you can just have it compile and run as well
15:50:11FromDiscord<huantian> Like with vscode
15:50:22FromDiscord<reilly> But if you can't tolerate a compiler, there is NimScript... https://nim-lang.org/docs/nims.html
15:51:07FromDiscord<Rika> In reply to @Rika "nim has an interpreter": be careful of what i said here
15:51:16FromDiscord<Rika> it is not one to one with the compiled version
15:51:21FromDiscord<enthus1ast> the big benefit is, that nim produces small self contained binaries, that you can easily distribute
15:51:32FromDiscord<Reptorian> In reply to @Rika "`nim c -r file`": guess i will be using `nim r file` then. i'll see what happens.
15:51:39FromDiscord<enthus1ast> for interpreters you need to also distribute the interpreter and all source etcpp
15:51:42FromDiscord<Solitude> maybe you could try wrigin some nim before making assumptions how it will impact your workflow
15:51:46FromDiscord<Solitude> writing
15:53:00*qwestion joined #nim
15:53:59FromDiscord<Rika> In reply to @enthus1ast "the big benefit is,": unless you use nim bindings
15:54:04FromDiscord<Rika> (edit) "nim" => "nim-c"
15:54:23FromDiscord<enthus1ast> yes true↵(@Rika)
15:55:05FromDiscord<Solitude> In reply to @Rika "unless you use nim-c": except if you link to recent libc and you send your binary to ubuntu user, not so selfcontained anymore...
15:55:07FromDiscord<Reptorian> In reply to @Solitude "maybe you could try": i do have experience with coding, i usually know if it won't be compatible with my workflow or not. `nim r file` trick seem to be something i'm open to trying as it's compatible with my workflow.
15:55:23FromDiscord<Solitude> In reply to @Reptorian "i do have experience": yeah, whatever
15:55:34FromDiscord<huantian> Solution\: destroy all Ubuntu users
15:55:43FromDiscord<Rika> solution: destroy ubuntu
15:56:30PMunchHmm, is there a way to create an async procedure manually?
15:56:36FromDiscord<Rika> as in?
15:56:43FromDiscord<Rika> why?
15:56:47PMunchI'm playing around with COAP
15:56:51FromDiscord<Rika> COAP?
15:57:01PMunchAnd there you attach a callback and then send data
15:57:12PMunchAnd you have to handle all the callback stuff in the handler
15:57:27PMunchI want to wrap that in an async/await system instead
15:58:16FromDiscord<Rika> --expandMacro:async
15:58:18FromDiscord<Reptorian> coap is quite a interesting name for whatever it is
15:58:27FromDiscord<huantian> Hm you could asyncDump the func
16:00:44PMunch@Rika, haha yeah I know I can hack it that way :P
16:01:17*Jjp137 quit (Ping timeout: 240 seconds)
16:01:23PMunch@Reptorian, COnstrained APplications I believe it's short for
16:01:30FromDiscord<Rika> CA
16:01:34FromDiscord<Rika> xdddd
16:01:36PMunchOr maybe the P is protocol
16:01:36*Jjp137 joined #nim
16:01:46FromDiscord<Rika> CAP
16:01:58PMunchConstrained Application Protocol (CoAP)
16:02:04PMunchAccording to WikiPedia
16:02:22FromDiscord<huantian> Just coap with it
16:02:41FromDiscord<Rika> coap seethe mald
16:06:00*droidrage joined #nim
16:16:35FromDiscord<enthus1ast> does one has inserted json with db\_mysql? How have you quoted the json? Because it seems just adding it with ? does not work since it produces\: `Invalid JSON text: "Invalid escape character in string."` for me
16:23:59FromDiscord<enthus1ast> mhhhh now its getting strange, i cannot even add this json via dbeaver to a mariadb json field.... what?
16:24:40FromDiscord<Rika> is your json valid
16:25:08FromDiscord<enthus1ast> json.$ generated it
16:29:09FromDiscord<enthus1ast> thats the json, nothing special\: https://play.nim-lang.org/#ix=3Tmx
16:29:28FromDiscord<enthus1ast> (i had newlines, in my copy -.-, dbeaver works)
16:30:03FromDiscord<enthus1ast> but this does not\:↵sql"""INSERT INTO Entry (title, userId, formdata) VALUES (?, ?, ?);"""
16:33:16*PMunch quit (Quit: leaving)
16:43:55FromDiscord<Bubblie> sent a long message, see http://ix.io/3TmD
16:44:24FromDiscord<Bubblie> (edit) "http://ix.io/3TmD" => "http://ix.io/3TmE"
16:44:39FromDiscord<Rika> nasm............
16:44:43FromDiscord<Rika> ive heard of that before
16:44:45FromDiscord<Bubblie> (edit) "http://ix.io/3TmE" => "http://ix.io/3TmF"
16:45:27FromDiscord<treeform> I like FASM over NASM, but FASM does not work on mac 😦
16:46:04FromDiscord<treeform> GAS is the worst though...
16:46:26FromDiscord<treeform> but parts of it are probably most used via GCC.
16:46:38FromDiscord<Bubblie> https://www.nasm.us this one 💀 but yeah assembly is not something people tend to touch unless they want to go so low level that they become insane
16:46:52FromDiscord<Bubblie> In reply to @treeform "I like FASM over": FASM is cool
16:48:02FromDiscord<Bubblie> In reply to @Bubblie "https://www.nasm.us this one 💀": Programming in assembly has made me lose my sanitu
16:48:04FromDiscord<Bubblie> (edit) "sanitu" => "sanity"
16:48:53FromDiscord<Bubblie> In reply to @treeform "GAS is the worst": It is
16:48:55FromDiscord<Bubblie> I agree with that
16:49:06*Zectbumo joined #nim
16:50:12FromDiscord<treeform> But if you use GCC you use GAS (as a library), if you use VC++ you use MASM (as a library), if you use LLVM you use its llvm-as. NASM is never used in any regular nim flow...
16:50:28FromDiscord<Bubblie> In reply to @treeform "But if you use": Yes
16:50:55FromDiscord<Bubblie> However I thought it would be funny to use NASM
16:50:58FromDiscord<Bubblie> I was mistaken
16:52:04FromDiscord<Bubblie> LLVM assembly is more or less universal right
16:52:07FromDiscord<Bubblie> Because its llvm
16:52:12FromDiscord<Bubblie> It compiles to platform specific assembly
16:53:21FromDiscord<Generic> it isn't really an assembly
16:53:22FromDiscord<demotomohiro> That sound like it is different from real assembly lang
16:53:29FromDiscord<Bubblie> Llvm is IR
16:53:31FromDiscord<Bubblie> Intermediate
16:53:32FromDiscord<Generic> yeah
16:53:44FromDiscord<Bubblie> But its like, not somethjng you would use
16:53:46FromDiscord<Bubblie> Just use like
16:53:55FromDiscord<Bubblie> An actual language with llvm to develop your own languag
16:53:57FromDiscord<Bubblie> If you use it
16:54:14FromDiscord<Goat> @treeform I'm at the end of your Meta-programming FOSDEM talk. I'm simply blown away.
16:54:15FromDiscord<Bubblie> Idk why you would need to fully write in llvm IR to make a language
16:54:30FromDiscord<Bubblie> In reply to @Goat "<@!107140179025735680> I'm at the": FOSDEM talk?
16:54:54FromDiscord<Bubblie> Also MASM is hella cursed
16:54:55FromDiscord<Goat> https://fosdem.org/2022/schedule/event/nim_metaprogramming/
16:55:00FromDiscord<Bubblie> 👀
16:55:51FromDiscord<Bubblie> If I made a top ten of assemblys not to use
16:56:00FromDiscord<Bubblie> MASM would be the one you should avoid because holy shit
16:56:11FromDiscord<Bubblie> Its like, so impossinle to properly use it
16:56:13FromDiscord<Bubblie> I fucking hate windows
16:56:45nrds<Prestige99> Could always switch to something, uh, better
16:59:19FromDiscord<DevNugget> how can I pass in the C code that Nim generates into a C compiler like gcc
17:00:20FromDiscord<Goat> I think you can generate a c library file and then use that like you normally would any other file
17:03:25FromDiscord<demotomohiro> @DevNugget Nim automatically call gcc to guild generated C code. If you want to use Nim in C project, Nim can generate dynamic/static link library that can be used for C.
17:04:29FromDiscord<demotomohiro> https://nim-lang.org/docs/nimc.html
17:05:58*rockcavera joined #nim
17:05:58*rockcavera quit (Changing host)
17:05:58*rockcavera joined #nim
17:06:22FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#foreign-function-interface
17:10:11FromDiscord<DevNugget> thanks, I just wanted to know for a small experiment
17:13:24FromDiscord<DevNugget> can we possibly convert the generated code into assembly?
17:21:25FromDiscord<konsumlamm> that's what the C compiler does
17:21:38FromDiscord<konsumlamm> which is called automatically
17:28:28FromDiscord<Recruit_main707> if you want to check the assembly code you can use https://godbolt.org, but yeah you should be able to decompile the executable too
17:52:29FromDiscord<mratsim> In reply to @Bubblie "Dont need to be": Just create your assembler using Nim macros
17:53:42FromDiscord<mratsim> example: https://github.com/mratsim/constantine/blob/master/constantine/math/arithmetic/assembly/limbs_asm_mul_x86.nim#L91-L122
17:54:22FromDiscord<Bubblie> Thats great!
17:56:22FromDiscord<Bubblie> Didnt know nim could do that
17:56:38FromDiscord<mratsim> or your JIT assembler: https://github.com/mratsim/photon-jit/blob/master/examples/ex02_jit_brainfuck_vm.nim#L23-L85
17:57:29FromDiscord<mratsim> I have created a compiler in Nim macros: https://github.com/numforge/laser/blob/master/laser/lux_compiler/backend/lux_codegen.nim
17:58:55FromDiscord<Bubblie> I think this might help DeveloperNugget
17:58:58FromDiscord<Bubblie> As well
17:58:59FromDiscord<mratsim> and someone JIT LLVM IR from Nim https://github.com/can-lehmann/exprgrad/blob/main/exprgrad/llvmgen.nim
17:59:04FromDiscord<Bubblie> 👀
17:59:19FromDiscord<demotomohiro> In reply to @DevNugget "can we possibly convert": You can ask GCC to generate assembly code with `nim --noLinking --passC:"-masm=intel -S" --nimcache:/tmp/pathtocachedir compile example.nim` then, you get assembly code in `/tmp/pathtocachedir` directly.
18:00:28FromDiscord<iencec> [DevNugget](https://matrix.to/#/%40_discord_583926969138151426%3At2bot.io) if you want to have a look at the C code generated by nim, it is in the nimcache (location depends on your system) iirc there is also the compile command as comment in there.
18:01:53FromDiscord<demotomohiro> Nim has `--asm` option to produce assembler code but it is verbose and less readable.
18:02:15FromDiscord<demotomohiro> https://github.com/compiler-explorer/compiler-explorer/issues/3393
18:03:29*vicfred joined #nim
18:17:01FromDiscord<treeform> In reply to @Goat "<@!107140179025735680> I'm at the": Thanks!
18:48:48NimEventerNew thread by Domogled: Datsaset in javascript DOM, see https://forum.nim-lang.org/t/9040
18:59:15FromDiscord<retkid> https://github.com/Glavnokoman/vuh
18:59:21FromDiscord<retkid> what do you guys think of this syntax
18:59:36FromDiscord<retkid> apart from the... c++
18:59:38FromDiscord<retkid> 🤮
19:02:15*neurocyte0917090 quit (Quit: The Lounge - https://thelounge.chat)
19:08:41*jmdaemon joined #nim
19:12:03*neurocyte0917090 joined #nim
19:16:57FromDiscord<Bubblie> Whats this
19:17:29FromDiscord<Bubblie> Oh holy shit
19:17:43FromDiscord<Bubblie> In reply to @retkid "apart from the... c++": I think its decent ig
19:18:14FromDiscord<Bubblie> It does get rid of some boilerplate
19:18:22FromDiscord<Bubblie> Id have to use it more if I wanted to see how good it is
19:18:35FromDiscord<Bubblie> The problem is, I used c++ vulkan but not really vuh
19:19:06FromDiscord<retkid> It took me a bit
19:19:11FromDiscord<retkid> I don't like C
19:19:12FromDiscord<retkid> (edit) "C" => "C++"
19:19:13FromDiscord<Bubblie> Also, I think nim vulkan bindings gets rid of a ton of verbosity already
19:19:16FromDiscord<retkid> I like C
19:19:20FromDiscord<Bubblie> In reply to @retkid "I don't like C++": Nobody does
19:19:26FromDiscord<retkid> C is cool tho
19:19:32FromDiscord<Bubblie> Not even people who actually like and use C++ like C++
19:19:38FromDiscord<retkid> Nana
19:19:40FromDiscord<retkid> i had a friend
19:19:47FromDiscord<retkid> she was writing a strut
19:20:00FromDiscord<retkid> and i was like "why do you do this to yourself"
19:20:03FromDiscord<Bubblie> In reply to @retkid "C is cool tho": C is fine to an extent, there have been times where it has driven me absolutely mad
19:20:04FromDiscord<retkid> she said "oh i like C++"
19:20:11FromDiscord<Bubblie> HOW
19:20:28FromDiscord<retkid> its all the worst parts of Java with all the worst parts of C
19:20:33FromDiscord<Bubblie> LMAO
19:20:49FromDiscord<Bubblie> C++ templates are very powerful ngl
19:20:58FromDiscord<Bubblie> And its preprocessor is also a bit too powerful
19:21:07FromDiscord<Bubblie> Allows you to do some cursed things
19:21:25FromDiscord<retkid> It took me a bit to understand how the class tempalates worked
19:21:31FromDiscord<retkid> I liked it whence i got it
19:21:33FromDiscord<Bubblie> Yeah, its not easy
19:21:35FromDiscord<retkid> but then after that
19:21:46FromDiscord<retkid> i was like "ok how do i do a buffer read"
19:21:49FromDiscord<Bubblie> 💀
19:21:52FromDiscord<Bubblie> Im so sorry
19:22:01FromDiscord<Bubblie> I know where this is goong
19:22:06FromDiscord<retkid> so i sat there
19:22:06FromDiscord<Bubblie> (edit) "goong" => "going"
19:22:08FromDiscord<retkid> think i got it
19:22:11FromDiscord<retkid> wont compiel
19:22:11FromDiscord<retkid> (edit) "compiel" => "compile"
19:22:13FromDiscord<Bubblie> LMAO
19:22:14FromDiscord<retkid> random issues
19:22:19FromDiscord<retkid> understand i do not got it
19:22:23FromDiscord<Bubblie> Sounds like c++
19:22:25FromDiscord<retkid> the buffer is stupid and makes no sense
19:22:26*Zectbumo quit (Remote host closed the connection)
19:22:30FromDiscord<retkid> and then just did a static read
19:22:37FromDiscord<retkid> ¯\_(ツ)_/¯
19:22:59FromDiscord<Bubblie> The whole reason I am trying to use nim is so I dont have to deal with the shit that is vulkan c++
19:23:16FromDiscord<retkid> I want to get into GPGPU compute shaders
19:23:33FromDiscord<retkid> ...
19:23:36FromDiscord<retkid> notabily i lack a gpu
19:23:38FromDiscord<Bubblie> LMAO
19:23:43FromDiscord<Bubblie> Well you gotta get that first
19:23:57FromDiscord<retkid> i can go opencl tho
19:24:04FromDiscord<Bubblie> Thats good
19:24:15FromDiscord<retkid> so thats what im working with while im trying to figure out how vulkan works
19:24:30FromDiscord<Bubblie> Vulkan is very hard but imo very worth it
19:24:34FromDiscord<Bubblie> The things you are able to do is just
19:24:36FromDiscord<Bubblie> Insanity
19:24:39*neurocyte0917090 quit (Read error: Connection reset by peer)
19:24:42FromDiscord<Bubblie> Also no fucking opengl state machine
19:24:43FromDiscord<Bubblie> Oh god
19:24:46FromDiscord<Bubblie> Fuck the state machine
19:24:47FromDiscord<Bubblie> Seriously
19:24:57FromDiscord<Bubblie> Opengl is nice till I have to deal with state
19:25:01FromDiscord<Bubblie> Because its not working
19:25:04FromDiscord<Bubblie> And then I shit myself
19:25:28FromDiscord<Bubblie> In reply to @retkid "so thats what im": Thats a good idea
19:25:41*neurocyte0917090 joined #nim
19:25:48FromDiscord<Bubblie> Opencl and vulkan are similar in some ways concept wise
19:25:50FromDiscord<Bubblie> So it can help
19:26:01FromDiscord<Bubblie> I learnt more about vulkan through opengl actually
19:26:10FromDiscord<Bubblie> Even though they are still very different
19:28:10FromDiscord<retkid> well vulkan is insanely fast and works everywhere
19:28:16FromDiscord<retkid> that isn't an igpu from 2011
19:28:39FromDiscord<retkid> so its very worth it
19:28:49FromDiscord<retkid> people also pay you more for this hidden knowledge
19:29:13FromDiscord<retkid> I need to reprogram a project from ground up
19:29:53FromDiscord<retkid> and i couldn't get it to work because compute times on a cpu where too slow and hard to parallelize. Using vulkan can actually make it work
19:29:56FromDiscord<Bubblie> In reply to @retkid "people also pay you": LOL
19:30:08FromDiscord<Bubblie> Well, its not that its hidden knowledge, its just that everyone is scared of it
19:30:17FromDiscord<retkid> I also have another project that i wish to make it happen on a scale like
19:30:21FromDiscord<retkid> idk 1000x bigger than it is
19:30:29FromDiscord<Bubblie> Vulkan seems like a good idea
19:30:35FromDiscord<Bubblie> You think ur gonna use vulkan c++
19:30:44FromDiscord<Bubblie> It might be uh, well, hell
19:30:54FromDiscord<retkid> and in order to process 7000 hours of footage i would want to move it to a gpu based framework
19:31:12FromDiscord<Bubblie> Im trying to get nim working with vulkan
19:31:26FromDiscord<Bubblie> As that eliminates a lot of the verbosity
19:31:39FromDiscord<Bubblie> There are nim vulkan bindings I plan to try out today
19:31:43FromDiscord<Bubblie> See how it plays out
19:32:58FromDiscord<Bubblie> If you want me to let you know how it goes
19:33:01FromDiscord<Bubblie> I can do so
19:35:16FromDiscord<Bubblie> @retkid
19:36:46FromDiscord<retkid> @Bubblie please do
19:36:48FromDiscord<retkid> <3
19:37:25FromDiscord<Bubblie> Np!
19:42:13FromDiscord<Solitude> In reply to @Bubblie "Allows you to do": https://wandbox.org/permlink/zytWInl1oYJ6JiV6
19:42:51FromDiscord<Solitude> zamn, i think my snippet broke it
20:05:39PMunch_@Bubblie, how's glfw wrapping going?
20:42:24FromDiscord<Phil> sent a long message, see http://ix.io/3To7
20:56:37FromDiscord<Bubblie> In reply to @PMunch_ "@Bubblie, how's glfw wrapping": Im currently not coding atm, I will let you know how it goes when I start though
20:56:59FromDiscord<Bubblie> The funny thing is with vulkan is that its very VERY hard to use it without glfw
20:57:26FromDiscord<Bubblie> So I kinda have to use it to properly use vulkan, so im gonna first try to see if the new vulkan bindings solitude provided work
20:59:08*Zectbumo joined #nim
21:25:55*PMunch_ quit (Quit: Leaving)
21:30:25FromDiscord<Elegantbeef> What's the code?↵(@Phil)
21:32:00FromDiscord<Phil> I just wanted to vent a bit about that really confusing error code. I don't have a minimal example and the practical example is a layer of 7 generic functions
21:32:45FromDiscord<Phil> Which I think is too much to troubleshoot without being aware of my architecture and that's just sending us down a whole another rabbit hole
21:42:35*wyrd quit (Ping timeout: 240 seconds)
21:45:59*Zectbumo quit (Read error: Connection reset by peer)
21:49:31*wyrd joined #nim
21:57:15*Zectbumo_ joined #nim
21:59:29FromDiscord<theanxietybuster> ElegantBeef, glad to see you’re still active here and with Nim :HeartPichu:
21:59:41FromDiscord<theanxietybuster> (edit) "ElegantBeef," => "Elegantbeef,"
22:00:17FromDiscord<Elegantbeef> I amaze myself sometime
22:31:09FromDiscord<Sabena Sema> huh julia has a nim-like do syntax
22:31:20FromDiscord<Sabena Sema> did they take that from us or us from them, or is there a common ancestor?
22:31:33FromDiscord<Sabena Sema> I think maybe like .... ruby might have such a syntax
22:32:06FromDiscord<Sabena Sema> where are those vulkan bindings? I was looking for some that actually read the xml file
22:52:03FromDiscord<abdu> How do we have function static variable for `foo( int i) { static int n = i ; }` of C in nim?
22:54:14FromDiscord<Elegantbeef> Do you ever listen to people?
22:55:10FromDiscord<Elegantbeef> you can use `global` for global variables it's the closest Nim has to `static`
22:55:29FromDiscord<Elegantbeef> The above is not possible in nim without using codegendecl
23:03:42*Zectbumo_ quit (Remote host closed the connection)
23:07:34FromDiscord<exelotl> I don't think I've ever needed a local `static` in my life 😅
23:11:08FromDiscord<Elegantbeef> Yea wanting a local variable to be statically allocated is a bit odd
23:12:20FromDiscord<exelotl> like it's in theory useful for something like a PRNG that has its own state and returns a different output every time
23:12:43FromDiscord<exelotl> but then you decide you want to seed the RNG, or have more than one instance of it
23:12:55FromDiscord<exelotl> then it goes out the window :P
23:14:14FromDiscord<Elegantbeef> What even are the semantics in C anyway
23:14:14FromDiscord<Elegantbeef> it's statically allocated but assigned from the stack, seems redundant
23:15:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tow
23:18:18*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
23:19:33FromDiscord<exelotl> nope it's lamer than that, needs a static initialiser so basically only constant values allowed
23:19:49FromDiscord<Elegantbeef> But how does it use the procedure parameter then?
23:20:13FromDiscord<Elegantbeef> Does it implicitly do `proc doThing(a: static int)`?
23:21:14*jmdaemon joined #nim
23:21:44FromDiscord<exelotl> https://wandbox.org/permlink/qMVjyOLnopQYpOWm
23:21:58FromDiscord<exelotl> it's illegal
23:22:05FromDiscord<Elegantbeef> So they shared code that doesnt work
23:22:14FromDiscord<Elegantbeef> Nice
23:23:16FromDiscord<Bubblie> In reply to @Sabena Sema "where are those vulkan": Oh
23:23:20FromDiscord<Bubblie> Let me get the link for you
23:23:28FromDiscord<Bubblie> I havent tried them yet though
23:23:33FromDiscord<Bubblie> Ive tried nimgl’s, its not functional
23:23:42FromDiscord<Bubblie> I was going to start fixing it until I was sent this one
23:24:07FromDiscord<Bubblie> https://github.com/Clyybber/vulkanim
23:27:14*vicfred quit (Quit: Leaving)
23:59:47FromDiscord<Vindaar> In reply to @exelotl "https://wandbox.org/permlink/qMVjyOLnopQYpOWm": didn't read everything, but you just cannot initialize the static variable directly like that. Splitting it into two lines like this https://wandbox.org/permlink/UUkvC1UM67HEwW7g is fine (which may be obvious to you)