00:07:18 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=rIzYUIDg |
00:07:29 | FromDiscord | <albassort> its a sock_seqpacket. hm... |
00:46:09 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=ivXslULf |
00:48:55 | * | Jjp137_ quit (Quit: Leaving) |
00:50:38 | * | Jjp137 joined #nim |
02:13:29 | FromDiscord | <janakali> @aintea @michael.lenz. it's an opt-out feature, just put `--styleCheck:error` in your global config to turn Nim into (mostly) case-sensitive language |
02:33:39 | * | beholders_eye quit (Ping timeout: 276 seconds) |
02:55:47 | * | disso-peach joined #nim |
03:59:01 | * | GnuYawk673 quit (Quit: The Lounge - https://thelounge.chat) |
03:59:22 | * | GnuYawk673 joined #nim |
05:28:50 | FromDiscord | <heysokam> In reply to @aintea "It is one of": i/e |
05:29:25 | FromDiscord | <heysokam> (edit) "i/e" => "you will change your mind as soon as you find a library that uses the opposite style of yours, and your codebase becomes a mess" |
05:30:04 | FromDiscord | <heysokam> cannot happen in Nim š¤·āāļø |
05:55:26 | Amun-Ra | hernan604: I write in snake case :) |
05:57:01 | * | bcksl quit (Ping timeout: 252 seconds) |
05:58:07 | * | end quit (Ping timeout: 268 seconds) |
05:58:58 | * | ntat joined #nim |
06:09:34 | * | bcksl joined #nim |
06:19:58 | * | end joined #nim |
06:28:43 | * | ntat quit (Quit: Leaving) |
07:33:12 | * | alexdaguy joined #nim |
08:12:19 | FromDiscord | <aintea> snake_case for variables āµUPPER_SNAKE_CASE for constants āµcamelCase for functions/methodsāµUpperCamelCase for types |
08:12:24 | FromDiscord | <aintea> This should be the norm |
08:12:48 | FromDiscord | <aintea> Nim code style decided otherwise so we need to follow it |
08:15:16 | Amun-Ra | I tried to use camel case for functions but it's ugly and less readable (ymmv); I switch to python code style and never looked back |
08:15:56 | Amun-Ra | it doesn't really matter in nim after all |
08:17:49 | FromDiscord | <fabric.input_output> pascal case for types, enums, constants, snake for variables, fields, getters/setters, camel for procs, methods, macros, templates |
08:18:58 | Amun-Ra | the only camel case I have left are std functions, I haven't decided yet to replace them with _ |
08:19:30 | Amun-Ra | although I don't use doAssert, compileTime anymore, just doassert and compiletime |
08:52:28 | FromDiscord | <lainlaylie> i would chime in with my preferred style but this is just pointless bikeshedding |
09:06:55 | FromDiscord | <ayex> sent a long message, see https://pasty.ee/UVsGtxal |
09:17:53 | FromDiscord | <pmunch> Is there a way to take an `openArray[T]` and, with static indices, slice out an `array[N, T]` from it? |
09:18:09 | FromDiscord | <pmunch> Just doing `myOpenArray[0..7]` returns a seq |
09:19:09 | FromDiscord | <pmunch> One possibility would of course be `cast[ptr array[8, T]](myOpenArray[0].addr)[]` but that's quite ugly |
09:40:09 | FromDiscord | <bosinski2023> In reply to @pmunch "One possibility would of": maybe not nice, but i'd do if its reliable. Maybe later look for a more aestethic API. |
09:43:29 | Amun-Ra | I think cast is the only option if the size of a source array is known in rt |
09:54:58 | * | tokyovigilante quit (Remote host closed the connection) |
09:55:13 | * | tokyovigilante joined #nim |
10:06:11 | * | ntat joined #nim |
10:48:07 | FromDiscord | <michael.lenz.> In reply to @janakali "<@680384230227836970> <@812260016890576936> it's an": Thanks! I will try |
11:18:04 | FromDiscord | <madonuko> sent a code paste, see https://play.nim-lang.org/#pasty=NLqntdFd |
11:19:25 | FromDiscord | <madonuko> honestly I've no idea why this even happens https://media.discordapp.net/attachments/371759389889003532/1342455630740590592/image.png?ex=67b9b2bb&is=67b8613b&hm=d79ebf72c17d6ee4f5fe96cfa17eb411fbb4d64f7fd80e62b643c809bd25c236& |
11:23:04 | FromDiscord | <madonuko> idk if I'm doing this correctly, it's working after adding a `.nim.cfg` file with `-t:"-I/usr/include/qt6"` |
11:25:52 | FromDiscord | <arnetheduck> you can add include paths by adding `{.passc: gorge("pkg-config --cflags Qt5Widgets").}` and `{.passl: gorge("pkg-config --libs Qt5Widgets").}` to your main project |
11:26:05 | FromDiscord | <madonuko> ah |
11:26:16 | FromDiscord | <madonuko> that's genius |
11:28:54 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=hroToDQw |
11:29:12 | FromDiscord | <nnsee> oh, got it |
11:29:15 | FromDiscord | <madonuko> you copy the entire ansi, thenāµ\`\`\`ansiāµstuff hereāµ\`\`\` |
11:29:16 | FromDiscord | <nnsee> \`\`\`ansi |
11:29:22 | FromDiscord | <nnsee> nice, TIL |
11:40:54 | FromDiscord | <madonuko> sent a code paste, see https://play.nim-lang.org/#pasty=bFDXcPzs |
11:42:08 | FromDiscord | <madonuko> sent a code paste, see https://play.nim-lang.org/#pasty=kgobHSRz |
11:42:26 | FromDiscord | <madonuko> (edit) "https://play.nim-lang.org/#pasty=GTBSLHhE" => "https://play.nim-lang.org/#pasty=QoTcrmNF" |
11:43:02 | FromDiscord | <madonuko> honestly that still looks very ugly let me just give you syntax highlighting https://media.discordapp.net/attachments/371759389889003532/1342461577282195506/image.png?ex=67b9b845&is=67b866c5&hm=6b4c1ee5c7cd6d6097f28dea8ed34c6e66a6abd37288c6e19c8fb9a30f5e7a6d& |
11:45:40 | FromDiscord | <madonuko> ah so it's my issue https://media.discordapp.net/attachments/371759389889003532/1342462239331844159/image.png?ex=67b9b8e3&is=67b86763&hm=408cc4eb8efb7d3147bf195c3c007777ccb3c8d43b959377ab8fadd6a69c9e79& |
11:48:34 | FromDiscord | <arnetheduck> not sure what you're up to, but one thnig I'm playing with is a set of qt bindings that allow qt to be used with the C backend, which tends to be more stable: https://github.com/arnetheduck/nim-miqt-poc/pull/2 .. they're not ready for use, but might be of interest regardless |
11:48:43 | FromDiscord | <arnetheduck> (edit) "thnig" => "thing" |
11:49:26 | FromDiscord | <arnetheduck> one thing they do is to take care of cflags - but mainly, they offer the full qt api to the application |
11:51:19 | FromDiscord | <madonuko> In reply to @arnetheduck "not sure what you're": I'm using nimqml but I need things like `QKeySequence`, so I just use C++ to port the functions to nim |
11:52:34 | FromDiscord | <arnetheduck> yeah, I have a port of that too, https://github.com/arnetheduck/nimqml-miqt-poc/ - ie nimqml does not work well with qmetaobject and requires wrapping a lot of things in qvariant - the above solves that problem too by making nim fully qmetaobject-compatible |
11:53:04 | FromDiscord | <arnetheduck> (edit) "yeah, I have a port of that too, https://github.com/arnetheduck/nimqml-miqt-poc/ - ie nimqml does not work well with qmetaobject and requires wrapping a lot of things in qvariant - the above solves that problem too by making nim fully qmetaobject-compatible ... " added "(it reimplements moc as a nim macro, more or less)" |
11:53:12 | FromDiscord | <arnetheduck> (edit) "moc" => "`moc`" |
11:54:39 | FromDiscord | <madonuko> I kinda thought it was a go projectāµI actually stumbled upon this before deciding to write my own quick and dirty C++ port |
11:55:26 | FromDiscord | <arnetheduck> In reply to @madonuko "I kinda thought it": well, miqt is - but the poc ports miqt to nim, more or less - or rather, it reuses the c bindings that miqt generates and imports them to nim |
11:56:33 | FromDiscord | <madonuko> ah ok https://media.discordapp.net/attachments/371759389889003532/1342464978388516966/image.png?ex=67b9bb70&is=67b869f0&hm=1f6f7dbb5fbf83b3048840d22fafe0ac8d2edb563e4a8715e9ecbac99fa8148a& |
11:59:49 | FromDiscord | <arnetheduck> yours is certainly the more expedient way if you're looking to get things done š the bindings still need some structural work before they become sustainable - that said, the are already functional in the sense that they exceed what DOtherSide / nimqml can do (yeah, QKeySequence is covered for example) .. happy to collaborate, it's quite a massive project |
12:04:56 | FromDiscord | <arnetheduck> more info here: https://github.com/mappu/miqt/issues/21#issuecomment-2674330023 |
12:07:31 | FromDiscord | <madonuko> I'm currently figuring out how to use this |
12:10:56 | FromDiscord | <summarity> Something odd happenig with the default init for strtabs. If you have a field like `definitions = newStringTable()` (empty table is default), the rendered docs will look like this š https://media.discordapp.net/attachments/371759389889003532/1342468598022672404/image.png?ex=67b9becf&is=67b86d4f&hm=7c21cfbf7c15fd77ccc6a0c14675ad531387344ec8c3707789d45c67153aa183& |
12:22:30 | FromDiscord | <madonuko> In reply to @arnetheduck "yours is certainly the": do I need to compile and run `nim-miqt-poc/cmd/genbindings/main.go`? |
12:22:54 | FromDiscord | <madonuko> in order to get the bindings in gen/qt- |
12:23:25 | FromDiscord | <arnetheduck> the generated code is available in a branch: https://github.com/arnetheduck/nim-miqt-poc/tree/qt-6.4 |
12:23:42 | FromDiscord | <madonuko> intersting that saves a lot of time |
12:26:11 | FromDiscord | <arnetheduck> In reply to @madonuko "do I need to": but yeah, https://github.com/arnetheduck/nim-miqt-poc/tree/nim-poc2/gen is generated by genbindings in a docker container (to make it reproducible) |
12:26:31 | FromDiscord | <arnetheduck> (edit) "In reply to @madonuko "do I need to": but yeah, https://github.com/arnetheduck/nim-miqt-poc/tree/nim-poc2/gen is generated by ... genbindings" added "running" |
12:26:46 | FromDiscord | <arnetheduck> (edit) "reproducible)" => "reproducible with different qt version)" |
12:26:49 | FromDiscord | <arnetheduck> (edit) "version)" => "versions)" |
12:27:44 | FromDiscord | <madonuko> that makes sense |
12:33:07 | FromDiscord | <madonuko> just got it working |
12:33:34 | FromDiscord | <madonuko> required a manual symlink at the repo root qt-6.4 branch: `ln -s QtCore/ qt` |
14:25:55 | * | alexdaguy quit (Quit: w) |
14:29:09 | hernan604 | Amun-Ra: huh? |
14:30:57 | FromDiscord | <odexine> what are you confused about |
19:01:22 | * | xet7 quit (Remote host closed the connection) |
19:04:43 | * | xet7 joined #nim |
20:05:55 | * | beholders_eye joined #nim |
20:45:04 | FromDiscord | <aintea> Are there any "nimlings" project going on ? If not does someone want to lead the project and let the community make small exercises ?āµI do think rustlings and ziglings are a really good way to exercise but I haven't seen it in Nim |
20:49:37 | FromDiscord | <Elegantbeef> There are two attempts at it, but yea no steam |
20:49:37 | FromDiscord | <Elegantbeef> https://github.com/search?q=language%3Anim%20%20nimlings&type=repositories |
20:51:31 | FromDiscord | <aintea> I'll try to do one, I think this is what I need to do, please correct me if needed since I have never made something like this:āµ- Make 30-ish files with 30 different conceptsāµ- make 30-ish test filesāµ- run the 30-ish test files in order |
20:51:45 | FromDiscord | <aintea> this is how I view it, if there are any more things please correct me |
20:52:14 | FromDiscord | <Elegantbeef> You could just make 30 different test files |
20:52:26 | FromDiscord | <Elegantbeef> Since it's all about fixing the code to make it work |
20:53:16 | FromDiscord | <aintea> ok then I'll try to make one |
20:53:57 | FromDiscord | <aintea> What are the topics you guys think should be in there except the classics that are common to all programming languages (variables, functions, "classes", generics, exceptions, ..) |
20:54:43 | FromDiscord | <Elegantbeef> Isn't the point to fix code to learn the language? |
20:55:07 | FromDiscord | <aintea> yes but I need more ideas than the classic stuff |
20:56:18 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=mSljJjrf |
20:56:22 | FromDiscord | <Elegantbeef> Make some basic terminal projects with some bugs I guess |
20:56:40 | FromDiscord | <aintea> Yeah just like the ziglings thingy |
20:56:44 | FromDiscord | <aintea> but I need topics |
20:56:49 | FromDiscord | <aintea> Language specific if possible |
20:57:18 | FromDiscord | <Elegantbeef> Object variants and creating some form of data structure that uses them |
20:57:27 | FromDiscord | <Elegantbeef> A stack based calculator would do the trick |
20:57:40 | FromDiscord | <Elegantbeef> If I didnt make toy programs in `/tmp` i'd have gifted you that |
20:57:54 | FromDiscord | <aintea> I'm not sure about mini projects since there is already Nim days |
20:58:02 | FromDiscord | <aintea> which does the job perfectly |
20:58:08 | FromDiscord | <aintea> In reply to @Elegantbeef "*If I didnt make": same |
21:18:55 | FromDiscord | <fl4shk> Does anyone know of a library like Python's Pillow for Nim code? |
21:19:02 | FromDiscord | <fl4shk> Or do I need to bust out a C library |
21:19:06 | FromDiscord | <fl4shk> (edit) "Or do I need to bust out a C ... library" added "or C++" |
21:19:29 | FromDiscord | <Elegantbeef> Pixie might work? |
21:20:05 | FromDiscord | <fl4shk> I only need to support PNGs, so maybe https://github.com/jangko/nimPNG |
21:20:10 | FromDiscord | <fl4shk> I'll look at Pixie too |
21:20:13 | FromDiscord | <fl4shk> I need to write this quickly... |
21:20:17 | FromDiscord | <fl4shk> (edit) "need" => "wish" |
21:39:05 | * | ntat quit (Quit: Leaving) |
22:41:48 | FromDiscord | <fl4shk> it looks like Pixie has a simple example that will do exactly what I'm looking for |
22:42:27 | FromDiscord | <fl4shk> (edit) "it looks like Pixie has a simple example that will do ... exactly" added "nearly" |
22:42:31 | FromDiscord | <fl4shk> it at least does the resize thing I need |
23:50:55 | FromDiscord | <fl4shk> okay got that written |
23:56:34 | FromDiscord | <fl4shk> it's small enough that I can show it here |
23:56:41 | FromDiscord | <fl4shk> (edit) "it's small enough that I can show it here ... " added "(fits on a small monitor!)" |
23:57:05 | FromDiscord | <fl4shk> https://paste.ee/p/DLFhweog |