<< 04-11-2023 >>

00:00:06*marcus quit (*.net *.split)
00:00:07*FromDiscord quit (*.net *.split)
00:00:08*enyc quit (*.net *.split)
00:00:33*NimBot joined #nim
00:01:07*FromDiscord joined #nim
00:02:22*om3ga joined #nim
00:09:30*marcus joined #nim
00:10:22*enyc joined #nim
01:46:15*neceve quit (Ping timeout: 240 seconds)
01:48:19*krux02 quit (Remote host closed the connection)
02:01:25*edr quit (Quit: Leaving)
02:09:05*thomasross quit (Ping timeout: 240 seconds)
03:50:01*pbsds joined #nim
04:07:30FromDiscord<xtrayambak> Hey guys, why does nix-env keep failing?
04:07:37FromDiscord<xtrayambak> Oh shoot
04:07:38FromDiscord<xtrayambak> wait
04:07:42FromDiscord<xtrayambak> oh geez
04:07:54FromDiscord<xtrayambak> I should look at the logo of the server before talking in it
04:07:58FromDiscord<xtrayambak> this is the Nim server
04:08:01FromDiscord<xtrayambak> not the Nix server
04:08:04FromDiscord<xtrayambak> woopsies
04:08:05FromDiscord<xtrayambak> sorry
08:42:19FromDiscord<Phil> In reply to @xtrayambak "not the Nix server": 😄 All good
08:44:21FromDiscord<Phil> ... Can a template actually have a typed body? I never tried
08:45:38FromDiscord<Phil> You can, hmmm I wonder what the limitations are because
08:45:55FromDiscord<Phil> (edit) "You can, hmmm I wonder what the limitations are because ... " added "a template needs to always get completely valid code since it doesn't manipulate it"
08:46:21FromDiscord<Phil> (edit) "it" => "it.↵So basically from what I can tell typed and untyped should both behave kinda similar in that you insert the code and that must be valid to compile"
09:03:46FromDiscord<Phil> sent a long message, see http://ix.io/4KEF
09:16:32FromDiscord<pcarrier> a bit unclear how JSON works. would like to customize serialization of my data type and be able to deserialize into it; are there good docs / guides I've missed?
09:16:49FromDiscord<pcarrier> (edit) "JSON works." => "std/json{,utils} work."
09:16:55FromDiscord<pcarrier> (edit) "std/json{,utils}" => "`std/json{,utils}`"
09:17:31FromDiscord<Phil> Personally I use jsony for the same task as it is faster and doesn't deal with object variants. And I personally find it easier to wrap my head around
09:19:19FromDiscord<pcarrier> jsony it is
09:20:52*neceve joined #nim
09:21:10FromDiscord<nnsee> In reply to @isofruit "Personally I use jsony": I think what disturbed me about jsony is that it does automatic snake_case to camelCase conversion when reading json, but not the other way around. Makes passing json messages back and forth a lot more difficult than it needs to be
09:21:42FromDiscord<Phil> In reply to @nnsee "I think what disturbed": tbf how is jsony supposed to know what output you'd want?↵... well I guess it could have a compiler switch
09:22:04FromDiscord<Phil> Or a proc param
09:22:17FromDiscord<nnsee> I would simply take a define time flag that just disables the automatic conversion
09:22:27FromDiscord<nnsee> (edit) "I would simply take a ... define" added "compile time" | removed "time flag"
09:23:42FromDiscord<Phil> ... Does anyone have a decent guide on how to debug memory leaks that isn't immediately a C-guide?
09:34:58*TheLink joined #nim
09:44:19NimEventerNew thread by domogled: Import js variables with two types, see https://forum.nim-lang.org/t/10602
10:02:49FromDiscord<pcarrier> I don’t get where jsony gets its parseInt / parseFloat from
10:04:45Amun-Rastd/strutils?
10:05:26FromDiscord<Phil> In reply to @pcarrier "I don’t get where": strutils typically has the things to parse stuff from string to other value
10:05:49FromDiscord<Phil> Though you can of course always also just copy paste the proc name into nim's search box
10:06:05FromDiscord<Phil> That'll lead you to where you want to go directly 😄 https://media.discordapp.net/attachments/371759389889003532/1170302939152265216/image.png?ex=65588c8b&is=6546178b&hm=d8d8604c651636f6306a7134dee011e7ebbec434d0f0bbb1cf3676e3177ff662&
10:07:04Amun-Ranim search bar may or may not work (try searching posix's getrlimit)
10:09:10FromDiscord<Phil> I'd regard that as the exception because from what I can tell you can't find anything from posix period
10:09:36Amun-Rayes
10:10:07Amun-RaIIRC that worked before
10:10:56FromDiscord<Phil> Hmm pcre and db_connector also aren't searched properly
10:11:22FromDiscord<Phil> as is std/openssl, seems to be a wrapper thing
11:09:57FromDiscord<pcarrier> can a `ref` be `nil`?
11:23:52*gooba joined #nim
11:30:32Amun-Rayes
11:47:11*om3ga quit (Read error: Connection reset by peer)
11:51:33FromDiscord<Chronos [She/Her]> In reply to @isofruit "Hmm pcre and db_connector": Db_connector was moved out of stdlib, I'd imagine it'd be hard to find in the stdlib :p
11:53:37*om3ga joined #nim
13:36:17*krux02 joined #nim
15:38:49FromDiscord<Malik> Can someone recommend the aur package https://aur.archlinux.org/packages/nim-git ? I really prefer using a package manager but I am on Artix Linux
15:57:08FromDiscord<Chronos [She/Her]> In reply to @Malik "Can someone recommend the": Nim isn't great for package managers, you're better off using Choosenim
15:57:49FromDiscord<Chronos [She/Her]> Nim expects the binary to be in the same folder as the libraries, idk how the AUR package does it but
16:15:18FromDiscord<.aingel.> In reply to @chronos.vitaqua "Nim isn't great for": Have you ever used asdf
16:15:58FromDiscord<.aingel.> I wonder if it would be hard to make an asdf plugin for nim. I've moved to asdf for like all my other lang version managers, like for ruby, crystal, python, node etc
16:19:53FromDiscord<nnsee> In reply to @chronos.vitaqua "Nim expects the binary": is this resolved through symlinks?
16:20:09FromDiscord<nnsee> worst case scenario you need a wrapper script for it
16:22:57FromDiscord<intellij_gamer> In reply to @.aingel. "I wonder if it": Already exists https://github.com/asdf-community/asdf-nim↵Used it on my pi and it works well enough. Only issue was nimble packages disappearing when I change versions
16:24:52FromDiscord<Chronos [She/Her]> In reply to @.aingel. "Have you ever used": I have not
16:24:56FromDiscord<Chronos [She/Her]> In reply to @nnsee "is this resolved through": Not sure
16:29:30FromDiscord<.aingel.> In reply to @intellij_gamer "Already exists https://github.com/asdf-community/as": Ooh awesome, but hmm
16:29:40FromDiscord<.aingel.> That problem seems to be kinda significant no?
16:29:45FromDiscord<.aingel.> Do all the packages disappear?
16:30:49*CO2 quit (Quit: WeeChat 4.1.1)
16:31:03*CO2 joined #nim
16:33:13FromDiscord<Chronos [She/Her]> In reply to @.aingel. "Do all the packages": They're in the folder for the version you installed it with
16:33:21FromDiscord<Chronos [She/Her]> I'd still use choosenim for this reason tbh
16:33:32FromDiscord<.aingel.> Oh that's fine then
16:33:46FromDiscord<.aingel.> In reply to @chronos.vitaqua "I'd still use choosenim": Why? Cause that problem is still there with choosenim, no?
16:34:31FromDiscord<Chronos [She/Her]> Not at all, choosenim has `.nimble` in the home dir which persists for all versions no matter what you switch to
16:52:43FromDiscord<.aingel.> Oh but aren't they diff for nim 2 or nim 1
16:59:30FromDiscord<odexine> But they are different for nimble 0.13 and 0.14 (pkgs vs pkgs2)
16:59:34FromDiscord<odexine> No?
17:05:49*xet7 quit (Remote host closed the connection)
18:00:15FromDiscord<.aingel.> Not sure about that @odexine
18:00:22FromDiscord<.aingel.> I just experienced it when upgrading to nim 2
18:01:14FromDiscord<odexine> Because it came with 0.14 as well
18:04:29FromDiscord<.aingel.> Gotcha
18:23:12FromDiscord<Chronos [She/Her]> Wondering if storing the primary key of an object as a reference to it is suitable or not
18:23:24FromDiscord<Chronos [She/Her]> I think it is, since nothing will be removed from that table
18:28:15FromDiscord<Chronos [She/Her]> Wonder what I'd do for things such as storing attachments hm...
18:48:21*CO2 quit (Ping timeout: 260 seconds)
19:05:36*def- quit (Quit: -)
19:06:26*def- joined #nim
20:09:36*SebastianM joined #nim
20:12:07*SebastianM quit (Client Quit)
20:29:20FromDiscord<Chronos [She/Her]> Wondering how I'll handle rate-limiting too oof
20:51:28FromDiscord<.aingel.> What are you making again@ @Chronos [She/Her]
20:52:46FromDiscord<Chronos [She/Her]> Chat platform aha
20:53:34NimEventerNew thread by TKD: How to pass an optional table as an argument to a function?, see https://forum.nim-lang.org/t/10605
20:57:19FromDiscord<.aingel.> In reply to @chronos.vitaqua "Chat platform aha": What's it doing different
20:57:20FromDiscord<.aingel.> (edit) "different" => "different?"
21:13:20FromDiscord<Chronos [She/Her]> In reply to @.aingel. "What's it doing different?": Well, it's supposed to be a decentralised chat platform that's much closer (and hopefully simpler in some ways) to Discord, and hopefully will be pretty extendable
21:19:04FromDiscord<.aingel.> Ah gotcha
21:19:06FromDiscord<.aingel.> That's cool
21:19:13FromDiscord<.aingel.> Yeah matrix is sort of a total mess
21:19:25FromDiscord<.aingel.> And uses way to much resources apparently or something
21:19:30FromDiscord<Chronos [She/Her]> Seems complicated but probably a reason for it?
21:19:32FromDiscord<.aingel.> I don't get why it's so complicated
21:19:46FromDiscord<Chronos [She/Her]> In reply to @.aingel. "And uses way to": The clients or homeservers?
21:19:49FromDiscord<.aingel.> The server
21:20:22FromDiscord<Chronos [She/Her]> Ah fair
21:22:02FromDiscord<Elegantbeef> Eh dendrite and also Matrix's 2.0 reduces load
21:24:19FromDiscord<Chronos [She/Her]> Doesn't solve the issue of Matrix's protocol apparently being a PITA to implement
21:24:39FromDiscord<Elegantbeef> It's all rest APIs
21:24:47FromDiscord<Elegantbeef> It's just busy work more than a pain
21:24:49FromDiscord<leorize> matrix being federated means that running a homeserver equals to replicating any rooms you join
21:25:19FromDiscord<Chronos [She/Her]> Replicating the rooms?
21:25:55FromDiscord<leorize> so there are some physical resource constraints
21:25:55FromDiscord<leorize> yes, matrix rooms are on every server that participates in them
21:26:23FromDiscord<Elegantbeef> It's par for the course though
21:26:51FromDiscord<leorize> if you're looking to build a system, start centralized first
21:27:32FromDiscord<leorize> building a decentralized system is /really/ hard, esp if you want people in different servers to talk to one another
21:28:01FromDiscord<.aingel.> True
21:28:03FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "It's par for the": How so? Why not just use home servers for authentication rather than cloning a room essentially, what situations would the server need to communicate excluding user auth?
21:28:31FromDiscord<.aingel.> Room history
21:28:32FromDiscord<Chronos [She/Her]> In reply to @leorize "if you're looking to": Yeah that's what I'm doing, it'll be tacked on after I get the local stuff working first aha
21:28:45FromDiscord<Elegantbeef> What other reason would you have decentralization 😄
21:29:12FromDiscord<Elegantbeef> I mean you connect to your home server and only talk to your home server
21:30:14FromDiscord<Elegantbeef> Not mirroring rooms results in reliance on a homeserver
21:30:56FromDiscord<Elegantbeef> Afaik if a homeserver you've talked to goes down you still have a mirror of the chat and media your server has copied
21:31:07FromDiscord<Chronos [She/Her]> Ah fair
21:31:49FromDiscord<Chronos [She/Her]> I was planning on using the server the user's account runs on, as a way of authenticating them to talk in another place
21:32:08FromDiscord<Elegantbeef> It's sorta akin to if you relied on the first email server in a email chain to see the entire email chain
21:32:45FromDiscord<leorize> then the identity manager would be the server hosting the room with your model↵(@Chronos [She/Her])
21:36:54FromDiscord<Chronos [She/Her]> In reply to @leorize "then the identity manager": I don't get what you mean exactly? Why would this force the server hosting the user to use rooms on the same server? Unless I'm misunderstanding as usual aha
21:41:06FromDiscord<leorize> it's a problem of identity
21:41:30FromDiscord<leorize> the server hosting the room can advertise any identity for a message
21:41:42FromDiscord<Elegantbeef> Yea this seems like an ill designed system, if verification is done remotely there is no verification
21:42:06FromDiscord<Elegantbeef> It's practically oauth, but you can spool up any server to give a token
21:44:57*Jjp137 quit (Quit: Leaving)
21:45:59FromDiscord<Elegantbeef> Though perhaps I'm an idiot 😄
21:46:06FromDiscord<leorize> and fwiw a system that uses one protocol but multiple independent server already exists
21:46:15FromDiscord<leorize> we call it IRC
21:46:32FromDiscord<Elegantbeef> And freenode shows the issue with that entire system 😛
21:48:55FromDiscord<huantian> but they had free in their name
21:49:28*Jjp137 joined #nim
21:50:31FromDiscord<Chronos [She/Her]> In reply to @leorize "the server hosting the": Ah makes sense
21:51:08FromDiscord<Chronos [She/Her]> So then, doing what Matrix does (cloning the room locally) just makes more sense then?
21:51:29FromDiscord<Elegantbeef> Not free from the constitutional monarchy!↵(@huantian)
21:51:40FromDiscord<Elegantbeef> Well there are multiple benefits for cloning
21:51:49FromDiscord<leorize> we don't know↵(@Chronos [She/Her])
21:51:54FromDiscord<Elegantbeef> It reduces load on home servers that have many users
21:52:02FromDiscord<leorize> there are many ways to do this
21:52:03FromDiscord<Elegantbeef> It also can reduce latency
21:52:27FromDiscord<Chronos [She/Her]> In reply to @leorize "there are many ways": I can only see two aha-
21:52:58FromDiscord<leorize> I think ietf is brewing a messaging spec too, if you're interested
21:53:25FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "It also can reduce": Since it'd be saved on the server, reducing the amount of servers a client/the server has to make a request to?
21:53:55FromDiscord<Chronos [She/Her]> In reply to @leorize "I think ietf is": Quick google search seems to say it's for E2E
21:55:13FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "Since it'd be saved": What if instead of cloning the room in it's entirety, I just store 4 things? The message content, it's ID, the user sending it, and the ID of the message it's replying to?
21:55:50FromDiscord<Chronos [She/Her]> Though I'd imagine this gives much more importance on server to server communication which makes sense
21:56:21FromDiscord<leorize> https://datatracker.ietf.org/wg/mimi/about/
21:56:21FromDiscord<Elegantbeef> Well say you have a homeserver hosting a room in the UK and I connect to it from a Canadian homeserver, I leave for a bit then comeback, since you were sending messages to the homeserver I just request it from my homeserver and get everything at lower latency
21:56:21FromDiscord<Elegantbeef> It's the same premise as a video platform duplicating files across the globe to reduce latency and internet load
21:56:23FromDiscord<leorize> though replication means you'd have to handle conflict resolution
21:56:56FromDiscord<Elegantbeef> Well I don't see why you'd want decentralised that didnt do that
21:57:02FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Well say you have": Makes sense
21:57:20FromDiscord<Elegantbeef> Decentralised and federated go hand and hand imo
21:57:32FromDiscord<Elegantbeef> hand in hand even
21:57:54FromDiscord<huantian> what about hand with hand
21:58:01FromDiscord<Elegantbeef> Nah
21:58:04FromDiscord<Elegantbeef> That's just weird
21:58:17FromDiscord<Chronos [She/Her]> In reply to @leorize "https://datatracker.ietf.org/wg/mimi/about/": Thanks!
21:58:20FromDiscord<huantian> hand between hand
21:59:24FromDiscord<leorize> those who don't know history will ends up repeating it, so make sure you study current designs if you want to root out flaws and make something better
22:00:51FromDiscord<Elegantbeef> They especially end up repeating if they do not have conflict resolution
22:00:56FromDiscord<Elegantbeef> They especially end up repeating if they do not have conflict resolution
22:03:30FromDiscord<Chronos [She/Her]> To be fair, that is why I'm talking about stuff as it comes to mind XD
22:03:45FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "They especially end up": I see what you did there lol, not sure how I'd do that tho
22:04:28FromDiscord<leorize> matrix, xmpp and mimi specs are all there for you to read \:p
22:04:52FromDiscord<leorize> although with mimi you're better off reading their chats instead
22:05:25FromDiscord<Chronos [She/Her]> I'm starting with XMPP just to get a grip on it
22:08:37FromDiscord<Elegantbeef> I really hope you seen what I did chronos, that's like the lowest hanging joke
22:09:32FromDiscord<Chronos [She/Her]> Yes yes I did xD
22:14:39*neceve quit (Ping timeout: 240 seconds)
22:22:20*CO2 joined #nim
23:45:45FromDiscord<JJ> beef 🤝 low hanging jokes
23:45:47FromDiscord<JJ> (sorry)
23:46:52FromDiscord<JJ> i do wish xmpp didn't die. fond memories of talking with friends early on it. plus there's all the stuff that's been built on top of it, recently i learned you can get a phone number connected to it for like $5 a month
23:47:28FromDiscord<Elegantbeef> Who are you apologising to, the truth is the truth
23:48:04FromDiscord<JJ> & i've yet to find a matrix client that won't hang for 60 seconds + upon opening it (i think a lot of it is due to it loading weeks and weeks of messages at a time)
23:49:02FromDiscord<JJ> we need a new messaging standard that is like all of the others but better (half-serious)
23:49:47FromDiscord<JJ> oh yeah i was wondering actually. what's the benefit of typed macros? i've seen some say they're strictly better than untyped macros once you get used to them.
23:50:47FromDiscord<JJ> "some" being just araq i believe lol