00:16:49 | FromDiscord | <spoon> now create a folder named CON |
00:28:06 | FromDiscord | <Bubblie> With nimble can you change the local repo path? |
00:28:21 | FromDiscord | <Elegantbeef> What do you mean? |
00:29:13 | FromDiscord | <Bubblie> Local git repo path |
00:29:38 | FromDiscord | <Elegantbeef> Do you mean like symlinking it to develop it? |
00:29:49 | FromDiscord | <Elegantbeef> There is a `nimble develop` |
00:30:23 | FromDiscord | <Bubblie> I think that may be it, sorry idk how else to say it |
00:30:37 | FromDiscord | <Bubblie> Ill look at nimble develop |
00:31:24 | * | Stink joined #nim |
00:33:42 | FromDiscord | <Bubblie> Yeah nimble develop seems to be what I needed |
00:34:12 | FromDiscord | <Bubblie> Ty |
00:41:07 | * | vicfred quit (Quit: Leaving) |
01:16:43 | FromDiscord | <Patitotective> In https://nim-lang.org/docs/colors.html how do I `extractRgb` as float values (from 0.0-1.0 instead of 0-255)? |
01:17:35 | FromDiscord | <Elegantbeef> `myCol.extractRgb.mapIt(it.float / 255)` |
01:17:56 | FromDiscord | <Elegantbeef> Hmm that probably makes a seq eh |
01:19:24 | FromDiscord | <Elegantbeef> Actually it doesnt work cause `mapit` expects `typed` |
01:19:32 | FromDiscord | <Elegantbeef> so just iterate over the result and div by 255 |
01:20:01 | FromDiscord | <auxym> see also https://github.com/treeform/chroma which has many color types, including some that use float32 |
01:42:37 | FromDiscord | <Bubblie> Nim + java = nimava |
01:43:02 | FromDiscord | <Bubblie> Cursed |
01:45:40 | FromDiscord | <treeform> I agree |
01:46:16 | nrds | <Prestige99> Jim |
01:46:30 | FromDiscord | <Bubblie> since nim has an embeddable vm for scripting its entirely possible |
01:46:32 | FromDiscord | <Bubblie> 😈 |
01:46:54 | FromDiscord | <Bubblie> In reply to @nrds "<Prestige> Jim": Perfect |
01:46:54 | FromDiscord | <Elegantbeef> Except Nim's VM is relatively simple and not JVM supporting |
01:46:56 | FromDiscord | <Bubblie> Jim |
01:47:10 | FromDiscord | <Bubblie> In reply to @Elegantbeef "Except Nim's VM is": Yeah id have to alter things to support it |
01:47:15 | FromDiscord | <Bubblie> But its very possible |
01:47:24 | FromDiscord | <Bubblie> Its been done with other langs |
01:47:36 | FromDiscord | <Elegantbeef> I mean Nim's VM is relatively simple |
01:47:42 | FromDiscord | <Bubblie> Ye |
01:47:44 | FromDiscord | <Bubblie> Which is good |
02:00:02 | FromDiscord | <Girvo> Hi all 🙂 |
02:02:44 | FromDiscord | <m4ul3r> With nimcrypto CTR aes256, I'm getting a different decryption with the same key and iv in one program than another. ↵I have one program that generates the key, iv, and encoded sequence. I am then wanting to implement the decryption in another program |
02:03:59 | FromDiscord | <Elegantbeef> Hello girvo |
02:09:52 | FromDiscord | <m4ul3r> In reply to @m4ul3r "With nimcrypto CTR aes256,": Here is my code:↵https://pastebin.com/iK2XRwma |
02:10:51 | FromDiscord | <m4ul3r> (edit) "code:↵https://pastebin.com/iK2XRwma" => "code:↵https://pastebin.com/iK2XRwma↵Error at the bottom, out should be `sc`" |
02:16:09 | FromDiscord | <Girvo> I'm having a lot of fun getting interactive JTAG debugging of Nim code working haha |
02:16:28 | NimEventer | New question by Steve0Greatness: Join array in nim, see https://stackoverflow.com/questions/71566204/join-array-in-nim |
02:16:49 | FromDiscord | <Elegantbeef> Is that fun like i use the word or the actual meaning of fun? |
02:17:20 | FromDiscord | <Girvo> Both 😄 |
02:17:44 | FromDiscord | <Girvo> Its genuinely fun to see interactive debugging of an embedded chip working with Nim code. Its _nearly_ working perfectly with PlatformIO |
02:18:03 | FromDiscord | <Girvo> Nearly. Seems to work best with `-d:danger` interestingly |
02:18:12 | FromDiscord | <Elegantbeef> Ah i'm having "fun" tracking down a concept bug 😛 |
02:18:38 | FromDiscord | <Elegantbeef> Why work on my game when i can fix this bug that isnt impacing |
02:18:42 | FromDiscord | <Elegantbeef> impacting me\ |
02:18:46 | FromDiscord | <Girvo> Haha, yeah that sounds "fun" for sure |
02:20:54 | FromDiscord | <Girvo> But yeah, `-d:danger` has the regular old PlatformIO debugging working, though obviously minus the Nim info internally to it. Does `-d:danger` override `--lineDir:on`? |
02:21:14 | * | Gustavo6046 joined #nim |
02:21:53 | FromDiscord | <Elegantbeef> do not think so |
02:22:07 | FromDiscord | <Girvo> Alright, I'm going to have a play |
02:22:10 | FromDiscord | <Elegantbeef> Think you should be using `--debugger:native` |
02:22:24 | FromDiscord | <Girvo> Yeah I am |
02:22:40 | FromDiscord | <Elegantbeef> Doesnt that imply lineDir? |
02:22:59 | FromDiscord | <Girvo> I believe so, I'm just not 100% sure what I should be getting haha |
02:23:15 | FromDiscord | <Girvo> As its also all `--compileOnly` which makes things slightly more interesting I think |
02:23:35 | FromDiscord | <Elegantbeef> Nah it's all the same |
02:23:43 | FromDiscord | <Girvo> With `-d:danger` the PlatformIO GDB stuff breaks on AppMain correctly. Without it, it does not |
02:23:57 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=3T7T |
02:25:49 | FromDiscord | <Girvo> To be honest, it's working well enough for me to debug the C code and map it myself anyway so I'm not too stressed. Would be lovely if there was some way to set a breakpoint in the Nim code and have it map to the C code. Or failing that, I'd love a way to click on a Nim line and have it take me to the corresponding nimcache C code line if it exists haha |
02:26:10 | FromDiscord | <Girvo> I might write an extension for VSCode to do that myself actually, the latter idea anyway |
02:30:21 | FromDiscord | <Elegantbeef> Time to extend the Nim extension 😛 |
02:32:18 | FromDiscord | <Girvo> If people would find that useful, absolutely! |
02:34:17 | FromDiscord | <Girvo> Interestingly, with `-d:danger` the debugger picks up the C source in nimcache correctly. Without it, it gives me assembly output haha |
02:36:55 | FromDiscord | <Girvo> Oh! |
02:37:25 | * | neurocyte0917090 quit (Ping timeout: 240 seconds) |
02:37:39 | FromDiscord | <Girvo> So: `--debugger:native` and _then_ `-d:danger` -- no `#line` macros in the C source. But with `--debugger:native` _after_ `-d:danger`, there is! |
02:38:33 | FromDiscord | <Elegantbeef> Seems like danger does indeed remove `lineDir` |
02:39:05 | FromDiscord | <Girvo> Yeah but only if passed after `--lineDir` or `--debugger` -- if passed before, it doesn't override it, it seems |
02:39:32 | FromDiscord | <Girvo> I'll have a play and see if I can nail down exactly how to approach this, and I'll document it for others |
02:39:56 | FromDiscord | <Girvo> Holy shit it works haha |
02:40:03 | FromDiscord | <Girvo> Including Nim code debugging properly |
02:40:08 | FromDiscord | <Bubblie> does nim have that ! for flagging whether something should not be true |
02:40:13 | FromDiscord | <Bubblie> like c++ and java |
02:40:13 | FromDiscord | <Bubblie> so |
02:40:18 | FromDiscord | <Bubblie> !isNotClosed |
02:40:18 | FromDiscord | <Elegantbeef> `not x` |
02:40:21 | FromDiscord | <Bubblie> thanks |
02:40:27 | FromDiscord | <Girvo> https://media.discordapp.net/attachments/371759389889003532/955657175429165056/unknown.png |
02:42:11 | FromDiscord | <Elegantbeef> Congrats |
02:42:53 | FromDiscord | <Girvo> I'm stoked, this is going to make things so much easier haha |
02:44:00 | FromDiscord | <Girvo> Will still need to work out how to get a decent representation of certain nim variables in this, but honestly low-level is better on this embedded stuff anyway. |
02:44:56 | * | acidsys quit (Excess Flood) |
02:45:29 | * | acidsys joined #nim |
03:18:07 | FromDiscord | <ajusa> anyone know the status of https://nim-lang.org/docs/hcr.html ? Doesn't seem to work with the example I tried, C codegen issues |
03:22:03 | FromDiscord | <Elegantbeef> HCR isnt well supported so that's par for the corse |
03:22:10 | FromDiscord | <Elegantbeef> course even |
03:22:15 | FromDiscord | <Elegantbeef> Maybe even coarse for funsies |
03:24:19 | FromDiscord | <creikey> wait is nim profitable |
03:24:30 | FromDiscord | <creikey> like are there people who get paid full time to work on the compiler |
03:24:49 | FromDiscord | <Elegantbeef> There are 2/3 core team members who work full time afaik |
03:26:36 | FromDiscord | <Elegantbeef> Araq is full time, miran is the paid community manage and i think flywind is soon to be paid in some capacity |
03:26:37 | FromDiscord | <Bubblie> nimgl vulkan bindings are annoying |
03:26:55 | FromDiscord | <Bubblie> the opengl wrapper from nim uses glfw right? |
03:27:12 | FromDiscord | <Bubblie> or, it doesn't |
03:27:13 | FromDiscord | <Elegantbeef> No it doesnt use anything |
03:27:19 | FromDiscord | <Elegantbeef> What's annoying with the vulkan bindings? |
03:27:32 | FromDiscord | <Bubblie> for some reason, I keep coming across this issue with glfwCreateWindow |
03:27:38 | FromDiscord | <Bubblie> which is very odd |
03:27:43 | FromDiscord | <Bubblie> its specifically that |
03:27:56 | FromDiscord | <Elegantbeef> What issues? |
03:28:22 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix= |
03:28:31 | FromDiscord | <Bubblie> is there a stacktrace or something I can do to get more info |
03:28:45 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix= |
03:28:53 | FromDiscord | <Bubblie> this is also one of the things that comes up |
03:28:58 | FromDiscord | <Elegantbeef> That's a C assertion |
03:29:01 | FromDiscord | <Bubblie> yeah |
03:29:08 | FromDiscord | <Elegantbeef> So the issue is you're passing a nil window |
03:29:17 | FromDiscord | <Elegantbeef> Or non nil window rather |
03:29:27 | FromDiscord | <Bubblie> weird... because even in the glfw usage example in nimgl |
03:29:31 | FromDiscord | <Elegantbeef> Cant get a stacktrace from non nim code |
03:29:31 | FromDiscord | <Bubblie> it does exactly that |
03:29:35 | FromDiscord | <Bubblie> In reply to @Elegantbeef "Cant get a stacktrace": yeah |
03:29:36 | FromDiscord | <Bubblie> thought so |
03:29:52 | FromDiscord | <Bubblie> so im assuming this may be from the bindings themselves, as it then species two things |
03:30:02 | FromDiscord | <Bubblie> my let window |
03:30:02 | FromDiscord | <Bubblie> and |
03:30:11 | FromDiscord | <Bubblie> the glfw.nim line 5130 |
03:30:20 | FromDiscord | <Bubblie> where the binding for createWindow is |
03:30:34 | FromDiscord | <Bubblie> this is the code for the proc |
03:30:34 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3T81 |
03:30:41 | FromDiscord | <Bubblie> (edit) |
03:30:42 | FromDiscord | <Bubblie> well uh |
03:30:46 | FromDiscord | <Bubblie> discord didn't do the indents right |
03:30:47 | FromDiscord | <Bubblie> thanks discord |
03:31:36 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix= |
03:31:40 | FromDiscord | <Elegantbeef> It's fine here |
03:31:40 | FromDiscord | <Bubblie> seems to be causing the trouble |
03:31:42 | FromDiscord | <Bubblie> apparantly |
03:31:47 | FromDiscord | <Bubblie> In reply to @Elegantbeef "It's fine here": it works? |
03:31:49 | FromDiscord | <Bubblie> wait what |
03:31:54 | FromDiscord | <Elegantbeef> The code |
03:32:11 | FromDiscord | <Elegantbeef> just noticed you edited |
03:32:17 | FromDiscord | <Elegantbeef> Generally edits from discord do the die and disappear |
03:32:26 | FromDiscord | <Bubblie> you using nimgl's glfw bindings and everything and it worked? Is it okay if I see what you did? |
03:32:28 | FromDiscord | <Bubblie> In reply to @Elegantbeef "*just noticed you edited*": oh |
03:32:29 | FromDiscord | <Bubblie> LMAO |
03:32:42 | FromDiscord | <Bubblie> im not sure if windows is being a piece of shit |
03:32:45 | FromDiscord | <Bubblie> I mean I did restart |
03:32:54 | FromDiscord | <Bubblie> this wouldn't be the first time windows fucked with glfw windowing |
03:33:02 | FromDiscord | <Bubblie> had a problem with lwjgl glfw as well |
03:33:05 | FromDiscord | <Bubblie> where windows was the issue |
03:33:12 | FromDiscord | <Bubblie> so I restarted and it worked |
03:35:39 | FromDiscord | <Elegantbeef> I cant even get the tvulkan example to compile |
03:36:59 | * | arkurious quit (Quit: Leaving) |
03:41:35 | FromDiscord | <Bubblie> Oh lord |
03:41:41 | FromDiscord | <Bubblie> You think the bindings are fucked then? |
03:42:19 | FromDiscord | <Elegantbeef> Well the example might not have been kept up to date |
03:42:48 | FromDiscord | <Bubblie> Yeah |
03:44:19 | FromDiscord | <Bubblie> Its okay if the vulkan bindings cannot work, I might use futhark or c2nim to just use the vulkan dll and glfw stuff instead or just statically link it myself |
03:44:42 | FromDiscord | <Bubblie> Thats less than ideal however |
03:45:25 | FromDiscord | <Elegantbeef> Static linking vulkan seems weird |
03:46:17 | FromDiscord | <Bubblie> Whats also odd is the way nimgl decided to alter some of the glfw methods, weirdly instead of glfwDestroyWindow or ShouldDestroyWindow you assign the glfwwindow variable and then use that variable to destroy it which is window.destroyWindow() which goes against the general flow of glfw entirely its pretty weird |
03:46:25 | FromDiscord | <Bubblie> Other bindings dont do this |
03:46:33 | FromDiscord | <Bubblie> For glfw |
03:46:37 | FromDiscord | <Bubblie> In reply to @Elegantbeef "Static linking vulkan seems": It does |
03:46:51 | FromDiscord | <Bubblie> I could use c2nim it may make things super easy |
03:46:56 | FromDiscord | <Bubblie> Cause then its just, import and be done |
03:47:03 | FromDiscord | <Bubblie> Or futhark maybe |
03:47:10 | FromDiscord | <Bubblie> Am I spelling that right? |
03:47:11 | FromDiscord | <Bubblie> Idk |
03:47:23 | FromDiscord | <Elegantbeef> Well you generally want to dynamically link to give more freedom |
03:47:55 | FromDiscord | <Bubblie> Yeah |
03:48:10 | FromDiscord | <Bubblie> Ill try dynamic linking maybe, if I cant get nimgl to work |
03:48:18 | FromDiscord | <Bubblie> I hope I can because idk whats going on |
03:48:36 | FromDiscord | <Bubblie> If you have any ideas or if you get it working throw it my way if you can |
03:49:44 | * | Zectbumo joined #nim |
03:49:58 | FromDiscord | <Bubblie> Is there any docs on dynamic linking in nim btw? |
03:50:32 | FromDiscord | <Elegantbeef> Oh i didnt realize i needed a flag |
03:50:44 | FromDiscord | <Bubblie> 👀 |
03:53:10 | FromDiscord | <Elegantbeef> Example runs here in linux land |
03:53:25 | FromDiscord | <Bubblie> 👀can I see what you did |
03:53:38 | FromDiscord | <Elegantbeef> I used their TVulkan example |
03:53:51 | FromDiscord | <Elegantbeef> then i compiled with `-d:vulkan` |
03:54:05 | FromDiscord | <Elegantbeef> And for dynamic linking refer to https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import |
03:54:09 | FromDiscord | <Bubblie> Tysm |
03:58:16 | FromDiscord | <Bubblie> And oh, maybe thats why |
03:58:21 | FromDiscord | <Bubblie> I forgor the flag |
03:58:26 | FromDiscord | <Bubblie> -d:vulkan |
03:58:39 | FromDiscord | <Bubblie> Although the error in which im getting seems unrelated |
03:59:13 | FromDiscord | <Bubblie> Ill try fully compying the example, as I did this with my own code rather than using their example directly |
04:01:07 | FromDiscord | <Bubblie> (edit) "compying" => "copying" |
04:01:08 | FromDiscord | <Elegantbeef> If it doesnt work for you i can only imagine an issue with windows bindings, drivers |
04:01:14 | FromDiscord | <Bubblie> Yeah |
04:01:24 | FromDiscord | <Bubblie> I forked nimgl vulkan |
04:01:32 | FromDiscord | <Bubblie> So I can take a look at a possible fix |
04:02:15 | FromDiscord | <Bubblie> Windows dont be shit challenge IMPOSSIBLE |
04:04:23 | FromDiscord | <Bubblie> I want to switch to fedora soon for programming, but its also good im developing on windows since id want my application run everywhere so working on a shit OS has benefits |
04:04:56 | FromDiscord | <Elegantbeef> Benefits like riding a bike with no seat, it's all a pain in the ass |
04:11:27 | FromDiscord | <Bubblie> Fr |
04:22:46 | nrds | <Prestige99> Could you just try running the application via wine? |
04:31:12 | FromDiscord | <Elegantbeef> Yea wine build errors @Bubblie |
04:31:29 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3T8j |
04:31:54 | FromDiscord | <Elegantbeef> Ah that's gfw init |
04:36:52 | * | slowButPresent quit (Quit: leaving) |
04:50:11 | FromDiscord | <Girvo> In reply to @Elegantbeef "If it doesnt work": Of which there are many 😄 so much "fun"... |
04:51:02 | FromDiscord | <Elegantbeef> There you go |
04:55:38 | * | xaltsc quit (Remote host closed the connection) |
05:07:15 | FromDiscord | <Shinyzenith> Is it possible to use OOP in nim? I was thinking of implementing some functions on this type with a parameter of Self https://media.discordapp.net/attachments/371759389889003532/955694122121986058/unknown.png |
05:08:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3T8p |
05:08:18 | FromDiscord | <Elegantbeef> For instance |
05:08:43 | FromDiscord | <Shinyzenith> well I have done that |
05:09:00 | FromDiscord | <Shinyzenith> but is that all the choice I have? |
05:09:03 | FromDiscord | <Shinyzenith> that's what I wanted to ask |
05:09:13 | FromDiscord | <Elegantbeef> I mean you can use libraries to emulate classes |
05:09:23 | FromDiscord | <Elegantbeef> What's the issue with the above though? |
05:09:41 | FromDiscord | <Shinyzenith> Nothing, I was just wondering if there are other choice |
05:09:42 | FromDiscord | <Shinyzenith> (edit) "choice" => "choices" |
05:09:50 | FromDiscord | <Elegantbeef> oolib is one example of a macro that implements a classlike behaviour |
05:10:07 | FromDiscord | <Shinyzenith> what's that |
05:10:36 | FromDiscord | <Elegantbeef> If you want to be able to override the behaviour have inheritance you can make `HerbServer = ref object of RootObj` then you can later do `MyChild = ref object of HerbServer` and use methods |
05:10:40 | FromDiscord | <Elegantbeef> Oolib is library |
05:11:01 | FromDiscord | <Shinyzenith> Oh ok |
05:11:03 | FromDiscord | <Shinyzenith> thank you |
05:11:38 | FromDiscord | <Shinyzenith> is it possible to store procedures in a typedef? |
05:12:15 | FromDiscord | <Elegantbeef> You mean have pointer procs? |
05:12:28 | FromDiscord | <Shinyzenith> loved that feature from zig, just straight up storing functions in structs https://media.discordapp.net/attachments/371759389889003532/955695433395630080/unknown.png |
05:12:33 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "You mean have pointer": Nope |
05:12:36 | FromDiscord | <Shinyzenith> just raw procedures |
05:12:48 | FromDiscord | <Elegantbeef> No Nim type sections are purely type sections |
05:12:58 | FromDiscord | <Shinyzenith> Ok understood |
05:12:59 | FromDiscord | <Shinyzenith> thanks! |
05:13:12 | FromDiscord | <Elegantbeef> would that be accessed `Server.init`? |
05:13:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/XWw |
05:13:59 | FromDiscord | <Elegantbeef> Though it'd be more idiomatic to return the server |
05:14:14 | FromDiscord | <Elegantbeef> `proc init(_: type Server): Server` for instance |
05:16:40 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "would that be accessed": yep |
05:16:54 | FromDiscord | <Elegantbeef> Then the above would work for you |
05:17:08 | FromDiscord | <Shinyzenith> Cool! i'll try it |
05:18:28 | FromDiscord | <Shinyzenith> yep that's how I called it in zig https://media.discordapp.net/attachments/371759389889003532/955696946784395284/unknown.png |
05:18:49 | FromDiscord | <Elegantbeef> Oh it's for an instance |
05:19:14 | FromDiscord | <Shinyzenith> yep not the raw type, that wouldn't make much sense |
05:19:18 | FromDiscord | <Elegantbeef> If it's for an instance just do `proc init(server: var Server)` |
05:19:20 | FromDiscord | <Shinyzenith> nor would I t work I think |
05:19:30 | FromDiscord | <Elegantbeef> It does make sense in Nim atleast |
05:19:45 | FromDiscord | <Shinyzenith> well in the init function I am populating the struct |
05:19:46 | FromDiscord | <Shinyzenith> so |
05:19:49 | FromDiscord | <Shinyzenith> I think that should work |
05:19:59 | FromDiscord | <Shinyzenith> (the example you posted above) |
05:20:09 | FromDiscord | <Elegantbeef> You can populate the result in the `proc init(_: type Server): Server` |
05:20:18 | FromDiscord | <Elegantbeef> They're the same thing just different use semantics |
05:20:22 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "You can populate the": Yeah I'll do that |
05:20:35 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "They're the same thing": I come from the line of scala and java lol, so the above appeals the most to me |
05:20:48 | FromDiscord | <Shinyzenith> 🤣 |
05:21:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/bTH |
05:21:24 | FromDiscord | <Elegantbeef> Is one way of doing it |
05:21:30 | FromDiscord | <Shinyzenith> I see |
05:21:35 | FromDiscord | <Shinyzenith> Just one question |
05:21:51 | FromDiscord | <Shinyzenith> sent a code paste, see https://play.nim-lang.org/#ix=3T8q |
05:22:14 | FromDiscord | <Elegantbeef> Cause that's what i thought the semantics were in Zig |
05:22:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3T8r |
05:22:33 | FromDiscord | <Elegantbeef> I thought it was forced to be used `Server.init(myVar)` |
05:22:33 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "Or the zig port": yep |
05:22:40 | FromDiscord | <Elegantbeef> Cause you said it was |
05:22:41 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "I thought it was": Nope |
05:22:52 | FromDiscord | <Elegantbeef> Well you said it was which is why |
05:22:53 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "Cause you said it": I think I didn't explain it properly |
05:23:07 | FromDiscord | <Elegantbeef> Yea i got it now |
05:23:11 | FromDiscord | <Elegantbeef> It's dispatched on instance not on type |
05:23:38 | FromDiscord | <Shinyzenith> sent a code paste, see https://play.nim-lang.org/#ix=3T8s |
05:23:42 | FromDiscord | <Shinyzenith> why pass a type and a server struct to it |
05:24:17 | FromDiscord | <Elegantbeef> Like i said it was based off what i understood the semantics was |
05:24:18 | FromDiscord | <Shinyzenith> idk if self exists in nim, in which case proc init():HerbServer= |
05:24:27 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "Like i said it": Ah Ok, got it |
05:24:40 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3T8t |
05:24:45 | FromDiscord | <Elegantbeef> Since it's a free standing function and nim doesnt have return inference |
05:25:04 | FromDiscord | <Shinyzenith> got it, but why the _:type Server? |
05:25:16 | FromDiscord | <Elegantbeef> Cause you need to dispatch based off the type |
05:25:16 | FromDiscord | <Shinyzenith> this is the return type, right? https://media.discordapp.net/attachments/371759389889003532/955698655032123462/unknown.png |
05:25:31 | FromDiscord | <Elegantbeef> `init(): X` and `init(): Y` are ambigious and nim cannot disambiguate |
05:25:40 | FromDiscord | <Elegantbeef> Nim does not do inference based off return type |
05:25:46 | FromDiscord | <Shinyzenith> huh I see |
05:26:01 | FromDiscord | <Elegantbeef> So you need to pass in `Server` so you can do `Server.init` |
05:26:35 | FromDiscord | <Shinyzenith> Oh yea, i remember reading that ↵myfunct(param1) ↵and param1.myfunct are the same |
05:26:36 | FromDiscord | <Shinyzenith> in nim |
05:26:39 | FromDiscord | <Shinyzenith> So it makes sense now |
05:27:02 | FromDiscord | <Elegantbeef> Yes it's UFCS or MCS as nim calls it and it's wonderful |
05:27:27 | FromDiscord | <Shinyzenith> Good stuff 😁 |
05:27:38 | FromDiscord | <Elegantbeef> Allows you to easily expand the functionality of types you dont even author |
05:28:43 | FromDiscord | <Shinyzenith> hmm while doing that, the result keyword lost all syntax highlighting ↵i assume I did something wrong? https://media.discordapp.net/attachments/371759389889003532/955699525283106876/unknown.png |
05:29:09 | FromDiscord | <Shinyzenith> or is result not a valid keyword here? |
05:29:18 | FromDiscord | <Elegantbeef> Syntax highlighting isnt compilation |
05:29:27 | FromDiscord | <Shinyzenith> well yes |
05:29:30 | FromDiscord | <Elegantbeef> It's a proc with a return type `result` exists |
05:29:33 | FromDiscord | <Shinyzenith> but most of the time somethnig fucks up |
05:29:40 | FromDiscord | <Elegantbeef> You're defining the proc in the type section |
05:29:52 | FromDiscord | <Elegantbeef> You cannot define procs in the type section |
05:30:18 | FromDiscord | <Shinyzenith> Oh no I just fucked up the indentation |
05:30:44 | FromDiscord | <Elegantbeef> That's what i said in different words |
05:31:10 | FromDiscord | <Shinyzenith> yus I was acknowledging that 🙏 |
05:32:05 | FromDiscord | <Elegantbeef> Thought the "oh no" was to me |
05:32:26 | FromDiscord | <Shinyzenith> :catno: |
05:32:52 | FromDiscord | <Shinyzenith> anyways, I'm liking nim for complex c projects |
05:33:01 | FromDiscord | <Shinyzenith> i think it will be my first class candidate after zig and cpp |
05:33:13 | FromDiscord | <Shinyzenith> (edit) "i think it will be my first class candidate after zig and cpp ... " added "for c interop" |
05:33:31 | FromDiscord | <Elegantbeef> That far down the list |
05:33:32 | FromDiscord | <Elegantbeef> Shame 😀 |
05:33:52 | FromDiscord | <Shinyzenith> well zig has support for inline functions, it's annoying to redefine them every single time |
05:34:03 | FromDiscord | <Shinyzenith> maybe if pmunch patches support for it, it'll definitely be neck to neck with zig |
05:34:11 | FromDiscord | <Shinyzenith> (edit) "well zig has support for inline functions, it's annoying to redefine them every single time ... " added "in ni" |
05:34:14 | FromDiscord | <Shinyzenith> (edit) "ni" => "nim" |
05:34:35 | FromDiscord | <Elegantbeef> Wonder if he can just make a template which emits the C code internally |
05:35:01 | FromDiscord | <Shinyzenith> hm that sounds like a possible workaround |
05:35:15 | FromDiscord | <Elegantbeef> How many times do we have to say his name to summon him |
05:35:23 | FromDiscord | <Shinyzenith> 🤣 |
05:35:35 | FromDiscord | <Shinyzenith> @PMunch @PMunch 👁️ Hi |
05:35:45 | FromDiscord | <Elegantbeef> Beetlejuice |
05:35:46 | FromDiscord | <Elegantbeef> Wait that's not it |
05:35:58 | FromDiscord | <Shinyzenith> that's not pmunch? |
05:36:18 | FromDiscord | <Elegantbeef> No beetlejuice is surprisingly not pmunch |
05:36:32 | FromDiscord | <Shinyzenith> what now https://media.discordapp.net/attachments/371759389889003532/955701491610566686/unknown.png |
05:36:33 | FromDiscord | <Elegantbeef> He uses matrix and irc anyway so he'll be here when he's here |
05:36:45 | FromDiscord | <Shinyzenith> In reply to @Elegantbeef "He uses matrix ": Oh ok |
05:37:07 | FromDiscord | <Elegantbeef> It's probably morning for him so he'll be on soon TM |
05:37:46 | FromDiscord | <Shinyzenith> Ah ok |
05:38:53 | * | sagax joined #nim |
05:41:12 | FromDiscord | <Elegantbeef> Suppose he could also emit a procedure that's annotated inline and just emits the C code aswell |
05:41:19 | FromDiscord | <Elegantbeef> Should in theory solve the issue |
05:43:26 | FromDiscord | <Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/955703227129659412/unknown.png |
05:43:37 | FromDiscord | <Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/955703275720675368/unknown.png |
05:43:37 | * | toulene quit (Ping timeout: 256 seconds) |
05:43:50 | FromDiscord | <Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/955703329277751306/unknown.png |
05:43:54 | FromDiscord | <Shinyzenith> we had a small chat about the issue |
05:44:48 | FromDiscord | <Elegantbeef> Oh right we're looking at headers not implementation |
05:44:58 | FromDiscord | <Elegantbeef> I'm a dumb dumb |
05:45:36 | * | toulene joined #nim |
05:45:45 | FromDiscord | <Elegantbeef> If you can get the implementation my idea doesnt seem to bad to me, but good luck doing that automatically |
05:46:25 | FromDiscord | <Shinyzenith> yeah , hence zig and cpp on top for now 🙏 |
05:49:49 | FromDiscord | <Elegantbeef> Do you have an example C file with an inline proc? |
05:52:53 | FromDiscord | <Elegantbeef> Found that issue |
06:05:23 | * | ltriant quit (Ping timeout: 256 seconds) |
06:38:54 | * | kayabaNerve quit (Remote host closed the connection) |
06:39:28 | * | kayabaNerve joined #nim |
06:50:47 | * | acidsys quit (Excess Flood) |
06:51:20 | * | acidsys joined #nim |
06:54:05 | * | rockcavera quit (Remote host closed the connection) |
07:41:58 | * | xaltsc joined #nim |
08:38:39 | NimEventer | New Nimble package! run_exe - A mini DSL for Nim that provides syntactic sugar for running/piping shell commands. , see https://github.com/V0idMatr1x/run_exe |
08:39:14 | FromDiscord | <pmunch> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: these are header files where the inline procedures have their implementation in the header. |
08:39:42 | FromDiscord | <Elegantbeef> Yea i realize how dumb my calling myself dumb was after |
08:39:47 | FromDiscord | <pmunch> What you where proposing is pretty much exactly what I intend to do in order to support them |
08:40:11 | FromDiscord | <Elegantbeef> I was thinking how C++ and Zig could use them, then realized my dumb dumb was a dumb dumb dumb |
08:40:17 | FromDiscord | <pmunch> But you have to be careful so that all the parameter names match up |
08:40:34 | FromDiscord | <pmunch> And that they can call other inlines from their bodies |
08:40:52 | FromDiscord | <pmunch> It's just a bit tricky though, should be able to make it work. |
08:41:09 | FromDiscord | <Elegantbeef> The calling other inlines shouldnt be a big deal given first in first out of C |
08:41:47 | FromDiscord | <pmunch> Of course, but it means I can't rename anything. I need to make sure the inline procedures have the exact same name as in C |
08:42:17 | FromDiscord | <Elegantbeef> Yea it's a bunch of tedious work done in string lits 😛 |
08:43:09 | FromDiscord | <pmunch> Pretty much |
08:43:21 | FromDiscord | <pmunch> Which is a pita, but not impossible |
08:44:01 | FromDiscord | <Elegantbeef> Which suprises me 😀 |
08:44:02 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/kvq |
08:44:17 | * | kayabaNerve quit (Ping timeout: 240 seconds) |
08:47:00 | FromDiscord | <pmunch> Already thought of that 😉 |
08:47:08 | FromDiscord | <Elegantbeef> Pmunch writes another tick on his notepad of "I already know that beef tells me still" |
08:47:23 | FromDiscord | <Rika> bingo |
08:47:47 | FromDiscord | <Elegantbeef> Bango bongo |
08:47:57 | FromDiscord | <pmunch> Gotta have an exportc and inline on the body as well of course. But the problem is if you're building directly against the sources like in the STB example and not linking to a library |
08:48:27 | FromDiscord | <pmunch> Now you will have two of the same definition bearing the same name.. |
08:49:12 | FromDiscord | <Elegantbeef> Well this is only for header only so clearly time for a new distinct string 😛 |
08:49:42 | FromDiscord | <Elegantbeef> `implPath"stb_image.h"`! |
08:51:25 | FromDiscord | <Elegantbeef> Unless you want to automagically want to detect it by analyzing the entire file |
09:15:19 | FromDiscord | <enthus1ast> do we have a module that implements parseutils like procs (parseUntil, skipWhile) etc, but for sequences of objects? |
09:17:01 | FromDiscord | <Phil> In reply to @enthus1ast "do we have a": like, parse every individual entry in a seq from type A to B? |
09:17:18 | FromDiscord | <Phil> (edit) "B?" => "B causing the creation of a new seq?" |
09:17:21 | FromDiscord | <enthus1ast> yep |
09:17:22 | FromDiscord | <Elegantbeef> Sounds like they want to define a matcher for a type and use a parser to iterate over it |
09:17:29 | FromDiscord | <Phil> Wouldn't you just use sequtils? |
09:17:47 | FromDiscord | <enthus1ast> i could use sequtils, but i like the api of parseutils |
09:17:56 | FromDiscord | <Phil> seq.map(entry -> parseToMyOtherType(entry)) |
09:18:02 | FromDiscord | <enthus1ast> i mean, i could just build it |
09:18:03 | FromDiscord | <Phil> Fair, I haven't looked at that one so no clue |
09:18:06 | FromDiscord | <Elegantbeef> Say you have "10, 20, 30, 40, 50" and you want to just do `i += parseSeq[int](myString, i)` |
09:18:18 | FromDiscord | <Elegantbeef> I guess also adding to that value |
09:19:53 | FromDiscord | <Elegantbeef> There isnt an api that i know of aside from frosty, but it's not really like parseutils |
09:20:13 | FromDiscord | <Elegantbeef> Would be cool to support more intelligent parse ops inside parseutils |
09:21:34 | FromDiscord | <Phil> Ohhh you have the entire seq as a string, not a string of seq |
09:21:43 | FromDiscord | <Phil> Okay, my misunderstanding |
09:32:14 | FromDiscord | <System64 ~ Flandre Scarlet> macros in Nim are the equivalent of #define in C? |
09:32:42 | NimEventer | New Nimble package! nimSocks - A filtering SOCKS proxy server and client library written in nim., see https://github.com/enthus1ast/nimSocks |
09:35:13 | FromDiscord | <enthus1ast> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: i'm building a parser, i want to do something like this (on lexer Tokens) pos += lexerTokens.parseUntil(newTokenList, it.kind == TokSeperator, pos) |
09:35:39 | FromDiscord | <Phil> Why socks of all things? |
09:36:12 | FromDiscord | <enthus1ast> i could use pattern matching for this, but this is to complicated for me \:/ |
09:36:38 | FromDiscord | <enthus1ast> @Phil\: i try to build a scss parser in nim |
09:37:47 | FromDiscord | <enthus1ast> i'm imagine a package that resembles the parseutils api but for sequences \:) |
09:38:01 | FromDiscord | <Rika> In reply to @System64 "macros in Nim are": Not exactly |
09:38:27 | FromDiscord | <enthus1ast> maybe i could work on it and maybe make a pr to sequtils |
09:39:14 | * | 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!>) |
09:39:39 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3T9h |
09:39:51 | FromDiscord | <Rika> Make a template then |
09:40:16 | FromDiscord | <enthus1ast> ah socks ... i'm still sleepy lol↵(@Phil) |
09:40:35 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright, thanks |
09:42:17 | FromDiscord | <enthus1ast> also for socks, i think its a bummer that the httpclient api cannot do custom proxy implementations |
09:42:45 | FromDiscord | <enthus1ast> would have patched it to also use socks proxies long ago |
09:48:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Rika "Make a template then": I have a small problem now https://media.discordapp.net/attachments/371759389889003532/955764889610252338/unknown.png |
09:48:47 | FromDiscord | <Rika> Don’t put return |
09:49:43 | FromDiscord | <System64 ~ Flandre Scarlet> Now it's worse https://media.discordapp.net/attachments/371759389889003532/955765207513317457/unknown.png |
09:51:13 | FromDiscord | <Rika> Have you tried compiling it |
09:51:32 | FromDiscord | <Rika> Ah |
09:51:47 | FromDiscord | <Rika> That division makes a float but all of the other types are integers |
09:52:07 | FromDiscord | <System64 ~ Flandre Scarlet> what should I do?↵All values are untyped |
09:52:25 | FromDiscord | <Rika> Convert them? With .float or something |
09:52:54 | FromDiscord | <Rika> Also be more explicit with the type, like use SomeInteger instead and returning a float |
09:54:22 | FromDiscord | <System64 ~ Flandre Scarlet> I can want interpolate floats one day |
09:54:29 | FromDiscord | <enthus1ast> there also is https://github.com/nim-lang/Nim/blob/devel/lib/pure/lenientops.nim |
09:55:32 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @enthus1ast "there also is https://github.com/nim-lang/Nim/blob/": I can create new operators? |
09:55:38 | FromDiscord | <enthus1ast> sure |
09:55:56 | FromDiscord | <System64 ~ Flandre Scarlet> oh interesting! |
09:56:33 | FromDiscord | <enthus1ast> imho when you import lenientops your code might start to work |
09:56:47 | FromDiscord | <Rika> It probably would |
10:01:19 | * | ltriant joined #nim |
10:05:59 | * | ltriant quit (Ping timeout: 256 seconds) |
10:07:51 | * | ltriant joined #nim |
10:15:20 | * | toulene quit (Quit: Ping timeout (120 seconds)) |
10:17:16 | * | toulene joined #nim |
10:21:46 | * | Zectbumo quit (Remote host closed the connection) |
10:29:38 | NimEventer | New thread by Dabod: How to debug macros used with concept?, see https://forum.nim-lang.org/t/9027 |
10:34:55 | * | toulene quit (Quit: Ping timeout (120 seconds)) |
10:36:53 | * | toulene joined #nim |
10:37:45 | FromDiscord | <Phil> I keep reading up on the repository pattern and when it's a bad idea and I keep running into walls about it.↵Like, I read the article, it says "avoid repositories with too many methods such as 'findBySurname(surname)', 'findByFirstName(firstName)' etc. " ↵↵but.... if I need those, the best I can do is reduce function calls by genericizing that away into a "findByField(fieldName, value)" and at that point your services need to know abou |
10:41:10 | FromDiscord | <Phil> If anyone has any good material about it I'd gladly give it a read |
10:41:26 | FromDiscord | <Rika> find(filter) where filter is an arbitrary procedure that gets passed information and returns a Boolean whether the entry is to be kept or not? |
10:41:50 | FromDiscord | <Rika> That way you can make any kind of find by procedure |
10:42:12 | FromDiscord | <Rika> Maybe you should look into functional programming for a change of pace or ideology |
10:45:36 | FromDiscord | <Phil> You mean instead of writing separate SQL for the repository-query to a relational database, query all and filter within the nim-code using the proc? |
10:46:32 | FromDiscord | <Rika> Ah |
10:46:35 | FromDiscord | <Rika> This is for databases |
10:47:01 | FromDiscord | <Rika> Give me a moment I will think |
10:50:48 | FromDiscord | <Phil> Thanks for taking the time either way! |
10:51:27 | FromDiscord | <sheldon> sent a long message, see https://paste.rs/Afa |
10:51:48 | FromDiscord | <sheldon> build_all.sh doesn't work. |
10:52:07 | FromDiscord | <Phil> Apparently a lot of the time people work against "too large repositories" by splitting the read-operations from the write operations... which, well, helps against modules of overgrown size but I'm not sure if that addresses the core problem of "too many functions" |
10:52:31 | FromDiscord | <Rika> You can do the “Filter object” approach I guess |
10:52:46 | FromDiscord | <Rika> Where you pass a filter object with optional fields and whatsoever |
10:53:00 | FromDiscord | <Rika> Basically encoding your desired filters there instead of in procedures |
10:54:21 | FromDiscord | <Phil> If I were to imagine this in code, that filter object would be something that I build the SQL query with? |
10:55:20 | FromDiscord | <Rika> I guess? Seems so yeah |
10:55:28 | FromDiscord | <Rika> It’s something you use to make the query |
11:19:18 | FromDiscord | <Bubblie> In reply to @Elegantbeef "Ah that's gfw init": Called it |
11:19:20 | FromDiscord | <Bubblie> Windows is fucking shit |
11:19:28 | FromDiscord | <Bubblie> Ill try and make a fix |
11:20:04 | * | gsalazar joined #nim |
11:22:37 | FromDiscord | <Bubblie> sent a long message, see http://ix.io/3T9Q |
11:23:52 | FromDiscord | <Rika> Easy way to fix: don’t use any sort of GUI or even TUI |
11:23:53 | FromDiscord | <enthus1ast> from rants import windows, macos |
11:23:59 | * | kayabaNerve joined #nim |
11:24:03 | FromDiscord | <Rika> Even then though it’s a pain |
11:31:33 | FromDiscord | <Phil> sent a long message, see https://paste.rs/663 |
11:31:40 | FromDiscord | <Phil> Which one of these is the best solution I'll need to meditate over |
11:32:04 | FromDiscord | <Phil> (edit) "http://ix.io/3T9V" => "http://ix.io/3T9W" |
11:32:35 | FromDiscord | <Rika> I think the way I proposed is more elegant in the user facing sense but hairy to implement |
11:33:07 | FromDiscord | <Phil> I'll need to read up on that approach more to even get an idea for an implementation |
11:33:29 | FromDiscord | <Phil> Because I'm way too polluted by java to think of one that would make sense for nim |
11:33:56 | FromDiscord | <Bubblie> DONT use ANY graphics programs for mac unless its MoltenVK for vulkan |
11:33:59 | FromDiscord | <Bubblie> Holy shit |
11:34:02 | FromDiscord | <Bubblie> Opengl is deprecated for mac |
11:34:08 | FromDiscord | <Bubblie> They want you to use metal |
11:34:12 | FromDiscord | <Bubblie> Thankfully molten exists holy shit |
11:34:13 | FromDiscord | <Phil> wait what? |
11:34:16 | FromDiscord | <Bubblie> Yeah |
11:34:21 | FromDiscord | <Phil> Isn't opengl a pretty wide standard? |
11:34:26 | FromDiscord | <Phil> widely used |
11:34:31 | FromDiscord | <Rika> Well too bad Apple decided fuck that shit |
11:34:36 | FromDiscord | <Bubblie> Widely used, but apple fucks up everything |
11:34:44 | FromDiscord | <Bubblie> They want programs to use their stuff |
11:34:47 | FromDiscord | <Phil> ~~Still not as bad as nvidia~~ |
11:34:47 | FromDiscord | <Bubblie> So they force it on you |
11:34:51 | FromDiscord | <Bubblie> In reply to @Isofruit "~~Still not as bad": Agreed |
11:34:55 | FromDiscord | <Bubblie> I hate nvidia |
11:34:58 | FromDiscord | <Bubblie> With a passion |
11:35:03 | FromDiscord | <Bubblie> Apple still sucks though |
11:35:24 | FromDiscord | <Phil> Fair, I never developed anything for apple so I couldn't get around to that side of disliking them |
11:35:42 | FromDiscord | <Rika> Apple deprecates things really quickly |
11:35:46 | FromDiscord | <Phil> My approach of dislike stems pretty much from the amount of money they're willing to pour into their products to make them shite to repair |
11:36:03 | FromDiscord | <Phil> That and walled garden is annoying |
11:36:53 | FromDiscord | <enthus1ast> And all the bugs, and the apple users that still tell you "it just works", and the forums where noone seems to have a clue about anything |
11:37:18 | FromDiscord | <Rika> It just works until it doesn’t |
11:37:23 | FromDiscord | <auxym> In reply to @Girvo "Will still need to": please do document this somewhere! Very interested 🙂 |
11:37:23 | FromDiscord | <Phil> But enthus1ast, there is no need for those forums |
11:37:25 | FromDiscord | <Phil> It just works |
11:37:37 | FromDiscord | <enthus1ast> because all works? |
11:37:41 | FromDiscord | <Phil> Precisely |
11:37:47 | FromDiscord | <Phil> It's apple, so it just works |
11:37:51 | FromDiscord | <Phil> Or you're using it wrong |
11:38:14 | FromDiscord | <enthus1ast> it just works! And if not, just buy new stuff |
11:38:28 | FromDiscord | <Rika> If it doesn’t work then you’re wrong |
11:38:38 | FromDiscord | <Phil> If a chargeport breaks because of very foreseeable wear and tear then you just plugged and unplugged wrong |
11:38:50 | FromDiscord | <Rika> It’s not even “you’re using it wrong”, you’re just outright wrong |
11:39:11 | FromDiscord | <Phil> Ah yes, the next level of wrong |
11:39:36 | FromDiscord | <enthus1ast> "On my Mac Book Proo 2018 it just works" |
11:39:51 | FromDiscord | <enthus1ast> 'my' |
11:40:26 | FromDiscord | <enthus1ast> Oh man i cannot be triggered every time someone says apple |
11:40:35 | FromDiscord | <Phil> How about oranges? |
11:40:36 | FromDiscord | <enthus1ast> bad for heart |
11:41:27 | FromDiscord | <enthus1ast> My issue is, i have to support apple users and deal with the apple crap and bugs every das |
11:41:28 | FromDiscord | <enthus1ast> day |
11:41:29 | FromDiscord | <Rika> Pear |
11:42:04 | FromDiscord | <Phil> In reply to @enthus1ast "My issue is, i": I still remember in the python implementation of nimstoryfont I was so proud when it finally worked |
11:42:15 | FromDiscord | <Phil> Wanted to show my dad during vacation time |
11:43:05 | FromDiscord | <Phil> Turns out safari straight up does not do a certain type of redirect (I think from a non "/" ending url to one that ends in "/", something that Django did automatically for you to make your URLs more correct) |
11:43:12 | FromDiscord | <Rika> Thank god I’m not one to write desktop applications and instead I have to deal with bespoke operating systems and databases and other bullshit okay I don’t think this is something to thank god for anymore |
11:43:15 | FromDiscord | <Phil> Which they changed a couple months ago |
11:43:24 | FromDiscord | <Phil> (edit) "ago" => "ago, and suddenly my application worked again" |
11:43:41 | FromDiscord | <Rika> In reply to @Isofruit "Turns out safari straight": Well technically they are different URLs |
11:44:16 | FromDiscord | <System64 ~ Flandre Scarlet> when using the --opt:speed flag, does it use the -o3 argument in GCC? |
11:44:20 | FromDiscord | <Phil> In reply to @Rika "Well technically they are": They are, it's just very hard to account for that kind of stuff if you don't know about it and neither firefox, nor chrome have that sort of behaviour |
11:44:36 | FromDiscord | <Rika> In reply to @System64 "when using the --opt:speed": I think only 2 |
11:44:52 | FromDiscord | <Rika> 3 is funky and I recommend never using it lol |
11:44:52 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Rika "I think only 2": Ah alright, and how to setup to -o3?µ |
11:44:57 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
11:45:02 | FromDiscord | <System64 ~ Flandre Scarlet> why is it funky? |
11:45:15 | FromDiscord | <Rika> Some stuff become nonstandard |
11:45:24 | FromDiscord | <System64 ~ Flandre Scarlet> ah so dangerous I guess? |
11:46:55 | FromDiscord | <Rika> I searched it up and it seems they moved the nonstandard stuff to -Ofast |
11:47:27 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright so now -o3 is safe? |
11:48:32 | FromDiscord | <Rika> Probably? But the effect is likely minuscule in runtime speed and large in compile time speed |
11:49:02 | FromDiscord | <System64 ~ Flandre Scarlet> Ah alright |
11:53:04 | * | neurocyte0917090 joined #nim |
11:53:30 | FromDiscord | <Zoom> @Hamid_Bluri\: You promptly giving up on iterrr made me finally poking around ZF's code \:P. Fixed their enumerate, but judging they closed my issue about it earlier, there won't be a merge. |
11:55:58 | FromDiscord | <Rika> Why did he give up |
11:58:39 | FromDiscord | <Zoom> @Rika) |
11:59:15 | FromDiscord | <Zoom> https://github.com/hamidb80/iterrr/issues/18 |
12:01:18 | * | toulene quit (Read error: Connection reset by peer) |
12:02:40 | * | toulene joined #nim |
12:19:51 | NimEventer | New thread by Mros: Multiple definition of NimMainInner, see https://forum.nim-lang.org/t/9029 |
12:45:23 | FromDiscord | <Bubblie> Apple doesnt even have fuckijg vulkan |
12:45:39 | FromDiscord | <Bubblie> You have to use molten |
12:45:44 | FromDiscord | <Bubblie> In order to use vulkan on mac |
12:45:50 | FromDiscord | <Bubblie> So im glad molten exists |
12:45:52 | FromDiscord | <Bubblie> But DAMN |
12:46:15 | FromDiscord | <Bubblie> If there is one thing I like about microsoft its the fact they dont deprecate and limit programming |
12:46:20 | FromDiscord | <Bubblie> Its just, windows is shit |
12:57:59 | * | acidsys quit (Excess Flood) |
12:58:32 | * | acidsys joined #nim |
12:59:33 | * | rockcavera joined #nim |
12:59:33 | * | rockcavera quit (Changing host) |
12:59:33 | * | rockcavera joined #nim |
12:59:35 | FromDiscord | <enthus1ast> at least smb works on windows |
12:59:44 | FromDiscord | <enthus1ast> and office |
13:00:43 | FromDiscord | <enthus1ast> and email |
13:00:59 | FromDiscord | <enthus1ast> argh i'm triggered again, sorry will stop offtopic stuff now |
13:10:15 | FromDiscord | <Phil> One of these days I'll get smb share stuff to actually work well on arch-gnome-nautilus instead of having to mount manually |
13:12:37 | * | toulene quit (Ping timeout: 240 seconds) |
13:15:02 | * | toulene joined #nim |
13:18:05 | FromDiscord | <Bubblie> I have an idea |
13:18:23 | FromDiscord | <Bubblie> So, im gonna fix the nimgl vulkan bindings, but im gonna edit things so its not as weird |
13:18:47 | FromDiscord | <Bubblie> Cause, the way it does things is not normal in general, it messes with the way you use glfw |
13:22:13 | FromDiscord | <Bubblie> And for vulkan init, thats not normal with vulkan either, the way vulkan is meant to be initialized is through your own creation of the pipeline, the problem with having it initialized for you is because now you cant properly add things for your pipeline |
13:22:26 | FromDiscord | <Bubblie> Its the reason why the vulkan triangle tutorial has you set up everything yourself |
13:25:49 | FromDiscord | <Bubblie> These bindings could be done better |
13:26:14 | FromDiscord | <Bubblie> Also, the neat thing about vulkan bindings is that all the headers are generated from an xml file, which helps with bindings surprisingly |
13:26:18 | FromDiscord | <Bubblie> Even though its xml |
13:26:21 | FromDiscord | <Bubblie> 💀 |
13:31:03 | FromDiscord | <Zoom> Use systemd to mount smb on boot /offtopic↵(@Phil) |
13:48:34 | * | slowButPresent joined #nim |
13:58:12 | * | acidsys quit (Excess Flood) |
13:58:44 | * | acidsys joined #nim |
14:22:35 | FromDiscord | <Forest> Why is Nim's JS backend still around? Wouldn't WASM be better since WASM can be ran in many runtimes and is still just as portable? |
14:22:42 | FromDiscord | <Forest> Also I'd imagine it'd be faster too |
14:23:18 | FromDiscord | <Forest> Sure you could use Emscripten but wouldn't it just generally make more sense to compile to WASM directly? |
14:24:51 | FromDiscord | <demotomohiro> Why make more sense to compile to WASM directly?↵Nim has C generator and I think reuse it for WASM make sense. |
14:24:52 | * | arkurious joined #nim |
14:25:19 | FromDiscord | <demotomohiro> And you can easily use C/C++ libraries also for WASM. |
14:25:31 | FromDiscord | <Rika> does wasm have dom manipulation now |
14:25:35 | FromDiscord | <Rika> it didnt before |
14:25:43 | FromDiscord | <Rika> nims js gen has been around for a long time |
14:33:45 | FromDiscord | <demotomohiro> Maybe when Nim compile to WASM directly, Nim have to optimize code itself. When Nim compile to C and emscripten compile C to WASM, Clang or emcc optimize code and Nim doesn't need to optimize code so much. |
14:36:02 | * | acidsys quit (Excess Flood) |
14:36:34 | * | acidsys joined #nim |
14:56:57 | FromDiscord | <fbpyr> last times I used wasm it always needed at least a loader (e.g. go wasm) ↵or some generated js glue code (e.g. rust via yew) . ↵can nowadays everything be done now from wasm as from js? 🤔 |
15:07:19 | * | ma7mad joined #nim |
15:17:08 | FromDiscord | <Phil> I would doubt it |
15:25:57 | * | ma7mad quit (Quit: Client closed) |
15:34:42 | * | neurocyte0917090 quit (Quit: The Lounge - https://thelounge.chat) |
15:35:24 | * | rockcavera quit (Remote host closed the connection) |
15:38:26 | * | neurocyte0917090 joined #nim |
15:40:04 | FromDiscord | <Forest> Ah okay, fair enough |
15:41:12 | * | rockcavera joined #nim |
15:41:12 | * | rockcavera quit (Changing host) |
15:41:12 | * | rockcavera joined #nim |
15:43:29 | * | neurocyte0917090 quit (Quit: The Lounge - https://thelounge.chat) |
15:46:31 | * | neurocyte0917090 joined #nim |
15:48:22 | * | noeontheend joined #nim |
15:56:57 | * | vicecea quit (Remote host closed the connection) |
15:57:28 | * | vicecea joined #nim |
16:13:38 | FromDiscord | <enthus1ast> why do wasm when you want to live in js land? |
16:14:42 | * | neurocyte0917090 quit (Quit: The Lounge - https://thelounge.chat) |
16:16:38 | * | neurocyte0917090 joined #nim |
16:30:02 | FromDiscord | <Hamid_Bluri> In reply to @Zoom "<@745944009918251010>\: You promptly giving": honestly, today i thought about some crazy tricks to make it work, but it doesn't seem much readable |
16:31:14 | FromDiscord | <Hamid_Bluri> i mean, currently you can easily define your custom reducer, but defining a transformer (AKA adapter) is not as easy as defining a reducer |
16:32:29 | FromDiscord | <Hamid_Bluri> the solution in my mind contains `wrapLoop`, `transformer` pragamas, which is not very nice |
16:34:09 | FromDiscord | <Hamid_Bluri> maybe I tried it on weekend, but i don't think it worth it. because there are so many edge cases |
16:34:17 | FromDiscord | <Hamid_Bluri> (edit) "I tried" => "I'll try" |
16:34:36 | FromDiscord | <Hamid_Bluri> (edit) "it" => "it's gonna" |
16:36:19 | FromDiscord | <hmmm> hmmm |
16:36:39 | FromDiscord | <Hamid_Bluri> in the meantime, you can give me more examples that can encourage me to do so |
16:36:40 | FromDiscord | <hmmm> broskis remind me why thingy-1 is different from thingy -1 which is different from thingy - 1 |
16:36:58 | FromDiscord | <Hamid_Bluri> In reply to @hmmm "broskis remind me why": what |
16:37:07 | FromDiscord | <Rika> thingy-1 is the same as thingy - 1 |
16:37:13 | FromDiscord | <Rika> thingy -1 is the same as thingy(-1) |
16:37:16 | FromDiscord | <Hamid_Bluri> oh infix prefix 😄 |
16:37:27 | FromDiscord | <hmmm> rika now I'm even more confus |
16:37:38 | FromDiscord | <Rika> do you remember how procedures are called |
16:37:46 | FromDiscord | <Rika> the multiple ways |
16:37:50 | FromDiscord | <hmmm> basically I need to type thingy - 1 with two spaces or things don't work 🤔 |
16:37:57 | FromDiscord | <Rika> either two or none |
16:38:05 | FromDiscord | <Rika> as long as the spacing is consistent on each side |
16:38:59 | FromDiscord | <Rika> because let's say you use `echo` as thingy |
16:39:04 | FromDiscord | <enthus1ast> its actually quite simple↵thingy - 1 and thingy-1 is\: `-`(thingy, 1) while thingy -1 is\: thingy(-1) |
16:39:06 | FromDiscord | <hmmm> you are right, zero spaces works the same |
16:39:12 | FromDiscord | <Hamid_Bluri> sent a long message, see http://ix.io/3TbD |
16:39:29 | FromDiscord | <Rika> `1- 1` should probably ideally be invalid but afaik rn it is but a warning |
16:40:25 | FromDiscord | <hmmm> and the reason is because we call functions without parenthesis and nim gets confused? |
16:40:40 | FromDiscord | <Hamid_Bluri> !eval 1- 1 |
16:40:41 | FromDiscord | <Rika> not that nim gets confused |
16:40:41 | NimBot | Compile failed: /usercode/in.nim(1, 2) Error: expression '0' is of type 'int literal(0)' and has to be used (or discarded) |
16:40:54 | FromDiscord | <Hamid_Bluri> !eval echo 1- 1 |
16:40:56 | NimBot | 0 |
16:41:04 | FromDiscord | <Rika> well i guess you can say it does get confused |
16:41:10 | FromDiscord | <Rika> but its ambiguous anyway |
16:43:23 | FromDiscord | <hmmm> also can I do something like $(thingy - 1) without nim thinking it's weird stuff? |
16:43:40 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3TbF |
16:44:06 | FromDiscord | <enthus1ast> $(thingy - 1) is perfectly valid |
16:44:07 | FromDiscord | <Rika> In reply to @hmmm "also can I do": wdym? |
16:44:10 | FromDiscord | <Rika> it looks fine |
16:44:30 | FromDiscord | <enthus1ast> thingy decremented then made to string |
16:45:00 | FromDiscord | <Rika> In reply to @hamidb80 "I don't know how": maybe try exporting $? idk, possibly some sort of bug |
16:45:00 | FromDiscord | <hmmm> perfect, I always think I'm tupling things or calling functions when using parenthesis |
16:45:07 | FromDiscord | <Rika> or not bug but |
16:45:19 | FromDiscord | <Rika> "unexpected but specified behaviour" |
16:45:36 | FromDiscord | <Hamid_Bluri> is there any articles expalning distinct types ? 😕 |
16:46:06 | FromDiscord | <Rika> what's difficult? |
16:46:28 | FromDiscord | <Rika> In reply to @hmmm "perfect, I always think": tuple -> space before function call |
16:46:42 | FromDiscord | <Rika> ...usually |
17:03:37 | FromDiscord | <Solitude> In reply to @hmmm "perfect, I always think": do you only think about code without ever actually running it? |
17:07:00 | * | neurocyte0917090 quit (Quit: The Lounge - https://thelounge.chat) |
17:07:50 | FromDiscord | <auxym> In reply to @hamidb80 "is there any articles": there's the manual https://nim-lang.org/docs/manual.html#types-distinct-type |
17:08:04 | * | neurocyte0917090 joined #nim |
17:10:30 | FromDiscord | <hmmm> In reply to @Solitude "do you only think": bold of you assuming I'm thinking when I code 😃 |
17:11:39 | FromDiscord | <hmmm> tbh things are getting better, I'm less stumped then before 🤔 |
17:13:36 | * | noeontheend quit (Ping timeout: 268 seconds) |
17:17:32 | FromDiscord | <kevin> is it possible to have variables inside of a formatstring for length, padding character, etc? |
17:18:25 | FromDiscord | <kevin> `&"{str:<10}"`↵To↵`&"{str:<{len}}"` |
17:18:32 | FromDiscord | <kevin> or something like that |
17:19:56 | FromDiscord | <Solitude> !eval import strformat; let str = "test"; let len = 1; echo &"{str:<{len}}" |
17:19:58 | NimBot | Compile failed: /playground/nim/lib/system/fatal.nim(53, 5) Error: unhandled exception: /playground/nim/lib/pure/strformat.nim(660, 18) `false` invalid format string: '}' instead of '}}' [AssertionDefect] |
17:31:23 | * | crem quit (Quit: WeeChat 3.3) |
17:33:11 | * | rockcavera quit (Remote host closed the connection) |
17:46:30 | FromDiscord | <Bubblie> If I compile nim to cpp, and I use nim templates, does it compile to cpp’s templates? |
17:47:11 | FromDiscord | <Rika> no |
17:47:22 | FromDiscord | <Bubblie> What does it compile to |
17:47:36 | FromDiscord | <Rika> nothing, they are gone after compiletime |
17:49:33 | FromDiscord | <Bubblie> ? Okay but nim can compile to cpp so how does that template code look in the cpp code you just compiled nim to |
17:50:04 | FromDiscord | <Solitude> nim templates have nothing to do with cpp templates |
17:50:05 | FromDiscord | <Rika> it looks like as if the nim templates were substituted with their bodies |
17:50:06 | FromDiscord | <Solitude> its like asking how nim macros look when compiling to c |
17:50:17 | FromDiscord | <Bubblie> Oh okay got it |
17:56:30 | FromDiscord | <demotomohiro> @kevin Text after ':' in '{}' in strformat is parsed by this proc and you cannot put variables. https://github.com/nim-lang/Nim/blob/c4a0d4c5e35f09430a1c3d465fc62eb1001b7f9f/lib/pure/strformat.nim#L419 |
17:57:45 | FromDiscord | <kevin> makes sense. I restored to writing my own padding function that does take variable length padding |
17:57:58 | FromDiscord | <demotomohiro> generics in Nim is similar to template in C++. template in nim is similar to macro in C. |
17:58:01 | FromDiscord | <Rika> you can create custom formatters for strformat, i just forgot how |
17:58:34 | FromDiscord | <Bubblie> Alright, yeah I know nim templates are very different but I was confused to whether it was somehow able to compile to cpp templates |
18:00:10 | FromDiscord | <hmmm> friendsies how do I extract the last element of a slice range |
18:00:28 | FromDiscord | <hmmm> .high and [^-1] don't seem to work |
18:01:31 | FromDiscord | <demotomohiro> !eval echo [1, 2, 3, 4][1..2][^1] |
18:01:34 | NimBot | 3 |
18:01:58 | FromDiscord | <Rika> !eval echo (1..2).high |
18:02:00 | NimBot | Compile failed: /usercode/in.nim(1, 12) Error: type mismatch: got <HSlice[system.int, system.int]> |
18:02:04 | FromDiscord | <Rika> did you mean this? |
18:02:08 | FromDiscord | <hmmm> ye |
18:02:10 | FromDiscord | <Rika> !eval echo (1..2).B |
18:02:12 | NimBot | Compile failed: /usercode/in.nim(1, 12) Error: undeclared field: 'B' for type system.HSlice [type declared in /playground/nim/lib/system.nim(497, 3)] |
18:02:14 | FromDiscord | <Rika> or was it b |
18:02:20 | FromDiscord | <Rika> !eval echo (1..2).b |
18:02:23 | NimBot | 2 |
18:02:34 | FromDiscord | <hmmm> 🤨 |
18:02:36 | FromDiscord | <hmmm> what is b |
18:02:41 | FromDiscord | <Rika> a is 1 |
18:02:42 | FromDiscord | <Rika> b is 2 |
18:02:49 | FromDiscord | <Rika> lmfao |
18:02:54 | FromDiscord | <Rika> you must be confused as hell |
18:03:01 | FromDiscord | <Rika> go to the type def of HSlice in system |
18:03:30 | FromDiscord | <hmmm> .b actually works 👀 |
18:03:34 | FromDiscord | <hmmm> wtf |
18:04:10 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/system.html#HSlice |
18:05:58 | FromDiscord | <Phil> I will be honest, b would have been the last thing I would have assumed would be the name for one of the boundaries |
18:06:08 | FromDiscord | <demotomohiro> !eval echo (let r = 1..3; r).typeof |
18:06:10 | NimBot | HSlice[system.int, system.int] |
18:06:49 | FromDiscord | <Phil> That feels like a pretty weird name |
18:06:56 | FromDiscord | <Rika> Homogeneous Slice |
18:07:10 | FromDiscord | <Rika> because the start and end may have differing types |
18:07:10 | FromDiscord | <hmmm> ha! Phil confirms I'm not getting completely insane 🥳 |
18:07:30 | FromDiscord | <Rika> are you sure it isnt just that both of you are insane |
18:07:43 | FromDiscord | <Phil> No no, I only use nisane |
18:07:48 | FromDiscord | <Phil> Barry different |
18:07:51 | FromDiscord | <Phil> Very |
18:07:57 | FromDiscord | <Phil> Damnit autocorrect |
18:08:11 | FromDiscord | <Rika> Barry |
18:08:34 | FromDiscord | <Phil> If anyone is insane, then it's Barry |
18:08:53 | FromDiscord | <hmmm> Barry is known crackpot imo |
18:12:05 | FromDiscord | <Phil> Anyway, even if types in the slice can vary, why not just "upper" and "lower" since apparently that's accurate enough to describe these bounds with comments |
18:12:07 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/system.html#HSlice↵That document says "Heterogeneous" slice type |
18:12:20 | * | Zectbumo joined #nim |
18:12:49 | * | neurocyte0917090 quit (Read error: Connection reset by peer) |
18:13:03 | FromDiscord | <hmmm> the only legit slice type is pizza |
18:13:30 | FromDiscord | <Rika> oh hetero homo still confuses me |
18:13:31 | FromDiscord | <Rika> whatever |
18:13:36 | FromDiscord | <Phil> Eh, I'm pretty sure I'm just not understanding one thing about it and that's leading me down dumb roads |
18:13:36 | FromDiscord | <Vindaar> In reply to @hmmm "the only legit slice": you do you, I'm enjoying my slice of banana bread alone then 😋 |
18:13:43 | * | neurocyte0917090 joined #nim |
18:13:48 | FromDiscord | <Rika> In reply to @Vindaar "you do you, I'm": wtf i want |
18:14:48 | FromDiscord | <Vindaar> hop onto a plane. If you're quick it's still good by the time you arrive! |
18:15:23 | FromDiscord | <Phil> EU? |
18:15:36 | * | vicfred joined #nim |
18:15:46 | FromDiscord | <Vindaar> Yeah, Germany |
18:16:22 | FromDiscord | <Phil> Mwahahaha your banana bread is at most 6h away from me if you're not super far south |
18:17:04 | FromDiscord | <Vindaar> near Cologne, so hurry 😛 |
18:17:40 | FromDiscord | <Phil> With the speed of light! |
18:17:45 | FromDiscord | <Phil> I mean ICE |
18:17:47 | FromDiscord | <Rika> Damn man I live in Asia… |
18:17:57 | FromDiscord | <Phil> Almost same thing! |
18:18:38 | FromDiscord | <Phil> Plane or really long train ride for you it is |
18:18:51 | FromDiscord | <Rika> im not on mainland |
18:18:53 | FromDiscord | <Rika> plane |
18:19:23 | FromDiscord | <Vindaar> also better avoid that train through Russia atm |
18:20:34 | FromDiscord | <untoreh> How can I convert an `untyped` variable into a string? |
18:20:45 | FromDiscord | <Vindaar> `astToStr` is probably what you want |
18:26:05 | FromDiscord | <untoreh> I want to write something like `withX: code...` and wrap all the code into a string |
18:27:26 | FromDiscord | <Vindaar> either I misunderstand, or this is precisely what `astToStr` does: https://play.nim-lang.org/#ix=3Tc2 |
18:27:46 | FromDiscord | <Vindaar> misunderstand what you want I mean |
18:31:13 | FromDiscord | <untoreh> sent a code paste, see https://play.nim-lang.org/#ix=3Tc6 |
18:36:06 | * | crem joined #nim |
18:37:43 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3Tc9 |
18:37:55 | FromDiscord | <hmmm> and then autocloses at the end |
18:38:01 | FromDiscord | <hmmm> I want that in nim too |
18:39:01 | * | Zectbumo quit (Ping timeout: 240 seconds) |
18:40:21 | FromDiscord | <demotomohiro> @untoreh Maybe `toStrLit` in macros module is what you need: https://nim-lang.org/docs/macros.html#toStrLit%2CNimNode |
18:41:05 | FromDiscord | <Rika> doesnt nim arc/orc use RAII? |
18:41:22 | FromDiscord | <Rika> so wouldnt blocks then opening then just exiting the block close the file? |
18:41:28 | FromDiscord | <Rika> (edit) "blocks" => "entering a block" |
18:41:52 | FromDiscord | <demotomohiro> @hmmm with in Nim is different from python: https://nim-lang.org/docs/with.html |
18:42:49 | FromDiscord | <Vindaar> @hmmm write your own, it's cheap in nim https://play.nim-lang.org/#ix=3Tcc |
18:42:56 | FromDiscord | <Vindaar> (feel free to adjust to your needs 😉 ) |
18:43:40 | FromDiscord | <b4mbus> In reply to @Rika "so wouldnt entering a": I was pretty positive one of nim's mm tactis was some raii shit |
18:43:44 | FromDiscord | <b4mbus> but idk I cant find it |
18:44:06 | FromDiscord | <Rika> i just said that |
18:44:25 | FromDiscord | <b4mbus> no, you asked a question |
18:44:37 | FromDiscord | <Rika> In reply to @Rika "doesnt nim arc/orc use": . |
18:44:44 | FromDiscord | <b4mbus> and that's a questionm |
18:44:45 | FromDiscord | <b4mbus> (edit) "questionm" => "question" |
18:44:54 | FromDiscord | <Rika> questions can be rhetorical |
18:45:06 | FromDiscord | <b4mbus> ^ this guy https://media.discordapp.net/attachments/371759389889003532/955899940993912873/unknown.png |
18:45:14 | FromDiscord | <b4mbus> (edit) "^" => "\\/" |
18:45:17 | FromDiscord | <Rika> i dont know what you want, |
18:45:38 | FromDiscord | <hmmm> hmm I'm still taking template and macro lessons from elegantbeef, iirc we left it at printing dumped ast nodes, so I don't think I'm quite up to it rn Vind |
18:46:20 | FromDiscord | <Solitude> In reply to @hmmm "hmm I'm still taking": just write someshit, its that easy |
18:46:47 | FromDiscord | <hmmm> yeye it's like learning to ride bycicle |
18:47:54 | FromDiscord | <Vindaar> In reply to @hmmm "hmm I'm still taking": just ask about what you don't understand in that template. The `{.inject.}` makes the variable available for the user using the template in the body of it. The rest is pretty straight forward. `body` is just the block given to the template, that is inserted verbatim into that spot in the template |
18:48:45 | FromDiscord | <Vindaar> the template essentially just generates this code: |
18:48:55 | FromDiscord | <Vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3Tcd |
18:49:29 | FromDiscord | <hmmm> hmmmmmm |
18:49:39 | FromDiscord | <hmmm> the first question would be why do we untype fvar |
18:49:50 | FromDiscord | <hmmm> why we return untyped |
18:49:54 | FromDiscord | <Vindaar> @Rika I could be wrong, but I don't think there's `=destroy` hooks for things like `File` objects under ARC by default that close the file again |
18:50:12 | FromDiscord | <Vindaar> but you can easily implement some RAII behavior with arc |
18:50:15 | FromDiscord | <Rika> probably trivial to implement |
18:50:24 | FromDiscord | <Vindaar> In reply to @hmmm "why we return untyped": that's just saying "we return code" |
18:50:38 | FromDiscord | <Rika> and it would be better IMO than the template |
18:51:47 | * | xet7 quit (Remote host closed the connection) |
18:53:03 | * | xet7 joined #nim |
18:53:07 | FromDiscord | <exelotl> In reply to @Vindaar "<@!259277943275126785> I could be": I hope this comes for Nim 2.0 |
18:53:24 | FromDiscord | <Rika> i mean you could just implement it yourself right now no? |
18:53:33 | FromDiscord | <demotomohiro> If your template/macro always turn an expression that is int type, you can specify int as return type |
18:53:34 | FromDiscord | <hmmm> sent a code paste, see https://paste.rs/B6m |
18:53:48 | FromDiscord | <Rika> In reply to @hmmm "vind and why the": to pass the indented block of code as a parameter to the template |
18:54:05 | FromDiscord | <demotomohiro> return |
18:54:29 | FromDiscord | <Rika> you spelled return properly |
18:54:33 | FromDiscord | <Rika> yes |
18:54:34 | FromDiscord | <hmmm> woa pretty neat |
18:54:35 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3Tcf |
18:54:49 | FromDiscord | <Vindaar> yeah, would have been clearer had I written multiple lines, but I was lazy |
18:55:47 | FromDiscord | <Solitude> In reply to @Rika "i mean you could": hooks have to be defined in the same module as their type |
18:56:03 | FromDiscord | <Rika> oh yeah i was wondering about that, i forgot about it |
18:56:04 | FromDiscord | <Rika> okay |
19:00:31 | FromDiscord | <Shinyzenith> should I just stick var infront of my parameter? https://media.discordapp.net/attachments/371759389889003532/955903813099880478/unknown.png |
19:02:04 | FromDiscord | <auxym> you should put var in front of the declaration of whatever identifier your are passing in |
19:02:28 | FromDiscord | <auxym> if you do actually intend to mutate it |
19:02:44 | FromDiscord | <Shinyzenith> well I do not, it's just so nim doesn't copy it under the hood |
19:02:49 | FromDiscord | <Shinyzenith> which was an issue earlier |
19:03:57 | FromDiscord | <Shinyzenith> In reply to @auxym "you should put var": yep thanks, worked |
19:04:02 | FromDiscord | <Shinyzenith> I don't know why I didn't think of it |
19:04:08 | FromDiscord | <Shinyzenith> 1 am coding does this to me 🥴 |
19:04:25 | FromDiscord | <auxym> nim normally does not make a copy unless the object is larger than some size threshold, IIRC 24 bytes |
19:04:58 | FromDiscord | <Shinyzenith> In reply to @auxym "nim normally does not": https://canary.discord.com/channels/371759389889003530/371759389889003532/954882215945330719↵https://canary.discord.com/channels/371759389889003530/371759389889003532/954882376125775903 |
19:05:02 | FromDiscord | <auxym> for smaller objects, the reasoning is that making a copy is actually faster than the cost of a dereference |
19:05:19 | FromDiscord | <Shinyzenith> In reply to @auxym "for smaller objects, the": Yeah makes sense |
19:05:33 | FromDiscord | <auxym> In reply to @Shinyzenith "https://canary.discord.com/channels/371759389889003": yes, as beef said, "small enough" |
19:05:52 | FromDiscord | <Shinyzenith> alskdjad for fucks sake, I had this issue before↵ended up just moving the function call to another file which fixed it but I still don't get why this throws https://media.discordapp.net/attachments/371759389889003532/955905166685659146/unknown.png |
19:06:29 | FromDiscord | <auxym> segfaults yay. good luck. |
19:06:37 | FromDiscord | <Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/955905354611425280/unknown.png |
19:06:38 | FromDiscord | <Shinyzenith> 🥲 |
19:06:43 | FromDiscord | <Shinyzenith> strace moment I guess |
19:07:43 | FromDiscord | <Solitude> In reply to @auxym "nim normally does not": looks like he uses some wrapped shit, so it gets declared wtih `{.bycopy.}` which overrides this |
19:07:59 | FromDiscord | <Shinyzenith> Yeah I'm using futhark |
19:08:22 | FromDiscord | <auxym> In reply to @Solitude "looks like he uses": ah. does that also override a hypothetical `lent` or `sink` annotation? |
19:08:33 | FromDiscord | <Shinyzenith> and I don't think bycopy pragma is used anywhere |
19:09:02 | FromDiscord | <Shinyzenith> I'm not sure but it might be cdecl pragma leading to that behavior |
19:09:20 | FromDiscord | <auxym> c2nim annotates every struct def with bycopy for c compatibility, would not surprise me if futhark did the same |
19:09:30 | FromDiscord | <Shinyzenith> futhark does not |
19:09:36 | FromDiscord | <Solitude> In reply to @auxym "ah. does that also": i CBA to test that, i would guess that no one bothered to test this interaction |
19:09:42 | FromDiscord | <Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/955906133955055636/unknown.png |
19:09:44 | FromDiscord | <Shinyzenith> here's the proof |
19:09:50 | FromDiscord | <Shinyzenith> no bycopy pragma used in the entire source tree |
19:09:54 | FromDiscord | <Shinyzenith> (edit) "no bycopy pragma used in the entire ... source" added "compiled" |
19:10:17 | FromDiscord | <auxym> `rg -ui`, in case your `.cache` is gitignored 🙂 |
19:10:24 | FromDiscord | <Shinyzenith> it's not |
19:10:33 | FromDiscord | <Solitude> he is inside the directory |
19:10:33 | FromDiscord | <Shinyzenith> why would I gitignore ~/.cache lol |
19:11:11 | FromDiscord | <Shinyzenith> nonetheless https://media.discordapp.net/attachments/371759389889003532/955906506333769770/unknown.png |
19:11:16 | FromDiscord | <auxym> In reply to @Solitude "he is inside the": oh yeah you're right. |
19:11:46 | FromDiscord | <auxym> though if he wasn't, rg ignores not just gitignore, but hidden folders too |
19:12:03 | FromDiscord | <Shinyzenith> that is true if I remember correctly |
19:12:31 | FromDiscord | <auxym> anyways, sink/lent could be another way to avoid a copy in case you want to enforce immutability |
19:13:00 | FromDiscord | <Shinyzenith> In reply to @auxym "though if he wasn't,": Ok nvm https://media.discordapp.net/attachments/371759389889003532/955906963852627998/unknown.png |
19:13:13 | FromDiscord | <Shinyzenith> In reply to @auxym "anyways, sink/lent could be": well var works for now, I don't really mind it |
19:14:13 | FromDiscord | <Solitude> its unfortunate that you cant decide that with function declaration |
19:14:20 | FromDiscord | <Shinyzenith> I still don't get why it segfaults tho!!1111 😔 |
19:14:49 | FromDiscord | <Shinyzenith> the same call in the main file works, but as soon as I try it from within the lib file it segfaults 🥲 https://media.discordapp.net/attachments/371759389889003532/955907421606404136/unknown.png |
19:14:52 | FromDiscord | <Generic> you can also just explicitly pass a pointer |
19:15:09 | FromDiscord | <Shinyzenith> In reply to @Generic "you can also just": I did that and it worked but beef specifically told me to use var |
19:15:17 | FromDiscord | <Shinyzenith> i'm not entirely sure of the reason, again I'm not that good at nim |
19:15:19 | FromDiscord | <Shinyzenith> still quite new |
19:23:33 | FromDiscord | <auxym> what does wl_signal_add do? do you ever use addr to get a raw pointer in there? If so you might be keeping a pointer to something like get gc'd |
19:24:23 | FromDiscord | <auxym> (edit) "like get" => "that gets" |
19:25:01 | FromDiscord | <auxym> or a pointer to a stack-allocated var that gets popped |
19:35:18 | FromDiscord | <greenb1ade> In reply to @Shinyzenith "the same call in": Random but what theme is that? |
20:08:37 | FromDiscord | <Bubblie> hey beef, I got this |
20:08:45 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3TcB |
20:08:46 | FromDiscord | <Bubblie> trying to run exactly the same code |
20:09:22 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3TcC |
20:09:36 | FromDiscord | <Bubblie> (edit) "https://play.nim-lang.org/#ix=3TcC" => "https://play.nim-lang.org/#ix=3TcD" |
20:09:46 | FromDiscord | <Bubblie> (edit) "https://play.nim-lang.org/#ix=3TcD" => "https://play.nim-lang.org/#ix=3TcE" |
20:09:46 | FromDiscord | <Bubblie> I pasted it without the import on accident |
20:10:03 | FromDiscord | <Bubblie> I was wondering if you knew anything about this, before I start trying to dive in for a windows fix |
20:36:32 | * | k0mpjut0r quit (Ping timeout: 240 seconds) |
20:43:31 | NimEventer | New thread by ArchNemesis3301: Runexe: Syntactic sugar for running/piping shell commands., see https://forum.nim-lang.org/t/9030 |
20:44:58 | * | lumo_e joined #nim |
20:45:46 | * | xet7 quit (Ping timeout: 245 seconds) |
21:02:47 | * | xet7 joined #nim |
21:08:28 | * | xet7 quit (Remote host closed the connection) |
21:23:45 | * | xet7 joined #nim |
21:24:47 | FromDiscord | <wsantos> I'm trying to do a DatabaseWrapper so my app can work with postgres or sqlite and I'm using generics for that, but I'm receiving this warning `generic methods are deprecated [Deprecated]`. My question is why and what are my options ? |
21:32:07 | FromDiscord | <hmmm> hmm I'm trying to & two strings but I'm getting Error: type mismatch: got <void, string> |
21:33:44 | FromDiscord | <wsantos> In reply to @hmmm "hmm I'm trying to": Can you share a example on nim playground ? |
21:33:46 | FromDiscord | <ynfle> @hmmm What's the code? |
21:34:04 | FromDiscord | <ynfle> In reply to @wsantos "I'm trying to do": What are you using the generics for with methods? |
21:34:52 | FromDiscord | <hmmm> sent a code paste, see https://paste.rs/iGZ |
21:34:58 | FromDiscord | <wsantos> sent a code paste, see https://paste.rs/VIi |
21:35:03 | FromDiscord | <hmmm> the first is a proc that returns a string and the second is a string |
21:35:08 | FromDiscord | <hmmm> wtf |
21:35:15 | FromDiscord | <ynfle> In reply to @wsantos "this is my base": You don't need methods in that case |
21:35:36 | FromDiscord | <ynfle> In reply to @hmmm "hmm it's a bit": Are you sure it returns a string |
21:35:53 | FromDiscord | <wsantos> But this is just the base class, I'll have other for each type of DB, but I think you are right, I don't think I need method maybe |
21:35:58 | FromDiscord | <hmmm> lol I checked 3 times, I'll recheck, what is void btw |
21:37:00 | FromDiscord | <ynfle> In reply to @hmmm "lol I checked 3": Try `echo typeof generatePathUtils(i)` |
21:37:38 | FromDiscord | <ynfle> In reply to @wsantos "But this is just": Make 2 separate procs. One for `DatabaseWrapper[postgress connection]` and one for the other |
21:38:01 | FromDiscord | <ynfle> Make 2 classes that inherit from the `DatabaseWrapper` and drop the generic |
21:39:04 | FromDiscord | <hmmm> aaaaaaaaaaaa |
21:39:33 | FromDiscord | <hmmm> the forward declaration of that proc didn't match the proc lol 😅 |
21:39:43 | FromDiscord | <hmmm> ty ynfle ❤️ |
21:40:02 | FromDiscord | <wsantos> @ynfle I don't think I get it, but how should I be able to choose between without changing code ? Right now I store the typedef in the config to decide what to use. |
21:42:55 | * | wyrd quit (Ping timeout: 240 seconds) |
21:43:31 | * | xet7 quit (Remote host closed the connection) |
21:45:55 | FromDiscord | <ynfle> In reply to @hmmm "ty ynfle ❤️": 👍 |
21:46:03 | * | xet7 joined #nim |
21:46:14 | * | xet7 quit (Remote host closed the connection) |
21:46:36 | FromDiscord | <ynfle> In reply to @wsantos "<@!767093711112241162> I don't think": What do you mean by "choose between them"? |
21:46:48 | * | xet7 joined #nim |
21:48:02 | FromDiscord | <wsantos> With generics I can use the typespec from db_sqilite or db_postgres as generic and everything fits, I don't see what you described working on my mind (I still new to nim, pardon me) |
21:48:32 | * | vicecea quit (Remote host closed the connection) |
21:49:02 | * | vicecea joined #nim |
21:49:53 | * | wyrd joined #nim |
21:56:26 | FromDiscord | <luteva> Hi! I am thinking about how c++ bindings could be written in nim and especially how/where/when destructors should be called. I mean: would it be a good idea to "bind" a nim object to a c++ object and automatically call the destructor when the nim object is collected by the gc (the reference counter sees no reference anymore)? Is that possible and if yes is it a good/practical idea? Are there any tutriols on how to do that or are there at l |
22:00:27 | * | rockcavera joined #nim |
22:00:27 | * | rockcavera quit (Changing host) |
22:00:27 | * | rockcavera joined #nim |
22:03:07 | FromDiscord | <Elegantbeef> I think you've described exactly how you're supposed to do it, though i could be wrong i've not done C++ interop↵(@luteva) |
22:05:07 | FromDiscord | <luteva> are there any tutorials? or at least some examples? |
22:06:16 | * | vicfred quit (Quit: Leaving) |
22:06:28 | FromDiscord | <Elegantbeef> https://scripter.co/binding-nim-to-c-plus-plus-std-list/ is a tutorial for C++ interop, but dont know about destructors |
22:06:36 | FromDiscord | <wsantos> In reply to @ynfle "Make 2 classes that": Do you mind to show me a small example of what you mean ? |
22:08:27 | FromDiscord | <ynfle> @wsantos A couple options↵https://play.nim-lang.org/#ix=3Td8 |
22:08:30 | FromDiscord | <ynfle> Here's one |
22:09:59 | FromDiscord | <Elegantbeef> Why are you making it so complicated ynfle? |
22:10:01 | FromDiscord | <wsantos> Sure but with this one I'll need to update my code for every single new DB type |
22:10:14 | FromDiscord | <Elegantbeef> `proc open(dbConn: type T...` |
22:10:24 | FromDiscord | <Elegantbeef> What are we trying to do wsantos? |
22:11:08 | FromDiscord | <Elegantbeef> Easy overridable dispatch without OOP? |
22:11:18 | FromDiscord | <ynfle> In reply to @Elegantbeef "Why are you making": Overcomplicated is what my wife calls me 🤷♂️ |
22:11:21 | FromDiscord | <ynfle> Just kidding |
22:11:39 | FromDiscord | <ynfle> Why is it overly complicated |
22:11:58 | FromDiscord | <Elegantbeef> I mean you're making a generic procedure instead of using an implicit generic |
22:12:00 | FromDiscord | <Elegantbeef> It's a bit tedious |
22:12:10 | FromDiscord | <ynfle> In reply to @wsantos "Sure but with this": You just have separate proc defs for each one |
22:13:06 | FromDiscord | <Elegantbeef> Yea it's the same thiing |
22:13:06 | FromDiscord | <Elegantbeef> Yea it's the same thing |
22:13:32 | FromDiscord | <ynfle> https://play.nim-lang.org/#ix=3Tdb |
22:14:06 | FromDiscord | <Elegantbeef> There we go ynfle |
22:14:18 | FromDiscord | <ynfle> Thanks big bro |
22:14:26 | FromDiscord | <Elegantbeef> You're older than i |
22:14:29 | FromDiscord | <wsantos> @ElegantBeef I want to abstract the DB implementation so it's easy to add others without changing my code |
22:14:36 | FromDiscord | <Elegantbeef> Well then do the above |
22:15:03 | FromDiscord | <Elegantbeef> Want to add a new DB add a new proc and change a type |
22:15:06 | FromDiscord | <ynfle> You can also use concepts, but I don't think it's necessary |
22:15:11 | FromDiscord | <wsantos> If someone wants to add a new DB they just implement/inherit my DBWrapper |
22:15:26 | FromDiscord | <Elegantbeef> You're describing concepts though |
22:16:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tdd |
22:16:21 | FromDiscord | <Elegantbeef> There we go now we dont have to use inheritance or methods |
22:16:31 | FromDiscord | <ynfle> I'm pretty sure the current db_ implementation is already that though? Why reinvent the wheel? |
22:17:07 | FromDiscord | <Elegantbeef> I mean you should use concepts to ensure extensibillity |
22:18:12 | FromDiscord | <Elegantbeef> It allows you to atleast make abstractions across all dbs |
22:21:24 | FromDiscord | <Elegantbeef> @wsantos\: what's the current interaction look like? |
22:21:42 | FromDiscord | <ynfle> I know, but just define the concept and all dbs should work because they are designed around the same interface |
22:23:48 | FromDiscord | <wsantos> In reply to @Elegantbeef "<@121971538898452482>\: what's the current": I still implementing it, but the idea is to store the DB typedef in a conf, and I was trying to implement a DBWrapper class that one could use to implment a new DB so My system could accept new dbs |
22:24:29 | FromDiscord | <Elegantbeef> Sounds like a generic with a concept constraint is ideal, ymmv |
22:25:46 | FromDiscord | <wsantos> This is what I have so far, I'll check concepts my only concern is that is a "experimental" feature |
22:26:15 | FromDiscord | <Elegantbeef> It's not behind a flag and is only experimental cause araq whats a different API |
22:26:29 | FromDiscord | <Elegantbeef> wants a different\ |
22:26:37 | FromDiscord | <wsantos> sent a code paste, see https://play.nim-lang.org/#ix=3Tdg |
22:26:51 | FromDiscord | <Elegantbeef> That is checking if there is a `open` procedure which takes 4 strings and returns the same type as `db` |
22:28:33 | FromDiscord | <luteva> euh.... concepts? constraints? any link to a manuel about "concepts" and "constraints"? |
22:28:47 | FromDiscord | <wsantos> In reply to @luteva "euh.... concepts? constraints? any": https://nim-lang.org/docs/manual_experimental.html#concepts |
22:29:08 | FromDiscord | <Elegantbeef> Constraints are generic limitations the simplest is just `type MyType[T: not int] = object` |
22:29:28 | FromDiscord | <Elegantbeef> Concepts work like C++ concepts where they constrain if the body of the concept compiles for a type |
22:29:47 | FromDiscord | <Elegantbeef> So you can use them to explicitly state the API required for a generic to function |
22:31:01 | FromDiscord | <luteva> oh yes i remember. there was something about constraints in the "nim in action" book.... but only experimental afaik. and just a few senteces. |
22:31:14 | FromDiscord | <wsantos> sent a code paste, see https://play.nim-lang.org/#ix=3Tdj |
22:31:18 | FromDiscord | <Elegantbeef> constraints are not experimental |
22:31:21 | FromDiscord | <luteva> but can't remember "concepts" |
22:31:25 | FromDiscord | <Elegantbeef> `DB` is the type of the value being tested |
22:31:58 | FromDiscord | <wsantos> I don't get the `type` in there |
22:32:16 | FromDiscord | <wsantos> Let me check the docs instead of asking everything here 😄 RTFM 😄 |
22:32:21 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tdk |
22:32:37 | FromDiscord | <Elegantbeef> `db` will an instance of `OdbcConnTyp` and `DB` will be `OdbcConnTyp` |
22:32:43 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3Tdl |
22:32:45 | FromDiscord | <Elegantbeef> It's a shorthand for `typeof(DB)` |
22:32:50 | FromDiscord | <ynfle> (edit) "https://play.nim-lang.org/#ix=3Tdl" => "https://play.nim-lang.org/#ix=3Tdm" |
22:32:59 | FromDiscord | <Elegantbeef> Oh god it's all module based dispatch? |
22:33:05 | FromDiscord | <Elegantbeef> Fuck i hate that |
22:33:05 | FromDiscord | <ynfle> In reply to @Elegantbeef "Oh god it's all": Yup |
22:33:24 | FromDiscord | <ynfle> You could import different modules depending on a `-d` switch |
22:33:31 | FromDiscord | <Elegantbeef> I'd enforce `DB.open("", "", "", "")` instead |
22:33:46 | FromDiscord | <Elegantbeef> It's just stupid to rely on module namespace to distinguish procedures for stuff like this imo |
22:34:24 | FromDiscord | <Elegantbeef> I'll be in my corner sulking |
22:35:22 | FromDiscord | <luteva> oh yeah. concepts: kind of typeclasses (in haskell)?!? great! |
22:35:42 | FromDiscord | <Elegantbeef> Yep |
22:36:03 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3Tdn |
22:36:21 | FromDiscord | <Elegantbeef> You can ping me with my name |
22:36:22 | FromDiscord | <Elegantbeef> It's magic |
22:36:30 | FromDiscord | <Elegantbeef> Elegantbeef just magic summons me |
22:36:40 | FromDiscord | <Bubblie> Oh wait you have a discord account? |
22:36:51 | FromDiscord | <Elegantbeef> I do, not that i use it here |
22:36:55 | FromDiscord | <Bubblie> Ah okay |
22:36:59 | FromDiscord | <Elegantbeef> Throw the code on playground 😛 |
22:37:09 | FromDiscord | <Bubblie> Alright |
22:37:53 | FromDiscord | <Bubblie> Can I even import vulkan in playground though |
22:38:14 | FromDiscord | <Bubblie> Doesnt it need the dll |
22:38:21 | FromDiscord | <Bubblie> Or dylib or so |
22:38:39 | FromDiscord | <wsantos> @ElegantBeef so to summarise use concept as generic constraint, right ? the documentation about concepts is huge holy F* 😄 |
22:38:44 | * | lumo_e quit (Quit: Quit) |
22:38:46 | FromDiscord | <Elegantbeef> Yes |
22:38:50 | FromDiscord | <Elegantbeef> Concepts are generic constraints |
22:39:03 | FromDiscord | <Elegantbeef> That allow you to use "this much match X" to compile |
22:39:16 | FromDiscord | <Bubblie> Yeah uh I dont think I can import vulkan in playground |
22:39:25 | FromDiscord | <wsantos> Perfect, I'll play around and share so you guys can double share before committing to it, thanks ! |
22:39:38 | FromDiscord | <Elegantbeef> Doesnt fuckiing matter bubblie i just want a nice editor to read the code |
22:39:45 | FromDiscord | <Bubblie> OH |
22:39:48 | FromDiscord | <Bubblie> Thats what you meant? |
22:39:52 | FromDiscord | <Elegantbeef> You double edited it so it disappeared here |
22:39:56 | FromDiscord | <Bubblie> OH |
22:40:01 | FromDiscord | <Bubblie> Okay I got you fam mb LOL |
22:40:58 | FromDiscord | <Elegantbeef> actually wsantos we dont need to bitch and moan about the lack of type in first parameter i think |
22:41:01 | FromDiscord | <Elegantbeef> Gotta check something |
22:42:00 | FromDiscord | <wsantos> Not sure what you mean ;/ |
22:42:03 | FromDiscord | <wsantos> (edit) ";/" => ":/" |
22:42:21 | FromDiscord | <Elegantbeef> Well Nim doesnt let you disambiguate based off returrn type |
22:42:46 | FromDiscord | <Elegantbeef> So the fact the nim builting `db` `open` procedures all use `open(a, b, c, d: string): DB` means if you have 2 DB modules you get a compile time error |
22:45:12 | FromDiscord | <wsantos> Ok, yeah let me play with it |
22:46:55 | FromDiscord | <Bubblie> @ElegantBeef https://play.nim-lang.org/#ix=3Tdo here you go sorry that took a bit my wifi shat itself |
22:50:34 | FromDiscord | <Elegantbeef> Ok now what's the issue? |
22:58:37 | FromDiscord | <Elegantbeef> @Bubblie\: are you still using nimgl? |
23:03:39 | FromDiscord | <ynfle> In reply to @Elegantbeef "Gotta check something": Did you figure something out? |
23:03:51 | FromDiscord | <Elegantbeef> I'm still fighting concepts |
23:04:25 | * | ltriant_ joined #nim |
23:05:16 | FromDiscord | <ynfle> You mean programming with concepts |
23:05:24 | FromDiscord | <ynfle> Their quite esoteric |
23:05:30 | FromDiscord | <ynfle> they're |
23:05:44 | FromDiscord | <Elegantbeef> Nah they generally work fine it's quite difficult to reason what i'm trying |
23:06:17 | * | ltriant quit (Ping timeout: 240 seconds) |
23:06:33 | FromDiscord | <ynfle> Nice |
23:10:23 | FromDiscord | <Bubblie> In reply to @Elegantbeef "<@415227941408997381>\: are you still": yes |
23:10:39 | FromDiscord | <Bubblie> essentially the issue here |
23:10:42 | FromDiscord | <Bubblie> let me get the error |
23:10:45 | FromDiscord | <Elegantbeef> `import nimgl/vulkan` |
23:11:40 | FromDiscord | <Bubblie> doing nimgl/vulkan causes it to state it cannot open the file, see the thing is I installed the vulkan bindings seperately so I didn't have to get the entiriety of nimgl |
23:11:46 | FromDiscord | <Elegantbeef> Ah |
23:11:54 | FromDiscord | <Bubblie> but let me just try installing nimgl entirely and see if that makes a difference |
23:15:03 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3Tdr |
23:15:12 | FromDiscord | <Bubblie> also, this time I did nimgl/vulkan |
23:15:14 | FromDiscord | <Bubblie> for the import |
23:15:16 | FromDiscord | <Bubblie> everything else is the same |
23:15:34 | FromDiscord | <Bubblie> at this point I think I might just do the bindings myself |
23:15:53 | FromDiscord | <Elegantbeef> Have fun |
23:16:43 | FromDiscord | <Bubblie> If you have an idea please throw it my way, if you dont then yeah thats fine too |
23:17:13 | FromDiscord | <Elegantbeef> I mean i had the same error so seems something either needs imported or exported |
23:17:24 | FromDiscord | <Elegantbeef> Look at the bindings and see if there's a missing `` |
23:18:19 | FromDiscord | <Bubblie> Missing in the example? |
23:18:24 | FromDiscord | <Bubblie> Or in the bindings themselves |
23:18:37 | FromDiscord | <Elegantbeef> The bindings |
23:18:42 | FromDiscord | <Bubblie> Alright ill take a look |
23:19:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tds |
23:22:12 | FromDiscord | <ynfle> Nice! |
23:22:36 | FromDiscord | <ynfle> Intense nimnastics |
23:33:49 | FromDiscord | <Shinyzenith> In reply to @greenb1ade "Random but what theme": Toykonight |
23:34:21 | FromDiscord | <Shinyzenith> In reply to @auxym "what does wl_signal_add do?": It adds a callback to a wl-listener struct |
23:35:23 | FromDiscord | <auxym> no addr? time for gdb then I guess? |
23:36:14 | FromDiscord | <Elegantbeef> Or i look at code |
23:39:27 | FromDiscord | <Elegantbeef> Herb output is a stack variable afaict so this is unsafe |
23:43:44 | FromDiscord | <Elegantbeef> So it's due to abusing the stack i imagine |
23:43:46 | FromDiscord | <Elegantbeef> I could be wrong |
23:51:02 | * | vicecea quit (Remote host closed the connection) |
23:51:33 | * | vicecea joined #nim |