<hightower3>
I have a series of functions which don't require object context to run; they can easily be class/module methods. However, if they are not mixins but class/module methods, then we calling them from outside requires Name.method(), which may or may not look nice.
<hightower3>
Are there any particular technical reasons why either mixins or class/module methods should be preferred when possible?
<FromGitter>
<tenebrousedge> like, as opposed to just defining them in the global scope?
<hightower3>
Like, doing Module.method() vs doing "include Module; method()"
<FromGitter>
<tenebrousedge> so yes
<FromGitter>
<tenebrousedge> there shouldn't be any technical or performance concerns
<FromGitter>
<tenebrousedge> is there really no state that these methods affect?
<hightower3>
Sometimes they do affect state but which is global, so that too can live either as @@vars or @vars
<FromGitter>
<tenebrousedge> I would tend to expect methods that affect `@var` to be defined on `@var`
<FromGitter>
<tenebrousedge> there are no technical or performance concerns with doing as you propose. I'm wary of the design choice. I don't mind a `Utils` module when convenient, but I find it relatively rare that there is a truly stateless or contextless method
<hightower3>
yeah, but if state is global, those would go to Utils too, right?
<FromGitter>
<tenebrousedge> or you would have an `App` module
<hightower3>
Right, right... they might modify the vars somewhere else, not necessarily in Utils
<hightower3>
ok, thanks
<FromGitter>
<tenebrousedge> you're welcome; I hope it was helpful
<FromGitter>
<Blacksmoke16> been kinda throwing around the idea of something like https://www.php-fig.org/psr/ for crystal
<FromGitter>
<Blacksmoke16> mainly around the non basic stuff, like 3, 11, 14, and such
<FromGitter>
<Blacksmoke16> im using 14 as a basis for my thing
<FromGitter>
<sam0x17> @bajro17 looks like they forgot to renew the api's SSL certificate
<FromGitter>
<Blacksmoke16> would be the UX for adding handlers at runtime
<FromGitter>
<Blacksmoke16> prob should rename it to like `create_handler`, but it basically just builds the required proc, where the block of the macro has access to `event` and `dispatcher`
nowhereFast has left #crystal-lang [#crystal-lang]
Human_G33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
<FromGitter>
<ilanpillemer> do you have to have the crystal to a crystal binary
<FromGitter>
<ilanpillemer> I am assuming not? Just reading the convo above.
<FromGitter>
<Blacksmoke16> assuming the binary was built for your os and such then no
<FromGitter>
<bajro17> @sam0x17 for me is everything ok but in console I get t.response is undefined probably little error with API
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter>
<ImAHopelessDev_gitlab> > Oops ⏎ The software powering this discussion forum encountered an unexpected problem. We apologize for the inconvenience. ⏎ ⏎ Detailed information about the error was logged, and an automatic notification generated. We'll take a look at it. ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5dcc565cea7d147cb372d6ba]
<FromGitter>
<watzon> Uh oh
<FromGitter>
<ImAHopelessDev_gitlab> funny thing is i was just about to post a guide
<FromGitter>
<ImAHopelessDev_gitlab> literally 1 click away about to post it lmao
<FromGitter>
<wontruefree> for those who might be interested here is last meetups talk at Chicago Crystal https://youtu.be/LTFLY9tMvIc
<FromGitter>
<wontruefree> I think there were a few requests for the video
<FromGitter>
<ImAHopelessDev_gitlab> @wontruefree i was there, i liked it. i like how brian mentioned the #{string} syntax, and how it sets the tone for what kind of syntax crystal is ultimately striving for. the best of both worlds (performance paired with elegant syntax).
<FromGitter>
<wontruefree> It was awesome to her the though process behind the syntax
<FromGitter>
<wontruefree> I watched a talk on Ruby the last week and weirdly they covered string interpolation and how many objects it creates
<FromGitter>
<wontruefree> I think it is super awesome how crystal is considering performance in design.
<hightower3>
The language is just brilliant
<FromGitter>
<ImAHopelessDev_gitlab> also, the string builder code reminded me of a long std::cout << line in c++. the same line could be expressed in crystal but so much shorter. ⏎ sometimes.. i wonder just how lucky we are.
<FromGitter>
<wontruefree> we are super lucky. I am doing some performance work in ruby and some numbers are staggering
<FromGitter>
<tenebrousedge> @wontruefree what are you seeing?
duane has joined #crystal-lang
<FromGitter>
<wontruefree> mostly tons of object allocations
<FromGitter>
<ImAHopelessDev_gitlab> LOL
<FromGitter>
<wontruefree> there is also some things are are not likely to be solved
HumanG33k has quit [Read error: Connection reset by peer]
<FromGitter>
<bajro17> I will try to write to him in telegram
<FromGitter>
<bajro17> This is only way I can remember
<FromGitter>
<vladfaust> Hey guys, I periodically do read the chat. I'm currently gone a step away from Crystal, that's why I'm not being much active on it
<hightower3>
Cool, could you coordinate with someone to take over maintenance of crystaljobs then, or something?
<FromGitter>
<bararchy> yeha, seems people want to use it
<FromGitter>
<vladfaust> I don't know what to say. It's infrastructure is quite bad -- no auto emails, for example. It depends on outdated shards and it's a pain to try to make it working again. The frontend is good, tho
alexherbo2 has joined #crystal-lang
<hightower3>
Can you transfer ownership of the domain to someone?
<FromGitter>
<vladfaust> I can think of passing the domain and twitter etc. to a person who creates a great working product. Not a "I'll do it some day", and not a bootstrap one-day-ish sh*t
<hightower3>
OK fair enough, I/we might contact you about it when the committment is solid.
<hightower3>
(I've given you 'onyxframework', so could be an exchange now :)
<FromGitter>
<vladfaust> Was it you? Wow. You've deleted your username so quick, and there was no info on your account, so I couldn't put you into credits
<FromGitter>
<vladfaust> When I was claiming for onyxframework, there were core and prism, I had a working product. Your turn ;)
<hightower3>
Hehe. sure no worries. Ok thank you very much, when the committment in this group here solidifies that someone would actually take over crystaljobs and do it seriously, we'll contact you
<FromGitter>
<bajro17> I'm interested
<FromGitter>
<bajro17> to rework it tonight
<FromGitter>
<bajro17> someone else can take it on him after rework
<hightower3>
Great! Keep us posted on progress
<FromGitter>
<bajro17> I will no problem :)
<FromGitter>
<bajro17> can I do it in kemal?
<FromGitter>
<bajro17> for now
<FromGitter>
<bajro17> or amber by your decision @vladfaust ?
<FromGitter>
<vladfaust> Is that a trolling? :D
<FromGitter>
<bajro17> also I feel so sorry to hear you dont work anymore with crystal
<FromGitter>
<bajro17> you are one who make so much shards
<FromGitter>
<bajro17> :(
<FromGitter>
<vladfaust> In some time, you would not be sorry about that ;)
<FromGitter>
<vladfaust> I mean, you'll see what's I'm working on and 'd be happier
<FromGitter>
<bajro17> I hope its something big
<FromGitter>
<bajro17> and its not golang :D
<FromGitter>
<bajro17> hahaha
<FromGitter>
<vladfaust> If I pass crystaljobs, a requirement of mine would be a link to my website as an initial author (kudos for being the first). Thus I'd like anywho wanting to take over it to come responsibly, and implement a great product with great design and working e-mail/twitter posting. I will not give it away for an overnight kemal no-css thing, no offence. Ah yes, the code must have an OSI-approved license. Otherwise
<FromGitter>
... speak business terms with my lawyer ;)
<FromGitter>
<bajro17> I will keep it in mind
<FromGitter>
<bajro17> I must first finish something tonight then I jump on crystaljobs
<FromGitter>
<bajro17> anyway be safe brother I wish you all luck and one more time feel sorry because you go :(
<FromGitter>
<bararchy> No worries, Vlad is working on the next best lang in the world, all the best features from all the other langs out there ;) but really, I'm intrigued to see it
<FromGitter>
<vladfaust> Spoiler alert
<FromGitter>
<bararchy> XD
<FromGitter>
<bajro17> is it worcr
<FromGitter>
<vladfaust> Still, I had great time working on Crystal projects. This is the first serious tech-y community in my life, and I enjoyed it. You guys are being responsive and helpful, all the time, for all 2.5 years I'm here. I came all the path from a telergram bot wrapper to the whole framework, and that's... Big.
<FromGitter>
<vladfaust> Just, you know, I'm over-ambitious and perfection-pursing sometimes. I felt myself tightened by this ecosystem, by this language. Can't always say what I want to say. Don't feel that I can really change anything, matter.
<FromGitter>
<bararchy> TBH I feel the other way around, anything I care about is either getting done, worked on, or pursed by other people, I'm doing my best pushing both Crystal and it's development and adoption as hard as I can
<FromGitter>
<bararchy> I'm "on crystal" since 2013~
<FromGitter>
<bararchy> and It started from "cool! compiled ruby!" to a full on startup using Crystal as a competitive edge
<FromGitter>
<vladfaust> I have nothing left to say to that, I'm sorry. We got what we've got
<FromGitter>
<watzon> I can't wait to see what you're working on @vladfaust 😉
<FromGitter>
<vladfaust> Yes, I know, Chris. I'm sorry to keep you in that wait. Working with my small team a lot to make it flawless. The design issues take enormous effort, and we'd have only a single chance to make it right (don't want to follow the notorious "will design that later" path of some other languages). Anyhow, some wait since 2013, so a couple of months would hurt ;)
<FromGitter>
<bararchy> @vladfaust I think each is fully entitled to his own feelings, thoughts and wants, I totally respect your drive and ambitions! go for it, and may you make the world a more interesting place
<FromGitter>
<vladfaust> You're not strangers for me, Bar, @bajro17 (sorry, don't know your real name) and many others here, as we're bound by years of being into this community. Therefore your kind words are felt much warmer for me, thanks for that. And you know what, I really need that support from time to time, it encourages me in my beginnings. Thank you
<FromGitter>
<bajro17> You most welcome brother
<FromGitter>
<bajro17> I have faith in you I know from your head will come out some world changing things
<FromGitter>
<bajro17> also @bararchy I think you do best with crystal with this language you make most amazing tool
<FromGitter>
<bajro17> to be honest Bar is one the biggest reasons why I stay in this group
<FromGitter>
<bajro17> because I dont lose hope for crystal when I see his success
<FromGitter>
<vladfaust> I would always respect Blacksmoke's work. He's more into PHP and my "design" vision differs from his, but I love the way he follows his path, pushes it no matter what. I can see some of his work being merged into Crystal itself (smth related to JSON), and that's a career.
<FromGitter>
<bajro17> I also mostly stuck with PHP :(
<FromGitter>
<bajro17> most jobs is just PHP and PHP
<FromGitter>
<bajro17> but at night I cant resist crystal
<FromGitter>
<vladfaust> And also Chris Watzon, suddenly started mining shards one by one, and even made some luck in job-seeking IIRC. Impressive! I feel that product-ish approach in shards' README's and I like that!
<FromGitter>
<vladfaust> PHP is hell, Crystal is great. But PHP is paid, and Crystal is rarely ;)
<FromGitter>
<vladfaust> Would make a hokku from that
<FromGitter>
<bajro17> I also buy crystalcms domain
<FromGitter>
<bajro17> I hope I will be success to make business from this
<FromGitter>
<bajro17> and to promote crystal to world
<FromGitter>
<vladfaust> Aiming to create a paid product with any technology always has more chances on financial success rather than working on an open-source project ;)
<FromGitter>
<vladfaust> Thus I wish you best luck on that, that's the right path to both make your livings and tell the world about things you love
<FromGitter>
<bajro17> Thank you I will give my best I know I will never give up from crystal
<FromGitter>
<bajro17> at least when I have time
<FromGitter>
<bajro17> I think after this programming language get this miracle version 1.0 it will be so big market for this