ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.29.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <Blacksmoke16> apparently not
<FromGitter> <girng> > but if you're expecting others to open PRs to it, it's prob going to be super hard for them ⏎ ⏎ same could be said with code that has a ton of abstracted definitions everywhere, where a user who was interested in contributing, could be a turn off byit.
<FromGitter> <girng> it goes both ways, you know.
<FromGitter> <girng> this goes for not only `abstract`, but any kind of keyword. or, for any code that looks convoluted to the user who wants to contribute.
<FromGitter> <Blacksmoke16> you seem to be the only one turned off by it. I cant imagine someone going "OMG THEY'RE USING ABSTRACT, IM OUT"
<FromGitter> <Blacksmoke16> its not even specific to crystal
<FromGitter> <girng> that's what i just said
<FromGitter> <Blacksmoke16> unless they're a pure functionalist :P
<FromGitter> <dscottboggs_gitlab> > for any code that looks convoluted to the user who wants to contribute. ⏎ ⏎ That's pretty fair TBH
<FromGitter> <Blacksmoke16> also have to draw the line that not all code is meant to be understood by someone who just stats learning to program
<FromGitter> <girng> the repo owner will never know, because they'll get no PRs
<FromGitter> <girng> usage of abstract is bound in the realm of a new programmer though
<FromGitter> <girng> i'm not a new programmer, and i think it's silly
<FromGitter> <girng> i'm sure i'm not theo nly one
<FromGitter> <girng> pros and cons to everything @Blacksmoke16 even if it's a convention that has been used for decades
<FromGitter> <Blacksmoke16> only one iv'e met so far
<FromGitter> <Blacksmoke16> is crystal your first "main" language?
<FromGitter> <Blacksmoke16> in that you've taken the time to really get to know?
<FromGitter> <girng> eh, about same time learning javascript so far.
<FromGitter> <girng> probably longer, so yes
<FromGitter> <Blacksmoke16> could just be crystal is hiding the usefulness of it, where as in other langs (like PHP), its much more useful
<FromGitter> <tenebrousedge> well, and it is sort of specialized, to some degree
<FromGitter> <Blacksmoke16> TS has the same concept but is also works similar to crystal
<FromGitter> <Blacksmoke16> in that it still wont compile because of an undefined method
<FromGitter> <Blacksmoke16> actually, even if you define it on the child it still doesnt work without it
<FromGitter> <tenebrousedge> JS is a nutty language, and I'm not sure yet if TS just makes that worse
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e3b9e84536e27e0673453]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e3bb5071bb025df0ab7cf]
<FromGitter> <Blacksmoke16> i really likeTS
<FromGitter> <Blacksmoke16> almost as fun as crystal
<FromGitter> <girng> i never got into TS, just did a lot of js with nodejs. should have though , ibet that would hav ehelped me
<FromGitter> <girng> TS had classes back then
<FromGitter> <Blacksmoke16> TS just makes your JS more type safe
<FromGitter> <Blacksmoke16> along with a load of other stuff
<FromGitter> <girng> would have got me a good head start in the OOP world
<FromGitter> <Blacksmoke16> indeed
<FromGitter> <Blacksmoke16> like this example doesnt work without abstract 😉
<FromGitter> <girng> i'd remove abstract there
<FromGitter> <girng> seems restrictive
<FromGitter> <Blacksmoke16> still wouldnt work
<FromGitter> <tenebrousedge> and it's a compile-time error rather than a runtime error
<FromGitter> <girng> won't?
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e3c333e51d77b1b8736b7]
<FromGitter> <girng> 1 sec, let me find ts online cmpiler
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e3c3984bc7a717fddeac7]
<FromGitter> <tenebrousedge> anything that can be a CT error instead of a RT error should be <__<
<FromGitter> <girng> @Blacksmoke16 ty for link
<FromGitter> <tenebrousedge> intelligent political info? there's an oxymoron for you
<FromGitter> <Blacksmoke16> xD
<FromGitter> <Blacksmoke16> it doesnt work since there is nothing telling the compiler there is a method called `get_message`
<FromGitter> <Blacksmoke16> crystal must do a bit more to know it exists on the child
<FromGitter> <Blacksmoke16> without explicitly saying so
<FromGitter> <girng> wtf
<FromGitter> <girng> is going on
<FromGitter> <girng> i removed abstract, but i get `index.ts:4:22 - error TS2339: Property 'get_message' does not exist on type 'Parent'.`
<FromGitter> <girng> WHY is the PARENT forced to have that method
<FromGitter> <Blacksmoke16> i mean its not wrong, it doesnt
<FromGitter> <Blacksmoke16> because you're calling the method within the parent?
<FromGitter> <girng> i'm calling it on a child class?
<FromGitter> <tenebrousedge> also on the parent
<FromGitter> <Blacksmoke16> the parent is actually doing the work, the child is just implementing the value to print
<FromGitter> <girng> yes, the parent has `do_work` though, it should work
<FromGitter> <girng> i don't think this is true inheritance
<FromGitter> <Blacksmoke16> but it doesnt have the message that it should print
<FromGitter> <Blacksmoke16> prob not, since its compiled into JS
<FromGitter> <girng> the child does though..
<FromGitter> <girng> they are linked
<FromGitter> <girng> or.. should be
<FromGitter> <Blacksmoke16> this is a better example of what abstract doess
<FromGitter> <Blacksmoke16> it tells the compiler that this will exist
<FromGitter> <Blacksmoke16> even if at the moment it doesnt
<FromGitter> <girng> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e3de5ce271b4acd24b58d]
<FromGitter> <girng> works just fine
<FromGitter> <girng> true inheritance
<FromGitter> <Blacksmoke16> sure it works, not going to get into this again tho
<FromGitter> <tenebrousedge> I like pie
<FromGitter> <girng> why doesn't it work with TS
<FromGitter> <girng> butworks with Crystal
<FromGitter> <Blacksmoke16> two totally diff langs with diff implementations most likely
<FromGitter> <Blacksmoke16> i dont have an exact reason
<FromGitter> <girng> @tenebrousedge you playing games posting a rogue bug possibly?
<FromGitter> <dscottboggs_gitlab> @girng Parent's interface makes a call to a method that it does not implement
<FromGitter> <dscottboggs_gitlab> crystal goes looking for that method in that case, other languages don't
<FromGitter> <tenebrousedge> something something method resolution
<FromGitter> <girng> it doesn't matter if the parent didn't implement it. self is used.
<FromGitter> <girng> to call the method
<FromGitter> <girng> they are linked
<FromGitter> <girng> TS is dead wrong
<FromGitter> <girng> good thing i don't use TS nor ever will though
<FromGitter> <Blacksmoke16> 😐
<FromGitter> <girng> especially not after eseing this shit
<FromGitter> <dscottboggs_gitlab> no you're looking at this wrong
<FromGitter> <dscottboggs_gitlab> `Parent` is an interface, which must compile on its own.
<FromGitter> <dscottboggs_gitlab> then `Child` is some concrete type which implements the `Parent` interface
<FromGitter> <girng> Yeah but Child is still inherenting from its Parent
<FromGitter> <meltheadorable> did i really just scroll past some like 400 messages arguing about whether abstract methods are a good idea
<FromGitter> <girng> self. (or this) resolves differently in TS / Crystal probably
<FromGitter> <Blacksmoke16> @meltheadorable pretty much, what side are you on? :P
<FromGitter> <meltheadorable> if you’re defining interfaces in your code, it’s better to have abstract to make that explicit than to just let your code behave wrong because your implementations don’t implement it, but languages don’t need interfaces deseprately so languages that don’t have it aren’t like, fundamentally broken or anything
<FromGitter> <tenebrousedge> I'll go with that too
<FromGitter> <tenebrousedge> I'm not big on inheritance at the best of times
<FromGitter> <meltheadorable> abstract methods on modules/mixins are a better use case than abstract methods on abstract classes most of the time, but they’re also less necessary there because you’ll know pretty quick if you didn’t implement a method a mixin was expecting if you’re using its functionality
<FromGitter> <Blacksmoke16> relying upon an undefined method error is a bad practice imo
<FromGitter> <Blacksmoke16> as that might not always be the same depending on your lang
<FromGitter> <meltheadorable> i agree, if you have abstract in your language better to have it defined there
<FromGitter> <meltheadorable> but ruby gets by alright just documenting the requirements of its mixins
<FromGitter> <Blacksmoke16> ib4 you get a runtime error?
<FromGitter> <meltheadorable> abstract classes feel a little bit like a code smell to me comparatively, but I’ve always been a bigger fan of composition than inheritance, and without multiple inheritance abstract classes are a little sad
<FromGitter> <tenebrousedge> multiple inheritance is a problem of its own
<FromGitter> <Blacksmoke16> are there langs you can inherit from more than one class at a time?
<FromGitter> <dscottboggs_gitlab> Python
<FromGitter> <Blacksmoke16> heh, figures :P
<FromGitter> <tenebrousedge> diamond problem of multiple inheritance (https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem)
<FromGitter> <meltheadorable> multiple inheritance is also a problem, it makes it more meaningful to have abstract classes vs. mixins to define interfaces though
<FromGitter> <meltheadorable> when you can inherit more than one
<FromGitter> <Blacksmoke16> imo actual interfaces would be more helpful in crystal
<FromGitter> <Blacksmoke16> separate that this module im including doesnt actually do anything but just makes sure this is correct type hting
<FromGitter> <meltheadorable> i don’t think a mixin called interface with abstract methods and actual interfaces are different enough to be worth adding more syntax/keywords over
<FromGitter> <meltheadorable> its not like it would give you any more compile time guarantees
<FromGitter> <Blacksmoke16> true, i should prob start including `Interface` in their names then...good call
<FromGitter> <kniknoo> After 3 hours on the road, the debate rages on.
<FromGitter> <Blacksmoke16> and whats your opinion on the matter? :P
<FromGitter> <girng> @Blacksmoke16
<FromGitter> <Blacksmoke16> think you got a typo in there ;P
<FromGitter> <girng> fixed :p
<FromGitter> <kniknoo> I can see the value it brings, but I'm really going to have to rethink how i organize classes to implement it. My parent classes do really generic things if anything at all, only something everything in the class will use the same way. But i still have a lot to learn.
<FromGitter> <girng> @kniknoo wait, what are you implementing / creating?
<FromGitter> <girng> Sorry, if I missed it earlier
<FromGitter> <girng> oh, you're just saying about class organization. i read that wrong, oops
<FromGitter> <Blacksmoke16> imo every pattern/OOP principal has its place, it doesnt mean you should go out of your way to use them just because
<FromGitter> <Blacksmoke16> knowing when to apply each is the harder part
<FromGitter> <dscottboggs_gitlab> Yeah I almost never use `abstract`
<FromGitter> <girng> :D
<FromGitter> <dscottboggs_gitlab> But, when it's appropriate, it better be there!
<FromGitter> <kniknoo> I honestly foresee myself using overloading to handle similar data with different handling, but both concepts are new to me.
<FromGitter> <Blacksmoke16> @kniknoo abstract is best used when you want to ensure the children implement a specific method
<FromGitter> <Blacksmoke16> another option is define some sane default to the parent and just have children override it as needed
<FromGitter> <kniknoo> I really need to learn design patterns apparently...
<FromGitter> <Blacksmoke16> yet another option, is similar to the last, but also can use `previous_def` to call the previously defined method, then execute your new code
<FromGitter> <meltheadorable> if you’re doing inheritance isn’t that super not previous def?
<FromGitter> <tenebrousedge> @kniknoo GoF is a good read, but tough
<FromGitter> <Blacksmoke16> @meltheadorable @kniknoo sorry previous def is for redefining not overloading
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e4539c356af25e0474100]
<FromGitter> <Blacksmoke16> i.e. this
<FromGitter> <Blacksmoke16> it would be `super` if it was parent child
<FromGitter> <Blacksmoke16> as only the last definition gets used
<FromGitter> <meltheadorable> yeah you were describing a parent child relationship though
<FromGitter> <Blacksmoke16> yea my bad
<FromGitter> <kniknoo> Indeed, i super a lot and then add details.
<FromGitter> <meltheadorable> previous def mostly seems useful if you’re redefining stuff in the standard library or a shard, right? i wouldn’t want to write self-contained code that was dependent enough on load order for previous_def to be useful
<FromGitter> <kniknoo> Yeah i should start with GoF. Will do.
<FromGitter> <kniknoo> Back on the road, y'all have fun!
<FromGitter> <Blacksmoke16> i think i only came across a single use for previous_def
<FromGitter> <Blacksmoke16> i used it in athena for the granite extension
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e460b3e51d77b1b8775a1]
<FromGitter> <Blacksmoke16> to catch a granite specific error, or fallback on the default
<FromGitter> <girng> what is the point of `super` here (https://play.crystal-lang.org/#/r/7b9u), when i can just remove `greet` from `Employee`?
<FromGitter> <Blacksmoke16> this example, its a code smell
<FromGitter> <Blacksmoke16> you should remove greet from the subclass
<FromGitter> <Blacksmoke16> as they're equivalent
<FromGitter> <girng> i got it frfom gitbook loll
<FromGitter> <Blacksmoke16> took out that part that makes it diff tho
<FromGitter> <girng> what part
<FromGitter> <Blacksmoke16> ``` def greet(msg) ⏎ super # Same as: super(msg) ⏎ super("another message") ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5d3e472fc356af25e04756ef]
<FromGitter> <Blacksmoke16> where its showing you can pass a diff message
<FromGitter> <girng> why do i need 2 supers
<FromGitter> <girng> that's silly?
<FromGitter> <Blacksmoke16> its an example
<FromGitter> <girng> why the hell would i want to pass another message
<FromGitter> <girng> different message*
<FromGitter> <girng> when i specify the message i'm passing in the parameter already
<FromGitter> <girng> to traverse it to the parent to do special actions on it?
<FromGitter> <Blacksmoke16> it allows you to do stuff like
<FromGitter> <girng> at that point, i think it's more clear to me, to just make a separate / specific method to handle it lol
<FromGitter> <Blacksmoke16> cant really think of an example atm
<FromGitter> <girng> i feel like super. is yet another keyword that convoluted the OOP space
<FromGitter> <Blacksmoke16> you seem to really not like most of OOP :P
<FromGitter> <girng> when it's simple, i like it
<FromGitter> <watzon> I totally forgot previous_def was a thing
<FromGitter> <girng> class Animal, if you want to inherent, class Dog < Animal. That's it. why does it have so many added keywords
<FromGitter> <girng> super, abstract, etc
<FromGitter> <girng> i'm lucky crystal is how it is though, and not like TS. that would really make my mind explode
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7b9z kinda just realized this works
<FromGitter> <Blacksmoke16> but anyway, i cant think of an example of where you would want to pass a diff value to super
<FromGitter> <meltheadorable> https://play.crystal-lang.org/#/r/7ba4
<FromGitter> <Blacksmoke16> but i can be helpful in validations for example
<FromGitter> <Blacksmoke16> parent class could define some basic validations, then each child can call that via `super` then implement their own
<FromGitter> <Blacksmoke16> 😮
<FromGitter> <Blacksmoke16> i like it @meltheadorable
<FromGitter> <Blacksmoke16> how would you greet a person that isnt an employee?
<FromGitter> <Blacksmoke16> i.e. `Person.new("Fred").greet`
<FromGitter> <girng> Why would I greet someone that isn't an employee?
<FromGitter> <girng> there u go again, with the hypotheticals
<FromGitter> <Blacksmoke16> because they could be a customer, or a vendor, or a manager etc
<FromGitter> <girng> no
<FromGitter> <Blacksmoke16> yes
<FromGitter> <girng> that message is clearly an employee message
<FromGitter> <Blacksmoke16> yea but you removed the ability to greet just a person
<FromGitter> <watzon> @girng it all comes down to the type system. Try creating a class like Person with several subclasses, then add a bunch of subclass instances to an array and call greet
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7bac
<FromGitter> <girng> @Blacksmoke16 it's to greet employees
<FromGitter> <watzon> With an abstract class it's simple
<FromGitter> <watzon> Without it's not so much
<FromGitter> <Blacksmoke16> `Person` isnt abstract so there isnt anything telling me that
<FromGitter> <Blacksmoke16> trying to greet a person is totally valid
<FromGitter> <girng> that makes it more confusing
<FromGitter> <Blacksmoke16> > @girng it all comes down to the type system. Try creating a class like Person with several subclasses, then add a bunch of subclass instances to an array and call greet ⏎ ⏎ ^ this
<FromGitter> <girng> cause now you need to read where super is traversing to
<FromGitter> <Blacksmoke16> going off your words, you should know the structure of your parent child relationship
<FromGitter> <girng> ..and again, more added syntax
<FromGitter> <meltheadorable> I don’t know that I can think of a good example for changing super’s params in a child class unless there’s a param that like, changes super’s return type or causes it to return a value instead of causing a side effect or something, but I think it’s a code smell ⏎ ⏎ https://play.crystal-lang.org/#/r/7bag
<FromGitter> <Blacksmoke16> sure, its a trade off for more flexibility and keeping things DRY
<FromGitter> <Blacksmoke16> for the user understanding what OOP is and what `super` means
<FromGitter> <watzon> This is without using an abstract class
<FromGitter> <Blacksmoke16> even if you make it abstract, we're back to needing `abstract def greet : String`
<FromGitter> <watzon> Yeah, that's what they're good for is what I'm saying
<FromGitter> <Blacksmoke16> so my as well stop here, he wont hear it
<FromGitter> <Blacksmoke16> indeed
<FromGitter> <watzon> I don't feel like it's a super hard concept to grasp, but that's me
<FromGitter> <watzon> I actually love abstract classes. They are so very helpful
<FromGitter> <Blacksmoke16> actually need to remove super from that, since its not defined on parent
<FromGitter> <girng> @Blacksmoke16 check here (https://play.crystal-lang.org/#/r/7baj) much easier. if you want custom greets for diff kinds of people, just add that to their class. ⏎ ⏎ The next [example}(https://play.crystal-lang.org/#/r/7ban/edit). Much more modular, easier to read. Don't have to deal with `super` or `abstract`.
<FromGitter> <meltheadorable> I don’t have a lot of code that naturally fits into a type hierarchy like this
<FromGitter> <watzon> Oh good point
<FromGitter> <watzon> Didn't catch that
<FromGitter> <watzon> I use abstract classes a lot in Cadmium
<FromGitter> <Blacksmoke16> i mean theres nothing wrong with that code @girng
<FromGitter> <watzon> Especially for the `Tokenizer` class, because there are a lot of different tokenizers
<FromGitter> <girng> @Blacksmoke16 this is what i mean when i say "simple"
<FromGitter> <Blacksmoke16> let me make another example to show my point
<FromGitter> <watzon> Eh. OOP, like most things, can be simple, but it can also get pretty complex
<FromGitter> <watzon> There are a lot of patterns and concepts in OOP
<FromGitter> <meltheadorable> You’re picking apart toy examples, there’s many cases where the superclass has a lot of behavior that you want to add to, being able to call super instead of copy-pasting the entire method behavior and running the risk of falling out of sync is a big help in that scenario.
<FromGitter> <watzon> Definitely
<FromGitter> <watzon> I mean, there is no wrong way or right way in a lot of scenarios
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7bat
<FromGitter> <watzon> Like with abstract classes. You can just as easily do the Ruby thing and define the methods on the parent class with a `raise "Not initialized"` inside
<FromGitter> <Blacksmoke16> you wouldnt want to repeat the main validation logic in every sublcass
<FromGitter> <Blacksmoke16> `super` allows you to still use that logic, but also add more
<FromGitter> <Blacksmoke16> or if you only need the parent logic, dont even override the method
<FromGitter> <meltheadorable> https://play.crystal-lang.org/#/r/7bau
<FromGitter> <Blacksmoke16> and to @watzon this also relates to having an interface, you can be assured every integration will have a validate method, whether its custom or just the parent's is up to the integration specific implementation
<FromGitter> <Blacksmoke16> @watzon is actually an actual exception for that :P https://crystal-lang.org/api/0.29.0/NotImplementedError.html
<FromGitter> <Blacksmoke16> every exception class uses super
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e4ea7f0ff3e2bba8670e1]
<FromGitter> <watzon> That's one of the most helpful things. The thing is I don't think @girng tends to think of things from the point of view of someone using a library he's built. When you write a library you have to expose a public API, just like when you write a REST API. Abstract classes help with that by allow you to expose a public interface for developers to extend.
<FromGitter> <watzon> I wasn't sure if the `NotImplementedError` actually existed
<FromGitter> <Blacksmoke16> it does :P
<FromGitter> <watzon> Good to know :)
<FromGitter> <Blacksmoke16> and including an `abstract def` in your abstract class can make it clear to the reader reading the public api docs what they need to do to make a custom x
<FromGitter> <watzon> Exactly
<FromGitter> <watzon> I guess that can be hard to understand if you don't typically write libraries that are meant to be reused by other devs though
teardown has quit [Quit: leaving]
teardown has joined #crystal-lang
<FromGitter> <meltheadorable> i write code to be reused by my future self, i figure i’ll thank me the more straightforward it is later
<FromGitter> <Blacksmoke16> makes we want `# :inherit:` more 😢
<FromGitter> <Blacksmoke16> otherwise i would have put more on the parent class
<FromGitter> <watzon> 😁
<FromGitter> <Blacksmoke16> :metal:
<FromGitter> <girng> @Blacksmoke16 regarding your recent playground. as i said, that functionality can just put into the specific classes. Crystal will let you override that method and that class's method will take precedence.
<FromGitter> <Blacksmoke16> whats with the scroll bar?
<FromGitter> <girng> This allows for more modular, and organized code.
<FromGitter> <Blacksmoke16> but why duplicate the same code n times?
<FromGitter> <Blacksmoke16> when you can literally have it in one place and type `super`
<FromGitter> <Blacksmoke16> would be a nightmare to update
<FromGitter> <girng> duplication is an overblown issue. sometimes, custom method overloading in classes is perfectly okay
<FromGitter> <girng> and easier for readability
<FromGitter> <girng> and allows for greater flexibility
<FromGitter> <Blacksmoke16> i mean, its less flexible
<FromGitter> <meltheadorable> Duplicating critical logic means that you need to update things like security vulnerabilities in every place you’ve copy-pasted it.
<FromGitter> <Blacksmoke16> if you dont want to call that parent logic you just dont call super and its essentially the same as what you're suggesting
<FromGitter> <girng> it's not even duplicating, blacksmoke made that up
<FromGitter> <Blacksmoke16> what?
<FromGitter> <watzon> Duplication is definitely not overblown
<FromGitter> <girng> it's duplicating the method name, sure, but the functionality is different.
<FromGitter> <Blacksmoke16> no its not
<FromGitter> <watzon> DRY code is very important
<FromGitter> <girng> yes it is
<FromGitter> <Blacksmoke16> how you figure?
<FromGitter> <meltheadorable> If you need the same behavior in multiple places you shouldn’t copy-paste it.
<FromGitter> <watzon> Especially in large code bases
<FromGitter> <Blacksmoke16> both google and facebook are being validated to make sure they have the feature
<FromGitter> <girng> Look at the employee example. greet's have different functionality and text.
<FromGitter> <Blacksmoke16> google is also validating the email
<FromGitter> <girng> for each class
<FromGitter> <Blacksmoke16> no, look at my integration example
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7bat
<FromGitter> <meltheadorable> Sometimes duplication is okay, especially for code paths that won’t need updates much or where the complexity of an abstracted solution isn’t worth it
<FromGitter> <watzon> Sure, but duplication should be avoided when you can
<FromGitter> <Blacksmoke16> I hope you dont think its ok to duplicate the parent classes validate method into *EVERY* integration (assume there are more than 2)
<FromGitter> <meltheadorable> @watzon I’m thinking of a specific thing where we keep trying to use these like, generic table renderers for database data and all the abstractions to avoid having to duplicate writing table HTML makes it impossible to customize things when we need to, and all the actual data to get rendered is hiding a bunch of weird places, there’s no clean abstraction for that problem that can handle pagination
<FromGitter> ... and computed columns
<FromGitter> <meltheadorable> like yeah don’t repeat yourself but sometimes the solution is worse than the problem
<FromGitter> <tenebrousedge> I agree; perfect is the enemy of good sometimes
<FromGitter> <tenebrousedge> I don't recall when the last time was, but I've definitely copy-pasted code before and not had the slightest qualm about doing so
<FromGitter> <Blacksmoke16> depend on the context
<FromGitter> <Blacksmoke16> saving from having to add `Hello, ` to a few places? sure not a big deal
<FromGitter> <Blacksmoke16> duplicating critical security validations, prob not the best idea
<FromGitter> <meltheadorable> Yeah, it’s fine for noncritical code paths, short things, and things where the code is incidentally repeating (as in, it could very easily change to where they’d need to be different but by coincidence it’s the same right now)
<FromGitter> <meltheadorable> sometimes the code is the same/similar but not because they actually should share any logic, in those cases it’s better to do the duplication than unnecessarily couple the implementations and add the extra abstraction
<FromGitter> <tenebrousedge> yes, it's always possible to replace code duplication with another level of abstraction, and almost always a good idea
<FromGitter> <watzon> I definitely agree that optimization can be the enemy sometimes
<FromGitter> <Blacksmoke16> ```code paste, see link```
<FromGitter> <Blacksmoke16> its in the git book :P
<FromGitter> <tenebrousedge> <__< I've only read snippets of Knuth
<FromGitter> <meltheadorable> I would disagree with almost always, abstractions and indirection add complexity, you should only add them if they represent a real/nonsuperficial commonality between the things you’re abstracting
<FromGitter> <watzon> Well yeah, it depends on what you're trying to do
<FromGitter> <girng> @Blacksmoke16 i'd just pass whatever you need as a parameter to validate. nn to use `super` there, it's just an extra transient and redundant step.
<FromGitter> <watzon> There are many instances when you don't need it
<FromGitter> <watzon> @girng it depends on what the parent is doing
<FromGitter> <girng> Yes
<FromGitter> <Blacksmoke16> but there arent any variables to pass?
<FromGitter> <watzon> There are plenty of instances when `super` is completely necessary
<FromGitter> <Blacksmoke16> is logic based on `self`
<FromGitter> <girng> doubt that
<FromGitter> <girng> @watzon
<FromGitter> <Blacksmoke16> @girng every exception class in prob every language uses it
<FromGitter> <watzon> 10 years of programming will teach you a few things
<FromGitter> <Blacksmoke16> since the only thing that changes is the name and like http code if its that kind of exception
<FromGitter> <watzon> Exceptions are a perfect example
<FromGitter> <watzon> Albeit a very simple one
<FromGitter> <meltheadorable> OH god have I been programming for 15 years
<FromGitter> <meltheadorable> I have, yikes.
<FromGitter> <Blacksmoke16> *all ye old folks*
<FromGitter> <watzon> Wow haha
<FromGitter> <tenebrousedge> I think I'm only on year 9
<FromGitter> <watzon> At least I'm not *that* old
<FromGitter> <meltheadorable> im not that old i just started coding young
<FromGitter> <watzon> 😉
<FromGitter> <Blacksmoke16> 15 years ago i was 8 :D
<FromGitter> <meltheadorable> i was rom hacking before i was coding
<FromGitter> <watzon> Lol what age out of curiosity? What age did you start I mean?
<FromGitter> <watzon> I got started late at 16
<FromGitter> <tenebrousedge> o_o
<FromGitter> <meltheadorable> depends what you count, so i guess my 15 years is a bit fuzzy
<FromGitter> <Blacksmoke16> anyway, @girng take a look at that link
<FromGitter> <watzon> I mean if you want to go back to the first time I started attempting web development I was only 8
<FromGitter> <watzon> Lol
<FromGitter> <watzon> First programming class I think I was 14
<FromGitter> <Blacksmoke16> each specific exception just overrides the message of the parent exception class
<FromGitter> <watzon> But I didn't really get going until I was 16, so that's what I could
<FromGitter> <meltheadorable> i started writing html on neopets when i was a kid
<FromGitter> <tenebrousedge> I picked up programming at 25, just as an excuse to stay in Costa Rica
<FromGitter> <watzon> Hahaha neopets 😂
<FromGitter> <watzon> I remember that
<FromGitter> <watzon> I am mad at Costa Rica @tenebrousedge
<FromGitter> <meltheadorable> & i was rom hacking around age 12, trying to mod pokemon
<FromGitter> <watzon> They own the `.cr` domain, and it's expensive af
<FromGitter> <tenebrousedge> @watzon lololol
<FromGitter> <meltheadorable> i took my first java class at like 15
<FromGitter> <meltheadorable> maybe 14
<FromGitter> <tenebrousedge> it's a nice place tho 😄
coderobe has quit [Read error: Connection reset by peer]
<FromGitter> <watzon> Someone needs to do something about those domains though
<FromGitter> <watzon> They're definitely not popular enough to justify being over $100
<FromGitter> <meltheadorable> im saving up to buy an $888 domain
<FromGitter> <watzon> Yuck
<FromGitter> <meltheadorable> yuck indeed
<FromGitter> <watzon> At least it's a nice looking figure
<FromGitter> <meltheadorable> it’ll renew for cheaper i just need to get it from its squatter
<FromGitter> <watzon> $666 would be better
<FromGitter> <tenebrousedge> eh, it's a poor country. They need to make money somehow. Plus they probably need to like, hand-carve the registry or something, and file it in triplicate, bury it in a peat bog, and recycle it as firelighters
<FromGitter> <watzon> 😂
<FromGitter> <watzon> I feel like that's what they probably do in Guatemala where I'll be moving soon
<FromGitter> <tenebrousedge> is that a good idea?
<FromGitter> <watzon> Sure, I've got family from there
<FromGitter> <watzon> I've lived in some pretty sketchy areas in Brazil
<FromGitter> <girng> @Blacksmoke16 I don't understand your Integration example, what are you trying to tell me?
<FromGitter> <Blacksmoke16> that for every integration there is logic that is common to every integration, i.e. do they have the right feature to use that integration
<FromGitter> <tenebrousedge> well, there are worse places
<FromGitter> <Blacksmoke16> facebook is not using any custom validation logic, just the feature check
<FromGitter> <Blacksmoke16> google is using the feature check AND custom validation logic (checking if the email is valid)
<FromGitter> <meltheadorable> there’s no good reason to use inheritance if your code doesn’t share properties and if your code shares properties there’s a good chance you need to share setup, if you need to share setup, super makes that easy
<FromGitter> <Blacksmoke16> it wouldnt be a good idea to do like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e56523e51d77b1b87e49d]
<FromGitter> <Blacksmoke16> now you have critical security logic duplicated within each integration
<FromGitter> <Blacksmoke16> which is more prone to errors
<FromGitter> <meltheadorable> and now you need to fix the typo in `feautre` in two places
<FromGitter> <Blacksmoke16> n places where n is the number of integrations
<FromGitter> <Blacksmoke16> could be 50
<FromGitter> <Blacksmoke16> and @girng to your point if you had an integration that for whatever reason you didnt want to check for a feature, but implement custom logic, then override it like google, but dont call super
<FromGitter> <watzon> I think the pain point comes from not being accustomed to writing libraries to be reused
<FromGitter> <meltheadorable> the one thing i will say is that calling super can sometimes keep you from breaking out complicated setup into smaller functions and it’s a little more modular if you call the 5 different functions that are part of your setup instead of calling super, rather than like, inlining all those methods and then having to copy-paste a bunch of actual logic if you need to change something from the middle
<FromGitter> <Blacksmoke16> and lack of exposure to other langs where these concepts are more impt
<FromGitter> <watzon> That as well
<FromGitter> <watzon> Like Java/Dart
<FromGitter> <watzon> Or Rust. Rust has interfaces which are a very important part of the language
<FromGitter> <tenebrousedge> ...Ommegang should not do sour beers
<FromGitter> <girng> @Blacksmoke16 so how are you going to handle validation for `Facebook`?
<FromGitter> <girng> copy and paste another validate method in there and use super?
<FromGitter> <Blacksmoke16> in this case it doesnt need anymore validation other than checking if the user has the feature
<FromGitter> <Blacksmoke16> which would be handled by the parent (since the validate method gets inherited into the child class)
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7bbp
<FromGitter> <meltheadorable> i think shouting into a dark hole would be a better use of time than continuing to explain the value of being able to call a parent’s version of a method you are reimplementing
<FromGitter> <tenebrousedge> :/
<FromGitter> <girng> @Blacksmoke16 Regarding your example here (https://play.crystal-lang.org/#/r/7bat/edit), I think this (https://play.crystal-lang.org/#/r/7bcd) makes more sense to me. Don't need to use `abstract` or `super`.
<FromGitter> <meltheadorable> the problem with trivial examples is that they’re trivial, you tend to want this when the things you’re doing are complicated, when they’re complicated it’s not really easy to use them as examples
<FromGitter> <tenebrousedge> I would dislike having both `validate` and `is_valid`, unless `is_valid` were a boolean property
<FromGitter> <girng> i'm just going off another person's example,
<FromGitter> <meltheadorable> and facebook can’t validate at all because it doesn’t define the method
<FromGitter> <girng> define it then?
<FromGitter> <meltheadorable> and you can’t make sure it’s defined unless you use abstract
<FromGitter> <girng> you have to define it if you were using super, too.
<FromGitter> <Blacksmoke16> only if you wanted to use custom logic
<FromGitter> <Blacksmoke16> otherwise it would just use the parents
<FromGitter> <girng> again, with the hypotheticals
<FromGitter> <meltheadorable> oh my god dude, fuck off
<FromGitter> <Blacksmoke16> and do realize these are just examples to show the concepts around this
<FromGitter> <tenebrousedge> hey
<FromGitter> <girng> i just don't understand
<FromGitter> <Blacksmoke16> > define it then? ⏎ ⏎ problem with this is you would have to define it for every one
<FromGitter> <girng> that's what
<FromGitter> <girng> YOU ALREADY have to do in your example, if you are using super
<FromGitter> <girng> so i don't understand what the issue is
<FromGitter> <Blacksmoke16> no you dont, look at facebook in my example
<FromGitter> <Blacksmoke16> it works without defining anything
<FromGitter> <girng> i just asked you earlier
<FromGitter> <girng> you said you put validate in other class
<FromGitter> <girng> why would a developer use a .validate method for a class that doesn't have a method for it
<FromGitter> <Blacksmoke16> *IF* you want to implement additional logic
<FromGitter> <girng> LOL
<FromGitter> <Blacksmoke16> otherwise it would just use the default feature check logic of the parent
<FromGitter> <girng> you can do that in my example, too though
<FromGitter> <girng> after the guard clause
<FromGitter> <Blacksmoke16> right but you would have to manually define the ⏎ ⏎ ``` def validate : Nil ⏎ return unless !is_valid(@feature) ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5d3e5cbd071bb025df0b9a40]
<FromGitter> <Blacksmoke16> in every sublcass
<FromGitter> <meltheadorable> https://play.crystal-lang.org/#/r/7bcf
<FromGitter> <Blacksmoke16> since there are two separate methods now
<FromGitter> <girng> you have to manually define super in every subclass, too.
<FromGitter> <Blacksmoke16> only if you need more logic than just the feature check
<FromGitter> <girng> if you are writing custom logic, yuour ognna be fiddling around with that class anyway, lol
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7bbp
<FromGitter> <Blacksmoke16> right, but no need to duplicate the parents logic in the child as well
<FromGitter> <girng> it's using a method from the parent
<FromGitter> <meltheadorable> look at my example
<FromGitter> <meltheadorable> Google gets to use both the parent and its custom logic, Facebook does not need to redefine it
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7bcj
<FromGitter> <Blacksmoke16> 3 unique cases, all sharing logic nicely
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e5dd43e51d77b1b880c88]
<FromGitter> <Blacksmoke16> plus going back to what @watzon mentioned a while ago, since they all use the same `validate` method, you can easily call `.validate` on an array of `Integration` and would be fine
<FromGitter> <Blacksmoke16> again, please realize these are just examples
<FromGitter> <Blacksmoke16> actual code would be much more complex and could have 50 integrations
<FromGitter> <tenebrousedge> and yes, sometimes you write 50 different-but-similar API integrations
<FromGitter> <Blacksmoke16> (this example is actually from work) :P
<FromGitter> <Blacksmoke16> is a bit legacy stuff we want to replace but its how it works atm
<FromGitter> <Blacksmoke16> er validation stuff works nicely, its the rest we want to replace
<FromGitter> <watzon> Once again a good example is with database adapters for an ORM
<FromGitter> <watzon> They all have a similar interface/similar functionality which you can stick into an abstract class
<FromGitter> <watzon> You may end up having 10 or more adapters
<FromGitter> <watzon> But with the abstract class you know that they all have the same API
<FromGitter> <watzon> And you can allow methods to act on the abstract class instead of an individual adapter
<FromGitter> <Blacksmoke16> reminds me of something i was thinking about recently
<FromGitter> <Blacksmoke16> implementing master/slave connections in granite
<FromGitter> <Blacksmoke16> in symfony land we would just use DI to inject either the read or write entity-manager into the class we need
<FromGitter> <Blacksmoke16> since the orm it uses is more repository like, vs calling .save instantly saves the model
<FromGitter> <Blacksmoke16> ```$user = new User; ⏎ $user->setName('Mr.Right'); ⏎ $em->persist($user); ⏎ $em->flush();``` [https://gitter.im/crystal-lang/crystal?at=5d3e5ffcd254cf27df982e49]
<FromGitter> <Blacksmoke16> persist registers the new entity with the manager, then flush commits the changes
<FromGitter> <Blacksmoke16> but in (most crystal ORMs i think?) the adapter is tightly coupled with the model
<FromGitter> <Blacksmoke16> so id imagine best approach would be like allowing multiple connections per adapter, then have a way to select in code which to use?
<FromGitter> <Blacksmoke16> something like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e60c884536e27e0682e75]
<FromGitter> <Blacksmoke16> ?
<FromGitter> <girng> > Google gets to use both the parent and its custom logic, Facebook does not need to redefine it ⏎ ⏎ In my example, Facebook is not re-defining something, it's *re-using* a Parent's method. using `super` hides this, which i feel is less explicit.
<FromGitter> <Blacksmoke16> your example would be better if it implemented a validate method in the parent class that called your is_valid method
<FromGitter> <Blacksmoke16> as currently you cant call validate on facebook
<FromGitter> <Blacksmoke16> but not sure what you're gaining by using two methods to accomplish the same goal?
<FromGitter> <girng> what do you mean two methods
<FromGitter> <Blacksmoke16> you have `#validate` and `#is_valid` now
<FromGitter> <Blacksmoke16> kind redundant no?
<FromGitter> <girng> contrived example i wasn't paying attention to naming
<FromGitter> <girng> buty es
<FromGitter> <girng> that is redundant
<FromGitter> <Blacksmoke16> so they should be both named `validate`/
<FromGitter> <girng> 1 sec
<FromGitter> <Blacksmoke16> i could see having a `validate` method define on the prent, and using an abstract def on `is_valid`
<FromGitter> <Blacksmoke16> woudl be another way to handle this
<FromGitter> <girng> oh i did that because you said not to have validate duplicated all over
<FromGitter> <watzon> Better yet, `valid?`
<FromGitter> <watzon> Because Crystal
<FromGitter> <girng> this way, you can just call is_valid
<FromGitter> <girng> not to have to worry about duplicate validation
<FromGitter> <girng> > as currently you cant call validate on facebook ⏎ ⏎ regarding this, i feel this is a good thing. if a developer is creating a new class and doesn't have the validate method there, guess what? compiler will still error, and you guessed it! no `abstract` needed!
<FromGitter> <Blacksmoke16> abstract has nothing to do with this example tho
<FromGitter> <girng> yes it does
<FromGitter> <watzon> The problem isn't that the compiler won't error, it's that you haven't defined an API
<FromGitter> <Blacksmoke16> only in the class
<FromGitter> <girng> because you used abstract in your example, which what was not needed
<FromGitter> <Blacksmoke16> i did not
<FromGitter> <girng> yes you did
<FromGitter> <girng> scroll up
<FromGitter> <Blacksmoke16> > i could see having a `validate` method define on the prent, and using an abstract def on `is_valid` ⏎ ⏎ this?
<FromGitter> <girng> your first one
<FromGitter> <watzon> Abstract is helpful for defining an API for other devs to use
<FromGitter> <Blacksmoke16> on the class yea
<FromGitter> <Blacksmoke16> but no def
<FromGitter> <Blacksmoke16> you shouldnt be able to new up an `Integration` by itself
<FromGitter> <watzon> If you don't then how do they know which methods they need to create?
<FromGitter> <watzon> They'll never get an error until they try to access that method, making it a hidden error waiting to happen
<FromGitter> <watzon> If it's abstract and they don't define it the compiler will yell at them
<FromGitter> <girng> putting `abstract` here https://play.crystal-lang.org/#/r/7bcw/edit will not help you anymore than the CURRENT compiler error. I'm sorry but that's just a fact
<FromGitter> <Blacksmoke16> > > as currently you cant call validate on facebook ⏎ > ⏎ > regarding this, i feel this is a good thing. if a developer is creating a new class and doesn't have the validate method there, guess what? compiler will still error, and you guessed it! no `abstract` needed! ⏎ ⏎ this is kinda flawed in that the integration could be public and not need validated, or should just use the common logic from
<FromGitter> <girng> i mean even w/o abstract, the compiler tells you directly what line it is, lol ⏎ ⏎ > Error in line 25: undefined method 'validate' for Facebook
<FromGitter> <watzon> Omg it's like talking to a wall lol
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7bd3 would be the real error
<FromGitter> <girng> @watzon The compiler will error out (see my example)
<FromGitter> <Blacksmoke16> hiding behind the same "undefined method xx for yy" is not good
<FromGitter> <Blacksmoke16> you need to understand this
<FromGitter> <denolfe> I really think all of you are wasting your time debating the obvious merits of sound OOP practices
<FromGitter> <watzon> Exactly
<FromGitter> <Blacksmoke16> sure it "works"
<FromGitter> <tenebrousedge> I don't know that they're obvious
<FromGitter> <Blacksmoke16> but you're at a disadvantage if you ever do something that doesnt happen to catch this for you
<FromGitter> <tenebrousedge> but the merits are there
<FromGitter> <watzon> @denolfe I've been trying to explain a pretty easy to understand concept, but I'm at the end of my rope
<FromGitter> <Blacksmoke16> `can't instantiate abstract class Integration`
<FromGitter> <denolfe> Like you said, a wall, lol
<FromGitter> <girng> @Blacksmoke16 i don't agree, cause `undefined method 'validate' for Facebook` is explicit enough isn't it?
<FromGitter> <watzon> No
<FromGitter> <Blacksmoke16> no
<FromGitter> <girng> how come
<FromGitter> <girng> how is that not explicit enough
<FromGitter> <watzon> It doesn't tell you anything other than that the method `validate` isn't defined
<FromGitter> <girng> you add a validate, and the compiler error goes away
<FromGitter> <watzon> And it only does so if you try to call it
<FromGitter> <watzon> Not at all helpful if you're trying to extend the class
<FromGitter> <watzon> And don't know what methods you need to implement
<FromGitter> <watzon> With an abstract class the compiler will error whether you try to use the method or not
<FromGitter> <Blacksmoke16> plus you shouldnt be able to instantiate an `Integration` class on its own
laaron has quit [Client Quit]
<FromGitter> <Blacksmoke16> hence abstract, which gives `can't instantiate abstract class Integration`
<FromGitter> <watzon> That too
<FromGitter> <watzon> It's a base class
<FromGitter> <tenebrousedge> > With an abstract class the compiler will error whether you try to use the method or not ⏎ Good point
<FromGitter> <watzon> It's not meant to be used, it's meant to be extended
<FromGitter> <watzon> `abstract` makes that clear
<FromGitter> <watzon> It's not a real class. It's abstract.
<FromGitter> <meltheadorable> 😱
laaron has joined #crystal-lang
<FromGitter> <watzon> *gasp* I know
<FromGitter> <girng> well, I think that compiler is fine and dandy for me
<FromGitter> <watzon> You have to think about these things from the point of view of someone using/extending your library
<FromGitter> <watzon> Or even yourself using/extending the library in other projects
<FromGitter> <girng> I read the error, fix my code, and bam, it works. Not sure why there is such a big issue around this
<FromGitter> <watzon> Because it shouldn't be just about "making things work"
<FromGitter> <watzon> It should be about making things usable, efficient, and DRY
<FromGitter> <Blacksmoke16> 🙏
<FromGitter> <meltheadorable> i realize you’ve got a name to live up to but please please please listen to people ffs
<FromGitter> <girng> That's not until later, premature optimization is the root of all evil. I'm not going to make my code efficient as possible while coding out my ideas.
<FromGitter> <girng> I want stuff working and done first. Compiler errors in their current state without abstract, do just that
<FromGitter> <Blacksmoke16> i mean i guess
<FromGitter> <watzon> This isn't even premature optimization
<FromGitter> <watzon> This is using a standard pattern
<FromGitter> <girng> i was talking to your "efficient" word
<FromGitter> <Blacksmoke16> it would prob be easier for one of us to rewrite your entire game than it would be to try and understand it to make a simple change
<FromGitter> <watzon> Yup
<FromGitter> <watzon> If you're not using proper abstractions
<FromGitter> <Blacksmoke16> considering we would have no idea if an undefined method should be defined or what its purpose it
<FromGitter> <watzon> You can end up with some real headaches in the future
<FromGitter> <tenebrousedge> I mean, I don't know how much code is involved, but abstractions are often hard to fix
<FromGitter> <girng> > i realize you’ve got a name to live up to but please please please listen to people ffs ⏎ You are not god, stop playing like one
<FromGitter> <girng> telling me to "fuck off"
<FromGitter> <girng> not nice
<FromGitter> <Blacksmoke16> we're trying to help make you a better programmer, rejecting well respected and defined patterns because you just dont like them is not helping
<FromGitter> <tenebrousedge> it was not nice
<FromGitter> <watzon> Also imagine you change a method on the parent. That method may not be used in all child instances, so the compile errors will tell you some of the places where you need to fix things, but not all of them
<FromGitter> <Blacksmoke16> but i agree, that was a bit out of line
<FromGitter> <watzon> Idk, I didn't see a "fuck off" anywhere
<FromGitter> <watzon> She's telling you that some experienced devs are trying to teach you some pretty basic concepts
<FromGitter> <watzon> It could've been phrased nicer, I'll give you that
<FromGitter> <Blacksmoke16> id also imagine any job interview are going to be covering most of these topics?
<FromGitter> <girng> @Blacksmoke16 see my thread on abstract with @watzon . he helped me understand `abstract`. i am not rejecting information ;p
<FromGitter> <tenebrousedge> @Blacksmoke16 I would very much doubt that
<FromGitter> <Blacksmoke16> no? entry level OOP tech interview?
<FromGitter> <watzon> I've had interviewers ask about abstracts
<FromGitter> <Blacksmoke16> i more so mean just general OOP patterns
<FromGitter> <watzon> Also references in PHP
<FromGitter> <watzon> Eww
<FromGitter> <girng> i just don't agree with a lot of these conventions and think they are silly.
<FromGitter> <tenebrousedge> I've only ever been asked system-level design questions
<FromGitter> <Blacksmoke16> i hope one day you'll see the light
<FromGitter> <girng> you guys don't agree with conventions either, there is no way you agree with everything you've learned in programming
<rocx> all i've ever been asked in interviews was a fizzbuzz.
<FromGitter> <watzon> But you have to sit back and think for a second, "if all these people are telling me that this is important, maybe I should listen"
<FromGitter> <girng> i highly doubt that, be honest with yourselves.
<FromGitter> <Blacksmoke16> otherwise you're going to have a hard time refusing to do these if you go for a real programming job
<FromGitter> <watzon> All conventions have a purpose
<FromGitter> <girng> sure
<FromGitter> <tenebrousedge> all conventions have a purpose; I don't use `abstract` much personally
<FromGitter> <girng> they also can be convoluted and confusing.
<FromGitter> <denolfe> Those are not sole reasons to dismiss them though
<FromGitter> <watzon> I don't think most people use it much tbh
<FromGitter> <Blacksmoke16> long as you know the convention, doesnt mean you should go out of your way to use it
<FromGitter> <tenebrousedge> `super` is a lot closer to "universally used" than "situational"
<FromGitter> <watzon> It's not one of those things you use all the time
<FromGitter> <watzon> but it's important to know when you need it
<FromGitter> <girng> that's not my reason to dismiss them
<FromGitter> <girng> i'm just saying that
<FromGitter> <watzon> `super` is definitely important
<FromGitter> <girng> i posted my thoughts in the abstract thread. my reasons r there
<FromGitter> <watzon> Anyway, I feel like we've wasted way too much time and energy on this topic
<FromGitter> <Blacksmoke16> pretty much
<FromGitter> <girng> @Blacksmoke16 well, the more i read and understand these particular conventions, the more i dislike them. so there's that.
<FromGitter> <watzon> I even wrote a blog post
<FromGitter> <watzon> Lol
<FromGitter> <Blacksmoke16> i mean if you ever get a rl job doing this you're most likely going to have to use them
<FromGitter> <Blacksmoke16> maybe that would help your understanding, more exposure
<FromGitter> <watzon> @girng if and when you start writing libraries meant to be used by others you'll get it
<FromGitter> <girng> i get it
<FromGitter> <girng> i choose deliberately not to use em
<FromGitter> <watzon> And what @Blacksmoke16 said
<FromGitter> <watzon> You can get away with not using them
<FromGitter> <watzon> But it's a best practice to use them if your code is going to be used by others
<FromGitter> <Blacksmoke16> to wrap this up as long as you understand what they are and what their purpose is, im ok. whether you choose to use them is up to you
<FromGitter> <Blacksmoke16> im not going to spend anymore time trying to convince you that you should use them, much like im not going to try to convince @meltheadorable to use DI :P
<FromGitter> <Blacksmoke16> you'll just have to learn this on your own
<FromGitter> <girng> i've learned
<FromGitter> <meltheadorable> i think DI has much more ambiguous benefits than the existence of super in languages with inheritance
<FromGitter> <watzon> I guess I just don't get the blatant disregard for good patterns. I am one of the most opinionated people I know, especially when it comes to Python and PHP, but conventions and design patterns are there for a reason
<FromGitter> <watzon> Are any of them perfect? No
<FromGitter> <girng> but there will be a day, where if crystal becomes `abstract protected private annotated etc etc def`, you'll come back to this moment, mark my words.
<FromGitter> <Blacksmoke16> @watzon dont ask him about tuples
<FromGitter> <watzon> But they tend to help more than they hurt
<FromGitter> <watzon> Omg lol
<FromGitter> <Blacksmoke16> i mean that will never happen but ok
<FromGitter> <Blacksmoke16> only two onf those even make sense
<FromGitter> <watzon> Yeah...
<FromGitter> <girng> yeah, it's called a hyperbolic exaggeration example
<FromGitter> <girng> it's not supposed to *literally* make sense.
<FromGitter> <Blacksmoke16> unless something happens in OOP land
laaron has quit [Remote host closed the connection]
<FromGitter> <tenebrousedge> these concepts have been hashed out pretty thoroughly over the last 30-40 years
<FromGitter> <watzon> yup
<FromGitter> <Blacksmoke16> anyway, im not starting this again
<FromGitter> <girng> go look at the new `serverless` term
<FromGitter> <girng> not a misnomer, right?
<FromGitter> <watzon> Serverless is a complete misnomer
<FromGitter> <girng> lol u agree with me?
<FromGitter> <watzon> About that
<FromGitter> <girng> we found some common ground
<FromGitter> <watzon> Not about abstract
<FromGitter> <girng> i know
<FromGitter> <Blacksmoke16> so any ideas on ☝️ July 28, 2019 10:53 PM (https://gitter.im/crystal-lang/crystal?at=5d3e5f98f0ff3e2bba86e0e9)
<FromGitter> <watzon> I think a lot of people agree that calling it "serverless" is stupid
<FromGitter> <watzon> Obviously there's a server
<FromGitter> <Blacksmoke16> shh, no its "the cloud"
<FromGitter> <Blacksmoke16> *magic*
<FromGitter> <girng> :D yes
laaron has joined #crystal-lang
<FromGitter> <girng> see look, i don't disagree with everything
<FromGitter> <watzon> Tbh I've tried to use Granite and am not a huge fan. I don't like that it forces you to define the adapter in every model. There needs to be a default adapter.
<FromGitter> <Blacksmoke16> WIP ^
<FromGitter> <watzon> Good!
<FromGitter> <Blacksmoke16> well
<FromGitter> <Blacksmoke16> plan being if you define one it'll use that by default
<FromGitter> <Blacksmoke16> if you define more than one it uses the first one
<FromGitter> <denolfe> Having done "serverless" at my current workplace for 3 or so years, a lot of things are slingshotting back to right-sized monoliths in containers. It has its place, but it was way over-prescribed in my experience
<FromGitter> <watzon> I like that you can define an adapter per model
<FromGitter> <watzon> But I don't like being forced to
<FromGitter> <meltheadorable> adapters aren’t a model-level concern imo
<FromGitter> <meltheadorable> serverless is terrible, misnomer or not, and microservices are a bad idea most of the time
<FromGitter> <Blacksmoke16> im kinda torn, i like how simple it makes working with the models, but i also like the separation of a model and the connection/interaction with the db
<FromGitter> <Blacksmoke16> that doctrine has
<FromGitter> <tenebrousedge> I think that the adapter is a model-level concern, but it should be inherited
<FromGitter> <watzon> It may be terrible to some people, but I still like the way Rails handles things
<FromGitter> <watzon> With migrations generating a schema, and then the models using that schema
<FromGitter> <tenebrousedge> `class Foo < Neo4jModel` `class Bar < PostgresModel`
<FromGitter> <Blacksmoke16> what about a model that can do both?
<FromGitter> <watzon> Explain?
<FromGitter> <tenebrousedge> probably a bad idea
<FromGitter> <Blacksmoke16> mmm probably right
<FromGitter> <Blacksmoke16> how does that help read/write tho?
<FromGitter> <meltheadorable> I am about 90% happy with the way rails handles the relationship between models, schema, migrations, and adapters
<FromGitter> <Blacksmoke16> currently i can only think of doing like `.connection(:write)`
<FromGitter> <Blacksmoke16> where `:write` is a named connection when you were registering adapters
<FromGitter> <meltheadorable> I’m skeptical the benefits of separating out connections is worth the complexity of having to swap and manage the different ones constantly in your app code
<FromGitter> <Blacksmoke16> in symfony land we would just have like `function __construct(EntityManager $readEm) { $this-> em = $readEm; }`
<FromGitter> <Blacksmoke16> and just change it to `$writeEm` if we need to
<FromGitter> <watzon> I mean, for 99% of use cases you're not going to use more than one adapter
<FromGitter> <tenebrousedge> sure, swap at initialization
<FromGitter> <meltheadorable> th emore you talk about symfony the more im convinced i want absolutely nothing to do with it
<FromGitter> <Blacksmoke16> :S
<FromGitter> <tenebrousedge> I don't like its ORM
<FromGitter> <watzon> Well it's PHP @meltheadorable
<FromGitter> <watzon> So I concurr
<FromGitter> <tenebrousedge> Laravel is not bad
<FromGitter> <Blacksmoke16> @watzon probably
<FromGitter> <watzon> Nah Laravel is the one thing in the PHP ecosystem that I can stand
<FromGitter> <watzon> Idk how Jeffery did it
<FromGitter> <watzon> But it is a thing of beauty
<FromGitter> <meltheadorable> ActiveRecord is the only good ORM and it only got that way by completely reimplementing a full relational algebra
<FromGitter> <Blacksmoke16> but would be nice to have a way to do so
<FromGitter> <watzon> I don't know that I'd say it's the only good ORM
<FromGitter> <watzon> It's definitely one of the most complete though
<FromGitter> <tenebrousedge> I liked Sequel, as I recall
<FromGitter> <Blacksmoke16> but will be challenging if the connection is tied to the model
<FromGitter> <watzon> ecto (https://github.com/elixir-ecto/ecto) is pretty great
<FromGitter> <watzon> I liked crecto when it was being developed
<FromGitter> <watzon> Not perfect and it had a long way to go, but they had good ideas
<FromGitter> <meltheadorable> I haven’t spent enough time with ecto to contradict you, but every other ORM I’ve used is either dangerously incomplete or barely worth actually calling an ORM
<FromGitter> <Blacksmoke16> anyway, im off to bed o/
<FromGitter> <meltheadorable> i think most would be better off trying to implement an entirely different pattern
<FromGitter> <meltheadorable> to get around the completeness issues
<FromGitter> <meltheadorable> if they aren’t gonna go all the way to implementing a relational algebra engine so that you can express more
<FromGitter> <watzon> My main problem with most ORMs is that they don't do enough about migrations
<FromGitter> <meltheadorable> but a lot of ORMs try to implement patterns similar to the ones in AR but are missing major features or have serious efficiency problems
<FromGitter> <watzon> Avram is the first one I've seen in the Crystal ecosystem to actually do a good job of managing migrations
<FromGitter> <meltheadorable> I’m not that fond of Laravel, it’s hard to be excited about Laravel coming from rails, but I’d probably only ever use Laravel if somebody were making me write PHP apps
<FromGitter> <watzon> Avram so far has a lot of similarities to AR, but makes a lot of concessions for Crystal
<FromGitter> <watzon> It's still pretty new too, and they're adding things constantly
<FromGitter> <denolfe> As someone who never touched Rails, would you say try out Lucky or Amber?
<FromGitter> <tenebrousedge> yeah, I wouldn't choose to use Laravel unless that's what the job was. It's just the next best thing to Rails
<FromGitter> <watzon> @denolfe even as someone that has touched Rails I'd vote for Lucky
<FromGitter> <meltheadorable> if i had any web projects it made sense to do in crystal, i’d probably have more opinions about the ORMs, but nothing I’m doing makes sense as a crystal project
<FromGitter> <watzon> Main reason, it's being very actively developed and isn't just imitating Rails. They do a lot to make things work the Crystal way.
<FromGitter> <watzon> They also fix issues very quickly and keep things pretty stable
<FromGitter> <denolfe> Got it. One thing that I run into a lot within this community is some assumptions that you know a lot of Ruby and/or Rails.
<FromGitter> <denolfe> I've found myself looking up things in Ruby to get more info, hah
<FromGitter> <tenebrousedge> what have you looked up lately? can you recall anything specific?
<FromGitter> <meltheadorable> i occasionally have to look up the ruby docs to figure out how to do things in crystal where i have a good guess the APIs are similar but the documentation is thin
<FromGitter> <watzon> Yeah the nice thing about Lucky is that it's super well documented and doesn't assume any knowledge of Rails
<FromGitter> <watzon> @meltheadorable I do the same haha
<FromGitter> <denolfe> The only thing I can think of off the top of my head is the usage of `extend self` and the conventions around using symbols
<FromGitter> <meltheadorable> ruby has really verbose but much better documentation around things like string manipulation and array methods
<FromGitter> <watzon> Definitely
<FromGitter> <watzon> Things don't always match up one for one
<FromGitter> <watzon> but you can typically get an idea of the way things work
<FromGitter> <meltheadorable> not always, but usually close enough that reading the ruby docs will get me closer to a solution than trying from the crystal ones
<FromGitter> <tenebrousedge> huh, I usually read the crystal source if I have a question about how it works, but I don't think I've ever looked up the Ruby docs
<FromGitter> <watzon> Yeah the Crystal docs need some serious updating
<FromGitter> <watzon> And the documentation generator
<FromGitter> <meltheadorable> does lucky have more docs somewhere? you said they were really good but i found them a little thin on details
<FromGitter> <meltheadorable> might again be spoiled by things like the rails guides & just expecting too much
<FromGitter> <watzon> They still need individual docs for specific parts of the framework
<FromGitter> <watzon> But it's better documented than anything else so far
<FromGitter> <meltheadorable> yeah, thats what i was referring to as light on details
<FromGitter> <meltheadorable> probs spoiled :p
<FromGitter> <watzon> Yeah, coming from Ruby you might be a bit spoiled haha
<FromGitter> <watzon> We really need better documentation generation
<FromGitter> <watzon> And people need to start doing a better job of documenting their code
<FromGitter> <watzon> @Blacksmoke16 does a pretty good job from what I've seen
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <watzon> Btw, I need some votes on a poll if anyone cares to do so https://twitter.com/_watzon/status/1155270909889937409
<FromGitter> <tenebrousedge> does MX Linux use exactly the same repositories as Debian?
<FromGitter> <watzon> Yup, and it's a debian kernel
<FromGitter> <watzon> They may have some custom repos, but they still use the standard debian repos
<FromGitter> <watzon> As ArcoLinux does, but with Arch repos
<FromGitter> <tenebrousedge> I would say if it has custom repos, then I would probably not call it Debian. If it's "Debian, but" then the "but" would have to be pretty minimal
<FromGitter> <meltheadorable> theres no poll option for “linux nerds are insufferable and i do not care”
<FromGitter> <tenebrousedge> :sadface:
<FromGitter> <kniknoo> I'm glad the web is not my domain, that stuff sounds complicated. ⏎ ⏎ And you've just made a sad little penguin out of me.
<FromGitter> <kniknoo> Would it be better if we started on Crinux? ;)
return0e_ has quit [Ping timeout: 246 seconds]
<FromGitter> <kniknoo> But as a total Linux Freak: There is way too much pedantry about what constitutes a distro. Call it whatever you feel like it is, I feel like the environment nuances makes the distro more than the repos.
return0e has joined #crystal-lang
<FromGitter> <watzon> I feel the same, this dude was just being a stupid eletist
<FromGitter> <kniknoo> I'm a proud nano user... but my needs for a CLI editing environment are limited to quick edits of configs.
<FromGitter> <meltheadorable> for the record i want to be able to like linux & i fund linux development, i just cant stand linux people -- pedantic, rude, elitist, and generally hostile to good design doesnt really make for fun people to deal with
<FromGitter> <girng> if i send Int32 to a function. is there a mapping that basically converts all Types to their conversion equivalent?
<FromGitter> <kniknoo> I REALLY adore Mate desktop. This is the most at home I've felt in an environment ever. I get to piecemeal all of my favorite parts of OSX Win and Gnome and have built in Compiz that runs lie a dream!
<FromGitter> <girng> for example, Int32 would be `to_i`
<FromGitter> <kniknoo> I ry not to be that Melody, I'm a computer science teacher fir elementary schoolers so it's my job to be understanding and encourage excitement. :)
<FromGitter> <meltheadorable> last time i used compiz it was still beryl/compiz on the way to becoming compiz fusion -- i honestly didn't realize it was still around, everyone seemed to have abandoned it
<FromGitter> <kniknoo> It kinda fell out of vogue, but Mate silently slipped in a really solid implementation.
<FromGitter> <kniknoo> I set up my cube once and it's become completely natural to me now.
<FromGitter> <meltheadorable> i use elementaryOS when i linux, the parts of a compositing window manager i actually care about seem to be there, i do not need my windows to wiggle with physics
<FromGitter> <kniknoo> Yeah, I have that turned off, but I've always been a huge fan of multi-desktops and some fluffy animations to go along.
<FromGitter> <meltheadorable> i used to use virtual desktops with compiz pretty heavily but not a cube, i liked having 3 so that i was always only a left transition or right transition away from them
<FromGitter> <tenebrousedge> @girng not that I know of
<FromGitter> <meltheadorable> but mostly they're not part of my workflow anymore
<FromGitter> <kniknoo> I couldn't funtion without 4 desktop. It's how I keep everything in my head sorted.
<FromGitter> <elorest> Guess I'm old fashioned but I still really like gnome.
<FromGitter> <kniknoo> Mate is gnome2 ++
<FromGitter> <kniknoo> There's a perfect gnome2 template for it. I use the OSX template with right hand window controls and a gnome2 menu.
<FromGitter> <meltheadorable> i haven't used gnome since 2007ish so idk what its up to lately
<FromGitter> <elorest> I used Compiz/Beryl back in the day too.
<FromGitter> <kniknoo> Gnome3 is RAWR, but I prefer the Cinnamon implementation of it. It's fancy Mate.
<FromGitter> <meltheadorable> but pantheon is gtk-based
<FromGitter> <meltheadorable> so gnome apps are still pretty close to native if they respect themes and such
<FromGitter> <kniknoo> But I'm also a ...shh... Ubuntu head because I don't wanna deal with extra BS
<FromGitter> <kniknoo> Oh yeah, gtk is alive and well and very stable
<FromGitter> <meltheadorable> elementaryOS is based on ubuntu too
<FromGitter> <elorest> I left linux desktop for osx in 2009. After macbooks started sucking and pc laptops got better I went back to linux. Ended up using Manjaro. Used KDE for a couple months but ended up using latest gnome. It's really solid and has all the customizations I used to do to OSX already done.
<FromGitter> <meltheadorable> but with HIG they take seriously
<FromGitter> <meltheadorable> pc laptops still suck and they suck worse on linux though?
<FromGitter> <kniknoo> Word. Studio hasn't gotten SO GOOD in the last 2 years. It's a package now. It's my recording studio, I can use Arduir and record 14 channels at once with no glitches and no setup required. Even jack is automated now and no qjackctrl needed!
<FromGitter> <elorest> Meh. I'm getting around 10 hour battery life on a lot of them and decent graphic performance.
<FromGitter> <meltheadorable> macos is still a better linux than linux for me
<FromGitter> <kniknoo> I'm POOOOOOR :D
<FromGitter> <elorest> HP x360 15" spectre works nice with Ubuntu or Manajaro out of the box.
<FromGitter> <elorest> Dells XPS 15 works pretty good too but the trackpad has a tendancy to fail after 6 months.
<FromGitter> <elorest> hardware issue but seems a bit worse with linux driver when it fails.
<FromGitter> <meltheadorable> regardless i need professional software that only exists on windows and macs, windows is a steaming trash heap that sold me out to advertisers and WSL isn't good enough to do my day job in, so macOS is the only viable os for me anyway
<FromGitter> <kniknoo> I considered this Dell Inspiron 5755 a lemon (2 trips to the depot) until I finally said "fuck what work says" and installed Ubuntu again.
<FromGitter> <kniknoo> Now it's my production machine.
<FromGitter> <elorest> I still have a mac at home for lightroom photoshop and final cut but at work I'm loving using only linux.
<FromGitter> <kniknoo> Understood. I'm just one of those anarcho-unix kids who has literally pulled computers out of the trash to survive in the recent past. I'm eternally grateful for Linux.
<FromGitter> <meltheadorable> ps WSL literally has worse performance than a virtual machine
<FromGitter> <absolutejam_gitlab> I have a 2013? mbp for on call work
<FromGitter> <kniknoo> It'll be better soon
<FromGitter> <absolutejam_gitlab> Tbe last good grnrsfkkn
<FromGitter> <absolutejam_gitlab> Bd
<FromGitter> <kniknoo> They're putting a real kernel in
<FromGitter> <elorest> Pretty much everything we're developing for is linux so it works out good.
<FromGitter> <absolutejam_gitlab> The last good generation
<FromGitter> <meltheadorable> im perfectly satisfied with my 2016 macbook pro
<FromGitter> <absolutejam_gitlab> And a redciculously big thinkpad 'laptop' at my work desk running manjaro
laaron has quit [Remote host closed the connection]
<FromGitter> <kniknoo> Yo @girng , can you show us any performance stats? You're using crystal on WSL, yeah?
<FromGitter> <absolutejam_gitlab> I use bspwm at work. I love it
<FromGitter> <absolutejam_gitlab> Especially multi monitor
<FromGitter> <elorest> @meltheadorable I like the thunderbolt 3's on that but the touchbar took me a bit to get used to.
<FromGitter> <kniknoo> Even if I don't wanna use windows, I do wanna think about distributing portable software.
<FromGitter> <girng> @kniknoo i don't have any , but i made a thread on the crystal forum last year. people posted their benchmarks. apparently crystal is way faster on native linux (no surprise there :p).
<FromGitter> <meltheadorable> i have a hobby and most of the people doing it are using windows & wsl -- i was setting up my environment and everyone kept telling me mine must be broken because i kept telling them i was compiling it in ~30s -- it's common for it to take a full 5-10 minutes on WSL
<FromGitter> <girng> @kniknoo i've been using WSL for a year+. i can compile with --static and drop on a vps np. it's great, you'll be fine
<FromGitter> <kniknoo> Understood, once they implement the native kernel, I hope to see usable performance.
<FromGitter> <meltheadorable> nothing was broken, WSL is just brutally slow
laaron has joined #crystal-lang
<FromGitter> <meltheadorable> literally 10-20x performance penalty
<FromGitter> <kniknoo> One of these days Windows just has to give in and think about common unix concepts...
<FromGitter> <kniknoo> Pipes and streams FFS
<FromGitter> <meltheadorable> but yeah -- same machine, 3 environments -- compiling on windows took 10m, compiling in a linux VM took 5m, compiling in native linux took 45s
<FromGitter> <kniknoo> Wow! Noted.
<FromGitter> <kniknoo> Is trying to cross-compile the crystal compiler for RasPi an exercise in futility? If it's feasible, I'll spend the effort.
<FromGitter> <kniknoo> I see a basic recent example of a hello world, but he doesn't indicate if the compiler itself works.
<FromGitter> <kniknoo> It's a string coming in... you should be able to to_i a string.
<FromGitter> <kniknoo> ...i'm not even sure what you're passing in with the hash, without any sort of value for the key I'd assume it's nil.
<FromGitter> <tenebrousedge> if the hash can return more than one type then the result is a union
<FromGitter> <kniknoo> Fair, that would still fail the if, right?
<FromGitter> <kniknoo> Er, case
<FromGitter> <tenebrousedge> case also results in a union
<FromGitter> <girng> I have a feeling there is a much more simple way to do what I'm doing, I'm just doing it *wrong*. As usual :p
<FromGitter> <kniknoo> It's awkward...
<FromGitter> <kniknoo> Are you using playground for type feedback?
<FromGitter> <tenebrousedge> if you want to narrow down a type, you can use `as`
<FromGitter> <girng> It's just, I have to deal with strings. I'm getting them from `ARGV`. I want to Int32 a value
<FromGitter> <kniknoo> to_i from the string should figure it out.
<FromGitter> <tenebrousedge> a more general solution doesn't exist yet; ask me in a week
<FromGitter> <girng> Oh it shows it as a Class? why doesn't that when condition work, Int32 is surely a class?
<FromGitter> <girng> i've googled this, and ruby answers on stackoverflow are full of doing to_s on the type, etc
<FromGitter> <girng> i'm not doing that, looks ugly and hacky af
<FromGitter> <girng> plus, i want to know why my code ain't working
<FromGitter> <kniknoo> I'm probably missing something, but why doesn't "5000".to_i work as per https://crystal-lang.org/api/0.29.0/String.html#to_i%28base%3AInt%3D10%2Cwhitespace%3ABool%3Dtrue%2Cunderscore%3ABool%3Dfalse%2Cprefix%3ABool%3Dfalse%2Cstrict%3ABool%3Dtrue%2Cleading_zero_is_octal%3ABool%3Dfalse%2C%26block%29-instance-method ?
<FromGitter> <girng> ..and yes i checked for crystal answers too, not just ruby :p
<FromGitter> <girng> @kniknoo https://play.crystal-lang.org/#/r/7bgi yah
<FromGitter> <girng> works 4 me?
<FromGitter> <kniknoo> It defaults right into an Int32 from that. Is there another aspect to this I'm missing?
<FromGitter> <girng> ``` case t[:custom_key] ⏎ when Int32``` ⏎ ⏎ doesn't seem to work [https://gitter.im/crystal-lang/crystal?at=5d3e933484bc7a717fe02215]
<FromGitter> <girng> Even though, it's an Int32, but I think it's because it's checking the Class, not the Type? kinda some nuance there maybe, i'm lost myself, lol
<FromGitter> <tenebrousedge> `when Int32.class`
<FromGitter> <kniknoo> yep, that did it
<FromGitter> <kniknoo> I was a a bit more complex answer, but almost there
<FromGitter> <girng> wat...
<FromGitter> <kniknoo> wut wut?
<FromGitter> <girng> Class ⏎ Class ⏎ Int32 ⏎ Int32 ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5d3e95b2a9200c2428182454]
<FromGitter> <kniknoo> class is a class class
<FromGitter> <girng> LOL
<FromGitter> <girng> f*ck me
<FromGitter> <kniknoo> Everything is an object
<FromGitter> <girng> just seems weird how Int32 doesn't match that Int32 from the Namedtuple
<FromGitter> <girng> it seems like it would work
<FromGitter> <girng> They are both Int32s
<FromGitter> <girng> See here
<FromGitter> <kniknoo> Use the local playground, It'll really help answer a lot of typing questions and let you tweak around until you have it.
<FromGitter> <kniknoo> Define your custom key or else its the class you're sending
<FromGitter> <girng> i feel pp should be more explicit
<FromGitter> <kniknoo> You can monkey patch it to add "fuck" to the end of every line...
<FromGitter> <girng> acktually, https://play.crystal-lang.org/#/r/7bh9
<FromGitter> <girng> p! is what i should have used
<FromGitter> <girng> WOW
<FromGitter> <girng> SCREW PP
<FromGitter> <girng> i'm using p! from now one
<FromGitter> <girng> That does exactly what I want it to do
<FromGitter> <kniknoo> NEAT! Didn't know about that guy. Very handy.
<FromGitter> <girng> glad to know `pp` hides info from the dev, though. sad
<FromGitter> <girng> oh well, live n learn
<FromGitter> <kniknoo> I've never been a pp person. *shrug*
<FromGitter> <girng> hahahahaha
<FromGitter> <girng> i always used to use puts
<FromGitter> <girng> then opyrpin told me about pp
<FromGitter> <kniknoo> I'm off to bed now. Happy crystalling!
<FromGitter> <girng> hey @kniknoo gn thx for the help
<FromGitter> <kniknoo> certainly, I'm learning along with you. :)
<FromGitter> <girng> :)
<FromGitter> <meltheadorable> ```code paste, see link``` ⏎ ⏎ this works fine [https://gitter.im/crystal-lang/crystal?at=5d3e9a1f2136933a870d7334]
<FromGitter> <watzon> `pp` is just pretty_print. You can reimplement it on any class you create in whatever way you want
<FromGitter> <watzon> By default it just inspects the object and prints it in a prettier way
<FromGitter> <meltheadorable> p. sure the case example isn't doing what you want because if a class is the condition for a when, it stops checking equality and checks whether the subject is that type instead
<FromGitter> <meltheadorable> not sure if there's an easy way to test equality instead for a case statement like that -- you can either convert the class name to a string and check that way instead, or use ifs though
ht_ has joined #crystal-lang
<FromGitter> <girng> @meltheadorable wow wait
<FromGitter> <girng> so the Int32 check works when used inside an if?
<FromGitter> <girng> yeah, that's exactly what i want to do, thanks. i was just thinking of using a case
<FromGitter> <meltheadorable> yeah, the case statement does a type check instead of an equality check, and the type of the passed in class is `Class` not `Int32` so it fails the case check
<FromGitter> <girng> but if it works for an if, i don't mind, lol
<FromGitter> <girng> > type check instead of an equality check ⏎ ⏎ interesting
<FromGitter> <girng> well i always thought if was the same as case. lesson learned
<FromGitter> <girng> just syntaxically different (sugar)
<FromGitter> <meltheadorable> it does that when the `when` contains a class so that you can do stuff like this ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3e9d0b84536e27e069cece]
<FromGitter> <meltheadorable> underneath that translates to a type check
<FromGitter> <meltheadorable> it can't tell that you don't want to do a type check when your input is already a class
<FromGitter> <girng> let's say `input = Int32`
<FromGitter> <girng> does a type check on Int32
<FromGitter> <girng> which is a class?
<FromGitter> <meltheadorable> you would need `when Class` to match
<FromGitter> <girng> right??
<FromGitter> <girng> so it would fail like you said
<FromGitter> <meltheadorable> yeah
<FromGitter> <girng> i think i got it now
<FromGitter> <meltheadorable> thats why it worked when it was `when Int32.class` too
<FromGitter> <girng> so it's getting the type of the.. TYPE LOL
<FromGitter> <meltheadorable> because that was the same as `when Class`
<FromGitter> <meltheadorable> but is definitely not what you wanted because that would match any class
<FromGitter> <girng> nice
<FromGitter> <meltheadorable> so if you had `input = String` it also would have matched `Int32.class`
<FromGitter> <meltheadorable> it works with ifs though
<FromGitter> <meltheadorable> because you get to choose to do equality checks instead of a type check
<FromGitter> <girng> i actually understand this fully
<FromGitter> <girng> i'm going to delete my topic
<FromGitter> <girng> wait, no i'm not straight replied
<FromGitter> <andrius> I get `protected method 'on_unknown_json_attribute' called for JSON::Serializable::Unmapped` with something like this (simplified code and it have no errors): https://play.crystal-lang.org/#/r/7bhp ⏎ ⏎ Not sure how to fix. Error trace is not helpful: ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5d3e9efe7e00fc4ace6ae96d]
<FromGitter> <watzon> @andrius you need to give us a simplified code example that actually errors
<FromGitter> <watzon> Can't do much with functional code
sorcus has joined #crystal-lang
<FromGitter> <andrius> I wish to get it simplified ;) Will try, digging now; it always complain regarding only one field from JSON
alex`` has joined #crystal-lang
sorcus has quit [Ping timeout: 264 seconds]
dingenskirchen has joined #crystal-lang
<FromGitter> <girng> @meltheadorable still fiddling around with the sdl2 bindings?
dingenskirchen has quit [Ping timeout: 244 seconds]
jolav has joined #crystal-lang
<FromGitter> <fenicks> Hi everyone
jolav has quit [Ping timeout: 260 seconds]
<FromGitter> <girng> hi
<FromGitter> <watzon> 'ello
olbat[m] has quit [Remote host closed the connection]
dwdv has quit [Remote host closed the connection]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <absolutejam_gitlab> `crystal format` should make long method signatures multi-line
<FromGitter> <absolutejam_gitlab> like Python's `black` does
<FromGitter> <watzon> I agree
<FromGitter> <watzon> Although if it already is multiline it will at least clean it up for you
<FromGitter> <absolutejam_gitlab> yeah true
dingenskirchen has joined #crystal-lang
olbat[m] has joined #crystal-lang
dingenskirchen has quit [Ping timeout: 245 seconds]
dingenskirchen has joined #crystal-lang
coderobe has joined #crystal-lang
lucasb has joined #crystal-lang
dingenskirchen has quit [Ping timeout: 272 seconds]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
gangstacat has joined #crystal-lang
rocx has left #crystal-lang ["ERC (IRC client for Emacs 26.2)"]
sorcus has joined #crystal-lang
<FromGitter> <kniknoo> So Isomorphism has been declared a fad already? I don't buy it, I think it's just because js was the poster boy. I realize it would only be pseudo-isomorphism, but I really want to see (make) a subset of Ruby for front end that lives on top of a crystal backend. The term Rubyscript keeps running through my head, though I realize that's already a ruby -> js project. I know I said I don't want to deal with the
<FromGitter> ... web domain, but I really need to outline this concept rattling around in my head that seems as applicable to web apps as desktop apps. The general philosophy I'm going into this with is to separate the time sensitive code from the rest. Allow for lazy structures in Ruby by using extra strict Crystal. Then all you need to do ... [https://gitter.im/crystal-lang/crystal?at=5d3efab0c356af25e04c5ac6]
<FromGitter> <dscottboggs_gitlab> > `crystal format` should make long method signatures multi-line ⏎ ⏎ > Although if it already is multiline it will at least clean it up for you ⏎ ⏎ I would prefer it if it would change both ... [https://gitter.im/crystal-lang/crystal?at=5d3efdd7840e287180685005]
<FromGitter> <j8r> or ⏎ ⏎ ```def method( ⏎ with : Many, ⏎ args : And, ⏎ hanging : Indent ⏎ )``` [https://gitter.im/crystal-lang/crystal?at=5d3efe8f3e51d77b1b8c66f8]
<FromGitter> <Blacksmoke16> i much rather have that ^
<FromGitter> <dscottboggs_gitlab> That's an option, but I like to have the args at a different indentation level than the body
<FromGitter> <dscottboggs_gitlab> The parents separating them is good enough for me though if other people felt it was a lot better that way
<FromGitter> <kinxer> @Blacksmoke16 I'm appreciating having music recommendations every Monday. xD
<FromGitter> <kniknoo> I've been getting into new Orbital a lot lately. I was really into them in the Mid-90s but kinda fell off. But their last 2 albums have been super solid, especially Monsters Exist, the newest.
<FromGitter> <Blacksmoke16> haha np, anything you like so far?
<FromGitter> <naqvis> What is the most idiomatic way to `unmarshal` XML to `object`? I couldn’t find any macro similar to `JSON.mapping` for XML. So far i’ve been manually writing all of the boiler-plate code to iterate through node and/or its attributes and assign to instance variables using `case-when`. Assuming there might be some better alternative or approach
<FromGitter> <Blacksmoke16> 😬
<FromGitter> <Blacksmoke16> it doesnt exist atm
<FromGitter> <Blacksmoke16> in the same way JSON/YAML does
<FromGitter> <kinxer> I'm going to look into Sleeping Romance in particular; they're new since I was last actively listening to symphonic metal.
<FromGitter> <naqvis> :(
<FromGitter> <Blacksmoke16> i really enjoy them, they're currently in Berlin working on some new stuff
<FromGitter> <Blacksmoke16> https://www.youtube.com/watch?v=egxdktc_uXE these webisodes were cool as well, get some behind the scenes of the production
<FromGitter> <Blacksmoke16> they have a lot of potential, really excited to see what they do next
<FromGitter> <Blacksmoke16> @kinxer did i link you any Brothers of Metal? They're also quite new and i really enjoy their stuf
<FromGitter> <kinxer> Nope.
<FromGitter> <Blacksmoke16> 😮 sec
dingenskirchen has joined #crystal-lang
<FromGitter> <Blacksmoke16> is hard to pick just one song
<FromGitter> <Blacksmoke16> but https://www.youtube.com/watch?v=nIZiUt6bqIY
<FromGitter> <Blacksmoke16> the rest are just as good
<FromGitter> <Blacksmoke16> all their stuff is about norse gods and shit, is 💯
<FromGitter> <kinxer> Excellent. I'll have to watch that later. Have you heard Gloryhammer? Not symphonic metal ("parody" power metal, I think?), but listening to their stuff reminded me that I like the instrumentals in metal a lot. Their lyrics are frequently corny (or just bad), but I really love how goofy it is (and the instrumentals are good).
<FromGitter> <Blacksmoke16> haha, *Unicorn Invsaion of Dundee* :P
<FromGitter> <kinxer> Exhibit A: https://youtu.be/0ZeEjXlODhM
<FromGitter> <Blacksmoke16> yea, they have some good stuff
<FromGitter> <kinxer> Their second album is entitled "Space 1992: Rise of the Chaos Wizards". Good stuff.
<FromGitter> <Blacksmoke16> `Ensiferum` has a similar thing, `Bonus Song`
<FromGitter> <Blacksmoke16> i almost died when i actually listened to the lyrics
<FromGitter> <Blacksmoke16> bed they had a ball doing that song
<FromGitter> <kinxer> That's great. Love when people can make fun of themselves a little.
<FromGitter> <Blacksmoke16> indeed
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Client Quit]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
<FromGitter> <kniknoo> Y'all into Igorrr? That's baroque-core. Elements of metal, breakcore, and much more over a baroque style sound.
<FromGitter> <Blacksmoke16> mm, cant say i heard of him
<FromGitter> <dscottboggs_gitlab> Surprised you haven't, but it's silly to try to say that Igorrr fits into any one genre
<FromGitter> <kniknoo> I adore them. It's their own name for the genre. I got to see them in Chicago and got Moshed into the front, right under Laure just in time for her to offer her hand out. Worth every second of the long drive.
<FromGitter> <kniknoo> https://youtu.be/MKp30C3MwVk
<jokke> quick question
<FromGitter> <meltheadorable> im just gonna quietly listen to carly rae jepsen over here
<FromGitter> <kniknoo> I look forward to nerding out about music with y'all. I'm a musician with a secondary interest in computer science.
<jokke> if i need to link libs with my program, can i just add a few `@[Link(...)]` annotations?
<jokke> or are they coupled with lib blocks?
<FromGitter> <dscottboggs_gitlab> @jokke Pretty sure
<FromGitter> <dscottboggs_gitlab> yeah that was what I was thinking you might need to declare a lib and add it to that
<jokke> mhm
<FromGitter> <kniknoo> You know that Call Me Maybe is produced by the guy who produced Skinny Puppy's Last Rights. Also the last Men Without Hats album.
<jokke> can it be empty?
<FromGitter> <dscottboggs_gitlab> ¯\_(ツ)_/¯
<FromGitter> <dscottboggs_gitlab> oof ^^ lol
<FromGitter> <meltheadorable> `¯\\\_(ツ)\_/¯` for the record
<FromGitter> <Blacksmoke16> /shrug
<FromGitter> <dscottboggs_gitlab> still doesn't show up right on this computer but I bet that's just this one
<FromGitter> <meltheadorable> ¯\\\_(ツ)\_/¯
* FromGitter * dscottboggs_gitlab shrugs
<jokke> hm it seems to be ignored
<jokke> hm seems like i can't get it to link statically
<jokke> what are the runtime deps of crystal?
dwdv has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> Oh I don't see it there...weird
<jokke> thanks
<FromGitter> <kniknoo> Wow, looks like building a basic VM is more accessible than I imagined. I have a toy spec I've been wanting to implement (exapunks) and it looks very doable with what I have in front of me.
<FromGitter> <absolutejam_gitlab> How do I get syntax highlighting in `crystal docs` output?
<FromGitter> <absolutejam_gitlab> I have tried triple ```crystal
<FromGitter> <Blacksmoke16> got some example code?
<FromGitter> <Blacksmoke16> that should be all you need
<FromGitter> <Blacksmoke16> not even `crystal`
<FromGitter> <absolutejam_gitlab> It's in the README.md
<FromGitter> <absolutejam_gitlab> for my project
<FromGitter> <absolutejam_gitlab> not in the source
<FromGitter> <absolutejam_gitlab> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d3f377e3e51d77b1b8e3e52]
<FromGitter> <naqvis> you don’t need to append `crystal`
<FromGitter> <absolutejam_gitlab> I've tried without too
<FromGitter> <naqvis> just use triple `
<FromGitter> <absolutejam_gitlab> I just tried that to get syntax highlighting in my editor
<FromGitter> <Blacksmoke16> ah, that could be it?
<FromGitter> <Blacksmoke16> i could be its in his readme not source code
<FromGitter> <naqvis> aha
<FromGitter> <absolutejam_gitlab> That Readme has it tho
<FromGitter> <naqvis> in README you need to append `crystal`
<FromGitter> <naqvis> for reference
<FromGitter> <naqvis> bit confused as you asked "How do I get syntax highlighting in `crystal docs` output?”, but we are talking about `README.md`
<FromGitter> <naqvis> :D
<FromGitter> <naqvis> so not sure, how `README.md` got any connection with `crytsal docs` command?
<FromGitter> <Blacksmoke16> prob pulls in your readme into the docs dir
<FromGitter> <naqvis> yeah prob
<FromGitter> <absolutejam_gitlab> It diz
<FromGitter> <kinxer> @meltheadorable CRJ is also solid, though I don't see how you could possibly listen quietly.
<FromGitter> <absolutejam_gitlab> Does
<FromGitter> <kinxer> Yeah, I'll also confirm that `crystal docs` pulls in `README.md`.
<FromGitter> <naqvis> @absolutejam_gitlab possibly markdown parser of your editor, doesn’t understand `crystal`
<FromGitter> <Blacksmoke16> https://typora.io/
<FromGitter> <kinxer> @absolutejam_gitlab Is the issue that it's not highlighting in the generated HTML?
<FromGitter> <absolutejam_gitlab> Yeah
<FromGitter> <absolutejam_gitlab> And my editor doesn't but I'm going to MR
<FromGitter> <absolutejam_gitlab> For markdown blocks
<FromGitter> <absolutejam_gitlab> Been resorting to ```ruby
<FromGitter> <kinxer> The syntax highlighting works for me.
<RX14> whoo, first clean github inbox i've had in about 5 months...
<FromGitter> <Blacksmoke16> 💯
<FromGitter> <watzon> Can confirm that if you want good syntax highlighting in github you need to do \`\`\`crystal
<FromGitter> <absolutejam_gitlab> wait wat
<FromGitter> <watzon> I do that with all my READMEs
<FromGitter> <absolutejam_gitlab> I scrolled down and it's got syntax highlighting
<FromGitter> <absolutejam_gitlab> wtf did I Do
<FromGitter> <absolutejam_gitlab> oh jesus, I was looking at the wrong block!
<FromGitter> <watzon> Lol
<FromGitter> <absolutejam_gitlab> the one I was looking at was still ```ruby
<FromGitter> <absolutejam_gitlab> Oh dear.
<FromGitter> <dscottboggs_gitlab> oof, hate that kinda stuff :(
<FromGitter> <absolutejam_gitlab> I've copied the ruby syntax for my editor, for crystal
<FromGitter> <absolutejam_gitlab> What differences are there off the bat?
<FromGitter> <absolutejam_gitlab> Macros - keyword and moustaches
<FromGitter> <watzon> Types
<FromGitter> <watzon> That's the biggest one
<FromGitter> <absolutejam_gitlab> oh yeah, the big one
<FromGitter> <absolutejam_gitlab> haha
<FromGitter> <kniknoo> And sometimes even that isn't.
<FromGitter> <meltheadorable> what editor are you using that there isn’t crystal highlighting?
<FromGitter> <kniknoo> I really like the typing from the POV of the getters and setters, I'll likely maintain that is my main means of declaring type explicitly while letting the compiler figure out what I can from there.
<FromGitter> <absolutejam_gitlab> http://kakoune.org/
<FromGitter> <kniknoo> LOL, is that an ASCII banner clippy I see?
<FromGitter> <meltheadorable> an aside — i wish there was a modal editor that fully embraced the era of GUI software, i’d be vaguely interested in thinking about one but i do not want to be bound to a terminal or to a GUI window that just renderes a terminal and doesn’t actually use the GUI
<FromGitter> <tenebrousedge> how do you feel about vim keybindings in e.g. VSCode or Atom?
<FromGitter> <meltheadorable> not sufficiently moved to use them really — i’m more interested in something that kind of fully embraces both modalities — an editor designed to use the increased information density and flexibility in a modern GUI as well as designed from the start as a modal editor
<FromGitter> <absolutejam_gitlab> Sounds like emacs
<FromGitter> <meltheadorable> emacs still lives in a terminal
<FromGitter> <absolutejam_gitlab> Only the terminal mode
<FromGitter> <absolutejam_gitlab> The gui mode is its own GUI app
<FromGitter> <absolutejam_gitlab> With icon rendering etc
sorcus has quit [Ping timeout: 264 seconds]
<FromGitter> <girng> @Blacksmoke16 is that electron bloatware?
<FromGitter> <Blacksmoke16> hm?
<FromGitter> <girng> Typora thingi
<FromGitter> <Blacksmoke16> oh, idk
<FromGitter> <denolfe> I've been using VS Code for Crystal dev, but the autocomplete with the extension + Scry seems to be pretty fragile.
<FromGitter> <kniknoo> Geany does ok
<FromGitter> <absolutejam_gitlab> I really like vscode as an editor. I moved across as soon as it came out and it's only gotten lighter and better
<FromGitter> <absolutejam_gitlab> but I was finding myself using Vim a lot between SSH sessions and quick edits that turned into bigger refactoring without realising then I found kakoune
<FromGitter> <absolutejam_gitlab> It has some amazing principals but you have to do quite a bit to get it set up for your liking
<FromGitter> <absolutejam_gitlab> Started getting some keys in my muscle memory which is useful
<FromGitter> <absolutejam_gitlab> Had no joy with scry so far though :(
<FromGitter> <watzon> Lol I like how everything Electron is bloatware now
<FromGitter> <watzon> You can actually build pretty good shit with Electron
<FromGitter> <watzon> Like VS Code
<FromGitter> <denolfe> VS Code has a bit of backing behind it to make sure it's performant.... to say the least though :P
<FromGitter> <absolutejam_gitlab> I stopped using Atom back in the day because it was so fucking heavy
<FromGitter> <kinxer> It is heavy, but I do like it anyway.
<FromGitter> <watzon> Yeah. Atom vs Code is night and day
<FromGitter> <watzon> Atom takes up so much memory
<FromGitter> <girng> ux in electron is different than native
<FromGitter> <watzon> I think you're confusing UX with UI
<FromGitter> <girng> no
<FromGitter> <watzon> And not necessarily, you can emulate native UI components with Electron just fine
<FromGitter> <girng> user experience
<FromGitter> <watzon> How is the user experience different?
<FromGitter> <girng> native apps are much more responsive. better for ux
<FromGitter> <girng> ..developers nowdays tend to not give a shit about ux anymore nowadays
<FromGitter> <watzon> They can be more responsive, but if the electron app is developed correctly you won't ever notice a difference
<FromGitter> <girng> that's 100% wrong
<FromGitter> <watzon> vscode has native like performance
<FromGitter> <girng> hahahahh
<FromGitter> <absolutejam_gitlab> Can you imagine trying to target 2 major linux DEs, macOS, Windows, web and mobile?
<FromGitter> <absolutejam_gitlab> That's why people use web technologies
<FromGitter> <absolutejam_gitlab> Linux can't even decide on a package format
<FromGitter> <absolutejam_gitlab> nevermind common UI components
<FromGitter> <girng> i mean, just compare sublime text to vscode. in performance, and in ux it's mountains ahead.
<FromGitter> <girng> there are articles comparing them, i'm just not spewing bs
<FromGitter> <watzon> Sublime is also very minimalistic
<FromGitter> <absolutejam_gitlab> s/DEs/frameworks/
<FromGitter> <watzon> VS Code is basically a IDE
<FromGitter> <absolutejam_gitlab> VS Code is pretty amazeballs now
<FromGitter> <watzon> Sublime is a glorified text editor
<FromGitter> <absolutejam_gitlab> I'm hooked on Kakoune's modal editing style now, but VSCode is a beast
<FromGitter> <watzon> Electron has some inherent drawbacks, I'll give you that
<FromGitter> <watzon> Opening large files is still an issue
<FromGitter> <watzon> But you can't knock its performance
<FromGitter> <absolutejam_gitlab> definitely
<FromGitter> <tenebrousedge> I like Sublime
<FromGitter> <absolutejam_gitlab> It's not native, we all know that, but it's probably the best thing we'll get for a while
<FromGitter> <watzon> Yup. Definitely the easiest way to create a multi-platform application with a single code base
<FromGitter> <dscottboggs_gitlab> > Linux can't even decide on a package format ⏎ > nevermind common UI components ⏎ ⏎ This is the biggest issue. Windows UI components could have been the universal standard if they hadn't threatened projects like Mono and Wine [https://gitter.im/crystal-lang/crystal?at=5d3f5cf93e51d77b1b8f57d1]
<FromGitter> <watzon> We all know electron isn't perfect
<FromGitter> <absolutejam_gitlab> I'd settle for a web app most of the time
<FromGitter> <absolutejam_gitlab> least I know it'll work across all my mediums
<FromGitter> <watzon> But I hate it when people just jump on the "electron is shitty bloatware" band wagon
<FromGitter> <absolutejam_gitlab> it's a meme at this point
<FromGitter> <girng> no
<FromGitter> <girng> it's reality
<FromGitter> <Blacksmoke16> by bloatware im assuming you mean it uses a lot of ram?
<FromGitter> <dscottboggs_gitlab> Yeah, a web app with a lean server is better than electron IMO
<FromGitter> <absolutejam_gitlab> the last time I had CPU spikes with VSCode was when elixir language server went off the rails
<FromGitter> <watzon> Can be, but you have to jump through some hoops to make it usable offline
<FromGitter> <watzon> That's where electron is better. You don't have to be connected.
<FromGitter> <meltheadorable> sublime is terrible, electron is better than any alternatives to electron atm, it’d be great for that not to be the case
<FromGitter> <watzon> Yup
<FromGitter> <Blacksmoke16> @meltheadorable seems to hate everything i like :P
<FromGitter> <watzon> I mean, for what it can do vscode is much faster and uses less RAM than a full IDE like WebStorm
<FromGitter> <dscottboggs_gitlab> > but you have to jump through some hoops to make it usable offline ⏎ ⏎ You can cram all those hoops into a wrapper script launched from a desktop file
<FromGitter> <watzon> Electron may use a lot of RAM compared to native, but it could always be Java
<FromGitter> <Blacksmoke16> 32gb and dont worry about it :S
<FromGitter> <girng> or.. a developer could you know, create a native app and use 10% of the resources and be much more fluid and responsive
<FromGitter> <Blacksmoke16> :trollface:
<FromGitter> <meltheadorable> @girng you’re not really in a position to be criticizing anyone for their ux while writing a telnet chat app
<FromGitter> <absolutejam_gitlab> > or.. a developer could you know, create a native app and use 10% of the resources and be much more fluid and responsive
<FromGitter> <absolutejam_gitlab> But what's a 'native app'?
<FromGitter> <girng> @meltheadorable why you picking fights with me
<FromGitter> <meltheadorable> i prefer atom’s UI to VS Code’s but I use VS Code for a couple languages where it’s better
<FromGitter> <watzon> @girng come to me once you've built a performant app in C++ that's cross platform
<FromGitter> <absolutejam_gitlab> I want a qt app in a snap package ideally
<FromGitter> <watzon> I'll be waiting a few years
<FromGitter> <absolutejam_gitlab> but also available in homebrew and in Pacman
<FromGitter> <meltheadorable> i wanted to make a very simple single-screen cross-platform GUI app and annoyingly enough, shoes was the closest i got to a viable option
<FromGitter> <meltheadorable> electron was second-closest
<FromGitter> <absolutejam_gitlab> Honestly
<FromGitter> <absolutejam_gitlab> I just want a TUI lib for crystal
<FromGitter> <watzon> It is always going to be about cost benefit analysis. Electron apps take much less time to develop, are fast enough for most use cases, and are perfectly capable of reaching near-native performance with a little tweaking.
<FromGitter> <watzon> @absolutejam_gitlab agreed
<FromGitter> <absolutejam_gitlab> I still use weechat as my IRC client
<FromGitter> <meltheadorable> i tried doing it in javaFX but the IDE literally couldn’t build the sample it came with and i wasn’t about to spend a week troubleshooting
<FromGitter> <girng> @absolutejam_gitlab something that is not shipped with a full fledged web browser in, just to create a music playlist, or a "real-time markdown editor", or other silly things like that
<FromGitter> <watzon> Until there is a good UI framework for an easy to use compiled language like Crystal we are going to be stuck with electron, so you may as well jump off the hate train and get use to it
<FromGitter> <meltheadorable> a web browser is the most robust and flexible rendering engine in the world, there’s a good reason people keep reaching for the web instead of native toolkits
<FromGitter> <watzon> Yup
<FromGitter> <watzon> Also, electron isn't a full web browser
<FromGitter> <watzon> It uses the browser engine
<FromGitter> <watzon> There is a difference
<FromGitter> <girng> @watzon not a hate train, i use vscode. however, i don't like seeing small little programs with 1 functionality being shipped with a damn web browser. that's silly, and bloatware.
<FromGitter> <watzon> Sure, electron isn't perfect for all use cases
<FromGitter> <watzon> A small, simple application you could easily do using something else
<FromGitter> <watzon> But just saying that everything electron is bloatware is stupid
<FromGitter> <meltheadorable> markdown generates HTML — it’s probably the best use case for using a browser’s rendering engine
<FromGitter> <girng> it is though
<FromGitter> <girng> @watzon native apps perform much better
<FromGitter> <meltheadorable> since it’s also going to most closely map the eventual environment that the rendered HTML will end up in
<FromGitter> <tenebrousedge> performance isn't everything
<FromGitter> <girng> yes it is
<FromGitter> <meltheadorable> it really isn't
<FromGitter> <watzon> Just because they perform much better that doesn't make all electron apps bloatware
<FromGitter> <watzon> And performance isn't everything
<FromGitter> <watzon> It's important
<FromGitter> <girng> performance is vital if you are shipping apps in production, or just apps for users to use
<FromGitter> <watzon> But it's not everything, especially when it doesn't make a difference between two applications
<FromGitter> <girng> if you think not, i don't know what to tell you
<FromGitter> <watzon> Code is just as easy to use as sublime, more so actually because of a better UI
<FromGitter> <watzon> Even if sublime is technically more performant
<FromGitter> <absolutejam_gitlab> yeah, I have 2 machines
<FromGitter> <absolutejam_gitlab> 16gb RAM and 32GB RAM, both different gen i7s
<FromGitter> <absolutejam_gitlab> I've run a LOT of VScode and chrome tabs
<FromGitter> <absolutejam_gitlab> They may be bloated, but the functionality I get is worth it
<FromGitter> <absolutejam_gitlab> and I don't feel it
<FromGitter> <girng> yeah, but if you are now a developer, and wanting to ship that out to others. not everyone is gonna have 16gb or am or more
<FromGitter> <absolutejam_gitlab> Now, lower end machines might feel it more, but it's a trade-off between functionality and performance
<FromGitter> <watzon> That's the thing. Machines have enough memory nowadays that performance can be put on the back burner in a lot of cases
<FromGitter> <watzon> And I've used code just fine on a machine with 4GB of RAM
<FromGitter> <girng> that's why this is such an important issue
<FromGitter> <watzon> If you have less than that you may have an issue, but you're not going to be using an IDE either
<FromGitter> <absolutejam_gitlab> The worst electron app I've ever used for performance was Slack
<FromGitter> <absolutejam_gitlab> jesus, that was a hot mess
<FromGitter> <dscottboggs_gitlab> My laptop has 4GB of RAM and VSCode runs fine
<FromGitter> <dscottboggs_gitlab> Atom would be ok as long as I didn't open too many Firefox windows
<FromGitter> <watzon> @absolutejam_gitlab have you ever used the Spotify app?
<FromGitter> <absolutejam_gitlab> yeah haha
<FromGitter> <watzon> They use to have some major memory leaks
<FromGitter> <absolutejam_gitlab> I have to ctrl + mousewheel for my DPI
<FromGitter> <girng> hey scott, load up spotify, and some other apps
<FromGitter> <girng> lmk howit goes
<FromGitter> <absolutejam_gitlab> discord seems to tank my Macbook when gaming too
<FromGitter> <absolutejam_gitlab> weird
<FromGitter> <absolutejam_gitlab> Native would be great
<FromGitter> <absolutejam_gitlab> I'd love native
<FromGitter> <meltheadorable> how many high-performance, complex, cross-platform native apps have you shipped lately @girng ?
<FromGitter> <watzon> @girng your argument makes no sense. With a lower spec machine you're always going to have issues with several applications
<FromGitter> <absolutejam_gitlab> But again, OS, distribution/version, lib versions, graphical toolkits, packaging format
<FromGitter> <watzon> I guess everyone may as well go back to using VIM
<FromGitter> <absolutejam_gitlab> it's just such an overhead
<FromGitter> <dscottboggs_gitlab> Actually, that brings me to something I think is more important. It's not just electron. Electron is just one example of a general attitude of "just buy more RAM" and it's not just there that it applies. Even in the Crystal stdlib and the linux kernel, things that help users with low amounts of memory are consistently put on the back burner
<FromGitter> <absolutejam_gitlab> *Kakoune
<FromGitter> <girng> @watzon no, i'm saying about his ram. he's only got 4gb. try to load up spotify / discord, it will tank i bet.
<FromGitter> <tenebrousedge> the mostly-serious Rules of Program Optimization: ⏎ ⏎ 1) Don't do it ⏎ 2) (for experts only) Don't do it yet [https://gitter.im/crystal-lang/crystal?at=5d3f6103f0ff3e2bba8e5165]
<FromGitter> <girng> if those apps were written natively, he'd be fine
<FromGitter> <dscottboggs_gitlab> Although V8 (what electron runs on) is fast as shit for a dynamically typed language
<FromGitter> <watzon> @girng and that would also happen if he tried to open up Android Studio
<FromGitter> <dscottboggs_gitlab> Android studio does not run on that machine
<FromGitter> <absolutejam_gitlab> my issue with your comment is, 'write them natively' is such a naive, shallow statement
<FromGitter> <meltheadorable> isn’t the real Visual Studio a native app?
<FromGitter> <watzon> @absolutejam_gitlab yup
<FromGitter> <meltheadorable> and doesn’t it bring systems to their knees at a glance
<FromGitter> <absolutejam_gitlab> all software should be free
<FromGitter> <absolutejam_gitlab> but all devs should be paid
<FromGitter> <absolutejam_gitlab> and all platforms should be open
<FromGitter> <watzon> @meltheadorable pretty sure it's written in C#
<FromGitter> <watzon> so yes
<FromGitter> <meltheadorable> with native Win32 GUI
<FromGitter> <watzon> That's the thing. Even native apps can be bloatware.
<FromGitter> <dscottboggs_gitlab> The linux kernel has had a regression (bug) since 4.10-ish. If you're currently on any Kernel newer than 4.9 and you run out of RAM, your system will *grind* to a halt. Swap/page file simply does not work
<FromGitter> <absolutejam_gitlab> Office products are bloated AF
<FromGitter> <watzon> @dscottboggs_gitlab I've had that happen actually
<FromGitter> <dscottboggs_gitlab> My laptop is specially installed to have kernel 4.9 and my server has 24GB of RAM.
<FromGitter> <watzon> With Atom of all things
<FromGitter> <tenebrousedge> ....huh.
* FromGitter * tenebrousedge checks kernel version
<FromGitter> <kinxer> I've also had that happen with Atom.
<FromGitter> <dscottboggs_gitlab> yeah happened to me all the time on my laptop til I switched back to 4.9. Open VSCode, Signal, Gitter (all electron) and 3-5 firefox windows, and it would just be ded
<FromGitter> <meltheadorable> tbh i wish we would ditch linux and replace it with a microkernel already, the kernel architecture is hopeless & nobody actually wants to develop on that codebase, and it would improve options for running proprietary binary drivers when needed, especially if it kept stable interfaces, which would be easier if it wasn’t such a horrific beast
<FromGitter> <watzon> Atom is a perfect example of terrible performance with Electron. As is Slack and Spotify. But VsCode proves that you can have close to native performance.
<FromGitter> <Blacksmoke16> slack recently rewrote their desktop app
<FromGitter> <watzon> Flutter is also coming out with a desktop app target which should be even more performant
<FromGitter> <watzon> About fucking time haha
<FromGitter> <meltheadorable> all the stuff on top of linux is….okay-to-decent, linux itself is a hot mess and could do with dying
<FromGitter> <watzon> Rewrite it in Rust!
<FromGitter> <watzon> Lol
<FromGitter> <meltheadorable> i’m legit serious though — linux is not a good kernel
<FromGitter> <dscottboggs_gitlab> > Rewrite it in Rust! ⏎ ⏎ This but unironically
<FromGitter> <watzon> Someone is actually working on a Rust OS
<FromGitter> <girng> @meltheadorable i'm blocking you
<FromGitter> <absolutejam_gitlab> ...
<FromGitter> <watzon> But it will probably be a while before it's even close to done
<FromGitter> <watzon> And it's chance of taking even a small part of the market share is slim to none
<FromGitter> <Blacksmoke16> can you even block people on gitter?
<FromGitter> <girng> not sure
<FromGitter> <girng> gonna try
<FromGitter> <Blacksmoke16> :S
<FromGitter> <absolutejam_gitlab> But telling them is a good way to start
<FromGitter> <watzon> Lol
ht_ has quit [Remote host closed the connection]
<FromGitter> <tenebrousedge> I don't think it's a thing (https://gitlab.com/gitlab-org/gitter/webapp/issues/370)
<FromGitter> <tenebrousedge> I don't think it's a thing
<FromGitter> <dscottboggs_gitlab> @girng don't be melodramatic
<FromGitter> <dscottboggs_gitlab> hah. pun unintended
<FromGitter> <watzon> Hahaha
<FromGitter> <girng> i worked hard and had a great time with my little chat project in telnet. why you gotta put that down and make fun of me creating something in crystal
<FromGitter> <dscottboggs_gitlab> dude, you're the one coming in here bashing on technologies
<FromGitter> <girng> bashing electron is related to crystal?
<FromGitter> <watzon> While it, once again, could have been phrased nicer, all she's saying is that you can't really say anything about cross platform applications until you've built one
<FromGitter> <dscottboggs_gitlab> like, I'm not gonna fuck with you for using telnet but you were being a little antagonistic
<FromGitter> <girng> i am?
<FromGitter> <dscottboggs_gitlab> electron is related to telent in that they're both bad technologies that have some level of popularity.
<FromGitter> <girng> how am i antagonistic, when i get made fun for a projec ti'm creating that's done with crystal
<FromGitter> <dscottboggs_gitlab> we all rely on electron daily!
<FromGitter> <dscottboggs_gitlab> Like that's our tools you're bashing
<FromGitter> <dscottboggs_gitlab> idk
<FromGitter> <watzon> The fact is you do this constantly. There are several developers here with years of experience telling you that something is a certain way, but you don't listen
<FromGitter> <girng> and you think are god
<FromGitter> <meltheadorable> You’re being *constantly* antagonistic, I was just pointing out you really aren’t in a place to talk, you aren’t bringing the experience to be bashing on stuff this hard.
<FromGitter> <girng> 100% right, all the time
<FromGitter> <girng> it's pretty sad
<FromGitter> <watzon> You don't?
<FromGitter> <girng> the elitism is in full efffect
<FromGitter> <girng> and you don't realize it.
<FromGitter> <girng> i'm being antagonistic because i said electron is bloatware?
<FromGitter> <watzon> There are several people here telling you something and you have to insist that you're right. You don't see anything wrong with that?
<FromGitter> <dscottboggs_gitlab> yup
<FromGitter> <dscottboggs_gitlab> like that's some obvious troll material dude
<FromGitter> <girng> but you are not being antogonistic for makming fun of my project that i've been working on in crystal?
<FromGitter> <girng> seems about right.
<FromGitter> <watzon> I never made fun of anything
<FromGitter> <girng> Whatever makes you feel better
<FromGitter> <watzon> We've been trying to explain pretty simple concepts to you
<FromGitter> <watzon> But you have to insist that your way is right
<FromGitter> <girng> i'm not talking about that right now, i'm talking about making fun of my project
<FromGitter> <girng> it's annoying
<FromGitter> <tenebrousedge> the only thing that I've seen is people pointing out that telnet is insecure
<FromGitter> <watzon> Even with a very experienced dev
<FromGitter> <dscottboggs_gitlab> I'm just saying mel only did that because you were already being antagonistic
<FromGitter> <watzon> Like straight-shoota
<FromGitter> <girng> no. melody made a nasty comment above putting me down
<FromGitter> <girng> about telnet usage or w/e with my project
<FromGitter> <meltheadorable> Keep having fun with your chat server, but I’m saying that you don’t get to say all electron software has bad UX if the only app you’re shipping runs on telnet
<FromGitter> <girng> @watzon It is, that's not the definition of abstract
<FromGitter> <girng> more of requirements / outline is a better word
<FromGitter> <dscottboggs_gitlab> oh boy here we go again
<FromGitter> <watzon> @girng look at his comment
<FromGitter> <watzon> He just posted
<FromGitter> <girng> @watzon look at my comment for once in your life
<FromGitter> <girng> instead of thinking you are god
<FromGitter> <watzon> There is more than one definition of abstract
<FromGitter> <tenebrousedge> the terminology is decades old
<FromGitter> <watzon> > Expressing a particular property of an object viewed apart from the other properties which constitute it; – opposed to concrete.
<FromGitter> <dscottboggs_gitlab> also like in that example, you're being rude to him @girng whereas he was just pointing out the existing rationale
<FromGitter> <watzon> Yup
<FromGitter> <watzon> Pretty consistent thing
<FromGitter> <girng> so i think a word is a misnomer is "Rude"?
<FromGitter> <girng> ..okay got it
<FromGitter> <watzon> People have been trying to explain simple concepts, and have been nice about it, but rather than trying to learn you insist that you know best
<FromGitter> <dscottboggs_gitlab> no, you saying "and the fact that you don't see that is sad" is condescending and rude
<FromGitter> <girng> i'd rather talk to oprypin than you guys, lol
<FromGitter> <girng> good lord
<FromGitter> <girng> it's not condescending wtf
<FromGitter> <meltheadorable> I don’t think anyone here thinks they’re a god, but you routinely yell at people who are trying to help you understand things that you are demonstrating very clearly you do not understand
<FromGitter> <tenebrousedge> if everyone else around you is always acting like a jerk, you're the jerk
<FromGitter> <girng> lol i'm yelling?
<FromGitter> <girng> again another false accusation
<FromGitter> <meltheadorable> literally all you do is argue with and insult people who are trying to help you learn things
<FromGitter> <watzon> ^
<FromGitter> <girng> you guys just like to jump on me and put me down
<FromGitter> <dscottboggs_gitlab> I don't actually
<FromGitter> <watzon> No, we try and help
<FromGitter> <girng> if that makes you feel good, continue to do it
<FromGitter> <dscottboggs_gitlab> I really hate it
<FromGitter> <watzon> If you take it that way then that's on you
<FromGitter> <girng> no
<FromGitter> <girng> not lately
<FromGitter> <girng> how would you like it, if i were to start talking down about one of your projects on github?
<FromGitter> <girng> think that'd be okay?
<FromGitter> <tenebrousedge> I'd hope it was informed and constructive
<FromGitter> <dscottboggs_gitlab> I don't think I'd like it very much
<FromGitter> <girng> exactly, put yourself in my shoes
<FromGitter> <dscottboggs_gitlab> well, "talking down" assumes it wouldn't be @tenebrousedge
<FromGitter> <girng> i get shunned for this chat thing i'm working on, for no reason
<FromGitter> <tenebrousedge> this isn't about your chat project
<FromGitter> <girng> yes it is
<FromGitter> <girng> that's what started this conversation
<FromGitter> <tenebrousedge> we're talking about your attitude, not your project
<FromGitter> <girng> i'm sick of it
<FromGitter> <girng> my attitude?
<FromGitter> <girng> i was told by melody to "fuck off" yesterday
<FromGitter> <dscottboggs_gitlab> But I also respect people who have more experience than me, listen to their opinions, and don't go around being antagonistic without cause
<FromGitter> <girng> and you want to tell me about my attitude??
<FromGitter> <girng> are you kidding me
<FromGitter> <watzon> The fact of the matter is, we all have more than a few years of experience with development. Most of us in multiple languages. I myself started with C++, then PHP, Python, Ruby, Javascript, Crystal, ad infinum. There are many concepts with which you may not be familiar. We have been trying to explain some of them to you, but rather than trying to learn you just say "well I don't see why I'd ever want to do
<FromGitter> ... that; my way is better"
<FromGitter> <watzon> That is arrogant
<FromGitter> <meltheadorable> You were being a dick for like, hours, before I said fuck off.
<FromGitter> <watzon> And tends to rub people the wrong way
<FromGitter> <girng> your years of experience doesn't mean you are right though, that's the thing. you think because you are a seasoned veteran your right and the other person is wrong. that's not how it works
<FromGitter> <girng> and you know this...
<FromGitter> <tenebrousedge> you have the attitude that you are never wrong
<FromGitter> <watzon> @girng and you think because you're newer you know everything already
<FromGitter> <girng> i'm wrong a lot
<FromGitter> <meltheadorable> the truest thing you’ve said
<FromGitter> <watzon> No one here assumes they know everything
<FromGitter> <girng> it comes off you do
<FromGitter> <watzon> We are all still learning
<FromGitter> <watzon> And will be until we die
<FromGitter> <watzon> But we still do know more than you, like it or not
<FromGitter> <girng> continue to code shame
<FromGitter> <girng> continue to project shame
<FromGitter> <girng> if that's what you want to do melody, go ahead
<FromGitter> <watzon> If you don't want help from "seasoned veterans" don't ask
<FromGitter> <tenebrousedge> we haven't seen the code for your project; we're not talking about it
<FromGitter> <meltheadorable> If you are going to criticize other people, you should at least speak from a position of experience, it’d be easier to take it seriously when you were bashing things left and right if you demonstrated you knew what you were talking about
<FromGitter> <watzon> The crystal community as a whole is very helpful. You have to be coming off as a real asshole to make everyone pissed at you.
<FromGitter> <dscottboggs_gitlab> Like, writing native apps is *really fucking hard*, linux UI toolkits are fractured and poorly documented, and electron is easy. It's not surprising people make the judgement call to use it (at least short-term) even if they think it's a bad technology. But you come in here without having written a simple notepad or calculator and act like everyone's stupid for using electron.
<FromGitter> <watzon> Except some people, like opry. He's pretty easy to make mad.
<FromGitter> <meltheadorable> and native UI toolkits are also pretty broken, or limit you to a small subset of languages that may or may not work on other platforms, so then you need to find ways to make them interior with the rest of the stuff you’re doing
<FromGitter> <girng> @meltheadorable speaking from experience doesn't mean you are right, showing evidence and creating arguments does
<FromGitter> <watzon> @girng I feel like we've created some pretty good arguments and time and time again have shown evidence in support. Rarely do you do so.
<FromGitter> <dscottboggs_gitlab> > you should at least speak from a position of experience ⏎ ⏎ I wouldn't even go that far -- even just a postition of humility and "I might be wrong about this but it seems from over here that that might be a bad idea, why did you choose that?" like a bit of tact goes a long way haha
<FromGitter> <meltheadorable> You can’t make arguments or have evidence if you have no experience with what you’re talking about
<FromGitter> <girng> you don't listen to my arguments that's the problem
<FromGitter> <watzon> For instance, the multiple definitions of abstract
<FromGitter> <meltheadorable> We’re listening you’re just wrong, dude
<FromGitter> <girng> you are on a pedestal it feels like.
<FromGitter> <watzon> Just because we don't agree doesn't mean we aren't listening
<FromGitter> <girng> wat
<FromGitter> <meltheadorable> It’s not that we don’t understand you it’s that you’re demonstrably incorrect
<FromGitter> <watzon> This ^
<FromGitter> <girng> @meltheadorable i'm not incorrect in saying electron is bloatware
<FromGitter> <dscottboggs_gitlab> well, not about electron
<FromGitter> <girng> go look at articles
allan has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> in that case you're not wrong, you're just an asshole haha
<FromGitter> <watzon> No you aren't
<FromGitter> <girng> exactly so please stop saying i'm incorrect all the time
<FromGitter> <watzon> You can build bloatware with anything
<FromGitter> <meltheadorable> Like when you insisted you were using the ternary operator correctly for literally 45 minutes after being told you had the syntax backwards
<FromGitter> <dscottboggs_gitlab> also bloatware is extreme
<FromGitter> <watzon> Electron itself, while not the most performant, isn't bloatware in and of itself
<FromGitter> <girng> i nver said it ws bloatware in an of itself
<FromGitter> <girng> where?
<FromGitter> <watzon> You have said several times "electron is bloatware"
<FromGitter> <watzon> > @meltheadorable i'm not incorrect in saying electron is bloatware
<FromGitter> <watzon> Literally right there
<FromGitter> <girng> in the context of blacksmoke's markdown Typora thing
<FromGitter> <watzon> And like she said, electron is a perfect solution for markdown apps
<FromGitter> <watzon> You need a browser engine to render the HTML anyway
<FromGitter> <girng> using an entire web browser for a real-time markdown editor
<FromGitter> <dscottboggs_gitlab> yup
<FromGitter> <dscottboggs_gitlab> that's what you gotta do
<FromGitter> <girng> is the about the most ridiculous thing i've seen
<FromGitter> <watzon> It's not an entire browser
<FromGitter> <watzon> It's a browser engine
<FromGitter> <meltheadorable> markdown apps have to render HTML, you need a rendering engine for that
<FromGitter> <tenebrousedge> just the rendering engine
<FromGitter> <kinxer> @girng If you're saying something that's in a context like that, you may know that you mean that context, but there's no reason to assume that we know that context.
<FromGitter> <meltheadorable> writing your own would be way worse than electron
<FromGitter> <dscottboggs_gitlab> ok, so hold on before anyone else says anything
<FromGitter> <girng> there are other html rendering engines out there
<FromGitter> <dscottboggs_gitlab> you've got 5 people here saying "You need a browser rendering engine to render HTML, and electron is a performant HTML rendering engine"
<FromGitter> <dscottboggs_gitlab> Will @girng believe everyone?
<FromGitter> <watzon> 🤦‍♂️
<FromGitter> <meltheadorable> but most markdown is destined to eventually be served from a browser — a real time markdown editor should provide the closest thing for the environment it will be deployed in
<FromGitter> <watzon> Exactly
<FromGitter> <watzon> You need support for HTML and CSS
<FromGitter> <girng> yes, of course
<FromGitter> <meltheadorable> a browser rendering engine is literally the perfect candidate for writing a markdown editor
<FromGitter> <watzon> That's what a browser engine does
<FromGitter> <girng> but having it shipped as an app is silly. could be done as just on a website then.
<FromGitter> <dscottboggs_gitlab> what if you're offline?
<FromGitter> <watzon> You're not going to roll your own engine for just HTML and CSS for stupid markdown app
<FromGitter> <meltheadorable> an app works offline and has access to your local filesystem
<FromGitter> <girng> why have the user run another instance of chromium, instead of opening a new tab
<FromGitter> <watzon> That's so stupid
<FromGitter> <girng> okay
<FromGitter> <girng> see
<FromGitter> <dscottboggs_gitlab> > why have the user run another instance of chromium, instead of opening a new tab ⏎ ⏎ I've been saying this for ages TBH
<FromGitter> <dscottboggs_gitlab> but like, I don't say "electron is bloatware"
<FromGitter> <watzon> You can just as easily do a lot of things in browser
<FromGitter> <dscottboggs_gitlab> because that would be wrong
<FromGitter> <absolutejam_gitlab> You're definitely not listening to well worded, solid arguments @girng
<FromGitter> <girng> i can say whatever i want dude
<FromGitter> <girng> holy shit
<FromGitter> <girng> are you like my dad
<FromGitter> <dscottboggs_gitlab> 😆
<FromGitter> <watzon> But you don't have access to system functions
<FromGitter> <tenebrousedge> no we're you're teachers
<FromGitter> <absolutejam_gitlab> Disagreeing is fine
<FromGitter> <tenebrousedge> and we are also ourselves students
<FromGitter> <watzon> Like I said
<FromGitter> <watzon> We're all still learning
<FromGitter> <meltheadorable> from now on i will only answer to “Professor Melody”
<FromGitter> <absolutejam_gitlab> More so if you have solid points and the right attitude
<FromGitter> <watzon> A lot of us just have a major head start
<FromGitter> <girng> you don't need system functions to do markdown/html rendering. can be done in just another tab or web browser context. go look at Typora, a 55MB installer
<FromGitter> <girng> it's sad apps are like that nowadays.
<FromGitter> <watzon> Omfg
<FromGitter> <meltheadorable> 55mb is nothing at all
<FromGitter> <absolutejam_gitlab> 55mb?
<FromGitter> <watzon> I just can't with this anymore
<FromGitter> <watzon> It's like talking to a wall
<FromGitter> <absolutejam_gitlab> I can't take photos for that any more
<FromGitter> <girng> for the functionality of what it does
<FromGitter> <watzon> A wall that argues about everything
<FromGitter> <dscottboggs_gitlab> @watzon I'm saying an app should be packaged to be a standalone server that also spawns a `chromium --app=localhost:1234` so that it doesn't spawn a separate chromium process and whatnot
<FromGitter> <girng> yes 55MB is a lot.
<FromGitter> <absolutejam_gitlab> Don't use it then
<FromGitter> <girng> is 55MB objectively a lot, not really
<FromGitter> <meltheadorable> 55mb isn’t even a lot on a raspberry pi
<FromGitter> <girng> i won't
<FromGitter> <watzon> @dscottboggs_gitlab that would be nice
<FromGitter> <dscottboggs_gitlab> I've packaged up some apps like that with a simple bash script and desktop file and it works just as well as native apps
<FromGitter> <dscottboggs_gitlab> netflix and whatnot
<FromGitter> <kinxer> @girng Why are you using Crystal and not assembly language?
<FromGitter> <watzon> Lol there's a point
<FromGitter> <girng> i'm not even going to answer anything cause anything i say it's wrong
<FromGitter> <kinxer> This is meant to be instructive, not argumentative.
<FromGitter> <absolutejam_gitlab> Yeah I like the chrome app mode for that
<FromGitter> <absolutejam_gitlab> You're not wrong, you're just being rude
<FromGitter> <watzon> Well...
<FromGitter> <meltheadorable> electron does more than a browser tab does, there’s a lot of security issues it mitigates and a lot of additional APIs and packaging tools it offers
<FromGitter> <watzon> In a lot of cases, wrong and rude
<FromGitter> <tenebrousedge> well, assuming that you're wrong is always a good start to learning something
<FromGitter> <absolutejam_gitlab> Opinions are fine. Think about how you're saying them
<FromGitter> <girng> Look here: https://www.youtube.com/watch?v=QriZJ-X3wbU
<FromGitter> <girng> How I feel
<FromGitter> <absolutejam_gitlab> And yeah, nothing wrong with being wrong
<FromGitter> <absolutejam_gitlab> Is that wrong?
<FromGitter> <meltheadorable> and it also improves the stability situation quite a bit, no risk of browser updates breaking your apps outside of your release cycle
<FromGitter> <watzon> No one here is doing that @girng
<FromGitter> <watzon> We've been trying to be instructive
<FromGitter> <watzon> You are being arrogant
<FromGitter> <girng> Okay
<FromGitter> <girng> I'm being arrogant
<FromGitter> <dscottboggs_gitlab> I think some people got upset and went beyond instructive
<FromGitter> <watzon> Yes
<FromGitter> <dscottboggs_gitlab> but like I get why haha
<FromGitter> <watzon> Also yes
<FromGitter> <watzon> Lol
<FromGitter> <meltheadorable> linking to global dynamic libraries is broken, and that’s one of the reasons people like electron over other cross-platform toolkits — don’t need to mess with it 😂
<FromGitter> <girng> I'm arrogant, my code is garbage. I know nothing about programming, I should nuke all my files and go back to nodejs where I belong
<FromGitter> <watzon> A normal person can only take so much arrogance before they snap a little
<FromGitter> <watzon> No one said that @girng
<FromGitter> <absolutejam_gitlab> Nobody said that, you're being hyperbolic
<FromGitter> <watzon> We've been trying to help, whether you see it or not
<FromGitter> <absolutejam_gitlab> And a victim
<FromGitter> <girng> No
<FromGitter> <absolutejam_gitlab> Also nodejs is a good start for writing electron apps
<FromGitter> <dscottboggs_gitlab> hahahaha
<FromGitter> <girng> melody made fun my chat project, watzon says i'm arrogant. I'm definitely not playing a victim.
<FromGitter> <tenebrousedge> I'm frequently arrogant, my code is often garbage. I know very little about programming. Therefore I ask questions and listen to others' opinions
<FromGitter> <meltheadorable> It’s unfortunate that your response to “please stop yelling at people who are trying to teach you things” is to have a complete meltdown
<FromGitter> <watzon> As experienced developers it is our responsibility to make sure that you know what best practices are
<FromGitter> <watzon> We are trying to help, and you consistently spit in our faces
<FromGitter> <girng> I know what some of them are already, and creating 1 functionality in 1 single program.. and shipping it with a web browser/chromium is not one of them
<FromGitter> <watzon> ...
<FromGitter> <watzon> I'm out. I can't with this anymore.
<FromGitter> <girng> Again, you don't listen to me
<FromGitter> <meltheadorable> fine i take it back, there are no UX issues at all with a telnet-based chat app
<FromGitter> <girng> You just think you are right and I'm wrong
<FromGitter> <girng> Regardless of what i say
<FromGitter> <watzon> I am one of the most patient people I know, but I can only take so much
<FromGitter> <girng> imagine me
<FromGitter> <watzon> No
<FromGitter> <girng> taking so much from everyone
<FromGitter> <girng> all the time
<FromGitter> <watzon> You refuse to listen
<FromGitter> <girng> I listen a lot you know that
<FromGitter> <watzon> We listen to your opinion
<FromGitter> <meltheadorable> If you stopped attacking people for trying to teach you things you might learn faster
<FromGitter> <watzon> But we don't always agree
<FromGitter> <girng> hahah, you are the one who is attacking me
<FromGitter> <girng> making fun of my chat thing
<FromGitter> <absolutejam_gitlab> Saying you listen and listening are different things
<FromGitter> <watzon> Drop it dude. No one is making fun. She was saying you don't have a leg to stand on when it comes to critiquing UI apps.
<FromGitter> <absolutejam_gitlab> Is there an motd in gitter?
<FromGitter> <watzon> It wasn't nice, but you're over blowing it
<FromGitter> <girng> i do have a leg to stand on
<FromGitter> <kinxer> @girng Alright, then I'll follow my own line of logic here. We use Crystal because it would be wildly difficult to write apps to do the complex things we want to do (complex from the computer's point of view) with assembly. We don't use C for the same reason. In theory, if we spent a decade on our fully-assembly IDE working 60 hours a week (making no mistakes), we'd create something incredibly performant.
<FromGitter> ... However, the development time cost is too much to pay (especially if anyone ever asks for new features), and almost every user simply won't notice the difference between an incredibly small app and one that's simply *sufficiently* small. Using technologies like Electron is a similar situation: other people have already gone to a ... [https://gitter.im/crystal-lang/crystal?at=5d3f6b07a9200c24281e854a]
<FromGitter> <girng> and my arguments are pretty sound believe it or not, you just don't agree with them
<FromGitter> <absolutejam_gitlab> And that's fine
<FromGitter> <watzon> They typically aren't. Like with the `abstract` concept. Just because you don't get it you don't think it's necessary.
<FromGitter> <absolutejam_gitlab> But shouting and stamping your feet when we disagree isn't the right way to carry on man
<FromGitter> <watzon> And I agree 100% with what @kinxer just said
<FromGitter> <absolutejam_gitlab> Aye
<FromGitter> <watzon> It's all about cost in the end
<FromGitter> <meltheadorable> Your arguments are not actually sound, but you would need to have like, some experience or to actually listen to people to understand why. You don’t listen, you fight everyone over everything, and now you’re throwing a complete tantrum
<FromGitter> <girng> @watzon Again, you told me about abstract and I listened and I understand it now. However, the more I understand it, the more it strengthens my arguments on why it's not really necessary. And that's okay
<FromGitter> <girng> so for you tso say I don't listen is not true, because I listened wholeheartedly when you told me about `abstract`.
<FromGitter> <kinxer> I understand that it's frustrating that the technologies we have aren't as performant as we'd like. If you want something better, write it. I mean that sincerely. You'll learn a lot and, if you succeed, everyone will be better for it. But these are the tools we have right now.
<FromGitter> <watzon> Your arguments are pretty weak. They pretty much boil down to "I can do this another way".
<FromGitter> <absolutejam_gitlab> You can't really disagree with a language construct though
<FromGitter> <watzon> Even though that other way isn't taking full advantage of the compiler
<FromGitter> <girng> @watzon "my arguments are weak", okay
<FromGitter> <watzon> Or taking other devs into consideration
<FromGitter> <girng> good to know, thanks
<FromGitter> <absolutejam_gitlab> It's like saying 'I disagree with strings'
<FromGitter> <meltheadorable> You can do everything you can do with strings with byte arrays, I don’t see the point in having strings
<FromGitter> <watzon> Also, the sarcasm just makes you sound petty
<FromGitter> <girng> okay
<FromGitter> <girng> I'm petty, arrogant
<FromGitter> <girng> got any more?
<FromGitter> <girng> Let me make a list
<FromGitter> <watzon> You probably should
<FromGitter> <girng> Okay, shoot some over here. I got 2 already
<FromGitter> <watzon> Things to work on: ⏎ ⏎ 1) ...
<FromGitter> <kinxer> @watzon You are being actively unhelpful right now.
<FromGitter> <girng> Any more?
<FromGitter> <absolutejam_gitlab> Yeha let's cut this
<FromGitter> <meltheadorable> Make a better cross-platform GUI toolkit than electron & we’ll all shut up
<FromGitter> <absolutejam_gitlab> There's to and fro in a debate - within reason
<FromGitter> <absolutejam_gitlab> J
<FromGitter> <absolutejam_gitlab> At this point, just ignore each other
<FromGitter> <absolutejam_gitlab> What if this is the origin story for crystals native desktop framework?
<FromGitter> <absolutejam_gitlab> We're making history
<FromGitter> <tenebrousedge> it probably should be :/
<FromGitter> <kinxer> Could we actually do that, though? A Crystal desktop framework would be really nice.
<FromGitter> <absolutejam_gitlab> Better things have been made on drunken bets and arguments
<FromGitter> <tenebrousedge> what were people thinking was going to be hard about implementing shoes?
<FromGitter> <kinxer> Feet aren't a convenient shape to cover.
<FromGitter> <watzon> It's mainly just the amount of time it would take
<FromGitter> <absolutejam_gitlab> Do you think there was always a left and a right shoe?
<FromGitter> <watzon> We need bindings to a good UI library
<FromGitter> <girng> a good head start would be with https://github.com/ysbaddaden/sdl.cr maybe?
<FromGitter> <watzon> Or someone needs to write everything completely in Crystal
<FromGitter> <absolutejam_gitlab> Shoes.cr
<FromGitter> <meltheadorable> @tenebrousedge so shoes isn’t actually ruby, it’s C that emulates ruby, or more recently, JRuby that wraps swing
<FromGitter> <kinxer> Oh, sorry.
<FromGitter> <absolutejam_gitlab> We're not talking about footwear?
<FromGitter> <dscottboggs_gitlab> what the hell?
<FromGitter> <kinxer> I thought we were talking about actual shoes.
<FromGitter> <meltheadorable> so one of the reasons it’s hard to do shoes is that shoes is not ruby
<FromGitter> <absolutejam_gitlab> I'm not from ruby haha
<FromGitter> <watzon> People could contribute to this https://github.com/sombrastudios/Glass
<FromGitter> <meltheadorable> shoes is a ruby framework for GUI apps, it’s a really cute little rubyesque DSL
<FromGitter> <dscottboggs_gitlab> > C that emulates...JRuby that wraps swing ⏎ ⏎ what the hell
<FromGitter> <absolutejam_gitlab> it's the strangest thing when you don't know ruby libs and people talk about shoes, factory girl and i'm fairly sure gopher(?) or something
<FromGitter> <kinxer> Yeah, Factory Girl threw me off the other day, esp since they've since changed the name.
<FromGitter> <meltheadorable> gopher isn’t ruby gopher is a pre-HTTP web protocol
<FromGitter> <watzon> How about Python's beautifulsoup?
<FromGitter> <watzon> Lol
<FromGitter> <absolutejam_gitlab> yeah, fair enough
<FromGitter> <dscottboggs_gitlab> https://github.com/hedron-crystal/hedron
<FromGitter> <absolutejam_gitlab> Maybe it wasn't gopher
<FromGitter> <dscottboggs_gitlab> LibUI could be further along though...
<FromGitter> <meltheadorable> glass is wrapping CrSFML, i’m not sure that’s a fruitful route to go down
<FromGitter> <watzon> @dscottboggs_gitlab oooh
<FromGitter> <meltheadorable> hedron is wrapping LibUI
<FromGitter> <meltheadorable> iirc
<FromGitter> <dscottboggs_gitlab> yup
<FromGitter> <meltheadorable> and libUI is mostly abandoned
<FromGitter> <watzon> Yup
<FromGitter> <tenebrousedge> well, does someone want to start a Trello? list available options?
<FromGitter> <absolutejam_gitlab> why don't people add screenshots?!
<FromGitter> <watzon> Someone could drop some dough on areweguiyet.cr
<FromGitter> <watzon> Lol
<FromGitter> <dscottboggs_gitlab> who?
<FromGitter> <watzon> I would if I had the money for it
<FromGitter> <watzon> wish .cr domains weren't so damn expensive
<FromGitter> <watzon> Damn Costa Rica
<FromGitter> <tenebrousedge> ❤️ Costa Rica tho .-.
<FromGitter> <dscottboggs_gitlab> oof
<FromGitter> <watzon> It is a beautiful country
<FromGitter> <meltheadorable> i am really unclear on how somebody would wrap native cocoa in something crystal could access
<FromGitter> <dscottboggs_gitlab> write C functions that Crystal calls
<FromGitter> <dscottboggs_gitlab> the C functions wrap the Coaca objc(?)
<FromGitter> <watzon> Cocoa is just for Apple isn't it?
<FromGitter> <dscottboggs_gitlab> yeah it only works on Quartz
<FromGitter> <watzon> 👎
<FromGitter> <dscottboggs_gitlab> that was kinda the whole point of libui
<FromGitter> <absolutejam_gitlab> n a t i v e
<FromGitter> <meltheadorable> yeah, libUI is trying to give native
<FromGitter> <dscottboggs_gitlab> wrap Coaca, windows UI elements, or GTK up in portable C functions
<FromGitter> <meltheadorable> but i’m unclear how C deals with interop with Obj-C
<FromGitter> <meltheadorable> i know Obj-C has a runtime
<FromGitter> <dscottboggs_gitlab> If I'm not mistaken ObjC is a superset of C like C++ is
<FromGitter> <meltheadorable> yeah but it’s a little more than that unless im mistaken
<FromGitter> <watzon> Well LibUI was last updated 4 months ago
<FromGitter> <meltheadorable> i’ve not really seen bindings
<FromGitter> <watzon> So it can't be too dead
<FromGitter> <dscottboggs_gitlab> I mean when you dig down to it Crystal isn't any more than that so why would ObjC be?
<FromGitter> <meltheadorable> it’s pre-alpha and not documented
<FromGitter> <watzon> Ahh yeah that would be a problem
<FromGitter> <dscottboggs_gitlab> meh, the source is pretty clear
<FromGitter> <meltheadorable> maybe for now
<FromGitter> <dscottboggs_gitlab> Fair
<FromGitter> <meltheadorable> i do think it’s neat to see somebody picking up where wxwidgets left off but trying to be more modern about it
<FromGitter> <meltheadorable> but i am just not sure it’s a foundation to build on yet
<FromGitter> <dscottboggs_gitlab> i agree
<FromGitter> <dscottboggs_gitlab> What about QtWidgets?
<FromGitter> <meltheadorable> Qt is C++ which complicates things, Qt5.cr never quite worked and has been abandoned, it used a bindings generator which has also been abandoned
<FromGitter> <dscottboggs_gitlab> or perhaps a new project based on libgen (rather than bindgen) to bind to QML
<FromGitter> <meltheadorable> i can’t get libgen working for SDL which I was hoping would be pretty simple
<FromGitter> <dscottboggs_gitlab> > has been abandoned, ⏎ ⏎ I mean I'm not actively doing anything with it but I've been keeping it in a compilable state for the past 6 months or so
<FromGitter> <dscottboggs_gitlab> but yeah bindgen is a total behemoth
<FromGitter> <meltheadorable> does the original repo have a new maintainer or are you maintaining a fork?
<FromGitter> <dscottboggs_gitlab> pertty sure my last changes were accepted upstream but let me go look
<FromGitter> <dscottboggs_gitlab> yeah, they haven't https://github.com/dscottboggs/qt5.cr
<FromGitter> <meltheadorable> Binding this is pretty doable, bordering on the trivial, but most of your code wouldn’t be crystal https://github.com/zserge/webview
<FromGitter> <meltheadorable> so it’s not ideal
<FromGitter> <dscottboggs_gitlab> ah shit there's a new issue. I'll have to take a look at https://github.com/Papierkorb/qt5.cr/issues/22 this tomorrow
<FromGitter> <watzon> Yeah I've looked into binding webview
<FromGitter> <dscottboggs_gitlab> that could be really doable
<FromGitter> <meltheadorable> @watzon i bound the outermost function a couple weekends ago, it was basically trivial and binding the rest wouldn’t be too bad
<FromGitter> <meltheadorable> but it’s also mostly abandoned — it’s a small library so a lot easier for somebody to pick up maintainership, but its not the kind of durable solution i’m hoping for long term
<FromGitter> <watzon> Yeah it would be pretty easy. Then it would just be about building a framework around it
<FromGitter> <watzon> one of the reasons I want to get the HTML renderer in Lucky separated from the rest of the framework
<FromGitter> <meltheadorable> but like this was done from crystal https://i.imgur.com/bl4BrYK.png
<FromGitter> <dscottboggs_gitlab> cool!
<FromGitter> <meltheadorable> literally the most basic possible proof of concept but it wouldn’t take much
<FromGitter> <dscottboggs_gitlab> We could also just bind straight to GTK's webview instead of binding to some third party.
<FromGitter> <dscottboggs_gitlab> or qts
<FromGitter> <meltheadorable> wouldn’t that also require binding a bunch of GTK/Qt to get all the types you need to handle the interop that allows your javascript to hook back into your native code?
<FromGitter> <meltheadorable> thats the benefit of having something that standardizes and abstracts that for you
<FromGitter> <dscottboggs_gitlab> hm, yeah, hooking into native stuff in JS would be a challenge
<FromGitter> <meltheadorable> the webview library supposedly enables some kind of communication pathway there
<FromGitter> <watzon> That's where webview is really nice
<FromGitter> <meltheadorable> but i didn’t bind enough of it to test that part
<FromGitter> <dscottboggs_gitlab> but you could run a server in parallel and have a JS library that hooks into crystal code via HTTP or unix socket to enable communication with the underlying OS
<FromGitter> <watzon> You could build an electron type framework in Crystal
<FromGitter> <dscottboggs_gitlab> i thought that was what we were talking about?
<FromGitter> <dscottboggs_gitlab> 😆
<FromGitter> <meltheadorable> yeah, you could, but then it’s unclear what you’re getting over running that web server on the internet and wrapping it in electron instead
<FromGitter> <dscottboggs_gitlab> local
<FromGitter> <meltheadorable> i know but local webservers are a major security risk because of DNS hacks
<FromGitter> <dscottboggs_gitlab> hm
<FromGitter> <dscottboggs_gitlab> what about HTTPS with a hardcoded cert?
<FromGitter> <dscottboggs_gitlab> Also there's unix sockets
<FromGitter> <dscottboggs_gitlab> Idk I keep coming back to this concept of an "app" that launches your default browser with no decorations alongside a server that allows hooks into the system and a JS library that evolves over time to wrap the API between the host and the browser window
<FromGitter> <dscottboggs_gitlab> which is basically electron
<FromGitter> <absolutejam_gitlab> pish, bloatware
<FromGitter> <absolutejam_gitlab> https://github.com/Ghrind/hydra or something plz
<FromGitter> <absolutejam_gitlab> I feel like the Phoenix LiveView concept might be a nice way to go
<FromGitter> <absolutejam_gitlab> think there's a Python project called Anvil that's trying to do similar
<FromGitter> <absolutejam_gitlab> basically, websocket to backend and a translation layer that sends diffs
<FromGitter> <absolutejam_gitlab> and a thin js layer that receives
<FromGitter> <absolutejam_gitlab> Elixir has the whole actor model which I feel is nice for these things, but it's something fibers could do
<FromGitter> <absolutejam_gitlab> i think
<FromGitter> <Blacksmoke16> whoa what did i miss
<FromGitter> <tenebrousedge> so options are what? ⏎ ⏎ 1) webview ⏎ 2) Qt ⏎ 3) GTK [https://gitter.im/crystal-lang/crystal?at=5d3f75237e00fc4ace7148ff]
<FromGitter> <dscottboggs_gitlab> Not on the topic of Desktop stuff.... I had an idea not long ago. Python has a C interface, and so does Crystal. One could create a shard which acts as a bridge between python and crystal, where crystal data is converted to `PyObject`s and passed to python functions, then interpreted back into Crystal on return. Like ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Which would open up Crystal to a
<FromGitter> ... wealth of Python libraries for ML and data handling that are already thorougly optimized and tested, like SciPy and NumPy. The same is hypothetically possible for Ruby, as it allows C extensions too. [https://gitter.im/crystal-lang/crystal?at=5d3f75aea9200c24281ed151]
<FromGitter> <dscottboggs_gitlab> > whoa what did i miss ⏎ ⏎ @girng had a meltdown and inspired us to try to use Crystal to figure out the problem of Desktop Apps On Linux
<FromGitter> <Blacksmoke16> fair enough
<FromGitter> <Blacksmoke16> and hows that going?
<FromGitter> <dscottboggs_gitlab> ....meh?
<FromGitter> <meltheadorable> personally i think GTK is the most promising existing toolkit long term
<FromGitter> <meltheadorable> but binding it will be a chore
<FromGitter> <dscottboggs_gitlab> so options are what? ⏎ ⏎ 1) webview ⏎ 2) Qt ⏎ 3) GTK ... [https://gitter.im/crystal-lang/crystal?at=5d3f76197e00fc4ace715155]
<FromGitter> <meltheadorable> please no
<FromGitter> <meltheadorable> lol
<FromGitter> <dscottboggs_gitlab> > but binding it will be a chore ⏎ ⏎ and a half haha
<FromGitter> <dscottboggs_gitlab> > please no ⏎ ⏎ why not?
<FromGitter> <watzon> @dscottboggs_gitlab why do you hate me?
<FromGitter> <meltheadorable> the other option would be to do what shoes did and bind Pango and Cairo directly
<FromGitter> <watzon> I use Crystal so I don't have to work with languages like Python lol
<FromGitter> <meltheadorable> at least before they switched to JRuby
<FromGitter> <meltheadorable> can we call java from crystal? 😂
<FromGitter> <watzon> Ewww
<FromGitter> <meltheadorable> btw Shoes.cr is a strictly worse name than Slippers
<FromGitter> <meltheadorable> Ruby Shoes & Crystal Slippers has the most delightful inverted symmetry
<FromGitter> <watzon> Agreed
<FromGitter> <tenebrousedge> lol yaaaaassssss
<FromGitter> <watzon> Slippers would be awesome
<FromGitter> <meltheadorable> i don’t know what it would take though
<FromGitter> <watzon> A lot
<FromGitter> <meltheadorable> Probably
<FromGitter> <meltheadorable> and the other thing about shoes is that it never took off
<FromGitter> <meltheadorable> so maybe not 100% the best source of inspiration 😂
<FromGitter> <watzon> Probably not
<FromGitter> <tenebrousedge> well, it's not necessary to duplicate its API
<FromGitter> <watzon> I mean it's a good concept
<FromGitter> <dscottboggs_gitlab> > the other thing about shoes is that it never took off ⏎ ⏎ maybe because it's ruby wrapping C wrapping Java?
<FromGitter> <meltheadorable> no no no not at the same time
<FromGitter> <meltheadorable> it used to be C calling Ruby’s C interface, now it’s JRuby which has “native” access to Java libs
<FromGitter> <dscottboggs_gitlab> @watzon I thought you might have strong opinons about my idea 😆
<FromGitter> <watzon> Something like this would be amazing
alex`` has quit [Ping timeout: 245 seconds]
<FromGitter> <meltheadorable> the thing i want a UI for probably can’t waste the cycles communicating with another process via sockets or HTTP or similar so unfortunately so I am *really* hoping to eventually have an option that does not have that problem 😂
<FromGitter> <dscottboggs_gitlab> that's a fair point
<FromGitter> <meltheadorable> are there any languages besides C that can export C functions that we could write a native GUI toolkit in to bind to crystal?
<FromGitter> <meltheadorable> lol
<FromGitter> <dscottboggs_gitlab> D has a stable ABI as well
<FromGitter> <dscottboggs_gitlab> and you can wrap C++ and ObjC in C functions as discussed earlier. That's how bindgen binds to C++ -- by generating a series of C functions which wrap the C++ API
<FromGitter> <meltheadorable> yeah, i specifically was asking though because if you design your GUI toolkit entirely around the idea that it’s existing specifically to be bound by higher level languages, you may make different choices
<FromGitter> <meltheadorable> mostly just curious if there’s like, another language that would be more tolerable to write intermediary libraries in than actually doing them in C
<FromGitter> <dscottboggs_gitlab> TBH I like C++ better than Rust and C is plenty bearable for small scripts, like an API wrapper
<FromGitter> <dscottboggs_gitlab> although I'll qualify that by saying I have very little experience in C++ or Rust and certainly would never write a large project in C
<FromGitter> <watzon> For me it's Rust < D < C/C++
<FromGitter> <dscottboggs_gitlab> yeah same
<FromGitter> <watzon> But idk about writing intermediary libs
<FromGitter> <meltheadorable> You…like c/c++?
<FromGitter> <watzon> Whoops
<FromGitter> <watzon> I went the wrong way lol
<FromGitter> <meltheadorable> lol
<FromGitter> <watzon> Rust > D > C/C++
<FromGitter> <dscottboggs_gitlab> ohh hahaha
<FromGitter> <watzon> 😂
<FromGitter> <meltheadorable> im trying really really hard not to have to learn rust
<FromGitter> <dscottboggs_gitlab> I've not looked at D a ton, what do you like about it?
<FromGitter> <tenebrousedge> c programmers have drain bamage
<FromGitter> <meltheadorable> not because i dislike it just because i hate c
<FromGitter> <meltheadorable> and rust is still too close to c
<FromGitter> <meltheadorable> for me
<FromGitter> <dscottboggs_gitlab> Rust is ugly AF.
<FromGitter> <meltheadorable> i like that rust is out there being not C in the world
<FromGitter> <dscottboggs_gitlab> definitely
<FromGitter> <meltheadorable> i have one project im doing that i have to write C for and its worthless
<FromGitter> <watzon> D has a very similar syntax to C, but its power is more on par with C++. It also has a very powerful FFI for interfacing with C.
<FromGitter> <watzon> and it has some good UI libs
<FromGitter> <dscottboggs_gitlab> but at least in the small problems I've been solving C++ syntax seems more clear than Rust. Idk we'll see in time I guess.
<FromGitter> <watzon> I can agree that Rust's syntax leaves a lot to be desired
<FromGitter> <dscottboggs_gitlab> > and it has some good UI libs ⏎ ⏎ O RLY now?
<FromGitter> <meltheadorable> rust’s syntax can’t be worse than C++’s though, can it?
<FromGitter> <watzon> C++ can have some pretty terrible syntax
<FromGitter> <watzon> Especially when you get into templates
<FromGitter> <dscottboggs_gitlab> > rust’s syntax can’t be worse than C++’s though, can it? ⏎ ⏎ Ayyup
<FromGitter> <meltheadorable> C/C++ mostly throws me into sobbing fits around pointers — I understand pointers conceptually, C/C++ has the most baffling possible way of dealing with them
<FromGitter> <watzon> One of the things I hate most about C++ is all the bloat from the backwards compatibility
<FromGitter> <watzon> imo it would be a much better language without
<FromGitter> <dscottboggs_gitlab> That is very true @watzon
<FromGitter> <meltheadorable> objective c also suffers from trying to be compatible with C
<FromGitter> <dscottboggs_gitlab> @meltheadorable C and C++ are two entirely different beasts when it comes to pointers
<FromGitter> <absolutejam_gitlab> is there a `String.sub` for lazy people that's `/1`?
<FromGitter> <meltheadorable> i’ve found them equally confusing but maybe im doing something wrong
<FromGitter> <tenebrousedge> you mean delete?
<FromGitter> <meltheadorable> or the codebases i’ve worked in were doing something wrong
<FromGitter> <watzon> What do you mean @absolutejam_gitlab?
lucasb has quit [Quit: Connection closed for inactivity]
<FromGitter> <dscottboggs_gitlab> One of the main benefits of (*modern*) C++ when properly applied is it eliminates *almost* all use-cases for raw poitners. Rust eliminates *all* cases for that, but I think its syntax for more basic use-cases is more confusing.
<FromGitter> <absolutejam_gitlab> `"fool".sub("foo") # => "l"`
<FromGitter> <absolutejam_gitlab> Is delete what i'm after?
<FromGitter> <tenebrousedge> so `delete`
<FromGitter> <tenebrousedge> probably with a regex
<FromGitter> <absolutejam_gitlab> Ruby has so many convenience methods
<FromGitter> <absolutejam_gitlab> I come from python. We don't get that luxury
<FromGitter> <dscottboggs_gitlab> C++11+ has `unique_ptr` and `shared_ptr` which does some compile-time garbage collection
<FromGitter> <tenebrousedge> `"fool".delete(/foo/)` or `"fool".delete("fo")`
<FromGitter> <meltheadorable> i haven’t used C++ since before it was modern so maybe it’s better these days
<FromGitter> <dscottboggs_gitlab> C++17+ has `optional<T>` which eliminates the use of `nullptr` to represent an optional/nullable type
<FromGitter> <watzon> I'm waiting for C++20, then I'll give it a try again
<FromGitter> <meltheadorable> and the version of C i need to use for my things is like C99
<FromGitter> <meltheadorable> i think
<FromGitter> <watzon> Module support should be a game changer
<FromGitter> <meltheadorable> so i also dont get to use modern C
<FromGitter> <dscottboggs_gitlab> C has not recieved the same level of revisions and is still as hard as ever to use in large projects
<FromGitter> <dscottboggs_gitlab> C++20 looks super promising.
<FromGitter> <meltheadorable> my C++ experience goes back to like, idk, 2004 but i was using a compiler that still operated in DOS mode
<FromGitter> <meltheadorable> so i really dont know what its like at all
<FromGitter> <watzon> C suffers from the same problems as most non OOP languages, but recent non OOP languages like Rust make a lot of concessions to allow you to do things in a very similar-to-oop type of way
<FromGitter> <dscottboggs_gitlab> Also, the amount of beneficial revisions in C++20 leads me to think that they're on a really nice pace to take the best from more modern languages
<FromGitter> <watzon> I just want them to finally say "hey, we're dropping support for everything pre C++11"
<FromGitter> <dscottboggs_gitlab> haha yes
<FromGitter> <meltheadorable> i am not necessarily attached to OOP but i am attached to the power of languages that actually embrace OOP like Smalltalk, Ruby, and Crystal
<FromGitter> <watzon> Just get rid of the bloat
<FromGitter> <dscottboggs_gitlab> > my C++ experience goes back to like, idk, 2004 ⏎ ⏎ fuck man I must be the youngest one in the conversation, aside from @girng
<FromGitter> <watzon> Keep things going a few revisions back
<FromGitter> <meltheadorable> im really not that old i swear
<FromGitter> <meltheadorable> i was a teenager
<FromGitter> <watzon> @dscottboggs_gitlab that's funny, you come off as older haha
<FromGitter> <watzon> I'm only 26
<FromGitter> <dscottboggs_gitlab> haha no way same age as me
<FromGitter> <meltheadorable> im only a couple years older
<FromGitter> <watzon> I started programming professionally at 16 though, so I've got a few notches on my belt
<FromGitter> <watzon> But still, I learn new things every day
<FromGitter> <absolutejam_gitlab> 27
<FromGitter> <dscottboggs_gitlab> damn, lucky you @watzon
<FromGitter> <absolutejam_gitlab> I aint no dev, just a wannabe doing DevOps
<FromGitter> <absolutejam_gitlab> with emphasis on the Ops... I think
<FromGitter> <watzon> Took a lot of sitting at a computer for hours every day while my mom griped at me to go hang out with friends lol
<FromGitter> <meltheadorable> i started working professionally in IT at 14, i started programming professionally in college, i started programming as a hobby when i was 13ish
<FromGitter> <watzon> I wish I would've started earlier
<FromGitter> <meltheadorable> i took a class in high school that used some ancient borland C++ compiler
<FromGitter> <meltheadorable> that was the thing in 2004-2005ish
<FromGitter> <watzon> My first dabbling in web development was when I was 14
<FromGitter> <watzon> Well, 8 if you count copying yahoo.com into word and editing things
<FromGitter> <meltheadorable> by “professionally” i mean making money, i published websites people actually used in high school but it was like, volunteer work
<FromGitter> <watzon> Or playing with Microsoft Front Page
<FromGitter> <meltheadorable> i was handwriting html/css in my high school web development class, but i already knew all the stuff the class covered from neopets so my teacher hooked me up with after school clubs that needed websites and i designed and built them
* FromGitter * tenebrousedge is super old
<FromGitter> <watzon> Lol
<FromGitter> <watzon> Just realized he's from Portland. I use to live near there long ago.
<FromGitter> <meltheadorable> what counts as super old
<FromGitter> <meltheadorable> in this conversation
<FromGitter> <tenebrousedge> Portland is nice. Lovely place, fun riots, good food
<FromGitter> <watzon> I'd say anything over 30
<FromGitter> <tenebrousedge> yar
<FromGitter> <tenebrousedge> 33
<FromGitter> <meltheadorable> > 30 or >= 30
<FromGitter> <watzon> 😂
<FromGitter> <watzon> Hmmm
<FromGitter> <meltheadorable> escaping markdown 😦
<FromGitter> <watzon> Well I did say over 30
<FromGitter> <watzon> So I guess `> 30`
<FromGitter> <meltheadorable> Cool i dont plan on acknowledging any further aging
<FromGitter> <watzon> Damn I'll be there too soon
<FromGitter> <meltheadorable> i will never be super old
<FromGitter> <watzon> It's ok, once you're 30 I hear 40 is the super old mark
<FromGitter> <meltheadorable> im surprised im on the older side here tbh, most programming communities im more middle of the road
<FromGitter> <watzon> It moves with you 😉
<FromGitter> <watzon> Same
<FromGitter> <tenebrousedge> but when I was a teen I wanted to be an artist. Programming was my brother's thing. So the most I did was web design up until my mid-20s
<FromGitter> <meltheadorable> im old on tumblr, im young a lot of other places, usually middleish in techy spaces
<FromGitter> <watzon> Actually I'm in some programming groups on Telegram
<FromGitter> <watzon> Pretty sure I'm one of the oldest
<FromGitter> <watzon> Most everyone is < 20
<FromGitter> <meltheadorable> wild
<FromGitter> <watzon> They're getting younger lol
<FromGitter> <tenebrousedge> my brother does C programming. *and he likes it* o___o
<FromGitter> <meltheadorable> im on a discord server with a bunch of like 15 year olds which is mostly exhausting
<FromGitter> <watzon> My nephew is 6 and he's already started teaching himself
<FromGitter> <watzon> But he's also one of the smartest kids I know
<FromGitter> <dscottboggs_gitlab> TBH I wish I had had more opportunities when I was younger. I think it would've stuck better
<FromGitter> <watzon> Same
dingenskirchen has quit [Ping timeout: 264 seconds]
<FromGitter> <meltheadorable> i started young but tbh i learned almost everything important in college or after
<FromGitter> <dscottboggs_gitlab> I learned *some* programming through school but idk
<FromGitter> <meltheadorable> nothing like having to ship code for learning things
<FromGitter> <meltheadorable> lol
<FromGitter> <tenebrousedge> yup
<FromGitter> <tenebrousedge> getting paid was what motivated me to learn
<FromGitter> <meltheadorable> i am super grateful for the opportunities i had in college though
<FromGitter> <watzon> I didn't go to school for coding
<FromGitter> <meltheadorable> we had a student-run IT department and students could work for the school as developers & get paid for it, and a lot of our coursework had like, really practical application-building exercises, including a lab that paired us with local businesses to develop stuff they needed IRL
<FromGitter> <watzon> I started, but I don't learn well in a school setting
<FromGitter> <meltheadorable> so even if i hadn’t been freelancing on top of that and getting internships
<FromGitter> <dscottboggs_gitlab> same I didn't go to college
<FromGitter> <meltheadorable> i had a lot of opportunities to do real practical work
<FromGitter> <meltheadorable> i couldn’t get a programming job, despite having experience, without a degree
<FromGitter> <dscottboggs_gitlab> but I think it set me back more than I thought to not go to school
<FromGitter> <meltheadorable> literally nobody would take a chance on me even though i had shipped actual production software
<FromGitter> <meltheadorable> without the credentials
<FromGitter> <dscottboggs_gitlab> ugh. That's so discouraging
<FromGitter> <meltheadorable> I suspect sexism because i knooooooow a lot of guys have been hired with less experience than i had before i finished my degree
<FromGitter> <meltheadorable> but w/e
<FromGitter> <dscottboggs_gitlab> ooof I hope not, that's really sad if it's ture
<FromGitter> <meltheadorable> i’m good now ^_^
<FromGitter> <meltheadorable> but i had to take about a year and a half off school to save up money to finish my last semester
<FromGitter> <meltheadorable> and i couldn’t get a job programming during that time
<FromGitter> <tenebrousedge> :(
<FromGitter> <dscottboggs_gitlab> I have an interview on wendesday for a decently nice tech-support position...a part of me worries it's just going to hurt my resume but it's nice enough that whatever I'll just be glad to not be so stressed about money and life and shit
<FromGitter> <meltheadorable> i got a couple freelance gigs from my old IT connections, but mostly i had to work retail & do like, $2/hr for 18 hours a day on mechanical turk to make ends meet
<FromGitter> <tenebrousedge> I don't think that people care either way about tech support positions
<FromGitter> <dscottboggs_gitlab> wow that's awful, I'm glad you have a decent job now.
<FromGitter> <meltheadorable> Yeah, after I finished my degree I turned it all around
<FromGitter> <meltheadorable> eventually
<FromGitter> <meltheadorable> I think everyone who works in software should have to work tech support at least once tbh
<FromGitter> <watzon> Unfortunately sexism is definitely a thing
<FromGitter> <dscottboggs_gitlab> My coworker has a Masters from a very respectable school and has been working blue-collar and temp jobs since he graduated :/
<FromGitter> <meltheadorable> im not gonna say its not gonna reflect bad or weird on your career because some people will judge you for it — those are probably places you don’t want to work for but its tough to be picky
<FromGitter> <watzon> Especially in tech
<FromGitter> <Blacksmoke16> ouch, i must have got lucky then
<FromGitter> <meltheadorable> the other thing though is…you can leave stuff off your resume
<FromGitter> <dscottboggs_gitlab> yeah I mean TBH I'm weird enough of a person those people probably wouldn't want to hire me anyway
<FromGitter> <meltheadorable> like i have jobs that are not on mine
<FromGitter> <watzon> I was actually in a hiring meeting before where we were interviewing masters candidates
<FromGitter> <kniknoo> Y'all making me feel geriatric and I'm just a hobbyist wanting to get into tech. :'(
<FromGitter> <watzon> I had more practical knowledge than most of them by far
<FromGitter> <meltheadorable> the olds club
<FromGitter> <dscottboggs_gitlab> > you can leave stuff off your resume ⏎ ⏎ lol I can barely remember my whole work history, much less fit it all on a page. And most of it isn't worth listing anyway haha
<FromGitter> <watzon> What a lot of companies are starting to realize is that experience counts for more than a degree
<FromGitter> <dscottboggs_gitlab> "worked for pizza hut 6 months, then the grocery for a month, then..."
<FromGitter> <meltheadorable> yeah im just saying like, if you think something on your resume is gonna hurt your chances at any given place, you can just leave it off
<FromGitter> <watzon> Yeah most of that stuff is probably better left off a resume anyway haha
<FromGitter> <watzon> Especially as a developer
<FromGitter> <dscottboggs_gitlab> @watzon that's what I'm hoping for with projects like https://github.com/DFabric/dppm-rest-api
<FromGitter> <tenebrousedge> @kniknoo so you're saying that you're not likely going to be an overly-caffeinated hipster working at a destined-to-fail ML startup any time soon?
<FromGitter> <meltheadorable> before i had enough relevant work history to fill a page, I highlighted specific projects i had like, a key role on
<FromGitter> <meltheadorable> and wrote a bit about my responsibilities on them
<FromGitter> <meltheadorable> in their own section
<FromGitter> <watzon> I mean, watzon/cadmium helped me get a job at NeuraLegion
* FromGitter * Blacksmoke16 sad, JSON API in kemal :P
<FromGitter> <meltheadorable> which also let me showcase specific stacks i had worked on
<FromGitter> <meltheadorable> my first real production web app was written in frameworkless PHP and jQuery UI
<FromGitter> <meltheadorable> 😂
<FromGitter> <meltheadorable> that was a good choice at the time i swear
* FromGitter * tenebrousedge twitches
<FromGitter> <meltheadorable> it’s still in production now ^_^
<FromGitter> <meltheadorable> it’s been maintained after my absence
<FromGitter> <meltheadorable> it was replacing a CGI perl script if that helps
<FromGitter> <dscottboggs_gitlab> yeah that's what I hope to start doing with stuff after a while of working the support job. Finish the DPPM web ui and API, then a couple personal projects, mentoring and published solutions on exercism for more popular languages... Maybe after a year or so there I'll have the experience I need to move into a junior dev or infrastructure kinda thing.
<FromGitter> <dscottboggs_gitlab> sorry, @Blacksmoke16 when I started on this Athena was still not complete
<FromGitter> <Blacksmoke16> :P all good
<FromGitter> <Blacksmoke16> missin out now haha
<FromGitter> <tenebrousedge> oh, my mentor notes for Crystal for exercism were merged finally
<FromGitter> <tenebrousedge> there was a disagreement about the headings >_<
<FromGitter> <dscottboggs_gitlab> I've actually come across a few cases where I've thought *Athena would handle this more elegantly....*
<FromGitter> <meltheadorable> @watzon one of the side projects on my long long todo list was to try to reimplement the non-ML portions of StanfordNLP in Crystal — probably a better idea to contribute to Cadmium if I get the itch ^_^;;
<FromGitter> <Blacksmoke16> anytime you want to resolve something from a route param into an actual object yes
<FromGitter> <Blacksmoke16> plus its got the crylog implementation for easy logging and DI stuff
<FromGitter> <watzon> I've been wanting to do that for Cadmium so I'd appreciate the contributions
<FromGitter> <watzon> I want to implement Word2Vec
<FromGitter> <watzon> But it's a pain in the ass
<FromGitter> <meltheadorable> I can imagine, there’s a reason it’s at the bottom of a long list of side projects
<FromGitter> <meltheadorable> 😂
<FromGitter> <meltheadorable> for the record i have literally 35ish projects on my side project list, i have too many ideas and most of them are too great not to put at least a little effort into exploring them 😅
<FromGitter> <watzon> Yeah I feel that
<FromGitter> <dscottboggs_gitlab> When I get DPPM done I'm pretty sure I'm going to try tearing into the concept of coding-by-voice again. It's been kinda a passion of mine, since I have bad joints genetically anyway and have already had to make significant changes to avoid RSI. I think Cadmium's NLP features will probably play a cruicial role if I have any luck.
<FromGitter> <meltheadorable> i decided to take on one of the few projects I was ready to hand off to somebody else who was interested in a practical side project myself
<FromGitter> <meltheadorable> because i couldn’t find anybody who wanted to do it
<FromGitter> <dscottboggs_gitlab> @meltheadorable oh wow you have an actual list? haha
<FromGitter> <meltheadorable> yeah it doesn’t include any of the junk i’ve been doing with crystal GUI frameworks either, all that work is just research for the project actually on my list
<FromGitter> <meltheadorable> just removed CrystalNLP from the list though thanks @watzon 😂
<FromGitter> <watzon> No problem haha
<FromGitter> <meltheadorable> of course that leaves me with fewer great options
<FromGitter> <meltheadorable> for projects to do in crystal
<FromGitter> <meltheadorable> if i bind SDL i think i can use that for my one project
<FromGitter> <watzon> Honestly I can't think of a better or more needed project than a good UI framework
<FromGitter> <watzon> Other than something like https://github.com/DataFire/DataFire
<FromGitter> <meltheadorable> i knoooooooooooooooooooooooow but i have none of the expertise for that
<FromGitter> <watzon> Which I've been playing around with ideas for
<FromGitter> <meltheadorable> i need a crystal implementation of this for reasons https://en.wikipedia.org/wiki/Z39.50
<FromGitter> <meltheadorable> but that feels like it’ll be kind of a pain
<FromGitter> <meltheadorable> and so im not in a rush
<FromGitter> <meltheadorable> is datafire some kind of serverless thing
<FromGitter> <watzon> Just the name `Z39.50` makes me cringe a little
<FromGitter> <watzon> The idea behind Datafire is to make wrapping APIs easier
<FromGitter> <tenebrousedge> "What...is it, doctor?"
<FromGitter> <watzon> Basically it does all the heavy lifting for you
<FromGitter> <meltheadorable> Z39.50 is an ancient socket-based protocol for browsing and searching library catalogs
<FromGitter> <meltheadorable> a lot of libraries still use it as the main metadata interchange
<FromGitter> <tenebrousedge> :(
<FromGitter> <meltheadorable> & i need a ton of book metadata for one of my projects
<FromGitter> <meltheadorable> book data from like amazon’s APIs are encumbered
<FromGitter> <dscottboggs_gitlab> fuck that sounds like fun
<FromGitter> <meltheadorable> and book data from the few open data sources on books are almost entirely uncurated
<FromGitter> <meltheadorable> and even with crystal, it would take several months to crawl and insert the volume of data i have from my one real open-license data source
<FromGitter> <meltheadorable> but i could generate and pull some of it on the fly with a fast Z39.50 implementation from libraries that are still maintaining it
<FromGitter> <meltheadorable> And that data is mostly free for whatever-the-fuck use, so once i’ve processed it, it’s good
<FromGitter> <dscottboggs_gitlab> Is there a C API which interfaces with this protocol?
<FromGitter> <meltheadorable> yeah, but it’s kind of a mess, i’d rather rewrite than bind it
<FromGitter> <dscottboggs_gitlab> either way, having something to go on is better than nothing to go on
gangstacat has quit [Ping timeout: 250 seconds]
<FromGitter> <dscottboggs_gitlab> C can be translated directly into Crystal and then refactored for safety and readability
<FromGitter> <watzon> Hmmm crazy https://www.loc.gov/z3950
<FromGitter> <dscottboggs_gitlab> `int someFun(int data)` is the same as `fun someFun(data : LibC::Int) : LibC::Int`, etc
<FromGitter> <meltheadorable> yeah its wild
<FromGitter> <watzon> Though tbh it would probably be less of a headache to look at an implementation like this (https://github.com/dengelke/node-zoom2#readme) and base a Crystal lib off of that
<FromGitter> <meltheadorable> the existing library is seriously massive, i think it supports a number of other semi-related protocols as well and it’s like 25 years old
<FromGitter> <meltheadorable> everything binds yaz
<FromGitter> <dscottboggs_gitlab> ooof
<FromGitter> <meltheadorable> i’d like to implement a new native library that just does this
<FromGitter> <dscottboggs_gitlab> You don't want to bind yaz?
<FromGitter> <meltheadorable> i would prefer not to bind yaz
<FromGitter> <watzon> Yeah I just noticed that
<FromGitter> <dscottboggs_gitlab> yaz is the thing that supports a bunch of other protos?
<FromGitter> <meltheadorable> i believe it does, or if it doesn’t it’s a seriously absurd amount of code that i’m surprised is necessary
<FromGitter> <dscottboggs_gitlab> TBF it's written in C
<FromGitter> <dscottboggs_gitlab> C takes a lot of code to express simple idea
<FromGitter> <watzon> Truth
<FromGitter> <meltheadorable> its some 150k LOC