00:14:05 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:15:06 | * | pbb joined #nim |
00:20:39 | FromGitter | <glyh> Hello, guys! Can anyone tell me how to edit this piece of code so that it compiles? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Thanks a lot! [https://gitter.im/nim-lang/Nim?at=60aaf157df5c362d4be94499] |
00:21:40 | FromGitter | <glyh> I know that I can nest enums, but it requires another discriminator to be defined |
00:21:48 | FromGitter | <glyh> 1) nest cases |
00:22:04 | FromDiscord | <ElegantBeef> Nim presently doesnt allow duplicate fields in different variants, so the `s: int` in both cases causes the error |
00:22:40 | FromGitter | <glyh> So the only way I can do it is to use inheritance of OOP? |
00:22:54 | FromDiscord | <Rika> no, you can just change the names and make a template |
00:23:03 | FromDiscord | <Rika> (given that the fields are still the same type |
00:23:12 | FromDiscord | <ElegantBeef> ^ or if it's for all all variants https://play.nim-lang.org/#ix=3nHa |
00:23:51 | FromGitter | <glyh> I have more complex situations, where s is not for all cases |
00:24:09 | FromGitter | <glyh> How to use templates to fix is? |
00:25:03 | FromGitter | <glyh> This is the real situation: ```nim ⏎ Token* = object ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=60aaf25f850bfa2d3bdd45af] |
00:25:24 | FromGitter | <glyh> This is the real situation: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60aaf27343fc4a24c5c04fe6] |
00:26:44 | FromDiscord | <Rika> thats fine |
00:26:50 | FromDiscord | <Rika> you just error on other cases with the template |
00:27:52 | FromGitter | <glyh> Can you provide a snippet of code to show how it works? Thanks a lot! |
00:28:15 | FromDiscord | <ElegantBeef> You can do it this way or with a single pos https://play.nim-lang.org/#ix=3nHd |
00:29:03 | Zoom[m] | Hey, is it possible to create an enum-addressable tuple const in a code like this: https://play.nim-lang.org/#ix=3nHc ? |
00:29:14 | FromGitter | <glyh> Thanks a lot! |
00:30:22 | Zoom[m] | I kind of understand the first part of what I'd like to write is different type depending on an enum, but they are all enumerable containers. It works with `case` |
00:31:04 | FromDiscord | <ElegantBeef> I mean you're almost there, just make an enum indexxed array |
00:31:55 | Zoom[m] | Arrays are homogenous containers |
00:32:23 | FromDiscord | <ElegantBeef> So make it a seq of `array[3,int]` |
00:32:50 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3nHg |
00:33:21 | FromDiscord | <Rika> is there a reason you need the arrays to be of different sizes |
00:33:27 | FromDiscord | <Rika> and cannot use a seq |
00:34:37 | FromDiscord | <Rika> @ElegantBeef nonexistent btw |
00:34:42 | FromDiscord | <ElegantBeef> I know |
00:34:55 | FromDiscord | <ElegantBeef> I make spelling mistakes and see them but live with them |
00:35:00 | Zoom[m] | I'm just pushing it. Wanted to not avoid using seqs at all in the code just for funsies. |
00:35:31 | FromDiscord | <ElegantBeef> Well then you can always use a variant |
00:35:43 | FromDiscord | <ElegantBeef> Or my variant generator which is still not polished 😄 |
00:36:33 | Zoom[m] | I'd like to know why it doesn't work. If I returned the whole array from a func even case wouldn't work, for obvious reasons, but as soon as we append addressing to the branches it all works. |
00:36:53 | Zoom[m] | So, by extension, I'd expect a straight enum addressing to work too |
00:38:03 | FromDiscord | <Rika> i dont understand what you dont understand |
00:38:34 | FromDiscord | <Rika> because `array[1, array[3, int]] != array[2, array[3, int]]`? |
00:39:56 | FromDiscord | <ElegantBeef> The issue seems to be that the `k.ord` is done at CT so just using a static param allows you to get around that https://play.nim-lang.org/#ix=3nHj |
00:40:00 | FromDiscord | <Rika> or `array[3, T]` != `array[Kind, T]`? |
00:40:08 | Zoom[m] | Yep, but it's just a transient type, when we split the paths in `case` no one cares what they are as long as we extract a value from them. |
00:40:20 | FromDiscord | <Rika> oh, k.ord |
00:40:22 | FromDiscord | <Rika> i see |
00:41:49 | FromDiscord | <ElegantBeef> The issue being that tuple access like that is the same as field access, so you have to have it done statically |
00:42:02 | Zoom[m] | @ElegantBeef: that's great. Thanks a lot. |
00:42:30 | FromDiscord | <ElegantBeef> I'd say the object variant method is better in this case just since it allows runtime changes in access |
00:43:42 | Zoom[m] | So, by marking a parameter with static we just signal it must be known at compile time? |
00:43:54 | FromDiscord | <ElegantBeef> Yep |
00:44:05 | FromDiscord | <ElegantBeef> Which means you cannot do runtime operations to change the accessing |
00:44:56 | Zoom[m] | That's fine by me. It's just a LUT |
00:45:54 | Zoom[m] | If you could show the preferred method with object variants, it would be super cool. |
00:47:02 | Zoom[m] | I don't really get why the compiler doesn't infer that `static` there, btw. |
00:47:14 | FromDiscord | <ElegantBeef> It doesnt do backward inference |
00:47:22 | Zoom[m] | On the second thought, I don't really get why the compiler does anything |
00:47:35 | * | noeontheend quit (Ping timeout: 246 seconds) |
00:50:54 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3nHo |
00:50:58 | FromDiscord | <ElegantBeef> Something like this should do the trick |
00:52:23 | FromDiscord | <ElegantBeef> Now to do this with my variant generator for a test 😄 |
00:52:51 | * | Tlangir joined #nim |
00:53:20 | FromGitter | <BracketMaster> I have: ⏎ ⏎ ```var fb = FrameBuffer[400, 400]``` ⏎ ⏎ nim is quite unhappy and complains with: `Error: invalid type: 'type FrameBuffer[system.int, system.int]' for var` [https://gitter.im/nim-lang/Nim?at=60aaf90043fc4a24c5c05cf3] |
00:53:45 | FromDiscord | <ElegantBeef> `=` should be `var fb: FrameBuffer[400, 400` |
00:53:46 | Zoom[m] | That's just silly. I wanted to decrease the LOC! :D |
00:54:04 | FromDiscord | <Rika> loc? |
00:54:07 | FromGitter | <BracketMaster> oh! |
00:54:10 | Zoom[m] | lines of code |
00:54:12 | FromDiscord | <ElegantBeef> And also probably need `static int` |
00:54:17 | FromGitter | <BracketMaster> spent all day yesterday in scala |
00:54:21 | FromDiscord | <Rika> oh i mistook you for bracketmaster |
00:54:27 | FromGitter | <BracketMaster> why `static int`? |
00:54:54 | Zoom[m] | BTW, just marking the kind `static` didn't work in the actual code. |
00:55:43 | * | nphg joined #nim |
00:55:52 | FromDiscord | <ElegantBeef> Well like i said the values have to be compile time evaluated |
00:56:09 | FromDiscord | <ElegantBeef> Static int since it's apart of the type so it needs to be statically known |
00:57:26 | * | nphg1 quit (Ping timeout: 240 seconds) |
01:00:28 | FromGitter | <BracketMaster> how might I write a byte literal in Nim? |
01:00:32 | * | noeontheend joined #nim |
01:00:53 | FromDiscord | <ElegantBeef> `1u8` |
01:07:32 | * | pbb quit (Remote host closed the connection) |
01:08:19 | FromGitter | <BracketMaster> If I didn't use static[int], you're saying that Nim doesn't know what to do with int indexes at compile time? |
01:08:45 | FromGitter | <BracketMaster> or rather - are you saying that the size of the array can't change? |
01:08:49 | * | pbb joined #nim |
01:08:53 | FromGitter | <BracketMaster> and NIm wants me to be explicit about that? |
01:09:14 | FromDiscord | <Rika> static int == `Type[100]` |
01:09:19 | FromDiscord | <Rika> int == `Type[int]` |
01:09:32 | FromDiscord | <ElegantBeef> `static` is to say "it's a generic based off a compile time value" |
01:10:14 | FromGitter | <BracketMaster> you probably get this question alot, but still not seeing any behavioral differences between objects and ref objects.. |
01:10:47 | FromDiscord | <ElegantBeef> The only behavioural difference that you'll notice is you dont need `var` to mutate fields in a procedure and `ref` can be nil |
01:17:19 | Zoom[m] | Gah, still can't grok why it doesn't work. |
01:18:38 | FromDiscord | <ElegantBeef> Are you giving it a runtime value of the enum? |
01:18:46 | Zoom[m] | The enum is a finite set, I just want to associate some compile-time data with this enum |
01:20:00 | Zoom[m] | Yes? Let's say I generate some data which gets classified as one of the enum |
01:22:11 | Zoom[m] | Why wouldn't the addressing just transform into the giant `case` I need for a runtime |
01:23:58 | Zoom[m] | Ok, perhaps not me, not today. CS:1 / Zoom:0 |
01:27:51 | FromDiscord | <Hi02Hi> DivBy0Error :p |
01:28:41 | FromGitter | <BracketMaster> ```code paste, see link``` ⏎ ⏎ `` Error: expression 'paint' is of type 'proc (){.gcsafe, locks: 0.}' and has to be used (or discarded);`` ⏎ ⏎ How might I discard? [https://gitter.im/nim-lang/Nim?at=60ab01480ff6de262b25e6d7] |
01:30:17 | FromGitter | <BracketMaster> oh - it wanted me to add parantheses at the end |
01:31:27 | FromDiscord | <ElegantBeef> Yea `paint` is a function name so in that case it was a hanging value |
01:49:13 | FromGitter | <BracketMaster> trying to write a simple triangle rasterizer in Nim: https://github.com/BracketMaster/nimRasterizer/blob/main/src/nimRasterizer.nim#L3 ⏎ ⏎ If you delete line 3 and 4, nim goes bezerk: ⏎ ⏎ Error: type mismatch: got <SDL_Return> ... [https://gitter.im/nim-lang/Nim?at=60ab0619a10461235d95f3a9] |
01:49:41 | FromGitter | <BracketMaster> Why would I have to import sdl2 in the top file `nimRasterizer.nim` when its already in `framebuffer.nim`? |
01:56:34 | FromDiscord | <treeform> In reply to @zetashift "<@107140179025735680> do you have": I have added dashes to Pixie: https://github.com/treeform/pixie/pull/202 pull and try it out! |
01:58:05 | FromGitter | <bung87> @BracketMaster it's imported but not exported |
01:59:49 | FromGitter | <BracketMaster> @bung87, well yes. I would think nim would understand that when calling ``frambuffer.paint()``, nim should compile the paint function in the context of ``framebuffer.nim`` |
02:00:03 | FromGitter | <BracketMaster> I could have a fundamental misunderstanding of how niw works however |
02:00:53 | FromGitter | <bung87> you should think more deeper, why need export, it not you will get all symbols available in your current module |
02:01:22 | FromGitter | <bung87> "if not" |
02:02:46 | FromGitter | <bung87> its same behavior like py, js etc |
02:03:26 | FromGitter | <BracketMaster> Perhaps I should ask, In my particular scenario, what is the right way to do imports? |
02:04:23 | FromGitter | <bung87> you check the module exported symbols |
02:05:02 | FromGitter | <BracketMaster> are you saying that framebuffer.nim should export sdl2? |
02:05:12 | FromGitter | <BracketMaster> frambuffer already exports paint - I would think that woudl be enough? |
02:05:56 | FromGitter | <bung87> imported module only visible in that module, when you import that module , you get exported symbols from that module , not that module imported. |
02:06:43 | FromGitter | <bung87> you can have a entry module that export all you need symobls or import modules seperately |
02:06:45 | FromDiscord | <ElegantBeef> I could be wrong but that's unrelated eh? |
02:06:50 | FromGitter | <BracketMaster> right. but I have to also import sdl2 before the paint function works |
02:07:20 | FromDiscord | <ElegantBeef> You import files in the module you need them, and export functionality where you need to |
02:10:02 | FromGitter | <BracketMaster> Which is what I usually do. I'm confused as to why I need to import sdl2 into nimRasterize.nim, when its already imported into frambuffer.nim, and nimRasterize.nim imports framebuffer.nim. ⏎ ⏎ I don't call any sdl2 specific things directly in nimRasterizer.nim. I do however call frambuffer.paint(), which is defined in frambuffer.nim, and uses sdl2 specific things, again within framebuffer.nim |
02:10:58 | FromGitter | <BracketMaster> if it helps, I'm running `nim c src/nimRasterizer` |
02:11:20 | FromDiscord | <ElegantBeef> Yea ofc, let me diagnose the issue here and i'll get back to you 😄 |
02:12:04 | FromGitter | <bung87> if you do right, then problem is in your framebuffer.nim file or your sdl lib broken. |
02:12:56 | FromDiscord | <ElegantBeef> `sdl2.init` returns a `SDL_Return` so i dont see how importing sdl2 in the root changes anything |
02:15:24 | FromGitter | <bung87> the error message shows you have no compare proc on some types or converter sometime to bool. |
02:16:32 | FromGitter | <BracketMaster> ElegantBeef: You weren't able to get it working as is committed? |
02:16:51 | FromGitter | <BracketMaster> It works for me |
02:16:56 | FromDiscord | <ElegantBeef> adding an explict `toBool` call on line 60, and line 26 solves this issue |
02:17:13 | FromDiscord | <ElegantBeef> Nah it works as committed which is just odd, converters are scary |
02:17:24 | FromGitter | <BracketMaster> convertors? |
02:17:42 | FromDiscord | <ElegantBeef> there are `toBool` converters for `SDL_Return` so it implictly converts |
02:18:00 | FromDiscord | <ElegantBeef> Which somehow broke when removing the import in the main file, 0 clue why/how |
02:18:50 | FromGitter | <BracketMaster> ah |
02:18:56 | FromDiscord | <Rika> because converters are basically implicitly used functions? |
02:19:08 | FromDiscord | <Rika> well theyre fucky anyway |
02:19:14 | FromDiscord | <Rika> i wouldnt be surprised if this was just a bug |
02:20:14 | FromDiscord | <ElegantBeef> Oh i think i see how the bug is invoked |
02:20:22 | FromDiscord | <ElegantBeef> This is silly if the case |
02:27:30 | FromDiscord | <ElegantBeef> Nope was not the case 😄 |
02:37:44 | ForumUpdaterBot | New thread by Alexeypetrushin: Why union type for proc argument fails to compile?, see https://forum.nim-lang.org/t/8019 |
02:53:21 | FromGitter | <BracketMaster> it seems nim's countup doesn't like floats |
02:53:46 | * | noeontheend quit (Ping timeout: 240 seconds) |
02:54:15 | FromDiscord | <Rika> if you think about it, how would that work? floats are imprecise and there will be accumulated error for large amounts of increments |
02:59:34 | FromDiscord | <ElegantBeef> Well it could just be int countup but converting to floats after |
03:08:17 | FromGitter | <BracketMaster> I've now made FrameBUffer a ref: https://github.com/BracketMaster/nimRasterizer/blob/3a874299b747d659de363587337994c0c2071c47/src/framebuffer.nim#L10 ⏎ ⏎ but now ``for r_index, row in fb:`` no longer works: https://github.com/BracketMaster/nimRasterizer/blob/3a874299b747d659de363587337994c0c2071c47/src/framebuffer.nim#L50 |
03:09:28 | FromGitter | <BracketMaster> I made FrameBuffer a ref so that I could use it in ``proc line``: https://github.com/BracketMaster/nimRasterizer/blob/3a874299b747d659de363587337994c0c2071c47/src/draw.nim#L3 |
03:12:23 | FromDiscord | <ElegantBeef> Do you need reference semantics? |
03:13:19 | FromDiscord | <ElegantBeef> You could just use a normal object and pass `fb: var Framebuffer` |
03:13:51 | FromDiscord | <ElegantBeef> And yes `a: T` is the convention, i did `a : T` when i first wrote nim aswell and think Rika or yardanico got annoyed 😄 |
03:25:18 | * | spiderstew_ joined #nim |
03:25:22 | FromDiscord | <Rika> In reply to @ElegantBeef "Well it could just": But that defeats the purpose of having a float increment |
03:25:53 | FromDiscord | <Rika> In reply to @ElegantBeef "And yes `a: T`": Did I? I don’t think I was harsh on you from the start |
03:25:59 | FromDiscord | <Rika> Bet it was Yardanico |
03:26:50 | * | spiderstew quit (Ping timeout: 246 seconds) |
03:37:56 | * | blackpawn_ joined #nim |
03:39:02 | * | blackpawn quit (Ping timeout: 252 seconds) |
03:54:08 | FromGitter | <BracketMaster> ok - so the var thing work |
03:54:35 | FromGitter | <BracketMaster> tha tis `fb : var FrameBuffer` |
03:57:03 | FromDiscord | <ElegantBeef> It's a mutable reference to be accurate |
03:57:46 | FromGitter | <BracketMaster> and by making FrameBuffer an ref, it becomes a mutable reference by default |
03:58:10 | FromDiscord | <ElegantBeef> Nah it just becomes a reference 😛 |
03:58:39 | FromGitter | <BracketMaster> BUt why did making FrameBuffer a ref not allow me to do iteration? |
03:59:51 | FromDiscord | <Rika> because there are iterators for `array` but none for `ref array` |
04:03:55 | FromDiscord | <ElegantBeef> if you did `.. in fb[]` i'd work since you'd be dereferencing the reference, but yea in most cases you dont need reference, you use object + var and it's 0 difference |
04:04:06 | FromDiscord | <ElegantBeef> We use references when we want reference behaviour |
04:15:53 | * | vicfred joined #nim |
04:27:58 | * | letto quit (Ping timeout: 265 seconds) |
04:50:12 | * | mal`` quit (Quit: Leaving) |
05:03:48 | * | pietroppeter joined #nim |
05:05:54 | * | rockcavera quit (Remote host closed the connection) |
05:13:47 | * | voltist quit (Quit: The Lounge - https://thelounge.chat) |
05:16:15 | * | mal`` joined #nim |
05:21:52 | * | vicfred quit (Quit: Leaving) |
05:23:36 | * | voltist joined #nim |
05:24:01 | * | narimiran joined #nim |
05:36:20 | ForumUpdaterBot | New Nimble package! ptr_math - Pointer arithmetic library, see https://github.com/kaushalmodi/ptr_math |
06:14:09 | ForumUpdaterBot | New thread by Araq: C2nim -- minor update, see https://forum.nim-lang.org/t/8020 |
06:15:39 | * | NimBot joined #nim |
06:18:24 | ForumUpdaterBot | New Nimble package! distances - Distances is a high performance Nim library for calculating distances., see https://github.com/ayman-albaz/distances |
06:18:25 | ForumUpdaterBot | New Nimble package! winimx - Winim minified code generator, see https://github.com/khchen/winimx |
06:18:28 | ForumUpdaterBot | New Nimble package! svvpi - Wrapper for SystemVerilog VPI headers vpi_user.h and sv_vpi_user.h, see https://github.com/kaushalmodi/nim-svvpi |
06:27:15 | FromDiscord | <leeooox> is there any good plotting library in Nim. such as matplotlib? |
06:28:56 | FromDiscord | <ElegantBeef> Wrapper for that lib https://github.com/ruivieira/matplotnim |
06:29:15 | FromDiscord | <ElegantBeef> A pure port of ggplot2 https://github.com/Vindaar/ggplotnim |
06:32:18 | FromDiscord | <leeooox> @ElegantBeef Thanks. |
06:52:03 | * | letto joined #nim |
07:10:51 | * | Vladar joined #nim |
07:13:34 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
07:46:18 | ForumUpdaterBot | New thread by Leeooox: How to get the compile time as a const string?, see https://forum.nim-lang.org/t/8021 |
08:14:06 | * | Arrrrrrrr joined #nim |
08:14:31 | * | azed joined #nim |
08:30:18 | * | Tlangir quit (Quit: Leaving) |
09:02:08 | * | willyboar joined #nim |
09:15:13 | * | azed quit (Quit: WeeChat 3.1) |
09:18:53 | FromDiscord | <jseb> hello, can the copy be faster than iterating each elements ?↵https://play.nim-lang.org/#ix=3nID |
09:24:12 | FromDiscord | <ElegantBeef> Hard to benchmark with those small values but you could do `copyMem(pbuf[0].addr, ga[0].addr, ga.len` |
09:25:52 | FromDiscord | <jseb> thank you ! |
09:51:18 | FromDiscord | <jseb> i think i can pass directly buffer, instead of pbuf[0].addr then ? `copyMem(buffer.addr,ga[0].addr,ga.len` |
09:52:07 | FromDiscord | <jseb> i've tried and it seems ok, the cast to ptr UncheckedArray is pointless when copying chunk of memory |
09:53:31 | FromDiscord | <Rika> yes you can directly pass buffer |
10:03:42 | FromDiscord | <jseb> ok |
10:12:37 | ForumUpdaterBot | New thread by Konradmb: Accessing object in seq of parent type, see https://forum.nim-lang.org/t/8022 |
10:14:08 | * | Yinaru[m] joined #nim |
10:14:08 | * | Yinaru[m] is now known as ||[m] |
10:18:01 | ||[m] | any chance someone can make a matrix library for nim please |
10:22:50 | FromDiscord | <Rika> matrix as in matrix or Matrix |
10:23:23 | ||[m] | Matrix |
10:34:21 | FromDiscord | <mlokis> Where can i find the nim doc markdown rules |
10:36:37 | leorize[m] | it's mostly RST with a sprinkle of markdown |
10:36:49 | leorize[m] | i don't think we have a proper reference for it anywhere |
10:39:32 | FromDiscord | <exelotl> There's a reference on the forum: https://forum.nim-lang.org/about/rst |
10:48:46 | ForumUpdaterBot | New thread by Inv2004: CPU Benchmark test via Nim-compilation, see https://forum.nim-lang.org/t/8023 |
10:55:21 | * | arkurious joined #nim |
11:00:44 | * | tane joined #nim |
11:16:52 | * | sagax quit (Ping timeout: 265 seconds) |
11:27:09 | FromDiscord | <willyboar> hm... parsetoml don't work with js |
12:15:46 | * | rockcavera joined #nim |
12:22:11 | FromDiscord | <ajusa> Are concepts and interfaces the same? Are Nim's concepts compile time, or do they have runtime overhead? |
12:29:20 | FromDiscord | <Rika> compiletime |
12:29:22 | FromDiscord | <Rika> so not the same |
12:38:47 | * | lpirl joined #nim |
12:51:38 | lpirl | Dear Nim community: how can one get the type of a procedure which is stored as a field of an object (as in ``myProcType = myObjectType.myProcField``)? |
12:52:51 | Oddmonger | type(mObjectType.myProcField) doesn't work ? |
12:59:52 | lpirl | Unfortunately not. Nim gives "type mismatch: got <type MyObjectType> but expected 'myProcField = proc (…): …'" and my assumption is that ``type(myObjectType.myProcField)`` translates to ``type(myProcField(myObjectType))``. Not sure. myObjectType is declared in another module and the manual states "Within the module x.f is then always |
12:59:53 | lpirl | interpreted as field access and outside the module it is interpreted as an accessor proc call.". |
13:00:38 | FromDiscord | <Rika> are you sure the line the error refers to is the same line youre thinking of |
13:03:25 | lpirl | Hmm yes. Nim points to the dot in its error message (source.nim(x, y)). |
13:05:34 | leorize[m] | what are you trying to do? |
13:06:14 | leorize[m] | typeof should work no matter if it's rewritten into an accessor or not |
13:14:51 | FromDiscord | <zetashift> In reply to @treeform "I have added dashes": Sweeeett!! I've messed around a lot with Pixie for this PR: https://github.com/Vindaar/ginger/pull/28 and with linestyles and dashes I'm almost done 😄 |
13:19:01 | lpirl | Learning Nim :) Seriously: I created Nim bindings for a C interface specification. This works so far, i.e., C-compatible libraries can be written in Nim. Now, I want add wrappers, so users implementing such libraries don't need to deal with C types but with Nim types only. For this, I want to write an setter of an object field (say |
13:19:02 | lpirl | ``MyObj.myProc``), so I can wrap ``myProc``. For this, I tried ``proc `myProc=`*(o: var MyObj, v: type(myObj.myProc))`` which gives "type mismatch: got <type MyObj> but expected 'myProc = proc (…" |
13:19:38 | * | Arrrrrrrr quit (Ping timeout: 265 seconds) |
13:20:33 | FromDiscord | <Rika> what is `myObj`? i thought we were dealing with `MyObj` |
13:22:45 | lpirl | True, ``MyObj`` and ``typeof`` instead of ``type``. Human errors in translating identifiers. |
13:23:15 | FromDiscord | <Rika> okay so thats not the issue |
13:23:35 | FromDiscord | <Rika> i think the issue is dot opping a type? but i dont know |
13:24:57 | lpirl | My idea would be to somehow force field access instead of proc calling but I don't know… Thanks for your help, in any case. |
13:25:09 | FromDiscord | <Rika> try `o.myProc` |
13:25:32 | FromDiscord | <Rika> i dont remember |
13:25:35 | FromDiscord | <Rika> i dont know anymore |
13:25:37 | FromDiscord | <Rika> xd |
13:27:23 | lpirl | that makes the whole thing an identifier → undeclared identifier "foo.bar" |
13:34:24 | lpirl | It seems to work when the proc type is declared separately (see below, compiles but couldn't run it yet) but I am still confused that one cannot get the type of a proc in an object field. |
13:34:24 | lpirl | type |
13:34:25 | lpirl | MyProc = proc … |
13:34:25 | lpirl | MyObj = object |
13:34:26 | lpirl | myProc = MyProc |
13:34:26 | lpirl | proc `myProc=`*(o: var MyObj, v: MyProc) = |
13:34:27 | lpirl | … |
13:59:45 | * | nerthus quit (Read error: Connection reset by peer) |
14:08:59 | * | noeontheend joined #nim |
14:21:55 | * | letto quit (Quit: Konversation terminated!) |
14:23:46 | * | letto joined #nim |
14:49:16 | * | npham[m] joined #nim |
14:59:55 | * | Arrrrrrrr joined #nim |
15:01:26 | * | noeontheend quit (Ping timeout: 240 seconds) |
15:01:39 | * | arecaceae quit (Remote host closed the connection) |
15:03:19 | * | arecaceae joined #nim |
15:11:39 | FromGitter | <bung87> @willyboar you there? have you check that project I send you/ |
15:13:41 | FromGitter | <bung87> I've create serveral PRs to karax , when merged we can have good development experience on ssr |
15:15:05 | FromGitter | <bung87> go to bed now. |
15:16:20 | * | letto quit (Ping timeout: 268 seconds) |
15:28:50 | * | letto joined #nim |
15:33:58 | * | narimiran_ joined #nim |
15:36:56 | * | narimiran quit (Ping timeout: 246 seconds) |
16:13:29 | FromDiscord | <ajusa> In reply to @bung87 "I've create serveral PRs": Thank you so much for this bung87, many longstanding bugs have been addressed by you 😄 |
16:18:17 | * | bluemax[m] joined #nim |
16:58:37 | * | aenesidemus joined #nim |
16:59:34 | * | lpirl quit (Quit: Connection closed) |
17:05:53 | FromGitter | <BracketMaster> Any insight as to what this push pragma does? |
17:05:53 | FromGitter | <BracketMaster> https://github.com/nim-lang/sdl2/blob/ed842e0092ab1c45176e95ab35d6d244ef48a509/src/sdl2/joystick.nim#L66 |
17:06:13 | FromGitter | <BracketMaster> And for context, still having issues getting nimSDL2 to find the dylib on MacOS |
17:06:48 | FromGitter | <BracketMaster> Somehow, `dlOpen()` is getting called with a path to `usr/local/lib` when it should be getting `opt/local/lib` |
17:07:11 | FromGitter | <BracketMaster> My guess is that Nim is emitting the dlOpen call |
17:08:17 | FromDiscord | <zidsal> in a macro is there a way to refer to a static parameter in a quote do? or do I need to turn that static value into a ident node first? |
17:13:31 | * | aenesidemus quit (Quit: Leaving) |
17:14:17 | * | superbia joined #nim |
17:14:22 | FromGitter | <kaushalmodi> @BracketMaster Stuff in push pragma gets auto-added to all pragmas after than push, until you call a pop pragma |
17:14:59 | * | superbia quit (Client Quit) |
17:15:18 | FromGitter | <kaushalmodi> https://nim-lang.github.io/Nim/manual#pragmas-push-and-pop-pragmas |
17:15:33 | * | superbia joined #nim |
17:23:27 | FromDiscord | <willyboar> In reply to @bung87 "<@527930042555170833> you there? have": I am watching it. TBH I wasn't planning to use Karax on my ssg (not hotdog) |
17:24:55 | FromDiscord | <sin> hi everyone!↵so im using nimgl / imgui but it gives:↵could not load: cimgui.so |
17:25:14 | FromDiscord | <sin> and i have installed cimgui |
17:26:19 | FromDiscord | <sin> is it cause it installed it too: `/usr/local/cimgui.so` |
17:35:41 | FromGitter | <BracketMaster> I'm wondering if it should be in /usr/local/lib/cimgui.so |
17:38:51 | FromGitter | <BracketMaster> Also, I really can't find any info on Nim's `dynlib` pragma |
17:40:42 | FromGitter | <BracketMaster> So essentially my issue boils down to nim generating a dlOpen pointing to `/usr/local/lib` whilst libraries on my machine reside in `/opt/local/lib` |
17:43:11 | FromGitter | <kaushalmodi> @BracketMaster ⏎ ⏎ > Also, I really can't find any info on Nim's `dynlib` pragma ⏎ ⏎ https://nim-lang.github.io/Nim/manual#foreign-function-interface-dynlib-pragma-for-import [https://gitter.im/nim-lang/Nim?at=60abe5afa10461235d98150f] |
17:43:50 | FromGitter | <kaushalmodi> Also see this note in there ⏎ ⏎ > A dynlib import can be overridden with the --dynlibOverride:name command-line option. The Compiler User Guide contains further information. |
17:44:33 | FromGitter | <kaushalmodi> @BracketMaster Btw are you the same person developing HDL in Nim? |
17:45:36 | FromGitter | <BracketMaster> @kaushalmodi yeah |
17:45:50 | FromGitter | <BracketMaster> Also - `dynlibOverride` isn't really a good option for sdl2 |
17:45:59 | FromGitter | <BracketMaster> as sdl2 has roughly 5 differentl libraries |
17:46:26 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3nKT |
17:46:26 | FromGitter | <BracketMaster> I'm used to running `nim c -r prog.nim` adding 5 `dynlibOverride` isn't really portable |
17:47:02 | FromGitter | <BracketMaster> What nim needs is a way to generate dlLoads that go through common paths, sort of how CMAKE can search for dylibs on config |
17:48:09 | FromGitter | <BracketMaster> Nim defaulting to emitting `usr/local/lib` for DLLs isn't particularly reasonable as many package managers have their preffered locations |
17:48:18 | FromGitter | <kaushalmodi> @BracketMaster I am not very experienced with dynlibs (for imports); the manual reading is all the knowledge I have regarding that. May be add the dynlibOverride switches that work for you, to a config.nims? |
17:58:16 | FromDiscord | <zidsal> @exelotl boo, the problem with that, can be seen in the following code https://play.nim-lang.org/#ix=3nKX↵writing the macro explicitly works as `selectType` is static and all cases have been encountered, however doing this in the quote version fails. I can only think that's because by converting it to a literal its now a runtime type? |
18:00:21 | FromGitter | <BracketMaster> ok - the config.nims is a good idea |
18:02:17 | FromDiscord | <exelotl> @zidsal I don't think the issue is related to `nLit` there. You can't have a case statement with different types at the end of each branch. |
18:02:43 | FromDiscord | <zidsal> really, but the firsy example works |
18:02:49 | FromDiscord | <zidsal> (edit) "firsy" => "first" |
18:03:20 | FromDiscord | <exelotl> yep, because in the first example, the type returned from each branch is `NimNode` |
18:03:28 | FromDiscord | <exelotl> (edit) "yep, because in the first example, the type ... returned" added "of value" |
18:03:32 | FromDiscord | <zidsal> ah ofc! thanks exeltl |
18:03:41 | FromDiscord | <exelotl> np :) |
18:05:24 | * | noeontheend joined #nim |
18:20:26 | * | noeontheend quit (Ping timeout: 240 seconds) |
18:24:50 | * | noeontheend joined #nim |
18:28:03 | Arrrrrrrr | Enum autoreordering for nim 4.0 please |
18:34:07 | ForumUpdaterBot | New thread by Mrhdias: How to read GeoLite2 mmdb files?, see https://forum.nim-lang.org/t/8026 |
18:34:27 | * | Jesin quit (Quit: Leaving) |
18:37:37 | * | Jesin joined #nim |
18:38:18 | * | sagax joined #nim |
19:05:56 | * | noeontheend quit (Ping timeout: 252 seconds) |
19:14:12 | * | Arrrrrrrr quit (Quit: Arrrrrrrr) |
19:22:49 | FromDiscord | <sh_oe> Anyone know of a recent syntax plugin for neovim for nim? |
19:23:40 | FromDiscord | <zetashift> I use https://github.com/alaviss/nim.nvim |
19:23:54 | FromDiscord | <zetashift> Might also play around with treesitter oneday |
19:24:05 | FromDiscord | <sh_oe> Any major issues with the current version of nim? |
19:24:24 | FromDiscord | <zetashift> Not that I know of |
19:24:37 | FromDiscord | <zetashift> In reply to @sh_oe "Any major issues with": Do you mean in general or with the plugin? |
19:24:55 | FromDiscord | <sh_oe> With the plugin |
19:25:08 | FromDiscord | <sh_oe> Sorry |
19:25:57 | FromDiscord | <zetashift> Erhm not really, sometimes highlighting stops working when there is an error but that's about it |
19:26:54 | FromDiscord | <sh_oe> Alright good enough thanks! Got it working |
19:27:37 | FromDiscord | <zetashift> If you're running up against something post here or on the forum, the maker of the nim plugin is an awesome dude and active here (under the name of leorize) |
19:28:21 | FromDiscord | <inv> Anyone with M1 here? |
19:37:34 | FromGitter | <BracketMaster> Yes |
19:37:38 | FromGitter | <BracketMaster> I have M1 |
19:38:09 | FromGitter | <BracketMaster> Also - NimScript config.nims doesn't seem happy with import fileExists from os: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60ac00a1801b07264e68c31d] |
19:38:29 | FromGitter | <BracketMaster> ``config.nims(2, 16) Error: undeclared identifier: 'fileExists'`` |
19:40:54 | FromDiscord | <willyboar> In reply to @BracketMaster "I have M1": do they worth? |
19:41:38 | FromGitter | <BracketMaster> I'm sorry - I don't understand what you're saying |
19:42:02 | FromGitter | <BracketMaster> if "do they work" -> "yes? I'm using one to type this message rn" |
19:42:23 | FromGitter | <BracketMaster> if "are they worth it" -> "depends. fastest machine I've ever used in my life" |
19:42:39 | FromDiscord | <willyboar> second |
19:45:19 | FromDiscord | <willyboar> do you have any issues with nim environment? |
19:45:32 | FromGitter | <BracketMaster> I'm able to build the nim, nimble, nimgrep, nimpretty, and nimsuggest in 80s |
19:45:42 | FromGitter | <BracketMaster> No problems |
19:45:48 | FromGitter | <BracketMaster> `brew install nim` |
19:45:58 | FromGitter | <BracketMaster> installs in about 15 seconds |
19:46:09 | FromGitter | <BracketMaster> plugins including completion work out of the box in VsCode |
19:46:35 | FromGitter | <BracketMaster> Although, for some reason, clicking `go to source` for builtins seems to have stopped working this week |
19:46:51 | FromDiscord | <willyboar> which model you have? |
19:47:09 | FromGitter | <BracketMaster> MacbookPro M1, 8GB, 8cor GPU, 256GB |
19:47:13 | FromGitter | <kaushalmodi> @BracketMaster You don't need to import os for fileExists.. there's a nimscript-specific fileExists: https://nim-lang.github.io/Nim/nimscript#fileExists%2Cstring |
19:47:27 | FromGitter | <kaushalmodi> Just commenting out line 2 from your snippet will work |
19:47:36 | FromGitter | <BracketMaster> thanks! |
19:48:36 | FromGitter | <kaushalmodi> @BracketMaster I have been a vocal fan of config.nims. You can find mine here: https://github.com/kaushalmodi/nim_config/blob/master/config.nims |
19:49:34 | FromGitter | <BracketMaster> I'm definitely digging nimscript in general |
19:49:41 | FromGitter | <kaushalmodi> also `defined` is a compile-time check, so do `when defined(..)` instead of `if ..` |
19:49:43 | FromGitter | <BracketMaster> I wonder if nimScript is faster than Ruby |
19:50:32 | FromGitter | <BracketMaster> Homebrew is my favorite package manager hands down except for the fact that Ruby is noticeable slow - a general nim based package manager would be cool |
19:50:38 | leorize[m] | definitely not |
19:51:18 | FromGitter | <BracketMaster> leorize, are you saying nimscript is slower than Ruby? |
19:51:26 | leorize[m] | as far as nimvm goes, it's not very fast, and doesn't have a JIT |
19:51:39 | leorize[m] | so yes, it's very likely that ruby is faster |
19:51:54 | FromGitter | <BracketMaster> some benchmarks are in order |
19:52:14 | FromGitter | <BracketMaster> But in general, my experience has been that Ruby is the slowest language ever |
19:52:20 | FromGitter | <BracketMaster> So ruby isn't hard to beat |
19:52:51 | leorize[m] | I heard ruby 3.0 is supposed to pack quite a punch, haven't read much into it though |
19:53:10 | FromGitter | <kaushalmodi> Hello leorize 👋 :) |
19:53:22 | leorize[m] | o/ long time no see |
19:53:28 | FromGitter | <BracketMaster> https://crystal-lang.org -> supposed to be a static version of Ruby |
19:54:12 | FromGitter | <kaushalmodi> leorize: My Nim code is quite stable and didn't need to fiddle with it in a while. But this time, I started learning macros and I got sucked right back in :) |
19:54:15 | FromGitter | <kaushalmodi> Macros are fun |
19:54:42 | leorize[m] | yes they are :) |
20:05:13 | FromGitter | <kaushalmodi> leorize: I had a basic C question for you (again) .. ⏎ ⏎ If I am translating some C code that's doing malloc to construct some array and saving the ptr to that on the C side, in Nim, that would be equivalent to creating a ref obj and saving the ref on the C side and then `GC_ref(that ref obj)`? |
20:06:24 | ForumUpdaterBot | New thread by Kobi: Is there a way to stream json?, see https://forum.nim-lang.org/t/8027 |
20:06:27 | FromGitter | <kaushalmodi> To add material to that question, here's the C code dealing with `arg_array` : https://github.com/kaushalmodi/nim-systemverilog-vpi/blob/main/get_arg_handle/orig/get_arg_handle_vpi_efficient.c . And here's the Nim code where I have the same args as a seq in an obj: https://github.com/kaushalmodi/nim-systemverilog-vpi/blob/main/common.nim |
20:07:20 | FromGitter | <kaushalmodi> I first tried just creating a `var someseq: seq[TYPE]` but I learned that GC_ref doesn't work on base seq vars.. Nim always garbage collected that |
20:19:26 | reversem3 | what can I use in the stdlib to sort columns in a ascii file and convert to xls? |
20:21:39 | reversem3 | would i use getFilePos? |
20:23:31 | * | uvegbot quit (Ping timeout: 265 seconds) |
20:35:23 | FromDiscord | <inv> In reply to @BracketMaster "I have M1": Can you benchmark it? https://github.com/inv2004/bench_nim_build |
20:45:18 | * | narimiran_ quit (Ping timeout: 252 seconds) |
20:48:12 | * | superbia quit (Ping timeout: 272 seconds) |
20:50:32 | * | tane quit (Quit: Leaving) |
20:53:07 | * | willyboar quit (Quit: Konversation terminated!) |
21:04:32 | ForumUpdaterBot | New thread by Masiarek2: Add total ratings for all Candidates (STAR Voting) , see https://forum.nim-lang.org/t/8028 |
21:05:56 | reversem3 | so with multiple columns all in ascii would you create a table and put the file into the table? |
21:06:14 | reversem3 | I suppose that wouldn't work either |
21:07:10 | FromDiscord | <zidsal> sent a code paste, see https://play.nim-lang.org/#ix=3nLI |
21:07:30 | FromDiscord | <zidsal> (edit) "https://play.nim-lang.org/#ix=3nLI" => "https://play.nim-lang.org/#ix=3nLJ" |
21:13:12 | * | Gustavo6046 quit (Remote host closed the connection) |
21:14:00 | * | Gustavo6046 joined #nim |
21:15:44 | FromDiscord | <zidsal> I think it's to do with the tuple unpacking in for loop as if I manually unpack it, it doesn't error |
21:20:59 | * | uvegbot joined #nim |
21:24:19 | * | noeontheend joined #nim |
21:25:42 | FromDiscord | <Vindaar> So you say the playground example there fails on your machine? If so what Nim version do you have locally? |
21:26:37 | FromDiscord | <zidsal> I'm on devel |
21:26:37 | FromDiscord | <slymilano> how can I use `ref` as a type field name? |
21:26:59 | FromDiscord | <slymilano> https://play.nim-lang.org/#ix=3nLL |
21:27:21 | FromDiscord | <zidsal> obv my machine example is slightly more complicated but I've binary chopped it so I know its panicing on the getSubjects proc |
21:27:31 | FromDiscord | <zidsal> and those procs are identical |
21:30:12 | * | Vladar quit (Remote host closed the connection) |
21:40:58 | FromDiscord | <ElegantBeef> @slymilano https://nim-lang.org/docs/manual.html#lexical-analysis-stropping |
21:43:21 | FromDiscord | <slymilano> We started out first Nim repo at Papa today! We are building a GitHub bot for on demand deploys to k8s |
21:44:40 | * | NimBot joined #nim |
21:47:31 | FromDiscord | <ElegantBeef> Congrats, have fun 😄 |
21:47:40 | Prestige | Nice! |
21:48:40 | FromGitter | <BracketMaster> What's Papa? |
21:49:21 | Prestige | https://www.papa.co/ |
22:00:52 | FromGitter | <BracketMaster> slymilano: very cool to see Nim in a production capacity! |
22:04:26 | * | noeontheend quit (Ping timeout: 240 seconds) |
22:13:50 | FromDiscord | <treeform> In reply to @zetashift "Sweeeett!! I've messed around": Based on your PR, would you have feature requests for us or some thing we can make more clear? |
22:22:28 | FromDiscord | <ElegantBeef> Why did i have to see pixie, just makes me want to work on my node editor library idea i had 😄 |
22:23:00 | FromDiscord | <ElegantBeef> Will i ever work on a single project, find out next project |
22:27:52 | * | zedeus joined #nim |
22:47:20 | FromGitter | <bung87> @ajusa :) |
22:49:36 | FromDiscord | <treeform> has any one used https://replit.com/languages/nim ? From https://news.ycombinator.com/item?id=27269292 |
22:50:15 | FromDiscord | <treeform> In reply to @ElegantBeef "Why did i have": I suffer from the same thing |
22:50:37 | FromDiscord | <ElegantBeef> Lol, well i mean i'm going to start working on it cause i wanted it for a puzzle game |
22:50:37 | FromDiscord | <dom96> I wonder why they chose Zig as the example |
22:50:56 | FromDiscord | <ElegantBeef> So hopefully i can make a very good renderer agnostic node graph editor 😛 |
22:51:14 | FromDiscord | <treeform> Why renderer agnostic, juse use pixie? |
22:51:35 | FromDiscord | <ElegantBeef> Cause i like Nico, Pixie and Raylib |
22:51:48 | FromDiscord | <ElegantBeef> So if i can use it in any of them i'll be happy |
22:51:49 | FromGitter | <BracketMaster> so imgui is render agnostic and has good node support |
22:51:54 | FromGitter | <BracketMaster> as well as nuklear |
22:52:01 | FromGitter | <BracketMaster> both have Nim bindings |
22:52:09 | FromDiscord | <treeform> In reply to @ElegantBeef "Cause i like Nico,": Only one of these is pure Nim though 🙂 |
22:52:35 | FromDiscord | <treeform> Oh sorry Nico is pure nim too |
22:52:38 | FromDiscord | <dom96> oh, I see, they actually add Zig in there |
22:52:42 | FromDiscord | <ElegantBeef> Yea was going to say |
22:52:43 | FromDiscord | <dom96> via the shell |
22:53:15 | FromDiscord | <ElegantBeef> Calm down guys it's going to be a rather simple abstraction of library draw/input functions, it's not going to be mega complex |
22:57:31 | FromGitter | <BracketMaster> ElegantBeef: how will your library work? imgui and nuklear seem to have a good approach that uses triangle rasterization |
22:59:27 | FromDiscord | <ElegantBeef> You hook up render functions and then it'll call them when you tell the nodes to render |
23:03:15 | FromDiscord | <zetashift> In reply to @treeform "Based on your PR,": Uhm not really, this is the first time ever I tried to work with a graphics library that works at the same level as Pixie (never touched Skia or Cairo) and since the Context API dropped everything has been very nice |
23:03:39 | FromDiscord | <zetashift> I did see Layers added recently and was wondering what they exactly are? |
23:05:29 | FromDiscord | <treeform> Its mainly for clipping, and operations that might be useful in UIs. |
23:05:46 | FromDiscord | <treeform> So for example you have a window you want to stuff to stay inside that window, you can use clip |
23:05:59 | FromDiscord | <treeform> but then the clip operation will apply to everything individually - slow |
23:06:05 | FromDiscord | <treeform> so you use a layer |
23:06:12 | FromDiscord | <zetashift> In reply to @treeform "has any one used": I have used repl it early on, but if you use Linux/Mac Nix is really cool and worth a look. I found replit only a nice way to share quick code snippets |
23:06:16 | FromDiscord | <treeform> then just clip the layer as one operation |
23:07:24 | FromDiscord | <treeform> another one is you want a transparent window but don't want stuff inside to be transparent with each other. |
23:07:28 | FromDiscord | <zetashift> Ah alright, thanks for Pixie tho, the fact that I could make that PR in very little time with very little knowledge speaks volumes about how cool Nim + a coherent graphics library is |
23:07:29 | FromDiscord | <treeform> so you use a layer to draw everything |
23:07:44 | FromDiscord | <treeform> then draw it with transparency back to the main screen. |
23:08:12 | FromDiscord | <zetashift> Ah I see |
23:08:38 | FromGitter | <BracketMaster> inv: I added the benchmark |
23:08:42 | FromGitter | <BracketMaster> M1 to the top!! |
23:08:47 | FromGitter | <BracketMaster> https://github.com/inv2004/bench_nim_build/issues/25 |
23:17:50 | * | rockcavera quit (Remote host closed the connection) |
23:19:34 | * | astronavt quit (Quit: ...) |
23:19:52 | * | astronavt joined #nim |
23:21:26 | * | arecaceae quit (Ping timeout: 240 seconds) |
23:22:41 | * | arecaceae joined #nim |
23:23:43 | * | arkurious quit (Quit: Leaving) |
23:30:28 | FromDiscord | <gavr> In reply to @BracketMaster "M1 to the top!!": can you share console screenshot? |
23:31:02 | FromGitter | <BracketMaster> yes, i'll run it again - already deleted it |
23:31:06 | FromGitter | <BracketMaster> gimme a couple mins |
23:34:12 | FromGitter | <BracketMaster> (https://files.gitter.im/5602f03e0fc9f982beb19f61/lAkV/image.png) |
23:34:14 | FromGitter | <BracketMaster> (https://files.gitter.im/5602f03e0fc9f982beb19f61/9naV/image.png) |
23:34:16 | FromGitter | <BracketMaster> done |
23:34:29 | FromDiscord | <gavr> thanks |
23:34:36 | FromGitter | <BracketMaster> sure! |
23:34:38 | FromGitter | <BracketMaster> why do you ask? |
23:34:59 | FromDiscord | <gavr> looks unbelievable, and why other M1 bench so much slower |
23:35:06 | * | noeontheend joined #nim |
23:36:49 | FromGitter | <BracketMaster> All the M1 benchmarks I've seen are really fast |
23:36:54 | FromGitter | <BracketMaster> M! is unbelievably fast |
23:36:59 | FromGitter | <BracketMaster> **M1 |
23:37:15 | FromGitter | <BracketMaster> After using M1 computers, I literally don't think I can go back to intel machines |
23:37:41 | FromGitter | <BracketMaster> Everything is instantaneous |
23:38:14 | FromDiscord | <gavr> Heh yea |
23:38:25 | FromDiscord | <gavr> btw my is Ryzen 1600 there |
23:39:37 | FromGitter | <BracketMaster> You may have seen slow M1 benchmarks if people were using intel mode |
23:39:57 | FromGitter | <BracketMaster> The only app that I run in intel mode is GTKWave |
23:41:02 | FromGitter | <BracketMaster> And JVM - sometime ARM JVM spawns intel child processes inconsistenly |
23:47:54 | * | rockcavera joined #nim |
23:51:52 | FromDiscord | <ElegantBeef> @treeform what's the function to figure out how much horizontal space a string will take up in pixie? |
23:52:53 | FromDiscord | <treeform> if you are using new context is measure text |
23:52:59 | FromDiscord | <treeform> (edit) "measure text" => "ctx.measureText" |
23:53:02 | FromDiscord | <ElegantBeef> Ok |
23:53:39 | FromDiscord | <treeform> https://nimdocs.com/treeform/pixie/pixie/context.html#measureText%2CContext%2Cstring |
23:54:11 | FromDiscord | <treeform> That aims to mimic Canvas/Cairo API |
23:54:18 | FromDiscord | <treeform> you can also use computeBounds: https://nimdocs.com/treeform/pixie/pixie/fonts.html#computeBounds%2CFont%2Cstring |
23:54:23 | Prestige | Is newContext not in 2.0.0? |
23:54:34 | FromDiscord | <ElegantBeef> It seemed like it was not |
23:54:41 | FromDiscord | <treeform> No its only in devel right now |
23:54:47 | Prestige | Kk |
23:55:32 | FromDiscord | <Hi02Hi> In reply to @treeform "has any one used": i use it, did you have a question or sth? |
23:55:41 | FromDiscord | <dom96> @treeform curious: have you run any rendering benchmarks for pixie (or better yet, typography) against other libraries? |
23:56:32 | FromGitter | <BracketMaster> @kaushalmodi : https://github.com/kaushalmodi/nim-systemverilog-dpic |
23:56:36 | FromGitter | <BracketMaster> so you're a hardware guy? |
23:57:49 | FromDiscord | <ElegantBeef> Pixie is bottom left 0,0 right? |
23:58:05 | FromGitter | <BracketMaster> Rust has Rustaceans, does Nim have Nimmers? |
23:58:18 | FromDiscord | <dom96> Nimians/Nimsters |
23:58:30 | FromDiscord | <dom96> we should probably have a vote eventually about which one we use |
23:58:44 | FromGitter | <BracketMaster> Nimster is clearly better |