<< 28-09-2023 >>

00:00:03*Onionhammer quit (*.net *.split)
00:00:05*noeontheend quit (*.net *.split)
00:00:05*casaca quit (*.net *.split)
00:00:08*rockcavera quit (*.net *.split)
00:00:09*qwestion quit (*.net *.split)
00:00:09*oisota quit (*.net *.split)
00:00:09*FromDiscord quit (*.net *.split)
00:00:09*om3ga quit (*.net *.split)
00:00:22*Onionhammer joined #nim
00:00:27*rockcavera joined #nim
00:00:29*beholders_eye quit (*.net *.split)
00:00:30*cornfeedhobo quit (*.net *.split)
00:00:30*adium quit (*.net *.split)
00:00:30*tinystoat quit (*.net *.split)
00:00:30*ormiret quit (*.net *.split)
00:00:30*tanami quit (*.net *.split)
00:00:30*via quit (*.net *.split)
00:00:46*noeontheend joined #nim
00:00:49*om3ga joined #nim
00:00:59*casaca joined #nim
00:01:28*beholders_eye joined #nim
00:01:34*ormiret joined #nim
00:01:58*FromDiscord joined #nim
00:02:22*rockcavera quit (Changing host)
00:02:22*rockcavera joined #nim
00:05:35*via joined #nim
00:05:37*tanami joined #nim
00:07:15FromDiscord<dromedariodechapeu> Is in this chanell where I ask about any errors?
00:07:21FromDiscord<dromedariodechapeu> (edit) "chanell" => "channel"
00:08:47*adium joined #nim
00:09:13FromDiscord<Elegantbeef> No it's where you ask about asking about errors
00:09:19*cornfeedhobo joined #nim
00:09:38*tinystoat joined #nim
00:09:39FromDiscord<Elegantbeef> Joke aside, yes you can ask here or on the forum
00:10:35FromDiscord<dromedariodechapeu> I'm trying to write `[]` to a LinkedList, but when i use i get this error: https://pastebin.com/KgvDaTsx
00:10:50FromDiscord<dromedariodechapeu> this is part of the code: https://pastebin.com/EpSAmaP2
00:11:28FromDiscord<dromedariodechapeu> (edit) "this" => "here"
00:11:41FromDiscord<Elegantbeef> `var int` is wrong firstly
00:11:51FromDiscord<Elegantbeef> well atleast for `lista[0]`
00:11:53FromDiscord<Elegantbeef> `a` is immutable
00:11:59FromDiscord<Elegantbeef> I mean `0` is 😄
00:12:41FromDiscord<dromedariodechapeu> that was quick, thank you
00:13:10FromDiscord<Elegantbeef> Also why does your linked list have a `[]` that takes an int
00:13:54FromDiscord<dromedariodechapeu> It's just an exercise
00:14:00FromDiscord<Elegantbeef> Indexing linked lists is a fairly silly thing, if you care about indices you use a normal list 99% of the time
00:14:00FromDiscord<Elegantbeef> Ah ok
00:14:55FromDiscord<dromedariodechapeu> I need to use as a introduction for newbies in Nim
00:15:12FromDiscord<dromedariodechapeu> not saying I'm not a beginner
00:16:05FromDiscord<Elegantbeef> I assume 100% of code shared is actually being used in a project 😄
00:17:29*lucasta joined #nim
00:18:53FromDiscord<odexine> In reply to @nixfreak "I switched to nyoom": The repo just got archived
00:20:02FromDiscord<dromedariodechapeu> In reply to @Elegantbeef "I assume 100% of": could i use sink over var?
00:20:15FromDiscord<Elegantbeef> No you want to mutate the integer
00:21:49FromDiscord<dromedariodechapeu> I don't know exactly what sink does, but when i use sink works, and index becomes mutable
00:23:10FromDiscord<Elegantbeef> If you do not want the int to be mutated outside of scope just do `var index = index`
00:23:59FromDiscord<Elegantbeef> and make the parameter `index: int`
00:25:05FromDiscord<_gumbercules> In reply to @dromedariodechapeu "I don't know exactly": tmk `sink` means the value won't be read again after it is passed to the procedure
00:25:40FromDiscord<Elegantbeef> It gives up ownership of heap allocated values really
00:25:43FromDiscord<_gumbercules> which means the compiler can perform certain optimizations when that procedure is invoked
00:25:45FromDiscord<nixfreak> In reply to @raynei486 "we lost an emacs": Yeah I was an eMacs user for years but still of compiling and dependencies, took forever
00:25:51FromDiscord<Elegantbeef> Doesnt mean much sense when it's an `int`
00:26:07FromDiscord<_gumbercules> well, it still makes sense it's just not very practical
00:26:31FromDiscord<_gumbercules> by that I mean the compiler's behavior - maybe not that of the programmer
00:29:45FromDiscord<Elegantbeef> Yea `sink` does work to get C style semantics for passing value types, but just alias with a mutable copy
00:29:48FromDiscord<dromedariodechapeu> In reply to @_gumbercules "tmk `sink` means the": ok ok, thanks
00:30:14FromDiscord<dromedariodechapeu> In reply to @Elegantbeef "Yea `sink` does work": Are you a bot, or a person using a bot? I'm really confuse
00:30:27FromDiscord<_gumbercules> Anyone from IRC / Matrix gets that tag
00:30:32FromDiscord<_gumbercules> because a bot is bridging their messages to discord
00:30:37FromDiscord<Elegantbeef> Sink is very much meant for "Give up resources owned here", but due to Nim's copy when a sink cannot be made it gives you C style semantics
00:30:46FromDiscord<Elegantbeef> Well technically a webhook is bridging but same difference 😄
00:31:11FromDiscord<_gumbercules> pretty much
00:31:38FromDiscord<Elegantbeef> You really shouldn't rely on the C style semantics and should just do a simple alias
00:31:41FromDiscord<_gumbercules> discord doesn't discriminate
00:31:50FromDiscord<Elegantbeef> Other languages also require this alias for mutable
00:31:51FromDiscord<_gumbercules> a bot is a bot is a bot apparently
00:31:52termerDiscord still has discriminators
00:31:57FromDiscord<Elegantbeef> I know of atleast odin in that regard
00:31:58FromDiscord<dromedariodechapeu> In reply to @_gumbercules "Anyone from IRC /": I was scared of a Bot being so human, thanks for clarifying
00:32:10FromDiscord<_gumbercules> I mean, beef could still be a robot
00:32:12FromDiscord<Elegantbeef> Chatgpt is amazing gumber isnt even a human
00:32:31FromDiscord<_gumbercules> shhh don't give away my secret
00:32:35termerI've let ChatGPT loose on IRC before
00:32:46FromDiscord<_gumbercules> don't read all my conspiracy theory posts in #off-topic either
00:32:47termerIt's funny as fuck
00:32:52FromDiscord<Elegantbeef> Termer is a terrorist
00:32:57FromDiscord<_gumbercules> I knew it
00:33:38FromDiscord<odexine> He even has a robot avatar!
00:33:53FromDiscord<_gumbercules> if I've learned anything - it's that the people using the word terrorist to describe someone else - are usually the terrorists
00:34:15FromDiscord<Elegantbeef> That implies I'm a terrorist and by using your own thought, you're also a terrorist
00:34:15FromDiscord<_gumbercules> might have a terrorbot on our hands here folks
00:34:21FromDiscord<_gumbercules> no no no
00:34:28FromDiscord<_gumbercules> cycles are not supported here
00:34:33FromDiscord<odexine> In reply to @Elegantbeef "That implies I'm a": Thought crime
00:34:36FromDiscord<_gumbercules> it's like Nim's gc
00:34:52FromDiscord<Elegantbeef> An Orc is going to chop up and sweep them away?
00:35:09FromDiscord<odexine> Who’s Mark?
00:35:31FromDiscord<Elegantbeef> Oh hi?
00:35:33FromDiscord<_gumbercules> too many bad GC jokes going on here at once
00:35:35termerSup guys
00:35:43termerGC jokes are banned in the the GC
00:36:05FromDiscord<odexine> In reply to @_gumbercules "too many bad GC": You could say…
00:36:11FromDiscord<odexine> Too much garbage jokes…
00:36:17FromDiscord<_gumbercules> ooph
00:36:40FromDiscord<_gumbercules> I feel like I need to bust out the chick-fil-a dad joke cards I keep in my junk drawer
00:37:28FromDiscord<_gumbercules> why do melons have fancy weddings?
00:37:44FromDiscord<Elegantbeef> Oh fuck here he goes again
00:37:51FromDiscord<_gumbercules> because they cantaloupe
00:38:20FromDiscord<_gumbercules> I'll wait for the applause...
00:39:37FromDiscord<Elegantbeef> Some say to this day he's still waiting
00:43:29*beholders_eye quit (Quit: WeeChat 3.6)
00:46:24*Jjp137 joined #nim
00:47:57*antranigv joined #nim
00:48:10*lucasta quit (Remote host closed the connection)
02:55:48FromDiscord<michaelb.eth> I've started practicing the composition and delivery of dad jokes
02:56:15FromDiscord<michaelb.eth> so far they haven't been well received
02:57:28FromDiscord<Elegantbeef> I really wish I didnt do offtopic talk here so I could non hypocritically say "I thought this was a Nim chat, not mic night at a comedy club"
03:01:43FromDiscord<michaelb.eth> lol
03:10:32*derpydoo quit (Ping timeout: 260 seconds)
03:41:44*rockcavera quit (Ping timeout: 245 seconds)
03:49:10*rockcavera joined #nim
03:49:10*rockcavera quit (Changing host)
03:49:10*rockcavera joined #nim
03:51:25*rockcavera quit (Remote host closed the connection)
04:23:17FromDiscord<ohokok> So I’m willing to pay anyone that can program my Lyft driver account to receive all ride requests in a 30 mile radius in a sort of list, and I will receive these rides before it goes to any other driver. So then I can choose the best one and rinse and repeat
04:23:18FromDiscord<Elegantbeef> Lol
04:23:30FromDiscord<ohokok> Or something close to that, maybe I get the ride request as another driver gets the same request and I click on the ride request faster than the other driver and the ride comes to me. Something along those lines as long as I can get rides fast and consistently I’m willing to pay if anybody can do this
04:25:05FromDiscord<odexine> I don’t think that’s achievable at all without being the owner of Lyft?
04:28:15*azimut quit (Ping timeout: 252 seconds)
04:37:28FromDiscord<ohokok> There’s people that have that software on Uber I’ve seen it
04:37:43FromDiscord<Elegantbeef> Clearly rika one should just make a third party client
04:37:56FromDiscord<ohokok> Idk how they do it. Also I don’t have Uber anymore so I’m tryna do it on lyft
04:38:49FromDiscord<ohokok> Or if you guys know how I can reach someone with amazing computer/software/coding/programming abilities.
04:39:03FromDiscord<ohokok> Like a website or a chat room or if you know anyone
04:39:37FromDiscord<ohokok> I will pay anyone that gives me a good source for this type of person I’m looking for, I’ll pay thru zelle/paypal
04:42:38FromDiscord<odexine> This is a legitimate suggestion, have you tried gig sites like Fiverr or whatever else?
04:43:07FromDiscord<odexine> I think on sites like those you probably have a better chance at getting it mad
04:43:08FromDiscord<odexine> Made
04:43:41FromDiscord<odexine> In reply to @ohokok "There’s people that have": Well it depends on how the site works, I was assuming that the two companies did things differently
04:57:13*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
05:26:00*ntat joined #nim
05:43:15FromDiscord<ohokok> Yeah I’ve tried it but my request was deemed unethical so they banned me
05:44:59FromDiscord<metumortis> Lol
05:46:48*advesperacit joined #nim
06:15:12*dza quit (Quit: )
06:16:15*xutaxkamay joined #nim
06:16:47*dza joined #nim
06:18:06*dza quit (Client Quit)
06:19:35*dza joined #nim
06:20:19*dza quit (Client Quit)
06:21:47*dza joined #nim
06:23:01*dza quit (Client Quit)
06:24:50*dza joined #nim
06:52:04FromDiscord<ohokok> I’m paying $300 upfront and another $700 after, if it works
07:00:49termerElegantbeef, https://github.com/termermc/nim-stack-strings/releases/tag/v1.1.4
07:00:58termerohokok, Stop advertising this shit in #nim
07:06:29FromDiscord<Elegantbeef> Nice termer
07:07:10FromDiscord<Elegantbeef> I'm still uncertain about the otp usage of stack strings but atleast I made a pattern that can be used 😄
07:07:38FromDiscord<Elegantbeef> `if bleh.len < otp.secretSize` isnt the worst
07:07:57FromDiscord<Elegantbeef> Being limited to a fixed size secret might bite in the end, who knows seems fine to me
07:09:23FromDiscord<Elegantbeef> Of the services I have that support TOTP the biggest is 32
07:27:36termerYou'll probably be fine
07:29:55FromDiscord<Elegantbeef> Oh something unintentional that `toStackString` adds is gracefully ensuring strings are within a size range
07:31:51termerI suppose you're right
07:32:11termerUnless you're daring enough to use unsafeToStackString!
07:33:41FromDiscord<Elegantbeef> Doesnt matter
07:36:07termerThen you just get a crash
07:36:09FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4HDq
07:36:13FromDiscord<Elegantbeef> Nothing unsafe here 😄
07:37:10termerdoes that not die?
07:37:27termerIf it doesn't, it's probably writing into some other memory on the stack
07:37:36FromDiscord<Elegantbeef> `const`
07:37:50termerwhat in the world
07:38:08termerNow I don't understand what's actually going on here
07:39:12FromDiscord<Elegantbeef> Unsafe add doesnt do anything unsafe 😄
07:42:21termerIt does, by virtue of bound checks being off and not doing any bound checking itself
07:42:47FromDiscord<odexine> Prolly better not to have that proc and rely on check flags on compile no?
07:43:01FromDiscord<Elegantbeef> Probably
07:43:08FromDiscord<Elegantbeef> But you're adding to a fixed size collection termer
07:43:08FromDiscord<odexine> Or one could turn checks off with the pragmas as well anyway
07:43:28termerProbably, but I couldn't find a good way to see if checks were on
07:43:35termeror some other reason
07:43:39termerI think there was just some other reason
07:44:41FromDiscord<Elegantbeef> `compileOption"checks"`
07:45:20termerI should annotate all my procs with {.magic.}
07:45:37FromDiscord<odexine> I am late to the party
07:45:42FromDiscord<odexine> Would have pasted https://nim-lang.org/docs/system.html#compileOption,string
07:45:50FromDiscord<Elegantbeef> Lol termer
07:45:57FromDiscord<Elegantbeef> So many compiler errors you'd hit
07:46:06FromDiscord<odexine> Do you not know that magic is also a pragma or something
07:46:33termerI know what it is
07:46:36termerI'm just joking
07:47:00FromDiscord<odexine> ~~It’s difficult to know nowadays~~
07:47:31termerIt's hard to interpret it as anything besides a joke
07:47:39FromDiscord<amopel> Is there a way to generate platform independent c code?
07:48:04termerbut you'll miss out on the `os` module
07:48:12termerWhat are you wanting to do?
07:48:49termerThere's also this article which goes over using cosmopolitan libc with Nim https://mike.fo/blog/nim-is-actually-portable
07:49:34FromDiscord<Elegantbeef> Termer left you a comment on that issue, since I'm weird and do things weird
07:50:01FromDiscord<amopel> In reply to @termer "What are you wanting": No os module should not be an issue. It's about generating c code that can be compiled by a third party for any platform.
07:50:08FromDiscord<amopel> Thank you 🙂
07:50:55termeramopel, https://nim-lang.org/docs/nimc.html
07:50:58termerI recommend you read this
07:51:06termerthere are various compiler flags you can use to improve portability
07:51:58termerYou'll also want to use --mm:arc if you don't want to have a garbage collector running
07:52:18termerI can give you better info if I understand more about what your use-case is
08:00:01FromDiscord<amopel> sent a long message, see http://ix.io/4HDA
08:01:59FromDiscord<mratsim> In reply to @Elegantbeef "Being limited to a": secrets are always fixed size in cryptography, 32 bytes = 2^256 which is usual
08:03:19*ntat quit (Quit: leaving)
08:06:13termeramopel, Makes sense
08:06:35termerI'd use --os:any and --mm:arc then
08:17:43FromDiscord<System64 ~ Flandre Scarlet> In reply to @termer "There's also this article": Wait, build once run everywhere??
08:17:55termerin theory
08:18:12FromDiscord<ieltan> In reply to @sys64 "Wait, build once run": Yeah, that's actually the real deal
08:18:15FromDiscord<ieltan> I think
08:18:16FromDiscord<ieltan> Lol
08:18:34FromDiscord<ieltan> Wonder if anyone used ape in production
08:19:53FromDiscord<System64 ~ Flandre Scarlet> In reply to @ieltan "Yeah, that's actually the": Yo what!↵What if there is DLLs and stuff?
08:21:37FromDiscord<ieltan> This obviously won't magical make windows specific stuff like syscalls work in other OS
08:22:15FromDiscord<ieltan> This is just about producing a binary executable in most OSes
08:22:28FromDiscord<ieltan> (edit) "magical" => "magically"
08:22:41FromDiscord<System64 ~ Flandre Scarlet> https://github.com/gnu-enjoyer/ActuallyPortableNim↵seems it can't be installed with Nimble
08:26:39FromDiscord<ieltan> Not sure how to use it, I think you're supposed to clone the library and link it
08:48:29*advesperacit quit (Ping timeout: 255 seconds)
08:48:57*advesperacit joined #nim
08:56:12FromDiscord<nnsee> In reply to @sys64 "Wait, build once run": yeah, cosmopolitan is a bit magic
08:59:14FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "yeah, cosmopolitan is a": This is the libc right ?
09:00:41FromDiscord<nnsee> yep
09:03:44FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "yep": Oh alright↵So why not using that by default ?
09:06:12FromDiscord<nnsee> by default for what?
09:07:47FromDiscord<System64 ~ Flandre Scarlet> For compiling
09:08:46FromDiscord<nnsee> because most people don't want to build polyglot binaries with a libc that provides suboptimal support for certain functions than the other ones?
09:09:09FromDiscord<nnsee> https://justine.lol/cosmopolitan/functions.html
09:09:11FromDiscord<System64 ~ Flandre Scarlet> Ah so it's less optimized ?
09:10:30FromDiscord<nnsee> well, it's more like
09:11:35FromDiscord<nnsee> it's neat, but you don't generally need this? I don't care if the binaries on my Linux machine run on Windows (or wherever), so why bother?
09:17:53FromDiscord<ieltan> In reply to @nnsee "https://justine.lol/cosmopolitan/functions.html": Oh wow I wasn't aware of that
09:26:53FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "it's neat, but you": This is one of the reasons of why Java is successful↵build once, run everywhere
09:31:20FromDiscord<nnsee> and yet I would not like all (or even any, to tell the truth) of the programs I use to be Java 😅
09:33:21FromDiscord<System64 ~ Flandre Scarlet> Java is a sussy language anyways
09:34:55FromDiscord<nnsee> In reply to @sys64 "This is one of": the thing is, I don't _need_ most of my things to run everywhere
09:48:21FromDiscord<nnsee> also the way that it works and bootstraps the binary is hacky
09:48:25FromDiscord<nnsee> see https://justine.lol/ape.html
10:08:41*advesperacit quit (Ping timeout: 260 seconds)
10:09:12*advesperacit joined #nim
10:21:23NimEventerNew thread by aiac: How to pass --cc options to compiler by nimble?, see https://forum.nim-lang.org/t/10520
10:25:40*junaid_ joined #nim
10:35:59*junaid_ quit (Remote host closed the connection)
10:37:18FromDiscord<toma400> In reply to @nnsee "and yet I would": Well, making Nim behave like Java would be huge benefit and would probably be kind of selling point
10:37:33FromDiscord<toma400> The main need here is that to be optional
10:39:46FromDiscord<nnsee> In reply to @toma400 "Well, making Nim behave": it can already do that
10:40:38FromDiscord<Phil> In reply to @toma400 "Well, making Nim behave": Behave like java in what sense?↵Because nim supports ref-types the same as java, it just also supports value-types of which java only has a very limited subset
10:40:58FromDiscord<Phil> If it's about the class-syntax I think there's a macro package for that
10:41:09FromDiscord<nnsee> In reply to @isofruit "Behave like java in": this is in regards to "compile once, run everywhere"
10:41:21FromDiscord<nnsee> re: cosmopolitan libc
10:41:32FromDiscord<Phil> Ahhhhhh.... I guess compile to JS; run everywhere?
10:41:50FromDiscord<nnsee> no, cosmopolitan libc :p
10:41:54FromDiscord<nnsee> ie polyglot binaries
10:42:16FromDiscord<Phil> Didn't even know sth like that existed
10:42:58FromDiscord<nnsee> In reply to @isofruit "Didn't even know sth": https://discord.com/channels/371759389889003530/371759389889003532/1156867073612447754 :p
10:44:28FromDiscord<Phil> In reply to @nnsee "https://discord.com/channels/371759389889003530/371": Actually Portable nim seems like a great project ... if it had docs!
10:44:46FromDiscord<nnsee> there's not really much to document
10:45:06FromDiscord<nnsee> it's just swapping the libc and some compiler options
10:45:25FromDiscord<nnsee> most of the documentation you'd really be interested in is the cosmopolitan docs
10:46:12FromDiscord<Phil> - How to use ↵- example of usage↵- How to Install ↵- Where to look for more extensive docs (link to cosmopolitan docs)
10:46:30FromDiscord<Phil> (edit) "↵-" => "/ setup↵-"
10:46:48FromDiscord<Phil> (edit) "↵-" => "in principle↵-"
10:47:01FromDiscord<nnsee> In reply to @isofruit "- How to use": there's barely anything in the repo, the Makefile and main.nim basically answer these questions
10:50:31FromDiscord<nnsee> I'm guessing you didn't read this blog post? https://mike.fo/blog/nim-is-actually-portable
10:50:55FromDiscord<nnsee> I feel like the github repo is missing context without it :p
10:51:11FromDiscord<Phil> In reply to @nnsee "there's barely anything in": It's less about the amount of code in the repo and more about the things you can do with what's in the repo.↵I don't care as a user if X took 1000 or 10 lines of code to make, the implications to me are important.↵So flags necessary for compilation etc.
10:51:39FromDiscord<nnsee> the repo is supplementary to the blog post
10:51:49FromDiscord<Phil> I only saw the link to the repo and ignored the blogpost
10:53:17FromDiscord<Phil> In that context, a link in the repo to the blogpost would provide basically everything I asked above except for installation instructions xP
10:53:45FromDiscord<nnsee> there's nothing to "install"
10:54:03FromDiscord<nnsee> it's an example project showing how one would use cosmopolitan in their nim project
10:54:15FromDiscord<Phil> Also note the URL to `https://justine.lol/ape.html` is slightly borked, as its `https://justine.lol/ape.html.`
10:54:18FromDiscord<nnsee> but yeah, a link in the readme probably would be useful
10:54:24FromDiscord<nnsee> yeah i noticed that too
10:54:50FromDiscord<nnsee> (also this isn't my blog post if that's why you're telling me this)
10:55:28FromDiscord<Phil> I got the impression based on your feedback 😄 Fair
10:56:23FromDiscord<frobnicate> Wait the same executable runs on different systems? You don't have to build one for each?
10:56:27FromDiscord<nnsee> haha no 😅 I've seen cosmopolitan before, but this particular blog post/usage in Nim was new to me
10:56:30FromDiscord<nnsee> In reply to @frobnicate "Wait the same executable": yes
10:56:35FromDiscord<frobnicate> Wild
10:56:39FromDiscord<nnsee> eh
10:57:08FromDiscord<nnsee> it's _neat_, polyglot file formats are always fun, but I don't think it's _too_ practical tbh
10:58:42FromDiscord<e.e.7> I still cringe every time I read "αcτµαlly pδrταblε εxεcµταblε".
10:58:47FromDiscord<e.e.7> Poor Greek people.
10:59:31FromDiscord<e.e.7> Related content: https://old.reddit.com/r/grssk/top/?sort=top&t=all
11:00:06FromDiscord<nnsee> In reply to @e.e.7 "I still cringe every": yeah, like, why do that 😅
11:00:31FromDiscord<nnsee> also a pet peeve when people do it with cyrillic letters
11:00:54FromDiscord<nnsee> as someone who can speak and read russian, I always try to read it as a russian word first
11:01:18FromDiscord<e.e.7> Yes, Я is not a backwards R.
11:02:45FromDiscord<nnsee> or д an A
11:02:46FromDiscord<e.e.7> Okay, not _just_ a backwards R.
11:03:01FromDiscord<e.e.7> Yeah, it's everywhere.
11:03:11FromDiscord<nnsee> or и a backwards N...
11:03:16FromDiscord<nnsee> the list goes on :p
11:10:27FromDiscord<e.e.7> It's also bad for people with screen readers.
11:24:43FromDiscord<frobnicate> It's funny as a Danish person as well when people use ø instead of o
11:24:52FromDiscord<frobnicate> Or ö
11:25:32FromDiscord<nnsee> I'm estonian, so I feel you on the ö
11:43:57FromDiscord<e.e.7> I think it can work in logos/branding.
11:44:03FromDiscord<e.e.7> "Häagen-Dazs" is nonsense-Danish, but is clearly successful.
11:45:00FromDiscord<toma400> In reply to @frobnicate "Or ö": You tell me it's not very surprised face? 😭
11:47:18FromDiscord<Chronos [She/Her]> In reply to @nnsee "I'm guessing you didn't": Oh wow, that's impressive, does it actually keep a small binary size?
11:48:07FromDiscord<Chronos [She/Her]> In reply to @termer "There's also this article": Ah, makes sense it's x64 only
11:48:09FromDiscord<Chronos [She/Her]> Oh well
11:50:02FromDiscord<e.e.7> As far as I recall, the first execution is significantly slower.
11:51:12FromDiscord<e.e.7> At least on Linux, it starts out as a shell script which then writes an ELF header, and executes the result.
11:52:20FromDiscord<e.e.7> And some virus scanners don't like them.
11:54:32FromDiscord<e.e.7> And Nim has a bad history with virus scanners already :)
11:58:29*ntat joined #nim
12:09:12FromDiscord<nnsee> it's been a lot better recently
12:23:10advesperacitHow can I get streams to play nice with japanese characters?
12:24:25FromDiscord<Chronos [She/Her]> In reply to @advesperacit "How can I get": Are Japanese characters using unicode?
12:26:51FromDiscord<Chronos [She/Her]> If so, probably need to find something for that and streams
12:26:52advesperacitNot sure. If I put them into a string and echo it displays correctly, put the string into newStringStream it becomes trash, same if I stream from a file
12:27:40FromDiscord<Chronos [She/Her]> Hm, then I'm lost here sorry
12:29:36FromDiscord<odexine> Japanese characters can either be encoded in Shift JIS or Unicode
12:29:54FromDiscord<odexine> Usually it will be Unicode nowadays, but if the source is old it will be Shift JIS
12:30:31FromDiscord<odexine> What operating system are you using? If it’s windows, are you using the regular old cmd.exe or the new windows terminal?
12:30:52FromDiscord<odexine> Can you also determine where these characters are being sourced from
12:31:40advesperacitwsl, but I can try on my regular linux
12:32:11FromDiscord<odexine> Are you running WSL with cmd.exe?
12:32:28FromDiscord<odexine> It’s not really whether it’s Linux or not, but what the terminal emulator is
12:32:46FromDiscord<odexine> cmd.exe doesn’t use Unicode by default I believe
12:33:20FromDiscord<odexine> Actually I recall now, Nim sets it to Unicode by default
12:33:24FromDiscord<odexine> So your source must be Shift JIS
12:33:39FromDiscord<odexine> Or some other encoding, but likely Shift JIS
12:33:49FromDiscord<odexine> (Yes welcome to encoding hell)
12:34:29advesperacita stream with regular åäö also turns to garbage
12:35:47FromDiscord<odexine> Okay wait I slightly misunderstood your problem at first, my bad
12:36:01FromDiscord<odexine> How do you put this string into the stream?
12:36:15FromDiscord<jviega> Wait what? I use string streams and file streams with unicode all the time
12:36:21FromDiscord<odexine> It currently sounds like a bug but it might also be a mistake in the code
12:36:28FromDiscord<odexine> It should just work yes
12:36:40FromDiscord<jviega> Use the unicode module's interface, for instance, to iterate over Runes (unicode code points)
12:37:04FromDiscord<odexine> Even then, writing the raw bytes as is should not really affect anything
12:37:18FromDiscord<jviega> Nim strings are just byte arrays, the unicode interface interprets it as a string of utf8
12:40:41FromDiscord<sOkam! 🫐> Is there a way to build `-d:release` but keep `assert thing` active, without requiring `doAssert`?
12:41:22FromDiscord<sOkam! 🫐> or is that a `-d:danger` thing and im confusing them? 🤔
12:41:44FromDiscord<jviega> Write your own assert for when release is on?
12:42:07FromDiscord<sOkam! 🫐> i mean, the point is I have tens of asserts, and I don't want to rewrite the code
12:42:23advesperacittrying some more it works as expected with `proc readLine(s: Stream; line: var string): bool`, but not `proc readLine(s: Stream): string`
12:43:09FromDiscord<jviega> I mean, write an implementation of 'assert' with the behavior you want that you get during release compiles, not that you'd do something else
12:43:38FromDiscord<odexine> In reply to @heysokam "or is that a": That’s a danger thing, IIRC
12:43:47FromDiscord<odexine> Assertions stay on with release IIRC
12:43:53FromDiscord<sOkam! 🫐> ic, kk
12:44:32FromDiscord<jviega> "On with release" but only with `-d:danger` correct?
12:44:32FromDiscord<odexine> Checked, yes it is a danger thing
12:44:47FromDiscord<odexine> Think about it like Zig’s release safe and release fast
12:45:31FromDiscord<odexine> ~~arguably Zig’s safe is “safer” than Nim’s but I have no proof other than Zig enables UBSan lol~~
12:46:28FromDiscord<odexine> Ah.
12:46:34FromDiscord<odexine> Read line returns a string
12:46:40FromDiscord<odexine> You’re iterating over the bytes of that string
12:46:53FromDiscord<sOkam! 🫐> In reply to @odexine "~~arguably Zig’s safe is": kk makes senses ✍️
12:46:59FromDiscord<sOkam! 🫐> classic me confusing concepts
12:46:59FromDiscord<odexine> So you print the bytes instead of the whole line like your intention is I assume
12:47:04FromDiscord<jviega> Like I said use unicode.toRunes() on the result
12:47:06advesperacitI can't believe I didn't catch that when I actually read the docs
12:47:19FromDiscord<jviega> It gives you unt32 essentially 🙂
12:47:35FromDiscord<sOkam! 🫐> In reply to @advesperacit "I can't believe I": you need to read the docs harder :kappa:
12:47:39FromDiscord<odexine> In reply to @jviega "It gives you unt32": UTF-32 encoded?
12:47:46FromDiscord<odexine> In reply to @heysokam "you need to read": SMH
12:47:51FromDiscord<sOkam! 🫐> 😄
12:47:58FromDiscord<odexine> What about us who can’t read :ChiguPien:
12:48:10FromDiscord<sOkam! 🫐> i can, but im blind... so... 😭
12:48:29advesperacitthanks for the help
12:48:33FromDiscord<jviega> UTF-32 is equivolent to array of codepoints
12:48:42FromDiscord<odexine> You can read even though you’re blind?!?!?
12:49:00FromDiscord<jviega> Since 32 bits is larger than the log2 of the largest possible unicode codepoint 🙂
12:51:23FromDiscord<e.e.7> sent a code paste, see https://play.nim-lang.org/#ix=4HEv
12:52:07FromDiscord<e.e.7> This will still produce `AssertionDefect` after compiling with `-d:danger`
12:52:26FromDiscord<e.e.7> You can also `push` / `pop` it so that it only applies to a particular location.
12:57:25*oisota joined #nim
12:59:43FromDiscord<odexine> I believe with that pragma you can just turn it off and on and it will apply like push and pop will
13:00:19FromDiscord<odexine> Though push pop will preserve the setting that was set before, and the off on one I say will not
13:03:22FromDiscord<e.e.7> To be clear, I wouldn't recommend that particular use.
13:04:30FromDiscord<e.e.7> Using a plain `assert`, rather than a `doAssert`, should probably communicate to the reader that the assertion isn't present when compiling with `-d:danger`.
13:05:03FromDiscord<e.e.7> A more common use of stuff like this is disabling checks for `-d:release` for performance-critical hotspots
13:05:10FromDiscord<odexine> NGL I think more people should be wary of using danger, a good amount of people just slap it on
13:05:24FromDiscord<e.e.7> For example: https://github.com/guzba/zippy/blob/ba8ab9557880c24c46eaa20c8268a84c642b2504/src/zippy/deflate.nim#L7-L8
13:09:04FromDiscord<sOkam! 🫐> how are Nim tuples mapped to in C codegen? 🤔
13:09:16FromDiscord<sOkam! 🫐> (edit) "how" => "what"
13:09:54*def- quit (Quit: -)
13:09:55ormiretadvesperacit: you're second example wasn't getting garbage for unicode related reasons (though that was hiding what was really going on). In that example you weren't iterating over the lines in the stream but over the characters in the first line. lines iterator is what you actually want for that https://play.nim-lang.org/#ix=4HEy https://nim-lang.org/docs/streams.html#lines.i%2CStream
13:10:06*def- joined #nim
13:10:58ormiretwhich I've just noticed odexine already said
13:14:32advesperacitthank you anyway
13:36:22*rockcavera joined #nim
14:14:14*Mister_Magister quit (Read error: Connection reset by peer)
14:16:07*Mister_Magister joined #nim
14:17:15FromDiscord<.aingel.> Does futhark work at all for cpp?
14:17:37FromDiscord<jviega> I believe so; it isn't parsing things itself, it's leveraging libclang
14:17:52FromDiscord<jviega> So I'm pretty sure it'd work
14:19:19*azimut joined #nim
14:20:45FromDiscord<.aingel.> > It also doesn't support C++ at the moment,
14:20:52FromDiscord<.aingel.> Ya guess it doesn'
14:20:53FromDiscord<.aingel.> (edit) "doesn'" => "doesn't"
14:32:04FromDiscord<jviega> Aww shucks
14:32:18*tiorock joined #nim
14:32:18*tiorock quit (Changing host)
14:32:18*tiorock joined #nim
14:32:18*rockcavera is now known as Guest4967
14:32:18*tiorock is now known as rockcavera
14:32:39FromDiscord<nnsee> In reply to @jviega "I believe so; it": it _is_ parsing the libclang output :p
14:35:26*Guest4967 quit (Ping timeout: 255 seconds)
14:41:45FromDiscord<bhunao> is there a way to use git commands inside nim?
14:42:30FromDiscord<nnsee> you mean like https://nim-lang.org/docs/osproc.html#execCmd%2Cstring ?
14:47:40FromDiscord<bhunao> In reply to @nnsee "you mean like https://nim-lang.org/docs/osproc.html": thank you, is what i need
14:49:28FromDiscord<Chronos [She/Her]> I've managed to make my game draw tiles and such from a map object
14:49:40FromDiscord<Chronos [She/Her]> Now I just need to make an editor which is pain... Sigh
14:50:18FromDiscord<Chronos [She/Her]> Also there's no bindings for Raygui which sucks but oh well
14:57:00FromDiscord<.aingel.> In reply to @chronos.vitaqua "I've managed to make": Nice!
14:57:21FromDiscord<Chronos [She/Her]> Yeah!
14:57:42FromDiscord<Chronos [She/Her]> I'm just suffering with the idea of having to make a GUI now because aha that is Pain™️
14:58:45*Mister_Magister quit (Read error: Connection reset by peer)
15:00:34*Mister_Magister joined #nim
15:06:26*ntat quit (Quit: leaving)
15:06:49FromDiscord<_gumbercules> nanovg to the rescue
15:07:57FromDiscord<Chronos [She/Her]> Nanovg?
15:08:45FromDiscord<_gumbercules> https://github.com/wjakob/nanogui
15:08:52FromDiscord<_gumbercules> https://github.com/memononen/NanoVG
15:09:33FromDiscord<_gumbercules> I don't think it's the most performant vector graphics solution in the world but I also don't think there is a better option presently for in-game GUIs outside of rolling your own
15:09:45FromDiscord<Chronos [She/Her]> https://github.com/johnnovak/nim-nanovg fun
15:10:10FromDiscord<Chronos [She/Her]> In reply to @_gumbercules "I don't think it's": Fair, issue is the game has to be crossplatform (on Android) which is why I chose Raylib :p
15:10:11FromDiscord<_gumbercules> John Novak once again coming to the rescue
15:10:32FromDiscord<_gumbercules> well NanoVG should work cross platform tmk - I've built things for android using it in the past I'm pretty sure
15:10:41FromDiscord<_gumbercules> all it needs is an opengl context
15:10:52FromDiscord<Chronos [She/Her]> Oh nice
15:11:03FromDiscord<_gumbercules> I believe it's backend agnostic too - so you can use it with whatever drawing API you want
15:11:15FromDiscord<_gumbercules> you might just have to write a backend for it if it's not opengl or one soeone has already authored a backend for
15:12:21FromDiscord<Chronos [She/Her]> As long as it supports OpenGl 3, and OpenGLES, should be fine
15:18:08FromDiscord<Chronos [She/Her]> Kinda wish I could draw the map of my game at an angle
15:24:12FromDiscord<Chronos [She/Her]> I should draw a grid sigh
15:31:11FromDiscord<Chronos [She/Her]> Why is motivation so rare
15:32:51FromDiscord<jviega> Because ADD and anxiety are both so common?
15:33:01FromDiscord<jviega> Oh, you meant for you? 🙂
15:33:29FromDiscord<Chronos [She/Her]> ADHD here too :p
15:35:04*alphacentauri quit (Ping timeout: 245 seconds)
15:35:32*alphacentauri joined #nim
15:52:51*FromDiscord quit (Read error: Connection reset by peer)
15:53:40*FromDiscord joined #nim
16:05:48FromDiscord<_gumbercules> In reply to @jviega "Because ADD and anxiety": Why are they so common?
16:05:58FromDiscord<_gumbercules> That's the question I'd like to have real answers to
16:06:25FromDiscord<_gumbercules> or at least, a question 🙂
16:08:29FromDiscord<jviega> I saw a theory focused on the united states that made shocking sense, that the europeans that populated it were likely to have been predominantly the ones w/ genetic susceptibility, as ADD wasn't a great fit for the times there
16:08:46FromDiscord<jviega> Doubt that's provable, but makes sense
16:09:05FromDiscord<jviega> Cause I'd bet 75+% of americans could be diagnosed
16:12:37FromDiscord<_gumbercules> I think it's a lot more prevalent outside of the US, but there are a lot of countries that don't recognize it as a disorder / don't treat it as one
16:14:05FromDiscord<_gumbercules> I also think environmental factors probably weigh in just as heavily as genetic factors. It's being increasingly used as blanket term to describe a whole category of individuals who aren't really suited for the type of society we find ourselves in now
16:14:36FromDiscord<_gumbercules> But I think calling it a disorder and thinking that there is a problem with people that experience these issues is the wrong way of looking at it
16:14:50FromDiscord<jviega> It's fun to speculate, but I'll leave it to the doctors that study it all
16:15:39FromDiscord<_gumbercules> Meh, I have lived experience to go off of and doctors were pretty piss poor at diagnosing mine for quite some time
16:16:44FromDiscord<jviega> Both I and all of my children have the diagnosis, so I have some relevant insight as well 🙂
16:17:35FromDiscord<_gumbercules> Yeah, as you pointed out earlier I'm pretty sure doctors would be willing to diagnose most of the US population with it if they were given the opportunity
16:18:08FromDiscord<jviega> I mean more the PhD medical professionals who do clinical trials, not my friend Fred the Dr btw
16:19:55FromDiscord<_gumbercules> yeah I figured haha
16:20:03FromDiscord<_gumbercules> I bet Fred is a pretty baller doctor though
16:23:57FromDiscord<_gumbercules> My therapist was the one that ended up diagnosing me in 2018 but I had been misdiagnosed so many times and had been put on anti-depressants for so long that I was convinced it was another mis-diagnosis. COVID was pretty revealing for me - but then it turned in what kind of attention disorder do I have? Then I realized it was pointless to try to put a label on it after a while.
16:25:23FromDiscord<nnsee> can therapists diagnose people in the US?
16:25:30FromDiscord<nnsee> that's surprising to me
16:25:37FromDiscord<_gumbercules> The fact that people are being prescribed essentially speed though to get through the day has always been a mind bender for me
16:26:15FromDiscord<_gumbercules> In reply to @nnsee "can therapists diagnose people": It depends on the therapist - generally if you have a degree in psychology and are a licensed therapist, you can diagnose
16:26:27FromDiscord<_gumbercules> psychiatrists are the ones that prescribe and dispense medication generally
16:26:46FromDiscord<_gumbercules> however - my doctor (general practitioner) handles my prescription for me
16:27:12FromDiscord<jviega> psychologists are the people perceived to be quacks because they're not real doctors
16:27:49FromDiscord<_gumbercules> yeah, and at least in my experience, they were the only ones willing to take the time to understand what was going on and get to the causal factors of my issue
16:28:01FromDiscord<_gumbercules> most "real doctors" would stop at depression, anxiety, bi-polar, etc
16:28:09FromDiscord<_gumbercules> if they even would go that far
16:28:43FromDiscord<_gumbercules> in the US if you want mental health help - just go private and pay out of pocket
16:29:19FromDiscord<_gumbercules> that's my advice - trying to get help through the public health system we have here is going to cause you way more grief and pain than just ponying up the $$$
16:29:27FromDiscord<_gumbercules> (edit) removed "public"
16:30:37FromDiscord<_gumbercules> find a good therapist that has a psychiatrist they work closely with and you're much more likely to walk out of the office with some form of treatment - if you go through insurance you're going to have to fight your way, tooth and nail, to any form of help and someone will probably misdiagnose you along the way
16:33:24*ntat joined #nim
16:41:56FromDiscord<Phil> Completely unrelated to anything posted before (which, just as a hint given that nobody else was talking tech, does belong more in #offtopic ):↵It feels kinda nuts (now that I started taking first babysteps towards wrapping C-code) that you can kind of just passively add automated memory management to C-code by simply using ARC/ORC, transform the C-types into custom "Managed" types for which you define destructors and bam, done
16:42:39FromDiscord<Phil> I guess the drawback of that approach is that it potentially isn't the most performant as it might lead to more allocations and de-allocations than handling it manually
16:43:19FromDiscord<Phil> Though then again since you're counting refs anyway I don't think it should make too much of a difference (?)
16:43:24FromDiscord<jviega> Well, that's not generally true.
16:44:05FromDiscord<jviega> Meaning, it should generally be faster, because people aren't great at manually doing the analysis and leads to less efficient code
16:45:33FromDiscord<jviega> GC-based approaches are generally more efficient than ref counting based on total run time, but have huge costs when collecting. Reference counting spreads the work out far more appropriately
16:47:52FromDiscord<Phil> Are they more efficient? I have 0 knowledge on how GCs work but I just imagine it has a list of all structs/data packets/whatever floating about and somehow is capable of magically figuring out which objects are all in use or not and that has to run regularly so I always thought you might run GC-cycles where you essentially collect nothing
16:49:28FromDiscord<jviega> Meaning garbage collectors? Depending on your definition, automated ref counting is garbage collection
16:50:41FromDiscord<jviega> But for GCs that are more on the tracing side of things (mark-and-sweep and copying based approaches), it's definitely cheaper overall in the single threaded case, but can have pauses that are not suitable for some apps
16:50:59FromDiscord<jviega> The story gets more complex in multi-threaded environments very fast
16:51:38FromDiscord<Phil> Ah, I had those in separate boxes in my head, GCs more on the mark-and-sweep side (java and --mm:refc I believe?) is what I typically understand
16:51:42FromDiscord<Phil> (edit) "Ah, I had those in separate boxes in my head, GCs more on the mark-and-sweep side (java and --mm:refc I believe?) is what I typically understand ... " added "under that term"
16:52:15FromDiscord<jviega> No, --refc is a reference counting algorithm that deals w/ the ref counting cycle problem w/ a bit of mark-and-sweep
16:52:19FromDiscord<jviega> But Orc is that too
16:52:38FromDiscord<jviega> The big difference practically is that orc was built with a different heap strategy
16:52:42FromDiscord<Phil> TIL that I know nothing once again 😄
16:53:45FromDiscord<jviega> I haven't looked at Orc/Arc too deeply because none of my (single threaded) code has ever seemed to run in it (hello, crashes). But each thread getting their own heap and then having primitives for passing stuff between threads
16:53:54FromDiscord<jviega> Whereas refc is a shared heap
16:53:54FromDiscord<Phil> In reply to @jviega "The story gets more": ~~So what you're saying is that once again concurrency is a nightmare~~
16:54:37FromDiscord<jviega> I think that's all right; I paid a little bit of attention but my project has never headed threads so I've never looked too closely
16:54:44FromDiscord<Phil> In reply to @jviega "Whereas refc is a": Doesn't that make refc potentially more susceptible (conceptually at least I guess) to race conditions as multiple threads operate on the same data?
16:54:59FromDiscord<Phil> (edit) "data?" => "memory?"
16:55:51FromDiscord<jviega> It all depends on your primitives, I guess. Before this I was doing a lot of lock-free data structures, i.e., ones that work in a shared heap w/o locks.
16:56:01termerrefc has a thread-local heap
16:56:04FromDiscord<jviega> So "it's complicated"
16:56:17FromDiscord<jviega> Did I get it backward?
16:56:33termerIn refc, you have to use createShared and then use locks
16:56:41termerotherwise you just can't share memory between threads
16:56:55termercreateShared creates unmanaged global memory
16:57:08termeremphasis on unmanaged, you have to free it
16:57:54FromDiscord<Phil> Okay so basically you stake a flag on some memory and declare it no-man's land that some thread has to manually deal with and if you don't do it right you blow up your entire application because of use after free bugs etc.
16:57:57FromDiscord<jviega> Yeah so I got it backward
16:58:46FromDiscord<Phil> so ORC is the one with the pool of shared memory by default or sth?
16:59:26FromDiscord<_gumbercules> the situation hasn't changed all that much - you could always allocate memory on a shared heap whether you were using refc, arc or orc
16:59:47FromDiscord<_gumbercules> the difference is now, with threads:on, ARC/ORC default to allocating memory there
17:00:04FromDiscord<_gumbercules> when refc was the only GC that existed the problem wasn't really about the heap and whether it was thread local or not
17:01:07FromDiscord<_gumbercules> well I mean - that's a bit of a misstatement, thread locality did matter but it mattered because of the implications of the GC managing these thread local heaps
17:01:16termerYeah, ARC/ORC has a shared heap
17:01:55FromDiscord<_gumbercules> which is why it was extremely difficult prior to the advent of ARC/ORC to handle something like hot code reloading
17:02:00FromDiscord<_gumbercules> the gcs would just clobber one another
17:02:47FromDiscord<_gumbercules> and in general the GC didn't know when a reference to memory in one thread local heap was going to be pased to another thread
17:03:13FromDiscord<Phil> Okay so condensing it down:↵refc: Defaulting to thread-local heaps, you can explicitly make shared unmanaged heap↵arc: Defaulting to... shared managed heap and you can maybe also do thread-local heaps?
17:03:15FromDiscord<_gumbercules> becaus the GC was only concerned with managing the memory of that one thread local heap - which is how Nim was able to make the claims it did about speed
17:03:43FromDiscord<_gumbercules> I'm not sure if ARC/ORC still employ thread local heaps tbh
17:03:55FromDiscord<_gumbercules> I know the default is now threads:on
17:04:11FromDiscord<Phil> Okay so ARC/ORC is all-in on shared-global heap that is managed (and possibly you can do some unmanaged ones as well)
17:04:15FromDiscord<Phil> (edit) "Okay so ARC/ORC is all-in on shared-global heap that is managed (and possibly you can do some unmanaged ones as well) ... " added "?"
17:04:44FromDiscord<Phil> I feel like there's a PHD or 20 worth of knowledge and a lot of caveats/it depends under the question I posed
17:04:52FromDiscord<Phil> (edit) "PHD" => "PhD"
17:05:30FromDiscord<_gumbercules> or that was supposed to become the default
17:06:26FromDiscord<_gumbercules> In reply to @isofruit "Okay so ARC/ORC is": you can definitely make unmanaged allocations on a shared heap in ARC/ORC - whether another thread local heap exists or not I'm not sure
17:06:31FromDiscord<_gumbercules> probably best to ask in #internals
17:09:26FromDiscord<jviega> Any time people have been really interested in garbage collection, Phil, I've recommended "The Garbage Collection Handbook", which should be Richard Jones et al; it's in maybe it's 3rd edition now? But it's always been super clear (well written, accessible), and pretty thorough in surveying the field too
17:11:11FromDiscord<Phil> Wait a second, no I recalled correctly that refc does mark and sweep!
17:11:16FromDiscord<Phil> > The default GC in Nim has been refc (deferred reference counting with a mark & sweep phase for cycle collection) for a long time, with other options available, such as markAndSweep, boehm, and go.
17:11:34FromDiscord<jviega> It's exactly what I just said
17:11:35FromDiscord<Phil> Ah, but for the cycle phase
17:11:41FromDiscord<Phil> Which is exactly the same as ORC, gnaa
17:11:45FromDiscord<jviega> Reference counting with mark and sweep only for cycle resolution
17:11:47FromDiscord<jviega> Yeah
17:12:29FromDiscord<jviega> Mark and sweep in a non-shared heap is dirt simple. So are basic compacting collectors
17:13:02FromDiscord<jviega> Look at the algorithms, you'd get a sense that they should be less work than manual memory management unless you work REALLY hard at it
17:14:02FromDiscord<jviega> And the Rust people are trying to make manual mem management safe, and get it more efficient than a GC, but you'll still have to work really hard at it
17:14:07FromDiscord<Phil> sent a long message, see http://ix.io/4HFB
17:14:41FromDiscord<jviega> From a practical perspective, I'd rather have GC than worry about memory management, little requires that extra sliver of performance.
17:15:59*krux02 joined #nim
17:18:37FromDiscord<Chronos [She/Her]> This is pain
17:18:59FromDiscord<nervecenter> In reply to @jviega "From a practical perspective,": Same, dynamic data structures being managed by stack frames by default makes this trivially easy
17:19:21FromDiscord<nervecenter> You don't really need to have many explicit heap GC-managed references at all in most programs
17:19:42FromDiscord<jviega> And even if you do 🤷 in most programs.
17:20:26FromDiscord<jviega> I think most people writing code have an instinct that leads them to prematurly optimize when it's not a good use of time, which def applies to me too
17:25:47FromDiscord<Chronos [She/Her]> I have drawn a grid by just creating a texture that's a white box :p
17:28:21FromDiscord<Chronos [She/Her]> https://media.discordapp.net/attachments/371759389889003532/1157005890373816352/image.png?ex=65170934&is=6515b7b4&hm=19bd80ac56d8e62ad867d86922d3415f0c7d20f7641b7d0fb35d5b89c83a4f6d&
17:28:21FromDiscord<_gumbercules> In reply to @jviega "I think most people": to be fair though - one can write a memory management subsystem in a fairly trivial amount of time and once it's done it's done
17:28:47FromDiscord<_gumbercules> but I mean - I agree, unless you're working on RT or near-RT simulations, there's not a ton of point for that level of optimiation
17:29:26FromDiscord<_gumbercules> In reply to @chronos.vitaqua "I have drawn a": cheating!
17:29:28FromDiscord<_gumbercules> I'm kidding
17:29:55FromDiscord<Chronos [She/Her]> :P
17:30:29FromDiscord<jviega> It's easy to write a buggy memory manager 🙂 I've seen plenty of exploits in them. My CTO is paricularly expert at finding and exploiting them, has done so on multiple browsers, etc.
17:30:48FromDiscord<_gumbercules> well this is also not that important in certain areanas / disciplines
17:31:11FromDiscord<_gumbercules> most game developers aren't going to care if there is some vulnerability in their game (unless it's multiplayer / connected to the internet)
17:31:31FromDiscord<_gumbercules> but I mean - https://github.com/niklas-ourmachinery/bitsquid-foundation
17:32:10FromDiscord<_gumbercules> this type of code you'll find in pretty much every single commercial game engine in one form or another
17:33:22FromDiscord<jviega> Sure, and commercial game engines are often low-hanging fruit for exploitation, and the memory management system is the first place I'd go looking 🙂
17:34:45FromDiscord<_gumbercules> one of my favorite stories
17:35:34FromDiscord<_gumbercules> http://kylehalladay.com/blog/2019/12/04/Recreating-A-Dirty-Gamedev-Hack.html
17:36:12FromDiscord<Elegantbeef> When talking about garbage collection in this respect I always think of https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125
17:36:49FromDiscord<Elegantbeef> Wait that's not the right article
17:37:07FromDiscord<Elegantbeef> Shame on me
17:37:35FromDiscord<Elegantbeef> But it contains the write up, so who cares
17:37:48FromDiscord<_gumbercules> `oldnewthing` haha
17:37:49FromDiscord<_gumbercules> there is nothing new under the sun
17:38:09FromDiscord<_gumbercules> but yeah - I've heard that one before
17:38:51FromDiscord<_gumbercules> I think it's a great example of how sometimes safety isn't the most critical concern
17:39:21FromDiscord<Elegantbeef> "Shit the enemy has learned how to use our unsafe memory practices to do a RCE and shut the missles down" 😄
17:39:24FromDiscord<_gumbercules> or I guess in this case it wouldn't really be safety but collectin resources
17:39:32FromDiscord<_gumbercules> well, that's another matter
17:39:40FromDiscord<_gumbercules> I mean personally I'd be very worried about memory safety when designing missiles
17:39:55FromDiscord<_gumbercules> or software for missiles I should say - leaking resources not as much
17:40:13FromDiscord<_gumbercules> I gues what I meant to say is - it's a good examle of how everything is a tradeoff
17:40:52FromDiscord<_gumbercules> sometimes memory safety is going to be the primary concern, sometimes it's going to be performance, sometimes it's going to be reliability / uptime etc
17:40:58FromDiscord<Elegantbeef> Depending how silly you are cryptographically, leaking memory could result in your cryptokeys being left in memory
17:41:12FromDiscord<_gumbercules> and this is why designing software is a challenge - because you're constantly playing a game of balancing tradeoffs
17:41:26FromDiscord<_gumbercules> if there was some easy button solution to all of this - none of us would have jobs
17:41:55FromDiscord<_gumbercules> In reply to @Elegantbeef "Depending how silly you": If there is no memory left because your missile has blown up - who cares
17:42:12FromDiscord<Elegantbeef> It's still in transit!
17:44:08FromDiscord<_gumbercules> better figure out how to make it fly faste then
17:46:25FromDiscord<Elegantbeef> Or just launch it closer
17:56:50FromDiscord<toma400> In reply to @chronos.vitaqua "": Aww, that looks so cute ❤️
18:01:10FromDiscord<Chronos [She/Her]> Thanks! It's definitely not the final assets tho xD
18:01:22FromDiscord<Chronos [She/Her]> It's just some temp ones until my friend makes the actual assets aha
18:29:14FromDiscord<Phil> Trying to try out essentially 2 way bindings on a gtk form field in owlkettle.↵Levels of pain: high, but measurable >_>
18:30:12FromDiscord<Phil> 2 way bindings as in: If you update the value of the field, the way it is rendered in the form should update.↵If the user uses the form input to change the value, the value in the backend should be updated
18:46:59FromDiscord<leorize> someone should port relm to nim \:P
18:47:27FromDiscord<Chronos [She/Her]> Relm?
18:47:50FromDiscord<Chronos [She/Her]> Also I really need to work on a map editor sigh
18:48:22FromDiscord<Chronos [She/Her]> I'm not sure how to align clicks to a grid tho, and making a ton of rectangles for checking the area sounds a bit excessive
18:50:28FromDiscord<leorize> https://relm4.org/↵(@Chronos [She/Her])
18:51:23FromDiscord<Chronos [She/Her]> That seems like pain to port lol
18:52:31FromDiscord<Phil> Okay I officially don't get the difference between a value on a GTK range and a fill level on a GTK range
18:52:35FromDiscord<Phil> Seems to be the same thing twice to me