<< 08-12-2020 >>

00:02:00FromDiscord<Quibono> So I think I finally need arraymancer and weave lol, thinking of playing around with a 4000x4000 array
00:07:08*mbomba quit (Ping timeout: 260 seconds)
00:08:12*mbomba joined #nim
00:17:48FromGitter<deech> Is there a built in to make a copy of a `cstring`?
00:20:28FromDiscord<ElegantBeef> It's copied on assignment
00:20:40FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2H5M
00:20:47mipriit's not.
00:21:06miprihttps://play.nim-lang.org/#ix=2H5N
00:23:27mipribetter: https://play.nim-lang.org/#ix=2H5O
00:23:54FromDiscord<ElegantBeef> I see
00:24:20FromDiscord<ElegantBeef> I was creating a new string and converting it then assigning b to it i suppose
00:33:20FromGitter<deech> `alloc0` it is!
00:41:18miprithat just allocates, so you still need copyMem, and then you have to deallocate it yourself
00:42:03mipri$p.cstring allocates a string and copies p into it, and then gives you a cstring that points into the string
01:03:20disruptekand you ask me why i drink.
01:04:43FromDiscord<ElegantBeef> Well we only have to interact with you, we dont have to live with you
01:05:47disruptekyou sound like my favorite red-head.
01:06:11disrupteki mean, she may not be my favorite, but the price is right. you get me?
01:13:31FromDiscord<shadow.> ofc
01:13:43FromDiscord<shadow.> i bet she loves your testes too
01:13:48FromDiscord<shadow.> they're quite pretty
01:13:54disrupteki know, right?
01:14:05FromDiscord<shadow.> of course
01:18:25FromDiscord<shadow.> hmm
01:18:38FromDiscord<shadow.> we need a custom graphics library for your testes so you can have full color
01:18:47FromDiscord<shadow.> and we don't have to limit them to ansi or whatever you're currently using
01:20:16FromDiscord<windowsboy111> I know I asked this question, but are there any gui libraries that support webpage rendering and like other normal gui toolkits? I knew that in C theres gtk and webkit2gtk but I'm not sure if I can do something similar
01:20:43FromDiscord<windowsboy111> I got stuck yet again.
01:21:13FromDiscord<windowsboy111> tried wxnim, doesn't really work well, often just doesn't compile at all
01:21:58*abm quit (Quit: Leaving)
01:22:23FromDiscord<ElegantBeef> Nimx?
01:24:16*Tanger joined #nim
01:24:32PrestigeCan you get nimx to compile atm?
01:28:39FromDiscord<exelotl> The nimx experience in browser wasn't so good for me
01:28:52FromDiscord<exelotl> At least when I tried the samples
01:29:06FromDiscord<ElegantBeef> I compiled it last week or so
01:29:24ForumUpdaterBotNew thread by ElegantBeef: JS isIndirect template excluding skVar, see https://forum.nim-lang.org/t/7224
01:29:27PrestigeI tried yesterday and had some issue, I'll try again in a bit when I'm free
01:29:32FromDiscord<exelotl> So my answer is, yet again "fidget, when its ready"
01:29:39FromDiscord<ElegantBeef> Well that's still not a toolkit imo
01:29:48Prestige^
01:29:54FromDiscord<exelotl> Ah fair
01:30:17Prestigemaybe when neogfx has full linux support, I'll make a wrapper
01:30:27FromDiscord<ElegantBeef> The biggest issue with nimx in browser, is the font rendering sucks
01:30:43FromDiscord<ElegantBeef> Super aliased
01:30:51disrupteknot clear if you want a webview, of which there are like 3-4 choices, or if you want a gui api that you can optionally render in the browser somehow.
01:31:24PrestigeI just want a good native option that is cross platform
01:31:33PrestigeI'm using electron till then
01:32:58FromDiscord<windowsboy111> nimx? DSL?
01:33:10FromDiscord<windowsboy111> is it called dsl
01:33:46FromDiscord<windowsboy111> yep
01:34:22FromDiscord<ElegantBeef> !repo nimx
01:34:23disbothttps://github.com/yglukhov/nimx -- 9nimx: 11GUI library 15 722⭐ 61🍴 7& 2 more...
01:34:31FromDiscord<windowsboy111> yeah, heard it before
01:34:44FromDiscord<windowsboy111> I just don't know it can render webpages
01:34:44FromDiscord<shadow.> hmm
01:34:50FromDiscord<ElegantBeef> Nimx can yes
01:35:04FromDiscord<ElegantBeef> Oh not entire webpages
01:35:13FromDiscord<ElegantBeef> But the UI works in browser/native http://yglukhov.github.io/nimx/livedemo/main.html
01:35:16FromDiscord<windowsboy111> hmm, interesting
01:35:48Prestigewhen I try to install the deps for nimx, clurp fails
01:35:51FromDiscord<windowsboy111> ah no, I
01:35:53FromDiscord<windowsboy111> ahh
01:36:06FromDiscord<ElegantBeef> What nim version?
01:36:07FromDiscord<windowsboy111> I mean like it can be a browser itself
01:36:22FromDiscord<ElegantBeef> Are you looking for a webview?
01:36:33FromDiscord<ElegantBeef> Nimx renders opengl natively and using webgl for browser
01:36:48FromDiscord<windowsboy111> oh
01:37:08PrestigeBeef: 1.4.2
01:37:37Prestigehttps://i.imgur.com/aiNrDTr.png
01:37:57Prestigejust running nimble install -d inside of a cloned nimx repo
01:38:35FromDiscord<ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/785681700218601472/unknown.png
01:39:15FromDiscord<windowsboy111> same https://media.discordapp.net/attachments/371759389889003532/785681865213870090/unknown.png
01:39:25ForumUpdaterBotNew thread by Lutins: Front webpage design proposal, see https://forum.nim-lang.org/t/7225
01:43:26FromDiscord<windowsboy111> what about nake
01:43:53*mbomba quit (Quit: WeeChat 3.0)
01:43:54FromDiscord<ElegantBeef> What about it?
01:44:06FromDiscord<windowsboy111> for some reason not found? do I need to configure $PATH manually https://media.discordapp.net/attachments/371759389889003532/785683087316353064/unknown.png
01:44:23*mbomba joined #nim
01:47:19FromDiscord<ElegantBeef> Did you add nimble to your path?
01:47:38FromDiscord<windowsboy111> yes? https://media.discordapp.net/attachments/371759389889003532/785683978316808232/unknown.png
01:48:04FromDiscord<ElegantBeef> I mean the nimble dir
01:48:31FromDiscord<windowsboy111> this? no https://media.discordapp.net/attachments/371759389889003532/785684199683260436/unknown.png
01:49:05FromDiscord<ElegantBeef> yea `~/.nimble/bin` should be in your path
01:49:16FromDiscord<ElegantBeef> It's where nimble installs shipped binaries
01:59:09FromDiscord<windowsboy111> ~~okay, not very stable~~ (actually I'm down, probably sth that is fixable) https://media.discordapp.net/attachments/371759389889003532/785686874848493629/unknown.png
02:01:32FromDiscord<shadow.> lol
02:01:36FromDiscord<shadow.> ye
02:02:24FromDiscord<windowsboy111> and also, this is really interesting
02:02:48FromDiscord<Rika> ngl i just realized this like a dumbass but doesnt nim resemble oberon more than python
02:02:51FromDiscord<windowsboy111> it doesn't follow my theme https://media.discordapp.net/attachments/371759389889003532/785687806730960928/unknown.png
02:03:08FromDiscord<Rika> isnt nimx gtk?
02:03:38FromDiscord<Rika> check your gtk theme settings
02:07:59FromDiscord<windowsboy111> yep, but... https://media.discordapp.net/attachments/371759389889003532/785689101163560960/unknown.png
02:08:59*snowolf quit (Remote host closed the connection)
02:09:47FromDiscord<Quibono> How do I define a type that has default fields that can't change?
02:10:25disruptekmake it a constant, i guess.
02:10:38disrupteks/constant/concept/
02:11:28FromDiscord<Quibono> What's the second bit mean?
02:12:03FromDiscord<Quibono> Like I'm trying to make a currency library so for instance the number of digits after the decimal separator should be constant for each currency.
02:13:22FromDiscord<ElegantBeef> Nimx is custom rendered @Rika @windowsboy111 it doesnt use GTK, that's nigui you're thinking of
02:13:45FromDiscord<reilly> Does the stdlib include something for pretty-printing integers (i.e. 123456 -> 123,456) or do I have to make that myself?
02:14:04FromDiscord<windowsboy111> nigui?????
02:14:07FromDiscord<windowsboy111> reallly?
02:14:10FromDiscord<ElegantBeef> Nigui uses gtk
02:14:14FromDiscord<ElegantBeef> Nimx is custom rendered
02:14:22FromDiscord<windowsboy111> oh
02:14:22FromDiscord<ElegantBeef> Nigui doesnt work in browser afaik
02:14:22FromDiscord<windowsboy111> ok
02:14:27FromDiscord<windowsboy111> misunderstood
02:14:32disruptekit means you might be able to conceptually limit implementation based upon mutability, but you cannot make the object have a static field value without a fair amount of boilerplate.
02:14:47FromDiscord<windowsboy111> I want it to work like a browser btw, not work in a browser
02:14:56FromDiscord<ElegantBeef> So you want a webview?
02:14:59FromDiscord<windowsboy111> yes
02:15:03FromDiscord<ElegantBeef> Then go get a webview
02:15:36FromDiscord<windowsboy111> my original code is really really really horrible, https://media.discordapp.net/attachments/371759389889003532/785691014772817950/unknown.png
02:15:53FromDiscord<Quibono> I think I can just do it with object inheritance.
02:16:06FromDiscord<windowsboy111> I shouldn't even post this image at all, this is totally bull\\\\
02:16:15FromDiscord<ElegantBeef> Neel and webgui should work for you
02:17:00FromDiscord<windowsboy111> actually I tried out neel before, but then I want the tab thingy to be natively coded, instead of javascript
02:17:19FromDiscord<Rika> what do you mean?
02:18:05FromDiscord<windowsboy111> neel ain't bad at all https://media.discordapp.net/attachments/371759389889003532/785691639280566343/unknown.png
02:18:09FromDiscord<windowsboy111> (my old code)
02:18:10FromDiscord<Rika> oh you mean you'd like your gui to be native?
02:18:22FromDiscord<windowsboy111> yes, other parts to be native
02:18:42FromDiscord<windowsboy111> but if it is not possible, I'll just code it in js
02:19:29FromDiscord<Rika> then just webview should be relevant, continue with the normal gui lib youre using unless you also want theming via gtk or kde
02:19:41FromDiscord<Rika> qt not kde
02:20:55FromDiscord<windowsboy111> so you mean you can use webview with other gui libs? how?
02:22:38FromDiscord<Rika> im not sure maybe its a different webview i think of
02:23:39disruptekthis filter, this tiny piece of code... exposes a c++ codegen error.
02:23:44disrupteki can't believe it.
02:24:03disruptekit's only 60 fucking lines.
02:24:11FromDiscord<ElegantBeef> Just say i wrote it and blame me
02:24:58disruptekit doesn't work in nim-1.0 or devel. unlikely to work anywhere in between.
02:26:26*idxu_ joined #nim
02:27:08*idxu quit (Ping timeout: 260 seconds)
02:27:28*idxu_ is now known as idxu
02:28:02*FromGitter quit (Ping timeout: 260 seconds)
02:29:26*oprypin quit (Ping timeout: 264 seconds)
02:31:45*cmc[m] joined #nim
02:32:05FromDiscord<shadow.> id say if anything it resembles modula 3 more
02:32:22FromDiscord<shadow.> i mean maybe not in syntax
02:32:25FromDiscord<shadow.> but in model certainly
02:32:58disruptekmodula 3 is the one with keanu reeves in it, right?
02:33:09FromDiscord<Rika> in syntax it looks like oberon dunnit?
02:33:26*oprypin joined #nim
02:35:00*mbomba quit (Quit: WeeChat 3.0)
02:35:24FromDiscord<shadow.> yeah kinda haha
02:35:40FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785696063851069471/modula2.png
02:35:40FromDiscord<shadow.> but see
02:35:43FromDiscord<shadow.> procedure
02:35:45FromDiscord<shadow.> var block
02:35:54FromDiscord<shadow.> simple number ranges and type inference
02:36:03FromDiscord<shadow.> english operators like mod
02:36:19FromDiscord<Rika> the var blocks on the top reminds me of really old C
02:36:26FromDiscord<shadow.> haha
02:36:33FromDiscord<shadow.> what, early declarations?
02:36:37FromDiscord<Rika> yeah
02:36:41FromDiscord<shadow.> fair enough lol
02:38:22FromDiscord<Rika> or maybe algol?
02:38:29FromDiscord<Rika> i dont remember which language i remember
02:38:35disruptekwhoa.
02:38:51*disruptek 🤯
03:00:07*a_chou joined #nim
03:00:45*a_chou quit (Remote host closed the connection)
03:16:30FromDiscord<reilly> I'm losing my mind struggling at something so basic. Is there a thing for pretty printing an integer? (i.e. 12345 -> 12,345)
03:20:53FromDiscord<shadow.> underscore
03:21:04FromDiscord<shadow.> oh wait
03:21:13FromDiscord<shadow.> you mean formatting it?
03:21:28FromDiscord<shadow.> bc you can do like:
03:21:34FromDiscord<shadow.> !eval echo 12_345
03:21:36NimBot12345
03:21:44FromDiscord<shadow.> for readabilitt
03:21:49FromDiscord<ElegantBeef> They want to pretty print it
03:21:49FromDiscord<shadow.> (edit) "readabilitt" => "readability"
03:21:56FromDiscord<shadow.> yeah oki
03:22:09FromDiscord<shadow.> in that case idk, prolly somewhere in the sto lol
03:22:13FromDiscord<shadow.> stl
03:25:21FromDiscord<Quibono> I mean you could like make a proc with a counter counting backwards and adding commas after every third char...
03:25:29FromDiscord<Quibono> 😮
03:27:41FromDiscord<reilly> It's strutils.insertSep().
03:30:10FromDiscord<Quibono> ... But I was making a really ugly kludgy way to do it lol
03:34:31FromDiscord<reilly> I've been trying to make a really kludgy way to do it for the past hour.
03:47:30FromDiscord<Quibono> https://play.nim-lang.org/#ix=2H6K
03:47:39FromDiscord<Quibono> I don't get why it thinks revStr is undeclared
03:48:18*nekits07 quit (Ping timeout: 256 seconds)
03:48:21FromDiscord<Rika> "len.revstr" -> "revstr.len"
03:48:23FromDiscord<Rika> lmao
03:49:21FromDiscord<Rika> @Quibono "len.revstr" -> "revstr.len" if you didnt see yet
03:49:44FromDiscord<Quibono> Thanks, now I just need to figure out why it returns... nothing lol
03:50:37FromDiscord<Rika> .. will not count down
03:50:45FromDiscord<Rika> so 1..0 -> no looping
03:50:52FromDiscord<Rika> use countdown() for reverse counting
03:51:11*nekits07 joined #nim
03:51:12FromDiscord<Rika> also you're using the string values as numbers?
03:51:28FromDiscord<Quibono> Yeah I'm all over the place, brb
03:53:28FromDiscord<Quibono> I always get confused between the index of the thing and the value at the index.
03:54:07FromDiscord<Rika> just keep on practicing like this and youll remember sooner or later
03:54:30*audiofile joined #nim
03:54:51*gangstacat quit (Quit: Ĝis!)
03:56:37FromDiscord<Quibono> https://play.nim-lang.org/#ix=2H6M
03:56:39FromDiscord<Quibono> Boom, it works
03:56:54FromDiscord<Quibono> Probably a much simpler way to do that, but...
03:58:16FromDiscord<Quibono> Thank you to @Rika for not laughing too uproariously and helping when I had no clue what was wrong.
04:05:22FromDiscord<Rika> 👌
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:32*supakeen joined #nim
04:07:45FromDiscord<Quibono> Is there a better way to do it?
04:14:26FromDiscord<Rika> to do what
04:15:11FromDiscord<Rika> btw you did the value index mixup thing again on line 13
04:16:30FromDiscord<Quibono> To pretty a number like that
04:17:00FromDiscord<Rika> like reilly said https://nim-lang.org/docs/strutils.html#insertSep%2Cstring%2Cchar%2Cint
04:21:25FromDiscord<ElegantBeef> The nice thing is you can always click "source" and see this https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/strutils.nim#L2288
04:21:38*narimiran joined #nim
04:25:51*mbomba joined #nim
04:29:49audiofileim bacccc
04:31:40*gangstacat joined #nim
04:32:01FromDiscord<ElegantBeef> yellow
04:38:25*thomasross quit (Ping timeout: 240 seconds)
04:44:07*waleee-cl quit (Quit: Connection closed for inactivity)
05:08:00*a_chou joined #nim
05:08:05*audiofile quit (Ping timeout: 240 seconds)
05:37:43FromDiscord<Cohjellah> Hey guys with strscan
05:37:51FromDiscord<Cohjellah> how do I match a char and set it to char variable
05:38:01FromDiscord<Cohjellah> if I use $w it throws an error because it's a char variable, not string
05:38:16*nekits07 quit (Ping timeout: 240 seconds)
05:40:39FromDiscord<ElegantBeef> I dont think it's possible as the parser thinks `$w` is a string
05:40:56FromDiscord<Cohjellah> there's no character matcher for a char?
05:40:58FromDiscord<Cohjellah> Guess I'll use a string
05:41:13FromDiscord<ElegantBeef> https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/strscans.nim#L310
05:41:13FromDiscord<ElegantBeef> nope
05:41:55*vicfred quit (Quit: Leaving)
05:46:31FromDiscord<flywind> see https://github.com/nim-lang/Nim/pull/16240
05:46:31disbotadd support for parsing chars in `scanf` macro
05:46:54FromDiscord<flywind> and use devel version
05:51:30FromDiscord<ElegantBeef> Dont show that as it proves i'm inept with git 😛
05:52:42*NimBot joined #nim
05:54:47narimiranthen do `let myChar = parsedString[0]` and live with it
06:05:57*a_chou quit (Quit: a_chou)
06:06:27FromDiscord<starl0rd> morning everyone.
06:06:39FromDiscord<starl0rd> help me understand this ? -> https://play.nim-lang.org/#ix=2H7a
06:08:17FromDiscord<ElegantBeef> https://nim-lang.org/docs/system.html#new%2Cref.T
06:08:51FromDiscord<starl0rd> motivated by Zevvs: article here, https://zevv.nl/nim-memory/. it says only way to get a ref pointer is use the `new` kw
06:09:16FromDiscord<ElegantBeef> What do you expect?
06:12:01FromDiscord<ElegantBeef> That's the only way for a ref pointer of a non heap allocated type
06:12:17FromDiscord<ElegantBeef> `ref objects` are explicitly heap allocated
06:12:23FromDiscord<ElegantBeef> @starl0rd Where is the confusion?
06:13:30FromDiscord<starl0rd> yea, no, your links clears it. thanks
06:13:32FromDiscord<starl0rd> : )
06:17:46FromDiscord<starl0rd> also, if i have a `ref object` type, like Person, `typeof Person()` give me `Person` and not `ref Person` ?
06:17:54FromDiscord<starl0rd> (edit) "give" => "gives"
06:18:10FromDiscord<ElegantBeef> Well yea person is a ref object
06:18:50FromDiscord<ElegantBeef> Typically what you do if you want both is declare a `PersonRef` or `PersonObj` for whichever you'll use less
06:19:14FromDiscord<ElegantBeef> Then the ref is `Person = ref PersonObj` in the case you use `Person` a lot
06:19:37FromDiscord<ElegantBeef> See the json node for example https://nim-lang.org/docs/json.html#JsonNode
06:21:47FromDiscord<ElegantBeef> I guess i should've just said "ref objects are not `ref Person` since that'd wrong/annoying"
06:22:00FromDiscord<Rika> ref Person == ref ref object
06:22:01FromDiscord<ElegantBeef> Cause if person is a ref object that's `ref ref object`
06:22:05FromDiscord<ElegantBeef> Shit rika!
06:22:14disrupteki usually just assume that it's wrong/annoying if you're the one saying it.
06:22:20FromDiscord<ElegantBeef> Cheers
06:22:45FromDiscord<ElegantBeef> Truthfully i do the same
06:23:29FromDiscord<starl0rd> i think i kind of get it, and kind of dont ?
06:24:03FromDiscord<ElegantBeef> The ref is included in the object declaration to say `ref Person` is wrong as there is no `Person`
06:24:05FromDiscord<starl0rd> non ref objects are simple. everytime you get a new object and copying /reassigning actually copies it
06:24:14disruptekthe idiom is `new (ref Person)` when you haven't defined a ref type for Person.
06:24:33FromDiscord<starl0rd> ref objects do give a referece since when i re-assign them, i can modify the orignal
06:24:49FromDiscord<starl0rd> which means they ought to be returning a ref / pointer
06:24:50FromDiscord<ElegantBeef> They're heap allocated, with managed pointers
06:24:50disruptekwhat languages have you written?
06:25:18disruptektypeof yields the symbol name for the type, period.
06:25:37FromDiscord<starl0rd> sure, but the typeof should tell me its a refernce / pointer
06:25:42disruptektypeof yields the symbol name for the type, period.
06:25:44FromDiscord<ElegantBeef> Why should it?
06:25:55FromDiscord<ElegantBeef> If you want to see if it's reference look at the code not the console
06:26:03FromDiscord<Rika> think of it this way
06:26:17FromDiscord<Rika> Person is an alias for whatever the object declaration is
06:26:23FromDiscord<Rika> like a template
06:26:44FromDiscord<Rika> so if you say Person = ref object, saying "Person" means "ref object"
06:27:00FromDiscord<Rika> if you say "ref Person", it will mean "ref ref object" which is wrong
06:27:07FromDiscord<starl0rd> sure
06:27:13FromDiscord<Rika> unless its really a double ref
06:27:17disruptekPerson is a symbol.
06:27:22disruptekref object is a typedef.
06:27:31disruptektypeof yields symbols, not typedefs.
06:27:35FromDiscord<starl0rd> but if i do `var a = Person()`
06:27:40FromDiscord<starl0rd> a does hold a reference
06:27:43FromDiscord<Rika> ye
06:27:45FromDiscord<Rika> yes
06:27:45FromDiscord<starl0rd> (edit) "a" => "`a`"
06:27:47disruptekif you want to dig into the type's definition, you need to use macros.
06:27:58FromDiscord<Rika> and typeof says its a reference, its implicit when you say "Person"
06:28:05FromDiscord<starl0rd> so the `typeof a` should be a ref
06:28:10FromDiscord<Rika> and it does
06:28:11disruptekholy smokes.
06:28:43FromDiscord<starl0rd> lol. so Person MEANS is a `ref` implicitly
06:28:47FromDiscord<ElegantBeef> Yes
06:28:47FromDiscord<starl0rd> i geddit now
06:28:59FromDiscord<starl0rd> too much of C conditioning
06:29:02FromDiscord<starl0rd> i guess
06:29:07FromDiscord<starl0rd> Thanks guys.
06:29:34FromDiscord<starl0rd> @Rika @ElegantBeef disruptek: +1 for assist
06:36:56*Cthalupa quit (Ping timeout: 240 seconds)
06:39:24*Cthalupa joined #nim
06:58:08disruptekthere's something funky going on with intsets.
07:00:52disrupteknever mind, i'm blind.
07:21:42FromDiscord<starl0rd> a teeny tiny Q. if i instantiate a non ref object. like `var a = NonRef()` it'll be on the stack vs if i do `var b = new NoRef()` then it'll be on the heap ?
07:21:53disruptekright.
07:22:13FromDiscord<Rika> yes
07:22:26FromDiscord<starl0rd> your boy got this, it seems
07:23:19*habamax joined #nim
07:28:48FromDiscord<ElegantBeef> Congrats!
07:30:38FromDiscord<ElegantBeef> Now you know why we use `init` for objects and `new` for ref objects 😄
07:32:07FromDiscord<starl0rd> haven't seen any `init` tho
07:32:17FromDiscord<starl0rd> i just call the constructor ?
07:32:59FromDiscord<ElegantBeef> For custom constructors that are procs convention dictates you use `initObject` of non refs and `newObject` for ref objects
07:33:29miprihttps://nim-lang.org/docs/tables.html - example with initTable procs
07:34:37mipriand separate newTable procs. And although you can see the fields of the types there, the fields aren't exported so you can't use the constructor
07:35:02disruptekthat reminds me,
07:35:16disruptekwhy does bentley always look at me while licking his little doggy dick?
07:35:28FromDiscord<ElegantBeef> To make you envious
07:36:04mipriit's only because he's wondering why you've from across the room to stare at him at close range, coincidentally whenever he does that.
07:36:38disrupteki was asking rika.
07:37:03FromDiscord<nikki> i like `let p = (ref Person)(name: "hoho", age: 42)`
07:37:23disrupteki love me some hohos.
07:37:44FromDiscord<nikki> and not giving names to ref types
07:37:52FromDiscord<nikki> they can show up in fields etc. for sure
07:37:56disruptekyuk.
07:38:20FromDiscord<starl0rd> so `initThis` means, by convention, it's a normal value type / object that'll be copied. while `newThis` means it'll be a `ref` type and copies will mutate the orig
07:38:29FromDiscord<Rika> why would you ask me i thought everything i said was worthless
07:38:45FromDiscord<Rika> yes starl0rd
07:39:07FromDiscord<starl0rd> must be getting tiring xD
07:39:20FromDiscord<Rika> no im used to it
07:39:35FromDiscord<Rika> i honestly wish my patience were longer
07:39:59disrupteki figured you'd have some expertise in this area.
07:40:22FromDiscord<starl0rd> isn't patience an uncountable ?
07:40:44FromDiscord<Rika> isnt length an uncountable as well
07:40:48FromDiscord<starl0rd> like you can have more or less of it, like rain, but not longer ?
07:40:54mipripatients are always countable, starl0rd. They're human beings.
07:41:12FromDiscord<starl0rd> patience, patient.
07:41:52disruptekstarl0rd: so i reimpl your bloom filter and it exposed a cpp codegen bug.
07:42:22FromDiscord<starl0rd> filter level, 9000+
07:42:37disruptekyou can't make this stuff up.
07:42:46FromDiscord<starl0rd> what did it break ?
07:42:54disruptekeven when i'm trying to be good, i manage to trip over shit some bozo left lying in the dark.
07:43:23disrupteksomething to do with builtin set sizing, but only under cpp.
07:43:33disruptekand mutability.
07:43:43FromDiscord<starl0rd> i legit made it off a wiki article, i haven't the slightest idea if it was supposed to be that way : P
07:44:01disruptekno, mine is quite different.
07:44:29FromDiscord<starl0rd> can i have a look ?
07:44:29disruptekyours supposed unlimited size; mind is for smaller quantities.
07:44:35disrupteksupports, too.
07:44:46disruptekyeah, it's in skiplists now.
07:44:50disruptek!repo skiplists
07:44:51disbothttps://github.com/disruptek/skiplists -- 9skiplists: 11generic skip list implementations💃 15 6⭐ 1🍴
07:44:54*PMunch joined #nim
07:45:15disrupteknow it's failing on windows. 🤣
07:47:51FromDiscord<starl0rd> might aswel name it safari.
07:49:11FromDiscord<sealmove> @PMunch (and whoever might interest): I laid out the whole idea behind binaryparser's reword, check it out: https://github.com/PMunch/binaryparse/issues/14. As I warned this is huge change and I am very motivated to go forward with it, so it seems likely it will be a fork under the name "binarylang" or something, unless you are up for letting me change the whole code :P.
07:49:13FromDiscord<starl0rd> yours has layers of filters
07:49:13disbotSyntax rework/extension ; snippet at 12https://play.nim-lang.org/#ix=2H7w
07:50:15disruptekyeah, mine is designed to leverage the built-in sets.
07:50:48FromDiscord<starl0rd> hey, i found a nit : P
07:50:57disruptekwhat's that?
07:51:09FromDiscord<starl0rd> Natural vs uint
07:51:26FromDiscord<starl0rd> no wrap around arith, tho you probably wont ever hit it
07:52:06disruptekyeah, i need them to fail if the conversion to uint16 fails.
07:52:13disruptekwhatfer set limitation reasons.
07:52:47disruptekdid you measure the size of your filter?
07:55:58FromDiscord<starl0rd> i did
07:56:36FromDiscord<starl0rd> i am measuring `sizeof set[range[0..10]]` now, which gives me 2
07:57:03FromDiscord<starl0rd> and when i do `sizeof set[range[0..100]]` it gives me 13
07:57:11FromDiscord<starl0rd> what is happening here ?
07:57:22disruptekwhen we don't know the answer we just make up numbers.
07:58:21FromDiscord<starl0rd> like the Govy.
07:58:23FromDiscord<starl0rd> Govt.
07:58:34disruptekyeah, it's fine.
07:58:37FromDiscord<nikki> !eval echo(sizeof set[range[0..100]])
07:58:39NimBot13
07:58:50disruptekif you get an invoice you don't agree with, just don't pay it.
07:59:39disruptekyou were storing a byte for every bit, for each layer.
08:00:33FromDiscord<starl0rd> i just had 1 layer
08:00:59FromDiscord<ElegantBeef> 100/80
08:01:00disruptekoh i thought you had a 3-hash setup.
08:01:10FromDiscord<ElegantBeef> 100/8 😄
08:01:21FromDiscord<Rika> 100/8 then ceil it
08:01:28FromDiscord<starl0rd> all 3 hashes mapped to 1 bit Array
08:01:38FromDiscord<Rika> !eval echo ceil(100/8)
08:01:40NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'ceil'
08:01:43FromDiscord<Rika> does ceil exit in
08:01:50FromDiscord<Rika> okay that answers my question
08:01:54FromDiscord<Rika> was it in math
08:01:58disruptekmost likely.
08:02:04FromDiscord<Rika> !eval import math; echo ceil(100/8)
08:02:07NimBot13.0
08:02:29FromDiscord<Rika> theres why sizeof set[range[0..100]] is 13
08:02:35disruptekof course.
08:02:43FromDiscord<starl0rd> isn't set supposed to be BIT vectors ?
08:02:50FromDiscord<starl0rd> it should be 100 BITS
08:02:53FromDiscord<ElegantBeef> no
08:02:58*disruptek sighs.
08:02:59FromDiscord<ElegantBeef> well it has to be base 2
08:03:12FromDiscord<Rika> 100 bits indeed now divide that by 8 to get bytes
08:03:17FromDiscord<Rika> sizeof gives bytes
08:03:18FromDiscord<ElegantBeef> well 8 multiple
08:03:48FromDiscord<starl0rd> facepalms into eternity
08:04:00FromDiscord<Rika> ahahaha
08:04:08FromDiscord<Rika> it doesnt really make sense to count in bits
08:04:22FromDiscord<Rika> because you cant exactly have smaller than a byte anyway
08:04:26FromDiscord<starl0rd> that's how i look at nim sets now, mentally
08:04:37FromDiscord<starl0rd> 1 bit for each number in whatever range you passed
08:04:45disruptekyes.
08:04:49FromDiscord<starl0rd> it's either, there, or isnt
08:04:50FromDiscord<Rika> yup
08:04:52FromDiscord<Rika> thats true
08:05:02FromDiscord<starl0rd> doesn't matter if you use it or not
08:05:05FromDiscord<Rika> yep
08:05:30FromDiscord<starl0rd> and i was told it was done because we cant guess what numbers will end up in set eventually
08:05:37FromDiscord<starl0rd> even tho i am not using them now
08:05:47FromDiscord<starl0rd> like if i union with another set and suck
08:05:51FromDiscord<starl0rd> such
08:06:00disruptekyou can pack objects with bits using the .bitsize pragma.
08:06:15FromDiscord<starl0rd> how so ?
08:07:26disruptekby using the .bitsize pragma on an object field to indicate its size in bits.
08:07:33FromDiscord<starl0rd> https://play.nim-lang.org/#ix=2H7D
08:07:56FromDiscord<starl0rd> i did it without sets. and it wont let me make it an array till i told it the size
08:08:07disruptekthat's the thing about arrays...
08:08:37FromDiscord<ElegantBeef> Arrays are sized at compile time
08:08:50FromDiscord<ElegantBeef> If you dont know the size you want at compile time, you get a seq 😄
08:09:09FromDiscord<starl0rd> i should know this at compile time
08:09:14FromDiscord<starl0rd> i am WRITING this lol
08:09:22FromDiscord<starl0rd> with no user input or stuff
08:09:35FromDiscord<starl0rd> i could make them arrays it seems
08:10:01FromDiscord<starl0rd> and if i make a array of range[0..1] it really should hold 1 bit per value
08:10:10FromDiscord<starl0rd> per element
08:10:36FromDiscord<ElegantBeef> No you'd be getting 1 byte per element
08:10:37disruptekwhat you really want is to dynamically compute the ideal k/n values to tune the filter after you know how large it needs to be and what performance you need.
08:11:11FromDiscord<starl0rd> int8's ?
08:11:15FromDiscord<Rika> @ElegantBeef more of "however large the element is" per element smh
08:11:25FromDiscord<ElegantBeef> Well yea 0..1 isnt a bit
08:11:28FromDiscord<Rika> int8 is 8 bits large
08:11:50FromDiscord<Rika> just like how bools are 8 bits large
08:12:03FromDiscord<ElegantBeef> If you want bit's use ints or bitsets 😄
08:12:18disruptekhttp://nim-lang.github.io/Nim/manual.html#implementation-specific-pragmas-bitsize-pragma
08:13:03FromDiscord<starl0rd> if i only 2 values, and i want to use however bits needed to represent them completly (1 in this case), how do i tell the compiler that ?
08:13:23FromDiscord<starl0rd> the bitsize pragma , like disruptek posted ?
08:13:25disrupteki will need a larger bloom filter, so the next version has to be based upon intsets, or something from-scratch.
08:13:55FromDiscord<starl0rd> i guess you used 1 hash functions and 3 arrays / location spaces
08:13:56disruptekyes, but there's no way to use that syntax outside of an object.
08:14:07FromDiscord<starl0rd> i used 3 hash functions and 1 location space : P
08:14:25disruptekwell i wanted to be able to use less memory.
08:15:34disruptekwhat's funny is, someone just reported the "bug" that sets always use 16bit ints underneath.
08:16:12FromDiscord<starl0rd> that's... me
08:16:24disruptekoh, that makes sense.
08:16:45FromDiscord<starl0rd> i picked it up when going through the tutorial at the sets part
08:16:50disrupteki was gonna code around it but i decided it doesn't matter enough.
08:17:48disruptekbetter to have a simpler impl and then one that scales larger, because the small one is more valuable as a fully static type.
08:28:28*Vladar joined #nim
08:59:25*Tanger quit (Remote host closed the connection)
09:00:10*ache-of-head[m] quit (Quit: Idle for 30+ days)
09:02:09*Kaivo quit (Ping timeout: 260 seconds)
09:02:30*MarderIII joined #nim
09:02:46*MarderIII quit (Read error: Connection reset by peer)
09:04:04*Kaivo joined #nim
09:21:17*qwertfisch quit (Ping timeout: 260 seconds)
09:21:55*qwertfisch joined #nim
09:25:15*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:48:13*mbomba quit (Quit: WeeChat 3.0)
09:52:56*Cthalupa quit (Ping timeout: 240 seconds)
09:54:11*Cthalupa joined #nim
10:05:21FromDiscord<starl0rd> sent a code paste, see https://play.nim-lang.org/#ix=2H8h
10:06:13FromDiscord<starl0rd> if i also want the `kind` property in `Node` , how do i add it? anywhere i put it, it says i am trying to redfine `kind`
10:08:35FromDiscord<Vindaar> what do you mean have the `kind` property in `Node`? It's right there already
10:21:25FromDiscord<starl0rd> yea, i do have it, my repr message got weirdly formated in the output
10:27:50FromDiscord<mratsim> your sets must use 1 byte, that's the minimal addressable size by the hardware
10:28:42FromDiscord<mratsim> I don't think you will find 2-bit machines and other 8-bit you might be able to find bytes of size 12 and 24 bits but they are going the way of the dodo
10:29:03miprithe HP48G series of calculators had nibble addressing, though.
10:31:04FromDiscord<mratsim> Then for packing as I mentioned in the forum it all depends on your requirements: compile-time/runtime are they copied/moved to other locations/threads, do you favor size or CPU usage, are they dynamic in size.
10:42:31FromDiscord<starl0rd> that's what known as word size right? min size of a memory location with an address ?
10:45:21FromDiscord<mratsim> yes
10:45:54FromDiscord<mratsim> And if you want dynamic bitsets, this is a good start: 13 lines to set and iterate on set bits: https://github.com/mratsim/number-theory/blob/master/src/primes.nim#L8-L22
10:46:26FromDiscord<mratsim> and a bit by bit iterator: https://github.com/mratsim/constantine/blob/master/tests/support/ec_reference_scalar_mult.nim#L17-L25
10:47:31FromDiscord<mratsim> if if you want to do multi-bit packing, say 3 or 5-bit in a datastructure, this is the do-it-yourself way: https://github.com/mratsim/constantine/blob/master/constantine/elliptic/ec_endomorphism_accel.nim#L148-L180
10:48:48FromDiscord<starl0rd> that's comprehensive. i'll look into them. thanks @mratsim
10:49:16FromDiscord<mratsim> You might also want to look into repos that implements "Succinct Data Structures"
10:49:20FromDiscord<mratsim> and papers
10:52:47FromDiscord<starl0rd> im just trying to pick up the language right now. there seems be some material to be covered here with macros, templates etc. gc/arc etc. is it alright if i hit you after ?
10:53:00FromDiscord<starl0rd> (edit) "?" => "for recs?"
10:53:22FromDiscord<starl0rd> (edit) "templates etc." => "templates,"
10:54:20FromDiscord<mratsim> Personally I learn better with example, don't try to learn the manual, find a small problem you want to fix, could be advent of code for example, and start using Nim
10:54:25FromDiscord<mratsim> and search when stuck
10:55:13FromDiscord<mratsim> For me I started with writing super simple neural network with only a scalar neuron (no matrices or anything) by following a tutorial for Javascript but in Nim and gradually worked my way up
10:57:34FromDiscord<starl0rd> yea, i agree that doing gets it under your hands better. but i like to get a taste of various ways things are done in a language. and going though the manual seems like a good way to familiarize myself with the constructs the language provides.
10:58:02FromDiscord<starl0rd> else i find myself writing code the way i am familiar with other languages
10:58:39FromDiscord<starl0rd> and i didn't really know an language with proper macros yet, so i am also kindda excited to pick em up : p
11:30:24Zoom[m]Do we have some Result type? Like an option, but which can return a value (possibly of other type) on none/error?
11:33:31FromDiscord<lqdev> @Zoom https://github.com/status-im/nim-stew/blob/master/stew/results.nim
11:33:48FromDiscord<haxscramper> Or https://github.com/arnetheduck/nim-result
11:36:00Zoom[m]Thanks! Looks great!
12:04:16Zoom[m]What's the proper way for copying an openArray to a new seq? toSeq?
12:05:01FromDiscord<Vindaar> if you're fine with a copy, just call `@` on it iirc. I think that's a no-op for something that is a seq already
12:05:57Zoom[m]Ah, that's convenient. Thanks
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:32*supakeen joined #nim
12:07:13Zoom[m]Not sparing ascii chars for big new lang additions, are we? 😜
12:10:32PMunchnarimiran, I've put off solving todays AoC and plan on streaming me doing it after work :)
12:10:45narimiranPMunch: nice! when cca?
12:11:40PMunchWell I was thinking pretty much as soon as I'm done
12:11:46PMunchSo around 15:15 UTC
12:24:08PMunchHmm, can nimscript support be compiled with --gc:arc?
12:24:26Zevvdude what are you asking
12:24:39Zevvlisten to yourself
12:26:00PMunchHaha, I guess it would require most of the compiler to do that..
12:26:12PMunchWould be cool though, running NimScript on as ESP32 or something
12:37:32ForumUpdaterBotNew thread by Sdmcallister: Help with Karax getVNodeById , see https://forum.nim-lang.org/t/7226
12:38:06Zoom[m]Wow. Didn't expect my solution to part2 work on the first run
12:42:22FromDiscord<Esbeesy> https://github.com/sambeckingham/advent-of-code-2020/blob/main/day8/day8.nim↵↵My part 1 ran first time which I was surprised about, but part 2 I was forgetting to reset the accumulator count and was getting these huge numbers🤦‍♂️
12:48:58*Cthalupa quit (Ping timeout: 256 seconds)
12:49:46*Cthalupa joined #nim
12:51:28narimiraninstructionSET is a seq
12:51:36narimiranyou tricked me
12:52:28FromDiscord<j-james> I did the same thing @Esbeesy
12:53:15FromDiscord<Esbeesy> I'll remember for next time Nari, InstructionSetWithinSequenceOfStrings: seq[string]
12:53:55FromDiscord<Esbeesy> That was trivial to parse though compared to yesterdays big dumb input
12:54:41narimiranhow about just using plural? :P `instructions`
12:55:56FromDiscord<Esbeesy> ....
12:56:53FromDiscord<Esbeesy> 😂 I'm not going for the best code here, I'm familiar enough with Nim now that I can write it out in my mind as I'm going through the algorithm in my head, so less time spent ruminating on variable names
12:57:20FromDiscord<Esbeesy> Have you done it yet Nari?
12:57:30*lritter joined #nim
12:57:32FromDiscord<mratsim> @zoom @lqdev @haxscramper Use the one in stew, since its a refactoring of the original nim-result (by the original author) and it has been part of security reviews and has seen some improvements ({.inline.} mainly)
12:59:12FromDiscord<lqdev> yeah that's the one i proposed :p
12:59:32FromDiscord<mratsim> @Esbeesy your while not corruptBitFound will read past the sequence and trigger an index error if there is no corrupt bit in the sequence, you should add a stop when you reach the sequence end.
13:00:09FromDiscord<mratsim> also here https://github.com/sambeckingham/advent-of-code-2020/blob/main/day8/day8.nim#L30↵Use "break"
13:01:19FromDiscord<mratsim> also your name "instructionSet" is confusing. Call that instructions or instructionStream
13:02:39FromDiscord<mratsim> ah sorry I didn't see the mod to bound the iteratation variable
13:02:56narimiranhehe, i'm not the only one tripped by "instructionSet"
13:03:08FromDiscord<mratsim> you'll still crash if your "isntructionSet" is empty though
13:03:59FromDiscord<mratsim> an instruction set is something different, it's all the instructions supported by your architecture (be it hardware like x86 or software like brainfuck)
13:04:46FromDiscord<mratsim> the full name being ISA (Instruction Set Architecture), with x86 and ARM being the most famous ISAs.
13:05:02FromDiscord<mratsim> but each GPU generation have their own ISA as well.
13:05:07Zoom[m]@mratsim thanks, the one in nim-result gives a deprecation warning on compilation
13:05:26Zoom[m]Should be deprecated on GH, probably
13:06:22FromDiscord<mratsim> @arnetheduck ^
13:06:52Zoom[m]Do you guys set an alarm for AOC or something? By the time I get up you all have your stars already :)
13:07:24supakeenSilly timezones.
13:07:29FromDiscord<mratsim> I never did AoC, I have enough of my own problems to solve to not add someone else's :p
13:08:12FromDiscord<arnetheduck> the one in `nim-result` is standalone whereas stew is part of a bigger package - I generally keep them in sync so either can be used
13:08:27FromDiscord<Rika> mratsim knows his brain is too big for the easy problems in aoc 😛
13:08:35narimiran^
13:08:49FromDiscord<j-james> AOC problems drop at 9pm for me, which is perfect
13:09:35FromDiscord<mratsim> Nah, I'm not that good at those kind of small parsing or self contained problem like in hackerRank. I did some ProjectEuler but without practice you can't get good at such things.
13:09:38Zoom[m]Fair enough. I abstained for the last 4 years but discussions here pushed me this year. One big procrastination to not take up more ambitious tasks...
13:10:20FromDiscord<j-james> I'm using it to teach myself Nim
13:10:33Zevvsoooo. how are we all doing on the CPU VM implementations today
13:10:46FromDiscord<j-james> So far it's working pretty well - AOC does a good job covering different language concepts
13:10:50FromDiscord<mratsim> that's also how I used Project Euler, to learn haskell, Rust and Nim 😉
13:12:06Zoom[m]mratsim, same for me with Rust, although I moved to other things fast, Euler too math-heavy (duh)
13:13:03FromDiscord<j-james> Speaking of such, do you all have any advice on how to get rid of the `part` bool in my solution?
13:13:04FromDiscord<j-james> https://play.nim-lang.org/#ix=2H9i
13:13:52FromDiscord<Rika> just remove it duh xdddd
13:15:23PMunchZevv, I'm trying my best not to read anything about it :P
13:15:31PMunchGoing to stream me solving it after work
13:15:36FromDiscord<j-james> smh can't believe it was as simple as that 🤦 🤦 🤦 https://play.nim-lang.org/#ix=2H9l
13:15:59FromDiscord<Rika> ez
13:17:02FromDiscord<j-james> PMunch: It's nice and fun, a little harder than previous days but not by much
13:17:35ZevvI dread this week. it will again be a succession of extensions on the CPU VM
13:17:46Zevvuntil sunday or so, when it will say "your CPU is now compelte"
13:17:48Zevvyou move it to a lib
13:17:57Zevvand the remaining week will consist of little magic programs running on your VM
13:18:10narimiranZevv: i doubt we'll have another intcode
13:18:38narimiranZevv: but there will probably be one task similar to today, just a bit more complicated
13:18:51ZevvI bet you a large FOSDEM beer on that tomorrow is extending todays implementation
13:19:05miprieasy bet against you
13:19:09PMunchOh damn
13:19:10narimiraneven intcode wasn't two days in a row
13:19:16*Vladar quit (Ping timeout: 265 seconds)
13:19:18FromDiscord<j-james> uggh, hope not
13:19:29narimiranand i bet no more CPU tasks until this weekend
13:19:43*Vladar joined #nim
13:19:46FromDiscord<mratsim> @Zoom math is fun 😉
13:19:47mipriall the previous years have had little VMs like this. the pattern is what we got today, and then one where you have reverse-engineer it to solve the problem
13:20:04FromDiscord<j-james> i'd bet tomorrow's problem is handheld game console related though
13:20:18FromDiscord<mratsim> but I ended up spending my time optimizing prime generation for Project Euler :p
13:20:25FromDiscord<mratsim> learned a lot about bitvector doing that.
13:20:53*lritter quit (Quit: Leaving)
13:22:13Zoom[m]It's fun until your head starts exploding
13:22:26*Vladar quit (Client Quit)
13:23:19FromDiscord<lqdev> hence why i'm not participating this year
13:24:02Zevvlqdev: I wasn't planning to because I'm not commuting
13:24:44Zevvbut then again I like doing small little projects amongst my day job which is more plumbing and architecting then programming these days
13:25:01*mbomba joined #nim
13:26:46*hmmm joined #nim
13:27:02hmmmholla
13:27:07FromDiscord<Recruit_main707> Cant you create a sink parameter from a macro?↵ex: `nnkVarTy.newTree(ident typ)` works↵ `nnkSinkTy.newTree(ident typ)` doesnt
13:30:58FromDiscord<lqdev> sink is not a special keyword
13:31:12FromDiscord<lqdev> use newTree(nnkBracketExpr, bindSym"sink", typ)
13:31:28FromDiscord<Recruit_main707> ok
13:31:31FromDiscord<Recruit_main707> thanks
13:35:31*lritter joined #nim
13:36:38Zoom[m]I agree with Zevv and am afraid it's going to go downhill from here. First year tasks of this type appeared much later :(
13:39:38narimiranZoom[m]: pessimistic a bit too much?
13:40:47Zoom[m]I'm just not good at it, and it's too late to educate myself on compilers/interpreters for this year's AOC
13:41:41ForumUpdaterBotNew thread by Miran: Why ORC is the new sliced bread?, see https://forum.nim-lang.org/t/7227
13:42:18narimiranZoom[m]: i think (and hope) we won't see intcode-like stuff this year
13:44:42ZevvZoom[m]: it's not too late, this is exactly why you do these kind of things - it motivates you to look into new stuff
13:46:15Zoom[m]The stack of tech books I need to read is too high for me, especially if you take into consideration I'm in completely different field.
13:46:48FromDiscord<mratsim> I never read any tech book
13:47:19FromDiscord<mratsim> I did buy domain specific books for reinforcement learning and cryptography, but nothing for core compute science
13:47:43FromDiscord<mratsim> though i'm considering buying data intensive design
13:49:38Zevvmratsim: yeah it shows
13:49:40*tane joined #nim
13:49:51Zevvall of your projects are horrible
13:50:03Zevvyou can't program if you didn't study CI
13:50:14Zevvend all CI students make perfect stuff
13:51:04FromDiscord<Recruit_main707> sent a code paste, see https://paste.rs/4iN
13:51:11FromDiscord<mratsim> I only read research papers and PHD Thesis @Zevv https://media.discordapp.net/attachments/371759389889003532/785866063169716244/unknown.png
13:51:40FromDiscord<Rika> i dont think it makes sense to return a var T
13:51:40FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/785866185174286406/unknown.png
13:51:41Zevvthat's the right stuff
13:51:51Zevvcan't you just share the actual files
13:52:11FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/785866313251160144/unknown.png
13:52:17Zevvnoo not the screenshots
13:52:18FromDiscord<mratsim> pick a topic
13:52:28Zevvall of them! \o/
13:53:18FromDiscord<mratsim> lol, too many to share
13:55:47FromDiscord<starl0rd> wut ? -> https://play.nim-lang.org/#ix=2H9x
13:56:15FromDiscord<Rika> whats confusing
13:56:55FromDiscord<starl0rd> wouldn't compile. it says can raise `Exception`
13:57:06FromDiscord<starl0rd> which is like the parent of all Exceptions
13:57:19FromDiscord<shadow.> rah
13:57:22FromDiscord<shadow.> day 8 was surprisingly easy
13:57:40FromDiscord<starl0rd> which defeats me putting a list of type of exceptions it could raise
13:57:46FromDiscord<starl0rd> or am i missing something here ?
13:58:10FromDiscord<shadow.> put `Exception` in the list and try lol
13:58:19FromDiscord<Rika> the try block isnt consuming all exceptions; raises on a proc says it can only rais "Value" or "OS" so you dont need to catch those
13:58:26FromDiscord<Rika> but everything else has to be caught
14:00:58FromDiscord<starl0rd> raise, like, reraise ?
14:01:07FromDiscord<starl0rd> out of this proc?
14:01:33FromDiscord<starl0rd> untill it is either caught or causes the program to stop ?
14:01:54FromDiscord<Rika> you cannot not catch an exception not listed in the `raises` list on a proc
14:02:02FromDiscord<Rika> rather, you must catch
14:02:21FromDiscord<starl0rd> sure
14:02:52FromDiscord<starl0rd> uhm.
14:05:48FromDiscord<starl0rd> https://play.nim-lang.org/#ix=2H9D
14:05:51FromDiscord<starl0rd> this works too ?
14:06:21FromDiscord<starl0rd> that would mean i can handle internally any kind of exception
14:09:26FromDiscord<Rika> huh
14:09:36FromDiscord<Rika> ah
14:09:42FromDiscord<Rika> huh
14:10:06FromDiscord<Rika> ah its not working because you reraise on the oserror case
14:10:17FromDiscord<Rika> but it says exception for reasons i do not know
14:12:04FromDiscord<starl0rd> i guess the raises list is only meant for exceptions that come out of a proc
14:12:20FromDiscord<starl0rd> and suppose to travel through the rest of the call stack
14:13:21FromDiscord<starl0rd> raises pragma, not list, soz
14:13:56FromDiscord<mratsim> @starl0rd your "raise" after except OSError is a raw exception
14:14:18FromDiscord<mratsim> which is the one unlisted, remove it./
14:14:18FromDiscord<Rika> the god has arrived
14:17:07FromDiscord<starl0rd> @mratsim this was my original problem -> https://play.nim-lang.org/#ix=2H9K
14:17:46FromDiscord<starl0rd> what i thought it meant was, the code inside this proc can only raise the exceptions in the pragma list. that it. those are the only errors that could happen inside this proc
14:19:18FromDiscord<starl0rd> but what i think now is those are that those in the list of raises pragma are the only ones allowed to leave the proc for the rest of the call stack. but the proc code can, like any other code, result in any kind of errors internally and not just the listed
14:24:17Zoom[m]By the way, how can I make a function, generic over containers and iterators of T? I suppose only with concepts?
14:25:22*Vladar joined #nim
14:25:59FromDiscord<lqdev> yeah
14:27:48Zoom[m]And I'd have to write these concepts by hand? Is is planned to be available as more-or-less regular feature?
14:28:48FromDiscord<lqdev> https://github.com/nim-lang/RFCs/issues/168
14:28:49disbotConcepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8
14:28:58FromDiscord<lqdev> it's an RFC at this point
14:29:11FromDiscord<mratsim> @starl0rd yes, the raise pragma is like a return type but for exception raised
14:29:47FromDiscord<starl0rd> that's like the best description i could have asked for
14:29:58FromDiscord<starl0rd> makes so much sense
14:30:06FromDiscord<mratsim> Ultimately for libraries, changing the exceptions returned should be considered a backward incompatible change just like changing the return type.
14:30:26FromDiscord<starl0rd> but, whats up with the Exception being raised along with these two and this failed to compiler?
14:30:41FromDiscord<starl0rd> (edit) "compiler?" => "compile?"
14:30:44FromDiscord<mratsim> because you had a raw "raise" in one of your branches
14:30:48FromDiscord<Rika> you had a `raise` in `except OSError`
14:30:53FromDiscord<mratsim> instead of raise newException(ValueError) for example
14:30:54FromDiscord<starl0rd> (edit) "failed" => "failing"
14:31:23FromDiscord<starl0rd> raw raise would mean re-raise the last kind of exception raised ?
14:31:36FromDiscord<mratsim> I'm not sure
14:31:40FromDiscord<starl0rd> which would be the one that matched with the catch-all
14:31:50FromDiscord<mratsim> I usually use Result :p
14:31:59FromDiscord<starl0rd> because it'll be consumed there, it'll have to be re-raised
14:32:58FromDiscord<starl0rd> i know from earlier today, someone asked for this right ?
14:33:17FromDiscord<mratsim> well it's used everywhere in Status codebase so.
14:33:43FromDiscord<mratsim> we do use both exceptions and result but lean more towards Result.
14:34:06FromDiscord<starl0rd> uhm, whats a status ?
14:34:39FromDiscord<Rika> company
14:34:56FromDiscord<starl0rd> i see.
14:41:09FromDiscord<mratsim> @miran: Reddit, Hackernews for https://nim-lang.org/blog/2020/12/08/introducing-orc.html ?
14:42:25FromDiscord<mratsim> posted one: https://www.reddit.com/r/programming/comments/k95cc5/introducing_orc_nim_nextgen_memory_management/
14:45:23narimiran@mratsim the usual strategy is to first promote it "locally", and then if "our people" find no bugs - we do it more globally
14:45:41FromDiscord<mratsim> well, posted on HN
14:45:49FromDiscord<mratsim> didn't find a bug
14:45:49narimirannp
14:56:02FromDiscord<mratsim> Just one though. Nim json is slow (a Table at each Node :/), so the difference might not be as dramatic with a json library that is less allocation happy.
15:08:20*waleee-cl joined #nim
15:15:03FromDiscord<shadow.> zevv, how did you say you could dump how npeg was parsing your data?
15:15:07FromDiscord<shadow.> to see where it was failing
15:15:17FromDiscord<shadow.> actually anyone, doesn't have to be zevv ofc i just remembered he mentioned it yesterday
15:15:19Zevvread the friggggin manual :)
15:15:22Zevv-d:npegTrace
15:15:43Zevvhttps://github.com/zevv/npeg#tracing-and-debugging
15:15:50Zevvhttps://github.com/zevv/npeg#tracing-and-debugging
15:17:06supakeenhttps://github.com/zevv/npeg#tracing-and-debugging
15:19:43PMunchStreaming AoC day 8 is live: https://www.twitch.tv/pmunche https://www.youtube.com/watch?v=J8Ox9HEyq5g
15:26:04PMunchnarimiran ^
15:26:10narimiranPMunch: thanks!
15:29:26Zevvyou know you will regret not properly parsing this into a native object, right, pmunch?
15:29:31narimiran:)
15:29:35Zevvbecause tomorrow you will run the same thing a zillion times
15:29:48narimiranfree beeeeer
15:43:28disruptekthe Result in stew still suffers from requiring that you define a `func $(): string` for all your types, right?
15:43:32disruptekfuck that.
15:57:04PMunchSolution is up on GitHub now
15:57:15PMunchBut I've gotta go
15:57:19*PMunch quit (Quit: leaving)
15:57:26FromDiscord<shadow.> rip
15:57:28FromDiscord<shadow.> cya lol
16:10:09ForumUpdaterBotNew thread by Mantielero: C++ wrap - doubbt on & symbol, see https://forum.nim-lang.org/t/7228
16:11:11*Perkol joined #nim
16:19:33*mbomba quit (Quit: WeeChat 3.0)
16:23:27*hmmm quit ()
16:30:32*vicfred joined #nim
16:34:58*disruptek throbs.
16:38:23*vicfred quit (Quit: Leaving)
16:41:58disruptekit's a recipe for success.
16:48:12FromDiscord<shadow.> indeed
16:48:45FromDiscord<treeform> I must be not a wake yet, I been looking at this table trying to figure out why ORC is soo much slower!
16:48:47FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/785910759347060756/unknown.png
16:49:07FromDiscord<Recruit_main707> lmfao
16:49:21FromDiscord<treeform> 320 vs 62...
16:50:23FromDiscord<UNIcodeX> MICROseconds
16:50:26FromDiscord<treeform> 320 is 0.32 ms
16:50:28FromDiscord<treeform> https://www.wolframalpha.com/input/?i=320+us+to+ms
16:54:10leorize[m]1then we could've kept the units, it's not like it's 0.00032 :P
16:54:35disruptekmost benchmarking uses microseconds.
16:54:37*letto quit (Remote host closed the connection)
16:54:47disruptekit's annoying, but you get used to it.
16:55:10FromDiscord<lqdev> would've been more readable if they had used µ instead of u
16:55:17disruptektrue.
16:55:40disruptekyou can see little µs if you look closely at my testes.
16:57:28FromDiscord<shadow.> ^^ i can attest to that
16:57:35FromDiscord<shadow.> ive looked at his testes very closely
16:59:59disruptekdo you think my testes is too noisy?
17:00:00FromDiscord<moigagoo> Any idea why the blog post got renamed to ORC - Vorsprung durch Algorithmen?
17:00:16disruptekjust to turn away english speakers.
17:00:54disruptekshadow.: i guess what i'm asking is, does my testes pass the sniff test?
17:01:15FromDiscord<lqdev> @moigagoo it means something like "improvement via algorithms"
17:01:47FromDiscord<moigagoo> I'm sure it does but the original title was different 😂
17:01:55FromDiscord<lqdev> araq or whoever probably renamed it because german just sounds cool
17:01:59FromDiscord<lqdev> it's a cool motto
17:02:10*letto joined #nim
17:02:55FromDiscord<moigagoo> It's weird since the URL still shows the old title.
17:03:10FromDiscord<lqdev> https://media.discordapp.net/attachments/371759389889003532/785914375847280661/unknown.png
17:03:11FromDiscord<lqdev> there's a subtitle
17:03:32FromDiscord<moigagoo> Ok, so it's evolving :-)
17:04:08FromDiscord<shadow.> i would say they certainly do
17:04:20FromDiscord<shadow.> your testes are quite nice
17:04:26FromDiscord<moigagoo> Not seeing it on mobile tho.
17:04:41FromDiscord<shadow.> my brother looked over and saw your testes and went "wow thats really colorful!"
17:04:51FromDiscord<shadow.> because you have quite nice testes
17:04:56disruptekthank you.
17:05:13disruptekyou know what would make them better?
17:05:17FromDiscord<shadow.> hmm
17:05:26FromDiscord<shadow.> no i dont, enlighten me
17:05:36*hnOsmium0001 joined #nim
17:05:37disrupteki don't, either.
17:05:56FromDiscord<shadow.> ah i see
17:05:58disruptekhttps://github.com/disruptek/testes/issues/11
17:05:58disbotparse out assertion line info using compiler renderer
17:06:12FromDiscord<shadow.> how could anyone possible have issues with your testes
17:06:15FromDiscord<shadow.> ill have to have a talk with them
17:06:17disruptekhttps://github.com/disruptek/testes/issues/7
17:06:18disbotimpl an `expect` for catching expected errors
17:06:37FromDiscord<shadow.> that would certainly improve your teste
17:06:40FromDiscord<shadow.> (edit) "teste" => "testes"
17:06:45FromDiscord<shadow.> not that im not satisfied with their current state
17:07:00disrupteki do hear that a lot.
17:07:20FromDiscord<shadow.> i dont doubt that
17:07:45disruptekyou feel like hacking on my testes?
17:08:12disruptekthere are a couple issues you could work on.
17:08:18disrupteksee if you can massage things into shape.
17:08:27FromDiscord<shadow.> hmmm
17:08:33FromDiscord<shadow.> i would like to help form your testes
17:08:39disrupteknice.
17:08:44FromDiscord<shadow.> just show me what to work on
17:08:49FromDiscord<shadow.> ill get the gloves
17:09:09disruptekthis would also improve the performance: https://github.com/disruptek/testes/issues/8
17:09:11disbotlayer try/except blocks ; snippet at 12https://play.nim-lang.org/#ix=2HaQ
17:09:30FromDiscord<shadow.> hmm lemme take a look
17:09:56disruptekit's perhaps a little more involved from the perspective of macro hackery.
17:10:00FromDiscord<shadow.> ahh ok so a macro to layer the tests in your testes?
17:10:02FromDiscord<shadow.> yeah
17:10:20FromDiscord<shadow.> so the block is a statement list, and you just want each statement nested in its own try except?
17:10:32FromDiscord<shadow.> or rather nesting inwards with each statement
17:10:41disruptekexactly. that #7 ticket is the easiest.
17:10:56FromDiscord<shadow.> i can try 8 for now
17:11:01FromDiscord<shadow.> i do want to have a big impact on your testes
17:11:04disruptekbecause, think of it... that would mean that we could catch an error in any statement without losing scope.
17:11:09FromDiscord<shadow.> that's true
17:11:14FromDiscord<shadow.> oh right because
17:11:18FromDiscord<shadow.> the first statement would be highest scope
17:11:19FromDiscord<shadow.> i see
17:11:23disrupteki mean, if my testes grew a little it wouldn't be the end of the world.
17:11:38FromDiscord<shadow.> lemme go find the line where this all happens lol
17:11:49disruptekjust try not to be too sloppy and i'm sure we can get together.
17:12:08FromDiscord<shadow.> sounds good
17:12:31FromDiscord<shadow.> alright ive cloned your testes
17:12:33FromDiscord<shadow.> time for the operation
17:12:44disrupteki will write comments on my testes. little koans of wisdom for those who might look closer.
17:12:53FromDiscord<shadow.> little hairs if you will
17:12:59disruptekit's about the only place i've been loathe to write.
17:13:16FromDiscord<shadow.> true
17:13:23disrupteki used to be a little embarrassed by my testes.
17:13:33FromDiscord<shadow.> always be proud of them
17:13:35FromDiscord<shadow.> they're very pretty
17:14:02FromDiscord<shadow.> i see line 527
17:14:13FromDiscord<shadow.> hmm
17:14:39FromDiscord<shadow.> should i just edit the code with macros before it's even processed after or would that conflict
17:14:51FromDiscord<shadow.> do you reckon i have to do something special or just pretend as if the try: except was what was initially passed
17:15:10disruptekfor which ticket?
17:15:20FromDiscord<shadow.> number 8
17:15:25FromDiscord<shadow.> let me try to make a function that does that nesting thing
17:16:16disruptekyou have compose the first test and then add all subsequent tests in the block to that test, and so on, recursively.
17:16:30FromDiscord<shadow.> ah i see
17:16:33FromDiscord<shadow.> `macro exceptify(tests: untyped): untyped =`
17:16:41FromDiscord<shadow.> ima develop in a dif file first an see if i can make something like that
17:16:47FromDiscord<shadow.> then ill add it to the main one and pr if it workks
17:16:55FromDiscord<shadow.> works
17:17:05FromDiscord<shadow.> what should go in the except finally's?
17:17:21disrupteksome kind of error, i guess.
17:17:31disruptekthere's some existing code for exceptions that you can leverage.
17:17:44FromDiscord<shadow.> ah i see
17:17:59FromDiscord<shadow.> ima start with 7 then lol
17:18:18FromDiscord<shadow.> hmm
17:18:21FromDiscord<shadow.> nvm 8 is fine
17:19:33disruptekwhen you expand my testes macro, it produces a lot of messy output. sorry about that. i've tried to keep it tasteful, obviously.
17:20:20FromDiscord<shadow.> of course
17:20:23FromDiscord<shadow.> only tasty testes here
17:22:02FromDiscord<shadow.> hmm
17:22:10FromDiscord<shadow.> alr im making the recursion thing rn
17:26:32FromDiscord<shadow.> oh can you explain ticket 7
17:26:38FromDiscord<shadow.> wym by expected errors
17:27:03disruptekwe just want to replicate the feature from unittest whereby we can test that some code raises an exception properly.
17:27:12disruptekit's called `expect()`.
17:27:50FromDiscord<shadow.> ohh ok i see
17:27:58FromDiscord<shadow.> hmm this ticket 8 seems doable ill do it first then
17:27:59disruptekas in, `except OSError: file.remove "/file/does/not/exist"`
17:28:04disrupteker,
17:28:10disruptekas in, `expect OSError: file.remove "/file/does/not/exist"`
17:28:10FromDiscord<shadow.> ohhhh
17:28:14FromDiscord<shadow.> i see
17:28:28disruptekit should be like 6 lines. 😁
17:28:38FromDiscord<shadow.> haha yeah i can do that
17:28:42FromDiscord<shadow.> let me just wrap up this class
17:28:47FromDiscord<shadow.> NO WE DONT WANT TO WORK WITH PARTNERS FUCK
17:28:48FromDiscord<shadow.> ok good
17:28:58FromDiscord<shadow.> we're good lmao
17:29:01disrupteklol
17:32:39disruptekmaybe we should have a fail() for when the testes don't work.
17:32:42FromDiscord<shadow.> hmm
17:32:46FromDiscord<shadow.> that could be wise
17:32:56disruptekit hasn't happened in the past, but maybe someone else would need it.
17:33:09FromDiscord<shadow.> hmm
17:33:21FromDiscord<shadow.> put up a poll lol
17:33:37FromDiscord<shadow.> no reason to add if people dont need it
17:33:39FromDiscord<shadow.> but if they do then certainly
17:33:46disrupteki guess `assert false` works better.
17:34:38FromDiscord<shadow.> lmfao
17:35:11FromDiscord<shadow.> hmm
17:35:22FromDiscord<shadow.> cannot focus with spanish being yelled into my ears
17:35:31FromDiscord<shadow.> i shall resume forming your testes in 25 minutes
17:35:39disruptekvery good, sir.
17:35:39FromDiscord<shadow.> once spanish class has finished
17:35:49FromDiscord<shadow.> wonderful
17:35:53FromDiscord<lqdev> petition to add `template unreachable = assert false` to the stdlib
17:36:08FromDiscord<shadow.> hmm
17:36:37disrupteklqdev: hmm, is that the best way?
17:36:39FromDiscord<shadow.> petition to add `template comment(body: untyped) = when false: body` to the stdlib
17:37:20FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hb0
17:37:22disruptek`when false` is more explicit.
17:37:32FromDiscord<shadow.> lol i was being sarcastic
17:37:37FromDiscord<shadow.> hmm
17:37:47FromDiscord<shadow.> `whenFalse` would be much better 🙄
17:37:49FromDiscord<shadow.> LOL
17:38:02disrupteki like that i can use ## as the body of an else: and stuff.
17:38:22disruptekand, as you've seen, it's exposed in my testes.
17:38:33FromDiscord<shadow.> of course
17:38:55FromDiscord<lqdev> i just select the block and ctrl+/ it out
17:39:03FromDiscord<shadow.> smart
17:39:29FromDiscord<lqdev> really, i never saw the need for when false, #[ ]#, #if 0, or anything else really.
17:39:36FromDiscord<lqdev> weird idioms.
17:39:43FromDiscord<shadow.> yeah fair
17:39:52disruptekthey make a lot of sense to me.
17:40:09FromDiscord<shadow.> to be fair, i guess it removes the need for a run time check of 0 lmao
17:40:10disrupteki feel dirty when i comment out code.
17:49:14reversem3Curious I can list the C code using gdb if I compile using gcc right. I use list for nim compiler code but can use the debugger to see the assembly. Is this because gdb does have symbols for the nim compiler?
17:50:45mipri--debugger:native might be helpful there.
17:50:47reversem3what I man is gdb -q <file> then create a break point then call list
17:50:55reversem3ahh interesting
17:51:17FromDiscord<shadow.> class is over
17:51:22FromDiscord<shadow.> i can inspect your testes now
17:51:25FromDiscord<shadow.> ...but only after some anime
17:51:27FromDiscord<shadow.> 🙄
17:52:24reversem3hmm
17:52:30reversem3sorry for the flood
17:52:31*reversem3 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/ZNltcIPYAXJguYtAgtTVkrNb/message.txt >
17:58:03*Perkol quit (Remote host closed the connection)
17:58:52FromDiscord<shadow.> disruptek: i think i thought of a simpler way to do it
18:00:43reversem3hmm so there really isn't a way to do this with GDB I take it ?
18:01:54reversem3I don't know enough amount the compiler i guess
18:02:25reversem3I was just curious if its possible to actually see the list in C via GDB
18:05:56*thomasross joined #nim
18:06:25FromDiscord<shadow.> hmm ok disruptek ive got something
18:06:30FromDiscord<shadow.> just needa fix it a lil more
18:07:16FromDiscord<shadow.> yup ive got something
18:08:18FromDiscord<shadow.> https://play.nim-lang.org/#ix=2Hbl
18:08:21FromDiscord<shadow.> not exactly pretty but it works
18:10:31FromDiscord<shadow.> https://play.nim-lang.org/#ix=2Hbq
18:10:35FromDiscord<shadow.> that's what it outputs currently
18:10:51FromDiscord<shadow.> ah i forgot finally on the first branch
18:11:58FromDiscord<shadow.> https://play.nim-lang.org/#ix=2Hbr
18:12:02FromDiscord<shadow.> alright, that's the last update for now lmao
18:20:34reversem3anyone else using gdb to debug ?
18:24:32ForumUpdaterBotNew thread by Giannigianni: Obtain type from proc definition, see https://forum.nim-lang.org/t/7229
18:27:13FromDiscord<shadow.> disruptek left me 😔
18:29:22FromDiscord<lqdev> reversem3: i do occasionally
18:31:14Zevvreversem3: I don't usually debug, but if I do I use gdb
18:31:31Zevvtip of the day: nim-gdb
18:34:04*habamax quit (Ping timeout: 256 seconds)
18:38:11reversem3what is nim-gdb ?
18:38:44reversem3oh its a library
18:39:02FromDiscord<Recruit_main707> !search nim-gdb
18:39:03disbothttps://github.com/timotheecour/Nim/issues/380 -- 3io API's should handle interrupts / short reads properly 7& 29 more...
18:41:31leorize[m]1nim-gdb is bundled with the nim installation
18:41:33reversem3hmm its a python module
18:41:51leorize[m]1it's a simple gdb wrapper that adds a nim translation plugin
18:43:31reversem3its under tools in the nim repo
18:46:27reversem3Docs https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#using-gdb-lldb
18:48:44*Q-Master quit (Ping timeout: 256 seconds)
18:55:41*FromGitter joined #nim
18:59:51reversem3ok very cool , so you can't list the C code but you can run it and debug , thanks for the info this is really cool
19:00:11*hjg joined #nim
19:00:16reversem3I didn't get to that point int the book yet
19:00:27reversem3 * I didn't get to that point in the book yet
19:00:45*xet7 quit (Quit: Leaving)
19:04:06*Jesin quit (Quit: Leaving)
19:06:05*sagax quit (Ping timeout: 240 seconds)
19:06:05*hjg quit (Remote host closed the connection)
19:06:42FromDiscord<fwsgonzo> is there any timeline for the next release?
19:09:51FromDiscord<shadow.> typically releases come every 3-6 months
19:09:59FromDiscord<shadow.> wait are you talking about gdb or nim
19:10:21disruptekthe next minor will be a bit. i think araq wants IC to go in and i'm not longer working on it.
19:10:28FromDiscord<shadow.> oh hey disruptek
19:10:38FromDiscord<shadow.> i made a system to transform a statement list into a nested try except if you wanna see
19:11:10*abm joined #nim
19:11:46disruptekshadow.: what role does the `finally: discard` play?
19:12:07FromDiscord<shadow.> just there as placeholder code
19:12:14FromDiscord<shadow.> you said you wanted a finally at some point right?
19:12:31disruptekhuh?
19:12:36FromDiscord<shadow.> one sec
19:12:38FromDiscord<shadow.> lemme look at the ticket
19:12:54FromDiscord<shadow.> in the ticket finally was in there lol
19:12:57disruptekalso, this doesn't even need to be a macro. it'll be inserted into my testes, in the back end.
19:13:03FromDiscord<shadow.> oh wait
19:13:06FromDiscord<shadow.> i see
19:13:07*xet7 joined #nim
19:13:11FromDiscord<shadow.> hmm
19:13:16FromDiscord<shadow.> what point would it be inserted at?
19:13:45disruptekit should post-process each test body, right?
19:14:26FromDiscord<shadow.> fair enough
19:14:35FromDiscord<shadow.> because if you did it before even processing then
19:14:43FromDiscord<shadow.> the testes wouldn't look pretty right
19:14:47FromDiscord<shadow.> bc there'd be try excepts everwhere
19:15:02*Q-Master joined #nim
19:15:17disruptekit needs to be recursive, too; you cannot assume that statements won't have bodies that need similar checks.
19:15:19*Jesin joined #nim
19:15:35FromDiscord<shadow.> ohhh
19:15:38FromDiscord<shadow.> fair enough
19:15:41FromDiscord<shadow.> ig ill do ticket 7 for now lmao
19:15:55disruptekhonestly, you got further than i expected.
19:16:11FromDiscord<shadow.> lmao
19:16:21FromDiscord<shadow.> i could do more, im just unsure of how the backend functions because i haven't looked at your source much
19:16:31disruptekprobably for the best.
19:16:41FromDiscord<shadow.> so i think ill do ticket 7 first so i can learn abt it lol
19:16:44disruptekmy testes is pretty gnarly, by my standards.
19:16:50disrupteknice.
19:16:50FromDiscord<shadow.> damn
19:16:54FromDiscord<shadow.> maybe the insides
19:16:57FromDiscord<shadow.> the outsides look very pretty
19:17:09FromDiscord<Quibono> Lol why is shadow working on your testes?
19:17:14disruptekit's what's outside that counts.
19:17:30FromDiscord<shadow.> because
19:17:33FromDiscord<shadow.> i like forming testes
19:17:34disruptekyou want to get in on this action?
19:17:44disruptekwe can have a threesome.
19:18:18FromDiscord<Quibono> Lol how does one participate?
19:18:25FromDiscord<shadow.> by means of the epic pr
19:18:37disruptekhttps://github.com/disruptek/testes/issues
19:18:58FromDiscord<shadow.> holdup
19:19:13FromDiscord<shadow.> is the single form of tests referred to as test or testicle in your code
19:19:41FromDiscord<Quibono> testis
19:19:58*Q-Master quit (Ping timeout: 256 seconds)
19:20:01FromDiscord<shadow.> `test = makeTest(n, name)`
19:20:02disruptekit might be a typo.
19:20:04FromDiscord<shadow.> disgraceful
19:20:05FromDiscord<Quibono> If we're being fun it should be testis and testes
19:20:05FromDiscord<shadow.> disgusting
19:20:20FromDiscord<shadow.> im replacing all `test` with `testicle` and sending a PR asap
19:20:52*Q-Master joined #nim
19:21:01*rockcavera quit (Remote host closed the connection)
19:21:01FromDiscord<exelotl> cursed
19:21:32FromDiscord<shadow.> why
19:21:35FromDiscord<shadow.> it's more accurate
19:21:40FromDiscord<shadow.> plus this is more important than any ticket
19:21:50disruptekgood point.
19:22:16FromDiscord<shadow.> im doing it
19:22:33FromDiscord<shadow.> nvm too much work
19:22:41FromDiscord<shadow.> oh i wonder if i could just get a decent ide that has refactor
19:22:44FromDiscord<shadow.> eh nah too much work
19:24:04disrupteki explained #11 and #5 a little better.
19:24:19FromDiscord<shadow.> hmm ok ill take a look
19:25:01FromDiscord<shadow.> 11 looks doable?
19:25:03FromDiscord<shadow.> perhaps
19:25:19FromDiscord<shadow.> what lines does that refer too
19:25:20FromDiscord<shadow.> (edit) "too" => "to"
19:26:08disruptekit refers to the error message line from the failed assertion.
19:26:19FromDiscord<shadow.> oh shoot wait
19:26:24FromDiscord<shadow.> testes doesn't work on windows does it with the colors
19:26:28disruptekit's rendered by the compiler and is very stable.
19:26:37disrupteki think it probably works on windows.
19:26:45FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785950513643782184/unknown.png
19:26:48disruptekwho cares, though.
19:26:56FromDiscord<shadow.> i know how to fix that if you want-
19:26:57FromDiscord<shadow.> lmao
19:27:06disruptekyou do?
19:27:22FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785950668808126546/unknown.png
19:27:26FromDiscord<shadow.> dont ask how the fuck i know
19:27:36FromDiscord<shadow.> but if you run an empty execShellCmd("") it makes it work
19:27:42FromDiscord<shadow.> or at least
19:27:43disruptekwut
19:27:43FromDiscord<shadow.> makes it work
19:27:44FromDiscord<shadow.> better
19:27:53FromDiscord<shadow.> like
19:27:57disruptekwindows doesn't do emoji?
19:28:02FromDiscord<shadow.> apparently not
19:28:04FromDiscord<shadow.> lemme try powershell
19:28:11disruptekyou're on windows?
19:28:19FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785950906218840074/unknown.png
19:28:19FromDiscord<shadow.> yes i am
19:28:21FromDiscord<shadow.> lmfao
19:28:26FromDiscord<mratsim> @Araq do you have an answer to that: https://www.reddit.com/r/programming/comments/k95cc5/introducing_orc_nim_nextgen_memory_management/gf2m307/
19:28:29disruptekwow.
19:28:31FromDiscord<shadow.> i have an ubuntu subsystem that i use quite a bit but yeah windows kiddy here
19:28:43FromDiscord<mratsim> I think you had a bench somewhere with those details?
19:28:44FromDiscord<shadow.> but if you added the execShellCmd() you could get colors i suppose?
19:29:03FromDiscord<shadow.> i can make a proc like `initForWindowsKiddies()` or something if you'd like
19:29:28disruptekit's just `when defined(windows): execShellCmd()`, right?
19:29:37FromDiscord<shadow.> empty string
19:29:41FromDiscord<shadow.> but yes
19:29:43disruptekseems good to me.
19:30:05FromDiscord<shadow.> where should i add it
19:30:15FromDiscord<shadow.> also apparently windows terminal supports emojis so lemme try that
19:31:05FromDiscord<Quibono> Are there any low hanging fruit of useful libraries that aren't super hard to write but need to be done?
19:31:15disrupteki guess add it very early in the testes macro.
19:31:20FromDiscord<shadow.> sounds good
19:31:22FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785951672534827028/unknown.png
19:31:29FromDiscord<shadow.> ok terminal has emojis
19:31:31FromDiscord<shadow.> nice
19:31:32disruptekquibono: you already asked and i already answered, right?
19:31:47FromDiscord<shadow.> why the fuck does windows terminal look like a web browser https://media.discordapp.net/attachments/371759389889003532/785951781741395968/unknown.png
19:31:54disruptekand it seems to have color, too.
19:31:55FromDiscord<Quibono> If I did I don't recall sorry.
19:32:03FromDiscord<shadow.> well it has color because i added the exexShellCmd
19:32:05FromDiscord<shadow.> lemme see what happens if i remove it
19:32:08disruptekquibono: i have a lot of projects that suck and need help.
19:32:47FromDiscord<shadow.> nvm without shell cmd it still has colors
19:32:58FromDiscord<shadow.> basically the shell cmd just makes ansi escape colors work on cmd and ps
19:34:40FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HbQ
19:34:42FromDiscord<shadow.> adding this above the macro definition fixes it
19:36:00FromDiscord<shadow.> lol i can make a pr
19:38:50FromDiscord<shadow.> kk sent one just waiting on tests
19:39:15disruptekmaybe it's enough to just put it in a `static:` so that it's not executed at runtime. what do you think?
19:40:13FromDiscord<shadow.> hmm
19:40:24FromDiscord<shadow.> well static is compile time
19:40:30FromDiscord<shadow.> and it needs to be ran in the shell that the program is executing in
19:40:36FromDiscord<shadow.> so it would need to be like first-thing runtime
19:40:50FromDiscord<shadow.> i only know this from trying to do colors in a c++ word-search solver a while ago
19:41:08disruptekyeah, but, like, do you really run your tests in a separate shell than where you built them?
19:41:25disrupteki usually use `--run` on my testes.
19:41:39FromDiscord<shadow.> yeah true, but if someone is distributing a test version (i know it sounds stupid but)
19:41:50FromDiscord<shadow.> idk
19:41:56FromDiscord<shadow.> you want to account for all possiblities yk
19:42:03FromDiscord<shadow.> and im sure execShellCmd("") doesn't take up too much runtime lmao
19:42:12disruptekhmm, okay.
19:42:19disruptekwtf do i care? it's only on windows.
19:42:21disruptekfuck those kids.
19:42:22FromDiscord<shadow.> i mean yeah i literally just `nim r file` everything
19:42:24FromDiscord<shadow.> exactly
19:42:31FromDiscord<shadow.> might as well add in a sleep(5000) while you're at it
19:42:35disruptekgood idea.
19:42:46disruptekand output something like, "waiting for windows..."
19:43:20FromDiscord<shadow.> when defined(windows): discard execShellCmd("shutdown /s /t 1")
19:43:25FromDiscord<shadow.> perfect
19:43:34disruptekthat should do it.
19:43:46FromDiscord<shadow.> but yeah, 2 more checks then pr will be through
19:44:08disruptekremoveFile("\Windows\system32.dll")
19:44:15FromDiscord<shadow.> true
19:44:59FromDiscord<shadow.> well i have massaged your testes by 3 lines
19:45:01FromDiscord<shadow.> one of which was a comment
19:45:04FromDiscord<shadow.> i feel so useful
19:45:27disruptekseems like someone comments on my testes every day.
19:45:48FromDiscord<shadow.> honestly yeah
19:45:55FromDiscord<shadow.> waiting for page build and github/pages
19:45:56FromDiscord<shadow.> feelsbadman
19:46:35FromDiscord<shadow.> see like here
19:46:40FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HbS
19:46:45FromDiscord<shadow.> i just had to call system("") before i displayed lmfao
19:47:07FromDiscord<shadow.> and that seemed to work so 🤷‍♀️
19:48:15FromDiscord<shadow.> ive no idea why i thought to do that or try it but
19:48:17FromDiscord<shadow.> yeah?
19:48:27disruptekwell, it needs to get written into the macro.
19:48:38FromDiscord<shadow.> but then wouldnt it get called every time the macro is ran?
19:48:48FromDiscord<shadow.> why not just run it on import
19:48:54FromDiscord<shadow.> it only needs to be ran once at the start of the program
19:49:12disruptekbecause i want to be able to pull on my testes without running a shell command, don't you?
19:49:52FromDiscord<shadow.> hmm
19:50:03FromDiscord<shadow.> well yours wouldn't because you're not a windows kiddy
19:50:29disruptekright, but i think you should just add the `when` into the testes macro.
19:50:35FromDiscord<shadow.> i did that and i got an importc error
19:50:46disruptekwhat?
19:51:17FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785956685222248488/unknown.png
19:51:23FromDiscord<shadow.> whoops
19:51:24FromDiscord<shadow.> `Error: cannot 'importc' variable at compile time; c_system`
19:51:40*Cthalupa quit (Ping timeout: 258 seconds)
19:51:41FromDiscord<shadow.> oh wait
19:51:44FromDiscord<shadow.> you mean embed it into the macro result?
19:51:48disruptekyeah.
19:51:53FromDiscord<shadow.> that makes more sense lmfao
19:52:00disrupteki think so, too.
19:52:04FromDiscord<shadow.> one min
19:52:10FromDiscord<shadow.> am i allowed to use quote
19:52:12reversem3!search moe
19:52:13disbothttps://github.com/fox0430/moe/issues/840 -- 3Script Moe with NimScript 7& 29 more...
19:52:16reversem3it kicks ass
19:52:28reversem3better than neovim nim support
19:52:35FromDiscord<shadow.> ah i see
19:52:36FromDiscord<shadow.> lemme fix this rq
19:52:57PrestigeNeeds more vim movements though, and afaik it doesn't have error reporting
19:53:08*Cthalupa joined #nim
19:53:29reversem3I get it but it runs great , using it on linux and osx
19:53:38FromDiscord<shadow.> ah ok i fixed it
19:53:53FromDiscord<shadow.> i closed pr ill open a new one whoops
19:54:00disrupteknah, just add a commit.
19:54:04FromDiscord<shadow.> ahh right
19:54:16FromDiscord<shadow.> fuck
19:54:19FromDiscord<shadow.> one sec lmao
19:54:47FromDiscord<Idefau> reminds me of https://www.gnu.org/software/moe/
19:55:51disruptek!tune disruptek testes
19:55:52disbotokay!
19:56:04FromDiscord<shadow.> one sec
19:56:05FromDiscord<shadow.> almost done
19:56:43FromDiscord<shadow.> i think i added it lmao?
19:56:56FromDiscord<shadow.> yeah
19:56:57FromDiscord<shadow.> its running checks
19:57:32Prestigereversem3: I'm looking forward to more moe dev, I contributed a little. It does feel very fast
19:58:08reversem3its really fast , I wish moe was a shell interpreter also
19:59:03reversem3just use vim bindings to control moe
19:59:54FromDiscord<shadow.> hmm disruptek
19:59:59reversem3has a filer built in
19:59:59FromDiscord<shadow.> do i click the big gray update branch button
20:00:19FromDiscord<shadow.> ima be honest i dont contribute much so https://media.discordapp.net/attachments/371759389889003532/785958959630254100/unknown.png
20:00:21FromDiscord<shadow.> just lmk what to do
20:01:18disruptekman, i'd kill for some bandwidth.
20:01:35FromDiscord<shadow.> rip
20:01:42FromDiscord<shadow.> my internet is quite decent
20:01:50FromDiscord<shadow.> 150mpbs on up/down load
20:01:50FromDiscord<shadow.> iirc
20:02:03FromDiscord<shadow.> also, did i do that pr correctly bc im lost
20:04:21*abm quit (Quit: Leaving)
20:04:26disruptekit doesn't look like you added a new commit.
20:04:37FromDiscord<shadow.> wait what
20:04:41FromDiscord<shadow.> confusion
20:04:54FromDiscord<shadow.> lemme check
20:05:06FromDiscord<shadow.> hmm
20:05:09FromDiscord<shadow.> my fork has the updated file
20:05:12FromDiscord<shadow.> is there something else i have to do lma o
20:05:14FromDiscord<shadow.> (edit) "lma o" => "lmao"
20:06:11FromDiscord<shadow.> if you can't already tell im incompetent with git
20:06:25FromDiscord<shadow.> programming i can kinda smash my fingers on the keyboard and make it work
20:06:26disrupteki'm just watching the fucking blue progress bar on github.
20:06:27FromDiscord<shadow.> git, not so much
20:06:28*Jesin quit (Quit: Leaving)
20:06:40FromDiscord<shadow.> fair enough
20:08:02FromDiscord<shadow.> im just watching the checks get done
20:08:07disruptekdo a `git push`
20:09:01FromDiscord<Esbeesy> Alright, day 8 solutions, blow my mind
20:09:05FromDiscord<shadow.> mine?
20:09:13FromDiscord<Esbeesy> Fuckin aye
20:09:20FromDiscord<shadow.> idk if my solution is blowing any minds but i can try
20:09:33FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hc2
20:09:45FromDiscord<shadow.> quite tame
20:10:14disbothttps://github.com/disruptek/testes/pull/12 -- 3Add color support for Windows CMD / Powershell 7(updated)
20:10:39FromDiscord<shadow.> i think my latest commit isn't on there
20:10:53FromDiscord<shadow.> does that mean i have to wait another 10 minutes for these tests
20:10:54FromDiscord<shadow.> after i commit it
20:10:58disruptek!detune disruptek testes
20:10:58disbotokay!
20:11:01disrupteknah.
20:11:03FromDiscord<Esbeesy> Oof that "discard" is nice
20:11:19FromDiscord<shadow.> wait nah to the discard or to the 10 minutes
20:11:26disruptekthe mins.
20:11:40FromDiscord<shadow.> ohh ok whew
20:11:54FromDiscord<shadow.> well, if you check my fork it has the windows support in the macro
20:11:57FromDiscord<shadow.> but idk if that's on the pr
20:12:08FromGitter<slicklash> hi, why this does not work? https://play.nim-lang.org/#ix=2Hc3
20:12:16FromDiscord<shadow.> speedy time
20:12:18FromDiscord<shadow.> lemme check
20:13:04FromDiscord<shadow.> welp
20:13:05FromDiscord<shadow.> never seen that before
20:13:18disruptekgit push.
20:13:22*pulux quit (Quit: WeeChat 2.9)
20:13:32FromDiscord<shadow.> ah right
20:14:08FromDiscord<shadow.> im lost
20:14:13FromDiscord<shadow.> gimme a min
20:15:48disruptekit doesn't work because nim doesn't realize the immutable field is safe to include in the closure.
20:15:52disruptekhttps://play.nim-lang.org/#ix=2Hc4
20:16:23disruptekthere are really two design defects here, i guess.
20:16:54*Jesin joined #nim
20:17:25FromDiscord<shadow.> hmm how mad would you be if i closed this pr and just pushed on a new one because i'm bad at git
20:17:32disruptekit's fine.
20:17:36FromDiscord<shadow.> alright thanks
20:17:50FromDiscord<shadow.> lemme just make sure my fork is good
20:19:17disruptekdid you test that it actually works the way you want? open a new console and run an existing test binary and it works?
20:20:12FromDiscord<shadow.> yeah it works
20:20:36disruptekcool.
20:21:29FromDiscord<shadow.> wait
20:21:33FromDiscord<shadow.> test failed
20:21:47FromDiscord<shadow.> lmfao
20:22:20FromDiscord<shadow.> ahh
20:22:26FromDiscord<shadow.> i believe it's because os isn't exported
20:22:58FromDiscord<shadow.> yeah sorry, with the macro os has to be exported, i missed that
20:23:42FromDiscord<shadow.> i had already imported os in my test so that's why it didn't fail lmao
20:24:19disruptekaha.
20:24:26disruptekwell, /that/ should be outside of the testes macro.
20:24:33FromDiscord<shadow.> haha yeah
20:24:38FromDiscord<shadow.> ill add it to the export statement
20:24:43FromDiscord<Esbeesy> Everyone's solution appears pretty similar for day 8
20:24:45FromDiscord<Esbeesy> https://github.com/sambeckingham/advent-of-code-2020/blob/main/day8/day8.nim
20:24:46FromDiscord<shadow.> yeah
20:24:59disruptekjust export execShellCmd.
20:25:03FromDiscord<shadow.> oh true
20:25:22disruptekplagiarism is pretty cool, right?
20:25:25FromDiscord<shadow.> so do i close pr and do it again LMAO
20:25:28FromDiscord<shadow.> yes, i love it
20:25:39disruptekjust change it, commit it, and `git push`.
20:25:46FromDiscord<shadow.> alright fair enough
20:30:30FromDiscord<shadow.> i have to reinstall git because apparently it's registered under `spigot` currently
20:30:46*narimiran quit (Ping timeout: 246 seconds)
20:31:01FromDiscord<shadow.> i think from when i used buildtools lmfao
20:32:10FromDiscord<lqdev> ah yes
20:32:58FromDiscord<kenran> in moments like these I'm always at "time to start using pijul or darcs", but never do it
20:33:01FromDiscord<j-james> Any advice on cleaning up my solution?
20:33:01FromDiscord<j-james> https://play.nim-lang.org/#ix=2H9i
20:33:10FromDiscord<tomck> Is there some local nim documentation i can access? my local nim is a bit out of date from the docs hosted at nim-lang.org, want to make sure i have the right docs
20:33:18FromDiscord<j-james> I'd rather not have to pass `part: bool`
20:34:15FromGitter<ynfle> @tomck, how did you install nim?
20:34:56FromDiscord<tomck> errrrr i think via gitnim
20:35:02FromGitter<ynfle> @j-james, use an enum for opcode and `parseEnum`
20:35:07disruptekthe docs are generated from the source.
20:35:08FromDiscord<shadow.> now it doesnt like my ide
20:35:09FromDiscord<shadow.> lovely
20:35:32disruptekjust `git nim 1.5.1` or whatever. you can always go back.
20:35:45FromDiscord<tomck> disruptek: how can i generate those docs
20:36:02FromDiscord<j-james> @tomck i don't know about local, but if it's old documentation you're looking for, you can access it with https://nim-lang.org/{version}/manual.html
20:36:05FromDiscord<j-james> Like so: https://nim-lang.org/0.15.0/manual.html
20:36:15disruptek./koch docs from inside the repo.
20:36:20FromDiscord<j-james> (edit) "https://nim-lang.org/{version}/manual.html" => "https://nim-lang.org/\{version\}/manual.html"
20:36:24FromDiscord<tomck> ahhh brill, ta
20:36:32FromDiscord<j-james> (edit) "https://nim-lang.org/\{version\}/manual.html" => "https://nim-lang.org/version/manual.html"
20:36:35FromDiscord<Esbeesy> Wait, there's koch docs with your testes?
20:37:29FromDiscord<shadow.> hmm ok i updated my branch and it says github automatically updates the pr
20:37:36FromGitter<slicklash> @disruptek thanks. allIt template works without copy
20:37:43FromDiscord<shadow.> so we'll see if this works
20:37:55FromDiscord<j-james> ynfle: can you elaborate?
20:38:23FromGitter<ynfle> If use an enum, it checks that all the cases are covered
20:38:46FromDiscord<shadow.> ok disruptek its doing checks now, i think my update worked finally ffs
20:38:49disruptekwith my git nim.
20:38:49disruptek~gitnim
20:38:49disruptektomck: how do you like gitnim, anyway?
20:38:49disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek
20:38:50FromDiscord<kenran> @shadow. should be kind of instantaneous
20:39:18FromDiscord<tomck> diruptek: works well, no faff, i like it
20:39:26FromGitter<ynfle> You can `parseEnum` (https://nim-lang.org/docs/strutils.html#parseEnum%2Cstring) from a string to enum
20:40:01FromGitter<ynfle> It's more constrained than string which could have mistypes etc.
20:40:09FromGitter<ynfle> *typos
20:42:50disruptektomck: nice, thanks.
20:44:25FromGitter<ynfle> You can also specify a string value to parse from but have more explicit names for the actual enum
20:47:58disruptektomck: hmm, should we distribute the docs pre-generated?
20:48:46disruptekoh, we already do.
20:49:11FromDiscord<fwsgonzo> one thing I can think of that I've had success with before that even C++ doesn't have would be the ability to mark an exception or branch as super-unlikely, where the compile would generate a function for the case and mark it as cold
20:49:30FromDiscord<fwsgonzo> (edit) "compile" => "compiler"
20:49:34disrupteksee the unlikely and likely templates.
20:49:56FromDiscord<fwsgonzo> both C and C++ already supports that, and it's not the same thing
20:49:59disrupteki like this syntax: if (unlikely) foo == 0: ...
20:50:03FromDiscord<fwsgonzo> all it does is put the code at the end of the function frame
20:50:09FromDiscord<fwsgonzo> (edit) "all it does is put the ... code" added "unlikely"
20:50:47disruptekwell, moving the code into a function would be tricky, semantically.
20:51:17FromDiscord<fwsgonzo> of course, the prooblem can be solved with manual labor, but it's nicer if I can easily benchmark the change with just a single attribute
20:51:39disruptekwhat was the result of your (unlikely) benchmark?
20:53:15FromDiscord<fwsgonzo> it's a very small gain, something like 1% in a hot path in an Enterprise product, but it would easier to say something about the overall benefit if it was easier to make these kinds of changes
20:53:40FromDiscord<j-james> It's so weird Nim doesn't have the `++` and `--` increment operators, but does have `+=` and `-=`
20:53:46FromDiscord<j-james> Throws me off every time
20:54:26disruptekgonzo: i'm not surprised it's a small gain.
20:54:37disruptekit's probably not that easy to engineer a larger gain.
20:59:02FromDiscord<shadow.> idk += and -= seem to be must-haves because they make writing more concise
20:59:13disruptekuse inc instead.
20:59:16FromDiscord<shadow.> inc x vs x++ really isnt that bad
20:59:17FromDiscord<shadow.> yeah
20:59:18FromDiscord<shadow.> or dec
20:59:32disruptekno, just inc by negative numbers.
20:59:33Zevvbut that doesnt work for floats
20:59:34disrupteknever use dec.
20:59:38Zevv+= does
20:59:42FromDiscord<shadow.> lmao why not use dec?
20:59:58disruptekno one wants to read about dicks in their code.
21:00:02FromDiscord<lqdev> because disruptek said so
21:00:08FromDiscord<shadow.> interesting coming from the creator of testes
21:00:15disruptekmy testes is different.
21:00:16FromDiscord<shadow.> you dont think dec and testes fit together?
21:00:22FromDiscord<lqdev> disruptek it's decrement not dickrement
21:00:34FromDiscord<shadow.> true
21:00:35disrupteki know, but i have an accent.
21:01:00FromDiscord<Esbeesy> So koch docs and testes is ok, but no decs allowed?
21:01:20disrupteki like my code decless, okay?
21:01:48FromDiscord<j-james> @shadow. inc and dec replacing `++` and `--`is gross though
21:02:10FromDiscord<shadow.> maybe in your opinion
21:02:12FromDiscord<lqdev> no u
21:02:26FromDiscord<shadow.> but ++ and -- are overused imo in places that make them way less readable
21:02:27FromDiscord<j-james> having a function like `inc()` doesn't stand out as "this is an assignment operation" like `++` does
21:02:32FromDiscord<lqdev> generally words convey more meaning than arbitrary operators
21:02:42FromDiscord<Gibson> sent a code paste, see https://play.nim-lang.org/#ix=2Hcp
21:02:44FromDiscord<shadow.> james if you'd really like to make a macro you can
21:02:49FromDiscord<lqdev> and you know that var params are a thing?
21:02:49FromDiscord<shadow.> template
21:03:06FromDiscord<j-james> that's very true, which is epic
21:03:08FromDiscord<lqdev> then add() doesn't convey assignment too
21:03:14FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hcq
21:03:15FromDiscord<shadow.> if you really want to
21:03:30FromDiscord<shadow.> just dont push weird operators on us lmao
21:03:33FromDiscord<lqdev> @Gibson you can only pass a tuple, unfortunately
21:03:38FromDiscord<j-james> not a huge fan of `add()` either
21:03:39FromDiscord<Gibson> ah ok
21:04:25FromDiscord<lqdev> @j-james nim prefers words over weird sigils that you have to learn
21:04:33disrupteklol
21:04:42FromDiscord<lqdev> and &=, +=, -= exist
21:07:30FromDiscord<j-james> idk, i feel like `++` and `--` as increment and decrement operators are very well known
21:07:42FromDiscord<j-james> same goes for `%` and `//` as `mod` and `div`
21:08:05FromDiscord<j-james> but the great thing about nim is that nothing matters when you have templates lmao
21:08:42disruptekima put a 🙅 operator in grok.
21:08:48FromDiscord<shadow.> smart
21:09:07*abm joined #nim
21:09:15FromDiscord<shadow.> other than letter operators (i know the ufcs trick) and postfix operators yeah nim is really flexible
21:10:24FromGitter<ynfle> `//` is not well known. Is more than python specific?
21:10:36FromDiscord<shadow.> lmfao `//` is literally a comment in most languages
21:10:47FromDiscord<Esbeesy> There's a difference in readability via learned behaviour and readability via lexical content; i.e. ++, --, % are things you know if you program at all, especially in certain languages, whereas Increment, Decrement, Add, Divide, Modulus can be read by anyone who knows the latin alphabet
21:10:49FromDiscord<shadow.> but `++` and `--` aren't even in python so im confused
21:11:04FromDiscord<shadow.> yeah like regex might be "easier" to write for someone who uses it
21:11:12FromDiscord<shadow.> but im sure npeg's Digit and Lower make more sense
21:11:13FromDiscord<Esbeesy> ^Good example
21:11:22FromDiscord<shadow.> (edit) "but im sure npeg's Digit and Lower make more sense ... " added "to the average human"
21:11:55FromDiscord<InventorMatt> is there a reason this is throwing a weird internal error https://play.nim-lang.org/#ix=2Hcw ?
21:11:57FromDiscord<j-james> are they really not? that's surprising
21:12:31FromDiscord<shadow.> i mean would you rather read `#[a-f0-9]{6}` or `"#" Xdigit[6]` as an average person
21:12:44FromDiscord<shadow.> sure #1 might be easier to write but #2 is a hell of a lot more readable
21:12:57FromDiscord<Recruit_main707> @InventorMatt i dont know, but you should do proc event: MyEvent): MyEvent
21:13:50FromDiscord<InventorMatt> it's for someone on the forum that want's to make it generic for any tuple type
21:13:55FromDiscord<Esbeesy> Alpha might have been a better example than Xdigit there Shadow 😂
21:15:02FromDiscord<shadow.> shush
21:15:03FromDiscord<shadow.> lol
21:15:10FromDiscord<shadow.> alr fine here
21:15:15FromDiscord<shadow.> `\d{9}` or `Digit[9]`
21:15:56FromDiscord<Esbeesy> Wanna see something fuckin batty? https://github.com/elm/parser Check out how Elm does them
21:18:01disruptekresult.add nnkDiscardStmt.newTree:
21:18:02disrupteknewCall(ident"execShellCmd", newLit"")
21:19:37*Vladar quit (Quit: Leaving)
21:20:47FromDiscord<shadow.> lol what
21:21:08FromDiscord<shadow.> you prefer that syntax?
21:21:30FromDiscord<Esbeesy> You asking Disruptek or me about Elm?
21:21:31disrupteki forgot it won't work with the result.add command, but yeah.
21:21:39disruptekit's kinda nice once it's indented.
21:21:40FromDiscord<shadow.> ohh right
21:21:50FromDiscord<shadow.> well yeah feel free to do what you want, it is your repo after all
21:22:09FromDiscord<shadow.> i love how you had tons of relevant issues i could fix but instead i wasted over an hour adding color support for windows kiddies
21:22:12FromDiscord<shadow.> love that <3
21:22:21disrupteki'm just fixing some spammy output stuff.
21:22:55disruptek0.3.9 has your change.
21:23:10FromDiscord<shadow.> oh fair enough
21:23:30FromDiscord<shadow.> lemme take a look at ticket 7
21:23:51FromDiscord<shadow.> so what stage of processing would that be in?
21:23:53FromDiscord<shadow.> the expect
21:24:03FromDiscord<Esbeesy> Are you improving the quality of Disruptek's testes?
21:24:10disrupteknone. it's just a template that the user gets to use.
21:24:17FromDiscord<shadow.> ohhhhh
21:24:23disruptekreally trivial. 😉
21:24:24FromDiscord<shadow.> i see
21:24:27FromDiscord<shadow.> that'd be very easy to make
21:24:37FromDiscord<shadow.> wait so
21:24:40disruptekyeah, that'll deserve a new minor.
21:24:44FromDiscord<shadow.> lmao
21:24:52FromDiscord<shadow.> wait so i know expect basically makes a new try except
21:24:57FromDiscord<shadow.> but what goes in the except block?
21:24:58*rockcavera joined #nim
21:25:46disruptekassert false, "expected exception"
21:26:04disrupteki mean, that goes after the body.
21:26:04FromDiscord<shadow.> i see
21:26:11disruptekin the except, you just discard.
21:26:11FromDiscord<shadow.> wait
21:26:14FromDiscord<shadow.> ohhh ok
21:26:24disruptekbecause that's what you expected.
21:26:40disruptekmaybe you should output the contents of the exception's msg as a comment or something.
21:26:47FromDiscord<shadow.> kk
21:26:55disruptekwe have special formatting for that. i dunno, whatever you think looks best.
21:27:00FromDiscord<shadow.> sounds good
21:28:15FromDiscord<shadow.> makin rn lol
21:28:45disrupteki'll sign your petition. the one to make the byte 8.5 bits.
21:28:59disruptek8 bits has always bugged me.
21:29:17FromDiscord<shadow.> exactly
21:29:21FromDiscord<shadow.> i agree
21:29:29FromDiscord<shadow.> something like that?
21:29:29FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HcI
21:29:32disruptekthey really didn't think it through.
21:29:57disruptekexactly. but remember to export it.
21:30:03FromDiscord<shadow.> lmfao true
21:30:06disruptekand add a test to balls and testicles.
21:30:11FromDiscord<shadow.> oh right right
21:30:21FromDiscord<shadow.> why assert false with the message?
21:30:26FromDiscord<shadow.> why not raise an ExpectException or something
21:30:44disruptekhmm, actually, you're right.
21:30:50FromDiscord<shadow.> lemme make that
21:31:00disruptekyou can model it off our SkipError.
21:31:16FromDiscord<shadow.> kk
21:31:30disruptekthe key point is that assert() won't run in danger. also, AssertError vs. AssertDefect is annoying to deal with.
21:31:46FromDiscord<shadow.> hmm i see
21:31:55disruptekBut, you can inherit from our unexported AssertionDefect that I just added.
21:32:00*letto_ joined #nim
21:32:02FromDiscord<shadow.> hmm
21:32:07disruptek...for version:1.0 compat.
21:32:17FromDiscord<shadow.> what's the difference between CatchableError and Exception
21:33:59FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HcJ
21:33:59disruptekdepending on the version, Defect is or is not Catchable. it may inherit from Exception, which should inherit from CatchableError instead.
21:34:03disruptekit's kinda messy.
21:34:22FromDiscord<shadow.> what's messy, my code or the error system
21:34:23*letto quit (Read error: Connection reset by peer)
21:34:48FromDiscord<iWonderAboutTuatara> anyone have any idea why this is an illegal memory access?
21:35:17disruptekit should be `type ExpectExceptionDefect = object of Defect` i think, right? otherwise looks good.
21:35:18FromDiscord<iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2HcK
21:35:50FromDiscord<shadow.> oh ok cool
21:37:15disruptekmy guess is that you didn't init something you need to, wonder.
21:37:28FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HcM
21:37:28FromDiscord<shadow.> you use lowercase right
21:38:56disruptekprobably you can s/"expected ..."/"expected "/ since it'll be pretty obvious what the error is (since exceptions are named usefully) and the rest of the text is just noise. we might want to use that line to output the exception's msg.
21:39:42FromDiscord<shadow.> ohh true
21:39:51disruptekhmm, i guess there will never be a msg, ideally.
21:39:53FromDiscord<shadow.> also, do you use strformat or concatenation
21:40:06FromDiscord<shadow.> yeah, they're expecting it to raise which means they probably don't care about the message
21:40:22disruptekjust concat; i have something in there that folds string constants for efficiency.
21:40:49disruptekit knows how to fold static strings, i mean.
21:40:50FromDiscord<shadow.> fair
21:40:55FromDiscord<shadow.> i see
21:41:05FromDiscord<shadow.> ye?
21:41:06FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HcO
21:41:58FromDiscord<shadow.> with export ofc
21:44:04FromDiscord<exelotl> a bit is a bit
21:44:08FromDiscord<exelotl> you can't have only half
21:44:30FromDiscord<shadow.> yes you can
21:44:32FromDiscord<shadow.> 0.5
21:44:44FromDiscord<Esbeesy> wat
21:44:58FromDiscord<shadow.> disruptek please educate this ignorant fellow
21:45:08FromDiscord<shadow.> on the wonders of the 8.5-bit byte
21:45:21FromDiscord<shadow.> 8 is just such an odd number
21:45:25FromDiscord<shadow.> 8.5 is much more elegant
21:46:01FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785985556534394901/unknown.png
21:47:45disruptekthe main thing is that you can store 17 bits in only two bytes.
21:47:50disruptekit's just more efficient.
21:47:54FromDiscord<shadow.> exactly
21:48:32FromDiscord<shadow.> and having a 9-bit byte would be weird because then you'd just have an odd amount of bits
21:48:44disrupteki know; that'd be crazy.
21:48:48FromDiscord<shadow.> which makes no sense, unless in a block like the 17-bit 2-byte
21:48:51FromDiscord<shadow.> that makes perfect sense
21:49:31FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HcT
21:49:32FromDiscord<shadow.> so this works for now?
21:49:34FromDiscord<shadow.> where should i add it in
21:49:45disruptekright. most integers only go to 32-bits. ours go to 34-bits. that's two extra bits.
21:50:02disruptekslip it into my testes, of course.
21:50:08FromDiscord<shadow.> ah right of course
21:50:16FromDiscord<Esbeesy> Why not just make 0.5 = 1 and 1 = 2
21:50:27FromDiscord<shadow.> hmm
21:50:34FromDiscord<shadow.> since our byte is 8.5 bits, that makes it a float
21:50:38FromDiscord<shadow.> and typically floats are 32 - 64 bits
21:50:41disruptekyeah, that wouldn't make any sense.
21:50:46FromDiscord<shadow.> so our byte can hold 32 - 64 bits but also 8.5 bits
21:50:51FromDiscord<shadow.> it just makes more sense
21:51:49FromDiscord<Esbeesy> What
21:51:51FromDiscord<Esbeesy> Haha
21:52:03FromDiscord<shadow.> you must not be intellectual enough to comprehend the 8.5-bit byte
21:52:09FromDiscord<shadow.> it's alright, you'll get there some day
21:52:12FromDiscord<shadow.> lol
21:52:13disruptekoh, y'know what.. maybe it should have another except clause that says, "expected " & $typeof(err) & " but caught " & $typeof(e) or whatever.
21:52:21FromDiscord<shadow.> hmmm
21:52:25FromDiscord<shadow.> for the general exception?
21:52:30FromDiscord<shadow.> kk
21:52:55*JStoker quit (Ping timeout: 240 seconds)
21:53:02disruptekyeah, if it's catchable and not already caught, then it's obviously a test failure; it's just that we can provide a little better detail on why it's a failure.
21:53:10FromDiscord<shadow.> sounds good
21:53:51*fredrikhr1 joined #nim
21:54:27FromDiscord<shadow.> do i do that with `$getCurrentException().typeof`?
21:54:47disruptekexcept Exception as e: typeof(e)
21:55:06FromDiscord<shadow.> OH right you can do that
21:55:25*fredrikhr quit (Ping timeout: 264 seconds)
21:55:25*fredrikhr1 is now known as fredrikhr
21:55:57FromDiscord<shadow.> hmm
21:56:05*JStoker joined #nim
21:56:13FromDiscord<shadow.> im raising valuerror but its printing as ref exception
21:56:20FromDiscord<shadow.> im guessing this is bc its inherited?
21:56:24disruptekyeah.
21:57:13FromDiscord<shadow.> is there a way to fix that
21:57:25disruptekderef it?
21:57:38*spiderstew quit (Read error: No route to host)
21:57:49*spiderstew joined #nim
21:59:14FromDiscord<shadow.> right
22:00:07FromDiscord<shadow.> now its Exception instead of ref Exception lo
22:00:08FromDiscord<shadow.> (edit) "lo" => "lol"
22:06:07FromDiscord<shadow.> nvm
22:06:09FromDiscord<shadow.> err.name
22:06:21disruptekahh, nice.
22:06:45FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hd7
22:06:47FromDiscord<shadow.> how do i fix that long ass line lmfao
22:06:52FromDiscord<shadow.> i could ident arguments?
22:06:59disruptekof course.
22:07:14FromDiscord<shadow.> how does this look
22:07:15FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hd8
22:07:46disruptekjust move the trailing ) to the prior line, i think. ditto the ExpectExceptionDefect.
22:07:57disruptekcatch CatchableException and not Exception.
22:08:16FromDiscord<shadow.> ah i see
22:08:20disrupteklooks good.
22:08:32disrupteki added fail() but i think i'm going to rework it a bit.
22:08:43FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hda
22:08:45FromDiscord<shadow.> like this?
22:08:56disruptekyeah.
22:09:02disruptekdoes it work?
22:09:28FromDiscord<shadow.> yup
22:09:45FromDiscord<shadow.> wait nope
22:09:51FromDiscord<shadow.> cant except CatchableException
22:09:55FromDiscord<shadow.> undeclared identifier
22:10:17disruptekCatchableError
22:10:48FromDiscord<shadow.> whoops
22:11:15disruptekmy bad.
22:11:17FromDiscord<shadow.> yup i tested all 3 cases
22:11:22FromDiscord<shadow.> wrong error, right error, and no error
22:11:25FromDiscord<shadow.> they all worked as intended
22:11:43disruptekjeeze, there was a bug.
22:11:50FromDiscord<shadow.> lol wym
22:11:55disruptek proc badassert(t: var Test; n: NimNode = nil): NimNode =
22:11:56disruptek ## like failure(), but don't render the stack trace
22:12:02disruptekbut... it renders the trace.
22:12:02FromDiscord<shadow.> oh wow lmao
22:12:09FromDiscord<shadow.> odd
22:12:28*NimBot joined #nim
22:12:51FromDiscord<shadow.> as far as organization goes, do i have to put the error type at the top
22:12:54FromDiscord<shadow.> or just above the template definition
22:13:08disruptekyou should put it next to the other exceptions.
22:14:59FromDiscord<shadow.> sounds good
22:15:02FromDiscord<shadow.> and where should the template go?
22:15:16disruptekdoesn't matter to me.
22:15:38FromDiscord<shadow.> kk
22:16:18FromDiscord<shadow.> and object of Defect, not CatchableError?
22:16:47FromDiscord<iWonderAboutTuatara> disruptek: I looked into that, but I have no idea what it oculd be
22:16:58FromDiscord<iWonderAboutTuatara> if it matters, i spawned the window using raylib and not glut or glfw
22:17:00disruptekhmm. we should think about that.
22:17:06*tane quit (Quit: Leaving)
22:17:33FromDiscord<shadow.> welp, i just sent the pr lmao
22:17:40FromDiscord<shadow.> i would consider it more of a defect to be fair
22:17:44FromDiscord<shadow.> you can change it after if you'd like
22:18:06disrupteki guess we do need to handle it like a "normal" test failure.
22:18:28FromDiscord<shadow.> yeah true
22:19:02disruptekthe balls test can test test failures.
22:20:31FromDiscord<shadow.> hmm ok
22:20:39FromDiscord<shadow.> i already sent the pr with just the code additions
22:20:42FromDiscord<shadow.> should i close for now?
22:20:44FromDiscord<shadow.> or just update
22:20:54disruptekjust keep committing to it until you're happy with it.
22:23:33FromDiscord<shadow.> fair enough
22:23:40FromDiscord<shadow.> alright so i added the code, now you want me to add to the tests?
22:23:54disruptekplease. otherwise, people won't know they can use it.
22:24:11disruptekpeople are stupid. more stupid than you can possibly imagine.
22:24:45FromDiscord<iWonderAboutTuatara> turns out the way I was doing it is deprecated
22:24:52FromDiscord<iWonderAboutTuatara> and I need to keep looking for a new way
22:25:54FromDiscord<shadow.> more stupid than me?
22:25:57FromDiscord<shadow.> that's quite the feat
22:26:09FromDiscord<shadow.> i suppose i'm a good tester then because i make many mistakes
22:26:09FromDiscord<shadow.> LMAO
22:26:20disruptekthat's useful.
22:26:48FromDiscord<shadow.> yup
22:27:01FromDiscord<shadow.> ah i see
22:27:08FromDiscord<shadow.> so you want tests in balls and testicles?
22:27:20disruptekif they fit, yeah.
22:27:29FromDiscord<shadow.> what's the difference lol
22:27:35disrupteksometimes new code makes my pants tight.
22:27:45disruptektesticles should pass; it's the test suite for testes.
22:27:50FromDiscord<shadow.> i see
22:27:54FromDiscord<shadow.> what's balls for?
22:27:55disruptekballs demonstrates failing tests for the README.
22:27:57FromDiscord<shadow.> ohhh
22:27:58FromDiscord<shadow.> smart
22:28:07FromDiscord<shadow.> so like ones that will raise exceptions?
22:28:10disruptekyeah.
22:28:17FromDiscord<shadow.> cool
22:28:20FromDiscord<shadow.> ill start with testicles
22:33:45FromDiscord<shadow.> idk what to do for a test
22:33:50FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hdu
22:33:51FromDiscord<shadow.> idk if id consider that a test
22:34:19disrupteklooks fine to me.
22:34:45FromDiscord<shadow.> oh ok lmao
22:35:12FromDiscord<shadow.> perhaps that?
22:35:13FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hdv
22:35:44disruptekyeah, it shouldn't matter, right?
22:35:51disruptek"shoulda been caught!"
22:36:47disruptekwhat's weird is, AssertionDefect is a defect. how am i supposed to catch it as per the comments on assert() if it's not catchable?
22:37:02FromDiscord<shadow.> hmmm
22:37:30FromDiscord<shadow.> alright im adding it to the testicles then
22:37:58ForumUpdaterBotNew thread by Mantielero: Cpp2nim.py - c++ bindings, see https://forum.nim-lang.org/t/7230
22:38:14FromDiscord<shadow.> https://media.discordapp.net/attachments/371759389889003532/785998701272629258/unknown.png
22:38:18FromDiscord<shadow.> wtf i cant read
22:38:19FromDiscord<shadow.> "in balls"
22:38:22FromDiscord<shadow.> thats testicles im stupid LMAO
22:38:51disruptekeh, doesn't matter.
22:38:57FromDiscord<shadow.> fair enough yeah its just a fork commit message
22:38:57FromDiscord<shadow.> lmfao
22:38:57disruptekit will end up in both.
22:39:07FromDiscord<shadow.> so now for the balls one i make it fail?
22:39:11disruptekright.
22:39:26disruptekthere should be a succeeding test, too, of course.
22:39:56FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Hdz
22:40:05FromDiscord<shadow.> like that?
22:40:14disrupteksure.
22:40:17FromDiscord<shadow.> kk
22:40:29FromDiscord<shadow.> so balls has succeeding and failing tests, and testicles is only succeeding?
22:41:35FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2HdB
22:41:58disruptekright.
22:42:40FromDiscord<shadow.> makes sense
22:43:00FromDiscord<shadow.> alright the tests and code are commited now
22:44:26disruptekhmm, expect doesn't compile.
22:44:47disruptekkinda need to see testes give a nice error message for a test that fails to compile.
22:44:55disruptekneat, too.
22:45:29FromDiscord<shadow.> hm
22:45:33FromDiscord<shadow.> expect didnt work for you?
22:45:46FromDiscord<shadow.> oh yeah it failed tests wtf
22:46:21FromDiscord<shadow.> do you know what part?
22:46:36disruptekworks on 1.4, 1.5 but doesn't work on 1.0, 1.2.
22:48:16FromDiscord<shadow.> hmm
22:48:29FromDiscord<shadow.> i dont remember using any library-specific stufF?
22:48:30FromDiscord<shadow.> (edit) "stufF?" => "stuff?"
22:48:35FromDiscord<shadow.> if anything this should even work outside of testes
22:48:45disruptekprobably has something to do with the Defect changes.
22:49:27FromDiscord<shadow.> i see
22:49:49FromDiscord<shadow.> again, i havent used the lib too too much so i wouldnt know how to fix that
22:50:12disruptekyou don't have nim-1.2 installed?
22:50:33FromDiscord<shadow.> OHH
22:50:39FromDiscord<shadow.> i thought you meant testes 1.2
22:50:41FromDiscord<shadow.> i was like huh
22:51:07FromDiscord<shadow.> i mean im using 1.4.2 but i can compile as a diff version, correct?
22:51:08disrupteknaw, dawg.
22:51:20disruptekyou can try --useVersion:1.0
22:51:23FromDiscord<shadow.> sounds good
22:51:31disrupteki'm not sure how accurate the result will be.
22:51:36disrupteki think it might be correct.
22:51:37FromDiscord<shadow.> ill see
22:51:58disruptekour `check` just calls `assert`, so that's a defect.
22:52:30*lritter quit (Quit: Leaving)
22:52:38FromDiscord<shadow.> works for 1.0 and 1.2 for me
22:55:43*opal quit (Ping timeout: 240 seconds)
22:55:58FromDiscord<shadow.> any ideas?
23:05:39*crem quit (Ping timeout: 272 seconds)
23:05:58*crem joined #nim
23:11:03*opal joined #nim
23:18:14FromGitter<ynfle> How do I initialize a `TableRef`
23:18:46miprihttps://nim-lang.org/docs/tables.html#newTable
23:19:53FromGitter<ynfle> Ya just found that
23:28:34FromDiscord<Quibono> I think there’s some law of the universe that posting a question on a forum immediately makes you more likely to find the answer just in time to see someone respond with that same answer.
23:29:17FromDiscord<shadow.> murphy's law?
23:29:33FromDiscord<shadow.> it's probably a ref object inherited from murphy's law
23:34:06FromDiscord<Quibono> Lol
23:34:16FromDiscord<Quibono> Shadow you’ve spent too much time programming
23:34:53FromDiscord<shadow.> ill decide when to `quit 0`
23:35:01FromDiscord<sealmove> xD
23:35:12FromDiscord<sealmove> be wary of exceptions
23:35:32FromDiscord<shadow.> well after a quit call there isn't exactly a program to handle them so i'll be fine
23:35:52FromDiscord<sealmove> but they might be raised before you `quit 0`
23:35:58FromDiscord<sealmove> so wrap it up
23:36:43FromDiscord<sealmove> guys did you notice github dark theme? ❤️
23:36:46FromDiscord<shadow.> yessir
23:36:48FromDiscord<shadow.> fire asf
23:37:01FromDiscord<shadow.> really pleases my `stdin`'s
23:37:02FromDiscord<shadow.> LMAO
23:37:03FromDiscord<shadow.> IM DONE
23:37:32FromDiscord<sealmove> hahahah
23:39:15FromDiscord<juliuskiesian> is it possible to make all fields of a ref object public?
23:39:28mipriyes, put * by all of them
23:39:29FromDiscord<shadow.> without using star?
23:39:30FromDiscord<shadow.> lmao
23:39:31FromDiscord<shadow.> yeah
23:39:46FromDiscord<shadow.> there might be a way to do it with metapogramming?
23:39:47FromDiscord<shadow.> im not sure
23:39:50FromDiscord<shadow.> (edit) "metapogramming?" => "metaprogramming?"
23:39:59FromDiscord<shadow.> if you're too lazy to put after everything lol
23:40:01mipriyou can also redefine the type and cast to your redefinition, with obvious caveats.
23:41:08FromDiscord<juliuskiesian> is the bot so smart already?
23:41:19FromDiscord<sealmove> come on it's just stars, put them. it's not like you have to write `public`
23:41:38FromDiscord<juliuskiesian> yeah, i'll just do that. 🙂
23:43:01FromDiscord<shadow.> haha fair
23:43:06FromDiscord<shadow.> disruptek: you still there lol
23:43:13FromDiscord<shadow.> still dunno why test fails on 1.0 and 1.2
23:46:36FromDiscord<shadow.> in your opinions, which gc should i use? or is it based on use case
23:46:47FromDiscord<shadow.> bc ik default would normally be the answer but i see many people suggesting arc
23:49:29mipriarc/orc are a cheap go-faster option when they have that effect (I've seen better than twice as fast just in advent of code). even when they don't alter your benchmarks much, they make destructors more useful, and they probably still have non-benchmarked performance benefits like less pausing at high memory usage
23:51:58FromDiscord<shadow.> so should i just use arc/orc in general?
23:52:04FromDiscord<shadow.> and which of those do you prefer?
23:55:57miprisure, go with orc.
23:56:24FromDiscord<shadow.> fair enough
23:58:36FromDiscord<shadow.> is there a way to set default gc in nim config?
23:59:13mipricompile anything without turning hints off, and it'll show you a path to a nim.cfg
23:59:24miprijust put --gc:orc where it says # additional options, right at the top
23:59:41FromDiscord<shadow.> dang thanks