jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.18.7 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<travis-ci> crystal-lang/crystal#d777ce2 (master - Fixed #3014: Bug when casting from a pointer to abstract class): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/145969560
cristianoliveira has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vKKt4
<crystal-gh> crystal/master 514778f Ary Borenszweig: Fixed #3016: self not correctly set in instance variable initializer
crystal-lang018 has quit [Quit: Page closed]
onec has quit []
matp has quit [Ping timeout: 252 seconds]
<travis-ci> crystal-lang/crystal#514778f (master - Fixed #3016: self not correctly set in instance variable initializer): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/145976022
Philpax has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
Kurisu has joined #crystal-lang
Cidan is now known as zz_Cidan
cristianoliveira has joined #crystal-lang
matp has joined #crystal-lang
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
justinmcp has joined #crystal-lang
datanoise has joined #crystal-lang
aeosynth has joined #crystal-lang
<Kurisu> Hmmm, why this case could not pass type checking? https://play.crystal-lang.org/#/r/14cf
<aeosynth> can i send a proc to a block?
<aeosynth> eg block do proc end
<aeosynth> or how do i define a block somewhere, and use that as the block argument?
<Kurisu> Well, like this? https://play.crystal-lang.org/#/r/14cj
<aeosynth> so functions aren't first class like in js?
<aeosynth> ideally i could send the proc without needing a wrapper block
<Kurisu> Yeah, In Ruby-like languanges, functions are not first class.
<Kurisu> *language
<aeosynth> alright, thanks
matp has quit [Remote host closed the connection]
aeosynth has quit []
wiiw has quit [Quit: Ctrl-c]
<Kurisu> The above case maybe wrong, like this https://play.crystal-lang.org/#/r/14df
pawnbox has joined #crystal-lang
pawnbox has quit [Client Quit]
pawnbox has joined #crystal-lang
cristianoliveira has quit [Ping timeout: 260 seconds]
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Kurisu has joined #crystal-lang
ponga has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
pawnbox_ has quit [Remote host closed the connection]
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
Kurisu has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 276 seconds]
mark_661 has joined #crystal-lang
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 252 seconds]
Philpax has quit [Ping timeout: 240 seconds]
soveran has quit []
pawnbox has quit [Remote host closed the connection]
cristianoliveira has joined #crystal-lang
cristianoliveira has quit [Ping timeout: 264 seconds]
Kurisu has joined #crystal-lang
zodiak_ has quit [Ping timeout: 252 seconds]
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
<BlaXpirit> Kurisu, about the sample you sent - the fact that the result `bar()` .is_a Int32 doesn't mean the same function will return a Int32 the next time it's called
<BlaXpirit> I don't see any neat solution for this seemingly synthetic exampel
<Kurisu> BlaXpirit, I add `if foo.bar.is_a? Int32` cause I want compiler could infer the type automatically.
<Kurisu> In this `if` branch, the `foo.bar`'s type is Int32 rather than (Int32 | Nil), that's I want to do so I add it.
<BlaXpirit> Kurisu, well yes, the first time you call foo.bar() it is indeed Int32, cool, but inside that branch you call it a second time, and who knows what that function might return now
<Kurisu> BlaXpirit, I got it, thanks.
<BlaXpirit> Kurisu, these "stupid" situations don't happen often. maybe there's a better way to do what you're trying to do. please show a more "real" example.
<Kurisu> BlaXpirit, well, I think it's a usual case, an object instantiate and it's attribute would be assigned later.
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BlaXpirit> Kurisu, sure, but an integer is not a usual thing for such an attribute. typically it would start as zero
<BlaXpirit> c++ doesn't even have a way to express this
Kurisu has joined #crystal-lang
Philpax has joined #crystal-lang
Kurisu has quit [Quit: Textual IRC Client: www.textualapp.com]
Kurisu has joined #crystal-lang
<Kurisu> BlaXpirit, you are right.
<BlaXpirit> Kurisu, not sure if you saw my messages "Kurisu, sure, but an integer is not a usual thing for such an attribute. typically it would start as zero" "c++ doesn't even have a way to express this"
<Yxhuvud> zero, or even worse, uninitialized.
<Kurisu> BlaXpirit, I saw it, thank you. and I think the keyword `as` must be abused, it could cause a ton of type errors https://play.crystal-lang.org/#/r/14ex.
<BlaXpirit> Kurisu, yes, it's for when you're absolutely sure. well, a runtime error isn't so horrible either, it can be caught
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<trapped> right this moment i really need help from someone living in amsterdam or utrecht
Kurisu has joined #crystal-lang
datanoise has joined #crystal-lang
ome has joined #crystal-lang
<Kurisu> BlaXpirit, but always use `.is_a?` is not bad, I don't see any cases `.is_a?` can't do but `as`.
Kurisu has quit [Client Quit]
datanoise has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
Kurisu has joined #crystal-lang
pawnbox has joined #crystal-lang
matp has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
cristianoliveira has joined #crystal-lang
cristianoliveira has quit [Read error: Connection reset by peer]
ponga has quit []
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
efi has joined #crystal-lang
<efi> Hi, again!
<efi> In Ruby Dir["/"] returns ["/"] - in crystal I get "Empty glob pattern (ArgumentError)" - Which is strange, given that even Dir[""] works...
<efi> Is that a bug or a feature?
paulcsmith_ has joined #crystal-lang
greengriminal has joined #crystal-lang
srabuini has quit []
<jhass> probably a bug
<jhass> pull request welcome ;)
paulcsmith_ has quit [Ping timeout: 258 seconds]
<efi> k, thx. I'll see what I can do.
sebasr has joined #crystal-lang
A124 has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] timcraft opened pull request #3018: Fix pkg-config: command not found errors (master...silence-pkg-config-errors) https://git.io/vK6ml
<efi> Hmmm. This Dir.glob thing is quite strange.
pawnbox_ has quit [Remote host closed the connection]
<efi> Here https://github.com/crystal-lang/crystal/blob/6ccfb690eef31fdf3ca8ec8e9d3cb11afafc4883/src/dir/glob.cr#L109 a (potentially stripped) pattern (a String) is compared to the Directory-Separator (a char).
<efi> That is never true.
<jhass> >> "f" == 'f'
<DeBot> jhass: # => false - https://carc.in/#/r/14ey
<jhass> right
<efi> Wouldn't it be cool, if the compiler issued a warning, when it encountered something like "/"=='/' which is degradable to a primitive truth value?
<efi> Line ruby's warning when I use a = in a conditional...
<jhass> it's not so easy, `==` is just a method call with possibly arbitrary behavior. And can be redefined
<efi> Ah, OK. There is no js-like "==="?
A124 has joined #crystal-lang
<efi> hmmm. there even seems to be a === but its signature is Object#===(other) - without any type defined...
<efi> Ok, looked it up. === means "Case equality" - so it's even weaker than ==
<jhass> yes, in Crystal (and Ruby) === is weaker, == is already strong
Kurisu has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<efi> Hmmm. I think I can't untangle that complex by myself. I will open an issue over at github.
<jhass> ok :)
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 258 seconds]
efi has quit [Ping timeout: 250 seconds]
Kurisu has joined #crystal-lang
greengriminal has quit [Ping timeout: 264 seconds]
greengriminal has joined #crystal-lang
Raimondi has quit [Quit: All hail WeeChat 1.5-dev!]
greengriminal has quit [Quit: This computer has gone to sleep]
Raimondi has joined #crystal-lang
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kurisu has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
greengriminal has joined #crystal-lang
datanoise has joined #crystal-lang
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ome has quit [Quit: Connection closed for inactivity]
Oliphaunte has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Kurisu has joined #crystal-lang
Raimondii is now known as Raimondi
pawnbox has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vK6Pa
<crystal-gh> crystal/master cf24ccf Ary Borenszweig: Added macro methods to access a node's location. Related to #3017
pawnbox has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 240 seconds]
Kurisu has quit [Ping timeout: 244 seconds]
datanoise has quit [Ping timeout: 252 seconds]
<travis-ci> crystal-lang/crystal#cf24ccf (master - Added macro methods to access a node's location. Related to #3017): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/146151390
datanoise has joined #crystal-lang
mark_661 has quit [Remote host closed the connection]
zacts has joined #crystal-lang
<zacts> hi
<zacts> this language looks awesome!
<jhass> <3
<zacts> I can't wait to try it out
<zacts> (I realize it's still in the early development phases, but it still looks cool)
<zacts> perhaps if I like it enough, and I can afford it, I'll donate to the project
<jhass> great
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
zodiak has joined #crystal-lang
zacts has quit [Ping timeout: 258 seconds]
<crystal-gh> [crystal] jhass closed pull request #3018: Fix pkg-config: command not found errors (master...silence-pkg-config-errors) https://git.io/vK6ml
Oliphaunte has joined #crystal-lang
pawnbox has quit [Ping timeout: 272 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
<travis-ci> crystal-lang/crystal#efb896c (master - Fix pkg-config: command not found errors (#3018)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/146165717
trapped has quit [Read error: Connection reset by peer]
<FromGitter> <sdogruyol> zacts that'd be awesome
efi has joined #crystal-lang
Raimondi has quit [Quit: All hail WeeChat 1.5-dev!]
efi has quit [Quit: Page closed]
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #crystal-lang
<FromGitter> <sdogruyol> is there a public page that we list public Crystal groups, meetups, gatherings e.g?
<jhass> eh, reddit I guess
<FromGitter> <sdogruyol> uhm sorry if i wasnt clear enough
<FromGitter> <sdogruyol> i meant a dedicated page for user groups, meetups, gathering
<FromGitter> <sdogruyol> s*
buggs has quit [Ping timeout: 250 seconds]
<RX14> i still think we should have used /r/crystal instead of /r/crystal_programming
<RX14> but /r/crystal is nicer
datanoise has quit [Ping timeout: 252 seconds]
<RX14> nicer name
<RX14> shorter
<RX14> why not just redirect one to the other
<jhass> idk, I don't have admin rights to either
<jhass> and dunno reddit
<jhass> can one even properly merge, transfer history and shit?
<RX14> if you got a post on crystal_programming and tried really hard to get everyone to upvote it it would get on the frontpage of anyone subscribed
<RX14> because the frontpage algorithm requires less votes for smaller subreddits
<BlaXpirit> can't merge, can't redirect, can make custom CSS and add a big message to move to the other one
<jhass> meh, sucks
<FromGitter> <sdogruyol> well i do think that these community stuff are necessary to get traction
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
zacts has joined #crystal-lang
datanoise has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has joined #crystal-lang
datanoise has quit [Quit: WeeChat 1.5]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <jwoertink> My company is thinking about porting a super small rails app we have over to crystal just to try it out. I've seen a few different "rails inspired" frameworks. Anyone have any opinions on any of them?
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vKi2r
<crystal-gh> crystal/master 4f55e90 Ary Borenszweig: Compiler: clean up and document Program and some related types.
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<FromGitter> <aurelien-ldp> There is a good list at http://awesome-crystal.com
<FromGitter> <jwoertink> oh cool. I see Moonshine is on this list, but Moonshine is deprecated.
<FromGitter> <jwoertink> I'll check these out, but I'd still like opinions on what everyone else has used
<jhass> the stuff I did only had 2-4 endpoints at most, but I like artanis
<jhass> you have to do a lot on you own there though
<FromGitter> <aurelien-ldp> Kemal seems to be well maintained
<FromGitter> <aurelien-ldp> https://github.com/sdogruyol/kemal
<FromGitter> <jwoertink> I've used kemal, and definitely liking it so far.
<RX14> kemal isn't rails inspired but it seems to be the most well maintained framework out there
<RX14> i think it would be really really nice if kemal split like sinatra to be able to have controller-style objects
<FromGitter> <aurelien-ldp> Amethyst seemed great and rails inspired but not sure it is still maintained
<RX14> if you really want something rails-like you probably want a crystal routing library like crouter or that other one, then use active-record.cr
<RX14> then piece it together from that
<RX14> active_record.cr is maintained
<FromGitter> <jwoertink> that's good to know!
<jhass> active_record.cr has little to nothing to do with Rails ActiveRecord though
<jhass> still it's the only ORM we got I think
<RX14> yeah
<FromGitter> <jwoertink> We have 3 devs on our team, so which ever we choose, I'm sure we'll start contributing back to that framework
<RX14> what section of awesome-crystal would fast_irc.cr go under?
<RX14> toro and crouter are crystal's routing libraries kinda, although you can quickly wrap kemal's tree shard to do it
<travis-ci> crystal-lang/crystal#4f55e90 (master - Compiler: clean up and document Program and some related types.): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/146226029
pawnbox has quit [Ping timeout: 260 seconds]
<FromGitter> <jwoertink> cool. I think we will start there, and see where it goes
<FromGitter> <jwoertink> thanks!
pawnbox has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #3023: Added lazy form to `Object#getter` macro. Fixes #3022 (master...feature/lazy_getter) https://git.io/vKiPx
Philpax has quit [Ping timeout: 252 seconds]
Philpax has joined #crystal-lang
Dreamer3 has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
A124 has quit [Quit: '']
A124 has joined #crystal-lang
A124 has quit [Quit: '']
A124 has joined #crystal-lang
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]