<< 06-11-2023 >>

00:32:25*Ekho quit (Quit: CORE ERROR, SYSTEM HALTED.)
00:39:35*Ekho joined #nim
01:04:20*Mister_Magister quit (Quit: bye)
01:06:16*Mister_Magister joined #nim
01:13:31NimEventerNew Nimble package! threadlogging - A thread safe logging library using Nim's own logging module, see https://pswilde.codeberg.page/threadlogging_docs/threadlogging.html
02:10:15FromDiscord<taperfade> when do i use isMainModule
02:10:57FromDiscord<JJ> when you want to check if you are in the main module
02:11:13FromDiscord<JJ> it's a compile-time known predicate that is useful with `when` statements (also compile time)
02:23:59*CO2 joined #nim
02:25:01FromDiscord<taperfade> what does spawn do
02:31:29FromDiscord<Elegantbeef> > Spawn is a superhero appearing in a monthly comic book of the same name published by American company Image Comics, as well as in a number of films, television series, and video game adaptations set in the Image Universe.
02:32:32FromDiscord<Elegantbeef> Yes it's a dick move to post an unrelated response, but the manual entry exists for spawn
02:32:46FromDiscord<taperfade> ok
02:32:48FromDiscord<taperfade> well
02:32:53FromDiscord<taperfade> now i have a good question
02:33:01FromDiscord<taperfade> how do i make something repeat
02:33:10FromDiscord<taperfade> while also executing other code yk
02:33:12FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#spawn_1↵https://nim-lang.org/docs/threadpool.html#spawn%2Csinktyped↵To be a glorified search engine
02:33:12FromDiscord<Elegantbeef> Repeat in what way?
02:33:27FromDiscord<taperfade> a loop that runs
02:33:33FromDiscord<taperfade> always
02:33:40FromDiscord<taperfade> in the background
02:33:43FromDiscord<taperfade> checking for somethhing
02:33:47FromDiscord<Elegantbeef> `createThread`
02:33:51FromDiscord<taperfade> thx
02:52:55FromDiscord<taperfade> i dont get how createThread works
02:53:01FromDiscord<taperfade> the docs dumb
02:54:38FromDiscord<ElegantBeef> https://nim-lang.org/docs/typedthreads.html#examples
02:57:40FromDiscord<taperfade> createThreads
02:57:40FromDiscord<taperfade> how
02:59:26FromDiscord<Elegantbeef> Look at the example
02:59:57FromDiscord<taperfade> i dont get it
03:00:01FromDiscord<taperfade> the example is dumb
03:00:27FromDiscord<Elegantbeef> You cannot just call everything you do not understand dumb
03:01:57FromDiscord<taperfade> why cant they make examples with hello world
03:02:14FromDiscord<taperfade> i dont want to learn aremaic to understand how that works
03:02:15FromDiscord<Elegantbeef> That is a hello world example
03:02:22FromDiscord<taperfade> its not
03:02:38FromDiscord<Elegantbeef> It quite literally is, you want to do multi threading
03:02:43FromDiscord<Elegantbeef> That's how you do multi threading
03:03:02FromDiscord<Elegantbeef> Maybe if instead of saying X is dumb you actually write a question about where you confusion is you will get help
03:03:29FromDiscord<Elegantbeef> Otherwise I can only assume you want to be spoonfed a solution to your problem and have no willingness to learn
03:03:38FromDiscord<taperfade> okey
03:03:44FromDiscord<taperfade> what the flip does the code do
03:03:58FromDiscord<Elegantbeef> Did you run it?
03:04:25FromDiscord<taperfade> yes
03:04:33FromDiscord<taperfade> i dont get the code
03:04:54FromDiscord<taperfade> theres thr
03:05:01FromDiscord<Elegantbeef> It usues 5 threads to iterate over a range of numbers printing them
03:05:04FromDiscord<Elegantbeef> uses\
03:05:05FromDiscord<taperfade> and its a array and a thread and a tuple =??
03:05:10FromDiscord<taperfade> and l is a lock
03:05:11FromDiscord<taperfade> what
03:05:17FromDiscord<taperfade> yeah
03:05:22FromDiscord<taperfade> i dont get it
03:05:42FromDiscord<taperfade> currently praying for the downfall of whoever wrote that
03:06:33FromDiscord<taperfade> doesnt understand = wants to stab person who made it with a machete
03:06:40FromDiscord<taperfade> :3
03:07:26FromDiscord<Elegantbeef> Nim threads are typed for their procedures parameter using a tuple
03:07:38FromDiscord<Elegantbeef> So that thread needs a `proc(tup: tuple[a, b: int]]`
03:08:29FromDiscord<taperfade> yeah
03:08:33FromDiscord<taperfade> ill learn haskell
03:08:57FromDiscord<taperfade> why cant it be
03:09:22FromDiscord<taperfade> makeThread( thing you want to execute )
03:09:38FromDiscord<Elegantbeef> Have fun
03:09:58FromDiscord<taperfade> death threats
03:10:03FromDiscord<taperfade> directed towards you
03:12:03FromDiscord<odexine> 🆗
03:12:33FromDiscord<taperfade>
03:13:09FromDiscord<taperfade> thanx nim community for the help
03:13:21FromDiscord<taperfade> appreciate it
03:15:22FromDiscord<Elegantbeef> We gave you help but you just made a bunch of killing jokes
03:16:26FromDiscord<taperfade> In reply to @taperfade "appreciate it": https://www.youtube.com/shorts/CnixWuGiZu4
03:16:50FromDiscord<taperfade> guys i asked chatgpt
03:17:09FromDiscord<that_dude.> In reply to @taperfade "makeThread( thing you want": It litteraly is that, you just can seem to see it
03:17:24FromDiscord<taperfade> yeah
03:17:39FromDiscord<taperfade> make something that literally echoes hello world
03:18:23FromDiscord<taperfade> holy shit i love chatgpt
03:18:35FromDiscord<taperfade> sent a code paste, see https://play.nim-lang.org/#ix=4KNM
03:18:38FromDiscord<taperfade> now i understand
03:18:47FromDiscord<taperfade> they should make the docs be written by it
03:18:47FromDiscord<taperfade> frfr
03:19:01FromDiscord<that_dude.> Async isnt threading
03:19:13FromDiscord<leorize> I can see that chatgpt is completely useless with nim \:p
03:19:19FromDiscord<taperfade> pff whatever you mean
03:19:19FromDiscord<taperfade> chatgpt did it
03:19:32FromDiscord<Elegantbeef> It is completely wrong
03:19:41FromDiscord<leorize> write nim to keep your jobs folks
03:19:56FromDiscord<taperfade> In reply to @Elegantbeef "It is completely wrong": okey
03:19:58FromDiscord<taperfade> fix i
03:20:01FromDiscord<taperfade> (edit) "i" => "it"
03:20:23FromDiscord<leorize> chatgpt can fix it too 😉
03:20:32FromDiscord<taperfade> ill try
03:22:05FromDiscord<taperfade> yeah
03:22:20FromDiscord<taperfade> i think chatgpt is poopie-headed
03:22:28FromDiscord<taperfade> it doesnt make sense and even i can see it
03:22:37FromDiscord<taperfade> crying sobbing
03:23:33FromDiscord<that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4KNP
03:24:06FromDiscord<michaelb.eth> threadVar might not be the best name, because the `{.threadvar.}` pragma is a thing, could get confusing
03:24:18FromDiscord<that_dude.> True
03:24:39FromDiscord<that_dude.> (edit) "https://play.nim-lang.org/#ix=4KNP" => "https://play.nim-lang.org/#ix=4KNQ"
03:26:33FromDiscord<that_dude.> @taperfade The docs are quite easy to understand, I don't think you understand strict typing yet. Everything you need to know to make your own versions is listed/can be seen from the example
03:27:20FromDiscord<taperfade> whatever
04:14:27FromDiscord<charlie_charlie> Hello guys, it seems that the below socket options are not available in std/net. Is there an alternative method to implement a multicast UDP server?
04:14:31FromDiscord<charlie_charlie> sent a long message, see http://ix.io/4KNZ
05:06:29FromDiscord<Elegantbeef> @Phil this is awful and does not work with 100% of types but you did make me implement the logic for extracting variant variable names https://play.nim-lang.org/#ix=4KO6
05:08:40FromDiscord<Elegantbeef> To make it work on all types you need to pass in a hashset of names to skip mutating
05:08:41FromDiscord<Elegantbeef> Too much madness already
05:23:21*derpydoo joined #nim
06:28:16FromDiscord<nnsee> In reply to @charlie_charlie "IP_MULTICAST_LOOP IP_MULTICAST_TTL IP_MULTICAST_IF ": in reality these are just enums with corresponding values
06:28:47FromDiscord<nnsee> if you use nativesockets and pass cints directly, then it's entirely possible
06:32:55FromDiscord<nnsee> if push comes to shove, you can also construct raw packets manually like I'm doing here with ICMPv6 packets https://play.nim-lang.org/#ix=4KOl
06:33:02FromDiscord<nnsee> not very pretty, but it works
06:35:00FromDiscord<nnsee> but you shouldn't have to do that
07:31:48*PMunch joined #nim
07:52:22FromDiscord<Chronos [She/Her]> Wish I had something to host a runner on for CI
07:52:44FromDiscord<odexine> Why?
07:53:20FromDiscord<Chronos [She/Her]> I wanna move my repos to a Forgejo instance, but the pain point of that is I lose GitHub Actions which is so useful
07:53:33FromDiscord<Chronos [She/Her]> I'm switching to a public Forgejo instance specifically
07:54:24FromDiscord<nnsee> In reply to @chronos.vitaqua "I wanna move my": i run my own gitea instance and i have gitea actions
07:54:37FromDiscord<nnsee> i'm assuming forgejo would have the same as it tracks gitea's codebase
07:54:58FromDiscord<nnsee> ie https://git.dog/xx/fastcube/actions/runs/6/jobs/0
07:55:09FromDiscord<Chronos [She/Her]> Yep, the instance I'm using doesn't have that iirc
07:55:22FromDiscord<nnsee> ah well
07:55:46FromDiscord<nnsee> i've always been a fan of self hosting anyways 😅
07:56:06FromDiscord<Chronos [She/Her]> I can't self-host at the moment aha
07:56:17FromDiscord<Chronos [She/Her]> No source of income so I don't have money to spend on stuff like this
07:56:44FromDiscord<nnsee> well my gitea instance is costing me exactly 0 dollars
07:56:45FromDiscord<nnsee> well
07:56:47FromDiscord<nnsee> apart from the domain name
07:57:15FromDiscord<nnsee> but if you have no CC you probably can't make use of the oracle cloud free tier either iirc
07:58:33FromDiscord<Chronos [She/Her]> I have a bank card, Oracle just refuses to take it sadly
07:58:38FromDiscord<Elegantbeef> IIRC someone told me that oracle does not require a credit card for their free VPS', do not recall
07:58:43FromDiscord<Chronos [She/Her]> I use Monzo which people use for virtual cards too
07:58:45FromDiscord<Elegantbeef> Ah guess I'm wrong
07:58:54FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "IIRC someone told me": Credit or debit card, must be one
07:59:24FromDiscord<pmunch> @taperfade, please be more respectful of the channel members. Death threats, wishing people harm, etc. is not tolerated. And neither is just not even attempting to take to heart the responses you get.
07:59:57FromDiscord<Elegantbeef> "I only wanted them to die... in minecraft"
08:00:21FromDiscord<nnsee> @Chronos [She/Her] if you really want runners, I can make you an account on my instance
08:00:29FromDiscord<nnsee> and let you use mine
08:04:21FromDiscord<Chronos [She/Her]> It's alright, I can just keep using GitHub Actions really
08:04:35FromDiscord<Chronos [She/Her]> Since I plan to keep the repos on GitHub anyway as a mirror
08:04:49FromDiscord<Elegantbeef> Could always mirror your repos to github/lab to get actions
08:06:06FromDiscord<Chronos [She/Her]> Yep that's what I'm gonna do aha
08:07:28FromDiscord<Elegantbeef> I'm now looking at VPSes and hmmmmm
08:11:08FromDiscord<nnsee> one thing that bothers me about aarch64 gitea, with runners specifically, is that the actions ecosystem is entirely fucked and actions flat out don't work since it uses the wrong arch
08:11:36FromDiscord<Chronos [She/Her]> Oh that's really irritating
08:11:53FromDiscord<nnsee> i have two runners - x86 and arm
08:12:04FromDiscord<Chronos [She/Her]> No way to force actions to use aarch64 images?
08:12:05FromDiscord<nnsee> most times, i have to manually specify the CI job to run on x86
08:12:16FromDiscord<Chronos [She/Her]> Alternatively: Could use box86 and box64? :p
08:12:55FromDiscord<nnsee> well, i haven't looked too much into that, but even the simplest "check out the repository" action fails with `OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown`
08:13:40FromDiscord<Chronos [She/Her]> So it's trying to grab the x86 version of node then? That's hella annoying
08:14:28NimEventerNew thread by bsljth: Slack API in Nim, see https://forum.nim-lang.org/t/10609
08:14:35FromDiscord<nnsee> i think it's just because they haven't published arm images for the checkout action (which uses `node` - thus the error message) so it implicitly defaults to x86
08:14:58FromDiscord<Chronos [She/Her]> Aah
08:15:22FromDiscord<nnsee> at least
08:15:27FromDiscord<Chronos [She/Her]> One solution could be to host it yourself maybe?
08:15:28FromDiscord<nnsee> that's what I _think_ is happening
08:15:34FromDiscord<nnsee> the error message isn't too descriptive
08:15:35FromDiscord<nnsee> i guess
08:16:02FromDiscord<nnsee> it just hasn't been worth the hassle tbh, the actions run fine on my amd64 runner so 🤷
08:16:13FromDiscord<Chronos [She/Her]> Fair enough
08:40:54*gooba_ joined #nim
08:43:07*gooba quit (Ping timeout: 264 seconds)
09:02:32*kenran joined #nim
09:25:05*derpydoo quit (Read error: Connection reset by peer)
09:46:32FromDiscord<righthandofdoom> does anyone have any interop examples with cpp
10:03:30arkanoidat the moment, futhark is capable of auto-generating low-level C bindings automatically, tons of procs and types made easy and this is gold. To make proper idiomatic nim binding on top of this, I'd need to make procs calling auto-generated procs, making it a double call instead of one. My question is what is the best way to tackle this? Maybe {.inline.}, maybe template, maybe the compiler already does
10:03:32arkanoidwhat is needed and I should not care
10:11:56*CO2 quit (Quit: WeeChat 4.1.1)
10:19:21FromDiscord<Elegantbeef> I say use procs annotated `inline`
10:19:45FromDiscord<Elegantbeef> Though I generally do not worry about the overhead the body is generally more complicated than just a single call in my case
10:21:59arkanoidElegantbeef, in my case, the wrapper proc is just calling the wrapped but sink/lent is added to the wrapper params/return
10:22:21FromDiscord<Elegantbeef> Right then use `inline` procs to properly respect semantics
10:23:12FromDiscord<Elegantbeef> A `lent T` does not make any sense on a template since it is a syntax substitute
10:34:35arkanoidthanks, I also prefer procs
10:34:56arkanoidI wonder if I could use funcs
10:54:06FromDiscord<demotomohiro> In reply to @righthandofdoom "does anyone have any": https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
11:43:58*kenran quit (Remote host closed the connection)
12:20:09*CO2 joined #nim
13:08:17FromDiscord<righthandofdoom> sent a code paste, see https://play.nim-lang.org/#ix=4KPR
13:08:20FromDiscord<righthandofdoom> @demotomohiro
13:12:29*edr joined #nim
13:13:40FromDiscord<righthandofdoom> thanks
13:17:11*derpydoo joined #nim
14:25:40*CO2 quit (Quit: WeeChat 4.1.1)
14:33:17FromDiscord<.aingel.> In reply to @righthandofdoom "<@288750616510201856>": A good approach if you haven't considered it is write a C API for the cpp methods you want to use, if that's practical. It makes things a lot easier
14:34:29PMunchI should really get Futhark to parse C++
14:35:38PMuncharkanoid, whether or not you should use func depends on whether it is an actual function or not
14:36:07PMunchAnd yeah inline should work, but in general your C compiler is smart enough to inline things if it would improve the situation
14:37:05PMunchIf it's just as a ways of improving the signature and let the user avoid use addr for example I generally use a template
14:41:12FromDiscord<jmgomez> In reply to @.aingel. "A good approach if": strong disagree, it's much simpler to just wrap the C++ right away
14:42:18*CO2 joined #nim
14:45:07FromDiscord<.aingel.> In reply to @jmgomez "strong disagree, it's much": Oh okay
14:47:29FromDiscord<pcarrier> sent a code paste, see https://play.nim-lang.org/#ix=4KQe
14:47:33FromDiscord<pcarrier> nim can't divide uint64s!?!
15:04:06Amun-Ra/ is for floats
15:04:25Amun-Rause div for integer division
15:05:07*PMunch quit (Quit: Leaving)
15:09:13FromDiscord<demotomohiro> In Nim, cast means changing type without changing bits.↵You need to convert uint to float that change bits.
15:17:06FromDiscord<pcarrier> In reply to @Amun-Ra "use div for integer": I know, I literally said "float division"…
15:17:52Amun-Raah, sorry, I read "uint64s" as "uint64s" not as "floats"
15:17:56*def- quit (Quit: -)
15:18:08*def- joined #nim
15:18:14FromDiscord<pcarrier> yeah, float division is defined on int
15:18:19FromDiscord<pcarrier> why not uint64?
15:18:23FromDiscord<pcarrier> (edit) "int" => "ints"
15:18:34Amun-Rathat's the exception
15:19:17Amun-Raif you want float division for uint64 you have to do it explicitelyu
15:27:33FromDiscord<demotomohiro> In Nim, uint types are not used for storing integer numbers. It is used for storing bit patterns (Hash, crypt, PRNG, etc).↵I think that is why there is no `\` for uint.
15:28:43Amun-Raand there are no range checks for unsigned ints
15:51:37*def- quit (Quit: -)
15:51:49*def- joined #nim
17:15:44arkanoidI have a group of constants that are like Foo0 = 0, Foo1 = 1, Foo2 = 2, Foo3 = 4, Foo5 = 8, Foo6 = 16 .. and I want to make a set out of them, without declaring more names (for example by creating an enum)
17:17:37*rockcavera joined #nim
17:42:30*CO2 quit (Quit: WeeChat 4.1.1)
17:43:09*CO2 joined #nim
17:48:24FromDiscord<odexine> set entries must be the non-exponentiated form (0, 1, 2, 3, 4, 5...) otherwise you pretty much have to keep using C-style or-ing etc
17:50:24arkanoidodexine, thanks. I've been testing this out here https://play.nim-lang.org/#ix=4KRa
17:50:59FromDiscord<odexine> wouldnt work
17:51:27FromDiscord<odexine> sets use the value of the enum as the bit index
17:52:01FromDiscord<odexine> so you'd be setting 2^2^1, 2^2^2, 2^2^3 etc basically double exponentiating
17:52:55arkanoidmakes sense, but I have exponentiated constants from C. Mmmm, I could calc the root square of them at compile time
17:52:56FromDiscord<odexine> In reply to @odexine "sets use the value": this isnt completely true, first value in enum is always bit index 0, then difference between value 1 and 2 is the bit index for the next value etc
17:58:30arkanoidthanks
18:09:46*CO2 quit (Quit: WeeChat 4.1.1)
18:13:43*CO2 joined #nim
18:29:18*neceve joined #nim
18:32:35arkanoidodexine, I think I should correct you: "set entries must be the non-exponentiated form (0, 1, 2, 3, 4, 5...)", actually must be "1, 2, 3, 4, ..." as 0 is would be empty set
18:33:28FromDiscord<odexine> well i mean 2^0 = 1
18:34:12FromDiscord<odexine> empty set means none of the enum values are in the set so its not representable
18:34:15FromDiscord<odexine> (edit) "empty set means none of the enum values are in the set so its not representable ... " added "in the enum"
18:49:35*neceve quit (Ping timeout: 255 seconds)
19:01:02*disso-peach quit (Quit: Leaving)
19:01:20arkanoiddoes string to cstring conversion always copy?
19:06:20FromDiscord<Hourglass [She/Her]> Hey y'all
19:06:20FromDiscord<Hourglass [She/Her]> Discord is shitting itself lol
19:06:24FromDiscord<Hourglass [She/Her]> Hold on#
19:09:13Amun-Raarkanoid: https://play.nim-lang.org/#ix=4KRt
19:09:50Amun-Raarkanoid: seems that way
19:12:34FromDiscord<Chronos [She/Her]>
19:14:04*henrytill_ joined #nim
19:14:09*mronetwo_ joined #nim
19:14:10*oddish_ joined #nim
19:14:32*casaca_ joined #nim
19:14:58*termer joined #nim
19:16:52*lumidify_ joined #nim
19:17:19FromDiscord<Chronos [She/Her]> We're back folks
19:18:21*casaca quit (Ping timeout: 246 seconds)
19:18:22*mronetwo quit (Ping timeout: 246 seconds)
19:18:22*lumidify quit (Ping timeout: 246 seconds)
19:18:22*oddish quit (Ping timeout: 246 seconds)
19:18:23*henrytill quit (Ping timeout: 246 seconds)
19:18:24*termer_ quit (Ping timeout: 246 seconds)
19:18:26*casaca_ is now known as casaca
19:18:27*henrytill_ is now known as henrytill
19:18:45*oddish_ quit (Remote host closed the connection)
19:18:46*casaca quit (Read error: Connection reset by peer)
19:18:46*henrytill quit (Read error: Connection reset by peer)
19:18:46*adigitoleo quit (Read error: Connection reset by peer)
19:18:47*mronetwo_ quit (Read error: Connection reset by peer)
19:18:47*noeontheend quit (Write error: Connection reset by peer)
19:18:59*mronetwo joined #nim
19:19:01*oddish joined #nim
19:19:03*adigitoleo joined #nim
19:19:21*casaca joined #nim
19:20:05*henrytill joined #nim
19:20:23*noeontheend joined #nim
19:20:52*CO2 quit (Quit: WeeChat 4.1.1)
19:53:11*CO2 joined #nim
20:30:58FromDiscord<Phil> So many different new clown people
20:40:49NimEventerNew thread by icedquinn: Concepts as type classes in generics, see https://forum.nim-lang.org/t/10611
20:45:38FromDiscord<bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4KRN
20:53:55FromDiscord<bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4KRO
20:54:30FromDiscord<bostonboston> (edit) "https://play.nim-lang.org/#ix=4KRO" => "https://play.nim-lang.org/#ix=4KRP"
20:54:59FromDiscord<bostonboston> error is pointing to the paren after std::
21:07:00FromDiscord<Chronos [She/Her]> Hm is it sane to host HTML, CSS and ~~Nim~~ JS on a seperate server than the API?
21:08:49Amun-Radepends on the traffic you expect
21:09:08FromDiscord<Chronos [She/Her]> Honestly, probably very low
21:10:07Amun-Rayou can have static files on different vhost for starters
21:10:38FromDiscord<Chronos [She/Her]> Though I'm also wondering how I should handle auth with tokens, they need to expire but I feel like adding a loop to check if a token has been used for longer than X mins or something is kind of less than ideal
21:11:23FromDiscord<Chronos [She/Her]> I could do the calculation everytime the user uses the token but that could probably stack up quite a bit, unless I store something in memory for that hm...
21:14:58Amun-Rayou could store tokens in a database and clean them after X mins of use
21:15:41FromDiscord<adrian> is atlas shipped with nim 2.0.0? I installed it with choosenim but can't find atlas.
21:16:08FromDiscord<odexine> choosenim doesnt expose it because it is outdated
21:17:29FromDiscord<adrian> I heard that atlas was supposed to replace nimble, what happened?
21:17:34FromDiscord<Chronos [She/Her]> In reply to @Amun-Ra "you could store tokens": How would I know if it's been used for more than X mins tho? Ig encode a timestamp in the token
21:18:12FromDiscord<Chronos [She/Her]> And obviously make sure the token was encrypted
21:18:48Amun-RaChronos: timestamp in db
21:29:04arkanoidAmun-Ra: thanks. I'm quite puzzled then. How is that possible?
21:34:17FromDiscord<nnsee> In reply to @chronos.vitaqua "Hm is it sane": yes, and very common in practice
21:34:43FromDiscord<nnsee> is there's a separate `api.domain.name` that the front end talks with
21:35:34FromDiscord<nnsee> reasoning being that the front end machine is simply configured to serve static files (and fast) and nothing more
21:36:14FromDiscord<nnsee> it makes you explicitly handle CORS, though
21:38:00FromDiscord<odexine> In reply to @adrian "I heard that atlas": nothing happened, it is planned for it to replace nimble but not now
21:39:49FromDiscord<Chronos [She/Her]> In reply to @Amun-Ra "Chronos: timestamp in db": Still means I'd have to loop over it oof
21:39:57FromDiscord<Chronos [She/Her]> In reply to @nnsee "is there's a separate": Oh good to know!
21:43:06FromDiscord<Chronos [She/Her]> Maybe I'll assign a ULID for each token
21:47:40FromDiscord<odexine> In reply to @chronos.vitaqua "Still means I'd have": why?
21:48:07FromDiscord<odexine> depends on the database as well, KV stores often "automatically" expire keys
21:48:10FromDiscord<odexine> In reply to @chronos.vitaqua "Maybe I'll assign a": why?
21:48:29FromDiscord<Chronos [She/Her]> In reply to @odexine "why?": So users can expire tokens manually, that's important
21:48:48FromDiscord<Chronos [She/Her]> In reply to @odexine "why?": I realised a bit earlier I don't have to lol
21:49:05FromDiscord<odexine> In reply to @chronos.vitaqua "So users can expire": i dont see the relation
21:49:30FromDiscord<Chronos [She/Her]> In reply to @odexine "i dont see the": It'd be an ID users can revoke
21:49:48*end` joined #nim
21:49:51FromDiscord<Chronos [She/Her]> Though, the timestamp would be enough actually
21:58:03FromDiscord<Chronos [She/Her]> Discord tokens never expire unless you make them expire manually, how stupid of an idea is that? :p
22:05:49FromDiscord<Chronos [She/Her]> Hm wondering if it's better to use Bcrypt hm...
22:06:55FromDiscord<leorize> bcrypt is capped to 72 characters btw
22:07:45FromDiscord<Chronos [She/Her]> Is that a bad thing?
22:09:32FromDiscord<Chronos [She/Her]> Or is that informative info for DB stuff
22:11:05FromDiscord<leorize> depends on you
22:11:14FromDiscord<leorize> but you should use argon2 if you can
22:13:10FromDiscord<Chronos [She/Her]> I'm getting conflicting info :p↵Some people say Argon2 isn't cache resistant or something, sme say it's good for passwords (obviously won at PHC), but others say Bcrypt can provide the same security much faster and with less memory usage
22:14:08FromDiscord<Chronos [She/Her]> Only thing keeping me on the fence is Argon2 obviously using more memory, not a big issue but hm...
22:14:08FromDiscord<leorize> [argon2id is pretty damn good](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html)
22:14:18FromDiscord<leorize> gah, why did that turn it into a link...
22:14:33Amun-Raif you limit login attempts it almost does not matter
22:14:48FromDiscord<leorize> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1171210940331606097): https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html
22:14:57FromDiscord<Chronos [She/Her]> 19 mib of memory? Wow
22:14:57FromDiscord<leorize> owasp is a good source to play with
22:15:52FromDiscord<Chronos [She/Her]> Defo looks useful
22:16:20FromDiscord<leorize> that number is minimum fwiw
22:16:56FromDiscord<Chronos [She/Her]> Yeah I can see aha
22:17:32FromDiscord<Chronos [She/Her]> Assuming higher is better? But idk, what would a recommended amount be that's reasonable for a server that'd probably perform other tasks too?
22:18:26FromDiscord<odexine> higher is better yes
22:18:56FromDiscord<odexine> strike a balance between hashing performance and server utilisation
22:19:52FromDiscord<Chronos [She/Her]> I wouldn't know about either :p doing local dev on my PC so- Would it be better to make it configurable so that it can be changed by the server operator?
22:20:14FromDiscord<Chronos [She/Her]> So they could finetune it or whatever (with the default being what Sodium gives out of the box)
22:21:50FromDiscord<odexine> I believe it is commonly made tunable for the operator
22:21:58FromDiscord<Chronos [She/Her]> Makes sense
22:23:53FromDiscord<leorize> and they write there that all of the recommended configs are equivalent in security
22:23:54FromDiscord<leorize> they literally recommended an amount for you...
22:25:17FromDiscord<Chronos [She/Her]> Yeah but I would've thought giving more memory or parallelism is a good thing, if doable with decent performance?
22:28:19Amun-Raremember limit login attempts not to dos yourself
22:28:39FromDiscord<Chronos [She/Her]> Yeah lol
22:28:56FromDiscord<Chronos [She/Her]> Ratelimits are probably the last thing I'll implement :p
22:29:29Amun-Rathe more expensive algorithm you pick the easier it may happen ;>
22:29:59FromDiscord<Chronos [She/Her]> Aha
22:31:47FromDiscord<leorize> there's a thing called diminishing returns↵(@Chronos [She/Her])
22:32:11FromDiscord<Chronos [She/Her]> Fair
22:32:40FromDiscord<leorize> see RFC 9106 if you want the full meat\: https://datatracker.ietf.org/doc/html/rfc9106#name-parameter-choice
22:34:46FromDiscord<Chronos [She/Her]> > If much less memory is available, a uniformly safe option is Argon2id with t=3 iterations, p=4 lanes, m=2^(16) (64 MiB of RAM), 128-bit salt, and 256-bit tag size. This is the SECOND RECOMMENDED option.↵I think this should be good then
22:37:23*derpydoo quit (Read error: Connection reset by peer)
22:42:28FromDiscord<Chronos [She/Her]> I can't change the paralellism with nim-libsodium- But this is still higher than the recommended minimums by OWASP so... Hm
22:43:29*xet7 quit (Remote host closed the connection)
22:46:37FromDiscord<bostonboston> Recently installed nim on a Windows 11 machine and can successfully compile with the c backend but not cpp, anyone experience this?
22:50:53*derpydoo joined #nim
22:51:33FromDiscord<bostonboston> It's claiming it can't find g++.exe, but it's in my path
22:58:58*end` is now known as end
22:59:13*end is now known as end`
23:06:10*bcksl joined #nim
23:11:00*bcksl quit (Changing host)
23:11:00*bcksl joined #nim
23:14:47*end` is now known as end
23:58:44*bcksl quit (Quit: \)