<< 23-05-2021 >>

00:00:19FromDiscord<ElegantBeef> Well varriount linked python's cache library, so i spent time making that, then i spent time making a variant generator/heterogeneous collection object
00:01:09FromDiscord<ElegantBeef> If either have your interest, shamless spam↵https://github.com/beef331/kashae↵https://github.com/beef331/hseq
00:03:19saemI saw you mention those a while back
00:03:31saemThat's pretty cool.
00:10:38saemBeef, did you work a bit more on your type inference change?
00:11:05FromDiscord<ElegantBeef> The PR? Nope i was thinking about trying what araq suggested but i think my wee little brain would probably explode
00:12:46saemIf you do want to work on it again, I can ride shotgun.
00:15:51FromDiscord<ElegantBeef> Sounds a lot like "not making a game" so clearly it's what i should do 😄
00:16:06saemThe system works
00:16:37FromDiscord<ElegantBeef> I've been thinking about puzzle mechanics with similar complexity to linerino, but havent hit anything of "damn sounds nice"
00:16:47FromDiscord<ElegantBeef> So yea it's not a overly terrible idea
00:17:23FromDiscord<ElegantBeef> Completely offtopic, but just gotta know how BC is doing, got your bill gates chip yet?
00:17:48saemNah, signal still sucks, getting the first upgrade tomorrow.
00:18:26FromDiscord<ElegantBeef> I got mine two days ago and had a nice fever/headache yesterday, range increase is worth it i think 😛
00:19:52saemone of the MMR ones?
00:19:57saemerm... MRNA
00:20:09FromDiscord<ElegantBeef> Yea alberta only offers mRNA ones
00:20:13FromDiscord<ElegantBeef> Pfizer to be exact
00:20:52saemYeah, all the government ones are like that now, IIRC. Same with BC, unless you sign up for your own thing with a pharmacy
00:21:18FromDiscord<ElegantBeef> Well i signed up at a pharmacy, but Alberta does not have anything but Pfizer/Moderna
00:21:59FromDiscord<ElegantBeef> We had small amounts of Astrozenca but they're all gone and they're looking into giving other types as a second dose
00:23:24FromDiscord<ElegantBeef> Aw jeez just looked at `semEnum` that's.... complex
00:24:11FromDiscord<ElegantBeef> Though that's the typedef semming so not what we need to touch
00:25:46FromDiscord<Rika> haha it spells s--
00:26:04FromDiscord<ElegantBeef> um
00:52:49FromGitter<codestorm1> hello. i see 3 nim plugins for VSCode, any recommendations?
00:52:58FromDiscord<ElegantBeef> nimsaem's
00:56:28*nphg1 joined #nim
00:58:02FromGitter<codestorm1> thanks
00:58:06*nphg quit (Ping timeout: 240 seconds)
00:59:51FromDiscord<codestorm> o_o
01:00:29FromGitter<bung87> also you can try https://github.com/bung87/vscode-nim-lsp
01:02:01FromDiscord<Hi02Hi> im on discord, when you click on anyone's who's coming from a bridge's profile, why does it always show the last person to speak from a bridge?
01:02:03FromGitter<bung87> `("ndjson", "application/json"),` I checked the mime module , why it ext is `ndjson` not just `json`
01:16:02FromDiscord<ElegantBeef> It renames the bridge, so the most recent bridge event is the one it shows
01:18:11FromDiscord<codestorm> thanks bung
01:18:28FromDiscord<codestorm> has anyone done anything interesting with IoT and Nim?
01:18:40FromDiscord<codestorm> or anything at all would be interesting, i guess 🙂
01:19:43FromDiscord<reilly> I slept on it and had a thought: CryEngine is open-source.
01:25:56*dbohdan quit (Read error: Connection reset by peer)
01:28:02FromDiscord<Rika> http://ndjson.org/
01:28:18*notchris joined #nim
01:29:16*notchris quit (Client Quit)
01:32:18FromDiscord<Hi02Hi> codestorm nimconf had a talk on that, lemme get the link
01:34:13FromDiscord<Hi02Hi> https://www.youtube.com/watch?v=eCCrkZI0rVU&list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx&index=8
01:34:30FromGitter<bung87> that's weird, when you call getExt for application/json you got `ndjson`
01:35:33FromGitter<bung87> the getExt returns first matched mime, but json should take high order.
01:36:53FromDiscord<Rika> That is indeed weird t
01:49:03FromDiscord<codestorm> thanks Hi02
01:50:29FromDiscord<Rika> @slymilano elixir or nim engineers? Did you make a mistake or what
01:52:40saemSo I've created a bunch of distinct types, is there an easy way for me to create a typeclass which is the base type and any distinct type that shares that base type?
01:53:25FromDiscord<slymilano> @Rika We are an Elixir shop, you would be writing Elixir primarily, but we will write things with Nim, and more important I'll give our engineers the freedom to choose Nim for projects.
01:54:34FromDiscord<ElegantBeef> Uncertain what you mean saem
01:56:10saemI did `Call`, `Conv`, `ReturnStmt`, .... `= distinct NimNode`, now I'd like to create a type class which subsumes NimNode and all of those distinct types without me typing all them out again separated by `|`
01:56:47saemThen I'd like to use that typeclass as the type parameter for a proc so it can work on any NimNode, specialized or not.
01:57:35FromDiscord<ajusa> In reply to @ajusa "Hm, I'll try making": made a MWE but it is in multiple files, how should I share it here?
01:57:48FromDiscord<ajusa> (edit) "multiple" => "two" | "twofiles, how should I share it here? ... " added "play.nim?"
01:58:15FromDiscord<ElegantBeef> Might be able to use a concept for that saem, can you throw those types on nim playground for me?
01:58:20FromDiscord<ElegantBeef> Yep
01:58:44FromDiscord<ajusa> https://play.nim-lang.org/#ix=3nB2 - MWE for ifaces weird linking error
01:59:17FromDiscord<ajusa> (happens when I run faces.nim)
01:59:38saemBeef: https://play.nim-lang.org/#ix=3nB3
02:04:48*arecaceae quit (Remote host closed the connection)
02:05:10FromDiscord<ElegantBeef> This addition of a concept + typeclass seems to work
02:05:11FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3nB5
02:07:34FromDiscord<ElegantBeef> Obviously didnt test it much, but it worked in my small echo test
02:08:32FromDiscord<ElegantBeef> Ajusa that error does not happen here
02:08:51FromDiscord<ElegantBeef> I get a runtime error of invalid object conversion
02:09:08FromDiscord<ajusa> huh
02:09:24FromDiscord<ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/845845839099461642/unknown.png
02:09:48FromDiscord<ElegantBeef> try `nimble install https://github.com/yglukhov/iface@#head`
02:10:13FromDiscord<ElegantBeef> You might have somehow got an older iface version, or am i missing an issue?
02:10:33FromDiscord<ajusa> Hm, I just did that after uninstalling but I still get the linking error
02:11:06FromDiscord<ajusa> Also it has no releases, so I should have picked up the latest commit since I only installed it today
02:11:21FromDiscord<ElegantBeef> Yea but i was just saying to ensure you didnt get the error
02:11:32FromDiscord<ElegantBeef> What are your compiler options just `nim c -r ./faces.nim`
02:11:57saemIf I use that concept to replace `SpecializedNode` it falls over. :/
02:11:58FromDiscord<ajusa> yep
02:13:20FromDiscord<ElegantBeef> Yea i didnt know if it'd work properly, it did in my small test but i was being an idiot
02:13:39FromDiscord<ajusa> I opened an issue here with a more minimal example: https://github.com/yglukhov/iface/issues/11↵Strange that you got it to even compile though. Plus the expected behavior isn't the invalid conversion either, if I understood interfaces correctly
02:13:54saemnah it's cool, gotta thread the needle wrt to the bugs
02:14:36FromDiscord<ElegantBeef> What compiler are you using ajusa?
02:14:42FromDiscord<ajusa> nim 1.4.4
02:14:43FromDiscord<ElegantBeef> Ah nevermind see gcc there
02:16:23FromDiscord<ElegantBeef> Wait is faces supposed to import twofaces there?
02:16:43FromDiscord<ElegantBeef> Eitherway it compiles fine on 1.4.4 and 1.4.6
02:16:43FromDiscord<ajusa> Yes? they are two different files
02:16:57FromDiscord<ElegantBeef> What's your gcc version?
02:17:05FromDiscord<ajusa> 10.2.0
02:17:35FromDiscord<ElegantBeef> I'm on 9.3.0
02:18:39FromDiscord<ajusa> I really hope that's not the issue, `gcc` doesn't have regressions between major versions right?↵My ld is GNU ld (GNU Binutils) 2.36.1
02:18:50FromDiscord<ajusa> (edit) "doesn't" => "shouldn't"
02:18:56FromDiscord<ElegantBeef> Well it's the only thing i can think of if i did it properly
02:19:06FromDiscord<ElegantBeef> In the github example you compile `faces.nim` right?
02:19:14FromDiscord<ajusa> Yep
02:19:27*arkurious quit (Quit: Leaving)
02:19:50FromDiscord<ElegantBeef> So unless i fucked up somehow we blame gcc, now back to saem's problem 😄
02:20:04FromDiscord<ajusa> lol okay, hopefully someone else can reproduce
02:22:29*rockcavera joined #nim
02:27:09FromDiscord<ElegantBeef> Oh shit saem it silently kills the compiler
02:30:28saemyeah, I know
02:30:42*arecaceae joined #nim
02:30:44FromDiscord<ElegantBeef> Yea i didnt realize it did that, i thought it was just an error
02:31:23saemripping out the converter seems to help a bit.
02:32:55FromDiscord<ElegantBeef> Odd it seems to only cause that crash with Nimndoes
02:32:57FromDiscord<ElegantBeef> (edit) "Nimndoes" => "Nimnodes"
02:33:20saemneat... ?
02:33:40saemRight now it's spinning in a test for arc
02:34:11FromDiscord<ElegantBeef> Ok so now it's not silently dying so something's off
02:35:19FromDiscord<ElegantBeef> I'm going to go wear cement boots and attempt to skate, be back in 30 minutes 😛
02:49:30*Gustavo6046 quit (Ping timeout: 246 seconds)
02:51:11*Gustavo6046 joined #nim
02:54:13*oculux quit (Quit: blah)
03:26:19*spiderstew joined #nim
03:28:38*spiderstew_ quit (Ping timeout: 260 seconds)
03:31:14*Adeon quit (Ping timeout: 245 seconds)
03:33:01*Adeon joined #nim
04:53:40FromGitter<bung87> ```code paste, see link``` ⏎ ⏎ how to make this work? [https://gitter.im/nim-lang/Nim?at=60a9dfd3801b07264e641b15]
04:54:02*xet7 quit (Remote host closed the connection)
04:55:14*xet7 joined #nim
04:58:07*NimBot joined #nim
05:05:47*NimBot joined #nim
05:09:36FromDiscord<ElegantBeef> What's the issue?
05:10:42FromDiscord<ElegantBeef> Seems to work fine https://play.nim-lang.org/#ix=3nBL
05:14:00FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60a9e498850bfa2d3bdb0569]
05:14:43FromGitter<bung87> playground goes wrong , so I paste here
05:15:58FromGitter<bung87> wait , you mean not use range just `400.HttpCode .. 599.HttpCode`
05:16:07FromDiscord<ElegantBeef> it's shorthand for range
05:17:47FromGitter<bung87> yeah, I tried same error
05:18:58FromGitter<bung87> I change to `HttpErrorCode|HttpCode` for now, make it loose
05:19:56FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60a9e5fc850bfa2d3bdb086b]
05:20:48FromGitter<bung87> how can I saftly cast to HttpError, I only can get ref Exception by `getCurrentException()`
05:21:14FromDiscord<ElegantBeef> Like i showed you should be doing `except HttpError as e:`
05:21:15FromGitter<bung87> I need use HttpError .code here
05:22:14FromDiscord<ElegantBeef> And you'd do `e.code` in that case
05:26:49FromGitter<bung87> Thanks! I should use except HttpError, then changes param to ` err: ref Exception | HttpError` so that handled by single one proc
05:27:16FromDiscord<ElegantBeef> Ah so i think you stumbled on a bug
05:31:25FromGitter<bung87> you mean the range thing?
05:31:46FromDiscord<ElegantBeef> Yea, seems if you generate range of a distinct range it doesnt play nicely
05:34:23FromGitter<bung87> dont know a bug or not , maybe the compiler think the HttpCode range wider than HttpErrorCode.
05:34:57FromDiscord<ElegantBeef> Well this is the minimal reproduction https://play.nim-lang.org/#ix=3nBS
05:37:41FromGitter<bung87> oh, that's shoud be bug, since it's two procs.
05:38:42FromDiscord<ElegantBeef> I mean you cannot use a range of a distinct type in proc definitions, so yea certainly a bug
05:39:06FromDiscord<ElegantBeef> Cannot even use it as a variable, so yea it's a declarable but unusable type
05:40:35FromGitter<bung87> I was told by yardanico it only for compile time check
05:41:41FromDiscord<ElegantBeef> the `B: 0.A .. 10.A` is still a declarable type that cannot be used anywhere
05:42:24FromDiscord<ElegantBeef> Like all of these examples do not compile https://play.nim-lang.org/#ix=3nBT
05:42:52FromDiscord<ElegantBeef> Either the `B` type should not be declarable(which i think is the wrong solution) or it should work as a type description
05:44:29FromGitter<bung87> I think it should work, distinct types are transformed to base type, in this case just int
05:46:54FromDiscord<ElegantBeef> Yea i concur, so i guess issue time
05:51:15FromGitter<bung87> nice!
06:04:15FromDiscord<ElegantBeef> Quick someone smarter than i make the nim benchmark here faster than my rewrite of it! 😄 https://github.com/PlummersSoftwareLLC/Primes
06:19:27saemIsn't an easy win a bit set or whatever? That seq is probably terrible.
06:22:05FromDiscord<ElegantBeef> I changed it to an array and got a 10% performance increase with this https://github.com/PlummersSoftwareLLC/Primes/pull/197/files
06:31:27saemYou can probably make it faster with a uint8 array distinct type that lets you set and unset at the various bit positions. I thought such a thing already existed in the stdlib
06:32:56saemBut didn't spot it, anyhow that would be a big jump.
06:34:23*rockcavera quit (Remote host closed the connection)
06:35:05FromDiscord<ElegantBeef> Yea i didnt even look at the logic just cleaned up the skeleton that i didnt like, like using OOP for no reason but the author was new
06:35:30saemThe spirit of the benchmark says class
06:36:28FromDiscord<ElegantBeef> Ah well then better kill off my pr
06:36:37saemNot necessarily
06:37:11saemC++ and C# classes don't have virtual methods by default
06:37:40saemSo static proc seems fair.
06:38:01FromDiscord<amadan> they have a go implementation also and that is oop?
06:38:02FromDiscord<ElegantBeef> Well the C implementation just uses a `Sieve`
06:38:07FromDiscord<amadan> (edit) "is" => "isn't"
06:38:43saemGo uses interfaces or embedded structs
06:39:31FromDiscord<ElegantBeef> Yea idk Nim doesnt really have "classes" so the same rules of C or similar should be fine
06:40:39saemDunno, extending types and methods are more than enough.
06:41:44FromDiscord<ElegantBeef> Yea idk i'll probably get told to sod off, didnt actually realize there was design goal 😄
06:42:42saemThe seq[bool] is the main thing
06:45:45*Vladar joined #nim
07:06:46FromGitter<bung87> any recommand static blog site generator in nim ? I want migrate my blog from nodejs ecosystem , every time I write new blog I have to repair the node things ...
07:09:09FromDiscord<ElegantBeef> Yea saem using my own bastardized packed bit logic i got the same thing as my array
07:11:15FromDiscord<willyboar> bung87 this would be my next project
07:12:33FromDiscord<willyboar> I wrote one in the past but I would write a new or rewrite it.
07:13:57FromGitter<bung87> this one https://github.com/Willyboar/hotdoc? what is current state ?
07:14:53FromDiscord<flywind> Well, maybe you can look at this https://github.com/muxueqz/kun even with a little article introducing how to make a static blog.
07:15:45FromDiscord<willyboar> No this is for documentation
07:17:40FromGitter<bung87> hmm, I have two requirements, one is nim , second should have beautiful theme.
07:19:33FromDiscord<flywind> see https://github.com/h3rald/hastysite
07:20:35FromDiscord<willyboar> The truth is we need a ssg with theme support
07:21:59FromDiscord<willyboar> A Hugo competitor
07:25:33FromGitter<bung87> hastyside closer to my idea generator, but it looks like old age bootstrap2..
07:27:44FromDiscord<flywind> Well unless you write a new one. I didn't see beautiful and full featured static generators in Nim.
07:29:19FromDiscord<willyboar> I studied all of them and I agree with @flywind
07:29:35FromDiscord<willyboar> None of them have theme support
07:30:17FromDiscord<willyboar> And iirc none of them supports pagination
07:31:45FromGitter<bung87> all right. let me do it my own.
07:32:58FromDiscord<willyboar> I can join if you can wait
07:35:05FromGitter<bung87> that's nice! I'll create the repo for now and invite you to the project, the builtin theme will looks like nim official site.
07:40:47FromGitter<bung87> https://github.com/bung87/crown_ui/invitations
08:10:52FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3nCm
08:11:58FromDiscord<ElegantBeef> Do... people manually annotate their procedures for raises?
08:15:07FromGitter<bung87> if people want see the compiler does same raises as people annotated.
08:19:46FromDiscord<ElegantBeef> I cannot reason why that is throwning that error, try a minimal example and still no cigar
08:19:57FromDiscord<ElegantBeef> (edit) "try" => "tried"
08:20:02FromDiscord<Aiz> sent a code paste, see https://play.nim-lang.org/#ix=3nCn
08:23:23FromDiscord<ElegantBeef> You'd need to iterate through all the fields and assign them to the child object from the base
08:24:13FromDiscord<mlokis> In reply to @ElegantBeef "Do... people manually annotate": well i have this amazing technique from nim tutorial, or did i missred something?
08:24:29FromDiscord<ElegantBeef> I mean i've just never seen anyone manually annotate functions
08:24:45FromDiscord<Aiz> In reply to @ElegantBeef "You'd need to iterate": i guess i have no choice↵thanks
08:25:30FromDiscord<ElegantBeef> I mean you always have a choice, but it depends on your knowledge, though there might be an easier way than macros but i'm pretty tired atm
08:25:33FromDiscord<mlokis> In reply to @ElegantBeef "I mean i've just": i just thought its a way of documenting it
08:25:41FromDiscord<ElegantBeef> Nim automatically does that
08:25:46FromDiscord<mlokis> i see
08:25:52FromDiscord<ElegantBeef> Atleast to my knowledge 😄
08:26:48FromDiscord<mlokis> Whats the idiomatic way to cause unrecoverable error?
08:27:00FromDiscord<Aiz> In reply to @ElegantBeef "I mean you always": i know i could use macro for that but ...↵yeah, i thought nim could automatically convert it for me
08:27:26FromDiscord<ElegantBeef> A cast could work but probably will damage the heap
08:28:22FromDiscord<Aiz> the object kinda small so …↵i think i can do it manually
08:28:51*Vladar quit (Quit: Leaving)
08:32:45FromDiscord<ElegantBeef> @Aiz eh couldnt help myself https://play.nim-lang.org/#ix=3nCp
08:34:08FromDiscord<ElegantBeef> In reply to @mlokis "Whats the idiomatic way": Defects are not supposed to be caught so defects, i'd say. Though you can call `quit`, but that's not supposed to be called iirc
08:34:26FromDiscord<Aiz> In reply to @ElegantBeef "<@!804754408638382100> eh couldnt help": oh, thank you
08:35:45FromDiscord<ElegantBeef> No problem, any ol' excuse to write a macro
08:40:48Amun_RaElegantBeef: couldn't help myself either… https://play.nim-lang.org/#ix=3nCs ;)
08:41:19FromDiscord<ElegantBeef> Yea yea that was established
08:43:02FromGitter<bung87> how nim-yaml work with dynamic keys ?
08:48:24FromGitter<bung87> ```menu: ⏎ 归档: /archives ⏎ 标签: /categories``` [https://gitter.im/nim-lang/Nim?at=60aa16d83d43a15a65bf3c6f]
08:51:49*teasea3 joined #nim
08:52:53*teasea quit (Ping timeout: 240 seconds)
08:52:53*teasea3 is now known as teasea
09:10:31*lpirl joined #nim
09:17:56lpirlA quick question regarding the construct (e.g.) ``cuint32 {.importc: "uint32_t", header: "<stdint.h>".} = uint32``. I do understand the left side of the "equation", but what does ``uint32`` tell nim? From looking at the generated C code, I can't answer the question.Thanks for sharing knowledge. :)
09:52:33FromDiscord<dom96> In reply to @slymilano "<@!259277943275126785> We are an": That’s sneaky. Can you edit the post to be more explicit about this? Otherwise it’s just an Elixir job post, at that point why not only put it in Elixir’s discord?
10:06:27*tane joined #nim
10:16:37*lpirl quit (Quit: Ping timeout (120 seconds))
10:17:48*lpirl joined #nim
10:55:21*letto quit (Quit: Konversation terminated!)
10:57:18*letto joined #nim
11:00:32*arecaceae quit (Remote host closed the connection)
11:04:06*arecaceae joined #nim
11:17:10*willyboar joined #nim
11:53:08*Vladar joined #nim
12:10:37*NimBot joined #nim
12:11:07FromGitter<bung87> @willyboar I'v initial the project ready for development , libs, tools, nimble tasks.
12:15:49*noeontheend joined #nim
12:27:21*Gustavo6046_ joined #nim
12:28:02*Gustavo6046 quit (Ping timeout: 246 seconds)
12:29:22*lpirl quit (Ping timeout: 240 seconds)
12:46:04*pietroppeter joined #nim
13:01:39*willyboar quit (Ping timeout: 250 seconds)
13:08:00FromDiscord<Unaimend> Hey does nim specify the default value of enums?
13:13:35FromDiscord<InventorMatt> yes, the default value would be 0
14:10:56*noeontheend quit (Ping timeout: 246 seconds)
14:36:27*noeontheend joined #nim
14:54:23*pietroppeter quit (Quit: Connection closed for inactivity)
14:59:04ForumUpdaterBotNew Nimble package! db_wrapper - this libraly able to use database/sql of Go, see https://github.com/sivchari/db_wrapper
15:29:26*noeontheend quit (Ping timeout: 240 seconds)
15:35:29Zoom[m]Hey, how can I declare a const array with custom indexing?
15:37:13FromDiscord<Rika> does const a: array[3..4, typ] not work?
15:46:10*rockcavera joined #nim
15:54:48FromDiscord<Hi02Hi> in fact, you could do something like `array[range['a' .. 'z'], int]`
15:56:17*johans12 joined #nim
15:56:34*johans12 quit (Client Quit)
16:00:51FromDiscord<Hi02Hi> and you would access it with `arr['a']`
16:40:48*xet7 quit (Remote host closed the connection)
16:42:04*xet7 joined #nim
16:49:10*tiorock joined #nim
16:49:11*rockcavera quit (Killed (weber.freenode.net (Nickname regained by services)))
16:49:11*tiorock is now known as rockcavera
16:49:11*rockcavera quit (Changing host)
16:49:11*rockcavera joined #nim
16:54:00FromGitter<bung87> any recommand yaml lib ? I searched github cant find full featured yaml lib
16:57:27Zoom[m]@Rika, it kinda works for a single const, even though it's too verbose (`const x: array[1..2, int] = [1,2]`)but it doesn't if it's a field of a tuple/object. You need to declare the field separately which breaks the visual hierarchy of the declarations
16:59:59*willyboar joined #nim
17:01:05Zoom[m]To be clear, I want at least `const foo = (a: array[1..2; int] = [1, 2])` or ideally `const foo = (a: [1..2; 1, 2])`.
17:19:59nphg1Zoom: `const foo: tuple[a: array[1..2, int]] = (a: [8, 4])` or `const foo = (a: array[1..2, int]([8,4]))`
17:22:11Zoom[m]nphg1: Oh, thanks a lot. Didn't think of the `[]()` form for the array.
17:25:36*rockcavera quit (Remote host closed the connection)
17:28:32*rockcavera joined #nim
17:29:39Zoom[m]I meant "type conversion form"
17:32:33FromDiscord<jseb> hello, is it possible to assign an UncheckedArray (allocated with `alloc`) without copying elements one by one from another array ?
17:44:12leorize[m]what are you trying to do?
17:46:16FromDiscord<jseb> it's for creating an object in nimraylib_now.↵the function provides an access to the data (vertices, texcoords…) with an UncheckedArray, so it has to be filled element by element with a for loop.
17:46:43FromDiscord<jseb> (edit) "loop." => "loop.↵That means, loading the object to an array, and then copy the array"
17:48:07FromDiscord<jseb> (edit) "array" => "array↵The sample is here : https://github.com/greenfork/nimraylib_now/blob/master/examples/models/models_mesh_generation.nim"
17:49:08FromDiscord<jseb> for working without getting problems when freeing object (corruption or zero pointers) it has to be compiled with `--gc:orc -d:useMalloc`
18:13:16leorize[m]that sounds buggy
18:13:17leorize[m]how do you free this mesh?
18:13:38leorize[m]is raylib supposed to free this?
18:21:23leorize[m]@jseb also the only way to, uh, copy items from one array to an another is to... copy them
18:30:06*pietroppeter joined #nim
18:48:45FromDiscord<jseb> i think i'm doing that wrong…
18:49:19FromDiscord<jseb> maybe with a simple buffer filled with value and then casted to UncheckedArray it would be easier
18:59:53leorize[m]you still have to free this buffer
19:52:03FromDiscord<ajusa> If anyone has a moment, could they try reproducing the issue I made under iface here? https://github.com/yglukhov/iface/issues/11↵ElegantBeef tried but they got a different error than I did, wondering what might be messed up
19:58:04FromDiscord<ajusa> Or if anyone knows whether the example I came up with is even valid, that would be helpful as well
20:13:58*azed joined #nim
20:25:20FromDiscord<willyboar> sent a code paste, see https://play.nim-lang.org/#ix=3nFK
20:26:33FromDiscord<willyboar> @ajusa ^^^
20:27:21FromDiscord<ajusa> In reply to @willyboar "<@102899813149855744> ^^^": Awesome, thanks for confirming! Seems like that there is a bug in iface or Nim then, as it shouldn't fail to link. Not sure why ElegantBeef was able to get it to compile and run lol
20:27:28FromDiscord<ajusa> (edit) "why" => "how"
20:28:14FromDiscord<willyboar> @ElegantBeef is a magician
20:28:32FromDiscord<ElegantBeef> I cannot deny or confirm this claim
20:29:31FromDiscord<ElegantBeef> Tried again just now and yea same thing, willy what gcc are you using?
20:30:08FromDiscord<willyboar> gcc version 10.2.0 (GCC)
20:30:22FromDiscord<ElegantBeef> Ah another 10.x
20:30:25FromDiscord<ElegantBeef> I'm on 9.3
20:30:29FromDiscord<ajusa> Is it really `gcc` dependent? How do I even downgrade `gcc` safely
20:30:47FromDiscord<ElegantBeef> I dont know i'm not a gcc doctor, i just know i'm on 9.3 and both of you are on 10 😄
20:31:08FromDiscord<ajusa> also even if it does compile for you, I don't think it should throw the error you got, it should just work (print "meow")
20:31:14FromDiscord<willyboar> so we need one more running 9.X
20:33:45FromDiscord<ElegantBeef> Well you didnt inherit the cat from rootref, but that still didnt resolve the issue
20:34:19FromDiscord<ajusa> I thought it just worked with any ref objects, does it need to be from rootref? Actually the examples do all have it inheriting from rootref
20:34:55FromDiscord<ElegantBeef> Well it uses the rootref inheritance for converting to an homogenous type
20:35:26FromDiscord<ElegantBeef> But that aside it doesnt resolve the object conversion
20:36:33FromDiscord<ajusa> interesting, so with `tcc` I get invalid object conversion (but only after changing that to RootRef, otherwise I get a segfault)
20:36:35FromDiscord<ElegantBeef> Seems it packs/unpacks non root ref inheriting objects
20:36:52FromDiscord<ElegantBeef> Ah so it's the C compiler causing the linker issue
20:36:52*noeontheend joined #nim
20:37:22FromDiscord<ElegantBeef> Well eitherway there is an issue in iface that can be investigate https://github.com/yglukhov/iface/blob/main/iface.nim#L21 something is wrong here in this example
20:38:04*pietroppeter quit (Quit: Connection closed for inactivity)
20:39:17FromDiscord<ajusa> bruh: https://gcc.gnu.org/gcc-10/porting_to.html
20:39:21FromDiscord<ajusa> read the first thing
20:40:20FromDiscord<ajusa> now when I add the legacy `fcommon` flag I get the object conversion defect - which is a bug in iface I believe
20:40:44FromDiscord<ElegantBeef> Yep go debug it now 😛
20:42:39FromDiscord<ajusa> don't want to 😢 ↵at the very least I'll update the issue and attempt to solve it
20:44:55FromDiscord<ElegantBeef> Well i'll take a whirl at it after i walk my dogs, but no promises 😄
20:55:06FromDiscord<ElegantBeef> So saem what really gave that benchmark even more speed was adding `lto` and `-march=native` went from ~4400 samples up to ~6200 samples
20:55:34saemmakes sense, I forgot about the imported modules.
20:55:48FromDiscord<ElegantBeef> Oh also danger, that made it go from 4400 to 5200
20:56:00FromDiscord<ElegantBeef> So just a few flags and went up drastically
20:56:42FromDiscord<ElegantBeef> Was a sizeable improvement using the bitlist though 10% without any flag differences
20:59:46*willyboar quit (Ping timeout: 240 seconds)
21:06:15FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3nFW
21:06:23FromDiscord<ajusa> (edit)
21:07:24FromDiscord<ajusa> oh it works on devel. Neat, guess a bug was fixed at some point
21:08:39FromDiscord<ElegantBeef> Ah
21:09:50ForumUpdaterBotNew thread by Gavr: Nim lost 7 seconds in latest kostya benchmarks update, see https://forum.nim-lang.org/t/8018
21:18:59*Gustavo6046_ quit (Ping timeout: 246 seconds)
21:29:52*Gustavo6046 joined #nim
21:36:39*noeontheend quit (Ping timeout: 265 seconds)
21:43:37*Vladar quit (Quit: Leaving)
21:47:37*Gustavo6046 quit (Ping timeout: 260 seconds)
21:56:47*Gustavo6046 joined #nim
21:57:11*azed quit (Quit: WeeChat 3.1)
22:22:51*tane quit (Quit: Leaving)
22:27:09*pbb quit (Ping timeout: 250 seconds)
22:28:26*pbb joined #nim
22:28:41FromDiscord<Unaimend> In reply to @InventorMatt "yes, the default value": thanks
22:34:58*test_usr joined #nim
22:37:26FromGitter<BracketMaster> So when compiling on Mac, nim can't find my dylib
22:37:48FromGitter<BracketMaster> to fix this, I explicitly set the `DYLD_LIBRARY_PATH` environment variable'
22:38:13FromGitter<BracketMaster> so I can do `nim -c prog.nim; ./prog`, but not `nim -c r prog.nim`
22:38:38FromGitter<BracketMaster> is there an option to point nim to where dylibs might live?
22:40:47FromDiscord<timotheecour> see also rpath
22:41:14FromGitter<BracketMaster> rpath?
22:49:31*hyiltiz quit (Ping timeout: 260 seconds)
22:53:31FromGitter<BracketMaster> I found something on rpath here
22:53:32FromGitter<BracketMaster> https://pewpewthespells.com/blog/using-sanitizers-with-nim.html
22:53:43FromGitter<BracketMaster> unfortunately - didn't seem to help
22:54:00FromGitter<BracketMaster> my guess is that somehow nim unsets DYLD_LIBRARY_PATH when it runs `prog` directly
22:54:49*hyiltiz joined #nim
22:54:49*hyiltiz quit (Changing host)
22:54:49*hyiltiz joined #nim
23:04:04FromDiscord<timotheecour> it's not nim, it's an osx security feature that prevents forwarding it IIRC; but DYLD_LIBRARY_PATH is not the recommended way, google for rpath + search for it in nim codebase
23:09:55FromGitter<BracketMaster> alaright
23:10:43FromGitter<BracketMaster> also - anybody know any syntatic sugar in nim for the following? ⏎ I want a for loop that iterates over x and y where x goes from 1 to 10 and y goes from 1 to 10
23:16:54FromDiscord<ElegantBeef> If you're doing it a lot this might do the trick https://play.nim-lang.org/#ix=3nGO
23:17:17FromGitter<BracketMaster> that works
23:17:59*noeontheend joined #nim