<< 06-04-2022 >>

00:10:41FromDiscord<Patitotective> is there a way i could validate if a string is valid as an identifier? or should i use regex `IDENTIFIER ::= letter ( ['_'] (letter | digit) )`?
00:18:22FromDiscord<Elegantbeef> https://nim-lang.org/docs/strutils.html#validIdentifier%2Cstring
00:42:19FromDiscord<Zoom> https://forum.nim-lang.org/t/9079
00:43:56*\u is now known as meowray
00:44:03*meowray quit (Changing host)
00:44:03*meowray joined #nim
00:46:01FromDiscord<Elegantbeef> So first big thing is you dont need to use cast
00:46:07FromDiscord<Elegantbeef> you can do ` let r = ^FlowVar[seq[seq[int]]](futures[futIdx])`
00:46:25FromDiscord<Zoom> Ah, I always forget about conversions...
00:46:39FromDiscord<Elegantbeef> Secondly this is an orc bug indeed
00:51:40FromDiscord<Elegantbeef> Cant put my finger on why this get's a nil error
00:53:29FromDiscord<Zoom> There's #8201 which is too long for this late hour (at my timezone)
00:54:27FromDiscord<Elegantbeef> I think it's something to do with the destructors and gc reference
00:54:32FromDiscord<Elegantbeef> thread 2 destructs the sequences whilst thread 1 is attempting to destruct them
00:55:17*vicfred quit (Quit: Leaving)
00:56:18FromDiscord<Elegantbeef> Oh expand arc how art thou
00:57:15FromDiscord<Elegantbeef> No destroy calls inside `splitToTerms` so i guess i'm wrong
00:59:20FromDiscord<Zoom> It's too late for me to investigate, even if I cared enough. Nighty night and special high five to [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org) for being super helpful as usual.
00:59:49FromDiscord<Elegantbeef> Well i'll shoot you a message if i figure out the high level culprit
01:00:41FromDiscord<Zoom> Thanks, probably better to put the info in the thread
01:18:44*neurocyte861449 quit (Ping timeout: 268 seconds)
01:44:08FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Uqu
01:44:21FromDiscord<Elegantbeef> No return type on the template
01:45:10FromDiscord<Patitotective> still same error
01:45:59FromDiscord<Elegantbeef> are you not doing `a = read("string")`
01:46:20FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Uqw
01:47:02FromDiscord<Elegantbeef> Runs fine
01:47:12FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3Uqx
01:47:21FromDiscord<Elegantbeef> also you should do `path: static string`
01:47:28FromDiscord<Elegantbeef> And you can also you know use a procedure
01:47:53FromDiscord<Patitotective> In reply to @Elegantbeef "Runs fine": are you compiling it with `-d:release`?
01:48:11FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Uqy
01:48:12*Gustavo6046_ joined #nim
01:49:13FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Uqz
01:49:31FromDiscord<Elegantbeef> ok got the same issue
01:50:17*Gustavo6046 quit (Ping timeout: 248 seconds)
01:51:09FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/yv2
01:51:29*Gustavo6046_ quit (Client Quit)
01:51:47*Gustavo6046 joined #nim
01:52:12FromDiscord<Elegantbeef> I dont know why it doesnt work as a proper exprression but alas
01:52:56FromDiscord<Patitotective> 🙃
01:54:10FromDiscord<Patitotective> and in here https://nimgl.dev/docs/imgui.html#addFontFromMemoryTTF%2Cptr.ImFontAtlas%2Cpointer%2Cint32%2Cfloat32%2Cptr.ImFontConfig%2Cptr.ImWchar16↵what should i pass in `font_data`? im still confused about pointers
01:54:57FromDiscord<Elegantbeef> You should pass in your font data, which you probably generated with a procedure call before
01:56:02FromDiscord<Patitotective> i mean, if i do `"font.ttf".read()`, i get a binary string, right?↵how do i use that data to do the same as `addFronFromFileTTF`
01:56:24FromDiscord<Elegantbeef> You dont use FromFile
01:56:28FromDiscord<Elegantbeef> Like i pointed out last time
01:56:31FromDiscord<Elegantbeef> You use FromMemory
01:59:39*wyrd quit (Quit: Lost terminal)
02:00:03FromDiscord<Patitotective> yea but how do i convert the binary string i get from `"font.ttf".slurp()` to hte `font_data` param of `addFontFromMemoryTTF`?
02:00:15FromDiscord<Patitotective> (edit) "hte `font_data`" => "the `pointer`"
02:00:25*Gustavo6046_ joined #nim
02:00:43FromDiscord<Elegantbeef> `myData[0].addr` or `myData[0].unsafeaddr`
02:01:29*Gustavo6046 quit (Ping timeout: 248 seconds)
02:01:53*Gustavo6046_ quit (Remote host closed the connection)
02:02:09*Gustavo6046 joined #nim
02:22:17*Gustavo6046 quit (Ping timeout: 248 seconds)
02:30:13*Gustavo6046 joined #nim
02:32:09*Gustavo6046 quit (Max SendQ exceeded)
02:33:19*Gustavo6046 joined #nim
02:36:11FromDiscord<Alea> Say, anyone on the NimSkull team know if there are any plans with regards to variable case insensitivity? Just curious since it's the first criticism I see pop up in many nim discussions
02:36:22FromDiscord<Alea> (edit) "Say, anyone on the NimSkull team know if there are any plans with regards to variable ... case" added "name"
02:36:34FromDiscord<Elegantbeef> They havent mentioned it iirc
02:48:02*arkurious quit (Quit: Leaving)
03:06:48NimEventerNew thread by Veksha: {.nodecl} VS {.importc, nodecl} and return VS result, see https://forum.nim-lang.org/t/9080
03:11:32FromDiscord<TryAngle> I'm trying to work with winim and it uses LPSTR which is an alias for ptr Char↵how do I convert a nim string to a ptr Char ?
03:11:46FromDiscord<Elegantbeef> `cstring`
03:12:05FromDiscord<Elegantbeef> or `myString[0].addr`
03:12:45*rockcavera quit (Remote host closed the connection)
03:13:22FromDiscord<TryAngle> In reply to @Elegantbeef "`cstring`": how do I convert a string to a cstring?
03:13:34FromDiscord<Elegantbeef> `cstring(myString)`
03:14:50NimEventerNew thread by Archnim: System.sink & System.lent, see https://forum.nim-lang.org/t/9081
03:14:55FromDiscord<TryAngle> ok that was kinda obvious 🤣
03:15:07FromDiscord<TryAngle> hmm and how do I supply a null ptr ?
03:15:25FromDiscord<Elegantbeef> `nil`
03:17:05*jkl quit (Quit: Gone.)
03:18:06*jkl joined #nim
03:20:45*SamuelMarks joined #nim
03:25:45FromDiscord<TryAngle> In reply to @Elegantbeef "`nil`": thanks 🥺
03:25:52*SamuelMarks quit (Ping timeout: 260 seconds)
03:41:18*wyrd joined #nim
03:42:49*dtomato quit (Quit: The Lounge - https://thelounge.chat)
04:02:41*wyrd quit (Remote host closed the connection)
04:02:53*wyrd joined #nim
04:10:31*slowButPresent quit (Quit: leaving)
04:21:37*Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected])
04:22:08FromDiscord<TryAngle> is there a difference between 1.0f and 1.0 ?
04:22:35FromDiscord<Yardanico> yes, but actually no
04:22:41FromDiscord<Yardanico> ah right, it's just a "yes"
04:22:45FromDiscord<Yardanico> @TryAngle `f` is float 32
04:23:02FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/961118813867368458/unknown.png
04:23:16FromDiscord<TryAngle> In reply to @Yardanico "<@!147447489316913152> `f` is float": ah ok, so if I work with graphical things I should use f postfix right ?
04:23:23FromDiscord<Yardanico> idk, it depends on the type
04:23:31FromDiscord<Yardanico> for float32 you use f, for float64 and float you use `'d`
04:23:41FromDiscord<Yardanico> or just do "123.0", Nim defaults to 64-bit float
04:23:46FromDiscord<TryAngle> or wait, when I put them in functions, nim choses correct type anywyas right ?
04:35:44FromDiscord<xflywind> Hello @PMunch do you have some testcase for futhark regarding https://github.com/nim-lang/Nim/issues/18986 ? I want to verify whether my fix work for futhark too.
04:35:52FromDiscord<xflywind> (edit) "testcase" => "testcases"
04:35:57FromDiscord<xflywind> (edit) "work" => "works"
05:00:47FromDiscord<j-james> by any chance, is there a `Radian` hidden in the stdlib?
05:00:52FromDiscord<j-james> (edit) "by any chance, is there a `Radian` ... hidden" added "type"
05:01:46FromDiscord<Rika> In reply to @Alea "Say, anyone on the": i doubt so
05:02:21FromDiscord<Rika> In reply to @j-james "by any chance, is": dont think so
05:04:04*zeus-supreme1 joined #nim
05:07:02*zeus-supreme quit (Ping timeout: 246 seconds)
05:13:09FromDiscord<huantian> `type Radian = distinct float` boom
05:14:25FromDiscord<j-james> i may just go with `type Radian = float` for convenience
05:14:44FromDiscord<Elegantbeef> Eh
05:14:45FromDiscord<Elegantbeef> What's the point of an alias for radian
05:15:49FromDiscord<j-james> fair tbh
05:16:04FromDiscord<Elegantbeef> Use a distinct or just use a float
05:16:07FromDiscord<j-james> you're usually going to be multiplying them by things that are not radians anyway
05:27:21FromDiscord<Elegantbeef> So make `(radian, float)` and `(float, radian)`
06:03:21FromDiscord<morgan> if i have a tree structure, and i want to have a ref stored that points up the tree, how would i go about assigning that in a proc that adds a new node to the tree?
06:03:33FromDiscord<morgan> would it be `addr`?
06:04:09FromDiscord<Elegantbeef> You use `ref` and then just grab it
06:04:42FromDiscord<morgan> `Error: type mismatch: got 'Command' for 'com' but expected 'ref Command'`
06:04:52FromDiscord<morgan> `parent: com`
06:04:59FromDiscord<Elegantbeef> What's your type?
06:05:14FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/961144533230452806/unknown.png
06:05:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ur5
06:05:40FromDiscord<morgan> so i should make the object a ref object
06:05:48FromDiscord<Elegantbeef> Probably
06:06:33FromDiscord<Elegantbeef> you could do `ptr Command` and `myCommand.addr`, but generally for this type of stuff you want `ref`
06:07:34FromDiscord<morgan> yeah
06:07:54FromDiscord<morgan> it works with it switched over to a ref object and the ref on the parent var removed
06:11:08FromDiscord<Elegantbeef> Remember `ref` can be `nil` so if you have any uninitialised it'll be nil
06:12:13FromDiscord<morgan> yeah i have one of the new procs initing that with nil
06:15:09FromDiscord<aph> sent a code paste, see https://play.nim-lang.org/#ix=3Ur6
06:15:36FromDiscord<Elegantbeef> `Vertex[T: BDef1|Bdef2|Bdef4|Sdef|Qdef` then `weightDeform: T`
06:15:37FromDiscord<aph> (edit) "https://play.nim-lang.org/#ix=3Ur6" => "https://play.nim-lang.org/#ix=3Ur7"
06:15:49FromDiscord<aph> In reply to @Elegantbeef "`Vertex[T: BDef1|Bdef2|Bdef4|Sdef|Qdef` then `weigh": thanks!
06:15:54FromDiscord<Elegantbeef> `BDef1|Bdef2|Bdef4|Sdef|Qdef` is a generic typeclass of or'd types
06:16:53FromDiscord<aph> sent a code paste, see https://paste.rs/A3m
06:17:17FromDiscord<Elegantbeef> Dont know what are `BDef`?
06:17:45FromDiscord<Tanguy> Yes you need to add a T to PMXFike
06:17:48FromDiscord<aph> sent a code paste, see https://play.nim-lang.org/#ix=3Ur9
06:17:51FromDiscord<Tanguy> (edit) "PMXFike" => "PMXFile"
06:17:55FromDiscord<aph> In reply to @Tanguy "Yes you need to": yeah that resolved it, thanks
06:18:10FromDiscord<Elegantbeef> You also can just do `T: Deforms`
06:18:54FromDiscord<aph> In reply to @Elegantbeef "You also can just": heh, i was doing some weird reassign thing. i tried `var Variable: Deforms = Bdef1()` but it didn't work lo
06:18:55FromDiscord<aph> (edit) "lo" => "lo;"
06:19:01FromDiscord<aph> (edit) "lo;" => "lol"
06:19:04FromDiscord<Elegantbeef> If course not
06:19:26FromDiscord<Elegantbeef> They're `object` not `ref object` they're stack allocated as such cannot be converted between types
06:19:46FromDiscord<Elegantbeef> If you want them to abide by inheritance use `ref object` and then you can
06:19:47FromDiscord<aph> ohh
06:20:37FromDiscord<Elegantbeef> You can only safely convert to `var T` without losing fields, any other conversion copies and loses fields
06:21:42FromDiscord<aph> yes i'm doing that in my code :)
06:21:59FromDiscord<Elegantbeef> It looks like you want `ref object`
06:22:13FromDiscord<Elegantbeef> If you want to be able to assign any `of Deform` to the field
06:22:55FromDiscord<aph> `ref object` in `Deforms`?
06:23:05FromDiscord<Elegantbeef> For all of them
06:23:12FromDiscord<Elegantbeef> all of your inherit objects
06:23:14FromDiscord<aph> ohh
06:26:37FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ura
06:26:40FromDiscord<Elegantbeef> Though the last one shouldnt have any runtime error
06:27:03FromDiscord<Elegantbeef> Explicitly upcasting a value type should be valid afaik
06:27:48FromDiscord<aph> wow
06:43:43FromDiscord<bryankrn> as someone whos never used operator overloading, nim's operator overloding is cool as hell
06:44:58FromDiscord<Elegantbeef> Yea it's done in a really swell way
06:47:06FromDiscord<Phil> I've used it in Java and used it like there, is there a significant difference?
06:47:29FromDiscord<Elegantbeef> In nim it's very simple and you can have user defined operators
06:47:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Urd
06:48:04FromDiscord<Elegantbeef> No fancy keywords, just easy and sensible
06:48:46FromDiscord<Phil> Also to be on the safe side : I am correct in assuming that generic procs don't play very nicely with overloading, correct?
06:48:56FromDiscord<Elegantbeef> They do
06:49:10FromDiscord<Elegantbeef> specialzed is taken over generic
06:49:28*PMunch joined #nim
06:50:37FromDiscord<Phil> The scenarios I had were 2 generic procs with the same name but different arguments, I don't recall having used a specialized proc in there anywhere but it's possible I overlooked something
06:50:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ure
06:51:56FromDiscord<Elegantbeef> different arguements how?
06:55:09FromDiscord<Phil> Sorry, different params. They were both called "createHandler" and the second one called the first. First took 4 parameter, second one took 2 parameters and called the first with those 2 and 2 default params.
06:55:34FromDiscord<Elegantbeef> So what's the issue they're overloadable
06:55:40FromDiscord<Phil> Everything involved in what I just described was a generic proc, even the handler.
06:56:28FromDiscord<Phil> It kept trying to use the 2 Param one even when I specified 4 params iirc. I'll play around with that again after work
06:56:43FromDiscord<Elegantbeef> Nim also has name overloading
06:57:02FromDiscord<Phil> (edit) "handler." => "parameters."
06:57:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Urg
06:57:33FromDiscord<Phil> Holy shit
06:58:18FromDiscord<Phil> That is legitimately dope and provides a fair amount of more power than Java overloading
06:58:31FromDiscord<Elegantbeef> Well this is just normal procedure overloading
06:58:51FromDiscord<Elegantbeef> We also have all this applied to operator overloading 😛
06:59:08FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/sCV
06:59:10FromDiscord<Elegantbeef> It gets the first symbol
06:59:43FromDiscord<Elegantbeef> Need macros to get the specific symbols
06:59:45FromDiscord<aph> sent a code paste, see https://play.nim-lang.org/#ix=3Uri
06:59:56FromDiscord<Phil> Ooof okay that's a bit harsh
07:00:09FromDiscord<Phil> Good thing I don't typecast procs that way
07:00:21FromDiscord<Elegantbeef> Eh it's not that bad you can make a quick macro to do it
07:00:26FromDiscord<Elegantbeef> Especially with micros 😛
07:01:12FromDiscord<Elegantbeef> Didnt or dont?↵(@aph)
07:01:30FromDiscord<aph> don't
07:01:35FromDiscord<aph> still confused lol
07:01:50FromDiscord<Elegantbeef> Nim allows you to use the parameter names of a procedure to call a specific prrocedure
07:02:03FromDiscord<Elegantbeef> You can use the `i = 10` to call the procedure with the `i: int`
07:02:07FromDiscord<aph> ohh get it now
07:02:10FromDiscord<aph> woah
07:02:24FromDiscord<Elegantbeef> I generally dont use it but I just mentioned it
07:02:33FromDiscord<Phil> Yeh, that was the moment I started using expletives
07:02:36FromDiscord<Elegantbeef> I only ever use that syntax for optional parameters
07:03:23FromDiscord<xflywind> https://github.com/nim-lang/RFCs/issues/406#issuecomment-896299144
07:12:04FromDiscord<Hamid_Bluri> sent a long message, see http://ix.io/3Urk
07:16:07FromDiscord<Hamid_Bluri> it seems like I have i ancient clang version
07:16:14FromDiscord<Hamid_Bluri> (edit) "i" => "a"
07:16:17FromDiscord<Hamid_Bluri> (edit) "a" => "an"
07:28:38*jjido joined #nim
07:37:29PMunchHmm, is there anything like bswap32 in Nim?
07:38:08FromDiscord<Elegantbeef> Is that endian stuff?
07:38:14PMunchYeah
07:38:21FromDiscord<Elegantbeef> std/endians
07:38:22PMunchI guess the endians module can do it
07:39:00PMunchHmm, can I pass the same pointer to both arguments?
07:39:21FromDiscord<Elegantbeef> I think it does a copy so i think so
07:39:23FromDiscord<Elegantbeef> I could be wrong
07:39:46PMunchYeah it seems to work
07:44:26*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
07:55:11NimEventerNew post on r/nim by thindil: [Nim Blog] This Month with Nim: February and March 2022, see https://reddit.com/r/nim/comments/txgxvi/nim_blog_this_month_with_nim_february_and_march/
07:56:05*dtomato joined #nim
07:57:15FromDiscord<aph> can i freely copy code from forum, or are the code from users "All rights reserved"
07:57:35FromDiscord<aph> (edit) "can i freely copy code from ... forum," added "nim"
07:57:59FromDiscord<Elegantbeef> As is general no copy write does not mean public domain
07:59:24FromDiscord<aph> sad
07:59:32FromDiscord<aph> time to reply "may i copy your code"
08:05:47FromDiscord<Yardanico> @ElegantBeef no, Nim forum has a specific license for thatm
08:05:48FromDiscord<Yardanico> (edit) "thatm" => "that"
08:05:50FromDiscord<Yardanico> you can copy code from it
08:05:53FromDiscord<Yardanico> lemme find the link
08:06:01FromDiscord<Yardanico> https://forum.nim-lang.org/about/license
08:06:04FromDiscord<Yardanico> "All the content contributed to forum.nim-lang.org is cc-wiki (aka cc-by-sa) licensed, intended to be shared and remixed."
08:06:43FromDiscord<aph> interesting
08:07:01FromDiscord<aph> wait, if it's ShareAlike does that mean my license should also be under cc-by-sa lol
08:07:05FromDiscord<aph> (edit) "license" => "code"
08:07:07FromDiscord<Yardanico> compatible with it
08:07:48FromDiscord<aph> great
08:08:14FromDiscord<Yardanico> but yeah, that's a valid point, but I don't know if it's possible to add a specific clause regarding code in this license page
08:08:38FromDiscord<Yardanico> so that the people posting code on the forum agree to license it under some license like MIT
08:09:13FromDiscord<aph> > Currently, no non-CC licenses have been designated as compatible with BY-SA 3.0. ↵oh, i guess i do need to use it!
08:09:20FromDiscord<aph> i have no problem heh
08:09:26FromDiscord<aph> (edit) "heh" => "with itheh"
08:09:28FromDiscord<aph> (edit) "itheh" => "it heh"
08:09:32FromDiscord<Yardanico> GPL is one-way compatible with it I think
08:09:38FromDiscord<Yardanico> but just ask the author of the post
08:09:42FromDiscord<Yardanico> what is the post in question?
08:09:52FromDiscord<Yardanico> i think small enough code doesn't really warrant a license
08:10:02FromDiscord<Yardanico> if it's something obvious
08:10:13FromDiscord<aph> https://forum.nim-lang.org/t/5638 #4
08:10:42FromDiscord<Yardanico> i don't think you need a license for that, but feel free to ping @Vindaar (he hangs out in #science quite a lot) if you want his explicit permission
08:10:59FromDiscord<Yardanico> I'd say this is kind of obvious code for Nim
08:13:07FromDiscord<aph> may thee grant me permission to copy the code @Vindaar ↵Orz
08:13:23FromDiscord<aph> (edit) "may thee grant me ... permission" added "the"
08:13:41FromDiscord<aph> (edit) "the" => "thy"
08:14:35FromDiscord<demotomohiro> That macro looks like fields iterator: https://nim-lang.org/docs/iterators.html#fields.i%2CT
08:14:38FromDiscord<Vindaar> I hereby grant you, aph, and everyone else on this planet (no aliens allowed!) the right to use that snippet of code. 🤭
08:14:55FromDiscord<aph> In reply to @Vindaar "I hereby grant you,": 🛐
08:15:08FromDiscord<Yardanico> In reply to @demotomohiro "That macro looks like": yeah, but it works on the instance of the type, not type itself
08:15:16FromDiscord<Yardanico> like Solitude mentioned in that thread
08:15:56FromDiscord<Valdar> In reply to @Vindaar "I hereby grant you,": That's racist man 🙂
08:16:04FromDiscord<Vindaar> 🤣
08:16:25FromDiscord<Vindaar> show me some aliens and I'll change my mind 😍
08:16:44FromDiscord<Valdar> <--
08:16:50FromDiscord<Vindaar> (I'm just trying to bait them into showing themselves!)
08:16:56FromDiscord<Vindaar> In reply to @Valdar "<--": your avatar isn't proof enough :/
08:17:11FromDiscord<Valdar> fair enuf lol
08:18:01FromDiscord<demotomohiro> @Yardanico ooh, I didnt read all post excepts #4 in that thread.
08:20:04PMunchHuh, I've never considered that Nim forum code snippets would be under a license..
08:20:32PMunchHow is StackExchange in this regard?
08:24:06FromDiscord<Yardanico> https://stackoverflow.com/help/licensing
08:24:07*jmdaemon quit (Ping timeout: 260 seconds)
08:24:14FromDiscord<Yardanico> different versions of CC BY-SA
08:25:40PMunchOh damn, I assume that a loooot of commercial software is breaking that license
08:26:51FromDiscord<aph> ~~time to sue them!~~
08:31:05PMunchI wouldn't even be surprised if StackExchange themselves went foul of that license :P
08:33:41*via__ quit (Ping timeout: 250 seconds)
08:33:48*via_ joined #nim
08:39:03FromDiscord<Zoom> What a disgusting xenophobia! 🛸 On the other hand, I doubt our supervisors do much coding on Earth...↵(@Vindaar)
08:49:01*FromDiscord quit (Ping timeout: 240 seconds)
08:49:36*FromDiscord joined #nim
08:50:45FromDiscord<Elegantbeef> I used the code and it exploded my PC, ypu'll be hearing from my lawyerrs↵(@Vindaar)
08:50:57FromDiscord<Rika> In reply to @Vindaar "I hereby grant you,": Fuck…
08:52:56*jjido joined #nim
08:55:23FromDiscord<Elegantbeef> Poor pmunch https://www.reddit.com/r/nim/comments/txgxvi/comment/i3lopp0/?utm_source=share&utm_medium=web2x&context=3
08:55:52FromDiscord<Elegantbeef> "A name can only exist for a single thing!"
08:59:35FromDiscord<Zoom> I think CC BY SA is not the best choice for software, and it's not very compatible. On the other hand, it's copyleft, and that's good. Not as god as GPL2-or-later, of course.
09:01:11FromDiscord<Yardanico> for some MIT is much better than GPL, just saying ;)
09:01:35FromDiscord<Elegantbeef> It clearly depends on your views
09:03:14PMunchI mean the name Futhark is even the name of something other than a programming language
09:03:30PMunchBut no-one seems to mix my tool with the rune alphabet :P
09:03:32FromDiscord<Elegantbeef> No it's only the language
09:03:48FromDiscord<Elegantbeef> I dont know i did once and it made it very hard to spell
09:04:22PMunchHaha, I wonder if runes are in UTF-8
09:04:50PMunchMaybe I should rewrite the Futhark source code to only use rune variable names
09:06:24FromDiscord<Elegantbeef> "Dear reader you might be wondering why i used the rune alphabet and the answer is 'fuck you;"
09:06:33PMunchHaha, exactly
09:06:55PMunchI know a Swede who once programmed his keyboard to be able to type runes
09:07:22PMunchAh yes, they're in UTF-8
09:08:02FromDiscord<Elegantbeef> Of course they are apart of utf8 is "Represent all languages from the past to future" 😛
09:08:46PMunchᚠᚢᚦᚨᚱᚲ
09:08:49FromDiscord<Zoom> Yeah, the whole block↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
09:09:52FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/961190997449113601/image.png
09:09:55FromDiscord<Elegantbeef> Nice utf8 support
09:11:30FromDiscord<aph> image.png https://media.discordapp.net/attachments/371759389889003532/961191407958261780/image.png
09:11:35FromDiscord<aph> that worked for me
09:11:36FromDiscord<aph> weird
09:11:41NimEventerNew thread by Jmgomez: C++ interop via Dynamic Library, see https://forum.nim-lang.org/t/9083
09:11:47FromDiscord<Elegantbeef> Different system fonts
09:15:05FromDiscord<Elegantbeef> Oh and zoom you could do a few things to make that code a bit cleaner but no cigar on make it not crash on orc
09:19:27FromDiscord<Elegantbeef> For context https://play.nim-lang.org/#ix=3UrH
09:23:33FromDiscord<Zoom> But your version blocks in order?
09:23:57FromDiscord<Elegantbeef> It prroduces the same logic
09:24:05FromDiscord<Elegantbeef> Atleast afaict
09:24:37FromDiscord<Zoom> Why the hell do we have `blockUntilAny` at all then?
09:24:51FromDiscord<Elegantbeef> Probably just a case of the complexity of this problem that it behaves the same
09:24:56FromDiscord<Elegantbeef> Since each step is going to take longer
09:25:00FromDiscord<Zoom> Yeah, exactly
09:25:08FromDiscord<Elegantbeef> I dont get why block until any exists really either
09:25:13FromDiscord<Elegantbeef> we have a `isReady`
09:25:22FromDiscord<Zoom> It's not really my code, I just tried to show how to use `threadpool`.
09:25:34FromDiscord<Elegantbeef> Yea i know
09:26:02FromDiscord<Elegantbeef> Yea i dont get the point of block until any and araq seems to indicate it's not great
09:26:11FromDiscord<Zoom> Well, I prefer looping polling over stuff to be hidden from plain sight \:)
09:26:23FromDiscord<Elegantbeef> It also is more readable
09:26:41FromDiscord<Elegantbeef> `blockUntilAny` sounds like it is a void proc
09:27:04FromDiscord<Zoom> It's not great for shizzle.
09:27:33FromDiscord<Elegantbeef> Anyway you can still use `blockUntilAny` with any `FlowVar[T]`
09:27:42FromDiscord<Elegantbeef> Guess it's what i was trying to point out
09:29:01FromDiscord<Zoom> returning -1 is one thing. "If there is no flowVar left to be able to wait on, -1 is returned." is basically an instruction to write a while loop on that proc, but it doesn't work that way, embarrassingly.
09:29:37FromDiscord<Elegantbeef> Yea it really should just be `for x in blockUntil(myFlows)`
09:30:19FromDiscord<Elegantbeef> Or something better named
09:30:48FromDiscord<Elegantbeef> I dont know why recently i've just been on an iterator bend, implementing everything i can as them
09:33:02*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
09:34:04FromDiscord<Zoom> Doing the lord's work
09:34:33FromDiscord<Zoom> I think I shall at least write a runnable example for this awful proc
09:35:09FromDiscord<Elegantbeef> Yea especially for macros it's what i crave
09:36:21FromDiscord<Elegantbeef> Being able to iterate the parameters of a proc just by doing `for param in myProc.params` or being able to iterate all the overloaded procedures in a symbol just by doing `for decl in mySym.routines`, makes code so much more readable and writable 😛
09:39:36Amun-RaElegantbeef: is there a way to iterate all the elements in an object too?
09:39:38FromDiscord<Elegantbeef> Anyway I'm going to go dream of iterators, so buh bye
10:04:12FromDiscord<aph> generics broke my brain. i need a rest
10:04:13FromDiscord<aph> lol
10:04:35FromDiscord<Rika> Okay
10:23:19FromDiscord<Zoom> Welp, my runnableExample for blockUntilAny SIGSEGVs
10:23:22FromDiscord<Zoom> https://wandbox.org/permlink/dsu90Kw31Efq4hdM
10:23:42FromDiscord<Zoom> on Windows, that is. Runs on wandbox, obviously
10:24:24FromDiscord<Zoom> We can't run with `--threads:on` on playground, right?
10:25:24FromDiscord<Rika> Nope
10:26:02FromDiscord<Zoom> Thought so. We can on wandbox though
10:50:30PMunchHmm, so I have C library that I'm wrapping. It has a `void *app` field for application specific data. I want to keep a Table of data in this variable. Now I'm not entirely sure how'd I'd do this and not have Nim just clean up the variable..
10:50:54PMunchI guess I could just put it in a wrapper object and then just put a pointer to it in that variable
10:50:58PMunchThat might be easiest
10:52:04FromDiscord<Yardanico> i mean, you can generally store any managed reference in that variable as long as you GC_ref it
10:52:25FromDiscord<Yardanico> so the refcount won't reach zero and Nim won't clean up the data
10:52:33PMunchHmm, that's true
10:53:18PMunchSo the way I've wrapped this so far is to create wrapper objects with destructors that calls the C-free options
10:53:42PMunchSo I could GC_unref in that destructor
10:53:59PMunchBut I could also just keep it in that wrapper object, and let Nim deal with it itself
11:23:26*jjido joined #nim
11:34:22*zeus-supreme joined #nim
11:34:42FromDiscord<Hamid_Bluri> guess what, the program compiles successfully !!!!!!!!!!!↵↵I tried different ways but non of them work https://media.discordapp.net/attachments/371759389889003532/961227446970110032/unknown.png
11:37:29*zeus-supreme1 quit (Ping timeout: 248 seconds)
11:37:45FromDiscord<Rika> I believe header only takes in the header name and not a path
11:41:11FromDiscord<Hamid_Bluri> no
11:51:39*PMunch quit (Quit: Leaving)
11:53:18*PMunch joined #nim
12:04:53FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3Usk
12:05:51FromDiscord<Rika> In reply to @d4rckh "that didnt work, im": Can you show the whole error then
12:08:55FromDiscord<d4rckh> In reply to @d4rckh "Hello! Why can't I": its here
12:11:47FromDiscord<Rika> Then can you show what you tried doing
12:13:31FromDiscord<d4rckh> just trying to echo out an object with a custom type
12:13:36FromDiscord<d4rckh> which is inherited from another type
12:14:18FromDiscord<Rika> Can you show the code
12:15:17*slowButPresent joined #nim
12:16:40FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3Usm
12:19:49FromDiscord<Rika> Didn’t we tell you to make a to string proc?
12:28:06FromDiscord<d4rckh> yes.. but im not sure how
12:33:40*rockcavera joined #nim
12:33:40*rockcavera quit (Changing host)
12:33:40*rockcavera joined #nim
12:55:07FromDiscord<aph> In reply to @d4rckh "yes.. but im not": the "proc \`$\`" thing is a string proc
12:55:51PMunchSomething like this: https://play.nim-lang.org/#ix=3Usw
13:10:44*dtomato quit (Remote host closed the connection)
13:11:02*dtomato joined #nim
13:11:02*dtomato quit (Remote host closed the connection)
13:11:19*dtomato joined #nim
13:11:19*dtomato quit (Remote host closed the connection)
13:11:36*dtomato joined #nim
13:11:36*dtomato quit (Remote host closed the connection)
13:12:22*dtomato joined #nim
13:12:22*dtomato quit (Remote host closed the connection)
13:12:38*dtomato joined #nim
13:12:38*dtomato quit (Remote host closed the connection)
13:12:54*dtomato joined #nim
13:12:54*dtomato quit (Read error: Connection reset by peer)
13:13:10*dtomato joined #nim
13:13:10*dtomato quit (Remote host closed the connection)
13:13:26*dtomato joined #nim
13:13:26*dtomato quit (Remote host closed the connection)
13:13:58*dtomato joined #nim
13:13:58*dtomato quit (Remote host closed the connection)
13:14:31*dtomato joined #nim
13:14:32*dtomato quit (Read error: Connection reset by peer)
13:14:48*dtomato joined #nim
13:14:48*dtomato quit (Remote host closed the connection)
13:15:04*dtomato joined #nim
13:15:04*dtomato quit (Read error: Connection reset by peer)
13:15:21*dtomato joined #nim
13:15:21*dtomato quit (Remote host closed the connection)
13:15:52*dtomato joined #nim
13:15:52*dtomato quit (Read error: Connection reset by peer)
13:16:38*dtomato joined #nim
13:16:38*dtomato quit (Read error: Connection reset by peer)
13:16:54*dtomato joined #nim
13:16:54*dtomato quit (Read error: Connection reset by peer)
13:17:11*dtomato joined #nim
13:20:01FromDiscord<Alea> In reply to @Rika "i doubt so": Does anyone actually use that feature? It'd feel weird to not use the same case for every reference to a variable
13:21:21FromDiscord<Rika> In reply to @Alea "Does anyone actually use": It is important inter-library
13:21:34*SamuelMarks joined #nim
13:22:07FromDiscord<Rika> Someone who uses a library that uses snake case and that would want to use camel case
13:22:23NimEventerNew thread by Choltreppe: Problem when casting string to cstring on js backend, see https://forum.nim-lang.org/t/9084
13:28:35*SamuelMarks quit (Ping timeout: 246 seconds)
13:29:57*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:34:38FromDiscord<Generic> I like to write offsetof instead of offsetOf because that's what I'm used to from C++
13:35:50FromDiscord<Generic> though I've also already had some troubles, especially with _ being ignored in identifiers when wrapping a C library
13:36:24FromDiscord<demotomohiro> case sensitive means you can create variables `filename` and `fileName` in one scope. That can confuse people.
13:37:40FromDiscord<Rika> you can enforce a lint for in-project files
13:37:55FromDiscord<Rika> i believe --stylecheck:on would do so
13:37:57FromDiscord<Rika> not sure
13:38:01PMunch@Alea, ah you've fallen into the common trap when it comes to case-insensitivity
13:38:29FromDiscord<Rika> well i understand
13:38:32FromDiscord<Rika> (edit) "well i understand ... " added "the issue"
13:38:37PMunchPeople tend to imagine I create a variable "myVariable" and then later in my code use it as "my_variable". This is obviously not something that people actually do.
13:38:56PMunchWhat it is useful for, as @Rika pointer out, is when you import a library someone else has written.
13:39:15FromDiscord<Generic> https://github.com/switchbrew/libnx/blob/master/nx/include/switch/nvidia/types.h#L379-L380
13:39:34FromDiscord<Generic> that was my concrete example which was pretty painful
13:39:47FromDiscord<Rika> i'd say that's dumb, what's the actual difference?
13:39:53PMunchIn Python for example I might import two different libraries, one using camelCase, and the other using snake_case. This means that my code now has to have mixed styles, not great
13:39:54FromDiscord<Rika> why is the difference a single underscore?
13:39:56FromDiscord<Rika> what does it mean?
13:39:56FromDiscord<Generic> NvColorFormat_V8_U8 and NvColorFormat_V8U8 are two different enums
13:40:05FromDiscord<Rika> yes but what does that difference mean
13:40:10FromDiscord<Generic> no idea
13:40:12FromDiscord<Rika> and isnt that confusing for programmers nonetheless
13:40:13FromDiscord<Rika> see
13:40:19FromDiscord<Rika> its a dumb difference
13:40:42PMunchNim's style-insensitivity means that I can write my code in whatever casing rules I prefer, regardless of what the libraries I use have opted for.
13:40:45FromDiscord<Generic> I know, though what should I do when I wrap the C library
13:41:01FromDiscord<Generic> what I did in the end was replacing all the underscores with v
13:41:10DixieFlatlineWhy Discord?
13:41:11FromDiscord<demotomohiro> `NvColorFormat_V8_U8`, `NvColorFormat_V8U8` and ``NvColorFormat_U8_V8` can confuse me.
13:41:15FromDiscord<Generic> which doesn't look to bad, because they're all in screaming case
13:41:46FromDiscord<Generic> ah though Nim identifiers can have unicode symbols, right?
13:41:52PMunchDixieFlatline, what do you mean?
13:41:55FromDiscord<Generic> maybe there is some symbol which looks like an underscore
13:42:19PMunchThat would be painful to type though wouldn't it?
13:42:19FromDiscord<Rika> In reply to @Generic "ah though Nim identifiers": yes but that's diabolical
13:42:28FromDiscord<Rika> In reply to @DixieFlatline "Why Discord?": ?
13:42:56DixieFlatlineHow come yall using Discord except myself and PMunch ?
13:43:08PMunchWhat Futhark does in that case is just append specificities to the name until it reaches something unique
13:43:30PMunchDixieFlatline, not all of them are, but the many different platforms are all routed via Discord I believe
13:43:33FromDiscord<Rika> In reply to @DixieFlatline "How come yall using": because i want to. how come you're using irc?
13:43:48FromDiscord<Rika> my point is, so what?
13:43:56FromDiscord<demotomohiro> !eval var ◎ = 1; let ○ = 2; echo ◎, ○
13:43:58NimBot12
13:44:28DixieFlatlineBecause we've always done it that way.
13:44:34FromDiscord<Rika> In reply to @demotomohiro "!eval var ◎ =": 正解
13:44:38PMunchDixieFlatline, this is how it's all tied together: https://nim-lang.org/blog/2021/06/19/new-community-home.html
13:45:11DixieFlatlineIs there a Discord server written in nim?
13:45:33FromDiscord<Rika> no
13:45:46FromDiscord<Rika> discord servers are closed source if you mean that
13:45:48PMunchThe Telegram bridge was taken down though. The Telegram community is surprisingly quite different from this one :P
13:45:52*arkurious joined #nim
13:45:53PMunchLots more memes and such
13:49:04DixieFlatlineIs there an IRC server written in nim?
13:50:02FromDiscord<Rika> probably not
13:50:25FromDiscord<Rika> there might be one in github
13:51:00DixieFlatlineRika: is your avatar Rika Furude?
13:51:40FromDiscord<Rika> no
13:52:24PMunchThere actually is an IRC server written in Nim: https://github.com/enthus1ast/libch4t
13:53:24nrds<Prestige99> oh that's cool
13:57:54FromDiscord<Alea> In reply to @PMunch "What it is useful": Ah true, hadn't considered that, and I'm pretty sure that I do use it for that as well :hmm:
13:58:18*PMunch quit (Quit: Leaving)
13:58:47DixieFlatlineRika: Then what Rika is your nickname in reference to?
13:59:06FromDiscord<Rika> its just a name i picked
14:00:19FromDiscord<Rika> i know about higurashi though
14:00:28FromDiscord<Rika> just havent read it, not sure if i will
14:04:19DixieFlatlinemuh s t u d i o d e e n
14:04:25*SamuelMarks joined #nim
14:19:13FromDiscord<Zoom> That's the ethos of the whole network. Custom stickers everywhere↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
14:42:13*kayabaNerve quit (Ping timeout: 240 seconds)
14:58:02FromDiscord<jmgomez> is there a way to apply the same pragma to a set of proc?
14:58:28FromDiscord<Yardanico> there's a `push` pragma for cases like that
14:58:35FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#pragmas-push-and-pop-pragmas
15:00:00FromDiscord<jmgomez> beautiful, thanks @Yardanico!
15:07:26FromDiscord<jmgomez> sent a code paste, see https://paste.rs/CjD
15:09:05FromDiscord<jmgomez> sent a code paste, see https://paste.rs/6FA
15:09:26FromDiscord<jmgomez> (it does work without the push)
15:11:05FromDiscord<Rika> It’s a limitation
15:14:39*Gustavo6046 joined #nim
15:15:38*Gustavo6046 quit (Remote host closed the connection)
15:16:02*Gustavo6046 joined #nim
15:33:30FromDiscord<jmgomez> The path to the headers must be relative to the current nim file that includes it or to the execution point? Im trying both (and also with the compiler option cincludes:pathToFolder) but it doesnt pick it up
15:40:36*noxnivi joined #nim
15:40:40noxnivigood day
15:44:59*PMunch joined #nim
15:49:16*PMunch quit (Client Quit)
15:50:53FromDiscord<demotomohiro> In reply to @jmgomez "The path to the": If you want your nim file include C/C++ headers, you can put them anywhere and pass `--passC:-I/path/to/include/dir` to Nim. `--passC` option pass the option to backend compiler.
15:53:43FromDiscord<jmgomez> In reply to @demotomohiro "If you want your": thanks! it was driving me crazy. Couldnt find it on the docs or elsewhere..
15:54:19FromDiscord<jmgomez> I need to define all the member by hand, right?
15:54:58FromDiscord<demotomohiro> `--passC` and `--passL` options are explained in this doc: https://nim-lang.org/docs/nimc.html
15:55:01FromDiscord<jmgomez> I know how to do the funcs/methods but not sure how to approach the props
15:55:53FromDiscord<jmgomez> In reply to @demotomohiro "`--passC` and `--passL` options": yeah, I saw them but I was looking for something with "include" "header" etc.
15:57:32FromDiscord<demotomohiro> There are tools that automatically read C header and generate Nim bindings like c2nim or futhark but it seems they don't support C++.
15:58:27FromDiscord<demotomohiro> In reply to @jmgomez "yeah, I saw them": "include", "header" is C compiler things. You need to refer C compiler manual.
15:58:46FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Utl
15:59:56FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Utm
16:02:09FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
16:04:19FromDiscord<jmgomez> ohh you can keep defining the type in place. Thanks!!
16:04:24FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3Utp
16:10:27FromDiscord<jmgomez> It does work
16:33:30FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Utx
16:36:49FromDiscord<mratsim> In reply to @jmgomez "it works like this": push/pop sometimes doesn't apply user-defined pragmas properly.
16:39:49FromDiscord<mratsim> sent a long message, see https://paste.rs/kNI
16:41:02FromDiscord<mratsim> ah no, in my case it was because of needing default constructor
16:41:52FromDiscord<mratsim> In reply to @jmgomez "Im able to pass": did you compile with --app:lib and --header:foo.h?
16:42:11FromDiscord<jmgomez> ohh
16:42:11FromDiscord<jmgomez> yes
17:20:47*noxnivi quit (Remote host closed the connection)
17:21:35FromDiscord<TryAngle> does nim have channels similar to rust's crossbeam or tokio library ?
17:21:52*gsalazar quit (Ping timeout: 272 seconds)
17:22:29FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3UtN
17:22:46FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3UtN" => "https://play.nim-lang.org/#ix=3UtO"
17:23:51FromDiscord<Rika> kind of
17:23:55FromDiscord<Rika> oh wait
17:23:59FromDiscord<Rika> youre asking if it has
17:24:00FromDiscord<Rika> yes
17:24:13FromDiscord<Rika> module `channels` auto-imported when `--threads:on`
17:24:51FromDiscord<TryAngle> 😳
17:25:44FromDiscord<TryAngle> ok time to rewrite my rust app in nim thanks 🥺
17:26:54FromDiscord<Rika> https://nim-lang.org/docs/channels_builtin.html
17:29:45FromDiscord<TryAngle> is there somewhere an example how to use threads in nim?↵I'm looking at the docs but I'm not fully getting it
17:30:04FromDiscord<Rika> channels has some examples too lol
17:30:06FromDiscord<Rika> the link i sent
17:30:17FromDiscord<TryAngle> lol
17:30:35FromDiscord<TryAngle> thanks 🥺
17:35:11FromDiscord<bryankrn> i was installing nim via windows x86_64 and chrome blocked the downlaod, i forcefully installed it and was extracting it and windows says this https://media.discordapp.net/attachments/371759389889003532/961318163646119946/unknown.png
17:35:15FromDiscord<bryankrn> is this normal or no
17:39:46FromDiscord<Rika> yes
17:39:50FromDiscord<Rika> false positive
17:39:53FromDiscord<bryankrn> ok
17:41:03*jmdaemon joined #nim
17:50:49FromDiscord<kevin> In reply to @bryankrn "i was installing nim": Can we take a moment to appreciate how stupid Antivirus is
17:50:53FromDiscord<kevin> https://twitter.com/ShitSecure/status/1511583637904535552
17:51:18FromDiscord<kevin> Nim installer files being flagged by AV ^
17:51:53FromDiscord<Zoom> You probably should be using `threading/channels` by now, especially if you're using arc/orc↵(@TryAngle)
17:51:53FromDiscord<spoon> all i did was write an app that drew over your desktop window and malwarebytes called it a trojan 😔
17:52:42FromDiscord<kevin> In reply to @spoon "all i did was": How dare you do something not explicitly whitelisted by AV vendors
17:52:59FromDiscord<kevin> and BTW that list is different for each AV vendor
17:53:28FromDiscord<spoon> yea, i just virustotal'd it after i compiled out of curiosity
17:53:52FromDiscord<spoon> got like 9 flags, malwarebytes was the only one ive heard of
17:54:07FromDiscord<Rika> things that do anything REMOTELY shady is shady!
17:55:39FromDiscord<spoon> gotta love when norton security quarantines your dependencies though
17:56:06FromDiscord<spoon> and it takes like literally a full minute to open so you can unquarentine it
17:56:38FromDiscord<Rika> yeah thats why i go full yolo and dont have an antivirus on xd
17:56:42*rockcavera quit (Read error: Connection reset by peer)
17:57:08*rockcavera joined #nim
17:57:08*rockcavera quit (Changing host)
17:57:08*rockcavera joined #nim
17:57:41FromDiscord<kevin> on a different note, does anyone know how to setup their `config.nims` file to allow compiling multiple binaries at the same time
17:58:01FromDiscord<Rika> not really how that works i'd say
17:58:14FromDiscord<kevin> For a build script you're supposed to use setCommand (https://nim-lang.org/docs/nimscript.html#setCommand%2Cstring%2Cstring) maybe?
17:58:43FromDiscord<kevin> I am trying to define targets in my config.nims file such as `windows`, `linux`, `macosx` and `all`
17:59:36FromDiscord<kevin> but the `setCommand` proc only compiles after `config.nims` is finished -- only makes the last task in the list, not all of them
18:00:00FromDiscord<kevin> maybe there is a better way idk
18:04:23*SamuelMarks quit (Ping timeout: 250 seconds)
18:04:50*zeus-supreme1 joined #nim
18:05:39FromDiscord<TryAngle> array[0..255, WCHAR] how do I make this type to a string?
18:08:06*zeus-supreme quit (Ping timeout: 272 seconds)
18:17:26*PMunch joined #nim
18:18:27FromDiscord<TryAngle> In reply to @Zoom "You probably should be": ok will do that, thanks 😄
18:19:39*rockcavera quit (Read error: Connection reset by peer)
18:20:13*rockcavera joined #nim
18:20:13*rockcavera quit (Changing host)
18:20:13*rockcavera joined #nim
18:20:47FromDiscord<TryAngle> In reply to @TryAngle "array[0..255, WCHAR] how do": array[0..255, uint16]
18:21:19*v9fk1yn3nu joined #nim
18:31:16*SamuelMarks joined #nim
18:31:21FromDiscord<нυηтєя> Hai
18:32:58FromDiscord<enthus1ast> Hi
18:33:12FromDiscord<TryAngle> `proc _wcsicmp(string1: ptr wchar_t, string2: ptr WCHAR): cint {.importc, header: "corecrt_wstring.h".}`↵how do Import this? nim procs can't start with _
18:33:21FromDiscord<нυηтєя> Oo IRC
18:34:48FromDiscord<TryAngle> (edit) "wchar_t," => "WCHAR,"
18:35:05FromDiscord<enthus1ast> @TryAngle\: import\: "\_wcsicmp'
18:35:18FromDiscord<enthus1ast> Sorry ↵Importc
18:35:48FromDiscord<enthus1ast> Argh, ↵importc\: "name"
18:35:53*SamuelMarks quit (Ping timeout: 246 seconds)
18:36:38FromDiscord<TryAngle> In reply to @enthus1ast "<@147447489316913152>\: import\: "\_wcsicmp'": thanks
18:36:57FromDiscord<TryAngle> do you also know how to array[0..255, uint16] convert this to a string / cstring 🥺
18:37:40FromDiscord<enthus1ast> i always have to google this / look this up in wnim
18:37:58FromDiscord<enthus1ast> but afaik wnim has support for wstrings
18:38:17FromDiscord<enthus1ast> i mean winim
18:38:19FromDiscord<enthus1ast> ...
18:38:19FromDiscord<TryAngle> i need to compare two strings
18:38:30FromDiscord<TryAngle> and one is cstring, the other is array[0..255, uint16]
18:38:37FromDiscord<TryAngle> winim doens't have this function 😦
18:39:12FromDiscord<enthus1ast> then maybe convert both to a nim string or (since you're unsafe anyway) moveMem
18:40:00FromDiscord<enthus1ast> or maybe even cast is allowed
18:40:19FromDiscord<TryAngle> ye I ask how I convert 😭 I don't know this 😭
18:40:21FromDiscord<TryAngle> (edit) removed "😭"
18:40:50FromDiscord<TryAngle> I thought I just convert to string and use strutils::cmpIgnoreCase
18:41:03om3gahow to parse that "2022-03-29 15:09:01.965000000" to dt in times? Seems there is no "." pattern...
18:42:34om3gaPlease ignore
18:42:41om3gasingle quotes helped
18:42:46FromDiscord<enthus1ast> https://nim-lang.org/docs/times.html
18:43:10om3gaenthus1ast, thanks, just found about single quotes
18:54:56FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3Uuu
18:56:38FromDiscord<Rika> yes {.bitsize: 7.}
19:00:47*dtomato quit (Read error: Connection reset by peer)
19:02:05FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Uuy
19:02:12nrds<Prestige99> Trying to create a destroy hook for an object, getting an error about the proc signature https://i.imgur.com/vPGzJSQ.png
19:02:20FromDiscord<enthus1ast> but maybe someone knows a better (safer) way
19:02:23FromDiscord<TryAngle> ah thanks @entusiast but exactly just 1min ago I did a function myself
19:02:26nrds<Prestige99> tried a few different ways but always get this error
19:02:30FromDiscord<enthus1ast> jaja
19:02:33FromDiscord<enthus1ast> haha
19:02:43FromDiscord<TryAngle> this is what I do
19:02:47FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Uuz
19:02:57FromDiscord<enthus1ast> im still at work at 21\:00 here should go home i guess...
19:02:59*dtomato joined #nim
19:02:59FromDiscord<TryAngle> but yours is more efficient I guess?
19:03:07FromDiscord<enthus1ast> prolly
19:03:15FromDiscord<enthus1ast> but yours is safer
19:04:31nrds<Prestige99> Or is there some limitation using destroy hooks with inheritable objects?
19:06:41*LuxuryMode joined #nim
19:08:49FromDiscord<Rika> T must be not a ref
19:10:04nrds<Prestige99> So TextBox is a ref object in this case
19:11:34nrds<Prestige99> destroy hooks don't work for refs?
19:12:02FromDiscord<Rika> they kinda do, you just have to register it on the object and not the ref
19:12:13nrds<Prestige99> ah okay, thanks
19:12:39nrds<Prestige99> Don't know if that's possible with something that's inherited, then
19:12:51nrds<Prestige99> TextBox is a ref object of Foo
19:15:06*SamuelMarks joined #nim
19:19:59*SamuelMarks quit (Ping timeout: 246 seconds)
19:43:20*Gustavo6046 quit (Remote host closed the connection)
19:43:46*Gustavo6046 joined #nim
19:46:49*jjido joined #nim
19:52:14NimEventerNew thread by Prestige: `=destroy` ref object of RootObj?, see https://forum.nim-lang.org/t/9086
19:56:53*SamuelMarks joined #nim
19:58:53FromDiscord<luteva> is there a := operator in nim?↵somthing like:↵ course.appointments := course.appointments + [appointment]↵is that valid nim code?
19:59:29FromDiscord<exelotl> it's just `=`
19:59:35FromDiscord<spoon> `:=` does what?
19:59:56FromDiscord<luteva> don't know! I am just surprised! 🙂
20:00:15FromDiscord<exelotl> `:=` is assignment in Pascal-like languages
20:00:22FromDiscord<spoon> isn't that used in go for creating variables without defining a type or something or am i wrong
20:00:26FromDiscord<spoon> ah
20:00:30FromDiscord<exelotl> yes, that too
20:00:34FromDiscord<spoon> then yeah it's just `=`
20:01:44*SamuelMarks quit (Ping timeout: 252 seconds)
20:02:03FromDiscord<luteva> well i just realised that the copilot project has a first public testversion released and i of course wanted to test how it behaves with nim 😄
20:02:18FromDiscord<Rika> hint: it doesnt do well
20:02:28FromDiscord<luteva> yes i see
20:02:30FromDiscord<luteva> 🙂
20:02:46FromDiscord<luteva> but it's impressive anyway!
20:03:12FromDiscord<spoon> copilot is good for repeating code that is very similar
20:03:27FromDiscord<spoon> i don't use it to generate procs though, it hasn't worked well even in python
20:03:38FromDiscord<spoon> or c++
20:03:49nrds<Prestige99> it's great for repeating mistakes, too
20:03:54FromDiscord<luteva> although it makes you laugh from time to time 😉
20:04:09FromDiscord<luteva> but that shouldn't be bad.... saves my day 😄
20:05:56FromDiscord<Generic> I agree, if it wasn't for python copilot would spit out {} all over the place
20:06:03*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
20:06:06FromDiscord<Generic> tabnine is even worse, in Nim code it sometimes tries to add pascal style `end`
20:06:32*neurocyte861449 joined #nim
20:06:51FromDiscord<spoon> i used it with nim for a while and it generates the right format after you spend a little time with it
20:07:52FromDiscord<spoon> or at least it'll take from previous parts of the file
20:17:29*jmdaemon joined #nim
20:26:47FromDiscord<TryAngle> how do threads access global objects?
20:26:57FromDiscord<TryAngle> (edit) "access" => "read/write"
20:35:34FromDiscord<01> does nim have runtime exceptions/errors?
20:36:23FromDiscord<Phil> In reply to @Elegantbeef "So what's the issue": Finally got around to look at the issue again
20:37:44*SamuelMarks joined #nim
20:39:43*PMunch quit (Quit: leaving)
20:46:04FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3UuK
20:48:03FromDiscord<Phil> And even if I do this I get errors, because `readArticleById` assumes that the "P" that I pass in has an "id" field, which is not true for all `P` of `createReadHandler`, some of the P that I use there do not have "id" fields, so that immediately explodes in my face
20:48:42FromDiscord<Phil> Etc.↵That kind of stuff is why I moved away from overloading generics and rather give them more specific names
20:54:45FromDiscord<Phil> In reply to @01 "does nim have runtime": Yes
20:56:14FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3UuL
20:56:36FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3UuM
20:56:40FromDiscord<01> thanks
20:57:24FromDiscord<Zoom> Using a lock. Better think twice about your structure and use message passing if you can↵(@TryAngle)
21:00:54FromDiscord<morgan> is there a way to get a string representation of a procedural type?
21:01:00FromDiscord<TryAngle> In reply to @Zoom "Using a lock. Better": is there something like Arc[T] or RwLock[T] like rust has? or does nim use other patterns for that?
21:01:46FromDiscord<Zoom> @TryAngle\: I recommend going through docs first\: https://nim-lang.org/docs/threads.html https://nim-lang.org/docs/manual.html#threads
21:02:14FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3UuQ
21:02:34FromDiscord<Phil> That is, if you absolutely need a global variable
21:02:40FromDiscord<Phil> Generally, avoid those at all costs
21:03:14FromDiscord<TryAngle> In reply to @Isofruit "Generally, avoid those at": oh why? I come from rust where this was not doable at all and I thougth global variables were one of nims features?
21:03:33FromDiscord<Generic> global variables in non library code are good
21:03:39*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:03:46FromDiscord<Yayko> Hello all, I am in my learning of Nim, and I am on the ref object and the object, can someone explain to me the difference and which one to use in which case please?
21:03:54FromDiscord<TryAngle> In reply to @Generic "global variables in non": yes I'm writing a program, not a library
21:03:58FromDiscord<Phil> Global variables are possible, but generally they tend to be a not good idea.↵They add state that can affect your code in harder to predict ways
21:04:12FromDiscord<TryAngle> In reply to @Isofruit "Global variables are possible,": ah, that's true
21:04:15FromDiscord<Phil> (edit) "Global variables are possible, but generally they tend to be a not ... good" added "a"
21:04:35FromDiscord<Zoom> It depends on what you're writing. If it's some short script-like program, go for it. The more LoCs you have, the harder it gets to reason about your code↵(@TryAngle)
21:04:48FromDiscord<Phil> Avoiding global variables tends to make your code easier to reason about.↵There are scenarios where they're absolutely valid. E.g. I have yet to see a way to do resource pooling without a global variable
21:05:01FromDiscord<TryAngle> just figured I could use something like a "database" with read and write that is locked so I can avoid channels lol
21:05:10FromDiscord<Generic> it really depends on what you do
21:05:48FromDiscord<TryAngle> I want to separate my window / rendering and data processing thread
21:05:58FromDiscord<Zoom> You can make a shared resource, but it's always better to confine your procs to accessing only their args
21:07:12FromDiscord<Phil> Err could somebody better than me dive into ref object/object debate for Yayko?↵I for the most part stuck with "don't use ref-object" for some reason so I can't really contribute there
21:07:32FromDiscord<konsumlamm> In reply to @TryAngle "oh why? I come": there are reasons why Rust doesn't encourage global variables (it has them, but they're limited) and they're a bad idea in other languages too, for mostly the same reasons
21:07:53FromDiscord<Zoom> @TryAngle\: State is not your friend. The less, the merrier.
21:08:05FromDiscord<TryAngle> ok that is true zoom and konsumlamm
21:08:09FromDiscord<Generic> as a rule of thumb ref objects are good for larger objects passed around or in some datastructures like trees
21:08:10FromDiscord<TryAngle> I agree wit hthat
21:08:23FromDiscord<Phil> Wait, are non ref objects passed by value?
21:08:34FromDiscord<Phil> Is that the difference, pass by ref vs. pass by value in procs?
21:08:50FromDiscord<Generic> no, but once you need to mutate the object you need to use a var parameters
21:08:51FromDiscord<TryAngle> In reply to @Isofruit "Wait, are non ref": yes but procs that take: `var T` don't
21:09:13FromDiscord<Generic> and var parameters have limitations like they can't be captured by a closure
21:09:48FromDiscord<Phil> In reply to @TryAngle "yes but procs that": Yeh, makes sense, if you'd do a pass by value on a var T it wouldn't affect the object outside of the function call
21:10:24FromDiscord<Generic> they aren't passed by value above a certain size
21:11:04FromDiscord<TryAngle> In reply to @Generic "they aren't passed by": 🤔 are they a ref then
21:11:06FromDiscord<Phil> Check, so the pass by X behaviour is independent of the ref/non-ref type?
21:11:07FromDiscord<TryAngle> (edit) "then" => "then?"
21:11:58FromDiscord<TryAngle> (edit) "ref" => "referenced"
21:12:17FromDiscord<Generic> ref are traced pointers, the pass by reference (or rather pointer) for larger objects is hidden by normal Nim value type semantics
21:12:39FromDiscord<Zoom> Not exactly. References are primarily for many to one relations. They are managed pointers.↵(@Phil)
21:28:48FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3UuW
21:29:13FromDiscord<Phil> That is if you want a speaking proc type
21:29:41FromDiscord<morgan> interesting
21:30:02FromDiscord<Phil> Otherwise you can just call type() on the proc itself or whatever variable you put it in. ↵For the above code↵`lala.type()` would also work and give you the actual proc signature
21:30:29FromDiscord<Phil> In this case the output would be `proc (){.gcsafe, locks: 0.} == type proc (){.gcsafe, locks: 0.}`
21:30:47FromDiscord<morgan> i probably don't need it, i might just have it use a hardcoded copy of the code
21:30:56FromDiscord<Phil> (edit) removed "0.} == type proc (){.gcsafe, locks:"
21:31:27FromDiscord<Phil> I think if you can generalize your problem into an outsourced proc with a decent name that's likely better than copy-paste and adjust
21:31:35FromDiscord<Phil> But that entirely depends on your problem
21:32:06FromDiscord<Phil> Myself I found passing procs as params around very useful
21:32:26FromDiscord<Phil> Particularly while giving these types of procs specific names to make their supposed task clear
21:32:37FromDiscord<Phil> (edit) "Particularly while giving these ... types" added "proc" | removed "of procs"
21:33:57FromDiscord<morgan> in this case i have a callback type `proc (input: varargs[string, `$`]): void` and callbacks of the form `callbackInt: proc (val: int64): void` also for float, string, bool, and a fuzzy bool object
21:34:17FromDiscord<morgan> this is for a library and its intended for those to be used by someone using it
21:34:49*Gustavo6046 quit (Ping timeout: 248 seconds)
21:35:43FromDiscord<Phil> Given that you're dealing with multiple different types I'm getting a feeling overloads with signatures that accomodate for the various primitive types might be sensible
21:35:48FromDiscord<morgan> so they could be anything from for flags, setting variable if it's more complex than the mode where it assigns the variable to a stored reference, to large procs with all the logic for a cli app
21:36:02FromDiscord<Phil> (edit) "Given that you're dealing with multiple different ... types" added "primitive"
21:36:22FromDiscord<Phil> What's the general purpose of these procs
21:36:28FromDiscord<Phil> What task do they accomplish?
21:36:46FromDiscord<morgan> it's how the framework i'm writing will call the code of the user who is using it
21:36:59FromDiscord<morgan> it parses the cli input and calls their code
21:37:11FromDiscord<morgan> yes i know others stuff exists that does this
21:37:19FromDiscord<morgan> im mostly writing this for learning experience
21:37:22FromDiscord<Phil> Ahh check, so it associates some CLI inputs with a proc to execute
21:37:26FromDiscord<morgan> yep
21:38:18FromDiscord<Phil> And you take care of the parsing of the params for them?
21:38:19FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#ix=3UuY
21:38:22FromDiscord<morgan> yea
21:38:31FromDiscord<Phil> Hmmm that makes things a bit trickier
21:39:03FromDiscord<morgan> parsing subcommands, parsing flags, generating help commands automatically, it'll have command aliases
21:39:29FromDiscord<Phil> So based on flags, subcommands and param types you determine the proc to call
21:40:10FromDiscord<morgan> so the flag is a variant type and based on that it stores different procs
21:40:15FromDiscord<morgan> subcommands store one proc
21:40:30FromDiscord<morgan> flags will be set and call their callbacks first
21:40:33FromDiscord<morgan> then the subcommand
21:40:46FromDiscord<morgan> parent commands will not have their procs called
21:40:55FromDiscord<morgan> any further logic is for the callback to contain
21:41:40FromDiscord<Phil> Ugh, sorry I think I'm hitting my cognitive limit for the day. It's a cool idea and I'd love to keep chatting about this if you're around the chat once more later, but I can already feel my grasp on the subject matter slipping and I guess I really should be going to sleep
21:41:50FromDiscord<Phil> (edit) "Ugh, sorry I think I'm hitting my cognitive limit for the day. It's a cool idea ... and" added "for sure"
21:41:53FromDiscord<morgan> oki
21:41:55FromDiscord<morgan> gnight
21:42:11FromDiscord<Phil> Ta and and night everybody
21:43:35*wyrd quit (Ping timeout: 240 seconds)
21:50:45*wyrd joined #nim
22:07:08FromDiscord<Elegantbeef> Amun-Ra yea i do have an API to iterate over elements of an object definiiton aswell
22:16:02*SamuelMarks quit (Ping timeout: 246 seconds)
22:16:30FromDiscord<slymilano> Hey guys, how can I solve this `libwinpthread-1.dll` issue for my Nim project? https://github.com/sergiotapia/torrentinim/issues/28 - anyone have this issue for their projects?
22:16:53FromDiscord<Elegantbeef> Use MSVC i think is the answer
22:17:01FromDiscord<Elegantbeef> Or ship that dll with the binary
22:17:41FromDiscord<Elegantbeef> `libwinpthread` is the mingw posix library for pthread afaik, so when you use mingw for compiling you need it
22:18:15FromDiscord<Elegantbeef> I guess you can also try to statically link it
22:18:44FromDiscord<Elegantbeef> I assume your mingw is in your user path but not the admin path
22:19:00FromDiscord<slymilano> I don't have any devtools on my Windows machine. I'm testing this project as an end user.
22:19:53FromDiscord<slymilano> To statically link I would need to change this command, right? https://github.com/sergiotapia/torrentinim/blob/master/.github/workflows/release_asset.yml#L27
22:19:57FromDiscord<Elegantbeef> Then yea if distributing it you may want to consider static linking it or using msvc(think this uses a different thread api)
22:20:42*rockcavera quit (Read error: Connection reset by peer)
22:21:00FromDiscord<Elegantbeef> yea it'd be something like `--dynliboverride:winpthread --passL:"-static -lwinpthread`
22:21:05*rockcavera joined #nim
22:21:05*rockcavera quit (Changing host)
22:21:05*rockcavera joined #nim
22:21:27FromDiscord<Elegantbeef> Assuming you have the `winpthread.a`(or is it .lib for windows dont recal) file on your system
22:21:40FromDiscord<Elegantbeef> Ah it's `.a`
22:21:50Amun-RaElegantbeef: found another compiler bug, I still haven't reported the previous one
22:21:54FromDiscord<slymilano> Hm, I don't. I just off the shelf Nim packages. What if I just use `--app:staticlib` would that fetch and static link whatever it needs?
22:22:10Amun-RaElegantbeef: https://github.com/nim-lang/Nim/issues/19694
22:22:16FromDiscord<Elegantbeef> actually it might be ` --passL:"-static libwinpthread.a"`
22:22:29FromDiscord<Elegantbeef> No --staticlib is for exporting a library as static lib
22:22:46FromDiscord<Elegantbeef> Dont what?
22:23:41FromDiscord<Elegantbeef> Lol that's kinda funny amun
22:24:07FromDiscord<Elegantbeef> The reason the top level works is due to nim mangling the name, it doesnt realize it needs to mangle a name inside a procedure
22:24:47FromDiscord<Elegantbeef> As such https://play.nim-lang.org/#ix=3Uv5 works
22:24:48Amun-Rahmm, I haven't checked whether the function needs to be imported from C world or not
22:25:03FromDiscord<Elegantbeef> It does for this error to happen
22:25:50Amun-Rahmm
22:26:12FromDiscord<Elegantbeef> Nim generates symbols for it's own procedures so this wouldnt happen inside pure Nim
22:26:50Amun-Raah, right
22:27:15FromDiscord<Elegantbeef> https://wandbox.org/permlink/f6qDVoCViTV4lpk0 if you want to see
22:27:44FromDiscord<Elegantbeef> It's just a case of "When a variable is the same name as an importedC procedure Nim needs to generate a symbol for the variable"
22:27:44FromDiscord<slymilano> This seems related to my problem: https://github.com/greenfork/nimraylib_now/issues/66↵↵Not sure how I will include this as part of my github actions Windows build/release process.
22:28:13*Lord_Nightmare quit (Remote host closed the connection)
22:28:13FromDiscord<Elegantbeef> I mean does my suggestion not work?
22:28:19FromDiscord<Elegantbeef> Mingw has the static library
22:28:28FromDiscord<Elegantbeef> Atleast my linux mingw does, i doubt the windows one doesnt
22:28:34*Lord_Nightmare joined #nim
22:28:46FromDiscord<Elegantbeef> `/usr/x86_64-w64-mingw32/lib/libwinpthread.a` at this path if it's any help
22:29:35FromDiscord<slymilano> Trying to understand your suggestion. So in my Github action I would need to install mingw, find the libwinpthread.a and then use this as part of the build command specifically for Windows: `--dynliboverride:winpthread --passL:"-static -lwinpthread`
22:31:24Amun-Rahmm, --dynliboverride:winpthread --passL:libwinpthread.a?
22:33:04FromDiscord<slymilano> I'll try some stuff out thanks for the recommendations
22:33:58FromDiscord<TryAngle> is there a way to import enums without their "values"?
22:34:10FromDiscord<Elegantbeef> You dont need to install mingw it's the default with Nim
22:34:24FromDiscord<Elegantbeef> What do you mean import enums without their values?
22:34:31FromDiscord<Elegantbeef> What's the point of an enum without values
22:35:44FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Uv8
22:35:48FromDiscord<TryAngle> something like htat
22:36:05FromDiscord<TryAngle> so I don't clutter the scope with a lot of "junk"
22:36:10FromDiscord<Elegantbeef> Ah you want forced namespaces, Nim doesnt have any mechanism to force this anymore
22:36:38FromDiscord<TryAngle> lol
22:37:09FromDiscord<Elegantbeef> https://github.com/beef331/micros/blob/master/tests/test1.nim#L127-L149 here's a hack
22:37:14FromDiscord<Elegantbeef> "clutter the scope" is a sorta silly statement imo, but YMMV
22:37:22FromDiscord<Elegantbeef> I know prestige wants it
22:37:34FromDiscord<Elegantbeef> There is just no nice way of enforcing it whilst still allowing user choice
22:38:29FromDiscord<Elegantbeef> Speaking of prestige, i responded to your forum post if you havent seen
22:39:02FromDiscord<TryAngle> In reply to @Elegantbeef ""clutter the scope" is": yes in 90% of cases it's silly but now I work with nimgl and winapi and I already get namecollisions in just the hello world, I really want to reduce it a bit
22:39:25FromDiscord<TryAngle> and nimgl adds huge enums
22:39:29FromDiscord<TryAngle> (edit) "and nimgl adds huge enums ... " added "for example"
22:39:39FromDiscord<TryAngle> In reply to @Elegantbeef "Speaking of prestige, i": what forum post o_O
22:39:49FromDiscord<Elegantbeef> You can do `type MyEnum {.pure.} = enum`
22:39:53FromDiscord<Elegantbeef> Are you prestige?
22:40:11FromDiscord<TryAngle> ah lol, I thought u meant the noun
22:40:11FromDiscord<Generic> you can also use overloadable enums
22:40:30FromDiscord<TryAngle> (edit) "ah lol, I thought u meant the noun ... " added "and felt slightly attacked XD"
22:40:57FromDiscord<Elegantbeef> Yep overloadable and pure are both choices
22:41:00FromDiscord<Elegantbeef> The former is better imo
22:41:08FromDiscord<Elegantbeef> Though is behind a flag
22:41:19FromDiscord<TryAngle> yes so I would need to "fork" nimgl?
22:41:31FromDiscord<TryAngle> (edit) "nimgl?" => "nimgl to use pure pragma?"
22:42:31FromDiscord<Elegantbeef> Yes
22:43:28FromDiscord<Elegantbeef> Pure doesnt force `A1.` but it does allow ambiguous fields
22:52:56NimEventerNew thread by Domogled: JsFetch fetch, see https://forum.nim-lang.org/t/9087
23:04:38FromDiscord<TryAngle> when should I use doAssert and when assert?
23:06:31FromDiscord<exelotl> use `doAssert` if you want to check to _always_ happen, or `assert` if you want it to be disabled in a dangerous release build (`-d:danger`), or when `--assertions:off` is passed
23:06:36FromDiscord<exelotl> (edit) "to" => "the"
23:08:00FromDiscord<TryAngle> @ElegantBeef
23:08:03FromDiscord<TryAngle> I am so stupid
23:08:07FromDiscord<TryAngle> it's already pure lmao https://media.discordapp.net/attachments/371759389889003532/961401949197053992/unknown.png
23:09:15FromDiscord<Elegantbeef> So there is no issue
23:10:11FromDiscord<exelotl> it would be cool for `experimental:overloadableEnums` to become stable in 2.0
23:10:29FromDiscord<exelotl> (edit) "stable" => "the default"
23:10:38FromDiscord<Elegantbeef> it will in the next release
23:11:54FromDiscord<exelotl> oh sweet
23:13:07FromDiscord<Elegantbeef> 1.8.x not 1.6.x 😛
23:13:36FromDiscord<Elegantbeef> atleast afaik i might be misremembering
23:27:17FromDiscord<TryAngle> also any updates on: https://nim-lang.org/docs/manual_experimental.html#code-reordering ?
23:33:09FromDiscord<konsumlamm> In reply to @Elegantbeef "1.8.x not 1.6.x 😛": afaik the next release will be 2.0
23:33:32FromDiscord<konsumlamm> at least devel is now 2.0 with quite some breaking changes
23:34:04FromDiscord<konsumlamm> In reply to @TryAngle "also any updates on:": no
23:34:45FromDiscord<konsumlamm> i'd say "if there were, it would be in the manual", but that wouldn't be true
23:35:29FromDiscord<Elegantbeef> The update is it'll be removed for an automatic solution
23:36:08FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/961409000887422976/image.png
23:36:41FromDiscord<konsumlamm> (that doesn't mean it'll happen any time soon though)
23:36:54FromDiscord<TryAngle> In reply to @exelotl "use `doAssert` if you": ah I see thanks
23:36:57FromDiscord<Elegantbeef> soon \:tm\:
23:37:50*SamuelMarks joined #nim