<< 04-05-2022 >>

00:00:08nrds<Prestige99> interesting
00:00:48nrds<Prestige99> Some people haven't been able to play my gamejam game because of glibc version issues, getting web working would be great..
00:01:07FromDiscord<Elegantbeef> Just use appimage like a normal person
00:01:15FromDiscord<Elegantbeef> Or is glibc vs musl the issue?
00:01:33nrds<Prestige99> they're getting `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found`
00:01:50nrds<Prestige99> I think they're on 2.33 or something
00:02:05FromDiscord<Elegantbeef> Well appimage would solve that assuming you build it on an old enough libc
00:02:23FromDiscord<Elegantbeef> Would solve all your dependancy issues 😛
00:02:50nrds<Prestige99> Yeah I'd have to find a way to do so. I tried building the game in a vm with debian stable, but then audio and image loading wouldn't work for some reason
00:02:53nrds<Prestige99> sdl would just crash at runtime
00:03:50nrds<Prestige99> same with building the .so files with github actions
00:04:31FromDiscord<huantian> 👀 that's kinda sick
00:04:38FromDiscord<Elegantbeef> Indeed
00:04:53FromDiscord<Elegantbeef> I will need to play with nlvm to get support in both eventually
00:05:08FromDiscord<huantian> now make it work with string 😏
00:05:22FromDiscord<Elegantbeef> I mean i'm not doing any interop except with wasm primitives as of yet
00:05:32FromDiscord<Elegantbeef> I will try to make it work with complex objects and most datatypes eventually
00:06:49FromDiscord<Elegantbeef> I'm fairly certain strings will be like Cstrings
00:07:02FromDiscord<Elegantbeef> Where you request a string from host, it gives you a `ref` and then you do the operations there
00:07:27FromDiscord<huantian> yeah I'd assume strings would have to be refs
00:07:32FromDiscord<huantian> or ref-like
00:07:38FromDiscord<Elegantbeef> That or memory buffers
00:07:45FromDiscord<Elegantbeef> Eitherway with the Nim code they're going to be statically typed 😛
00:08:07FromDiscord<Elegantbeef> The interop should be easier than nimscript atleast
00:09:29FromDiscord<Elegantbeef> Lol luckily for github email notifications i got to see a silly person needlessly insulting Nim developers 😄
00:10:13FromDiscord<Elegantbeef> Anyway yea huan hopefully i can make life supremely easy
00:10:15nrds<Prestige99> weird group to target :P
00:10:34nrds<Prestige99> So why are you using wasm for scripting now?
00:10:34FromDiscord<huantian> nah we're too cool they were intimidated
00:10:39nrds<Prestige99> just speed?
00:10:48FromDiscord<Elegantbeef> I'm just doing it for funsies mostly
00:11:00FromDiscord<Elegantbeef> Plus my next game idea I want to have scripting
00:11:10FromDiscord<Elegantbeef> And i want it to be \safe(
00:11:13FromDiscord<Elegantbeef> safe even
00:12:03nrds<Prestige99> I need to add a UI system to my engine, I created a quick makeshift one during the gamejam
00:12:07nrds<Prestige99> when I realized I needed it
00:12:37FromDiscord<Elegantbeef> The benefit of WASM for scripting is it's language agnostic and sandboxed
00:12:40FromDiscord<Elegantbeef> I feel like those two benefits just make it compelling if it's ergonomic enough
00:13:40FromDiscord<Elegantbeef> Like realistically you can just setup the API then anyone can use any language to script with the API you give, there is no "You must use X language"
00:13:44nrds<Prestige99> That's pretty nice to have
00:14:24FromDiscord<Elegantbeef> The only downside is you need to have the toolchain, but given there are games that use the UE4 sdk for modding it's a very moot point 😄
00:16:36nrds<Prestige99> What are you using for physics btw?
00:16:47FromDiscord<Elegantbeef> Also looking at methods of exporting functions to wasm the funniest was "-sEXPORT\_ALL=1\`
00:16:51FromDiscord<Elegantbeef> ah yes i want all procedures exported to WASM
00:16:57FromDiscord<Elegantbeef> What's this physics you speak of?
00:17:15nrds<Prestige99> Nothing built in to your engine for physics yet?
00:17:24FromDiscord<Elegantbeef> Have you seen my present project?
00:17:31nrds<Prestige99> yep
00:17:35FromDiscord<Elegantbeef> I clearly do not need physics
00:17:48nrds<Prestige99> Not for that project, no
00:17:53nrds<Prestige99> but that's not what I was asking
00:18:01FromDiscord<Elegantbeef> So then why would i have physics
00:18:01FromDiscord<Elegantbeef> 😄
00:18:19FromDiscord<Elegantbeef> I'm not making a framework to rule all framewroks, i'm making a tool to make my game
00:18:25nrds<Prestige99> The same reason I have shader support but no shader usage in my games lol
00:18:27FromDiscord<Elegantbeef> If my game doesnt need physics my frameworrk doesnt need physics
00:18:31nrds<Prestige99> cool
00:18:45FromDiscord<Elegantbeef> Yea i dont believe in making tooling that isnt needed
00:23:16FromDiscord<Elegantbeef> The entire API of Truss3D is used or will be used in my project(instanced rendering is the only thing that's not presently, but will be for level rendering and particle systems)
00:23:17FromDiscord<Elegantbeef> There's a phrase in from scratch gamedev which is "Make a game not an engine"
00:23:17FromDiscord<Elegantbeef> 'Prestige is greatly annoyed by beef's response'
00:24:00nrds<Prestige99> Yeah I'm just doing the opposite :P
00:24:09nrds<Prestige99> More interested in the engine part tbh
00:24:48nrds<Prestige99> It sounds like appimages aren't going to help my issue, since I'd need to compile it with older deps anyway
00:25:00nrds<Prestige99> unless I was like on gentoo again, but that wasn't fun
00:28:24nrds<Prestige99> Wonder how godot does it
00:31:14FromDiscord<huantian> could you download an old glib version and appimage it with that
00:31:50FromDiscord<Elegantbeef> Assuming all the libraries are built with a equivlent glib i think so, though dont know how important that is
00:32:33nrds<Prestige99> Yeah I tried but then sdl would crash
00:32:37nrds<Prestige99> for some reason
00:34:06nrds<Prestige99> and all I would get for an error message was `[Exception]`
00:35:26FromDiscord<Elegantbeef> hmph i'm too dumb to know how to setup these link paths
00:35:35FromDiscord<Elegantbeef> Hard coding where wasmedge installed on my system is not ideal
00:36:14nrds<Prestige99> can you set LD_LIBRARY_PATH or do you mean something else?
00:37:04FromDiscord<Elegantbeef> I mean for compiling my files
00:37:24FromDiscord<Elegantbeef> have this dumb stuff `switch("passL", "-L/home/jason/.wasmedge/lib -lwasmedge_c")`
00:38:55FromDiscord<Elegantbeef> Dont think wasmedge is shipped on a package manager and doesnt install itself(by default) to `/usr` so .... uhhh there is no hardset include path
00:39:17FromDiscord<Elegantbeef> So i guess i need `-d:wasmedgePath:"/some/path"`
00:39:44FromDiscord<Elegantbeef> Can make a `nim.cfg` for that, so yea seems fine i guess
00:41:20*lumo_e quit (Ping timeout: 260 seconds)
00:51:18*pch joined #nim
00:53:59FromDiscord<Elegantbeef> Well huan if you want another update, i've made it so aside from libclang it's fully portable
00:54:03FromDiscord<huantian> what if you install wasmedge with your package lmao
00:54:19FromDiscord<huantian> oh neat, why does it depend on libclang?
00:54:23FromDiscord<Elegantbeef> Futhark
00:54:53FromDiscord<huantian> ah
00:55:04FromDiscord<huantian> also apparently wasmedge is on the aur lol
00:55:08nrds<Prestige99> nice
00:55:33FromDiscord<huantian> no idea what the status of that package is tho
00:55:34FromDiscord<Elegantbeef> I do want to eventually have a `-d:wasmEdgeSkipFuthark` so you can use the generated Nim file which would be hosted on the repo
00:56:24FromDiscord<Elegantbeef> But i need to talk to pmunch to see if i can get futhark to export the `.nim` in a sub directory with a custom name
00:58:05FromDiscord<Elegantbeef> Futhark's libclang dependancy will make life a bit fickle, but i do want to try to make this properly portable
01:01:45*noeontheend quit (Ping timeout: 260 seconds)
01:20:29FromDiscord<shlomo> hey is their a good guide for the following topics.↵runnable examples:↵testing:
01:20:33FromDiscord<shlomo> documentation:
01:22:19FromDiscord<Elegantbeef> Runnable examples are just used for docgen
01:22:23FromDiscord<Elegantbeef> https://nim-lang.org/docs/system.html#runnableExamples%2Cstring%2Cuntyped
01:25:18FromDiscord<shlomo> In reply to @Elegantbeef "Runnable examples are just": that makes sense. I come from python were you can create tests within the docstring of a function
01:25:32FromDiscord<Elegantbeef> Yea we dont do that here
01:25:54FromDiscord<shlomo> how would you recomend i Structure tests?
01:25:57FromDiscord<Elegantbeef> For tests you can checkout `std/unittests` testament or balls
01:26:36FromDiscord<!Patitotective> are nim binaries compatible between windows? should i build it on the lower supported or? 🤨
01:26:50FromDiscord<!Patitotective> (edit) "windows?" => "windows versions?"
01:26:53FromDiscord<Elegantbeef> No clue i'd imagine 7-11 would be compatible
01:27:04FromDiscord<huantian> mmm maybe not 7
01:27:04FromDiscord<Elegantbeef> Shit is that why they did it
01:27:08FromDiscord<huantian> 7 is deprecated at this point
01:27:11FromDiscord<Elegantbeef> Are they shilling 7-11?
01:27:25FromDiscord<huantian> 😳
01:27:53FromDiscord<!Patitotective> actually i only can choose between windows 2022 or 2019 server https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job#choosing-github-hosted-runners lol
01:29:29FromDiscord<shlomo> In reply to @Elegantbeef "For tests you can": I just checked out the library its pretty cool. by the way why are certain people have BOT beside their name?
01:30:29FromDiscord<Elegantbeef> I'm from matrix
01:30:42FromDiscord<Elegantbeef> It's a chat protocol, bridged to discord
01:30:48FromDiscord<Elegantbeef> There are also irc users but non have talked
01:32:46*Amun-Ra talks
01:34:37FromDiscord<Elegantbeef> replies
01:34:47FromDiscord<Elegantbeef> Beep boop beep
01:34:48FromDiscord<huantian> continues making conversation
01:35:09FromDiscord<shlomo> I was honestly wondering whether the nim community had cracked ai ahead of everyone else 🙂
01:35:18FromDiscord<Elegantbeef> They did
01:35:28FromDiscord<Elegantbeef> I mean did not
01:35:28FromDiscord<Elegantbeef> We are not cylons
01:35:32FromDiscord<!Patitotective> if i `nim c main --out:MyApp` on windows, will it output `MyApp.exe` or just `MyApp` 🤔
01:35:41FromDiscord<Elegantbeef> `.exe`
01:35:45FromDiscord<!Patitotective> :]
01:35:50FromDiscord<Elegantbeef> Windows uses extensions like the silly OS it is
01:36:20FromDiscord<shlomo> In reply to @Elegantbeef "For tests you can": is their a good guide for testament I tried the docs and its a bit confusing for me
01:36:32FromDiscord<Elegantbeef> You know how you can tell if something is executable, there's a fucking executable flag?!
01:36:56FromDiscord<Elegantbeef> I do not really know, personally i use `unittests` for all my testing
01:37:08FromDiscord<Elegantbeef> If i didnt i'd probably use balls
01:37:47termertest these balls
01:38:00FromDiscord<Elegantbeef> Sorry i'm not a doctor
01:38:35FromDiscord<huantian> balls is cool
01:40:34FromDiscord<shlomo> it looks cool
01:40:49FromDiscord<Elegantbeef> What does? Disruptek's balls?
01:40:57FromDiscord<shlomo> yup
01:40:59FromDiscord<shlomo> i like em
01:41:05FromDiscord<Elegantbeef> Yes that's the joke he has setup for years
01:41:16FromDiscord<Elegantbeef> Used to be called his testes
01:41:37FromDiscord<huantian> 😳😏
01:42:34FromDiscord<shlomo> In reply to @Elegantbeef "Yes that's the joke": hey if he implements a open source library he has the right 😂
01:51:24FromDiscord<!Patitotective> im trying to make a nimble task that installs my app's dependencies and then use the binary library of one of those dependencies↵but it seems like in windows you need to end your current cmd.exe and open it again so it updates the enviroments variables (in this case `nimble/bin`) ↵so how could i make it work? maybe using the actual binary path? how should i get nimbles binaries path then 🤨
01:52:05FromDiscord<Elegantbeef> Manually set the env variable
01:54:22FromDiscord<!Patitotective> what env variable would it be hehe
01:54:37FromDiscord<Elegantbeef> How the fuck am i supposed to know
01:55:24FromDiscord<!Patitotective> :[
02:00:34FromDiscord<Elegantbeef> Wait if you just want to get it to run nimble, just path to nimble and use it
02:21:29FromDiscord<!Patitotective> `exec fmt"set PATH=""%PATH%;{expandTilde(\"~/.nimble/bin\")}"""` 🤔
02:25:31FromDiscord<spoon> sent a code paste, see https://play.nim-lang.org/#ix=3WUS
02:25:36FromDiscord<spoon> i am very confused
02:26:26FromDiscord<spoon> (this is golf btw, best practices are out the window)
02:26:32FromDiscord<Elegantbeef> Are you purposely writing ugly code?
02:26:38FromDiscord<spoon> golf
02:28:07FromDiscord<spoon> except a semicolon takes up the same space as a newline so i should just use that
02:28:49FromDiscord<spoon> but i'm still completely lost as to why the first works but not the second
02:29:29FromDiscord<Elegantbeef> You're assigning k and using it
02:30:21FromDiscord<Elegantbeef> Also if you're going for code golf you're doing it wrong using `len()`
02:30:46FromDiscord<spoon> there's an operator for that?
02:31:03FromDiscord<Elegantbeef> `[1..^1]`
02:31:16FromDiscord<spoon> ah yeah, i knew i was missing something
02:31:55FromDiscord<spoon> so, what makes l able to be printed but not k?
02:32:22FromDiscord<spoon> the error it gives me is there is `undeclared identifier: 'k'`
02:32:41FromDiscord<Elegantbeef> Yes like i said you're doing `len(k)` inside k's assignment
02:32:48FromDiscord<spoon> ah yeahh
02:33:05FromDiscord<spoon> finals week moment
02:33:06FromDiscord<Elegantbeef> Also why isnt this single lined?
02:33:17FromDiscord<spoon> couldn't figure out how to format it
02:34:48FromDiscord<spoon> should probably be looking at some completed golf before do any more but i'll just redo my old ones
02:35:31FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/rXr
02:35:32FromDiscord<Elegantbeef> There
02:36:07FromDiscord<Elegantbeef> the last split is wrong cause i dont know what it should do
02:37:10FromDiscord<spoon> parenthacy should also be moved to before the square brackets but yeah
02:37:33FromDiscord<spoon> aight i see now
02:45:06FromDiscord<spoon> (are emoji reactions even communicated over the bridge)
02:49:32FromDiscord<Elegantbeef> Nope reactions are not
02:49:42FromDiscord<Elegantbeef> Which is odd since matrix supports them and custom emojis work
02:50:16FromDiscord<huantian> Maybe it’s a discord thing
02:50:23FromDiscord<spoon> oh matrix got updated since i used it last
02:50:28FromDiscord<Elegantbeef> Well it's a bridge thing
02:50:33FromDiscord<spoon> didn't think it was going for feature parity
02:50:48FromDiscord<Elegantbeef> I might get fed up enough to make my own bridge with blackjacks and hookers
02:50:59FromDiscord<Elegantbeef> Eh it has more features than discord 😛
02:51:12FromDiscord<spoon> does it?
02:51:22FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/971242605771886653/image.png
02:51:22FromDiscord<Elegantbeef> 🙂
02:51:26FromDiscord<Elegantbeef> Polls!
02:51:33FromDiscord<spoon> does it even have cross server emoji as an option
02:51:46FromDiscord<huantian> And it has threads from reply thingy now
02:52:07FromDiscord<Elegantbeef> Spoon custom discord emojis work across the bridge
02:52:43FromDiscord<spoon> yeah, just didn't know if it uploaded the emoji as a server emoji, used it, and deleted it to accomplish that
02:53:19FromDiscord<!Patitotective> zamn https://github.com/Patitotective/ImTemplate/runs/6283532715?check_suite_focus=true#step:4 :[
02:53:40FromDiscord<!Patitotective> too descriptive
03:13:35*Zectbumo quit (Remote host closed the connection)
03:23:25FromDiscord<!Patitotective> back to github action shell https://media.discordapp.net/attachments/371759389889003532/971250666918010940/unknown.png
03:23:27FromDiscord<!Patitotective> (edit) "action shell" => "actions hell"
03:42:15FromDiscord<ynfle> I'm trying to debug a nim program, but when I set a breakpoint and run, it just hangs
03:43:00*arkurious quit (Quit: Leaving)
03:44:17FromDiscord<!Patitotective> In reply to @Elegantbeef "Manually set the env": daaaaaaaaamn↵it just does not work↵i update it and in the github workflow the path var is actually updated but in the nim code it just fails :[[[[[[[[[[[[[[[[[[[[[↵https://github.com/Patitotective/ImTemplate/runs/6283861397?check_suite_focus=true#step:4
03:45:05FromDiscord<!Patitotective> (edit) ":[[[[[[[[[[[[[[[[[[[[[↵https://github.com/Patitotective/ImTemplate/runs/6283861397?check_suite_focus=true#step:4" => ":[[[[[[[[[[[[[[[[[[[[["
03:45:09FromDiscord<!Patitotective> anyways
03:45:13FromDiscord<!Patitotective> good night :[
03:45:14FromDiscord<!Patitotective> 🌃
03:54:41*slowButPresent quit (Quit: leaving)
04:04:26*Gustavo6046 quit (Read error: Connection reset by peer)
04:04:52*bananahead quit (Quit: The Lounge - https://thelounge.chat)
04:05:55*bananahead joined #nim
04:11:13*vicfred joined #nim
04:19:12*Zectbumo joined #nim
04:39:16*Gustavo6046 joined #nim
05:34:02FromDiscord<congusbongus> I want to package a windows SDL nim application as a single exe, without having to ship the SDL .dll files. Does anyone know how I can do this?
05:37:36FromDiscord<Elegantbeef> @congusbongus\: you'd statically link sdl
05:39:07FromDiscord<mratsim> sent a long message, see http://ix.io/3WVc
05:40:15FromDiscord<congusbongus> ok I'm using sdl2_nim so I guess I'm out of luck
05:40:59FromDiscord<Elegantbeef> You can dynlib override
05:47:04FromDiscord<ShalokShalom> In reply to @Elegantbeef "Eitherway i'd liked more": Oh, yeah? 👀
05:47:06FromDiscord<Elegantbeef> @congusbongus\: refer to https://nim-lang.org/docs/nimc.html#dynliboverride
05:47:29FromDiscord<Elegantbeef> Only in cases where the inference is done from the procedure call
05:47:39FromDiscord<Elegantbeef> So only for lambda's/do notation
05:48:42FromDiscord<congusbongus> I appreciate the pointer but your link makes it sound like I just need to pass one compiler flag but I'm sure in reality it's much more complicated, especially for something like SDL
05:48:55FromDiscord<Elegantbeef> it's not much more complicated
05:49:09FromDiscord<Elegantbeef> You get all your static libraries, and then pass the dynlib override and a path to the library
05:49:18FromDiscord<Elegantbeef> The most complicated part is getting the static libraries
05:49:31FromDiscord<Elegantbeef> Personally i'd just recommend using appimage anyway
05:49:34FromDiscord<Elegantbeef> Much saner to deal with
05:49:41FromDiscord<Elegantbeef> Unless you're on windows
05:49:46FromDiscord<Elegantbeef> Then just ship the .dlls
05:53:35*ltriant quit (Ping timeout: 256 seconds)
05:53:40*rockcavera quit (Remote host closed the connection)
05:54:05nrds<Prestige99> I've been struggling to get sdl static linking working for quite a while now
05:54:17nrds<Prestige99> actually currently working on that problem as we speak
05:54:32FromDiscord<Elegantbeef> Eh it's generally stupid to static link imo
05:54:41FromDiscord<Elegantbeef> It's a pain and means the entire binary needs to be shipped
05:54:48FromDiscord<Elegantbeef> for an update\
05:54:56nrds<Prestige99> you say needs, I say can
05:55:08FromDiscord<Elegantbeef> What?
05:55:09nrds<Prestige99> also, it's recommended for wasm to statically link
05:55:20FromDiscord<Elegantbeef> Well yea wasm is an exception
05:55:34FromDiscord<Elegantbeef> It's not a real PC
05:56:07FromDiscord<ShalokShalom> In reply to @Elegantbeef "It's a pain and": That's different with AppImage?
05:56:07nrds<Prestige99> been having issues shipping dynamically linked games because the users have old glibc versions
05:56:20FromDiscord<Elegantbeef> Appimages can self update↵(@ShalokShalom)
05:56:41FromDiscord<ShalokShalom> With the Launcher, that is?
05:56:50FromDiscord<Elegantbeef> "The launcher"?
05:56:51FromDiscord<ShalokShalom> But you still ship the whole binary.
05:57:00FromDiscord<ShalokShalom> The AppImage Launcher?
05:57:10FromDiscord<Elegantbeef> No appimages have an update API
05:57:14FromDiscord<ShalokShalom> Or do you mean, you have build in self update in your software
05:57:17FromDiscord<ShalokShalom> Aha
05:58:03FromDiscord<Elegantbeef> Which i think means you can only ship your updated binary instead of a binary including static libraries
05:58:31FromDiscord<Elegantbeef> Though i could be wrong
05:59:30FromDiscord<ShalokShalom> Isnt an AppImage always with static libs?
05:59:39FromDiscord<Elegantbeef> No dynamic
06:00:19FromDiscord<Elegantbeef> Well you can ship whatever dependencies you want
06:00:29FromDiscord<Elegantbeef> It doesnt care if it's statically linked or dynamically linked
06:01:19FromDiscord<ShalokShalom> They are changing that
06:01:20FromDiscord<ShalokShalom> https://github.com/AppImage/AppImageKit/issues/1193
06:01:54FromDiscord<Elegantbeef> That's not for the hsipped binaries
06:02:02FromDiscord<Elegantbeef> > Hence I am proposing that we replace all ingredients of the AppImages that get produced by this repository with static ones.
06:02:10FromDiscord<Elegantbeef> That's specifically for AppImageKit
06:04:06FromDiscord<Elegantbeef> Regardless i'm an idiot that shouldnt be listened to
06:04:13FromDiscord<Elegantbeef> So if anything i say is wrong attribute it to that
06:07:08*PMunch joined #nim
06:09:26FromDiscord<ShalokShalom> Well, I guess it depends on how people from the outside produce their AppImages
06:09:44FromDiscord<ShalokShalom> I lost oversight over that, it used to be quite confusing a couple of years ago
06:09:54FromDiscord<ShalokShalom> They had like 4 different ways of building them
06:10:06nrds<Prestige99> snap, flatpack, and appimage
06:10:10nrds<Prestige99> iirc snap sucks
06:11:06FromDiscord<Elegantbeef> Yea snap is proprietary and has many issues
06:11:20FromDiscord<Elegantbeef> flatpak is best for distibuting software to every distro easily
06:11:31FromDiscord<Elegantbeef> Appimage is best for games and the like
06:11:39FromDiscord<Elegantbeef> If you arent on steam atleast
06:11:51FromDiscord<Elegantbeef> If you're on steam use the steam linux runtime 😄
06:14:46FromDiscord<ShalokShalom> I like the cl ergonomics of snap the most
06:14:57FromDiscord<ShalokShalom> But yeah, non-free server side is a no go
06:15:37FromDiscord<ShalokShalom> And that people just use it without knowing and questioning that, freaks me out.
06:16:00FromDiscord<Elegantbeef> Yea i generally avoided snap when i was on ubuntu derivatives
06:16:13FromDiscord<Elegantbeef> Now i'm on debian and go package manager \> flatpak \> appimage
06:16:19FromDiscord<ShalokShalom> We are at the point, where Ubuntu user use non-free software, and practicially every single distribution storms to support it
06:16:51FromDiscord<ShalokShalom> I used Flatpak on KaOS, since it was the only way to get Steam running
06:17:03FromDiscord<ShalokShalom> Since I am on Arch, no external packages anymore at all
06:17:11FromDiscord<ShalokShalom> Flatpak was a pain.
06:17:46FromDiscord<ShalokShalom> Half of the things, like passing controllers and finding the paths was cruel.
06:17:56FromDiscord<ShalokShalom> Habitat is cool 👍🏻
06:19:27FromDiscord<Elegantbeef> Pmunch you about?
06:19:59FromDiscord<ShalokShalom> https://github.com/habitat-sh/habitat
06:20:43FromDiscord<ShalokShalom> Rust runtime, works on all major platforms and has an awesome simple description language
06:21:03FromDiscord<ShalokShalom> But its a bit tied to server software, mostly culturally
06:22:01FromDiscord<Elegantbeef> Oh he is about but busy in offtopic 😄
06:22:52FromDiscord<Elegantbeef> Any idea why i cannot define a destructor for a type imported by futhark?
06:27:00PMunch@Elegantbeef, probably because it is considered used when it is assigned to a type alias and therefore a default destructor is created for it
06:27:03FromDiscord<Elegantbeef> Fuuuuck it's a compiler bug
06:27:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WVh
06:27:23FromDiscord<Elegantbeef> Perhaps
06:27:40FromDiscord<Elegantbeef> Guess time for distinct city
06:28:28PMunch@Elegantbeef, I've done it like this for my COAP wrapper http://ix.io/3WVi/nim
06:28:57FromDiscord<Elegantbeef> Dude just do `distinct` like it's 2022
06:29:25PMunchI used the inner thing because I sometimes needed to attach a bit of extra data :P
06:29:28FromDiscord<Elegantbeef> Or not
06:29:44PMunchAnd I'm not even sure if you can use distinct in that case since the signature needs to be an object?
06:29:58FromDiscord<Elegantbeef> Nah it works with distincts
06:30:23FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/q7u
06:30:24PMunchWait, why doesn't your snippet work then?
06:30:39PMunchAh the base have to be ref object?
06:30:42FromDiscord<Elegantbeef> The alias causes it to not work
06:30:52FromDiscord<Elegantbeef> Yea
06:31:02FromDiscord<Elegantbeef> Also no it's not the alias existing that's the issue
06:31:10FromDiscord<Elegantbeef> The compiler just doesnt skip for aliases in destructors
06:31:19PMunchAh I see
06:31:26FromDiscord<Elegantbeef> Which i guess makes sense perhaps
06:31:37FromDiscord<frobnicate> Doesn't skip?
06:31:56FromDiscord<Elegantbeef> The compiler has something called `skipTypes` which goes through the type tree to get to the base
06:32:06FromDiscord<Elegantbeef> It doesnt do that for aliases on destructors
06:32:26FromDiscord<frobnicate> So Base and Alias both use the destructor, or Alias uses the Base destructor?
06:32:36FromDiscord<Elegantbeef> The constructor isnt made 😄
06:32:41FromDiscord<ShalokShalom> Would you say there are many "exceptions from the rules" in Nim like that?
06:32:41FromDiscord<frobnicate> Oh
06:32:46FromDiscord<Elegantbeef> Alias is a type alias it doesnt make an new definition
06:32:50FromDiscord<Elegantbeef> Destructor i mean
06:32:59FromDiscord<frobnicate> In reply to @ShalokShalom "Would you say there": Not in my experience
06:33:01FromDiscord<Elegantbeef> Nim has many "I forgot this AST existed"
06:33:06FromDiscord<Elegantbeef> Most of my bug fixes are due to that
06:33:17FromDiscord<ShalokShalom> THIS AST?
06:33:21FromDiscord<frobnicate> Yeah I was going to say they usually get fixed
06:33:23FromDiscord<ShalokShalom> Are there more than one?
06:33:30FromDiscord<Elegantbeef> Well no
06:33:35FromDiscord<Elegantbeef> This ast as in this feature existed
06:33:43FromDiscord<ShalokShalom> (edit) "THIS" => ""This""
06:33:57FromDiscord<Elegantbeef> If you look at the destructor code there is probably a `skipType` missing to skip over aliases cause someone forgot to consider that
06:34:24FromDiscord<frobnicate> In reply to @Elegantbeef "The constructor isnt made": To be fair, it doesn't make sense to make a distinct destructor for an alias
06:34:30FromDiscord<Elegantbeef> As such `Alias = Base` attempts to add a destructor to `Alias` but cannot cause it's a `tyAlias` and not in `{tyObject, tyDistinct}`
06:34:41FromDiscord<Elegantbeef> Well in this case it'd be beneficial
06:34:43FromDiscord<ShalokShalom> Is this something property based tests would have caught?
06:34:58FromDiscord<Elegantbeef> How the fuck am i supposed to know i'm an idiot
06:35:21FromDiscord<Elegantbeef> In the case it's an alias it should either work or provide an error that it got an alias but expected an object
06:35:27FromDiscord<ShalokShalom> I guess I am in the right community then
06:35:30FromDiscord<Elegantbeef> It's a debatable feature
06:35:51FromDiscord<ShalokShalom> Nim is a debatable feature
06:36:40FromDiscord<frobnicate> In reply to @Elegantbeef "In the case it's": Yeah I'd say that should error. It's basically "I have a dog, here's a destructor for the dog. You can also call a dog a doggo."↵It's essentially the same concept
06:36:59FromDiscord<ShalokShalom> Like your comparison
06:37:11FromDiscord<ShalokShalom> Did you ever think about doing guides?
06:37:25FromDiscord<frobnicate> Yes. I've tutored in the past
06:37:27FromDiscord<Elegantbeef> I mean aliases are human friendly types they are not concrete types as such i'd say there is some argument for it working
06:38:04FromDiscord<Elegantbeef> But i understand why it doesnt and am more annoyed with the error than the lack of working 😄
06:38:13FromDiscord<ShalokShalom> Everything seems so untransparent
06:38:27FromDiscord<Elegantbeef> The compiler is FOSS have a gander 😛
06:38:27FromDiscord<ShalokShalom> Lots of hidden values
06:38:47FromDiscord<ShalokShalom> Everything is assumed to be understood at the implementation level
06:38:49FromDiscord<Elegantbeef> Eh it's a compiler
06:38:58FromDiscord<frobnicate> In reply to @Elegantbeef "I mean aliases are": I think an error like "X is an alias, base type defines destructor" or something would help
06:39:12FromDiscord<Elegantbeef> I mean in this case we cannot use the base type
06:39:23FromDiscord<Elegantbeef> Unless pmunch implements a `futhar.getBase(WasmString)`
06:39:29FromDiscord<frobnicate> Then it should be distinct like in your fix
06:39:29FromDiscord<Elegantbeef> `futhark`\ 😄
06:39:30FromDiscord<ShalokShalom> Even more complicated 😅
06:40:05FromDiscord<Elegantbeef> I'm very much on the fence what should happen 😄
06:40:50FromDiscord<frobnicate> Well if they're different types, they should be distinct. If it's an alias they're still the same type, just with a different name
06:41:05FromDiscord<Elegantbeef> I know how the type system works 😄
06:41:11FromDiscord<frobnicate> Sorry
06:41:16FromDiscord<Elegantbeef> Hell i've fixed it in some regard!
06:42:06FromDiscord<Elegantbeef> I do think that using an alias does allow hiding a feature and is quite pointless
06:42:31FromDiscord<Elegantbeef> Destructors have to be in the file with the type as such there is no reason to have an alias with a destructor in 99.99% of code
06:42:53FromDiscord<Elegantbeef> If you didnt give the type a descriptive name fuck off
06:43:24FromDiscord<frobnicate> Right
06:43:44FromDiscord<frobnicate> Personally I find aliases to be confusing
06:43:59FromDiscord<Elegantbeef> I find them great where they actually make code more readable
06:44:02FromDiscord<Elegantbeef> Much better than `using` imo
06:44:10FromDiscord<frobnicate> Especially when people alias std stuff from cpp
06:44:14FromDiscord<Elegantbeef> I generally use `distinct` or `enum` instead
06:44:15PMunch@Elegantbeef, not exactly sure what you expect that procedure to do?
06:44:55FromDiscord<Elegantbeef> Eh i guess pmunch i could just make a macro if i really hated it which walked up the type skipping aliases to get the base
06:45:08FromDiscord<Elegantbeef> This would allow making destructors without aliasing
06:45:14PMunchExactly, Futhark types aren't special :P
06:45:23FromDiscord<Elegantbeef> Without distincts/new objects
06:45:46FromDiscord<frobnicate> Ast magic
06:46:03FromDiscord<Elegantbeef> More type magic 😛
06:46:30FromDiscord<Elegantbeef> Yea i'm certainly going to need this for types that dont need aliases
06:46:34PMunchI guess you could use the crazy name with lots of numbers
06:46:41PMunchDon't remember if those are stable though..
06:46:53FromDiscord<Elegantbeef> Gensym should not be relied upon
06:47:12PMunchDid you have a look at the code, is it gensym it uses?
06:47:16FromDiscord<Elegantbeef> Eh the macro is easy
06:47:38FromDiscord<Elegantbeef> the `Namenumber` is gen sym
06:47:44FromDiscord<frobnicate> I thought it was a hash
06:47:44PMunchRight
06:47:53PMunchWell Futhark does have a hashing system
06:48:01PMunchBut that is for the final identefiers
06:48:18FromDiscord<frobnicate> Oh right
06:49:13PMunchEssentially if you have both a proc and a type named "something" then the first one that is defined will be called "something" and the second one will be "something_proc" or "something_type" depending on what type it is. If there is still a collision it attaches the hash of the original identifier
06:49:14FromDiscord<Elegantbeef> Pmunch you may want to mention the destructor issue in your docs 😛
06:49:50FromDiscord<Elegantbeef> I mean is there a reason you're using the hash and adding `proc`?
06:49:53PMunchIt's basically a way to make 100% sure we don't get name collisions from converting the C space of valid identifiers into the smaller Nim space of valid identifiers
06:50:03FromDiscord<Elegantbeef> You can just `gensym` the symbol
06:50:13FromDiscord<Elegantbeef> `gensym` garuentees a unique name
06:50:26PMunchSure, but I wanted these identifiers to be stable
06:50:32PMunchAs you say you can't rely on gensym
06:50:41PMunchMy system is deterministic
06:50:54FromDiscord<Elegantbeef> I mean technically gensym is aswell
06:50:59PMunchRunning Futhark on the same file will always yield the same identifiers
06:51:09FromDiscord<Elegantbeef> But that's a technicality i dont want to get into
06:51:22FromDiscord<Elegantbeef> They're temporally stable assuming the code doesnt change 😄
06:51:33PMunchThat's a big assumption :P
06:51:54FromDiscord<Elegantbeef> Anyway pmunch is there a way to output just the nim file futhark makes to a specific directory with a name, so i can have a futhark-less version that can just be imported?
06:52:18FromDiscord<frobnicate> It produces a JSON, no?
06:52:20PMunchWhat happens if I have two libraries that use Futhark, won't importing the first mess with the gensym numbers and then mess up the symbols of the second library?
06:52:40PMunch@Elegantbeef, it already outputs this to the nimcache directory ;)
06:52:51FromDiscord<Elegantbeef> Yes i just want the nim file though
06:53:05FromDiscord<Elegantbeef> I dont want to manually have to fetch it, so i guess a nimble task it is then
06:53:07PMunchHave a look at the COAP wrapper snippet again
06:53:31PMunchThat's how you should do that, that file is the file that comes out in the nimcache folder
06:53:59PMunchI do want to give it a couple more "modes" though that generates more importable libraries for one thing
06:54:48PMunch@frobnicate, it produces JSON as an intermediary
06:55:51PMunchBut in a way I think it's a good to require the aliases in order to add destructors. It keeps the C code a bit more separate from the Nim code, so if you need to do the low-level stuff then you know it's still possible.
06:56:35FromDiscord<Elegantbeef> Yea you're probably right
06:56:51FromDiscord<Elegantbeef> Also forces you to write slightly more idiomatic code
06:57:15PMunchA destructor runs the risk of not knowing when an object is stored on the C library side. So if you have a usecase where that doesn't happen and write a destructor for it then to later have a user try to use another low-level function which stores the object on the C side then Nim would happily destroy that object.
06:57:20PMunchExactly
06:57:51PMunchMy idea for how to use Futhark is "let Futhark do a 1:1 mapping with C, then write Nim code on top to improve the interface"
06:58:29nrds<Prestige99> I should try Futhark out for sdl, a lot of the bindings are incorrect
06:59:20FromDiscord<Asbjørn F> I should just try Futhark in general
06:59:37PMunchI had to use Futhark to wrap X11 just because the existing bindings lacked a lot of things
07:10:07*Zectbumo quit (Remote host closed the connection)
07:14:40*reversem3[m] quit (Quit: Bridge terminating on SIGTERM)
07:14:43*buster_blue[m] quit (Quit: Bridge terminating on SIGTERM)
07:19:26*reversem3[m] joined #nim
07:25:33Amun-RaI use the same approach, but without futhark
07:25:34*buster_blue[m] joined #nim
07:26:35PMunchSame approach as?
07:26:59Amun-Rawriting low level private abi as in C then expose only high level nim bindings
07:28:23Amun-Rano nils, no casts, no ptrs, etc.
07:29:05PMunchAh right, yes that is probably the best way to handle C libraries
07:34:38FromDiscord<Elegantbeef> Anyone know how objects look when exported to WASM procs? Going to be the next thing i look at probably
07:34:57FromDiscord<Elegantbeef> Pretty surprised how simple it is to compile wasm modules
07:35:17FromDiscord<Asbjørn F> How would you define a type for what materials are in a product?↵Like something could be 95 % cotton, 5 % elastan
07:35:25FromDiscord<Elegantbeef> I'm assuming emscripten screams if the type isnt made up of primitives 😄
07:35:49FromDiscord<Elegantbeef> You mean programatically?
07:36:01FromDiscord<Asbjørn F> I'm trying to make a generic "product attribute" but the stuff that defines a product can be quite troublesome
07:36:07FromDiscord<Elegantbeef> `type Percentage = distinct 0f32..1f32`
07:36:27FromDiscord<Asbjørn F> Like manufacturer, material, size, color
07:36:37FromDiscord<Elegantbeef> `type Material = enum Cotton, Nylon, Spandex, ...`
07:37:00FromDiscord<Elegantbeef> `type Materials = array[Material, Percentage]` 😄
07:37:50FromDiscord<Elegantbeef> Depending what you're doing a lot of this is going to be a string
07:38:08FromDiscord<Elegantbeef> Since you want it typeless and cannot reasonably represent it all with types imo atleast
07:38:34FromDiscord<Asbjørn F> I'm just trying to make the data at least a bit normalised
07:39:11FromDiscord<Elegantbeef> Well without knowing the possible values i cannot speak
07:39:35FromDiscord<Rika> How exact do you need the data to be
07:40:19FromDiscord<Asbjørn F> sent a code paste, see https://play.nim-lang.org/#ix=3WVs
07:40:49FromDiscord<Asbjørn F> That's why I needed a normalized system where you can define compound types
07:41:54FromDiscord<Asbjørn F> Like you have a product, a product has product attributes, a product attribute could be its weight. A different product might not have weight (like clothing, mostly)
07:41:55PMunchI'd probably do a Attribute variant object, then an enum that holds all the things you have defined yourself along with a Custom value. For all the pre-defined things convert it to proper types like @Elegantbeef did above for Materials, and then or the Custom just store a key/value pair as a string
07:42:02PMunchThat's what I'd do
07:44:03FromDiscord<Elegantbeef> Seems like the thing to do is go into OOP hell
07:47:13FromDiscord<Asbjørn F> I'd rather not
07:47:35FromDiscord<Asbjørn F> I also wanted to avoid any weird inheritance hierarchy
07:51:10FromDiscord<Asbjørn F> sent a long message, see http://ix.io/3WVx
07:52:07FromDiscord<Asbjørn F> it would have to be converted from strings
07:52:10FromDiscord<Elegantbeef> You could have a table of `string, Property`
07:53:39FromDiscord<Elegantbeef> Property being a big object variant
08:05:52*supakeen quit (K-Lined)
08:07:27FromDiscord<Asbjørn F> how the heck do I add that to the db when something could be an enum
08:08:25*lumo_e joined #nim
08:09:17FromDiscord<Asbjørn F> Like right now I have a `ProductAttribute` (weight, color) table, `ProductAttributeType` (if it's number, text, whatever), but in the case it's an enum like color, you of course want predefined colors like red, blue...
08:10:54FromDiscord<Asbjørn F> defining products sucks
08:19:10FromDiscord<Asbjørn F> I can kinda see why a lot of systems has a huge table with all the attributes and lots of NULL
08:20:44*Arrrrrrr joined #nim
08:27:23FromDiscord<Asbjørn F> I'm really close to just storing it as a blob but then I can't look up all small size tshirts for instance :/
08:27:45FromDiscord<Elegantbeef> Clearly properties should be a json string that you parse 😛
08:27:53FromDiscord<Elegantbeef> The most efficient DB
08:27:58FromDiscord<Asbjørn F> :c
08:31:45FromDiscord<Asbjørn F> what's even the performance of a NoSQL?
08:36:47PMunch@Asbjørn_F, as I said I would store a it as a set of attributes. If an attribute is of a known kind then you store the specific type for that attribute (e.g. a size enum), or if it is unknown you just store it as a string-based key/value pair.
08:38:22FromDiscord<Asbjørn F> I get that, but now I'm trying to make the schema for it, but it doesn't translate nicely to SQL, when some of it points to tables, and some of it might be custom key/val
08:40:16FromDiscord<Asbjørn F> For reference, I haven't made any professional product management / ecommerce stuff totally from scratch before, other than for uni
08:40:38PMunchAh you need to map this to SQL
08:40:55FromDiscord<Asbjørn F> Maybe a SQL db doesn't fit this usecase that well, since products are so different
08:40:58*lumo_e quit (Quit: Quit)
08:41:09PMunchWell you'd have to flatten the object
08:41:14FromDiscord<Asbjørn F> right
08:41:22PMunchEssentially include all fields and leave most of them empty
08:41:33PMunchThen have one field which tells you which field to read
08:41:49PMunchThen have a many-to-many relation between attributes and products
08:41:49FromDiscord<Asbjørn F> yeah I wanted to avoid that, that's usually what I see in other solutions. Giant tables with lots of nulls
08:42:41FromDiscord<Asbjørn F> I was considering a hybrid approach
08:42:48PMunchI mean the alternative is to store everything in the database as strings and then parse on the program side
08:43:04FromDiscord<Asbjørn F> yeah that's what I was initially considering
08:43:13PMunchI guess you could have attribute with a kind and then one element of each type the SQL implementation you're using supports
08:43:34PMunchSo at least you don't have to convert an int to a string to insert it into the database
08:43:45PMunchIf you use a low-enough level that you can do that directry
08:43:52FromDiscord<Asbjørn F> I'm leaning towards NoSQL or key/val storage for the product definition
08:43:59PMunchIf you're going through text-based SQL queries then it doesn't matter much anyways
08:44:42FromDiscord<Asbjørn F> and it's really only the products that are troublesome. The rest is pretty schema friendly
08:46:01*firq joined #nim
08:48:13NimEventerNew thread by Elcritch: Fidgets!, see https://forum.nim-lang.org/t/9143
09:01:45*Zectbumo joined #nim
09:03:59*mahlon quit (Ping timeout: 256 seconds)
09:10:19FromDiscord<narimiran> A new release candidate, Nim 1.6.6 RC3, is here:↵https://forum.nim-lang.org/t/9100#59703↵↵Please give it a try and report any regressions.
09:33:10*ltriant joined #nim
09:46:41*pch quit (Remote host closed the connection)
09:48:13FromDiscord<eyecon> In reply to @Asbjørn F "and it's really only": PostgreSQL has JSON types (straight or binary) that you can pack into a column, they've done much to improve performance
09:49:05FromDiscord<eyecon> https://www.postgresql.org/docs/current/functions-json.html
09:49:08FromDiscord<Asbjørn F> yeah I looked into the docs for that. They also added constraints for JSON types
09:49:51FromDiscord<eyecon> Yes, that'd be hard to beat in app code
09:50:28FromDiscord<Asbjørn F> I'm not really sure how I wanna handle it then. Probably have a table of product definitions, and then a table of actual products that points to a definition?
09:50:41FromDiscord<Asbjørn F> with the definition and the actual product both being JSOn
09:50:45FromDiscord<Asbjørn F> (edit) "JSOn" => "JSON"
09:51:44*analogsalad joined #nim
09:51:49FromDiscord<eyecon> Have a JSON array of material(string)-to-percentage tuples?
09:52:12FromDiscord<eyecon> And for the other attributes, whatever they require
09:52:46FromDiscord<eyecon> But at the end, you cannot leave it completely free because you can't do much with it then other than printing it
09:52:54FromDiscord<Asbjørn F> right
09:53:00FromDiscord<eyecon> So you'd need to have some kind of a schema, some required attributes
09:53:11FromDiscord<Asbjørn F> that's why I wanted a "definition" table, that tells you what stuff is
09:53:23FromDiscord<Asbjørn F> but it'd still be JSON
09:53:35FromDiscord<Asbjørn F> since the definitions have to be that dynamic
09:53:48FromDiscord<eyecon> So you'd read the definition JSON that would tell you what to do with the data in JSON
09:53:56FromDiscord<eyecon> Do you really need that much freedom
09:53:57FromDiscord<Asbjørn F> right, that's my idea anyway
09:54:14FromDiscord<Asbjørn F> Well how would you handle products across all shops and warehouses?
09:54:31FromDiscord<Asbjørn F> Some sell clothes, clothes don't have weight. Some sell cars, with custom rims
09:54:40FromDiscord<Asbjørn F> Color matters in some products, not in others
09:54:43FromDiscord<Asbjørn F> Same with sizes
09:54:48FromDiscord<Asbjørn F> I found it very difficult
09:54:58FromDiscord<eyecon> I'm not sure, I'm not involved in the topic either. I'd maybe still hardcode whatever all product types require and version the schema
09:55:21FromDiscord<eyecon> If you have a new customer, conduct a survey to find out whatever they have that you don't cover, then add the type
09:55:42FromDiscord<Asbjørn F> But you'd end up with NULLs for the customers who don't fit exactly the mold
09:55:58FromDiscord<Asbjørn F> Some customers wanna display whether or not something is organic / fairtrade
09:56:14FromDiscord<eyecon> But they'd be different types hopefully, or yes, you can have NULLs, that's not a bad thing
09:56:15FromDiscord<Asbjørn F> And you need to be able to sort on it
09:56:32FromDiscord<Asbjørn F> I try to avoid NULLs 👀
09:56:35FromDiscord<eyecon> If you don't know whether something is organic then the organic field is NULL
09:56:49FromDiscord<eyecon> In reply to @Asbjørn F "I try to avoid": Why? That's a legit piece of info
09:57:02FromDiscord<eyecon> That you don't know or the data is not present
09:57:55FromDiscord<Asbjørn F> Something like this sentiment↵<https://www.lucidchart.com/techblog/2015/08/31/the-worst-mistake-of-computer-science/>↵↵But for a car, it doesn't matter if it's organic, for instance, but I don't want the customer to have to worry about listing it as organic
09:58:14FromDiscord<Asbjørn F> (edit) "Something like this sentiment↵<https://www.lucidchart.com/techblog/2015/08/31/the-worst-mistake-of-computer-science/>↵↵But for a car, it doesn't matter if it's organic, for instance, but I don't want the customer to have to worry about listing it as ... organic" added "not"
09:58:36FromDiscord<eyecon> But there's a reason why it's invented 😄
09:59:08FromDiscord<eyecon> So say you have t-shirts which are sold in a fair-trade shop, and t-shirts that originate from a random cheap shop
09:59:11FromDiscord<Asbjørn F> I'm gonna try the JSON product pointing to JSON schema thing and see how it goes
09:59:32FromDiscord<eyecon> Do you really want to have two types, fairtrade_tshirt and sweatshop_tshirt?
09:59:53FromDiscord<eyecon> Just to avoid that the second one has a field that is NULL?
10:00:24FromDiscord<Asbjørn F> In reply to @eyecon "Do you really want": they're both going to be Products, just with a different list of attributes. It's a "has-a" relationship, not an "is-a" relationship
10:00:31FromDiscord<Asbjørn F> I'm trying to make it compositional
10:00:59FromDiscord<eyecon> OK, let's say a customer wants to have a list of organic t-shirts
10:01:06*pch joined #nim
10:01:15FromDiscord<eyecon> Half of your t-shirts have-a "organic" field
10:01:19FromDiscord<eyecon> The other half doesn't
10:01:23FromDiscord<eyecon> What do you list?
10:01:34FromDiscord<Asbjørn F> the organic ones?
10:01:43FromDiscord<eyecon> And how do you determine that?
10:01:50FromDiscord<eyecon> The ones that have the field and is true?
10:02:03FromDiscord<Asbjørn F> yes, that's the assumption
10:02:18FromDiscord<Asbjørn F> I think it'll be easier if I just show it, so I'm gonna try making a proof of concept
10:02:29FromDiscord<eyecon> But that's exactly the same thing as having the field in all and setting it to NULL in those that shouldn't be relevant
10:02:30FromDiscord<Asbjørn F> and then you can tell me how much it sucks 😛
10:03:16FromDiscord<eyecon> In reply to @Asbjørn F "and then you can": On the contrary, I honestly find what you're trying to do more correct academically, it's just it sounds somewhat... not practical for real use cases
10:04:04FromDiscord<Asbjørn F> In reply to @eyecon "On the contrary, I": Yeah that's why I wanna actually try to make it
10:04:14FromDiscord<eyecon> Oh, OK
10:04:40FromDiscord<Asbjørn F> It's just the first thing I came up with was so stupid it didn't seem feasible to demo, but I think I can manage this
10:04:59FromDiscord<Asbjørn F> if my docker doesn't poop on me
10:05:36FromDiscord<eyecon> Hey, if you're able to come up with that crazy plan, I'm sure that you can actually do it haha
10:05:44FromDiscord<Asbjørn F> ty
10:06:37FromDiscord<eyecon> As someone I can't remember said (paraphrased): if you manage to get the right data structures working, the program writes itself
10:08:03FromDiscord<frobnicate> Yeah that was my focus for this. I work with warehouse software, and it always seems so messy so i wanted to try a cleaner data approach
10:08:33FromDiscord<frobnicate> Oh btw this is be on mobile lol
10:08:46FromDiscord<frobnicate> The other one is my work account
10:11:09FromDiscord<Rika> Hello I saw some DB talk
10:11:12FromDiscord<Rika> What’s the issue exactly
10:12:54FromDiscord<frobnicate> Defining products
10:13:17FromDiscord<frobnicate> Since they're all so different
10:13:28*jmdaemon quit (Ping timeout: 250 seconds)
10:14:24FromDiscord<frobnicate> Some are services, some are clothing, some are cars and they have different relevant fields for transport, packaging, manufacturer, color, size and all that
10:16:13FromDiscord<Rika> Have tables store different categories of products each? Though then you get the “each product needs a unique ID but they’re all in different tables” thing
10:16:21FromDiscord<Rika> Which I guess isn’t much of an issue but still
10:16:39FromDiscord<Rika> What’s wrong with nulls by the way
10:17:22NimEventerNew post on r/nim by mavavilj: Dash/Shiny/Power BI alternative using Nim?, see https://reddit.com/r/nim/comments/ui3b75/dashshinypower_bi_alternative_using_nim/
10:18:25FromDiscord<frobnicate> In reply to @Rika "What’s wrong with nulls": They talk bad about me behind my back
10:18:55FromDiscord<frobnicate> And I've been academically conditioned to hate them
10:22:49*analogsalad quit (Quit: bye)
10:28:07FromDiscord<eyecon> In reply to @Rika "Have tables store different": Snowflakes or any of the similar newfangled id solutions would solve that I think
10:31:31FromDiscord<Zoom> Are std[out, err] unavailable in NimScript? If so, why `echo` is?
11:28:27FromDiscord<planetis> echo works on macros pbl it's a special case
11:28:36FromDiscord<planetis> (edit) "on" => "in"
11:30:37FromDiscord<Zectbumo> sent a long message, see https://paste.rs/y7k
11:32:27FromDiscord<vindaar> because the first is the syntax to define a tuple type. but the second is not the syntax to define an object type
11:33:10FromDiscord<d4rckh> if i compile my nim project to c, can i invoke code from c++?
11:40:25FromDiscord<Yardanico> In reply to @d4rckh "if i compile my": Only if that C++ code exports functions with the C FFI
11:41:21FromDiscord<d4rckh> oh
11:42:38FromDiscord<Zoom> Thanks. Don't think I'm satisfied with this answer. Considering, NimScript is used for Nimble, you'd expect a bit more IO capabilities than the magic echo.↵(@planetis)
11:43:26FromDiscord<Zoom> Mind it, I have no idea on how NimVM works/supposed to work
11:58:54*Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected])
12:02:58*Zectbumo quit (Remote host closed the connection)
12:10:24FromDiscord<d4rckh> okay, i think i will just use winim
12:10:46FromDiscord<d4rckh> sent a code paste, see https://paste.rs/2Ec
12:11:10FromDiscord<d4rckh> sent a code paste, see https://paste.rs/MDm
12:11:23FromDiscord<d4rckh> (edit) "https://play.nim-lang.org/#ix=3WWx" => "https://play.nim-lang.org/#ix=3WWw"
12:12:02FromDiscord<d4rckh> sent a code paste, see https://paste.rs/aoB
12:12:38*ltriant quit (Ping timeout: 260 seconds)
12:24:28FromDiscord<eyecon> In reply to @d4rckh "and i defined `TOKEN_INFORMATION_CLASS`": No need, winim already defines it
12:24:51FromDiscord<d4rckh> oh yeah, its just `tokenIntegrityLevel`
12:25:32*jjido joined #nim
12:26:58*slowButPresent joined #nim
12:29:05FromDiscord<d4rckh> also, how can i allocate the buffer for `GetTokenInformation`? I am doing `tokIntegrity = PTOKEN_MANDATORY_LABEL(LocalAlloc(LPTR, cbSize))` but its telling me `got 'HLOCAL' for 'LocalAlloc(64, cbSize)' but expected 'PTOKEN_MANDATORY_LABEL = ptr TOKEN_MANDATORY_LABEL'`
12:29:23FromDiscord<d4rckh> trying to rewrite some c++ code into nim
13:18:26*rockcavera joined #nim
13:18:26*rockcavera quit (Changing host)
13:18:27*rockcavera joined #nim
13:23:47*ltriant joined #nim
13:25:55FromDiscord<Yardanico> In reply to @d4rckh "also, how can i": you don't need LocalAlloc here at all I think
13:26:23*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:26:43FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WWX
13:29:18FromDiscord<d4rckh> oh, now all its left is to convert a `LPSTR` to an actual string
13:29:43FromDiscord<d4rckh> in c++ i just did `string(lpSid)` but that doesnt work in nim 🤔
13:30:13FromDiscord<Yardanico> In reply to @d4rckh "oh, now all its": if it's null terminated, you just do `$cstring(mylpstr)`
13:31:02FromDiscord<d4rckh> damn, my code compiled after like an hour of fixing stuff
13:31:08FromDiscord<d4rckh> lets see if it actually works now
13:32:02FromDiscord<d4rckh> great it didnt work
13:32:23FromDiscord<d4rckh> (edit) "it didnt work" => "nothing gets pritned"
13:32:27FromDiscord<d4rckh> (edit) "pritned" => "printef"
13:32:28FromDiscord<d4rckh> (edit) "printef" => "printed"
13:36:02FromDiscord<d4rckh> ok i fixed it somehow but its always S-1-16-0.... https://media.discordapp.net/attachments/371759389889003532/971404838288117790/unknown.png
13:36:11FromDiscord<d4rckh> (edit) "S-1-16-0...." => "S-1-16-0...., even if i open the program as admin"
14:00:34*duuuuuude joined #nim
14:01:22duuuuuudewhat are your thoughts on google dart?
14:02:45FromDiscord<Yardanico> i think that's more for #offtopic, but personally it doesn't look like a contender for general purpose languages at all
14:03:04FromDiscord<Yardanico> The reason why people use Dart is Flutter in virtually all cases
14:05:09FromDiscord<dom96> yeah, let's take discussions about other languages to #nim-offtopic (should be bridged to Discord on IRC)
14:07:41*PMunch quit (Quit: Leaving)
14:13:52*arkurious joined #nim
14:19:10*vicfred quit (Quit: Leaving)
14:32:13FromDiscord<kraptor> for some reason this check got stuck downloading and cancelled itself, rendering the PR red in CI. Could someone rerun it? Maybe @dom96, who added the original certificate for tests ¡10 years! ago?↵↵https://github.com/nim-lang/Nim/runs/6289577978?check_suite_focus=true
14:32:43FromDiscord<Yardanico> In reply to @kraptor "for some reason this": there's a hacky way to re-run A CI - close and open the PR :)
14:33:25FromDiscord<dom96> submitted for re-run
14:33:34FromDiscord<kraptor> thanks!
14:33:39FromDiscord<dom96> GitHub really needs more granular status symbols for CI
14:34:22FromDiscord<dom96> it really annoys me when one test times out and that shows up as a failure
14:36:49nrds<Prestige99> What would you rather see?
14:37:11*noxnivi joined #nim
14:37:26noxnivigood day
14:37:47FromDiscord<Yardanico> hello
14:41:01FromDiscord<dom96> hiya
14:41:19FromDiscord<dom96> Prestige: an amber icon or something
14:44:01nrds<Prestige99> For timeouts? I would still consider that a failure
14:51:11*jjido joined #nim
14:53:51FromDiscord<d4rckh> In reply to @mothumix "you don't need LocalAlloc": I think I actually need it
14:54:35FromDiscord<dom96> Prestige: yep, timeouts should be treated as "no signal" not a failure in most cases
14:54:52FromDiscord<dom96> We have so many different CI runs that one timing out shouldn't block someone
14:55:33nrds<Prestige99> hmm perhaps
14:57:26*tiorock joined #nim
14:57:26*tiorock quit (Changing host)
14:57:26*tiorock joined #nim
14:57:26*rockcavera is now known as Guest1020
14:57:27*Guest1020 quit (Killed (zinc.libera.chat (Nickname regained by services)))
14:57:27*tiorock is now known as rockcavera
14:59:05*xet7 quit (Read error: Connection reset by peer)
15:21:48FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WXP
15:22:16FromDiscord<d4rckh> I am trying to allocate some memory for `TOKEN_MANDATORY_LABEL` but it tells me that `Error: type mismatch: got 'HLOCAL' for 'LocalAlloc(64, cbSize)' but expected 'PTOKEN_MANDATORY_LABEL = ptr TOKEN_MANDATORY_LABEL'`
15:23:47Amun-Ratry making a cast
15:24:03Amun-Rawin32 api can be and is dreadful
15:24:52FromDiscord<d4rckh> sorry, what do you mean make a cast?
15:24:58Amun-Racast[PTOKEN_MANDATORY_LABEL](LocalAlloc(64, cbSize))
15:25:53FromDiscord<Yardanico> sent a code paste, see https://paste.rs/E4D
15:26:04FromDiscord<Yardanico> `cast[PTokenMandatoryLabel](LocalAlloc(LPTR, cbSize))`
15:26:06FromDiscord<Yardanico> something like that
15:26:46FromDiscord<d4rckh> oh, i thought thats a cast
15:27:18Amun-Rathat's initialization
15:29:06FromDiscord<Yardanico> In reply to @Amun-Ra "that's initialization": that's a type conversion
15:29:32FromDiscord<Yardanico> `A()` or `A(field: value)` is object construction syntax, yes, but `A(b)` is a type conversion
15:31:30FromDiscord<Zoom> Hey guys. strutils/find is inclusive for both `first` and `last` but uses `last=0` as a default (for "last not provided"), instead of `last=-1`. Don't you think it's a logical error?
15:32:41FromDiscord<Zoom> I see it was -1 earlier...
15:32:58*mahlon joined #nim
15:35:15Amun-RaYardanico: yes, you're right
15:35:46FromDiscord<Yardanico> type conversion only really works for native nim types and it's specified in the manual
15:35:50FromDiscord<Zoom> I think I'll fix this
15:36:36FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#type-relations-convertible-relation the first and second big code blocks for relations algorithm
15:38:08FromDiscord<d4rckh> thanks
15:38:09FromDiscord<d4rckh> (edit) "thanks" => "thanks!"
15:42:11FromDiscord<kraptor> nah @dom96, same again... that CI is flaky as hell and keeps being cancelled 😦
15:42:47*nrds quit (Remote host closed the connection)
15:43:46*LuxuryMode quit (Quit: Connection closed for inactivity)
15:46:34FromDiscord<Yardanico> what test is failing btw?
15:46:59FromDiscord<Yardanico> ah 1 hour timeout
15:47:25*tiorock joined #nim
15:47:25*tiorock quit (Changing host)
15:47:25*tiorock joined #nim
15:47:26*rockcavera quit (Killed (zirconium.libera.chat (Nickname regained by services)))
15:47:26*tiorock is now known as rockcavera
15:48:25FromDiscord<kraptor> no idea, there is no output after nimble downloads packages for testing
15:48:39FromDiscord<dom96> In reply to @Zoom "Hey guys. strutils/find is": This sounds like it was kept this way for backwards compat
15:48:46FromDiscord<dom96> In reply to @kraptor "nah <@132595483838251008>, same again...": :(
15:51:59noxniviwhat is the proper way to start a nim project linked with github
15:52:30noxniviI mean, I can do "nimble init testproject" but it does not create .gitignore file/folders
15:52:44FromDiscord<Prestige> You need to do that manually
15:53:10FromDiscord<Prestige> `git init` if you're unfamiliar
15:53:41noxniviok. presumed so
15:53:57noxnivithanks FromDiscord
15:55:39FromDiscord<Yardanico> @noxnivi it's not FromDiscord, it's the user that's inside the <> in the message itself
15:55:48FromDiscord<Yardanico> FromDiscord is just a bot bridge that relays messages between IRC and Discord
15:56:08noxniviwell, I'm starting to realize about that
15:56:10noxniviXD
15:56:21noxniviso Prestige is the one who answered
15:56:29noxniviand Yardanico is you
15:56:56FromDiscord<Yardanico> yes
15:57:32noxniviOk, thanks Prestige
15:57:46noxniviand thanks Yardanico for the clarifying
15:58:16noxnivifirst time i see the discord bridge on IRC
16:02:02Amun-Ranoxnivi: depending on your irc client, you can setup it to look like this: https://i.postimg.cc/08PgTstF/Screenshot-from-2022-05-04-18-01-05.png
16:03:03*duuuuuude quit (Ping timeout: 260 seconds)
16:03:23noxniviI see Amun-Ra
16:03:40noxniviI'll check the settings of this client
16:03:44noxnivithanks!
16:04:07Amun-Rathere are plugins for that
16:09:47FromDiscord<Yardanico> In reply to @noxnivi "first time i see": well, we had to do it because most of the Nim community was in IRC in the past :)
16:09:52FromDiscord<Yardanico> nowadays it's mostly Discord
16:09:57FromDiscord<Yardanico> and Matrix
16:10:31ArrrrrrrWhich one is more populated, matrix or discord (nim community)?
16:10:35noxniviyep.. so I've seen
16:10:53FromDiscord<Yardanico> In reply to @Arrrrrrr "Which one is more": discord
16:10:58noxniviso there is a bridge Discord-matrix too
16:11:03noxnivi?
16:11:05FromDiscord<Yardanico> yes
16:11:19FromDiscord<Yardanico> so if you see people on FromDiscord, they might actually be from matrix :)
16:11:27noxniviXD
16:11:35Amun-Rado matrix users appear as bots on discord too?
16:11:39FromDiscord<Yardanico> yes
16:11:50FromDiscord<Yardanico> because it's still the same discord "webhook" feature
16:11:57Amun-Raah
16:11:57FromDiscord<Yardanico> in the past we had Matrix <-> IRC and Discord <-> IRC, now we have Matrix <-> Discord and Discord <-> IRC
16:12:09FromDiscord<Yardanico> i mean not "we", freenode itself has a network-wide matrix bridge
16:12:14FromDiscord<Yardanico> had
16:12:27Amun-Raso I guess that's the only way to interact on discord with the external world
16:19:57*tiorock joined #nim
16:19:57*tiorock quit (Changing host)
16:19:57*tiorock joined #nim
16:19:57*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
16:19:57*tiorock is now known as rockcavera
16:31:01*duuuuuude joined #nim
16:48:31*analogsalad joined #nim
17:02:26noxnivibye all
17:02:31*noxnivi quit (Quit: Leaving)
17:03:52FromDiscord<kraptor> @Yardanico, PR#19760 and #19758 stuck because of the same timeout issue... 🤦‍♀️
17:06:07FromDiscord<shlomo> How would I create a table storing with the value to be stored are procs that can have different types. Do I need to either use objects or object variants?
17:28:44FromDiscord<demotomohiro> When you store different types of procs to a table, how do you call them when you take a proc from the table?
17:36:26*Arrrrrrr quit (Quit: Arrrrrrr)
17:41:33*omanom joined #nim
18:02:27*xet7 joined #nim
18:04:51*kenran joined #nim
18:13:39*duuuuuude quit (Ping timeout: 256 seconds)
18:34:59FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3WYX
18:40:04FromDiscord<dom96> In reply to @Ayy Lmao "Can someone explain to": You want: https://nim-lang.org/docs/system.html#closureScope.t%2Cuntyped I think
18:40:36FromDiscord<Yardanico> yes
18:42:42FromDiscord<Ayy Lmao> In reply to @dom96 "You want: https://nim-lang.org/docs/system.html#clo": Interesting, I'm guessing that's not the default behavior for optimization reasons?
18:43:03FromDiscord<Yardanico> In reply to @Ayy Lmao "Interesting, I'm guessing that's": obviously, `loopNumber` is the same variable for the whole loop
18:43:11FromDiscord<dom96> not sure about the rationale, but it might be because it matches JS' semantics which works well for our JS backend
18:43:20FromDiscord<Yardanico> so in your code you just captured `loopNumber` itself, not its position on the current iteration
18:43:26FromDiscord<Yardanico> (edit) "position" => "value"
18:45:18FromDiscord<Ayy Lmao> In reply to @mothumix "so in your code": I was under the mistaken impression that each loop created a new `loopNumber` for some reason. It makes sense to optimize by default though.
18:46:55FromDiscord<Ayy Lmao> I guess it tripped me up because the type was using value semantics.
18:49:32*Zectbumo joined #nim
18:49:46*duuuuuude joined #nim
18:51:25FromDiscord<Yardanico> In reply to @Ayy Lmao "I was under the": yeah it can be a bit confusing, here are the docs in the manual - https://nim-lang.org/docs/manual.html#procedures-closures
18:51:40FromDiscord<Yardanico> "Since closures capture local variables by reference it is often not wanted behavior inside loop bodies" because of "Any captured variables are stored in a hidden additional argument to the closure (its environment) and they are accessed by reference by both the closure and its enclosing scope (i.e. any modifications made to them are visible in both places)"
18:52:47FromDiscord<Yardanico> btw @Ayy Lmao fun fact, the only thing that `closureScope` actually does is just creating an anonymous proc and then immediately calling it
18:52:55FromDiscord<Yardanico> there's also https://nim-lang.org/docs/sugar.html#capture.m,varargs[typed],untyped which is more refined
18:54:15FromDiscord<Yardanico> `capture` does it a bit differently by creating a proc with the arguments being things that you want to call, and then calling that proc with those arguments (so for value types they get copied)
18:55:41FromDiscord<Ayy Lmao> @Yardanico Thanks for all the tips. That clears up a lot for me.
18:57:05FromDiscord<Ayy Lmao> Does `The closure environment may be allocated on the heap or on the stack if the compiler determines that this would be safe.` mean that you can't stack overflow with recursion?
18:59:03FromDiscord<Yardanico> no
18:59:18FromDiscord<Yardanico> this statement is just there so that you don't depend on closures being heap allocated as it's an internal detail
18:59:36FromDiscord<Yardanico> but as far as I know currently closures are always heap allocated, there was a PR for allowing to stack allocate some closures, but it got stale
18:59:55FromDiscord<Yardanico> https://github.com/nim-lang/Nim/pull/14881
19:02:05FromDiscord<Ayy Lmao> I see. I think I recall the Zig creator talking about doing something like that with recursion so I was just curious if Nim already did it.
19:03:09FromDiscord<Yardanico> kind of sad that the PR got abandoned, I guess it would've improved closure performance in some cases
19:03:15FromDiscord<PMunch> The moderation team has decided to lift the ban on Solitude and we believe they will act in good faith and not engage in further bad behavior. Even though the ban is lifted does not mean such behaviour is accepted and such behaviour by any member of our community will result in further bans.
19:03:16FromDiscord<Yardanico> but I don't know how correct it is and if it would've added new bugs
19:35:42*Zectbumo quit (Remote host closed the connection)
19:42:33FromDiscord<Professor Actual Factual> sent a long message, see http://ix.io/3WZd
19:42:54*lumo_e joined #nim
19:43:15FromDiscord<Yardanico> In reply to @Professor Actual Factual "Wondering if there is": you can just `staticRead` files that you want
19:43:25FromDiscord<Yardanico> `const myimage = staticRead("image.png")` and then use `myimage` at runtime
19:43:37FromDiscord<Yardanico> there's also https://github.com/xmonader/nimassets to pack entire directories automatically
19:43:53FromDiscord<Yardanico> although it requires a separate CLI command
19:45:19FromDiscord<Professor Actual Factual> Awesome this looks promising. I was hopeing to embed caddy inside my app as a single executable. ↵Gonna see of this works now↵↵Thanks @Yardanico
19:45:33FromDiscord<Professor Actual Factual> (edit) "of" => "if"
19:45:44*jmdaemon joined #nim
19:46:03FromDiscord<Yardanico> wait, caddy? isn't that a binary?
19:46:11FromDiscord<Yardanico> how do you plan to execute it if you bundle it right into your binary?
19:46:21FromDiscord<Yardanico> I think you actually want something like AppImage or similar then
19:50:39FromDiscord<Professor Actual Factual> Ya caddy is a binary. I wany to package it with my main executable so that the end user only has one main exe.↵↵Never heard of appimage before. Will read more on it
19:51:04FromDiscord<Yardanico> @Professor Actual Factual "packaging" doesn't just mean that you'll be able to execute it
19:51:09FromDiscord<Yardanico> you still have to place the executable somewhere else
19:51:15FromDiscord<Yardanico> I'm actually not even sure if AppImage allows that
19:51:21FromDiscord<Professor Actual Factual> Hmmm
19:51:25FromDiscord<Yardanico> to execute a binary you need to have it placed somewhere in the system
19:51:37FromDiscord<Yardanico> on the filsystem
19:51:43FromDiscord<Yardanico> so then you execute it as a separate binary
19:52:28FromDiscord<Professor Actual Factual> Ok. If thats the case then i guess what im trying to accomplish is not gonna work. I originally had them as seperate. But i guess i can provide a zip file to the client instead of a single exe
19:52:37FromDiscord<Yardanico> yeah that's fine
19:52:49FromDiscord<Yardanico> just provide a zip that has all the binaries, just clearly tell them what is the main binary of the app
19:53:09FromDiscord<geekrelief> I'm trying to generate a type from a proc passed into a macro, but I'm running into a generation error. https://play.nim-lang.org/#ix=3WZg any advice on how to do this properly?
19:54:35FromDiscord<geekrelief> I have no clue what's causing `error: 'ClE_0' undeclared (first use in this function)`
19:54:56FromDiscord<Yardanico> In reply to @geekrelief "I have no clue": it's the C code for the closure environment of a proc
19:56:14FromDiscord<geekrelief> So if I add `{.cdecl.}` to my proc, I get a different error about my var expecting a closure type
19:57:15FromDiscord<geekrelief> it looks like `getTypeImpl` on a proc doesn't return the pragmas
20:02:50*Zectbumo joined #nim
20:03:00FromDiscord<geekrelief> If I switch to a `{.cdecl.}` and insert the pragma, https://play.nim-lang.org/#ix=3WZm I get a different error: `Error: illegal capture 'a' because 'myFunc' has the calling convention: <cdecl>`
20:03:47FromDiscord<Yardanico> In reply to @geekrelief "If I switch to": it should be nimcall for the defaul nim convention (not a closure), but I'm not sure why it errors
20:04:06FromDiscord<geekrelief> yeah, it's weird, I tried {.nimcall.} too
20:05:12*duuuuuude quit (Ping timeout: 246 seconds)
20:06:43FromDiscord<Yardanico> @geekrelief maybe i know the difference
20:07:07FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WZp
20:07:16FromDiscord<Yardanico> i'm not sure, but maybe it's because of Ident vs Sym
20:07:29FromDiscord<geekrelief> hmm
20:07:50FromDiscord<geekrelief> thanks for the clue, I'll try messing around with this!
20:13:05*duuuuuude joined #nim
20:13:26FromDiscord<slomp (Marcos Slomp)> QQ\: Is there a built-in way to get the number of elements of a tuple?
20:14:18FromDiscord<Yardanico> yes
20:14:22FromDiscord<Yardanico> https://nim-lang.org/docs/typetraits.html#tupleLen%2Ctypedesc%5B%5D
20:14:50FromDiscord<Yardanico> or https://nim-lang.org/docs/typetraits.html#tupleLen.t if you want to run it on the tuple itself, not on its type
20:16:22FromDiscord<geekrelief> @Yardanico That did it! https://play.nim-lang.org/#ix=3WZu kind of ugly, but it works! thanks a bunch!
20:20:28FromDiscord<slomp (Marcos Slomp)> Thanks! And is there a way to check if a generic type `[T]` is a tuple or a "scalar"?
20:21:29FromDiscord<Yardanico> to check if it's a tuple you just do `when T is tuple`
20:21:56FromDiscord<Yardanico> and if by scalar values you mean Ordinal, you can check against https://nim-lang.org/docs/system.html#Ordinal
20:22:31FromDiscord<slomp (Marcos Slomp)> Hmm, I tried `is tuple` that, but it did not work...
20:22:45FromDiscord<Yardanico> are you sure you put it with `when`?
20:22:53FromDiscord<Yardanico> also, can you maybe show the code around that `is tuple` ?
20:23:03FromDiscord<slomp (Marcos Slomp)> Hold on, I think there's something weird with VS Code and Code Runner...
20:23:37FromDiscord<slomp (Marcos Slomp)> Ok, now it compiled... Must have been some fluke with Code Runner...
20:23:40FromDiscord<slomp (Marcos Slomp)> Thanks again!
20:30:38FromDiscord<slomp (Marcos Slomp)> Ok, so now, one more thing\:↵is there a way to "flatten" a `seq[tuple[float,float,float]]` to an `openArray[float]`?↵I'm looking at the experimental views feature, but can't seem to find a matching case for this type of data reinterpretation.
20:32:11FromDiscord<Elegantbeef> `cast[ptr UncheckedArray[float]](mySeq[0].addr).toOpenArray(0, mySeq.len 3)` should in theory work but is one ugly boy
20:32:31FromDiscord<Yardanico> @ElegantBeef but the compiler then won't check the lifetimes of it, no?
20:32:45FromDiscord<Yardanico> or does it track `cast` for view types?
20:33:01FromDiscord<Yardanico> "A cast expression cast[T](e) is a path expression." hmm it does
20:33:04FromDiscord<Yardanico> nice
20:33:49FromDiscord<Elegantbeef> Cant hold onto open arrays
20:33:49FromDiscord<Elegantbeef> So what's the issue
20:34:06FromDiscord<Elegantbeef> No clue but views isnt required here
20:34:19FromDiscord<Yardanico> In reply to @Elegantbeef "Cant hold onto open": you can with views
20:34:25FromDiscord<Yardanico> and they explicitly mentioned views "I'm looking at the experimental views feature"
20:34:50*lumo_e quit (Ping timeout: 260 seconds)
20:35:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WZw
20:35:38FromDiscord<Elegantbeef> Works just fine
20:35:39FromDiscord<Yardanico> yes, I know
20:35:40FromDiscord<Elegantbeef> No clue how to do it with views
20:35:49FromDiscord<Elegantbeef> I think it does still track the lifetime i dont recall though
20:35:49FromDiscord<Yardanico> but with views you'll be able to store `openArray` itself in a variable
20:39:04FromDiscord<Elegantbeef> Yard explaining views to me 😄
20:39:09FromDiscord<Elegantbeef> I guess the matrix bridge changed the conversation does
20:39:13FromDiscord<Elegantbeef> conversation a bit\
20:39:20FromDiscord<Yardanico> yeah it's quite slow sometimes
20:39:37FromDiscord<Yardanico> this is how it looks in Discord https://media.discordapp.net/attachments/371759389889003532/971511439795843152/unknown.png
20:40:01FromDiscord<Elegantbeef> Yea doesnt properly timestamp across to discord
20:40:06FromDiscord<Elegantbeef> Your messages are marked with proper time stamps
20:40:24FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/971511638425481316/image.png
20:41:28*tiorock joined #nim
20:41:28*tiorock quit (Changing host)
20:41:28*tiorock joined #nim
20:41:28*rockcavera quit (Killed (lead.libera.chat (Nickname regained by services)))
20:41:28*tiorock is now known as rockcavera
20:42:07FromDiscord<slomp (Marcos Slomp)> In the `doThing` example you gave, if instead of `var a` I had `let a`, would it be reasonable to change `addr` to `unsafeAddr`?
20:42:35FromDiscord<Elegantbeef> Yea
20:42:38FromDiscord<Yardanico> yes, but `addr` is getting unified anyway
20:42:48FromDiscord<Elegantbeef> I'm in 1.7.x mind so `unsafeaddr` is no longer needed 😄
20:42:48FromDiscord<Yardanico> so in future nim releases you don't need unsafeAddr anymore
20:43:19FromDiscord<ElegantBeef> Ok no more matrix for me now 😄
20:43:29FromDiscord<ElegantBeef> Bridge is really slow right now
20:43:35FromDiscord<ElegantBeef> Still beat yard though
20:44:26FromDiscord<slomp (Marcos Slomp)> sent a code paste, see https://play.nim-lang.org/#ix=3WZy
20:44:42FromDiscord<ElegantBeef> Without views you cannot capture openarrays presently
20:44:49FromDiscord<ElegantBeef> You have to pass it as a parameter
20:49:00FromDiscord<slomp (Marcos Slomp)> Great, thanks for the help!
20:58:46FromDiscord<ElegantBeef> The worst apart about wasm libraries is that everything is uint32s 😄
21:00:36*fallback quit (Ping timeout: 240 seconds)
21:10:54FromDiscord<that_dude> In reply to @ElegantBeef "Ok no more matrix": Welcome to us normal people :) enjoy your stay
21:11:39FromDiscord<Elegantbeef> Nyet
21:11:51FromDiscord<Elegantbeef> Normal people use open software
21:23:10FromDiscord<that_dude> :(
21:23:46FromDiscord<exelotl> matrix has some big scalability issues right?
21:24:01FromDiscord<Elegantbeef> Dont know
21:24:08FromDiscord<Yardanico> In reply to @exelotl "matrix has some big": not matrix the protocol, but de-facto yes a bit because almost everyone uses the matrix homeserver
21:24:34*analogsalad quit (Quit: bye)
21:32:52FromDiscord<exelotl> this is what I read about it that completely put me off: https://bsd.network/@jbauer/107553956970001344
21:36:01FromDiscord<Elegantbeef> To be fair you're using discord 😄
21:36:30FromDiscord<slomp (Marcos Slomp)> sent a code paste, see https://play.nim-lang.org/#ix=3WZN
21:37:05FromDiscord<Elegantbeef> `newSeqUnintialized[T]` takes only `SomeNumber`
21:39:12*fallback joined #nim
21:44:27FromDiscord<dom96> In reply to @exelotl "this is what I": hm, those are interesting points, thanks for sharing. Matrix itself definitely feels slow to me any time I try to use it: Element takes multiple tens of seconds to load each time.
21:45:26*Zectbumo quit (Remote host closed the connection)
21:51:36FromDiscord<tandy> maybe rewriting it in rust will help↵(@dom96)
21:52:16FromDiscord<exelotl> xD
21:52:32FromDiscord<tandy> that is actually happening but its for cross platform targetting lol
21:52:33FromDiscord<exelotl> In reply to @Elegantbeef "To be fair you're": I do in principle think everyone should be using open platforms, I don't _like_ the fact that most of my social life and communities are tied to one company
21:53:43FromDiscord<exelotl> that's why I run yard's `ircord` bot for the GBAdev community
21:54:10FromDiscord<exelotl> it only has like 2 users but it still seems worth it to me x)
21:54:41*lumo_e joined #nim
21:55:21FromDiscord<exelotl> In reply to @tandy "that is actually happening": oh that's pretty good, I thought you were just memeing :P
21:55:38FromDiscord<tandy> half \:)
21:57:20*kenran quit (Quit: WeeChat info:version)
22:02:40FromDiscord<slomp (Marcos Slomp)> Is `static: assert expr, msg` the ideal way to report errors at compile time?
22:05:38FromDiscord<dom96> there is also the `{.error: "msg".}` pragma
22:05:41*Gustavo6046 joined #nim
22:06:13FromDiscord<dom96> https://nim-lang.org/docs/manual.html#pragmas-error-pragma
22:06:18FromDiscord<dom96> You can also emit warnings and other things
22:10:56FromDiscord<slomp (Marcos Slomp)> Nice; is there a way to reference a `static` or `const` variable in the `"msg"` in the `error` pragma?
22:11:47FromDiscord<Yardanico> In reply to @slomp (Marcos Slomp) "Nice; is there a": just concat it like you'd normally do
22:12:44FromDiscord<slomp (Marcos Slomp)> perfect! thanks again↵(@Yardanico)
22:27:56FromDiscord<vindaar> yes, many of these points are very valid. However, tell me one good & usable alternative (that isn't even worse)?↵(@exelotl)
22:28:17FromDiscord<Elegantbeef> Yea matrix is the best open multimedia protcol
22:31:02FromDiscord<Zoom> @xflywind\: sorry for that poke at you earlier. Looks like I can't git blame. Fixing that strange suggestion for using a string slice just to return an offset index led to a bit more work on `find`\: https://github.com/nim-lang/Nim/pull/19761
22:35:49*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:36:20FromDiscord<dom96> In reply to @vindaar "yes, many of these": Zulip and Mattermost look pretty good
22:36:59FromDiscord<dom96> (And Discord/slack of course if you don’t care about it being proprietary)
22:37:21FromDiscord<Elegantbeef> Those are both developer centric
22:39:52*lumo_e quit (Quit: Quit)
22:42:28FromDiscord<exelotl> they're good for an internal company chat but I don't think they're that good for an open community. I think people can tolerate signing up for forums since those are for slower, long-form discussions, but I'd guess people don't want to sign up to a separate slack clone any time they want to ask a quick question
22:44:21FromDiscord<exelotl> (and the Mattermost and Zulip apps are still controlled by single companies, though I guess in theory people could make alternative clients more easily for them)
22:44:36FromDiscord<Elegantbeef> Think you can self host both, but yea
22:44:49FromDiscord<vindaar> neither aren't really a matrix alternative. I haven't used zulip, not too familiar with it. But from my understanding they are \~slack alternatives
22:45:02FromDiscord<Elegantbeef> Yea they're corporate text chats it seems
22:45:33FromDiscord<Elegantbeef> Which is equally like saying teamspeak is good for conferencing 😄
22:46:34FromDiscord<exelotl> XMPP seems pretty underrated, I was able to set up a personal server by following this tutorial and it works well enough... I just don't have anyone to talk to https://landchad.net/xmpp 😅
22:48:44FromDiscord<exelotl> I've yet to try any web clients for it though.. There needs to be a "so easy your grandma could use it" client that people can use to join a community at the click of a button
22:48:47FromDiscord<Zoom> XMPP is very solid but we all missed a critial time window when it could have been presented as an alternative to new shiny things like slack/gitter/discord, and not just a better MSN/IRC
22:51:15FromDiscord<Zoom> I loved my Miranda on my old windows desktop when it could simultaneously work with GTalk, XMPP, ICQ, Facebook, VK and everything else. It's ridiculous how slow everything modern feels nowadays (except maybe CLI software) in comparison.
22:51:48FromDiscord<Elegantbeef> This is why open protocols matter you can make things faster 😛
22:51:50FromDiscord<Elegantbeef> Shit this just offload works to the users
22:51:56FromDiscord<Elegantbeef> Fuuuuuck!
23:00:08FromDiscord<spoon> everything built on electron
23:29:50FromDiscord<Zoom> Don't really know how to read the CI logs for the compiler. Anyone could take a look and tell me where it fails? https://github.com/nim-lang/Nim/runs/6298112856?check_suite_focus=true Was it trying to build nimpy?
23:33:33FromDiscord<Zoom> Ah, ok. So my change broke nympylib. No biggie. \:D
23:34:49FromDiscord<xflywind> In reply to @Zoom "Don't really know how": You can ref https://github.com/nim-lang/Nim/pull/18173
23:37:33FromDiscord<Zoom> How could I miss it. Anyway, it all should be openarray[char]
23:41:05FromDiscord<Zoom> Another giant stalling overhaul, that 18173... 😢
23:43:03FromDiscord<Elegantbeef> Imagine wanting code reuse
23:49:12FromDiscord<Bubblie> quick question
23:49:19FromDiscord<Bubblie> how good is nimpy for using python modules
23:49:27FromDiscord<Bubblie> I was thinking of possibly using nim for pytorch or something
23:51:01FromDiscord<spoon> hmm, i've looked at the arraymancer library for getting into ML
23:51:10FromDiscord<spoon> how far along is it?
23:53:03FromDiscord<Bubblie> ?
23:57:31FromDiscord<spoon> In reply to @Bubblie "?": its a nim tensor library, i havent used it much outside the examples but they showcase neural networks
23:58:32FromDiscord<Bubblie> very very cool