<< 17-02-2021 >>

00:02:38*blackpawn joined #nim
00:23:58*astronavt left #nim (#nim)
00:26:01*astronavt joined #nim
00:33:10FromGitter<redblack3_gitlab> Hey guys, this code: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Is there a way to get the type of the parameter `b` of `proc test`? [https://gitter.im/nim-lang/Nim?at=602c6446a7fc4b573bdbf08c]
00:34:41*sz0 quit (Quit: Connection closed for inactivity)
00:38:59*Tanger quit (Remote host closed the connection)
00:43:15*vqrs quit (Ping timeout: 272 seconds)
00:49:47FromDiscord<ElegantBeef> try `s[3][1][0].getImpl`
00:50:21*vqrs joined #nim
00:50:50FromDiscord<ElegantBeef> Ah sorry on that procdef
00:51:55FromDiscord<ElegantBeef> Ah it's actually `getType`
00:52:02FromDiscord<ElegantBeef> I'm good at programming trust me 😄
00:57:11*Vladar quit (Quit: Leaving)
01:13:08*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:13:31*njoseph joined #nim
01:16:18*Tanger joined #nim
01:36:18*abm quit (Quit: Leaving)
01:43:25*a_chou joined #nim
01:54:51*j-james joined #nim
02:00:10*j-james quit (Quit: WeeChat 3.0)
02:24:28FromGitter<redblack3_gitlab> Ah awesome, thanks! I believe you haha
02:27:16FromDiscord<garett> sent a long message, see http://ix.io/2PGD
02:27:49FromDiscord<garett> In the second case, I can see -lgdi32 in the linker invocation when I turn up the verbosity
02:30:11FromDiscord<garett> Not sure if this is a bug in the nim compiler, or just a misunderstanding on my part.
02:33:32*blueberrypie quit (Quit: leaving)
02:34:11*blueberrypie joined #nim
02:38:03FromDiscord<garett> Hah, nevermind, I found my bug 🙂
02:38:37FromDiscord<garett> Note to future self: If the code you think is compiling is not doing what you expect, maybe you're not compiling the code you think you're compiling
02:38:38*asdflkj_ quit (Ping timeout: 272 seconds)
02:40:16FromDiscord<Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2PGF
02:40:16FromDiscord<Anonymous Poet> just trying to print out the commandline args :/
02:41:38FromDiscord<ElegantBeef> you know you can just `echo commandLineParams()`?
02:42:01FromDiscord<ElegantBeef> Unless you want them all on newlines and not in `@[]`
02:42:31Prestigeman that's cool
02:42:31FromDiscord<Anonymous Poet> 😦
02:42:35FromDiscord<Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2PGH
02:42:43FromDiscord<ElegantBeef> You didnt invoke command line pararms
02:42:45FromDiscord<ElegantBeef> (edit) "pararms" => "params"
02:42:50FromDiscord<ElegantBeef> It's a function
02:42:56FromDiscord<Anonymous Poet> rip me
02:43:02FromDiscord<Anonymous Poet> you're right, thank you
02:43:16FromDiscord<Anonymous Poet> i thought UFCS would "just know" but i guess not
02:43:30FromDiscord<Anonymous Poet> what is the rule for when it's necessary to add parens?
02:44:14FromDiscord<ElegantBeef> Well the issue there is you just used the name of a procedure, which is valid syntax since you can assign values to that and have pointer procedures
02:44:20FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#procedures-method-call-syntax
02:44:35FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax
02:44:45FromDiscord<Anonymous Poet> also, as a curiosity, this still doesn't work `echo commandLineParams().map($)`
02:44:51FromDiscord<Anonymous Poet> `Error: expression expected, but found ')'`
02:44:54FromDiscord<Anonymous Poet> but ty
02:45:06FromDiscord<ElegantBeef> Backticks on $
02:45:17FromDiscord<ElegantBeef> you need to strop it or it thinks it's an operator
02:45:21FromDiscord<Anonymous Poet> `Error: '$' cannot be passed to a procvar`
02:45:39FromDiscord<ElegantBeef> Yep, it's a magic and cannot be passed that way 😄
02:46:34FromDiscord<ElegantBeef> Also worth noting the return type of `commandLineParams` is a `seq[string]`
02:46:47FromDiscord<Anonymous Poet> i think its still tainted string
02:46:58FromDiscord<ElegantBeef> That's just a string alias in most cases
02:47:07FromDiscord<ElegantBeef> Think you need a specific flag to tell the compiler otherwise
02:47:52FromDiscord<Anonymous Poet> ahh, good to know
02:47:54FromDiscord<Anonymous Poet> ty ty
02:49:12FromDiscord<ElegantBeef> Prestige what's cool?
02:49:51Prestigeecho commandLineParams()
02:51:04FromDiscord<exelotl> Silly question but what's the easiest way to get the inversion of a set?
02:51:19FromDiscord<exelotl> i.e. bitwise not
02:52:11FromDiscord<ElegantBeef> wouldnt `yourSet - {}` do that?
02:53:07FromDiscord<ElegantBeef> Nope i'm dumb and wrong 😄
02:53:23FromDiscord<exelotl> I read that as 'everything in yourset that's not in {}'
02:53:47FromDiscord<ElegantBeef> sorry it's `fullSet - yourset` right?
02:54:11FromDiscord<exelotl> Ah that sounds promising
02:54:15FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2PGL
02:54:26FromDiscord<ElegantBeef> Seems to work
02:59:23FromDiscord<exelotl> I guess I have to do it that way. I'm tempted to use `not cast[uint16](mySet)` but that will flip bits that aren't part of the set, making equality checks possibly fail
02:59:37*xace quit (Ping timeout: 265 seconds)
03:00:50FromDiscord<ElegantBeef> Meanwhile i'm pondering if it makes sense to make this an inclusion in the stdlib 😄
03:01:13FromDiscord<exelotl> Haha possibly x)
03:01:36FromDiscord<exelotl> Unary minus perhaps?
03:01:47FromDiscord<ElegantBeef> `.invert` 😛
03:02:39FromDiscord<exelotl> Also decent I guess :)
03:03:13FromDiscord<ElegantBeef> I prefer words for things like that
03:06:41FromDiscord<ElegantBeef> Hey a proper impl https://play.nim-lang.org/#ix=2PGS
03:09:15FromDiscord<ElegantBeef> Sadly though think the end point of this would be in `setutils` instead of directly in the stdlib
03:22:14saemNo name fits: yeah, that's the course.
03:51:16*xace joined #nim
04:01:45*xace quit (Ping timeout: 264 seconds)
04:02:56*xace joined #nim
04:08:05*xace quit (Ping timeout: 240 seconds)
04:30:14*watzon joined #nim
04:41:00*spiderstew_ joined #nim
04:42:04*spiderstew quit (Ping timeout: 240 seconds)
04:48:00FromDiscord<Gaz> Can I use pointers in nim to change the value of something in a text file?
04:49:12FromDiscord<Gaz> If yes how would I go about doing this
04:53:37FromDiscord<ElegantBeef> You need the file in memory to change the value at a specific position afaik
04:54:04FromDiscord<ElegantBeef> So you'd read the file then modify then write it
04:56:35*Cthalupa quit (Ping timeout: 256 seconds)
05:13:02*Cthalupa joined #nim
05:17:25*Cthalupa quit (Ping timeout: 240 seconds)
05:19:30*Cthalupa joined #nim
05:30:46*wasted_youth2 quit (Quit: Leaving)
05:31:28*waleee-cl quit (Quit: Connection closed for inactivity)
05:44:57*Cthalupa quit (Ping timeout: 264 seconds)
05:46:34*Cthalupa joined #nim
06:00:10*xace joined #nim
06:22:36*a_chou quit (Quit: a_chou)
06:26:38*Tanger quit (Ping timeout: 272 seconds)
06:37:39*Tanger joined #nim
06:38:28*Tanger quit (Remote host closed the connection)
06:39:15*Tanger joined #nim
06:43:44*xace quit (Ping timeout: 272 seconds)
06:48:29FromDiscord<Gaz> Well I managed to do what I wanted @ElegantBeef I dont know if I did it the right way so I will post my code here in ~15 mins
06:54:03*narimiran joined #nim
06:58:30FromDiscord<Gaz> https://hatebin.com/qpwjprcclv
06:58:41FromDiscord<Gaz> Recommendations and comments are welcome
06:59:04FromDiscord<Rika> will look
07:00:52FromDiscord<Rika> `readLineFromStdin` can be `stdin.readLine`, dont know why you did that
07:01:19FromDiscord<ElegantBeef> that prints out `"Enter New Username: "`
07:02:00FromDiscord<Rika> ah thats true, it also prints
07:02:08FromDiscord<Rika> but thats a long name for such
07:02:18FromDiscord<Rika> prolly just do like python and name it `input1
07:02:19FromDiscord<Rika> (edit) "`input1" => "`input`"
07:02:33FromDiscord<ElegantBeef> I mean it's in the stdlib so feel free to attempt to rename it 😄
07:02:42ForumUpdaterBotNew thread by Halloleo: How to access command line parameters under the JS backend, see https://forum.nim-lang.org/t/7519
07:02:57FromDiscord<Rika> i dont see why you need the pointer
07:03:16FromDiscord<Rika> just change username?
07:03:38FromDiscord<ElegantBeef> Instead of `execCmd "clear"` use `terminal.clearScreen`
07:04:38FromDiscord<ElegantBeef> Yea the is silly have the `changeUsername` take a `name: var string`
07:04:47FromDiscord<ElegantBeef> Or just touch the global variable
07:05:24FromDiscord<Rika> the is
07:05:25FromDiscord<Rika> 😛
07:05:52FromDiscord<ElegantBeef> the `defer` is not needed either, you can just `f.close()`
07:06:05FromDiscord<ElegantBeef> Yea yea rika, ptr's escape everyone even my sentences
07:06:09FromDiscord<Rika> i mean its fine to use defer
07:06:15FromDiscord<Rika> it can be better sometimes
07:06:35FromDiscord<ElegantBeef> Considering they're moving defer down where there isnt any file calls anymore
07:06:58FromDiscord<ElegantBeef> isnt defer supposed to be used after opening the file so you dont have to worry about it?
07:07:15FromDiscord<Rika> well then tell them to use it properly instead 😛
07:07:56FromDiscord<ElegantBeef> Well fine, defer adds it's body after all the statements that follow it, so you want to move that to the line after opening
07:09:01FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2PHF
07:09:29*xace joined #nim
07:10:23FromDiscord<ElegantBeef> In change username you actually never even use that opened file
07:10:44FromDiscord<ElegantBeef> you use the `writeFile` proc which opens the file and writes to it, and closes it
07:11:29FromDiscord<ElegantBeef> Anything else rika? 😛
07:11:50FromDiscord<Rika> lmao
07:12:35FromDiscord<ElegantBeef> The real thing is let's hope they like all of what we've said and dont just get angry for us "ragging on them"
07:13:20FromDiscord<Rika> xd
07:13:58*xace quit (Ping timeout: 260 seconds)
07:16:24*xace joined #nim
07:25:22FromDiscord<Gaz> Oh I'm not angry
07:25:30FromDiscord<Gaz> I am trying to improve
07:25:58FromDiscord<slymilano> Hi guys, I started this project with the hope that it helps people new to Nim. I love the language and hope it get more mindshare, making it very easy to start should help in that regard. This is my little grain of sand. https://github.com/sergiotapia/nimlings
07:26:02FromDiscord<Gaz> In reply to @Rika "i dont see why": As for the pointer I just wanted some practice using pointers
07:28:25*xace quit (Ping timeout: 240 seconds)
07:30:25FromDiscord<ElegantBeef> @slymilano nice, if you add more projects certainly should throw it on the monthly nim blog 😄
07:30:33FromDiscord<Rika> looks interesting sly
07:30:47FromDiscord<ElegantBeef> It's a good way to understand compiler error messages
07:31:17FromDiscord<Gaz> I think I will use defer since its more commonly used in the docs and tuts and rika said it can be better
07:31:33FromDiscord<ElegantBeef> Well you have to use it properly though
07:31:54FromDiscord<Gaz> So where should my defers be
07:32:16FromDiscord<Gaz> Cause I thought you are supposed to place them after all commands involving files
07:32:17FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2PHK
07:32:39FromDiscord<Rika> you dont
07:32:53FromDiscord<ElegantBeef> Nope defer moves all things below defer into a try finally block
07:33:00FromDiscord<Rika> i have to go actually i have like 2 hours to set up a webserver so
07:33:46FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2PHL
07:33:50FromDiscord<Gaz> Mhm...
07:34:08*haxscramper joined #nim
07:34:08FromDiscord<Gaz> Now as for the terminal.clearScreen how does that work
07:34:15FromDiscord<Gaz> I tried googling it
07:34:20FromDiscord<ElegantBeef> Dont google, use the docs
07:34:24FromDiscord<Gaz> Ok
07:34:26FromDiscord<Rika> https://nim-lang.org/docs/terminal.html
07:34:46FromDiscord<ElegantBeef> Nim is too obscure for search engines to give good results
07:35:01FromDiscord<ElegantBeef> Both the name and the users
07:35:35FromDiscord<ElegantBeef> If you type in anything CS related and nim 9/10 you'll get someone attempting to implement the game of nim near the top 😄
07:36:41FromDiscord<Rika> Nim, from Wikipedia, the free Encyclopedia
07:36:51FromDiscord<Rika> Nim is a mathematical game of strategy in which two players take turns removing (or "nimming") objects from distinct heaps or piles.
07:36:54FromDiscord<Rika> sorry ill stop
07:36:55FromDiscord<Rika> xd
07:37:09*PMunch joined #nim
07:37:22FromDiscord<ElegantBeef> Rust has similar issues, due to the popular game
07:37:33FromDiscord<Gaz> So whens a good time to use pointers in Nim
07:37:37FromDiscord<ElegantBeef> Never
07:37:51FromDiscord<ElegantBeef> If writing pure nim you dont need them, we have safer methods
07:37:53FromDiscord<Rika> when you must
07:37:59FromDiscord<Rika> aka c interop
07:38:12FromDiscord<Rika> otherwise you have to have very specific needs to use a ptr instead of a ref
07:38:30FromDiscord<ElegantBeef> We have `ref`, `var`, and `lent` all of which give you safer managed options
07:39:53FromDiscord<Gaz> Thanks boys
07:40:13FromDiscord<slymilano> use `nimlang`
07:40:15FromDiscord<slymilano> not just `nim`
07:40:34FromDiscord<ElegantBeef> There are also experimental view types which give you borrowed memory access akin to a pointer, but with borrow checking
07:40:43FromDiscord<ElegantBeef> Yea i know sly, still i tend to just use the index/docs
07:40:58FromDiscord<ElegantBeef> This is dead simple but very effective↵https://nim-lang.org/docs/theindex.html
07:41:27FromDiscord<Gaz> Although I am finding third party stuff about nim
07:41:35FromDiscord<Gaz> If I look hard enough
07:50:31*xace joined #nim
07:52:45*fputs quit (Ping timeout: 240 seconds)
07:53:15FromDiscord<ElegantBeef> @slymilano I assume it's rather early for that repo, but consider a project for planning so others can contribute to the excersizes making it easier on you and quicker to get it usable
07:54:42FromDiscord<ElegantBeef> I imagine it can be as simple as "Make a nil ref error", "Have an unimplemented method", "Incorrect Option/tuple unpacking"
07:55:05*xace quit (Ping timeout: 256 seconds)
07:57:54FromDiscord<ElegantBeef> Suppose those could be issues aswell
08:01:10FromDiscord<slymilano> thats a good suggestion i'll think about adding it once i have more exercises up
08:07:54FromDiscord<Rika> then the boss error should be a massive macro error xddd i kid
08:10:25PMunchAre you trying to teach people how to create errors?
08:11:50*xace joined #nim
08:13:26FromDiscord<haxscramper> zig has something similar https://github.com/ratfactor/ziglings
08:14:09FromDiscord<haxscramper> HN discussion on this one seemed generally positive overall
08:19:36PMunchYeah it sounds like a cool idea
08:23:16FromDiscord<ElegantBeef> If you dont know how to make an error in a macro do you even know how to make an error?
08:24:16*xace quit (Ping timeout: 240 seconds)
08:29:35*kenran joined #nim
08:39:30*xace joined #nim
08:47:14*dv^_^9691 quit (Ping timeout: 272 seconds)
08:48:20*Tanger quit (Quit: Leaving)
08:49:47PMunch!eval echo cast[ptr int](nil)[]
08:49:50NimBotTraceback (most recent call last)↵/usercode/in.nim(1) in↵SIGSEGV: Illegal storage access. (Attempt to read from nil?)
08:57:26FromGitter<StefanSalewski> Unfortunately we have lost Adam Dingle (the one from the bacon paper) to Python: https://github.com/StefanSalewski/gintro/issues/106#issuecomment-774691132
08:57:34FromGitter<StefanSalewski> > A key difference is that assignment in Nim means copying, like in C and C++. I definitely want a language where assignment instead means making another reference to the same object, like in C#, Java, and Python.
08:57:39FromGitter<StefanSalewski> Strange.
08:57:52FromDiscord<ElegantBeef> The string that got emitted on the discord side for that message pmunch confused the fuck outta me was "castptr int[]"
08:58:26FromDiscord<ElegantBeef> Is using `ref object` that hard?
08:58:48FromGitter<timotheecour> this is what `var a {.byaddr.} = expr` is for
08:59:59FromDiscord<ElegantBeef> Well byaddr might get tedious
09:00:29*dv^_^9691 joined #nim
09:04:28FromGitter<timotheecour> there’s a way to define `let a = expr.byAddr` too, with some compiler magic; it’d make it easier to use.
09:04:32*kenran quit (Read error: Connection reset by peer)
09:04:44FromDiscord<ElegantBeef> yea that'd be ideal
09:05:22FromDiscord<ElegantBeef> I assume a `set[T].invert` should be added to `setutils` and not the system module eh?
09:05:45FromGitter<timotheecour> indeed (and “obviously” :) )
09:06:20FromDiscord<ElegantBeef> Well idk like my initial PR i'm a numpty that thinks first class types should get first class operations 😄
09:06:45FromGitter<timotheecour> the name may need to be bikeshedded (`complement` ? `not` ? etc)
09:07:11FromDiscord<ElegantBeef> exelotl suggested a unary `-` but that's way to non-descript
09:08:01FromGitter<timotheecour> there’s no benefit to adding to system.nim; importing is cheap and doesn’t pollute namespace
09:09:49FromDiscord<ElegantBeef> Yea i agree, main reason to put it in the global imports is for accessibility of new people but if that was a main concern modules wouldnt exist 😛
09:10:42*kenran joined #nim
09:14:52PMunch`not` seems the most obvious to me, as it is similar to binary not
09:16:07FromDiscord<ElegantBeef> Seems the most sensible, not overly wordy and pretty self explanatory
09:17:31PMunchAnd I agree that it should be put in system along with the other `set` stuff
09:18:10PMunchSeems silly to have a setutils module with nothing but a `not` operator in it..
09:18:19FromDiscord<ElegantBeef> It has `toSet`
09:19:03Oddmongerseq elements are not counted on a sizeof ? Only the «seq» itself is counted ? (like the sizeof in C ?)
09:19:27FromDiscord<ElegantBeef> well seqs are just a pointer + len
09:19:29FromGitter<timotheecour> the point of setutils is it can grow without affecting all modules (which implicitly import system)
09:19:58FromDiscord<Rika> In reply to @StefanSalewski "> A key difference": sounds like something we can convince is different
09:20:44Oddmongeri was wondering using seq for each element in a game with million elements
09:21:06Oddmongerthere will be empty elements, so using an array would be waste of space
09:21:37Oddmongerhttps://play.nim-lang.org/#ix=2PIg
09:22:24Oddmongeri won't need more than 4 elements per cell, with 16 bit value, so an array could be a good bet, though
09:23:38FromDiscord<ElegantBeef> Well a seq will always be that size, arrays can be smaller
09:26:01FromDiscord<enimatek> ah, in homebrew you can just do `brew edit nim` add the _v1 to the csources and it works 🙂
09:35:00FromDiscord<Clyybber> In reply to @ElegantBeef "Meanwhile i'm pondering if": I thought a more general way would he to provide a universe for a set type
09:35:07FromDiscord<Clyybber> which would just be the full set
09:35:27FromDiscord<ElegantBeef> What?
09:36:20FromDiscord<ElegantBeef> I assume that was a joke, but i can never be to certain
09:36:23FromDiscord<ElegantBeef> (edit) "to" => "too"
09:36:27FromDiscord<Clyybber> a macro or magic thats equivalent/expands to {true, false} for bool for example
09:36:37FromDiscord<Clyybber> In reply to @ElegantBeef "I assume that was": lol, I was serious
09:36:52FromDiscord<ElegantBeef> well that's just `T.low..T.high`
09:37:11FromDiscord<Clyybber> no
09:37:19FromDiscord<Clyybber> because holes
09:37:36FromDiscord<Clyybber> oh, well hmm those shouldnt matter I guess?
09:37:39FromDiscord<Varriount> In reply to @Clyybber "a macro or magic": Yes, by all means, let's add more miscellaneous errata to the standard library.
09:37:59FromDiscord<ElegantBeef> I do not know how holes work with sets
09:38:36FromDiscord<ElegantBeef> But dont use sets with a holey type, we arent all christians no need to believe in the holy
09:40:27FromDiscord<ElegantBeef> As expected a bunch of invalidi data
09:40:29FromDiscord<ElegantBeef> (edit) "invalidi" => "invalid"
09:42:33FromDiscord<ElegantBeef> Considering sets are used with contains or not contains i dont think the holes are causing any issue though right?
09:42:46*Tanger joined #nim
09:47:21FromDiscord<ElegantBeef> Though i suppose it doesnt hurt to make a `fullSet` template, and put it in setutils, but would like comments on if that's dumb 😄
09:49:03FromDiscord<Clyybber> if at all it would belong in setutils yeah
09:49:32FromDiscord<ElegantBeef> I more mean if the `fullSet` is dumb, and a more apt name 😄
09:49:53FromDiscord<Clyybber> but not should suffice
09:49:59FromDiscord<Clyybber> just not the empty set
09:50:16FromDiscord<Varriount> What would this template do?
09:50:26FromDiscord<Clyybber> need to make sure that holy sets properly ignore the unused buts
09:50:32FromDiscord<Clyybber> (edit) "buts" => "bits"
09:50:58FromDiscord<ElegantBeef> Well not'ing an empty doesnt remove the redundant bits
09:51:02FromDiscord<Clyybber> In reply to @Varriount "What would this template": you would give it a set type and it would give you the set containing all elements
09:51:42FromDiscord<ElegantBeef> The issue is clyyber as you pointed out my large set is all bits even invalid that are in the range for holy sets 😄
09:51:44FromDiscord<Varriount> When would you need a set containing all possible elements?
09:51:55FromDiscord<Varriount> Why wouldn't you just use a range?
09:51:56FromDiscord<ElegantBeef> To invert the other set
09:52:39FromDiscord<Varriount> So why wouldn't you loop over the other set and create an inverted version right there?
09:52:53FromDiscord<ElegantBeef> You need a mask of only the valid values to flip it using `-` atleast
09:53:05FromDiscord<Varriount> When do you need to invert a set?
09:53:12FromDiscord<ElegantBeef> exelotl needed to earlier today
09:53:28FromDiscord<Varriount> Has anyone else needed to?
09:53:51FromDiscord<ElegantBeef> No clue
09:54:10FromDiscord<Clyybber> In reply to @Varriount "Has anyone else needed": yeah it comes up once in a while
09:54:25FromDiscord<Clyybber> but really not is probably a better idea
09:54:40FromDiscord<ElegantBeef> Well i need to generate that full set regardless with `not`
09:54:51FromDiscord<ElegantBeef> So it'll be internalized at the very most
09:54:54FromDiscord<Clyybber> and by handling the unused bits of holy enums I meant handling them correctly when converting to something else
09:55:01FromDiscord<Clyybber> not during the set operations
09:55:16FromDiscord<ElegantBeef> Well that's why i need `fullSet` so only the valid options are flipped in the `not` operation
09:55:24FromDiscord<Clyybber> no
09:55:45FromDiscord<Clyybber> not if the conversions from set -> something else are handling it
09:55:45*Vladar joined #nim
09:55:52FromDiscord<Clyybber> then its just a binary not
09:55:59FromDiscord<Clyybber> which is best since its also faster
09:56:30FromDiscord<ElegantBeef> Well you're limited to 64 values no?
09:56:51FromDiscord<ElegantBeef> Unless you generate an array to do the value using the size of the enum i guess
09:57:25FromDiscord<ElegantBeef> Remember that Nim's sets are at most 2^16 bits iirc
09:57:42FromDiscord<Clyybber> I dont see how thats related :p
09:57:59FromDiscord<ElegantBeef> Well i dont know how you binary not something that large whilst ensuring all values are valid
09:58:19FromDiscord<Clyybber> you dont need to ensure anything
09:58:45FromDiscord<Clyybber> you just need to ensure that the unused bits are not leaking out of the set abstraction
09:59:17FromDiscord<ElegantBeef> Yep out of my paygrade
10:00:11FromDiscord<Clyybber> but it gets tricky when passing holy sets to C libraries
10:01:12FromDiscord<ElegantBeef> Yea if you dont look at a holy set it's fine, but if you echo it or you cast it to an int it's evident it's wrong
10:01:37FromDiscord<Clyybber> yeah
10:06:07*aeverr joined #nim
10:17:11*kenran quit (Quit: leaving)
10:22:03*filcuc joined #nim
10:34:41FromDiscord<arnetheduck> whoa, the time constructor takes the day of the month first 😱 : https://nim-lang.org/docs/times.html#initDateTime%2CMonthdayRange%2CMonth%2Cint%2CHourRange%2CMinuteRange%2CSecondRange%2CNanosecondRange%2CTimezone
10:35:33liblq-devthis ain't america sir
10:35:44FromDiscord<ElegantBeef> It's a miracle proper time 😄
10:36:05filcucwell is ok fine in europe i think...
10:36:13filcucok/fine
10:36:38FromDiscord<ElegantBeef> Well it's d/m/y which is standard everywhere but the US pretty much
10:36:51FromDiscord<ElegantBeef> @Clyybber feel free to go complain about my code now https://github.com/nim-lang/Nim/pull/17066 😛
10:36:54FromDiscord<ElegantBeef> I sleep now
10:38:45liblq-devnight
10:40:07Clonkk[m]4
10:40:13Clonkk[m]44444444444455555555555555555547444444444444444444444444444444444444444444
10:40:39*abm joined #nim
10:42:24Clonkk[m]65565(-èè-6è--èèèèèèèèèèè_èèèèèèèèèèèèèèèèèè_èèèèèèèèèuuy__è_è_u_u_çi_èuuuu__u___uuuuuu_èyyè__uè__uu
10:42:25Clonkk[m]yu
10:44:15FromDiscord<Clyybber> @ElegantBeef good night
10:45:51PMunchClonkk[m], you alright?
10:46:04Clonkk[m]Coffee on laptop
10:46:13Clonkk[m]😕
10:46:21PMunchOuch
10:46:28Clonkk[m]Was cleaning it ^
10:46:38FromDiscord<arnetheduck> err.. year should be first? I mean year-month-day-hour-minute-second, there's a pattern there, which is why, er.. it's an international standard used in engineering?
10:49:38*filcuc_ joined #nim
10:52:17OddmongerClonkk[m]: azerty ?
10:52:45Clonkk[m]yup
10:53:03*filcuc quit (Ping timeout: 272 seconds)
10:53:13Clonkk[m]gotta make your finger work to write backtick and {
10:53:26PMunchWhere are those on AZERTY?
10:53:43Oddmongerfrench people
10:54:07Oddmongerah excuse me
10:54:14PMunchHaha, yeah I know who uses it
10:54:20PMunchI lived in Belgium for a year
10:54:25Oddmongermisread. The keys «impacted» are on the right
10:54:29PMunchNever could get used to having numbers as secondary
10:55:09Clonkk[m]The worst part i that I have both azerty and qwerty keyboard so i'm switching constantly
10:55:27PMunchDvorak master race
10:55:27Clonkk[m]Depending on the computer I use
10:55:51Oddmongeri use bépo on a german keyboard
10:57:02Clonkk[m]Bepo / Dvorak are good and all, but not having to bring your own keyboard whenever you go is also practical 😛
10:57:34Oddmongeri can type on azerty (with two fingers, like the cops)
11:02:23PMunchI can type just fine on QWERTY once I get warmed up to it
11:02:33PMunchBut it's always a bit rough in the switch
11:06:08Clonkk[m]Isn't Dvorak hard to use with Vim though ?
11:08:38PMunchDepends
11:08:43PMunchI have a lot of things rebound
11:31:54*Cthalupa quit (Ping timeout: 272 seconds)
11:32:38*Cthalupa joined #nim
11:35:58*teasea quit (Quit: teasea)
11:37:54*teasea joined #nim
11:52:49vindaar[m]Neo master race if anything
11:57:03*liblq-devel joined #nim
11:57:03*liblq-devel quit (Client Quit)
11:57:10FromDiscord<JoeMan> helloooo
11:57:15PMunchHello
11:57:40FromDiscord<JoeMan> when i was searching for programming languages like python but also fast
11:57:46FromDiscord<JoeMan> i found this programming language
11:58:10PMunchSounds about right
11:58:14FromDiscord<JoeMan> should i read the nim-basics pdf?
11:58:43PMunchWell, it's mostly geared towards people with minimal programming experience
11:58:52PMunchSo it might be a bit terse if you're already familiar with programming
11:59:16FromDiscord<JoeMan> oh okay
11:59:36FromDiscord<haxscramper> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers and https://nim-lang.org/learn.html
11:59:44PMunchOf course this also means it's quite thorough
11:59:53FromDiscord<JoeMan> okay
11:59:58FromDiscord<haxscramper> First one is feature-by-feature comparison, second is a collection of longs for various tutorials etc.
12:00:58FromDiscord<JoeMan> there is so much more programming languages than I thought
12:02:16FromDiscord<zetashift> Any emacers know how to disable nimsuggest in nim-mode?
12:03:35PMunchTIL you can define tuples like this: https://play.nim-lang.org/#ix=2PJ9
12:04:58PMunchIf you are very familiar with programming then this might be helpful: https://learnxinyminutes.com/docs/nim/
12:05:57FromDiscord<zetashift> huh TIL
12:06:36FromDiscord<JoeMan> It seems I have gotten an error
12:07:14PMunchWell that was quick :
12:07:27FromDiscord<mratsim> btw, should we create a "needed-tutorials" to mirror the "needed-libraries"?
12:07:51PMunchThat might be useful
12:07:54FromDiscord<mratsim> For example someone asked me about using a state machine for UI but I think using async for UI would be more idiomatic.
12:08:29FromDiscord<JoeMan> do i need the gcc compiler to run nim?
12:08:53PMunchWell, you need a C compiler, not necessarily GCC
12:09:07PMunchWhat OS are you using?
12:09:18FromDiscord<JoeMan> windows 8
12:10:09FromDiscord<JoeMan> codeblocks has a c compiler right?
12:10:31PMunchWell that just gave me more questions :P But if you run `finish.exe` in the zip you have it will install MinGW for you
12:10:44FromDiscord<JoeMan> ohhh
12:14:35FromDiscord<JoeMan> I also found this discord on a 3 year old forum post
12:19:48PMunchIt's also listed on the frontpage of the website: https://nim-lang.org/community.html
12:20:10PMunchWith a link to that page, although there is not link in the navigation bar to it..
12:23:32FromDiscord<JoeMan>
12:27:35FromDiscord<Clyybber> TIL that --gc:stack was a thing
12:28:30*Vladar quit (Quit: Leaving)
12:28:38FromDiscord<Clyybber> ah, it was the precursor of gc:regions
12:29:23FromDiscord<KSun> Hey guys, which of the 3 VSCode extensions for Nim is the correct, or most up-to-date one?
12:29:42FromDiscord<Rika> The one by saem
12:30:14FromDiscord<KSun> Thanks Rika
12:31:22*haxscramper quit (Remote host closed the connection)
12:32:37*haxscramper joined #nim
12:39:30*wasted_youth2 joined #nim
12:46:37PMunchHmm, illwill seems to not properly support non-fullscreen stuff
12:46:42PMunchAny other similar libraries out there?
12:50:14*haxscramper quit (Remote host closed the connection)
12:50:50*haxscramper joined #nim
12:52:55*hallou joined #nim
12:53:08*aeverr left #nim ("Konversation terminated!")
12:53:35*hallou left #nim (#nim)
12:53:44FromDiscord<Clyybber> PMunch: WDYM with non-fullscreen?
12:54:09PMunchWell basically I want to create a simple spreadsheet style thing
12:54:16PMunchBut I don't want it to be fullscreen
12:54:54PMunchWhen you run it it should only show a single line with a single cell. Then you have to move right/down to create more cells and rows
12:55:24PMunchIf you move back up without having input any data it will erase the lines as you go
12:55:26FromDiscord<Clyybber> Ah, and it should not use the alternate terminal buffer?
12:57:30FromDiscord<Clyybber> Or does that not matter?
12:59:01PMunchAlternate terminal buffer?
12:59:45FromDiscord<Clyybber> It's a second buffer for your terminal, which illwill uses I think, because then you can easily restore the original contents once the application exits
13:00:51FromDiscord<Clyybber> PMunch: But what I was asking basically is, if you want it to behave like cat, in the sense that while using it, you can still see the commands you previously executed
13:02:53FromDiscord<Clyybber> thats what I understood as "non-fullscreen stuff"
13:02:58PMunchYes
13:04:12FromDiscord<Clyybber> hmm, what doesn't work with illwill with fullscreen = false?
13:04:59PMunchNo it still draws at 0, 0
13:05:11PMunchIt does setCursor(0, 0)
13:05:23PMunchWhen you draw a buffer
13:05:55PMunchI tried creating a small buffer and starting illwill with fullscreen = false and it just drew in the top left corner
13:06:26*NimBot joined #nim
13:08:01FromDiscord<KSun> Any know if there is a repo for the nim-lang.org/docs/ ?
13:09:25PMunchIt's in the main repo: https://github.com/nim-lang/Nim/tree/devel/doc
13:09:50PMunchAnd module documentation is generated by `nim doc`
13:10:05FromDiscord<KSun> Thank you
13:10:16FromDiscord<KSun> I couldn't find it in the website repo, got lost.
13:11:04FromDiscord<flywind> The devel docs even have edit and source button.
13:11:05FromDiscord<flywind> https://nim-lang.github.io/Nim
13:11:19FromDiscord<flywind> https://nim-lang.github.io/Nim/tut1.html
13:11:58FromDiscord<Clyybber> PMunch: Looking at https://github.com/junegunn/fzf/commit/95f8650455b2c01181fb355b696ed88fbaaaa6f3 at least ncurses and tcell should support that
13:13:35ForumUpdaterBotNew thread by Mrhdias: How to kill a process and all of its descendants in Nim?, see https://forum.nim-lang.org/t/7520
13:14:44PMunchHmm
13:16:03*cornfeedhobo quit (Ping timeout: 260 seconds)
13:18:47*xet7_ is now known as xet7
13:26:55PMunch@Clybber, this is what I want to do: https://asciinema.org/a/96edvgQ8FzfV04m1FRIANRjVw
13:30:03PMunchThe code I threw together for that though is super hacky :P
13:30:38PMunchIn case you're curious: http://ix.io/2PJz
13:34:32FromDiscord<Clyybber> PMunch: My only question is: what kind of cursed keyboard layout do you use haha ;D
13:35:44PMunchHaha, Dvorak, why?
13:36:02PMunchOh, the ABCD to move around stuff?
13:36:35PMunchThat's what I meant by hacky :P
13:36:58FromDiscord<Clyybber> ooh, wait you are parsing the sequences :D
13:37:08PMunchNot really parsing them :P
13:37:47FromDiscord<Clyybber> yeah :D some terminals put an O before the A B C D so I guess thats where it would break
13:37:50PMunchIt's just ^[[A, ^[[B, ^[[C, and ^[[D for the cursor buttons
13:38:08PMunchAnd I just don't care about the Esc-[ part of that sequence
13:38:26PMunchThat's why I only allow 'a'..'z' to be input into fields :P
13:39:28FromDiscord<Clyybber> ah, right
13:40:55PMunchTold you it was hacky!
13:50:08*waleee-cl joined #nim
13:55:06PMunchTBH it will probably be easier to just write it myself
14:01:59*asdflkj_ joined #nim
14:11:44FromDiscord<exelotl> Sooo adding close-able sections in parsecfg...
14:11:49FromDiscord<exelotl> https://play.nim-lang.org/#ix=2PJS
14:11:59FromDiscord<exelotl> is this a good idea or a horrible hack? xD
14:16:30FromDiscord<exelotl> in my existing project I'm using includes & macros as a config
14:17:05FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2PJV
14:18:38FromDiscord<exelotl> but I'm trying to make something that's not just compile-time, and is more robust / good fit for a variety of projects
14:19:21Clonkk[m]Hmm I have a difference in behaviour when casting pointer to function pointer between C and Nim
14:19:47Clonkk[m]```
14:19:47Clonkk[m] var addMeBabyInt: (proc(a: cint, b: cint): cint) = cast[ptr (proc(a: cint, b: cint): cint)](fPtr)[]
14:19:47Clonkk[m]```
14:20:20Clonkk[m]fPtr is the result of calling a C function that works in pure C. I can't figure out the difference
14:21:17PMunch@Clonkk[m], please don't multi-line paste into IRC
14:22:13PMunch@Clonkk[m], what is the error?
14:22:15Clonkk[m]Erf, sorry I'm using Matrix; formatting looks fine here.
14:22:26Clonkk[m]Segmentation fault during function call
14:22:27PMunchIt might be something as simple as call conventions
14:22:40Clonkk[m]IF I use ARC it's a sigbus
14:23:53PMunchSee how it's done here: https://nim-lang.org/docs/dynlib.html#examples-loading-a-simple-c-function
14:24:08PMunchNo ptr, and the procedure is declared with gcsafe and stdcall
14:25:21YardanicoClonkk[m]: as PMunch said, you just cast fPtr to the proc type itself
14:25:26Yardanicobecause proc itself is a pointer already
14:27:27Clonkk[m]Ah okay proc type hides the pointer aspect. What is ``gcsafe, stdcall`` purpose ?
14:27:48Yardanicogcsafe if you want to specify that the proc is gcsafe
14:27:51Yardanicostdcall is the calling convention
14:28:38PMunchCalling convention is how the computer actually performs the function call in regards to pushing stuff on the stack and such
14:29:42Clonkk[m]Okay, thanks !
14:30:13Oddmongercannot remember (and find) what ord() do in nim… obviously, it returns a number but cannot remember the rules implied
14:31:01FromDiscord<Yardanico> it returns the int value of an ordinal type
14:31:18Clonkk[m]orc get the number value as integer of an enum or Ordinal type
14:31:21Oddmongerah sort of cast from a value ?
14:31:26liblq-devdon't use stdcall
14:31:27liblq-devuse cdecl
14:32:08Clonkk[m]<liblq-dev "use cdecl"> Got it ! What's the issue with stdcall ?
14:33:45liblq-devit's exclusive to windows
14:34:09liblq-devcdecl is the default C calling convention which should be what you want
14:35:04Clonkk[m]Okay, good to know. But FYI, stdcall worked on my Linux (but I agree using Windows specific notation is bad)
14:35:15Clonkk[m]So there's probably an indirection here somewhere
14:35:49PMunchProbably just forwarded to the compiler and promptly ignored
14:36:34Clonkk[m]Except without either ``cdecl`` or ``stdcall`` the compiler complain about the cast from pointer to proc
14:36:53Clonkk[m]So the compiler see ``stdcall``, allow the cast but then ignore it ?
14:36:57Clonkk[m]Weird
14:37:49liblq-devPMunch: `__stdcall` does not exist in gcc so Nim just doesn't emit code for it
14:37:55liblq-devso it's equivalent to cdecl
14:38:02PMunchAah, right
14:40:07Clonkk[m]An error message that mentions cdecl pragma when casting pointer to proc could be useful btw 😛. It's not trivial that you have to annotate the proc type with cdecl pragma to allow the cast from a pointer.
14:40:39*Clonkk[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/PSKKIjIGzPcZIFrVlciAoDDC/message.txt >
14:47:35liblq-devno no
14:47:42liblq-dev`proc` *is* a pointer in nim
14:48:38liblq-devso `var addMeBabyInt = cast[proc (a, b: cint): cint](fPtr)`
14:53:41*Vladar joined #nim
14:59:19*astronavt quit (Quit: ...)
15:01:16*astronavt joined #nim
15:23:48*superbia joined #nim
15:30:15*PMunch quit (Quit: leaving)
15:35:27FromDiscord<zetashift> @PMunch it might be overkill for a full on PR but for me your link `Toccatas novel boolean approach ` in https://github.com/PMunch/nim-optionsutils is broken because a github url is pasted in front of it?
15:58:25*superbia quit (Quit: WeeChat 3.0)
16:12:36*tane joined #nim
16:13:11*vicfred joined #nim
16:18:33*gmaggior joined #nim
16:19:35gmaggiorHi. Is there an alternative for the .projectile file in Windows? (because it is not a valid Windows filename)
16:20:05FromDiscord<Yardanico> wdym?
16:20:36FromDiscord<Yardanico> .gitignore is valid, but why .projectile is not?
16:20:58gmaggiorI v
16:21:19gmaggiorI cannot create a file with such name (extension)
16:21:56FromDiscord<Yardanico> try doing it from the cmd
16:22:01FromDiscord<Yardanico> from a terminal
16:22:59*a_b_m joined #nim
16:24:45gmaggiorFromDiscord, it worked! Thank you :)
16:25:56*abm quit (Ping timeout: 240 seconds)
16:27:07FromDiscord<Yardanico> i'm not FromDiscord :P
16:27:10FromDiscord<Yardanico> I'm "Yardanico"
16:27:31FromDiscord<Yardanico> FromDiscord is the bridge that transmits messages between Discord and IRC
16:29:22gmaggiorahh right. Sorry. Thanks (just joined irc quickly to ask this)
16:31:12FromDiscord<no name fits> I think it might just be an issue with creating the file via Windows Explorer. It works just fine from my editor
16:31:27FromDiscord<no name fits> I couldn't replicate the issue
16:34:40gmaggiorno name fits: yes I think so... just Windows Explorer file create
16:36:00ForumUpdaterBotNew thread by MerryMurray: Redis - how to select database, see https://forum.nim-lang.org/t/7521
16:42:46*AndChat|21441 joined #nim
16:44:43*gmaggior quit (Ping timeout: 260 seconds)
16:50:59*gmaggior joined #nim
16:52:59*AndChat|21441 quit (Ping timeout: 272 seconds)
16:56:27*AndChat|21441 joined #nim
16:57:47*gmaggior quit (Ping timeout: 260 seconds)
16:59:23*AndChat|21441 quit (Client Quit)
17:21:01*abm joined #nim
17:21:25*a_b_m quit (Ping timeout: 240 seconds)
17:22:46*aeverr joined #nim
17:25:25*letto quit (Quit: Konversation terminated!)
17:26:01*letto joined #nim
17:42:09ForumUpdaterBotNew thread by Roberthaba: Installation and configuration of the Nim language, see https://forum.nim-lang.org/t/7522
18:23:27*jess quit (Quit: updates)
18:25:26FromDiscord<Littleli> my appologies, I'm quite new to nim... I cannot find way how to initialize array of uint16 using literal syntax. Is it possible?
18:28:17sekao[m]Cast the first number in the array to uint16
18:29:02sekao[m]Like [1.uint16, 2, 3]
18:31:05FromDiscord<Littleli> Thank you! 🙂
18:43:11FromDiscord<mratsim> In reply to @Littleli "Thank you! 🙂": I find this more elegant: [uint16 1, 2, 3]
18:46:54vindaar[m]Can someone explain me how to get the CI with Github Actions working again on Windows after the recent SSL change? I saw Araq's post on the forum, but I don't get it / trying that yields another unhelpful error message :/
18:51:43leorize[m]are you using my setup-nim action?
18:56:33FromDiscord<Littleli> In reply to @mratsim "I find this more": nice 🙂
18:57:00FromDiscord<mratsim> @Vindaar https://github.com/mratsim/constantine/pull/157/files#diff-7915b9b726a397ae7ba6af7b9703633d21c031ebf21682f3ee7e6a4ec52837a5R233
18:59:40vindaar[m]@mratsim: yes, I saw the constantine PR. But since you're building Nim yourself it seems it doesn't apply. I still get this: https://github.com/Vindaar/ggplotnim/pull/109/checks?check_run_id=1911314590 (click on "Install dependencies (Windows)" if it doesn't open that).
18:59:40vindaar[m]"Unable to add file - 0x80070057" ok?
18:59:40vindaar[m]leorize: yes!
19:00:47FromDiscord<mratsim> normally the certificate is shipped in Nim dlls
19:01:03leorize[m]vindaar: then it's a bug in nightlies, I'll investigate later today
19:01:21FromDiscord<mratsim> I expect the certificate comes with these now: https://nim-lang.org/download/dlls.zip
19:01:40FromDiscord<zetashift> Is there a more idiomatic/nicer way to implement neighbors? https://play.nim-lang.org/#ix=2PLG
19:02:05vindaar[m]<leorize[m] "vindaar: then it's a bug in nigh"> Thanks!
19:02:26FromDiscord<dom96> I don't think certs get shipped
19:02:36FromDiscord<dom96> they should be loaded from the OS
19:02:43FromDiscord<mratsim> In reply to @zetashift "Is there a more": not sure what neigbor is but https://github.com/mratsim/golem-prime/blob/master/src/datatypes.nim#L155-L165
19:02:43leorize[m]vindaar: actually, can you try upgrading to [email protected] first?
19:03:13leorize[m]@dom96 they has to be shipped for Windows. We don't have cert store import yet
19:03:40vindaar[m]leorize: oh, didn't know there was a new version. Yup, trying now
19:04:09leorize[m]the readme also has how to setup update notification if you're interested
19:05:04vindaar[m]Still a bit overwhelmed with all this github actions stuff 🤭
19:05:11FromDiscord<zetashift> @mratsim ah neighbor is just another cell, I'll use an iterator!
19:05:42FromDiscord<mratsim> So they are prisoners?
19:07:59FromDiscord<zetashift> no just a cell in a grid with a x,y. Maybe prisoners might be a more sadistic metaphor though
19:08:04*cornfeedhobo joined #nim
19:09:45FromDiscord<mratsim> I was joking 😉
19:10:19FromDiscord<mratsim> In reply to @vindaar "Still a bit overwhelmed": Wait until you here about DOcker and Kubernetes
19:11:25FromDiscord<zetashift> In reply to @mratsim "I was joking 😉": I was thinking if it was a joke, but I guessed wrong at the end 😛
19:12:19FromDiscord<zetashift> Mhmhm, iterator might still be unhandy later on, I might use it outside of for loops
19:12:39FromDiscord<mratsim> for loop is life, forget about Haskell
19:13:26liblq-devfor lööps
19:13:39FromDiscord<zetashift> blasphemy!
19:13:50FromDiscord<zetashift> One may never forget about Haskell
19:14:09FromDiscord<zetashift> imma Monad all the thing
19:14:10FromDiscord<zetashift> d
19:14:23FromDiscord<zetashift> s damnit
19:14:59FromDiscord<dom96> In reply to @leorize "<@132595483838251008> they has to": that sucks :/
19:15:13vindaar[m]ok, turns out the problem really just was that the path to the Nim install was wrong :|
19:16:26leorize[m]the update fixed it?
19:18:47vindaar[m]oh no, nevermind what I just said. Still not working :)
19:18:56vindaar[m]Nope, the update also did nothing
19:21:10vindaar[m]<FromDiscord "<mratsim> In reply to @vindaar ""> I mean the underlying issue is just that there's all sorts of functionality that isn't well explained (well it might be, guess I'm just too lazy to properly read the docs) and a way too long feedback loop
19:22:23leorize[m]okay, then it's probably a nightlies bug
19:24:35vindaar[m]ok, just went the hardcoded path to output of setup-nim and now it /seems/ to be working
19:25:24vindaar[m]I will never understand why CIs do not show the full path from where commands are run. Makes it such a PITA to figure these things out
19:25:57leorize[m]<vindaar[m] "ok, just went the hardcoded path"> hmm?
19:26:14vindaar[m]https://github.com/Vindaar/ggplotnim/pull/109/commits/5cf003f8bb5b341ddcfa63ef628790754fb8bba6
19:26:48vindaar[m]I didn't realize that setup nim puts Nim into that directory
19:29:33leorize[m]I'll push an update to handle this certificate thing automatically later then
19:31:37vindaar[m]That'd be nice, thanks!
19:32:27leorize[m]wait, you shouldn't need it...
19:32:45leorize[m]maybe araq forgot to update windeps.zip, gotta investigate later
19:34:36leorize[m]nvm, I know exactly what's the issue...
19:35:36leorize[m]nightlies uses a cache to avoid redownloading of deps
19:36:22leorize[m]since windeps is not versioned, updates to it are ignored by nightlies
19:53:20*gmaggior joined #nim
19:58:07*vsantana joined #nim
19:59:56*letto quit (Remote host closed the connection)
20:03:43*letto joined #nim
20:20:03*sz0 joined #nim
20:20:51*Sembei quit (Remote host closed the connection)
20:40:41ForumUpdaterBotNew thread by User71383: Error: Closure iterators are not supported by JS backend!, see https://forum.nim-lang.org/t/7523
20:49:45*fosred joined #nim
20:59:22*haxscramper quit (Remote host closed the connection)
21:00:56*fosred quit (Quit: Leaving)
21:03:29*fosred joined #nim
21:04:21*fosred quit (Client Quit)
21:10:36*vsantana_1 joined #nim
21:12:05*fosred joined #nim
21:12:55*narimiran quit (Ping timeout: 265 seconds)
21:14:33*vsantana quit (Ping timeout: 272 seconds)
21:23:49*vsantana_1 quit (Quit: Leaving)
21:46:47*fosred quit (Quit: Leaving)
21:51:11FromDiscord<xCFF> trying force the comparison operator for strings `==` to be time independent for managing sessions. Figured the move was to use use == and then at compile time use a term rewriting macro to swap out a == b with secure_cmp(a,b). How do you use quote to iteate over all pairs of string literals being compared?
21:54:52ForumUpdaterBotNew thread by Mantielero: Strange memory problem, see https://forum.nim-lang.org/t/7524
22:05:32*jess joined #nim
22:06:30FromDiscord<mratsim> In reply to @xCFF "trying force the": use a distinct type: https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/limbs.nim#L125-L131
22:07:53FromDiscord<mratsim> here are my primitives to enforce constant-time: https://github.com/mratsim/constantine/blob/master/constantine/primitives/constant_time.nim and the types: https://github.com/mratsim/constantine/blob/master/constantine/primitives/constant_time_types.nim#L9-L34
22:08:19FromDiscord<xCFF> holy shit what an amazing library
22:08:23FromDiscord<xCFF> how have i not seen this
22:08:33FromDiscord<mratsim> and the high level types I use: https://github.com/mratsim/constantine/blob/master/constantine/config/common.nim#L20-L37
22:09:01FromDiscord<xCFF> goddamn! pairing based crypto for nim!!?
22:09:05FromDiscord<mratsim> and if you're bored of programming, you can read on my collection of constant-time failures: https://github.com/mratsim/constantine/wiki/Constant-time-arithmetics
22:09:06FromDiscord<xCFF> 🥳
22:09:29FromDiscord<mratsim> state of the art speed as well: https://hackmd.io/@zkteam/eccbench#BLS12-381
22:09:57FromDiscord<mratsim> note that since the benchmarks were done perf has improved by about 35%-50% on pairings and towerings.
22:10:15FromDiscord<mratsim> there was a parameter passing bug in Nim that forced a copy :/
22:10:39FromDiscord<mratsim> And yes, pairing based crypto for Nim is in good shape
22:11:04FromDiscord<xCFF> you absolute wizard, sage reference code + nim 😍
22:11:04FromDiscord<mratsim> some people at Status (my company and Nim biggest sponsor) are exploring zero knowledge proofs: https://github.com/status-im/nescience
22:11:35FromDiscord<mratsim> I'm researching polynomial commitment as well: https://github.com/mratsim/constantine/tree/master/research/kzg_poly_commit
22:12:04FromDiscord<mratsim> In reply to @xCFF "you absolute wizard, sage": The sage code is generating Nim code 😉
22:12:44FromDiscord<mratsim> For scalar multiplication acceleration based on lattice decomposition for example: https://github.com/mratsim/constantine/blob/master/constantine/curves/bls12_381_glv.nim#L37-L63
22:13:51FromDiscord<xCFF> different application, but are you guys planning on adding support for ed25519?
22:14:33FromDiscord<mratsim> It's personal lib now because we are using another one in prod that is being formally verified as we speek.
22:14:38FromDiscord<mratsim> (edit) "speek." => "speak."
22:14:52FromDiscord<mratsim> I'm interested in palying around with Ristretto and Bulletproof
22:15:25FromDiscord<mratsim> but Curve25519 is already there, hidden: https://github.com/mratsim/constantine/blob/master/constantine/config/curves_declaration.nim#L111-L113
22:15:50FromDiscord<mratsim> (edit) "palying" => "playing"
22:16:52FromDiscord<mratsim> You can open an issue with the protocols or primitives you need, I can see if I can get some hacky PoC out.
22:18:04FromDiscord<mratsim> My main issue right now is likely that all curves I implemented are short weierstrass curves so I would need to implement the Edwars formula
22:18:18FromDiscord<mratsim> that said in other Nim packages you can lift the following:
22:18:52FromDiscord<mratsim> - https://github.com/status-im/nim-libp2p/blob/master/libp2p/crypto/curve25519.nim↵- https://github.com/status-im/nim-libp2p/blob/master/libp2p/crypto/ed25519/ed25519.nim↵↵This was audited by NCC
22:19:53FromDiscord<mratsim> (edit) "Edwars formula" => "Edwards formulae"
22:21:10FromDiscord<mratsim> example report: https://github.com/status-im/nim-libp2p/issues/297
22:22:48FromDiscord<mratsim> In reply to @xCFF "different application, but are": got to sleep but if you have questions about cryptography in Nim feel free, I guess we can occupy the #science channel a bit for that.
22:27:12*filcuc_ quit (Ping timeout: 272 seconds)
22:47:38FromGitter<deech> I haven't pushed it too hard yet but that `matching` library from `fusion` is really freaking cool. A fun thing to add might be limited exhaustiveness checking; it would be really hard with all supported matching expressions but for simple variant/seq matches it should be possible.
22:50:08FromDiscord<zetashift> I'm about to play with it too, it looked so good, haxscramper documentated it so well
22:51:01FromGitter<deech> Yep, really fun to read.
22:53:03FromGitter<deech> Is `fusion` supposed to be stable-ish?
22:53:19FromDiscord<ElegantBeef> It's supposed to be stdlib-ish 😄
22:55:03*vivus joined #nim
22:55:18*tane quit (Quit: Leaving)
23:41:59krux02disruptek
23:42:08krux02sorry
23:42:21krux02I wanted to search for that name here not write it.
23:42:29krux02Can't delete a message on IRC
23:42:39krux02disruptek
23:42:40FromDiscord<zetashift> Does `newSeq` always need an initial length passed through? I'm getting `RangeDefect` when using `var foo = newSeq[Option[Cell]]()` but for example `var foo = newSeq[Option[Cell]](2)` works fine
23:42:48krux02args :(
23:43:07FromDiscord<zetashift> Maybe easier to search through the online irclogs?
23:43:14krux02yea probably
23:50:00leorize[m]@zetashift newSeq don't need an initial length
23:50:21*vivus quit (Quit: Leaving)
23:50:27leorize[m]can you make a reproducible sample of this RangeDefect bug?
23:59:08FromDiscord<dk> any rules of thumb on when to split things into multiple modules?