<< 19-12-2022 >>

00:00:03FromDiscord<guzba> if you want the commit log entry youre welcome to pr something otherwise i can look at this soon, up to you
00:00:53FromDiscord<guzba> ah i did see openarray stuff is an area that got work but im not up on the latest tbh, im more of a rc adopter not a devel adopter haha
00:01:26FromDiscord<Elegantbeef> Yea i made parseutils and unicode work with `openarray[char]` so there a few PRs i'm sitting on for this and Pixie
00:02:29FromDiscord<Elegantbeef> Like Pixie can in theory do multiple spans without any extra allocations with the new changes since we can 'unsafely' capture an openarray[char] then add it to an array as a `cstring, len`
00:04:20FromDiscord<guzba> it sounds great to improve things. string copying is costly but it also takes effort to identify it and fix it so we've got im sure many gaps in various repos↵something we can improve with 0 downsides
00:06:06FromDiscord<guzba> i paid much more attention to it when working on mummy though now i wonder how i could revisit stuff with improved openarray in the future
00:06:13FromDiscord<guzba> (edit) "mummy" => "mummy,"
00:06:29FromDiscord<Elegantbeef> Yea my rule is never write `seq[T]` if `openArray[T]` suffices
00:06:40FromDiscord<Elegantbeef> you're just limiting the API for no benefit
00:06:51*wallabra quit (Ping timeout: 252 seconds)
00:06:54*wallabra_ joined #nim
00:07:15FromDiscord<guzba> it makes sense, just need to overcome inertia of what one is used to
00:07:39FromDiscord<guzba> nice thing about it is it doesnt break ppls stuff if fixed later
00:07:49FromDiscord<guzba> is ok to not get perfect day 1
00:07:53*wallabra_ is now known as wallabra
00:08:07FromDiscord<guzba> (from a nimble library perspective)
00:08:26FromDiscord<Elegantbeef> Yea make it work, then make it work fast and all that jazz
00:08:42FromDiscord<Elegantbeef> It's just people often reach for `seq[T]` which means more allocations and less flexible apis
00:08:43FromDiscord<guzba> webby basically came about because urlly is a ref url and i really cant have that in mummy (threads)↵but making urlly non-ref just breaks ppls assumed stuff
00:10:02FromDiscord<Elegantbeef> It annoys me that the entire strutils uses `string` but Araq doesnt want it to support `openarray[char]` so one day i get to make a copy of that module with `openarray[char]` support so we can use it with `array[char]`, `seq[char]`, and `cstring` 😄
00:11:31FromDiscord<guzba> one part of me does note that, as a newer to nim person, seeing a documented function taking a `string` sort of "makes sense", whereas if everything was `openarry[char]` id be like wut iz?
00:12:02FromDiscord<Elegantbeef> You can make an overload that takes a string if you want to remove that
00:12:21FromDiscord<guzba> totally, its not an excuse not to improve things
00:12:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iY6
00:12:43FromDiscord<Elegantbeef> God dammit element really doesnt like to respect me with codeblocks and emojies
00:13:52FromDiscord<Gumbercules> it'd be a lot nicer if you didn't have to do so much work to deal with C strings / char arrays
00:14:15FromDiscord<Elegantbeef> Yea you should be able to do `myCstring.toOpenArray(0, len).startsWith("bleh")`
00:14:30FromDiscord<Elegantbeef> unicode and parseutils now support it so that's good
00:14:42FromDiscord<Gumbercules> also being able to do something like `myCString = myCharArray` would be really nice
00:14:45FromDiscord<Elegantbeef> The important modules work with it, it's now just the more user space ones that need support
00:14:46FromDiscord<Gumbercules> or the reverse
00:15:07FromDiscord<Gumbercules> without having to write a copyStr function or something similar and rely on copyMem
00:15:36FromDiscord<Gumbercules> or maybe you can do this already and I'm just out of the loop
00:15:47FromDiscord<Elegantbeef> I think what you want is a bit iffy
00:16:08FromDiscord<Gumbercules> well a pointer to an array of characters is essentially a cstring
00:16:14FromDiscord<Elegantbeef> Depending on how your cstring is stored that's quite ambiguous
00:16:28FromDiscord<Gumbercules> as long as it is null terminated
00:16:29FromDiscord<Elegantbeef> If it's a length delmited cstring you cannot use just `=`
00:16:43FromDiscord<Gumbercules> well I'm fine with taking a slice
00:16:49FromDiscord<Elegantbeef> Sure but how do you reason that it's null terminated from `a = b`?
00:16:52FromDiscord<Gumbercules> I'm really more after the myCharArray = myCstring now that I think about it
00:17:15FromDiscord<Elegantbeef> Well you should be able to do `myCharArray = myCstring.toOpenArray(0, len)`
00:17:19FromDiscord<Elegantbeef> gotta check
00:17:23FromDiscord<Gumbercules> hmm if so that's nice
00:18:02FromDiscord<Gumbercules> but yeah in general the more cstring and char array support that goes into the stdlib is good
00:18:10FromDiscord<Elegantbeef> Nope doesnt work
00:18:13FromDiscord<Gumbercules> via openArray
00:18:46FromDiscord<Gumbercules> bah
00:18:51FromDiscord<Elegantbeef> Does work though
00:18:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iY9
00:19:03FromDiscord<Gumbercules> that's not horrible
00:19:28FromDiscord<Yepoleb> I am less bothered by procs just taking string and more by the lack of consistency when dealing with binary data (string, seq[char], seq[uint8], seq[byte], openarray[uint8], ...)
00:19:43FromDiscord<Elegantbeef> I'd say the best binary data is `openarray[byte]`
00:19:55FromDiscord<Gumbercules> isn't byte just an alias to `uint8`?
00:19:59FromDiscord<Yepoleb> especially binary data in strings grinds my gears, this is just repeating the python2 mistake
00:20:10FromDiscord<Elegantbeef> byte \> uint8 for binary data cause it's 'unknown'
00:20:56FromDiscord<Elegantbeef> The benefit of `openarray[byte]` is that it accepts `string` `seq[uint8]` `array[char]` `array[uint8]` and `seq[char]` with `toOpenArrayByte` for the `char` variants
00:20:59FromDiscord<Yepoleb> byte, uint8 and char are less of a problem in practice, it's mostly the lack of consistent syntax that's annoying
00:21:20FromDiscord<Elegantbeef> https://nim-lang.org/docs/theindex.html#toOpenArrayByte solves all problems
00:22:38FromDiscord<Yepoleb> https://nim-lang.org/docs/net.html#send%2CSocket%2Cstring
00:22:40FromDiscord<Yepoleb> this one here
00:22:42FromDiscord<Yepoleb> i hate this so much
00:22:45FromDiscord<Elegantbeef> I dont disagree
00:22:50FromDiscord<Elegantbeef> Atleast there is a `pointer` variant
00:23:38FromDiscord<guzba> https://nim-lang.org/docs/io.html#readFile%2Cstring seems like a hard statement that a string is the binary data representation in nim to me
00:23:48FromDiscord<guzba> i gave up fighting it a long time ago
00:24:02FromDiscord<Elegantbeef> Meh reading from a file is better to be string imo
00:24:10FromDiscord<Elegantbeef> Most people are expecting characters from there
00:24:28FromDiscord<Elegantbeef> `openarray[byte]` accepts all collections of data
00:24:28FromDiscord<guzba> hardly any files are strings
00:24:41FromDiscord<guzba> i guess if you think people are opening json or txt its fine
00:24:43FromDiscord<guzba> but anything else
00:25:03FromDiscord<Elegantbeef> Even then that's not really a consumer of binary data
00:25:39FromDiscord<Elegantbeef> Consumers of binary data really should be written as openarray[byte], it just covers all bases and people need to be pushed towards it
00:26:06FromDiscord<Elegantbeef> You can use every single data type you'd want to with it without a copy
00:27:20FromDiscord<Elegantbeef> shit
00:27:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYa
00:28:25FromDiscord<guzba> is there a point to char ? i find the char byte uint8 thing also troublesome. easy to deal with byte/uint8 since they alias iirc, but char insists on being special? cant recall but something made me not happy↵I think i couldnt cast openarray[char] to openarray[byte} or something?
00:28:28FromDiscord<guzba> mabye this is old
00:28:56FromDiscord<Elegantbeef> It's just empirically the best 😛
00:28:56FromDiscord<Yepoleb> i'd love this
00:28:58FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYc
00:29:06FromDiscord<guzba> readfile string is double bad. its like "string" for binary + also char instead of byte, rage
00:29:10FromDiscord<Elegantbeef> Static typing is great
00:29:53FromDiscord<Elegantbeef> When dealing with chars you are dealing with 'text', when dealing with uint8 you're dealing with integers when dealing with byte you have untyped data
00:29:57FromDiscord<Elegantbeef> Atleast that's how iview it
00:30:04FromDiscord<guzba> sure but now readFile is text only?
00:30:13FromDiscord<guzba> how do i read a file that isnt text?
00:30:13FromDiscord<guzba> hehe
00:30:21FromDiscord<Elegantbeef> I dont really see the issue
00:30:30FromDiscord<Elegantbeef> Your consumer can convert it to an `openarray[byte]`
00:30:42FromDiscord<Elegantbeef> Or you can convert it yourself
00:30:54FromDiscord<Yepoleb> string to seq[bytes] or openarray is easy, the other way around is not
00:31:03FromDiscord<Elegantbeef> Well it's easy it's just costly
00:31:22FromDiscord<Yepoleb> what's the easy way?
00:32:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYe
00:32:46FromDiscord<Elegantbeef> Or copy mem if you want it to only work on native but be fast
00:32:49FromDiscord<Yepoleb> sent a code paste, see https://play.nim-lang.org/#ix=4iYg
00:33:19FromDiscord<Yepoleb> pretty much the same \:D
00:33:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYh
00:33:41FromDiscord<Yepoleb> i assumed gcc will give me a memcopy anyway
00:34:08FromDiscord<albassort> i finally hit 100k lines!
00:34:09FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1054194894840791071/image.png
00:34:39FromDiscord<Yepoleb> i always code with compiler optimization in mind
00:34:56FromDiscord<Yepoleb> and just use the dumb implementation
00:36:15FromDiscord<Yepoleb> but needing such a basic function to interface with low level apis is annoying
00:37:12FromDiscord<Yepoleb> always fighting a bad api
00:37:23FromDiscord<albassort> yea
00:37:41FromDiscord<albassort> my project is in the last phase whoooo
00:37:52FromDiscord<albassort> only a few more features and then i enter testing
00:38:00FromDiscord<albassort> ...well, more testing
00:38:05FromDiscord<albassort> portability testing
00:38:13FromDiscord<Yepoleb> is that including modules?↵(@albassort)
00:38:27FromDiscord<albassort> including modures and static reads
00:38:30FromDiscord<albassort> (edit) "modures" => "modules"
00:38:37FromDiscord<guzba> In reply to @Yepoleb "i assumed gcc will": i have significantly less faith in compiler optimization, ive seen it trusted way too much↵for example, i have tested both toString() above and it goes not just copymem
00:38:46FromDiscord<guzba> neither with -d:release or -d:danger
00:38:54FromDiscord<guzba> sent a code paste, see https://play.nim-lang.org/#ix=4iYl
00:38:58FromDiscord<guzba> 10x slower to use toString1()
00:41:07FromDiscord<Elegantbeef> With `-d:lto`?↵(@guzba)
00:41:21FromDiscord<guzba> no change
00:41:31FromDiscord<guzba> `nim c -d:danger -d:lto --mm:orc -r .\tests\tmp.nim`
00:41:37FromDiscord<guzba> tried refc too
00:42:10FromDiscord<Elegantbeef> Yea it's not optimised out on clang or gcc
00:42:39FromDiscord<Yepoleb> i remember this working in c++
00:43:25FromDiscord<guzba> it should work but i guess ive just kind of not seen it happen↵i lost faith when i was working in simd and ppl saying "autovectorize" went from being "oh compilers are cool" to "yeah that doesnt happen"
00:43:33FromDiscord<Yepoleb> clipboard.png https://media.discordapp.net/attachments/371759389889003532/1054197259585192046/clipboard.png
00:43:56FromDiscord<guzba> haha sorry to hearbreak
00:44:14FromDiscord<Elegantbeef> There are some nice compiler optimisations for arrays/sets though 😄
00:44:42FromDiscord<Elegantbeef> Constant arrays with `-d:danger` are generally turned into just binary ops instead of iteration
00:44:48FromDiscord<Elegantbeef> like `if someInt in [10, 20, 30]`
00:46:00FromDiscord<Elegantbeef> But that could be done with a macro 😄
00:46:20FromDiscord<Bung> why -d\:danger required in such a case
00:46:38FromDiscord<Elegantbeef> removes range check
00:49:18FromDiscord<Bung> after set construction semchecked I hope that optimisation
00:53:40FromDiscord<Yepoleb> what the hell when did compilers stop optimizing simple copy loops, it does not even do it for c++
00:53:48FromDiscord<Yepoleb> i swear they did this at some point
01:02:06FromDiscord<Yepoleb> wat
01:02:11FromDiscord<Yepoleb> clipboard.png https://media.discordapp.net/attachments/371759389889003532/1054201947693006928/clipboard.png
01:03:04FromDiscord<guzba> oh no, he opened the box that must not be opened
01:03:33FromDiscord<guzba> now you must live with the knowledge
01:03:45FromDiscord<Elegantbeef> Godbolt and pandora are spelt differently the last i checked
01:03:46FromDiscord<Yepoleb> this is so incredibly dumb
01:04:24FromDiscord<Yepoleb> with clang 14 -O3
01:04:25FromDiscord<Yepoleb> sent a code paste, see https://play.nim-lang.org/#ix=4iYv
01:05:12FromDiscord<Yepoleb> also this
01:05:12FromDiscord<Yepoleb> clipboard.png https://media.discordapp.net/attachments/371759389889003532/1054202711970689034/clipboard.png
01:06:00FromDiscord<Yepoleb> (i forgot how to construct string of fixed size)
01:08:24FromDiscord<guzba> i have not worked in c++ so this is a worthless opinion but it seems so overdone. maybe im just not smart enough
01:09:19FromDiscord<Elegantbeef> nah C++ is very much underdone
01:09:25FromDiscord<Elegantbeef> It's like a medium rare chicken breast
01:09:33FromDiscord<Yepoleb> i used it as my main language for a few years
01:10:00FromDiscord<Yepoleb> and jumped ship when i realized there is no way it can be saved
01:13:32FromDiscord<guzba> firmly used to working in nim now im perfectly content to let c++ be something other people write↵very excited about nim 2.0 and there seems to be lots of activity lately toward that which is exciting. even if its not till january due to holidays its still a huge success when that has an rc
01:13:38FromDiscord<Yepoleb> also this is just basic\_string, wait till they release complex\_string in c++30
01:13:43FromDiscord<guzba> lol
01:14:28FromDiscord<Elegantbeef> The fun part is "hello" in rust and C++ is a cstring
01:14:28FromDiscord<albassort> how do i specify a branch in nimble
01:14:34FromDiscord<albassort> requires "yaml@#devel"
01:14:37FromDiscord<albassort> doesn't work
01:14:45FromDiscord<Elegantbeef> That should be it
01:15:20FromDiscord<albassort> you don't need the @ in nimble
01:15:23FromDiscord<albassort> weird but ok
01:17:12FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4iYA
01:17:20FromDiscord<albassort> idk man the only one i don't truly need is constructor
01:17:29FromDiscord<Elegantbeef> It's shit software!
01:17:55FromDiscord<albassort> really should be in the stdlib and fleshed out
01:19:46FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4iYC
01:19:51FromDiscord<albassort> this is the only time I ever used it lmao
01:19:58FromDiscord<albassort> every other one is manual
01:21:22FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4iYD
01:21:40FromDiscord<Yepoleb> nim has its own ways of driving someone insane, but it's better than c++ already and moving in a good direction↵(@guzba)
01:21:56FromDiscord<albassort> the great refactoring is coming
01:21:57FromDiscord<Yepoleb> and i feel like i can actually improve things here
01:24:08FromDiscord<Yepoleb> c++ needs written proposal documents for everything and then the boomer consortium just throws it out anyway
01:24:10FromDiscord<Yepoleb> committee, not consortium
01:24:11FromDiscord<Yepoleb> such a hard word
01:24:36FromDiscord<guzba> i am "just a user" of nim and honestly have very little idea of nim internal efforts so hearing that there is positivity is excellent
01:24:40FromDiscord<guzba> motivation is a rare resource
01:25:22FromDiscord<Elegantbeef> Viewtypes and IC is all i really want to see be live
01:25:44FromDiscord<Yepoleb> what's IC?
01:25:55FromDiscord<Elegantbeef> Incremental compilation
01:26:03FromDiscord<cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYF
01:26:07FromDiscord<cia.gov> im so confused why this is happening
01:26:12FromDiscord<albassort> In reply to @guzba "i am "just a": there is.... a lot of drama
01:26:28FromDiscord<guzba> haha
01:26:32FromDiscord<albassort> but
01:26:35FromDiscord<albassort> less so then normal
01:26:36FromDiscord<Yepoleb> is there really?
01:26:38FromDiscord<guzba> i think its ok if i dont know how the sausage is made
01:26:46FromDiscord<albassort> In reply to @Yepoleb "is there really?": its relative
01:26:56FromDiscord<albassort> it feels like a lot even though its very minor and very little
01:27:14FromDiscord<albassort> apart from nimskull, which, is all in all non-dramatic somehow
01:27:59FromDiscord<Elegantbeef> But Nim needs more compiler contributors! 😛↵(@guzba)
01:28:06FromDiscord<albassort> In reply to @guzba "i think its ok": basically:↵Hard working volunteers propelled by near full-time vanguards keep the project mildly sustainable
01:28:15FromDiscord<albassort> (edit) "In reply to @guzba "i think its ok": basically:↵Hard working volunteers propelled by near full-time vanguards keep the project mildly sustainable ... " added "and well written"
01:28:30FromDiscord<albassort> In reply to @Elegantbeef "But Nim needs more": I'll get right on that (never)
01:28:40FromDiscord<guzba> In reply to @Elegantbeef "But Nim needs more": i totally agree, i feel i do my small part through open source libs↵its just what i enjoy so i do it
01:29:00FromDiscord<guzba> im not naturally attracted to compiler stuff for some reason, at least at this point
01:29:11FromDiscord<Yepoleb> the compiler works well enough
01:29:26FromDiscord<albassort> compiler stuff is neat but i feel anything i would contribute would only make it worse
01:29:54FromDiscord<Elegantbeef> It's not like Araq allows tremendously shit code into it
01:30:06FromDiscord<Elegantbeef> I mean i've contributed and i'm an idiot
01:30:33FromDiscord<albassort> yea but if you looked at the code for my current project you're gonna have like 2000 comments and optimizations and critques
01:30:38FromDiscord<albassort> (edit) "critques" => "critiques"
01:30:58FromDiscord<Elegantbeef> Compiler development is small changes
01:32:45arkanoidis it possible to turn "Foo[T1,T2,T3]" into "FooTensor[Tensor[T1], Tensor[T2], Tensor[T3]] with a template?
01:33:01FromDiscord<Yepoleb> don't you always get short glimpses just by doing normal things?↵(@guzba)
01:36:56FromDiscord<Yepoleb> reading the standard library and compiler code has become quite a common occurence for me to investigate bugs and understand how things work internally
01:37:08FromDiscord<guzba> hm, honestly, im here using 1.6.10, my stuff compiles and works, i write things as im used to writing them at this point, the compiler keeps doing its thing. i learn more and more over time about working with the compiler more precisely, but very little about the inside? maybe the line is blurred?↵i think in "--threads:on --mm:orc" so nim 2.0 will be an easy transition for the most part
01:37:18FromDiscord<guzba> ah ok if we include looking at stdlib code then yeah i see that a lot
01:38:05FromDiscord<Yepoleb> i never had to look at the codegen parts
01:38:15FromDiscord<Yepoleb> they luckily just work
01:38:18FromDiscord<guzba> yeah i guess that is more what i meant, wasnt clear
01:39:15FromDiscord<Elegantbeef> Hey it's hardly ever codegen that doesnt work
01:39:18FromDiscord<Elegantbeef> Semantic analysis generally breaks
01:39:49FromDiscord<guzba> a new account has spammed several community channels with an amazing crypto opportunity fyi not sure if mod around
01:41:45FromDiscord<Rika> In reply to @guzba "a new account has": Yo brb imma jump on that opportunity
01:41:53FromDiscord<Rika> Why have money when you can lose it
01:42:27arkanoidit feels great when you don't have any. Talking as a professional in this matter
01:44:13FromDiscord<Yepoleb> i already pinged mods in offtopic where it started
01:44:13FromDiscord<Yepoleb> but usually takes half a day for it to get removed
01:45:03FromDiscord<Rika> In reply to @arkanoid "it feels great when": Professional gambler 😎
01:45:57arkanoidRika, kinda: professional picker of low-paying jobs
01:46:08FromDiscord<Yepoleb> not having money means losing much less due to inflation, now is the perfect time to be poor
01:48:08FromDiscord<Yepoleb> arkanoid\: what are your top 5 low-paying jobs?
01:48:15FromDiscord<Yepoleb> looking for advice
01:48:22FromDiscord<Yepoleb> \professional advice
01:48:34FromDiscord<Yepoleb> don't want to take advice from just anyone
01:49:44FromDiscord<Rika> Try fast food service
01:50:11arkanoidSure. My best pick is researcher in public sector in a country that doesn't care at all about science. It's good because it keeps you etically high while economically poor
01:51:05FromDiscord<Rika> Surely even the most benign sounding research work can be abused for unethical purposes
01:51:24v9fkarkanoid: can you name some countries as examples?
01:51:48arkanoidsure! the one where I am in?
01:52:11FromDiscord<Bung> why country matters?
01:52:58arkanoidwell, can't talk for ANY country here. I've heard about highly paid research jobs out there ... poor guys
01:54:18FromDiscord<Elegantbeef> Arkanoid i think what you're after can only be done with a macro not a template
01:54:23FromDiscord<Elegantbeef> Atleast i cannot think of any way to do it otherwise
01:54:57FromDiscord<Yepoleb> i hope that public research is then published behind a paywall or even licensed exclusively to the private sector in a partnership↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>)
01:55:27FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=4iYI
01:55:37arkanoidElegantbeef, I have yet to hit that chapter in Araq book. I have spaghetti knowlege of macros
01:55:48FromDiscord<Elegantbeef> In that case i think you have the proc directly ajusa
01:55:51FromDiscord<Elegantbeef> Echo `handler.treeRepr`
01:57:21arkanoidYepoleb, sure! You know, you have to pay to publish something that the editor will sell for money, and this for the sake of keeping researchers poor for sure. I'm deeply grateful for thisi
01:58:10FromDiscord<Yepoleb> heartwarming
01:59:34FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=4iYK
02:00:07*wallabra quit (Ping timeout: 252 seconds)
02:02:20FromDiscord<Bung> maybe some node kind check to be done in macros given users clear error message, so it won't down to compiler error anymore
02:04:06FromDiscord<Elegantbeef> just use micros 😛
02:05:27FromDiscord<Yepoleb> am i doing something wrong if i don't have macros in my code?
02:07:05*wallabra joined #nim
02:07:19FromDiscord<Elegantbeef> If you dont need them you dont need them
02:07:27FromDiscord<Elegantbeef> I personally find them the most compelling part of Nim
02:11:37FromDiscord<Yepoleb> it's great to have them as a the most powerful problem solver
02:23:28NimEventerNew Nimble package! depot - For working with S3-compatible storage APIs, see https://github.com/guzba/depot
02:31:48FromDiscord<Yepoleb> damn another guzba package
02:33:12FromDiscord<guzba> ive had reason to do some file related stuff and have come to the conclusion that the fact all these major file storage providers support the "s3 api" is actually amazingly cool
02:33:34FromDiscord<Yepoleb> that's 70% hash functions lol
02:33:49FromDiscord<guzba> yeah lol i may pull out the hashing into a hash repo someday
02:34:00FromDiscord<guzba> i have a private one started with crc32 and other stuff
02:34:06FromDiscord<guzba> intrisinc versions + just cpu
02:34:12FromDiscord<guzba> could be useful but not really fleshed out yet
02:34:46FromDiscord<Yepoleb> with your speed it'll be out next week
02:35:03FromDiscord<Elegantbeef> Guzba all your `&` scares me 😄
02:35:33FromDiscord<guzba> haha i write this knowing the hot path is never making presigned urls
02:35:40FromDiscord<guzba> however, now that it works, we can improve it
02:35:53FromDiscord<guzba> i always annoy treeform by saying "it has to work first" lol
02:36:12FromDiscord<guzba> (edit) "write" => "wrote"
02:36:16FromDiscord<Elegantbeef> Yea i'm just a stickler for lowest allocations, which means i never write code 😛
02:37:04FromDiscord<Yepoleb> memory controlers love him
02:41:00FromDiscord<Yepoleb> i just realized hidden inside xmm and ymm registers is 768 bytes of free memory
02:42:05FromDiscord<guzba> imagine if you had zmm from avx-512 too
02:42:12FromDiscord<guzba> you basically dont need ram
02:43:30FromDiscord<Rika> Damn registers are massive nowadays huh
02:43:54FromDiscord<guzba> intel kind of removed avx-512 from consumer stuff but amd added it in their consumer 7000 series
02:44:24FromDiscord<guzba> i think amd is actually 2 avx-256 registers run by 1 instruction tho? ive not dug into it since i do not have
02:46:09FromDiscord<Yepoleb> does a stack frame count as allocation?
02:47:31FromDiscord<Yepoleb> someone should write an allocator for storing data in simd registers
02:49:54FromDiscord<guzba> it would be an extremely cool demo, however i think in practice it wouldnt perf well↵once you start issuing simd instructions the cpu basically goes "wait wait guys hold on, stop all this pipelining stuff, we got a special delivery" and its a big cost unless you do a decent amount of work in simd
02:52:15FromDiscord<guzba> maybe thats just related to using intrinsics and a compiler, perhaps if you hand asm that isnt a thing? no idea
02:54:48FromDiscord<Yepoleb> do you consider it impractical for production use?
02:57:24FromDiscord<guzba> In reply to @Yepoleb "do you consider it": if asking me, what specifically do you mean? as in: simd in general or a data-in-simd-registers-allocator or other?
02:58:25FromDiscord<Yepoleb> the register allocator 😄
03:01:56FromDiscord<guzba> if i had to say, id probably expect it to have issues. not really theoretically, but practically in terms of todays stuff. mostly due to not being what things are written expecting, eg:↵simd side-steps a lot of issues related to data / pointer aliasing, thread visibility, etc↵i think a lot of atomics and other stuff are all about ensuring data is not used from register cache so thatd be an impact↵but its is an interesting idea
03:05:45FromDiscord<Yepoleb> Oh, you're going as far as thinking about the implications for threading
03:06:07FromDiscord<cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYV
03:08:44FromDiscord<Yepoleb> Threads would require machine global registers to share data. Maybe some interrupt control registers could be used or just write your data to the realtime clock.
03:12:40arkanoidwhat's the idiom to save a list of generic types so that I can reuse as argument multiple times? Like I have Foo[T1,T2,T3], I want to have as costants "c1 = [int,float,str]" and "c2 = [float,uint8,int]" so that I can quickly do "let foo1 = Foo[c1]" and "let foo2 = Foo[c2]"
03:14:12FromDiscord<Elegantbeef> There isnt one
03:14:47arkanoidok
03:14:50arkanoidthanks
03:15:17arkanoidI'll copypaste until I get enlighted by the god of macros
03:15:41FromDiscord<Elegantbeef> `type FooC1 = Foo[C1]` 😄
03:16:02arkanoidyeah this is what I am doing, and this takes to a lot of copypaste
03:17:43FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=4iYW
03:17:58FromDiscord<Elegantbeef> Well you could in theory use a macro to then do like `myType.generate(myAlias)`
03:18:15FromDiscord<amadan> (edit) "https://play.nim-lang.org/#ix=4iYW" => "https://play.nim-lang.org/#ix=4iYX"
03:18:51*arkurious quit (Quit: Leaving)
03:21:08FromDiscord<Bung> cia.gov's question loss two points, `connect.Connect()``system.GetSystemInfo()` no one knows
03:22:42FromDiscord<cia.gov> In reply to @Bung "cia.gov's question loss two": pretty self explanatory no?
03:22:56FromDiscord<cia.gov> connect.Connect() connects using a socket
03:23:23FromDiscord<cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYY
03:24:23FromDiscord<Bung> I don't think so, it doesn't imply it use socket protocol
03:25:10FromDiscord<cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYZ
03:25:24FromDiscord<cia.gov> (edit) "https://play.nim-lang.org/#ix=4iYZ" => "https://play.nim-lang.org/#ix=4iZ0"
03:27:45FromDiscord<Elegantbeef> Arkanoid maybe there is just better design in what you're doing
03:54:59FromDiscord<cia.gov> is there a way to get a string to bytes in this format ? \x00\x01\x02\x03\x04
03:55:07FromDiscord<cia.gov> (edit) "is there a way to get a string to bytes in this format ... ?" added "`\x00\x01\x02\x03\x04`" | removed "\x00\x01\x02\x03\x04"
03:57:32FromDiscord<Boston> A string to a string but the byte representation?
03:57:46FromDiscord<Elegantbeef> toHex exists
03:57:50FromDiscord<cia.gov> ik
03:57:56FromDiscord<cia.gov> i get this
03:57:57FromDiscord<cia.gov> 7B22686F73746E616D65223A2022636F6F6B6965732D4D6163426F6F6B2D4169722E6C6F63616C222C2022706C6174666F726D223A20224D61634F5320616D643634222C2022637075223A20225669727475616C4170706C65204020322E353047487A222C202272616D223A20383139322C20226469736B223A203233333735327D
03:58:54FromDiscord<Elegantbeef> Well you might have to write code for what you want whatever it is
04:00:27FromDiscord<Boston> sent a code paste, see https://play.nim-lang.org/#ix=4iZ6
04:00:30FromDiscord<Boston> Is what I would do
04:00:37FromDiscord<Boston> Syntax may be wrong typing on my phone
04:00:58FromDiscord<Elegantbeef> `"\" & "x"` is funny
04:01:14FromDiscord<Boston> (edit) "https://play.nim-lang.org/#ix=4iZ6" => "https://play.nim-lang.org/#ix=4iZ7"
04:01:28FromDiscord<Boston> Yeah I didn't think
04:01:34FromDiscord<Boston> "\x"
04:01:37FromDiscord<Elegantbeef> Atleast it gets optimised 😛
04:11:47FromDiscord<Bung> much better nick name
04:12:15FromDiscord<Elegantbeef> What?
04:12:40FromDiscord<Bung> from `cia.gov` -\> `Boston`
04:12:46FromDiscord<Elegantbeef> They're different people
04:13:45FromDiscord<Bung> hmm , they talk toHex same time ...
04:14:30FromDiscord<Elegantbeef> Yes one was answering the other
04:15:22FromDiscord<Bung> ok, I understand now
04:15:45FromDiscord<cia.gov> im just a fed idk Boston
04:16:06FromDiscord<cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iZ8
04:19:28FromDiscord<cia.gov> it has to be every 2 characters a `\\x` because `\x7` isnt actually anything but `\x7B` is
04:19:33FromDiscord<cia.gov> (edit) "it has to be every 2 characters a `\\x` ... because" added "is added"
04:20:06FromDiscord<cia.gov> (edit) "it has to be every 2 characters a `\\x` is added because `\x7` isnt actually anything but `\x7B` is ... " added "equal to a left curly brace `{`"
04:21:06FromDiscord<Boston> Is outBuf an array
04:21:08FromDiscord<Boston> Or seq
04:21:18FromDiscord<cia.gov> string
04:21:44FromDiscord<cia.gov> then i used toHex on the string which holds the value 7B22686F73746E616D65223A2022636F6F6B6965732D4D6163426F6F6B2D4169722E6C6F63616C222C2022706C6174666F726D223A20224D61634F5320616D643634222C2022637075223A20225669727475616C4170706C65204020322E353047487A222C202272616D223A20383139322C20226469736B223A203233333735327D
04:22:04FromDiscord<cia.gov> sent a long message, see http://ix.io/4iZa
04:22:21FromDiscord<cia.gov> which converted is {"hostname": "cookies-MacBook-Air.local", "platform": "MacOS amd64", "cpu": "VirtualApple @ 2.50GHz", "ram": 8192, "disk": 233752}
04:26:55FromDiscord<Boston> sent a code paste, see https://play.nim-lang.org/#ix=4iZb
04:26:56FromDiscord<Boston> Don't know if that's any better
04:27:37FromDiscord<Boston> (edit) "https://play.nim-lang.org/#ix=4iZb" => "https://play.nim-lang.org/#ix=4iZc"
04:31:29FromDiscord<huantian> Beef where is the part where you say to use newStringOfCap
04:31:59FromDiscord<huantian> Or something idk
04:33:04FromDiscord<Elegantbeef> Well i give up when people do things i dont understand why they need to be done
04:34:20FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=4iZd
04:34:23FromDiscord<huantian> Why is while capital
04:34:32FromDiscord<Elegantbeef> They're typing on their phone
04:34:33FromDiscord<Boston> Phone
04:34:38FromDiscord<huantian> Ah
04:34:46FromDiscord<huantian> I feel that
04:35:26FromDiscord<Boston> I spend most my time doing poorly coded dlls
04:35:49FromDiscord<Boston> I like being a bad coder
05:07:14FromDiscord<Gumbercules> it'd be nice if the C++ backend got fixed
05:07:18FromDiscord<Gumbercules> and like, worked...
05:07:30FromDiscord<Gumbercules> if we're talking about things we'd like to see fixed in Nim
05:21:58FromDiscord<huantian> Hey Elegantbeef I just realized how easy it would be to do compile time checked interpolation for localized strings! If I ever need to make an app that I need localization for I’ll use Nim
05:30:58FromDiscord<Elegantbeef> Oh yea?
05:33:06FromDiscord<huantian> Yeah, cus I feel like it is quite an easy mistake to misspell your interpolation in your localized string or something
05:33:16FromDiscord<huantian> And with compile time checks it would make that impossible
05:33:21FromDiscord<Elegantbeef> How would you do it in Nim? distinct?
05:35:30FromDiscord<huantian> Yeah I think so
05:36:02FromDiscord<huantian> I guess it would also depend on what program your localizers would use to do the localization
05:37:20FromDiscord<huantian> But most don’t get the strings from the internet or something on the fly right? They bundle with your program at build time or something
05:37:31FromDiscord<Elegantbeef> I assume so
05:37:39FromDiscord<Elegantbeef> Thought most libraries use i8n or whatever
05:40:19FromDiscord<Rika> In reply to @Elegantbeef "Thought most libraries use": internatin
05:40:38FromDiscord<Rika> Lol
05:41:10FromDiscord<Elegantbeef> Hey i've literally never used it
05:41:16FromDiscord<Rika> It’s 18
05:41:54FromDiscord<Rika> Honestly might be better to write intl8n
05:44:01FromDiscord<Rika> Sure its only 6 and not 8 letters difference from international and +isation but 8 is too catchy
05:44:07*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
05:45:23*cyraxjoe joined #nim
06:04:41FromDiscord<Elegantbeef> Yea i'm so dumb i though i18n was a library 😄
06:04:52FromDiscord<Elegantbeef> 10/10 abbreviation
06:11:29*ltriant quit (Ping timeout: 260 seconds)
06:25:29*kenran joined #nim
06:25:31*kenran quit (Remote host closed the connection)
06:29:23*kenran joined #nim
06:29:51*kenran quit (Remote host closed the connection)
06:49:52*xet7 quit (Remote host closed the connection)
06:55:22*ltriant joined #nim
07:00:22*ltriant quit (Ping timeout: 252 seconds)
07:11:43FromDiscord<<She>Horizon</Her>> In reply to @Elegantbeef "They're typing on their": 👀 phone programmers?
07:12:24FromDiscord<<She>Horizon</Her>> On a related note: If you have a PC or laptop, please use that instead, coding on phone is :conc:
07:12:42FromDiscord<Rika> I was programming on an iPad a few hours ago
07:12:55FromDiscord<<She>Horizon</Her>> ...acceptable?
07:13:04FromDiscord<<She>Horizon</Her>> I don't know how to feel about that one
07:16:33FromDiscord<Gumbercules> I have a phone with a keybaord
07:16:36FromDiscord<Gumbercules> (edit) "keybaord" => "keyboard"
07:16:54FromDiscord<Gumbercules> but I can also ssh into it - they keyboard is nice for when I'm away from a laptop
07:17:07FromDiscord<Gumbercules> https://pine64.com/product/pinephone-pinephone-pro-keyboard-case/
07:17:25FromDiscord<Gumbercules> I need to get a second sim card and start using my ppp again
07:23:51FromDiscord<EyeCon> @ElegantBeef the resident openArray expert, or anyone else: What's the idiomatic way to get a string from a byte openArray? Is it copyMem?
07:24:12FromDiscord<Elegantbeef> There is no op from openarray[byte] to string aside from copymem or .add
07:24:36FromDiscord<EyeCon> copyMem it is, thanks
07:26:27FromDiscord<EyeCon> Is prepareMutation still necessary?
07:27:00FromDiscord<EyeCon> ...in ARC/ORC
07:27:07FromDiscord<Elegantbeef> For literals yes
07:32:28FromDiscord<ShalokShalom> In reply to @Isofruit "For later should you": Why would you need a vri before an update?
07:34:07FromDiscord<ringabout> I want to merge https://github.com/nim-lang/Nim/pull/21129, please help me review it.
07:34:47termerdoes AsyncHttpClient always read the full body to memory?
07:34:51termeror is it possible to stream it?
07:35:19termerThe AsyncResponse object contains both a "body: string" and "bodyStream: FutureStream[string]" property
07:36:11FromDiscord<Elegantbeef> It does not stream afaik
07:37:07termerwhat in the world
07:37:31termerthat's a bit of a problem
07:37:55termerthat's a bit of a problem
07:37:56termeroops
07:42:16FromDiscord<leorize> yea, you might want to look into chronos, which is the saner async API
07:42:46*wallabra quit (Ping timeout: 252 seconds)
08:05:17*moonlit_ joined #nim
08:08:04*moonlit quit (Ping timeout: 265 seconds)
08:09:49*wallabra joined #nim
08:29:46NimEventerNew Nimble package! rowdy - Automatically bind procs to the mummy web server, see https://github.com/ajusa/rowdy
08:41:57termerturns out it doesn't read it all into memory
08:42:12termerI was able to use the FutureStream to write the data to a file
08:42:17FromDiscord<Elegantbeef> Also you can do `when typ is ref: new newName`
08:42:17FromDiscord<Elegantbeef> @ajusa\: you can hide the `expandHandler` if inside the templates you do `bind expandHandler` (might be `mixin expandHandler`
08:42:19FromDiscord<Elegantbeef> Ah sorry i dont use async
08:42:20termerit's not very clear though
08:42:40termerI checked the memory usage, and I wasn't getting any problems
08:42:52termer2.5mb consistently even when downloading a 200mb file
08:42:55termerall good
08:43:11termerthus concludes my late night (early morning) programming session
08:44:57termerhttps://github.com/termermc/arch-caching-mirror
08:44:58termer:D
08:45:05FromDiscord<Elegantbeef> Also @ajusa you might want to not use `using` inside your readme docs it's 100% unhelpful
08:45:16FromDiscord<Elegantbeef> `func params(req): QueryParams {.raises: [ValueError].}` ah yes `req` i know what that is 😄
08:45:31termerThe nim stdlib is pretty adequate for a lot of things
08:45:46termerwas able to bang out a functional HTTP thingy without any dependencies
08:48:58FromDiscord<Bung> what's your nim version↵(<@709044657232936960_termer=5b=49=52=43=5d>)
08:49:11termermy nim version?
08:49:18termer1.6.10
08:49:27termerlatest stable I believe
08:51:20FromDiscord<Bung> well, I checked related issues have no any updates. maybe just get better result by default gc changed.
08:54:13termeris this replying to an older conversation
08:59:24FromDiscord<Bung> the one I referred to
09:00:07FromDiscord<Bung> " I wasn't getting any problems↵2.5mb consistently even when downloading a 200mb file"
09:02:34termerI'm using ORC
09:02:59termerI've had severe issues with memory leaks when doing multithreading and also when working with sqlite
09:03:05termerso I was expecting to see similar here
09:03:12termereven though I'm not doing either of those
09:03:23termerAsyncHttpClient is very memory-heavy though
09:03:36termereven if it's not reading entire responses to memory
09:06:49FromDiscord<Bung> I can only confirm that problem exists on server side https://github.com/nim-lang/Nim/issues/10661
09:07:15termerthat's only if you call "body"
09:07:35termerwhich, because of Nim's ambiguity between properies and procs, looks like a property to be accessed
09:08:16termerI think a lot of the constructs around AsyncHttpServer and (Async)HttpClient are very poorly designed
09:09:17FromDiscord<0x454d505459> In reply to @Isofruit "May be of interest": I have it installed too
09:10:31FromDiscord<Bung> true, they are poor both client and server
09:10:58termerbut they're the only ones that work properly with orc
09:11:03termerhttpbeast crashes
09:11:12termerso does httpx
09:11:17termeror whatever the linux-only one was
09:11:24termeror one with windows support I mean
09:11:35termerif you compile either of those with orc and then slam them with requests, they crash
09:11:39termertrying to read from null
09:11:42termerSo I don't use them
09:11:59termerrefc chomps memory and I'm not interested in taking more memory just to use a multithreaded webserver
09:12:02termerI can write my own
09:12:15termerbut yeah the state of nim webservers is really bad
09:13:08FromDiscord<Bung> seems like there need more test, since they both important packages in nim's repo
09:14:03FromDiscord<Phil> In reply to @ShalokShalom "Why would you need": You don't necessarily, I just copy pasted that into my notes file to nimqml as one of the useful commands to deal with nimqml
09:14:10FromDiscord<Phil> (edit) "nimqml" => "qml and its packages"
09:21:33FromDiscord<Phil> In reply to @Bung "seems like there need": More tests you say.↵Actually I haven't asked you this one yet, how do you deal with testing in nim?↵Only integration tests? Have you found a way to mock things? Do you have a compiler-flag that replaces your proc with a mock one?
09:24:36FromDiscord<Bung> why ask me that? I think the crash problem can be simply done by a request-response test case
09:58:51FromDiscord<0x454d505459> sent a code paste, see https://play.nim-lang.org/#ix=4j07
10:00:52NimEventerNew thread by grd: Mr. Rumpf, why didn't you went along with the Python standard library?, see https://forum.nim-lang.org/t/9737
10:07:14*ltriant joined #nim
10:09:00FromDiscord<Elegantbeef> I very much dont get why people make such inane posts
10:09:26FromDiscord<Rika> i would just say its just lack of being informed really
10:09:55FromDiscord<Elegantbeef> Maybe "python but compiled" isnt a good thing to say 😄
10:10:48FromDiscord<Rika> havent a good amount of people here been saying that
10:11:19FromDiscord<Elegantbeef> Yea but people still say it sadly
10:11:49*ltriant quit (Ping timeout: 252 seconds)
10:12:08FromDiscord<0x454d505459> In reply to @Elegantbeef "Maybe "python but compiled"": That's true, it isn't a good thing but I would agree up on saying that when it's the first time you use it it really feels like it's compiled python
10:13:26FromDiscord<0x454d505459> Im also sure that most of new Nim users come from python which reinforces that idea of compiled python
10:13:52FromDiscord<0x454d505459> at least I came from python (and JS) 🤣
10:14:18FromDiscord<Rika> me
10:14:18FromDiscord<0x454d505459> (edit) "🤣" => "😅"
10:14:30FromDiscord<Rika> i came from python, dont know how long ago
10:15:01FromDiscord<0x454d505459> I came from python arround 2 years ago,
10:15:40FromDiscord<0x454d505459> once you step up from the "compiled python" idea you write better code
10:15:59FromDiscord<Rika> i never really thought of it as compiled python
10:16:18FromDiscord<Rika> i thought of it more as another language with pretty similar syntax
10:18:16FromDiscord<0x454d505459> The first time I saw nim I was writing a lot of python, due to it's similar syntax it was hard at first to make any difference and I was missmatching stuff from one into another
10:19:58FromDiscord<Takemichi Hanagaki> In reply to @Elegantbeef "Maybe "python but compiled"": Totally agree with you.↵Some languages are real compiled Python, as Cython, tgat uses tha same syntax, with superset.↵Nim is a completely different language. And I'm saying it coming from Python.
10:20:22FromDiscord<Takemichi Hanagaki> (edit) "tgat" => "that" | "tha" => "the"
10:20:43FromDiscord<Takemichi Hanagaki> (edit) "superset.↵Nim" => "some additions.↵Nim"
10:22:06FromDiscord<0x454d505459> btw, therenow is an actuall compiled python, it uses llvm↵https://github.com/exaloop/codon
10:22:30FromDiscord<Bung> what come up to your mind when "python" and "nim" appear at the same time↵? I would say " indentation style", any others I need check the wiki page..
10:23:18FromDiscord<0x454d505459> indentation, keywords and overall syntax
10:24:47FromDiscord<Takemichi Hanagaki> In reply to @0x454d505459 "btw, therenow is an": Interesting idea! And this is a real compiled Python.
10:24:54FromDiscord<0x454d505459> yes
10:25:43FromDiscord<0x454d505459> the only issue is that it doesn't has any usable std or anything like this
10:26:13FromDiscord<0x454d505459> rn it can't just compile your already existing python code
10:26:21FromDiscord<Takemichi Hanagaki> In reply to @0x454d505459 "indentation, keywords and overall": I really just see indentation and some keywords.↵Like `for index, item in array:`.↵But it's completely different. 😄
10:27:10FromDiscord<0x454d505459> ig everyone sees thing differently, or im the one being different lol
10:27:35FromDiscord<Takemichi Hanagaki> In reply to @0x454d505459 "btw, therenow is an": I'll save this link.↵It would be important to me on future.
10:28:18FromDiscord<0x454d505459> it will be important for everyone Im pretty sure, who knows, maybe someday this will be the default python flavour everyone uses
10:32:51FromDiscord<Takemichi Hanagaki> In reply to @0x454d505459 "it will be important": It's a simple way to unlock multithreading without pain and using python syntax. 😂
10:33:02FromDiscord<0x454d505459> true
10:38:11*ltriant joined #nim
10:44:11*junaid_ joined #nim
10:49:12FromDiscord<ShalokShalom> Graal can also compile Python
10:49:55*junaid_ quit (Remote host closed the connection)
10:50:04FromDiscord<ShalokShalom> Codon looks cool 😊
10:58:57FromDiscord<0x454d505459> In reply to @ShalokShalom "Graal can also compile": never heard of this thing gonna google it
11:00:02FromDiscord<0x454d505459> is it graalvm ?
11:06:16FromDiscord<Rika> yes]
11:06:33FromDiscord<Rika> its still vm based but i believe its nowhere near as slow lmao
11:20:17FromDiscord<0x454d505459> To be honest I don't like vms
11:22:05FromDiscord<0x454d505459> rn cpython is faster than java which runs on a vm, that may just be the jvm that is slow, but in general I don't like vm based languages. I think that interpreted and compiled/transpiled languages are better (in my opinion)
11:22:51FromDiscord<ShalokShalom> How many interpreted languages do you know?
11:23:04FromDiscord<0x454d505459> only JS lol
11:23:17FromDiscord<Phil> In reply to @Bung "why ask me that?": I ask that question in general to get an idea how folks in nim deal with testing.↵So far I've seen mostly integration testing as well as adjusting your architecture to have basically individual "layers" that you can test separately
11:23:29FromDiscord<0x454d505459> In reply to @0x454d505459 "only JS lol": I count python as transpiled
11:23:31FromDiscord<ShalokShalom> In reply to @0x454d505459 "only JS lol": Its running in a VM
11:23:45FromDiscord<ShalokShalom> Python is running in a VM as well
11:24:01FromDiscord<0x454d505459> In reply to @ShalokShalom "Its running in a": ik but it still is counted as interpreted
11:24:12FromDiscord<0x454d505459> In reply to @ShalokShalom "Python is running in": ik too
11:24:16FromDiscord<ShalokShalom> The difference between Java and Python is the level of abstraction↵↵And Java gets ultimately compiled way lower down.
11:24:38FromDiscord<ShalokShalom> In reply to @0x454d505459 "ik but it still": Ruby 1.8 was the last popular interpreted language 🙂
11:24:49FromDiscord<0x454d505459> In reply to @ShalokShalom "Ruby 1.8 was the": I never didn't any ruby
11:25:05FromDiscord<Rika> what is the difference to interpreted and VM languages to you
11:25:23FromDiscord<0x454d505459> In reply to @0x454d505459 "I never didn't any": but it must be cool as it is what runs mastodon lol
11:25:57FromDiscord<ShalokShalom> Interpreter have no further compile steps
11:26:10FromDiscord<ShalokShalom> You read source code and bring it to execute
11:26:25FromDiscord<0x454d505459> In reply to @Rika "what is the difference": in vm based source code is transpiled to byte code whereas interpreted are directly read and executed (like bash)
11:26:39FromDiscord<ShalokShalom> https://craftinginterpreters.com/introduction.html
11:26:55FromDiscord<ShalokShalom> Yeah, I think the shells are still interpreted
11:26:59FromDiscord<Rika> but doesnt python have a bytecode compilation step nonetheless
11:27:12FromDiscord<0x454d505459> it has
11:27:27FromDiscord<0x454d505459> In reply to @ShalokShalom "Yeah, I think the": at least bash and fish still are
11:29:20FromDiscord<Bung> I usually do unit test, I mock data by import file, I don't have needs replace proc with a mock one so far, sure, nothing interesting here.↵(@Phil)
11:53:54*jmdaemon quit (Ping timeout: 260 seconds)
11:54:34FromDiscord<0x454d505459> In reply to @Isofruit "I was about to": This is why I wanted to be able to spawn process without a shell status (warning it may be for sure the worst code you ever looked at)↵https://github.com/0x454d505459/nimSh/blob/main/nimSh.nim
11:57:14FromDiscord<Phil> In reply to @0x454d505459 "This is why I": I raise you code from biologists that barely learned coding, I doubt it
11:57:40FromDiscord<0x454d505459> In reply to @Isofruit "I raise you code": well at least that the worst I ever written
11:58:19FromDiscord<Phil> Anyway, can't look at it rn, that would require brain power that I currently have to invest into work
11:58:28FromDiscord<0x454d505459> sure no problem
12:41:18FromDiscord<albassort> is there anything you can do with a closure iterator that you cant do with anything else?
12:43:04FromDiscord<Bung> what's the problem exactly?
12:44:09FromDiscord<albassort> just refactoring code and im deciding if i should retrofit this closure iterator with a type and a tick function or keep it the way it is
12:44:31FromDiscord<albassort> it is a bit strange code, it requires a lot of state management so i made it a closure iterator with a ref seq[] to feed it more data
12:44:57FromDiscord<albassort> i think i could do the same thing with just a ton of variables in a type
12:46:24FromDiscord<albassort> so its either like a object with like 20 parts or a closure strange closure iterator
12:52:16FromDiscord<Bung> I dont quite get it, so the original proc is iterator too or something else?
12:54:56FromDiscord<Bung> I only see 4 places use `isClosureIterator` in compiler code
12:59:43FromDiscord<jan Apisu> nim
13:16:03FromDiscord<exelotl> nim
13:18:36FromDiscord<ajusa> nim
13:30:25FromDiscord<ShalokShalom> nim
13:44:14FromDiscord<albassort> In reply to @Bung "I dont quite get": it was originally a proc, then became a closure
13:44:34FromDiscord<albassort> transforming it into a type with procs
13:46:09FromDiscord<Phil> In reply to @ShalokShalom "nim": nom
13:50:55FromDiscord<Bung> so safe capture should be taken care of https://nim-lang.org/docs/manual.html#procedures-closures↵(@albassort)
13:51:32FromDiscord<albassort> ?
13:55:35FromDiscord<ShalokShalom> In reply to @Isofruit "nom": Nom nom
13:55:50FromDiscord<Phil> In reply to @ShalokShalom "Nom nom": Omnomnomnomon
14:23:02FromDiscord<ajusa> Fixed beef, thanks! Fwiw I used mddoc to automatically generate the docs, wasn't deliberately trying to hide the types
14:38:38*arkurious joined #nim
14:47:06FromDiscord<Evissim> Is there a way to create a bitfield 256+ bits long for use with things like bitops' setBit and testBit?
15:12:21FromDiscord<auxym> bitops takes SomeInteger, defined here https://nim-lang.org/docs/system.html#SomeInteger so no
15:12:29FromDiscord<auxym> but have a look at https://github.com/treeform/bitty
15:14:05FromDiscord<Evissim> Thank you! Another Treeform lib saving the day 😀
15:42:16FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4j1D
15:42:47FromDiscord<albassort> ok
15:42:49FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4j1E
15:44:25*xaltsc quit (Quit: WeeChat 3.7.1)
15:53:56FromDiscord<albassort> how can i compile everything statically except for my c dependency
15:54:00FromDiscord<albassort> which is compiled dynamically
15:54:28NimEventerNew thread by fsh: Looking for resources about more complex generics, comptime type construction, etc., see https://forum.nim-lang.org/t/9738
15:54:35*xaltsc joined #nim
16:12:07*kenran joined #nim
16:12:29*kenran quit (Remote host closed the connection)
16:14:38FromDiscord<auxym> In reply to @albassort "how can i compile": maybe this can help? https://github.com/kaushalmodi/hello_musl
16:17:27FromDiscord<albassort> hmmm
16:17:36FromDiscord<albassort> perhaps choosing gtk was a bad idea
16:18:07FromDiscord<albassort> :Dead:
16:19:10FromDiscord<albassort> instead of compiling static I'll just compile with whatever version of glibc that debian is currently using
17:01:13FromDiscord<Yandall> Hi! I'm still learning nim but I want to make a project with it, do you guys have any ideas?
17:09:19*jmdaemon joined #nim
17:11:01FromDiscord<ShalokShalom> In reply to @albassort "perhaps choosing gtk was": Really 😅
17:15:52FromDiscord<Phil> In reply to @Yandall "Hi! I'm still learning": Sure, what your current coding knowledge background?
17:16:47FromDiscord<Yandall> Mostly web developer in nodejs. But I'am open to almost anything
17:17:12FromDiscord<Phil> sent a long message, see http://ix.io/4j2a
17:18:57FromDiscord<Phil> For SSR for example we have nimja.↵Would be pretty convenient if there was a package that I could plonk in, feed it an HTML string and ask it "this text should be rendered, is it in there?"↵If you're willing to make it much more specific, it would be really neat if one could check whether a given nimja template occurs N times or EqualOrGreaterThan, or EqualOrLessThan, or GreaterThan or LessThan N times)
17:20:05FromDiscord<Phil> Such a package has the nice side-effect that you'd get to dive right into how testing works in nim and familiarity with webdev should make some things easier regarding dealing with HTML
17:22:33FromDiscord<Yandall> In reply to @Isofruit "Because nim could use": Like how many times a specific tag or text appears in that HTML?
17:25:22FromDiscord<ezquerra> I'm trying to automate the installation of nim into a docker image. A requirement I have is that telemetry must be disabled. Is there a way to do that? The instructions in the nim page say to run `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` and follow the instructions (since this is running the script interactively). Is there some other way?
17:27:09FromDiscord<Phil> sent a long message, see http://ix.io/4j2h
17:27:20FromDiscord<Phil> (edit) "http://ix.io/4j2h" => "http://ix.io/4j2i"
17:27:42FromDiscord<Phil> (edit) "http://ix.io/4j2i" => "http://ix.io/4j2j"
17:32:13FromDiscord<Phil> And specifically for nimja I'd love a package that makes answering the question easy:↵"Is this nimja template contained within my HTML string exactly/greater than/less than/ greater equal than/less equal then N times"
17:32:30FromDiscord<HitBlast> Hello! I'm a beginner to Nim and am up for a task of migrating a really large Python dictionary. ↵↵I'm often coming across writing `.toTable` after each table ends. Is there a way to shorten the process of converting to tables by just writing `.toTable` once? https://media.discordapp.net/attachments/371759389889003532/1054451169214341120/Screenshot_2022-12-19_at_11.30.09_PM.png
17:32:34FromDiscord<Phil> (edit) "times"" => "times"↵Though that's bonus point territory and may be wandering off into "can't be done" land"
17:34:26FromDiscord<HitBlast> (edit) "ends." => "ends inside the sequence."
17:39:38FromDiscord<Phil> sent a code paste, see https://paste.rs/tiV
17:40:23FromDiscord<HitBlast> In reply to @Isofruit "I mean, you could": oh cool, so the structure of the previous code will be preserved as well?
17:40:57FromDiscord<Phil> In reply to @HitBlast "oh cool, so the": Structure in what sense?
17:41:14FromDiscord<HitBlast> In reply to @Isofruit "Structure in what sense?": accessing the data in the returned table
17:41:15FromDiscord<HitBlast> or dictionary
17:41:27FromDiscord<Yandall> In reply to @Isofruit "And specifically for nimja": Right, I get what you are saying, but maybe something less specific to start with? 😅
17:43:37FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4j2s
17:43:43FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4j2s" => "https://play.nim-lang.org/#ix=4j2t"
17:43:48FromDiscord<Phil> (since you have a seq of tables aka dictionaries
17:43:50FromDiscord<Phil> (edit) "dictionaries" => "dictionaries)"
17:43:55FromDiscord<HitBlast> In reply to @Isofruit "Ahhh check, yeah accessing": Great
17:44:06FromDiscord<HitBlast> Thanks for the help, I guess
17:44:11FromDiscord<HitBlast> :D
17:44:24FromDiscord<Phil> I swear there's also more syntax on how to create tables but I'd need to go searching
17:44:59FromDiscord<HitBlast> It's a bit hard to find information on Nim stuff outside the documentation but hopefully the situation will be better.
17:45:03FromDiscord<HitBlast> (edit) "better." => "better over time."
17:46:20FromDiscord<Phil> If you figure something out that was non obvious to you and you previously couldn't google it well, I recommend making a self-answered SO question for later
17:47:08FromDiscord<Phil> In reply to @Yandall "Right, I get what": Yeh, that's why that's just the bonus points 😛↵Something that can take in an HTML string for starters and allows answering those questions on it already suffices I think
17:47:39FromDiscord<Phil> (edit) "In reply to @Yandall "Right, I get what": Yeh, that's why that's just the bonus points 😛↵Something that can take in an HTML string for starters and allows answering those questions ... on" added "(the ones not specific to nimja)"
17:48:36FromDiscord<Phil> At least I'd start integrating that pretty quickly into my snorlogue-package tests
17:48:46FromDiscord<Yandall> Yeah, I can work with that
17:49:05FromDiscord<Yandall> Is there examples of that feature in other languages?
17:49:19FromDiscord<Phil> In reply to @Yandall "Is there examples of": What feature do you mean specifically?
17:50:05FromDiscord<Yandall> In reply to @Isofruit "Because nim could use": .
17:51:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4j2w
17:52:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4j2x
17:52:38FromDiscord<Phil> the key bits is the line of code with `expect`
17:54:09FromDiscord<Phil> so maybe sth like:↵`html.toContainCSSQueryGreaterOrEqualThan("a h4.potato", 5)`
17:54:48FromDiscord<Phil> and `html.toContainGreaterOrEqualThan("PotatoHeading", 5)`
17:56:02FromDiscord<Phil> Other features worth thinking about could be to provide procs that check if an object is contained in the HTML (stringify the object via `$` proc for example and then check if that is contained) .↵Or whether an object's JSON representation is in there
17:57:03FromDiscord<Yandall> Sounds like a fun way to learn more about Nim
17:57:06FromDiscord<Yandall> Thanks
17:57:54FromDiscord<Phil> In reply to @Yandall "Sounds like a fun": No worries, I've got more ideas for packages/patches that the nim ecosystem could need in the webdev space than I have time at the moment 😄
18:05:00*pro joined #nim
18:05:28*pro left #nim (#nim)
18:50:27termerhas anyone here made an AUR package for a nim program?
18:54:15FromDiscord<0x454d505459> never saw any
18:54:34FromDiscord<huantian> termer i have, see pax-mc
18:54:35FromDiscord<0x454d505459> but we can look ik
18:55:05termerhuantian How did you deal with using choosenim
18:55:12termercause the nim version in the community arch repo is really outdated
18:55:48FromDiscord<auxym> does aur count? https://aur.archlinux.org/packages/nitter-git
18:56:10termerAUR is what I'm meaning so yeah
18:56:11FromDiscord<0x454d505459> well that's what was asked for
18:56:17FromDiscord<huantian> I `makedepends=('nim')` and `choosenim` provides `nim`
18:56:24termerit does?
18:56:33FromDiscord<huantian> so it works no matter if you have `nim` or `choosenim` installed
18:56:38FromDiscord<huantian> also `nim` is up to date in the arch repos
18:56:52termerI guess the compiler will yell at you if you have the wrong nim version anyway
18:56:55FromDiscord<auxym> In reply to @0x454d505459 "well that's what was": oh... yeah. Somehow my brain read an Arch package
18:57:30FromDiscord<0x454d505459> sent a long message, see http://ix.io/4j30
18:57:43FromDiscord<auxym> In reply to @termer "I guess the compiler": nimble will if you have the correct `requires` entry for nim
18:57:50termerright
18:58:28FromDiscord<0x454d505459> In reply to @0x454d505459 "in the aur there": if you want to look for more you can use google dorking `site:aur.archlinux.org "nim"`
19:03:05FromDiscord<0x454d505459> this one filters more stuff `site:aur.archlinux.org inurl:packages "nim" -inurl:K= -inurl:?ID_ -inurl:?from`
19:03:33FromDiscord<0x454d505459> it's sad that we can't use regexes along with google dorking
19:32:29*wallabra quit (Ping timeout: 252 seconds)
19:33:02*wallabra joined #nim
19:41:39*wallabra quit (Ping timeout: 265 seconds)
19:43:37NimEventerNew thread by resolritter: Splat operator implementation with macros, see https://forum.nim-lang.org/t/9739
19:48:37NimEventerNew post on r/nim by AsterOps: Nim in Action - still valid resource?, see https://reddit.com/r/nim/comments/zq1iam/nim_in_action_still_valid_resource/
20:00:10*xet7 joined #nim
20:02:57termerI was wondering about the recently
20:03:04termerI got a peak at the repo and it doesn't compile anymore
20:03:14termerexcept for the updated branch
20:03:24termerwhich has some significant changes in async
20:17:18*kenran joined #nim
20:17:36*kenran quit (Remote host closed the connection)
20:21:01*disso_peach joined #nim
20:28:31*wallabra joined #nim
20:31:19FromDiscord<!&luke> hi
20:31:23*disso_peach quit (Quit: Leaving)
20:31:36FromDiscord<!&luke> how can i get the latest tag of a git repo as a tar
20:33:52*wallabra quit (Ping timeout: 252 seconds)
20:37:26FromDiscord<EyeCon> ...with Nim?
20:39:37FromDiscord<!&luke> well its more of a gthub question but i didnt know where else to ask it
20:39:55FromDiscord<!&luke> In reply to @EyeCon "...with Nim?": well yes i need it for a nim rogram
20:39:57FromDiscord<!&luke> (edit) "rogram" => "program"
20:46:56FromDiscord<Yepoleb> In reply to @ripluke "how can i get": do you want to automate it?
20:47:16FromDiscord<!&luke> well id prefer if there was a url
20:47:17FromDiscord<Yepoleb> on github you can just go to releases and download it there
20:47:26FromDiscord<!&luke> In reply to @Yepoleb "do you want to": yes
20:48:13FromDiscord<Yepoleb> https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8
20:48:27FromDiscord<Yepoleb> "One Liner to Download the Latest Release from Github Repo.md"
20:48:45FromDiscord<!&luke> ok thx
20:49:08FromDiscord<Yepoleb> apparently there is an official feature now https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases
20:49:38FromDiscord<huantian> oh neeat that's probably the better way to do it
20:49:49FromDiscord<huantian> no intermediate api request
20:50:06FromDiscord<Yepoleb> but it probably has to be a proper release and not a tag
21:05:52NimEventerNew thread by DougT: Tutorial for nim pixie graphics?, see https://forum.nim-lang.org/t/9740
21:10:19FromDiscord<<She>Horizon</Her>> In reply to @NimEventer "New thread by resolritter:": Not a genius and don't understand what they're asking exactly, but couldn't `https://nim-lang.org/docs/macros.html#unpackInfix%2CNimNode` fulfill their needs?
21:10:46FromDiscord<<She>Horizon</Her>> Nvm misread it completely
21:11:16FromDiscord<<She>Horizon</Her>> Plus unpackInfix is for NimNodes... Maybe it still can fulfill what they want though, don't think so thought
21:29:03NimEventerNew post on r/nim by kJon02: When does the cycle collector kick in?, see https://reddit.com/r/nim/comments/zq44f0/when_does_the_cycle_collector_kick_in/
21:33:04NimEventerNew post on r/nim by SpookyFries: Drop files onto a Nim based application (Mac)?, see https://reddit.com/r/nim/comments/zq47v1/drop_files_onto_a_nim_based_application_mac/
21:35:11*xaltsc quit (Quit: WeeChat 3.7.1)
21:37:28*xaltsc joined #nim
21:37:32FromDiscord<iffy (Matt Haggard)> Anyone familiar with chronos/websock libraries\: how do I get the remote client's IP from the server? For instance, inside this proc\: https://github.com/status-im/nim-websock/blob/main/examples/server.nim#L18
22:02:35FromDiscord<iffy (Matt Haggard)> Found it\: request.stream.writer.tsource.remoteAddress().host()
22:29:37arkanoidgeneric question. If I write functions with float32 arguments, should I also define all the float literals inside the code as float32, or will the compiler do that for me somehow?
23:30:41FromDiscord<auxym> sent a code paste, see https://play.nim-lang.org/#ix=4j4j
23:33:54FromDiscord<Elegantbeef> Well that tells me the matrix bridge died
23:34:15FromDiscord<Elegantbeef> A float literal without f is a 64bit float unless it's going into a call that takes `float32`↵like `proc doThing(f: float32) = discard; doThing(10.3)` converts 10.3 into `float32`
23:46:13*moonlit_ quit (Quit: Leaving)
23:59:30*Lord_Nightmare quit (Quit: ZNC - http://znc.in)