<< 06-08-2026 >>

01:26:05*rockcavera quit (Remote host closed the connection)
01:50:47*rockcavera joined #nim
01:59:13*xet7 quit (Quit: Leaving)
03:10:30*rockcavera quit (Remote host closed the connection)
04:37:51*zero` quit (Ping timeout: 269 seconds)
04:39:11*zero` joined #nim
05:34:42*lucerne90 quit (Ping timeout: 265 seconds)
06:50:28*zero`_ joined #nim
06:52:59*zero`__ joined #nim
06:53:39*zero` quit (Ping timeout: 252 seconds)
06:55:29*zero`_ quit (Ping timeout: 241 seconds)
08:06:27*lucerne90 joined #nim
08:44:40FromDiscord<enthus1ast.> In reply to @riku5543 "Heya, I have a": do the client sends a line seperator? ↵In general, i would send then receive the ok.↵So that both ends send and read.↵this way you can detect disconnects
08:45:54FromDiscord<enthus1ast.> @aaronspeedy are you aware of https://github.com/enthus1ast/nimja for html generation?
08:47:57FromDiscord<enthus1ast.> tcp is weird ( https://www.youtube.com/watch?v=JRTLSxGf_6w )
10:15:23*Jjp137 quit (Ping timeout: 242 seconds)
10:55:30*oisota quit (Quit: Ping timeout (120 seconds))
10:55:45*oisota joined #nim
11:09:17FromDiscord<riku5543> In reply to @enthus1ast. "do the client sends": Okay thank you. Yeah I was sending the line separators, I guess a ping is fine haha
11:18:38*pmp-p quit (Quit: No Ping reply in 180 seconds.)
11:19:59*pmp-p joined #nim
11:25:14*Skippy8 joined #nim
11:43:56*maxycodon joined #nim
11:46:15*maxycodon left #nim (#nim)
12:38:47*tarzeau_ quit (Ping timeout: 260 seconds)
12:49:40*Skippy8 quit (Read error: Connection reset by peer)
12:54:41*Skippy8 joined #nim
12:55:51*tarzeau joined #nim
13:27:24*Skippy8 quit (Ping timeout: 245 seconds)
13:29:37FromDiscord<aaronspeedy> In reply to @enthus1ast. "<@487408241723179030> are you aware": Yes, but I wanted to write it simply in my code
13:31:04FromDiscord<aaronspeedy> https://media.discordapp.net/attachments/371759389889003532/1534916718604845167/screenshot-20260806-083037.png?ex=6a75de17&is=6a748c97&hm=6120608f7e63806cb9c093f587c865efa66bab8e2eefb9713bfd1574206bbd22&
13:31:42FromDiscord<aaronspeedy> https://media.discordapp.net/attachments/371759389889003532/1534916878475071519/screenshot-20260806-083123.png?ex=6a75de3d&is=6a748cbd&hm=c314166d121d9f1beeef19c16f9cca0982bf351f91560cb60d71749d3d34f717&
13:32:59FromDiscord<aaronspeedy> Don't get why you would use some weird templating language when you have metaprogramming in Nim
13:35:47*Skippy8 joined #nim
13:44:10FromDiscord<zumi.dxy> but i like html :(
13:46:15FromDiscord<leiserfg> imho it's not worthy unless the amount of dynamic stuff is way bigger than the static one, if you have any error it will be a pain to debug where it is
13:46:40FromDiscord<enthus1ast.> Well, you can copy and paste HTML... And also extend your template with a base template etc
13:48:11FromDiscord<enthus1ast.> And to be honest, i know html already, why should I learn another representation of html
13:49:15FromDiscord<enthus1ast.> Ah and it's static
14:04:49FromDiscord<aaronspeedy> You can do the same in this
14:04:56FromDiscord<aaronspeedy> This is basically HTML, but written in code
14:05:02FromDiscord<aaronspeedy> Good errors and everything
14:05:50FromDiscord<aaronspeedy> https://media.discordapp.net/attachments/371759389889003532/1534925465981030441/screenshot-20260806-090525.png?ex=6a75e63c&is=6a7494bc&hm=9f87a789272279d28efff234ba746a31a22e037d6ac56501c7cd90d4b2592620&
14:07:03FromDiscord<aaronspeedy> literally the only things are `html`, `attr`, `html_template`, `paste_body`, returning an HtmlTemplate, and accepting an HtmlTemplate into an `html` macro
14:08:13FromDiscord<aaronspeedy> And of course you can embed it in the usual constructs like for loops and everything
14:09:11FromDiscord<aaronspeedy> that is not specially handled, but rather a result of this being plain Nim code
14:18:01FromDiscord<aaronspeedy> My thing is also only 335 lines of code
14:18:25FromDiscord<aaronspeedy> vs nimja, which is close to 2,000
14:19:01Amun-Ral
14:19:12Amun-Rawrong terminal ;)
14:19:42FromDiscord<aaronspeedy> holy crap this server is compromised
14:26:32FromDiscord<grotesquemalfeasance> rm
14:27:36Amun-Raabort
14:27:46FromDiscord<nervecenter> In reply to @aaronspeedy "Don't get why you": Nim also has source code filters which are perfectly fine for HTML templating
14:28:22FromDiscord<nervecenter> (I was a big fan of Clojure Hiccup back in the day so I'm not opposed to metaprogramming or data structures for templating)
14:35:09FromDiscord<aaronspeedy> Woah, I didn't know that
14:35:13FromDiscord<aaronspeedy> That's awesome
14:44:11*Skippy8 quit (Ping timeout: 272 seconds)
16:10:19FromDiscord<abdulrahman.103> does nim have proper opencv bindings
16:12:04*Skippy8 joined #nim
16:13:03*Jjp137 joined #nim
16:17:03FromDiscord<abdulrahman.103> I liked the language but it seems bindings even for popular stuff are unmaintained
16:20:51Amun-RaI wouldn't call opencv popular
16:21:08Amun-Ra(ymmv)
16:21:50FromDiscord<enthus1ast.> In reply to @nervecenter "Nim also has source": Yes, I've used those before but I've missed too many features and decided to write nimja. The work basically the same (and are in the same performance ballpark)
16:22:07FromDiscord<enthus1ast.> (edit) "The" => "They"
16:24:36FromDiscord<enthus1ast.> In reply to @aaronspeedy "": Ok and now do css 😉
16:24:49FromDiscord<enthus1ast.> Or SVG or whatever might come
16:24:57FromDiscord<aaronspeedy> I did do it before
16:25:10FromDiscord<aaronspeedy> just had selector and context blocks
16:25:14FromDiscord<aaronspeedy> but I removed it
16:25:27FromDiscord<enthus1ast.> I mean templating css
16:25:34*Skippy8 quit (Ping timeout: 256 seconds)
16:25:35FromDiscord<aaronspeedy> it worked with templates
16:26:19FromDiscord<aaronspeedy> I rewrote the library, and then didn't have a need for it
16:26:27FromDiscord<aaronspeedy> but I might release it, and if people want they can add it
16:26:49FromDiscord<enthus1ast.> Oh I thought it was htmlgen
16:26:53FromDiscord<aaronspeedy> Nah
16:26:56FromDiscord<enthus1ast.> Nevermind then
16:27:14FromDiscord<aaronspeedy> htmlgen doesn't have templates
16:27:36FromDiscord<aaronspeedy> and also attributes are argument parameters instead of functions, which makes them harder to compose
16:28:21FromDiscord<enthus1ast.> Yes, that's what I mean. Ninja avoids this all, and might even be faster than all of this
16:28:31FromDiscord<enthus1ast.> (edit) "Ninja" => "Nimja"
16:30:33FromDiscord<aaronspeedy> I could see it being useful if you want something that works for lots of different formats
16:30:36FromDiscord<aaronspeedy> markdown and the like
16:31:33FromDiscord<enthus1ast.> Or wireguard, nginx, zone configs etc pp
16:31:51FromDiscord<aaronspeedy> yo that's crazy
16:31:56FromDiscord<enthus1ast.> I use it for everything, even as a strformat replacement, but I might be biased
16:35:44FromDiscord<nervecenter> In reply to @enthus1ast. "Yes, I've used those": I was previously using Nimja, but I'm not doing anything that requires too many gymnastics so, apologies, I decided to cut the dependency.
16:36:07FromDiscord<enthus1ast.> Yes I understand
16:36:10FromDiscord<nervecenter> I was using it pretty prolifically for our primary product
16:37:29FromDiscord<enthus1ast.> I also like to be as lean as possible for new projects
16:38:10*Skippy8 joined #nim
16:40:53FromDiscord<aaronspeedy> Can Nimja be used without creating new files?
16:41:34FromDiscord<aaronspeedy> In a """ block or whatever
16:42:37*Skippy8 quit (Ping timeout: 260 seconds)
16:43:38*zodman quit (Ping timeout: 265 seconds)
17:10:20FromDiscord<aaronspeedy> Nimja is super interesting, but, at a first glance, having explicit for and endfor like things might be limiting it
17:10:50FromDiscord<aaronspeedy> If you think about the different axis of composition
17:11:48FromDiscord<aaronspeedy> But I'm unsure since I don't have any experience with it
17:58:23FromDiscord<enthus1ast.> @aaronspeedy What are you thinking about?
18:03:09FromDiscord<declasy> Hi
18:09:46*Artea quit (Read error: Connection reset by peer)
18:24:51*Skippy8 joined #nim
18:29:22*Skippy8 quit (Ping timeout: 260 seconds)
18:29:42*Skippy8 joined #nim
18:54:50FromDiscord<abdulrahman.103> has anybody used sdl in nim?
18:54:59FromDiscord<abdulrahman.103> which bindings should i use
18:55:17FromDiscord<abdulrahman.103> there is official sdl2 and unofficial sdl3
19:08:07*Skippy8 quit (Ping timeout: 264 seconds)
20:08:18*Skippy8 joined #nim
20:13:04*Skippy8 quit (Ping timeout: 259 seconds)
20:33:07FromDiscord<abdulrahman.103> nevermind i decided to use naylib
20:33:20FromDiscord<abdulrahman.103> looks maintained well
20:33:30FromDiscord<abdulrahman.103> (edit) "looks ... maintained" added "well" | removed "well"
20:34:35*tarzeau_ joined #nim
20:35:21*tarzeau quit (Ping timeout: 265 seconds)
20:35:51*ftajhii quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
20:42:28*ftajhii joined #nim
21:01:44*SchweinD1 quit (Remote host closed the connection)
21:03:25*SchweinDeBurg joined #nim
21:06:18*SchweinDeBurg quit (Remote host closed the connection)
21:06:35*SchweinDeBurg joined #nim
21:10:56FromDiscord<_timurski> In reply to @abdulrahman.103 "has anybody used sdl": i just llm generated bindings for SDL for my project
21:11:01FromDiscord<_timurski> haven't had any issues
21:11:22FromDiscord<_timurski> Nim maps so easily to C it's barely a risk
21:18:59*SchweinDeBurg quit (Remote host closed the connection)
21:19:18*SchweinDeBurg joined #nim
21:45:58*rockcavera joined #nim
21:53:37FromDiscord<tewesday> In reply to @tewesday "I haven't learned how": Hey, I'm trying to learn how this macro code works. I have a couple of questions:↵1. What does result[^3] mean? (specifically what does ^ do for an index?)↵2. in newStrLitNode() what do 1,2, and 3 refer to? I assume 2 is the original definition, and 1 and 3 have something to do with the rest of a function signature?↵3. Is there a way to print the trees during compilation so I can see
21:57:08FromDiscord<demotomohiro> In reply to @tewesday "Hey, I'm trying to": https://nim-lang.org/docs/system.html#%5E.t%2Cint
21:57:19FromDiscord<DetermiedNim1> ^n is a BackwardsIndex
21:57:40FromDiscord<demotomohiro> And see `[]` takes `BackwardsIndex`.
21:57:54FromDiscord<DetermiedNim1> In reply to @determiedmech1 "^n is a BackwardsIndex": like how in python indexing with a negative number start‍s from the end
21:58:12FromDiscord<tewesday> Ok got it, so basically result[resultsize-3]
21:58:26FromDiscord<DetermiedNim1> yeah
21:59:06FromDiscord<DetermiedNim1> For printing you can use dumpTree to print the ast of a block
21:59:37FromDiscord<DetermiedNim1> or `echo someNimNode.repr`
21:59:52FromDiscord<demotomohiro> https://nim-lang.org/docs/macros.html#expandMacros.m%2Ctyped↵This macro also helps to learn macros.
21:59:57FromDiscord<DetermiedNim1> i dont remember if you also need to `$`
22:14:22FromDiscord<tewesday> sent a code paste, see https://paste.rs/i9ots
22:15:57FromDiscord<_timurski> In reply to @tewesday "Sorry if I'm not": just $echo$ it
22:16:01FromDiscord<_timurski> (edit) "$echo$" => "`echo`"
22:16:05FromDiscord<_timurski> oh
22:16:21FromDiscord<tewesday> echo doesn't work either, that gives me an error about the tree type
22:16:31FromDiscord<DetermiedNim1> ^https://nim-lang.org/docs/system.html#%5E.t%2Cint
22:16:33FromDiscord<_timurski> can you give a concrete example of what you mean
22:16:43FromDiscord<DetermiedNim1> (edit) "^https://nim-lang.org/docs/system.html#%5E.t%2Cint" => "https://nim-lang.org/docs/system.html#%5E.t%2Cint"
22:17:01FromDiscord<_timurski> In reply to @tewesday "echo doesn't work either,": what error?
22:17:26FromDiscord<DetermiedNim1> sent a long message, see https://paste.rs/fZZqy
22:17:34FromDiscord<DetermiedNim1> (edit) "https://paste.rs/pIHp6" => "https://paste.rs/h9Elk"
22:18:14FromDiscord<tewesday> In reply to @_timurski "what error?": Error: Invalid node kind nnkPragma for macros.`$`
22:18:57FromDiscord<tewesday> sent a code paste, see https://paste.rs/crFKx
22:19:29FromDiscord<DetermiedNim1> use .repr
22:19:29FromDiscord<tewesday> In reply to @determiedmech1 ">>> template `^`(x: int):": Thanks, I understand what ^ does now
22:19:48FromDiscord<tewesday> (edit) "now" => "now, but I want to know the value at ^3"
22:19:51FromDiscord<DetermiedNim1> result[^3].repr
22:21:20FromDiscord<tewesday> sent a code paste, see https://paste.rs/BRnFb
22:21:48FromDiscord<tewesday> Now I just want to know what 1,2,3 are
22:22:48FromDiscord<_timurski> just look at source
22:41:24FromDiscord<DetermiedNim1> uhh isnt $x the xth argument?
22:41:59FromDiscord<DetermiedNim1> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma
22:45:35FromDiscord<DetermiedNim1> it does slightly different things depending on if its on a procedure, variable or object
22:45:45FromDiscord<DetermiedNim1> @tewesday
22:58:28*Skippy8 joined #nim
23:47:34*Skippy8 quit (Ping timeout: 244 seconds)