00:27:53 | * | xet7 quit (Read error: Connection reset by peer) |
00:28:07 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
00:29:11 | * | xet7 joined #nim |
00:29:37 | * | xet7 quit (Remote host closed the connection) |
00:31:01 | * | xet7 joined #nim |
00:31:13 | * | xet7 quit (Remote host closed the connection) |
00:34:02 | * | xet7 joined #nim |
00:40:31 | FromDiscord | <DetermiedNim1> In reply to @jseb "on this page :": what does `{.acyclic.}` do? |
00:40:37 | FromDiscord | <DetermiedNim1> actually i could just look this up |
00:48:24 | * | xet7 quit (Remote host closed the connection) |
00:49:50 | * | xet7 joined #nim |
00:51:03 | * | xet7 quit (Remote host closed the connection) |
01:01:40 | * | xet7 joined #nim |
01:02:31 | * | rockcavera joined #nim |
01:18:21 | * | xet7 quit (Remote host closed the connection) |
01:43:20 | FromDiscord | <DetermiedNim1> I'ma be so fr I want dom96's Programming in Nim mainly cause the cover looks cool |
01:48:45 | * | rockcavera quit (Remote host closed the connection) |
02:23:49 | * | skippy8 quit (Quit: WeeChat 4.4.2) |
02:28:56 | FromDiscord | <Robyn [She/Her]> with Nim, implementing custom representations of data isn't too hard, is it? since macros and stuff |
02:31:03 | FromDiscord | <Elegantbeef> custom representation how? |
02:43:51 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "custom representation how?": implementing shit like Crabi |
02:44:26 | FromDiscord | <Robyn [She/Her]> the proposal by Rust devs for a common repr for higher level languages than C |
03:04:28 | FromDiscord | <leorize> you can't do that with nim |
03:04:39 | FromDiscord | <leorize> as defined by the spec, that is |
03:04:49 | FromDiscord | <leorize> the real nim is just C |
03:05:31 | FromDiscord | <leorize> but by spec, the layout of `object` is opaque and there aren't any directive to tell the compiler otherwise |
03:08:42 | FromDiscord | <leorize> since Araq commented on crABI spec, it might make it into nim if Rust accepts it |
03:45:23 | * | SchweinDeBurg joined #nim |
04:45:40 | * | xet7 joined #nim |
05:16:41 | * | xet7 quit (Ping timeout: 252 seconds) |
05:29:11 | * | xet7 joined #nim |
06:31:35 | * | ntat joined #nim |
06:38:11 | * | ntat quit (Quit: Lost terminal) |
06:39:42 | * | ntat joined #nim |
07:25:48 | * | ntat quit (Quit: leaving) |
07:53:55 | FromDiscord | <aintea> In reply to @leorize "the real nim is": For the moment at least |
07:54:09 | FromDiscord | <aintea> A compiler is being written to have Nim compile directly to machine code |
07:54:21 | FromDiscord | <aintea> For what reasons ? I have no idea↵Will it be cool ? Yes |
08:23:05 | Amun-Ra | …and no |
08:47:27 | FromDiscord | <kapendev> Crabi? More like crappy 🙃 |
09:01:38 | Amun-Ra | CrABS - Aplication Binary Specification |
09:24:37 | * | alexdaguy joined #nim |
09:42:01 | * | ntat joined #nim |
09:54:21 | * | alexdaguy quit (Quit: WeeChat 4.6.2) |
09:57:07 | * | ntat quit (Read error: Connection reset by peer) |
10:07:10 | FromDiscord | <bosinski2023> sent a code paste, see http://play.nim-lang.org/#pasty=BqnkmQOw |
10:07:39 | FromDiscord | <bosinski2023> (edit) "http://play.nim-lang.org/#pasty=xsuzLwFU" => "http://play.nim-lang.org/#pasty=IlfYtaCv" |
10:08:30 | FromDiscord | <bosinski2023> (edit) "http://play.nim-lang.org/#pasty=ZbjpOEDC" => "http://play.nim-lang.org/#pasty=tweikdOS" |
10:37:12 | * | ntat joined #nim |
10:59:30 | * | ntat quit (Read error: Connection reset by peer) |
11:20:54 | FromDiscord | <demotomohiro> In reply to @bosinski2023 "Hi, any idea if": If you want to call a macro recursively, put code in your macro in a proc and you can call it recursively. |
11:32:27 | FromDiscord | <bosinski2023> In reply to @demotomohiro "If you want to": thx @demotomohiro , i don't want to recursively call the macro. I need to write around 200-300 macros of a similar kind to cover the entire Neon-Api. the final ( inactive ) call-statement follows a strict formula which includes the macros name : 'v' + macroname + 'q'? + tq + '_' + tlen↵Maybe i use templates to generate the macros in a pre-step... |
11:32:50 | * | ntat joined #nim |
11:33:50 | FromDiscord | <bosinski2023> (edit) "In reply to @demotomohiro "If you want to": thx @demotomohiro , i don't want to recursively call the macro. I need to write around 200-300 macros of a similar kind to cover the entire Neon-Api. ... the" added "Forget the quote-do-stuff," |
12:07:59 | * | fallback quit (Quit: IRCNow and Forever!) |
12:20:30 | * | ntat quit (Read error: Connection reset by peer) |
12:32:56 | * | alexdaguy joined #nim |
13:04:03 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "but by spec, the": I meant by using a macro to change how it's emitted in C to make it compatible with crABI's layout |
13:38:46 | * | ntat joined #nim |
13:43:08 | * | Goodbye_Vincent1 quit (Read error: Connection reset by peer) |
13:56:11 | * | adigitoleo quit (*.net *.split) |
15:04:21 | FromDiscord | <lady_be_good> sent a code paste, see http://play.nim-lang.org/#pasty=YLcmTHod |
15:05:48 | FromDiscord | <Elegantbeef> Nim has overloaded enums now so the namespace style enums are more of a relic of the past |
15:07:04 | FromDiscord | <Elegantbeef> sent a code paste, see http://play.nim-lang.org/#pasty=IcnddRFj |
15:07:21 | FromDiscord | <Elegantbeef> Plus Nim's `pure` never really did do what it says on the tin |
15:11:40 | FromDiscord | <lady_be_good> sent a code paste, see http://play.nim-lang.org/#pasty=SJlsdMfJ |
15:12:32 | FromDiscord | <Elegantbeef> An error 😄 |
15:13:02 | FromDiscord | <lady_be_good> Yes that's what i was saying 😹 |
15:13:57 | FromDiscord | <Elegantbeef> Hey I never said that overloaded enums were actually thought out in implementation |
15:15:21 | FromDiscord | <Elegantbeef> A postfix or prefix operator would've made a bunch more sense to do the inference than the "Just use the identifier" |
15:15:28 | FromDiscord | <Elegantbeef> Like most languages that have enum inference |
15:18:00 | FromDiscord | <lady_be_good> In reply to @Elegantbeef "A postfix or prefix": Won't that make it more unnecessarily complex? |
15:18:12 | FromDiscord | <Elegantbeef> Nope |
15:18:51 | * | delvarus joined #nim |
15:19:22 | FromDiscord | <Elegantbeef> `.bleh` would be turned into an expression for the compiler to search for the enum, it's the same as `T.bleh` but the compiler finds the correct `T ` based off context |
15:19:35 | FromDiscord | <Elegantbeef> It's quite a simple thing that many languages do |
15:50:30 | * | alexdaguy quit (Quit: ded) |
16:04:11 | FromDiscord | <microwave3607> with variants, redefining `options.nim` wouldn't be that hard, I think |
16:04:13 | FromDiscord | <microwave3607> http://github.com/nim-lang/Nim/blob/version-2-2/lib/pure/options.nim#L91 |
16:04:18 | FromDiscord | <microwave3607> is smol |
16:04:32 | FromDiscord | <microwave3607> very littlo |
16:07:35 | * | fallback joined #nim |
17:04:39 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
17:09:28 | * | delvarus left #nim (Leaving) |
17:37:19 | FromDiscord | <threefour> What's the best way to a do an explicit deep copy in Nim? |
17:38:14 | FromDiscord | <Elegantbeef> Walk the type and copy it, or enable `--deepCopy` and use `deepCopy` |
17:38:23 | FromDiscord | <Elegantbeef> Though the former is preferable as the latter is set for the axe |
17:38:47 | FromDiscord | <anuke> sent a long message, see http://pasty.ee/dHxIIEOv |
17:39:26 | FromDiscord | <threefour> The number is bigger so it's an upgrade |
17:40:35 | FromDiscord | <anuke> This is really bad and makes development or iteration pretty much impossible. I know the ECS library I use (polymorph) uses a lot of macros, but 70 seconds is very slow to begin with. 222 is absurd. |
17:40:42 | FromDiscord | <threefour> > Walk the type and copy it, or enable --deepCopy and use deepCopy↵Oof. The object I'm trying to deep copy is created by a C library. |
17:40:57 | FromDiscord | <Elegantbeef> Well if it's a C owned resource how do you expect to deep copy it |
17:43:16 | FromDiscord | <Elegantbeef> I haven't kept up with development but I guess if you want to find the culprit time to get bisecting |
17:43:26 | FromDiscord | <threefour> Idk. Apparently Cairo doesn't have a built-in facility to copy a surface, which is bizarre. And I won't have the information to be able to recreate the same surface I end up with at the point I need to deep copy it. |
17:44:14 | FromDiscord | <threefour> Surely I'm not the only person who's needed to deep copy a Cairo surface before. |
17:44:25 | FromDiscord | <anuke> In reply to @anuke "I just upgraded from": Is this a known issue? I see no open issues about it, and unfortunately I cannot provide a minimal example as this is run on a private project with a significant amount of dependencies. |
17:44:28 | FromDiscord | <Elegantbeef> `create_similar` isn't what you want? |
17:44:43 | FromDiscord | <Elegantbeef> I've not noticed any massive slow downs myself |
17:46:27 | FromDiscord | <Elegantbeef> Without providing your sources the best you're going to be able to do is spend the time bisecting to find the commit(s) that caused it |
17:46:51 | FromDiscord | <Elegantbeef> Not going to be a fun time with the atleast minute long compile time of your project and probably atleast 20s compile time of a compiler |
17:47:28 | FromDiscord | <threefour> Why wouldn't they put "copy" somewhere in the name? A code search and an internet search brought up nothing. Regardless, great:↵> Deprecated since: 4.12↵> Create a suitable cairo image surface yourself. |
17:48:16 | FromDiscord | <Elegantbeef> idk I went to the docs and looked at the definitions 😄 |
17:48:41 | FromDiscord | <leorize> cairo is kinda dying tbh |
17:49:07 | FromDiscord | <leorize> gtk is moving away from cairo and they are the cairo maintainers |
17:49:52 | FromDiscord | <leorize> browsers and such moved to skia |
17:50:14 | FromDiscord | <anuke> In reply to @Elegantbeef "Not going to be": It's more like 4 minutes with the slowdown, but yeah. I don't think I have time for that for I'll just never upgrade I guess |
17:50:47 | FromDiscord | <threefour> What's the new go-to? I just need a vector graphics lib that can produce SVGs and PDFs. I'm porting an old Python codebase that used Cairo, but if I can modernize, I may as well. |
17:52:09 | FromDiscord | <threefour> > browsers and such moved to skia↵Yeah I've seen Skia, but it mainly focuses on rasterization, and a key requirement for me is vector output. |
17:53:07 | FromDiscord | <threefour> > but it mainly focuses on rasterization↵According to my understanding of it |
17:54:25 | FromDiscord | <leorize> skia can output svgs just fine |
17:56:55 | FromDiscord | <threefour> So Skia would be usable to generate PDFs with a bunch of raster images embedded, and also SVGs? |
17:57:43 | FromDiscord | <leorize> they have a lot of backends it seems\: http://skia.org/docs/user/api/skcanvas_creation/ |
17:59:12 | FromDiscord | <threefour> I'm assuming the Nim+Skia situation is poor or nonexistent |
18:00:42 | FromDiscord | <threefour> sent a code paste, see http://play.nim-lang.org/#pasty=hdqpBtwz |
18:00:48 | FromDiscord | <threefour> Sounds about right |
18:04:20 | FromDiscord | <leorize> cairo isn't going anywhere anytime soon |
18:04:22 | FromDiscord | <leorize> just use it |
18:07:32 | FromDiscord | <threefour> Yeah. My only other choice for modern vector graphics libraries and a modern language is probably Rust it seems. |
18:07:39 | FromDiscord | <leorize> seems to me that skia C API is still in-development |
18:08:07 | FromDiscord | <threefour> \> modern language↵\> C |
18:10:40 | FromDiscord | <leorize> you can say whatever about Rust but their ecosystem is top-notch |
18:14:39 | FromDiscord | <threefour> I don't really have anything against Rust. I just didn't want to build this system in the usual C-style language. |
18:17:08 | * | adigitoleo joined #nim |
18:17:13 | * | adigitoleo quit (Max SendQ exceeded) |
18:17:22 | * | adigitoleo_ joined #nim |
18:18:03 | * | adigitoleo_ is now known as adigitoleo |
18:40:58 | strogon14 | the advantage is that cairo now has a rather stable API :) which is not the norm with these libraries in the gtk ecosystem ;-) |
19:14:40 | FromDiscord | <lady_be_good> Is there a `json.stringify(data, null, 4)` like method in nim? I want to format a table. |
19:15:02 | FromDiscord | <leorize> what would that method do? |
19:15:47 | FromDiscord | <lady_be_good> It formats the JS object with 4 space indentation |
19:17:31 | FromDiscord | <lady_be_good> sent a code paste, see http://play.nim-lang.org/#pasty=FycudPCo |
19:18:09 | FromDiscord | <Elegantbeef> You get to stringify it then call pretty using `std/json` |
19:18:09 | FromDiscord | <leorize> you can do\: `import json; echo pretty(object, indent = 4)` |
19:18:18 | FromDiscord | <leorize> you can do\: `import json; echo pretty(%object, indent = 4)` |
19:18:43 | FromDiscord | <lady_be_good> Does it work on nim tables? |
19:19:01 | FromDiscord | <lady_be_good> Sorry, i mean sequences |
19:19:08 | FromDiscord | <Elegantbeef> Sure |
19:19:12 | FromDiscord | <leorize> it works with pretty much everything |
19:19:17 | FromDiscord | <Elegantbeef> It's supposed to work with all Nim types |
19:19:30 | FromDiscord | <Elegantbeef> It even works with cstrings! Incorrectly |
19:21:47 | FromDiscord | <lady_be_good> Thanks, it's working 😼👍🏻 |
19:22:05 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "It even works with": how so? |
19:22:20 | FromDiscord | <Elegantbeef> It points to a string that is destroyed after parsing |
19:22:37 | FromDiscord | <Robyn [She/Her]> lolol |
19:36:36 | * | FromDiscord quit (Remote host closed the connection) |
19:36:49 | * | FromDiscord joined #nim |
19:42:27 | FromDiscord | <Elegantbeef> Comment on a PR eons ago from me helped me now remake it |
19:42:27 | FromDiscord | <Elegantbeef> sent a code paste, see http://play.nim-lang.org/#pasty=GzgVggkD |
19:44:16 | FromDiscord | <Robyn [She/Her]> prepare mutation? |
19:44:37 | FromDiscord | <Elegantbeef> Nim constant strings are copy on write |
19:44:51 | FromDiscord | <Elegantbeef> So you need to call prepare muatation to move them to the heap from static rodata |
20:04:33 | * | ntat quit (Quit: leaving) |
20:37:22 | * | skippy8 joined #nim |
21:05:38 | * | m5zs7k quit (Ping timeout: 252 seconds) |
21:08:08 | * | m5zs7k joined #nim |
21:26:43 | FromDiscord | <threefour> How would I go about converting a non-null-terminated `cstring` to a `string`? I have the length. |
21:27:50 | FromDiscord | <Elegantbeef> sent a code paste, see http://play.nim-lang.org/#pasty=nRJWnkTT |
21:34:07 | * | rockcavera joined #nim |
21:35:40 | FromDiscord | <threefour> Perfect. Thanks. |
22:03:51 | FromDiscord | <user2m> sent a code paste, see http://play.nim-lang.org/#pasty=vdCcykCg |
22:06:43 | FromDiscord | <fabric.input_output> `int.high` |
23:09:32 | * | skippy8 quit (Quit: WeeChat 4.4.2) |
23:55:24 | FromDiscord | <theloserscandy> Quick ?, is there a way to list all the procs in a module? Like some type of 'dir' type function? |