00:20:32 | * | azimut quit (Ping timeout: 240 seconds) |
00:26:53 | * | derpydoo joined #nim |
00:45:51 | * | oldpcuser quit (Ping timeout: 256 seconds) |
00:46:13 | * | oldpcuser joined #nim |
00:47:27 | FromDiscord | <Graveflo> Didn't someone mention a while back that there a is bug in the forums that can lock you out of your account? cuz I can't log in xd |
02:06:46 | * | krux02_ quit (Remote host closed the connection) |
02:22:19 | * | oldpcuser quit (Quit: "mIRC is sh1t because is non-free software. doesn't respect my chatting freedom!" Richard Stallman) |
02:30:36 | * | oldpcuser joined #nim |
02:35:13 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix=4xJd |
02:35:39 | FromDiscord | <Elegantbeef> try finally exists |
02:35:47 | FromDiscord | <etra> (edit) "https://play.nim-lang.org/#ix=4xJd" => "https://play.nim-lang.org/#ix=4xJe" |
02:36:50 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xJf |
02:37:07 | FromDiscord | <Graveflo> and i have this too but it doesn't work: |
02:37:19 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xJg |
02:40:52 | FromDiscord | <etra> hey, beef, since you're here, early I was dealing with this: https://discord.com/channels/371759389889003530/371759389889003532/1116091536157970573↵and later solved it with https://discord.com/channels/371759389889003530/371759389889003532/1116107426081550436, is it too shitty of a solution? |
02:41:01 | FromDiscord | <etra> for some reason, winim has `HANDLE` as int... |
02:42:29 | FromDiscord | <Elegantbeef> I mean it seems HANDLE is supposed to be a pointer to void |
02:43:17 | FromDiscord | <Elegantbeef> So the correct thing to do would be to fork or PR Handle to be `type Handle {.byRef.} = object` or `type Handle = ptr object` I guess |
02:43:46 | FromDiscord | <Elegantbeef> It's just an opaque pointer |
02:43:47 | FromDiscord | <etra> yeah, but I'm unsure I should do a PR to winim, and I'm trusting my dependency's import of `windows.h` lol |
02:44:45 | FromDiscord | <Elegantbeef> I mean you should atleast make an issue |
02:48:24 | FromDiscord | <Elegantbeef> From what I can tell `Handle` should be an opaque pointer. I dont know C well but `typedef PVoid Handle` is not `Handle = int` 😄 |
02:49:16 | FromDiscord | <etra> yeah, it seems like a major oversight |
02:54:45 | FromDiscord | <Elegantbeef> Do make an issue a the very least though |
03:09:24 | * | oldpcuser quit (Quit: "mIRC sucks because is non-free software" Richard Stallman) |
03:22:57 | * | disso-peach joined #nim |
04:13:26 | * | oldpcuser joined #nim |
04:23:28 | * | oldpcuser quit (Remote host closed the connection) |
04:59:44 | * | oldpcuser joined #nim |
05:14:38 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xJu |
05:15:11 | FromDiscord | <Elegantbeef> Why dont you just use your own iterator |
05:16:09 | FromDiscord | <Elegantbeef> `for key, value in vt.config.pairs` or `for key, value in vt.pairs` makes much more sense than using template for an iterator |
05:16:15 | FromDiscord | <Graveflo> actually that would make sense here. I also screwed up the generic form again. The reason I didn't want to do that is because iteration used to be generic because `VCTTableRef` used to not be concrete. Custom iterator is better here yea |
05:16:39 | FromDiscord | <Graveflo> still tho say I was as it were before where it is generic. Why do I have to do weird stuff to bind in deps sometimes? |
05:17:09 | FromDiscord | <Elegantbeef> templates are not procedures they have even odder binding rules |
05:17:16 | * | oldpcuser quit (Remote host closed the connection) |
05:17:44 | FromDiscord | <Graveflo> I noticed... Ok I guess for now the rules is just "they're odd"... I swear I'm going to track down the actual mechanics of this crap one day |
05:43:00 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xJz |
05:43:09 | * | oldpcuser joined #nim |
05:46:32 | FromDiscord | <Elegantbeef> What's even the point of `S(v)`? |
05:47:13 | FromDiscord | <Graveflo> your right. I just got it to work with `VideoColorTable[T](v)` and the compiler agrees with you... the problem is it's not binding to the correct generic for that concrete type. So different error then I though |
05:48:43 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xJA |
05:51:19 | FromDiscord | <Graveflo> also I don't like the dupe loop too much and ignore that weird character concat at the end 😅 |
05:52:43 | FromDiscord | <Graveflo> ok `pairs` needed to be public I guess |
05:54:58 | FromDiscord | <demotomohiro> You can write `&"{header}.{key}\n"` instead of `fmt"..." + '\n'`. |
05:55:31 | FromDiscord | <Graveflo> unfortunately not in `fmt` string I believe. I forgot just now too and tried it. |
05:56:06 | FromDiscord | <Graveflo> oh you use `&` |
05:57:10 | FromDiscord | <demotomohiro> Check: https://nim-lang.org/docs/strformat.html#nimfmt-vsdot-nimamp |
05:58:17 | FromDiscord | <Elegantbeef> no it doesnt need to be public |
05:58:22 | FromDiscord | <Elegantbeef> you just need to do `v.pairs` |
05:59:38 | FromDiscord | <Graveflo> no symbols that are not going to be in scope for client code have to be mentioned in the place of origin to get bound correctly? in general |
06:00:11 | FromDiscord | <Graveflo> (edit) "no" => "so" |
06:04:04 | FromDiscord | <Elegantbeef> Implicit iterators are broken |
06:04:05 | FromDiscord | <Elegantbeef> You have to use them explicitly in a generic otherwise they do not bind |
06:04:30 | FromDiscord | <Graveflo> noted thx guys |
06:05:41 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4xJF |
06:06:22 | FromDiscord | <ringabout> I debugged a bit, it seems that it loses the type info of a, b; namely openArray in VM. |
06:06:33 | FromDiscord | <ringabout> (edit) "VM." => "move2." |
06:07:29 | FromDiscord | <Elegantbeef> Given it's the NimVm this should be a relatively easy operation, quite odd that it errors |
06:08:40 | FromDiscord | <ringabout> Well, it should have of `nkTupleConstr`(# refer to `of opcSlice`) type, but instead it becomes `nkStrLit`. |
06:08:46 | FromDiscord | <ringabout> (edit) removed "of" |
06:09:37 | FromDiscord | <ringabout> Indeed. |
06:09:50 | * | ntat joined #nim |
06:11:42 | FromDiscord | <arnetheduck> @ringabout in the category of version-2-0 failures, here's another one that works on devel and everywhere else, but not 2.0: https://github.com/status-im/nim-stew/pull/134 |
06:12:28 | FromDiscord | <arnetheduck> it's actually not the code in the PR that fails, but rather some other stuff I think |
06:12:36 | FromDiscord | <arnetheduck> ie unrelated regression |
06:13:22 | * | rockcavera quit (Remote host closed the connection) |
06:13:34 | FromDiscord | <ringabout> Well, I guess version-2-0 might reset to devel. Not many commits to bisect anyway. |
06:17:35 | FromDiscord | <ringabout> In reply to @arnetheduck "<@658563905425244160> in the category": Isn't it the regression you reported? |
06:18:14 | FromDiscord | <arnetheduck> I did? 🙂 not sure |
06:19:25 | FromDiscord | <arnetheduck> ah, actually yeah, it might have been - I got confused by the test output |
06:19:36 | FromDiscord | <arnetheduck> and yeah, it might actually be the code in the PR after all |
06:20:14 | FromDiscord | <ringabout> Probably this one https://github.com/nim-lang/Nim/issues/21840 |
06:24:26 | FromDiscord | <arnetheduck> right, thanks for checking, I had forgotten about it tbh.. that said, we'll be merging that PR soon which would mean that both your and our v2.0 tests will be red |
06:25:59 | FromDiscord | <ringabout> In reply to @arnetheduck "right, thanks for checking,": I have no idea of 2.0 policy, you might discuss it with miran. |
06:43:15 | * | PMunch joined #nim |
06:46:25 | * | azimut joined #nim |
06:51:07 | PMunch | voidwalker, glad my Futhark wrapper helped you :) As you can see wrapping stuff isn't all that hard :) |
07:10:41 | * | junaid_ joined #nim |
07:13:07 | FromDiscord | <Chronos [She/Her]> In reply to @demotomohiro "You can write `&"{header}.{key}\n"`": Could do `"{header}.{key}\n".fmt` which I really like lol |
07:16:14 | FromDiscord | <Graveflo> yea that does work |
07:18:24 | FromDiscord | <pmunch> Hmm, is the IRC bridge broken? |
07:18:36 | PMunch | It doesn't seem like my messages make it through.. |
07:18:46 | PMunch | Strange, now it worked |
07:18:50 | NimEventer | New post on r/nim by thindil: Nimalyzer, a static code analyzer for Nim (early alpha)., see https://reddit.com/r/nim/comments/14429rh/nimalyzer_a_static_code_analyzer_for_nim_early/ |
07:19:00 | PMunch | But my message to voidwalker about Futhark got lost :( |
07:19:18 | FromDiscord | <Elegantbeef> Oh there's pmunch 😄 |
07:19:34 | PMunch | Uh oh |
07:19:38 | PMunch | It's an ambush! |
07:19:40 | FromDiscord | <Elegantbeef> So in response of your "Doesnt that mean your language needs a compiler" |
07:19:47 | FromDiscord | <Elegantbeef> You mean just like x86? 😄 |
07:19:56 | PMunch | Huh? |
07:20:05 | FromDiscord | <Elegantbeef> All modern system languages atleast can create a wasm file |
07:20:06 | PMunch | Oh is this about the webassembly stuff? |
07:20:16 | FromDiscord | <Elegantbeef> Yea |
07:20:24 | PMunch | Right, well that's a fair point |
07:20:50 | PMunch | I was just vary that I might exclude popular languages like Python by going that route |
07:21:05 | FromDiscord | <Elegantbeef> Sure but you also exclude python with a dynamic library |
07:21:08 | PMunch | Or even just less popular ones, but which still have the ability to create dynamic libraries |
07:21:30 | PMunch | Not really, you can use the Python embedded interpreter to write a Python loader dynamic library |
07:22:04 | FromDiscord | <Elegantbeef> You can do the same with the aforementioned python wasm runtime |
07:22:39 | PMunch | Right |
07:23:56 | FromDiscord | <Chronos [She/Her]> (Pyodide or even CPython via Emscripten) |
07:24:09 | FromDiscord | <Chronos [She/Her]> (Or MicroPython (subset) or RustPython (Rust impl) |
07:24:21 | FromDiscord | <Chronos [She/Her]> (edit) "impl)" => "impl))" |
07:24:36 | FromDiscord | <Elegantbeef> depending on what this is for of course there is also the benefit wasm is compile once deploy everywhere |
07:24:53 | FromDiscord | <Elegantbeef> So if there's ever a desire to share plugins with others it's just better |
07:25:57 | FromDiscord | <Chronos [She/Her]> Yeah, all you need is a WASM runtime, which if it's for your application, then you'd compile one in too |
07:28:28 | PMunch | So what's the recommended way to integrate Wasm into a Nim application at the moment? |
07:30:16 | FromDiscord | <Elegantbeef> I personally use wasm3 |
07:30:32 | FromDiscord | <Elegantbeef> A nice C library that's MIT licensed so extremely easy to include |
07:32:20 | PMunch | Oh nice |
07:33:21 | FromDiscord | <Elegantbeef> You can use any runtime you want of course assuming you write bindings for it, there are some JIT'd ones if that's something you care about |
07:33:28 | FromDiscord | <Elegantbeef> Wasm3 is a very basic VM |
07:33:58 | * | advesperacit joined #nim |
07:35:48 | FromDiscord | <Elegantbeef> It also does something I appreciate a lot, it returns cstrings for errors/messages |
07:36:33 | FromDiscord | <Elegantbeef> Wasmer/Wasmtime had much more complicated error messages. Wasmer used Rust results practically as did Wasmtime I think |
08:20:08 | * | azimut quit (Ping timeout: 240 seconds) |
08:21:28 | * | azimut joined #nim |
08:36:32 | * | derpydoo quit (Ping timeout: 246 seconds) |
08:56:24 | PMunch | New article out! This one is more of a guide https://peterme.net/setting-up-a-nim-server-for-dummies.html |
08:56:40 | PMunch | And please, if you have anything I should add let me know |
09:07:13 | FromDiscord | <leetnewb> In reply to @PMunch "And please, if you": I know dns isn't really the point, but it is mysterious to enough people that it might be worth explaining what A and AAAA records do |
09:08:13 | PMunch | Hmm, fair point |
09:09:37 | PMunch | I originally just wrote this as I went when setting up a server. And then I filled in some more instructions and explanations before I posted it |
09:12:19 | FromDiscord | <leetnewb> I like including the unit file. That can be a little painful to search out. |
09:16:23 | FromDiscord | <spacestella> hello, i need the equivalent of `#define macro() // code` in nim. i have tried macros, templates, quote and `quote do`, but none have worked and the compiler just throws a thousand meaningless errors saying it expect type A but got type A instead. is there any way i can just instruct the compiler to replace every said macro call straight up with the text inside the macro? |
09:17:09 | PMunch | spacestella, that is what a template does |
09:17:19 | PMunch | If you get type errors it's likely because your types are incorrect |
09:17:31 | PMunch | Could you show us an example of what you're doing? |
09:18:11 | FromDiscord | <spacestella> sent a code paste, see https://play.nim-lang.org/#ix=4xK7 |
09:18:13 | FromDiscord | <spacestella> here's a simplified version of my code |
09:18:13 | PMunch | leetnewb, yeah for servers I really like running it as a service. So much less stress to know that it just restarts with the server and restarts if it ever crashes |
09:18:37 | FromDiscord | <spacestella> if i just replace the content inside of the quote do in the macro with the declaration, there are no errors. |
09:18:38 | FromDiscord | <Graveflo> return `untyped` |
09:19:00 | PMunch | Oh and you need to add `{.inject.}` to those variables |
09:19:48 | FromDiscord | <spacestella> In reply to @PMunch "Oh and you need": to each of the variables? |
09:19:57 | FromDiscord | <spacestella> what about proc definitions and type definitions? |
09:20:22 | PMunch | This works: https://play.nim-lang.org/#ix=4xK8 |
09:20:30 | FromDiscord | <Graveflo> in macros you dont need to inject right munch? |
09:21:28 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xK9 |
09:21:37 | PMunch | Well in a macro I think you need to first use `newIdent` and then quote it |
09:21:39 | PMunch | https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates |
09:21:51 | FromDiscord | <spacestella> is there any way i could avoid the `{. inject .}` |
09:21:56 | PMunch | That's the section on hygiene in templates |
09:22:13 | PMunch | Sure, you could mark your template as `{.dirty.}` instead |
09:22:57 | PMunch | Like so: https://play.nim-lang.org/#ix=4xKa |
09:24:29 | FromDiscord | <spacestella> THANK YOU |
09:24:45 | FromDiscord | <spacestella> I HAVE BEEN STUCK ON THIS ISSUE FOR MORE THAN FIVE HOURS |
09:25:26 | FromDiscord | <Graveflo> well strap in. There's a lot of little things to learn. I'm still learning myself. It's been worth it so far |
09:26:15 | FromDiscord | <spacestella> In reply to @Graveflo "well strap in. There's": nim is certainly an amazing language. however, in my opinion there are some quirks to it, which are a bit annoying. but as you said, it's definitely worth it! |
09:26:49 | FromDiscord | <spacestella> also, do you know any good nim extensions for vscode? i have looked at every nim extension and they only provide basic warnings and errors on file sace. |
09:27:08 | PMunch | Haha, it also helps to ask here sooner than five hours into a problem :P |
09:27:54 | FromDiscord | <spacestella> In reply to @PMunch "Haha, it also helps": i think i did ask |
09:28:06 | * | redj joined #nim |
09:36:44 | FromDiscord | <spacestella> In reply to @PMunch "Haha, it also helps": by the way, can i split parts of an if-elif-...-elif-else block into different templates? |
09:37:20 | FromDiscord | <Graveflo> use a `case` statement probably |
09:38:27 | FromDiscord | <Zoom> Your background hue is too green to fit this blue sidebar. Perhaps make it orangeish (#F6F2F0) or blueish (#F3F7FA). Right-margin on the `.letter` spans ruins the title's kerning. I understand why it's there, but better remove it and, dunno, transition the rest of the name to background on collapsing the sidebar. Now onto the article...↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
09:47:56 | PMunch | spacestella, no unfortunately such a block is a single AST node, so you can't split it into multiple templates |
09:48:46 | PMunch | And Zoom I assume that comment was meant to link to my article and not to the Nim doc page I shared :P |
09:52:29 | PMunch | Not quite sure what you mean about the `.letter` spans ruining the title kerning though.. |
10:01:23 | FromDiscord | <spacestella> In reply to @PMunch "<@860891878077890561>, no unfortunately such": can i write the contents of each if/elif block in a template instead? |
10:44:34 | PMunch | Like the body of each block? Sure |
11:08:17 | FromDiscord | <Asbjørn> sent a long message, see http://ix.io/4xKq |
11:08:18 | FromDiscord | <Asbjørn> sent a long message, see https://paste.rs/jT4PI |
11:08:49 | FromDiscord | <Asbjørn> Any hints or ideas are appreciated 🫂 |
11:11:58 | PMunch | How do you create the cstrings? |
11:15:35 | PMunch | My best guess is that the cstring (which is just a pointer to the first character in the string) is created in such a way that the pointer always stays the same and you simply modify the data underneath. So each time you send the cstring you send the same pointer address, and when your main reads from the channel the data is always the last value for the string. |
11:22:12 | FromDiscord | <Asbjørn> Hmm the `cstring` is created by calling an external C function. I can print it from inside the worker thread, but it doesn't survive the channel. |
11:25:39 | FromDiscord | <Asbjørn> sent a long message, see https://paste.rs/jo6uY |
11:30:12 | PMunch | Try casting the cstring to an int and print that out (both before you add it to the channel and after) |
11:30:19 | NimEventer | New thread by Ivansete: Understanding `await sleepAsync`, see https://forum.nim-lang.org/t/10258 |
11:30:39 | PMunch | Since it's just a pointer that cast should be fine and you can see if they all point to the same piece of memory |
11:31:19 | NimEventer | New thread by Ivansete: Understanding await sleepAsync, see https://forum.nim-lang.org/t/10259 |
11:31:19 | PMunch | Oh wait, that sounds much more wrong that just some pointer shenanigans.. |
11:36:17 | FromDiscord | <Asbjørn> I'll try the casting that you suggest, but I'm worried that it's not the the problem.↵Even if it were overwriting the previous string, I expect that the queue should still become empty after popping the last item. |
11:40:55 | PMunch | Yes it definitely should.. |
11:41:05 | PMunch | Hard to tell what is going on without actually seeing some code |
11:42:46 | FromDiscord | <Asbjørn> yeah I realize... the project isn't exactly secret, but it's too big to ask a kind internet stranger to read though 😅↵I'm trying to reproduce in a minimal example now, that's actually worthwhile sharing |
11:43:55 | PMunch | Writing minimal reproductions can be useful in its own right, many times I have solved my own problem while trying to reduce something :) |
11:44:21 | FromDiscord | <Asbjørn> for sure |
11:45:02 | FromDiscord | <Asbjørn> annoyingly, so far it's just working fine in my tiny example 😅 |
11:46:06 | PMunch | That's good though, means that it's probably just some silly mistake somewhere |
12:05:49 | FromDiscord | <Asbjørn> but I hate silly mistakes! \:] |
12:07:02 | PMunch | I'd rather have a silly mistake than a serious mistake though |
12:07:41 | FromDiscord | <Asbjørn> but when I find the root cause of a silly mistake, I just feel dumb |
12:08:09 | FromDiscord | <Asbjørn> at least with serious mistakes, I can feel smart after debugging something complicated \:3 |
12:10:19 | FromDiscord | <that_dude> Tbh I think I'd still call that a silly mistake. I'd say that a systematic issue that requires a redesign a serious mistake |
12:10:54 | FromDiscord | <Asbjørn> ah yes, the worst kind of mistake\: silly and complicated |
12:13:08 | * | raynei joined #nim |
12:16:48 | FromDiscord | <npapior/zerothi> sent a code paste, see https://play.nim-lang.org/#ix=4xKK |
12:17:11 | FromDiscord | <npapior/zerothi> (edit) "https://play.nim-lang.org/#ix=4xKK" => "https://play.nim-lang.org/#ix=4xKL" |
12:18:59 | PMunch | That looks pretty smart to me |
12:24:16 | FromDiscord | <npapior/zerothi> Ok, thanks! 🙂 |
12:38:06 | FromDiscord | <wikimedia foundation> Does anybody know how to contact Jibal? <https://github.com/jibal> |
12:39:12 | PMunch | Say their name three times fast in the mirror |
12:40:16 | FromDiscord | <exxjob> hold on let me laugh |
12:40:43 | PMunch | If you have a commit of theirs you can look at the commit message to see if you can find an e-mail perhaps |
12:40:51 | FromDiscord | <exxjob> i dont |
12:41:40 | * | lucasta joined #nim |
12:41:49 | PMunch | Depends on the reason why you need to get in touch with them |
12:42:04 | PMunch | If it's very serious I guess maybe GitHub can intervene |
12:42:19 | PMunch | But if you just want to ask them something I guess you're out of luck |
12:42:35 | FromDiscord | <exxjob> solitude follows him |
12:42:59 | PMunch | So do you.. |
12:43:07 | PMunch | Who is he? |
12:43:24 | PMunch | I guess maybe try to reverse image search his profile picture? |
12:47:02 | * | redj quit (Ping timeout: 250 seconds) |
12:48:09 | PMunch | Zoom, did you find anything about the article itself you didn't like? |
12:50:18 | PMunch | Oooh, now I see what you mean about the .letter thing |
12:50:52 | PMunch | Yeah that's done on purpose. If it had proper kerning it would show parts of the title when the sidebar is collapsed |
12:51:13 | PMunch | I guess I could solve that with a CSS animation to fade out the rest of the title though.. |
13:07:41 | * | void09 quit () |
13:07:55 | FromDiscord | <Zoom> BTWm anyone knows [Alkamist](https://github.com/Alkamist)? They are pretty reserved with their online presence. |
13:08:19 | * | void09 joined #nim |
13:12:47 | * | redj joined #nim |
13:17:20 | * | redj quit (Ping timeout: 248 seconds) |
13:18:37 | * | redj joined #nim |
13:35:55 | * | junaid_ quit (Remote host closed the connection) |
13:50:45 | FromDiscord | <voidwalker> Anyone use allographer ? Having trouble figuring out how to select row where a column is not "true" (1). I tried `.whereNotIn("deleted", @[1])` and it gives me only those rows with deleted == 1 |
13:52:07 | * | redj quit (Remote host closed the connection) |
13:53:31 | * | redj joined #nim |
13:54:25 | * | rockcavera joined #nim |
13:56:26 | FromDiscord | <Chronos [She/Her]> In reply to @PMunch "That's good though, means": Not when working with very finicky code and environments aha |
13:56:37 | * | krux02_ joined #nim |
13:57:04 | FromDiscord | <Chronos [She/Her]> It's why I abandoned the shared library plugin system myself, was horribly broken and didn't really work |
13:57:27 | FromDiscord | <Chronos [She/Her]> Sometimes it'd be fine, sometimes you'd get segfaults, and a single change could do either |
13:58:06 | * | redj quit (Ping timeout: 250 seconds) |
13:59:20 | * | redj joined #nim |
13:59:43 | * | junaid_ joined #nim |
14:17:31 | * | oldpcuser quit (Ping timeout: 240 seconds) |
14:21:35 | * | PMunch quit (Quit: Leaving) |
14:27:01 | * | junaid_ quit (Remote host closed the connection) |
14:32:29 | * | raynei quit (Remote host closed the connection) |
14:54:26 | NimEventer | New Nimble package! delaunator - Fast 2D Delaunay triangulation. A Nim port of Mapbox/Delaunator., see https://github.com/patternspandemic/delaunator-nim |
15:17:17 | * | om3ga quit (Ping timeout: 246 seconds) |
15:21:09 | * | om3ga joined #nim |
15:38:43 | * | redj quit (Ping timeout: 268 seconds) |
15:49:55 | * | redj joined #nim |
15:54:08 | * | redj quit (Ping timeout: 240 seconds) |
15:55:10 | * | redj joined #nim |
15:58:48 | * | redj quit (Client Quit) |
16:00:02 | * | ntat quit (Quit: Leaving) |
16:07:51 | * | oldpcuser joined #nim |
16:11:34 | * | redj joined #nim |
16:28:44 | FromDiscord | <Prestige> wtf I was just working on a nim port of that lmao |
16:28:53 | FromDiscord | <Prestige> like literally right now |
16:29:50 | Amun-Ra | the more the merrier |
16:30:18 | FromDiscord | <Prestige> Well if this port is finished and works I'll just use it haha. But what a weird timing coincidence |
16:32:49 | FromDiscord | <voidwalker> so many things left to port though : P |
16:32:52 | * | ntat joined #nim |
16:33:16 | FromDiscord | <voidwalker> maybe there should be a tracker for unfinished projects, where people can check if others are doing the same thing |
16:33:39 | FromDiscord | <Prestige> I just started mine like a day or two ago |
16:33:43 | FromDiscord | <voidwalker> we are missing so many things, and so few hands to spare |
16:34:05 | FromDiscord | <voidwalker> I was thinking of starting a wiki, or is there already one somewhere ? |
16:34:13 | FromDiscord | <voidwalker> nim. wiki is taken unfortunately :\ |
16:34:30 | FromDiscord | <Prestige> wiki.nim-lang.org would be nice... |
16:35:02 | FromDiscord | <voidwalker> where you can have goal specific tutorials, like how to write a RAT, or parse html |
16:36:39 | FromDiscord | <voidwalker> indeed, like https://wiki.freepascal.org/ |
16:41:58 | FromDiscord | <Prestige> Anyone know who `patternspandemic` is on github? I want to talk about this port with him |
16:50:47 | FromDiscord | <filipemtx> Is it possible to make a 3x3 supercube with a 5x5? I imagined you had to swap the centers trough the edges like this |
16:51:53 | FromDiscord | <filipemtx> https://media.discordapp.net/attachments/371759389889003532/1116409273279320157/Screenshot_2023-06-08-13-51-27-850_com.google.android.googlequicksearchbox.jpg |
16:52:24 | FromDiscord | <filipemtx> If you swap the edge-like centers you make this pattern |
16:52:36 | FromDiscord | <filipemtx> Then you just scramble like 3x3 and you have a 3x3 super cube |
16:52:42 | FromDiscord | <filipemtx> But how to make the pattern? |
16:52:51 | FromDiscord | <odexine> ? Wrong server? |
16:53:27 | FromDiscord | <filipemtx> Lol sorry |
16:53:34 | FromDiscord | <odexine> I was so confused |
16:53:50 | FromDiscord | <filipemtx> Lol my bad |
16:54:17 | FromDiscord | <odexine> GL with the question lol I don’t know what you were talking about but yeah |
16:54:34 | FromDiscord | <filipemtx> Haha thx |
16:54:55 | FromDiscord | <filipemtx> I didn't see i selected the wrong server on the menu |
16:54:58 | FromDiscord | <filipemtx> XD |
17:00:31 | FromDiscord | <filipemtx> https://media.discordapp.net/attachments/371759389889003532/1116411446838960218/Screenshot_2023-06-08-13-58-20-179_com.whatsapp.jpg |
17:00:43 | * | jmd_ joined #nim |
17:00:44 | FromDiscord | <filipemtx> I wanted to make this lol but posted on the wrong server |
17:12:08 | * | lucasta quit (Quit: Leaving) |
17:18:46 | FromDiscord | <pmunch> Closest we have to a Wiki is probably this\: https://github.com/nim-lang/Nim/wiki |
17:21:04 | FromDiscord | <pmunch> @Prestige, porting so fast he's porting from the future\: https://github.com/patternspandemic/delaunator-nim/blob/main/src/delaunator.nim#L3 |
17:22:37 | FromDiscord | <pmunch> And you could always try to email them |
17:25:50 | FromDiscord | <jmgomez> In reply to @pmunch "Closest we have to": it would be great if it gets into the nim-lang page though, so it's easer for people to reach. Does GH have a way to embed them? |
17:32:45 | FromDiscord | <jmgomez> If not that one, a redefined version |
17:36:22 | * | ntat quit (Quit: Leaving) |
17:36:33 | FromDiscord | <voidwalker> yeah wiki's should be hosted on the main page. and no, you don't have to rewrite the wiki in nim to do that |
17:36:40 | FromDiscord | <voidwalker> (edit) "page." => "domain." |
17:38:10 | FromDiscord | <voidwalker> contributing centralized, structured knowledge to the language should be easy. you cannot really fiddle with the html documentation as that requires pull requests on github |
17:38:22 | FromDiscord | <voidwalker> and that is very limited in scope anyway |
17:50:02 | NimEventer | New post on r/nim by PMunch: Setting up a Nim server for dummies, see https://reddit.com/r/nim/comments/144fyun/setting_up_a_nim_server_for_dummies/ |
17:50:51 | NimEventer | New thread by PMunch: Setting up a Nim server for dummies, see https://forum.nim-lang.org/t/10260 |
17:52:25 | FromDiscord | <pmunch> Shh NimEventer, don't snitch on my shameless cross-posting \:P |
17:56:56 | * | oldpcuser quit (Remote host closed the connection) |
18:32:01 | FromDiscord | <sigmasd> where is the bot source code ? |
18:35:16 | * | oldpcuser joined #nim |
18:53:15 | FromDiscord | <pmunch> Which bot? |
18:53:15 | FromDiscord | <pmunch> NimEventer? |
18:53:17 | FromDiscord | <pmunch> https://github.com/Yardanico/nimeventer |
19:04:26 | FromDiscord | <Nerve> Can statements be aplit across lines? |
19:04:31 | FromDiscord | <Nerve> (edit) "aplit" => "split" |
19:05:47 | FromDiscord | <pmunch> Yes |
19:05:52 | FromDiscord | <Nerve> sent a code paste, see https://play.nim-lang.org/#ix=4xM9 |
19:06:11 | FromDiscord | <pmunch> If you had the `or` on the first line it would work IIRC |
19:07:46 | FromDiscord | <Nerve> Okay that worked |
19:07:50 | FromDiscord | <Nerve> Thanks |
19:08:19 | FromDiscord | <Nerve> I think I like the readability of what I posted more though |
19:14:38 | FromDiscord | <sigmasd> but I don't see the matrix part |
19:14:49 | FromDiscord | <sigmasd> the code seems only for discord stackoverflow |
19:17:48 | FromDiscord | <Elegantbeef> Matrix bot is done using t2bot's matrix bridge |
19:21:22 | FromDiscord | <sigmasd> cool |
19:21:50 | FromDiscord | <sigmasd> !matrix help |
19:22:11 | FromDiscord | <sigmasd> image.png https://media.discordapp.net/attachments/371759389889003532/1116447099068883005/image.png |
19:23:55 | FromDiscord | <!&luke> What does -d:danger do in building |
19:32:46 | FromDiscord | <Boston> Is there an easy way to flip the endianess of copyMem |
19:33:30 | systemdsucks | -d:danger strips the binary dangerously |
19:36:42 | FromDiscord | <!&luke> Oh |
19:38:27 | FromDiscord | <Graveflo> In reply to @Boston "Is there an easy": You could just use unchecked array I guess. I don't see an options fo rit |
19:40:47 | FromDiscord | <Boston> sent a code paste, see https://play.nim-lang.org/#ix=4xMm |
19:41:40 | FromDiscord | <Boston> So if I just copyMem from bits to BufferSend I send "4.60008832e-41" |
19:43:23 | FromDiscord | <Elegantbeef> std/endians |
19:44:19 | FromDiscord | <Elegantbeef> Or https://github.com/auxym/bight/blob/main/bight.nim |
19:49:07 | FromDiscord | <Boston> Thank you, swapEndian32 is clean enough |
19:52:13 | * | jmd_ quit (Ping timeout: 256 seconds) |
19:55:52 | FromDiscord | <arnetheduck> In reply to @Boston "Thank you, swapEndian32 is": what we use for byteswapping: https://github.com/status-im/nim-stew/blob/6c97f11c7cb59eadf91b124b92d2ec035f7251fa/stew/endians2.nim#LL79C3-L79C |
20:07:59 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4xMs |
20:08:34 | FromDiscord | <sOkam!> I was thinking of using a `seq[Type]`, but im getting parse errors because it wants `[]` instead of `{}` at top level |
20:11:19 | * | def- quit (Quit: -) |
20:11:55 | FromDiscord | <!&luke> What's the best way to deal with graphql in nim |
20:12:00 | * | def- joined #nim |
20:12:09 | FromDiscord | <!&luke> I'm trying to use a graphql api not create one |
20:16:57 | FromDiscord | <Nerve> In reply to @sOkam! "I was thinking of": Iterate over the keys and prase their child objects, then add them to the seq, you could do this in a `collect` |
20:17:05 | FromDiscord | <Nerve> (edit) "prase" => "parse" |
20:17:52 | FromDiscord | <sOkam!> In reply to @Nerve "Iterate over the keys": iterate over which keys? |
20:18:16 | FromDiscord | <sOkam!> i cannot get the thing to parse, so I have no data to iterate afaik |
20:18:33 | FromDiscord | <sOkam!> if you mean iterating over the JsonNode, then I don't know how to do so |
20:19:16 | FromDiscord | <Nerve> sent a code paste, see https://play.nim-lang.org/#ix=4xMv |
20:19:48 | FromDiscord | <sOkam!> what type is json_obj, and how do you get it? |
20:20:03 | FromDiscord | <Nerve> Take the JSON string you posted and use `parse_json` |
20:20:15 | FromDiscord | <Nerve> or `parseJson` if we're being pedantic |
20:21:05 | FromDiscord | <Nerve> And it's a `JsonNode` |
20:21:46 | FromDiscord | <Nerve> In addition all those sub-objects would be as well. `JsonNode` is a object variant and so whether it's an object, array, or primitive type is contained inside it |
20:21:53 | FromDiscord | <System64 ~ Flandre Scarlet> Is it possible to make a script that installs dependencies automatically? |
20:21:53 | FromDiscord | <Nerve> (edit) "a" => "an" |
20:22:11 | FromDiscord | <Nerve> In reply to @System64 "Is it possible to": make? |
20:22:31 | FromDiscord | <sOkam!> In reply to @System64 "Is it possible to": which dependencies exactly? |
20:22:54 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @sOkam! "which dependencies exactly?": NimGL, NimGL's ImGUI, Tinydialogs |
20:23:10 | FromDiscord | <Elegantbeef> Make a nimble fiile |
20:23:13 | FromDiscord | <sOkam!> In reply to @System64 "NimGL, NimGL's ImGUI, Tinydialogs": `requires "nimgl"` in the nimble file? |
20:23:22 | FromDiscord | <sOkam!> or are you purposedly avoiding nimble |
20:23:27 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4xMw |
20:23:30 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @sOkam! "or are you purposedly": Nimble is fine |
20:23:52 | FromDiscord | <sOkam!> then just use nimble and make a build task |
20:23:53 | FromDiscord | <Elegantbeef> Why the hell are you making a batch script to compile |
20:23:59 | FromDiscord | <Elegantbeef> Make a config.nims and call it a day |
20:24:02 | FromDiscord | <System64 ~ Flandre Scarlet> However, I use Nim 2.0 |
20:24:04 | FromDiscord | <sOkam!> probably because he/she doesn't know |
20:24:22 | FromDiscord | <Nerve> I use make whenever I can, only use nimble for `install` |
20:24:31 | FromDiscord | <Nerve> (edit) "make" => "`make`" |
20:24:34 | FromDiscord | <sOkam!> nimble is great |
20:24:36 | FromDiscord | <Nerve> But I'm crotchety |
20:24:44 | FromDiscord | <sOkam!> make is nightmare fuel on decently sized projects |
20:24:54 | FromDiscord | <sOkam!> specially for package management |
20:25:11 | FromDiscord | <sOkam!> (compared to nimble i mean) |
20:25:31 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Make a config.nims and": It will detect it automatically? Also for Nimble build? |
20:26:02 | FromDiscord | <Elegantbeef> Yes |
20:26:18 | FromDiscord | <czgchsz> I've not seen projects using autotools for dependency management, thank god. Only for checking their existence (pkg-config counts too) |
20:26:56 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright↵And Nimble installs them if not installed? |
20:27:08 | FromDiscord | <Elegantbeef> That's what a dependency is |
20:27:09 | FromDiscord | <sOkam!> In reply to @System64 "Oh alright And Nimble": yep, exactly |
20:27:16 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright! |
20:27:17 | FromDiscord | <Elegantbeef> I honestly like pkg-config |
20:27:36 | FromDiscord | <czgchsz> Me too! |
20:27:58 | FromDiscord | <Elegantbeef> Oh you said it like you didnt like it |
20:28:38 | FromDiscord | <czgchsz> Oh nahh, I mean that I havent seen people trying to use makefiles for fetching and installing dependencies |
20:29:54 | FromDiscord | <czgchsz> I do use pkg-config in my makefiles etc |
20:29:58 | FromDiscord | <czgchsz> It'd be a nightmare \:p in this case nimble should be used |
20:32:57 | FromDiscord | <Nerve> That's probably where I'm different, I'm statically compiling with musl-libc. I compile my dependencies manually (documented of course) and drop the .a files in my project for linking. |
20:33:02 | FromDiscord | <Elegantbeef> Yea the dev of owlkettle uses pkg-config as intended 😄 |
20:33:25 | FromDiscord | <Nerve> So make is fine since I only have to `nimble install` a few things when I pull my project to another computer |
20:33:36 | FromDiscord | <Nerve> And it's just in a single make command |
20:34:04 | FromDiscord | <czgchsz> I'm personally fine with that too, and do that as well in some cases↵(@Nerve) |
20:38:14 | FromDiscord | <czgchsz> Sometimes I just write down the dependencies required in the README and let users handle it themselves (typically by using their OS' package manager) |
20:51:53 | FromDiscord | <System64 ~ Flandre Scarlet> Well, okay?... https://media.discordapp.net/attachments/371759389889003532/1116469669356900574/image.png |
21:09:58 | NimEventer | New Nimble package! pixienator - Helpers for visualizing delaunator with pixie., see https://github.com/patternspandemic/pixienator |
21:10:28 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4xMA |
21:13:17 | FromDiscord | <Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4xMD |
21:13:21 | FromDiscord | <ieltan> Oops |
21:13:21 | FromDiscord | <ieltan> sent a code paste, see https://paste.rs/ao3js |
21:13:29 | FromDiscord | <ieltan> Lol |
21:13:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4xME |
21:14:02 | FromDiscord | <ieltan> (edit) "https://play.nim-lang.org/#ix=4xMH" => "https://play.nim-lang.org/#ix=4xMG" |
21:14:28 | FromDiscord | <Andreas> (edit) "https://play.nim-lang.org/#ix=4xMD" => "https://play.nim-lang.org/#ix=4xMI" |
21:14:34 | FromDiscord | <System64 ~ Flandre Scarlet> Thanks! |
21:25:18 | * | cedb quit (Ping timeout: 250 seconds) |
21:29:17 | FromDiscord | <luteva> sent a code paste, see https://play.nim-lang.org/#ix=4xMM |
21:30:05 | FromDiscord | <Elegantbeef> Rewrite `==` to do what you want |
21:30:27 | FromDiscord | <Elegantbeef> Also probably should implement your own hash aswell that mimics `==` |
21:31:17 | FromDiscord | <luteva> In reply to @Elegantbeef "Also probably should implement": do you have any example for that? |
21:31:38 | FromDiscord | <Elegantbeef> std/hashes |
21:32:23 | * | cedb joined #nim |
21:34:10 | FromDiscord | <!&luke> What's the difference between Object and ref object |
21:34:39 | FromDiscord | <Elegantbeef> read the manual/tutorial on `ref` |
21:35:30 | FromDiscord | <luteva> In reply to @ripluke "What's the difference between": object is stack allocated, ref object is heap allocated. |
21:35:49 | FromDiscord | <luteva> (edit) "In reply to @ripluke "What's the difference between": ... object" added "afaik:" |
21:37:48 | FromDiscord | <Elegantbeef> That is what `ref` means yes |
21:37:56 | FromDiscord | <Elegantbeef> One is a value type the other is a reference type |
21:39:18 | FromDiscord | <ieltan> use ref when you want to mutate an object and reflect that change to every "instance" that reference it |
21:47:13 | FromDiscord | <Andreas> In reply to @luteva "afaik: object is stack": and a `ref` is managed -> allocation/dealloc is taken care of by ARC/ORC opposite to a (unmanaged)-`ptr`. |
21:48:56 | FromDiscord | <luteva> In reply to @Andreas "and a `ref` is": yes (of course). heap allocated memory is garbage collected, stack allocated mem is not. |
21:49:17 | FromDiscord | <luteva> (edit) "In reply to @Andreas "and a `ref` is": yes (of course). heap allocated memory is garbage collected, stack allocated mem is not. ... " added "It's managed by the stack 🙂" |
21:49:55 | FromDiscord | <luteva> (edit) "It's" => "It is" |
21:51:57 | FromDiscord | <Andreas> In reply to @luteva "yes (of course). heap": well, i just mentioned, cos it took a bit for me 🙂 |
21:53:07 | * | advesperacit quit () |
21:53:23 | FromDiscord | <Elegantbeef> Not all heap allocated memory is garbage collected |
21:53:26 | FromDiscord | <Elegantbeef> Only `ref` |
21:54:27 | NimEventer | New question by IvanS: How to write/read binary data (in type) in Nim?, see https://stackoverflow.com/questions/76435931/how-to-write-read-binary-data-in-type-in-nim |
22:07:33 | FromDiscord | <luteva> In reply to @ripluke "What's the difference between": btw.: this is one of the great things in nim. you have the choice what to use, switch the keyword and you have "the same thing" but technically two different implementations. Be explicit when choosing what you want to use! memory allocation is just one example. It's the same for static/dynamic dispatch (using proc/method), using if/when (for runtime/static switches) etc. |
22:09:12 | FromDiscord | <luteva> (edit) "nim." => "nim!" |
22:29:51 | FromDiscord | <Graveflo> Is there a way I can count how many times a generic gets instantiated during compilation? |
22:56:37 | * | redj quit (Ping timeout: 240 seconds) |
22:57:30 | * | redj joined #nim |
23:03:47 | FromDiscord | <sOkam!> Is there any existing way to extract `.tar.xz` files from nim?↵`treeform/zippy`and `nim-lang/zip` only have support for gz, tar and zip 😔↵Do you know of any way to unzip them? 🤔 |
23:10:32 | * | jmd_ joined #nim |
23:18:47 | FromDiscord | <graveflo> if you don't find anything else: https://github.com/dom96/untar/blob/master/src/untar.nim |
23:35:17 | * | krux02_ quit (Remote host closed the connection) |
23:36:40 | * | oldpcuser quit (Quit: Ping timeout: 665 seconds) |