00:00:03 | FromDiscord | <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:53 | FromDiscord | <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:26 | FromDiscord | <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:29 | FromDiscord | <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:20 | FromDiscord | <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:06 | FromDiscord | <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:13 | FromDiscord | <guzba> (edit) "mummy" => "mummy," |
00:06:29 | FromDiscord | <Elegantbeef> Yea my rule is never write `seq[T]` if `openArray[T]` suffices |
00:06:40 | FromDiscord | <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:15 | FromDiscord | <guzba> it makes sense, just need to overcome inertia of what one is used to |
00:07:39 | FromDiscord | <guzba> nice thing about it is it doesnt break ppls stuff if fixed later |
00:07:49 | FromDiscord | <guzba> is ok to not get perfect day 1 |
00:07:53 | * | wallabra_ is now known as wallabra |
00:08:07 | FromDiscord | <guzba> (from a nimble library perspective) |
00:08:26 | FromDiscord | <Elegantbeef> Yea make it work, then make it work fast and all that jazz |
00:08:42 | FromDiscord | <Elegantbeef> It's just people often reach for `seq[T]` which means more allocations and less flexible apis |
00:08:43 | FromDiscord | <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:02 | FromDiscord | <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:31 | FromDiscord | <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:02 | FromDiscord | <Elegantbeef> You can make an overload that takes a string if you want to remove that |
00:12:21 | FromDiscord | <guzba> totally, its not an excuse not to improve things |
00:12:25 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iY6 |
00:12:43 | FromDiscord | <Elegantbeef> God dammit element really doesnt like to respect me with codeblocks and emojies |
00:13:52 | FromDiscord | <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:15 | FromDiscord | <Elegantbeef> Yea you should be able to do `myCstring.toOpenArray(0, len).startsWith("bleh")` |
00:14:30 | FromDiscord | <Elegantbeef> unicode and parseutils now support it so that's good |
00:14:42 | FromDiscord | <Gumbercules> also being able to do something like `myCString = myCharArray` would be really nice |
00:14:45 | FromDiscord | <Elegantbeef> The important modules work with it, it's now just the more user space ones that need support |
00:14:46 | FromDiscord | <Gumbercules> or the reverse |
00:15:07 | FromDiscord | <Gumbercules> without having to write a copyStr function or something similar and rely on copyMem |
00:15:36 | FromDiscord | <Gumbercules> or maybe you can do this already and I'm just out of the loop |
00:15:47 | FromDiscord | <Elegantbeef> I think what you want is a bit iffy |
00:16:08 | FromDiscord | <Gumbercules> well a pointer to an array of characters is essentially a cstring |
00:16:14 | FromDiscord | <Elegantbeef> Depending on how your cstring is stored that's quite ambiguous |
00:16:28 | FromDiscord | <Gumbercules> as long as it is null terminated |
00:16:29 | FromDiscord | <Elegantbeef> If it's a length delmited cstring you cannot use just `=` |
00:16:43 | FromDiscord | <Gumbercules> well I'm fine with taking a slice |
00:16:49 | FromDiscord | <Elegantbeef> Sure but how do you reason that it's null terminated from `a = b`? |
00:16:52 | FromDiscord | <Gumbercules> I'm really more after the myCharArray = myCstring now that I think about it |
00:17:15 | FromDiscord | <Elegantbeef> Well you should be able to do `myCharArray = myCstring.toOpenArray(0, len)` |
00:17:19 | FromDiscord | <Elegantbeef> gotta check |
00:17:23 | FromDiscord | <Gumbercules> hmm if so that's nice |
00:18:02 | FromDiscord | <Gumbercules> but yeah in general the more cstring and char array support that goes into the stdlib is good |
00:18:10 | FromDiscord | <Elegantbeef> Nope doesnt work |
00:18:13 | FromDiscord | <Gumbercules> via openArray |
00:18:46 | FromDiscord | <Gumbercules> bah |
00:18:51 | FromDiscord | <Elegantbeef> Does work though |
00:18:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iY9 |
00:19:03 | FromDiscord | <Gumbercules> that's not horrible |
00:19:28 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> I'd say the best binary data is `openarray[byte]` |
00:19:55 | FromDiscord | <Gumbercules> isn't byte just an alias to `uint8`? |
00:19:59 | FromDiscord | <Yepoleb> especially binary data in strings grinds my gears, this is just repeating the python2 mistake |
00:20:10 | FromDiscord | <Elegantbeef> byte \> uint8 for binary data cause it's 'unknown' |
00:20:56 | FromDiscord | <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:59 | FromDiscord | <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:20 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/theindex.html#toOpenArrayByte solves all problems |
00:22:38 | FromDiscord | <Yepoleb> https://nim-lang.org/docs/net.html#send%2CSocket%2Cstring |
00:22:40 | FromDiscord | <Yepoleb> this one here |
00:22:42 | FromDiscord | <Yepoleb> i hate this so much |
00:22:45 | FromDiscord | <Elegantbeef> I dont disagree |
00:22:50 | FromDiscord | <Elegantbeef> Atleast there is a `pointer` variant |
00:23:38 | FromDiscord | <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:48 | FromDiscord | <guzba> i gave up fighting it a long time ago |
00:24:02 | FromDiscord | <Elegantbeef> Meh reading from a file is better to be string imo |
00:24:10 | FromDiscord | <Elegantbeef> Most people are expecting characters from there |
00:24:28 | FromDiscord | <Elegantbeef> `openarray[byte]` accepts all collections of data |
00:24:28 | FromDiscord | <guzba> hardly any files are strings |
00:24:41 | FromDiscord | <guzba> i guess if you think people are opening json or txt its fine |
00:24:43 | FromDiscord | <guzba> but anything else |
00:25:03 | FromDiscord | <Elegantbeef> Even then that's not really a consumer of binary data |
00:25:39 | FromDiscord | <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:06 | FromDiscord | <Elegantbeef> You can use every single data type you'd want to with it without a copy |
00:27:20 | FromDiscord | <Elegantbeef> shit |
00:27:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYa |
00:28:25 | FromDiscord | <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:28 | FromDiscord | <guzba> mabye this is old |
00:28:56 | FromDiscord | <Elegantbeef> It's just empirically the best 😛 |
00:28:56 | FromDiscord | <Yepoleb> i'd love this |
00:28:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYc |
00:29:06 | FromDiscord | <guzba> readfile string is double bad. its like "string" for binary + also char instead of byte, rage |
00:29:10 | FromDiscord | <Elegantbeef> Static typing is great |
00:29:53 | FromDiscord | <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:57 | FromDiscord | <Elegantbeef> Atleast that's how iview it |
00:30:04 | FromDiscord | <guzba> sure but now readFile is text only? |
00:30:13 | FromDiscord | <guzba> how do i read a file that isnt text? |
00:30:13 | FromDiscord | <guzba> hehe |
00:30:21 | FromDiscord | <Elegantbeef> I dont really see the issue |
00:30:30 | FromDiscord | <Elegantbeef> Your consumer can convert it to an `openarray[byte]` |
00:30:42 | FromDiscord | <Elegantbeef> Or you can convert it yourself |
00:30:54 | FromDiscord | <Yepoleb> string to seq[bytes] or openarray is easy, the other way around is not |
00:31:03 | FromDiscord | <Elegantbeef> Well it's easy it's just costly |
00:31:22 | FromDiscord | <Yepoleb> what's the easy way? |
00:32:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYe |
00:32:46 | FromDiscord | <Elegantbeef> Or copy mem if you want it to only work on native but be fast |
00:32:49 | FromDiscord | <Yepoleb> sent a code paste, see https://play.nim-lang.org/#ix=4iYg |
00:33:19 | FromDiscord | <Yepoleb> pretty much the same \:D |
00:33:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4iYh |
00:33:41 | FromDiscord | <Yepoleb> i assumed gcc will give me a memcopy anyway |
00:34:08 | FromDiscord | <albassort> i finally hit 100k lines! |
00:34:09 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1054194894840791071/image.png |
00:34:39 | FromDiscord | <Yepoleb> i always code with compiler optimization in mind |
00:34:56 | FromDiscord | <Yepoleb> and just use the dumb implementation |
00:36:15 | FromDiscord | <Yepoleb> but needing such a basic function to interface with low level apis is annoying |
00:37:12 | FromDiscord | <Yepoleb> always fighting a bad api |
00:37:23 | FromDiscord | <albassort> yea |
00:37:41 | FromDiscord | <albassort> my project is in the last phase whoooo |
00:37:52 | FromDiscord | <albassort> only a few more features and then i enter testing |
00:38:00 | FromDiscord | <albassort> ...well, more testing |
00:38:05 | FromDiscord | <albassort> portability testing |
00:38:13 | FromDiscord | <Yepoleb> is that including modules?↵(@albassort) |
00:38:27 | FromDiscord | <albassort> including modures and static reads |
00:38:30 | FromDiscord | <albassort> (edit) "modures" => "modules" |
00:38:37 | FromDiscord | <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:46 | FromDiscord | <guzba> neither with -d:release or -d:danger |
00:38:54 | FromDiscord | <guzba> sent a code paste, see https://play.nim-lang.org/#ix=4iYl |
00:38:58 | FromDiscord | <guzba> 10x slower to use toString1() |
00:41:07 | FromDiscord | <Elegantbeef> With `-d:lto`?↵(@guzba) |
00:41:21 | FromDiscord | <guzba> no change |
00:41:31 | FromDiscord | <guzba> `nim c -d:danger -d:lto --mm:orc -r .\tests\tmp.nim` |
00:41:37 | FromDiscord | <guzba> tried refc too |
00:42:10 | FromDiscord | <Elegantbeef> Yea it's not optimised out on clang or gcc |
00:42:39 | FromDiscord | <Yepoleb> i remember this working in c++ |
00:43:25 | FromDiscord | <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:33 | FromDiscord | <Yepoleb> clipboard.png https://media.discordapp.net/attachments/371759389889003532/1054197259585192046/clipboard.png |
00:43:56 | FromDiscord | <guzba> haha sorry to hearbreak |
00:44:14 | FromDiscord | <Elegantbeef> There are some nice compiler optimisations for arrays/sets though 😄 |
00:44:42 | FromDiscord | <Elegantbeef> Constant arrays with `-d:danger` are generally turned into just binary ops instead of iteration |
00:44:48 | FromDiscord | <Elegantbeef> like `if someInt in [10, 20, 30]` |
00:46:00 | FromDiscord | <Elegantbeef> But that could be done with a macro 😄 |
00:46:20 | FromDiscord | <Bung> why -d\:danger required in such a case |
00:46:38 | FromDiscord | <Elegantbeef> removes range check |
00:49:18 | FromDiscord | <Bung> after set construction semchecked I hope that optimisation |
00:53:40 | FromDiscord | <Yepoleb> what the hell when did compilers stop optimizing simple copy loops, it does not even do it for c++ |
00:53:48 | FromDiscord | <Yepoleb> i swear they did this at some point |
01:02:06 | FromDiscord | <Yepoleb> wat |
01:02:11 | FromDiscord | <Yepoleb> clipboard.png https://media.discordapp.net/attachments/371759389889003532/1054201947693006928/clipboard.png |
01:03:04 | FromDiscord | <guzba> oh no, he opened the box that must not be opened |
01:03:33 | FromDiscord | <guzba> now you must live with the knowledge |
01:03:45 | FromDiscord | <Elegantbeef> Godbolt and pandora are spelt differently the last i checked |
01:03:46 | FromDiscord | <Yepoleb> this is so incredibly dumb |
01:04:24 | FromDiscord | <Yepoleb> with clang 14 -O3 |
01:04:25 | FromDiscord | <Yepoleb> sent a code paste, see https://play.nim-lang.org/#ix=4iYv |
01:05:12 | FromDiscord | <Yepoleb> also this |
01:05:12 | FromDiscord | <Yepoleb> clipboard.png https://media.discordapp.net/attachments/371759389889003532/1054202711970689034/clipboard.png |
01:06:00 | FromDiscord | <Yepoleb> (i forgot how to construct string of fixed size) |
01:08:24 | FromDiscord | <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:19 | FromDiscord | <Elegantbeef> nah C++ is very much underdone |
01:09:25 | FromDiscord | <Elegantbeef> It's like a medium rare chicken breast |
01:09:33 | FromDiscord | <Yepoleb> i used it as my main language for a few years |
01:10:00 | FromDiscord | <Yepoleb> and jumped ship when i realized there is no way it can be saved |
01:13:32 | FromDiscord | <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:38 | FromDiscord | <Yepoleb> also this is just basic\_string, wait till they release complex\_string in c++30 |
01:13:43 | FromDiscord | <guzba> lol |
01:14:28 | FromDiscord | <Elegantbeef> The fun part is "hello" in rust and C++ is a cstring |
01:14:28 | FromDiscord | <albassort> how do i specify a branch in nimble |
01:14:34 | FromDiscord | <albassort> requires "yaml@#devel" |
01:14:37 | FromDiscord | <albassort> doesn't work |
01:14:45 | FromDiscord | <Elegantbeef> That should be it |
01:15:20 | FromDiscord | <albassort> you don't need the @ in nimble |
01:15:23 | FromDiscord | <albassort> weird but ok |
01:17:12 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4iYA |
01:17:20 | FromDiscord | <albassort> idk man the only one i don't truly need is constructor |
01:17:29 | FromDiscord | <Elegantbeef> It's shit software! |
01:17:55 | FromDiscord | <albassort> really should be in the stdlib and fleshed out |
01:19:46 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4iYC |
01:19:51 | FromDiscord | <albassort> this is the only time I ever used it lmao |
01:19:58 | FromDiscord | <albassort> every other one is manual |
01:21:22 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4iYD |
01:21:40 | FromDiscord | <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:56 | FromDiscord | <albassort> the great refactoring is coming |
01:21:57 | FromDiscord | <Yepoleb> and i feel like i can actually improve things here |
01:24:08 | FromDiscord | <Yepoleb> c++ needs written proposal documents for everything and then the boomer consortium just throws it out anyway |
01:24:10 | FromDiscord | <Yepoleb> committee, not consortium |
01:24:11 | FromDiscord | <Yepoleb> such a hard word |
01:24:36 | FromDiscord | <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:40 | FromDiscord | <guzba> motivation is a rare resource |
01:25:22 | FromDiscord | <Elegantbeef> Viewtypes and IC is all i really want to see be live |
01:25:44 | FromDiscord | <Yepoleb> what's IC? |
01:25:55 | FromDiscord | <Elegantbeef> Incremental compilation |
01:26:03 | FromDiscord | <cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYF |
01:26:07 | FromDiscord | <cia.gov> im so confused why this is happening |
01:26:12 | FromDiscord | <albassort> In reply to @guzba "i am "just a": there is.... a lot of drama |
01:26:28 | FromDiscord | <guzba> haha |
01:26:32 | FromDiscord | <albassort> but |
01:26:35 | FromDiscord | <albassort> less so then normal |
01:26:36 | FromDiscord | <Yepoleb> is there really? |
01:26:38 | FromDiscord | <guzba> i think its ok if i dont know how the sausage is made |
01:26:46 | FromDiscord | <albassort> In reply to @Yepoleb "is there really?": its relative |
01:26:56 | FromDiscord | <albassort> it feels like a lot even though its very minor and very little |
01:27:14 | FromDiscord | <albassort> apart from nimskull, which, is all in all non-dramatic somehow |
01:27:59 | FromDiscord | <Elegantbeef> But Nim needs more compiler contributors! 😛↵(@guzba) |
01:28:06 | FromDiscord | <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:15 | FromDiscord | <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:30 | FromDiscord | <albassort> In reply to @Elegantbeef "But Nim needs more": I'll get right on that (never) |
01:28:40 | FromDiscord | <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:00 | FromDiscord | <guzba> im not naturally attracted to compiler stuff for some reason, at least at this point |
01:29:11 | FromDiscord | <Yepoleb> the compiler works well enough |
01:29:26 | FromDiscord | <albassort> compiler stuff is neat but i feel anything i would contribute would only make it worse |
01:29:54 | FromDiscord | <Elegantbeef> It's not like Araq allows tremendously shit code into it |
01:30:06 | FromDiscord | <Elegantbeef> I mean i've contributed and i'm an idiot |
01:30:33 | FromDiscord | <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:38 | FromDiscord | <albassort> (edit) "critques" => "critiques" |
01:30:58 | FromDiscord | <Elegantbeef> Compiler development is small changes |
01:32:45 | arkanoid | is it possible to turn "Foo[T1,T2,T3]" into "FooTensor[Tensor[T1], Tensor[T2], Tensor[T3]] with a template? |
01:33:01 | FromDiscord | <Yepoleb> don't you always get short glimpses just by doing normal things?↵(@guzba) |
01:36:56 | FromDiscord | <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:08 | FromDiscord | <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:18 | FromDiscord | <guzba> ah ok if we include looking at stdlib code then yeah i see that a lot |
01:38:05 | FromDiscord | <Yepoleb> i never had to look at the codegen parts |
01:38:15 | FromDiscord | <Yepoleb> they luckily just work |
01:38:18 | FromDiscord | <guzba> yeah i guess that is more what i meant, wasnt clear |
01:39:15 | FromDiscord | <Elegantbeef> Hey it's hardly ever codegen that doesnt work |
01:39:18 | FromDiscord | <Elegantbeef> Semantic analysis generally breaks |
01:39:49 | FromDiscord | <guzba> a new account has spammed several community channels with an amazing crypto opportunity fyi not sure if mod around |
01:41:45 | FromDiscord | <Rika> In reply to @guzba "a new account has": Yo brb imma jump on that opportunity |
01:41:53 | FromDiscord | <Rika> Why have money when you can lose it |
01:42:27 | arkanoid | it feels great when you don't have any. Talking as a professional in this matter |
01:44:13 | FromDiscord | <Yepoleb> i already pinged mods in offtopic where it started |
01:44:13 | FromDiscord | <Yepoleb> but usually takes half a day for it to get removed |
01:45:03 | FromDiscord | <Rika> In reply to @arkanoid "it feels great when": Professional gambler 😎 |
01:45:57 | arkanoid | Rika, kinda: professional picker of low-paying jobs |
01:46:08 | FromDiscord | <Yepoleb> not having money means losing much less due to inflation, now is the perfect time to be poor |
01:48:08 | FromDiscord | <Yepoleb> arkanoid\: what are your top 5 low-paying jobs? |
01:48:15 | FromDiscord | <Yepoleb> looking for advice |
01:48:22 | FromDiscord | <Yepoleb> \professional advice |
01:48:34 | FromDiscord | <Yepoleb> don't want to take advice from just anyone |
01:49:44 | FromDiscord | <Rika> Try fast food service |
01:50:11 | arkanoid | Sure. 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:05 | FromDiscord | <Rika> Surely even the most benign sounding research work can be abused for unethical purposes |
01:51:24 | v9fk | arkanoid: can you name some countries as examples? |
01:51:48 | arkanoid | sure! the one where I am in? |
01:52:11 | FromDiscord | <Bung> why country matters? |
01:52:58 | arkanoid | well, can't talk for ANY country here. I've heard about highly paid research jobs out there ... poor guys |
01:54:18 | FromDiscord | <Elegantbeef> Arkanoid i think what you're after can only be done with a macro not a template |
01:54:23 | FromDiscord | <Elegantbeef> Atleast i cannot think of any way to do it otherwise |
01:54:57 | FromDiscord | <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:27 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=4iYI |
01:55:37 | arkanoid | Elegantbeef, I have yet to hit that chapter in Araq book. I have spaghetti knowlege of macros |
01:55:48 | FromDiscord | <Elegantbeef> In that case i think you have the proc directly ajusa |
01:55:51 | FromDiscord | <Elegantbeef> Echo `handler.treeRepr` |
01:57:21 | arkanoid | Yepoleb, 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:10 | FromDiscord | <Yepoleb> heartwarming |
01:59:34 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=4iYK |
02:00:07 | * | wallabra quit (Ping timeout: 252 seconds) |
02:02:20 | FromDiscord | <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:06 | FromDiscord | <Elegantbeef> just use micros 😛 |
02:05:27 | FromDiscord | <Yepoleb> am i doing something wrong if i don't have macros in my code? |
02:07:05 | * | wallabra joined #nim |
02:07:19 | FromDiscord | <Elegantbeef> If you dont need them you dont need them |
02:07:27 | FromDiscord | <Elegantbeef> I personally find them the most compelling part of Nim |
02:11:37 | FromDiscord | <Yepoleb> it's great to have them as a the most powerful problem solver |
02:23:28 | NimEventer | New Nimble package! depot - For working with S3-compatible storage APIs, see https://github.com/guzba/depot |
02:31:48 | FromDiscord | <Yepoleb> damn another guzba package |
02:33:12 | FromDiscord | <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:34 | FromDiscord | <Yepoleb> that's 70% hash functions lol |
02:33:49 | FromDiscord | <guzba> yeah lol i may pull out the hashing into a hash repo someday |
02:34:00 | FromDiscord | <guzba> i have a private one started with crc32 and other stuff |
02:34:06 | FromDiscord | <guzba> intrisinc versions + just cpu |
02:34:12 | FromDiscord | <guzba> could be useful but not really fleshed out yet |
02:34:46 | FromDiscord | <Yepoleb> with your speed it'll be out next week |
02:35:03 | FromDiscord | <Elegantbeef> Guzba all your `&` scares me 😄 |
02:35:33 | FromDiscord | <guzba> haha i write this knowing the hot path is never making presigned urls |
02:35:40 | FromDiscord | <guzba> however, now that it works, we can improve it |
02:35:53 | FromDiscord | <guzba> i always annoy treeform by saying "it has to work first" lol |
02:36:12 | FromDiscord | <guzba> (edit) "write" => "wrote" |
02:36:16 | FromDiscord | <Elegantbeef> Yea i'm just a stickler for lowest allocations, which means i never write code 😛 |
02:37:04 | FromDiscord | <Yepoleb> memory controlers love him |
02:41:00 | FromDiscord | <Yepoleb> i just realized hidden inside xmm and ymm registers is 768 bytes of free memory |
02:42:05 | FromDiscord | <guzba> imagine if you had zmm from avx-512 too |
02:42:12 | FromDiscord | <guzba> you basically dont need ram |
02:43:30 | FromDiscord | <Rika> Damn registers are massive nowadays huh |
02:43:54 | FromDiscord | <guzba> intel kind of removed avx-512 from consumer stuff but amd added it in their consumer 7000 series |
02:44:24 | FromDiscord | <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:09 | FromDiscord | <Yepoleb> does a stack frame count as allocation? |
02:47:31 | FromDiscord | <Yepoleb> someone should write an allocator for storing data in simd registers |
02:49:54 | FromDiscord | <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:15 | FromDiscord | <guzba> maybe thats just related to using intrinsics and a compiler, perhaps if you hand asm that isnt a thing? no idea |
02:54:48 | FromDiscord | <Yepoleb> do you consider it impractical for production use? |
02:57:24 | FromDiscord | <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:25 | FromDiscord | <Yepoleb> the register allocator 😄 |
03:01:56 | FromDiscord | <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:45 | FromDiscord | <Yepoleb> Oh, you're going as far as thinking about the implications for threading |
03:06:07 | FromDiscord | <cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYV |
03:08:44 | FromDiscord | <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:40 | arkanoid | what'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:12 | FromDiscord | <Elegantbeef> There isnt one |
03:14:47 | arkanoid | ok |
03:14:50 | arkanoid | thanks |
03:15:17 | arkanoid | I'll copypaste until I get enlighted by the god of macros |
03:15:41 | FromDiscord | <Elegantbeef> `type FooC1 = Foo[C1]` 😄 |
03:16:02 | arkanoid | yeah this is what I am doing, and this takes to a lot of copypaste |
03:17:43 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4iYW |
03:17:58 | FromDiscord | <Elegantbeef> Well you could in theory use a macro to then do like `myType.generate(myAlias)` |
03:18:15 | FromDiscord | <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:08 | FromDiscord | <Bung> cia.gov's question loss two points, `connect.Connect()``system.GetSystemInfo()` no one knows |
03:22:42 | FromDiscord | <cia.gov> In reply to @Bung "cia.gov's question loss two": pretty self explanatory no? |
03:22:56 | FromDiscord | <cia.gov> connect.Connect() connects using a socket |
03:23:23 | FromDiscord | <cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYY |
03:24:23 | FromDiscord | <Bung> I don't think so, it doesn't imply it use socket protocol |
03:25:10 | FromDiscord | <cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iYZ |
03:25:24 | FromDiscord | <cia.gov> (edit) "https://play.nim-lang.org/#ix=4iYZ" => "https://play.nim-lang.org/#ix=4iZ0" |
03:27:45 | FromDiscord | <Elegantbeef> Arkanoid maybe there is just better design in what you're doing |
03:54:59 | FromDiscord | <cia.gov> is there a way to get a string to bytes in this format ? \x00\x01\x02\x03\x04 |
03:55:07 | FromDiscord | <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:32 | FromDiscord | <Boston> A string to a string but the byte representation? |
03:57:46 | FromDiscord | <Elegantbeef> toHex exists |
03:57:50 | FromDiscord | <cia.gov> ik |
03:57:56 | FromDiscord | <cia.gov> i get this |
03:57:57 | FromDiscord | <cia.gov> 7B22686F73746E616D65223A2022636F6F6B6965732D4D6163426F6F6B2D4169722E6C6F63616C222C2022706C6174666F726D223A20224D61634F5320616D643634222C2022637075223A20225669727475616C4170706C65204020322E353047487A222C202272616D223A20383139322C20226469736B223A203233333735327D |
03:58:54 | FromDiscord | <Elegantbeef> Well you might have to write code for what you want whatever it is |
04:00:27 | FromDiscord | <Boston> sent a code paste, see https://play.nim-lang.org/#ix=4iZ6 |
04:00:30 | FromDiscord | <Boston> Is what I would do |
04:00:37 | FromDiscord | <Boston> Syntax may be wrong typing on my phone |
04:00:58 | FromDiscord | <Elegantbeef> `"\" & "x"` is funny |
04:01:14 | FromDiscord | <Boston> (edit) "https://play.nim-lang.org/#ix=4iZ6" => "https://play.nim-lang.org/#ix=4iZ7" |
04:01:28 | FromDiscord | <Boston> Yeah I didn't think |
04:01:34 | FromDiscord | <Boston> "\x" |
04:01:37 | FromDiscord | <Elegantbeef> Atleast it gets optimised 😛 |
04:11:47 | FromDiscord | <Bung> much better nick name |
04:12:15 | FromDiscord | <Elegantbeef> What? |
04:12:40 | FromDiscord | <Bung> from `cia.gov` -\> `Boston` |
04:12:46 | FromDiscord | <Elegantbeef> They're different people |
04:13:45 | FromDiscord | <Bung> hmm , they talk toHex same time ... |
04:14:30 | FromDiscord | <Elegantbeef> Yes one was answering the other |
04:15:22 | FromDiscord | <Bung> ok, I understand now |
04:15:45 | FromDiscord | <cia.gov> im just a fed idk Boston |
04:16:06 | FromDiscord | <cia.gov> sent a code paste, see https://play.nim-lang.org/#ix=4iZ8 |
04:19:28 | FromDiscord | <cia.gov> it has to be every 2 characters a `\\x` because `\x7` isnt actually anything but `\x7B` is |
04:19:33 | FromDiscord | <cia.gov> (edit) "it has to be every 2 characters a `\\x` ... because" added "is added" |
04:20:06 | FromDiscord | <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:06 | FromDiscord | <Boston> Is outBuf an array |
04:21:08 | FromDiscord | <Boston> Or seq |
04:21:18 | FromDiscord | <cia.gov> string |
04:21:44 | FromDiscord | <cia.gov> then i used toHex on the string which holds the value 7B22686F73746E616D65223A2022636F6F6B6965732D4D6163426F6F6B2D4169722E6C6F63616C222C2022706C6174666F726D223A20224D61634F5320616D643634222C2022637075223A20225669727475616C4170706C65204020322E353047487A222C202272616D223A20383139322C20226469736B223A203233333735327D |
04:22:04 | FromDiscord | <cia.gov> sent a long message, see http://ix.io/4iZa |
04:22:21 | FromDiscord | <cia.gov> which converted is {"hostname": "cookies-MacBook-Air.local", "platform": "MacOS amd64", "cpu": "VirtualApple @ 2.50GHz", "ram": 8192, "disk": 233752} |
04:26:55 | FromDiscord | <Boston> sent a code paste, see https://play.nim-lang.org/#ix=4iZb |
04:26:56 | FromDiscord | <Boston> Don't know if that's any better |
04:27:37 | FromDiscord | <Boston> (edit) "https://play.nim-lang.org/#ix=4iZb" => "https://play.nim-lang.org/#ix=4iZc" |
04:31:29 | FromDiscord | <huantian> Beef where is the part where you say to use newStringOfCap |
04:31:59 | FromDiscord | <huantian> Or something idk |
04:33:04 | FromDiscord | <Elegantbeef> Well i give up when people do things i dont understand why they need to be done |
04:34:20 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4iZd |
04:34:23 | FromDiscord | <huantian> Why is while capital |
04:34:32 | FromDiscord | <Elegantbeef> They're typing on their phone |
04:34:33 | FromDiscord | <Boston> Phone |
04:34:38 | FromDiscord | <huantian> Ah |
04:34:46 | FromDiscord | <huantian> I feel that |
04:35:26 | FromDiscord | <Boston> I spend most my time doing poorly coded dlls |
04:35:49 | FromDiscord | <Boston> I like being a bad coder |
05:07:14 | FromDiscord | <Gumbercules> it'd be nice if the C++ backend got fixed |
05:07:18 | FromDiscord | <Gumbercules> and like, worked... |
05:07:30 | FromDiscord | <Gumbercules> if we're talking about things we'd like to see fixed in Nim |
05:21:58 | FromDiscord | <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:58 | FromDiscord | <Elegantbeef> Oh yea? |
05:33:06 | FromDiscord | <huantian> Yeah, cus I feel like it is quite an easy mistake to misspell your interpolation in your localized string or something |
05:33:16 | FromDiscord | <huantian> And with compile time checks it would make that impossible |
05:33:21 | FromDiscord | <Elegantbeef> How would you do it in Nim? distinct? |
05:35:30 | FromDiscord | <huantian> Yeah I think so |
05:36:02 | FromDiscord | <huantian> I guess it would also depend on what program your localizers would use to do the localization |
05:37:20 | FromDiscord | <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:31 | FromDiscord | <Elegantbeef> I assume so |
05:37:39 | FromDiscord | <Elegantbeef> Thought most libraries use i8n or whatever |
05:40:19 | FromDiscord | <Rika> In reply to @Elegantbeef "Thought most libraries use": internatin |
05:40:38 | FromDiscord | <Rika> Lol |
05:41:10 | FromDiscord | <Elegantbeef> Hey i've literally never used it |
05:41:16 | FromDiscord | <Rika> It’s 18 |
05:41:54 | FromDiscord | <Rika> Honestly might be better to write intl8n |
05:44:01 | FromDiscord | <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:41 | FromDiscord | <Elegantbeef> Yea i'm so dumb i though i18n was a library 😄 |
06:04:52 | FromDiscord | <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:43 | FromDiscord | <<She>Horizon</Her>> In reply to @Elegantbeef "They're typing on their": 👀 phone programmers? |
07:12:24 | FromDiscord | <<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:42 | FromDiscord | <Rika> I was programming on an iPad a few hours ago |
07:12:55 | FromDiscord | <<She>Horizon</Her>> ...acceptable? |
07:13:04 | FromDiscord | <<She>Horizon</Her>> I don't know how to feel about that one |
07:16:33 | FromDiscord | <Gumbercules> I have a phone with a keybaord |
07:16:36 | FromDiscord | <Gumbercules> (edit) "keybaord" => "keyboard" |
07:16:54 | FromDiscord | <Gumbercules> but I can also ssh into it - they keyboard is nice for when I'm away from a laptop |
07:17:07 | FromDiscord | <Gumbercules> https://pine64.com/product/pinephone-pinephone-pro-keyboard-case/ |
07:17:25 | FromDiscord | <Gumbercules> I need to get a second sim card and start using my ppp again |
07:23:51 | FromDiscord | <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:12 | FromDiscord | <Elegantbeef> There is no op from openarray[byte] to string aside from copymem or .add |
07:24:36 | FromDiscord | <EyeCon> copyMem it is, thanks |
07:26:27 | FromDiscord | <EyeCon> Is prepareMutation still necessary? |
07:27:00 | FromDiscord | <EyeCon> ...in ARC/ORC |
07:27:07 | FromDiscord | <Elegantbeef> For literals yes |
07:32:28 | FromDiscord | <ShalokShalom> In reply to @Isofruit "For later should you": Why would you need a vri before an update? |
07:34:07 | FromDiscord | <ringabout> I want to merge https://github.com/nim-lang/Nim/pull/21129, please help me review it. |
07:34:47 | termer | does AsyncHttpClient always read the full body to memory? |
07:34:51 | termer | or is it possible to stream it? |
07:35:19 | termer | The AsyncResponse object contains both a "body: string" and "bodyStream: FutureStream[string]" property |
07:36:11 | FromDiscord | <Elegantbeef> It does not stream afaik |
07:37:07 | termer | what in the world |
07:37:31 | termer | that's a bit of a problem |
07:37:55 | termer | that's a bit of a problem |
07:37:56 | termer | oops |
07:42:16 | FromDiscord | <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:46 | NimEventer | New Nimble package! rowdy - Automatically bind procs to the mummy web server, see https://github.com/ajusa/rowdy |
08:41:57 | termer | turns out it doesn't read it all into memory |
08:42:12 | termer | I was able to use the FutureStream to write the data to a file |
08:42:17 | FromDiscord | <Elegantbeef> Also you can do `when typ is ref: new newName` |
08:42:17 | FromDiscord | <Elegantbeef> @ajusa\: you can hide the `expandHandler` if inside the templates you do `bind expandHandler` (might be `mixin expandHandler` |
08:42:19 | FromDiscord | <Elegantbeef> Ah sorry i dont use async |
08:42:20 | termer | it's not very clear though |
08:42:40 | termer | I checked the memory usage, and I wasn't getting any problems |
08:42:52 | termer | 2.5mb consistently even when downloading a 200mb file |
08:42:55 | termer | all good |
08:43:11 | termer | thus concludes my late night (early morning) programming session |
08:44:57 | termer | https://github.com/termermc/arch-caching-mirror |
08:44:58 | termer | :D |
08:45:05 | FromDiscord | <Elegantbeef> Also @ajusa you might want to not use `using` inside your readme docs it's 100% unhelpful |
08:45:16 | FromDiscord | <Elegantbeef> `func params(req): QueryParams {.raises: [ValueError].}` ah yes `req` i know what that is 😄 |
08:45:31 | termer | The nim stdlib is pretty adequate for a lot of things |
08:45:46 | termer | was able to bang out a functional HTTP thingy without any dependencies |
08:48:58 | FromDiscord | <Bung> what's your nim version↵(<@709044657232936960_termer=5b=49=52=43=5d>) |
08:49:11 | termer | my nim version? |
08:49:18 | termer | 1.6.10 |
08:49:27 | termer | latest stable I believe |
08:51:20 | FromDiscord | <Bung> well, I checked related issues have no any updates. maybe just get better result by default gc changed. |
08:54:13 | termer | is this replying to an older conversation |
08:59:24 | FromDiscord | <Bung> the one I referred to |
09:00:07 | FromDiscord | <Bung> " I wasn't getting any problems↵2.5mb consistently even when downloading a 200mb file" |
09:02:34 | termer | I'm using ORC |
09:02:59 | termer | I've had severe issues with memory leaks when doing multithreading and also when working with sqlite |
09:03:05 | termer | so I was expecting to see similar here |
09:03:12 | termer | even though I'm not doing either of those |
09:03:23 | termer | AsyncHttpClient is very memory-heavy though |
09:03:36 | termer | even if it's not reading entire responses to memory |
09:06:49 | FromDiscord | <Bung> I can only confirm that problem exists on server side https://github.com/nim-lang/Nim/issues/10661 |
09:07:15 | termer | that's only if you call "body" |
09:07:35 | termer | which, because of Nim's ambiguity between properies and procs, looks like a property to be accessed |
09:08:16 | termer | I think a lot of the constructs around AsyncHttpServer and (Async)HttpClient are very poorly designed |
09:09:17 | FromDiscord | <0x454d505459> In reply to @Isofruit "May be of interest": I have it installed too |
09:10:31 | FromDiscord | <Bung> true, they are poor both client and server |
09:10:58 | termer | but they're the only ones that work properly with orc |
09:11:03 | termer | httpbeast crashes |
09:11:12 | termer | so does httpx |
09:11:17 | termer | or whatever the linux-only one was |
09:11:24 | termer | or one with windows support I mean |
09:11:35 | termer | if you compile either of those with orc and then slam them with requests, they crash |
09:11:39 | termer | trying to read from null |
09:11:42 | termer | So I don't use them |
09:11:59 | termer | refc chomps memory and I'm not interested in taking more memory just to use a multithreaded webserver |
09:12:02 | termer | I can write my own |
09:12:15 | termer | but yeah the state of nim webservers is really bad |
09:13:08 | FromDiscord | <Bung> seems like there need more test, since they both important packages in nim's repo |
09:14:03 | FromDiscord | <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:10 | FromDiscord | <Phil> (edit) "nimqml" => "qml and its packages" |
09:21:33 | FromDiscord | <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:36 | FromDiscord | <Bung> why ask me that? I think the crash problem can be simply done by a request-response test case |
09:58:51 | FromDiscord | <0x454d505459> sent a code paste, see https://play.nim-lang.org/#ix=4j07 |
10:00:52 | NimEventer | New 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:00 | FromDiscord | <Elegantbeef> I very much dont get why people make such inane posts |
10:09:26 | FromDiscord | <Rika> i would just say its just lack of being informed really |
10:09:55 | FromDiscord | <Elegantbeef> Maybe "python but compiled" isnt a good thing to say 😄 |
10:10:48 | FromDiscord | <Rika> havent a good amount of people here been saying that |
10:11:19 | FromDiscord | <Elegantbeef> Yea but people still say it sadly |
10:11:49 | * | ltriant quit (Ping timeout: 252 seconds) |
10:12:08 | FromDiscord | <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:26 | FromDiscord | <0x454d505459> Im also sure that most of new Nim users come from python which reinforces that idea of compiled python |
10:13:52 | FromDiscord | <0x454d505459> at least I came from python (and JS) 🤣 |
10:14:18 | FromDiscord | <Rika> me |
10:14:18 | FromDiscord | <0x454d505459> (edit) "🤣" => "😅" |
10:14:30 | FromDiscord | <Rika> i came from python, dont know how long ago |
10:15:01 | FromDiscord | <0x454d505459> I came from python arround 2 years ago, |
10:15:40 | FromDiscord | <0x454d505459> once you step up from the "compiled python" idea you write better code |
10:15:59 | FromDiscord | <Rika> i never really thought of it as compiled python |
10:16:18 | FromDiscord | <Rika> i thought of it more as another language with pretty similar syntax |
10:18:16 | FromDiscord | <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:58 | FromDiscord | <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:22 | FromDiscord | <Takemichi Hanagaki> (edit) "tgat" => "that" | "tha" => "the" |
10:20:43 | FromDiscord | <Takemichi Hanagaki> (edit) "superset.↵Nim" => "some additions.↵Nim" |
10:22:06 | FromDiscord | <0x454d505459> btw, therenow is an actuall compiled python, it uses llvm↵https://github.com/exaloop/codon |
10:22:30 | FromDiscord | <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:18 | FromDiscord | <0x454d505459> indentation, keywords and overall syntax |
10:24:47 | FromDiscord | <Takemichi Hanagaki> In reply to @0x454d505459 "btw, therenow is an": Interesting idea! And this is a real compiled Python. |
10:24:54 | FromDiscord | <0x454d505459> yes |
10:25:43 | FromDiscord | <0x454d505459> the only issue is that it doesn't has any usable std or anything like this |
10:26:13 | FromDiscord | <0x454d505459> rn it can't just compile your already existing python code |
10:26:21 | FromDiscord | <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:10 | FromDiscord | <0x454d505459> ig everyone sees thing differently, or im the one being different lol |
10:27:35 | FromDiscord | <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:18 | FromDiscord | <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:51 | FromDiscord | <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:02 | FromDiscord | <0x454d505459> true |
10:38:11 | * | ltriant joined #nim |
10:44:11 | * | junaid_ joined #nim |
10:49:12 | FromDiscord | <ShalokShalom> Graal can also compile Python |
10:49:55 | * | junaid_ quit (Remote host closed the connection) |
10:50:04 | FromDiscord | <ShalokShalom> Codon looks cool 😊 |
10:58:57 | FromDiscord | <0x454d505459> In reply to @ShalokShalom "Graal can also compile": never heard of this thing gonna google it |
11:00:02 | FromDiscord | <0x454d505459> is it graalvm ? |
11:06:16 | FromDiscord | <Rika> yes] |
11:06:33 | FromDiscord | <Rika> its still vm based but i believe its nowhere near as slow lmao |
11:20:17 | FromDiscord | <0x454d505459> To be honest I don't like vms |
11:22:05 | FromDiscord | <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:51 | FromDiscord | <ShalokShalom> How many interpreted languages do you know? |
11:23:04 | FromDiscord | <0x454d505459> only JS lol |
11:23:17 | FromDiscord | <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:29 | FromDiscord | <0x454d505459> In reply to @0x454d505459 "only JS lol": I count python as transpiled |
11:23:31 | FromDiscord | <ShalokShalom> In reply to @0x454d505459 "only JS lol": Its running in a VM |
11:23:45 | FromDiscord | <ShalokShalom> Python is running in a VM as well |
11:24:01 | FromDiscord | <0x454d505459> In reply to @ShalokShalom "Its running in a": ik but it still is counted as interpreted |
11:24:12 | FromDiscord | <0x454d505459> In reply to @ShalokShalom "Python is running in": ik too |
11:24:16 | FromDiscord | <ShalokShalom> The difference between Java and Python is the level of abstraction↵↵And Java gets ultimately compiled way lower down. |
11:24:38 | FromDiscord | <ShalokShalom> In reply to @0x454d505459 "ik but it still": Ruby 1.8 was the last popular interpreted language 🙂 |
11:24:49 | FromDiscord | <0x454d505459> In reply to @ShalokShalom "Ruby 1.8 was the": I never didn't any ruby |
11:25:05 | FromDiscord | <Rika> what is the difference to interpreted and VM languages to you |
11:25:23 | FromDiscord | <0x454d505459> In reply to @0x454d505459 "I never didn't any": but it must be cool as it is what runs mastodon lol |
11:25:57 | FromDiscord | <ShalokShalom> Interpreter have no further compile steps |
11:26:10 | FromDiscord | <ShalokShalom> You read source code and bring it to execute |
11:26:25 | FromDiscord | <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:39 | FromDiscord | <ShalokShalom> https://craftinginterpreters.com/introduction.html |
11:26:55 | FromDiscord | <ShalokShalom> Yeah, I think the shells are still interpreted |
11:26:59 | FromDiscord | <Rika> but doesnt python have a bytecode compilation step nonetheless |
11:27:12 | FromDiscord | <0x454d505459> it has |
11:27:27 | FromDiscord | <0x454d505459> In reply to @ShalokShalom "Yeah, I think the": at least bash and fish still are |
11:29:20 | FromDiscord | <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:34 | FromDiscord | <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:14 | FromDiscord | <Phil> In reply to @0x454d505459 "This is why I": I raise you code from biologists that barely learned coding, I doubt it |
11:57:40 | FromDiscord | <0x454d505459> In reply to @Isofruit "I raise you code": well at least that the worst I ever written |
11:58:19 | FromDiscord | <Phil> Anyway, can't look at it rn, that would require brain power that I currently have to invest into work |
11:58:28 | FromDiscord | <0x454d505459> sure no problem |
12:41:18 | FromDiscord | <albassort> is there anything you can do with a closure iterator that you cant do with anything else? |
12:43:04 | FromDiscord | <Bung> what's the problem exactly? |
12:44:09 | FromDiscord | <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:31 | FromDiscord | <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:57 | FromDiscord | <albassort> i think i could do the same thing with just a ton of variables in a type |
12:46:24 | FromDiscord | <albassort> so its either like a object with like 20 parts or a closure strange closure iterator |
12:52:16 | FromDiscord | <Bung> I dont quite get it, so the original proc is iterator too or something else? |
12:54:56 | FromDiscord | <Bung> I only see 4 places use `isClosureIterator` in compiler code |
12:59:43 | FromDiscord | <jan Apisu> nim |
13:16:03 | FromDiscord | <exelotl> nim |
13:18:36 | FromDiscord | <ajusa> nim |
13:30:25 | FromDiscord | <ShalokShalom> nim |
13:44:14 | FromDiscord | <albassort> In reply to @Bung "I dont quite get": it was originally a proc, then became a closure |
13:44:34 | FromDiscord | <albassort> transforming it into a type with procs |
13:46:09 | FromDiscord | <Phil> In reply to @ShalokShalom "nim": nom |
13:50:55 | FromDiscord | <Bung> so safe capture should be taken care of https://nim-lang.org/docs/manual.html#procedures-closures↵(@albassort) |
13:51:32 | FromDiscord | <albassort> ? |
13:55:35 | FromDiscord | <ShalokShalom> In reply to @Isofruit "nom": Nom nom |
13:55:50 | FromDiscord | <Phil> In reply to @ShalokShalom "Nom nom": Omnomnomnomon |
14:23:02 | FromDiscord | <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:06 | FromDiscord | <Evissim> Is there a way to create a bitfield 256+ bits long for use with things like bitops' setBit and testBit? |
15:12:21 | FromDiscord | <auxym> bitops takes SomeInteger, defined here https://nim-lang.org/docs/system.html#SomeInteger so no |
15:12:29 | FromDiscord | <auxym> but have a look at https://github.com/treeform/bitty |
15:14:05 | FromDiscord | <Evissim> Thank you! Another Treeform lib saving the day 😀 |
15:42:16 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4j1D |
15:42:47 | FromDiscord | <albassort> ok |
15:42:49 | FromDiscord | <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:56 | FromDiscord | <albassort> how can i compile everything statically except for my c dependency |
15:54:00 | FromDiscord | <albassort> which is compiled dynamically |
15:54:28 | NimEventer | New 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:38 | FromDiscord | <auxym> In reply to @albassort "how can i compile": maybe this can help? https://github.com/kaushalmodi/hello_musl |
16:17:27 | FromDiscord | <albassort> hmmm |
16:17:36 | FromDiscord | <albassort> perhaps choosing gtk was a bad idea |
16:18:07 | FromDiscord | <albassort> :Dead: |
16:19:10 | FromDiscord | <albassort> instead of compiling static I'll just compile with whatever version of glibc that debian is currently using |
17:01:13 | FromDiscord | <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:01 | FromDiscord | <ShalokShalom> In reply to @albassort "perhaps choosing gtk was": Really 😅 |
17:15:52 | FromDiscord | <Phil> In reply to @Yandall "Hi! I'm still learning": Sure, what your current coding knowledge background? |
17:16:47 | FromDiscord | <Yandall> Mostly web developer in nodejs. But I'am open to almost anything |
17:17:12 | FromDiscord | <Phil> sent a long message, see http://ix.io/4j2a |
17:18:57 | FromDiscord | <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:05 | FromDiscord | <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:33 | FromDiscord | <Yandall> In reply to @Isofruit "Because nim could use": Like how many times a specific tag or text appears in that HTML? |
17:25:22 | FromDiscord | <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:09 | FromDiscord | <Phil> sent a long message, see http://ix.io/4j2h |
17:27:20 | FromDiscord | <Phil> (edit) "http://ix.io/4j2h" => "http://ix.io/4j2i" |
17:27:42 | FromDiscord | <Phil> (edit) "http://ix.io/4j2i" => "http://ix.io/4j2j" |
17:32:13 | FromDiscord | <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:30 | FromDiscord | <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:34 | FromDiscord | <Phil> (edit) "times"" => "times"↵Though that's bonus point territory and may be wandering off into "can't be done" land" |
17:34:26 | FromDiscord | <HitBlast> (edit) "ends." => "ends inside the sequence." |
17:39:38 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/tiV |
17:40:23 | FromDiscord | <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:57 | FromDiscord | <Phil> In reply to @HitBlast "oh cool, so the": Structure in what sense? |
17:41:14 | FromDiscord | <HitBlast> In reply to @Isofruit "Structure in what sense?": accessing the data in the returned table |
17:41:15 | FromDiscord | <HitBlast> or dictionary |
17:41:27 | FromDiscord | <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:37 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4j2s |
17:43:43 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4j2s" => "https://play.nim-lang.org/#ix=4j2t" |
17:43:48 | FromDiscord | <Phil> (since you have a seq of tables aka dictionaries |
17:43:50 | FromDiscord | <Phil> (edit) "dictionaries" => "dictionaries)" |
17:43:55 | FromDiscord | <HitBlast> In reply to @Isofruit "Ahhh check, yeah accessing": Great |
17:44:06 | FromDiscord | <HitBlast> Thanks for the help, I guess |
17:44:11 | FromDiscord | <HitBlast> :D |
17:44:24 | FromDiscord | <Phil> I swear there's also more syntax on how to create tables but I'd need to go searching |
17:44:59 | FromDiscord | <HitBlast> It's a bit hard to find information on Nim stuff outside the documentation but hopefully the situation will be better. |
17:45:03 | FromDiscord | <HitBlast> (edit) "better." => "better over time." |
17:46:20 | FromDiscord | <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:08 | FromDiscord | <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:39 | FromDiscord | <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:36 | FromDiscord | <Phil> At least I'd start integrating that pretty quickly into my snorlogue-package tests |
17:48:46 | FromDiscord | <Yandall> Yeah, I can work with that |
17:49:05 | FromDiscord | <Yandall> Is there examples of that feature in other languages? |
17:49:19 | FromDiscord | <Phil> In reply to @Yandall "Is there examples of": What feature do you mean specifically? |
17:50:05 | FromDiscord | <Yandall> In reply to @Isofruit "Because nim could use": . |
17:51:52 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4j2w |
17:52:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4j2x |
17:52:38 | FromDiscord | <Phil> the key bits is the line of code with `expect` |
17:54:09 | FromDiscord | <Phil> so maybe sth like:↵`html.toContainCSSQueryGreaterOrEqualThan("a h4.potato", 5)` |
17:54:48 | FromDiscord | <Phil> and `html.toContainGreaterOrEqualThan("PotatoHeading", 5)` |
17:56:02 | FromDiscord | <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:03 | FromDiscord | <Yandall> Sounds like a fun way to learn more about Nim |
17:57:06 | FromDiscord | <Yandall> Thanks |
17:57:54 | FromDiscord | <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:27 | termer | has anyone here made an AUR package for a nim program? |
18:54:15 | FromDiscord | <0x454d505459> never saw any |
18:54:34 | FromDiscord | <huantian> termer i have, see pax-mc |
18:54:35 | FromDiscord | <0x454d505459> but we can look ik |
18:55:05 | termer | huantian How did you deal with using choosenim |
18:55:12 | termer | cause the nim version in the community arch repo is really outdated |
18:55:48 | FromDiscord | <auxym> does aur count? https://aur.archlinux.org/packages/nitter-git |
18:56:10 | termer | AUR is what I'm meaning so yeah |
18:56:11 | FromDiscord | <0x454d505459> well that's what was asked for |
18:56:17 | FromDiscord | <huantian> I `makedepends=('nim')` and `choosenim` provides `nim` |
18:56:24 | termer | it does? |
18:56:33 | FromDiscord | <huantian> so it works no matter if you have `nim` or `choosenim` installed |
18:56:38 | FromDiscord | <huantian> also `nim` is up to date in the arch repos |
18:56:52 | termer | I guess the compiler will yell at you if you have the wrong nim version anyway |
18:56:55 | FromDiscord | <auxym> In reply to @0x454d505459 "well that's what was": oh... yeah. Somehow my brain read an Arch package |
18:57:30 | FromDiscord | <0x454d505459> sent a long message, see http://ix.io/4j30 |
18:57:43 | FromDiscord | <auxym> In reply to @termer "I guess the compiler": nimble will if you have the correct `requires` entry for nim |
18:57:50 | termer | right |
18:58:28 | FromDiscord | <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:05 | FromDiscord | <0x454d505459> this one filters more stuff `site:aur.archlinux.org inurl:packages "nim" -inurl:K= -inurl:?ID_ -inurl:?from` |
19:03:33 | FromDiscord | <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:37 | NimEventer | New thread by resolritter: Splat operator implementation with macros, see https://forum.nim-lang.org/t/9739 |
19:48:37 | NimEventer | New 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:57 | termer | I was wondering about the recently |
20:03:04 | termer | I got a peak at the repo and it doesn't compile anymore |
20:03:14 | termer | except for the updated branch |
20:03:24 | termer | which 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:19 | FromDiscord | <!&luke> hi |
20:31:23 | * | disso_peach quit (Quit: Leaving) |
20:31:36 | FromDiscord | <!&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:26 | FromDiscord | <EyeCon> ...with Nim? |
20:39:37 | FromDiscord | <!&luke> well its more of a gthub question but i didnt know where else to ask it |
20:39:55 | FromDiscord | <!&luke> In reply to @EyeCon "...with Nim?": well yes i need it for a nim rogram |
20:39:57 | FromDiscord | <!&luke> (edit) "rogram" => "program" |
20:46:56 | FromDiscord | <Yepoleb> In reply to @ripluke "how can i get": do you want to automate it? |
20:47:16 | FromDiscord | <!&luke> well id prefer if there was a url |
20:47:17 | FromDiscord | <Yepoleb> on github you can just go to releases and download it there |
20:47:26 | FromDiscord | <!&luke> In reply to @Yepoleb "do you want to": yes |
20:48:13 | FromDiscord | <Yepoleb> https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8 |
20:48:27 | FromDiscord | <Yepoleb> "One Liner to Download the Latest Release from Github Repo.md" |
20:48:45 | FromDiscord | <!&luke> ok thx |
20:49:08 | FromDiscord | <Yepoleb> apparently there is an official feature now https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases |
20:49:38 | FromDiscord | <huantian> oh neeat that's probably the better way to do it |
20:49:49 | FromDiscord | <huantian> no intermediate api request |
20:50:06 | FromDiscord | <Yepoleb> but it probably has to be a proper release and not a tag |
21:05:52 | NimEventer | New thread by DougT: Tutorial for nim pixie graphics?, see https://forum.nim-lang.org/t/9740 |
21:10:19 | FromDiscord | <<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:46 | FromDiscord | <<She>Horizon</Her>> Nvm misread it completely |
21:11:16 | FromDiscord | <<She>Horizon</Her>> Plus unpackInfix is for NimNodes... Maybe it still can fulfill what they want though, don't think so thought |
21:29:03 | NimEventer | New 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:04 | NimEventer | New 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:32 | FromDiscord | <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:35 | FromDiscord | <iffy (Matt Haggard)> Found it\: request.stream.writer.tsource.remoteAddress().host() |
22:29:37 | arkanoid | generic 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:41 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4j4j |
23:33:54 | FromDiscord | <Elegantbeef> Well that tells me the matrix bridge died |
23:34:15 | FromDiscord | <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) |