<< 06-08-2023 >>

00:09:54*hohlerde quit (Quit: Connection closed for inactivity)
00:25:14FromDiscord<Chronos [She/Her]> `std/sugar` provides the `=>` macro right?
00:25:28FromDiscord<Chronos [She/Her]> For `(arg: Type) => function body`
00:34:39*Guest99 joined #nim
00:35:08Guest99Block and Break without name is deprecated. Why
00:35:26Guest99In nim 2.0 that stands out with red lights attached.
00:36:41Guest99Naming things is incredibly hard and now you want to force me to name local scope for what reason? Please explain the rationale for limiting something for no good reason I can think of
00:37:13FromDiscord<Elegantbeef> It made flow control hard to reason
00:37:28FromDiscord<Elegantbeef> it also made it possible to have a block you could not escape
00:37:31FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=
00:37:32FromDiscord<Elegantbeef> Whoops
00:37:51FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/JH3nU
00:41:06Guest99Isn't this just the same argument for named for Loops
00:41:18FromDiscord<Elegantbeef> Not really
00:41:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Cw3
00:42:14*Guest99 quit (Quit: Client closed)
00:42:33*Guest79 joined #nim
00:42:33Guest799
00:42:53Guest79Damn phone... Sorry can you send the Last Link again?
00:43:06FromDiscord<Elegantbeef> Uhh I'm not sending links manually
00:43:51Guest79I tired to open a code example and the irc window got eaten by Firefox
00:44:06FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4Cw3
00:44:29Guest79Anyways you're saying that there are not just a "naming things are good" argument to this?
00:45:01FromDiscord<Elegantbeef> I'm saying that if you just are scoping use `if true` otherwise a named block is fine
00:45:33FromDiscord<Bloss> In reply to @Guest99 "Block and Break without": You can still name block, you cannot break it tho 😛
00:45:47FromDiscord<Bloss> I mean you can still use block without name
00:46:25FromDiscord<Elegantbeef> Well it's a warning right now but will be an error eventually
00:47:48Guest79I will do my homework on this. It's just something I feel strongly about that it's a big Mental workload to have to name things all of the time. I don't like my local variables to spill over. Example. Say you need a transient variable in a switch case. Using curly braces in C is standard solution. No names required.
00:49:06FromDiscord<Elegantbeef> If you really want to make it cleaner a simple `template scoped(body: untyped): untyped = if true: body` works
00:49:55Amun-Ra99% of my blocks are not named
00:50:08FromDiscord<Elegantbeef> Do you break out of them?
00:50:22Amun-Ranope
00:50:37FromDiscord<Elegantbeef> Then `if true` or `scoped` is what you really want
00:51:10Amun-RaI use them to narrow down the scope
00:51:15Guest79"scoped"?
00:51:21FromDiscord<bostonboston> I think for me the only time I have ever used a block was to break
00:51:23FromDiscord<Elegantbeef> The template I just wrote
00:51:49FromDiscord<Elegantbeef> I swear if you accidently disconnected from IRC again I'll fly to your house and force you to use matrix
00:52:23FromDiscord<Elegantbeef> People often misuse block for scoping, and it can create issues
00:52:36Guest79https://play.nim-lang.org/#ix=4Cw6 this Works in Nim right now like in all other languages I Know that has a block scope. It would be sad to see it limited.
00:52:54Guest79I think that is the problem. I use block for scoping
00:52:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Cw7
00:53:03FromDiscord<Elegantbeef> Right
00:53:07FromDiscord<Elegantbeef> `if true` does that
00:53:15FromDiscord<Elegantbeef> And if you want to be more explicit use that template I showed
00:53:32Amun-Rahow is that ambiguous?
00:53:32FromDiscord<Elegantbeef> The actual use case of block is akin to goto
00:54:58FromDiscord<Elegantbeef> This is the the desired use case of blocks
00:55:02FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Cw8
00:56:00FromDiscord<Elegantbeef> Like I said though unnamed blocks are quite easy to replace with `if true` or a template call and suggested by araq
00:56:16FromDiscord<Elegantbeef> An alternative is to make an RFC to make unnamed blocks equivalent to `if true`
00:56:26FromDiscord<Elegantbeef> But that's a breaking change
00:56:31FromDiscord<Elegantbeef> Cause it changes the semantics
00:57:06Guest79Because you cannot Break out of a if
00:57:23Guest79But also Why do I expect to be able to break out of a template
00:57:29Guest79That's a hidden internal
00:57:49Guest79The macro should not allow break it should break the for loop
00:57:51FromDiscord<Elegantbeef> That's the point though, you do not expect to be able to break out of a template you expect to be able to break out of your loop
00:58:06FromDiscord<Elegantbeef> And if the template expands into a for loop
00:59:01Guest79Then that should be part of the API
00:59:10FromDiscord<Elegantbeef> It shouldnt be
00:59:21FromDiscord<Elegantbeef> You should just not use block for scoping as it's not intended to be used that way
00:59:42Guest79I'm allergic to the throw exemption mess in Python and the I think this is in that direction
01:00:01FromDiscord<Elegantbeef> The what mess?
01:00:11FromDiscord<Elegantbeef> Are you even a Nim user?
01:00:31Guest79You don't degine clearly what exception a method is allowed to throw
01:00:45FromDiscord<Elegantbeef> Cool Nim allows you to with `{.raises:[].}`
01:00:47Amun-Rain nim? you do
01:00:49FromDiscord<bostonboston> How is that even remotely related
01:00:49FromDiscord<Elegantbeef> So next complaint?
01:01:01Amun-Rasecond non-issue
01:01:40FromDiscord<Elegantbeef> That's so tangential physicists use it too calculate torque
01:02:08Guest79Your suggestions here that a user or a macro Should rely on magic names for breaking forloops sounds more to me like a mess. Make the symbols explicit. If I need to break out of a generated for Loop make that symbol part of the instantiation of the macro
01:02:26FromDiscord<Elegantbeef> Lol
01:02:38Amun-Rauhm
01:02:43FromDiscord<bostonboston> What
01:03:06FromDiscord<Elegantbeef> All templates/macros need to have a `template breakOutOfThisSpecificLoop(): untyped = break`
01:03:14FromDiscord<Elegantbeef> Cause that makes sense
01:03:44FromDiscord<Elegantbeef> Nested macros, well you see we just keep adding 4 to the ident cause I rolled a die and it guaranteed it was random
01:04:24FromDiscord<Elegantbeef> It's funny that it's no longer having named blocks that is getting complained about
01:04:25Guest79Sure that can get the job done. And then this things turn up;)
01:04:25FromDiscord<Elegantbeef> Changing `block` to `scoped` or `if true` is super simple and gives the exact same API
01:04:25FromDiscord<Elegantbeef> "But I don't wanna"
01:04:43FromDiscord<Elegantbeef> Have you actually written a sufficiently sized Nim program?
01:05:03Guest79I have my ways I like to write my code. And I like to continue doing so
01:05:17FromDiscord<bostonboston> The point beef was trying to make that the intended use case for blocks results in ambiguous control flow if the blocks are unnamed, and if you are not using blocks for control flow you should not be using blocks (i think)
01:05:20Guest79If someone thinks it's bad they should be able to stop doing that
01:05:51Guest79Everyone wins. Different use cases and context
01:05:54FromDiscord<Elegantbeef> So you're not a Nim programmer complaining that a change has caused you to not write Nim code the same way you were not writing Nim code?
01:06:21FromDiscord<Elegantbeef> Everybody wins when no one uses `block` in a way it was not intended
01:06:35Guest79That Works for me?
01:06:44FromDiscord<bostonboston> And migration to this new change is simple, find and replace `block:` with `if true:` or a macro, and anything youre left with give a name
01:06:58FromDiscord<Elegantbeef> Templates and macros work, it's clear where you're breaking, but it's different so you don't like it
01:07:11Guest79Now I need to add if true: instead. Which is confusing because in Python say it doesn't create context
01:07:24FromDiscord<bostonboston> okay?
01:07:25FromDiscord<Elegantbeef> Cool Nim isnt Python the last I checked
01:07:33Guest79Neither in C unless you add curlys
01:07:33FromDiscord<Elegantbeef> I'll check again just to make sure
01:07:48FromDiscord<Elegantbeef> Nope... it's not Python or C
01:07:51FromDiscord<bostonboston> in c is a pointer but `proc doThing()` isnt a pointer type?
01:07:59FromDiscord<bostonboston> (edit) "" => "``"
01:08:03FromDiscord<that_dude.> Is something forcing you to use the latest release? You could just stay on a version that doesn't throw the warning
01:08:07FromDiscord<Elegantbeef> I know it might be confusing but `.nim` `.py` and `.c` have no overlap
01:08:16FromDiscord<Elegantbeef> You could even just disable the warning
01:08:21Guest79That is fine. Not being C or Python
01:08:22FromDiscord<Elegantbeef> Crazy I know
01:08:41Guest79BUT. If you against the mainstream. It should do so for a very good reason
01:08:49FromDiscord<bostonboston> `let` in JS and Nim mean different things, do we need to change that too
01:09:01FromDiscord<Elegantbeef> C doesnt have a block keyword
01:09:02FromDiscord<Elegantbeef> It has `{}`
01:09:07Amun-Raa var has completely different scope in js, too
01:09:25Guest79I don't understand var så i never use it TBH
01:09:26FromDiscord<Elegantbeef> So cannot use C as reference
01:09:36FromDiscord<Elegantbeef> Does python have a `block` keyword?
01:09:51FromDiscord<bostonboston> what
01:09:56FromDiscord<bostonboston> you dont understand var?
01:10:08FromDiscord<bostonboston> in Nim or JS
01:10:36Guest79I think they just introduced it but I haven't really used it in Python yet as my Python standard is 15 years old I only use generators that are newer than 2.7... :)
01:10:40FromDiscord<Elegantbeef> There is no feature in python that creates a block that I can tell
01:10:40FromDiscord<Elegantbeef> So cannot reference python either
01:11:00Guest79It might have check 3.10.or even 3.12
01:11:09Guest793.11*
01:11:22Guest79Maybe it works like you say
01:11:29Amun-Rathis is how var works in JS: https://onecompiler.com/javascript/3zgpmhwjp
01:11:49Guest79But Java Fortran and these they allow optional naming
01:12:02FromDiscord<Elegantbeef> Java has a named block syntax?
01:12:15Guest79Sorry for loops
01:12:24Guest79Fortran has named blocks
01:12:31Guest79Optional named
01:12:42FromDiscord<Elegantbeef> Ah yes mainstream languages like fortran
01:12:43Guest79Since 95 or 2003
01:12:59FromDiscord<bostonboston> We should all move to forth
01:13:19Guest79Fortran has been around for 70 years Id pay attention to their wisdom in language design
01:14:38FromDiscord<Elegantbeef> Lol
01:14:38FromDiscord<Elegantbeef> C has been around for nearly as long and it's language design is that of a wet paper bag
01:14:38FromDiscord<Elegantbeef> Longevity does not mean good design
01:15:24FromDiscord<bostonboston> I suppose that means we should move Nim to a fortran backend
01:16:21Amun-Rano punched cards support in nim? what a mess…
01:16:30FromDiscord<that_dude.> I'd argue that a long history means that they're even more afraid to improve design out of fear of breaking anything
01:17:02FromDiscord<bostonboston> Thats JS problem and they havent even been around that long
01:17:07Amun-Rawell, they like to add/remove meaningless things in C
01:18:13FromDiscord<Elegantbeef> Well bikeshedding has been fun, anyone have something of merit to talk about? 😄
01:18:27FromDiscord<bostonboston> sprintf_s was a good addition
01:19:50Amun-Rabut it's optional
01:20:31FromDiscord<bostonboston> I like my buffer overflows
01:20:33Guest79More things are made optional in c11/c14
01:21:08Guest79Basically wreaking the previous standard
01:22:00Guest79Sorry I went of to see if I could find a mention of block In a recent Python changelog.. I could not. Strange it seems like such a Good Idea
01:22:21FromDiscord<bostonboston> I think the only way to scope in python is make a new class
01:22:27FromDiscord<bostonboston> I love classes so much
01:22:32Guest79They have with context instead. Which isn't a context LoL
01:24:19Guest79I was raised with Pascal so OOP is forever not natural to me, data and algorithms go together like oil and water. ;)
01:24:27FromDiscord<that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4Cwd
01:24:44FromDiscord<that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4Cwe
01:25:55FromDiscord<varriount> In reply to @Elegantbeef "There is no feature": As far as I know, Python doesn't have anything like Nim's `block`.
01:26:11Amun-Ranope
01:26:27FromDiscord<bostonboston> The like 3rd language i sorta learned was Object Pascal (:
01:26:59FromDiscord<bostonboston> Delphi xe8 baybe
01:27:17FromDiscord<Elegantbeef> Look at these wild languages, while I just learned C# then Nim
01:27:44FromDiscord<that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4Cwf
01:27:50Guest79I think block names are symbols so variable names would be not allowed.
01:28:22Guest79Fortran (sry) allows numerical values as labels for tradition. ;)
01:28:49FromDiscord<that_dude.> Though that may not worked for typing reasons ig
01:28:55FromDiscord<that_dude.> (edit) "worked" => "work"
01:29:02Guest79So I could just give my blocks meaning names like 42
01:29:03FromDiscord<that_dude.> (edit) "Though that may not work ... for" added "be possible"
01:29:05FromDiscord<bostonboston> I took a class with C, python and matlab then forgot all of it, sort of used Forth for a minecraft mod, took more classes that taught ASM -> C, then Verilog if you want to consider that, then got a job i concurrently had to use C# and Delphi and start learning Nim during all that
01:30:04FromDiscord<bostonboston> On my list is also to learn JS and HTML/CSS but i really do not want to
01:31:09Guest79Don't learn frameworks. They will rot your Mind. First look at UI development from the old days. Like Deluxe paint from 1984 in KR C
01:31:57FromDiscord<bostonboston> Just riding on the idea of convincing my boss to switch to Nim for web dev (:
01:32:05Guest79Anyways good helpful discussion at least I Know where the Idea comes from now. Thx 🙏
01:33:04*Guest79 quit (Quit: Client closed)
02:25:42FromDiscord<Chronos [She/Her]> Hey y'all, I remember when I first started using Nim in nanorc, the original nanorc I found was kinda shit, and because of that, I've been tweaking and updating it over time, just wanna say if anyone wants a copy of it, hmu
02:26:12FromDiscord<Chronos [She/Her]> It's definitely still very incomplete but much, much better than the original I found
03:25:13*lucasta quit (Quit: Leaving)
05:02:03FromDiscord<odexine> I kinda do wonder now about named loops, what kind of reasoning would one go with that instead of blocks for breaking and stuff
05:02:50FromDiscord<odexine> In reply to @yu.vitaqua.fer.chronos "Hey y'all, I remember": Better to upload it to gist and post it on the forums for searchability
05:10:28FromDiscord<.matrixagent> In reply to @odexine "Better to upload it": Who is kanon
05:10:41FromDiscord<odexine> Anime girl on my avatar
05:10:47FromDiscord<.matrixagent> Where is she from
05:11:31FromDiscord<.matrixagent> In reply to @Elegantbeef "Look at these wild": C# gonna get as fast as C++
05:11:40FromDiscord<.matrixagent> Microsoft pumping too much money in it
05:13:43FromDiscord<Elegantbeef> Who cares if it's as fast as C++
05:16:41FromDiscord<terrygillis> sent a long message, see http://ix.io/4CwU
05:19:51FromDiscord<Elegantbeef> `method` is a nim keyword, juan made the odd choice of using `metod`
05:27:26FromDiscord<.matrixagent> In reply to @Elegantbeef "Who cares if it's": Me
05:28:53FromDiscord<odexine> In reply to @.matrixagent "Where is she from": Love live superstar
05:29:27FromDiscord<.matrixagent> In reply to @odexine "Love live superstar": Looks mid
05:29:28FromDiscord<odexine> In reply to @Elegantbeef "`method` is a nim": Maybe jsmethod would have been better
05:29:47FromDiscord<odexine> In reply to @.matrixagent "Looks mid": I mean up to you if it’s good to you or not
05:30:06FromDiscord<.kanaxa> "...By default, the Nim compiler generates a large number of runtime checks aiming for your _debugging pleasure_. With `-d:release` some checks are turned off and optimizations are turned on."↵↵I like Araq's cheekiness on the "debugging pleasure" part - though I've to admit that debugging can be fun sometimes, it's a bit like a puzzle game
05:53:17FromDiscord<.kanaxa> I find the backwards index operator (`^`) to be quite sexy
05:53:27FromDiscord<.kanaxa> But just checking my understanding: it only works with arrays/seqs?
05:53:43FromDiscord<.kanaxa> sent a code paste, see https://play.nim-lang.org/#ix=4CwX
05:54:01*ntat joined #nim
05:54:01FromDiscord<.kanaxa> (edit) "https://play.nim-lang.org/#ix=4CwX" => "https://play.nim-lang.org/#ix=4CwY"
05:54:48FromDiscord<.kanaxa> (edit) "https://play.nim-lang.org/#ix=4CwY" => "https://play.nim-lang.org/#ix=4CwZ"
06:02:24FromDiscord<Phil> In reply to @.kanaxa "But just checking my": I mean what does a range like this look like?
06:02:38FromDiscord<Phil> Like conceptually, what would you expect 0 to ^10 to be?
06:06:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Cx4
06:07:22FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4Cx4" => "https://play.nim-lang.org/#ix=4Cx5"
06:15:10FromDiscord<.kanaxa> In reply to @isofruit "Like conceptually, what would": Like I thought it would be 0 - 9, since it starts counting from the back
06:15:34FromDiscord<.kanaxa> I thought it was a range-like syntax, glad to know it's an array shorthand
06:15:38FromDiscord<.kanaxa> (edit) "I thought it was a range-like syntax, glad to know it's an array ... shorthand" added "access"
06:17:14FromDiscord<.kanaxa> In reply to @isofruit "But yeah, there are": Oh, this is really interesting - I didn't know you couldn't iterate over tuples in Nim!
06:18:09FromDiscord<.kanaxa> In my head I'm visualizing this as there being no underlying `iter` method, haha
06:19:52FromDiscord<.kanaxa> Now that I think about it, `echo a[^1]` in Nim feels like `print(a[-1])` in Python
06:22:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Cx6
06:23:56FromDiscord<Phil> In reply to @.kanaxa "In my head I'm": Which is pretty much what's happening here. Just in the python context, you have `iter` directly associated with an object.↵Here the implicitly called iter method can be wherever, it just needs to be accessible imported or defined in the context where you're trying to iterate
06:25:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Cx8
06:25:45FromDiscord<.kanaxa> Which makes me wonder then: how can I make a tuple in Nim iterable? can I give it some sort of iter property
06:25:54FromDiscord<.kanaxa> In reply to @isofruit "You can, just not": Oh, a `fields` property? Interesting
06:26:08FromDiscord<.kanaxa> (edit) "property?" => "iterator?"
06:26:31FromDiscord<Phil> In reply to @.kanaxa "Oh, a `fields` iterator?": "iterator" is a specific concept just like proc etc.↵Objects and tuple have iterators such as `fields`, `fieldPairs`, etc defined for them
06:28:56FromDiscord<.kanaxa> sent a code paste, see https://play.nim-lang.org/#ix=4Cx9
06:30:23FromDiscord<Phil> In reply to @.kanaxa "I was wondering as": https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implicit-itemsslashpairs-invocations↵Because they're identical, one just calls items implicitly.↵Another default iterator is "pairs"
06:31:18FromDiscord<Phil> which gets called on↵`for index, value in ["la", "le", "li", "Lo", "lu"]: echo index, ": ", value`
06:31:58FromDiscord<.kanaxa> The `pairs` one makes sense, but this implicit calling for `items`is new to me, and glad there's a documentation for it, didn't see it - now it makes sense
06:31:59FromDiscord<.kanaxa> (edit) "The `pairs` one makes sense, but this implicit calling for `items`is new to me, and glad there's a documentation for it, didn't see it - now it makes sense ... " added "to me"
06:32:55*thomasross quit (Ping timeout: 240 seconds)
06:32:59FromDiscord<Elegantbeef> Oh speaking of pairs Phil, pairs actually works on variants, it's the parallel iterator that does not
06:33:42FromDiscord<Phil> never dealt with parallel, I assume that one implicitly goes into multithreading?
06:34:01FromDiscord<Phil> (edit) "goes into multithreading?" => "loops over the iterable concurrently?"
06:34:39FromDiscord<Phil> In reply to @.kanaxa "The `pairs` one makes": That one in particular is the equivalent to Rusts "The Book", it is the manual containing the entire language spec
06:35:05FromDiscord<Elegantbeef> I mean `for fieldA, fieldB in fields(a, b)`
06:35:08FromDiscord<Phil> If you're trying to figure out "how does this syntax construct work", the manual likely has something on it
06:35:29FromDiscord<Phil> Waaaait a minute, don't we have zip or sth for that?
06:36:42FromDiscord<Elegantbeef> How would zip work for unrolling two loops over a non homogenous data type
06:37:11FromDiscord<Phil> Having no good answer to that one: In would work magically
06:37:17FromDiscord<Phil> (edit) "In" => "It"
06:37:31FromDiscord<Phil> Just do the thing I have in my mind every time
06:39:40FromDiscord<Phil> Actually couldn't you do it as long as they have the same number of fields?
06:40:07FromDiscord<Elegantbeef> I mean it's used on fields of the same type yield mutable fields
06:40:13FromDiscord<Elegantbeef> objects of the same type\
06:40:29FromDiscord<Elegantbeef> It's also unrolled cause each branch is different for each field
06:40:33FromDiscord<Phil> the loop is going to unroll based on the order the fields are defined in anyway.↵So take the first field of each object, pack them in a tuple, return that for the loop.↵Then do that for the next field.↵etc.
06:41:08FromDiscord<Elegantbeef> Nice now you no longer have a reference and have a copy
06:41:29FromDiscord<Phil> Perfect, exactly as intended, everything's broken!
06:41:39FromDiscord<blackmius> In reply to @Elegantbeef "How would zip work": returning generic tuples?↵iterator zip[A, B](a: OpenArray[A], b: openArray[B]): Tuple[A, B]
06:42:16FromDiscord<Elegantbeef> Like I said you now have a copy and not unrolled
06:45:08FromDiscord<blackmius> ok, then only macros can
07:13:26FromDiscord<.kanaxa> Just thought I'd say: thanks for being kind and for sharing the Nim knowledge guys, y'all are really helpful
07:17:31*ntat quit (Quit: leaving)
07:23:18*azimut quit (Ping timeout: 240 seconds)
07:50:00FromDiscord<Phil> God writing a macro and having it work within like the first 5 tries is such a rush
07:50:07FromDiscord<Phil> (edit) "God" => "God,"
07:51:03FromDiscord<odexine> lmao
07:51:06FromDiscord<odexine> god bless genast?
07:51:23FromDiscord<Phil> dumpAstGen and ruthlessly copy pasting
07:51:24FromDiscord<terrygillis> In reply to @Elegantbeef "`method` is a nim": strange choice indeed, but what was the `method` keyword reserved for? I thought uses `proc` and `func` for procs with no side effect?
07:51:33FromDiscord<terrygillis> (edit) "In reply to @Elegantbeef "`method` is a nim": strange choice indeed, but what was the `method` keyword reserved for? I thought ... uses" added "nim"
07:53:18FromDiscord<odexine> method is for inheritance
07:53:22FromDiscord<odexine> dynamic dispatch
07:53:35FromDiscord<odexine> its an actual feature and not just reserved like "end" is
07:53:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CBY
07:54:02FromDiscord<Phil> Basically got most of it, just the default initialization for ref-types I'm currently writing
08:00:15FromDiscord<terrygillis> In reply to @odexine "method is for inheritance": I just did some googling, it seems `method` can only be used for refs as per manual: "Procedures always use static dispatch. Methods use dynamic dispatch. For dynamic dispatch to work on an object it should be a reference type." Why is that?
08:00:50FromDiscord<terrygillis> Also I wanted to try some Nim code but the playground is currently down where I live.
08:03:05FromDiscord<odexine> I don’t know, I don’t use methods so I’m not aware of the details
08:03:11FromDiscord<odexine> At least, I don’t remember
08:06:26FromDiscord<Phil> I mean, this is full on just conjecture on my part, but I'd assume it's because using dynamic dispatch means your objects need to carry pointers to their methods around.↵As a value type that gets copied a lot that seems less nice.
08:06:47FromDiscord<Phil> (edit) "nice." => "nice.↵Meanwhile with a ref-type you're just copying the reference to the heap where the object lives."
08:07:24FromDiscord<Phil> (edit) "I mean, this is full on just conjecture on my part, but I'd assume it's because using dynamic dispatch means your objects need to carry pointers to their methods around.↵As a value type that gets copied a lot that seems less nice.↵Meanwhile with a ref-type you're just copying the reference to the heap where the object ... lives." added "with all its method pointers"
08:08:49FromDiscord<Phil> actually never mind, you could have a single table of methods for each class and then your object just needs a pointer to that method-table for its class, solving that problem... wait is that what a vtable is?
08:08:59FromDiscord<Phil> (edit) "class" => "type"
08:22:18FromDiscord<Phil> sent a code paste, see https://paste.rs/kOhk1
08:22:22ehmrydid something change with isNil, dereferencing, and orc? this code gives me segfaults now https://git.syndicate-lang.org/ehmry/preserves-nim/src/branch/trunk/src/preserves.nim#L892
08:22:32FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CC2" => "https://play.nim-lang.org/#ix=4CC1"
08:23:06FromDiscord<odexine> In reply to @isofruit "actually never mind, you": IIRC
08:34:14FromDiscord<.maverk> ``%`` is not a modulo what is it in nim language ?
08:34:32FromDiscord<.maverk> to perform a modulo operation i can use mod
08:34:36FromDiscord<odexine> `mod`
08:34:38FromDiscord<odexine> Yes
08:34:40FromDiscord<.maverk> yes
08:34:43FromDiscord<.maverk> i know
08:34:45FromDiscord<.maverk> but
08:34:47FromDiscord<.maverk> %
08:34:48FromDiscord<.maverk> ?
08:34:52FromDiscord<odexine> % is not a binary operator in Nim
08:35:01FromDiscord<.maverk> what is it ???
08:35:04FromDiscord<odexine> Nothing
08:35:06FromDiscord<odexine> Not defined
08:35:28FromDiscord<odexine> At least for two parameter operations IIRC it is not defined
08:35:40FromDiscord<.maverk> https://media.discordapp.net/attachments/371759389889003532/1137665279594352651/Capture.PNG
08:35:45FromDiscord<odexine> Yes
08:36:00FromDiscord<odexine> That just means if someone defines an operator % that will be the precedence
08:36:12FromDiscord<odexine> That does not mean that it is an operator in the standard library
08:36:31FromDiscord<.maverk> aaah oky so i will abstain from using it
08:36:36FromDiscord<odexine> I mean
08:36:39FromDiscord<odexine> You can
08:36:40FromDiscord<.maverk> ?
08:36:47FromDiscord<.maverk> what can i use it for ?
08:36:56FromDiscord<odexine> If you want to define it you can, it’s not defined on the standard library precisely for one to define their own
08:36:59FromDiscord<odexine> Up to you I guess
08:37:18*ntat joined #nim
08:37:20FromDiscord<.maverk> hmmm
08:37:25FromDiscord<.maverk> how can i define it ?
08:37:43FromDiscord<Elegantbeef> It's quite amazing someone can find the operator precedence table and not the operator manual a few places before it
08:38:15FromDiscord<.maverk> you are a bot you should not speak
08:38:17FromDiscord<.maverk> hhhhh
08:38:45FromDiscord<elegantbeef> It's quite amazing someone can find the operator precedence table and not the operator manual a few places before it
08:39:00FromDiscord<.maverk> now you can speak
08:39:18FromDiscord<odexine> <:Utano_XD:652223800804507662>
08:39:23FromDiscord<.maverk> hhhh
08:41:32FromDiscord<djazz> h
08:43:48FromDiscord<intellij_gamer> sent a code paste, see https://play.nim-lang.org/#ix=4CC4
08:44:03FromDiscord<Elegantbeef> Imagine encouraging not reading
08:45:32FromDiscord<intellij_gamer> reading is for nerds =P /j↵But always saves people complaining about getting "RTFM" responses
08:45:54FromDiscord<Elegantbeef> True, but how do you get to the precedence table before operators
08:46:13FromDiscord<Elegantbeef> There's putting the cart before the horse, then there's putting the wheels on the horse
08:46:44FromDiscord<intellij_gamer> Guess they got so excited by how cool the language is they skipped past it?
08:46:54FromDiscord<intellij_gamer> or lazy, flip a coin and choose
08:47:36FromDiscord<Elegantbeef> They even skipped the tutorial and went straight to the manual supposedly
08:48:49FromDiscord<Phil> Personally, the ultimate response imo is to link to the corresponding docs
08:54:36FromDiscord<odexine> that's still kinda rtfm tho
08:54:54FromDiscord<odexine> i think people will still complain about it
08:55:20FromDiscord<Elegantbeef> It's RTFM whilst being a search engine that took 4 billion years to evolve
08:56:22FromDiscord<odexine> oh so "beef is like the asshole iteration of chatgpt", got it
08:57:06FromDiscord<.maverk> docs are loved only by english native speakers
08:57:28FromDiscord<.maverk> when a non native asks they start complaining
08:57:28FromDiscord<Elegantbeef> Well given I'm an english speaker how is my help going to go over any better
08:57:33FromDiscord<.maverk> and blh blah
08:58:13FromDiscord<odexine> i am arguably a native english speaker, depends on your definition
08:58:36FromDiscord<.maverk> i am not a native speaker
08:58:40FromDiscord<.maverk> i am from dubai
08:58:44FromDiscord<Elegantbeef> I'm clearly not a native english speaker given how badly I fuck up the language
08:58:50FromDiscord<.maverk> i mostly use arabic
08:58:57FromDiscord<Elegantbeef> Wait it says here I am
08:59:18FromDiscord<.maverk> no need for negative words
08:59:23FromDiscord<.maverk> we all can say them
08:59:26FromDiscord<odexine> well it's difficult for a small language to support languages of which not many natives of such use
08:59:39FromDiscord<Elegantbeef> What negative words
08:59:40FromDiscord<odexine> (edit) "well it's difficult for a small ... languagenatural" added "prog." | "prog.language to support ... languages" added "natural"
08:59:41FromDiscord<Elegantbeef> Like minus and bad?
09:00:18FromDiscord<.maverk> oky i don't wanna continue speaking to you ok big talk done ?
09:00:31FromDiscord<odexine> up to you
09:01:09FromDiscord<odexine> in this case, ultimately it is your loss, i'd say
09:01:25FromDiscord<.maverk> i hate nonsense
09:01:34FromDiscord<.maverk> just blah blah without any benefit
09:01:49FromDiscord<.maverk> waste of time and energy
09:03:06FromDiscord<odexine> without this "nonsense", the mood would be too serious
09:03:31FromDiscord<Elegantbeef> Well rika you best get a suit on, I gotta go buy one. Think there is a suit shop open at 3am?
09:03:58FromDiscord<odexine> book a flight for a country thats still in daylight xd
09:04:22FromDiscord<odexine> i dont got any formalwear so
09:05:43FromDiscord<ratogbm> Is there a `exit()` in nim? (Similar to python)
09:05:48FromDiscord<odexine> `quit()`
09:06:01FromDiscord<odexine> dont ask me why its quit and not exit
09:06:04FromDiscord<ratogbm> I checked the documentation, it says everyting will break
09:06:11FromDiscord<ratogbm> (edit) "break" => "burn"
09:06:14FromDiscord<odexine> what do you mean?
09:06:18FromDiscord<ratogbm> (edit) "burn" => "burn, break etc."
09:06:28FromDiscord<Elegantbeef> Do not use `quit`
09:06:41FromDiscord<odexine> https://nim-lang.org/docs/system.html#quit%2Cint
09:06:44FromDiscord<ratogbm> sent a code paste, see https://play.nim-lang.org/#ix=4CCc
09:07:12FromDiscord<ratogbm> In reply to @Elegantbeef "Do not use `quit`": What do I use then?
09:07:22FromDiscord<ratogbm> I just want my program to stop
09:07:24FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/ROUVT
09:07:41FromDiscord<odexine> that also calls `quit` in the end though
09:07:56FromDiscord<odexine> what would the effective difference be between such
09:07:59FromDiscord<Elegantbeef> If you use `quit` it'll stop but all of your destructors will not be called
09:08:01FromDiscord<odexine> other than information
09:08:17FromDiscord<Elegantbeef> Read the danger on quit
09:08:21FromDiscord<odexine> why is that the case for quit
09:08:33FromDiscord<Elegantbeef> It instantly stops and does not abide by Nim flow control
09:08:49FromDiscord<odexine> well again why is that the design
09:08:51FromDiscord<ratogbm> I think it is easier to just but the rest of my code into an else statement
09:08:59FromDiscord<ratogbm> (edit) "but" => "put"
09:09:14FromDiscord<Elegantbeef> Don't look at me rika I didnt design it
09:09:19FromDiscord<odexine> ok
09:10:42FromDiscord<ratogbm> sent a code paste, see https://play.nim-lang.org/#ix=4CCi
09:10:45FromDiscord<Elegantbeef> Right then quite doesnt matter
09:10:52FromDiscord<Elegantbeef> But why not just throw that in a proc and return 😄
09:11:15FromDiscord<ratogbm> Throw the "rest of the code" into a proc?
09:12:23FromDiscord<odexine> like in c
09:12:24FromDiscord<odexine> with a main
09:12:51FromDiscord<ratogbm> btw, why does global code not see functions that are declared bellow it, but functions do?
09:14:24FromDiscord<ratogbm> it's so inconvienient, you have to scroll all the way to the bottom to see what the code is doing...
09:14:26FromDiscord<odexine> functions dont either? example?
09:14:44FromDiscord<ratogbm> In reply to @odexine "functions dont either? example?": Then how do recursive functions work?
09:15:13FromDiscord<ratogbm> (edit) "In reply to @odexine "functions dont either? example?": Then how do recursive functions work? ... " added "(w functions calling each other)"
09:15:40FromDiscord<Phil> ?↵The call of the recursive function is later than the definition of the function, so your compiler at the point of calling that other function knows of the existance of it
09:15:41FromDiscord<odexine> forward declaration
09:16:00FromDiscord<Phil> Huh, appears my reasoning was wrong for that one then.
09:16:26FromDiscord<ratogbm> In reply to @isofruit "? The call of": Ok, this conceptual model makes more sense.
09:17:42FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4CCj
09:18:21FromDiscord<ratogbm> But I mean like, if I was a compiler, I would scrape all the functions and then work from there...
09:18:59FromDiscord<ratogbm> (edit) "work from there..." => "everything else..."
09:19:28FromDiscord<odexine> that has a time cost
09:19:43FromDiscord<odexine> compilation time would probably be excessively long
09:19:44FromDiscord<ratogbm> In reply to @odexine "that has a time": ok
09:20:08FromDiscord<odexine> though i would say it's worth the time cost
09:21:34FromDiscord<Elegantbeef> Well Zig and Odin are fast, but zig atleast does lazy semming
09:27:16FromDiscord<roupi.rb> the nim playground is down ?
09:29:22FromDiscord<roupi.rb> why i can use .age = in line 17 but not on line 23 ? https://media.discordapp.net/attachments/371759389889003532/1137678790420598784/image.png
09:33:25FromDiscord<demotomohiro> In reply to @roupi.rb "the nim playground is": In Nim, parameters are immutable in default.↵You need to write `proc lol(p: var Person): Person =` if you want to modify the argument.
09:36:47FromDiscord<roupi.rb> hum map wont let me mutate the values https://media.discordapp.net/attachments/371759389889003532/1137680662166511676/image.png
09:39:05FromDiscord<Phil> In reply to @roupi.rb "hum map wont let": sequtils procs are taken from functional concepts.↵So a map-proc creates a new sequence of whatever output your lol proc produces and it can not mutate.
09:40:09FromDiscord<roupi.rb> is there an easy way to make a copy of p ?
09:40:34FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CCo
09:41:35FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CCp
09:43:29FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CCq
09:44:08FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CCq" => "https://paste.rs/i5BQq"
09:44:47FromDiscord<Phil> Though generally not using ref-types is preferred I'd say.
09:44:55FromDiscord<roupi.rb> is there a way to convert a type to ref
09:45:07FromDiscord<roupi.rb> after i defined it without ref
09:46:29FromDiscord<demotomohiro> ref type can reference only ref type.
09:46:34FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CCr
09:47:44FromDiscord<Phil> You won't need to think about the distinction there too often but it does come up (e.g. with `$`/ `echo` or when comparing two instances of a ref-type)
09:48:46FromDiscord<Phil> And `==` does different things for ref-types than you'd expect
09:49:19FromDiscord<.kanaxa> In reply to @.maverk "oky i don't wanna": Dude, stop being rude
09:49:41FromDiscord<.kanaxa> Beef is helpful and knows his stuff, you don't need to be like this
09:51:25FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4CCt
09:52:04FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4CCt" => "https://play.nim-lang.org/#ix=4CCu"
09:53:40FromDiscord<Phil> I'm sure checking for pointer equality is something that on the lower levels you might care about at some point when working with ref-types, but for my purposes I have never found it useful on any language that uses it, which is every language I'm aware of bar Groovy
09:59:36FromDiscord<roupi.rb> what would be the average compile time for a medium webserver written in nim ?
10:00:00FromDiscord<Phil> Define "medium"
10:00:11FromDiscord<Phil> And development release or production release?
10:00:17FromDiscord<Phil> (edit) "release" => "build" | "release?" => "build?"
10:00:17FromDiscord<odexine> i'd say no more than a couple of minutes?
10:01:34FromDiscord<Phil> And webserver (e.g. compiling something like httpbeast, tomcat etc.) or webapplication (e.g. something that is built with spring, django, prologue, jester etc.) ?
10:02:07FromDiscord<roupi.rb> like a prologue web server with an orm and about 20 api endpoints
10:02:19FromDiscord<roupi.rb> and for development
10:02:49FromDiscord<Phil> I have a prologue web server with an orm, around 80 or so api endpoints and for development I'm under 15 seconds pretty sure, one sec
10:13:43FromDiscord<Phil> I stand corrected.↵Complete cold compile is around 30-35 seconds
10:14:07FromDiscord<Phil> During typical development you just have stuff cached that brings that time down
10:14:36*xet7 quit (Remote host closed the connection)
10:16:06*xet7 joined #nim
10:17:38*ntat quit (Quit: leaving)
10:24:32FromDiscord<Phil> I stand corrected again, it's more around 120 endpoints
10:54:10FromDiscord<.kanaxa> How do you find the complexity of managing a Prologue server vs Django @Phil
10:57:05FromDiscord<Phil> In reply to @.kanaxa "How do you find": Prologue is just much more explicit than Django.↵That does lead to me writing more code (though I'm currently writing some tooling to improve upon that) but also means that these "Wha? Which weird incantation is not working as expected?" are far rarer.
10:59:21FromDiscord<Phil> I can basically eliminate N+1 problems because I'm not having to learn some weird way in which I can fix avoid those on Django.↵I can eliminate fetching unnecessary data because I can just write read-only models with norm.↵I can eliminate having to check what HTTP-request type my handler is getting because my request-handler is only registered for Http Get.
10:59:36FromDiscord<Phil> (edit) "norm.↵I" => "norm that only fetch the fields I actually need.↵I"
11:01:03FromDiscord<Phil> What would've been are compile-time checked URLs. Like you check at compile-time that the url parameters you define in your code must be present by name in the url that the request-handler is registered with
11:01:10FromDiscord<Phil> (edit) "What would've been ... are" added "fire"
11:02:00FromDiscord<Phil> I'm basically dealing with the root problem of Django directly.↵Not with how to solve that problem with an abstraction somebody else hands me
11:02:11FromDiscord<Phil> (edit) "me" => "me.↵Which makes things easier"
11:02:33*FromDiscord quit (Remote host closed the connection)
11:02:46*FromDiscord joined #nim
11:04:51FromDiscord<Phil> However I benefit from already having webdev experience.↵So I know how I'd want to structure my webdev application from the get go.
11:05:51FromDiscord<Phil> For getting started with webdev prologue invariably will be harder than Django.↵Because Django provides you some guides that show you how to do the magic invocations to get something going.↵You don't have to understand how you got from A to B, just how to do the magic invocations
11:05:58FromDiscord<.kanaxa> In reply to @isofruit "I can basically eliminate": Fascinating
11:06:56FromDiscord<.kanaxa> In reply to @isofruit "For getting started with": I'm just looking at Prologue at the moment, seeing if there's a viable need for me to go down that path instead of sticking with Django
11:07:36FromDiscord<.kanaxa> The idea of 'compiling' a serve also feels a bit odd to me, since I'm just used to running gunicorn + Nginx off a bunch of Django scripts
11:07:41FromDiscord<.kanaxa> (edit) "serve" => "server"
11:07:56FromDiscord<.kanaxa> Never done it before although I think it'd be a good experiment for me to try
11:13:27FromDiscord<Phil> I found it pretty rewarding because it demonstrates that the problem you're trying to solve isn't that hard
11:13:49FromDiscord<Phil> Frameworks Tend to make it hard by their over encompassing nature
11:14:06FromDiscord<Phil> And oo doesn't necessarily help in my opinion
11:21:46FromDiscord<.maverk> how can i check a statement at a compiliting time in nim language ??? assert doesn't do the work
11:21:58FromDiscord<.maverk> (edit) "compiliting" => "compile"
11:22:58FromDiscord<.maverk> assert here supposed to block the compiling process but it doesn't as you can see the executable file came https://media.discordapp.net/attachments/371759389889003532/1137707384559632464/665.PNG
11:31:15FromDiscord<Phil> You can use static: to create a code block that executes at compile time
11:32:17FromDiscord<.maverk> i thought assert here as python
11:32:20FromDiscord<Phil> But what that will tell you is that name can't be used at compile time
11:33:14FromDiscord<Phil> Assert is runtime first and foremost.↵You want a code block to execute at compile time you use static
11:33:14FromDiscord<.maverk> hmmm
11:33:25FromDiscord<.maverk> so assert raises an error at running time
11:33:32FromDiscord<.maverk> (edit) "running time" => "run-time"
11:33:56FromDiscord<.maverk> ok perfect
11:34:12FromDiscord<Phil> Yes ↵Also you need to have a const to assert anything at compile time
11:34:44FromDiscord<Phil> There are exceptions to that in compile-time procs but that doesn't apply here for now
11:35:03FromDiscord<.maverk> aaah i understand
11:35:03FromDiscord<Phil> (edit) "There are exceptions to that in compile-time procs ... but" added "and some other places"
11:35:33FromDiscord<Phil> Actually you might get away with using let if it is in a static block
11:35:48FromDiscord<Phil> Because static would already make it compile-time
11:35:59FromDiscord<.maverk> i know i can make object constant with let
11:36:05FromDiscord<.maverk> it is really good
11:36:21FromDiscord<.maverk> thank you so much brother
11:36:37FromDiscord<Phil> Nah I meant that in a static block both let and var are compile-time
11:36:46FromDiscord<Phil> Const is always compile-time
11:36:55FromDiscord<.maverk> var is a compile-time ?
11:37:03FromDiscord<Phil> Let and var are runtime by default
11:37:04FromDiscord<.maverk> you mean the type or var itself ?
11:37:10FromDiscord<.maverk> aaah
11:37:13FromDiscord<.maverk> ok ok i get it
11:37:17FromDiscord<Phil> A static block means that everything in it gets executed at compile time
11:37:31FromDiscord<.maverk> i will try it
11:39:39FromDiscord<.maverk> butht exe still comes
11:40:07FromDiscord<.maverk> it is compile-time
11:40:46FromDiscord<.maverk> compile-time means the process of compiling will not be done if some requirements are not met
11:41:06FromDiscord<.maverk> if the requirements met the exe file will come
11:41:15FromDiscord<.maverk> but exe comes anyways
11:44:53FromDiscord<Phil> Show the code 😛
11:45:03FromDiscord<.maverk> hhh no it worked now
11:45:41FromDiscord<.maverk> static makes the compiler checks everything at compile-time
11:46:08FromDiscord<Phil> It is one of the ways to execute at compile time, yeah.↵There are others as well
11:46:20FromDiscord<.maverk> wow amazing
11:46:59FromDiscord<Phil> You can force a proc to execute at compile-time for example by running const X = myproc()
11:47:40FromDiscord<Phil> Because to assign to X, myproc must first be fully evaluated and the result of that is then assigned to X at compile time
11:48:39FromDiscord<.maverk> i like compile-time stuff
11:48:39FromDiscord<roupi.rb> In reply to @isofruit "Prologue is just much": i wonder why there is no nim webframework that makes heavy use of dsl and metaprogramming like rails yet
11:48:51FromDiscord<.maverk> it makes a lot of alot of sense
11:49:05FromDiscord<Phil> In reply to @roupi.rb "i wonder why there": I mean there is jester, but generally I'm not the person to ask there
11:50:28FromDiscord<Phil> I like my frameworks explicit in general and rather without DSL magic.↵There are exceptions if they're really well done like they are in owlkettle (a gtk wrapper for desktop apps) but those are the exception to me
11:50:48FromDiscord<Phil> Jester has plenty macro magic
11:51:10FromDiscord<Phil> I think mummy also has some in they way controllers get defined
11:53:44FromDiscord<roupi.rb> does nim have a equivalent to bundler/npm/cargo/shards ?
11:54:09FromDiscord<jordan4ibanez> sent a code paste, see https://play.nim-lang.org/#ix=4CD8
11:54:24FromDiscord<Phil> Nimble and more gently with more limited scope atlas
11:54:33FromDiscord<Phil> (edit) "gently" => "recently"
11:55:00FromDiscord<jordan4ibanez> I've found I can also do ``var blah = new Vector3i`` so now I am unsure
11:55:05FromDiscord<Phil> sent a code paste, see https://paste.rs/XzWD0
11:55:07FromDiscord<jordan4ibanez> Ah okay, good :D
11:55:08FromDiscord<jordan4ibanez> Thank ya
11:55:15FromDiscord<Phil> You can check that by echoing
11:55:36FromDiscord<Phil> $ is not defined for ref types so the echo will fail
11:56:00FromDiscord<Phil> Using [] to unref will make it work again
12:00:44FromDiscord<jordan4ibanez> Very nice, time to do something stupid
12:28:42FromDiscord<raynei486> is there nim equivalents like C's `LINE`
12:28:55FromDiscord<raynei486> trying to get some nice logging output
12:38:45FromDiscord<Phil> I only know std/logging when it comes to logging, sorry
12:40:36FromDiscord<intellij_gamer> There is [instantiationInfo](https://nim-lang.org/docs/system.html#instantiationInfo%2Cint) which returns the line info
12:40:50FromDiscord<intellij_gamer> oh nice, markdown URLs are out
12:42:32FromDiscord<raynei486> ooh thanks
12:42:54FromDiscord<raynei486> also sweet discord finally added markdown links
12:43:13FromDiscord<raynei486> condenses stuff a lot
12:58:54*lucasta joined #nim
12:59:56*lucasta quit (Remote host closed the connection)
13:00:21*lucasta joined #nim
13:01:41FromDiscord<x.hat> I noticed that the prebuilt binaries are currently x86 / x86_64. Is there a way to contribute arm builds?
13:02:01FromDiscord<x.hat> Alternatively, where could I ask a Nim core team member this
13:02:15FromDiscord<x.hat> Is the forum the source of truth? IRC?
13:20:47FromDiscord<.maverk> wow nim has exceptions
13:25:38FromDiscord<Phil> Forums or internals channel
13:33:01*jmdaemon quit (Ping timeout: 246 seconds)
13:41:53FromDiscord<.maverk> does nim have struct and match or switch ?
13:42:01FromDiscord<.maverk> and does it have the socket library ?
13:48:00FromDiscord<Chronos [She/Her]> In reply to @.maverk "does nim have struct": In the manual look at `type` and `case`
13:48:08FromDiscord<Chronos [She/Her]> In reply to @.maverk "and does it have": Yeah it does
13:49:19FromDiscord<.maverk> In reply to @yu.vitaqua.fer.chronos "Yeah it does": what is its name
13:49:20FromDiscord<.maverk> ?
13:49:25FromDiscord<.maverk> socket or net or what ?
13:53:25FromDiscord<Chronos [She/Her]> It's `std/net`
13:53:38FromDiscord<.maverk> so i should do import std/net ?
13:53:40FromDiscord<Chronos [She/Her]> There's also `std/asyncnet` for an asynchronous wrapper too
13:53:44FromDiscord<Phil> Just ws
13:53:58FromDiscord<Phil> Assuming you mean WebSocket
13:53:59FromDiscord<Chronos [She/Her]> In reply to @.maverk "so i should do": Yes, but first you should read the manual
13:54:13FromDiscord<.maverk> In reply to @yu.vitaqua.fer.chronos "Yes, but first you": yeah ofc i was just curious
13:54:16FromDiscord<Chronos [She/Her]> In reply to @isofruit "Just ws": They said sockets not ws so I'm assuming sockets aha
13:54:27FromDiscord<.maverk> yeah maybe
13:54:32FromDiscord<.maverk> ws = web socket
13:54:46FromDiscord<Chronos [She/Her]> There's a difference between a websocket and a socket
13:54:59FromDiscord<.maverk> yeah since he said ws
13:55:06FromDiscord<Chronos [She/Her]> I'm just assuming sockets, TCP/UDP (since the code is similar)
13:55:06FromDiscord<.maverk> that was just an expectation
13:55:35FromDiscord<Phil> I very rarely see folks asking for actual sockets instead of just sockets, thus my assumption
13:55:46FromDiscord<Phil> (edit) "sockets," => "websockets,"
13:55:49FromDiscord<.maverk> hmmm
13:55:51FromDiscord<Chronos [She/Her]> Ah fair
13:56:05FromDiscord<.maverk> i really appreciate your help guys
13:56:08FromDiscord<.maverk> thanks
13:56:11FromDiscord<Chronos [She/Her]> Of course!
13:58:07FromDiscord<odexine> In reply to @isofruit "I very rarely see": You’re mainly in the high level server programming space though
13:58:38FromDiscord<Phil> That is entirely fair
14:08:40Amun-Rageneral q: do you often use .inline. pragma or let the compiler to the job?
14:08:49Amun-Ras/to/do/
14:09:40Amun-Raor even use templates
14:12:31FromDiscord<Phil> Never ever use it
14:12:38FromDiscord<Phil> But I don't do low level
14:16:24*Guest76 joined #nim
14:29:45FromDiscord<exelotl> Yes, if you have a small proc that is going to be called across module bounds and are not compiling with LTO, it's not a bad idea to slap {.inline.} on there to avoid the function call overhead
14:30:17*Guest76 quit (Quit: Client closed)
14:30:53FromDiscord<exelotl> If its only called within the same module then there's no point in using {.inline.} because the compiler can do it anyway
14:34:20FromDiscord<odexine> In reply to @exelotl "If its only called": Which? The Nim compiler inlines by itself? Cool
14:58:46Amun-RaC compiler
15:00:59FromDiscord<ehfarah> @.maverk\: hi
15:40:40*ntat joined #nim
15:46:01FromDiscord<.maverk> In reply to @ehfarah "<@1021771961040375900>\: hi": hi
15:50:36*lucasta quit (Quit: Leaving)
16:01:11*junaid_ joined #nim
16:13:33FromDiscord<.maverk> are ``true`` and ``false`` considered identifiers or boolean literals ?
16:15:34FromDiscord<Phil> In macro land: identifier
16:32:24*azimut joined #nim
16:41:58*azimut quit (Ping timeout: 240 seconds)
16:56:31*azimut joined #nim
16:59:20*lucasta joined #nim
17:00:12*lucasta quit (Remote host closed the connection)
17:00:38*lucasta joined #nim
17:19:07FromDiscord<.maverk> sent a code paste, see https://play.nim-lang.org/#ix=4CEx
17:27:24*thomasross joined #nim
17:30:30FromDiscord<.kanaxa> In reply to @isofruit "Never ever use it": Thank you for the indicator, I was like wondering if I had any need for that today
17:30:44FromDiscord<.kanaxa> I'm looking at this example on inline iterator though: https://forum.nim-lang.org/t/845#4958
17:30:50FromDiscord<.kanaxa> Is there are benefit to inlining an iterator?
17:31:17FromDiscord<.kanaxa> Because it appears to transform in-place a yield syntax to an echo syntax
17:32:07FromDiscord<.kanaxa> Is this a performance thing? If I were not concerned with performance (for simpler apps especially), is there a need for the `{.inline.}` pragma?
17:32:22FromDiscord<.kanaxa> (edit) "iterator" => "iterators"
17:32:49FromDiscord<.kanaxa> (edit) "Because it" => "It"
17:35:15FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4CEB
17:35:43FromDiscord<.maverk> In reply to @odexine "https://nim-lang.org/docs/manual.html#lexical-analy": i did not understand
17:35:46FromDiscord<.maverk> 😦
17:36:20FromDiscord<.maverk> sent a code paste, see https://play.nim-lang.org/#ix=4CEC
17:37:15FromDiscord<odexine> > means increase the indentation↵= means the indentation doesn’t change
17:37:22FromDiscord<odexine> (edit) ">" => "\>"
17:37:53FromDiscord<odexine> Ded means decrease the indentation
17:37:57FromDiscord<odexine> Roughly
17:40:10*thomasross quit (Quit: Leaving)
17:43:07FromDiscord<.maverk> and used only in expressions like this
17:43:22FromDiscord<.maverk> sent a code paste, see https://paste.rs/LfLzi
17:47:35FromDiscord<odexine> I don’t think it’s that important for most beginners to understand
17:47:59FromDiscord<odexine> It’s just a formal expression of the indentation rules
17:48:11FromDiscord<.maverk> hmmmm
17:48:22FromDiscord<.maverk> may i know where exactly used in ?
17:48:29FromDiscord<odexine> Basically it’s a detailed explanation of how Nim treats jndentation
17:48:30FromDiscord<.maverk> i am curu=ious
17:48:33FromDiscord<odexine> Indentation
17:48:39FromDiscord<.maverk> i see
17:48:59FromDiscord<odexine> It’s just to note down how Nim works with indentation
17:49:58FromDiscord<.maverk> i see
18:20:05*lucasta quit (Ping timeout: 245 seconds)
19:10:41NimEventerNew thread by RedDirt: Nim Project Setup, see https://forum.nim-lang.org/t/10382
19:25:47*ntat quit (Quit: leaving)
20:04:28FromDiscord<Phil> Today I learned that you can actually have project local dependencies with nimble
20:05:42FromDiscord<Phil> (edit) "Today I learned that you can actually have project local dependencies with nimble ... " added "by just having a nimbledeps folder"
20:10:24FromDiscord<Phil> Okay I don't understand, how is my entire webserver in terms of dependencies only like 8 MB in size?↵I know I have warped expectations here because of java, JS and rust all having ecosystems where a project basically laughs at you if the file-size of your dependencies isn't measured in 100Mb+, but wth
20:10:50FromDiscord<Phil> (edit) "file-size" => "folder-size" | "dependencies" => "dependency-folder"
20:11:20FromDiscord<Elegantbeef> Are you using std/httpclient?
20:11:45FromDiscord<Phil> I distinctly recall that a freshly setup project in rust-rocket was already like 300MB so what is going on
20:12:04FromDiscord<Phil> I dunno, I use prologue, which uses httpx, which is a fork of httpbeast.↵Never checked if httpbeast uses std/httpclient
20:12:07*ced1 joined #nim
20:12:44FromDiscord<Phil> Ah, should've been more precise in my wording:↵My webapplication (which includes the httpx server) is only like 8MB in size
20:12:57*ced1 is now known as cedb
20:13:18FromDiscord<Elegantbeef> Wait is the binary or source 300mb
20:13:28FromDiscord<Phil> the 300MB was rust with source
20:13:34FromDiscord<Phil> Back when I tried it
20:14:01FromDiscord<Phil> With nim I have in my nimbledeps folder of my webserver project only 8 MB of... I think code, let me check
20:14:13FromDiscord<Elegantbeef> Interesting that rust is so big
20:14:14FromDiscord<Phil> Source
20:14:33FromDiscord<Phil> I mean, java with Spring is also a gargantuan monster in any setup
20:14:41FromDiscord<Elegantbeef> Perhaps they had some libraries pulled in to make it more close to zero external deps
20:15:09om3gamacports compile now whole sources of whole internet
20:15:10FromDiscord<Phil> And let me check my django folder on my server that I still haven't deleted
20:15:26om3garust compilation took 4 hours
20:16:20FromDiscord<Phil> Ah wait, I don't have the dependencies of the python thingie easily accessible... well no clue how large the Django project is then
20:16:45FromDiscord<Phil> Anyway, in JS basically farting already nets you a node_module folder approaching 100Mb
20:17:12FromDiscord<Phil> So based on these 3 languages I kinda anticipated just... a fatter dependency folder
20:18:06FromDiscord<Phil> Scratch approaching, node_modules easily apparently surpass a gig
20:18:28FromDiscord<Phil> I can only assume they're including video files in their stuff
20:18:29FromDiscord<Elegantbeef> Well yea cause node includes everything
20:18:46FromDiscord<Elegantbeef> I don't doubt you depend on your own project inside of a node package
20:19:08FromDiscord<Elegantbeef> A big endless graph
20:19:13om3gawhy then node is so popular?
20:19:26FromDiscord<Elegantbeef> Cause JS programmers have no taste
20:19:39om3gaI can't even understand what they're doing there
20:19:47FromDiscord<Phil> Cause it allowed to run servers and ... yeah JS and no taste and so on
20:19:59FromDiscord<Phil> I mean Deno has been out for a while and apparently node itself still dominates
20:34:40*rockcavera quit (Ping timeout: 245 seconds)
20:36:10*rockcavera joined #nim
20:49:34*junaid_ quit (Remote host closed the connection)
21:04:39*jmd_ joined #nim
21:05:00FromDiscord<summarity> Is there a way I can choose where Nim puts the generated C/C++ files during compilation? Fishing them out of the cache dir is slightly inconvenient
21:08:14FromDiscord<that_dude.> In reply to @summarity "Is there a way": Something like this? https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory
21:11:17FromDiscord<Chronos [She/Her]> Hey y'all, how hard would it be to recreate `nano` in Nim?
21:11:53FromDiscord<Chronos [She/Her]> Since that way I have an editor close to what I like already that I can understand the internals of, in a cleaner language
21:12:00FromDiscord<Chronos [She/Her]> My issue is just the TUI is painful lmao
21:18:36FromDiscord<summarity> i once tried to do that in Bash (https://github.com/turbo/bee), so Nim's probably going to be easier 😄
21:24:49FromDiscord<shalokshalom> @Chronos [She/Her] I would actually look into micro
21:25:01FromDiscord<shalokshalom> that has a much cleaner codebase
21:27:45FromDiscord<shalokshalom> @summarity I don't know if I am impressed, sad, upset or should applaud you
21:27:52FromDiscord<shalokshalom> Probably all of that 😅
21:38:07FromDiscord<summarity> Can I run other commands than instrumenting `nim` from a nimble task (pre/post build stuff)?
21:40:09FromDiscord<srmordred> Table is supposed to be slow? ↵not sure if i'm abusing key length, or there is something else wrong. ↵if so, there are some good lib alternative?
21:40:42*azimut quit (Remote host closed the connection)
21:41:11*azimut joined #nim
21:47:11FromDiscord<Elegantbeef> What's the key?
21:51:12FromDiscord<Elegantbeef> @srmordred
21:55:25FromDiscord<srmordred> strings and ints.
21:55:43FromDiscord<Elegantbeef> Are you benchmarking in release?
21:58:05FromDiscord<Elegantbeef> Tables are a hashtable so if you have a long string it'll be a expensive operation
22:01:37FromDiscord<srmordred> sent a long message, see http://ix.io/4CFC
22:02:20FromDiscord<Elegantbeef> Are you indexing or iterating?
22:04:56FromDiscord<Elegantbeef> If iterating stop it, that's the slowest API of a hashtable
22:06:48FromDiscord<srmordred> sent a long message, see http://ix.io/4CFE
22:07:04FromDiscord<Elegantbeef> That's 4 hashes so of course that's going to be slow
22:08:22FromDiscord<srmordred> it should? ↵i thought that i need some thousands of hash indexing to make some difference.
22:11:20FromDiscord<Elegantbeef> He I don't know what you're doing or if you profiled
22:11:21FromDiscord<Elegantbeef> hey\
22:12:28FromDiscord<srmordred> anyway, i'll probably change the second argument. ↵Datetime could be linear search since don´t have many, and the ints could be an seq with some logic. that will cut most of the hash indexing.
22:12:53FromDiscord<Elegantbeef> Profile before you change
22:13:34FromDiscord<Elegantbeef> Use perf, callgrind/cachegrind, or any other tool to profile properly
22:13:40FromDiscord<Elegantbeef> `--debugger:native` is required
22:14:10FromDiscord<srmordred> will take a look at that, thanks @elegantbeef 🙂
22:20:59FromDiscord<Chronos [She/Her]> In reply to @shalokshalom "<@909883978717204561> I would actually": Wouldn't want to use Go aha, also the idea is, if I can make a minimal reimplementation, I'll have a more intimate understanding of it to do what I want
22:21:19FromDiscord<Elegantbeef> Go use illwill or ansiwave and start making your text editor!
22:21:40FromDiscord<Chronos [She/Her]> In reply to @summarity "i once tried to": Simultaneously impressive and horrific lol
22:21:54FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Go use illwill or": That is the plan lol
22:22:10FromDiscord<Chronos [She/Her]> Also uh what should I name it?
22:22:14FromDiscord<Elegantbeef> I actually do not know, to text editors use a rope system
22:22:20FromDiscord<Chronos [She/Her]> I can't do naming for my life
22:22:39FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "I actually do not": Rope system? As in, units?
22:24:08FromDiscord<Chronos [She/Her]> Immediately I already like Nimwave more than Illwill
22:24:11FromDiscord<Elegantbeef> God thing it doesnt matter
22:24:11FromDiscord<Elegantbeef> Since I have a small brain I'd name it planck
22:24:38FromDiscord<Chronos [She/Her]> Hmmm
22:25:00FromDiscord<Chronos [She/Her]> What if I named it Niditor
22:25:14FromDiscord<Chronos [She/Her]> ...that sounds like a slur in some vague way
22:25:35FromDiscord<Elegantbeef> Unless it's a pun, don't do it
22:26:16FromDiscord<Chronos [She/Her]> Yeah definitely not
22:26:24FromDiscord<Elegantbeef> there is no reason to call all software `n`thesoftwaretype
22:26:35FromDiscord<Chronos [She/Her]> Iditor
22:26:40FromDiscord<Chronos [She/Her]> Lmao
22:27:23FromDiscord<Chronos [She/Her]> ChatGPT recommended Scriptor but pretty sure it's taken lol
22:28:17FromDiscord<Elegantbeef> Flatline, it's the last editor you'll ever need
22:29:43FromDiscord<Chronos [She/Her]> Honestly that'd be funny lmao
22:30:03FromDiscord<Chronos [She/Her]> Especially because I only want to make it purely as a learning experience
22:35:58*lucasta joined #nim
22:36:07FromDiscord<Chronos [She/Her]> > "Flatline, it's the last editor you'll ever need"↵- [ElegantBeef](https://matrix.to/#/!EtGqjSRNQoJCbpCJSF:matrix.org/$1691360892153476JFmXW:matrix.org?via=matrix.org&via=t2bot.io&via=gitter.im)
22:37:02FromDiscord<Chronos [She/Her]> That's going on the readme
22:46:36FromDiscord<Chronos [She/Her]> Trying to think of the best way to allow the user to edit large files without it crashing the program bc of RAM
22:46:49FromDiscord<Chronos [She/Her]> Streams seem really ideal for this, unless they have a catch
22:49:35FromDiscord<Elegantbeef> I don't know never really looked into it, feel like a rope system is a good idea, but streams/files are required
22:51:06FromDiscord<Chronos [She/Her]> I don't get what you mean by a rope system?
22:51:21FromDiscord<Elegantbeef> https://nim-lang.org/docs/ropes.html
22:53:19FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "https://nim-lang.org/docs/ropes.html": Ah
22:55:30FromDiscord<Chronos [She/Her]> I was actually thinking of just storing 3 things for every line while iterating over a stream, which was the position of the first character that can be read, the last character that can be read in the entire line, and the last character visible on screen
22:55:59FromDiscord<Chronos [She/Her]> Then only storing the characters that can be viewed on the screen at the present moment
23:05:19FromDiscord<konsumlamm> In reply to @srmordred "indexing. the structure": you could try using a `(string, DateTime, int, int)` tuple as key instead
23:10:11skulkanyone have any general tips for debugging arc/orc segfaults (that tend to occur when porting pre-ORC code)?
23:10:15FromDiscord<Elegantbeef> Profile before changing anything
23:11:20FromDiscord<Elegantbeef> valgrind plus `--debugger:native -d:useMalloc`
23:11:33skulkthanks, will try that
23:11:40FromDiscord<Elegantbeef> I'd argue that most refc code that errors under orc does so due to some incorrect usage
23:12:06skulkno doubt I'm doing some moderately shady stuff with refs, but it was working perfectly fine pre-orc
23:12:34skulkhuh, crash doesn't reproduce with -d:useMalloc
23:13:34FromDiscord<Elegantbeef> Is it multithreaded code?
23:14:04skulknope
23:14:15FromDiscord<srmordred> In reply to @konsumlamm "you could try using": i was thinking about that too
23:15:29FromDiscord<Elegantbeef> Well enable `-debugger:native` and use valgrind, think it'll help, don't recall
23:15:35skulkhmm, lots of "use of uninitialized value" from valgrind. I'll clean up as much of thta as I can and see what happens
23:15:47FromDiscord<sasha4599> Where can I get help with a nim error? (compiling error)
23:16:20FromDiscord<Elegantbeef> Here
23:17:33FromDiscord<sasha4599> sent a code paste, see https://play.nim-lang.org/#ix=4CFY
23:17:43FromDiscord<sasha4599> im really lost rn
23:18:50FromDiscord<Elegantbeef> isnt that an old mingw?
23:19:16FromDiscord<sasha4599> i dont think so
23:19:31FromDiscord<Elegantbeef> Atleast my mingw on linux is 12
23:19:39FromDiscord<sasha4599> Im on windows 11
23:19:53FromDiscord<sasha4599> i forgot to mentionit
23:19:54FromDiscord<sasha4599> (edit) "mentionit" => "mention it"
23:20:01FromDiscord<Elegantbeef> Sure but it's still versioned the same afaik
23:22:05skulkElegantbeef: what does -d:useMalloc do exactly? or rather, what happens without it? It makes my problem go away completely even (and now there are no valgrind errors)
23:22:19FromDiscord<Elegantbeef> It uses C's malloc instead of Nim's allocator
23:22:42FromDiscord<Elegantbeef> What does valgrind say when you use nim's allocator?
23:24:17skulk...nothing. but if I run the program without valgrind it crashes... double checking to see if I'm doing anything wrong
23:24:55FromDiscord<Elegantbeef> What's Nim's stack trace?
23:25:44skulkyeah, with nim's allocator and --debugger:native the program crashes if run directly it crashes with this stack trace: https://gist.github.com/sid-code/a927570e45393794a36b6b91d7f751fd
23:26:28skulkbut works fine under valgrind
23:26:45FromDiscord<Elegantbeef> `/home/sid/misc/nmoo/src/nmoo/tasks.nim(392) :anonymous`?
23:26:50FromDiscord<Elegantbeef> What's that closure procedure?
23:28:04skulkit's my code, equivalent line is here (offset in my stack trace a bit by my local changes): https://github.com/sid-code/nmoo/blob/master/src/nmoo/tasks.nim#L391
23:28:20skulkit's a proc defined by a template
23:28:49skulkin this case it's an implementation of an instruction for a bytecode VM
23:31:45FromDiscord<Chronos [She/Her]> In reply to @yu.vitaqua.fer.chronos "Then only storing the": Oh wait I see where I'd need ropes, for the actual editing and stuff
23:31:46FromDiscord<Elegantbeef> Hmmmmmm, seems odd that anything here would cause an issue
23:32:12FromDiscord<Chronos [She/Her]> But how would I handle large files when editing massive lines of code of obfuscated code, for example?
23:32:19skulkyeah, it was working fine in nim 1.6.14 but now that I've upgraded to 2.0.0 it's broken which leads me to believe there is a bug in the compiler
23:32:40FromDiscord<Elegantbeef> In Nim 1.6.14 with `--mm:orc`
23:32:49FromDiscord<Elegantbeef> ?
23:32:57skulkis that not the default?
23:33:05FromDiscord<Elegantbeef> It was not
23:33:08FromDiscord<Elegantbeef> It was refc in 1.6.14
23:33:17skulkah i see, yeah I was just using the default
23:33:52skulkshould have paid more attention to the change log lol
23:34:12FromDiscord<Elegantbeef> What is the `129` call?
23:34:37FromDiscord<Elegantbeef> `/home/sid/misc/nmoo/src/nmoo/tasks.nim(129) builtinCall` to make that less obscure
23:34:53skulkhttps://github.com/sid-code/nmoo/blob/master/src/nmoo/tasks.nim#L128
23:35:11skulkit looks up a proc from a table and calls it
23:35:23FromDiscord<Elegantbeef> What's the proc type?
23:35:40skulkhttps://github.com/sid-code/nmoo/blob/master/src/nmoo/types.nim#L176
23:37:35FromDiscord<Elegantbeef> Hmmm quite odd that it errors there
23:38:50skulkI stepped throuhg it in gdb and while I couldn't figure out exactly where it's erroring, I'm pretty sure it's in a compiler-inserted call to a destructor or copy constructor
23:39:04FromDiscord<Elegantbeef> Well yea
23:39:20FromDiscord<Elegantbeef> `nimDecRefIsLast` is error related to `ref`
23:40:02FromDiscord<Elegantbeef> It seems you have a cycle created that is incorrectly traversed and crashes
23:41:10FromDiscord<Elegantbeef> Hard to reproduce this in a non complex way but if you could that'd be swell
23:41:10skulkI see. I have a decent idea where that might be happening, I'll try to break it
23:41:37skulkyeah, it's really hard to reproduce. I have like 30 unit tests that run before this that do similar things and work perfectly fine
23:41:45FromDiscord<Elegantbeef> Otherwise compile with `--mm:refc` and cry that it's hard to reproduce 😄
23:43:57skulkmight there be a ORC-internal proc I can call to try to suss out the cycle manually?
23:44:13FromDiscord<Elegantbeef> `GcRunOrc`
23:45:25FromDiscord<Elegantbeef> There is nothing else one can really do, you could always modify the compiler to print the pointer it's trying to free mixed with printing whenever the Nim allocator allocates
23:46:31FromDiscord<Elegantbeef> You can also compile with `-d:nimArcIds`
23:47:05FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/lib/system/orc.nim if you want to look at the ORC gc 😄
23:49:39FromDiscord<Chronos [She/Her]> Wait I may be able to just avoid ropes and not have to read entire lines to memory
23:50:56FromDiscord<Elegantbeef> For a compiler atleast Araq sorta regrets using ropes
23:51:01FromDiscord<Chronos [She/Her]> I could use a seq with a custom type storing the string to be written at an index of the string, and simply `insert` it there, same with backspaces too, and then I'd just first start with the highest index
23:51:04FromDiscord<Elegantbeef> So probably ideal to avoid
23:51:17FromDiscord<Chronos [She/Her]> Fair
23:51:36FromDiscord<Elegantbeef> But I do think for a text editor not using strings might be better, but idk
23:51:53FromDiscord<Chronos [She/Her]> I know I'm probably overthinking this a lot but I'm hoping to make it so the text editor can edit massive files of obfuscated code for example
23:52:03FromDiscord<Chronos [She/Her]> Since storing that all in memory would be a bit painful
23:52:27FromDiscord<Elegantbeef> Why the hell would you modify obfuscated code
23:53:55skulkreverse-engineering, sometimes
23:55:40FromDiscord<Chronos [She/Her]> ^^^
23:56:13FromDiscord<Chronos [She/Her]> For example: Vendetta is a client mod for Discord (can do mods for the RN client on Android and iOS) and for PC/web
23:56:23FromDiscord<Chronos [She/Her]> Obviously you have to deal with obfuscated code a lot of the time
23:56:27FromDiscord<Chronos [She/Her]> Which is obviously painful
23:58:25FromDiscord<Elegantbeef> Oh I know why you'd do it, but I mean why would you do it in TUI and not in like ghidra
23:58:50FromDiscord<Chronos [She/Her]> I program on my phone with nano a lot of the time, you're really asking me? :p ¯\_(ツ)_/¯
23:59:10FromDiscord<Elegantbeef> Oh right I forgot your disabillity
23:59:16skulkdoes ghidra work for obfuscated JS?
23:59:24FromDiscord<Chronos [She/Her]> 😭 disability?
23:59:39FromDiscord<Chronos [She/Her]> We learnt programming on our phone bruv it's not that bad 😭