00:26:43 | FromDiscord | <pptx704> sent a code paste, see https://play.nim-lang.org/#ix=html> |
00:44:00 | * | Guest66 joined #nim |
01:19:02 | * | azimut joined #nim |
01:21:51 | * | Guest66 quit (Quit: Client closed) |
01:25:26 | * | azimut quit (Remote host closed the connection) |
01:25:45 | * | azimut joined #nim |
02:12:00 | * | derpydoo quit (Quit: derpydoo) |
02:14:49 | * | derpydoo joined #nim |
03:03:37 | * | Batzy quit (Ping timeout: 260 seconds) |
03:18:44 | FromDiscord | <janakali> @pptx704 this one is weird, I've tried it on android. And in my case it can't find 'TimeoutError' exception. I had to import `std/net` for it to work properly..↵↵Also, only synchronous httpclient supports timeouts: https://nim-lang.org/docs/httpclient.html#timeouts |
03:21:59 | FromDiscord | <Prestige> I'm trying to create a symlink of a directory, but it always ends up showing as a file instead. I assume this is because `createSymlink` isn't recursive/doesn't support dirs? Do I just need to create my own recursive function to symlink everything? |
03:23:12 | FromDiscord | <Elegantbeef> If you want to sym link a directory why would you need to recurse it? |
03:24:21 | FromDiscord | <Prestige> Because `createSymlink` doesn't seem to work with directories |
03:24:59 | FromDiscord | <Elegantbeef> Right, but sym linking files assumes you never create any new files |
03:25:17 | FromDiscord | <Elegantbeef> So the fix is to sym link the directory by either fixing or implementing your own `createSymLink` |
03:26:10 | FromDiscord | <Prestige> Right that's what I'm talking about doing, I assume I'd have to recreate the directory structure recursively and symlink each individual file |
03:26:22 | FromDiscord | <Prestige> I was wondering/hoping something like this already exists |
03:26:41 | FromDiscord | <Elegantbeef> That sounds like a lot of work when you just want to create a directory symlink |
03:26:58 | FromDiscord | <Prestige> I'm not aware of any alternatives |
03:27:08 | FromDiscord | <Prestige> I believe what I described is how `cp -rs` works |
03:27:11 | FromDiscord | <Elegantbeef> Make a symlink proc that links a directory to a directory |
03:28:00 | FromDiscord | <Prestige> What would that function do, though? |
03:28:27 | FromDiscord | <Elegantbeef> Properly call the underlying OS proc that does the symlinking |
03:30:03 | FromDiscord | <Elegantbeef> I just tested and on my system it creates a symlinked directory |
03:30:43 | FromDiscord | <Prestige> fg |
03:30:55 | FromDiscord | <Prestige> Can you reference any files within that directory though |
03:31:02 | FromDiscord | <Prestige> like within code |
03:31:58 | FromDiscord | <Elegantbeef> Yes |
03:32:31 | FromDiscord | <Prestige> What arguments are you providing? Mine says the symlink is broken |
03:33:01 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1189048190801027073/image.png?ex=659cbe6c&is=658a496c&hm=a6644b69057f1c6739eb730be1915e4481d1f137a6493753652ac3dcfd40d9e2& |
03:33:14 | FromDiscord | <Prestige> hm an absolute path, I'll try that |
03:34:19 | FromDiscord | <Prestige> Okay absolute paths work, that's good to know...I wonder if I can get relative paths working |
03:34:58 | FromDiscord | <odexine> Relative paths are likely relative to the current working directory |
03:37:48 | FromDiscord | <Elegantbeef> Thought I'd try for fun to make bindings for nimib using a lisp language and now here I am trying to figure out how to properly set a dynamic library's variables |
03:38:20 | FromDiscord | <Elegantbeef> Languages really make this harder than they need to! |
03:46:55 | * | azimut quit (Ping timeout: 240 seconds) |
03:58:20 | FromDiscord | <pptx704> In reply to @janakali "<@695204658192449537> this one is": Yeah I used synchronous ones. I am not sure why it cannot catch the error. |
03:58:52 | FromDiscord | <pptx704> Also, is there any way to understand the number of available file descriptors in Nim? |
03:58:59 | FromDiscord | <pptx704> sent a code paste, see https://play.nim-lang.org/#ix=html> |
03:59:31 | FromDiscord | <pptx704> Getting this error, but when I checked `cat /proc/sys/fs/file-max`, it is technically infinity |
04:00:54 | FromDiscord | <leorize> FD limit is separated at multiple layers |
04:01:04 | FromDiscord | <leorize> the layer that you will hit the earliest is rlimit |
04:01:19 | FromDiscord | <leorize> see `ulimit -n` |
04:01:29 | FromDiscord | <pptx704> 1024 it seems |
04:02:14 | FromDiscord | <leorize> if you want to get and/or set this number in the program, see\: https://www.man7.org/linux/man-pages/man2/getrlimit.2.html |
04:08:43 | * | azimut joined #nim |
04:24:57 | FromDiscord | <pptx704> I see. Is this number, per-thread/per-process, or the total? |
04:25:04 | * | azimut quit (Remote host closed the connection) |
04:25:28 | * | azimut joined #nim |
04:39:43 | * | azimut quit (Ping timeout: 240 seconds) |
05:24:51 | FromDiscord | <leorize> see the notes section on the same page |
08:32:43 | * | derpydoo quit (Ping timeout: 256 seconds) |
09:20:06 | * | koltrast joined #nim |
09:35:29 | * | xet7 joined #nim |
09:52:32 | * | xet7 quit (Remote host closed the connection) |
09:56:42 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
09:57:07 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
09:58:48 | FromDiscord | <Elegantbeef> Have to go annotate it with `{.raises: [].}` thoughI do not get where an exception could be raised due to this code |
09:58:51 | FromDiscord | <Phil> I mean I get that isolating "msg" appears to be problematic but I don't get why.↵It's not a ref-type, it should be easily isolateable , I'm already catching Exception against my better judgement because logging forces me to |
09:59:04 | FromDiscord | <Elegantbeef> Did you read the warning |
09:59:16 | FromDiscord | <Elegantbeef> It's unrelated to isolated and just a `=destroy` error that can have exceptions |
10:01:46 | FromDiscord | <Phil> Hmm.↵What exactly are you suggesting to annotate with raises: [] ?↵On the procs it doesn't change anything and I don't think I've ever seen that used any other way |
10:02:04 | FromDiscord | <Elegantbeef> `isolated`'s destroy |
10:02:08 | FromDiscord | <Elegantbeef> Or your destroy |
10:03:34 | FromDiscord | <Phil> I don't have a custom destroy here, the code above doesn't show one and is enough to trigger the issue.↵So essentially change the source code of isolation.nim? |
10:04:06 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:04:28 | FromDiscord | <Elegantbeef> Right cause it's telling you the `=destroy` for `dest.value` might raise |
10:04:52 | FromDiscord | <Phil> Yeah but that should cause compiler errors I thought ... hmm |
10:05:04 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-2-0/lib/system.nim#L370-L377 |
10:05:09 | FromDiscord | <Elegantbeef> Nope |
10:05:33 | FromDiscord | <Elegantbeef> Atleast not in this wacky world apparently 😄 |
10:05:47 | FromDiscord | <Elegantbeef> All of these `=destroys` should be marked `=destroy` |
10:05:55 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:06:32 | FromDiscord | <Phil> This is several layers of unholy but it does the job.↵Now to figure out how to actually get a "clean" solution going because catch-and-log seems inappropriate here |
10:07:07 | FromDiscord | <Elegantbeef> I mean if your destructor raises an exception you're in a pretty bad place and should fatally crash |
10:07:16 | FromDiscord | <Elegantbeef> Returning resources almost never should fail 😄 |
10:07:41 | FromDiscord | <Phil> I agree, but then I don't want a warning about it since this is the wrong place to look at then imo |
10:07:54 | FromDiscord | <Phil> Or rather I don't want to spam my user's logs with warnings about it |
10:08:01 | FromDiscord | <Phil> or rather their terminal, not logs |
10:08:23 | FromDiscord | <Phil> For this to go wrong you'd need to have done something horribly wrong somewhere else |
10:10:34 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/1324d2e04cb11aaa96e9ba9efc69aee47ed6c1d8/lib/system.nim#L369-L376 ah yea these are the culprit |
10:10:36 | FromDiscord | <Elegantbeef> Generic procedures not marked `raises:[]` |
10:10:38 | FromDiscord | <Phil (he/him)> So would this be as simple as adding the pragma and making a PR for 2 loc's? |
10:10:40 | FromDiscord | <Phil (he/him)> And yes I jumped over to matrix because I suspected the bridge was going through a struggle sesssion again |
10:11:53 | FromDiscord | <Elegantbeef> Maybe? I tried to reproduce the warning but cannot |
10:12:15 | FromDiscord | <Elegantbeef> Well tried outside of `=destroy` |
10:13:20 | FromDiscord | <Phil (he/him)> Huh, these may have seen some changes since 2.0 |
10:13:33 | FromDiscord | <Phil (he/him)> Looking at them on my local system.nim and that one does look a tad different |
10:13:40 | FromDiscord | <Elegantbeef> They still do not have `{.raises:[].}` annotated |
10:13:44 | FromDiscord | <Elegantbeef> And yea they have changed a bit |
10:14:09 | FromDiscord | <Elegantbeef> Though `A =destroy is implicitly annotated with .raises: []` |
10:14:10 | FromDiscord | <Phil (he/him)> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:14:28 | FromDiscord | <Elegantbeef> Oh I linked 2.0... dumb of me |
10:14:56 | FromDiscord | <Phil (he/him)> I mean, I use 2.0 so still valid |
10:21:54 | FromDiscord | <Phil> Its explicitly object variants that mess it up |
10:22:00 | FromDiscord | <Phil> sending e.g. "string" is unproblematic |
10:22:54 | FromDiscord | <Phil> Nevermind, its objects too |
10:24:05 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:41:47 | FromDiscord | <Phil (he/him)> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:47:10 | * | azimut joined #nim |
11:01:41 | NimEventer | New thread by JiyaHana: How to use two operating systems in one laptop?, see https://forum.nim-lang.org/t/10804 |
11:06:33 | FromDiscord | <odexine> ? How is this related to Nim LMAO |
11:10:33 | FromDiscord | <nnsee> wtf lol |
11:50:15 | FromDiscord | <cephonaltera> based unapologetic tech support requester |
12:52:02 | * | jmdaemon quit (Ping timeout: 252 seconds) |
13:00:49 | * | junaid_ joined #nim |
14:04:35 | * | derpydoo joined #nim |
14:19:55 | NimEventer | New thread by Isofruit: ThreadButler - Multithreading with long-running threads that act as "servers", see https://forum.nim-lang.org/t/10805 |
14:26:53 | * | derpydoo quit (Ping timeout: 256 seconds) |
14:47:53 | * | derpydoo joined #nim |
14:54:31 | * | azimut quit (Ping timeout: 240 seconds) |
14:58:05 | * | junaid_ quit (Remote host closed the connection) |
15:05:28 | FromDiscord | <nnsee> In reply to @NimEventer "New thread by Isofruit:": @Phil [this example] link's broken |
15:15:09 | FromDiscord | <tauruuuuuus> using std/parseopt in a nims file is a small nightmare x_x |
15:17:20 | * | om3ga joined #nim |
15:23:50 | * | azimut joined #nim |
15:27:58 | * | azimut quit (Remote host closed the connection) |
15:28:19 | * | azimut joined #nim |
15:29:56 | FromDiscord | <Phil> In reply to @nnsee "<@180601887916163073> [this example] link's": Which exactly? |
15:31:45 | FromDiscord | <nnsee> In reply to @isofruit "Which exactly?": literally ctrl-f `[this example]` |
15:41:14 | FromDiscord | <Chronos [She/Her]> In reply to @tauruuuuuus "using std/parseopt in a": Oh? Why? |
15:55:38 | FromDiscord | <tauruuuuuus> You cannot use the default parseOpt cmdline arg, because either if you run with `nim` or a shebang, everything single part of the nim/shebang command will pe passed inside the parser |
15:56:37 | FromDiscord | <tauruuuuuus> So you parse manually with paramCount/Str...but then you also have to be careful that, if the user does not pass any flag/option/args, you do not have to pass an empty string in, otherwise it's all over again |
17:27:05 | FromDiscord | <Phil> In reply to @nnsee "literally ctrl-f `[this example]`": Oh, between the 10 hyperlinks I messed that one up, fixed it |
17:32:31 | FromDiscord | <inv2004> @hugogranstrom Hi. I am sorry, disappereared for some time after askind about fragmented table.↵↵And now I came here to ask again 🙂 |
17:32:45 | FromDiscord | <inv2004> (edit) "table.↵↵And" => "table in nimiSlides↵↵And" |
17:33:03 | FromDiscord | <inv2004> (edit) "came" => "am" | "amhere to ask again ... 🙂" added "about it" |
17:35:18 | FromDiscord | <inv2004> ... Just found |
17:55:24 | NimEventer | New thread by Ward: Strange Behavior About Nim 2.0 Destructor, see https://forum.nim-lang.org/t/10807 |
17:55:28 | FromDiscord | <Phil> Just found what? |
18:04:59 | FromDiscord | <Chronos [She/Her]> In reply to @tauruuuuuus "You cannot use the": Ah |
19:21:02 | * | derpydoo quit (Ping timeout: 256 seconds) |
19:48:39 | FromDiscord | <redmechanics> how can i covert an integer to a byte ? |
19:55:08 | FromDiscord | <inventormatt> you can call byte on your integer |
20:02:44 | FromDiscord | <hugogranstrom> In reply to @inv2004 "... Just found": Just found what? |
20:02:58 | FromDiscord | <griffith1deadly> In reply to @redmechanics "how can i covert": byte(integer) |
20:03:52 | FromDiscord | <nnsee> In reply to @hugogranstrom "Just found what?": it |
20:08:50 | FromDiscord | <hugogranstrom> In reply to @nnsee "it": Ah, just found my old answer |
20:47:17 | FromDiscord | <Elegantbeef> @hugogranstrom do you know where nimib annotates rendered codeblocks with the `nim` annotation? |
20:48:21 | FromDiscord | <Elegantbeef> It was like 3am last night but I could not find it myself 😄 |
20:48:51 | FromDiscord | <Elegantbeef> Ah lol, just found it |
20:50:46 | FromDiscord | <nnsee> Just found what? |
20:51:28 | * | xet7 joined #nim |
20:51:28 | FromDiscord | <Elegantbeef> Where nimib annotates the code as nim for the html backend |
20:52:28 | FromDiscord | <nnsee> it was a... never mind |
20:52:52 | FromDiscord | <Elegantbeef> Even I do not make jokes that shitty |
20:54:47 | FromDiscord | <nnsee> ouch, that one hurt |
20:59:19 | FromDiscord | <hugogranstrom> In reply to @Elegantbeef "<@454991120028663809> do you know": We do it manually (as I think you found) but we also have highlight.js activated so it's not impossible that it could have a tiny part to play as well in the end result |
20:59:59 | FromDiscord | <Elegantbeef> Well it annotates the block from the partials which means `NbBlock` likely needs a `language` field to do `replace("$lang", lang)` |
21:29:57 | * | deadmarshal_ quit (Ping timeout: 268 seconds) |
21:33:08 | FromDiscord | <hugogranstrom> I think I'm confusing two different kinds of code blocks here now. `nbCode` and friends use the partials but markdown code blocks in `nbText` uses highlight.js |
21:34:51 | FromDiscord | <Elegantbeef> Yea I was wrong it's not as simple as I thought since the nim blocks are annotated "nohighlight" |
21:36:27 | FromDiscord | <Elegantbeef> Well I guess I could just replace that whole string.... |
21:36:44 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1189320917713690736/image.png?ex=659dbc6b&is=658b476b&hm=450bc9ffe2173394d51d058a6560db8a06d9a148156977ba0ee7df994565b7f5& |
21:36:45 | FromDiscord | <Elegantbeef> Ehhh |
21:39:10 | FromDiscord | <Elegantbeef> https://hatebin.com/mcqwyqqyrt boy is it ugly though |
21:49:04 | * | jmdaemon joined #nim |
21:51:37 | FromDiscord | <hugogranstrom> The "solution" is to create a new block with a new partial for general code (don't know if it already exists in some form already). `nbCode` is specifically for Nim code and you should ideally not use it for other languages. Ideally we should have a generic code block that the nbCode modifies though |
21:52:06 | FromDiscord | <Elegantbeef> Ah `nbCode` is badly named then 😄 |
21:52:52 | FromDiscord | <hugogranstrom> I mean, nimib was primarily only aimed at nim code from the beginning 😉 |
21:54:01 | * | deadmarshal_ joined #nim |
21:54:40 | FromDiscord | <Elegantbeef> Well I guess my PR is too hacky and I need to change it more |
21:55:35 | FromDiscord | <hugogranstrom> Yeah, if you used the block context instead it would be less hacky though |
21:56:05 | FromDiscord | <hugogranstrom> So like `blk.context["lang"] = "C"` |
21:57:10 | FromDiscord | <hugogranstrom> And in the end that might be something we want to use in a generic code block |
21:58:14 | FromDiscord | <hugogranstrom> And then we can do conditional stuff in the templates as well that `nohighlight` is only added if `lang` is empty (default). |
21:59:35 | FromDiscord | <Elegantbeef> Uh huh conditional templating... that's something I totally know how to do with this stuff 😄 |
21:59:54 | FromDiscord | <Elegantbeef> This is where I say the shitty joke of "Oh you look like you know what you're doing why don't you handle this" |
22:03:04 | FromDiscord | <hugogranstrom> Hehe yeah it sounds more complex than it really is but I understand that diving into mustache templates is not something you want to do if you absolutely aren't forced to. |
22:03:38 | FromDiscord | <hugogranstrom> Let's make a deal then, open an issue in nimib about this so we don't forget it 🙈😂 |
22:04:10 | FromDiscord | <Phil> mustache templates? Oh lord |
22:06:24 | FromDiscord | <hugogranstrom> You're familiar with them? |
22:06:57 | FromDiscord | <Elegantbeef> I've spent all my template points in Nim templates, not string templates! |
22:06:58 | FromDiscord | <Phil> We use them at work to generate rather elaborate elasticsearch templates |
22:07:18 | FromDiscord | <Phil> Did I mention that the query language for elasticsearch is the worst query language I've ever seen? |
22:07:40 | FromDiscord | <hugogranstrom> In reply to @Elegantbeef "I've spent all my": Sounds like a wise decision! |
22:08:02 | FromDiscord | <Elegantbeef> Anyway issue is made, so uhh be merry or something |
22:08:39 | FromDiscord | <hugogranstrom> In reply to @isofruit "Did I mention that": Oh, then you know the pains of it 😅 never seen the elasticsearch query language and I'm not tempted to find out after that introduction either 😵💫 |
22:09:13 | FromDiscord | <Phil> In reply to @hugogranstrom "Oh, then you know": Luckily they're providing an SQL frontend recently so you can write SQL instead, which hoh boy is that an upgrade |
22:09:57 | FromDiscord | <hugogranstrom> In reply to @Elegantbeef "Anyway issue is made,": Awesome! We'll see when we get at this, but in the meantime if you want to get something working, create a new block (mostly copy-paste the nbBlock stuff) |
22:10:22 | FromDiscord | <hugogranstrom> In reply to @isofruit "Luckily they're providing an": Definitely sounds like an upgrade! |
22:11:17 | FromDiscord | <Phil> In reply to @hugogranstrom "Oh, then you know": Elasticsearch is basically super valuable if you need searchability through some seriously complex criteria that should enable scoring.↵Like matching by hobbies in a weighted way where mismatches shouldn't be hard exclusion criteria, just make your score worse and if you're still the best match after that you're still top of the list |
22:11:30 | FromDiscord | <Phil> (edit) "should enable" => "requires" |
22:12:43 | FromDiscord | <Elegantbeef> Got any references?↵(@hugogranstrom) |
22:14:21 | FromDiscord | <hugogranstrom> In reply to @isofruit "Elasticsearch is basically super": Sounds very powerful |
22:14:33 | FromDiscord | <Elegantbeef> Or is it just as simple as making a `NdBlock` and adding to it's context |
22:15:16 | FromDiscord | <hugogranstrom> Look at the definition of the `nbCode` template in `nimib/nimib.nim` |
22:15:56 | FromDiscord | <hugogranstrom> Then look at the partial (template) that is defined in some proc somewhere 🙈 |
22:16:40 | FromDiscord | <hugogranstrom> But yes, essentially you make a NbBlock and add to it's context |
22:21:03 | FromDiscord | <Elegantbeef> Ah I think I understand how this templating works! |
22:21:06 | FromDiscord | <Elegantbeef> Let's see how fast that disappears |
22:22:19 | FromDiscord | <hugogranstrom> Nice, haha let's hope it lasts the entire night because I'm going to bed now 😴 |
22:23:22 | FromDiscord | <hugogranstrom> Your new block will need a new name, and that name will be the key for the partial and renderProcs/renderPlan (if you stumble upon them? |
22:23:39 | FromDiscord | <hugogranstrom> (edit) "them?" => "them)" |
22:37:01 | FromDiscord | <Elegantbeef> Yea that works nicely |
22:37:29 | FromDiscord | <Elegantbeef> Also if `language` is nil `hljs` guesses the language so I guess it's a win |
22:47:16 | FromDiscord | <Phil> Naming things my mortal enemy |
22:56:55 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:57:05 | FromDiscord | <Phil> (edit) |
23:01:03 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#ix=html> |
23:07:12 | FromDiscord | <Elegantbeef> The macro likely mutates `command` blocks |
23:15:42 | FromDiscord | <user2m> hmm ok I'll have a look at the source |
23:46:31 | * | azimut quit (Ping timeout: 240 seconds) |