<< 21-06-2026 >>

00:00:40FromDiscord<demotomohiro> <@&371760044473319454>
00:48:36FromDiscord<primechampion270> discord.gg/prettygirls
00:49:28FromDiscord<topetope0358> discord.gg/prettygirls
00:49:40FromDiscord<demotomohiro> <@&371760044473319454>
01:28:29FromDiscord<m______________________________l> In reply to @heysokam "> But every new": maybe exaggeration
01:58:34FromDiscord<riku5543> They really spammed all the channels huh 😭
02:45:40FromDiscord<DetermiedNim1> In reply to @alipolo17777 "i love languages like": like ruby!
04:02:47*rockcavera quit (Remote host closed the connection)
04:07:40*acidsys quit (Ping timeout: 245 seconds)
04:09:42*acidsys joined #nim
04:21:17*rockcavera joined #nim
04:40:53*om3ga quit (Ping timeout: 252 seconds)
07:01:43*tiorock joined #nim
07:01:43*tiorock quit (Changing host)
07:01:43*tiorock joined #nim
07:01:43*rockcavera quit (Killed (zirconium.libera.chat (Nickname regained by services)))
07:01:43*tiorock is now known as rockcavera
07:08:45FromDiscord<riku5543> sent a long message, see https://pasty.ee/YaJGKEXz
07:16:57*om3ga joined #nim
07:19:59*kick455 joined #nim
07:23:43*oculux quit (Ping timeout: 276 seconds)
07:58:00*beholders_eye joined #nim
08:38:28*rockcavera quit (Ping timeout: 276 seconds)
08:43:39*rockcavera joined #nim
08:43:43FromDiscord<_timurski> In reply to @riku5543 "I watched the social": I'm not familiar with the specifics of what araq said but I'd imagine it's the same thing as knowing how locks work in any language
08:43:56FromDiscord<_timurski> as in being familiar with atomics, memory safety, memory visibility
08:45:24FromDiscord<riku5543> In reply to @_timurski "as in being familiar": Does nim have native atomics? Are there any good resources to learn more about them? (It's okay if you don't wanna answer, I could look it up as well)
08:46:03FromDiscord<_timurski> there is std/atomics and probably more stuff related to locks, and you could always read the source code :>
08:46:46FromDiscord<_timurski> though if you wanna learn about them in general then there's other more General resources online for that, just googling how they work at the hardware level since it's not Nim specific
08:47:01FromDiscord<riku5543> Ah okay, thanks :D
09:05:05FromDiscord<shalokshalom> In reply to @riku5543 "I watched the social": Elixir can do that with GenServer, F# has MailboxProcessor and so on. Can all be global and mutable. 🙂
09:08:46FromDiscord<riku5543> Huh, so how does it access the global memory safely? Does it use atomics internally?
09:35:34FromDiscord<_timurski> In reply to @riku5543 "Huh, so how does": i'm personally not familiar with the implementation details but i think you can get the idea across with how you would do it if you only knew about atomics: have an atomic `bool` that a thread sets when it's using it and releases when it's no longer using it, preventing any concurrent modifications
09:37:00FromDiscord<_timurski> like for example a mutex just means only one thread has access to the variable at any given time (memory safety), + it has guarantees that that thread correctly sees the writes of any previous thread and correctly writes its results before any other thread accesses it (memory visibility)
09:38:40FromDiscord<riku5543> You're awesome, thank you :D Multithreading still scares me so learning about this stuff should make it a lot easier. (And make async programs easier to write too \:P)
09:39:37FromDiscord<_timurski> the low level details can get kind of complex but to be honest you don't need to go down to the hardware instruction level (at least i haven't felt the need for that, and ive done a good bit of work with multithreading for optimization)
09:40:16FromDiscord<_timurski> In reply to @_timurski "as in being familiar": once you understand those few concepts and how constructs like condition variables and locks are based on the same principles you won't have issues with parallelism
09:42:30FromDiscord<_timurski> but also i read what you said earlier, all of this stuff only applies if you're talking about a multi threaded environment
09:42:45FromDiscord<_timurski> you don't need anything like atomics or locks in the same sense if you're only on 1 thread
09:42:50FromDiscord<_timurski> which is what most web dev people talk about
09:42:59FromDiscord<_timurski> async != parallel
09:43:15FromDiscord<_timurski> in that case you still might want synchronization mechanisms but it's nothing to do with atomics
09:43:35FromDiscord<_timurski> i dont do anything in web dev, but there is a distinction that exists so make sure you're researching the right thing for you
09:49:35FromDiscord<riku5543> Ah the only issue is that I get a compile-time memory safety error for using a global variable inside an async proc.↵↵(Actually I just checked and it's only because I'm using a callback for asynchttpserver's acceptRequest. Earlier I was using raw asyncnet and could access globals there, maybe because I simply asyncCheck'd a client loop..)↵I'll have to look into that lol
10:17:33FromDiscord<gesee37> sent a code paste, see https://play.nim-lang.org/#pasty=BqRlVlUp
10:18:48FromDiscord<gesee37> (edit) "https://play.nim-lang.org/#pasty=wCpfpLML" => "https://play.nim-lang.org/#pasty=ABbYuBUb"
10:20:08FromDiscord<gesee37> This way async callback can just take the server as input and pass informations around
11:13:09FromDiscord<c0rey1015> sent a long message, see https://pasty.ee/lmYwSdEs
11:13:30FromDiscord<_timurski> In reply to @gesee37 "> There's a particular": also yeah in general global variables are bad practice
11:13:53FromDiscord<_timurski> In reply to @c0rey1015 "👋 Available for New": have you been hired a single time for anything
11:14:10FromDiscord<_timurski> like ever
11:16:28FromDiscord<0ffh> In reply to @_timurski "like ever": In my experience, those are just spam, I see them on every programming or machine learning related server I visit.
11:16:51FromDiscord<krissh.wtf> might be one of those north korean spies lol
11:22:33FromDiscord<_timurski> In reply to @0ffh "In my experience, those": yes ik
11:22:42FromDiscord<_timurski> I just hope one day I'll get a response
11:22:47FromDiscord<_timurski> maybe it'll be entertaining
11:22:55FromDiscord<gesee37> In reply to @_timurski "also yeah in general": I find them useful only when dealealing with macros
11:23:38FromDiscord<gesee37> In reply to @c0rey1015 "👋 Available for New": Hope it works my bro. ↵If you ever get someone I can be your assistant 😭
11:23:54FromDiscord<gesee37> (edit) "dealealing" => "dealing"
11:53:30FromDiscord<lainlaylie> In reply to @c0rey1015 "👋 Available for New": <@&371760044473319454> spam
15:19:14*beholders_eye quit (Ping timeout: 248 seconds)
16:21:33*beholders_eye joined #nim