00:48:11 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
03:01:48 | * | derpydoo quit (Read error: Connection reset by peer) |
04:11:13 | FromDiscord | <luxurymode> This interpreter I'm working on feels like it's writing itself. Nim! ❤️ |
04:13:01 | * | azimut quit (Ping timeout: 252 seconds) |
04:13:24 | * | azimut joined #nim |
04:14:30 | FromDiscord | <luxurymode> In reply to @Elegantbeef "<@707990522400342046> this is close": Nice. I had been just overriding `$` myself and treating it much the same I would `repr` in Python to produce a string that would represent a valid way to instantiate the object |
04:14:30 | * | beholders_eye quit (Ping timeout: 258 seconds) |
04:34:02 | FromDiscord | <jaar23> Hi, I'm playing with threadpool library quite sometime, and found this behavior.↵If I have multi core machine I can run multiple long running threads without any problem.↵However, when I reduce the core to 1, then I realised it is only able to run at maximum 4 long running threads.. by default.↵Btw, long running thread I mean a while loop that never end and keep waiting for io. Anyone can clarify me? |
04:35:28 | FromDiscord | <jaar23> Also, if I setMinPoolSize to 8 and run on the single core machine, then I can run more than 4 long running threads.↵In this case, the minPoolSize, seems more like a maxPoolSize 🤔 |
04:37:04 | FromDiscord | <Elegantbeef> I'll say checkout taskpools instead |
06:34:38 | * | PMunch joined #nim |
06:39:32 | * | advesperacit joined #nim |
06:51:00 | FromDiscord | <jaar23> sent a code paste, see https://play.nim-lang.org/#ix=4IJe |
06:54:19 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=4IJf |
06:54:49 | FromDiscord | <odexine> (edit) "https://play.nim-lang.org/#ix=4IJf" => "https://play.nim-lang.org/#ix=4IJg" |
06:55:34 | FromDiscord | <Elegantbeef> Pretty much all of Nim does not support shared gc'd types |
06:55:54 | FromDiscord | <Elegantbeef> Sharing GC'd resources across threads didnt work in refc due to local heaps, it doesnt work with Orc/Arc unless you know what you're doing due to destructors |
06:56:13 | FromDiscord | <Elegantbeef> There is `--mm:atomicArc` to enable arc shared resources |
06:56:59 | FromDiscord | <sharpnife> (Unsure, where to ask, new to this server, sorry if its not the right place)↵↵I’m using nimpy to convert the nim file to be used as a python module, and I wonder if there is a way for the python type checkers(like pyright, mypy such) to detect the nim module and provide intelli-sense of some sorts? |
07:08:11 | FromDiscord | <Elegantbeef> I imagine not |
07:09:47 | * | azimut quit (Remote host closed the connection) |
07:10:04 | * | lucerne quit (Ping timeout: 255 seconds) |
07:10:09 | * | azimut joined #nim |
07:25:31 | FromDiscord | <jaar23> In reply to @Elegantbeef "Sharing GC'd resources across": Got it. |
07:26:00 | FromDiscord | <jaar23> I saw threadpool has distinguished thread. Any ideas what is that? |
07:29:10 | FromDiscord | <Elegantbeef> It's a thread that has a moustache and wears a tophat |
07:29:31 | FromDiscord | <Elegantbeef> If that's not the case, I don't know |
07:33:38 | FromDiscord | <jaar23> Okay. I got it |
07:53:48 | * | rockcavera quit (Remote host closed the connection) |
08:30:03 | * | azimut quit (Ping timeout: 252 seconds) |
09:23:26 | FromDiscord | <that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4IJD |
09:24:26 | FromDiscord | <that_dude.> Also it seems to break something on the playground |
09:26:47 | FromDiscord | <that_dude.> In fact it seems multiple things from `times` is causing the issue. I've been using things like `json` and `tables` constantly though |
09:35:50 | FromDiscord | <that_dude.> Hmm I guess they recently did some cloud patch that heavily dislikes Nim in general now :/ |
09:36:32 | FromDiscord | <nnsee> which AV? |
09:36:36 | FromDiscord | <that_dude.> Bitdefender |
09:36:37 | FromDiscord | <nnsee> cannot replicate on Defender |
09:36:58 | FromDiscord | <that_dude.> I can't even compile `echo 1` now lol |
09:39:35 | FromDiscord | <nnsee> well isn't Bitdefender a Bit trigger happy |
09:40:01 | FromDiscord | <ringabout> Which version, 2.0? |
09:42:37 | FromDiscord | <that_dude.> Yeah |
09:43:00 | FromDiscord | <that_dude.> I guess I didn't expect it to get more trigger happy at 3:30 in the morning |
09:45:53 | FromDiscord | <nnsee> can you send me an example exe? |
09:47:26 | FromDiscord | <ringabout> There is no good solution. But probably we can build a workflow to submit the binaries of these examples to virusTotal => https://github.com/nim-lang/virus_checker |
09:48:20 | FromDiscord | <that_dude.> Larger files work better. It seems just short ones trigger it more |
09:48:34 | FromDiscord | <that_dude.> Ie, I can compile larger projects just fine |
09:56:16 | * | lucerne joined #nim |
11:02:40 | emery | odexine: a lockfile build https://github.com/NixOS/nixpkgs/pull/260405 |
11:04:26 | FromDiscord | <System64 ~ Flandre Scarlet> SDL2 VS SFML↵What's the best? |
11:05:13 | FromDiscord | <odexine> In reply to @emery "<@259277943275126785>: a lockfile build": niceeeeee |
11:07:38 | emery | odexine: if this doesn't break any of the evaluation rules in nixpkgs I might make an RFC about moving the Nim programs to use lockfiles for libaries. Not that many people care about Nim in nixpkgs but other languages could do something similar |
11:08:10 | FromDiscord | <odexine> i dont remember what the BEAM guys do for this |
11:22:39 | FromDiscord | <System64 ~ Flandre Scarlet> Wait↵Nim 1.6 still maintained ? |
11:42:28 | FromDiscord | <odexine> yes |
11:42:38 | FromDiscord | <odexine> iirc 1.4 is still "maintained" as well |
12:11:24 | * | deadmarshal quit (Ping timeout: 240 seconds) |
12:13:49 | FromDiscord | <xtrayambak> Is there a function in `std/times` that can turn an integer representing seconds into a string like "{} days, {} hours, {} minutes" or, in better words, take seconds, and turn them into days, take remaining seconds, turn them into hours, then minutes, and so on and so forth. |
12:17:14 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#ix=4IKd |
12:17:21 | FromDiscord | <nervecenter> (edit) |
12:18:58 | FromDiscord | <nervecenter> (edit) "https://play.nim-lang.org/#ix=4IKd" => "https://play.nim-lang.org/#ix=4IKf" |
12:20:25 | FromDiscord | <odexine> https://nim-lang.org/docs/times.html#%24%2CDuration |
12:20:45 | FromDiscord | <odexine> https://nim-lang.org/docs/times.html#initDuration%2Cint64%2Cint64%2Cint64%2Cint64%2Cint64%2Cint64%2Cint64%2Cint64 |
12:21:00 | FromDiscord | <odexine> so basically just make a Duration then echo it |
12:21:31 | FromDiscord | <xtrayambak> as you can see, the implementation I hacked is very much flawless https://media.discordapp.net/attachments/371759389889003532/1161639716471447574/image.png?ex=6539084a&is=6526934a&hm=09075ca4077797b90c050239a318df330ceaa817aeb6869c9fe429ddf0e62080& |
12:23:44 | FromDiscord | <xtrayambak> In reply to @odexine "https://nim-lang.org/docs/times.html#initDuration%2": This seems to work better than my flawless solution, indeed. |
12:23:58 | FromDiscord | <odexine> based hyprland user |
12:24:32 | FromDiscord | <xtrayambak> Yeah, I'm writing a Hyprland IPC wrapper too. I hope to get keybinds working later, because I got almost everything else working |
12:25:52 | FromDiscord | <odexine> ngl i just hack up some script using socat for that lol |
12:40:46 | * | beholders_eye joined #nim |
12:47:43 | * | derpydoo joined #nim |
12:57:29 | NimEventer | New thread by LokeX: Nim boilerplate, see https://forum.nim-lang.org/t/10545 |
13:15:06 | * | deadmarshal_ joined #nim |
13:49:00 | * | deadmarshal_ quit (Ping timeout: 240 seconds) |
13:53:12 | * | junaid_ joined #nim |
14:00:59 | * | junaid_ quit (Remote host closed the connection) |
14:03:19 | * | alphacentauri quit (Ping timeout: 255 seconds) |
14:17:04 | * | deadmarshal_ joined #nim |
14:21:44 | * | deadmarshal_ quit (Ping timeout: 245 seconds) |
14:28:38 | * | PMunch quit (Quit: Leaving) |
14:29:51 | * | om3ga joined #nim |
14:34:12 | * | om3ga quit (Ping timeout: 240 seconds) |
14:35:40 | * | rockcavera joined #nim |
14:48:18 | arkanoid | what is the correct way to get the available versions of a nimble package? |
14:49:00 | arkanoid | I see that versions displayed in nimble packages, tags displayed in github repo, and version declared in github nimble file do not agree each other |
14:56:37 | * | alphacentauri joined #nim |
15:10:25 | FromDiscord | <odexine> when the versions arent DRY |
15:10:36 | FromDiscord | <odexine> IIRC nimble treats tags as ground truth |
15:11:37 | arkanoid | just found --ver argument for nimble, it gets tags from github and prints them. Yet if I type in .nimble file a requirement tag with a version not listed in tags, it downloads and installs that |
15:20:18 | * | deadmarshal joined #nim |
15:57:30 | * | azimut joined #nim |
15:58:27 | arkanoid | sadly even with nim 2.0 my not-so-large project which compiles and runs fine, manages to fill computer memory and trigger OOM when running nimsuggests, no matter if lsp or directly via vscode extension |
16:00:17 | arkanoid | ps -ae | grep nimsuggest | wc -l --> 100 |
16:04:14 | * | cnx quit (Remote host closed the connection) |
16:04:33 | * | cnx joined #nim |
16:06:36 | * | deadmarshal quit (Ping timeout: 248 seconds) |
17:01:38 | * | deadmarshal_ joined #nim |
17:10:50 | FromDiscord | <Phil> I feel like GTK really doesn't like their own EditableLabel widget.↵It literally has no signal that gets thrown when somebody changes the label from editable to non-editable and vice versa, just wtf. |
17:47:33 | * | om3ga joined #nim |
18:22:41 | FromDiscord | <demotomohiro> How about to create an issue about it?↵https://gitlab.gnome.org/GNOME/gtk/-/issues |
18:32:34 | * | LuxuryMode joined #nim |
18:47:37 | FromDiscord | <StefanSalewski (StefanSalewski)> @demotomohiro No reason for an issue, GtkEditableLabel implements https://docs.gtk.org/gtk4/iface.Editable.html, and that has the "changed" signal. So for Gintro that was working out of the box, for ownkettle same casting may be necessary. |
18:47:38 | FromDiscord | <StefanSalewski (StefanSalewski)> @demotomohiro No reason for an issue, GtkEditableLabel implements https://docs.gtk.org/gtk4/iface.Editable.html, and that has the "changed" signal. So for Gintro that was working out of the box, for ownkettle same casting may be necessary. |
18:47:38 | FromDiscord | <StefanSalewski (StefanSalewski)> @demotomohiro No reason for an issue, GtkEditableLabel implements https://docs.gtk.org/gtk4/iface.Editable.html, and that has the "changed" signal. So for Gintro that was working out of the box, for ownkettle same casting may be necessary. |
18:47:54 | * | krux02 joined #nim |
18:48:42 | FromDiscord | <Phil> In reply to @StefanSalewski (StefanSalewski) "@demotomohiro No reason for": Please stop throwing out what I didn't mean.↵It implement changeable which triggers when the label text gets changed.↵It does not solely trigger when edited changes. |
18:48:52 | FromDiscord | <Phil> (edit) "what" => "statements about things that" |
18:49:03 | FromDiscord | <Phil> (edit) "changeable" => "changed" |
18:51:40 | FromDiscord | <Phil> It neither has an activated signal which almost every other entry widget has and I'm not entirely sure why there's no action either for pressing `esc` while the label text is in focus. |
18:52:31 | FromDiscord | <Phil> In reply to @demotomohiro "How about to create": As for this: Because the chance is quite high that this is a design philosophie issue and I just don't fully grasp how you're supposed to use that Widget as maybe I'm imagining using it in contextx where you shouldn't. |
18:52:58 | FromDiscord | <Phil> (edit) "focus." => "focus in order to abort a label-edit." |
18:53:04 | FromDiscord | <StefanSalewski (StefanSalewski)> Ah, you do want immediate updates when you type in text, not only when you press RETURN? I think I had the same issue years ago, I will see if I can remember. |
18:53:13 | FromDiscord | <yetiwizard> sent a code paste, see https://play.nim-lang.org/#ix=4IM6 |
18:53:21 | * | alphacentauri quit (Quit: WeeChat 4.0.5) |
18:53:28 | FromDiscord | <Phil> (edit) "contextx" => "contexts" |
18:53:32 | FromDiscord | <jviega> Use a template. |
18:54:38 | FromDiscord | <jviega> Eg, |
18:54:45 | FromDiscord | <jviega> sent a code paste, see https://play.nim-lang.org/#ix=4IM7 |
18:54:46 | * | alphacentauri joined #nim |
18:55:23 | FromDiscord | <jviega> 1001 ways you can structure it depending on what you want |
18:56:21 | FromDiscord | <Phil> In reply to @StefanSalewski (StefanSalewski) "Ah, you do want": Other way around.↵You can get immediate updates, but I would like to know when the user presses return while the editableLabel is in focus or escape, so I can call `gtk_editable_label_stop_editing`with either true (if the user pressed enter, to commit the edit) or false (if the user pressed esc, to not commit the edit) |
18:56:52 | FromDiscord | <Phil> (edit) "updates," => "updates aka you get a changed signal every keypress of the user while the editable label is in focus," |
18:57:37 | FromDiscord | <yetiwizard> sent a code paste, see https://play.nim-lang.org/#ix=4IM8 |
19:02:43 | FromDiscord | <StefanSalewski (StefanSalewski)> @phil Sorry, I don't know. I would suggest asking in the Gnome forum, as we have no plain GTK forum any more\: I had to ask there dozens of questions myself in the past, Mr Bassi and a few more people are really smart. See https://discourse.gnome.org. Bye. |
19:02:52 | * | beholders_eye quit (Ping timeout: 260 seconds) |
19:04:49 | * | beholders_eye joined #nim |
19:14:34 | FromDiscord | <demotomohiro> In reply to @yetiwizard "Is there a RAII": https://github.com/nim-lang/RFCs/issues/534↵`close()` will be automatically called in future Nim. |
19:15:05 | FromDiscord | <demotomohiro> And you can also use `defer`. |
19:16:44 | FromDiscord | <yetiwizard> Oh nice, good to know. Is using `defer` generally recommended, or is it bad practice? |
19:16:49 | FromDiscord | <Chronos [She/Her]> I wonder if it's worth me to have a go at porting the stdlib to work with newer features hm... |
19:18:00 | FromDiscord | <Chronos [She/Her]> Only issue I could see is cross-thread/dll boundary issues if you replace the current way `Stream`s work ig, if I could make it similarly without the verboseness tho, that'd be cool hm |
19:18:19 | FromDiscord | <Chronos [She/Her]> Well not verbose but not great |
19:18:39 | FromDiscord | <yetiwizard> sent a code paste, see https://play.nim-lang.org/#ix=4IMd |
19:20:17 | FromDiscord | <Chronos [She/Her]> In reply to @yetiwizard "Oh nice, good to": I mean, it'd depend on what you think |
19:20:44 | * | PMunch joined #nim |
19:20:51 | FromDiscord | <Chronos [She/Her]> Though I will safe a few years ago it was being considered for deprecation (also defer only works when it's not top-level) |
19:21:11 | FromDiscord | <Chronos [She/Her]> You may prefer to use that template or a try finally statement |
19:21:36 | FromDiscord | <yetiwizard> True, I feel like that's the best approach. Also add a check whether the file was even opened in there |
19:24:31 | FromDiscord | <demotomohiro> In reply to @yetiwizard "I'm having trouble reading": If you are using windows, you probably need to change codepage to unicode.↵iirc, it is `chcp 65001`. |
19:24:33 | FromDiscord | <StefanSalewski (StefanSalewski)> @Phil Maybe one idea is to try the "move-focus" signal of the parent class GtkWindow. You may try, I have no other ideas. |
19:25:15 | FromDiscord | <demotomohiro> In reply to @yetiwizard "I'm having trouble reading": Or is that not unicode? |
19:26:01 | FromDiscord | <yetiwizard> I'm trying to get this C# equivalent: `new string(System.Text.Encoding.Latin1.GetString(BinRead.ReadBytes(length)).Trim('\0'));` |
19:28:15 | FromDiscord | <michaelb.eth> In reply to @yetiwizard "I'm trying to get": what is the encoding of the binary file? |
19:29:17 | FromDiscord | <yetiwizard> ISO/IEC 8859-1 |
19:32:01 | FromDiscord | <demotomohiro> I don't know what that C# code do or about that encode, but you probably need to convert the string to utf8 encoding or change terminal setting so that ISO/IEC 8859-1 is print correctly. |
19:33:35 | FromDiscord | <yetiwizard> hm k, thanks anyways. I'll see what I can do about it |
19:47:27 | * | alphacentauri left #nim (WeeChat 4.0.5) |
19:48:59 | * | mio quit (Ping timeout: 255 seconds) |
19:49:54 | * | alphacentauri joined #nim |
19:56:27 | Amun-Ra | you can create simple array of 25 strings using https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Code_page_layout |
19:56:55 | Amun-Ra | 256* |
19:59:30 | NimEventer | New thread by MauriceLambert: Workaround to use multiples asynchronous sockets on Windows (to bypass OSError 10038 and 10055)., see https://forum.nim-lang.org/t/10546 |
20:01:20 | FromDiscord | <yetiwizard> In reply to @Amun-Ra "you can create simple": I suppose I can also consider this option if all else fails 😅 |
20:02:28 | Amun-Ra | :> |
20:53:41 | * | jmdaemon joined #nim |
21:12:04 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
21:17:23 | * | krux02 quit (Remote host closed the connection) |
21:19:28 | * | PMunch quit (Quit: leaving) |
21:48:19 | * | jmdaemon quit (Ping timeout: 264 seconds) |
21:56:46 | * | jmdaemon joined #nim |
22:02:13 | * | advesperacit quit () |
22:56:06 | * | jmdaemon quit (Ping timeout: 260 seconds) |
23:02:46 | FromDiscord | <Chronos [She/Her]> Wonder why methods don't do what streams have to do anyway for proc calling |
23:03:19 | FromDiscord | <Chronos [She/Her]> Streams store a proc in the actual object itself, idk how methods work but is there a reason methods don't do this? |
23:05:14 | FromDiscord | <Elegantbeef> It increases the object size and also duplicates procedures |
23:05:22 | FromDiscord | <Elegantbeef> A centralised vtable like C++ makes more sense |
23:17:39 | * | NimBot joined #nim |
23:57:48 | FromDiscord | <demotomohiro> I guess, most of people don't create 100+ Streams so having procs and increasing the object size doesn't cause much problems. |