| 00:06:25 | * | xtr00_ quit (Read error: Connection reset by peer) |
| 00:44:05 | * | hazardchem quit (Read error: Connection reset by peer) |
| 00:44:18 | * | hazardchem joined #nim |
| 01:55:08 | * | xet7 quit (Ping timeout: 248 seconds) |
| 02:07:42 | * | xet7 joined #nim |
| 02:35:54 | FromDiscord | <dsferew353> hi, who need dev? |
| 02:39:42 | * | rockcavera quit (Remote host closed the connection) |
| 04:19:56 | * | SchweinD1 joined #nim |
| 04:23:25 | * | SchweinDeBurg quit (Ping timeout: 259 seconds) |
| 04:39:30 | * | deavmi quit (Read error: Connection reset by peer) |
| 04:43:55 | * | deavmi joined #nim |
| 04:53:42 | * | tokyovigilante quit (Remote host closed the connection) |
| 04:54:27 | * | tokyovigilante joined #nim |
| 05:13:21 | FromDiscord | <lainlaylie> In reply to @dsferew353 "hi, who need dev?": <@&371760044473319454> |
| 06:29:46 | longptr | I guess there is also owlkettle as a GTK4 <--> nim bridge |
| 06:38:57 | * | syl quit (Ping timeout: 243 seconds) |
| 06:39:55 | * | syl joined #nim |
| 07:18:49 | FromDiscord | <TӨMΛ ☠> Did Nim's syntax highlight on Discord get turned off? |
| 07:48:18 | FromDiscord | <janakali> @TӨMΛ ☠ I think they moved off from highlight.js to their own engine https://github.com/discord/arborium-rt |
| 07:50:24 | FromDiscord | <janakali> I couldn't find a list of supported languages, but you can see that they don't ship Nim's treesitter grammar here\: https://github.com/discord/arborium-rt/blob/main/THIRD_PARTY_NOTICES |
| 07:51:15 | * | xet7 quit (Remote host closed the connection) |
| 07:55:53 | * | xet7 joined #nim |
| 08:41:27 | * | beholders_eye joined #nim |
| 08:41:33 | * | xtr00 joined #nim |
| 09:58:22 | FromDiscord | <TӨMΛ ☠> Oof, unfortunate |
| 10:00:45 | FromDiscord | <TӨMΛ ☠> Made issue there asking for Nim lang support, hopefully it will be answered |
| 10:01:04 | * | beholders_eye quit (Ping timeout: 269 seconds) |
| 10:25:01 | * | karolyi quit (Read error: Connection reset by peer) |
| 10:25:26 | * | karolyi joined #nim |
| 10:51:45 | * | beholders_eye joined #nim |
| 10:51:56 | * | insanescholar joined #nim |
| 10:56:25 | * | insanescholar quit (Read error: Connection reset by peer) |
| 11:31:43 | FromDiscord | <gokr> When building Harding I stumbled around various approaches around Gtk. I eventually ended up handrolling a selected subset since I am using AI - it was trivial. So no Owlkettle, no gintro, no Futhark even (although I adore Futhark). https://github.com/gokr/harding/blob/main/src/harding/gui/gtk/ffi.nim - and then the rest of the files in that directory gives the "higher level". |
| 12:29:19 | * | beholders_eye quit (Ping timeout: 242 seconds) |
| 12:53:35 | * | beholders_eye joined #nim |
| 13:38:41 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
| 13:40:28 | * | Lord_Nightmare joined #nim |
| 15:24:17 | * | insanescholar joined #nim |
| 15:52:42 | * | insanescholar_ joined #nim |
| 15:53:26 | * | insanescholar quit (Ping timeout: 269 seconds) |
| 15:58:04 | * | insanescholar_ quit (Ping timeout: 260 seconds) |
| 16:20:37 | * | beholders_eye quit (Ping timeout: 267 seconds) |
| 17:11:13 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
| 17:11:33 | * | Jhonny2x4 joined #nim |
| 17:21:45 | * | sdothum quit (Remote host closed the connection) |
| 17:25:55 | * | sdothum joined #nim |
| 17:40:46 | * | karolyi quit (Remote host closed the connection) |
| 17:53:12 | * | karolyi joined #nim |
| 18:04:29 | * | GnuYawk129703 joined #nim |
| 18:06:12 | * | GnuYawk12970 quit (Ping timeout: 240 seconds) |
| 18:06:12 | * | GnuYawk129703 is now known as GnuYawk12970 |
| 18:42:28 | * | xtr00 quit (Read error: Connection reset by peer) |
| 18:42:34 | * | xtr00_ joined #nim |
| 18:57:40 | * | sdothum quit (Read error: Connection reset by peer) |
| 18:57:53 | * | sdothum joined #nim |
| 19:08:29 | FromDiscord | <pmunch> In reply to @janakali "<@656540400546480128> I think they": Well that sucks.. |
| 19:09:52 | FromDiscord | <pmunch> In reply to @longptr "I guess there is": Not sure if you should count Gtk as cross-platform native. But owlkettle works pretty well. An alternative I've been using is also to just Futhark Gtk and use it raw. |
| 19:13:57 | * | xet7 quit (Quit: Leaving) |
| 19:20:38 | FromDiscord | <Abdulrahman> In reply to @pmunch "Not sure if you": Why would it not be considered that? Isnt it cross platform just like qt? |
| 19:21:05 | FromDiscord | <pmunch> Sure, it's cross platform. But it's not using native widgets |
| 19:21:17 | FromDiscord | <pmunch> At least not last time I checked |
| 19:21:20 | FromDiscord | <Abdulrahman> You mean not winapi on windows and doesnt look native |
| 19:21:26 | FromDiscord | <Abdulrahman> Or winui |
| 19:21:32 | FromDiscord | <Abdulrahman> Whatever its called |
| 19:21:49 | FromDiscord | <pmunch> Yeah, whatever it's called. And not Cocoa or whatever the Mac thing is |
| 19:22:15 | FromDiscord | <Abdulrahman> I think win api is the base and winui is the c# implementation over it |
| 19:22:18 | FromDiscord | <pmunch> TBF Linux doesn't really have a native toolkit, but Gtk is often considered as one on Linux |
| 19:24:02 | FromDiscord | <Abdulrahman> In reply to @pmunch "TBF Linux doesn't really": Qt is foss and standard too even though it is corporate they signed an agreement that qt becomes bsd0 if they close the source or something |
| 19:24:51 | FromDiscord | <Abdulrahman> And it is gpl currently |
| 19:24:56 | FromDiscord | <Abdulrahman> So it can be forked |
| 19:25:25 | FromDiscord | <Abdulrahman> Gtk was an open opposition to qt |
| 19:25:37 | FromDiscord | <Abdulrahman> Because qt didnt have that agreement at the time i think |
| 19:26:11 | FromDiscord | <Abdulrahman> And had a special license |
| 19:26:21 | FromDiscord | <Abdulrahman> Qpl apparently |
| 19:26:43 | * | beholders_eye joined #nim |
| 19:27:52 | FromDiscord | <pmunch> Ah right, on KDE I guess Qt would be considered the native option |
| 19:28:59 | FromDiscord | <pmunch> wxWidgets is an option though |
| 19:29:25 | FromDiscord | <dykatz> Isn't WxWidgets a pure abstraction layer over other toolkits? |
| 19:30:10 | FromDiscord | <dykatz> It's a toolkit the way that Lazarus' LCL is a toolkit |
| 19:30:20 | FromDiscord | <pmunch> Yup |
| 19:30:29 | FromDiscord | <pmunch> So you get native widgets on all platforms |
| 20:01:24 | FromDiscord | <Abdulrahman> Is sdl as a toolkit backend a bad option |
| 20:01:28 | FromDiscord | <Abdulrahman> Im kinda doing that |
| 20:02:02 | FromDiscord | <Abdulrahman> Im making a gui framework on top of sdl and i managed to make buttons and some simple stuff |
| 20:06:07 | * | oprypin quit (Quit: Bye) |
| 20:11:14 | * | oprypin joined #nim |
| 20:15:52 | FromDiscord | <pmunch> Wouldn't say it was bad |
| 20:16:04 | FromDiscord | <dykatz> In reply to @abdulrahman.103 "Is sdl as a": Quite possibly, but it depends on what you are building. SDL is designed around the needs of games, so its usage of the windowing system might be suboptimal for a widget system |
| 20:16:18 | FromDiscord | <pmunch> Hmm, did `nimbase.h` get deleted in 2.2.12 without any note in the changelog? |
| 20:16:38 | FromDiscord | <dykatz> It also won't help you with a11y, so you would have to combine it with AccessKit or similar to get a good result |
| 20:17:35 | * | om3ga quit (Quit: Bye) |
| 20:18:11 | FromDiscord | <pmunch> Oh wait, never mind, I just didn't have 2.2.12 installed <_< |
| 20:18:23 | * | om3ga joined #nim |
| 20:18:54 | FromDiscord | <b0rsuk> sent a code paste, see https://paste.rs/g2krT |
| 20:19:12 | FromDiscord | <b0rsuk> (edit) "https://paste.rs/PahWt" => "https://paste.rs/BH0xI" |
| 20:19:42 | FromDiscord | <b0rsuk> I solved it in 3 different ways today. The 2nd way was with `.mapIt`. It was a bit uglier than the third one. reduce/fold is a better fit. |
| 20:20:21 | FromDiscord | <_timurski> In reply to @b0rsuk "You know what? Fuck": i mean it's pretty obvious the first solution would be a lot faster |
| 20:20:35 | FromDiscord | <_timurski> you're doing string conversions on the second one 😭 |
| 20:20:44 | FromDiscord | <b0rsuk> Because there's no type conversion except for the digit count? |
| 20:21:20 | FromDiscord | <b0rsuk> I still do some conversion in the first one, except I pre-calculate the number of digits and I don't have to do it in a loop. |
| 20:21:31 | FromDiscord | <b0rsuk> (edit) "I" => "~~I" | "loop." => "loop.~~" |
| 20:21:31 | FromDiscord | <_timurski> the `parseInt` and `$` are likely very expensive compared to the first solution |
| 20:21:39 | FromDiscord | <b0rsuk> I don't know what I'm saying anymore. I'm tired. |
| 20:22:47 | FromDiscord | <b0rsuk> In reply to @_timurski "you're doing string conversions": It's actually worse. I'm converting it `string` -> `char` -> `int`. |
| 20:22:59 | FromDiscord | <b0rsuk> Because strings are similar to sequence of char. |
| 20:23:20 | FromDiscord | <b0rsuk> That's why I have to use `$` inside foldl... |
| 20:23:37 | FromDiscord | <b0rsuk> (edit) "That's why I have to use `$` inside foldl... ... " added "because `b` is a char." |
| 20:24:18 | FromDiscord | <b0rsuk> For a Python programmer who doesn't know how to profile Nim programs, the 2nd solution looks a lot better. |
| 20:31:51 | FromDiscord | <pmunch> sent a code paste, see https://paste.rs/V6jvD |
| 20:32:16 | FromDiscord | <pmunch> sent a code paste, see https://paste.rs/KNOZ6 |
| 20:34:05 | FromDiscord | <pmunch> Although surprisingly they give two different results, 15 and 16 respectively |
| 20:36:59 | FromDiscord | <b0rsuk> In reply to @pmunch "Although surprisingly they give": What does it mean they give two different results? |
| 20:38:30 | FromDiscord | <pmunch> The number of armstrong numbers between 1 and 10_000 differ between the two |
| 20:38:50 | FromDiscord | <pmunch> The `total` tracks the number of Armstrong numbers |
| 20:41:56 | FromDiscord | <b0rsuk> Oh so the test cases are pretty loose. |
| 20:42:13 | FromDiscord | <b0rsuk> (edit) "cases are" => "suite is" |
| 20:50:07 | FromDiscord | <pmunch> Loose? |
| 20:50:43 | * | om3ga quit (Ping timeout: 265 seconds) |
| 20:50:43 | FromDiscord | <pmunch> sent a code paste, see https://paste.rs/hkcLs |
| 20:51:46 | FromDiscord | <pmunch> sent a code paste, see https://paste.rs/b9V6X |
| 20:52:58 | FromDiscord | <pmunch> I was a little bit surprised that the cache check was cheaper than just doing the power each iteration, but it seems to be |
| 20:54:40 | FromDiscord | <pmunch> Oh wait, it's not (I swear I tested..) |
| 20:54:50 | FromDiscord | <pmunch> sent a code paste, see https://paste.rs/afWdl |
| 20:55:16 | FromDiscord | <pmunch> sent a code paste, see https://paste.rs/d7TQu |
| 20:55:51 | * | om3ga joined #nim |
| 20:56:07 | FromDiscord | <pmunch> So the only real change is accumulating the exponent instead of calculating it over and over |
| 20:58:28 | FromDiscord | <pmunch> The cache version is slightly faster if you check the first million numbers instead of only the first ten thousand |
| 21:06:20 | * | jjido joined #nim |
| 21:06:43 | FromDiscord | <b0rsuk> In reply to @pmunch "Returns the same as": Maybe the math can be improved too. I didn't know how to do this, and I was trying things out in a Python interpreter until I came up with that solution. |
| 21:11:19 | * | beholders_eye quit (Ping timeout: 243 seconds) |
| 21:22:55 | * | rockcavera joined #nim |