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:15 | FromDiscord | <dromedariodechapeu> Is in this chanell where I ask about any errors? |
00:07:21 | FromDiscord | <dromedariodechapeu> (edit) "chanell" => "channel" |
00:08:47 | * | adium joined #nim |
00:09:13 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> Joke aside, yes you can ask here or on the forum |
00:10:35 | FromDiscord | <dromedariodechapeu> I'm trying to write `[]` to a LinkedList, but when i use i get this error: https://pastebin.com/KgvDaTsx |
00:10:50 | FromDiscord | <dromedariodechapeu> this is part of the code: https://pastebin.com/EpSAmaP2 |
00:11:28 | FromDiscord | <dromedariodechapeu> (edit) "this" => "here" |
00:11:41 | FromDiscord | <Elegantbeef> `var int` is wrong firstly |
00:11:51 | FromDiscord | <Elegantbeef> well atleast for `lista[0]` |
00:11:53 | FromDiscord | <Elegantbeef> `a` is immutable |
00:11:59 | FromDiscord | <Elegantbeef> I mean `0` is 😄 |
00:12:41 | FromDiscord | <dromedariodechapeu> that was quick, thank you |
00:13:10 | FromDiscord | <Elegantbeef> Also why does your linked list have a `[]` that takes an int |
00:13:54 | FromDiscord | <dromedariodechapeu> It's just an exercise |
00:14:00 | FromDiscord | <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:00 | FromDiscord | <Elegantbeef> Ah ok |
00:14:55 | FromDiscord | <dromedariodechapeu> I need to use as a introduction for newbies in Nim |
00:15:12 | FromDiscord | <dromedariodechapeu> not saying I'm not a beginner |
00:16:05 | FromDiscord | <Elegantbeef> I assume 100% of code shared is actually being used in a project 😄 |
00:17:29 | * | lucasta joined #nim |
00:18:53 | FromDiscord | <odexine> In reply to @nixfreak "I switched to nyoom": The repo just got archived |
00:20:02 | FromDiscord | <dromedariodechapeu> In reply to @Elegantbeef "I assume 100% of": could i use sink over var? |
00:20:15 | FromDiscord | <Elegantbeef> No you want to mutate the integer |
00:21:49 | FromDiscord | <dromedariodechapeu> I don't know exactly what sink does, but when i use sink works, and index becomes mutable |
00:23:10 | FromDiscord | <Elegantbeef> If you do not want the int to be mutated outside of scope just do `var index = index` |
00:23:59 | FromDiscord | <Elegantbeef> and make the parameter `index: int` |
00:25:05 | FromDiscord | <_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:40 | FromDiscord | <Elegantbeef> It gives up ownership of heap allocated values really |
00:25:43 | FromDiscord | <_gumbercules> which means the compiler can perform certain optimizations when that procedure is invoked |
00:25:45 | FromDiscord | <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:51 | FromDiscord | <Elegantbeef> Doesnt mean much sense when it's an `int` |
00:26:07 | FromDiscord | <_gumbercules> well, it still makes sense it's just not very practical |
00:26:31 | FromDiscord | <_gumbercules> by that I mean the compiler's behavior - maybe not that of the programmer |
00:29:45 | FromDiscord | <Elegantbeef> Yea `sink` does work to get C style semantics for passing value types, but just alias with a mutable copy |
00:29:48 | FromDiscord | <dromedariodechapeu> In reply to @_gumbercules "tmk `sink` means the": ok ok, thanks |
00:30:14 | FromDiscord | <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:27 | FromDiscord | <_gumbercules> Anyone from IRC / Matrix gets that tag |
00:30:32 | FromDiscord | <_gumbercules> because a bot is bridging their messages to discord |
00:30:37 | FromDiscord | <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:46 | FromDiscord | <Elegantbeef> Well technically a webhook is bridging but same difference 😄 |
00:31:11 | FromDiscord | <_gumbercules> pretty much |
00:31:38 | FromDiscord | <Elegantbeef> You really shouldn't rely on the C style semantics and should just do a simple alias |
00:31:41 | FromDiscord | <_gumbercules> discord doesn't discriminate |
00:31:50 | FromDiscord | <Elegantbeef> Other languages also require this alias for mutable |
00:31:51 | FromDiscord | <_gumbercules> a bot is a bot is a bot apparently |
00:31:52 | termer | Discord still has discriminators |
00:31:57 | FromDiscord | <Elegantbeef> I know of atleast odin in that regard |
00:31:58 | FromDiscord | <dromedariodechapeu> In reply to @_gumbercules "Anyone from IRC /": I was scared of a Bot being so human, thanks for clarifying |
00:32:10 | FromDiscord | <_gumbercules> I mean, beef could still be a robot |
00:32:12 | FromDiscord | <Elegantbeef> Chatgpt is amazing gumber isnt even a human |
00:32:31 | FromDiscord | <_gumbercules> shhh don't give away my secret |
00:32:35 | termer | I've let ChatGPT loose on IRC before |
00:32:46 | FromDiscord | <_gumbercules> don't read all my conspiracy theory posts in #off-topic either |
00:32:47 | termer | It's funny as fuck |
00:32:52 | FromDiscord | <Elegantbeef> Termer is a terrorist |
00:32:57 | FromDiscord | <_gumbercules> I knew it |
00:33:14 | termer | 8| |
00:33:38 | FromDiscord | <odexine> He even has a robot avatar! |
00:33:53 | FromDiscord | <_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:15 | FromDiscord | <Elegantbeef> That implies I'm a terrorist and by using your own thought, you're also a terrorist |
00:34:15 | FromDiscord | <_gumbercules> might have a terrorbot on our hands here folks |
00:34:21 | FromDiscord | <_gumbercules> no no no |
00:34:28 | FromDiscord | <_gumbercules> cycles are not supported here |
00:34:33 | FromDiscord | <odexine> In reply to @Elegantbeef "That implies I'm a": Thought crime |
00:34:36 | FromDiscord | <_gumbercules> it's like Nim's gc |
00:34:52 | FromDiscord | <Elegantbeef> An Orc is going to chop up and sweep them away? |
00:35:09 | FromDiscord | <odexine> Who’s Mark? |
00:35:31 | FromDiscord | <Elegantbeef> Oh hi? |
00:35:33 | FromDiscord | <_gumbercules> too many bad GC jokes going on here at once |
00:35:35 | termer | Sup guys |
00:35:43 | termer | GC jokes are banned in the the GC |
00:36:05 | FromDiscord | <odexine> In reply to @_gumbercules "too many bad GC": You could say… |
00:36:11 | FromDiscord | <odexine> Too much garbage jokes… |
00:36:17 | FromDiscord | <_gumbercules> ooph |
00:36:40 | FromDiscord | <_gumbercules> I feel like I need to bust out the chick-fil-a dad joke cards I keep in my junk drawer |
00:37:28 | FromDiscord | <_gumbercules> why do melons have fancy weddings? |
00:37:44 | FromDiscord | <Elegantbeef> Oh fuck here he goes again |
00:37:51 | FromDiscord | <_gumbercules> because they cantaloupe |
00:38:20 | FromDiscord | <_gumbercules> I'll wait for the applause... |
00:39:37 | FromDiscord | <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:48 | FromDiscord | <michaelb.eth> I've started practicing the composition and delivery of dad jokes |
02:56:15 | FromDiscord | <michaelb.eth> so far they haven't been well received |
02:57:28 | FromDiscord | <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:43 | FromDiscord | <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:17 | FromDiscord | <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:18 | FromDiscord | <Elegantbeef> Lol |
04:23:30 | FromDiscord | <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:05 | FromDiscord | <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:28 | FromDiscord | <ohokok> There’s people that have that software on Uber I’ve seen it |
04:37:43 | FromDiscord | <Elegantbeef> Clearly rika one should just make a third party client |
04:37:56 | FromDiscord | <ohokok> Idk how they do it. Also I don’t have Uber anymore so I’m tryna do it on lyft |
04:38:49 | FromDiscord | <ohokok> Or if you guys know how I can reach someone with amazing computer/software/coding/programming abilities. |
04:39:03 | FromDiscord | <ohokok> Like a website or a chat room or if you know anyone |
04:39:37 | FromDiscord | <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:38 | FromDiscord | <odexine> This is a legitimate suggestion, have you tried gig sites like Fiverr or whatever else? |
04:43:07 | FromDiscord | <odexine> I think on sites like those you probably have a better chance at getting it mad |
04:43:08 | FromDiscord | <odexine> Made |
04:43:41 | FromDiscord | <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:15 | FromDiscord | <ohokok> Yeah I’ve tried it but my request was deemed unethical so they banned me |
05:44:59 | FromDiscord | <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:04 | FromDiscord | <ohokok> I’m paying $300 upfront and another $700 after, if it works |
07:00:49 | termer | Elegantbeef, https://github.com/termermc/nim-stack-strings/releases/tag/v1.1.4 |
07:00:58 | termer | ohokok, Stop advertising this shit in #nim |
07:06:29 | FromDiscord | <Elegantbeef> Nice termer |
07:07:10 | FromDiscord | <Elegantbeef> I'm still uncertain about the otp usage of stack strings but atleast I made a pattern that can be used 😄 |
07:07:38 | FromDiscord | <Elegantbeef> `if bleh.len < otp.secretSize` isnt the worst |
07:07:57 | FromDiscord | <Elegantbeef> Being limited to a fixed size secret might bite in the end, who knows seems fine to me |
07:09:23 | FromDiscord | <Elegantbeef> Of the services I have that support TOTP the biggest is 32 |
07:27:36 | termer | You'll probably be fine |
07:29:55 | FromDiscord | <Elegantbeef> Oh something unintentional that `toStackString` adds is gracefully ensuring strings are within a size range |
07:31:51 | termer | I suppose you're right |
07:32:11 | termer | Unless you're daring enough to use unsafeToStackString! |
07:33:41 | FromDiscord | <Elegantbeef> Doesnt matter |
07:36:07 | termer | Then you just get a crash |
07:36:09 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=4HDq |
07:36:13 | FromDiscord | <Elegantbeef> Nothing unsafe here 😄 |
07:37:10 | termer | does that not die? |
07:37:27 | termer | If it doesn't, it's probably writing into some other memory on the stack |
07:37:36 | FromDiscord | <Elegantbeef> `const` |
07:37:50 | termer | what in the world |
07:38:08 | termer | Now I don't understand what's actually going on here |
07:39:12 | FromDiscord | <Elegantbeef> Unsafe add doesnt do anything unsafe 😄 |
07:42:21 | termer | It does, by virtue of bound checks being off and not doing any bound checking itself |
07:42:47 | FromDiscord | <odexine> Prolly better not to have that proc and rely on check flags on compile no? |
07:43:01 | FromDiscord | <Elegantbeef> Probably |
07:43:08 | FromDiscord | <Elegantbeef> But you're adding to a fixed size collection termer |
07:43:08 | FromDiscord | <odexine> Or one could turn checks off with the pragmas as well anyway |
07:43:28 | termer | Probably, but I couldn't find a good way to see if checks were on |
07:43:35 | termer | or some other reason |
07:43:39 | termer | I think there was just some other reason |
07:44:41 | FromDiscord | <Elegantbeef> `compileOption"checks"` |
07:45:11 | termer | magic |
07:45:20 | termer | I should annotate all my procs with {.magic.} |
07:45:37 | FromDiscord | <odexine> I am late to the party |
07:45:42 | FromDiscord | <odexine> Would have pasted https://nim-lang.org/docs/system.html#compileOption,string |
07:45:50 | FromDiscord | <Elegantbeef> Lol termer |
07:45:57 | FromDiscord | <Elegantbeef> So many compiler errors you'd hit |
07:46:06 | FromDiscord | <odexine> Do you not know that magic is also a pragma or something |
07:46:33 | termer | I know what it is |
07:46:36 | termer | I'm just joking |
07:47:00 | FromDiscord | <odexine> ~~It’s difficult to know nowadays~~ |
07:47:31 | termer | It's hard to interpret it as anything besides a joke |
07:47:39 | FromDiscord | <amopel> Is there a way to generate platform independent c code? |
07:47:52 | termer | --os:any |
07:48:04 | termer | but you'll miss out on the `os` module |
07:48:12 | termer | What are you wanting to do? |
07:48:49 | termer | There's also this article which goes over using cosmopolitan libc with Nim https://mike.fo/blog/nim-is-actually-portable |
07:49:34 | FromDiscord | <Elegantbeef> Termer left you a comment on that issue, since I'm weird and do things weird |
07:50:01 | FromDiscord | <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:08 | FromDiscord | <amopel> Thank you 🙂 |
07:50:55 | termer | amopel, https://nim-lang.org/docs/nimc.html |
07:50:58 | termer | I recommend you read this |
07:51:06 | termer | there are various compiler flags you can use to improve portability |
07:51:58 | termer | You'll also want to use --mm:arc if you don't want to have a garbage collector running |
07:52:18 | termer | I can give you better info if I understand more about what your use-case is |
08:00:01 | FromDiscord | <amopel> sent a long message, see http://ix.io/4HDA |
08:01:59 | FromDiscord | <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:13 | termer | amopel, Makes sense |
08:06:35 | termer | I'd use --os:any and --mm:arc then |
08:17:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @termer "There's also this article": Wait, build once run everywhere?? |
08:17:54 | termer | Yeah |
08:17:55 | termer | in theory |
08:18:12 | FromDiscord | <ieltan> In reply to @sys64 "Wait, build once run": Yeah, that's actually the real deal |
08:18:15 | FromDiscord | <ieltan> I think |
08:18:16 | FromDiscord | <ieltan> Lol |
08:18:34 | FromDiscord | <ieltan> Wonder if anyone used ape in production |
08:19:53 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ieltan "Yeah, that's actually the": Yo what!↵What if there is DLLs and stuff? |
08:21:37 | FromDiscord | <ieltan> This obviously won't magical make windows specific stuff like syscalls work in other OS |
08:22:15 | FromDiscord | <ieltan> This is just about producing a binary executable in most OSes |
08:22:28 | FromDiscord | <ieltan> (edit) "magical" => "magically" |
08:22:41 | FromDiscord | <System64 ~ Flandre Scarlet> https://github.com/gnu-enjoyer/ActuallyPortableNim↵seems it can't be installed with Nimble |
08:26:39 | FromDiscord | <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:12 | FromDiscord | <nnsee> In reply to @sys64 "Wait, build once run": yeah, cosmopolitan is a bit magic |
08:59:14 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "yeah, cosmopolitan is a": This is the libc right ? |
09:00:41 | FromDiscord | <nnsee> yep |
09:03:44 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "yep": Oh alright↵So why not using that by default ? |
09:06:12 | FromDiscord | <nnsee> by default for what? |
09:07:47 | FromDiscord | <System64 ~ Flandre Scarlet> For compiling |
09:08:46 | FromDiscord | <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:09 | FromDiscord | <nnsee> https://justine.lol/cosmopolitan/functions.html |
09:09:11 | FromDiscord | <System64 ~ Flandre Scarlet> Ah so it's less optimized ? |
09:10:30 | FromDiscord | <nnsee> well, it's more like |
09:11:35 | FromDiscord | <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:53 | FromDiscord | <ieltan> In reply to @nnsee "https://justine.lol/cosmopolitan/functions.html": Oh wow I wasn't aware of that |
09:26:53 | FromDiscord | <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:20 | FromDiscord | <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:21 | FromDiscord | <System64 ~ Flandre Scarlet> Java is a sussy language anyways |
09:34:55 | FromDiscord | <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:21 | FromDiscord | <nnsee> also the way that it works and bootstraps the binary is hacky |
09:48:25 | FromDiscord | <nnsee> see https://justine.lol/ape.html |
10:08:41 | * | advesperacit quit (Ping timeout: 260 seconds) |
10:09:12 | * | advesperacit joined #nim |
10:21:23 | NimEventer | New 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:18 | FromDiscord | <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:33 | FromDiscord | <toma400> The main need here is that to be optional |
10:39:46 | FromDiscord | <nnsee> In reply to @toma400 "Well, making Nim behave": it can already do that |
10:40:38 | FromDiscord | <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:58 | FromDiscord | <Phil> If it's about the class-syntax I think there's a macro package for that |
10:41:09 | FromDiscord | <nnsee> In reply to @isofruit "Behave like java in": this is in regards to "compile once, run everywhere" |
10:41:21 | FromDiscord | <nnsee> re: cosmopolitan libc |
10:41:32 | FromDiscord | <Phil> Ahhhhhh.... I guess compile to JS; run everywhere? |
10:41:50 | FromDiscord | <nnsee> no, cosmopolitan libc :p |
10:41:54 | FromDiscord | <nnsee> ie polyglot binaries |
10:42:16 | FromDiscord | <Phil> Didn't even know sth like that existed |
10:42:58 | FromDiscord | <nnsee> In reply to @isofruit "Didn't even know sth": https://discord.com/channels/371759389889003530/371759389889003532/1156867073612447754 :p |
10:44:28 | FromDiscord | <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:46 | FromDiscord | <nnsee> there's not really much to document |
10:45:06 | FromDiscord | <nnsee> it's just swapping the libc and some compiler options |
10:45:25 | FromDiscord | <nnsee> most of the documentation you'd really be interested in is the cosmopolitan docs |
10:46:12 | FromDiscord | <Phil> - How to use ↵- example of usage↵- How to Install ↵- Where to look for more extensive docs (link to cosmopolitan docs) |
10:46:30 | FromDiscord | <Phil> (edit) "↵-" => "/ setup↵-" |
10:46:48 | FromDiscord | <Phil> (edit) "↵-" => "in principle↵-" |
10:47:01 | FromDiscord | <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:31 | FromDiscord | <nnsee> I'm guessing you didn't read this blog post? https://mike.fo/blog/nim-is-actually-portable |
10:50:55 | FromDiscord | <nnsee> I feel like the github repo is missing context without it :p |
10:51:11 | FromDiscord | <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:39 | FromDiscord | <nnsee> the repo is supplementary to the blog post |
10:51:49 | FromDiscord | <Phil> I only saw the link to the repo and ignored the blogpost |
10:53:17 | FromDiscord | <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:45 | FromDiscord | <nnsee> there's nothing to "install" |
10:54:03 | FromDiscord | <nnsee> it's an example project showing how one would use cosmopolitan in their nim project |
10:54:15 | FromDiscord | <Phil> Also note the URL to `https://justine.lol/ape.html` is slightly borked, as its `https://justine.lol/ape.html.` |
10:54:18 | FromDiscord | <nnsee> but yeah, a link in the readme probably would be useful |
10:54:24 | FromDiscord | <nnsee> yeah i noticed that too |
10:54:50 | FromDiscord | <nnsee> (also this isn't my blog post if that's why you're telling me this) |
10:55:28 | FromDiscord | <Phil> I got the impression based on your feedback 😄 Fair |
10:56:23 | FromDiscord | <frobnicate> Wait the same executable runs on different systems? You don't have to build one for each? |
10:56:27 | FromDiscord | <nnsee> haha no 😅 I've seen cosmopolitan before, but this particular blog post/usage in Nim was new to me |
10:56:30 | FromDiscord | <nnsee> In reply to @frobnicate "Wait the same executable": yes |
10:56:35 | FromDiscord | <frobnicate> Wild |
10:56:39 | FromDiscord | <nnsee> eh |
10:57:08 | FromDiscord | <nnsee> it's _neat_, polyglot file formats are always fun, but I don't think it's _too_ practical tbh |
10:58:42 | FromDiscord | <e.e.7> I still cringe every time I read "αcτµαlly pδrταblε εxεcµταblε". |
10:58:47 | FromDiscord | <e.e.7> Poor Greek people. |
10:59:31 | FromDiscord | <e.e.7> Related content: https://old.reddit.com/r/grssk/top/?sort=top&t=all |
11:00:06 | FromDiscord | <nnsee> In reply to @e.e.7 "I still cringe every": yeah, like, why do that 😅 |
11:00:31 | FromDiscord | <nnsee> also a pet peeve when people do it with cyrillic letters |
11:00:54 | FromDiscord | <nnsee> as someone who can speak and read russian, I always try to read it as a russian word first |
11:01:18 | FromDiscord | <e.e.7> Yes, Я is not a backwards R. |
11:02:45 | FromDiscord | <nnsee> or д an A |
11:02:46 | FromDiscord | <e.e.7> Okay, not _just_ a backwards R. |
11:03:01 | FromDiscord | <e.e.7> Yeah, it's everywhere. |
11:03:11 | FromDiscord | <nnsee> or и a backwards N... |
11:03:16 | FromDiscord | <nnsee> the list goes on :p |
11:10:27 | FromDiscord | <e.e.7> It's also bad for people with screen readers. |
11:24:43 | FromDiscord | <frobnicate> It's funny as a Danish person as well when people use ø instead of o |
11:24:52 | FromDiscord | <frobnicate> Or ö |
11:25:32 | FromDiscord | <nnsee> I'm estonian, so I feel you on the ö |
11:43:57 | FromDiscord | <e.e.7> I think it can work in logos/branding. |
11:44:03 | FromDiscord | <e.e.7> "Häagen-Dazs" is nonsense-Danish, but is clearly successful. |
11:45:00 | FromDiscord | <toma400> In reply to @frobnicate "Or ö": You tell me it's not very surprised face? 😭 |
11:47:18 | FromDiscord | <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:07 | FromDiscord | <Chronos [She/Her]> In reply to @termer "There's also this article": Ah, makes sense it's x64 only |
11:48:09 | FromDiscord | <Chronos [She/Her]> Oh well |
11:50:02 | FromDiscord | <e.e.7> As far as I recall, the first execution is significantly slower. |
11:51:12 | FromDiscord | <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:20 | FromDiscord | <e.e.7> And some virus scanners don't like them. |
11:54:32 | FromDiscord | <e.e.7> And Nim has a bad history with virus scanners already :) |
11:58:29 | * | ntat joined #nim |
12:09:12 | FromDiscord | <nnsee> it's been a lot better recently |
12:23:10 | advesperacit | How can I get streams to play nice with japanese characters? |
12:24:25 | FromDiscord | <Chronos [She/Her]> In reply to @advesperacit "How can I get": Are Japanese characters using unicode? |
12:26:51 | FromDiscord | <Chronos [She/Her]> If so, probably need to find something for that and streams |
12:26:52 | advesperacit | Not 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:40 | FromDiscord | <Chronos [She/Her]> Hm, then I'm lost here sorry |
12:29:36 | FromDiscord | <odexine> Japanese characters can either be encoded in Shift JIS or Unicode |
12:29:54 | FromDiscord | <odexine> Usually it will be Unicode nowadays, but if the source is old it will be Shift JIS |
12:30:31 | FromDiscord | <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:52 | FromDiscord | <odexine> Can you also determine where these characters are being sourced from |
12:31:40 | advesperacit | wsl, but I can try on my regular linux |
12:32:11 | FromDiscord | <odexine> Are you running WSL with cmd.exe? |
12:32:28 | FromDiscord | <odexine> It’s not really whether it’s Linux or not, but what the terminal emulator is |
12:32:46 | FromDiscord | <odexine> cmd.exe doesn’t use Unicode by default I believe |
12:33:20 | FromDiscord | <odexine> Actually I recall now, Nim sets it to Unicode by default |
12:33:24 | FromDiscord | <odexine> So your source must be Shift JIS |
12:33:39 | FromDiscord | <odexine> Or some other encoding, but likely Shift JIS |
12:33:49 | FromDiscord | <odexine> (Yes welcome to encoding hell) |
12:34:29 | advesperacit | a stream with regular åäö also turns to garbage |
12:35:47 | FromDiscord | <odexine> Okay wait I slightly misunderstood your problem at first, my bad |
12:36:01 | FromDiscord | <odexine> How do you put this string into the stream? |
12:36:15 | FromDiscord | <jviega> Wait what? I use string streams and file streams with unicode all the time |
12:36:21 | FromDiscord | <odexine> It currently sounds like a bug but it might also be a mistake in the code |
12:36:28 | FromDiscord | <odexine> It should just work yes |
12:36:40 | FromDiscord | <jviega> Use the unicode module's interface, for instance, to iterate over Runes (unicode code points) |
12:37:04 | FromDiscord | <odexine> Even then, writing the raw bytes as is should not really affect anything |
12:37:18 | FromDiscord | <jviega> Nim strings are just byte arrays, the unicode interface interprets it as a string of utf8 |
12:40:41 | FromDiscord | <sOkam! 🫐> Is there a way to build `-d:release` but keep `assert thing` active, without requiring `doAssert`? |
12:41:22 | FromDiscord | <sOkam! 🫐> or is that a `-d:danger` thing and im confusing them? 🤔 |
12:41:44 | FromDiscord | <jviega> Write your own assert for when release is on? |
12:42:07 | FromDiscord | <sOkam! 🫐> i mean, the point is I have tens of asserts, and I don't want to rewrite the code |
12:42:23 | advesperacit | trying some more it works as expected with `proc readLine(s: Stream; line: var string): bool`, but not `proc readLine(s: Stream): string` |
12:43:09 | FromDiscord | <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:38 | FromDiscord | <odexine> In reply to @heysokam "or is that a": That’s a danger thing, IIRC |
12:43:47 | FromDiscord | <odexine> Assertions stay on with release IIRC |
12:43:53 | FromDiscord | <sOkam! 🫐> ic, kk |
12:44:32 | FromDiscord | <jviega> "On with release" but only with `-d:danger` correct? |
12:44:32 | FromDiscord | <odexine> Checked, yes it is a danger thing |
12:44:47 | FromDiscord | <odexine> Think about it like Zig’s release safe and release fast |
12:45:31 | FromDiscord | <odexine> ~~arguably Zig’s safe is “safer” than Nim’s but I have no proof other than Zig enables UBSan lol~~ |
12:45:51 | advesperacit | https://play.nim-lang.org/#ix=4HEu |
12:46:28 | FromDiscord | <odexine> Ah. |
12:46:34 | FromDiscord | <odexine> Read line returns a string |
12:46:40 | FromDiscord | <odexine> You’re iterating over the bytes of that string |
12:46:53 | FromDiscord | <sOkam! 🫐> In reply to @odexine "~~arguably Zig’s safe is": kk makes senses ✍️ |
12:46:59 | FromDiscord | <sOkam! 🫐> classic me confusing concepts |
12:46:59 | FromDiscord | <odexine> So you print the bytes instead of the whole line like your intention is I assume |
12:47:04 | FromDiscord | <jviega> Like I said use unicode.toRunes() on the result |
12:47:06 | advesperacit | I can't believe I didn't catch that when I actually read the docs |
12:47:19 | FromDiscord | <jviega> It gives you unt32 essentially 🙂 |
12:47:35 | FromDiscord | <sOkam! 🫐> In reply to @advesperacit "I can't believe I": you need to read the docs harder :kappa: |
12:47:39 | FromDiscord | <odexine> In reply to @jviega "It gives you unt32": UTF-32 encoded? |
12:47:46 | FromDiscord | <odexine> In reply to @heysokam "you need to read": SMH |
12:47:51 | FromDiscord | <sOkam! 🫐> 😄 |
12:47:58 | FromDiscord | <odexine> What about us who can’t read :ChiguPien: |
12:48:10 | FromDiscord | <sOkam! 🫐> i can, but im blind... so... 😭 |
12:48:29 | advesperacit | thanks for the help |
12:48:33 | FromDiscord | <jviega> UTF-32 is equivolent to array of codepoints |
12:48:42 | FromDiscord | <odexine> You can read even though you’re blind?!?!? |
12:49:00 | FromDiscord | <jviega> Since 32 bits is larger than the log2 of the largest possible unicode codepoint 🙂 |
12:51:23 | FromDiscord | <e.e.7> sent a code paste, see https://play.nim-lang.org/#ix=4HEv |
12:52:07 | FromDiscord | <e.e.7> This will still produce `AssertionDefect` after compiling with `-d:danger` |
12:52:26 | FromDiscord | <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:43 | FromDiscord | <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:19 | FromDiscord | <odexine> Though push pop will preserve the setting that was set before, and the off on one I say will not |
13:03:22 | FromDiscord | <e.e.7> To be clear, I wouldn't recommend that particular use. |
13:04:30 | FromDiscord | <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:03 | FromDiscord | <e.e.7> A more common use of stuff like this is disabling checks for `-d:release` for performance-critical hotspots |
13:05:10 | FromDiscord | <odexine> NGL I think more people should be wary of using danger, a good amount of people just slap it on |
13:05:24 | FromDiscord | <e.e.7> For example: https://github.com/guzba/zippy/blob/ba8ab9557880c24c46eaa20c8268a84c642b2504/src/zippy/deflate.nim#L7-L8 |
13:09:04 | FromDiscord | <sOkam! 🫐> how are Nim tuples mapped to in C codegen? 🤔 |
13:09:16 | FromDiscord | <sOkam! 🫐> (edit) "how" => "what" |
13:09:54 | * | def- quit (Quit: -) |
13:09:55 | ormiret | advesperacit: 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:58 | ormiret | which I've just noticed odexine already said |
13:14:32 | advesperacit | thank 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:15 | FromDiscord | <.aingel.> Does futhark work at all for cpp? |
14:17:37 | FromDiscord | <jviega> I believe so; it isn't parsing things itself, it's leveraging libclang |
14:17:52 | FromDiscord | <jviega> So I'm pretty sure it'd work |
14:19:19 | * | azimut joined #nim |
14:20:45 | FromDiscord | <.aingel.> > It also doesn't support C++ at the moment, |
14:20:52 | FromDiscord | <.aingel.> Ya guess it doesn' |
14:20:53 | FromDiscord | <.aingel.> (edit) "doesn'" => "doesn't" |
14:32:04 | FromDiscord | <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:39 | FromDiscord | <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:45 | FromDiscord | <bhunao> is there a way to use git commands inside nim? |
14:42:30 | FromDiscord | <nnsee> you mean like https://nim-lang.org/docs/osproc.html#execCmd%2Cstring ? |
14:47:40 | FromDiscord | <bhunao> In reply to @nnsee "you mean like https://nim-lang.org/docs/osproc.html": thank you, is what i need |
14:49:28 | FromDiscord | <Chronos [She/Her]> I've managed to make my game draw tiles and such from a map object |
14:49:40 | FromDiscord | <Chronos [She/Her]> Now I just need to make an editor which is pain... Sigh |
14:50:18 | FromDiscord | <Chronos [She/Her]> Also there's no bindings for Raygui which sucks but oh well |
14:57:00 | FromDiscord | <.aingel.> In reply to @chronos.vitaqua "I've managed to make": Nice! |
14:57:21 | FromDiscord | <Chronos [She/Her]> Yeah! |
14:57:42 | FromDiscord | <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:49 | FromDiscord | <_gumbercules> nanovg to the rescue |
15:07:57 | FromDiscord | <Chronos [She/Her]> Nanovg? |
15:08:45 | FromDiscord | <_gumbercules> https://github.com/wjakob/nanogui |
15:08:52 | FromDiscord | <_gumbercules> https://github.com/memononen/NanoVG |
15:09:33 | FromDiscord | <_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:45 | FromDiscord | <Chronos [She/Her]> https://github.com/johnnovak/nim-nanovg fun |
15:10:10 | FromDiscord | <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:11 | FromDiscord | <_gumbercules> John Novak once again coming to the rescue |
15:10:32 | FromDiscord | <_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:41 | FromDiscord | <_gumbercules> all it needs is an opengl context |
15:10:52 | FromDiscord | <Chronos [She/Her]> Oh nice |
15:11:03 | FromDiscord | <_gumbercules> I believe it's backend agnostic too - so you can use it with whatever drawing API you want |
15:11:15 | FromDiscord | <_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:21 | FromDiscord | <Chronos [She/Her]> As long as it supports OpenGl 3, and OpenGLES, should be fine |
15:18:08 | FromDiscord | <Chronos [She/Her]> Kinda wish I could draw the map of my game at an angle |
15:24:12 | FromDiscord | <Chronos [She/Her]> I should draw a grid sigh |
15:31:11 | FromDiscord | <Chronos [She/Her]> Why is motivation so rare |
15:32:51 | FromDiscord | <jviega> Because ADD and anxiety are both so common? |
15:33:01 | FromDiscord | <jviega> Oh, you meant for you? 🙂 |
15:33:29 | FromDiscord | <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:48 | FromDiscord | <_gumbercules> In reply to @jviega "Because ADD and anxiety": Why are they so common? |
16:05:58 | FromDiscord | <_gumbercules> That's the question I'd like to have real answers to |
16:06:25 | FromDiscord | <_gumbercules> or at least, a question 🙂 |
16:08:29 | FromDiscord | <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:46 | FromDiscord | <jviega> Doubt that's provable, but makes sense |
16:09:05 | FromDiscord | <jviega> Cause I'd bet 75+% of americans could be diagnosed |
16:12:37 | FromDiscord | <_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:05 | FromDiscord | <_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:36 | FromDiscord | <_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:50 | FromDiscord | <jviega> It's fun to speculate, but I'll leave it to the doctors that study it all |
16:15:39 | FromDiscord | <_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:44 | FromDiscord | <jviega> Both I and all of my children have the diagnosis, so I have some relevant insight as well 🙂 |
16:17:35 | FromDiscord | <_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:08 | FromDiscord | <jviega> I mean more the PhD medical professionals who do clinical trials, not my friend Fred the Dr btw |
16:19:55 | FromDiscord | <_gumbercules> yeah I figured haha |
16:20:03 | FromDiscord | <_gumbercules> I bet Fred is a pretty baller doctor though |
16:23:57 | FromDiscord | <_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:23 | FromDiscord | <nnsee> can therapists diagnose people in the US? |
16:25:30 | FromDiscord | <nnsee> that's surprising to me |
16:25:37 | FromDiscord | <_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:15 | FromDiscord | <_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:27 | FromDiscord | <_gumbercules> psychiatrists are the ones that prescribe and dispense medication generally |
16:26:46 | FromDiscord | <_gumbercules> however - my doctor (general practitioner) handles my prescription for me |
16:27:12 | FromDiscord | <jviega> psychologists are the people perceived to be quacks because they're not real doctors |
16:27:49 | FromDiscord | <_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:01 | FromDiscord | <_gumbercules> most "real doctors" would stop at depression, anxiety, bi-polar, etc |
16:28:09 | FromDiscord | <_gumbercules> if they even would go that far |
16:28:43 | FromDiscord | <_gumbercules> in the US if you want mental health help - just go private and pay out of pocket |
16:29:19 | FromDiscord | <_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:27 | FromDiscord | <_gumbercules> (edit) removed "public" |
16:30:37 | FromDiscord | <_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:56 | FromDiscord | <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:39 | FromDiscord | <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:19 | FromDiscord | <Phil> Though then again since you're counting refs anyway I don't think it should make too much of a difference (?) |
16:43:24 | FromDiscord | <jviega> Well, that's not generally true. |
16:44:05 | FromDiscord | <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:33 | FromDiscord | <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:52 | FromDiscord | <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:28 | FromDiscord | <jviega> Meaning garbage collectors? Depending on your definition, automated ref counting is garbage collection |
16:50:41 | FromDiscord | <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:59 | FromDiscord | <jviega> The story gets more complex in multi-threaded environments very fast |
16:51:38 | FromDiscord | <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:42 | FromDiscord | <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:15 | FromDiscord | <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:19 | FromDiscord | <jviega> But Orc is that too |
16:52:38 | FromDiscord | <jviega> The big difference practically is that orc was built with a different heap strategy |
16:52:42 | FromDiscord | <Phil> TIL that I know nothing once again 😄 |
16:53:45 | FromDiscord | <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:54 | FromDiscord | <jviega> Whereas refc is a shared heap |
16:53:54 | FromDiscord | <Phil> In reply to @jviega "The story gets more": ~~So what you're saying is that once again concurrency is a nightmare~~ |
16:54:37 | FromDiscord | <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:44 | FromDiscord | <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:59 | FromDiscord | <Phil> (edit) "data?" => "memory?" |
16:55:51 | FromDiscord | <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:01 | termer | refc has a thread-local heap |
16:56:04 | FromDiscord | <jviega> So "it's complicated" |
16:56:17 | FromDiscord | <jviega> Did I get it backward? |
16:56:33 | termer | In refc, you have to use createShared and then use locks |
16:56:41 | termer | otherwise you just can't share memory between threads |
16:56:55 | termer | createShared creates unmanaged global memory |
16:57:08 | termer | emphasis on unmanaged, you have to free it |
16:57:54 | FromDiscord | <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:57 | FromDiscord | <jviega> Yeah so I got it backward |
16:58:46 | FromDiscord | <Phil> so ORC is the one with the pool of shared memory by default or sth? |
16:59:26 | FromDiscord | <_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:47 | FromDiscord | <_gumbercules> the difference is now, with threads:on, ARC/ORC default to allocating memory there |
17:00:04 | FromDiscord | <_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:07 | FromDiscord | <_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:16 | termer | Yeah, ARC/ORC has a shared heap |
17:01:55 | FromDiscord | <_gumbercules> which is why it was extremely difficult prior to the advent of ARC/ORC to handle something like hot code reloading |
17:02:00 | FromDiscord | <_gumbercules> the gcs would just clobber one another |
17:02:47 | FromDiscord | <_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:13 | FromDiscord | <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:15 | FromDiscord | <_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:43 | FromDiscord | <_gumbercules> I'm not sure if ARC/ORC still employ thread local heaps tbh |
17:03:55 | FromDiscord | <_gumbercules> I know the default is now threads:on |
17:04:11 | FromDiscord | <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:15 | FromDiscord | <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:44 | FromDiscord | <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:52 | FromDiscord | <Phil> (edit) "PHD" => "PhD" |
17:05:30 | FromDiscord | <_gumbercules> or that was supposed to become the default |
17:06:26 | FromDiscord | <_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:31 | FromDiscord | <_gumbercules> probably best to ask in #internals |
17:09:26 | FromDiscord | <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:11 | FromDiscord | <Phil> Wait a second, no I recalled correctly that refc does mark and sweep! |
17:11:16 | FromDiscord | <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:34 | FromDiscord | <jviega> It's exactly what I just said |
17:11:35 | FromDiscord | <Phil> Ah, but for the cycle phase |
17:11:41 | FromDiscord | <Phil> Which is exactly the same as ORC, gnaa |
17:11:45 | FromDiscord | <jviega> Reference counting with mark and sweep only for cycle resolution |
17:11:47 | FromDiscord | <jviega> Yeah |
17:12:29 | FromDiscord | <jviega> Mark and sweep in a non-shared heap is dirt simple. So are basic compacting collectors |
17:13:02 | FromDiscord | <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:02 | FromDiscord | <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:07 | FromDiscord | <Phil> sent a long message, see http://ix.io/4HFB |
17:14:41 | FromDiscord | <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:37 | FromDiscord | <Chronos [She/Her]> This is pain |
17:18:59 | FromDiscord | <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:21 | FromDiscord | <nervecenter> You don't really need to have many explicit heap GC-managed references at all in most programs |
17:19:42 | FromDiscord | <jviega> And even if you do 🤷 in most programs. |
17:20:26 | FromDiscord | <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:47 | FromDiscord | <Chronos [She/Her]> I have drawn a grid by just creating a texture that's a white box :p |
17:28:21 | FromDiscord | <Chronos [She/Her]> https://media.discordapp.net/attachments/371759389889003532/1157005890373816352/image.png?ex=65170934&is=6515b7b4&hm=19bd80ac56d8e62ad867d86922d3415f0c7d20f7641b7d0fb35d5b89c83a4f6d& |
17:28:21 | FromDiscord | <_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:47 | FromDiscord | <_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:26 | FromDiscord | <_gumbercules> In reply to @chronos.vitaqua "I have drawn a": cheating! |
17:29:28 | FromDiscord | <_gumbercules> I'm kidding |
17:29:55 | FromDiscord | <Chronos [She/Her]> :P |
17:30:29 | FromDiscord | <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:48 | FromDiscord | <_gumbercules> well this is also not that important in certain areanas / disciplines |
17:31:11 | FromDiscord | <_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:31 | FromDiscord | <_gumbercules> but I mean - https://github.com/niklas-ourmachinery/bitsquid-foundation |
17:32:10 | FromDiscord | <_gumbercules> this type of code you'll find in pretty much every single commercial game engine in one form or another |
17:33:22 | FromDiscord | <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:45 | FromDiscord | <_gumbercules> one of my favorite stories |
17:35:34 | FromDiscord | <_gumbercules> http://kylehalladay.com/blog/2019/12/04/Recreating-A-Dirty-Gamedev-Hack.html |
17:36:12 | FromDiscord | <Elegantbeef> When talking about garbage collection in this respect I always think of https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125 |
17:36:49 | FromDiscord | <Elegantbeef> Wait that's not the right article |
17:37:07 | FromDiscord | <Elegantbeef> Shame on me |
17:37:35 | FromDiscord | <Elegantbeef> But it contains the write up, so who cares |
17:37:48 | FromDiscord | <_gumbercules> `oldnewthing` haha |
17:37:49 | FromDiscord | <_gumbercules> there is nothing new under the sun |
17:38:09 | FromDiscord | <_gumbercules> but yeah - I've heard that one before |
17:38:51 | FromDiscord | <_gumbercules> I think it's a great example of how sometimes safety isn't the most critical concern |
17:39:21 | FromDiscord | <Elegantbeef> "Shit the enemy has learned how to use our unsafe memory practices to do a RCE and shut the missles down" 😄 |
17:39:24 | FromDiscord | <_gumbercules> or I guess in this case it wouldn't really be safety but collectin resources |
17:39:32 | FromDiscord | <_gumbercules> well, that's another matter |
17:39:40 | FromDiscord | <_gumbercules> I mean personally I'd be very worried about memory safety when designing missiles |
17:39:55 | FromDiscord | <_gumbercules> or software for missiles I should say - leaking resources not as much |
17:40:13 | FromDiscord | <_gumbercules> I gues what I meant to say is - it's a good examle of how everything is a tradeoff |
17:40:52 | FromDiscord | <_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:58 | FromDiscord | <Elegantbeef> Depending how silly you are cryptographically, leaking memory could result in your cryptokeys being left in memory |
17:41:12 | FromDiscord | <_gumbercules> and this is why designing software is a challenge - because you're constantly playing a game of balancing tradeoffs |
17:41:26 | FromDiscord | <_gumbercules> if there was some easy button solution to all of this - none of us would have jobs |
17:41:55 | FromDiscord | <_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:12 | FromDiscord | <Elegantbeef> It's still in transit! |
17:44:08 | FromDiscord | <_gumbercules> better figure out how to make it fly faste then |
17:46:25 | FromDiscord | <Elegantbeef> Or just launch it closer |
17:56:50 | FromDiscord | <toma400> In reply to @chronos.vitaqua "": Aww, that looks so cute ❤️ |
18:01:10 | FromDiscord | <Chronos [She/Her]> Thanks! It's definitely not the final assets tho xD |
18:01:22 | FromDiscord | <Chronos [She/Her]> It's just some temp ones until my friend makes the actual assets aha |
18:29:14 | FromDiscord | <Phil> Trying to try out essentially 2 way bindings on a gtk form field in owlkettle.↵Levels of pain: high, but measurable >_> |
18:30:12 | FromDiscord | <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:59 | FromDiscord | <leorize> someone should port relm to nim \:P |
18:47:27 | FromDiscord | <Chronos [She/Her]> Relm? |
18:47:50 | FromDiscord | <Chronos [She/Her]> Also I really need to work on a map editor sigh |
18:48:22 | FromDiscord | <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:28 | FromDiscord | <leorize> https://relm4.org/↵(@Chronos [She/Her]) |
18:51:23 | FromDiscord | <Chronos [She/Her]> That seems like pain to port lol |
18:52:31 | FromDiscord | <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:35 | FromDiscord | <Phil> Seems to be the same thing twice to me |
19:15:24 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#ix=4HFY |
19:15:25 | FromDiscord | <aintea> Do you have any ideas ? |
19:19:58 | FromDiscord | <Phil> In reply to @aintea "Hello, I'm using [argparse](<https://www.iffycan.co": You basically want this proc to be able to return different types depending on what command you put in right? |
19:20:25 | FromDiscord | <Phil> That's not possible.↵Or rather, you need a different approach. As in, an object that can be all kinds of types at once, aka an "object variant" |
19:20:58 | FromDiscord | <aintea> In reply to @isofruit "You basically want this": I don't really think I want this, I wanted it to return a parser like object |
19:21:08 | FromDiscord | <Phil> Define a "parser like object" |
19:21:26 | FromDiscord | <aintea> like `argparse` lib in python |
19:21:38 | FromDiscord | <Phil> Never used that so I can't say much there |
19:21:56 | FromDiscord | <aintea> basically when you use it you can do something like this |
19:22:46 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#ix=4HG1 |
19:23:27 | FromDiscord | <aintea> nim argparse usage in docs looks like what `argparse` does in python so I assumed in nim, my function would return an object |
19:23:39 | FromDiscord | <aintea> a struct if you prefer |
19:25:01 | FromDiscord | <Phil> Note a lot of magic that works in python works because of how python packs a lot of extra-data with its objects that nim just doesn't have because it tries to solve a lot of stuff ahead of time (via the static type system).↵That makes more dynamic things like this a bit tricky.↵Note that the guy used a lot of templates which are essentially copy-paste instructions, let me think on what the correct useage seems to be here given that I nev |
19:25:27 | FromDiscord | <aintea> basically if I want a function to put the "parsing cli args" in it |
19:25:39 | FromDiscord | <aintea> and returns something I can use in other files or functions |
19:26:40 | FromDiscord | <vindaar> You should be able to just return `auto` in this case. Better would be to look at the `argparse` library to see what kind of type `parse` returns and use that |
19:26:49 | FromDiscord | <evissim> The warning for ImplicitDefaultValue mentions using a semicolon but it's not clear where it wants that, for example in `color(r, g, b, a: int = 255) = ...` |
19:27:06 | FromDiscord | <Phil> In reply to @vindaar "You should be able": You think this can be handled via generic? |
19:28:00 | FromDiscord | <Phil> The reason I'm unsure if that'd work or not was mainly because I don't know if the output of e.g. parser.parse(args) will always be the same kind of object or not |
19:28:00 | FromDiscord | <aintea> In reply to @vindaar "You should be able": that's a thing in nim ? could I have more information about what `auto` implies ? |
19:28:45 | FromDiscord | <vindaar> sure, as long as `parser.parse(args)` returns anything that resembles a somewhat sane type that should work↵(@Phil) |
19:28:51 | FromDiscord | <vindaar> (not saying it's ideal, but for the kind of situation where it's hard to express what the type is, `auto` is useful) |
19:29:50 | FromDiscord | <vindaar> auto just means the compiler deduces the type for you. It's not so nice because reading the code then doesn't tell you what type it is that is returned. But given that `argparse` constructs everything via macros it's not really possible (from a quick glance) to write the name there before hand↵(@aintea) |
19:29:59 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4HG2 |
19:30:36 | FromDiscord | <aintea> okay nice |
19:30:54 | FromDiscord | <aintea> will try this and come back if I need some more help that I can't find in the docs |
19:30:56 | FromDiscord | <aintea> thanks you |
19:31:21 | FromDiscord | <Phil> In reply to @aintea "will try this and": You can also apply `auto` to output types, it's somewhat situational on how that works in those scenarios, I think in your scenario it'll lead to 1 `parse_args` proc being generated with the appropriate type that the parser returns.↵↵Assuming the parse proc returns the same type every time |
19:32:24 | FromDiscord | <Phil> Note that you can also write generics this way:↵`proc echoMe[T](x: T) = echo x`, this allows you to do stuff like state that e.g. the input and output type must have the same type or similar "constraints" on how different generic types in a generic are related to one another |
19:32:42 | FromDiscord | <aintea> okay |
19:32:44 | FromDiscord | <aintea> but can I do like |
19:33:16 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#ix=4HG3 |
19:33:25 | FromDiscord | <aintea> is it basically how auto works ? |
19:33:28 | FromDiscord | <Phil> Yes you can, or rather should be possible I haven't tried yet |
19:33:30 | FromDiscord | <Phil> And yes it is |
19:33:35 | FromDiscord | <aintea> okay |
19:33:38 | FromDiscord | <aintea> thanks you |
19:33:40 | FromDiscord | <aintea> (edit) "thanks" => "thank" |
19:35:40 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4HG5 |
19:36:12 | FromDiscord | <aintea> oh so it wouldn't work in my case |
19:36:21 | FromDiscord | <Phil> So with `returnMe[string]` you basically tell the compiler "T is string" and that it then uses to copy-paste a `returnMe` proc together |
19:37:00 | FromDiscord | <Phil> Yeah, looks like it, `auto` is more convenient syntax there.↵Note that stuff like `typed` or `untyped` is completely out of the question in these scenarios, that definitely goes into metaprogramming territory and is used only with templates/macros as the compiler already told you. |
19:37:25 | FromDiscord | <aintea> oh so that's how it works |
19:37:45 | FromDiscord | <aintea> now my main file doesn't want me to import my module |
19:37:47 | FromDiscord | <Phil> Because with templates and compilers you're less writing code directly, you're writing code that writes code and treats types more as a "I need to write that into the code so I can later compile this" |
19:37:58 | FromDiscord | <Phil> (edit) "compilers" => "macros" |
19:38:27 | FromDiscord | <Phil> In reply to @aintea "now my main file": Got to specify the error message, that statement doesn't tell anyone what the problem is 😉 |
19:38:50 | FromDiscord | <aintea> I think it's on the docs so I think imma find a solution fast |
19:39:27 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#ix=4HG8 |
19:40:10 | FromDiscord | <aintea> I'm importing `parseargs.nim` with this: `import parseargs` |
19:40:43 | FromDiscord | <aintea> and using `parse_args` function in my module (the function you helped me with) like this `parse_args(commandLineParams)` |
19:41:02 | FromDiscord | <Phil> Ahhhh you're from python so you might not have had to deal with that yet.↵In nim a proc defined in another module is private aka invisible when you import that file |
19:41:13 | FromDiscord | <Phil> That is by default the case. You need to export it in one of two ways: |
19:41:13 | FromDiscord | <aintea> ooooooh |
19:41:19 | FromDiscord | <aintea> so I have to put in front of it |
19:41:25 | FromDiscord | <aintea> I saw it in the docs |
19:41:27 | FromDiscord | <vindaar> Note that `proc foo[T](x: string): T = ...` is not equivalent to `proc foo(x: string): auto = ...`! |
19:41:29 | FromDiscord | <Phil> 1) You mark the proc with ``, so `parse_args`↵2) you use `export parse_args` |
19:41:50 | FromDiscord | <Chronos [She/Her]> First syntax is preferred when possible, right? Since it's more idiomatic |
19:41:52 | FromDiscord | <aintea> which one would be better in my case ? |
19:42:56 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4HGa |
19:45:54 | FromDiscord | <Phil> sent a long message, see http://ix.io/4HGc |
19:46:42 | FromDiscord | <Chronos [She/Her]> I meant for exporting :p |
19:46:44 | FromDiscord | <Phil> (edit) "http://ix.io/4HGc" => "http://ix.io/4HGd" |
19:47:10 | FromDiscord | <Phil> Oh that... yeah no clue, I just use `` because I'm a lazy bastard, using `export` is more explicit though but ehhhhh |
19:47:51 | FromDiscord | <aintea> more nimonic (how do we say it's pythonic but for nim ?) = better |
19:48:13 | FromDiscord | <Phil> I'mma go with nimmish |
19:48:20 | FromDiscord | <Chronos [She/Her]> Lol fair |
19:48:50 | FromDiscord | <aintea> yeah |
19:48:56 | FromDiscord | <aintea> more nimmish = better |
19:51:46 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4HGf |
19:52:47 | * | ntat quit (Quit: leaving) |
20:11:12 | FromDiscord | <Chronos [She/Her]> Anyone have an idea of the best way for me to be able to get the current mouse position relative to a grid I've drawn? :P |
20:20:45 | FromDiscord | <Elegantbeef> `(MouseX - GridStartX) div GridWidth` |
20:21:09 | FromDiscord | <Elegantbeef> Or mod depending what value you're after |
20:21:15 | FromDiscord | <Elegantbeef> Mod will return how many pixels from the side, div will return the grid index |
20:27:58 | FromDiscord | <Chronos [She/Her]> MouseX only? Why not the Y? Or is that implied lol |
20:32:30 | FromDiscord | <Chronos [She/Her]> Also that gives like, 4 different values per a cell in the grid |
20:32:37 | Amun-Ra | well, you need both |
20:33:58 | FromDiscord | <Chronos [She/Her]> For the Y yeah I'd imagine :p |
20:35:39 | FromDiscord | <Chronos [She/Her]> It may be easier to just have a rectangle per grid cell tbh, but then I'd have to iterate through each one which is... Not ideal |
20:50:40 | termer | Elegantbeef, You just helped me uncover a GitHub bug lol |
20:50:56 | termer | I clicked on the link to view your issue comment on GitHub from my email, and it asked me to verify my 2FA |
20:51:02 | termer | After I did, I got redirected to here: https://github.com/_view_fragments/issues/show/termermc/nim-stack-strings/7/issue_layout |
20:56:12 | FromDiscord | <Elegantbeef> I would've figured you could've thought that out 😛↵(@Chronos [She/Her]) |
20:56:16 | FromDiscord | <Elegantbeef> I'm a god termer I can make bugs appear that wouldnt otherwise happen |
21:02:45 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "I would've figured you": You underestimate how thick-skulled I can be! But yeah, the code isn't too great :p |
21:02:59 | * | advesperacit quit () |
21:42:07 | FromDiscord | <wick3dr0se> sent a long message, see http://ix.io/4HGF |
21:50:00 | FromDiscord | <_gumbercules> AI doesn't love anything, it's a bunch of floating point math |
21:53:35 | FromDiscord | <ieltan> guys what's a flowvar ? |
21:53:53 | FromDiscord | <ieltan> is it like a future but for threads ? |
21:53:58 | FromDiscord | <Elegantbeef> Practically a threaded future |
21:56:11 | FromDiscord | <ieltan> great, thanks ! |
22:10:40 | FromDiscord | <Chronos [She/Her]> What if async stuff was built to integrate with threading and stuff, how complicated would that be? |
22:10:58 | FromDiscord | <Chronos [She/Her]> So you could await a future from another thread, also would there be any point? |
22:11:34 | FromDiscord | <Elegantbeef> Refer to Rust's async library that allows finishing 'future's on other threads |
22:13:56 | FromDiscord | <Chronos [She/Her]> Is it called Tokio? And what's the issue with it? |
22:14:08 | FromDiscord | <Elegantbeef> Who said there was an Issue |
22:16:11 | FromDiscord | <Elegantbeef> But yea I think it's tokio |
22:16:16 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4HGR |
22:16:27 | FromDiscord | <ieltan> im preeetty sure it doesn't do what i think it does |
22:16:29 | FromDiscord | <Elegantbeef> Nope |
22:16:39 | FromDiscord | <ieltan> damn |
22:16:40 | FromDiscord | <Elegantbeef> Each thread has it's own Async dispatcher |
22:17:11 | FromDiscord | <ieltan> i see |
22:17:13 | FromDiscord | <Chronos [She/Her]> Unless you set them to all be the same somehow |
22:17:30 | FromDiscord | <Chronos [She/Her]> There's getGlobalDispatcher and setGlobalDispatcher iirc |
22:17:31 | FromDiscord | <ieltan> using ref ? |
22:17:39 | FromDiscord | <Chronos [She/Her]> Nope, using what I just said |
22:17:44 | FromDiscord | <ieltan> oh |
22:17:54 | FromDiscord | <Chronos [She/Her]> I did it between DLLs, should work with threads if you can pass the main dispatcher around |
23:22:52 | * | LyndsySimon quit (Ping timeout: 248 seconds) |
23:23:18 | * | LyndsySimon joined #nim |
23:23:37 | * | madprops_ joined #nim |
23:23:40 | * | alice quit (Killed (lithium.libera.chat (Nickname regained by services))) |
23:23:42 | * | alice joined #nim |
23:23:56 | * | madprops quit (Ping timeout: 248 seconds) |
23:31:27 | * | madprops_ is now known as madprosp |
23:31:35 | * | madprosp is now known as madprops |
23:31:35 | * | madprops quit (Changing host) |
23:31:35 | * | madprops joined #nim |
23:54:55 | FromDiscord | <my.narco> in terms of maturity what would you say is more mature and larger-project viable. nim or odin? |
23:56:30 | FromDiscord | <Elegantbeef> I've toyed with Odin, it's usable although less mature than Nim imo |
23:56:39 | FromDiscord | <Elegantbeef> I also disagree with some of the language design and gingerbill's views |
23:57:09 | FromDiscord | <my.narco> i was writing my own programming language and i came into a large issue with recursion and wanted to rewrite it in nim |
23:58:06 | FromDiscord | <Elegantbeef> I did notice performance issues with Odin vs. Nim in my unscientific comparisons |
23:58:33 | FromDiscord | <my.narco> this was my main issue, the left recursion was basically impossible because of the typing https://media.discordapp.net/attachments/371759389889003532/1157104089528815656/image.png?ex=651764a8&is=65161328&hm=c0b4d7f58a12bb2b1e5d41f6fa6ae1413d1d98899a5fde11bd46533a8f20766a& |
23:59:39 | FromDiscord | <my.narco> is there any way you think i could get this to work in nim? https://media.discordapp.net/attachments/371759389889003532/1157104365585317980/nodes.odin?ex=651764ea&is=6516136a&hm=d761012a68bd90cdcb1f911bdb383d80166c1b5d8e1266deb415a6520a0d12b8& |
23:59:47 | FromDiscord | <my.narco> these are my node types |