RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.1 | 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
non-aristotelian has quit [Quit: non-aristotelian]
akaiiro has quit [Ping timeout: 252 seconds]
ashirase has quit [*.net *.split]
ua_ has quit [*.net *.split]
bmcginty has quit [*.net *.split]
maxpowa has quit [*.net *.split]
commavir has quit [*.net *.split]
oz has quit [*.net *.split]
OvermindDL1 has quit [*.net *.split]
lvmbdv has quit [*.net *.split]
Flipez has quit [*.net *.split]
z64 has quit [*.net *.split]
bazaar has quit [*.net *.split]
jhass has quit [*.net *.split]
junland has quit [*.net *.split]
pabs has quit [*.net *.split]
wmoxam has quit [*.net *.split]
johndescs has quit [*.net *.split]
scott_tams has quit [*.net *.split]
fifr has quit [*.net *.split]
_whitelogger has joined #crystal-lang
dostoyevsky has joined #crystal-lang
_whitelogger has joined #crystal-lang
akaiiro has quit [Remote host closed the connection]
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
rohitpaulk has joined #crystal-lang
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
baweaver has quit [Remote host closed the connection]
Yxhuvud has joined #crystal-lang
tilpner has quit [Remote host closed the connection]
tilpner has joined #crystal-lang
maxpowa has quit [Ping timeout: 252 seconds]
oz has quit [Ping timeout: 252 seconds]
maxpowa has joined #crystal-lang
oz has joined #crystal-lang
FromGitter has joined #crystal-lang
Groogy1 has joined #crystal-lang
Vexatos has joined #crystal-lang
Guest48721 has joined #crystal-lang
Guest48721 is now known as baweaver
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
scott_tams has quit [Quit: Leaving]
<jokke> there's not something like named arguments for generic type vars, right? :D
<jokke> (with defaults) :D
<jokke> hm but should be easy enough with macros...
moei has quit [Read error: Connection reset by peer]
moei has joined #crystal-lang
maxpowa has quit [Ping timeout: 245 seconds]
maxpowa has joined #crystal-lang
<FromGitter> <bew> I don't see what you mean, example?
<FromGitter> <yxhuvud> jokke: consider refactoring if you feel you need that.
<jokke> haha
<jokke> yeah
<jokke> it's tricky
ashirase has quit [Ping timeout: 252 seconds]
<FromGitter> <proyb6> I spotted one of these web framework top the TechEmppwer benchmark and its surprise epoll is being use with Java
ashirase has joined #crystal-lang
<FromGitter> <aboeglin> Hi there
<FromGitter> <aboeglin> I'm getting into crystal, and I see a lot of @ symbols in the code I read but I just can't seem to google it .. Anyone could tell me what it does, or how it's called so I could search for it properly ?
<FromGitter> <aboeglin> It may be important to say I have no prior knowledge of ruby
<FromGitter> <bew> Did you read the Crystal docs?
<FromGitter> <aboeglin> Yes I have
<FromGitter> <bew> Basically `@instance_variable`, and `@@class_variable`
<FromGitter> <aboeglin> not everything though, but I've read quite a bit of it already
Groogy1 has quit [Ping timeout: 252 seconds]
<FromGitter> <bew> What exactly you don't understand?
<FromGitter> <aboeglin> alright, so it's a self or this
<FromGitter> <aboeglin> well, now I'm good
<FromGitter> <aboeglin> well, I just saw it everywhere on the code I was reading, but couldn't figure what it was
<FromGitter> <bew> Kindof, it's the way to directly access the attributes
<FromGitter> <bew> What language are you used to?
<FromGitter> <aboeglin> just try to google "@ crystal" you'll see what I mean
<FromGitter> <bew> Lol ^^
<FromGitter> <aboeglin> python js php C++ java mostly
<FromGitter> <aboeglin> and a class variable from outside would be Class::variable_or_method right ?
<FromGitter> <aboeglin> except if it's private or protected obviously
<FromGitter> <aboeglin> I have done a whole bunch of hyped functional programming lately. I'll need to put myself back in an OO mindset to be proficient in crystal I suppose.
<FromGitter> <bew> Ahah yes, Crystal is OO everywhere
<FromGitter> <aboeglin> Yes, that's the part of the documentation I have skipped for now, that may explain it ^^
<FromGitter> <aboeglin> From what I understand, even a module is a sort of class
<FromGitter> <bew> Indeed...
<FromGitter> <bew> not in crystal terms, what do you mean by that?
<FromGitter> <aboeglin> that you can't instantiate though, so per see there's no "function", it's all methods right ?
<FromGitter> <bew> yes
<FromGitter> <aboeglin> when we use the keyword include
<FromGitter> <fenicks> Hi everyone
<FromGitter> <bew> hi @fenicks
<FromGitter> <aboeglin> somehow we just assign the static method of another module to the current one
<FromGitter> <aboeglin> Hi @fenicks
<FromGitter> <aboeglin> From what I understand though, anyways, @ and @@ were the bigger blockers to understand the code I was reading, I'll go back to my actual job for now, but I enjoy crystal a lot ! I'll rewrite a small service with kemal this week for sure :D
<FromGitter> <aboeglin> Thanks for the answers !
<FromGitter> <bew> cool @aboeglin, welcome to Crystal :D
Groogy1 has joined #crystal-lang
<jokke> if i have a named tuple _instance_ like this: `{ foo: Foo, bar: Bar }` (not a declaration). how can i strip the `.class` from the values in a macro context? So i have a method `foo(**args : **T) forall T` and i want to access `T[:foo]` and use it to create an instance of the passed class.
<FromGitter> <vladfaust> I'm not sure if instances are available at compilation :thinking:
<FromGitter> <straight-shoota> jokke, where do you get the `.class` from in the first place?
return0e has quit [Remote host closed the connection]
moei has quit [Ping timeout: 252 seconds]
return0e has joined #crystal-lang
Groogy1 has quit [Quit: WeeChat 2.2]
<jokke> straight-shoota: it's there as soon as i call `foo(foo: Foo)`
<FromGitter> <fusillicode_twitter> @vladfaust sorry for the bother but I was wondering if `Validations` has a `presence` validation 🤔
<FromGitter> <fusillicode_twitter> I mean If I have a Struct with optional strings
<FromGitter> <vladfaust> @fusillicode_twitter currently there is no `presense` validation, but you could easily add your own rule. I guess it's pretty common rule, so I'll create an issue
<FromGitter> <vladfaust> Whom do I write docs for?! http://github.vladfaust.com/validations.cr/
<FromGitter> <fusillicode_twitter> > Whom do I write docs for?! http://github.vladfaust.com/validations.cr/ ⏎ Sorry I didn't mean to bother you, and I think that I've written down the question wrong :(
<FromGitter> <fusillicode_twitter> Sorry I didn't mean to bother you, and I think that I've written down the question wrong :(
<FromGitter> <fusillicode_twitter> It is clear how to add custom validations
<FromGitter> <vladfaust> No offence!
<FromGitter> <vladfaust> I'm not bothered, I enjoy people using my shards
<FromGitter> <vladfaust> However, I spend like 30% of the time writing exhaustive API docs
<FromGitter> <fusillicode_twitter> Believe me it is a well documented shard and I really liked it
<FromGitter> <fusillicode_twitter> > However, I spend like 30% of the time writing exhaustive API docs
<FromGitter> <fusillicode_twitter> I also feel that the docs are comprehensive and very good written
<FromGitter> <fusillicode_twitter> Btw I also understand if you were bothered. It's an understandable feeling :)
<FromGitter> <fusillicode_twitter> In any case let me apologize for my lack of accuracy, next time I'll take a better look also at the marco section :)
<FromGitter> <fusillicode_twitter> 🙇
<FromGitter> <vladfaust> Oh man, no need to be such polite (with me at least)
<FromGitter> <fusillicode_twitter> lol that's how I am buddy, sorry even for this XD
<FromGitter> <fusillicode_twitter> 🍻
<FromGitter> <vladfaust> I'm interested in people using my shards, so I'm here to help. Sorry if I look too aggressive, that's just my honesty
<FromGitter> <vladfaust> I suffer from this a lot!
<FromGitter> <vladfaust> We, Russians, don't like that "smile at first"
<FromGitter> <vladfaust> We rather be grumpy at first and really smile to friends only
<FromGitter> <fusillicode_twitter> lol XD
<FromGitter> <vladfaust> And I hate lies more than anything, that's really the reason why modern world sucks
<FromGitter> <fusillicode_twitter> totally agree
<FromGitter> <vladfaust> Pretending to be polite is a lie for me, so if I feel that I need to say something, I'll say it, like it you or not
<FromGitter> <vladfaust> Actually, that drives me away from society, but it makes me respect myself
<FromGitter> <vladfaust> Honor - that a thing the modern humanity lacks of. IMO, of course
<FromGitter> <fusillicode_twitter> 👎
moei has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
moei has quit [Quit: Leaving...]
moei has joined #crystal-lang
akaiiro has joined #crystal-lang
<FromGitter> <Blacksmoke16> @sdogruyol great, ill check it out. thanks
sevensidedmarble has quit [Remote host closed the connection]
DTZUZO_ has quit [Ping timeout: 272 seconds]
DTZUZO_ has joined #crystal-lang
<FromGitter> <alehander42> politeness is just a custom behavior protocol, not necesarrily better or worse than the others :D
<FromGitter> <fusillicode_twitter> wise words @alehander42 :)
<FromGitter> <paulcsmith> I agree. I think the best option is to adjust to the person you are speaking too. Some people prefer politeness. Some prefer directness. Always with respect though :)
<FromGitter> <j8r> Even if we aren't polite, everyone will agree to not insult, at least :)
<FromGitter> <alehander42> i like honesty tho, otherwise agree :D
<FromGitter> <fusillicode_twitter> I think that at the end we're all aligned :)
<FromGitter> <fusillicode_twitter> Btw @j8r there was absolutely no insult whatsoever
<FromGitter> <fusillicode_twitter> Just to clarify ;)
<FromGitter> <j8r> for sure, not anymore, damn 😄
<FromGitter> <j8r> (not really one btw)
<FromGitter> <j8r> is it possible to politely insult?
<FromGitter> <fusillicode_twitter> lol XD
<FromGitter> <paulcsmith> Yep! You just add "no offense" at the end :P
<FromGitter> <j8r> haha, along with "Sir"
<FromGitter> <j8r> other topic, how can I spec a block that never returns?
<FromGitter> <j8r> I can't `break` inside the block
Creatornator has joined #crystal-lang
<FromGitter> <j8r> With channels we ca do, but else `.should eq` returns weird outputs if it fails
<FromGitter> <HarrisonB> Run it with a timeout? :P
<FromGitter> <j8r> how can I do @HarrisonB ? (Not the block in question has a `sleep 0.1` inside)
<FromGitter> <j8r> else another solution is to only test non yielding variants
<FromGitter> <j8r> yeaahhh it works with channels :)
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <HarrisonB> @j8r so you got a spec working?
<FromGitter> <fusillicode_twitter> Quick question, is there a "facility" to convert a Struct into a named tuple or into another Struct 🤔
<FromGitter> <vladfaust> Convert struct into another Struct? I think that's too specific
<FromGitter> <fusillicode_twitter> Yes you're right but I had recently the same need in Scala and I found something
<FromGitter> <fusillicode_twitter> here it is https://github.com/bfil/scala-automapper
<FromGitter> <fusillicode_twitter> Beware I totally understand the profound differences between the languages, I was just curious :)
akaiiro has quit [Ping timeout: 245 seconds]
<FromGitter> <vladfaust> It's certainly possible with macros
<FromGitter> <vladfaust> But there is no ready-to-go solution I'm aware of
<FromGitter> <fusillicode_twitter> > It's certainly possible with macros ⏎ this is a great reassurance! :D
<FromGitter> <fusillicode_twitter> this is a great reassurance! :D
greengriminal has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 252 seconds]
DTZUZO_ has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
Creatornator has joined #crystal-lang
<FromGitter> <cheezy085_gitlab> hey, you guys got any discord server?
<FromGitter> <r00ster91> no currently there's unfortunately no official discord server. But there's a channel for crystal on The Coding Den: discord.gg/code
<FromGitter> <fridgerator> The core team prefers to stick with irc and gitter
<FromGitter> <j8r> and a good chunk of us to :)
Heaven31415 has joined #crystal-lang
<FromGitter> <fusillicode_twitter> > and a good chunk of us to :)
<FromGitter> <fusillicode_twitter> #truestory ;)
<FromGitter> <fusillicode_twitter> oh gosh...
<FromGitter> <fusillicode_twitter> #... -. -
<FromGitter> <j8r> you tried hash tag?
<Heaven31415> Hi
<FromGitter> <fusillicode_twitter> -.-
<FromGitter> <fusillicode_twitter> @j8r oh yeah...and I end up like a spammer...
<FromGitter> <fusillicode_twitter> sorry XD
<FromGitter> <bararchy> @fusillicode_twitter * truesorry hahahah
<FromGitter> <fusillicode_twitter> XD
greengriminal has joined #crystal-lang
<jokke> is there something obviously wrong in the websocket handler? https://p.jokke.space/6hi/
<jokke> it outputs to console that clients are being refreshed but nothing gets sent to the client
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
akaiiro has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jokke> hmm
<jokke> in src/voter/repo.cr:6: undefined local variable or method 'allocate'
<jokke> wth
<jokke> oh
<jokke> i'm an idio
<jokke> t
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
akaiiro has quit [Remote host closed the connection]
akaiiro has joined #crystal-lang
Heaven31415 has quit [Quit: Leaving]
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
Creatornator has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 252 seconds]
DTZUZO_ has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]