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