00:00:54 | FromDiscord | <Elegantbeef> The fact you get the `when` branches on introspection without introspecting `Attestiation` is odd |
00:01:06 | FromDiscord | <Elegantbeef> So yea this is a mess |
00:01:42 | FromDiscord | <Patitotective> In reply to @Zevv "as you want this": When you say _stack_ do you mean a sequence or? |
00:02:23 | FromDiscord | <mratsim> a stack can be backed by a sequence but it's just a data structure with push/pop from thr end only |
00:02:48 | FromDiscord | <mratsim> no lookup in arbitrary places for example, no iteration |
00:02:55 | FromDiscord | <Elegantbeef> In Nim atleast sequences are generally used as a stack since they have `pop` |
00:03:07 | FromDiscord | <mratsim> (edit) "thr" => "the" |
00:03:29 | FromDiscord | <Elegantbeef> It's an `O(1)` insertion at the tail and a `O(1)` removal |
00:03:39 | FromDiscord | <Patitotective> Ok thanks 🙃 |
00:03:54 | FromDiscord | <Elegantbeef> unless you need to grow the collection |
00:04:18 | FromDiscord | <Elegantbeef> That's so odd that you do not get the instantiated AST |
00:04:27 | FromDiscord | <Elegantbeef> still amazed by that |
00:05:53 | FromDiscord | <Elegantbeef> Oh right you're getting a bracket expression |
00:08:30 | FromDiscord | <Elegantbeef> Mratsim do you know the hack for the https://github.com/nim-lang/Nim/issues/16639 of assigning the type to a variable and passing the variable to an actual macro? |
00:08:31 | FromDiscord | <mratsim> I get nodes with just "Type" as well |
00:09:30 | FromDiscord | <mratsim> I know that hack and I know the hack of not assigning a type to a variable and passing it directly as well |
00:09:58 | FromDiscord | <Elegantbeef> What's the latter hack look like? |
00:10:20 | FromDiscord | <mratsim> sent a long message, see http://ix.io/3M1V |
00:10:45 | FromDiscord | <mratsim> https://github.com/status-im/nimbus-eth2/commit/ce0f7af862a5319a49e74ef3539d9ad8016e181d |
00:10:59 | * | krux02 quit (Remote host closed the connection) |
00:11:11 | FromDiscord | <mratsim> L219 for the storing, and L114 for the unstoring |
00:15:51 | FromDiscord | <Elegantbeef> Yea this stuff is silly |
00:15:59 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3M1W isnt a good solution 😀 |
00:17:26 | FromDiscord | <Elegantbeef> I just had to make 100% certain i wasnt crazy |
00:17:55 | FromDiscord | <Elegantbeef> I guess the issue is that passing a generic typedesc doesnt mean instantiation ever occured |
00:18:06 | FromDiscord | <Elegantbeef> Whereas assigning it a variable means it occurs |
00:27:52 | arkanoid | been wasting a lot of time on a weird futhark/clang SIGSEGV that I've reproduced in a minimal example case in docker |
00:28:03 | arkanoid | I'm not sure what's going on here |
00:31:41 | FromDiscord | <Patitotective> Is there a `parseSeq` procedure? |
00:33:43 | * | koltrast joined #nim |
00:34:14 | FromDiscord | <Elegantbeef> There is not |
00:34:29 | FromDiscord | <Elegantbeef> `parseSeq` is ambiguous there is no common seq format |
00:35:11 | FromDiscord | <Patitotective> so? |
00:35:31 | FromDiscord | <Elegantbeef> So what? |
00:56:56 | FromDiscord | <tsoj> How can I remove every last bit of choosenim and nimble from my machine (Manjro Linux)? |
01:01:21 | FromDiscord | <Patitotective> In reply to @Elegantbeef "So what?": so how do i parse a sequence that's represented in a string? |
01:02:05 | FromDiscord | <Elegantbeef> Depends on the string |
01:02:33 | FromDiscord | <Elegantbeef> Assuming it's `[]` you iterate over it parsing each element internally |
01:02:52 | FromDiscord | <Patitotective> `"@[1, "a"]"`↵And I need to convert each element to a `PrefsNode` |
01:02:55 | FromDiscord | <Elegantbeef> Then nested collections require you counting open/closed\` |
01:03:15 | FromDiscord | <Patitotective> In reply to @Elegantbeef "Assuming it's `[]` you": do i need to parse the sequence manually? like split the elements manually? |
01:03:19 | FromDiscord | <Rika> Yes |
01:03:23 | FromDiscord | <Elegantbeef> Dont split it |
01:03:41 | FromDiscord | <Patitotective> In reply to @Elegantbeef "Dont split it": then? |
01:03:42 | FromDiscord | <Rika> You can use parse utils for that |
01:03:48 | FromDiscord | <Rika> No splitting needed |
01:03:49 | FromDiscord | <Elegantbeef> iterate over it |
01:04:07 | FromDiscord | <Elegantbeef> parseutils is a nice API to iterate over it |
01:04:14 | FromDiscord | <evoalg> `@[1, "a"]` is not a valid seq |
01:04:27 | FromDiscord | <Elegantbeef> Eh they're using object variants so it's a representatiion |
01:04:52 | FromDiscord | <Elegantbeef> Either way you need to identify the type, if it doesnt start with a `"` you know it's an int or float |
01:04:59 | FromDiscord | <Elegantbeef> if it doesnt have a `.` you know it's an int |
01:04:59 | FromDiscord | <Patitotective> In reply to @Elegantbeef "parseutils is a nice": could you give me an example? |
01:05:10 | FromDiscord | <Elegantbeef> Fine |
01:05:16 | FromDiscord | <Patitotective> yea, i already have the types defined in my parser grammar |
01:05:20 | FromDiscord | <Elegantbeef> Lazy bums! 😛 |
01:05:21 | FromDiscord | <Rika> Beef you are weak smh |
01:05:44 | FromDiscord | <Elegantbeef> I'm not going to do it nicely |
01:06:42 | FromDiscord | <Patitotective> In reply to @Elegantbeef "Lazy bums! 😛": hey, at least i dont have a dog in my pfp lmao |
01:06:52 | FromDiscord | <Elegantbeef> The fuck does that mean |
01:06:55 | FromDiscord | <Elegantbeef> Leave my dog out of this |
01:09:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3M26 |
01:10:34 | FromDiscord | <Elegantbeef> ` assert s.toOpenArray(0, 1) == ['@', '[']` better |
01:10:46 | FromDiscord | <Patitotective> Thanks 😺 |
01:11:12 | FromDiscord | <Elegantbeef> See rika it's a really shitty impl that assumes 900 things |
01:12:06 | FromDiscord | <Rika> Why don’t you use skip while? |
01:12:51 | FromDiscord | <Elegantbeef> Instead of the setting to `2`? |
01:13:01 | FromDiscord | <Rika> No instead of skipping until |
01:13:11 | FromDiscord | <Elegantbeef> It's the same thing |
01:13:22 | FromDiscord | <Rika> Not if you want to expand out of integers |
01:14:03 | FromDiscord | <Elegantbeef> If you want to support {float, string, int} all you have to do is `skipUntil(Digits + {'.', '"'})` |
01:14:47 | FromDiscord | <Elegantbeef> skipWhile is afterall just the opposite of skipuntil |
01:14:54 | FromDiscord | <Elegantbeef> They do the same thing you just pass the opposite flags |
01:15:09 | FromDiscord | <Rika> I know, you don’t need the digits set of you use skip while though |
01:15:18 | FromDiscord | <Rika> You don’t need to even use the opposite set |
01:15:33 | FromDiscord | <Rika> Just pass the same set as the last one |
01:15:39 | FromDiscord | <Elegantbeef> `Skips all characters while one char from the set token is found.`? |
01:16:30 | arkanoid | I have a minimal C example and a minimal Nim example calling the same C functions, the C one works, the Nim SIGSEGV. I'm trying to track down the issue, but I'm failing. The testcase is very small: Nim -> https://github.com/arkanoid87/futhest/blob/master/src/futhest.nim , C -> https://github.com/arkanoid87/futhest/blob/master/csrc/futhest.c |
01:17:14 | FromDiscord | <Elegantbeef> Rika I'm probably just misunderstanding what you mean |
01:17:19 | FromDiscord | <Rika> Likely |
01:17:25 | FromDiscord | <Rika> I don’t know how |
01:17:46 | FromDiscord | <Elegantbeef> Well i'm an idiot |
01:17:47 | FromDiscord | <Elegantbeef> So that doesnt help |
01:26:43 | * | noeontheend joined #nim |
01:42:34 | FromDiscord | <auxym> Hey @ElegantBeef my nim tinyusb stuff is compiling. Not doing anything useful yet, but at least correctly showing up as hid+cdc under linux |
01:42:57 | FromDiscord | <Elegantbeef> Nice! |
01:47:38 | FromDiscord | <Elegantbeef> @mratsim\: after looking at what's going on I do think not being able to get the instantiated type information makes sense for `A[int]` but there should be a VM operation like `instantiateType` which takes a `nnkBracketExpr` and instantiates it returning a `sym` to it |
01:52:08 | NimEventer | New thread by Giaco: Tracking down SIGSEGV. What's the difference between this Nim and C code?, see https://forum.nim-lang.org/t/8796 |
01:54:29 | arkanoid | yup, that's me, if you have some FFI knowledge should be easy to track down. I just can't see where the problem is |
01:58:09 | FromDiscord | <Patitotective> How can I ignore some rule in _npeg_? Like ignore a comment, or match something but not include it |
01:59:06 | FromDiscord | <Rika> just parse it and do nothing with it |
02:05:55 | FromDiscord | <Patitotective> In reply to @Rika "just parse it and": LOL it worked, hehe i was thinking on other parser |
02:08:03 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M2l |
02:26:31 | * | neurocyte091705 joined #nim |
02:28:48 | * | neurocyte09170 quit (Ping timeout: 250 seconds) |
02:28:48 | * | neurocyte091705 is now known as neurocyte09170 |
02:52:51 | * | adigitoleo quit (Quit: adigitoleo) |
03:13:52 | * | adigitoleo joined #nim |
03:41:09 | * | arkurious quit (Quit: Leaving) |
04:08:47 | NimEventer | New thread by Xioren: Thoughts on error vs fatal log levels?, see https://forum.nim-lang.org/t/8797 |
04:51:23 | arkanoid | Yardanico: you got it, it is a regression |
04:51:33 | arkanoid | damn I've wasted so many hours on this |
05:18:49 | * | vicfred quit (Quit: Leaving) |
05:26:13 | * | kayabaNerve_ quit (Ping timeout: 240 seconds) |
05:28:32 | * | kayabaNerve joined #nim |
05:36:03 | * | rockcavera quit (Remote host closed the connection) |
05:43:00 | FromDiscord | <blans> sent a code paste, see https://play.nim-lang.org/#ix=3M2M |
05:43:10 | FromDiscord | <Elegantbeef> it's for generics |
05:43:16 | arkanoid | do you know why querySetting(nimcacheDir) has suffix _check when executed by nimsuggest? |
05:43:17 | FromDiscord | <Rika> Here is beef |
05:43:26 | FromDiscord | <Rika> About to write an essay on this |
05:43:30 | FromDiscord | <blans> what does it do? |
05:43:51 | FromDiscord | <Elegantbeef> when used in a generic `bind` says "Hey only use procedures declared above named `x`" in the case you did `bind x` |
05:44:08 | FromDiscord | <Elegantbeef> It closes the symbol's resolution to the generic's declaration |
05:44:18 | FromDiscord | <Elegantbeef> So it only looks at what is available |
05:44:30 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#generics-bind-statement |
05:44:31 | FromDiscord | <blans> why can you set it to a type then |
05:44:38 | FromDiscord | <Rika> Mixin is the reverse if you wonder |
05:44:44 | FromDiscord | <Elegantbeef> Why would you be able to |
05:44:49 | FromDiscord | <blans> see the syntax above |
05:44:51 | FromDiscord | <blans> it compiles for some reason |
05:44:53 | FromDiscord | <Elegantbeef> `type A = bind int` makes no sense |
05:45:01 | FromDiscord | <Elegantbeef> dumptree isnt typed |
05:45:03 | FromDiscord | <blans> it uses `nnkBind` instead of `nnkBindStmt` |
05:45:05 | FromDiscord | <Elegantbeef> It's not semantically checked |
05:45:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3M2N |
05:45:34 | FromDiscord | <Elegantbeef> Untyped code does not have to be semantically checked |
05:45:36 | FromDiscord | <blans> why would it have its own node then |
05:45:38 | FromDiscord | <Elegantbeef> It just has to parse |
05:45:41 | FromDiscord | <blans> why is it parsing |
05:45:51 | FromDiscord | <Rika> Because that’s syntax not semantically checked yet |
05:45:52 | FromDiscord | <Elegantbeef> Cause it's written Nim code? |
05:46:04 | FromDiscord | <blans> no other statement works |
05:46:11 | FromDiscord | <blans> how do I say this |
05:46:20 | FromDiscord | <blans> it looks like there is supposed to be some use of `bind` for types specifically |
05:46:22 | FromDiscord | <Rika> There needs to be a representation for code that has been checked in syntax but not in semantics |
05:46:29 | FromDiscord | <blans> and there is specific parser behavior for it |
05:46:35 | FromDiscord | <Rika> Again it makes no sense semantically but it does syntactically |
05:46:41 | FromDiscord | <Elegantbeef> There isnt↵(@blans) |
05:46:44 | FromDiscord | <Rika> That is probably reserved for future use |
05:47:02 | FromDiscord | <Elegantbeef> that works aswell |
05:47:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/Ncz |
05:47:10 | FromDiscord | <blans> that could work |
05:47:29 | FromDiscord | <blans> sent a code paste, see https://play.nim-lang.org/#ix=3M2O |
05:47:31 | FromDiscord | <Rika> sent a code paste, see https://paste.rs/Twz |
05:47:38 | FromDiscord | <Rika> In reply to @blans "that could work": But it doesn’t, because that isn’t there |
05:47:48 | FromDiscord | <Rika> You could say bind could work too if you made the template for it… |
05:48:01 | FromDiscord | <blans> I have no gripes with you guys' point of what dumpTree does |
05:48:02 | FromDiscord | <Rika> Though actually |
05:48:05 | FromDiscord | <Rika> I think it’s a keyword |
05:48:16 | FromDiscord | <blans> I was just confused by why it's parsed specifically and differently than the regular bind statement and for types only |
05:48:20 | FromDiscord | <blans> it also works in generic constraints |
05:48:27 | FromDiscord | <Rika> Not for types only I assume |
05:48:37 | FromDiscord | <Rika> Try assigning a var to “bind something” |
05:48:40 | FromDiscord | <Rika> Prolly has the same node |
05:48:45 | FromDiscord | <Elegantbeef> If bind is on the right side of any `=` it turns into `nnkBind` |
05:48:51 | FromDiscord | <Rika> Yup |
05:48:53 | FromDiscord | <Elegantbeef> For instance |
05:48:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3M2P |
05:49:08 | FromDiscord | <Rika> Beef ignored my insult lmfao |
05:49:08 | FromDiscord | <blans> that is weird |
05:49:11 | FromDiscord | <Rika> Not really |
05:49:12 | FromDiscord | <Elegantbeef> nnkBindStmt doesnt make sense when it's returned |
05:49:17 | FromDiscord | <Rika> Expression and statement distinction |
05:49:26 | FromDiscord | <Elegantbeef> Indeed |
05:49:32 | FromDiscord | <Elegantbeef> I seen it rika |
05:49:38 | FromDiscord | <blans> yes I am just confused by whether or not there is supposed to be an actual bind expression |
05:49:40 | FromDiscord | <blans> sorry |
05:49:48 | FromDiscord | <Elegantbeef> Well then ask that question 😛 |
05:49:51 | FromDiscord | <Rika> There could be in the future |
05:49:58 | FromDiscord | <Rika> Now there is not |
05:50:01 | FromDiscord | <Elegantbeef> The answer is presently there is not, but there could be in the future not that it makes sense |
05:50:26 | arkanoid | is it normal that querySetting(nimcacheDir) ends with "_d" or "_r" for my project, but for "_check" for nimsuggest and code completion? |
05:50:27 | FromDiscord | <Rika> It’s just an “in case someone changes their mind and thinks it’s a good idea we at least have it reserved” |
05:50:31 | FromDiscord | <Elegantbeef> Nim generally implicitly adds to scope, so a bind expression would be an oddity |
05:50:43 | FromDiscord | <Rika> In reply to @arkanoid "is it normal that": D and r means debug and release no? |
05:50:52 | FromDiscord | <Rika> I assumed it’s what it meant |
05:51:34 | arkanoid | yes, and I'm ok with it, but I'm fighting with nimsuggest not working because he it's looking for files in ~/.cache/nim/myproject_check, that does not exist |
05:52:05 | FromDiscord | <Rika> It probably does for a brief moment when it runs then gets deleted? Not sure, Nim suggest is a nightmare I’d say |
05:52:41 | arkanoid | oh :( ok |
05:53:08 | arkanoid | so it must be a bug in futhark |
05:53:10 | FromDiscord | <Rika> I’m just guessing here |
05:55:17 | * | Gustavo6046 quit (Remote host closed the connection) |
05:57:36 | arkanoid | apparently it is like you said. You can't use querySetting(nimcacheDir) in macros otherwise nimsuggest would error out |
05:57:46 | arkanoid | relevant issue https://github.com/PMunch/futhark/issues/12 |
05:57:58 | * | rb quit (Quit: ZNC - https://znc.in) |
05:58:16 | * | Gustavo6046 joined #nim |
05:59:10 | * | rwb joined #nim |
06:02:54 | arkanoid | is nimsuggest code all here? https://github.com/nim-lang/nimsuggest? If I search for "cache" or "check" I'm getting zero result. I want to understand when querySetting(nimcacheDir) results in suffix "_check" and when not |
06:05:23 | FromDiscord | <xflywind> In reply to @arkanoid "is nimsuggest code all": https://github.com/nim-lang/Nim/tree/devel/nimsuggest |
06:05:58 | FromDiscord | <xflywind> here you are |
06:27:56 | * | Lord_Nightmare quit (Read error: Connection reset by peer) |
06:29:22 | * | Lord_Nightmare joined #nim |
06:37:03 | * | Onionhammer quit (Quit: Ping timeout (120 seconds)) |
06:37:17 | * | rwb is now known as rb |
06:37:21 | * | Onionhammer joined #nim |
06:44:42 | * | Lord_Nightmare quit (Read error: Connection reset by peer) |
06:47:18 | * | Lord_Nightmare joined #nim |
06:56:16 | * | vicfred joined #nim |
06:58:03 | * | Lord_Nightmare quit (Read error: Connection reset by peer) |
06:58:43 | * | Lord_Nightmare joined #nim |
07:03:04 | * | vicecea quit (Remote host closed the connection) |
07:03:32 | * | vicecea joined #nim |
07:06:09 | * | PMunch joined #nim |
07:12:08 | * | jjido joined #nim |
07:36:46 | * | mahlon quit (Ping timeout: 260 seconds) |
08:24:58 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
09:19:02 | * | jjido joined #nim |
09:25:56 | * | vicfred quit (Quit: Leaving) |
09:34:07 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:16:36 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3M3H |
10:18:41 | FromDiscord | <hmmm> I'm possibly missing a return / result somewhere lol |
10:21:09 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3M3I |
10:21:32 | FromDiscord | <hmmm> 👀 |
10:21:54 | FromDiscord | <hmmm> b-b-ut I want to do it with the nnks |
10:22:11 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3M3J |
10:23:01 | FromDiscord | <Tanguy> `nnkEmpty.newNimNode` could also be `newEmptyNode` if that's your jam |
10:23:48 | FromDiscord | <hmmm> I was missing a bunch of trees lol 😃 |
10:26:09 | * | Gustavo6046 quit (Quit: Leaving) |
10:26:21 | FromDiscord | <Elegantbeef> `newVarStmt` 😛 |
10:27:19 | FromDiscord | <hmmm> beef you still around! go sleep man, by the time you wake up I will have a non working version of for i in seq: echo i macro to submit to you |
10:27:53 | FromDiscord | <Rika> Just use quote… |
10:28:11 | FromDiscord | <Elegantbeef> I mean i think they're attempting to learn the AST |
10:28:13 | FromDiscord | <Elegantbeef> So the answer is "just use dumptree\` |
10:28:24 | FromDiscord | <hmmm> heh I'm still in the part of the manual in which quote is not introduced so I can't use it |
10:28:52 | FromDiscord | <Elegantbeef> use dumptree and you'll learn AST faster |
10:29:05 | FromDiscord | <hmmm> make example on how to use dumptree |
10:29:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3M3K |
10:29:08 | FromDiscord | <hmmm> ah ok |
10:29:20 | FromDiscord | <hmmm> I see! |
10:29:22 | FromDiscord | <hmmm> very comfy |
10:29:24 | FromDiscord | <Elegantbeef> Have you not read my macros tutorial? |
10:29:47 | FromDiscord | <Elegantbeef> Also dont use quote, `std/genasts` is nicer! |
10:29:49 | FromDiscord | <hmmm> nu beef they are 2 or 3 orders of magnitude harder than I can grok, the thing that for now it's working is the manual lol |
10:30:06 | FromDiscord | <Elegantbeef> I mean it shows dumptree |
10:30:13 | FromDiscord | <hmmm> link! |
10:30:17 | NimEventer | New thread by Trisub: Get formatted SQL query, see https://forum.nim-lang.org/t/8799 |
10:30:18 | FromDiscord | <Elegantbeef> https://dev.to/beef331/demystification-of-macros-in-nim-13n8 |
10:30:35 | FromDiscord | <hmmm> ok I'll read it 🥳 |
10:38:12 | FromDiscord | <Elegantbeef> And now to take your advice and to go to sleep |
10:54:18 | FromDiscord | <Rika> In reply to @Elegantbeef "Also dont use quote,": Sell me on it later when you wake |
11:00:48 | * | jjido joined #nim |
11:09:02 | * | dtomato quit (Ping timeout: 240 seconds) |
11:11:35 | * | oprypin quit (Remote host closed the connection) |
11:19:39 | * | Vladar joined #nim |
11:35:25 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
11:37:38 | * | oprypin joined #nim |
11:43:22 | * | oprypin quit (Quit: Bye) |
11:44:27 | PMunch | genast just looks like quote with extra steps |
12:22:04 | * | rockcavera joined #nim |
12:22:04 | * | rockcavera quit (Changing host) |
12:22:04 | * | rockcavera joined #nim |
12:30:12 | * | oddish quit (Quit: oddish) |
12:48:13 | * | yann-kaelig joined #nim |
12:48:23 | * | yann-kaelig left #nim (#nim) |
12:55:26 | * | jjido joined #nim |
13:03:40 | FromDiscord | <eyecon> In reply to @Elegantbeef "https://dev.to/beef331/demystification-of-macros-in": Ah, you wrote that - that was a nice article indeed |
13:03:43 | FromDiscord | <eyecon> Thanks |
13:04:37 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:14:58 | PMunch | arkanoid, you around? |
13:19:00 | PMunch | Hmm, it's a shame that nimble doesn't have any kind of hooking infrastructure.. |
13:23:15 | FromDiscord | <Bung> @PMunch https://github.com/PMunch/nimlsp/pull/109 could this be merged so that I can split rest part of my big PR |
13:23:53 | PMunch | That is still a massive PR to go through, haven't had time for it |
13:24:13 | PMunch | Probably won't have time for it until after the FOSDEM video recording deadline, possibly not until after FOSDEM itself |
13:26:23 | PMunch | You should still be able to split it up |
13:55:09 | FromDiscord | <Patitotective> does _npeg_ has an example of parsing nim? |
13:55:14 | FromDiscord | <Patitotective> (edit) "has" => "have" |
13:55:42 | FromDiscord | <Patitotective> (edit) "does _npeg_ have an example of parsing nim? ... " added "i'm trying to parse a string but i'm not sure how" |
13:55:53 | * | jjido joined #nim |
13:56:03 | FromDiscord | <Patitotective> (edit) "how" => "how↵are java strings similar to nim? (because there's a java example)" |
13:57:03 | PMunch | You want to parse the same kind of strings that Nim can parse? |
13:57:10 | FromDiscord | <Patitotective> yea |
13:57:14 | PMunch | I.e. "Something \t with escapes" etc |
13:57:32 | FromDiscord | <Patitotective> yes |
13:57:37 | PMunch | Do you also want to support """ and things like r"raw string" |
13:57:47 | FromDiscord | <Patitotective> just raw strings |
13:57:54 | PMunch | Just raw strings? |
13:58:07 | FromDiscord | <Patitotective> i dont want multiline strings |
13:58:10 | FromDiscord | <Patitotective> (edit) "multiline" => "multi-line" |
13:58:17 | FromDiscord | <Patitotective> (edit) "i dont want ... multi-line" added "to parse" |
13:58:36 | PMunch | Raw strings don't have any escaping |
13:59:05 | PMunch | Well apart from double "" to mean one " |
14:00:07 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M4t |
14:00:48 | FromDiscord | <Patitotective> So I don't have to say which characters are valid and which are not (?) |
14:00:59 | FromDiscord | <Patitotective> Just take everything in quotes |
14:01:06 | FromDiscord | <Rosen> Won't 1 be greedy? I feel like that will gobble 2 strings on one line into 1 string |
14:01:24 | FromDiscord | <Rosen> Should do a character class of everything but " I feel for that 1 term |
14:01:42 | FromDiscord | <Patitotective> my syntax only allows one string per line |
14:02:06 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M4w |
14:02:14 | PMunch | It should be starts with ", followed by "" or !", ending with " |
14:02:22 | Zevv | '"' * >*(1-'"') * '"' |
14:02:44 | Zevv | if you want to handle escapes, look at the json parser |
14:02:53 | Zevv | like "this\"contains a quote" |
14:03:44 | FromDiscord | <Patitotective> In reply to @Zevv "like "this\"contains a quote"": but in nim that's not valid, isn't it? |
14:03:51 | Zevv | sure it is |
14:03:55 | FromDiscord | <Patitotective> you should `\"` |
14:05:24 | Zevv | I did, didn't I? |
14:05:35 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M4z |
14:06:00 | Zevv | the unicode escape is not nim |
14:06:10 | FromDiscord | <Patitotective> ok |
14:06:22 | Zevv | https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals |
14:06:54 | Zevv | there is also a complete valid java parser in misc/java.nim |
14:07:05 | Zevv | but it's huge and nasty to understand all of it |
14:07:20 | Zevv | you can steal StringLiteral from there I guess |
14:10:33 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M4A |
14:10:38 | FromDiscord | <Patitotective> or `OctalEscape` too? |
14:10:48 | FromDiscord | <Patitotective> (edit) "or `OctalEscape` too?" => "and `OctalEscape`?" |
14:19:54 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M4C |
14:20:03 | FromDiscord | <Patitotective> (edit) "https://paste.rs/Q2D" => "https://play.nim-lang.org/#ix=3M4D" |
14:20:13 | FromDiscord | <Patitotective> In reply to @Zevv "https://nim-lang.org/docs/manual.html#lexical-analy": According to that |
14:21:26 | FromDiscord | <Patitotective> But I'm not sure about the `escape | 1` part |
14:22:02 | FromDiscord | <Patitotective> If It's not an escaped character, what it should be? alphanum characters? printable characters? |
14:24:47 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M4G |
14:24:54 | FromDiscord | <Patitotective> (edit) "https://play.nim-lang.org/#ix=3M4G" => "https://play.nim-lang.org/#ix=3M4H" |
14:36:13 | FromDiscord | <Patitotective> Is there a parse string procedure? I have a raw string `"\asd"` and I want to parse it into `"\7sd"` |
14:51:18 | * | arkurious joined #nim |
14:56:29 | FromDiscord | <Patitotective> I was https://nim-lang.org/docs/strutils.html#unescape%2Cstring%2Cstring%2Cstring |
14:56:38 | * | cuibonobo quit (Quit: Leaving) |
15:07:56 | FromDiscord | <Michal Maršálek> Hi, how can I make the following code work? Thank you. https://play.nim-lang.org/#ix=3LOC |
15:18:19 | * | PMunch quit (Quit: leaving) |
15:31:06 | termer_ | what's it supposed to do? |
15:31:09 | termer_ | you have to give some details |
15:40:24 | FromDiscord | <Patitotective> Hey @PMunch, I'm having a problem with the _npeg_ stuff↵I did use a stack, as you said, to save the key and the value and at the end I converted that stack into a table but the thing is that when it matches a sequence (`?"@" "[" ( val (',' ?S val) ?',' ) "]"`) it matches `val` first and I'm not able to add them to the sequence because I capture the sequence after the values were captured |
15:40:32 | FromDiscord | <Patitotective> What should I do? |
15:41:12 | FromDiscord | <Patitotective> (edit) "converted" => "convert" |
15:42:03 | FromDiscord | <Michal Maršálek> In reply to @termer_ "what's it supposed to": Ok, consider this simpler case: https://play.nim-lang.org/#ix=3M52 |
15:42:06 | FromDiscord | <Michal Maršálek> This works |
15:45:59 | FromDiscord | <Michal Maršálek> And I just need to change it so that the type of the result of `f ` is parametrized by a field of `M` rather than `M` itself. |
15:47:52 | FromDiscord | <Isofruit> Curious question: I have a proc that throws a FieldDefect-Exception at compile time when you do sth wrong (looks if a field pointing to model A is on model B. Since model definitions are known at compile time, this proc can work at compile time). I wanted to unittest that proc, ala "if you use this proc with the wrong models then this shall throw an error"... how do I test if a proc breaks the compiler if it is used wrongly when the co |
15:48:37 | termer_ | I'm honestly not sure, I'm not very advanced with that sort of thing in Nim Michal |
15:50:40 | FromDiscord | <Isofruit> sent a code paste, see https://play.nim-lang.org/#ix=3M55 |
16:29:02 | FromDiscord | <mratsim> In reply to @Isofruit "Curious question: I have": `when compiles(something)` is the ultimate hack |
16:29:33 | FromDiscord | <Isofruit> No way |
16:29:41 | FromDiscord | <mratsim> yesway |
16:29:42 | FromDiscord | <Isofruit> there's a proc, macro or whatever it is that checks if a piece of code compiles? |
16:29:47 | FromDiscord | <mratsim> yes |
16:30:01 | FromDiscord | <Isofruit> You can't hear it, but dear god am I laughing |
16:30:34 | FromDiscord | <Isofruit> Is that std lib? |
16:31:00 | FromDiscord | <mratsim> in system |
16:31:05 | FromDiscord | <mratsim> no need to import anything |
16:31:12 | FromDiscord | <mratsim> Ultimate hack I tell you: https://github.com/numforge/loop-fusion/blob/master/loopfusion.nim#L38-L41 |
16:33:11 | FromDiscord | <Isofruit> I just tested it in my test, it works |
16:33:16 | FromDiscord | <Isofruit> I am legitimately impressed and amused |
16:34:06 | FromDiscord | <Isofruit> sent a code paste, see https://play.nim-lang.org/#ix=3M5i |
16:36:25 | NimEventer | New thread by Prestige: Editor issues, nimsuggest reporting false errors?, see https://forum.nim-lang.org/t/8800 |
16:58:27 | FromDiscord | <TurtleP> hey, so I've been trying to use <https://github.com/Yardanico/nim-taglib> library, but taglib fails to read some of my files due to accented/other chars being in the path or filename. anyone know how I might be able to fix it? |
17:01:53 | FromDiscord | <Yardanico> oh, totally forgot about this repo |
17:02:04 | FromDiscord | <Yardanico> In reply to @TurtleP "hey, so I've been": can you show how you're using the lib? |
17:02:50 | FromDiscord | <TurtleP> sure |
17:03:11 | FromDiscord | <TurtleP> let me throw this on GitHub reaaaal quick |
17:05:31 | FromDiscord | <TurtleP> <https://github.com/TurtleP/MusicScraper/tree/dev/nim> |
17:06:07 | FromDiscord | <Yardanico> also how you installed taglib? |
17:06:10 | FromDiscord | <TurtleP> basically: <https://github.com/TurtleP/MusicScraper/blob/dev/nim/src/tagscraper.nim#L71> |
17:06:24 | FromDiscord | <TurtleP> used my existing msys2 to install that and then copied it over |
17:06:34 | FromDiscord | <Yardanico> no, i mean what repo specifically |
17:06:38 | FromDiscord | <Yardanico> mine or the original? |
17:06:50 | FromDiscord | <TurtleP> oh, your repo, the fork version |
17:07:16 | FromDiscord | <TurtleP> the original repo doesn't even work on latest nim 😅 |
17:07:32 | * | oddish joined #nim |
17:07:35 | FromDiscord | <Yardanico> also btw, you don't need those hacks to get the nimble package version from the nimble package - you can just use NimblePkgVersion strdefine :) but that's another thing |
17:07:46 | FromDiscord | <TurtleP> TIL |
17:08:32 | FromDiscord | <Yardanico> and what is the exact issue? |
17:08:44 | FromDiscord | <Yardanico> i just checked and it worked first try on my music folder with some songs having japanese or similar utf characters |
17:08:51 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/931233340500095056/unknown.png |
17:09:08 | FromDiscord | <TurtleP> is that on Windows or Linux? |
17:09:10 | FromDiscord | <Yardanico> linux |
17:09:14 | FromDiscord | <TurtleP> yeah I'm on Windows |
17:09:23 | FromDiscord | <TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=3M5y |
17:09:39 | FromDiscord | <TurtleP> paths/filenames with these chars don't open |
17:10:39 | FromDiscord | <TurtleP> the lib I used for python, pytaglib, that uses wchar for the path on Windows |
17:10:49 | FromDiscord | <TurtleP> idk if that's helpful to know or not |
17:10:53 | FromDiscord | <TurtleP> and that one works |
17:11:02 | FromDiscord | <TurtleP> but I want to switch to nim for performance reasons |
17:11:46 | FromDiscord | <Yardanico> also just saying - taglib_set_strings_unicode is not needed if you import `taglib` as it does that by itself |
17:12:01 | FromDiscord | <TurtleP> hm, that's what I figured |
17:12:18 | FromDiscord | <TurtleP> I tried setting that to false too, but that didn't fix it |
17:12:19 | FromDiscord | <Yardanico> i can try running with `wine` to see if i can get an error |
17:16:06 | * | mahlon joined #nim |
17:17:38 | FromDiscord | <Ksr> sent a code paste, see https://play.nim-lang.org/#ix=3M5B |
17:17:47 | FromDiscord | <Rika> you read the expectations |
17:17:58 | FromDiscord | <Yardanico> In reply to @Ksr "How exactly should I": this is not a full error |
17:18:09 | FromDiscord | <Yardanico> most lines after `:` also belong to it |
17:18:18 | FromDiscord | <xx_ns> In reply to @TurtleP "hm, that's what I": try converting strings to utf-16 with https://nim-lang.org/docs/encodings.html#convert%2Cstring%2Cstring%2Cstring |
17:18:26 | FromDiscord | <Ksr> Yes. I mean the expectation are clear. I wonder how to interpret the part between < > |
17:18:36 | FromDiscord | <Yardanico> it shows the argument types that you got |
17:18:38 | FromDiscord | <TurtleP> In reply to @xx_ns "try converting strings to": I believe I tried doing that already |
17:18:41 | FromDiscord | <Yardanico> it's hard to say without code |
17:18:48 | FromDiscord | <TurtleP> oh, maybe not that |
17:18:50 | FromDiscord | <TurtleP> I tried runes |
17:19:06 | FromDiscord | <Yardanico> In reply to @xx_ns "try converting strings to": i don't think it's needed here as nim stdlib already does all needed stuff for supporting unicode filenames on windows |
17:20:18 | FromDiscord | <Ksr> (edit) "expectation are" => "expected list is" |
17:22:34 | NimEventer | New thread by Fzrg: Why don't build Nim libraries ecosystem on Rust ecosystem?, see https://forum.nim-lang.org/t/8801 |
17:22:52 | FromDiscord | <Yardanico> "Rust is safer and faster than Nim, and has a bigger community." instant classic |
17:23:14 | FromDiscord | <Yardanico> ok finally mingw boost built |
17:23:58 | FromDiscord | <Yardanico> "So a Rust libraries is better than a Nim library (safer,faster,more actively maintened,..)" |
17:24:24 | * | vicfred joined #nim |
17:24:35 | FromDiscord | <Rika> cant tell if theyre just trying to get a reaction out of us\ |
17:24:40 | FromDiscord | <Yardanico> maybe |
17:25:02 | FromDiscord | <TurtleP> I've tried rust and it's .. not fun tbh |
17:25:09 | FromDiscord | <Yardanico> @TurtleP where did you get libtag_c.dll ? |
17:25:24 | FromDiscord | <TurtleP> it's from msys2's packages |
17:25:25 | FromDiscord | <Isofruit> I'm... confused how Rust is supposedly safer, is that about the match operator and how Rust forces you to cover all possible outcomes of your program with Option and Result? |
17:25:26 | FromDiscord | <Yardanico> ah nvm i have it too now yeah |
17:25:27 | FromDiscord | <TurtleP> I copied it over |
17:25:29 | FromDiscord | <Yardanico> just not the correct folder |
17:25:57 | FromDiscord | <Yardanico> In reply to @Isofruit "I'm... confused how Rust": they probably talk about memory safety, but memory safety is just one of the many aspects of safety |
17:26:05 | FromDiscord | <Yardanico> and nim isn't really "memory unsafe" either |
17:26:11 | FromDiscord | <Yardanico> if you don't use the unsafe features |
17:26:17 | FromDiscord | <Isofruit> But your beginners default on nim is GC'ed |
17:26:28 | FromDiscord | <Isofruit> that is literally the most memory safe you can be I'd argue |
17:27:00 | FromDiscord | <hmmm> well for the libs we should concede at least the actively mantained and less buggier statement by virtue of raw number headcount. The average rust lib has 100 contributors lol |
17:27:53 | FromDiscord | <Yardanico> "average" rust lib has 1 contributor, just like with nim |
17:28:10 | FromDiscord | <Yardanico> maybe 2 at most |
17:28:11 | FromDiscord | <hmmm> really? |
17:28:19 | FromDiscord | <Yardanico> do you know what "average" is? |
17:28:27 | FromDiscord | <hmmm> yea ok but you know what I mean lol |
17:28:30 | FromDiscord | <Rika> its not that the average is higher |
17:28:38 | FromDiscord | <Rika> its more like there are more high-contrib libs |
17:29:12 | FromDiscord | <Rika> it is true maybe a rust wrapping system would be nice |
17:29:30 | FromDiscord | <Rika> the op is just being a shithead expressing it, i guess |
17:29:35 | FromDiscord | <Yardanico> In reply to @Rika "it is true maybe": that already exists |
17:29:41 | FromDiscord | <Rika> it does? |
17:29:43 | FromDiscord | <Rika> 👀 |
17:29:47 | FromDiscord | <Yardanico> but he also does some bold claims like rust is safer, faster, etc |
17:29:52 | FromDiscord | <Yardanico> and we should all just use rust libs instead of making nim ones |
17:29:56 | FromDiscord | <Yardanico> In reply to @Rika "it does?": yes |
17:30:12 | FromDiscord | <Yardanico> https://forum.nim-lang.org/t/5816 |
17:30:40 | FromDiscord | <Rika> dope |
17:30:53 | FromDiscord | <Rika> do people still say dope |
17:30:55 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
17:31:49 | FromDiscord | <Isofruit> I do, I am people, so yes |
17:32:15 | FromDiscord | <hmmm> I mean the bold claim is thinking sane people that have nim would ever write a line of rust in their life |
17:32:28 | FromDiscord | <Yardanico> @TurtleP yeah i can kind of get the same errors, i'll try to see if i can do anything about that https://media.discordapp.net/attachments/371759389889003532/931239286303490068/unknown.png |
17:32:36 | FromDiscord | <Yardanico> maybe taglib behaves different under windows or something (this is with wine) |
17:38:00 | FromDiscord | <Yardanico> ill see |
17:38:38 | FromDiscord | <Isofruit> @Yardanico A lot more diplomatically put than I'd have felt responding, kudos (to the forum post) |
17:39:21 | FromDiscord | <Yardanico> well i just responded how i felt in the moment, didn't think a lot about the post :P |
17:39:49 | FromDiscord | <Yardanico> ah right @TurtleP you said that there's a python binding, right? |
17:39:52 | FromDiscord | <TurtleP> mhm |
17:40:01 | FromDiscord | <Yardanico> i wonder how they handle that |
17:40:10 | FromDiscord | <TurtleP> using wchar iirc |
17:40:12 | FromDiscord | <Isofruit> The post just smelled a bit like dishonest discourse to me |
17:40:13 | FromDiscord | <Yardanico> what C function do they call specifically, because taglib_file_new only takes `const char filename` |
17:40:17 | FromDiscord | <Yardanico> there's no overload for wchar with it |
17:40:22 | FromDiscord | <TurtleP> hmm |
17:40:25 | FromDiscord | <Isofruit> (edit) "The post just smelled a bit like dishonest discourse to me ... " added "(from the OP)" |
17:40:27 | FromDiscord | <Yardanico> i'll check the source |
17:40:51 | FromDiscord | <TurtleP> <https://github.com/supermihi/pytaglib/blob/main/src/taglib.pyx#L84> |
17:40:54 | FromDiscord | <Yardanico> oh yeah, just like I suspected, pytaglib wraps taglib's C++ API, not the C API |
17:41:10 | FromDiscord | <TurtleP> ah |
17:41:45 | FromDiscord | <Yardanico> and tagpy wraps the C++ api too |
17:42:09 | FromDiscord | <Yardanico> i'll check other bindings too |
17:42:49 | FromDiscord | <TurtleP> btw is there any way to make nim see taglib? apparently it suddenly stopped compiling with it.. |
17:43:00 | FromDiscord | <Yardanico> not sure what you mean by "see" |
17:43:09 | FromDiscord | <TurtleP> I had it copied to the mingw folder under lib |
17:43:37 | FromDiscord | <Yardanico> windows needs the .dlls to be present in the same folder as the binary |
17:43:39 | FromDiscord | <Yardanico> or in $PATH |
17:43:45 | FromDiscord | <TurtleP> it is in path, iirc |
17:44:03 | FromDiscord | <TurtleP> well, not the path that nimble can see I guess |
17:44:40 | FromDiscord | <Yardanico> if you mean the nim library itself - nimble will ensure all paths are correct with `nimble build` or `nimble run` or similar commands |
17:44:48 | FromDiscord | <Yardanico> and $PATH is a system variable |
17:45:43 | FromDiscord | <TurtleP> oh, not user |
17:49:55 | FromDiscord | <Yardanico> yeah @TurtleP i think there are two ways - either write a more complete taglib C api wrapper and use it with nim, or write a C++ binding to TagLib and use it with Nim (then you'll have to always compile with the C++ backend) |
17:50:28 | FromDiscord | <Yardanico> it seems that the C wrapper of the taglib is not really maintained and only has a few most common functions, and even maintainers said that it only has the most basic stuff wrapped |
17:51:10 | FromDiscord | <TurtleP> welp |
17:51:26 | FromDiscord | <TurtleP> yeah nim doesn't even want to compile with taglib here now.. not sure why |
17:51:48 | FromDiscord | <Yardanico> well if it was compiling before then you changed something that made it stop compiling? |
17:51:52 | FromDiscord | <TurtleP> nope |
17:51:56 | FromDiscord | <Yardanico> huh |
17:52:05 | FromDiscord | <Yardanico> maybe you opened a different terminal window without msys or something |
17:52:16 | FromDiscord | <TurtleP> both msys and pwsh fail to build |
17:52:26 | FromDiscord | <Yardanico> changed the environment somehow (build variables, etc) |
17:52:34 | FromDiscord | <Yardanico> it can't magically stop compiling by itself really |
17:52:39 | FromDiscord | <TurtleP> ¯\_(ツ)_/¯ |
17:53:19 | FromDiscord | <TurtleP> might just stick with the python version then, idk what's going on |
17:55:21 | FromDiscord | <Yardanico> well I can't help you much here sadly, I'm not really interested in wrapping TagLib's C++ API :( maybe someone else is |
17:56:18 | FromDiscord | <TurtleP> getting taglib compiled n stuff alone is a pain tbf haha |
17:56:56 | FromDiscord | <Yardanico> well it's very easy on linux and was a littler harder for wine with mingw, luckily someone already added mingw taglib to AUR so I just built it from here |
17:57:23 | FromDiscord | <TurtleP> which is what I did.. so like idk what's going on why nim can't find it ¯\_(ツ)_/¯ |
17:57:29 | FromDiscord | <Yardanico> what exactly can't it find? |
17:57:35 | FromDiscord | <Yardanico> the C library? the nim library? the dll? |
17:57:45 | FromDiscord | <TurtleP> The dll |
17:58:39 | FromDiscord | <Yardanico> have you tried copying the taglib DLL to the folder with the .exe? |
17:58:45 | FromDiscord | <Yardanico> you'll also need to copy all DLLs that are dependencies of that DLL |
17:58:49 | FromDiscord | <Yardanico> (excluding system ones) |
17:59:47 | FromDiscord | <TurtleP> Hmm I haven’t. Though with it refusing to build I dunno what to do. |
17:59:54 | FromDiscord | <Yardanico> and why does it refuse to build? |
18:00:02 | FromDiscord | <Yardanico> it doesn't need the dll to build, dll is only needed for runtime |
18:00:05 | FromDiscord | <TurtleP> Linking issues finding some other stuff |
18:00:14 | FromDiscord | <TurtleP> I’ll check in a few |
18:00:20 | FromDiscord | <TurtleP> Currently doing work things |
18:29:55 | FromDiscord | <konsumlamm> In reply to @hmmm "I mean the bold": the bold claim is thinking that this is true |
18:34:52 | FromDiscord | <Yardanico> https://forum.nim-lang.org/t/8801#57363 |
18:35:09 | FromDiscord | <Isofruit> Yeh, I think shoving rust off does a disservice to the very real discussion that can be had there... but chances are, that has already been had a dozen times. ↵↵Rust has stuff going for it, but also a learning curve that is effectively a wall at a 90° angle that forces you to re-learn how to do everything the "right" way(s) in rust. ↵Same for nim, whose learning curve is much gentler, yet punches in the same weight class. |
18:38:53 | FromDiscord | <Isofruit> (That's from a webdev perspective, not systems programming, as I realize I should really prefix that because boy does mratsim's reply there open up a ton of topics I have no connection to) |
18:42:33 | FromDiscord | <konsumlamm> half the points aren't really relevant though... |
18:43:04 | FromDiscord | <konsumlamm> Nim does have a borrow checker but it's far less strict than Rust's (and it's not like Rust's borrow checker is unnecessarily strict for no reason), so you can't really say "this isn't an advantage of Rust because Nim has it too" |
18:43:19 | FromDiscord | <konsumlamm> DrNim isn't worked on currently |
18:44:08 | FromDiscord | <konsumlamm> comparing it to Ada SPARK (which is designed for formal verifying) is a bit disgenious as well |
18:45:20 | FromDiscord | <hmmm> hmm ye but I mean the point isn't about who is better, the point is that a random dude not nim user comes to nim forum asking to rewrite all in rust because rust is the best of the best. Obv people will contest that |
18:47:00 | FromDiscord | <konsumlamm> as for Rust being safer, i don't know why there's even discussion about that, it clearly is safer, it's pretty easy to invoke UB in Nim (since many things just compile to C without additional checks), whereas it's impossible in Rust without `unsafe` (unless there's a bug, and it's not like people regularly use `unsafe`) |
18:47:45 | FromDiscord | <konsumlamm> In reply to @hmmm "hmm ye but I": your point was that "no sane Nim programmer would touch Rust" |
18:47:56 | FromDiscord | <konsumlamm> which i heavily disagree with |
18:48:08 | FromDiscord | <konsumlamm> obviously it's a dumb idea to rewrite the Nim ecosystem in Rust |
18:49:11 | FromDiscord | <hmmm> that's because if you write in nim you appreciate what nim has to offer and probably you wouldn't exchange nim for rust better safety or whatever else rust might be better at |
18:49:37 | FromDiscord | <leorize> I might exchange nim for a working compiler, though \:p |
18:50:42 | FromDiscord | <Isofruit> a working compiler of... rust? |
18:52:14 | FromDiscord | <leorize> yea, rust biggest advantage is that your code tends to explode less |
18:55:36 | * | vicecea quit (Remote host closed the connection) |
18:56:04 | * | vicecea joined #nim |
18:56:34 | FromDiscord | <Isofruit> I don't have enough experience with either language to say much about that.↵I'd have gladly taken a longer look at rust if there were better learning material out there given how harsh the language's learning curve is. The frustration levels in it just made it a not all that attractive choice to learn in my spare time where I'd actually like to enjoy coding. |
18:56:50 | FromDiscord | <Isofruit> (edit) "I don't have enough experience with either language to say much about that.↵I'd have gladly taken a longer look at rust if there were better learning material out there given how harsh the language's learning curve is. The frustration levels in it just made it a not all that ... attractive" added "an" |
18:57:42 | FromDiscord | <Isofruit> Nim is just an order of magnitude more accessible to me which makes it actually fun to code in it, even to touch dark magic like macros |
19:00:59 | FromDiscord | <konsumlamm> honestly the official rust book is pretty good imo |
19:01:18 | FromDiscord | <konsumlamm> while i find the Nim tutorials ok |
19:02:44 | FromDiscord | <Isofruit> The rust book is a good introduction to get you introduced to the concepts |
19:03:25 | FromDiscord | <Isofruit> You learn to consciously understand them in a broad way, though not massively in-depth to the point you feel very confident in applying it |
19:03:41 | FromDiscord | <Isofruit> (edit) "You learn to consciously understand them in a broad way, though not massively in-depth to the point you feel very confident in applying it ... " added "with only few issues" |
19:04:49 | FromDiscord | <Isofruit> You can get to understand borrow checking in rust on a superficial level and still be frustrated for hours on how on earth you're supposed to set up config files with that concept in a framework that supposedly supports it but whose documentation in that regard is very hard to understand unless you already have the concept that the rust book merely introduces ingrained into your mind |
19:05:35 | FromDiscord | <Isofruit> The middle step from "introduction" to "becoming an expert" is something I've missed a lot in Rust, often hunting down solutions for the issues you stumble into when "exploring" the language and writing code in it took way longer than it should have. |
19:05:56 | FromDiscord | <mratsim> In reply to @konsumlamm "comparing it to Ada": The underlying question is, if you want safety, why aren't you writing Ada sparks |
19:05:57 | FromDiscord | <leorize> eventually you will also have to |
19:05:59 | FromDiscord | <leorize> fight nim |
19:06:10 | FromDiscord | <mratsim> (edit) "sparks" => "spark" |
19:06:13 | FromDiscord | <leorize> but the bar of entry is much lower, thankfully |
19:06:26 | FromDiscord | <Isofruit> Yeah, but by the time I have to fight nim I'm pretty sure I'll have understand a lot more aspects around the language |
19:06:31 | FromDiscord | <mratsim> Yeah you only need to use converters, static and generics .... |
19:06:46 | FromDiscord | <leorize> destructors, concepts, etc. |
19:06:53 | FromDiscord | <leorize> basically half of the language features |
19:07:01 | FromDiscord | <mratsim> destructors works for me (TM) |
19:07:09 | FromDiscord | <Isofruit> I use static, generics and macros and while yes, it's hard, it's also not unmanageable like it often felt in rust |
19:07:17 | FromDiscord | <Isofruit> (edit) "it" => "topics" |
19:07:27 | FromDiscord | <mratsim> concepts do work as well nowadays. |
19:07:44 | FromDiscord | <Isofruit> though I guess macros would be still a sealed book if I had never had chats with you guys |
19:07:56 | FromDiscord | <leorize> my concept 🥪 is not fixed so I still can't use them |
19:08:08 | FromDiscord | <konsumlamm> In reply to @mratsim "The underlying question is,": because you also want other things beside safety :P |
19:08:27 | FromDiscord | <konsumlamm> ~~like pattern matching with exhaustiveness checks~~ |
19:08:29 | FromDiscord | <mratsim> if you want Evangelism sure use Rust 😉 |
19:08:42 | FromDiscord | <Isofruit> Pattern matching is the one thing I really, really liked in rust |
19:08:56 | FromDiscord | <mratsim> ah yes pattern matching. I'd like something like in Haskell |
19:08:57 | FromDiscord | <Isofruit> It made me actually start consider using switch case with enums in java |
19:08:58 | FromDiscord | <leorize> I spent too much time chasing out destructors interaction bugs \:p |
19:09:12 | FromDiscord | <Isofruit> (edit) "It made me actually start consider using switch case with enums in java ... " added "(I use java at work for context)" |
19:09:22 | FromDiscord | <mratsim> you're a webdev that use Java? |
19:09:25 | FromDiscord | <mratsim> oh my |
19:09:30 | FromDiscord | <Isofruit> I live in germany |
19:09:46 | FromDiscord | <Isofruit> German software development, particularly webdev, is almost all java |
19:09:50 | FromDiscord | <Isofruit> It's insane |
19:10:08 | FromDiscord | <Isofruit> I literally have to pick that language up on the job because I hadn't written it before, merely some groovy scripting |
19:10:44 | FromDiscord | <Isofruit> Spring or custom REST backend, Angular frontend |
19:10:45 | FromDiscord | <leorize> btw @mratsim, are you gonna look at cps anytime soon? \:p |
19:10:51 | FromDiscord | <Isofruit> Tends to be a pretty popular combo |
19:29:39 | * | arkanoid quit (Ping timeout: 256 seconds) |
19:31:41 | * | arkanoid joined #nim |
19:33:09 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M69 |
19:33:17 | FromDiscord | <Patitotective> (edit) "https://play.nim-lang.org/#ix=3M69" => "https://play.nim-lang.org/#ix=3M6a" |
19:33:33 | nrds | <Prestige99> I do not miss the days of spring, spring boot, etc |
19:33:38 | FromDiscord | <Yardanico> Node(node) |
19:33:42 | FromDiscord | <Yardanico> why are you trying to convert the type |
19:33:46 | FromDiscord | <Yardanico> you have to convert the variable, right? |
19:33:51 | FromDiscord | <Yardanico> `var newNode = Node(node)` |
19:33:55 | FromDiscord | <Patitotective> 😐 |
19:33:56 | FromDiscord | <Patitotective> LOL |
19:34:02 | FromDiscord | <Patitotective> thanks |
19:34:29 | FromDiscord | <Patitotective> anyways, doesn't work |
19:34:49 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M6c |
19:36:06 | FromDiscord | <Patitotective> https://play.nim-lang.org/#ix=3M6d |
19:37:54 | FromDiscord | <leorize> sounds like a bug to me |
19:38:05 | FromDiscord | <huantian> hm it works on my system 😛 |
19:38:29 | FromDiscord | <Patitotective> should I report it? |
19:38:39 | FromDiscord | <Yardanico> what's your nim version? |
19:40:06 | FromDiscord | <demotomohiro> `newNode` copys only`val`, not `age`. Doesn't Nim compiler print that error because it is partial copy? |
19:40:08 | FromDiscord | <Yardanico> ah yeah it fails on 1.6.2 |
19:40:21 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3M6f |
19:41:14 | FromDiscord | <Yardanico> i don't remember if it's supposed to work without `ref |
19:41:18 | FromDiscord | <Yardanico> this works |
19:41:22 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3M6g |
19:42:25 | FromDiscord | <Patitotective> why `ref`? |
19:42:39 | FromDiscord | <Patitotective> (edit) "why `ref`? ... " added "i mean, is that documented?" |
19:43:34 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/issues/17602 |
19:49:08 | FromDiscord | <demotomohiro> Araq says: https://github.com/nim-lang/Nim/issues/11592#issuecomment-506363819 |
19:57:47 | FromDiscord | <ajusa> how can I export just a single type? and I mean `export` keyword, I'm trying to just export the `VNode` definition from karax |
19:59:17 | FromDiscord | <Yardanico> In reply to @ajusa "how can I export": just use `` on that type? |
19:59:29 | FromDiscord | <Yardanico> and what do you mean by "definition"? just the type itself or all fields too? |
20:00:28 | FromDiscord | <Yardanico> isn't it already exported? https://github.com/karaxnim/karax/blob/master/karax/vdom.nim#L151 |
20:00:35 | FromDiscord | <ajusa> sent a code paste, see https://paste.rs/ili |
20:01:11 | FromDiscord | <ajusa> eg I just want to do `export VNode` or `export karax.VNode`. The actual type is defined in `karax/vdom` but I'm trying to keep it simple ehre |
20:01:14 | FromDiscord | <ajusa> (edit) "ehre" => "here" |
20:02:13 | FromDiscord | <Yardanico> so what's the issue? |
20:02:23 | FromDiscord | <Yardanico> that just works |
20:02:26 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3M6q |
20:03:54 | FromDiscord | <ajusa> huh, must be a bug elsewhere in my code then, I'm probably forgetting to export a related field. Thanks! |
20:04:13 | FromDiscord | <Yardanico> i tried writing this in a file and importing it from another file and I can use VNode |
20:04:48 | FromDiscord | <ajusa> yup, I also verified it worked with a similar example. Part of my issue is that I'm using the experimental dotOperators which just destroys pretty much all error messages |
20:07:45 | FromDiscord | <exelotl> In reply to @Isofruit "German software development, particularly": on the bright side, at least it's not PHP 😅 |
20:12:01 | FromDiscord | <Yardanico> that fzrg guy is still going strong on the forum |
20:24:38 | FromDiscord | <xx_ns> In reply to @exelotl "on the bright side,": hot take: PHP in 2022 is _not bad_ |
20:24:58 | FromDiscord | <Yardanico> PHP 8 is not as bad as it was before, yes |
20:25:02 | FromDiscord | <Yardanico> but IMO it's already too late |
20:25:19 | FromDiscord | <exelotl> I used it for the last 2 years in my day job, it's awful |
20:25:25 | FromDiscord | <Isofruit> I've not tried PHP yet but have heard not too many great things about it |
20:25:26 | FromDiscord | <Yardanico> most big companies like facebook or VK who used PHP made their own versions |
20:25:37 | FromDiscord | <Yardanico> VK made kPHP which compiles a subset of PHP to C++, Facebook made Hack and HHVM |
20:25:46 | FromDiscord | <ajusa> In reply to @Yardanico "that fzrg guy is": To be fair, tapping into an existing ecosystem is hardly the worst idea for Nim. c2nim, futhark, Nimpy, etc are all projects trying to use existing code in other languages |
20:26:13 | FromDiscord | <Isofruit> fzrg I'm still on a coin flip in terms of if he's trolling or not |
20:26:53 | FromDiscord | <Isofruit> At best he doesn't know what he's talking about. I mean, I don't either for that matter, I'm just aware that language performance matters tend to be fairly complicated discussions |
20:27:18 | FromDiscord | <Isofruit> We have debates to this day whether Java is a very performant language on par with C/C++ after all |
20:28:13 | FromDiscord | <Isofruit> (edit) "We have debates to this day whether Java is a very performant language ... onwith" added "that can be" | "that can beon par with C/C++ ... after" added "with proper optimizations" |
20:28:28 | FromDiscord | <exelotl> In reply to @Yardanico "PHP 8 is not": pretty much this - they have been adding nice features like arrow functions and enum types, but the foundations are so poor that it's basically polishing a turd at this point |
20:28:33 | FromDiscord | <Isofruit> (edit) "We have debates to this day whether Java is a very performant language that can be on par with C/C++ with proper optimizations after all ... " added "(at which point you go down the rabbit hole of how much optimization is fair to assume yada yada yada)" |
20:32:39 | FromDiscord | <iffy (Matt Haggard)> Why is libpcre not listed as a dynamic library when I compile a program using it. https://play.nim-lang.org/#ix=3M6w If I pass `--passL:-lpcre`, then it is listed. But the program runs anyway -- what's going on? |
20:33:41 | FromDiscord | <exelotl> if you're doing anything advanced you still have to internalise all the "stringly typed" nonsense, the pitfalls like how redeclaring a class will just overwrite the old one, all the ridiculous function names, the only good debugger is a 3rd-party extension that crashes all the time, the major libraries are OOP monstrosities, the only good tooling is jetbrain's commercial stuff... I could go on 😅 |
20:34:11 | FromDiscord | <exelotl> (edit) "jetbrain's" => "jetbrains'" |
20:34:24 | FromDiscord | <Yardanico> In reply to @iffy (Matt Haggard) "Why is libpcre not": because Nim doesn't link to dynamic libraries at the C stage |
20:34:35 | FromDiscord | <Yardanico> if you use `dynlib` (which pcre module does) it loads the dynamic library at runtime |
20:41:47 | FromDiscord | <iffy (Matt Haggard)> Oh, okay. That makes sense. I'm trying to cross-compile from macos to linux and use libpcre. It compiles fine, but running it on the linux machine I get `could not load: libpcre.so(.3|.1|)` even though `ldconfig -p | grep libpcre` shows that it's installed. How does Nim know what directory to look for dynlibs? |
20:42:34 | FromDiscord | <Yardanico> In reply to @iffy (Matt Haggard) "Oh, okay. That makes": it uses normal OS paths |
20:42:42 | FromDiscord | <Yardanico> what linux distro are you checking it on? |
20:44:27 | FromDiscord | <iffy (Matt Haggard)> docker ubuntu.. whatever version that gives me |
20:44:27 | FromDiscord | <iffy (Matt Haggard)> When I compile with `-d:nimDebugDlOpen` as the error message suggests, I then get\: `Dynamic loading not supported↵could not load: libpcre.so(.3|.1|)` |
20:45:02 | FromDiscord | <Yardanico> so you're compiling statically |
20:45:09 | FromDiscord | <Yardanico> if you compile statically you can't use dynamic libraries |
20:46:21 | FromDiscord | <Yardanico> if you want to statically link pcre you can do --dynlibOverride:pcre --passL:"-lpcre" |
20:46:22 | FromDiscord | <Yardanico> i think |
20:46:43 | FromDiscord | <Yardanico> dynlibOverride tells Nim that you don't want to load that dynlib library from runtime and will instead link it yourself |
20:47:02 | FromDiscord | <iffy (Matt Haggard)> I'm not doing anything special to say "be static." If I compile for macOS on macOS, it works fine and I don't do anything to say "be dynamic" |
20:47:54 | FromDiscord | <iffy (Matt Haggard)> I'll try that to see if it works. I'd rather dynamically link if that's possible. How do I tell it to dynamically link? |
20:48:15 | FromDiscord | <hmmm> jeez the guy is still going, at this point we should just find a 10 lines rust lib, wrap it, and make him happy |
20:48:49 | FromDiscord | <iffy (Matt Haggard)> "link it yourself" statically or dynamically? |
20:49:45 | FromDiscord | <Yardanico> so basically, the error tells you that you compiled your nim binary statically |
20:49:59 | FromDiscord | <Yardanico> if you compile a binary statically you can't load dynamic libraries, so you also have to compile pcre statically |
20:50:21 | FromDiscord | <Yardanico> not sure why it's compiled statically, that's quite weird, maybe the toolchain you're doing does that? |
20:50:24 | FromDiscord | <leorize> depends on the linker flags |
20:50:30 | FromDiscord | <Yardanico> can you show how you're crosscompiling from macos to linux? |
20:50:30 | FromDiscord | <leorize> default is dynamic |
20:50:41 | FromDiscord | <Yardanico> maybe the toolchain you're using statically links the binaries with musl |
20:50:45 | FromDiscord | <iffy (Matt Haggard)> Yeah, but don't run away\: |
20:51:40 | FromDiscord | <iffy (Matt Haggard)> https://github.com/iffy/nimxc/ then `nimxc c --target linux-amd64 -f --verbosity:3 samp.nim` |
20:52:27 | FromDiscord | <iffy (Matt Haggard)> I don't think it's using musl unless I specify a musl target, but I could be wrong |
20:53:34 | FromDiscord | <Yardanico> just `cat binary | grep "musl"` ? |
20:53:59 | FromDiscord | <iffy (Matt Haggard)> Nothing |
20:54:19 | FromDiscord | <iffy (Matt Haggard)> Does `-ldl` mean dynamic linking? I see that in the `clang` command when compiling macos-\>macos |
20:54:56 | FromDiscord | <iffy (Matt Haggard)> Ah nevermind, I see that in the macos-\>linux output, too |
20:57:38 | FromDiscord | <iffy (Matt Haggard)> Adding `--passC:-v --passL:-v` shows more of the commands being run and I do indeed see `"/Users/matt/zig/zig" -cc1 -triple x86_64-unknown-linux-musl` |
20:57:48 | FromDiscord | <Yardanico> yep, so as I said |
20:57:57 | FromDiscord | <Yardanico> if you want glibc you'll have to specifically mention that to zig cc |
20:58:18 | FromDiscord | <Yardanico> https://github.com/Yardanico/ircord/blob/master/zig-compile-vps.sh this is for the nim vps that runs nimbot and ircord |
20:58:28 | FromDiscord | <Yardanico> it's ubuntu 16.04 so i compile for glibc 2.24 |
21:00:52 | FromDiscord | <iffy (Matt Haggard)> oh, nice! Okay, let me try some things. Thank you Yardanico! |
21:03:42 | FromDiscord | <iffy (Matt Haggard)> Success! Thank you! |
21:06:24 | * | adigitoleo_ joined #nim |
21:07:19 | * | adigitoleo quit (Ping timeout: 250 seconds) |
21:08:01 | FromDiscord | <Yardanico> also @iffy you need to put -fno-sanitize=undefined too |
21:08:11 | FromDiscord | <Yardanico> if you compile with -d:release or -d:danger zig by default has UBSAN enabled |
21:08:25 | FromDiscord | <Yardanico> and UBSAN really doesn't like refc or some other nim stuff so your programs can crash at runtime |
21:08:34 | FromDiscord | <iffy (Matt Haggard)> Oh, lame |
21:08:47 | FromDiscord | <iffy (Matt Haggard)> Would that apply to macOS and Windows as well, or just Linux targets? |
21:08:56 | FromDiscord | <Yardanico> https://github.com/ziglang/zig/wiki/FAQ#why-do-i-get-illegal-instruction-when-using-with-zig-cc-to-build-c-code |
21:09:05 | FromDiscord | <Yardanico> In reply to @iffy (Matt Haggard) "Would that apply to": i think for all targets |
21:09:24 | FromDiscord | <Yardanico> so `-fno-sanitize=undefined` to make it not do that |
21:12:58 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
21:14:04 | * | ehmry joined #nim |
21:16:49 | * | ehmry quit (Client Quit) |
21:17:26 | * | ehmry joined #nim |
21:24:30 | * | Gustavo6046 joined #nim |
22:06:44 | FromDiscord | <Elegantbeef> @hmmm\: did the writeup help any? |
22:08:21 | FromDiscord | <Elegantbeef> Nim's non ref inheritance for some reason relies on runtime information on conversion so often errors when it should convert↵(@Patitotective) |
22:14:31 | NimEventer | New thread by Evoalg: Profiler for mac?, see https://forum.nim-lang.org/t/8802 |
22:20:15 | FromDiscord | <Elegantbeef> It seems callgrind works on mac @evoalg use it with https://profilingviewer.com/ and you've got a good profiler |
22:20:36 | FromDiscord | <evoalg> ohhh! |
22:21:56 | FromDiscord | <evoalg> $42.99 for the viewer |
22:22:05 | * | Vladar quit (Quit: Leaving) |
22:22:49 | FromDiscord | <Elegantbeef> Lol |
22:22:50 | FromDiscord | <Elegantbeef> uhh |
22:23:09 | nrds | <Prestige99> kcachegrind on linux |
22:23:24 | FromDiscord | <Elegantbeef> You could also get qchachegrind |
22:23:35 | FromDiscord | <Elegantbeef> it's in brew |
22:24:28 | FromDiscord | <evoalg> ahhh good because "brew install valgrind" says "valgrind: Linux is required for this software." (and I'm on a mac) ... I'll try qchachegrind |
22:24:44 | FromDiscord | <Elegantbeef> qcachegrind even |
22:24:55 | FromDiscord | <Elegantbeef> Wait valgrind doesnt work on mac |
22:25:00 | FromDiscord | <Elegantbeef> Jeez life sucks there |
22:25:01 | nrds | <Prestige99> rip really? |
22:25:43 | FromDiscord | <evoalg> well that's what it says, and I've never used a profiler before |
22:25:52 | FromDiscord | <Elegantbeef> Evoalg when do you move to elementary OS so you can atleast pretend you're running mac, but have good dev tools 😛 |
22:26:10 | FromDiscord | <evoalg> 😉 |
22:26:29 | FromDiscord | <Elegantbeef> It seems there is a valgrind port of questionable quality |
22:26:38 | FromDiscord | <Elegantbeef> https://github.com/LouisBrunner/valgrind-macos/ for instance |
22:26:40 | nrds | <Prestige99> sad apple noises |
22:28:28 | FromDiscord | <Elegantbeef> If you add that repository it seems you can get valgrind running there |
22:31:52 | FromDiscord | <hmmm> In reply to @Elegantbeef "<@887269570765791243>\: did the writeup": yo welcome back beef. I'm still not done with it, but I'm solidly on top of dumptree, quote do new, newvarstmt and result.repr. I've grokked the general sense of the if case but I'm missing many details and not even started on the construction 👍 |
22:32:24 | FromDiscord | <hmmm> constructor lol |
22:33:35 | arkanoid | quick question, how to include a string of nim code at compile time or a file from custom path? |
22:39:15 | arkanoid | otherwise, is the cache folder supposed to be in path by default? |
22:40:28 | FromDiscord | <Elegantbeef> `const a = staticRead("path")` |
22:40:42 | FromDiscord | <Elegantbeef> If i get what you mean right |
22:40:54 | FromDiscord | <Elegantbeef> Oh you mean like that |
22:41:05 | FromDiscord | <Elegantbeef> I dont think the cache is supposed to be in path, i could be wrong |
22:46:03 | FromDiscord | <hmmm> oh noes araq locked the rust wrapper forum thread, it was so enjoyable 😩 |
22:48:31 | arkanoid | Elegantbeef, sure that's how to read a file into stirng, but I want to import that nim code |
22:48:57 | * | hexeme is now known as ldlework |
22:48:58 | arkanoid | I mean, I want to "include constAbsolutePath" |
22:51:13 | FromDiscord | <planetis> Damn I missed all the fun |
22:54:45 | FromDiscord | <planetis> Reminded me of the RS raylib wrapper |
22:54:50 | FromDiscord | <planetis> Omg so safe |
22:55:06 | FromDiscord | <planetis> 💩 |
23:00:52 | FromDiscord | <planetis> Let's all wrap our pointer ops in unsafe blocks because then we will have a safer Nim |
23:01:02 | nrds | <Prestige99> hm can an iterator not recurse? |
23:03:28 | nrds | <Prestige99> e.g. https://play.nim-lang.org/#ix=3M6Y the error here |
23:03:36 | nrds | <Prestige99> I may be missing something obvious |
23:08:12 | FromDiscord | <Elegantbeef> Inline iterators are templates |
23:08:20 | FromDiscord | <planetis> No they don't google it |
23:08:27 | FromDiscord | <Elegantbeef> Recursive iterators would never end |
23:08:39 | nrds | <Prestige99> ah they're templates? Damn |
23:09:14 | nrds | <Prestige99> @planetis haven't found anything useful |
23:13:56 | nrds | <Prestige99> @Elegantbeef are closure iterators as well? Seems to have the same issue |
23:14:05 | nrds | <Prestige99> would suck if I couldn't do this, lol |
23:17:29 | FromDiscord | <planetis> https://forum.nim-lang.org/t/7156 |
23:18:08 | FromDiscord | <planetis> You can easily create a for loop macro |
23:18:17 | nrds | <Prestige99> cool, thanks |
23:18:59 | FromDiscord | <planetis> It was funny at first but that troll is so repetitive, it became boring |
23:20:29 | FromDiscord | <planetis> Like all rust fanboys there complete idiots writing dogmatic comments on HN and reddit all day |
23:20:54 | FromDiscord | <planetis> As if Mozilla pays them |
23:21:29 | FromDiscord | <Yardanico> In reply to @planetis "It was funny at": https://media.discordapp.net/attachments/371759389889003532/931327121777913936/unknown.png |
23:23:27 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/931327613438402590/unknown.png |
23:36:08 | FromDiscord | <Yardanico> is this some advanced form of SEO optimization for rust maybe |
23:38:01 | arkanoid | what's the meaning of "MyType[T; X: static T]"? |
23:39:40 | FromDiscord | <Elegantbeef> `X` is a value constrained to type `T` |
23:40:04 | FromDiscord | <Elegantbeef> `static T` in Nim means "generic delimited by value" |
23:41:06 | FromDiscord | <Elegantbeef> Think about `array[10, int]` |
23:41:32 | FromDiscord | <Elegantbeef> the first parameter of that is a static value that changes the type `assert array[10, int] isnot array[9, int]` |
23:42:04 | FromDiscord | <evoalg> In reply to @Elegantbeef "If you add that": When I install that valgrind port, is says it's only supported on older versions on mac os ... I have the latest mac os version |
23:42:50 | FromDiscord | <Elegantbeef> Ah that sucks |
23:43:01 | FromDiscord | <evoalg> (so is says that and bails on the install) |
23:43:21 | FromDiscord | <evoalg> Maybe Rika is right, I should install linux |
23:43:25 | arkanoid | Elegantbeef, ok! so X is a value of type T, not a type. This makes sense |
23:43:27 | arkanoid | thanks |
23:43:28 | FromDiscord | <Yardanico> doesn't macOS have profilers in xcode |
23:43:40 | FromDiscord | <Yardanico> In reply to @Yardanico "doesn't macOS have profilers": they should be decent enough |
23:45:04 | FromDiscord | <Yardanico> https://stackoverflow.com/questions/13554995/profiling-c-program-in-xcode for example |
23:45:23 | FromDiscord | <Yardanico> https://gist.github.com/loderunner/36724cc9ee8db66db305 |
23:45:25 | FromDiscord | <evoalg> In reply to @Yardanico "doesn't macOS have profilers": There's "Instruments" ... it's used for all sort of things like iphone apps ... I looked at it but I guess I just don't know enough as I couldn't get it going, but I can take another look |
23:47:47 | FromDiscord | <Elegantbeef> Just making sure you built the program with `--debugger:native` |
23:47:49 | FromDiscord | <evoalg> Thanks for the links Yards |
23:48:00 | FromDiscord | <evoalg> ahhh true thanks beefy |
23:49:38 | FromDiscord | <planetis> > is this some advanced form of SEO optimization for rust maybe↵he can copy paste, we know he's not a plant |
23:49:49 | FromDiscord | <planetis> Turing complete reference |
23:50:16 | FromDiscord | <Yardanico> In reply to @planetis "> is this some": markov chain |
23:50:31 | FromDiscord | <ajusa> Was that rust guy really suggesting that Nim users add the entire rust toolchain to use a Nim library? |
23:51:05 | FromDiscord | <Yardanico> yes |
23:51:14 | FromDiscord | <Yardanico> i think his main question was something like "why no one writes nim wrappers for rust libraries?" |
23:51:15 | FromDiscord | <Yardanico> i sure wonder why |
23:53:15 | FromDiscord | <planetis> All this made me want to ask for a -keepBody switch for nbindgen |
23:54:36 | FromDiscord | <planetis> c2nim spoils me |
23:55:37 | * | vicfred quit (Ping timeout: 240 seconds) |