| 04:54:15 | * | zero` quit (Ping timeout: 240 seconds) |
| 05:13:19 | * | Guest65 joined #nim |
| 05:13:20 | Guest65 | Hello |
| 05:14:08 | * | cm_ joined #nim |
| 05:15:04 | * | Guest65 quit (Client Quit) |
| 05:15:06 | * | cm quit (Ping timeout: 252 seconds) |
| 05:15:06 | * | cm_ is now known as cm |
| 06:00:23 | * | zero` joined #nim |
| 06:03:44 | * | xet7 joined #nim |
| 06:20:31 | * | zero` quit (Ping timeout: 240 seconds) |
| 06:29:26 | * | SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev) |
| 06:30:26 | * | SchweinDeBurg joined #nim |
| 07:47:14 | FromDiscord | <mjsdev> And now it's live: https://matthewjsahagian.com/development/ -- first real "deployment" of a Mininim "application" mostly powering a site which is 90% describing some of the cool things it does |
| 08:19:17 | FromDiscord | <nnsee> In reply to @mjsdev "And now it's live:": very cool! |
| 08:19:30 | FromDiscord | <nnsee> what's the typeface used for headings, by the way? |
| 08:32:17 | * | spayeur joined #nim |
| 08:32:36 | * | spayeur quit (Client Quit) |
| 11:07:16 | * | xet7 quit (Quit: Leaving) |
| 11:44:00 | FromDiscord | <blockyboy.> In reply to @mjsdev "And now it's live:": Pretty cool |
| 11:55:36 | * | zero` joined #nim |
| 12:09:25 | * | end quit (Quit: end) |
| 12:09:25 | * | bcksl quit (Quit: \) |
| 12:31:12 | * | bcksl joined #nim |
| 12:36:23 | * | end joined #nim |
| 13:02:52 | FromDiscord | <saint._._.> In reply to @mjsdev "And now it's live:": Whoa cool I wanted something like this too with htmx and alpine for my web stack |
| 13:03:11 | FromDiscord | <saint._._.> Could I use nimja with this for templating? |
| 14:08:57 | * | zie left #nim (#nim) |
| 14:58:24 | FromDiscord | <mjsdev> In reply to @saint._._. "Could I use nimja": No, no, all the features there are specific to the dynamic templating engine that's part of Mininim. The entire point was to not use compiled templates. |
| 14:58:36 | FromDiscord | <mjsdev> Well, maybe not the entire point. |
| 14:59:36 | FromDiscord | <mjsdev> In reply to @nnsee "what's the typeface used": "Fraunces" -- whatever that means. |
| 15:03:53 | FromDiscord | <mjsdev> In reply to @saint._._. "Could I use nimja": I mean, you can use nimja with Mininim more generally -- but not with the templating features shown on the page. Like if you just wanted to use the routing/middleware stuff. |
| 15:15:44 | * | Mister_Magister quit (Ping timeout: 240 seconds) |
| 15:31:44 | * | Mister_Magister joined #nim |
| 16:18:46 | FromDiscord | <fridge777> spoilering this cause it concerns aoc day 6 |
| 16:19:12 | FromDiscord | <fridge777> sent a code paste, see https://play.nim-lang.org/#pasty=lItpZTyW |
| 16:19:20 | FromDiscord | <fridge777> i dont understand the error at all |
| 16:19:26 | FromDiscord | <fridge777> sent a code paste, see https://play.nim-lang.org/#pasty=MKTZMRWK |
| 16:39:19 | FromDiscord | <litlighilit> It's really simple.↵As error message shows, it accepts an openarray, but what you pass is a slice.↵(@fridge777) |
| 16:41:02 | FromDiscord | <litlighilit> Such an error message means there are two parameters and what's wrong is the first one(You can just see the last line of the error message. It begins with `[]`) |
| 16:42:21 | FromDiscord | <litlighilit> Such an error message means there are two parameters and what's wrong is the first one(You can just see the last line of the error message. It begins with `[1]`) |
| 16:43:11 | FromDiscord | <litlighilit> In case you don't know what's an open array, there is a reference\: https://nim-lang.org/docs/manual.html#types-open-arrays |
| 16:43:27 | FromDiscord | <litlighilit> In case you don't know what's an openArray, here is a reference\: https://nim-lang.org/docs/manual.html#types-open-arrays |
| 16:47:35 | FromDiscord | <fridge777> thank you |
| 16:47:52 | FromDiscord | <fridge777> so why wont map work on slices for mapit does? |
| 16:48:01 | FromDiscord | <fridge777> (edit) "for" => "but" |
| 16:48:33 | FromDiscord | <litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1446904607153455268): Such an error message means there are two parameters and what's wrong is the first one(You can just see the last line of the error message. It begins with `[1]`) |
| 16:50:49 | FromDiscord | <litlighilit> The simplest solution is to wrap the slice with `toSeq` from `std/sugar` |
| 16:51:09 | FromDiscord | <litlighilit> But the more suitable solution is that |
| 16:51:51 | FromDiscord | <litlighilit> expand it as for loop |
| 16:52:52 | FromDiscord | <litlighilit> You can use collect from `std/sugar`. |
| 16:53:10 | FromDiscord | <litlighilit> You can use `collect` from `std/sugar`. |
| 16:56:27 | FromDiscord | <fridge777> i think a for loop is a bit verbose |
| 16:56:32 | FromDiscord | <fridge777> ill stick to mapIt |
| 16:56:47 | FromDiscord | <mjsdev> In reply to @fridge777 "so why wont map": I've found a lot of places where there are no implementations for things you'd expect... or more annoying sometimes, there are, but they're stuck away in a more specific module or some sort of additional sugar. There's also cases where there are implementations, but they just are inconsistently named for different types despite effectively doing the same thing. |
| 16:59:20 | FromDiscord | <litlighilit> sent a code paste, see https://play.nim-lang.org/#pasty=RaMtMZje |
| 16:59:23 | FromDiscord | <mjsdev> I'm cross between whether I should really try to normalize and provide cohesion by implementing those missing pieces or whether that's just going to cause more confusion and maintenance over time (particularly for others who might use the thing). |
| 16:59:57 | FromDiscord | <litlighilit> sent a code paste, see https://play.nim-lang.org/#pasty=Queqwjtv |
| 17:00:12 | FromDiscord | <fridge777> yeah thats crazy. map should just work on slices |
| 17:00:32 | FromDiscord | <fridge777> if i can iterate over them with a for loop why cant map take like an iterator and just use it? |
| 17:02:07 | FromDiscord | <nnsee> as far as i can tell it's just an oversight in the stdlib |
| 17:02:10 | FromDiscord | <nnsee> PRs welcome |
| 17:02:53 | FromDiscord | <litlighilit> It's quite easy to define your own `map` overload.↵(@fridge777) |
| 17:02:54 | FromDiscord | <litlighilit> It's because `map` is from `std/sequtils`↵(@fridge777) |
| 17:03:25 | FromDiscord | <fridge777> whats the type for an iterator? i know theres like an iterator keyword but how would i make a function accept one as a parameter |
| 17:03:25 | FromDiscord | <litlighilit> and who can regard slice as sequence? |
| 17:03:52 | FromDiscord | <mjsdev> There is no type for an iterator. |
| 17:04:12 | FromDiscord | <mjsdev> Nim is not fundamentally Object-Oriented with inheritance like that. |
| 17:04:53 | FromDiscord | <fridge777> i would not regard that as object oriented |
| 17:05:00 | FromDiscord | <mjsdev> Generics get around this to some degree, concepts (if developed more and able to be used as param types) could probably do a lot better. |
| 17:05:08 | FromDiscord | <fridge777> so how can a function accept something that acts like an iterator then? |
| 17:05:35 | FromDiscord | <fridge777> or are you doomed to always accept an openarray OR a slice |
| 17:06:51 | FromDiscord | <litlighilit> nope↵(@mjsdev) |
| 17:07:23 | FromDiscord | <litlighilit> Nim has inline iterator, which is not the first classBut closure iterator is really a type |
| 17:08:13 | FromDiscord | <litlighilit> inline iterator\: https://nim-lang.org/docs/manual.html#overload-resolution-iterable |
| 17:08:49 | FromDiscord | <litlighilit> closure iterator https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-firstminusclass-iterators |
| 17:11:04 | FromDiscord | <mjsdev> Fair enough on the first, but I'm not sure how the second implies there's an iterator type in the sense being asked. |
| 17:11:55 | FromDiscord | <litlighilit> param\: iterator (arglist)\: yieldType↵(@fridge777) |
| 17:12:30 | FromDiscord | <litlighilit> and in this case the iterator implies closure iterator |
| 17:12:54 | FromDiscord | <nnsee> the problem with (non-closure) iterators are that it's basically just a fancy `template` |
| 17:12:56 | FromDiscord | <litlighilit> And in other cases, iterator implies inline iterator |
| 17:13:11 | FromDiscord | <fridge777> cant seem to make this work |
| 17:13:15 | FromDiscord | <fridge777> sent a code paste, see https://play.nim-lang.org/#pasty=rGGxSJFZ |
| 17:14:30 | FromDiscord | <fridge777> do slices not count as closure iterators? not that i understand the difference between these two iterator ideas frankly |
| 17:16:30 | FromDiscord | <nnsee> regular iterators are inline, basically just copy-pasted in the call site |
| 17:16:39 | FromDiscord | <nnsee> closure iterators have their own state on the heap |
| 17:18:43 | FromDiscord | <fridge777> ok, that vaguely makes sense to me thank you |
| 17:19:08 | FromDiscord | <fridge777> so i have to write a template |
| 17:19:11 | FromDiscord | <fridge777> to make this work |
| 17:19:42 | FromDiscord | <nnsee> closure iterators are first-class values (for the most part) and can be passed around and e.g. passed to functions, for example: https://play.nim-lang.org/#pasty=DSLuuQGR |
| 17:19:58 | FromDiscord | <litlighilit> so as mentioned, use concept |
| 17:19:58 | FromDiscord | <litlighilit> so as mentioned, using concept is one option |
| 17:20:30 | FromDiscord | <fridge777> but the compiler doesnt recognize slices as an iterator even though they act like one in a for loop |
| 17:21:39 | FromDiscord | <litlighilit> As mentioned, predefined iterator |
| 17:21:46 | FromDiscord | <litlighilit> for slice |
| 17:21:54 | FromDiscord | <litlighilit> is inline iterator |
| 17:24:15 | FromDiscord | <litlighilit> so the compiler refused |
| 17:25:02 | FromDiscord | <nnsee> In reply to @fridge777 "but the compiler doesnt": the reason this works is because slices have an `items` defined |
| 17:25:06 | FromDiscord | <fridge777> i guess a simple pr wont fix it then, sounds like a deeper design issue |
| 17:25:17 | FromDiscord | <nnsee> you can iterate over anything using `for` if you've defined `items` for it |
| 17:25:22 | FromDiscord | <litlighilit> I often use it.↵As it makes my life easier |
| 17:25:56 | FromDiscord | <nnsee> see: https://play.nim-lang.org/#pasty=QDDdpzVN for example |
| 17:26:19 | FromDiscord | <litlighilit> yes as it's not a bug↵(@fridge777) |
| 17:26:38 | FromDiscord | <litlighilit> it's desiged, at least currently |
| 17:28:08 | FromDiscord | <fridge777> so concepts will allow me to duck type stuff that has ".items" defined? |
| 17:28:20 | FromDiscord | <fridge777> whatever that is |
| 17:29:07 | FromDiscord | <fridge777> In reply to @nnsee "you can iterate over": that seems sensible, if only i could accept that as a type i would be happy |
| 17:29:44 | FromDiscord | <fridge777> in other languages that would just be a simpe interface |
| 17:29:53 | FromDiscord | <fridge777> and then the standard library wouldnt be so weird |
| 17:30:01 | FromDiscord | <mjsdev> Again, there are no "interfaces" |
| 17:30:29 | FromDiscord | <mjsdev> Concepts are close to iterators, but I don't know that you can actually use them as types (or if that's even planned?) |
| 17:30:34 | FromDiscord | <mjsdev> you can just assert that something is a concept |
| 17:30:50 | FromDiscord | <fridge777> In reply to @mjsdev "Again, there are no": but why? |
| 17:32:43 | FromDiscord | <fridge777> actually i can guess |
| 17:32:58 | FromDiscord | <fridge777> i suppose because of the special function call syntax nothing really has "methods" |
| 17:33:07 | FromDiscord | <fridge777> its just multiple dispatch |
| 17:33:13 | FromDiscord | <mjsdev> Because procs aren't methods on objects. x.call() is actually just call(x) -- I mean arguably you can call all "methods" that. |
| 17:33:54 | FromDiscord | <mjsdev> It just works via the function overloading with different param types |
| 17:36:27 | FromDiscord | <litlighilit> ...nope↵(@mjsdev) |
| 17:37:07 | FromDiscord | <litlighilit> concept is just like other lang's interface↵(@mjsdev) |
| 17:37:21 | FromDiscord | <fridge777> hmmm...well so far ive enjoyed that paradigm but i guess it also means you can not expect types to have "behavior" |
| 17:37:59 | FromDiscord | <fridge777> something like traits from rust would be nice to have? i say.. okay hslice implements Iterable and then i can just write a map function to work on that trait, and write it once |
| 17:40:47 | FromDiscord | <mjsdev> Are traits in rust just interfaces or do they define implementation of some sorts? |
| 17:41:01 | FromDiscord | <fridge777> you define an implementation |
| 17:41:20 | FromDiscord | <litlighilit> yes↵(@fridge777) |
| 17:41:21 | FromDiscord | <litlighilit> I'm going to give my usage |
| 17:41:58 | FromDiscord | <fridge777> dont tell me concepts are another name for traits |
| 17:42:27 | FromDiscord | <litlighilit> [https://github.com/nimpylib/nimpylib/blob/master/src%2Fpylib%2Fcollections_abc%2Fiters.nim](https://github.com/nimpylib/nimpylib/blob/master/src%252Fpylib%252Fcollections_abc%252Fiters.nim) |
| 17:43:09 | FromDiscord | <fridge777> https://github.com/nimpylib/nimpylib/blob/master/src/pylib/collections_abc/iters.nim |
| 17:43:39 | FromDiscord | <mjsdev> no, there's no implementation in concepts (but I'm sure this thing here will come up with a "nope...") |
| 17:43:49 | FromDiscord | <litlighilit> then I define procs on Iterable↵(@mjsdev) |
| 17:44:02 | FromDiscord | <litlighilit> On anywhere |
| 17:44:09 | FromDiscord | <litlighilit> and use them somewhere else |
| 17:45:13 | FromDiscord | <mjsdev> A concept is basically a type that defines rules that need to match for something to be considered that type |
| 17:45:29 | FromDiscord | <litlighilit> like this [https://github.com/nimpylib/nimpylib/blob/master/src%2Fpylib%2Fbuiltins%2Fiters.nim](https://github.com/nimpylib/nimpylib/blob/master/src%252Fpylib%252Fbuiltins%252Fiters.nim) |
| 17:45:39 | FromDiscord | <litlighilit> like this [https://github.com/nimpylib/nimpylib/blob/master/src%2Fpylib%2Fbuiltins%2Fiters.nim](https://github.com/nimpylib/nimpylib/blob/master/src%252Fpylib%252Fbuiltins%252Fiters.nim) |
| 17:45:41 | FromDiscord | <fridge777> that sounds good |
| 17:45:53 | FromDiscord | <litlighilit> oh |
| 17:46:07 | FromDiscord | <litlighilit> btw I had done `map` |
| 17:46:16 | FromDiscord | <fridge777> discord fucks up the links so here https://github.com/nimpylib/nimpylib/blob/master/src/pylib/builtins/iters.nim |
| 17:46:40 | FromDiscord | <litlighilit> yeah, just within this↵(@fridge777) |
| 17:46:41 | FromDiscord | <fridge777> In reply to @litlighilit "btw I had done": lmao |
| 17:46:46 | FromDiscord | <fridge777> i found it |
| 17:47:11 | FromDiscord | <litlighilit> emm, in fact not discord's fault↵(@fridge777) |
| 17:47:26 | FromDiscord | <litlighilit> and in fact all the urls are valid |
| 17:47:37 | FromDiscord | <fridge777> yeah ok it looks like irc bridge is sending markup |
| 17:48:03 | FromDiscord | <fridge777> the one in ( ) is not |
| 17:48:36 | FromDiscord | <fridge777> okay, im gonna need to read about this. i hope concepts are more powerful than traits cause the syntax is kinda scuffed \:P |
| 17:48:51 | FromDiscord | <fridge777> thanks all for helping me grapple with this |
| 17:50:28 | FromDiscord | <litlighilit> and in fact all the urls are valid (you can just try my sending urls)↵(or maybe in discord client my urls becomes unclickable?) |
| 17:50:55 | FromDiscord | <litlighilit> and in fact all the urls are valid (you can just try my sending urls)↵(or maybe in discord client my urls becomes unclickable? idk) |
| 17:53:13 | FromDiscord | <litlighilit> lol, so you can define `proc/func`s in such type↵(@mjsdev) |
| 17:53:18 | FromDiscord | <mjsdev> In reply to @fridge777 "okay, im gonna need": Again, not familiar with rust traits -- but they sound like different things altogether if rust traits provide implementation. |
| 17:53:34 | FromDiscord | <litlighilit> as well as `template/macro`s |
| 17:54:09 | FromDiscord | <litlighilit> rust's like OOP's abc↵(@mjsdev) |
| 17:54:26 | FromDiscord | <litlighilit> (abstract class) |
| 17:54:46 | FromDiscord | <litlighilit> while Nim's is non-enforced |
| 17:55:14 | FromDiscord | <litlighilit> while Nim's is opened |
| 17:55:16 | FromDiscord | <mjsdev> If they provide implementation thought it sounds like PHP's traits, which are not like an abstract class in that they provide horizontal re-use |
| 17:55:24 | FromDiscord | <mjsdev> (edit) "thought" => "though" |
| 17:57:53 | FromDiscord | <fridge777> Imagine you have Cat and Lion types and you define a meow function for both. That's fine but now you want a function that works with Feline. Traits would let you define a trait Feline with function meow and then if you write an implementation for both Cat and Lion you can use them where you would use Feline as a type |
| 17:58:06 | FromDiscord | <fridge777> It's more of a mixin than an abstract class |
| 17:59:19 | FromDiscord | <mjsdev> RIght, but there you're saying you need to write the implementation for Cat and Lion... does Feline provide a default implemetnation or does it literally just define the function signature? |
| 17:59:45 | FromDiscord | <mjsdev> and then Cat and Lion if they implement Feline need to provide that implementation |
| 18:01:47 | FromDiscord | <fridge777> just a signature. and when they implement the trait they MUST provide the implementation |
| 18:02:01 | FromDiscord | <fridge777> god i just clicked on update android while typing, stupid popups |
| 18:02:12 | FromDiscord | <mjsdev> Ok, yeah, then those are more like PHP's interfaces, and more like concepts I guess. |
| 18:02:43 | FromDiscord | <mjsdev> main difference with concepts is you don't say something implements them and then are forced... |
| 18:05:09 | FromDiscord | <mjsdev> A type just "is" that concept if it matches the rules (is how I understand it) |
| 18:05:56 | FromDiscord | <litlighilit> nim's needs no notation like Java's `implement Xxx`↵or Rusts `impl Xxx for`↵(@fridge777) |
| 18:06:18 | FromDiscord | <mjsdev> less explicit, but perhaps more "modular" |
| 18:14:54 | FromDiscord | <asviest> In reply to @litlighilit "nim's needs no notation": For what? |
| 18:19:07 | FromDiscord | <litlighilit> concept implictly appies to types that implements its requirements |
| 18:19:40 | FromDiscord | <litlighilit> or we can say types will that concept implicitly |
| 18:20:16 | FromDiscord | <litlighilit> or we can say types will be of that concept implicitly |
| 18:30:07 | FromDiscord | <fridge777> it works! |
| 18:31:03 | FromDiscord | <fridge777> though interestingly enough, i needed to define an iterator for HSlice even though this exists in the standard lib:↵ iterator items[T: Ordinal](s: Slice[T]): T |
| 18:31:23 | FromDiscord | <fridge777> https://media.discordapp.net/attachments/371759389889003532/1446932045615075358/image.png?ex=6935c7fa&is=6934767a&hm=d5cf8e372410ffab240111731d6cd2fd1e295e7ce7593c8eb883bfb90fe32b72& |
| 18:35:30 | * | rockcavera joined #nim |
| 18:42:14 | FromDiscord | <mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=VnvyAIQV |
| 18:46:27 | FromDiscord | <mjsdev> Oh, you've got it already it looks like |
| 18:47:55 | FromDiscord | <mjsdev> I should probably do one of these for pairs too |
| 19:13:24 | FromDiscord | <fridge777> heres what i had done |
| 19:13:31 | FromDiscord | <fridge777> sent a code paste, see https://play.nim-lang.org/#pasty=kkGHEpol |
| 19:14:01 | FromDiscord | <fridge777> i tried with the lowercase self syntax first but didnt get it to work |
| 19:14:17 | FromDiscord | <fridge777> so i just looked at the manual where concepts are introduced |
| 19:16:14 | FromDiscord | <mjsdev> I'm not sure where Self with capital S is coming from... what I understood that is defined immediately after the `concept` keyword esentially |
| 19:16:35 | FromDiscord | <fridge777> heres how the manual explains it https://nim-lang.org/docs/manual.html#concepts |
| 19:17:06 | FromDiscord | <fridge777> this didnt compile for me |
| 19:17:10 | FromDiscord | <fridge777> sent a code paste, see https://play.nim-lang.org/#pasty=HlebJNmT |
| 19:17:29 | FromDiscord | <fridge777> your version works without defining an extra iterator for Hslice though which is great |
| 19:17:30 | FromDiscord | <mjsdev> I would think you'd need items(self) |
| 19:17:41 | FromDiscord | <mjsdev> in your previous one |
| 19:17:55 | FromDiscord | <fridge777> i still get an error |
| 19:18:01 | FromDiscord | <mjsdev> as x would be undefined then maybe x: self |
| 19:18:23 | FromDiscord | <mjsdev> weird... |
| 19:18:29 | FromDiscord | <mjsdev> what version you on? |
| 19:18:38 | FromDiscord | <mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=PsmxYrYQ |
| 19:18:41 | FromDiscord | <mjsdev> lol |
| 19:18:59 | FromDiscord | <mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=lZfxPmIn |
| 19:19:01 | FromDiscord | <fridge777> 2.2.6 |
| 19:19:02 | FromDiscord | <mjsdev> With the above |
| 19:19:18 | FromDiscord | <mjsdev> weird, same |
| 19:33:10 | FromDiscord | <fridge777> why write T below concept self btw? |
| 19:37:43 | FromDiscord | <fridge777> sent a code paste, see https://play.nim-lang.org/#pasty=bsEhAgGQ |
| 19:38:16 | FromDiscord | <fridge777> sent a code paste, see https://play.nim-lang.org/#pasty=IlFLiWjy |
| 19:47:03 | FromDiscord | <mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=oJldIGjQ |
| 19:47:26 | FromDiscord | <mjsdev> Now pairs works on anything iterable and gives them int indexes (so that includes HSlice) |
| 19:48:12 | FromDiscord | <mjsdev> and renamed the other to "traversable" like PHP |
| 19:49:04 | FromDiscord | <fridge777> very nice! im a fan of concepts for sure. maybe not the name which makes it a bit annoying to google |
| 19:49:31 | FromDiscord | <mjsdev> I thought they were broken, as last time I tried to use them they didn't actually seem to work in parameter lists? |
| 19:49:50 | FromDiscord | <fridge777> > It seemed to be done in other examples, I assumed it was good practice ?↵yeah i saw it in litlighilits repository but removing it doesnt seem to do anything... also i dont see it being used in the manual |
| 19:50:37 | FromDiscord | <mjsdev> I assumed it just asserts there's an actual type behind it maybe it resolve some sort of need for forward declaration or some weird recusion thing? Not sure. |
| 19:51:03 | FromDiscord | <mjsdev> Either way, seems like good enough practice and, at least IMO, makes it a bit clearer. |
| 19:51:39 | FromDiscord | <fridge777> https://nim-lang.org/docs/manual_experimental.html#concepts this is the longest explanation of concepts i could find but it looks VERY different from how they are used here https://nim-lang.org/docs/manual.html#concepts↵is there like a better source than either of these? |
| 19:52:46 | FromDiscord | <mjsdev> I feel like the latter is just trying to appeal more to people familiar with interfaces? |
| 19:53:41 | FromDiscord | <mjsdev> I'm definitely pulling that stuff above into mininim |
| 19:53:46 | FromDiscord | <mjsdev> this will go perfectly with my bool converters |
| 19:54:02 | FromDiscord | <mjsdev> will need to add more functions like filter and what not though |
| 19:54:05 | FromDiscord | <fridge777> yeah but also, the first one doesnt mention the stuff from the second one at all i think |
| 19:54:16 | FromDiscord | <fridge777> which feels odd |
| 19:54:40 | FromDiscord | <fridge777> you yourself were confused by the title case Self |
| 19:54:51 | FromDiscord | <fridge777> maybe its jsut too experimental still to be documented comprehensively |
| 19:54:54 | FromDiscord | <fridge777> u.u |
| 19:55:12 | FromDiscord | <mjsdev> I'm sticking to the lowercase `self` style above that works for me, it corresponds to my other stuff in mininim |
| 19:55:37 | FromDiscord | <mjsdev> https://github.com/primd-cooperative/mininim?tab=readme-ov-file#static-features |
| 19:56:27 | FromDiscord | <fridge777> nice |
| 19:56:42 | FromDiscord | <fridge777> glad you got something out of this today too lol |
| 19:56:54 | FromDiscord | <fridge777> i started being a little annoyed with nim today but now i like it more |
| 19:57:37 | FromDiscord | <mjsdev> It grows on you... it's definitely "different" though -- I think fundamentally it's really good, but as you've seen, it lacks in coherency and consistency in what most people expect from a standard library |
| 19:58:02 | FromDiscord | <mjsdev> So it can feel very difficult coming from other languages where things just seem to work |
| 19:58:38 | FromDiscord | <mjsdev> I almost died when I couldn't do:↵↵if <int>:↵ .... |
| 19:59:18 | FromDiscord | <fridge777> haha |
| 20:00:19 | FromDiscord | <fridge777> yeah im fine with writing some of this on my own, it will be fun. right now im having the same giddy feeling as with raku but i havent shot myself in the foot 1000 times yet during advent of code |
| 20:00:40 | FromDiscord | <fridge777> (aka perl 6) |
| 20:05:46 | FromDiscord | <mjsdev> looks like the [] access is causing some conflic though |
| 20:44:12 | FromDiscord | <litlighilit> if u really want it↵(@mjsdev) |
| 20:44:17 | FromDiscord | <litlighilit> use `converter` |
| 20:44:25 | FromDiscord | <mjsdev> I have a converter |
| 20:44:30 | FromDiscord | <mjsdev> one for strings too |
| 20:45:24 | FromDiscord | <litlighilit> use `converter` \<https://nim-lang.org/docs/manual.html#converters> |
| 20:45:50 | FromDiscord | <litlighilit> use [`converter`](https://nim-lang.org/docs/manual.html#converters) |
| 20:56:29 | * | amadaluzia quit (Remote host closed the connection) |
| 21:13:40 | FromDiscord | <litlighilit> Hadn't known concept has been doumented in manual.htmlhaha, the kind of concept what you called as `lower style self`↵is in fact the older style.And the `Self` style is the new style.But at the time I wrote pylib's iters, there were no new style yet↵(@fridge777) |
| 21:14:33 | FromDiscord | <litlighilit> Hadn't known concept has been doumented in manual.html↵haha, the kind of concept what you called as lower style self↵is in fact the older style. (that's why it's in manual\_experiemntal.html)And the Self style is the new style.↵But at the time I wrote pylib's iters, there were no new style yet |
| 21:14:36 | FromDiscord | <fridge777> the old style seems to be more capable |
| 21:14:48 | FromDiscord | <fridge777> but then again new style seems to have basically no docs |
| 21:14:53 | FromDiscord | <fridge777> so who knows |
| 21:15:23 | FromDiscord | <litlighilit> donno in fact. As I personally haven't used the new style often |
| 21:55:58 | * | _th3r00t joined #nim |
| 21:56:06 | * | th3r00t quit (Ping timeout: 252 seconds) |
| 22:02:40 | * | beholders_eye joined #nim |
| 22:03:23 | * | resica joined #nim |
| 22:09:21 | * | resica quit (Quit: Leaving) |
| 22:14:14 | * | Jjp137 quit (Quit: Leaving) |
| 22:20:24 | * | Jjp137 joined #nim |
| 22:20:30 | FromDiscord | <mjsdev> Can someone clarify whether or not I'm actually supposed to use {. base .} or not... I don't even know what tooling half this stuff is using, but if I'm in Zed (nimlangserver by default?) it complains with {. base .} telling me "method is not base" (even though it is?) and if I'm in VSCode it complains without it telling me baseless methods are deprecated. |
| 23:30:43 | FromDiscord | <litlighilit> use {.base.} |
| 23:32:12 | FromDiscord | <litlighilit> (@mjsdev you can verify via running \`nim r YOUR-FILE\` command to see its output warning) |
| 23:32:18 | FromDiscord | <litlighilit> (@mjsdev you can verify via running \`nim r YOUR-FILE\` command to see its output warning) |
| 23:33:02 | FromDiscord | <litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1447007378011852931): use {.base.} iff it's the very first method defined in inheritance chain |
| 23:43:26 | FromDiscord | <litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1447007777904922687): ( @mjsdev you can verify via running `nim r YOUR-FILE` command to see its output warning) |