<< 15-07-2022 >>

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