00:05:44 | * | CyberTailor quit (Remote host closed the connection) |
00:06:42 | * | CyberTailor joined #nim |
00:34:18 | FromDiscord | <!Patitotective> In reply to @NimEventer "New Nimble package! RaytracingAlgorithm": looks like it has a really weird way of installation/usage↵as if they didnt know that binary packages existed lol |
00:34:53 | FromDiscord | <Elegantbeef> If only there was a way to communicate that to them |
00:39:27 | FromDiscord | <Elegantbeef> [j-james](https://matrix.to/#/@j-james:matrix.org)if you're about what still needs to be wrapped on wayland, I feel like i could spend some time helping right now |
00:41:09 | FromDiscord | <ripluke> This sentence would be a lot better with some commas |
00:42:26 | FromDiscord | <Elegantbeef> What? |
00:43:18 | FromDiscord | <ripluke> if you're about, what still needs to be wrapped on wayland? I feel like i could spend some time helping right now. |
00:43:24 | FromDiscord | <ripluke> Better version lol |
00:43:34 | FromDiscord | <Elegantbeef> We arent aiming for novels here |
00:43:38 | FromDiscord | <Elegantbeef> Or atleast i'm not |
00:43:59 | FromDiscord | <ripluke> Well I mean it's better to use punctuation that to be misunderstood |
00:44:18 | FromDiscord | <Elegantbeef> The irony saying that with a typo 😄 |
00:44:54 | FromDiscord | <ripluke> What did I spell wrong lol |
00:45:03 | FromDiscord | <Elegantbeef> I don't know if you notice this, but i no writey good |
00:45:08 | FromDiscord | <Elegantbeef> "that to be misunderstood" |
00:45:15 | FromDiscord | <ripluke> And I mean u did still understand |
00:45:18 | FromDiscord | <Elegantbeef> "that" |
00:45:20 | FromDiscord | <ripluke> (edit) "that" => "than" |
00:45:24 | FromDiscord | <ripluke> Ah yea |
00:45:29 | FromDiscord | <ripluke> Saw it |
00:45:45 | FromDiscord | <ripluke> Wonder how I spelt it wrony |
00:45:48 | FromDiscord | <ripluke> (edit) "wrony" => "wrong" |
00:46:01 | FromDiscord | <ripluke> T and N are on opposite sides of the keyboard |
00:46:35 | FromDiscord | <Elegantbeef> Anyway seems they're dead, so I guess I wait |
00:59:03 | * | krux02 quit (Remote host closed the connection) |
01:03:26 | FromDiscord | <Prestige> What's dead? |
01:03:51 | FromDiscord | <Prestige> I need those beefy Wayland wrappers |
01:05:21 | FromDiscord | <Elegantbeef> Nothing, they're just not presently here |
01:05:59 | FromDiscord | <Dale> sent a code paste, see https://play.nim-lang.org/#ix=44oq |
01:06:14 | FromDiscord | <Elegantbeef> No they're going to be j-james' wayland wrappers |
01:06:16 | FromDiscord | <Dale> It works if I use a literal instead of a variable as the parameter |
01:07:22 | FromDiscord | <huantian> note the docs for detectOs |
01:07:23 | FromDiscord | <huantian> https://media.discordapp.net/attachments/371759389889003532/997308361622171738/unknown.png |
01:08:11 | FromDiscord | <Elegantbeef> To be fair huan there should be a `template detectOs(e: Distrobution)` variant 😛 |
01:08:19 | FromDiscord | <huantian> yeah... |
01:09:20 | FromDiscord | <huantian> why is there not I wonder |
01:09:24 | FromDiscord | <Dale> I was just getting to grips with the syntax, and thought it would be a fun thing to try >.< |
01:09:40 | FromDiscord | <Dale> Loop through the enum and see which one returns true |
01:09:49 | FromDiscord | <Elegantbeef> Really there is no benefit for the template |
01:09:56 | FromDiscord | <huantian> also it's a pure enum I wonder why the template needs to add the prefix? |
01:09:56 | FromDiscord | <Elegantbeef> It should just be the procedure |
01:09:56 | FromDiscord | <Dale> I was thinking that |
01:10:18 | FromDiscord | <ripluke> Element sux ngl |
01:10:29 | FromDiscord | <Elegantbeef> it's fine to me |
01:10:58 | FromDiscord | <ripluke> Crashes every time I do stuff like open a photo |
01:10:59 | FromDiscord | <Elegantbeef> Well dale if not clear the reason it doesnt work is someone designed an icky API |
01:11:17 | FromDiscord | <Elegantbeef> Odd |
01:11:21 | FromDiscord | <Elegantbeef> Weird that webtech would do that |
01:11:31 | FromDiscord | <huantian> is there a better way to get around it other than just {.all.} importing and getting the Impl |
01:11:43 | FromDiscord | <Elegantbeef> patchfile 😛 |
01:12:04 | FromDiscord | <Dale> No, I get it, I had looked at the source before, I just wanted to double check since I'm new to this lang |
01:12:28 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "If only there was": guess opening an issue |
01:12:44 | FromDiscord | <j-james> bonjour |
01:12:48 | FromDiscord | <j-james> mostly testing |
01:12:52 | FromDiscord | <Elegantbeef> Well arent you the bell of the ball↵(@!Patitotective) |
01:12:59 | FromDiscord | <ripluke> In reply to @j-james "bonjour": Bonjour |
01:13:20 | FromDiscord | <Prestige> Hello |
01:13:27 | FromDiscord | <Elegantbeef> Yellow |
01:13:28 | FromDiscord | <Prestige> In reply to @ripluke "Element sux ngl": Same |
01:13:43 | FromDiscord | <Dale> I was a little surprised there's no `getOs` or `getDistro` either |
01:13:43 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=44or |
01:13:51 | FromDiscord | <j-james> beef, what'd you say the best way to deal with all the ptr objects was? |
01:13:53 | FromDiscord | <ripluke> In reply to @Dale "I was a little": Yea |
01:14:10 | FromDiscord | <Elegantbeef> `type A = ptr object` |
01:14:19 | FromDiscord | <j-james> i forgot if you can replace their parameters with var T |
01:14:45 | FromDiscord | <Dale> The distro for linux users is perhaps quite useful for logs, so there is a valid usecase for it |
01:14:47 | FromDiscord | <Elegantbeef> What? |
01:14:53 | FromDiscord | <Prestige> In reply to @Dale "I was a little": I think there's a built-in constant for the os name |
01:15:02 | FromDiscord | <ripluke> In reply to @Dale "I was a little": I did a slightly workaround method by detecting the os as Linux and then reading the os-release file, else detectOs Mac or windows |
01:15:03 | FromDiscord | <Elegantbeef> You only need `var T` for pointers if you want to change where the pointer points |
01:15:14 | FromDiscord | <Dale> Yeah, but does that include distros? They vary in nature quite a bit |
01:15:21 | FromDiscord | <ripluke> In reply to @Dale "Yeah, but does that": Yea |
01:15:23 | FromDiscord | <Elegantbeef> The define doesnt work for distros |
01:15:26 | FromDiscord | <Prestige> Doubt it |
01:15:34 | FromDiscord | <ripluke> In reply to @Dale "Yeah, but does that": It reads the os-release file |
01:15:41 | FromDiscord | <Elegantbeef> It only works for core OS so `linux` `mac` `windows` bsd` `standalone\`.... |
01:15:42 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Well arent you the": ill assume i understand that message and open an issue |
01:15:57 | FromDiscord | <Elegantbeef> Yes patito |
01:16:00 | FromDiscord | <ripluke> In reply to @Elegantbeef "It only works for": The distros module? |
01:16:02 | FromDiscord | <Elegantbeef> Make an issue and explain how they could make installation easier |
01:16:10 | FromDiscord | <Elegantbeef> No defines |
01:16:22 | FromDiscord | <Elegantbeef> The distro module works generally for all distros |
01:16:28 | FromDiscord | <!Patitotective> also they have a `package.json` file, pretty weird |
01:16:30 | FromDiscord | <Elegantbeef> Within reason |
01:16:45 | FromDiscord | <ripluke> In reply to @Patitotective "also they have a": Ain't that for js? |
01:16:51 | FromDiscord | <ripluke> Npm? |
01:16:52 | FromDiscord | <Elegantbeef> distros should be able to detect all known distributions |
01:17:06 | FromDiscord | <ripluke> In reply to @Elegantbeef "distros should be able": The module, no |
01:17:14 | FromDiscord | <ripluke> (edit) "module," => "module?" |
01:17:15 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/distros.html#Distribution |
01:17:30 | FromDiscord | <ripluke> It cant detect every single one |
01:17:33 | FromDiscord | <!Patitotective> In reply to @ripluke "Ain't that for js?": well, that file is just the entry that would go in the packages.json |
01:17:39 | FromDiscord | <!Patitotective> (edit) "In reply to @ripluke "Ain't that for js?": well, that file is just the entry that would go in the packages.json ... " added "repo" |
01:17:45 | FromDiscord | <Dale> Hmm, can `parsecfg` read os-release, it looks like a similar format |
01:17:52 | FromDiscord | <Elegantbeef> It should be able to detect all of those |
01:18:17 | FromDiscord | <ripluke> In reply to @Dale "Hmm, can `parsecfg` read": That might work but isn't parsecfg using dosini syntax |
01:18:35 | FromDiscord | <Elegantbeef> Dale it's easier to use `strscans` and `scanf` |
01:19:03 | FromDiscord | <ripluke> In reply to @Elegantbeef "Dale it's easier to": Well actually it's easier to just split the string over the = sign |
01:19:23 | FromDiscord | <!Patitotective> I found this note, soo weird↵> We are planning to publish the RaytracingAlgorithm package to nimble in order to make it easier to download, but this feature will be released in a future version. |
01:19:30 | FromDiscord | <!Patitotective> (edit) "We" => "_We" | "version." => "version._" |
01:19:39 | FromDiscord | <ripluke> I can send example code if u want @Dale |
01:19:46 | FromDiscord | <Dale> I can handle the file parsing done that plenty of times, just need to get to grips with file handling in Nim. Pretty good exercise really! |
01:19:49 | FromDiscord | <Dale> Sure! |
01:19:55 | FromDiscord | <Dale> You folks sure are helpful :) |
01:21:01 | FromDiscord | <ripluke> sent a code paste, see https://play.nim-lang.org/#ix=44os |
01:21:09 | FromDiscord | <ripluke> (edit) "https://play.nim-lang.org/#ix=44os" => "https://paste.rs/XGZ" |
01:21:41 | FromDiscord | <ripluke> This isnt the most efficient way cuz I wrote it when I was getting started with nim |
01:21:41 | FromDiscord | <Dale> The naive option of course would be a giant case block like the `detectOs` proc, but it seems a bit scummy to duplicate the code like that |
01:22:08 | FromDiscord | <Dale> For real, to read a file is just `open`?! |
01:22:12 | FromDiscord | <ripluke> In reply to @ripluke "This isnt the most": It gets the job done quite well tho |
01:22:20 | FromDiscord | <ripluke> In reply to @Dale "For real, to read": Ya pretty much |
01:22:26 | FromDiscord | <Dale> Wow, that's even less than Lua |
01:22:32 | FromDiscord | <ripluke> Writing a file is just as easy |
01:22:45 | FromDiscord | <Elegantbeef> Please for the love of god use strscans 😄↵(@.luke) |
01:22:49 | FromDiscord | <Prestige> Idk why everyone has a hard on for lua |
01:22:52 | FromDiscord | <Dale> So I take it thereslike, `write`, `append` |
01:22:56 | FromDiscord | <Prestige> I'm not a fan |
01:23:01 | FromDiscord | <Dale> (edit) "thereslike," => "there's like," |
01:23:09 | FromDiscord | <Dale> I love Lua, used it for years |
01:23:17 | FromDiscord | <ripluke> In reply to @Avahe "I'm not a fan": 💀 I'd write Lua over vimscript any day |
01:23:35 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=44ot |
01:23:54 | FromDiscord | <ripluke> In reply to @Elegantbeef "Please for the love": As stated prior this code is from like 6ish months ago when I was getting started with nim |
01:23:56 | FromDiscord | <Prestige> In reply to @ripluke "💀 I'd write Lua": Sure but that isn't saying much |
01:24:24 | FromDiscord | <ripluke> In reply to @Rika "This only works if": No, I run artix as my second distro and I have used it on void aswell |
01:24:39 | FromDiscord | <ripluke> Runs fine on both openrc and runit |
01:24:41 | FromDiscord | <Rika> It’s not guaranteed outside of systemd is what I mean |
01:24:54 | FromDiscord | <ripluke> In reply to @Rika "It’s not guaranteed outside": Well yea unfortunately |
01:25:08 | FromDiscord | <ripluke> But most distros do have that |
01:25:20 | FromDiscord | <Dale> What about `/proc/version`? |
01:25:42 | FromDiscord | <ripluke> In reply to @Dale "What about `/proc/version`?": Never used it so idk what it has |
01:25:49 | FromDiscord | <Dale> I should just look at something like `neofetch` and see how they do it |
01:25:56 | FromDiscord | <ripluke> Yea |
01:26:09 | FromDiscord | <ripluke> But neofetch isn't the fastest 💀 |
01:26:20 | FromDiscord | <Dale> It's very pretty though :P |
01:26:50 | FromDiscord | <Prestige> cat /etc/-release | uniq -u maybe |
01:26:55 | FromDiscord | <Prestige> Probably doesn't work for everything though |
01:28:54 | FromDiscord | <ripluke> In reply to @Dale "It's very pretty though": The source code sure as f isnt |
01:29:06 | FromDiscord | <ripluke> https://media.discordapp.net/attachments/371759389889003532/997313827962110062/IMG_1641.png |
01:29:24 | FromDiscord | <Dale> Yeah I'm looking through it |
01:29:53 | FromDiscord | <Dale> Bash is rarely a pretty sight it's so old. `fi` >.< |
01:30:59 | FromDiscord | <ripluke> Ikr fi is so stupid |
01:31:06 | FromDiscord | <ripluke> Why not just use end |
01:31:34 | FromDiscord | <Rika> POSIX shell compatibility |
01:32:10 | FromDiscord | <ripluke> Yea but posix sh should also use end |
01:34:47 | FromDiscord | <Rika> Do you know what you’re saying |
01:34:57 | FromDiscord | <Rika> That’s like saying yeah but C should use indentation |
01:35:06 | FromDiscord | <Dale> haha |
01:35:15 | FromDiscord | <ripluke> In reply to @Rika "That’s like saying yeah": No, it's quite a bit different actually |
01:35:24 | FromDiscord | <Rika> And why is that |
01:35:27 | FromDiscord | <Dale> Yeah man, these things go back to real terminals, not tty emulators like we use |
01:35:27 | FromDiscord | <ripluke> One is just changing the keyword |
01:35:44 | FromDiscord | <ripluke> In reply to @ripluke "One is just changing": While the other just changes the format completely |
01:35:45 | FromDiscord | <Rika> They’re both breaking changes no? |
01:35:48 | FromDiscord | <huantian> In reply to @Avahe "I'm not a fan": same lua is bleh for me |
01:35:51 | FromDiscord | <ripluke> In reply to @Dale "Yeah man, these things": Yea |
01:36:15 | FromDiscord | <ripluke> In reply to @Rika "They’re both breaking changes": Probably, but I'm saying that it shouldve originally been end |
01:36:25 | FromDiscord | <Dale> That's why shell scripts use the POSIX stuff |
01:36:33 | FromDiscord | <Rika> In reply to @ripluke "While the other just": If you really want to push it you could say C should use := instead of = and still have the same effect |
01:36:42 | FromDiscord | <ripluke> In what universe does fi make any sense |
01:36:43 | FromDiscord | <exelotl> Who's dissing Lua, I'll fite them |
01:36:49 | FromDiscord | <Rika> In reply to @ripluke "Probably, but I'm saying": Hindsight is pretty nice to have is it |
01:36:52 | FromDiscord | <Elegantbeef> Lua more like lamea↵(@exelotl) |
01:37:10 | FromDiscord | <exelotl> Nooo beef how could you |
01:37:15 | FromDiscord | <huantian> lua is a good language because it's simple and easy to embed in C↵but it's bad because it's simple and has 0 typing |
01:37:22 | FromDiscord | <ripluke> In reply to @Rika "If you really want": Don't get me started on := 💀 |
01:37:30 | FromDiscord | <huantian> also `end` is 😔 |
01:37:35 | FromDiscord | <ripluke> In reply to @huantian "lua is a good": Yea |
01:37:39 | FromDiscord | <Rika> In reply to @huantian "lua is a good": I personally don’t mind the lack of typing |
01:37:42 | FromDiscord | <ripluke> In reply to @huantian "also `end` is 😔": I quite like end |
01:37:45 | FromDiscord | <Rika> Don’t know why being simple is bad |
01:38:01 | FromDiscord | <ripluke> Wrote all of my neovim config in lua |
01:38:09 | FromDiscord | <Elegantbeef> Look at cstrings and say that again↵(@Rika) |
01:38:14 | FromDiscord | <ripluke> In reply to @ripluke "Wrote all of my": Was my first time using lua |
01:38:19 | FromDiscord | <ripluke> It was fun ig |
01:39:06 | FromDiscord | <Prestige> Wish I could write my nvim config in nims |
01:39:11 | FromDiscord | <Rika> In reply to @Elegantbeef "Look at cstrings and": I mean there’s being simple and being too simple |
01:39:11 | FromDiscord | <Prestige> or just nim |
01:39:15 | FromDiscord | <Rika> I don’t think Lua is too simple |
01:39:25 | FromDiscord | <ripluke> In reply to @Avahe "Wish I could write": Same lol |
01:39:40 | FromDiscord | <Elegantbeef> There is that statically typed lua backend language |
01:39:48 | FromDiscord | <Elegantbeef> Cant remember it right now |
01:39:56 | FromDiscord | <ripluke> In reply to @Elegantbeef "There is that statically": Yea it's a fork of Lua I think |
01:39:56 | FromDiscord | <huantian> that one made by roblox? |
01:40:06 | FromDiscord | <ripluke> In reply to @ripluke "Yea it's a fork": But can't remember the name |
01:40:06 | FromDiscord | <huantian> luau? |
01:40:20 | FromDiscord | <ripluke> No the one I'm thinking of starts with s |
01:40:37 | FromDiscord | <Rika> I’m still looking for some embeddable language for my project |
01:40:40 | FromDiscord | <Elegantbeef> Iirc it outputs lua so it is certainly not a fork |
01:40:54 | FromDiscord | <huantian> which btw luau is such a dumb name |
01:40:56 | FromDiscord | <Rika> Beef do you think WASM VM is light enough for restricted components like embedded |
01:41:03 | FromDiscord | <ripluke> In reply to @huantian "which btw luau is": Yes |
01:41:05 | FromDiscord | <Elegantbeef> There are runtimes specifically for it |
01:41:31 | FromDiscord | <Elegantbeef> People want to use wasm for a bunch of things embedded is a place where IOT wasm makes sense |
01:42:09 | FromDiscord | <Elegantbeef> The runtime i use wasmedge does say it's intended use is "smart devices" |
01:42:12 | FromDiscord | <Rika> Cool |
01:42:25 | FromDiscord | <Rika> Can I strip down features easily on a VM like that |
01:42:30 | FromDiscord | <Elegantbeef> Is that microcontrollers or micro computers is another question |
01:42:30 | FromDiscord | <exelotl> In reply to @ripluke "But can't remember the": Nelua? |
01:42:40 | FromDiscord | <Rika> In reply to @Elegantbeef "Is that microcontrollers or": Depends on the device |
01:42:47 | FromDiscord | <Rika> If it’s a hub or a sensor |
01:42:47 | FromDiscord | <Elegantbeef> It's written in Rust so i havent looked at it much |
01:42:54 | FromDiscord | <ripluke> It's teal |
01:42:55 | FromDiscord | <Dale> Are you thinking of Teal? It's basically a preprocessor for Lua that adds typing |
01:43:02 | FromDiscord | <exelotl> Ahh |
01:43:14 | FromDiscord | <Elegantbeef> Yea it's teal i was thinking of |
01:43:25 | FromDiscord | <Dale> There's also Moonscript, which is a weird typed/OOP thing, also preprocessed |
01:43:36 | FromDiscord | <Dale> I remember when Leafo first dropped it in IRC, fun times |
01:43:37 | FromDiscord | <ripluke> How I found it 😂 https://media.discordapp.net/attachments/371759389889003532/997317480542380103/IMG_1642.png |
01:43:37 | FromDiscord | <Elegantbeef> There are many WASM runtimes so you can probably find one that is made specifically for embedded usage |
01:43:49 | FromDiscord | <Rika> In reply to @Elegantbeef "It's written in Rust": Sounds like something to fear |
01:44:33 | FromDiscord | <ripluke> Teal is basically Lua typescript |
01:45:07 | FromDiscord | <Elegantbeef> It probably is something to fear rika especially things like that it uses docker to build so it was a pain for me to get working |
01:45:14 | FromDiscord | <Elegantbeef> Hell i'm not even certain i built it correctly |
01:45:26 | FromDiscord | <Elegantbeef> But i have a runtime that works so uhh yea |
01:45:48 | FromDiscord | <Elegantbeef> Wasmedge might not work for you as i dont know if you can statically link it |
01:46:10 | FromDiscord | <ripluke> Nimja seems cool |
01:46:23 | FromDiscord | <Rika> https://github.com/bytecodealliance/wasm-micro-runtime |
01:46:25 | FromDiscord | <Rika> Quick |
01:47:45 | FromDiscord | <Rika> Imagine a world where they called it “generalised assembly” or something… actually no never mind pay no mind to the short name version of that |
01:47:57 | FromDiscord | <Elegantbeef> gasm gasm gasm |
01:48:04 | FromDiscord | <Elegantbeef> Yea it's a shame the naming |
01:48:21 | FromDiscord | <ripluke> Gasm - m with gas |
01:48:23 | FromDiscord | <Elegantbeef> There is so much cool stuff you can do with a WASM vm though so i'll take it |
01:48:51 | FromDiscord | <Elegantbeef> It's just the best solution to the problem |
01:49:08 | FromDiscord | <Rika> 50K for AOT huh |
01:49:14 | FromDiscord | <ripluke> Does anyone use Nim wasm for a website? |
01:49:24 | FromDiscord | <Rika> I believe I have 16M so that’s small for my use case |
01:49:28 | FromDiscord | <Elegantbeef> Impbox uses it for nico's web backend |
01:49:50 | FromDiscord | <Elegantbeef> I think this uses that new wasm backend https://itch.io/queue/c/1064082/games-made-with-nico?game_id=1158813 |
01:51:32 | FromDiscord | <Elegantbeef> This toy was made using Nico + nimscripter + wasm |
01:51:33 | FromDiscord | <Elegantbeef> https://www.jasonbeetham.com/snake/nicoscripter.html |
01:51:54 | FromDiscord | <Elegantbeef> Yes i know rika "funny name" |
01:52:48 | FromDiscord | <Prestige> Lol you can kill yourself in that game by trying to go the opposite direction if you have a length of 3 or higher |
01:53:02 | FromDiscord | <Elegantbeef> I cannot find impbox's sword spinner |
01:53:32 | FromDiscord | <Rika> In reply to @Elegantbeef "Yes i know rika": I’m gonna call the other one picoscripter then smh |
01:54:36 | FromDiscord | <ripluke> In reply to @Elegantbeef "https://www.jasonbeetham.com/snake/nicoscripter.htm": Cool |
01:54:50 | FromDiscord | <TryAngle> In reply to @Elegantbeef "There are many WASM": nim WASM when? |
01:55:03 | FromDiscord | <ripluke> In reply to @Elegantbeef "https://www.jasonbeetham.com/snake/nicoscripter.htm": Wild guess, are u jason |
01:55:15 | FromDiscord | <Elegantbeef> The only benefit of a Nim native wasm runtime is that you can ship it easier |
01:56:13 | FromDiscord | <Elegantbeef> So it's a lot of work for a marginal benefit |
01:56:26 | FromDiscord | <Elegantbeef> It'd be ideal of course |
01:56:34 | FromDiscord | <Elegantbeef> But yea it's a lot of work to support the entire WASM runtime and proposals |
01:57:08 | FromDiscord | <Elegantbeef> I am |
01:58:28 | FromDiscord | <Elegantbeef> Everything is loading so slow on my internet but i'm still at 500mbps, download latency hell |
02:00:33 | FromDiscord | <ripluke> Is this slow? https://media.discordapp.net/attachments/371759389889003532/997321743247081552/IMG_1643.png |
02:00:43 | FromDiscord | <TryAngle> yes |
02:00:58 | FromDiscord | <TryAngle> except in germany |
02:01:07 | FromDiscord | <TryAngle> in germany this is BLAZINGLY FAST |
02:01:10 | FromDiscord | <ripluke> In reply to @TryAngle "yes": Yea I'm in literally the Middle of nowhere so not surprising |
02:01:16 | FromDiscord | <ripluke> In reply to @TryAngle "in germany this is": 💀 |
02:01:26 | FromDiscord | <ripluke> In reply to @ripluke "Yea I'm in literally": I'm also on data |
02:01:34 | FromDiscord | <Elegantbeef> My internet doesnt like you right now |
02:01:41 | FromDiscord | <ripluke> In reply to @Elegantbeef "My internet doesnt like": Wym |
02:01:57 | FromDiscord | <Prestige> I'm paying for 200 down but I'm getting like 450 down |
02:02:00 | FromDiscord | <Elegantbeef> The image still hasnt loaded here |
02:02:12 | FromDiscord | <TryAngle> In reply to @Avahe "I'm paying for 200": lmao |
02:02:25 | FromDiscord | <ripluke> In reply to @Elegantbeef "The image still hasnt": 💀 guess u won't get to know my wifi speed |
02:02:25 | FromDiscord | <TryAngle> u have glassfiber and they think u have copper maybe ? |
02:02:42 | FromDiscord | <ripluke> In reply to @Avahe "I'm paying for 200": Mine is also like that |
02:02:57 | FromDiscord | <TryAngle> what internet provider is that generous o_O |
02:03:06 | FromDiscord | <Prestige> maybe someone felt bad about my internet cutting out for 2 months and turned up my speed lol |
02:03:08 | FromDiscord | <Rika> I’m blessed, I’m on WiFi but then again I’m also paying for gigabit https://media.discordapp.net/attachments/371759389889003532/997322391145431101/IMG_7956.png |
02:03:15 | FromDiscord | <Prestige> Local ISP, I'm also in the middle of nowhere |
02:03:23 | FromDiscord | <ripluke> In reply to @Rika "I’m blessed, I’m on": I get like 250 at home |
02:03:45 | FromDiscord | <ripluke> In reply to @Avahe "Local ISP, I'm also": I'm more like on the edge of nowhere 😄 |
02:04:27 | FromDiscord | <ripluke> https://media.discordapp.net/attachments/371759389889003532/997322720368930827/IMG_1644.png |
02:04:33 | * | noeontheend joined #nim |
02:04:53 | FromDiscord | <TryAngle> In reply to @ripluke "": at a beach 😳 |
02:05:00 | FromDiscord | <TryAngle> is it quality water or dirty water? |
02:05:33 | FromDiscord | <Prestige> I'm in a rural area of NC @.luke |
02:05:34 | FromDiscord | <ripluke> In reply to @TryAngle "is it quality water": It's a lot cleaner than the beaches in my home state texas |
02:05:41 | FromDiscord | <ripluke> In reply to @Avahe "I'm in a rural": Oh |
02:05:50 | FromDiscord | <j-james> hmm, better than usual today https://media.discordapp.net/attachments/371759389889003532/997323070157103255/2022-07-14-190501.png |
02:05:56 | FromDiscord | <ripluke> I'm in americas first city |
02:05:57 | FromDiscord | <TryAngle> I'm living 10 minutes away from Oktoberfest 😎 |
02:06:00 | FromDiscord | <Prestige> oh no |
02:06:12 | FromDiscord | <ripluke> In reply to @ripluke "I'm in americas first": B4 Jamestown or Roanoke |
02:06:35 | FromDiscord | <ripluke> In reply to @Avahe "I'm in a rural": Oh |
02:06:58 | FromDiscord | <ripluke> I have a hella veiw outside tho |
02:07:09 | FromDiscord | <ripluke> Probably should move to #offtopic |
02:07:18 | FromDiscord | <Prestige> https://www.speedtest.net/result/13408568492.png |
02:07:24 | FromDiscord | <Prestige> I thought that was going to load, weird |
02:08:14 | FromDiscord | <ripluke> That's an awesome down speed |
02:08:38 | FromDiscord | <j-james> 8600% faster than mine, wow |
02:09:10 | FromDiscord | <Prestige> I do not miss dial-up |
02:09:15 | FromDiscord | <ripluke> The closest speed test server is in Jacksonville |
02:09:16 | FromDiscord | <!Patitotective> In reply to @j-james "hmm, better than usual": hahah thats literally my internet too |
02:09:24 | FromDiscord | <ripluke> In reply to @ripluke "The closest speed test": Over 50mi away |
02:09:37 | FromDiscord | <!Patitotective> (edit) "my internet" => "mine" |
02:09:53 | FromDiscord | <ripluke> Usually in Texas I have a server >20 miles away |
02:11:08 | FromDiscord | <Rika> definitely not trying to compete now https://media.discordapp.net/attachments/371759389889003532/997324407909400596/unknown.png |
02:11:12 | FromDiscord | <Prestige> Nice |
02:11:38 | FromDiscord | <Elegantbeef> My ISP doesnt believe in upload speed so i always look like a bafoon |
02:12:04 | FromDiscord | <Elegantbeef> 500 down 10 up |
02:12:06 | FromDiscord | <Rika> In reply to @ripluke "": doxxed |
02:12:07 | FromDiscord | <!Patitotective> fast.com gives me 5.1 mbps |
02:12:08 | FromDiscord | <ripluke> In reply to @Elegantbeef "My ISP doesnt believe": Lol my up/down is quite similar |
02:12:21 | FromDiscord | <ripluke> 150/125 most times |
02:12:32 | FromDiscord | <ripluke> Down/up btw |
02:14:06 | FromDiscord | <!Patitotective> In reply to @j-james "hmm, better than usual": actually my upload is better https://media.discordapp.net/attachments/371759389889003532/997325151844704398/unknown.png |
02:15:06 | FromDiscord | <ripluke> I'm in Canada now 😳 https://media.discordapp.net/attachments/371759389889003532/997325404027224174/IMG_1645.png |
02:15:29 | FromDiscord | <ripluke> Bad ip blurring job lol |
02:20:28 | FromDiscord | <Rika> wamr is by intel, i see |
02:22:16 | FromDiscord | <Rika> oh man cmake we meet again |
02:22:43 | FromDiscord | <ripluke> Cmake is a pain |
02:22:54 | FromDiscord | <ripluke> Main reason I don't write c |
02:23:13 | FromDiscord | <ripluke> The other big reason is that every damn thing is a pointer |
02:29:19 | * | noeontheend quit (Ping timeout: 244 seconds) |
02:30:07 | FromDiscord | <ripluke> A wm with a Nim/nimscript config would be cool |
02:30:55 | FromDiscord | <Rika> make it |
02:32:19 | FromDiscord | <ripluke> In reply to @Rika "make it": Eventually when those wlroots bindings are completed I will |
02:32:44 | FromDiscord | <ripluke> I don't like xorg very much |
02:33:38 | FromDiscord | <Rika> OH GOD YES you can opt out of cmake in this case |
02:33:54 | FromDiscord | <Rika> i mean, wamr makes it easy to |
02:34:04 | FromDiscord | <Rika> and its not like pico sdk with no info about it xd |
02:34:53 | FromDiscord | <Rika> oh wow the makefiles are kind of monsters tho |
02:45:29 | FromDiscord | <Elegantbeef> Meanwhile me going "mmmm wasm is cooler" 😛↵(@.luke) |
02:54:59 | FromDiscord | <Dale> Well I got the distro thingy to work, but just ended up ripping the function out of the std lib, renaming a couple of things, and making the call not templated :/ |
02:56:04 | FromDiscord | <Dale> The little procs for getting `uname -a` and whatnot are still templated for memoizing the results, otherwise it's dead slow when you iterate over all the distros haha |
03:07:02 | FromDiscord | <Dale> `Compiled on linux (ArchLinux-amd64) @ 03:05:58 Friday, 15 July 2022` \o/ get-to-grips-with-nim task #1 completo |
03:07:49 | FromDiscord | <Elegantbeef> This is where i normally say "let's see the code so i can insult you"↵(@Dale) |
03:08:54 | FromDiscord | <Dale> sent a code paste, see https://play.nim-lang.org/#ix=44oE |
03:08:56 | FromDiscord | <Elegantbeef> Ah |
03:09:26 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Ah": he wanted to see stinky code |
03:10:26 | * | CyberTailor quit (Remote host closed the connection) |
03:10:33 | FromDiscord | <Dale> Hang on, the clock is off by an hour! |
03:15:24 | FromDiscord | <Rika> In reply to @Patitotective "he wanted to see": He could always just ask you /j |
03:15:40 | FromDiscord | <Rika> Uh oh stinky |
03:16:17 | FromDiscord | <Rika> Beef why did you use wasmer over wasmtime again |
03:16:25 | FromDiscord | <Dale> So, `now()` uses the correct time, but `CompileTime` is off by an hour, must not be taking BST into account |
03:16:38 | FromDiscord | <Elegantbeef> You mean wasmedge? |
03:16:46 | FromDiscord | <Elegantbeef> It was the most documented C Api with examples |
03:16:51 | FromDiscord | <Rika> Oh so you don’t know of the other one ok |
03:16:57 | FromDiscord | <Rika> Check that one I mentioned |
03:18:21 | FromDiscord | <Elegantbeef> I looked at a bunch of them but didnt see wasmtime apparently |
03:21:26 | FromDiscord | <Rika> LMAO https://media.discordapp.net/attachments/371759389889003532/997342097982107708/IMG_7957.png |
03:26:20 | FromDiscord | <Elegantbeef> Wasmtime looks nice |
03:26:42 | FromDiscord | <Rika> Tbh I’m thinking of sticking to Lua, I don’t think there’s enough benefit for me to embed WASM |
03:26:54 | FromDiscord | <Elegantbeef> Probably not for what you're doing |
03:26:59 | FromDiscord | <Rika> lol |
03:27:21 | FromDiscord | <Elegantbeef> Wasmtime might be nice for me though as it seems like it's easier to embed with nim |
03:27:24 | FromDiscord | <Rika> Back to figuring out how to extract CMake out of the pico SDK I guess |
03:27:35 | FromDiscord | <Rika> Good thing I found it lol |
03:38:13 | FromDiscord | <ripluke> Nim 2 ETA? |
03:38:14 | FromDiscord | <voidwalker> https://www.speedtest.net/result/c/e81867bb-6af9-4bff-8618-958ed145057b |
03:38:25 | FromDiscord | <Elegantbeef> Soon TM |
03:38:42 | FromDiscord | <voidwalker> https://media.discordapp.net/attachments/371759389889003532/997346440764473404/unknown.png |
03:38:45 | FromDiscord | <ripluke> In reply to @voidwalker "https://www.speedtest.net/result/c/e81867bb-6af9-4b": I need your wifi |
03:38:56 | FromDiscord | <ripluke> Lol how much do u pay for that 💀 |
03:39:06 | FromDiscord | <voidwalker> $8 |
03:39:17 | FromDiscord | <ripluke> A month? |
03:39:19 | FromDiscord | <voidwalker> yes |
03:39:22 | FromDiscord | <Prestige> >.> |
03:39:23 | FromDiscord | <ripluke> No fucking way |
03:39:40 | FromDiscord | <Prestige> Are you being held hostage in a datacenter |
03:39:41 | FromDiscord | <ripluke> You pay less than me and get better wifi .-. |
03:40:10 | FromDiscord | <voidwalker> actually you are right, it's $7.70 |
03:40:17 | FromDiscord | <ripluke> In reply to @Avahe "Are you being held": Man’s probably trapped at a nasa facility |
03:40:39 | FromDiscord | <ripluke> In reply to @voidwalker "actually you are right,": 😳 |
03:40:44 | FromDiscord | <voidwalker> we actually have 8/8gbps for $10, in some places. waiting to be available here |
03:41:04 | FromDiscord | <ripluke> Are u in America |
03:41:14 | FromDiscord | <voidwalker> Ah no, that would be impossible there : D |
03:41:18 | FromDiscord | <voidwalker> good ol eastern europe |
03:41:21 | FromDiscord | <ripluke> In reply to @voidwalker "Ah no, that would": Yea |
03:41:32 | FromDiscord | <voidwalker> the capitalist sharks make it impossible |
03:41:33 | FromDiscord | <ripluke> In reply to @voidwalker "good ol eastern europe": Ah |
03:42:01 | FromDiscord | <ripluke> Excuse my bad geography, but is that like England and Ireland and stuff |
03:42:13 | FromDiscord | <voidwalker> nah, that's like Romania, Bulgaria |
03:42:29 | FromDiscord | <ripluke> In reply to @ripluke "Excuse my bad geography,": That’s Western Europe |
03:42:35 | FromDiscord | <ripluke> In reply to @voidwalker "nah, that's like ": Oh |
03:42:57 | FromDiscord | <voidwalker> yeah, you need to get an atlas : D |
03:42:59 | FromDiscord | <voidwalker> and a nim cheat sheet |
03:43:02 | FromDiscord | <ripluke> https://tenor.com/view/the-flash-barry-allen-run-fast-gif-6144593 |
03:43:16 | FromDiscord | <ripluke> My phone using 8gb wifi |
03:43:29 | FromDiscord | <ripluke> Ah embed broke |
03:43:48 | FromDiscord | <ripluke> In reply to @ripluke "My phone using 8gb": https://media.discordapp.net/attachments/371759389889003532/997347727824400426/image0.gif |
03:45:48 | FromDiscord | <ripluke> In reply to @voidwalker "and a nim cheat": What for? |
03:45:56 | FromDiscord | <ripluke> In reply to @voidwalker "yeah, you need to": Yea |
03:46:06 | FromDiscord | <voidwalker> idk, I'd love a big ass nim cheat seet on my wall |
03:46:30 | FromDiscord | <ripluke> In reply to @voidwalker "idk, I'd love a": Yes |
03:46:35 | FromDiscord | <voidwalker> to look at every day, until I can remember how to mapit, sequtils and such : D |
03:46:52 | FromDiscord | <voidwalker> how to write those damn tuples |
03:46:56 | FromDiscord | <ripluke> In reply to @ripluke "Yes": Would make a great Convo starter when I have friends over |
03:47:03 | FromDiscord | <ripluke> Oh wait |
03:47:11 | FromDiscord | <ripluke> I don't have any friends xd |
03:47:19 | FromDiscord | <ripluke> In reply to @voidwalker "how to write those": Yea |
03:47:30 | FromDiscord | <ripluke> That's why I use sequences 😂 |
03:47:52 | FromDiscord | <Elegantbeef> It's just `(a, b)` |
03:47:57 | FromDiscord | <Elegantbeef> There isnt any funky about it! |
03:48:35 | FromDiscord | <ripluke> Ik |
03:48:41 | FromDiscord | <ripluke> Were joking lol |
03:48:49 | FromDiscord | <ripluke> (edit) "Were" => "We're" |
03:48:54 | FromDiscord | <Rika> Hard to tell ngl |
03:50:17 | FromDiscord | <ripluke> In reply to @Rika "Hard to tell ngl": Yea over messages you can't tell emotions :/ |
03:51:27 | FromDiscord | <voidwalker> sure you can 🤡 |
03:53:25 | FromDiscord | <Rika> In reply to @voidwalker "sure you can 🤡": Lmao |
03:59:10 | * | arkurious quit (Quit: Leaving) |
04:22:01 | FromDiscord | <ripluke> Mobile nimming 💀 https://media.discordapp.net/attachments/371759389889003532/997357341236277248/IMG_1647.png |
04:23:41 | FromDiscord | <Rika> Masochist |
04:23:56 | FromDiscord | <ripluke> I'm bored |
04:24:06 | FromDiscord | <Rika> You wouldn’t be the first one to do this and declare it here though |
04:24:06 | FromDiscord | <ripluke> I don't have a laptop near me |
04:24:22 | FromDiscord | <ripluke> I usually use a laptop |
04:24:32 | FromDiscord | <ripluke> But Im on vacation so I don't have it |
04:24:36 | FromDiscord | <Elegantbeef> The resident mobile Nim programmer hasnt been here in a bit |
04:24:42 | FromDiscord | <Tattva> What code editor is that? |
04:24:44 | FromDiscord | <ripluke> In reply to @Elegantbeef "The resident mobile Nim": Who is it |
04:24:55 | FromDiscord | <Rika> I forgot their name honestly |
04:24:58 | FromDiscord | <ripluke> In reply to @Tattva "What code editor is": https://repl.it |
04:24:59 | FromDiscord | <Rika> I forget names too easily |
04:25:03 | FromDiscord | <Elegantbeef> I think it's forrester now |
04:25:07 | FromDiscord | <Elegantbeef> Or something similar |
04:25:21 | FromDiscord | <ripluke> In reply to @Elegantbeef "I think it's forrester": Can't find them |
04:28:25 | FromDiscord | <ripluke> Hmm how can I loop over every pixel in an image |
04:28:41 | FromDiscord | <Rika> Uh with a for loop? What do you mean |
04:28:45 | FromDiscord | <Rika> What do you have so far |
04:28:55 | FromDiscord | <ripluke> What method or library do I need |
04:29:00 | FromDiscord | <Rika> Pixie |
04:29:17 | FromDiscord | <ripluke> Ah and what proc? The docs seems a bit lacking |
04:30:06 | FromDiscord | <Rika> []? |
04:30:41 | FromDiscord | <ripluke> Lol what does that mean |
04:30:51 | FromDiscord | <Rika> Array index |
04:31:06 | FromDiscord | <ripluke> Oh |
04:32:08 | FromDiscord | <Elegantbeef> Pixie has an iterator for pixels iirc |
04:32:47 | FromDiscord | <Elegantbeef> Nevermind |
04:33:07 | FromDiscord | <Elegantbeef> so it's just `for pixel in myImage.data` |
04:34:10 | FromDiscord | <ripluke> Oh |
04:41:19 | madprops | I might have made this firefox addon https://addons.mozilla.org/en-US/firefox/addon/githop/ |
04:41:48 | madprops | https://i.imgur.com/pokaRck.jpg |
04:42:15 | FromDiscord | <Elegantbeef> Is it written in Nim? |
04:42:31 | madprops | nah but since you all use github, might find it useful |
04:43:59 | madprops | im thinking on how to deploy generic addons based on this simply by providing a url and icon |
04:44:07 | madprops | but installing local addons in firefox seems to be a pain |
04:44:15 | madprops | have to signed |
04:48:50 | FromDiscord | <ripluke> Hmm how can I get image length |
05:08:16 | FromDiscord | <ripluke> Lol I can't find it |
05:13:38 | FromDiscord | <Elegantbeef> `image.width` |
05:20:44 | FromDiscord | <ripluke> Yea I got it |
05:50:01 | FromDiscord | <ripluke> sent a code paste, see https://play.nim-lang.org/#ix=44oQ |
05:51:41 | FromDiscord | <ripluke> sent a code paste, see https://play.nim-lang.org/#ix=44oR |
05:52:00 | FromDiscord | <ripluke> (edit) "https://play.nim-lang.org/#ix=44oR" => "https://play.nim-lang.org/#ix=44oS" |
05:52:12 | FromDiscord | <Elegantbeef> What image format are you trying to decode? |
05:52:18 | FromDiscord | <ripluke> In reply to @Elegantbeef "What image format are": Jpg |
05:55:46 | FromDiscord | <guzba> we do not support encoding jpeg in pixie, only decoding↵png is suggested |
05:55:54 | FromDiscord | <guzba> (edit) "we do not support encoding jpeg in pixie, only decoding↵png is suggested ... " added "for encoding" |
05:56:10 | FromDiscord | <Elegantbeef> Cmon luke it even gave the line the error was on |
06:03:01 | * | toluene quit (Quit: Ping timeout (120 seconds)) |
06:03:55 | FromDiscord | <huantian> it's 2022 why do we even need jpeg anymore! |
06:05:04 | * | toluene joined #nim |
06:05:47 | FromDiscord | <ripluke> Yea that’s what I did↵(@guzba) |
06:06:21 | FromDiscord | <ripluke> Anyways ima sleep now gn y’all |
06:10:14 | FromDiscord | <ripluke> In reply to @Elegantbeef "Cmon luke it even": Lol I thought I was doing something wrong because it let me decode jpg files but not decode them |
06:11:53 | FromDiscord | <Dale> Is there a way to configure the `nim doc` css location? It's looking in the wrong place |
06:16:22 | FromDiscord | <j-james> Elegantbeef\: draft wayland bindings are up at https://github.com/j-james/nim-wayland |
06:16:47 | FromDiscord | <Elegantbeef> Oh shit you've been doing work! 😄 |
06:17:01 | FromDiscord | <j-james> they don't, uh, build |
06:19:35 | FromDiscord | <j-james> my current schedule is to try and make them compile, get rid of all the `ptr T`, remove the Wl prefixes and see how many things conflict with wlroots, then write tests |
06:20:14 | FromDiscord | <Dale> In reply to @Dale "Is there a way": Eh, I fixed it with a symlink, not an elegant solution though ;-; |
06:41:02 | FromDiscord | <j-james> what is `(void ()(void)) listener` doing? |
06:42:23 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=44oY |
06:42:43 | FromDiscord | <Elegantbeef> C is confusing |
06:43:02 | FromDiscord | <deech> list of callbacks? |
06:43:06 | FromDiscord | <Generic> it casts listener to the type of a pointer to a pointer to a function |
06:43:10 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/997392868329140224/image.png |
06:43:42 | FromDiscord | <Generic> with no parameters and no return value |
06:44:41 | FromDiscord | <Elegantbeef> I'd hope not given it lacks a `len` parameter↵(@deech) |
06:45:33 | FromDiscord | <Generic> sometimes lists are null terminated too |
06:45:48 | FromDiscord | <Generic> though it does not make sense here |
06:53:06 | FromDiscord | <j-james> this seems to it looking at wl\_proxy\_add\_listener's type signature↵(@Generic) |
06:53:55 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=44oZ |
06:54:19 | FromDiscord | <j-james> which doesn't compile 🙁\: `Error: expression cannot be cast to proc (){.closure.}` |
06:55:06 | FromDiscord | <j-james> seems i need to do exactly that |
06:55:25 | FromDiscord | <Rika> cast[proc() {.cdecl.}]↵? |
06:55:37 | FromDiscord | <Rika> Was it that pragma i forgot |
06:55:49 | FromDiscord | <Elegantbeef> should be by default |
06:59:20 | FromDiscord | <j-james> ah, that worked, ty |
07:10:21 | NimEventer | New thread by Dxb: Compile time detection of experimental compiler feature, see https://forum.nim-lang.org/t/9306 |
07:31:48 | FromDiscord | <j-james> is `intptr_t` equivalent to `ptr int`? |
07:32:31 | FromDiscord | <Rika> No |
07:33:07 | FromDiscord | <Rika> It is int64 on 64 bit systems and int32 on 32 bit systems |
07:35:43 | * | rockcavera quit (Remote host closed the connection) |
07:49:59 | FromDiscord | <Recruit_main707> 100% sure? |
07:51:56 | FromDiscord | <Elegantbeef> `intptr_t` seems to be just a datatype the size of a pointer so `int` would be the equivlent not `ptr int` |
07:52:40 | FromDiscord | <TryAngle> In reply to @j-james "Elegantbeef\: draft wayland bindings": what is your opinion, is it usable for windowing already? |
07:53:33 | FromDiscord | <Elegantbeef> I've been using wayland for a couple weeks and i've had some issues, but it's hard to tell if it's gnome or wayland |
07:53:50 | FromDiscord | <Elegantbeef> But it works |
07:53:59 | FromDiscord | <Elegantbeef> I can play games, i can use most of the applications i used before |
08:00:41 | FromDiscord | <Elegantbeef> They're clearly not |
08:00:41 | FromDiscord | <Elegantbeef> Unless you mean are the bindings are usable |
08:00:41 | FromDiscord | <j-james> who needs code that compiles anyway |
08:01:21 | FromDiscord | <Elegantbeef> Just stick "works on my machine" on any issues and carry on |
08:03:08 | FromDiscord | <TryAngle> In reply to @Elegantbeef "Unless you mean are": I mean that 😂 |
08:04:13 | FromDiscord | <jmgomez> did anyone got nimlangserver working on win or via wsl in vscode? It works pretty good on mac |
08:15:58 | * | CyberTailor joined #nim |
08:22:26 | FromDiscord | <Phil> Question about the vscode nim plugin!↵Do I seriously have to add paths to the main files of all my projects manually into the `nim.project` setting? Or take the alternative, leave it empty and thus only get suggestions for the file I currently have open. |
08:23:18 | FromDiscord | <Elegantbeef> If it doesnt find your project properly yes you have to |
08:23:35 | FromDiscord | <Phil> Sad iso noises |
09:34:26 | FromDiscord | <dom96> Yay. Phoronix just posted this https://t.co/qwEjOWPLkr |
10:09:41 | FromDiscord | <Rika> Cool let’s read the comments <— first mistake |
10:09:58 | FromDiscord | <Rika> “Oh no, another programming language? Prepare for hate posts and lenghty discussions in 3... 2... 1... “ |
10:10:04 | FromDiscord | <Rika> This man is completely correct |
10:10:55 | FromDiscord | <pmunch> Oh neat! |
10:10:56 | FromDiscord | <pmunch> Maybe we should update the webpage to include more about meta-programming (which I consider one of Nims killer features) |
10:11:34 | FromDiscord | <Rika> Yeah one of the comments said he didn’t see any killer feature |
10:17:13 | FromDiscord | <flywind> killer features are already listed on the release of 1.6.0 https://nim-lang.org/features.html They should be put on the webpage. |
10:17:57 | FromDiscord | <flywind> https://nim-lang.org/blog/2021/10/19/version-160-released.html |
10:18:50 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/997447140198588446/Screenshot_2022-07-15-18-18-39-13_40deb401b9ffe8e1df2f1cc5ba480b12.jpg |
10:20:21 | FromDiscord | <Phil> In reply to @Rika "Cool let’s read the": The comments aren't really bad. There's like one dude that states that he's basically married to curly braces and dislikes indentation, but that's a personal preference shrugs |
10:23:54 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=44pv |
10:25:13 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=44pv" => "https://play.nim-lang.org/#ix=44pw" |
10:25:38 | FromDiscord | <Phil> ~~Basically this is the one time where dynamic typing would actually be handy~~ |
10:27:59 | FromDiscord | <Phil> Wait, I... I guess I could iterate over object fields and set the fieldValue in the forloop |
10:28:47 | FromDiscord | <flywind> What's the type of T? |
10:29:11 | FromDiscord | <flywind> Looks like you probably need object variants. |
10:29:14 | FromDiscord | <Phil> T is just any sort of object that you want to convert the SQL output to |
10:30:13 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=44py |
10:30:27 | FromDiscord | <flywind> https://nim-lang.github.io/Nim/tut2.html#object-oriented-programming-object-variants |
10:30:52 | FromDiscord | <Phil> But I sort of want to avoid object variants for this as they're not great to deal with |
10:32:42 | FromDiscord | <Phil> The current approaches I'm seeing:↵1) setField, at runtime, iterates over all fields on the object and if the name matches it assigns the value (potentially slow)↵2) I require the user to have the fields on their object to be ordered exactly like they are ordered in the database. Then I know implicitly that e.g. column 1 belongs to the first field of the `Potato` object |
10:39:49 | FromDiscord | <Asbjørn F> are `converter` inferred or do I still need to tell it which type to convert to? |
10:40:03 | FromDiscord | <Asbjørn F> I've just used `proc`s so far |
10:41:02 | FromDiscord | <Prestige> In reply to @Rika "Cool let’s read the": `From a quick glance (if I read it correctly) Nim is >2x slower than Rust, that's too much for a new compiled systems language.`↵Always seeing this, Nim is X times slower than Rust, on like every thread talking about Nim lol |
10:43:11 | FromDiscord | <Generic> where do they pull these numbers from? |
10:43:45 | FromDiscord | <Phil> https://programming-language-benchmarks.vercel.app/nim-vs-rust |
10:45:15 | FromDiscord | <Phil> Where they get the code for their benchmark from is beyond me |
10:45:52 | FromDiscord | <Prestige> https://github.com/hanabi1224/Programming-Language-Benchmarks I think |
10:46:02 | FromDiscord | <Phil> Looked through that |
10:46:10 | FromDiscord | <Phil> You'll only find a nimble file and a nim.yaml file in there |
10:46:46 | FromDiscord | <Phil> Wait, no, found it |
10:47:03 | FromDiscord | <Phil> They use this for binary tree traversal:↵https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/binarytrees/2.nim |
10:47:36 | FromDiscord | <Prestige> Could make some PRs I suppose, if we can boost performance |
10:48:44 | FromDiscord | <Prestige> Since so many people seem to care to reference these benchmarks to say nim sucks and is slow, lol |
10:49:27 | FromDiscord | <Generic> looking at the binary tree I don't see anything super egregious |
10:49:54 | FromDiscord | <Generic> --d:danger, a main proc, ... |
10:52:42 | FromDiscord | <capocasa> What would be the most Nimish (and fast-executing) way to replace all `foo` with `<b>foo</b>` in a string? (Where foo could be any substring). I went reaching for regexes but I heard quite a few times that Nim has better tools available for the job but I'm not really sure where to start. |
10:53:39 | FromDiscord | <capocasa> I'm looking into strscans but they seem to be find-only (not replace), something like that would be ideal- then there is PEG but not sure how fast it is or how to learn more about using it. |
10:53:46 | FromDiscord | <Generic> it depends a lot, if that's the only thing you want to do, I'd say regex is perfectly fine |
10:54:17 | FromDiscord | <enthus1ast> strutils.replace ? |
10:54:57 | FromDiscord | <Rika> In reply to @Generic "looking at the binary": then read the rust stuff and see if theyre equivalent code |
10:55:06 | FromDiscord | <Rika> or at least not majorly different |
10:55:10 | FromDiscord | <Generic> I did and it quite looks like it |
10:55:12 | FromDiscord | <capocasa> In reply to @enthus1ast "strutils.replace ?": How would I alternate <b> and </b>, and not replace the last `` if it's an odd number? |
10:55:17 | FromDiscord | <Generic> though I'm not really a rust pro |
10:55:43 | FromDiscord | <enthus1ast> what? \:)↵(@capocasa) |
10:55:57 | FromDiscord | <Phil> Argh, my idea of "iterate over all fields on object and assign value if name matches" can't work out since that's at runtime and the compiler demands that the values must always be correct |
10:56:13 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=44pI |
10:56:43 | FromDiscord | <capocasa> In reply to @enthus1ast "what? \:) (<@378612300426248212>)": You said use strutils.replace for doing `foo` -> `<b>foo</b>` but I'm unsure of how to do the details. Or were you referring to someone else? |
10:57:18 | FromDiscord | <enthus1ast> @capocasa\: mystr.replace("foo", "\<b\>foo\</b\>") |
10:57:53 | FromDiscord | <Generic> funnily enough in all the benchmarks on this site which are implemented in C and Nim, Nim is close, equal or sometimes even ahead |
10:58:36 | FromDiscord | <Generic> ok not in all, but a lot of them |
10:59:00 | FromDiscord | <capocasa> In reply to @enthus1ast "<@378612300426248212>\: mystr.replace("*foo*",": `foo` is a placeholder for anything |
10:59:08 | FromDiscord | <Rika> yes] |
11:00:51 | FromDiscord | <dom96> In reply to @flywind "killer features are already": I built such a nice overview of features and instead we’ve got a massive list of bullet points on the front page and no link to that features page :/ |
11:00:59 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=44pM |
11:01:40 | FromDiscord | <Phil> Is there no way for me to temporarily disable type checks or sth for an explicit part of code?↵Like, I know when the columnNames are equal that the types will be okay (I'll throw an exception myself if they aren't) |
11:05:35 | FromDiscord | <Generic> https://media.discordapp.net/attachments/371759389889003532/997458906550894672/unknown.png |
11:05:45 | FromDiscord | <Generic> it's really orc which is biting us in the tail here |
11:08:30 | FromDiscord | <flywind> Really, do you use devel compiler? |
11:08:59 | FromDiscord | <capocasa> sent a code paste, see https://play.nim-lang.org/#ix=44pN |
11:09:21 | FromDiscord | <Generic> In reply to @flywind "Really, do you use": yes, though it has been a while since I updated it |
11:09:51 | FromDiscord | <Generic> for me the runtime is about cut in half with refc and no threads:on |
11:09:53 | FromDiscord | <Rika> did you use debug symbols because it seems like a lot of info isnt being shown |
11:10:00 | FromDiscord | <flywind> The devel compiler defaults to `threads:on` recently. So every allocation needs LeaveCriticalSection/EnterCriticalSection. |
11:10:01 | FromDiscord | <Rika> hm okay |
11:10:14 | FromDiscord | <enthus1ast> @capocasa\: btw do you want to parse markdown? |
11:10:22 | FromDiscord | <enthus1ast> because we have markdown compilers |
11:10:25 | FromDiscord | <Generic> In reply to @flywind "The devel compiler defaults": I used threads:on because that's what they use in the benchmark |
11:10:43 | FromDiscord | <Generic> In reply to @Rika "did you use debug": yes, that's just the summary of vtune |
11:11:17 | FromDiscord | <flywind> In reply to @flywind "The devel compiler defaults": I switched to minialloc, LeaveCriticalSection/EnterCriticalSection are eliminated. |
11:11:27 | FromDiscord | <flywind> (edit) "LeaveCriticalSection/EnterCriticalSection" => "LeaveCriticalSection and EnterCriticalSection" |
11:11:53 | FromDiscord | <enthus1ast> @xflywind\: just curious, why we do not use minalloc by default? Has it some drawbacks? |
11:12:10 | FromDiscord | <Rika> minialloc? |
11:12:12 | FromDiscord | <Rika> mimalloc? |
11:12:18 | FromDiscord | <enthus1ast> minialloc |
11:12:50 | FromDiscord | <enthus1ast> https://github.com/microsoft/mimalloc |
11:13:01 | FromDiscord | <flywind> In reply to @Rika "mimalloc?": Sorry, my mistake |
11:13:18 | FromDiscord | <Rika> that's mimalloc |
11:13:20 | FromDiscord | <Rika> okay |
11:13:53 | FromDiscord | <Generic> it's used by Death Stranding (a Hideo Kojima game) |
11:13:55 | FromDiscord | <Generic> it must be good |
11:14:05 | FromDiscord | <flywind> Araq replied here https://forum.nim-lang.org/t/9266 |
11:14:21 | FromDiscord | <flywind> > Could mímalloc be used by nim by default when threads is enabled (in supported platforms if that’s a limitation)? What would be the drawback?↵> ↵> I don't know of any drawbacks for --threads:on --mm:orc. In other combinations Nim's memory manager can be better. |
11:14:43 | FromDiscord | <Generic> well there is a drawback |
11:14:47 | FromDiscord | <Yardanico> well at least in some specific cases it can be much slower, e.g. https://github.com/Yardanico/mimalloc_nim#performance |
11:14:55 | FromDiscord | <Generic> we look back in this stupid benchmark which purely measures allocation and deallocation speed |
11:14:57 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/997461261216383077/unknown.png |
11:15:02 | FromDiscord | <Generic> (edit) "back" => "bad" |
11:15:14 | FromDiscord | <flywind> Though it isn't faster in my benchmark to compile the Nim compiler though, |
11:15:31 | FromDiscord | <Generic> hm, interesting |
11:15:59 | FromDiscord | <enthus1ast> oh thats bad↵(@Yardanico) |
11:16:13 | FromDiscord | <Yardanico> in most cases the difference isn't noticeable @enthus1ast |
11:16:17 | FromDiscord | <Yardanico> but in this specific benchmark it is very noticeable |
11:17:05 | FromDiscord | <enthus1ast> how does rust allocate? btw |
11:17:07 | FromDiscord | <flywind> In my case, there are no LeaveCriticalSection/EnterCriticalSection, but alloc/dealloc seems to consume more time. |
11:17:33 | FromDiscord | <Yardanico> jemalloc @enthus1ast |
11:17:46 | FromDiscord | <Yardanico> or not |
11:18:04 | FromDiscord | <Yardanico> "If you're on a Unix-like platform, it calls malloc, so look that up in your operating system's man pages. On Windows, it uses HeapAlloc." |
11:18:09 | FromDiscord | <Generic> the benchmark only runs a few seconds, so the sampling profiler result are probably not as good as they can get |
11:18:09 | FromDiscord | <Yardanico> looks like they're just using OS builtins |
11:20:18 | FromDiscord | <Generic> well ok, though that atleast explains the benchmark result |
11:20:57 | FromDiscord | <Yardanico> you can try `-d:useMalloc` with Nim |
11:21:27 | FromDiscord | <Yardanico> that'll make it just use `malloc` for allocation without anything extra |
11:22:16 | FromDiscord | <Generic> it's the slowest of them all |
11:22:22 | FromDiscord | <Generic> though I'm also on windows |
11:22:42 | FromDiscord | <Generic> I just recently read that malloc is allegedly terribly slow here |
11:22:44 | FromDiscord | <Yardanico> In reply to @Generic "it's the slowest of": yes |
11:22:50 | FromDiscord | <Require Support> is there a way in nim to check if a certain json key exists or not |
11:22:57 | FromDiscord | <Yardanico> `if "key" in myjsonobj` |
11:23:12 | FromDiscord | <Yardanico> or if you need a bool, then `let itExists = "key" in myjsobobj` |
11:24:59 | FromDiscord | <Yardanico> if you want to actually know how it works, `in` in Nim is sugar for calling `contains` |
11:25:15 | FromDiscord | <Yardanico> so `"key" in myjsonobj` actually does `contains(myjsonobj, "key")` |
11:25:33 | FromDiscord | <Yardanico> You can define a `contains` for any of your own types as well and `in` will start working for them automtaically |
11:27:39 | FromDiscord | <Yardanico> there's also `notin` (and you can use it as `not_in` due to Nim case insensitivity rules) |
11:30:32 | FromDiscord | <Generic> the second benchmark is more or less the same story |
11:30:50 | FromDiscord | <Generic> only instead of allocations, the one thing which is important is here coroutine context switching time |
11:38:12 | FromDiscord | <Generic> the next benchmark seems to be actually more interesting |
11:40:27 | FromDiscord | <Generic> I'm not sure what exactly makes the difference here, it could just come down to the nim bigints library being less optimised |
11:40:42 | FromDiscord | <Generic> though it doesn't use bigints that much atleast from a glance |
11:40:51 | FromDiscord | <Generic> also a lot of the code is not in a main proc |
11:42:18 | FromDiscord | <Generic> the next benchmark is literally just single threaded Nim vs multithreaded Rust, wow |
11:44:31 | FromDiscord | <Generic> ok I'm getting tired of this |
11:45:15 | FromDiscord | <Rika> In reply to @Isofruit "The comments aren't really": How’s that “they’re not that bad” statement holding up? |
11:46:52 | FromDiscord | <Generic> the rest is a few missing main procs where it would probably make a difference, more multithreaded rust implementation, ah also simd optimised rust implementation |
11:47:06 | FromDiscord | <Generic> does this mean everything is allowed? |
11:47:27 | FromDiscord | <Generic> ah also more bigints games |
11:48:15 | FromDiscord | <Rika> One of the least useful benchmark games |
11:48:21 | FromDiscord | <Rika> Not that they’re generally useful |
11:49:21 | * | jmdaemon quit (Ping timeout: 268 seconds) |
11:49:34 | FromDiscord | <Generic> they have their uses, but the only thing this proofs is that the one Nim big int library they use isn't as optimised as the Rust one they use |
11:55:22 | FromDiscord | <Generic> I would argue that these benchmarks still hold value, in showing how "fast" a language is terms of how ripe the ecosystem is, but they are pretty worthless in finding out how "fast" a language is |
11:56:15 | FromDiscord | <Generic> because then I can also use Python in such a benchmark and do a matrix multiplication in numpy, see Python isn't a slog\? (\as long as you don't actually use Python) |
11:56:24 | FromDiscord | <Generic> (edit) "slog\?" => "slog\!" |
12:08:26 | FromDiscord | <Daniel> https://news.opensuse.org/2022/07/14/os-reaches-first-class-support-for-nim/ |
12:09:59 | FromDiscord | <jb> Good afternoon, how does one parse an int64 from a string (considering parseInt wouldn't work on 32bit systems)? |
12:14:17 | FromDiscord | <Daniel> https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1334910-opensuse-announces-first-class-support-for-the-nim-programming-language/page2 |
12:16:03 | FromDiscord | <Prestige> Dang, lot of negativity towards Nim there |
12:36:20 | FromDiscord | <Daniel> I would take it as a useful feedback 😉 |
12:43:09 | FromDiscord | <Phil> Where do you even get "They are not distro friendly" as an opinion from? |
12:45:55 | FromDiscord | <Asbjørn F> https://en.wikipedia.org/wiki/Lies,_damned_lies,_and_statistics |
12:59:10 | FromDiscord | <Require Support> In reply to @Isofruit "Where do you even": they cited this https://github.com/nim-lang/Nim/pull/19960#issuecomment-1177075883 i think.. no idea 🤔 |
13:02:38 | FromDiscord | <Phil> I... I don't think why that PR is an issue tbh |
13:02:45 | FromDiscord | <Phil> For Araq I mean |
13:03:07 | FromDiscord | <Phil> (edit) "think" => "get" |
13:04:21 | madprops | wtf i like opensuse now |
13:22:08 | FromDiscord | <laker31> In reply to @jan0809 "if the imports itself": Yes, did you manage to? Also if cmd + clicking (or your OS equivalent) on an imported library takes you to its file.↵For me only imports of non-standard libraries complete 😦 |
13:51:49 | FromDiscord | <voidwalker> Btw about that V language, how would I get an idea of its relative popularity vs nim ? I see there's 600 people on their discord online, vs 500 here |
13:53:04 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44qn |
13:53:24 | FromDiscord | <voidwalker> It would appear to have more dev time available, if they got time to do that ? |
13:58:38 | FromDiscord | <Prestige> We have users on many platforms (discord, irco matrix, I think a few others) and they're all bridged here. No idea about V |
13:58:59 | FromDiscord | <Prestige> (edit) "irco" => "irc," |
14:01:06 | FromDiscord | <voidwalker> ohh yeah I forgot, every one from irc/matrix is one "bot" here |
14:01:26 | FromDiscord | <Prestige> I think there's also gitter |
14:03:36 | FromDiscord | <voidwalker> 3284 people on matrix ; o |
14:10:46 | FromDiscord | <ripluke> And I’m one of them \:P |
14:13:08 | FromDiscord | <laker31> Can someone ELI5 what the -d flag for the compiler does? |
14:13:35 | FromDiscord | <laker31> I mean it "defines a conditional symbol". What's the symbol then used for? |
14:15:35 | FromDiscord | <phillvancejr (phillvancejr)> sent a code paste, see https://play.nim-lang.org/#ix=44qy |
14:15:58 | FromDiscord | <phillvancejr (phillvancejr)> Or do I have to manually implement all the operators? |
14:20:37 | FromDiscord | <Prestige> sent a code paste, see https://play.nim-lang.org/#ix=44qA |
14:23:47 | FromDiscord | <Phil> Expanding on prestiges point for you @laker31 , this is very useful to remove logging from your final compile |
14:24:30 | FromDiscord | <Phil> Or rather remove debug logging calls and the like when you don't want them |
14:25:35 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44qC |
14:25:53 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44qD |
14:26:12 | FromDiscord | <voidwalker> from where does nim get the idea that it expects noSideEffect for the procs in the table? |
14:26:53 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44qE |
14:27:51 | FromDiscord | <Phil> The c file may not have been recompiled after that, try a force rebuild |
14:27:58 | FromDiscord | <voidwalker> I am trying to optimized the database size, as it's pretty much all repetitive strings/arrays |
14:29:05 | FromDiscord | <voidwalker> there's an "sqlite-zstd" extension on github, but no idea if I can make it to work, or how to ship it with the program |
14:30:08 | FromDiscord | <voidwalker> I closed vscodium and reoepend, added a new line of code.. it still errors there. no idea where the force rebuild is |
14:30:20 | FromDiscord | <Require Support> so im trying to get unix epoch time in milliseconds and im doing `myfileinfo.access_time = info.lastAccessTime.toUnix() 1000` but for some reason its not adding the last 3 zeros.. what am i doing wrong? |
14:30:30 | FromDiscord | <Phil> It's a flag...error one sec |
14:31:45 | FromDiscord | <Phil> --forceBuild:on |
14:32:36 | FromDiscord | <voidwalker> yeah that's not it, it still gives me the error |
14:32:40 | FromDiscord | <Phil> Hmm |
14:32:50 | FromDiscord | <Phil> On the go atm so can't really do much |
14:33:03 | FromDiscord | <Yardanico> In reply to @voidwalker "from where does nim": that's not it, it expects `gcsafe` I think |
14:33:38 | FromDiscord | <voidwalker> yeah both noSideEffect, gcsafe, |
14:33:40 | FromDiscord | <Phil> Ahhh yes, this is for the entire proc pointer thingy right? |
14:33:44 | FromDiscord | <voidwalker> yes |
14:34:15 | FromDiscord | <laker31> sent a long message, see http://ix.io/44qK |
14:35:25 | FromDiscord | <Yardanico> yes, but use `when` instead of the `if` |
14:35:32 | FromDiscord | <Phil> In reply to @laker31 "Thanks! So basically the": Aye, or other options where you would want to add or remove certain code passages . Like if you were to distribute binaries for different platforms and you wouldn't want the windows binary to have code for Linux etc |
14:35:39 | FromDiscord | <Yardanico> `when` is a compile-time `if`, it won't include the code inside of it if the condition is false |
14:36:01 | FromDiscord | <voidwalker> ah, like IFDEF in pascal |
14:36:04 | FromDiscord | <laker31> Ah, thanks @Phil @Yardanico , this is very useful! 🙂 |
14:36:05 | FromDiscord | <Phil> And as yard said typically you use it together with with |
14:36:11 | FromDiscord | <Yardanico> In reply to @voidwalker "ah, like IFDEF in": yes, but it's not related to the preprocessor |
14:36:24 | FromDiscord | <laker31> In reply to @Isofruit "And as yard said": With 'when' you mean? |
14:36:43 | FromDiscord | <Phil> Yeah, on phone and backticks take me 5 button presses to reach |
14:37:02 | FromDiscord | <laker31> Haha okay, thanks for explaining guys 🙂 |
14:39:49 | FromDiscord | <jan0809> In reply to @laker31 "Yes, did you manage": well, autocompleting the imports itself didnt work |
14:40:31 | FromDiscord | <jan0809> likeon async it dosnt suggest dispatch |
14:40:46 | FromDiscord | <Phil> In reply to @jan0809 "well, autocompleting the imports": My code what I would give for auto complete imports |
14:41:07 | FromDiscord | <Phil> I see, auto complete trying to screw me over again |
14:41:54 | FromDiscord | <laker31> In reply to @jan0809 "well, autocompleting the imports": I see - I think I figured out this is an issue with the VSC extension itself and not with nimsuggest nor nimlangserver. Thanks for checking |
14:42:06 | FromDiscord | <Phil> Funny it corrected my gesture of God to code |
14:42:09 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44qO |
14:42:20 | FromDiscord | <voidwalker> (edit) "https://play.nim-lang.org/#ix=44qO" => "https://play.nim-lang.org/#ix=44qP" |
14:42:45 | * | arkurious joined #nim |
14:43:44 | FromDiscord | <jan0809> In reply to @laker31 "I see - I": and it seem i cannot jump to definition from the import |
14:46:01 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=44qR |
14:46:22 | * | rockcavera joined #nim |
14:46:22 | * | rockcavera quit (Changing host) |
14:46:22 | * | rockcavera joined #nim |
14:46:46 | FromDiscord | <Phil> As in, also annotated with global pragma |
14:50:08 | FromDiscord | <Phil> Ohh wait, it's complaining that you're manipulating a global variable. There was a pragma for that I think |
14:50:40 | FromDiscord | <Phil> Man that GC warning draws my eyes first every time |
14:55:37 | * | xet7 joined #nim |
15:05:22 | FromDiscord | <phillvancejr> Hello, in Nim is there a way to overload conversion to a primitive type? in C++ I can overload `operator int()` for example and if I try to use that object where integers are used it will call this method. Can I do this in Nim? Or should I just create something like `to_int` ? |
15:07:22 | FromDiscord | <phillvancejr> sent a code paste, see https://play.nim-lang.org/#ix=44r0 |
15:10:41 | Amun-Ra | phillvancejr: https://play.nim-lang.org/#ix=44r3 |
15:12:36 | Amun-Ra | but yes, you have to |
15:12:59 | Amun-Ra | you can make the type distinct and to the {.borrow.}s |
15:13:20 | FromDiscord | <voidwalker> Phil, yes, no idea about that globala pragma. Supposed to be used in cases like these ? |
15:14:27 | FromDiscord | <Phil> In reply to @voidwalker "Phil, yes, no idea": Not sure if that would save you or not, but you can try. It's a global variable either way, so annotating it accordingly with a pragma at the very least helps with readability |
15:16:34 | FromDiscord | <voidwalker> well, for some reason in this context it assumes the procs in the table must be gcsafe and noSideEffect. But I am trying to write a side effect proc, so that I can collect the data strings in the db for that column |
15:16:44 | FromDiscord | <voidwalker> Trying to store them as a bitmask instead of strings |
15:16:45 | FromDiscord | <Phil> So I can play around a bit myself, could you throw me your genres global var and how you initialize it? |
15:17:16 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44r6 |
15:17:28 | FromDiscord | <Phil> In reply to @voidwalker "well, for some reason": It generally does that explicitly so that you don't run into stuff like race conditions. This is nim's safety at work |
15:17:44 | FromDiscord | <Phil> Just a matter of figuring out how to (safely) disable those |
15:18:01 | FromDiscord | <voidwalker> well this is just a temporary proc I want to collect data, but still I want to know what's going on here |
15:18:20 | FromDiscord | <voidwalker> blah safety : D |
15:18:49 | FromDiscord | <Phil> At least that's how I've understood my interactions with global vars so far, a more experienced community member may correct me here |
15:19:13 | FromDiscord | <Phil> Ah, I see now why I never ran into issues there: I only ever added to my global vars, never deleted |
15:26:54 | FromDiscord | <Phil> In reply to @voidwalker "blah safety : D": For now you can do ` {.cast(noSideEffect).}:`, I'm not sure how much of a good idea that is but... well it lets you compile at least |
15:27:10 | FromDiscord | <Phil> Keep in mind that if you go multi-threaded though you may encounter race conditions! |
15:27:37 | FromDiscord | <voidwalker> proc get_genres(key:string): string {.cast(noSideEffect).} = ↵ ? |
15:27:54 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=44r8 |
15:28:32 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44qC |
15:28:53 | * | xet7 quit (Ping timeout: 272 seconds) |
15:28:55 | FromDiscord | <Phil> How are you encountering that when it compiles for me? TF? |
15:29:33 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=44r9 |
15:30:34 | FromDiscord | <voidwalker> oh sorry didn't notice the indentation for the cast, and the : |
15:30:52 | FromDiscord | <Phil> Yeh, it works the same when you force the compiler to shut up about gc safety |
15:31:16 | FromDiscord | <voidwalker> --stfu_and_do_it directive : D |
15:31:17 | FromDiscord | <Phil> Which, once again, only do if you know that memory is getting taken care of |
15:32:27 | FromDiscord | <Phil> Beef can hold a better lecture about that than I, I have not yet had to debug these kinds of memory issues arising from bad usage of casting gc-safe |
15:32:36 | FromDiscord | <Phil> Which leads me to believe I may not have misused them (yet) |
15:32:48 | FromDiscord | <Phil> Or I'm too blind to spot them |
15:41:17 | * | xet7 joined #nim |
15:59:33 | * | pro joined #nim |
16:11:20 | * | nyeaa4 quit (Ping timeout: 244 seconds) |
16:18:26 | FromDiscord | <felix_lipski> sent a code paste, see https://play.nim-lang.org/#ix=44rh |
16:18:43 | FromDiscord | <felix_lipski> (edit) "https://play.nim-lang.org/#ix=44rh" => "https://play.nim-lang.org/#ix=44ri" |
16:18:57 | FromDiscord | <felix_lipski> (edit) "https://play.nim-lang.org/#ix=44ri" => "https://play.nim-lang.org/#ix=44rj" |
16:19:09 | * | nyeaa4 joined #nim |
16:27:12 | FromDiscord | <phillvancejr> sent a code paste, see https://play.nim-lang.org/#ix=44rl |
16:29:19 | FromDiscord | <phillvancejr> I added some break echo calls and it looks like it is failing on `server.bind_addr(Port(8000))` |
16:34:38 | FromDiscord | <voidwalker> ah, happened to me too for such programs. somehow the port does not get freed, try to change the port number |
16:35:15 | FromDiscord | <phillvancejr> seems to be working now. The issue is that Nim does not free the port correctly when terminated via `Ctrl + Z`, but if I use `Ctrl + C` it works |
16:37:24 | FromDiscord | <demotomohiro> @felix_lipski Is open_alsa() and close_alsa supports multi-threading? |
16:37:37 | Amun-Ra | that's because ^Z does not terminate |
16:41:43 | FromDiscord | <felix_lipski> In reply to @demotomohiro "<@750432984393318518> Is open_alsa() and": how to check it? I've run them successfully in a C thread |
16:45:53 | FromDiscord | <demotomohiro> Read manual, ask auther or read C code. |
16:47:02 | Amun-Ra | man page usually states function is reentrant |
16:47:45 | FromDiscord | <phillvancejr> how do I check if an asyncsocket is valid? If my client exits with `Ctrl + C` how do I now they aren't connected? reading gives me an empty string so I can check that, but is there something else? I though `isClosed` might work but it doesn't |
16:49:48 | FromDiscord | <Dale> `/usr/lib/nim/pure/times.nim(2135, 39) Hint: 'parse' cannot raise 'Defect' [XCannotRaiseY]` is this because I left an exception unhandled? Or is this saying there is an issue with the lib? |
16:50:22 | FromDiscord | <dom96> In reply to @phillvancejr "how do I check": You need to track the connection status of a socket. |
16:51:46 | FromDiscord | <phillvancejr> In reply to @dom96 "You need to track": Hi dom, thanks, how do I do that? |
16:53:42 | FromDiscord | <enthus1ast> Reading is the way↵(@phillvancejr) |
16:54:13 | FromDiscord | <enthus1ast> If you control the protocol, you can also implement a ping pong |
16:54:19 | FromDiscord | <phillvancejr> In reply to @enthus1ast "Reading is the way": Thank you |
16:54:43 | FromDiscord | <enthus1ast> And consider clients gone when they do not answer/request in time |
16:57:12 | FromDiscord | <enthus1ast> You need to set reuse port↵(@phillvancejr) |
16:58:54 | FromDiscord | <enthus1ast> OptReusePort or OptReuseAddr cant remember which one |
17:01:08 | FromDiscord | <phillvancejr> sent a code paste, see https://play.nim-lang.org/#ix=44rw |
17:02:05 | FromDiscord | <phillvancejr> Ah I see, it has to be before bindAddr |
17:02:06 | FromDiscord | <phillvancejr> got it |
17:02:07 | FromDiscord | <phillvancejr> thanks~ |
17:02:14 | FromDiscord | <phillvancejr> (edit) "thanks~" => "thanks!" |
17:08:26 | FromDiscord | <felix_lipski> In reply to @demotomohiro "<@750432984393318518> Is open_alsa() and": . |
17:08:54 | FromDiscord | <felix_lipski> (edit) "In reply to @demotomohiro "<@750432984393318518> Is open_alsa() and": ." => "sent a code paste, see https://play.nim-lang.org/#ix=44rz" |
17:10:13 | Amun-Ra | Dale: it means it can't raise such exception |
17:11:24 | FromDiscord | <felix_lipski> sent a code paste, see https://play.nim-lang.org/#ix=44rB |
17:12:58 | FromDiscord | <PyryTheBurger> can a proc return a seq |
17:14:02 | FromDiscord | <felix_lipski> sent a long message, see http://ix.io/44rC |
17:14:26 | FromDiscord | <felix_lipski> (edit) "http://ix.io/44rC" => "http://ix.io/44rD" |
17:17:59 | * | pro quit (Quit: pro) |
17:18:49 | Amun-Ra | PyryTheBurger: yes |
17:19:54 | * | rockcavera quit (Read error: Connection reset by peer) |
17:20:45 | * | rockcavera joined #nim |
17:20:45 | * | rockcavera quit (Changing host) |
17:20:46 | * | rockcavera joined #nim |
17:23:34 | FromDiscord | <Dale> Thanks Amun. So I should just ignore the hint then |
17:24:41 | FromDiscord | <demotomohiro> @felix_lipski It seems malloc is thread safe: https://www.man7.org/linux/man-pages/man3/malloc.3.html |
17:25:34 | FromDiscord | <felix_lipski> yes |
17:27:55 | NimEventer | New post on r/nim by rtacconi: Get columns from db_postgres query, see https://reddit.com/r/nim/comments/vzu8bp/get_columns_from_db_postgres_query/ |
17:29:28 | FromDiscord | <felix_lipski> sent a long message, see http://ix.io/44rI |
17:31:41 | FromDiscord | <demotomohiro> @felix_lipski I'm sorry but I don't know. Hope someone can help you. |
17:36:42 | FromDiscord | <Require Support> whats the default encoding in nim? for example, if im using `readFile` proc |
17:37:02 | FromDiscord | <Require Support> (edit) "whats the default encoding in nim? for example, if im using `readFile` proc ... " added "- and how would i change it" |
17:48:58 | FromDiscord | <demotomohiro> Nim uses utf8 for string. |
17:51:20 | FromDiscord | <PyryTheBurger> sent a long message, see http://ix.io/44rL |
17:51:50 | FromDiscord | <PyryTheBurger> (edit) "http://ix.io/44rL" => "http://ix.io/44rM" |
17:52:02 | FromDiscord | <PyryTheBurger> (edit) "http://ix.io/44rM" => "http://ix.io/44rN" |
17:55:09 | FromDiscord | <daniellowrie (Daniel Lowrie)> Greetings everyone! I have a quick question about Procedures if anyone has the time? (I'm super new to Nim) |
17:57:13 | FromDiscord | <voidwalker> anyone ever tried to store an array of strings in a db as a bitmask ? |
17:57:22 | FromDiscord | <voidwalker> if not too many values for the string |
17:58:28 | FromDiscord | <daniellowrie (Daniel Lowrie)> sent a code paste, see https://play.nim-lang.org/#ix=44rP |
17:59:03 | FromDiscord | <daniellowrie (Daniel Lowrie)> You see I have nothing as far as input for the Proc, I just want it to fire off code and be done |
17:59:35 | FromDiscord | <demotomohiro> In reply to @felix_lipski "why would this produce": This code just calls malloc and free like your code and works without error: https://wandbox.org/permlink/7AnmkM5XodVzFRrb |
17:59:38 | FromDiscord | <daniellowrie (Daniel Lowrie)> I do this kind of thing in Bash and Python, I'm just trying to figure out how to do this with Nim. |
17:59:39 | FromDiscord | <daniellowrie (Daniel Lowrie)> Thanks |
18:01:42 | FromDiscord | <demotomohiro> In reply to @felix_lipski "why would this produce": You might imports c functions incorrectly or different part of your code cause the error. |
18:02:56 | * | derpydoo joined #nim |
18:05:15 | * | xet7 quit (Quit: Leaving) |
18:05:43 | FromDiscord | <demotomohiro> @Daniellowrie You can define procedures without inputs.↵You need to define `stuff2` before `stuff1`.↵Or forward declare `stuff2`. |
18:06:08 | * | xet7 joined #nim |
18:07:09 | FromDiscord | <demotomohiro> This code works: https://play.nim-lang.org/#ix=44rT |
18:17:41 | FromDiscord | <PyryTheBurger> In reply to @PyryTheBurger "when i have this": somebody help with this pls |
18:18:33 | FromDiscord | <daniellowrie (Daniel Lowrie)> Gotcha! So you need to put an `=` after defining each procedure and make sure that they get defined before they are called. |
18:18:33 | FromDiscord | <daniellowrie (Daniel Lowrie)> Thanks, @\_discord\_288750616510201856\:t2bot.io |
18:20:20 | FromDiscord | <treeform> In reply to @TryAngle "I agree, working together": I don't think it will be very hard to add vulkan... All though I am a little down on vulkan, because its way complex and is only "king" on linux. If you are on windows DX is better, if you are on Mac, metal is better. OpenGL works everywhere. |
18:22:40 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=44s0 |
18:24:09 | FromDiscord | <ripluke> Is there a way that I can compile only the parts of pixie that I need |
18:24:22 | FromDiscord | <ripluke> Because it massively slows down my compile times |
18:27:25 | FromDiscord | <demotomohiro> In reply to @PyryTheBurger "when i have this": You need to use `=` for named argument like `particles = 100`.↵https://nim-lang.org/docs/manual.html#procedures |
18:28:15 | FromDiscord | <Dale> So I’m looking to familiarise myself with nims thread stuff. I figured using a logger would be a neat intro since I’ve done this before. My last logging lib (Lua/Löve) used channels to pass the strings to a thread, would the same approach be sensible here? |
18:29:15 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=44s2 |
18:30:00 | FromDiscord | <aruZeta> In reply to @Dale "So I’m looking to": to pass strings as argument of a new thread, or while being the thread created, pass it strings? |
18:30:36 | FromDiscord | <TryAngle> In reply to @treeform "I don't think it": I mean the point u make about DX better on windows and Metal better on Mac can be used also for OpenGL but on all 3 platforms, I agree with the "unnecessary complexity" though |
18:30:43 | FromDiscord | <aruZeta> In reply to @huantian "It makes the template": i think i get it |
18:30:47 | FromDiscord | <demotomohiro> In reply to @Dale "So I’m looking to": Nim has channel that can pass string between threads: https://nim-lang.org/docs/channels_builtin.html |
18:30:51 | FromDiscord | <aruZeta> (edit) "it" => "it, thx" |
18:31:10 | FromDiscord | <TryAngle> (edit) ""unnecessary complexity"" => ""complexity vs what u get from it"" |
18:31:12 | FromDiscord | <Dale> In reply to @aruZeta "to pass strings as": Well before I spun up the thread when the game booted, and then handed off strings to a thread that appended it to the log file, so I can log lots of things per frame and not have it block the main thread |
18:32:07 | FromDiscord | <Dale> In reply to @demotomohiro "Nim has channel that": Yeah I was looking at that. For small things like log text it looks like the best way to do this |
18:32:33 | FromDiscord | <aruZeta> In reply to @Dale "Well before I spun": yep, you can use channels then |
18:34:00 | FromDiscord | <daniellowrie (Daniel Lowrie)> Another related question...since the Proc need to be declared before it's called, will this effect recursion and if so, how do you get around that? |
18:34:57 | FromDiscord | <treeform> In reply to @TryAngle "I mean the point": OpenGL is nice that it works on all 3 platforms + 2 mobile. If you want to go faster/next level you need to implement DX/Metal/Volkan stack which is way harder. |
18:35:33 | FromDiscord | <Phil> In reply to @daniellowrie (Daniel Lowrie) "Another related question...since the": As in, can you call a proc within itself? Not an issue from what I've experienced so far |
18:35:39 | FromDiscord | <Dale> Cool, seems like channels are the same concept as what I used before. I might forego the std logger and have a go at making my own, little things like this are a good way to get used to the Lang. Thanks :) |
18:35:47 | * | gsalazar quit (Remote host closed the connection) |
18:36:19 | FromDiscord | <TryAngle> In reply to @treeform "OpenGL is nice that": I don't agree, vulkan can run on Android and Ios as well, only place it can't run is Web |
18:36:32 | FromDiscord | <demotomohiro> In reply to @daniellowrie (Daniel Lowrie) "Another related question...since the": https://nim-lang.org/docs/manual.html#procedures↵If you want to call procs recursively, you can forward declare procedure. |
18:36:42 | FromDiscord | <phillvancejr> sent a code paste, see https://play.nim-lang.org/#ix=44s7 |
18:37:27 | FromDiscord | <treeform> In reply to @TryAngle "I don't agree, vulkan": really I though Vulkan is basically banned on Apple hardware? |
18:37:32 | * | ehmry quit (Ping timeout: 255 seconds) |
18:37:38 | FromDiscord | <TryAngle> Moltenvk exists |
18:38:02 | FromDiscord | <treeform> I tried to make moltenVK work for 5 hours then gave up. |
18:38:09 | FromDiscord | <TryAngle> Hmmm |
18:38:11 | FromDiscord | <treeform> do you have it working? |
18:38:20 | FromDiscord | <treeform> moltenVK feels very alpha quality |
18:38:24 | FromDiscord | <TryAngle> I don't own a Mac but my dad does, might try it out |
18:38:50 | FromDiscord | <TryAngle> Only issue I have on paper with moltenvk is its still only 1.1 vulkan |
18:39:03 | FromDiscord | <TryAngle> While vulkan is 1.3 already |
18:39:09 | FromDiscord | <treeform> My main issue with moltenVK is that it does not work. |
18:39:13 | FromDiscord | <TryAngle> And 1.3 makes a lot of things a lot easier |
18:39:42 | * | ehmry joined #nim |
18:39:45 | FromDiscord | <daniellowrie (Daniel Lowrie)> I'm not really grasping the documentation on forward declarations↵(@demotomohiro) |
18:39:48 | FromDiscord | <TryAngle> But I agree for Max performance u still need to abstract over all 3 |
18:39:49 | FromDiscord | <demotomohiro> I don't much about Vulkan but I heard that if you want to run your code fast, you need to tune your code for each platform. |
18:40:17 | FromDiscord | <TryAngle> (edit) "But I agree for Max performance u still need to abstract over all 3 ... " added "graphic APIs and additionally webgl if u want to target that also" |
18:40:31 | FromDiscord | <treeform> In reply to @TryAngle "But I agree for": And if you are not a AAA game I don't know much perf you really gain vs just using openGL> |
18:40:32 | FromDiscord | <treeform> (edit) "openGL>" => "openGL." |
18:43:11 | FromDiscord | <treeform> Seems like Vulkan API is designed by committee. Its so confusing and hard to use. |
18:43:20 | FromDiscord | <TryAngle> Well I think Vulkan is too hated on its complexity, it's mostly a one time thing anf only marginally more than opengl later |
18:43:31 | FromDiscord | <treeform> I would fight for Vulkan if I actually like it. |
18:43:51 | FromDiscord | <demotomohiro> In reply to @daniellowrie (Daniel Lowrie) "I'm not really grasping": Here is example code: https://play.nim-lang.org/#ix=44sa |
18:50:31 | FromDiscord | <TryAngle> Btw @treeform doesnt opengl also run with moltengl on metal? |
18:52:11 | FromDiscord | <treeform> yes, but that costs anywhere from $400 to $20k to use |
18:52:24 | FromDiscord | <TryAngle> In reply to @treeform "yes, but that costs": Wait what 💀💀 |
18:52:24 | FromDiscord | <treeform> moltengl is not free software and requires licensing |
18:52:33 | FromDiscord | <treeform> https://moltengl.com/purchase/ |
18:52:36 | FromDiscord | <TryAngle> Apple moment I guess |
18:52:44 | FromDiscord | <daniellowrie (Daniel Lowrie)> OK, so I've got some homework to do with Nim recursion and Future and Forward Declarations. Thanks so much for steering me in the right direction! |
18:53:27 | FromDiscord | <huantian> If you’re recursing the same function you don’t need to forward declare |
18:53:37 | FromDiscord | <treeform> That's another reason I don't trust MoltenVK as its by the same people, could they just charge for it in the future? |
18:56:43 | FromDiscord | <treeform> In reply to @mirandaniel "Any idea if treeform/ws": Yes just proxy your websocket server through a SSL providing server. I recommend either Nginx+Let'sEncrypt or Cloudflare (free account). I used both. Cloudflare is simpler. |
18:58:15 | FromDiscord | <jan0809> i use caprover for that stuff, which wraps docker swarm nginx and letsencrypt |
18:58:51 | FromDiscord | <jan0809> but thats basically more kind of s paas |
18:59:00 | FromDiscord | <jan0809> (edit) "s" => "a" |
18:59:09 | FromDiscord | <jan0809> but but selfhosted |
19:06:18 | * | CyberTailor quit (Remote host closed the connection) |
19:07:43 | * | CyberTailor joined #nim |
19:12:29 | * | noeontheend joined #nim |
19:19:57 | FromDiscord | <bananahead> Hi all, quick one. I guess this isn't specifically, but I will ask anyways. from a Nim application which is being run on the command line without a xserver being started. Does anyone know the best way to display an Image? |
19:20:22 | FromDiscord | <bananahead> I am attempting to show an image on a screen connected to a raspberry pi, without launching a while desktop environment. |
19:20:29 | FromDiscord | <bananahead> (edit) "while" => "whole" |
19:21:26 | FromDiscord | <bananahead> (edit) "specifically," => "specifically Nim," | "from" => "From" |
19:22:21 | FromDiscord | <TryAngle> In reply to @bananahead "I am attempting to": If u want to display it it the moment the x server starts u can write it in the xinit I think↵↵Or do I misunderstand? U want to display imagine without starting xserver? I think u need to run either x or Wayland on Linux, if u want want a full desktop environment u can have a look at window managers 🤔 |
19:22:41 | FromDiscord | <Prestige> I think he wants to display an image in the framebuffer |
19:23:01 | FromDiscord | <TryAngle> Ah, but doesn't he need x / wl for that 😳 |
19:23:58 | FromDiscord | <TryAngle> Lmao https://stackoverflow.com/questions/1527039/how-to-write-directly-to-linux-framebuffer↵I did not know this was possible 😳😳😳 |
19:31:11 | FromDiscord | <capocasa> In reply to @enthus1ast "<@378612300426248212>\: btw do you": Back from my nap 🙂↵↵I wanted to parse a small subset of markdown- just bold, italic and lists. I assumed it might not be worth something heavier, but now I'm curious, which markdown compilers are you using? |
19:31:12 | FromDiscord | <demotomohiro> Long time ago, I wrote a C program that draws image without xserver but I forget API name. |
19:31:16 | FromDiscord | <bananahead> I guess. I'm not knowledgeable enough to explain it properly (yet). But yes I want my Pi to run a nim application boot, which displays and can update an image directly to the screen. |
19:31:48 | FromDiscord | <bananahead> Trying to display it on this - https://shop.pimoroni.com/products/hyperpixel-4-square?variant=30138251444307 |
19:32:33 | FromDiscord | <enthus1ast> when its enough yeah why not↵(@capocasa) |
19:32:53 | FromDiscord | <enthus1ast> have used that one https://github.com/soasme/nim-markdown |
19:33:07 | FromDiscord | <capocasa> In reply to @enthus1ast "have used that one": Cool looks great |
19:45:52 | FromDiscord | <Prestige> In reply to @bananahead "I guess. I'm not": You can use a minimal window manager instead of a desktop environment, might be your easiest route |
19:46:06 | FromDiscord | <Prestige> E.g. use openbox, and fullscreen your application |
19:55:41 | FromDiscord | <demotomohiro> In reply to @bananahead "I guess. I'm not": It seems DirectFB can draw image without X: https://github.com/deniskropp/DirectFB |
20:00:25 | * | LyndsySimon joined #nim |
20:02:57 | FromDiscord | <capocasa> In reply to @enthus1ast "have used that one": nim-markdown is awesome, I could just edit the parser list to get my mini subset. |
20:03:59 | * | noeontheend quit (Ping timeout: 255 seconds) |
20:07:55 | * | noeontheend joined #nim |
20:11:19 | FromDiscord | <exelotl> oh yeah nim-markdown is really good, super configurable |
20:16:21 | * | derpydoo quit (Quit: derpydoo) |
20:16:49 | FromDiscord | <Elegantbeef> People that read benchmark results without looking at the source always amaze me |
20:16:50 | FromDiscord | <Elegantbeef> https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1334910-opensuse-announces-first-class-support-for-the-nim-programming-language?p=1334955#post1334955 |
20:20:29 | FromDiscord | <jan0809> wow |
20:21:08 | FromDiscord | <jan0809> what makes first class support? |
20:21:37 | FromDiscord | <Elegantbeef> Stable is in the package manager and important updates and the like will be brought when needed |
20:21:52 | FromDiscord | <Elegantbeef> Basically making it capable of shipping from source software on the distro |
20:21:54 | FromDiscord | <jan0809> hmm |
20:22:51 | FromDiscord | <enthus1ast> " it's neither as expressive as Python nor as fast as C or even Rust." |
20:23:16 | FromDiscord | <enthus1ast> since i write nim, going back to python feels like a disabled crippled nim |
20:24:09 | FromDiscord | <jan0809> In reply to @enthus1ast "" it's neither as": thats what they say? |
20:24:15 | FromDiscord | <Elegantbeef> Comically some of the Rust solutions use simd whereas the nim ones dont |
20:24:17 | FromDiscord | <jan0809> dang |
20:24:18 | FromDiscord | <dom96> In reply to @Elegantbeef "People that read benchmark": Guess we should ask for Nim to be removed |
20:25:08 | FromDiscord | <jan0809> In reply to @jan0809 "thats what they say?": did they even try to get into the topic |
20:27:25 | FromDiscord | <Elegantbeef> Lol the first fasta benchmark uses threading on rust but not on nim |
20:27:32 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/997600326414762045/image.png |
20:28:15 | FromDiscord | <Elegantbeef> Look at the nim time vs. time(user) compared to the rust's |
20:29:47 | FromDiscord | <Elegantbeef> Comparing single thread vs. multi thread, how fucking disingenuous can one be |
20:29:56 | FromDiscord | <Phil> ... it's somewhat sad rust is only, what, 40% of ro faster |
20:30:03 | FromDiscord | <Phil> (edit) "of ro" => "or so" |
20:30:35 | FromDiscord | <Phil> Smells like inappropriate use of multi-threading and that talk about optimizations and how almost nothing matters as long as your code fits into L1 cache |
20:30:43 | FromDiscord | <Elegantbeef> This shit is why i despise language benchmarks they fall into two groups |
20:31:13 | FromDiscord | <Elegantbeef> Group A is "we did the same implementation" and most language show up at the same speed |
20:31:55 | FromDiscord | <Prestige> Interesting |
20:31:56 | FromDiscord | <Phil> ~~except for python and JS~~ |
20:32:12 | FromDiscord | <Prestige> We're talking about programming languages here |
20:32:25 | FromDiscord | <Phil> Ah, not scripting languages/compile targets, got it |
20:32:33 | FromDiscord | <Phil> 😄 |
20:32:55 | FromDiscord | <enthus1ast> "To me it looks like a modern language with both imperative and functional inspirations. But I would like to know what it's selling point is. What does it do better than the already established alternatives? None of the points on the main page seemed that unique to me." |
20:33:16 | FromDiscord | <enthus1ast> this is a good point he has |
20:34:00 | FromDiscord | <enthus1ast> "what to use for async? Go!" "what to use for safety? Rust!" |
20:34:23 | FromDiscord | <enthus1ast> "what to use if something must be fast? C" |
20:35:04 | FromDiscord | <enthus1ast> " xxx ? Nim!" |
20:36:25 | FromDiscord | <huantian> hey nim async... exists |
20:37:16 | FromDiscord | <enthus1ast> yeah but go is quite famous for its async stuff |
20:37:27 | FromDiscord | <enthus1ast> (never have used it) |
20:37:28 | FromDiscord | <!Patitotective> In reply to @enthus1ast ""what to use if": isnt nim `d:danger` similar to c? |
20:37:39 | FromDiscord | <!Patitotective> (edit) "c?" => "c speed?" |
20:37:57 | FromDiscord | <Elegantbeef> The answer is "it depends" |
20:38:43 | FromDiscord | <edYX> question, has anyone else had issues with parsecsv throwing a csv error when encountering an entry thats just `""`? |
20:39:34 | FromDiscord | <enthus1ast> imagine these questions where asked during a smoking brake between two it guys that only meet while smoking |
20:39:34 | FromDiscord | <enthus1ast> 've been there, Nim needs to much words |
20:40:38 | FromDiscord | <edYX> weird, it works fine when its a blank entry, but readRow() just does not appreciate two quotes in a row |
20:40:57 | FromDiscord | <Phil> As in, the actual quotes are in there? |
20:40:58 | FromDiscord | <edYX> (edit) "weird, it works fine when its a blank entry, but readRow() just does not appreciate two quotes in a row ... " added "as the only content" |
20:41:43 | FromDiscord | <edYX> Well it complains about this, https://media.discordapp.net/attachments/371759389889003532/997603895935238215/unknown.png |
20:41:50 | FromDiscord | <edYX> and this is line 3, column 41 https://media.discordapp.net/attachments/371759389889003532/997603926171975840/unknown.png |
20:41:56 | FromDiscord | <edYX> which is literally just two quotes |
20:42:16 | FromDiscord | <edYX> so my logic is that, it really doesnt like it when the entry is just two quotes |
20:42:38 | FromDiscord | <michaelb.eth> not sure I know how to best phrase this question, but what should I do if I have an iterator that encapsulates some resources that need to be cleaned up (e.g. a sqlite query) and I need to be able to stop the iteration early and trigger the cleanup?↵↵I have an idea to put something like `stop: var bool` in the signature of the iterator, is that the best way to do it? |
20:43:03 | FromDiscord | <michaelb.eth> (edit) "query)" => "query that involves reused prepared statement, etc.)" |
20:43:12 | FromDiscord | <Elegantbeef> It probably strips quotes due to some CSV that has quotes |
20:43:19 | FromDiscord | <edYX> In reply to @edYX "so my logic is": I guess i can just find and replace all the double-double quotes instead of actually debugging this though |
20:44:11 | FromDiscord | <Elegantbeef> are you using the parsecsv's open? |
20:44:23 | FromDiscord | <Elegantbeef> If so `"` is used to escape characters |
20:44:29 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/parsecsv.html#open%2CCsvParser%2CStream%2Cstring%2Cchar%2Cchar%2Cchar |
20:44:43 | FromDiscord | <edYX> ah |
20:44:45 | FromDiscord | <edYX> that makes sense |
20:45:10 | * | noeontheend quit (Ping timeout: 240 seconds) |
20:45:13 | FromDiscord | <Elegantbeef> you'd want `quote = '\0'` as the docs say |
20:45:17 | FromDiscord | <edYX> thank you! |
20:45:37 | FromDiscord | <edYX> this looks to be working now |
20:46:12 | FromDiscord | <Elegantbeef> Does the iterator do the clean up?↵(@michaelb.eth) |
20:46:21 | FromDiscord | <michaelb.eth> yes |
20:47:26 | FromDiscord | <Elegantbeef> you can use defer |
20:47:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44sF |
20:47:40 | FromDiscord | <Elegantbeef> echoes 0..11 then "Cleanup" |
20:47:57 | FromDiscord | <michaelb.eth> oh, very nice |
20:48:03 | FromDiscord | <michaelb.eth> thank you! |
20:48:31 | FromDiscord | <Elegantbeef> And that even happens if you have a encompassing block |
20:48:54 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44sH |
21:00:37 | FromDiscord | <voidwalker> no way to get a NULL value inserted in a db_sqlite.exec statement ? |
21:01:03 | FromDiscord | <enthus1ast> have you tried bindNull ? |
21:01:39 | FromDiscord | <voidwalker> no, I have not. I am sure that will work, but that is a procedure that can only do one null at a time, and it will destroy my oneliner import :\ |
21:02:09 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44sL |
21:02:24 | FromDiscord | <voidwalker> (edit) "https://play.nim-lang.org/#ix=44sL" => "https://play.nim-lang.org/#ix=44sM" |
21:02:35 | FromDiscord | <enthus1ast> \:) |
21:02:54 | FromDiscord | <voidwalker> I'd rather wait until they implement it, than destroy this 😄 |
21:02:58 | FromDiscord | <enthus1ast> looks like this should be broken into multiple lines anyhow |
21:03:15 | FromDiscord | <voidwalker> no, it's good as it is |
21:03:15 | FromDiscord | <Rika> Your one liner looks terrifying |
21:03:24 | FromDiscord | <enthus1ast> yeah |
21:03:53 | FromDiscord | <Rika> Well we gave you the answer, you do whatever you think you should so yeah |
21:04:00 | FromDiscord | <enthus1ast> i think ndb can do this but not sure |
21:04:05 | FromDiscord | <enthus1ast> the one that norm uses |
21:04:28 | FromDiscord | <voidwalker> let valsStr = join(repeat("?", tsv.headers.len), ",") |
21:04:31 | FromDiscord | <voidwalker> looks like it |
21:04:46 | FromDiscord | <voidwalker> I saw a few of these std lib forks.. people are not happy with the std ? |
21:05:21 | FromDiscord | <enthus1ast> its open source \:) |
21:05:50 | FromDiscord | <enthus1ast> one at least has the option to fork it and go crazy with it |
21:06:01 | FromDiscord | <enthus1ast> OR to pr upstream |
21:11:19 | FromDiscord | <voidwalker> with ndb/sqlite: ` Error: type mismatch: got <DbConn, SqlQuery, seq[string]>↵but expected one of:↵proc exec(db: DbConn; query: SqlQuery; args: varargs[DbValue, dbValue])` |
21:21:18 | FromDiscord | <Phil> In reply to @voidwalker "with ndb/sqlite: ` Error:": Basically, map your seq of strings and call the dbValue() proc on all of them |
21:30:52 | FromDiscord | <treeform> In reply to @ripluke "Is there a way": you can try just importing parts such as `import pixie/images` or `import pixie/filetype/png` . But compiles times should not be that slow, are you always using `-f` force recompile? |
21:31:31 | FromDiscord | <voidwalker> I got this: https://www.toptal.com/developers/hastebin/pilohohihi.pl |
21:33:51 | FromDiscord | <Rika> Discord marked the link as suspicious |
21:35:25 | FromDiscord | <voidwalker> hah because of the random .pl extension |
21:35:46 | FromDiscord | <Rika> Lol true Perl extension |
21:36:14 | FromDiscord | <voidwalker> well, not random, seems to generate it every time |
21:36:17 | FromDiscord | <voidwalker> what's a good paste bin ? |
21:36:24 | FromDiscord | <Rika> That’s one atrocious exception message |
21:36:30 | FromDiscord | <ripluke> In reply to @treeform "you can try just": Nah I'm using nimble build |
21:36:50 | FromDiscord | <ripluke> I think it's a problem with the program I'm using |
21:37:33 | FromDiscord | <ripluke> <https://repl.it> forces recompilation, so I use the built in shell and not the run button |
21:41:26 | FromDiscord | <Phil> In reply to @voidwalker "I got this: ": Wtf this looks cursed |
21:42:22 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=44sP |
21:42:34 | FromDiscord | <voidwalker> I just added another mapIt to run dbValue on the items like you said |
21:42:55 | FromDiscord | <voidwalker> the previous was a clean seq[string] |
21:42:58 | FromDiscord | <Phil> I am legit not sure what it's running the map on |
21:43:03 | FromDiscord | <Phil> That line |
21:43:06 | FromDiscord | <Phil> That line is cursed |
21:43:18 | FromDiscord | <Rika> Remove spaces between . |
21:43:24 | FromDiscord | <Rika> I mean around not between |
21:43:36 | FromDiscord | <voidwalker> (edit) "https://play.nim-lang.org/#ix=44sP" => "https://play.nim-lang.org/#ix=44sQ" |
21:43:58 | FromDiscord | <Rika> What is "parseSq" |
21:44:15 | FromDiscord | <voidwalker> the function to parse the row value, returns string |
21:44:19 | FromDiscord | <Rika> Okay |
21:44:25 | FromDiscord | <voidwalker> maybe I need a better name for it |
21:44:38 | FromDiscord | <Rika> I don’t see anything wrong as it is written |
21:44:46 | FromDiscord | <Rika> Maybe the logic is wrong |
21:45:08 | FromDiscord | <Phil> I'm not sure but could it be that the mapIt is one bracket to early in there? |
21:45:16 | FromDiscord | <Rika> Isn’t ndb typesafe? So it doesn’t just take in strings like the normal db_ modules |
21:45:42 | FromDiscord | <Rika> In reply to @Isofruit "I'm not sure but": It isn’t I don’t think |
21:45:49 | FromDiscord | <Rika> I mean I don’t think it is |
21:46:26 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=44sS |
21:47:12 | FromDiscord | <Rika> Scary line, really |
21:47:39 | FromDiscord | <Phil> Cursed I say, cursed! |
21:48:00 | FromDiscord | <Phil> It goes against like 15% of things I stand for! |
21:49:54 | * | tk quit (Quit: Well, this is unexpected.) |
21:50:18 | * | tk joined #nim |
21:50:42 | FromDiscord | <Phil> Question, is there a relevant difference in map vs mapIt other than syntactical one? |
21:52:00 | FromDiscord | <Elegantbeef> Nope |
21:52:22 | FromDiscord | <Elegantbeef> There might be a minor benefit that `mapIt` is an inlined call |
21:53:30 | FromDiscord | <Phil> Ah, so mostly syntactically you save a couple characters by not having to do `=>` syntax if you have sugar imported |
21:54:29 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=44sW |
21:54:49 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=44sW" => "https://play.nim-lang.org/#ix=44sX" |
21:55:05 | FromDiscord | <Elegantbeef> it should just be `result = newLit("my string")` |
21:55:15 | FromDiscord | <aruZeta> makes sense |
21:55:40 | FromDiscord | <aruZeta> and works, thanks! |
22:02:54 | FromDiscord | <chmod> embedding a file— is it possible at compile time to read a json file into a `const : jsonNode`? |
22:03:09 | FromDiscord | <huantian> I think so right? |
22:03:15 | FromDiscord | <Elegantbeef> Dont think you can embed ref types |
22:03:30 | FromDiscord | <huantian> oh is jsonnode a ref? that would make sense yeah |
22:03:41 | FromDiscord | <chmod> Yeah I'm getting `invalid type for const` |
22:03:49 | FromDiscord | <huantian> you'd probably wanna deserialize it into a concrete value type |
22:04:05 | FromDiscord | <chmod> Yes |
22:05:59 | FromDiscord | <chmod> So like go's unmarshall |
22:06:31 | FromDiscord | <huantian> I've never used that so I don't know |
22:07:10 | FromDiscord | <chmod> alr, I'll try with std/marshall thx for the tip |
22:08:05 | FromDiscord | <huantian> wait how have I not seen std/marshal |
22:14:40 | FromDiscord | <ripluke> Hmm is there a way I can get the removePrefix func in strutils to return the value with the prefix removed instead of setting a variable |
22:16:06 | * | vicecea quit (Remote host closed the connection) |
22:16:36 | * | vicecea joined #nim |
22:19:09 | FromDiscord | <Elegantbeef> std/marshal kinda sucks↵(@huantian) |
22:19:10 | FromDiscord | <Elegantbeef> That's why |
22:19:40 | FromDiscord | <huantian> In reply to @ripluke "Hmm is there a": sugar.dup might work |
22:19:52 | FromDiscord | <huantian> or you could just wrap the function yourself and make it not be inplace |
22:20:18 | FromDiscord | <voidwalker> blah why did they have to make bindParam and bindNull separate procedures |
22:20:47 | FromDiscord | <voidwalker> doesn't look very elegant to me. convenient maybe, for writing the lib, but not elegant to use it |
22:24:55 | * | xet7 quit (Quit: Leaving) |
22:30:08 | * | LyndsySimon quit (Quit: Connection closed for inactivity) |
22:58:43 | * | TakinOver joined #nim |
23:01:21 | FromDiscord | <Prestige> You could open an issue about it |
23:06:51 | FromDiscord | <Rika> I’m not sure what the alternative would be |
23:06:58 | FromDiscord | <Rika> Since null is a value and not a type |