<< 05-04-2025 >>

01:52:07*derpydoo joined #nim
02:34:30FromDiscord<Robyn [She/Her]> I am making a parser for the WIT file format and calling it wit's end, and no-one can stop me
02:35:33FromDiscord<Elegantbeef> @Robyn [She/Her] how is it not called witless and self deprecating
02:37:09FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "<@524288464422830095> how is it": Beef, you are an absolute genius
02:37:17FromDiscord<Robyn [She/Her]> I am now naming it that instead
02:40:21FromDiscord<Robyn [She/Her]> nested comments, wtf...
03:02:02*derpydoo quit (Quit: derpydoo)
03:36:47*nils` quit (Ping timeout: 272 seconds)
04:11:19*SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev)
04:24:02*cornfeedhobo quit (Quit: ZNC - https://znc.in)
04:32:47*cornfeedhobo joined #nim
04:52:56*SchweinDeBurg joined #nim
06:45:37*ntat joined #nim
06:57:33*coldfeet joined #nim
07:59:17*andy-turner joined #nim
08:27:17*derpydoo joined #nim
08:49:09*nils` joined #nim
09:25:44*SchweinDeBurg quit (Ping timeout: 272 seconds)
09:27:09*SchweinDeBurg joined #nim
09:45:24*SchweinDeBurg quit (Ping timeout: 245 seconds)
09:47:22*SchweinDeBurg joined #nim
10:24:09FromDiscord<tauruuuuuus> Beef solving the most difficult problem in programming
10:24:27FromDiscord<tauruuuuuus> Ever thought of doing naming as a service?
11:18:07*beholders_eye joined #nim
11:20:28*SchweinDeBurg quit (Ping timeout: 252 seconds)
11:22:13*SchweinDeBurg joined #nim
11:40:54FromDiscord<heysokam> NAAS could be easily confused with "nagging as a service"↵but maybe he could do both at once, if he is resourceful.. hmmm
11:59:09*beholders_eye quit (Ping timeout: 245 seconds)
12:04:44*beholders_eye joined #nim
12:05:37*derpydoo quit (Ping timeout: 252 seconds)
12:08:30*nils` quit (Ping timeout: 246 seconds)
12:10:14*void09_ quit ()
12:11:01*void09 joined #nim
13:11:16*beholders_eye quit (Ping timeout: 252 seconds)
13:18:08*andy-turner quit (Quit: Leaving)
13:18:25*andy-turner joined #nim
13:30:40*beholders_eye joined #nim
14:13:10*alexdaguy joined #nim
14:54:45FromDiscord<pmunch> In reply to @battery.acid.bubblegum "I am making a": WIT file format?
14:55:30FromDiscord<pmunch> I'm working on my epaper x11 driver thingy, currently implementing dithering as a shader
14:55:55FromDiscord<Robyn [She/Her]> In reply to @pmunch "WIT file format?": Yeah for WebAssembly's component model stuff
14:56:33FromDiscord<pmunch> Aah
14:59:05*alexdaguy quit (Quit: a)
15:27:38FromDiscord<pmunch> Hmm, so there was an update to the shady library 5 months ago, but no new version was drawn. It simultaneously has stuff and need and breaks things
15:44:43*rockcavera joined #nim
16:04:18FromDiscord<linuxbro> What's the recommended library for cryptographic operations in nim?
16:04:48FromDiscord<linuxbro> Trying to do AES-GCM or ChaCha20-Poly1305
16:08:24*nils` joined #nim
16:10:27FromDiscord<_nenc> try nimcrypto
16:17:33FromDiscord<linuxbro> That's what I was looking at. Just wasn't sure if it was the "standard"
16:18:13FromDiscord<linuxbro> No chachapoly20, but it's got rihndael, so gtg
16:18:20FromDiscord<linuxbro> (edit) "rihndael," => "rijndael,"
16:49:22FromDiscord<blackmius> In reply to @linuxbro "What's the recommended library": you can try extend openssl bindings i think
16:58:41FromDiscord<linuxbro> Will that still result in static binaries?
16:59:53FromDiscord<linuxbro> Ah, looks like you can force a static link
17:02:38*nils` quit (Ping timeout: 252 seconds)
17:09:24*coldfeet quit (Quit: Lost terminal)
17:10:50FromDiscord<blackmius> sent a code paste, see https://play.nim-lang.org/#pasty=PrIRLMVK
17:11:26FromDiscord<blackmius> (edit) "https://play.nim-lang.org/#pasty=EDLwnATK" => "https://play.nim-lang.org/#pasty=EJWdKZcL"
17:12:38FromDiscord<linuxbro> Perfect, this should help me in my quest to chacha real smooth
17:13:02FromDiscord<linuxbro> I definitely didn't pick Chacha20 over other options because it has a funny name
17:58:04*nils` joined #nim
18:01:03*beholders_eye quit (Ping timeout: 244 seconds)
18:51:20*beholders_eye joined #nim
19:10:08FromDiscord<linuxbro> I don't use VSCode all that much. How do I configure it to build and run a file when I click the "run" triangle in the top right? It only builds it currently
19:10:23FromDiscord<linuxbro> I'm using the official nim-lang.org extension
19:13:24*beholders_eye quit (Ping timeout: 246 seconds)
20:12:20*beholders_eye joined #nim
20:26:26FromDiscord<pmunch> Hmm, been a while since I've seen @treeform around. Is it just time zone difference and me getting healthier day/night cycles?
20:27:05FromDiscord<treeform> I just been busy with traveling and moving states and chaning jobs...
20:27:09FromDiscord<treeform> some times life gets in the way
20:27:16FromDiscord<pmunch> Oh damn, lots of big changes!
20:27:35FromDiscord<pmunch> What're you up to now?
20:27:44FromDiscord<treeform> AI what else?
20:27:56FromDiscord<pmunch> Haha, fair enough
20:28:14FromDiscord<pmunch> Using it for what though? We can't just all go around saying we work with AI
20:28:38FromDiscord<treeform> I was doing applied AI, now switched to theoretical research.
20:29:00FromDiscord<pmunch> Oh cool, like actually working on AI, not just using AI for something
20:29:25FromDiscord<pmunch> New employer, or just different position?
20:29:31FromDiscord<treeform> manly multi agent systems and alignment
20:29:37FromDiscord<treeform> new employer
20:30:40FromDiscord<treeform> To bad the AI stuff is so heavy into python and cuda.
20:30:49FromDiscord<treeform> I wish I could use Nim more
20:32:00FromDiscord<pmunch> Yeah that'd be really cool
20:32:15FromDiscord<pmunch> Our resident AI guy is the only one not coding in Nim
20:32:20FromDiscord<pmunch> Granted there's only three of us so far
20:32:31FromDiscord<treeform> What is your AI project?
20:34:07FromDiscord<pmunch> Well, we do power line monitoring, and part of that is figuring out how much power can go through a line while staying within thermal limit. Our units have a lot of sensors and we have a couple different AI projects. Some working with image data trying to detect various things. And then we are also trying to predict conditions into the future so that power deliveries can be planned better.
20:36:13FromDiscord<treeform> That's pretty cool. The the Ai is the only part not in Nim? Impressive.
20:37:07FromDiscord<pmunch> Well all the stuff that we write is in Nim, from firmware to most of our data processing. But we use some off the shelf stuff as well
20:45:49FromDiscord<pmunch> Quick question about Shady by the way, have you tried any more complex examples of compute shaders?
20:47:06FromDiscord<pmunch> Trying to get some dithering to work for my epaper laptop project. It works on the CPU, but not on the GPU. So I'm guessing that I don't set up the buffers correctly
20:52:26FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#pasty=VABDbYmu
20:53:16FromDiscord<fabric.input_output> because it sure is weird as hell
20:53:48FromDiscord<fabric.input_output> when I assign `Foo[int](10)` to `a` it outputs `ptr 10`
20:53:50FromDiscord<fabric.input_output> ??
20:53:52FromDiscord<pmunch> Hmm, that is indeed weird
20:54:36FromDiscord<pmunch> 2.2.2?
20:55:03FromDiscord<fabric.input_output> tried with latest on the playground
20:55:15FromDiscord<fabric.input_output> oh wait `ptr X` X is the value
20:56:34FromDiscord<pmunch> Seems to be a change between 1.6.20 and 2.0.0
20:57:08FromDiscord<pmunch> 1.6.20 gives a pointer to the value 0
20:57:34FromDiscord<pmunch> Oh wait, it's just the repr of pointers which changed
21:02:00*ntat quit (Quit: leaving)
21:02:33*ntat joined #nim
21:02:47*ntat quit (Client Quit)
21:10:08FromDiscord<fabric.input_output> man why isn't opengl working with nim opengl
21:10:15FromDiscord<fabric.input_output> I tried it in C++ it worked
21:10:25FromDiscord<fabric.input_output> (edit) "opengl" => "glfw"
21:12:01FromDiscord<fabric.input_output> the functions aren't being loaded or something
21:28:54FromDiscord<pmunch> Linking issue?
21:33:11FromDiscord<treeform> In reply to @pmunch "Quick question about Shady": No but my friend manage to get Nim and Cuda/HIP working together: https://github.com/monofuel/hippo
21:41:51FromDiscord<pmunch> Well I'm not trying to do anything fancy, just to dither something
21:45:28FromDiscord<pmunch> I've got a pattern and an image, and then I basically need to sample every pixel in the image, compare it to values from the pattern and decide if the output pixel is black or white
21:48:28FromDiscord<pmunch> That part works on the CPU, but not as a shader, so I'm guessing I just need to set up the pattern and screen buffer correctly
21:50:07FromDiscord<pmunch> Hmm, either that or texelFetch using a Sampler2D doesn't work correctly..
21:54:59FromDiscord<treeform> I am not sure. Shaders can be quite tricky.
21:55:20FromDiscord<treeform> I never used shady in production so I am not as confident in it.
22:15:16FromDiscord<pmunch> Hmm, yeah shaders can be a bit of a pain..
22:16:17FromDiscord<pmunch> I had hoped Shady would make it a bit easier..
22:29:44*andy-turner quit (Quit: Leaving)
22:58:42FromDiscord<Elegantbeef> @pmunch still have an issue with a shader?
23:03:09FromDiscord<pmunch> Yup
23:03:49FromDiscord<pmunch> I just can't seem to get this working
23:05:47FromDiscord<pmunch> @ElegantBeef
23:06:32FromDiscord<Elegantbeef> What's currently happening?
23:08:56FromDiscord<Elegantbeef> I did read what you said 😄
23:13:30FromDiscord<pmunch> Currently I just get a black result
23:15:33FromDiscord<pmunch> What I'm trying to do is a simple pattern dither, compare a pixel in the input with a pixel in the pattern (position mod pattern size). If the pixel in the input is darker than the pixel in the pattern then the output pixel should be black, otherwise it should be white.
23:16:06FromDiscord<pmunch> I've modified the compute1.nim example from shady. And it works when I run it on the CPU, but the GPU just gives a black output
23:16:37FromDiscord<pmunch> The mess I've got right now: https://pasty.ee/RzALiazD
23:17:00FromDiscord<Elegantbeef> Atleast it's self contained
23:17:15FromDiscord<pmunch> Yeah it's a fairly simple thing
23:17:22FromDiscord<pmunch> Which just makes it extra frustrating
23:17:30FromDiscord<pmunch> 90% of that code is just the compute example
23:18:17FromDiscord<pmunch> I'm tempted to revert to SamplerBuffer and just load all the pixels as one long buffer and do the indexing myself
23:19:31FromDiscord<Elegantbeef> `glUniform1i(patternBufferLoc, 1)`..?
23:20:35FromDiscord<pmunch> Again, mostly copied from the example 😅 If I've understood this correctly that binds `patternDimension` in the shader to the 1st buffer
23:20:43FromDiscord<Elegantbeef> No
23:20:51FromDiscord<pmunch> Ah..
23:21:06*om3ga quit (Ping timeout: 272 seconds)
23:21:13FromDiscord<Elegantbeef> that sets the value of `patternBufferLoc` to be `1`
23:21:48FromDiscord<Elegantbeef> that should be your `patternTextureId`
23:21:59FromDiscord<pmunch> Huh
23:22:37FromDiscord<Elegantbeef> Actually wait no it should be `glBindTextureUnit` followed by `glUinform`
23:23:18FromDiscord<pmunch> glBindTextureUnit?
23:23:53FromDiscord<pmunch> Here is where I got the idea from by the way: https://github.com/treeform/shady/blob/master/examples/compute1.nim#L99
23:24:42FromDiscord<Elegantbeef> The `1` seems off to me
23:25:38*om3ga joined #nim
23:25:53FromDiscord<pmunch> glBindTextureUnit seems to only be available in 4.5, this code is using 4.3. Not that it matters terribly much
23:26:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=VlNqCQBR
23:26:26FromDiscord<pmunch> I think it's the same 1 as the one in GL_TEXTURE1
23:26:26FromDiscord<Elegantbeef> Ah perhaps in older opengl that's fine, I tend to stick to 4.5+ features 😄
23:27:06FromDiscord<pmunch> Probably a good idea
23:27:18FromDiscord<Elegantbeef> Ignore my picking of that code then, quite close to what I recall but yea perhaps not the issue
23:27:27FromDiscord<Elegantbeef> I cannot get this to build locally so cannot do much investigating
23:29:17FromDiscord<pmunch> Oh shit, yeah I had to much about with shady and patch a thing in Windy to get this to compile..
23:29:27FromDiscord<pmunch> Probably not the best start come to think of it
23:29:48FromDiscord<pmunch> But that was just to build the compute1.nim
23:30:13FromDiscord<Elegantbeef> One day I'll expand my framework to make compute shaders usable 😄
23:31:17FromDiscord<Elegantbeef> I would suggest hooking up the opengl debug proc to see if anything stands out
23:31:46FromDiscord<Elegantbeef> https://github.com/beef331/truss3d/blob/master/src/truss3D.nim#L65-L91 if you want to steal parts of mine
23:33:03FromDiscord<pmunch> Ooh, some debugging output would indeed be nice
23:33:30FromDiscord<Elegantbeef> line 109 and 110 are also important
23:36:09*m5zs7k quit (Ping timeout: 244 seconds)
23:40:18*m5zs7k joined #nim
23:47:26FromDiscord<pmunch> https://pasty.ee/FJcWvzwQ
23:47:30FromDiscord<pmunch> Hmm, nothing too interesting
23:48:03FromDiscord<Elegantbeef> Well that atleast means you aren't holding the API wrong and the shader is just somehow wrong
23:48:35FromDiscord<pmunch> Indeed
23:51:01FromDiscord<Elegantbeef> Don't know if renderdoc works with compute, but you can always look at that