<< 11-06-2023 >>

00:00:04*antranigv quit (*.net *.split)
00:00:04*cnx quit (*.net *.split)
00:00:04*FromDiscord quit (*.net *.split)
00:00:05*tinytoast quit (*.net *.split)
00:00:05*madprops quit (*.net *.split)
00:00:05*lumidify quit (*.net *.split)
00:00:05*acidsys quit (*.net *.split)
00:00:05*attah quit (*.net *.split)
00:00:32*FromDiscord joined #nim
00:01:21*madprops joined #nim
00:01:25*acidsys joined #nim
00:01:48*madprops quit (Changing host)
00:01:48*madprops joined #nim
00:02:00FromDiscord<Elegantbeef> You don't get data loss in procs, you just lose access to fields reasonably πŸ˜„
00:02:15*cnx joined #nim
00:02:22*antranigv joined #nim
00:02:25*attah joined #nim
00:02:38*tinystoat joined #nim
00:03:50FromDiscord<graveflo> not with refs yea but I'm saying that there is nothing wrong with either of those things happening as long as you understand what is possible. It would only be bad if the compiler believed it could access addresses that were out of segment
00:03:59FromDiscord<graveflo> ok I read your post but wtf is this: `MyOtherType[T] = distinct int`
00:04:08FromDiscord<Elegantbeef> What?
00:04:19FromDiscord<Elegantbeef> It's based off real code
00:04:44FromDiscord<Elegantbeef> You want to attach type information to a type but it's the same underlying tpye
00:04:55FromDiscord<Elegantbeef> https://github.com/beef331/truss3d/blob/master/src/truss3D/shaders.nim#L8-L9
00:05:23*lumidify joined #nim
00:05:41FromDiscord<Elegantbeef> This is type safety so I cannot accidently do `seq[int].copyTo Ssbo[seq[float]]`
00:06:47FromDiscord<arathanis> see, having `Container[Y] is Container[X]` be false even if `Y is X` is true due to inheritance makes perfect sense to me
00:06:53FromDiscord<arathanis> and was what i expected was happening
00:07:16FromDiscord<arathanis> it was the fact that `Container[X] is Container[Y]` wound up being true that was confusing...
00:07:41FromDiscord<Elegantbeef> Sure but that's just cause it didnt error due to not being instantiatable
00:08:23FromDiscord<Elegantbeef> Actual usage resulted in an error
00:08:32FromDiscord<arathanis> oh ok, the failed instantiation made it basically be `Bar is Bar`?
00:08:59FromDiscord<arathanis> but when used outside the type system it breaks cause `ref Child` is not `ref Parent` as far as typedesc are concerned
00:09:05FromDiscord<Elegantbeef> So it's odd but it never would've impacted real code
00:09:05FromDiscord<Elegantbeef> No clue what happened
00:09:06FromDiscord<Elegantbeef> But if you attempted to instantiate that type it errored
00:09:28FromDiscord<arathanis> inheritance only applies to instances, when referring to typedesc they is distinct
00:09:32FromDiscord<arathanis> is that true?
00:09:40FromDiscord<arathanis> (edit) "is" => "are"
00:09:54FromDiscord<Andreas> @elegantbeef hi again, wrt. Kate - which is sadly not doing stuff for me, but with Katie came along a DBus to my system ? Can one do anything funny or productive with a DBus ? Do you have one, too ?
00:09:56FromDiscord<Elegantbeef> Perhaps though `[T: Parent]` works in proc
00:10:37FromDiscord<Elegantbeef> Sadly not on a dev machine presently so cannot say anything there
00:17:26FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xWU
00:18:28FromDiscord<Elegantbeef> Right but you need to do a runtime check for every single instance of the table
00:18:48FromDiscord<graveflo> of course...
00:18:51FromDiscord<Elegantbeef> It's an `O(n)` check that's hidden in something that appears to be 0 cost
00:19:17FromDiscord<graveflo> no it doesn't this is just simple mechanics. That is needed because it is forced to be needed by the code
00:19:20FromDiscord<Elegantbeef> I never implied you'd be able to do it without runtime check
00:19:39FromDiscord<Elegantbeef> I was just explaining what's required
00:19:55FromDiscord<Elegantbeef> You need to walk the type tree and all instances that differentiate from `Child` to ensure they match
00:20:03FromDiscord<Elegantbeef> This requires a complex type walking mechanism
00:20:47FromDiscord<graveflo> dont you just need to check if its RTTI is `Parent` specifically?
00:21:03FromDiscord<Elegantbeef> Right, but you have to walk down the fields of `Table`
00:21:33FromDiscord<graveflo> this is the same issue with creating a `seq[RootOb]` no?
00:21:41FromDiscord<graveflo> (edit) "`seq[RootOb]`" => "`seq[RootObj]`"
00:21:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4xWV
00:22:16FromDiscord<Elegantbeef> No clue I'm only talking that you have to walk down the entire type definition to ensure that it's converitble
00:22:46FromDiscord<Elegantbeef> Depending on the complexity of the type that's crazy
00:22:58FromDiscord<graveflo> you mean at compile time? Yea it has to traverse the whole tree
00:24:11FromDiscord<Elegantbeef> Yea I was just explaining the complexity required
00:24:12FromDiscord<Elegantbeef> I never one said it shouldnt/cannot be done
00:24:12FromDiscord<Elegantbeef> They acted like it was simple to implement, plus I just dislike them
00:25:03FromDiscord<graveflo> xD poor them.. Ok so this is just an issue of nim not evaluating the generic beyond 1 level
00:25:13FromDiscord<Elegantbeef> This isnt even an issue really
00:25:24FromDiscord<Elegantbeef> It's an unimplemented feature
00:25:59FromDiscord<graveflo> At that point its more of a semantic argument on definition bc nim can define what generics and inheritance means
00:27:01FromDiscord<graveflo> but using the most sensible definitions and expecting the compiler to interpret a situation in the most predicable way possible its incomplete at best
00:27:32FromDiscord<Elegantbeef> To have `T[Child] -> T[Parent]` you need to ensure the entire type tree does not change based off the two typesTo have `T[Parent] -> T[Child]` you need to do the above and do a conversion check for any instance of `Parent` the type tree has
00:28:31FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4xWX
00:28:47FromDiscord<graveflo> the compiler should never let you do Parent -> Child implicitly thats just how inheritance works
00:28:50FromDiscord<krab4t> i think this bot talk too much on its own. probably chatgpt generator?
00:29:16FromDiscord<Elegantbeef> You need to check `a` `b.data` and `c.a` `c.b` `c.c` which rotates back and forth
00:29:23FromDiscord<Elegantbeef> I'm just a fucking NPC really
00:29:49FromDiscord<Elegantbeef> The compiler doesnt allow down casting implicitly πŸ˜„
00:30:31FromDiscord<Elegantbeef> The amount of people that come in here not realizing people exist astounds me
00:31:01FromDiscord<Elegantbeef> Even if it's done explicitly the above needs to happen
00:31:11FromDiscord<graveflo> ok so that way is not needed for any checks at compile time.. thats a user design problem and its well understood. I get the complexity you are talking about with traversing the definition trees but thats how inheritance is.. its branching complexity. This is what is expected in these situations
00:31:33FromDiscord<Elegantbeef> Well inheritance is simple generally
00:31:43FromDiscord<Elegantbeef> In type language
00:31:56FromDiscord<Elegantbeef> The complexity of inheritance is outside of this conversation
00:33:09FromDiscord<Elegantbeef> We're simply taking about the complexity of inheritable generic parameter type conversion, and whether Nim should do it
00:33:17FromDiscord<graveflo> right this is more of an issue with branching complexity from generics. When I was first asking questions here I was worried about the exact same thing. Now that I see that this pattern is avoided it makes sense why I was told that it wasn't an issue. Not that it's anyone's fault but Im js, yea, using inheritance with generics really does create situations where there are MANY variations
00:35:02FromDiscord<graveflo> but still when thinking about how the compiler could arbitrate these situations we are not talking about a very complex algo.. assuming the data structures are clean. Its just a branch and bound
00:35:06FromDiscord<graveflo> its not that bad
00:36:25FromDiscord<graveflo> like code linters do more in OOP langs
00:37:20*azimut quit (Ping timeout: 240 seconds)
00:40:14FromDiscord<Andreas> In reply to @graveflo "like code linters do": right, and do these OOP-langs come with Templates and Macro-facilities, too ?
00:40:29FromDiscord<krab4t> nlvm can't compile telebot.nim sadge
00:41:40FromDiscord<graveflo> In reply to @Andreas "right, and do these": yea usually, but it's not about lang vs lang or design vs design. I'm just saying that in terms of how "hard" and how efficient algos like this are.. We are not talking about a beast. It's just slightly more complicated then doing 1 check xD
00:42:54FromDiscord<Elegantbeef> You have to walk down every single type and field that derives from the generic parameter, it's not that bad. Just quite a lot of logic for object variants and friends
00:43:22FromDiscord<Elegantbeef> Does `std::vector<Child>` convert to `std::vector<Parent>` in C++?
00:43:47FromDiscord<graveflo> no idea I dont like C++
00:43:58FromDiscord<Elegantbeef> Sure but it's a "OOP language"
00:44:10FromDiscord<Elegantbeef> Does it work in C#/Java?
00:44:28FromDiscord<graveflo> no its a bastardized OOP patch along with 100 other broken things in a soup of terrible syntax
00:45:37FromDiscord<graveflo> In reply to @Elegantbeef "Does it work in": idk I'll look into it. The point is that generics have the power to do this and it's a shame that they dont. I would be perfectly fine with nim being more powerful then X# and java
00:45:52FromDiscord<Andreas> In reply to @graveflo "yea usually, but it's": i guess linter support for OOP is moderate problem vs.linter-support for macros and other nim-goodies - thats hard to get right, and thats why i'd like a switch on nimsuggest to disable macro-support and stop crashing...
00:45:53FromDiscord<graveflo> (edit) "X#" => "C#"
00:47:37FromDiscord<graveflo> In reply to @Andreas "i guess linter support": yea it takes work to make a good thing. Nim still needs some work. I'd like to see it be the best it can be
00:48:11FromDiscord<graveflo> god now I have to remember how java works from my days at college ugh
00:48:41FromDiscord<krab4t> okay lets discover how to use http client in nim, in go its simply `http.Get(apiUrl)`
00:48:59FromDiscord<Elegantbeef> So this doesnt compile
00:49:01FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/bA3tZ
00:49:42FromDiscord<Elegantbeef> Suffice to say if a OOP centric language like C# doesnt do this it's not the most important thing to support
00:49:46FromDiscord<Elegantbeef> It can of course support it, so PRs welcome πŸ˜›
00:51:04FromDiscord<krab4t> `client.getContent(url)` ?
00:51:11FromDiscord<Elegantbeef> Luckily a macro could be used for this conversion
00:52:57FromDiscord<graveflo> k gimme a sec you are really going to make me write java again
00:53:32FromDiscord<Andreas> In reply to @graveflo "yea it takes work": well, i like combining things, glueing stuff togester and recently i played with QuickJS. It can OOP in any flavour you like and it can use nim-data-types and libs if you need smth. fast... then last week there was this crazy-devil, who started to build a HTML-rendering engine with Nim and QuickJS - i'd rather wait for Servo and than use some nim-glue, but we'll see..
00:54:15FromDiscord<Andreas> (edit) "togester" => "together"
01:03:59FromDiscord<krab4t> what equivalent for `sprintf` in nim? like `fmt.Sprintf` in go?
01:05:29FromDiscord<Andreas> In reply to @krab4t "what equivalent for `sprintf`": maybe this https://nim-lang.org/docs/strformat.html#%26.m
01:07:19FromDiscord<krab4t> it takes parameters for replacing %s, %i like sprintf?
01:15:24FromDiscord<Elegantbeef> No
01:16:19FromDiscord<Elegantbeef> you just do `echo fmt"{myVal}, {myOtherVal}"`
01:16:37FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xX4
01:17:08FromDiscord<krab4t> https://nim-lang.org/docs/strutils.html#%25%2Cstring%2CopenArray%5Bstring%5D
01:18:48FromDiscord<Elegantbeef> Yes `%` exists
01:19:06FromDiscord<Elegantbeef> But so does `fmt`
01:22:39FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xX5
01:23:57FromDiscord<graveflo> but we arent even talking about generics anymore. When generics are used in the wild they have a concrete type. We are only discussing the resolution in our convo. If you give a constraint of type `X` that means `X` or its sub classes for an inheritance model (`RootObj`)
01:24:36FromDiscord<Elegantbeef> So java supports it through the abhorrent `? extends Parent`
01:25:31FromDiscord<Elegantbeef> Well there are two conversations we had, firstly the one arath brought up secondly the implicit conversion of a generic type with a child type to the parent
01:25:39FromDiscord<Elegantbeef> My C# code was in reference to the latter
01:25:50FromDiscord<graveflo> I'm pretty sure you are convoluting "it" here. Even if you just kept is as a collection of `Parent` we are doing the same thing. All places where `Parent` is acceptable in a OO system `Child` is also acceptable
01:26:29FromDiscord<graveflo> implicit conversion in constraint resolution is not the same as a casting syntax
01:26:45FromDiscord<graveflo> Im sure c# has a way to do it to but that is only because it is a logically compatible form
01:26:51FromDiscord<Elegantbeef> Again two different conversation
01:27:11FromDiscord<Elegantbeef> C# doesnt implicitly or explicitly convert a `List<Child>` to `List<Parent>`
01:27:41FromDiscord<graveflo> oh well idk what I'm proving then anymore but yea. You can treat `Child` as `Parent` where ever `Parent` is acceptable as long as `Child` inherits `Parent`
01:28:04FromDiscord<Elegantbeef> `List<Parent> list2 = list` nor `List<Parent> list2 = (List<Parent>)(list)` works
01:28:33FromDiscord<Elegantbeef> I do not know if I agree that all `T[Child]` should be convertible to `T[Parent]`
01:29:02FromDiscord<Elegantbeef> You lose type safety if implicit conversions work
01:29:13FromDiscord<graveflo> why it must have all the faculties of `Parent` or there is something else wrong
01:29:21FromDiscord<graveflo> thats the whole point of inheritance
01:29:38FromDiscord<Elegantbeef> Having a generic parameter means you want to constrain things to that parameter
01:29:48FromDiscord<Elegantbeef> When you upcast a generic parameter you're losing static information
01:30:04FromDiscord<graveflo> no it means that the static information is deferred until it can be resolved
01:30:10FromDiscord<Elegantbeef> `seq[Child]` to `seq[Parent]` we've now lost informatio
01:30:12FromDiscord<graveflo> thats why nim errs when it cannot be resolved
01:30:44FromDiscord<krab4t> `identifier expected, but found 'httpWorker.asyncProc'` what this about?
01:30:57FromDiscord<Elegantbeef> "deferred until it can be resolved"?
01:31:01FromDiscord<graveflo> In reply to @Elegantbeef "`seq[Child]` to `seq[Parent]` we've": beef come on now. Not if its a ref RoobObj and even if it did work like that, as I said, this is a known thing. Ofc `Parent` == `Child`
01:31:34FromDiscord<graveflo> In reply to @Elegantbeef ""deferred until it can": yes all generics must resolve to a concrete type unless they are transient
01:31:52FromDiscord<Elegantbeef> I treat all inheritance as `ref` πŸ˜„β†΅(@graveflo)
01:31:59FromDiscord<Elegantbeef> The thing is you do lose static type information
01:32:14FromDiscord<graveflo> well I have to be specific bc Im not sure why it would be confusing otherwise
01:32:48FromDiscord<Elegantbeef> It's not confusing it's losing type information
01:32:49FromDiscord<graveflo> if you have code that is coupled to `Parent` not `Child` ofc you are operating in a context that is a subset of `Child` at most thats the whole point
01:33:36FromDiscord<graveflo> In reply to @Elegantbeef "It's not confusing it's": type information must be reclaimed at run time from RTTI if they have been manually made ambiguous this is obvious
01:34:07FromDiscord<Elegantbeef> Sure but we're not talking about RTTI
01:34:24FromDiscord<Elegantbeef> We're purely talking about at a type language level
01:34:36FromDiscord<Elegantbeef> `seq[Child]` -\> `seq[Parent]` is a loss of type information
01:35:08FromDiscord<graveflo> then there is no issue because `Parent` can only operate with other paths that are contained to `Parent` again this is the whole point of OOP you arent supposed to go back the other way statically its nonsense
01:35:23FromDiscord<graveflo> (edit) "contained" => "constrained"
01:36:13FromDiscord<Elegantbeef> consider `proc doThing[T](val: T, s: seq[T])`
01:36:59FromDiscord<graveflo> is that all?
01:36:59FromDiscord<Elegantbeef> if you do `Parent().doThing(seq[Child])` you type information and it doesnt error
01:37:28FromDiscord<Elegantbeef> I'm simply just saying I do not know if that's ideal
01:37:55FromDiscord<Elegantbeef> I still think just cause a generic parameter is inheritable does not mean that the data type should abide by inheritance
01:38:20FromDiscord<graveflo> it already works that way just on one level
01:38:34FromDiscord<Elegantbeef> "Just on one level"?
01:38:37FromDiscord<graveflo> In reply to @Elegantbeef "I'm simply just saying": What is ideal then? I don't understand why this is wrong
01:38:54FromDiscord<graveflo> In reply to @Elegantbeef ""Just on one level"?": yes I can constrain a generic to a type and its subclasses
01:39:17FromDiscord<Elegantbeef> How?
01:39:24FromDiscord<graveflo> but if a type inherits from that type it doesn't inherit the constraint? that makes no sense
01:39:58FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xX7
01:40:10FromDiscord<Elegantbeef> I just think that generic parameters are explicit type annotations and implicitly removing them is bad for the type system. Is that wrong? Who knows. Is it right? Who knows?
01:41:10FromDiscord<graveflo> well yea I think they shouldn't be removed too. Thats why the constraints should keep. Thats what I'm saying
01:41:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4xX8
01:42:09FromDiscord<Elegantbeef> the constraints should keep?
01:42:15*oldpcuser quit (Quit: restarting the X session)
01:43:55FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xX9
01:44:05FromDiscord<krab4t> okay i forgot to make proc public ... it happens all the time because in Go you just start with uppercase letter
01:45:06FromDiscord<Elegantbeef> grave given `var a: MyType[Child]` errors one of these have to be a bug πŸ˜„
01:45:15FromDiscord<Elegantbeef> Right Go makes the wrong choice
01:45:32FromDiscord<graveflo> In reply to @Elegantbeef "grave given `var a:": I've made a very strong argument that one is logical and the other is missing some functionality
01:45:59FromDiscord<krab4t> i prefer write `public`
01:46:01FromDiscord<Elegantbeef> I don't know if it's a strong argument
01:46:26FromDiscord<Elegantbeef> It's an argument, it's consistent atleast with other usages
01:46:33FromDiscord<Elegantbeef> But this is still unrelated to the conversion conversation
01:46:42FromDiscord<Elegantbeef> Two conversations twice the confusion
01:47:18FromDiscord<Elegantbeef> `typeof(a)` is not `MyType[Parent]` btw it's `MyType[Child]`
01:47:50FromDiscord<graveflo> well its all related. We are just going over the basics of what inheritance and in what situations things are compatible. The way I have explained it you can use compatibility when it makes sense and not when it doesn't
01:48:09FromDiscord<graveflo> In reply to @Elegantbeef "`typeof(a)` is not `MyType[Parent]`": yes it should be
01:48:28FromDiscord<graveflo> because it was made concrete
01:48:40FromDiscord<Elegantbeef> Except `var a: MyType[Child]` errors
01:48:41FromDiscord<Elegantbeef> So it's a wonderful hack
01:48:42FromDiscord<Elegantbeef> One of these two shouldnt work
01:48:45FromDiscord<Elegantbeef> I do not know which
01:48:53FromDiscord<graveflo> I do
01:48:56FromDiscord<graveflo> πŸ˜›
01:49:04FromDiscord<Elegantbeef> I am leaning to agree `MyType[Child]` is valid as it's consistent
01:49:22FromDiscord<Elegantbeef> but it still has 0 relation towards the conversion conversation
01:49:31FromDiscord<Elegantbeef> Since even if it works it does not mean anything about conversion
01:49:37FromDiscord<graveflo> ok perhaps
01:50:04FromDiscord<graveflo> yea I'm talking about nim doing something different or I would have nothing to say from the get go
01:50:22FromDiscord<graveflo> using the system in question isn't quite the best way to do this
01:50:32FromDiscord<Elegantbeef> Eitherway add this to yet another bug to your list of "things to learn to fix" πŸ˜›
01:50:56FromDiscord<Elegantbeef> Eh given Nim doesnt have a well defined spec using the system in question is the only way to approximate what should happen
01:51:39FromDiscord<Elegantbeef> If two things that should behave similar are behaving disimilar attempt to fix it in the way that is the most rational
01:51:49FromDiscord<Elegantbeef> Either Araq will say no and dismiss the PR or it'll be accepted πŸ˜„
01:51:52FromDiscord<graveflo> well I'm just saying we can use logic to ascertain what can happen and what the best way to express is
01:52:37FromDiscord<Elegantbeef> Well it's an inheretly flawed system and I'm an idiot so I just reason based off what works, and what I feel should work
01:52:56FromDiscord<graveflo> well same
01:53:51FromDiscord<Elegantbeef> Nim really needs the entire type system and generic ripped out and given to a typing expert to reimplement
01:54:01FromDiscord<Elegantbeef> So much could would stop working, but so much code would also start
01:54:31FromDiscord<graveflo> I'm tellin ya. The way nim does generics on procs is correct generally. It must be or itll segfault. The way it does inheritance + generics is wrong... bc I think core devs dont care about it... it can be fixed
01:54:53FromDiscord<Elegantbeef> Eh the entire generic/type system is in an awful state
01:55:08FromDiscord<Elegantbeef> Hacks ontop of hacks to get something resembling a functioning type system
01:55:11FromDiscord<graveflo> I believe you
01:55:12FromDiscord<krab4t> https://i.imgur.com/sISaWhj.png ???
01:55:25FromDiscord<Elegantbeef> did you install jsony
01:55:35FromDiscord<Elegantbeef> Did you restart your language server after installing it
01:55:46FromDiscord<krab4t> yes and added it into nimble file
01:56:23FromDiscord<krab4t> what language server
01:57:00FromDiscord<Elegantbeef> You editor's tooling likely needs restarted when a package is added
01:57:00FromDiscord<Elegantbeef> your\
01:57:33FromDiscord<krab4t> nimble said `Warning: Using project local deps mod` `Success: jsony installed successfully.`
01:57:54FromDiscord<Elegantbeef> Welcome to Nim, the tooling sucks
01:58:03*oldpcuser joined #nim
01:58:31*oldpcuser quit (Remote host closed the connection)
01:59:01*oldpcuser joined #nim
01:59:48FromDiscord<Elegantbeef> But sadly there is no other language that's as good as it πŸ˜„
01:59:54FromDiscord<krab4t> in go its isnt better, cgo can cache multiple GB outdated binaries, its just GoLand makes user experience better
02:01:25FromDiscord<krab4t> now its working https://i.imgur.com/LwJSwWQ.png jsony just dislikes be last
02:07:47FromDiscord<krab4t> https://transform.tools/json-to-go
02:09:26FromDiscord<krab4t> someone should make same webtool for nim
02:18:01*azimut joined #nim
02:23:17FromDiscord<krab4t> this how its should be done? https://pastebin.com/KecKYmEa no nested objects in nim?
02:41:15FromDiscord<krab4t> how to return Future[string]? just await str?
02:47:46FromDiscord<odexine> In reply to @krab4t "this how its should": Nim doesn’t have anonymous objects
02:47:54FromDiscord<odexine> Either make an object or use a tuple
02:48:17FromDiscord<krab4t> nvm i just forgot {.async.}
02:51:02*disso-peach quit (Quit: Leaving)
02:51:26FromDiscord<krab4t> hmm use what?
02:55:23*systemdsucks quit (*.net *.split)
02:55:23*NimEventer quit (*.net *.split)
02:55:32*systemdsucks joined #nim
02:55:35*NimEventer joined #nim
03:08:18FromDiscord<krab4t> veryPog if object has wrong type jsony just fails, i mean std/json raises error
03:09:02FromDiscord<bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4xXi
03:09:25FromDiscord<bostonboston> (edit) "https://play.nim-lang.org/#ix=4xXi" => "https://play.nim-lang.org/#ix=4xXj"
03:09:32FromDiscord<bostonboston> (edit) "https://play.nim-lang.org/#ix=4xXj" => "https://play.nim-lang.org/#ix=4xXk"
03:53:11FromDiscord<demotomohiro> What error message did you get?
04:27:44*azimut quit (Ping timeout: 240 seconds)
05:35:54FromDiscord<bostonboston> In reply to @demotomohiro "What error message did": "could not load lib "[name of dll]"" or similar (not at PC rn) as opposed to the bad format/differing architecture error
07:37:42FromDiscord<Marcus> Is there a way to resend the email confirmation on the nim forum? Apparently my link expired
07:40:08*ntat joined #nim
07:45:16FromDiscord<Marcus> I guess I have to change my email
07:46:12FromDiscord<Elegantbeef> A moderator can validate your account
07:46:42FromDiscord<Marcus> changing the email worked fine to get a new mail πŸ™‚
07:47:04FromDiscord<Marcus> (checked the sourcecode of the forum first)
08:33:04termereveryone has issues with the forum
08:33:25termerit's a meta joke to talk about things the forum is missing or has broken
08:44:23*pbsds quit (Quit: The Lounge - https://thelounge.chat)
08:46:29*pbsds joined #nim
08:57:33Amun-Rachanging email shouldn't be possible without clicking a link/etc. sent to the old one
09:41:59*disso-peach joined #nim
10:20:55*azimut joined #nim
11:13:04*junaid_ joined #nim
12:05:27*lucasta joined #nim
12:05:36FromDiscord<heysokam> sent a long message, see http://ix.io/4xYJ
12:07:30FromDiscord<tecknicalwarrior> sent a code paste, see https://paste.rs/54nw5
12:07:58FromDiscord<tecknicalwarrior> The weird part is I only added a SPACE at the end of a string, that's it, before that the entire program compiled right
12:08:35FromDiscord<kots> ld.exe: cannot open output file C:\Users\jokej\OneDrive\Documents\Code\nim\main.exe: Permission denied
12:08:39FromDiscord<kots> make sure nothing is running or using main.exe
12:08:41FromDiscord<heysokam> ^
12:20:49FromDiscord<TheFunkyWood> hi
12:20:55FromDiscord<TheFunkyWood> im quite new to the nim language
12:21:08FromDiscord<TheFunkyWood> how
12:21:17FromDiscord<TheFunkyWood> does anyone know any resorces to learn nim?
12:22:54FromDiscord<heysokam> @TheFunkyWood i learned with https://narimiran.github.io/nim-basics/ pretty decent to start
12:23:23FromDiscord<TheFunkyWood> interesting
12:23:38FromDiscord<TheFunkyWood> my end goal is to learn how to build a parser and lexer in nim
12:23:41FromDiscord<heysokam> the official docs also have 3 tuts, but imo that link is better for starting out https://nim-lang.org/docs/tut1.html
12:24:08FromDiscord<TheFunkyWood> yeah
12:24:13FromDiscord<TheFunkyWood> i looked at the official docs
12:25:31FromDiscord<heysokam> In reply to @TheFunkyWood "my end goal is": https://nim-lang.org/docs/parseutils.html you probably want this. or even use `lexerbase` for the advanced version↡https://nim-lang.org/docs/lexbase.html
12:26:20FromDiscord<heysokam> imo, finish those two tutorials and then go back to the lexer goal. you will learn most of the requirements in the tutorial anyway
12:26:23FromDiscord<TheFunkyWood> In reply to @heysokam "https://nim-lang.org/docs/parseutils.html you proba": my main problem is that it really doesnt show me much about how its used
12:26:45FromDiscord<TheFunkyWood> In reply to @heysokam "imo, finish those two": id say im about equivalent to halfway through the tutorial skill wise
12:26:51FromDiscord<heysokam> yeah, because its raw docs. they are only useful when you already know what to do (aka the tut)
12:27:13FromDiscord<heysokam> specially the lexer/parser modules, they are super advanced and with little example docs
12:27:33FromDiscord<TheFunkyWood> im just slightly confused about when you would use macros and templates
12:27:46FromDiscord<heysokam> they are easy to use when you got the knowledge, but for starting out they are difficult to grasp. been there
12:28:14FromDiscord<TheFunkyWood> its not entirely about how to use them, mainly when to use them
12:28:14FromDiscord<heysokam> In reply to @TheFunkyWood "im just slightly confused": macros are for code generation. so programmatically writing what you write yourself
12:29:26FromDiscord<heysokam> templates are more about automatic code replacement. like placing some bit of code in other code, more than for metaprogramming (aka creating the code with a macro)↡templates are basically a highly improved version of C preprocessor macros
12:29:46FromDiscord<TheFunkyWood> In reply to @heysokam "templates are more about": i dont know c...
12:30:30FromDiscord<heysokam> in general, you probably will not need a template unless you know what you are doing. they are only helpful for advanced code. using a proc will inline automatically when it can, so you cannot really outsmart the compiler when starting out in learning
12:30:50FromDiscord<heysokam> when you know how to use them, you will a lot. but dont worry about them yet
12:31:08FromDiscord<TheFunkyWood> ok
12:31:39FromDiscord<heysokam> In reply to @TheFunkyWood "i dont know c...": ah i see. C macros are just code expansion. what you write gets expanded into wherever you placed your macro. so the macro doesn't really exist when the compiler processes the file, it only places that bit of code in there
12:31:52FromDiscord<heysokam> templates are similar, but better functionality
12:32:36FromDiscord<TheFunkyWood> i think my problem is that ive learned the syntax of nim (python really helped me out there) but im not writing code in the most efficient way
12:32:50FromDiscord<TheFunkyWood> im basically writing my code like python but with different keywords
12:33:12FromDiscord<heysokam> regular nim is almost always efficient. its designed such that easy to read and idiomatic is the most efficient code to compile
12:33:35FromDiscord<TheFunkyWood> i mean writing
12:33:36FromDiscord<TheFunkyWood> it
12:33:40FromDiscord<TheFunkyWood> not running it
12:33:49FromDiscord<TheFunkyWood> im not taking advantage of nims unique features
12:33:51FromDiscord<heysokam> In reply to @TheFunkyWood "im basically writing my": that's how it should be. except for getting rid of the "everything is a string" mentality from python
12:34:41FromDiscord<heysokam> in advanced pything, everything is either a class or a dictionary of [string, string]↡in nim, there are much better ways to deal with those things (modules, overloads and enums)
12:34:49FromDiscord<heysokam> (edit) "pything," => "python,"
12:35:04FromDiscord<TheFunkyWood> yeah, too many classes in python
12:35:24FromDiscord<TheFunkyWood> and enums are awesome
12:35:36FromDiscord<heysokam> in nim you would replace those with `object`s, and implement functions that work on that custom type
12:35:55FromDiscord<heysokam> nim enums and overloads are literal gamechangers
12:37:37FromDiscord<TheFunkyWood> i was trying to find a chatgpt conversation
12:37:47FromDiscord<TheFunkyWood> where i asked it how to have classes in nim
12:38:04FromDiscord<heysokam> oof, chatgpt fails catastrophically with nim code
12:38:08FromDiscord<heysokam> also, oop is not needed in nim like at all
12:38:15FromDiscord<TheFunkyWood> In reply to @heysokam "also, oop is not": that was my mistake
12:38:21FromDiscord<heysokam> module imports + the type system is way better than classes
12:38:56FromDiscord<heysokam> overloads take care of name clashes, and you can encapsulate with module visibility and imports
12:39:09FromDiscord<TheFunkyWood> what are overloads?
12:39:23FromDiscord<heysokam> so the structure of the project becomes much more straight forward than class-for-everything stuffs
12:41:47FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4xYN
12:42:17FromDiscord<heysokam> overloads are for having the same symbol name for two different things, and meaning two different things with them
12:42:38FromDiscord<TheFunkyWood> like, variable one and type one in that example?
12:42:51FromDiscord<heysokam> in python or cpp you would need a class, and call `myclass.someFunction()`↡but here you can do that with the type system, no need for class abstractions
12:42:58FromDiscord<TheFunkyWood> oh
12:43:01FromDiscord<TheFunkyWood> the something
12:43:05FromDiscord<TheFunkyWood> that makes sense
12:43:12FromDiscord<TheFunkyWood> that is awesome
12:43:21FromDiscord<heysokam> literal gamechanger, im telling you
12:43:47FromDiscord<demotomohiro> C++ also have overloading
12:44:07FromDiscord<TheFunkyWood> In reply to @heysokam "literal gamechanger, im telling": why did you define a variable?
12:44:13FromDiscord<heysokam> yeah, i was just trying to represent the `.` syntax
12:44:13FromDiscord<TheFunkyWood> oh
12:44:18FromDiscord<TheFunkyWood> nvm im stupid
12:44:29FromDiscord<demotomohiro> overload allows same name procs with different type parameters.
12:44:30FromDiscord<TheFunkyWood> dont mind me
12:44:31FromDiscord<heysokam> In reply to @TheFunkyWood "why did you define": to be able to operate on the variable with the function, so it knows what to do
12:44:36FromDiscord<TheFunkyWood> In reply to @heysokam "to be able to": yeah
12:44:39FromDiscord<TheFunkyWood> i realised
12:44:42FromDiscord<TheFunkyWood> i was an idiot
12:44:48FromDiscord<TheFunkyWood> i forgot that one was a type
12:45:15FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4xYP
12:45:41FromDiscord<TheFunkyWood> yeah
12:45:45FromDiscord<TheFunkyWood> im just an idiot
12:46:05FromDiscord<heysokam> no worries, just trying to give examples of the basics. no probl
12:46:20FromDiscord<TheFunkyWood> nim is amazing
12:46:35FromDiscord<TheFunkyWood> why is not even popular enough to be on the stackoverflow survey?
12:46:49FromDiscord<heysokam> its ergonomic as f. won't find another lang like that
12:50:13FromDiscord<heysokam> sent a long message, see http://ix.io/4xYR
12:50:35FromDiscord<heysokam> (edit) "http://ix.io/4xYR" => "http://ix.io/4xYS"
12:51:02FromDiscord<demotomohiro> In reply to @TheFunkyWood "nim is amazing": I think it is because most of people ask Nim questions here or on Nim forum and dont use stackoverflow much.
12:51:21FromDiscord<TheFunkyWood> In reply to @heysokam "my current understanding is": but honestly, if i was a python developer (the second most popular language) and i saw it had a similar syntax and was faster, that would be enough for me to give it a shot
12:51:37FromDiscord<heysokam> yeah, thats how i landed here myself too
12:52:01*junaid_ quit (Quit: leaving)
12:52:18FromDiscord<TheFunkyWood> i see it as similar to crystal
12:52:36FromDiscord<TheFunkyWood> no backing company
12:52:38FromDiscord<TheFunkyWood> obscure
12:52:44FromDiscord<TheFunkyWood> yet crystal's popular enough to be on the survey
13:01:25*junaid_ joined #nim
13:04:40FromDiscord<Benjamin> What language would you choose to implement an interpreter that needs to be compiled to Wasm? Real life use case. The person in charge is considering Zig.
13:13:20FromDiscord<heysokam> In reply to @Benjamin "What language would you": @elegantbeef was working on that for nim. don't know the state/progress on it
13:13:54FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4xYX
13:14:03FromDiscord<heysokam> yep! i love that personally
13:14:12FromDiscord<odexine> In reply to @Benjamin "What language would you": That works too though
13:15:07FromDiscord<heysokam> In reply to @Benjamin "What language would you": https://github.com/beef331/wasm3
13:23:46*junaid_ quit (Remote host closed the connection)
14:09:48*PMunch joined #nim
14:45:37*derpydoo quit (Read error: Connection reset by peer)
14:55:19FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4xZs
15:22:56*azimut quit (Ping timeout: 240 seconds)
15:26:00*oldpcuser_ joined #nim
15:28:32*oldpcuser quit (Ping timeout: 248 seconds)
15:30:31*oldpcuser_ quit (Remote host closed the connection)
15:31:12*oldpcuser_ joined #nim
15:36:46PMunchFun, reading an IEEE standard and it said it had a "computer program" in Annex A to perform some calculations for me. But it appears like it is written in BASIC or something like that..
15:36:48FromDiscord<shalokshalom> How does Nim exhausivenes checks on unions these days?
15:37:00FromDiscord<shalokshalom> Did you settle on a pattern matching library, finally?
15:37:06PMunchWhat do you mean @shalokshalom?
15:37:25FromDiscord<shalokshalom> Guess you would say checks on object variants?
15:37:46FromDiscord<shalokshalom> In reply to @PMunch "What do you mean": Nim had no official pattern matching library, last time that I looked
15:41:56PMunchStill doesn't, but I'm not sure anyone has tried to push for any of the existing ones to become official
15:42:38PMunchAnd I'm still not sure what kind of checks you mean
15:43:16PMunch@heysokam, how do you try to run that code?
15:44:09FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4xZX
15:48:14PMunch@michaelb.eth, generally I'd say a typedesc in an object is not a great idea, actually a bit surprised to see it work
15:48:52PMunchNim doesn't have type information at runtime, which is why Spec is only valid in a const (as that is compile-time, you could also put it in a var marked with `{.compileTime.}`)
15:49:22FromDiscord<shalokshalom> In reply to @PMunch "And I'm still not": exhausivenes
15:49:29FromDiscord<shalokshalom> if all cases are fulfilled
15:50:29PMunchBut in which scenario?
15:51:21FromDiscord<shalokshalom> what do you mean, in which scenario
15:51:25FromDiscord<shalokshalom> in pattern matching
15:51:34PMunch@michaelb.eth, you could probably do something like this: https://play.nim-lang.org/#ix=4y00
15:51:58PMunch@shalokshalom, but as you said Nim doesn't have pattern matching.. The exhaustiveness check would be up to the pattern-matching library you use
15:52:12FromDiscord<shalokshalom> yepπŸ˜€πŸ˜€
15:52:52FromDiscord<michaelb.eth> In reply to @PMunch "@michaelb.eth, you could probably": thanks, will try to adapt that approach
15:53:05PMunchSo what exactly is your question then @shalokshalom? :P I'm confused
15:53:45FromDiscord<shalokshalom> It seems still to be in fusion
15:53:46FromDiscord<shalokshalom> https://github.com/nim-lang/fusion/tree/master/src/fusion
15:54:08FromDiscord<shalokshalom> I was simply asking, if you have a default pattern matching library with exhausivenes
15:54:10FromDiscord<shalokshalom> that's all
16:06:47FromDiscord<jmgomez> @shalokshalom take a look at @JJ proposal https://github.com/nim-lang/RFCs/issues/525 ↡Anyways fusion is good enough in the meantime although it has that one issue where it cant be used inside a generic proc though 😦
16:07:09PMunch@shalokshalom, aaah, that's what you where asking
16:08:59PMunchTrying to copy this basic code out so I can try and run it, of course the PDF has also introduced line breaks (yay..)
16:11:48FromDiscord<shalokshalom> thanks
16:13:05FromDiscord<shalokshalom> that PR looks very promising
16:13:36FromDiscord<shalokshalom> please dont kill it, offend the author or throw it out of the window, because you have a bad day πŸ˜„
16:13:50FromDiscord<shalokshalom> Andreas is meant.
16:13:52FromDiscord<shalokshalom> πŸ˜„
16:17:46NimEventerNew thread by froeling: A question about the development and compatibility of Nim 2.0 and Nim 1.0, see https://forum.nim-lang.org/t/10265
16:18:14PMunch@shalokshalom, have you seen Fungus by the way?
16:18:41PMunchThe author of that PR has this to say at the end "Many thanks to fungus: which implements a near-identical union and quite similar match already as macros."
16:19:15FromDiscord<shalokshalom> oh, nice
16:22:57FromDiscord<jmgomez> In reply to @shalokshalom "Andreas is meant.": I think if James handles to make such a big PR it will be accepted. What I dont think that will hapen (and hope it doesnt TBH) is for Araq to implement it as even though it is great, there are more important things to tackle IMHO
16:24:34FromDiscord<fabricio> sent a code paste, see https://play.nim-lang.org/#ix=4y09
16:24:36FromDiscord<michaelb.eth> @PMunch thanks a ton, the approach you suggested works great: no more compiler crashes with non-const instances of `Spec`, and it works with all versions of Nim back to 1.2↡https://gist.github.com/michaelsbradleyjr/91c9283cc7bcfee8736c7e94f88a1c97
16:25:52FromDiscord<voidwalker> sent a long message, see http://ix.io/4y0a
16:26:17PMunch@fabricio, not sure, might be a strange $ implementation somewhere
16:26:47FromDiscord<odexine> In reply to @fabricio "why does that code": typeof(<a typedesc>) == <that same typedesc> iirc
16:26:58FromDiscord<odexine> x.model is already a typedesc so
16:27:20FromDiscord<shalokshalom> In reply to @jmgomez "I think if James": Nim not having pattern matching is so often the reason why people stop considering the language in an instance
16:27:32FromDiscord<odexine> In reply to @shalokshalom "Nim not having pattern": well not really i would say
16:27:44PMunchHard to tell for us isn't it
16:27:47FromDiscord<shalokshalom> not only because it's so fundamental, mostly because they go like "if it hasn't that, what else is missing"
16:27:49FromDiscord<jmgomez> Nah, plus it has
16:27:50PMunchKind of a reverse selection bias
16:27:59FromDiscord<shalokshalom> Absolutely
16:28:09FromDiscord<shalokshalom> Great, that you are aware about that
16:28:19FromDiscord<jmgomez> There is another reason everyone knows, even you πŸ˜›
16:28:23FromDiscord<shalokshalom> This is hyper rare among programmers πŸ˜„
16:28:25PMunchAlthough I don't think I've ever heard anyone call it fundamental apart from in more math-based languages
16:28:52FromDiscord<shalokshalom> Well, when you come from imperative languages, sure
16:29:04PMunch@shalokshalom, haha it's easy to get siloed into your own paradigms
16:29:15FromDiscord<shalokshalom> But I live in the world of "math based languages" and so are all my colleagues
16:29:26FromDiscord<shalokshalom> and also my own arguments around a language
16:29:36PMunchWhat would you call those languages by the way? I guess functional wouldn't really apply to all of them
16:29:38FromDiscord<shalokshalom> filter bubble
16:29:51FromDiscord<shalokshalom> I would call them sane
16:29:55FromDiscord<shalokshalom> πŸ˜…
16:29:55FromDiscord<jmgomez> Then again, Nim has pattern matching
16:29:57FromDiscord<!&luke> How can I draw a rotated square with pixie
16:30:06FromDiscord<shalokshalom> declarative is the word I like most
16:30:11FromDiscord<shalokshalom> expressive second
16:30:22FromDiscord<shalokshalom> functional third πŸ˜›
16:30:43FromDiscord<shalokshalom> In reply to @jmgomez "Then again, Nim has": well, in a library
16:30:49FromDiscord<shalokshalom> that is hardly maintained
16:31:02FromDiscord<shalokshalom> there is a reason, why stdlibs are a thing
16:31:20FromDiscord<jmgomez> "be the change you want to be in world"
16:31:28FromDiscord<shalokshalom> That PR seems rather well prepared
16:31:31FromDiscord<jmgomez> promote it to the std, oopen a RFC
16:31:43FromDiscord<shalokshalom> And Araq seems to just sit on their face and fart
16:32:10FromDiscord<shalokshalom> In reply to @jmgomez ""be the change you": Yes, Ghandi πŸ˜„
16:32:25PMunchHe's busy with other stuff
16:32:27FromDiscord<shalokshalom> Do you know that Ghandi was a racist? πŸ˜…
16:32:37PMunchI don't think algebraic data types are on top of his list
16:32:43FromDiscord<shalokshalom> In reply to @PMunch "He's busy with other": I guess. That's no reason to be aggressive
16:32:46FromDiscord<shalokshalom> say nothing
16:32:47FromDiscord<jmgomez> I dunno, but the fact that it can be kinda build (although not perfect) in user space, it's kinda amazing. Also, it has PM which was what you were complaining about in the first place
16:32:48*derpydoo joined #nim
16:32:52FromDiscord<shalokshalom> instead of something destructive
16:33:13PMunchOh I didn't read the comments on that PR
16:33:21FromDiscord<shalokshalom> In reply to @jmgomez "I dunno, but the": I was complaining about the lack of standardized solution
16:33:35FromDiscord<shalokshalom> that is clearly used and endorsed by the community as a whole
16:33:45FromDiscord<shalokshalom> In reply to @PMunch "Oh I didn't read": Ah yeah πŸ˜…
16:33:54FromDiscord<shalokshalom> Otherwise, no problem
16:34:09FromDiscord<shalokshalom> I think language maintainers do too much very often anyway
16:34:21FromDiscord<jmgomez> what about opening a RFC and asking to move fusion/case into the std now that's in being extracted from there core?
16:34:37FromDiscord<shalokshalom> One of the benefits of Nim is that it is a rather big and active community
16:34:51FromDiscord<shalokshalom> Compared to other languages, who have more public expose
16:34:51*oldpcuser_ is now known as oldpcuser
16:34:54FromDiscord<jmgomez> Im telling you this because it isnt the first time that I see you ask and wait for some else to take action
16:35:09FromDiscord<shalokshalom> I dont plan on using Nim
16:35:24FromDiscord<jmgomez> but yet you come here to complain on the missing features that you want to see πŸ˜›
16:35:35FromDiscord<shalokshalom> I iust point to it from time to time, since people ask me for a language and I think Nim could fit the bill
16:35:48FromDiscord<shalokshalom> And it's quite often "where is pm" oO
16:35:57FromDiscord<shalokshalom> that comes as an answer
16:36:13FromDiscord<shalokshalom> I also consider Araq and others to be quite toxic to communicate
16:36:28FromDiscord<shalokshalom> No fun bringing myself in such a situation
16:36:33FromDiscord<jmgomez> for the last time, it doesnt require much more energy to formally ask to include it in the std
16:36:58FromDiscord<shalokshalom> I dont think, fusion would be nessecarily what I want but it could be
16:37:16FromDiscord<shalokshalom> As you said, it would need to be maintained
16:37:30FromDiscord<shalokshalom> Who would maintain fusion?
16:37:46FromDiscord<jmgomez> if it made it into the std, the core devs
16:37:48FromDiscord<shalokshalom> Wasn't it the brainchild of Haxscramper?
16:38:13PMunchI would love for the ability to extend the syntax of a couple of things to macros. Like the `object`, `enum`, keywords. Why couldn't a `union` macro be implemented and then executed if it turns up there. Make it take a special argument like the ForLoop thing
16:38:46PMunchSame for `proc`, `func`, `template`, `macro`, I want to create my own ones :(
16:40:10PMunchFun.. This old basic code has a missing label.. Some `GOTO` statements fail to compile because the label is missing..
16:46:09FromDiscord<jmgomez> is that even possible with the current design of the compiler?
16:47:19PMunchNo idea
16:49:44FromDiscord<demotomohiro> In reply to @ripluke "How can I draw": Probably this proc rotate what pixie draws: https://treeform.github.io/pixie/pixie/contexts.html#rotate%2CContext%2Cfloat32
17:04:10*lucasta quit (Ping timeout: 260 seconds)
17:05:03FromDiscord<JJ> In reply to @jmgomez "<@208199869301522432> take a look": yes, it has feature-parity with fusion/matching @shalokshalom
17:05:14FromDiscord<haxscramper> In reply to @PMunch "I don't think algebraic": nobody is asking him to implement them, just give a clear signal of whether you want them or not for fuck's sake it has been half a decade already
17:05:38FromDiscord<haxscramper> if "no" then say "no", but at least give a reason
17:05:44FromDiscord<JJ> the main differences being the addition of a special union/wrapper type and the removal of a bunch of syntax
17:06:01FromDiscord<haxscramper> "what is the core devs opinion on pattern matching" -- nobody knows, each discussion is an endless drag
17:06:08PMunch@haxscramper, again I didn't read the actual comments
17:06:47FromDiscord<haxscramper> well I have time so I can actually quote some things that are not bad per se, but drag the thing into a whole different dimension entirely
17:06:49FromDiscord<JJ> given how i've seen araq reject rfcs in the past i got the impression he's mostly fine with it :-P
17:07:06PMunchI don't have time though, so I won't have time to read them here either
17:07:16FromDiscord<JJ> well, neutral or doesn't really care might be a better term
17:07:33FromDiscord<jmgomez> In reply to @apropos "given how i've seen": that's my impression too but I havent been around for too long
17:07:56FromDiscord<JJ> anyway i do want to look into the implementation but it's unfortunately at the bottom of my priority list right now
17:07:57PMunchEverything that goes into the standard library and compiler ends up with him eventually though. Got to make sure he doesn't break the feature, make sure that the syntax still works, etc. etc.
17:08:08FromDiscord<haxscramper> On Juan's listing of language compares -- "That doesn't mean much beyond the fact that people avoid dependencies for various reasons." -- yes, so what? What is the goal? Get the feature in the language or not?
17:08:21FromDiscord<haxscramper> Just stating the obvious, but now we are also discussing dependencies here
17:08:36FromDiscord<haxscramper> Next comment "You don't need to teach me about ML and Rust and Racket and Foozbaz, I know. You need to tell me why you found the existing solutions based on macros lacking." --
17:08:46FromDiscord<haxscramper> what you found lacking -- well, yo just said it
17:08:49FromDiscord<haxscramper> people avoid dependencies
17:08:49PMunchYou could ask him directly if he would accept a PR if someone implemented that RFC
17:08:58FromDiscord<JJ> union types are the Different part, i imagine the pattern matching part will be harder but i was also going to work from your prior art haxscramper
17:09:24FromDiscord<jmgomez> In reply to @PMunch "You could ask him": I do much more smaller things, but with stuff like lazy modules, virtual, constructors.. I just ask is this wanted and is this approach is correct? OC I dont expect anyone to implement anything... I tried to do it myself
17:09:39FromDiscord<haxscramper> Also this revulsing `case` statement cancer I just can't bear it but whatever
17:09:48FromDiscord<haxscramper> well ok I will ping on RFC
17:10:05FromDiscord<heysokam> In reply to @PMunch "<@186489007247589376>, how do you": `nim myfile.nims` afaik
17:10:09FromDiscord<JJ> yeah i'd prefer match/case but it's from haskell or whatever
17:10:33*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
17:10:43FromDiscord<JJ> the syntax aside from that is how i like it at least
17:10:56FromDiscord<shalokshalom> In reply to @apropos "yes, it has feature-parity": thats awesome πŸ‘πŸ»
17:11:11FromDiscord<shalokshalom> love your library πŸ˜€
17:13:32PMunch@heysokam, I tried with `nim e myfile.nims` and it worked just fine
17:13:46FromDiscord<JJ> ha i wish it was a library! it's entirely unimplemented, just a proposal
17:13:52FromDiscord<shalokshalom> ah
17:14:06FromDiscord<shalokshalom> still, I like the library you are about to create πŸ˜„
17:14:20*Lord_Nightmare joined #nim
17:14:48FromDiscord<haxscramper> https://github.com/nim-lang/RFCs/issues/525#issuecomment-1586252053 well done
17:14:53FromDiscord<haxscramper> (edit) "well" => "well,"
17:15:04FromDiscord<haxscramper> so basically two qs: yes/no in stdlib, yes/no in core lang
17:15:19FromDiscord<heysokam> In reply to @PMunch "<@186489007247589376>, I tried with": yeah i know. it works for me too in a separate file. but its something with the setup of this project
17:15:35FromDiscord<heysokam> thats why i was asking for how to debug nimscript
17:15:36FromDiscord<haxscramper> this is certainly under-clarified but IMO there needs to be more clarity in the decision-making process on this one, so here it is
17:16:07FromDiscord<shalokshalom> @haxscramper thing think
17:16:12FromDiscord<shalokshalom> typo in the first line
17:16:26FromDiscord<jmgomez> In reply to @shalokshalom "still, I like the": it isnt a library. It's integrated into the compiler
17:16:34FromDiscord<Phil> After getting marginally more of a grasp on the meaning of MVC beyond just web development, I feel like you really need to squint to see e.g. server-side-rendered webdev as MVC.↡Though maybe I'm misinterpreting that.
17:16:47FromDiscord<Phil> (edit) "misinterpreting that." => "having the wrong understanding of MVC there."
17:17:12NimEventerNew post on r/nim by h234sd: File Explorer in 20 lines of Nim | Mono UI, see https://reddit.com/r/nim/comments/146zh10/file_explorer_in_20_lines_of_nim_mono_ui/
17:22:15FromDiscord<shalokshalom> In reply to @haxscramper "Also this revulsing `case`": I like the way Kotlin does it:↡https://kotlinlang.org/docs/control-flow.html#when-expression
17:22:26FromDiscord<shalokshalom> its declarative and concise
17:22:41FromDiscord<shalokshalom> In reply to @jmgomez "it isnt a library.": well, not yet?
17:22:47FromDiscord<shalokshalom> fusion is
17:23:14FromDiscord<jmgomez> the proposal is about integrating union and PM into the compiler
17:23:20FromDiscord<shalokshalom> yep
17:23:38FromDiscord<shalokshalom> I assumed it already exists as a library
17:26:47FromDiscord<JJ> fusion and fungus exist as libraries, mine does not (and cannot afaik)
17:26:55FromDiscord<shalokshalom> ah
17:32:37*krux02 joined #nim
17:33:07FromDiscord<haxscramper> In reply to @shalokshalom "fusion is": no
17:33:08FromDiscord<haxscramper> unless they changed it fusion is just another library that is no different from everything else
17:47:56FromDiscord<michaelb.eth> I think I read one time about a thing you can do if you're exporting a macro and within that macro it makes reference to a symbol (maybe coming from a lib like std/typetraits) that you don't want to export
17:48:09FromDiscord<michaelb.eth> but now I can't find it
17:48:37FromDiscord<michaelb.eth> (edit) removed "now" | "find" => "remember where I read" | "I can'tremember where I readit ... " added "or what to search for"
17:52:33madpropshttps://i.imgur.com/InIet9o.jpg
17:52:34madpropshmm
17:52:41madpropsusing nim's argparser
17:53:24madpropsparseopt
17:53:46FromDiscord<demotomohiro> In reply to @michaelb.eth "I think I read": It sounds like `bindSym`: https://nim-lang.org/docs/manual.html#macros-bindsym
17:58:59FromDiscord<michaelb.eth> In reply to @demotomohiro "It sounds like `bindSym`:": thank you, that's it!
18:17:24*azimut joined #nim
18:24:24FromDiscord<Spatchler> what does this error mean, and how might i fix it?↡`SIGSEGV: Illegal storage access. (Attempt to read from nil?)`
18:26:52FromDiscord<graveflo> It means you are trying a null pointer access... in most cases
18:36:50FromDiscord<michaelb.eth> In reply to @Spatchler "what does this error": try a non-release build (which is the default, i.e. you don't specify `-d:release`) with `--linetrace:on --stacktrace:on`, then re-run the program
18:37:25FromDiscord<michaelb.eth> you may be able to get a better idea of where in you code the bad access is happening
18:41:27PMunchHmm, we said that we would go dark on the subreddit on the 12th. But never specified a timezone..
18:42:57FromDiscord<michaelb.eth> zulu time is a pretty good default
18:43:35FromDiscord<graveflo> or just be inclusive and do it for all timezones
18:43:53PMunchIt's going dark for at least 48 hours
18:43:56FromDiscord<graveflo> I'm sure no one will be pissed if its a little off for them anyway
18:44:42FromDiscord<voidwalker> If I were reddit, I would piss on all this democracy and force open all reddits : D
18:44:47FromDiscord<voidwalker> (edit) "reddits" => "subreddits"
18:45:30PMunchThey might still..
18:45:32FromDiscord<graveflo> is this the rising of reddits new "great leader"
18:47:07FromDiscord<voidwalker> hey does anyone feel like guiding me with my sqlite/BLOB problem ? I am getting `Exception message: unrecognized token` with allographer, and it seems like the same bug manifests itself with db_sqlite from std, open for 6 years now.
18:47:15FromDiscord<voidwalker> (edit) "hey does anyone feel like guiding me with my sqlite/BLOB ... problem" added "inserting"
19:18:23FromDiscord<michaelb.eth> In reply to @voidwalker "hey does anyone feel": you might look into using https://github.com/arnetheduck/nim-sqlite3-abi↡you should be able to use it to insert blobs, but it's a wrapper for the raw C API, so you'll need to look at the docs for sqlite3
19:23:07*disso-peach quit (Quit: Leaving)
19:29:29*Guest55 joined #nim
19:29:56*Guest55 quit (Client Quit)
20:28:15*PMunch quit (Quit: leaving)
20:32:12*derpydoo quit (Quit: derpydoo)
20:59:27*ntat quit (Quit: Leaving)
21:09:27*oldpcuser_ joined #nim
21:12:01*oldpcuser quit (Ping timeout: 255 seconds)
21:15:51*oldpcuser_ is now known as oldpcuser
21:37:36*derpydoo joined #nim
21:48:34*mal`` quit (Quit: Leaving)
21:54:57*mal`` joined #nim
22:29:29*oldpcuser_ joined #nim
22:30:40*oldpcuser quit (Killed (NickServ (GHOST command used by oldpcuser_)))
22:30:42*oldpcuser_ is now known as oldpcuser
23:02:09*oprypin quit (Quit: Bye)
23:02:28*oprypin joined #nim
23:29:46FromDiscord<graveflo> In reply to @heysokam "I've been working on": Looks cool, thanks for sharing your work
23:44:30*oldpcuser_ joined #nim
23:46:40*oldpcuser quit (Ping timeout: 260 seconds)
23:47:33*oldpcuser_ quit (Remote host closed the connection)
23:48:00*oldpcuser_ joined #nim
23:58:33*oldpcuser__ joined #nim
23:59:48*oldpcuser__ is now known as oldpcuser