00:00:19 | FromDiscord | <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:09 | FromDiscord | <ElegantBeef> If either have your interest, shamless spam↵https://github.com/beef331/kashae↵https://github.com/beef331/hseq |
00:03:19 | saem | I saw you mention those a while back |
00:03:31 | saem | That's pretty cool. |
00:10:38 | saem | Beef, did you work a bit more on your type inference change? |
00:11:05 | FromDiscord | <ElegantBeef> The PR? Nope i was thinking about trying what araq suggested but i think my wee little brain would probably explode |
00:12:46 | saem | If you do want to work on it again, I can ride shotgun. |
00:15:51 | FromDiscord | <ElegantBeef> Sounds a lot like "not making a game" so clearly it's what i should do 😄 |
00:16:06 | saem | The system works |
00:16:37 | FromDiscord | <ElegantBeef> I've been thinking about puzzle mechanics with similar complexity to linerino, but havent hit anything of "damn sounds nice" |
00:16:47 | FromDiscord | <ElegantBeef> So yea it's not a overly terrible idea |
00:17:23 | FromDiscord | <ElegantBeef> Completely offtopic, but just gotta know how BC is doing, got your bill gates chip yet? |
00:17:48 | saem | Nah, signal still sucks, getting the first upgrade tomorrow. |
00:18:26 | FromDiscord | <ElegantBeef> I got mine two days ago and had a nice fever/headache yesterday, range increase is worth it i think 😛 |
00:19:52 | saem | one of the MMR ones? |
00:19:57 | saem | erm... MRNA |
00:20:09 | FromDiscord | <ElegantBeef> Yea alberta only offers mRNA ones |
00:20:13 | FromDiscord | <ElegantBeef> Pfizer to be exact |
00:20:52 | saem | Yeah, 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:18 | FromDiscord | <ElegantBeef> Well i signed up at a pharmacy, but Alberta does not have anything but Pfizer/Moderna |
00:21:59 | FromDiscord | <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:24 | FromDiscord | <ElegantBeef> Aw jeez just looked at `semEnum` that's.... complex |
00:24:11 | FromDiscord | <ElegantBeef> Though that's the typedef semming so not what we need to touch |
00:25:46 | FromDiscord | <Rika> haha it spells s-- |
00:26:04 | FromDiscord | <ElegantBeef> um |
00:52:49 | FromGitter | <codestorm1> hello. i see 3 nim plugins for VSCode, any recommendations? |
00:52:58 | FromDiscord | <ElegantBeef> nimsaem's |
00:56:28 | * | nphg1 joined #nim |
00:58:02 | FromGitter | <codestorm1> thanks |
00:58:06 | * | nphg quit (Ping timeout: 240 seconds) |
00:59:51 | FromDiscord | <codestorm> o_o |
01:00:29 | FromGitter | <bung87> also you can try https://github.com/bung87/vscode-nim-lsp |
01:02:01 | FromDiscord | <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:03 | FromGitter | <bung87> `("ndjson", "application/json"),` I checked the mime module , why it ext is `ndjson` not just `json` |
01:16:02 | FromDiscord | <ElegantBeef> It renames the bridge, so the most recent bridge event is the one it shows |
01:18:11 | FromDiscord | <codestorm> thanks bung |
01:18:28 | FromDiscord | <codestorm> has anyone done anything interesting with IoT and Nim? |
01:18:40 | FromDiscord | <codestorm> or anything at all would be interesting, i guess 🙂 |
01:19:43 | FromDiscord | <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:02 | FromDiscord | <Rika> http://ndjson.org/ |
01:28:18 | * | notchris joined #nim |
01:29:16 | * | notchris quit (Client Quit) |
01:32:18 | FromDiscord | <Hi02Hi> codestorm nimconf had a talk on that, lemme get the link |
01:34:13 | FromDiscord | <Hi02Hi> https://www.youtube.com/watch?v=eCCrkZI0rVU&list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx&index=8 |
01:34:30 | FromGitter | <bung87> that's weird, when you call getExt for application/json you got `ndjson` |
01:35:33 | FromGitter | <bung87> the getExt returns first matched mime, but json should take high order. |
01:36:53 | FromDiscord | <Rika> That is indeed weird t |
01:49:03 | FromDiscord | <codestorm> thanks Hi02 |
01:50:29 | FromDiscord | <Rika> @slymilano elixir or nim engineers? Did you make a mistake or what |
01:52:40 | saem | So 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:25 | FromDiscord | <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:34 | FromDiscord | <ElegantBeef> Uncertain what you mean saem |
01:56:10 | saem | I 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:47 | saem | Then 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:35 | FromDiscord | <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:48 | FromDiscord | <ajusa> (edit) "multiple" => "two" | "twofiles, how should I share it here? ... " added "play.nim?" |
01:58:15 | FromDiscord | <ElegantBeef> Might be able to use a concept for that saem, can you throw those types on nim playground for me? |
01:58:20 | FromDiscord | <ElegantBeef> Yep |
01:58:44 | FromDiscord | <ajusa> https://play.nim-lang.org/#ix=3nB2 - MWE for ifaces weird linking error |
01:59:17 | FromDiscord | <ajusa> (happens when I run faces.nim) |
01:59:38 | saem | Beef: https://play.nim-lang.org/#ix=3nB3 |
02:04:48 | * | arecaceae quit (Remote host closed the connection) |
02:05:10 | FromDiscord | <ElegantBeef> This addition of a concept + typeclass seems to work |
02:05:11 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3nB5 |
02:07:34 | FromDiscord | <ElegantBeef> Obviously didnt test it much, but it worked in my small echo test |
02:08:32 | FromDiscord | <ElegantBeef> Ajusa that error does not happen here |
02:08:51 | FromDiscord | <ElegantBeef> I get a runtime error of invalid object conversion |
02:09:08 | FromDiscord | <ajusa> huh |
02:09:24 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/845845839099461642/unknown.png |
02:09:48 | FromDiscord | <ElegantBeef> try `nimble install https://github.com/yglukhov/iface@#head` |
02:10:13 | FromDiscord | <ElegantBeef> You might have somehow got an older iface version, or am i missing an issue? |
02:10:33 | FromDiscord | <ajusa> Hm, I just did that after uninstalling but I still get the linking error |
02:11:06 | FromDiscord | <ajusa> Also it has no releases, so I should have picked up the latest commit since I only installed it today |
02:11:21 | FromDiscord | <ElegantBeef> Yea but i was just saying to ensure you didnt get the error |
02:11:32 | FromDiscord | <ElegantBeef> What are your compiler options just `nim c -r ./faces.nim` |
02:11:57 | saem | If I use that concept to replace `SpecializedNode` it falls over. :/ |
02:11:58 | FromDiscord | <ajusa> yep |
02:13:20 | FromDiscord | <ElegantBeef> Yea i didnt know if it'd work properly, it did in my small test but i was being an idiot |
02:13:39 | FromDiscord | <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:54 | saem | nah it's cool, gotta thread the needle wrt to the bugs |
02:14:36 | FromDiscord | <ElegantBeef> What compiler are you using ajusa? |
02:14:42 | FromDiscord | <ajusa> nim 1.4.4 |
02:14:43 | FromDiscord | <ElegantBeef> Ah nevermind see gcc there |
02:16:23 | FromDiscord | <ElegantBeef> Wait is faces supposed to import twofaces there? |
02:16:43 | FromDiscord | <ElegantBeef> Eitherway it compiles fine on 1.4.4 and 1.4.6 |
02:16:43 | FromDiscord | <ajusa> Yes? they are two different files |
02:16:57 | FromDiscord | <ElegantBeef> What's your gcc version? |
02:17:05 | FromDiscord | <ajusa> 10.2.0 |
02:17:35 | FromDiscord | <ElegantBeef> I'm on 9.3.0 |
02:18:39 | FromDiscord | <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:50 | FromDiscord | <ajusa> (edit) "doesn't" => "shouldn't" |
02:18:56 | FromDiscord | <ElegantBeef> Well it's the only thing i can think of if i did it properly |
02:19:06 | FromDiscord | <ElegantBeef> In the github example you compile `faces.nim` right? |
02:19:14 | FromDiscord | <ajusa> Yep |
02:19:27 | * | arkurious quit (Quit: Leaving) |
02:19:50 | FromDiscord | <ElegantBeef> So unless i fucked up somehow we blame gcc, now back to saem's problem 😄 |
02:20:04 | FromDiscord | <ajusa> lol okay, hopefully someone else can reproduce |
02:22:29 | * | rockcavera joined #nim |
02:27:09 | FromDiscord | <ElegantBeef> Oh shit saem it silently kills the compiler |
02:30:28 | saem | yeah, I know |
02:30:42 | * | arecaceae joined #nim |
02:30:44 | FromDiscord | <ElegantBeef> Yea i didnt realize it did that, i thought it was just an error |
02:31:23 | saem | ripping out the converter seems to help a bit. |
02:32:55 | FromDiscord | <ElegantBeef> Odd it seems to only cause that crash with Nimndoes |
02:32:57 | FromDiscord | <ElegantBeef> (edit) "Nimndoes" => "Nimnodes" |
02:33:20 | saem | neat... ? |
02:33:40 | saem | Right now it's spinning in a test for arc |
02:34:11 | FromDiscord | <ElegantBeef> Ok so now it's not silently dying so something's off |
02:35:19 | FromDiscord | <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:40 | FromGitter | <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:36 | FromDiscord | <ElegantBeef> What's the issue? |
05:10:42 | FromDiscord | <ElegantBeef> Seems to work fine https://play.nim-lang.org/#ix=3nBL |
05:14:00 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60a9e498850bfa2d3bdb0569] |
05:14:43 | FromGitter | <bung87> playground goes wrong , so I paste here |
05:15:58 | FromGitter | <bung87> wait , you mean not use range just `400.HttpCode .. 599.HttpCode` |
05:16:07 | FromDiscord | <ElegantBeef> it's shorthand for range |
05:17:47 | FromGitter | <bung87> yeah, I tried same error |
05:18:58 | FromGitter | <bung87> I change to `HttpErrorCode|HttpCode` for now, make it loose |
05:19:56 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=60a9e5fc850bfa2d3bdb086b] |
05:20:48 | FromGitter | <bung87> how can I saftly cast to HttpError, I only can get ref Exception by `getCurrentException()` |
05:21:14 | FromDiscord | <ElegantBeef> Like i showed you should be doing `except HttpError as e:` |
05:21:15 | FromGitter | <bung87> I need use HttpError .code here |
05:22:14 | FromDiscord | <ElegantBeef> And you'd do `e.code` in that case |
05:26:49 | FromGitter | <bung87> Thanks! I should use except HttpError, then changes param to ` err: ref Exception | HttpError` so that handled by single one proc |
05:27:16 | FromDiscord | <ElegantBeef> Ah so i think you stumbled on a bug |
05:31:25 | FromGitter | <bung87> you mean the range thing? |
05:31:46 | FromDiscord | <ElegantBeef> Yea, seems if you generate range of a distinct range it doesnt play nicely |
05:34:23 | FromGitter | <bung87> dont know a bug or not , maybe the compiler think the HttpCode range wider than HttpErrorCode. |
05:34:57 | FromDiscord | <ElegantBeef> Well this is the minimal reproduction https://play.nim-lang.org/#ix=3nBS |
05:37:41 | FromGitter | <bung87> oh, that's shoud be bug, since it's two procs. |
05:38:42 | FromDiscord | <ElegantBeef> I mean you cannot use a range of a distinct type in proc definitions, so yea certainly a bug |
05:39:06 | FromDiscord | <ElegantBeef> Cannot even use it as a variable, so yea it's a declarable but unusable type |
05:40:35 | FromGitter | <bung87> I was told by yardanico it only for compile time check |
05:41:41 | FromDiscord | <ElegantBeef> the `B: 0.A .. 10.A` is still a declarable type that cannot be used anywhere |
05:42:24 | FromDiscord | <ElegantBeef> Like all of these examples do not compile https://play.nim-lang.org/#ix=3nBT |
05:42:52 | FromDiscord | <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:29 | FromGitter | <bung87> I think it should work, distinct types are transformed to base type, in this case just int |
05:46:54 | FromDiscord | <ElegantBeef> Yea i concur, so i guess issue time |
05:51:15 | FromGitter | <bung87> nice! |
06:04:15 | FromDiscord | <ElegantBeef> Quick someone smarter than i make the nim benchmark here faster than my rewrite of it! 😄 https://github.com/PlummersSoftwareLLC/Primes |
06:19:27 | saem | Isn't an easy win a bit set or whatever? That seq is probably terrible. |
06:22:05 | FromDiscord | <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:27 | saem | You 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:56 | saem | But didn't spot it, anyhow that would be a big jump. |
06:34:23 | * | rockcavera quit (Remote host closed the connection) |
06:35:05 | FromDiscord | <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:30 | saem | The spirit of the benchmark says class |
06:36:28 | FromDiscord | <ElegantBeef> Ah well then better kill off my pr |
06:36:37 | saem | Not necessarily |
06:37:11 | saem | C++ and C# classes don't have virtual methods by default |
06:37:40 | saem | So static proc seems fair. |
06:38:01 | FromDiscord | <amadan> they have a go implementation also and that is oop? |
06:38:02 | FromDiscord | <ElegantBeef> Well the C implementation just uses a `Sieve` |
06:38:07 | FromDiscord | <amadan> (edit) "is" => "isn't" |
06:38:43 | saem | Go uses interfaces or embedded structs |
06:39:31 | FromDiscord | <ElegantBeef> Yea idk Nim doesnt really have "classes" so the same rules of C or similar should be fine |
06:40:39 | saem | Dunno, extending types and methods are more than enough. |
06:41:44 | FromDiscord | <ElegantBeef> Yea idk i'll probably get told to sod off, didnt actually realize there was design goal 😄 |
06:42:42 | saem | The seq[bool] is the main thing |
06:45:45 | * | Vladar joined #nim |
07:06:46 | FromGitter | <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:09 | FromDiscord | <ElegantBeef> Yea saem using my own bastardized packed bit logic i got the same thing as my array |
07:11:15 | FromDiscord | <willyboar> bung87 this would be my next project |
07:12:33 | FromDiscord | <willyboar> I wrote one in the past but I would write a new or rewrite it. |
07:13:57 | FromGitter | <bung87> this one https://github.com/Willyboar/hotdoc? what is current state ? |
07:14:53 | FromDiscord | <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:45 | FromDiscord | <willyboar> No this is for documentation |
07:17:40 | FromGitter | <bung87> hmm, I have two requirements, one is nim , second should have beautiful theme. |
07:19:33 | FromDiscord | <flywind> see https://github.com/h3rald/hastysite |
07:20:35 | FromDiscord | <willyboar> The truth is we need a ssg with theme support |
07:21:59 | FromDiscord | <willyboar> A Hugo competitor |
07:25:33 | FromGitter | <bung87> hastyside closer to my idea generator, but it looks like old age bootstrap2.. |
07:27:44 | FromDiscord | <flywind> Well unless you write a new one. I didn't see beautiful and full featured static generators in Nim. |
07:29:19 | FromDiscord | <willyboar> I studied all of them and I agree with @flywind |
07:29:35 | FromDiscord | <willyboar> None of them have theme support |
07:30:17 | FromDiscord | <willyboar> And iirc none of them supports pagination |
07:31:45 | FromGitter | <bung87> all right. let me do it my own. |
07:32:58 | FromDiscord | <willyboar> I can join if you can wait |
07:35:05 | FromGitter | <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:47 | FromGitter | <bung87> https://github.com/bung87/crown_ui/invitations |
08:10:52 | FromDiscord | <mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3nCm |
08:11:58 | FromDiscord | <ElegantBeef> Do... people manually annotate their procedures for raises? |
08:15:07 | FromGitter | <bung87> if people want see the compiler does same raises as people annotated. |
08:19:46 | FromDiscord | <ElegantBeef> I cannot reason why that is throwning that error, try a minimal example and still no cigar |
08:19:57 | FromDiscord | <ElegantBeef> (edit) "try" => "tried" |
08:20:02 | FromDiscord | <Aiz> sent a code paste, see https://play.nim-lang.org/#ix=3nCn |
08:23:23 | FromDiscord | <ElegantBeef> You'd need to iterate through all the fields and assign them to the child object from the base |
08:24:13 | FromDiscord | <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:29 | FromDiscord | <ElegantBeef> I mean i've just never seen anyone manually annotate functions |
08:24:45 | FromDiscord | <Aiz> In reply to @ElegantBeef "You'd need to iterate": i guess i have no choice↵thanks |
08:25:30 | FromDiscord | <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:33 | FromDiscord | <mlokis> In reply to @ElegantBeef "I mean i've just": i just thought its a way of documenting it |
08:25:41 | FromDiscord | <ElegantBeef> Nim automatically does that |
08:25:46 | FromDiscord | <mlokis> i see |
08:25:52 | FromDiscord | <ElegantBeef> Atleast to my knowledge 😄 |
08:26:48 | FromDiscord | <mlokis> Whats the idiomatic way to cause unrecoverable error? |
08:27:00 | FromDiscord | <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:26 | FromDiscord | <ElegantBeef> A cast could work but probably will damage the heap |
08:28:22 | FromDiscord | <Aiz> the object kinda small so …↵i think i can do it manually |
08:28:51 | * | Vladar quit (Quit: Leaving) |
08:32:45 | FromDiscord | <ElegantBeef> @Aiz eh couldnt help myself https://play.nim-lang.org/#ix=3nCp |
08:34:08 | FromDiscord | <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:26 | FromDiscord | <Aiz> In reply to @ElegantBeef "<@!804754408638382100> eh couldnt help": oh, thank you |
08:35:45 | FromDiscord | <ElegantBeef> No problem, any ol' excuse to write a macro |
08:40:48 | Amun_Ra | ElegantBeef: couldn't help myself either… https://play.nim-lang.org/#ix=3nCs ;) |
08:41:19 | FromDiscord | <ElegantBeef> Yea yea that was established |
08:43:02 | FromGitter | <bung87> how nim-yaml work with dynamic keys ? |
08:48:24 | FromGitter | <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:56 | lpirl | A 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:33 | FromDiscord | <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:07 | FromGitter | <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:00 | FromDiscord | <Unaimend> Hey does nim specify the default value of enums? |
13:13:35 | FromDiscord | <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:04 | ForumUpdaterBot | New 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:29 | Zoom[m] | Hey, how can I declare a const array with custom indexing? |
15:37:13 | FromDiscord | <Rika> does const a: array[3..4, typ] not work? |
15:46:10 | * | rockcavera joined #nim |
15:54:48 | FromDiscord | <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:51 | FromDiscord | <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:00 | FromGitter | <bung87> any recommand yaml lib ? I searched github cant find full featured yaml lib |
16:57:27 | Zoom[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:05 | Zoom[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:59 | nphg1 | Zoom: `const foo: tuple[a: array[1..2, int]] = (a: [8, 4])` or `const foo = (a: array[1..2, int]([8,4]))` |
17:22:11 | Zoom[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:39 | Zoom[m] | I meant "type conversion form" |
17:32:33 | FromDiscord | <jseb> hello, is it possible to assign an UncheckedArray (allocated with `alloc`) without copying elements one by one from another array ? |
17:44:12 | leorize[m] | what are you trying to do? |
17:46:16 | FromDiscord | <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:43 | FromDiscord | <jseb> (edit) "loop." => "loop.↵That means, loading the object to an array, and then copy the array" |
17:48:07 | FromDiscord | <jseb> (edit) "array" => "array↵The sample is here : https://github.com/greenfork/nimraylib_now/blob/master/examples/models/models_mesh_generation.nim" |
17:49:08 | FromDiscord | <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:16 | leorize[m] | that sounds buggy |
18:13:17 | leorize[m] | how do you free this mesh? |
18:13:38 | leorize[m] | is raylib supposed to free this? |
18:21:23 | leorize[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:45 | FromDiscord | <jseb> i think i'm doing that wrong… |
18:49:19 | FromDiscord | <jseb> maybe with a simple buffer filled with value and then casted to UncheckedArray it would be easier |
18:59:53 | leorize[m] | you still have to free this buffer |
19:52:03 | FromDiscord | <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:04 | FromDiscord | <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:20 | FromDiscord | <willyboar> sent a code paste, see https://play.nim-lang.org/#ix=3nFK |
20:26:33 | FromDiscord | <willyboar> @ajusa ^^^ |
20:27:21 | FromDiscord | <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:28 | FromDiscord | <ajusa> (edit) "why" => "how" |
20:28:14 | FromDiscord | <willyboar> @ElegantBeef is a magician |
20:28:32 | FromDiscord | <ElegantBeef> I cannot deny or confirm this claim |
20:29:31 | FromDiscord | <ElegantBeef> Tried again just now and yea same thing, willy what gcc are you using? |
20:30:08 | FromDiscord | <willyboar> gcc version 10.2.0 (GCC) |
20:30:22 | FromDiscord | <ElegantBeef> Ah another 10.x |
20:30:25 | FromDiscord | <ElegantBeef> I'm on 9.3 |
20:30:29 | FromDiscord | <ajusa> Is it really `gcc` dependent? How do I even downgrade `gcc` safely |
20:30:47 | FromDiscord | <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:08 | FromDiscord | <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:14 | FromDiscord | <willyboar> so we need one more running 9.X |
20:33:45 | FromDiscord | <ElegantBeef> Well you didnt inherit the cat from rootref, but that still didnt resolve the issue |
20:34:19 | FromDiscord | <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:55 | FromDiscord | <ElegantBeef> Well it uses the rootref inheritance for converting to an homogenous type |
20:35:26 | FromDiscord | <ElegantBeef> But that aside it doesnt resolve the object conversion |
20:36:33 | FromDiscord | <ajusa> interesting, so with `tcc` I get invalid object conversion (but only after changing that to RootRef, otherwise I get a segfault) |
20:36:35 | FromDiscord | <ElegantBeef> Seems it packs/unpacks non root ref inheriting objects |
20:36:52 | FromDiscord | <ElegantBeef> Ah so it's the C compiler causing the linker issue |
20:36:52 | * | noeontheend joined #nim |
20:37:22 | FromDiscord | <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:17 | FromDiscord | <ajusa> bruh: https://gcc.gnu.org/gcc-10/porting_to.html |
20:39:21 | FromDiscord | <ajusa> read the first thing |
20:40:20 | FromDiscord | <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:44 | FromDiscord | <ElegantBeef> Yep go debug it now 😛 |
20:42:39 | FromDiscord | <ajusa> don't want to 😢 ↵at the very least I'll update the issue and attempt to solve it |
20:44:55 | FromDiscord | <ElegantBeef> Well i'll take a whirl at it after i walk my dogs, but no promises 😄 |
20:55:06 | FromDiscord | <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:34 | saem | makes sense, I forgot about the imported modules. |
20:55:48 | FromDiscord | <ElegantBeef> Oh also danger, that made it go from 4400 to 5200 |
20:56:00 | FromDiscord | <ElegantBeef> So just a few flags and went up drastically |
20:56:42 | FromDiscord | <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:15 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3nFW |
21:06:23 | FromDiscord | <ajusa> (edit) |
21:07:24 | FromDiscord | <ajusa> oh it works on devel. Neat, guess a bug was fixed at some point |
21:08:39 | FromDiscord | <ElegantBeef> Ah |
21:09:50 | ForumUpdaterBot | New 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:41 | FromDiscord | <Unaimend> In reply to @InventorMatt "yes, the default value": thanks |
22:34:58 | * | test_usr joined #nim |
22:37:26 | FromGitter | <BracketMaster> So when compiling on Mac, nim can't find my dylib |
22:37:48 | FromGitter | <BracketMaster> to fix this, I explicitly set the `DYLD_LIBRARY_PATH` environment variable' |
22:38:13 | FromGitter | <BracketMaster> so I can do `nim -c prog.nim; ./prog`, but not `nim -c r prog.nim` |
22:38:38 | FromGitter | <BracketMaster> is there an option to point nim to where dylibs might live? |
22:40:47 | FromDiscord | <timotheecour> see also rpath |
22:41:14 | FromGitter | <BracketMaster> rpath? |
22:49:31 | * | hyiltiz quit (Ping timeout: 260 seconds) |
22:53:31 | FromGitter | <BracketMaster> I found something on rpath here |
22:53:32 | FromGitter | <BracketMaster> https://pewpewthespells.com/blog/using-sanitizers-with-nim.html |
22:53:43 | FromGitter | <BracketMaster> unfortunately - didn't seem to help |
22:54:00 | FromGitter | <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:04 | FromDiscord | <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:55 | FromGitter | <BracketMaster> alaright |
23:10:43 | FromGitter | <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:54 | FromDiscord | <ElegantBeef> If you're doing it a lot this might do the trick https://play.nim-lang.org/#ix=3nGO |
23:17:17 | FromGitter | <BracketMaster> that works |
23:17:59 | * | noeontheend joined #nim |