jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.8.0 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #crystal-lang
Liothen has joined #crystal-lang
sfcgeorg_ has quit [Quit: Textual IRC Client: www.textualapp.com]
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jokke has quit [Ping timeout: 256 seconds]
jokke1 has joined #crystal-lang
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n0xff has quit [Ping timeout: 246 seconds]
n0xff has joined #crystal-lang
havenwood has joined #crystal-lang
Philpax has joined #crystal-lang
<jhass> waj: around?
jtarchie has quit [Quit: Connection closed for inactivity]
ponga has quit [Quit: Connection closed for inactivity]
havenwood has quit [Ping timeout: 252 seconds]
havenwood has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 255 seconds]
kulelu88 has quit [Ping timeout: 240 seconds]
NeverDie has quit [Quit: http://radiux.io/]
Philpax has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Client Quit]
Philpax has quit [Ping timeout: 250 seconds]
Philpax has joined #crystal-lang
nakilon has joined #crystal-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
vjdhama has joined #crystal-lang
Ven has joined #crystal-lang
greenarrow has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vjdhama has quit [Ping timeout: 256 seconds]
nakilon has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
elia has joined #crystal-lang
ozra has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BlaXpirit has joined #crystal-lang
Ven has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
kulelu88 has joined #crystal-lang
jokke1 is now known as jokke
<jokke> i get this error when running shard check: https://p.jreinert.com/WEUFMW/
<crystal-gh> [crystal] technorama opened pull request #1576: Rename Mutex#destroy -> Mutex#finalize. (master...f/mutex_fix) http://git.io/vnMpW
<dzv> shards check in which project?
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sandelius has joined #crystal-lang
<crystal-gh> [crystal] technorama opened pull request #1577: Show the directory in the error message when Dir.chdir raises. (master...f/chdir_error_str) http://git.io/vnDki
Ven has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> jokke: with latest shards too= (shards-git from the AUR)
<jhass> ?
<jokke> jhass: i'll just check
<jokke> jhass: yeah
<jhass> issue time then ;)
<jokke> \o/
ssvb has quit [Ping timeout: 240 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybasil has quit [Read error: Connection reset by peer]
<jokke> should i make a pull request removing ncurses?
<jokke> asterite:
leafybas_ has quit []
leafybasil has joined #crystal-lang
<crystal-gh> [crystal] jreinert opened pull request #1578: remove ncurses bindings from stdlib (master...remove-curses) http://git.io/vnDGW
apt-get has joined #crystal-lang
<jhass> jokke: issue is that your repo is called ncurses-crystal but you pointed to ncurses in your shard.yml, but it should give a proper error message there
<jokke> yes
<jokke> i got it
<jokke> stupid mistake :/
<greenarrow> Is this possible to do? https://gist.github.com/ahmetabdi/0073bff2a06d84d82693
<greenarrow> trying to nest a json mapping
<jhass> greenarrow: yes but you need to do a separate class
<jhass> and then images: Array(Image) or so
<greenarrow> ah ok thats the way I have been doing but just wondered if you could do it all within the same class thanks
<jhass> often it's handy to just nest the class into the current one ;)
<jhass> class Foo; class Image; json_mapping(...); end; json_mapping({images: Array(Image)})
<jhass> keeps them visually related
<greenarrow> yeah that's handy in my case will do that ty
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apt-get has quit [Ping timeout: 246 seconds]
vjdhama_ has joined #crystal-lang
ozra has quit [Ping timeout: 246 seconds]
ingsoc has joined #crystal-lang
ssvb has joined #crystal-lang
apt-get has joined #crystal-lang
vjdhama_ has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dzv> is there a way to transform a symbol to an enum?
vegai has left #crystal-lang [#crystal-lang]
<jhass> .parse(symbol.to_s) I guess
apt-get_ has joined #crystal-lang
sfcgeorge has joined #crystal-lang
<jokke> jhass: is there a way to define [your github user] for crystal init?
<jhass> no idea
<jokke> ok
<jokke> yeah
<jokke> on it
apt-get has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
Philpax_ has joined #crystal-lang
<jokke> oh
<jokke> pr incoming
Philpax has quit [Ping timeout: 255 seconds]
<crystal-gh> [crystal] jhass closed pull request #1577: Show the directory in the error message when Dir.chdir raises. (master...f/chdir_error_str) http://git.io/vnDki
<travis-ci> manastech/crystal#7b4f8f1 (master - Merge pull request #1577 from technorama/f/chdir_error_str): The build passed. https://travis-ci.org/manastech/crystal/builds/81940964
Philpax_ has quit [Quit: Leaving]
kulelu88 has quit [Quit: Leaving]
<buggs> String.index seems rather slow
<jhass> release mode?
<jhass> also what makes you say that? Char or String overload?
ingsoc has quit [Read error: Connection reset by peer]
<BlaXpirit> hm String.index is indeed quite dumb
<BlaXpirit> or rather it should be dumb and rely on utf8 magic to gain performance
<BlaXpirit> it should be a simple bytewise search in both cases
<jhass> ?
<BlaXpirit> String.index decodes utf-8 on the fly and compares
<BlaXpirit> it shouldn't do that, just compare the bytes
apt-get_ has quit [Read error: No route to host]
apt-get has joined #crystal-lang
<greenarrow> anyone know who created http://www.crystalweekly.com/
<BlaXpirit> jhass, one character in utf-8 can never be a "substring" of another one
<BlaXpirit> which means that, for example, non-ascii characters never have any bytes below 128 in them
<BlaXpirit> at least i'm quite sure
<jhass> BlaXpirit: it decodes to handle the offset parameter
<jhass> then compares bytes
<BlaXpirit> you're right
<greenarrow> jhass I can't see where it's happening in the code but on this page I see a random "ml>" at the bottom http://www.crystalweekly.com/about/
<jhass> mmh
<greenarrow> just me?
<jhass> no it's there
<sfcgeorge> Ooh cool. An "example" newsletter would be nice though.
<jhass> greenarrow: no idea either
<greenarrow> so weird
<greenarrow> so so weird
Ven has joined #crystal-lang
greenarrow has quit [Quit: 500]
<dzv> how can you print a class variable using lldb?
<crystal-gh> [crystal] jreinert opened pull request #1580: add github_name option to init config and read from global git config (master...github-user) http://git.io/vnDjq
Philpax has joined #crystal-lang
<jhass> dzv: I don't think that's available yet
trapped has joined #crystal-lang
<jokke> jhass: any opinion on https://github.com/manastech/crystal/pull/1580 ?
<jhass> my current opinion is that I want to kill rpm
<jhass> but otherwise lgtm
ssvb has quit [Ping timeout: 246 seconds]
<jokke> rpm?
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
greenarrow has joined #crystal-lang
NeverDie has joined #crystal-lang
NeverDie has quit [Client Quit]
<jhass> http://lists.rpm.org/pipermail/rpm-list/2012-July/001228.html 8 years later, topic is ignored still
<jokke> ah rpm
<jokke> lol
<jhass> http://serverfault.com/a/624910 it's not like they fixed any of this
<jhass> well
<jhass> I guess that means no signatures for the rpm folks
<jhass> won't put the main key unprotected on a build box
BlaXpirit has quit [Quit: Konversation]
BlaXpirit has joined #crystal-lang
NeverDie has joined #crystal-lang
<greenarrow> I wonder where crystal will be in a few years
<jokke> greenarrow: dominating the world of course?
<greenarrow> i do hope so
<jokke> omg
<jokke> there are really abstract classes in Crystal?
<greenarrow> i was looking at that too https://github.com/oakesja/crystal-vs-ruby
<jokke> awesome
Ven has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
jeromegn has joined #crystal-lang
greengriminal has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ssvb has joined #crystal-lang
<jhass> asterite: waj so, I basically got a setup where we can do nightlies from, at least for the next couple of months. A few details to discuss about actually doing so of course, ping me if you have time for it
<jokke> do you think json_mapping could somehow be made polymorphic? i know it's a stretch but i'd imagine it would be very useful.
<jhass> jokke: you mean sort of autodetection? ImageOrVideo.from_json() #=> Image|Video ?
<jokke> yes, that and parent class json_mappings merged into the own json_mappings
<jokke> i guess that would require some serious macro magic and maybe it's not even doable
<jokke> i have an abstract class here which has certain attributes that will be included in the json of every subclass instance
Ven has joined #crystal-lang
<jokke> hey
<jokke> wait a second
<jokke> it's not that hard maybe
<jhass> mmh
<jokke> a few conditional super calls here and there :>
<jhass> calling super in the constructor might be enough, yeah
<jokke> but it should be optional
<jokke> i think
<jhass> gotta check the constructors of the parent type whether there's one accepting the pull parser, yeah
<jokke> yeah
<jokke> jhass: do you think it should be default behavior?
<jhass> I'm not sure
<jokke> me neither..
<jhass> maybe in non_strict mode? not obvious enough I guess
<jokke> no..
<jokke> extra param merge_parent?
<jhass> maybe a constant in the parent?
<jhass> idk
<jokke> ah
<jokke> no
<jokke> just another macro
<jhass> or that
<jhass> but then error if the parent doesn't actually define one
<jokke> yeah...
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jokke> jhass: can i somehow access the parent class of @type and check for constants?
<jokke> i'd like to raise a compile time error if trying to extend the json mapping of a parent that doesn't have one
dyulax has joined #crystal-lang
<jokke> ah
<jokke> great
<crystal-gh> [crystal] adlerhsieh opened pull request #1581: Refactor case in patterns for Time#to_s (master...master) http://git.io/vny13
<waj> jhass: that's awesome! I'll review it later but it will be great if we can have nightly builds
bmcginty has joined #crystal-lang
<jhass> waj: okay, let's start with the easy question. Separate repo? I'd say yes, for reasons coming later, but mainly keeping both in sync would be harder
<dzv> is there a way to return a compile time string for "#{self.class.to_s}:#{current_method_name}"
<jhass> waj: currently I have crystal-dist.aeshna.de pointing at the repos, do we want an official domain?
<jhass> waj: next up: rpm completely screwed up automatic signing. It doesn't allow signing with a signing subkey, so you would have the primary key unprotected (or with cleartext password stored somewhere on the buildserver), so I'd only offer a signed deb repo
<bmcginty> I've been looking through some of the std specs for Crystal, starting with the string spec. A bunch of the specs are using assert instead of the "it" format. Is there a reason for this?
<jhass> bmcginty: boilerplate, simply getting rid of it. assert wraps it with a dummy title
<waj> mm... do we really need nightly packages or only tar.gz ?
<waj> btw... separate repo for what? omnibus-crystal?
<jhass> waj: no, the packages
<jhass> and I'd like at least the deb packages, way easier to install on travis
<bmcginty> jhass: thanks.
<waj> I understand
<waj> ok, I'd say a different repo then
<jhass> and doing the rpm packages afterwards was a fairly low hanging fruit
<waj> dzv: I think there is currently no way. What would you use that for? logging?
<jhass> waj: next up: since I can sign the deb packages I'd like to do so, question is, should I publish my own key for it or would you give me a (dedicated) signing subkey that I would be allowed to store unprotected (that means no passphrase on it) on a buildserver?
<jhass> (of course I would walk you through creating it ;) )
<waj> jhass: do you know https://bintray.com/ ? I have reserved the project: https://bintray.com/crystal
<waj> but I never had the time to really test it
<jhass> nope, don't know
<jhass> it
<dzv> waj: yes logging
<jhass> waj: though I have the buildserver ready really, we could begin testing it immediately after deciding on the points I'm posing atm ;)
<crystal-gh> [crystal] asterite closed pull request #1581: Refactor case in patterns for Time#to_s (master...master) http://git.io/vny13
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/vnyjX
<crystal-gh> crystal/master 2f23207 Joakim Reinert: remove ncurses bindings from stdlib
<crystal-gh> crystal/master 80a187b Joakim Reinert: Merge branch 'master' into remove-curses
<crystal-gh> crystal/master 8d1d4b4 Ary Borenszweig: Merge pull request #1578 from jreinert/remove-curses...
Ven has joined #crystal-lang
<waj> jhass: sure thing, bintray doesn't build anything I was thinking just for hosting the repos
greengriminal has quit [Quit: This computer has gone to sleep]
<jhass> yeah, but we can always move that, for now I have a nginx running on the buildbox
<waj> absolutely!
vjdhama has joined #crystal-lang
apt-get has quit [Read error: No route to host]
<crystal-gh> [crystal] asterite closed pull request #1576: Rename Mutex#destroy -> Mutex#finalize. (master...f/mutex_fix) http://git.io/vnMpW
<jhass> so watcha think, official domain, separate key or signing subkey?
havenwood has joined #crystal-lang
apt-get has joined #crystal-lang
<asterite> We all seem to agree on #1580. Merge?
<jhass> !enable GithubIssues
<DeBot> jhass: Enabled GithubIssues.
<jhass> #1580
<DeBot> https://github.com/manastech/crystal/pull/1580 (add github_name option to init config and read from global git config)
<asterite> We should somehow have a way to know when to merge something...
<jhass> yup, sounds good
<asterite> Could we somehow put DeBot to program crystal? What's missing?
<jhass> self awareness, probably
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vnSTv
<crystal-gh> crystal/master 9ddcc6c Joakim Reinert: add github_name option to init config and read from global git config
<crystal-gh> crystal/master f5f5a9e Ary Borenszweig: Merge pull request #1580 from jreinert/github-user...
<DeBot> https://github.com/manastech/crystal/pull/1580 (add github_name option to init config and read from global git config)
<waj> official domain? sure, I can point the DNS to your server
greenarrow has quit [Quit: 500]
<jhass> nightlies.crystal-lang.org? watcha think?
<crystal-gh> [crystal] kostya closed pull request #1571: allow nil values in record (master...record_nil) http://git.io/vniuS
<waj> signing key... I have no idea :(
<DeBot> https://github.com/manastech/crystal/pull/1571 (allow nil values in record)
greenarrow has joined #crystal-lang
<jhass> !ignore crystal-gh
<DeBot> jhass: I will ignore crystal-gh now.
<asterite> I also think #1529 looks good. I honestly don't know much about git and remotes, but it sounds reasonable to prefer origin
<DeBot> https://github.com/manastech/crystal/pull/1529 (Doc generator: Prefer origin if it's a Github remote)
<jhass> well, my opinion should be obvious :D
<travis-ci> manastech/crystal#567f2e1 (master - Merge pull request #1581 from adlerhsieh/master): The build passed. https://travis-ci.org/manastech/crystal/builds/81973054
<DeBot> https://github.com/manastech/crystal/pull/1581 (Refactor case in patterns for Time#to_s)
vjdhama has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vnStF
<crystal-gh> crystal/master d11cbfb Jonne Haß: Doc generator: Prefer origin if it's a github remote, else the first...
<crystal-gh> crystal/master 8cc46c7 Ary Borenszweig: Merge pull request #1529 from jhass/docs_repo_detection...
<jhass> <3
<jhass> waj: personally I'd prefer a single key, so getting a signing subkey from you
<travis-ci> manastech/crystal#8d1d4b4 (master - Merge pull request #1578 from jreinert/remove-curses): The build passed. https://travis-ci.org/manastech/crystal/builds/81973232
<DeBot> https://github.com/manastech/crystal/pull/1578 (remove ncurses bindings from stdlib)
greengriminal has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> manastech/crystal#995f889 (master - Merge pull request #1576 from technorama/f/mutex_fix): The build passed. https://travis-ci.org/manastech/crystal/builds/81973692
<DeBot> https://github.com/manastech/crystal/pull/1576 (Rename Mutex#destroy -> Mutex#finalize.)
Ven has joined #crystal-lang
<travis-ci> manastech/crystal#f5f5a9e (master - Merge pull request #1580 from jreinert/github-user): The build passed. https://travis-ci.org/manastech/crystal/builds/81974099
<DeBot> https://github.com/manastech/crystal/pull/1580 (add github_name option to init config and read from global git config)
NeverDie has quit [Quit: http://radiux.io/]
<jhass> waj: anyway, ping me back if you have time to discuss (and implement) this ;)
<travis-ci> manastech/crystal#8cc46c7 (master - Merge pull request #1529 from jhass/docs_repo_detection): The build passed. https://travis-ci.org/manastech/crystal/builds/81974907
<DeBot> https://github.com/manastech/crystal/pull/1529 (Doc generator: Prefer origin if it's a Github remote)
<jokke> jhass: i changed my mind
<jokke> jhass: i think it should be default and no way to change it
<jokke> following reason: if i subclass a class that has a json_mapping then i already have all getters and setters of the parent class created by the macro
<jokke> it would be weird if they wouldn't be included in the mapping by default
<jhass> asterite: ^ we've been discussing having json_mapping call its super constructor if present, so you could inherit and extend them. Thoughts?
<jokke> also i could always overwrite keys in the mapping
<jokke> in the child
<jokke> only thing i couldn't do is leave keys out completely
<asterite> I'd need to see some code to understand it
<jokke> but that's not possible with oo programming and methods either
apt-get has quit [Read error: Connection reset by peer]
apt-get has joined #crystal-lang
Philpax_ has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vnSgE
<crystal-gh> crystal/master 90b5c93 Ary Borenszweig: Mark Array, StaticArray and Slice `#[]` and `#[]=` methods with AlwaysInline
Philpax has quit [Ping timeout: 240 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leafybas_ has joined #crystal-lang
NeverDie has joined #crystal-lang
leafybasil has quit [Ping timeout: 264 seconds]
<travis-ci> manastech/crystal#90b5c93 (master - Mark Array, StaticArray and Slice `#[]` and `#[]=` methods with AlwaysInline): The build passed. https://travis-ci.org/manastech/crystal/builds/81980817
BlaXpirit has joined #crystal-lang
vjdhama has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
<jokke> asterite: it's not possible to iterate over a constant of the superclass in a macro right?
<jokke> which is a Hash literal
<jokke> i basically would need to merge two hashes together. the one from the current class with the one from its super class
andrew-l has quit [Remote host closed the connection]
<asterite> Mmm... we'd need a way to turn a Path into a type, I guess
<jokke> yeah that would be super useful
<jokke> i've been wrapping my head around this for a while now, but i can't think of any solution to this json_mapping extending that wouldn't sacrifice performance
<jokke> except if i could merge a hash literal with another hash literal by path
<jokke> asterite: alot of work? i can't say i understand the compiler that well to being able to poke around
Philpax_ has quit [Ping timeout: 260 seconds]
<jokke> also what would be the way to access a constant from the superclass?
<jokke> i see there's `constants`
<jokke> but i would need something like superclass::FOO
Ven has joined #crystal-lang
Ven has quit [Client Quit]
greenarrow has quit [Quit: Textual IRC Client: www.textualapp.com]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
trapped_ has joined #crystal-lang
Raimondii has joined #crystal-lang
elia has quit [Client Quit]
elia has joined #crystal-lang
BlaXpirit has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
BlaXpirit has joined #crystal-lang
trapped has quit [Ping timeout: 244 seconds]
Raimondi has quit [Ping timeout: 244 seconds]
Papierkorb has quit [Ping timeout: 244 seconds]
rhaps0dy has quit [Ping timeout: 244 seconds]
rhaps0dy_ has joined #crystal-lang
Papierkorb has joined #crystal-lang
Raimondii is now known as Raimondi
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
elia has quit [Ping timeout: 268 seconds]
<jokke> asterite: how do i submit changes to the compiler that need bootstrapping?
<dzv> asterite/waj would you consider a precise GC?
<Papierkorb> Is there a HAML renderer for Crystal?
<jhass> jokke: two PRs I guess, one that prepares and that we can merge in the current cycle, one to be merged after the next release
<jokke> ok
<jhass> Papierkorb: didn't see any. I'd be much more interested in the non-evaling slim variant anyway
<Papierkorb> what templating engines are there currently?
<jokke> ecr
<jhass> a ERB clone ^
<jhass> I think there was mustache? let's see
<jokke> hm ok apparantly my changes don't need bootstrapping after all
<Papierkorb> In general, what's the 'state' of building web applications with Crystal? Esp. interested for back-end/API stuff.
<jokke> Papierkorb: there's amethyst
<jokke> api stuff is easy enough already
<jhass> I like artanis
<jokke> there's good json support
<jokke> and a fast http server
<jhass> pg driver, some first ORM experiments
<Papierkorb> How's ORM support? PSQL with JSONB column support is pretty much all I need there. I saw that there's a redis client already too
<jhass> I only have https://github.com/waterlink/active_record.cr in mind atm
<jhass> https://github.com/search?utf8=%E2%9C%93&q=language%3Acrystal&type=Repositories&ref=searchresults 309 repos github recognizes as primarily crystal. So still something you could page through if you wanted ;)
<Papierkorb> thanks everyone.
<waj> dzv: eventually, yes
<waj> boehm gc can be more precise actually
<waj> I've been researching MPS also: http://www.ravenbrook.com/project/mps/
<jhass> the license looks cumbersome on first look though :/
pragmatism has joined #crystal-lang
<dzv> i think that's gpl compatible, but it would require open source for any program using it
<crystal-gh> [crystal] asterite opened pull request #1583: Make empty arrays not allocate memory until needed (master...array_null_pointer) http://git.io/vn9dH
<jhass> GPL is not exactly good for something like Crystal where you want to do binary distribution from. That's why there's LLVM instead of turning GCC into something equally reusable
<dzv> so mps isn't viable due to licensing. unless we ask for an exception
NeverDie has quit [Quit: http://radiux.io/]
<jokke> any ideas why this segfaults? https://p.jreinert.com/8DS/crystal
<jokke> any ideas why this segfaults? https://p.jreinert.com/8DS/ruby
<jhass> dzv: looks to me that way, sadly :/
<jokke> (it won't build for you since it needs the has_constant? macro method)
<jhass> at build or at runtime?
<jokke> at runtime
<jokke> no
<jokke> ah
<jokke> yes
<jokke> at runtime
<jokke> sorry for the confusion
<waj> it's a stack overflow
NeverDie has joined #crystal-lang
<jokke> yeah
<jokke> because of Class being subclass of Object?
<jhass> I thinks so, yeah
<jokke> okay
<crystal-gh> [crystal] adlerhsieh opened pull request #1584: Add documentation to Time class (master...master) http://git.io/vn9jZ
<jokke> oh god... i have absolutely no clue how to write specs for this...
<jokke> there's also no specs for constants
<jokke> `constants` i mean
shama has joined #crystal-lang
qard has joined #crystal-lang
<jhass> waj: so what do you think, can we get the nightlies setup today so people can beta test it over the weekend before we announce it?
<crystal-gh> [crystal] jreinert opened pull request #1585: add has_constant? macro method (master...has-constant) http://git.io/vnHTK
<RX14> what's the point of nightlies? Can't people just build it themselves...
<RX14> also, i've seen a LOT of complaining that crystal doesn't run on windows... It would be nice if some dev time was dedicated towards that.
apt-get has joined #crystal-lang
apt-get has quit [Remote host closed the connection]
leafybasil has quit [Ping timeout: 246 seconds]
<asterite> jokke: I think we would need to discuss how to do what you want. Maybe you can submit an issue with your use case?
<jokke> asterite: alright
apt-get has joined #crystal-lang
apt-get has quit [Client Quit]
<jhass> RX14: mainly having a Travis build against them
<RX14> jhass, isn't every commit tested anyways?
<jhass> RX14: not for crystal, for crystal projects
<RX14> oh, i see
Locke23rus has joined #crystal-lang
<asterite> jokke: thanks. But can you also show in what case you want to use that? I heard you were talking about inheriting and json_mapping
NeverDie has quit [Quit: http://radiux.io/]
NeverDie has joined #crystal-lang
<jokke> okay
havenwood has joined #crystal-lang
Locke23rus has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
<sdogruyol> hey all
<jokke> sdogruyol: o/
<sdogruyol> jokke: hey how are you doing
<jokke> :) fine thanks. just heading home
<sdogruyol> jokke: great :)
<sdogruyol> meanwhile i'm trying make Travis CI happy with shards :(
<jokke> and hoping for great new crystal compiler features ;)
<jhass> sdogruyol: ah I didn't check yet if my PR worked, got a link? :D
<sdogruyol> since shards is an external dependency Travis is failing on this https://github.com/Codcore/amethyst/pull/57
<sdogruyol> jhass: hey how are you
<jhass> fine fine
<sdogruyol> jhass: great :)
<jhass> can you push a gain?
<jhass> that build is two days old
<sdogruyol> jhass: let me see if amethyst is tracking head
<sdogruyol> i think it's not tracking head
<sdogruyol> it's tracking master on travis let me change it
<jhass> nah, but I updated the Travis support to install shards
<buggs> is there a byte alternative to String.index?
<jhass> buggs: depends on your usecase I guess
<sdogruyol> jhass: so i dont need to track head for this build to pass?
<jhass> sdogruyol: I don't know what you mean by that
<jhass> just repushing should be enough
<sdogruyol> jhass: ok trying now
<buggs> i'm curating a regex benchmark, i'm implementing various versions of simple grep
<jokke> wow, internet on german railroads is so crappy...
<jhass> yeah
<buggs> part of the tests are strstr/memmem greps
havenwood has quit [Ping timeout: 244 seconds]
<buggs> given pcre in crystal it will not be competetive
<jhass> buggs: if your strings are all ascii it should down to a memcmp
<jhass> *boil
<buggs> yes
<sdogruyol> jhass: yay \-/
<sdogruyol> jhass: it passed :P
<jhass> \o/
<buggs> (with the exception that in c accessing a string beyond '\0' would not be ok but for mem it would)
<buggs> so what would be the fastest non utf-8 decoding version in crystal
<buggs> ?
<jhass> buggs: well you can always go lowlevel, get the raw buffers and do whatever
havenwood has joined #crystal-lang
<jhass> but we try to keep the APIs mostly single purpose in stdlib instead of "fast for special case a, fast for special case b, fast for special case c"
<jhass> so you won't get String#index_screw_utf8
<buggs> well in c i also implemented some algorithms and a sse2 based version and a sse4str based one
<buggs> but fast regexes and ascii/mem compare are quite essential
<buggs> for many performance oriented tasks
<buggs> so if you give me multiple strategies to test, i will
<jhass> how about doing a external lib for now and when we see a lib used like everywhere we can think about integrating it into stdlib
<sdogruyol> i also agree with an external library first approach
NeverDie has quit [Quit: http://radiux.io/]
<buggs> well for crystal, for what i've seen, i guess integrating oniguruma would be one option
<buggs> external lib, as in C or in native crystal?
<sdogruyol> buggs: in crystal :)
<jhass> we don't do C exts :P
NeverDie has joined #crystal-lang
<sdogruyol> meanwhile is it a good practice to commit shard.lock or not?
<RX14> it's like Gemfile.lock
<RX14> i guess
<RX14> so yes
<jhass> there's a tiny bit of C++ in the codebase now because LLVM doesn't provide a C api for the debug builder stuff
<jhass> but that's it
<jhass> sdogruyol: yeah, better commit it
<sdogruyol> RX14: that's what i thought
<sdogruyol> ok :)
<RX14> unless it's a libray where you have to work with a range of versions ofc
<RX14> is what I heard sbout Gemfile.lock
<jhass> I prefer to even then lock it to have consistent results between CI and local
nakilon has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 240 seconds]
andrew-l has joined #crystal-lang
<dyulax> “Whenever your Gemfile.lock changes, always check it in to version control. It keeps a history of the exact versions of all third-party code that you used to successfully run your application.”
<dyulax> “When deploying your code to a staging or production server, first run your tests [...], make sure you have checked in your Gemfile.lock to version control.”
<dyulax> PHP's Composer states the same thing: “Commit your application's composer.lock (along with composer.json) into version control.”
<sdogruyol> dyulax: yeah
NeverDie has quit [Quit: http://radiux.io/]
<dyulax> even if your dependency is restricted to a minor version (2.0.3 instead of 2.*), you can't be sure if all dependency's dependencies are in the exact same version if you don't commit the .lock file.
NeverDie has joined #crystal-lang
vjdhama has quit [Ping timeout: 246 seconds]
nakilon has quit [Ping timeout: 272 seconds]
sdogruyol has quit [Remote host closed the connection]
apt-get has joined #crystal-lang
sdogruyo_ has joined #crystal-lang
willl has quit [Quit: Connection closed for inactivity]
sdogruyo_ has quit [Remote host closed the connection]
nakilon has joined #crystal-lang
<Papierkorb> Does someone have a hello world Websocket server example lying around?
<jhass> but something for samples/ would be welcome, the question is coming up way too often :P
NeverDie has quit [Quit: http://radiux.io/]
sdogruyol has joined #crystal-lang
<Papierkorb> Someone on the ML said "Yes, but please know that websocket is only partially implemented, so I don't think you'll be able to do a useful app with it right now." - What's missing?
<Papierkorb> Does the implementation pass the Autobahn Test Suite?
vjdhama_ has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
<jhass> I don't think anybody tried
<Papierkorb> Doing that now
<jhass> there have been a bunch of improvements since though
<Papierkorb> I recently implemented WS server-side, so I still have that lying around heh
NeverDie has joined #crystal-lang
nakilon has quit [Ping timeout: 250 seconds]
sdogruyol has joined #crystal-lang
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pragmatism has joined #crystal-lang
<sdogruyol> Papierkorb: that's a good question
<Papierkorb> sdogruyol: Well, it doesn't. I'm using https://gist.github.com/Papierkorb/093d6fd5c1522809fe73 as test server, but Autobahn complains that it receives a 404 Not Found when connecting?!
<sdogruyol> Papierkorb: how about filing an issue for this?
<Papierkorb> Firefox fails to connect, but that also might be because it's accessing localhost. Chrome works after I explicitly allow the access
<sdogruyol> Papierkorb: as you can see from the handler class it's pretty primitive :)
<sdogruyol> Papierkorb: and probably needs more stuff to be implemented
<Papierkorb> sdogruyol: yeah, would love to help there. I may have found the issue.
<Papierkorb> is the 'headers' structure matching keys case-sensitively?
<jhass> it should, yeah
<jhass> er, I mean it isn't
<Papierkorb> You mean it matches case-INsensitively?
<jhass> thought you'd ask for insensitive :P
<jhass> yes
<Papierkorb> Meh, Crystal fails to compile on Arch because it expects libcursesw.so.5, but arch comes with .so.6
<jhass> rm -rf src
<jhass> assuming you use the package and have built before
<Papierkorb> jhass: git clean -fdx helped, yeah. Now, on to new compiler errors. (I'm on master btw)
<Papierkorb> http://pastebin.com/i1s4xEV9 in boehm.cr Oo
<jhass> ah you need 0.8.0 to compile master
<jhass> anatolik still didn't update community
apt-get has quit [Ping timeout: 244 seconds]
<Papierkorb> that's a chicken <-> egg no?
apt-get has joined #crystal-lang
<jhass> so you can get it from my OBS repo if you ever (and still) had that
<jhass> or git checkout 0.8.0; make; git checkout -; make
<jhass> or use crystal-git from AUR ;)
<sdogruyol> do you guys use arch?
<Papierkorb> yup
<sdogruyol> long time linux user converted to os x here :P
<sdogruyol> never tried arch
<Papierkorb> my condolences. arch is like the best thing ever
<sdogruyol> Papierkorb: why?
<jhass> sdogruyol: what do you do to install something?
<sdogruyol> jhass: i use brew
<jhass> unconditionally?
<Papierkorb> No crap slowing down your system, always the latest software packages, and barely any extra patches applied to the original sources
<jhass> does that work out?
<sdogruyol> jhass: well mostly :)
<jhass> what do you do if there's no brew package?
<sdogruyol> jhass: grab the source and make if possible
<sdogruyol> jhass: but mostly there's a package
<sdogruyol> jhass: how about arch?
<jhass> and in arch that's to the extreme, writing packages is so easy that somebody did it before for like everything
<jhass> and if not there's no reason to pollute your system with a sudo make install, just write a package
mhib has joined #crystal-lang
<Papierkorb> sdogruyol: if the package is not available from the repo, then it's unusual, but happens. If it's not even in the AUR, maybe the program isn't that important afterall ;)
<jhass> ended up writing like 30 packages already
<sdogruyol> jhass: that's the same with brew so simple to add a recipe
<jhass> want to add a patch to a package? yaourt -G foo; cd foo; vim PKGBUILD; makepkg -si
<jhass> done
<sdogruyol> jhass: i'll need to give it a try but dont have a pc only mac :P
<Papierkorb> It does run on a mac ..
<Papierkorb> Anyway, how do I debug crystal code?
<sdogruyol> Papierkorb: dude that's harsh :P
<sdogruyol> Papierkorb: you can't debug other than stdout for now
<asterite> buggs: there's String#byte_index
<sdogruyol> oh ary got me :D
<jhass> Papierkorb: crystal build -d and throw into gdb. set a breakpoint or add a trap the code by calling debugger
<jhass> no variable inspection yet though, just stepping through
<asterite> not sure if that's performant, though
j2k_ has quit [Quit: kthxbai]
<sdogruyol> asterite: hey how are you doing
<asterite> sdogruyol: o/
<jhass> asterite: is #1394 okay for you?
<DeBot> https://github.com/manastech/crystal/pull/1394 (Add support for select, select!, reject, reject! and remove delete_if for Hash, and Array)
<Papierkorb> There we go
<Papierkorb> how do I do a case-insensitive string compare?
<asterite> jhass: 1394 looks good. You can merge :)
<asterite> Eventually I'd like to rethink SimpleHash, it's used in the compiler and we put it in src, but maybe it should have a different name or something
<crystal-gh> [crystal] jhass pushed 5 new commits to master: http://git.io/vnQXt
<crystal-gh> crystal/master 1c785d7 Russ Bradberry: add select, select!, reject, and reject!, and each_with_object to Hash
<crystal-gh> crystal/master f3a10e3 Russ Bradberry: Remove delete_if from Array in favor of reject!
<crystal-gh> crystal/master 6c83946 Russ Bradberry: add select, select!, reject, reject! to SimpleHash
<Papierkorb> So, I quickfixed the issue preventing Autobahn from doing its thing
<jhass> asterite: one more and we're back to a single page ... #1554 <- I just leave this button here for you :P
<DeBot> https://github.com/manastech/crystal/pull/1554 (Handle signal exits from commands run by the compiler)
<asterite> Papierkorb: seems in Ruby there's String#casecmp, could be a nice addition
<jhass> asterite: yeah, you know I'm always for avoiding redundant stuff :P
<asterite> lol
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vnQX2
<crystal-gh> crystal/master 0217158 Ary Borenszweig: Merge pull request #1554 from jhass/handle_signal_exits_from_linker...
<crystal-gh> crystal/master 115e943 Jonne Haß: Handle signal exits from commands run by the compiler
<Papierkorb> asterite: a necessary one too, I don't want to litter the code with .to_s.downcase ;)
<asterite> Maybe there's a better way than a casecmp method? I don't know, we can think alternatives
<Papierkorb> casecmp itself is a bad name, it sounds more like case-sensitive
<Papierkorb> I used C++/Qt for almost 4 years, so I came accustomed that the method is called compare()
<jhass> I'd also love to have full unicode support for case stuff (casecmp, downcase, upcase), but it'll be a bit slower then of course
<Papierkorb> Is there already code somewhere to check if a string contains illegal UTF-8 codepoints?
<jhass> unicode normalization methods would be great too
<asterite> we could have `String#compare(other, insensitive =false)`
<Papierkorb> tbh I think that having Unicode support is a must
<asterite> in this case we can go char by char in both strings
<Papierkorb> I don't have the time anymore to deal with crap like mb_*
<sdogruyol> don't we have unicode support built-in ?
<jhass> sdogruyol: String's are UTF-8
<sdogruyol> jhass: and
<jhass> but downcase/upcase is still only ASCII
<sdogruyol> jhass: oh
<jhass> >> 'ß'.upcase
<Papierkorb> I could write the unicode point verification, I also did that in C++ as part of my WS stuff. I honestly just don't know if I have the time on my hand for that ..
<DeBot> jhass: # => 'ß' - http://carc.in/#/r/gw9
<jhass> mmh, better example
<jhass> >> 'ü'.upcase == 'Ü'
<DeBot> jhass: # => false - http://carc.in/#/r/gwa
<sdogruyol> bah
<sdogruyol> i'm Turkish
<sdogruyol> jesus
<sdogruyol> we got I :D
<Papierkorb> jhass: that's already scary, there's like 3 ways to write Ü with Unicode, and I probably don't know of every other way
<sdogruyol> the most problematic character ever
<Papierkorb> -other
apt-get has quit [Read error: No route to host]
<jhass> but I'm also talking about methods for doing https://en.wikipedia.org/wiki/Unicode_equivalence#Normalization and handling for the topic of that article in general
<sdogruyol> i becomes I in Turkish lol
<sdogruyol> >> 'i'.upcase
<DeBot> sdogruyol: # => 'I' - http://carc.in/#/r/gwb
<jhass> Papierkorb: see that article, unicode actually defined what to do
<sdogruyol> ah
apt-get has joined #crystal-lang
<sdogruyol> not I it's İ
apt-get has quit [Read error: Connection reset by peer]
<sdogruyol> with a dot on it
<travis-ci> manastech/crystal#61540cd (master - Merge pull request #1394 from devdazed/master): The build passed. https://travis-ci.org/manastech/crystal/builds/82031980
<DeBot> https://github.com/manastech/crystal/pull/1394 (Add support for select, select!, reject, reject! and remove delete_if for Hash, and Array)
gamemanj has joined #crystal-lang
<jhass> so, who wants to adopt #1183? nice and easy to get your name onto the contributor list
<DeBot> https://github.com/manastech/crystal/pull/1183 (Add pick and omit for hashes)
<sdogruyol> jhass: let me see
<sdogruyol> jhass: what's this missing?
NeverDie has quit [Quit: http://radiux.io/]
<jhass> I think the comments explain, in particular asterite's last one
<asterite> jhass: what do you think about 1183? I think select/reject are consistent, and the overload is available
<jhass> why do you think I'm seeking for adopters for it? ;)
<jhass> it's a good fit for sure
<Papierkorb> Isn't it quite confusing that select("a", "b") does something else than select{ .. } ?
<sdogruyol> like the questions in the comment why replace the ruby behaviour
<sdogruyol> and overload
<jhass> Papierkorb: does it? it's short for .select {|k, v| {"a", "b"}.includes? k }
<Papierkorb> jhass: ah I read the code as if it would return a array
<jhass> that'd be values_at ;)
<travis-ci> manastech/crystal#0217158 (master - Merge pull request #1554 from jhass/handle_signal_exits_from_linker): The build passed. https://travis-ci.org/manastech/crystal/builds/82032252
<DeBot> https://github.com/manastech/crystal/pull/1554 (Handle signal exits from commands run by the compiler)
NeverDie has joined #crystal-lang
<sdogruyol> jhass: so this just needs to renamed as i understood
<jhass> yeah
<buggs> asterite, also really slow
<jhass> and conflicts resolved
<buggs> it's ruby 20s vs. crystal 120s
<asterite> what's slow?
<sdogruyol> jhass: as a new pr or upon this?
<jhass> sdogruyol: I think including the original commit would be nice
<sdogruyol> jhass: okay i'm starting now
<sdogruyol> jhass: :P
<sdogruyol> jhass: you could've done this pretty fast imho heheh
<jhass> sdogruyol: gotta get people addicted to contributing somehow ;)
<sdogruyol> jhass: yeah you are right :)
<sdogruyol> meanwhile my specs are failing at master
<jhass> wut
<jhass> you're sure your state isn't dirty?
<sdogruyol> nope
<jhass> how exactly do you run them?
<sdogruyol> crystal spec
<jhass> ah
<sdogruyol> guess that's not the way
<jhass> either do make spec or bin/crystal spec
<sdogruyol> bah make spec is angry about llvm
<sdogruyol> src/llvm/ext/llvm_ext.cc:1:10: fatal error: 'llvm-c/Core.h' file not found
<jhass> well, get the devel headers then
<sdogruyol> let me see
<Papierkorb> Autobahn Test Suite results ran against Crystals WebSocket server: http://papierko.pyxis.uberspace.de/crystal_ws_report/servers/
<Papierkorb> I didn't do the load tests, they took ages - To be more precise, they hit the timeout limit as far I can tell
<sdogruyol> meanwhile bin/crystal spec is not angry about llvm: https://gist.github.com/sdogruyol/2cf71035b32c2a0a9ba2
<jhass> sdogruyol: you installed 0.8 globally? make clean crystal if so (that'll be angry about llvm again though :P)
<sdogruyol> jhass: :D
<sdogruyol> jhass: now i'll see how to get brew happy with llvm devel
<jhass> did we mention that arch doesn't do devel packages and just always ships them? :P
<sdogruyol> oh boy
<sdogruyol> :(
<jhass> Papierkorb: so, gonna do some PRs to get that into better health then? ;)
<sdogruyol> jhass: brew install llvm --with-clang --with-asan
<sdogruyol> jhass: guess will do :D
<jhass> Papierkorb: also make sure to use crystal build --release for benchmark stuff
<Papierkorb> jhass: yeah I skipped those as I have to go now ;)
<Papierkorb> good night
<jhass> night
nakilon has joined #crystal-lang
<jokke> heya
<sdogruyol> jokke: hey
gamemanj has quit [Ping timeout: 255 seconds]
NeverDie has quit [Quit: http://radiux.io/]
<sdogruyol> llvm is still make'ing my god
<jhass> it's compiling it?
<jhass> that gonna take a while
NeverDie has joined #crystal-lang
mhib has quit [Ping timeout: 246 seconds]
<buggs> asterite, even removing the conditional is slow
<buggs> is I/O in general slow in crystal?
<sdogruyol> jhass: yeah lol
<sdogruyol> jhass: pr incoming
<asterite> buggs: how can I try it?
<buggs> remove the if
<buggs> do the same in ruby
<asterite> OK, what file and what pattern
<buggs> i use the first 5GB of a protein database
<buggs> the pattern is just aaaaaaaaaaa and matches 174 of 22777668 lines
<buggs> i would think this is easily reproducable
<buggs> not sepcial to the data or pattern
<jhass> did we check already that you use release mode? I forgot :P
<buggs> my faster versions can do it in <1s vs crystal 120s
<buggs> ruby 20s (with the pattern as regex or String.index)
<buggs> /usr/bin/crystal is owned by crystal 0.7.7-2
<buggs> on archlinux
<buggs> i build with crystal build
havenwood has quit [Ping timeout: 240 seconds]
<asterite> did you pass `--release` to that command?
<asterite> I get: Ruby 6.76s, Crystal: 8.72s, with release: 3.03s
pragmatism has quit [Ping timeout: 246 seconds]
<asterite> I use src/compiler/crystal/syntax/parser.cr replicated 5061 times as the data file
<asterite> with a regex check, I get: Ruby 15.93s, Crystal (release): 8.372s
<asterite> with byte_index, 6.11s
<crystal-gh> [crystal] sdogruyol opened pull request #1588: Hash pick/omit renamed to select/reject (master...add-hash-omit-pick) http://git.io/vnQj2
<jhass> sdogruyol: ah, we should get that merge commit out
<sdogruyol> jhass: rebase?
<jhass> yeah
<jhass> you know the whistles and bells around that?
<sdogruyol> jhass: what do you mean?
<jhass> whether I should guide you through doing a rebase ;)
<sdogruyol> jhass: oh that's not needed :D
<sdogruyol> heheh
<sdogruyol> jhass: meanwhile i still cant get make spec happy
<jhass> how so?
<sdogruyol> jhass: os x already has it's own llvm and it's messy
<jhass> yeah I guess so
<sdogruyol> jhass: brew has another llvm installed in /usr/local/Cellar
<sdogruyol> jhass: it messes up a lot of stuff arghh
<jhass> arch <3
<jhass> scnr
<sdogruyol> jhass: and seems like noone seems to give a damn about llvm in os x :P
<sdogruyol> jhass: meanwhile my specs failed but i cant test locally :S
<jhass> I pointed out why ;)
<sdogruyol> heheh cmon you're tormenting me :D
<sdogruyol> let me try in vagrant let's see
<buggs> asterite, i did not know about --release
<asterite> buggs: is it faster with it? I ask because we didn't optimize IO a lot, it's just what LLVM gives us and being a bit careful in some places
<dzv> raw io isn't slow. i can't speak for BufferedIO and his code uses each_line
<buggs> yes it looks much better, i retest
<buggs> it's also not fair against the 1s implementations since those don't to by line
<buggs> but only find the line on match by look for the sourrounding \n's
<buggs> and use sse2
<asterite> we also have the "problem" that each_line creates a string for each line, so allocates a lot of memory
<buggs> yes, i only intended to start with each_line and was taking aback by the performance
<asterite> Well, actually, we could read line by line into a buffer and then do slice comparison there, somehow, if we wanted to go lower level
<buggs> ruby and crystal are quite recent in my tests
<dzv> small problem. all unicode functionality is in string. strings are readonly and not shared with slices
<buggs> i thought of File.scanf
willl has joined #crystal-lang
<asterite> dzv: I know, maybe we could have that read-only funcionality somewhere else, and share it, I don't know yet. We need to evolve the api
<buggs> for ruby i might just adabt a mmap extension i have
<jokke> hmm
<jokke> is this my fault or a bug? https://p.jreinert.com/GsKpj/
<buggs> guess i don't get offsets with scanf
fowlduck has joined #crystal-lang
<jhass> jokke: not sure how _session became typed as PullParser
<jokke> yeah
<jokke> weird huh
<jokke> is @session somehow special?
<jhass> would surprise me
<jokke> seems so
<jokke> oh come on
leafybasil has joined #crystal-lang
<jokke> Error in ./src/ddp/message.cr:8: expected 'parse' to return DDP::Message, not DDP::Connect
vjdhama_ has quit [Remote host closed the connection]
<jokke> DDP::Connect _is_ a Message
havenwood has joined #crystal-lang
<jokke> jhass: don't macro return types support polymorphism?
pragmatism has joined #crystal-lang
<jhass> idk, asterite ^?
Regexident has joined #crystal-lang
<jokke> here's what i'm trying to do: https://p.jreinert.com/kdukAI/ruby
<sdogruyol> jhass: rebased
<jhass> looks good, just waiting for travis
<sdogruyol> jhass: yeah
fowlduck has quit [Remote host closed the connection]
<crystal-gh> [crystal] technorama opened pull request #1589: Make spawn usage consistent with a single way of calling. (master...f/remove_redundant_spawn) http://git.io/vn7Y5
<asterite> jokke: I guess they should, please open an issue :-)
<crystal-gh> [crystal] jhass pushed 3 new commits to master: http://git.io/vn7OB
<crystal-gh> crystal/master cb1016e Jalyna: Add pick and omit for hashes
<crystal-gh> crystal/master 2613f17 Sdogruyol: Renamed pick/omit to select/reject
<crystal-gh> crystal/master 3ad6165 Jonne Haß: Merge pull request #1588 from sdogruyol/add-hash-omit-pick...
<crystal-gh> [crystal] jhass closed pull request #1183: Add pick and omit for hashes (master...add-hash-omit-pick) http://git.io/v39jy
sdogruyol has quit [Remote host closed the connection]
<dzv> is it possible to timeout on a channel receive similar to go?
<jhass> asterite: are you fine with the current approach in #1557?
<DeBot> https://github.com/manastech/crystal/pull/1557 (Add difference and symmetric difference operations on `Set`)
sfcgeorg_ has joined #crystal-lang
sfcgeorge has quit [Ping timeout: 250 seconds]
BlaXpirit has quit [Quit: Konversation]
<travis-ci> manastech/crystal#3ad6165 (master - Merge pull request #1588 from sdogruyol/add-hash-omit-pick): The build passed. https://travis-ci.org/manastech/crystal/builds/82048683
<DeBot> https://github.com/manastech/crystal/pull/1588 (Hash pick/omit renamed to select/reject)
sfcgeorge has joined #crystal-lang
nakilon_ has joined #crystal-lang
dyulax has quit [Quit: Saindo]
sfcgeorg_ has quit [Ping timeout: 244 seconds]
nakilon has quit [Ping timeout: 244 seconds]
pragmatism has quit [Ping timeout: 240 seconds]
<jokke> asterite: where is == for types defined?
<jokke> can't find it in types.cr
nakilon_ has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] jhass closed pull request #1557: Add difference and symmetric difference operations on `Set` (master...set-ops) http://git.io/vng8e
<jokke> mmh
<jokke> ok
<jokke> can't be
<jokke> because == is used for checking if something is a subclass too
<jokke> can't imagine them all having the same id
<jhass> that'd be ===
<jhass> and I don't think it actually is in Crystal
<jhass> >> Object === String
<DeBot> jhass: # => false - http://carc.in/#/r/gwj
<jhass> >> String === "foo"
<DeBot> jhass: # => false - http://carc.in/#/r/gwk
<jhass> nope, the compiler special cases when's with types to rewriting to is_a? iirc
<travis-ci> manastech/crystal#911bd0c (master - Merge pull request #1557 from js-ojus/set-ops): The build passed. https://travis-ci.org/manastech/crystal/builds/82054674
<DeBot> https://github.com/manastech/crystal/pull/1557 (Add difference and symmetric difference operations on `Set`)
havenwood has quit [Ping timeout: 255 seconds]
<jokke> >> Object == String
<DeBot> jokke: # => false - http://carc.in/#/r/gwl
<jokke> it checks with ==
<dzv> is there some way to do named arguments with splats? def foo(*args, timeout = nil : Number?)
<jhass> dzv: since that's not valid I guess not
<dzv> some other way? macro magic?
<jhass> I'm tired but I don't see anything
<jokke> aha!
<jokke> PR time
greengriminal has quit [Quit: Leaving]
havenwood has joined #crystal-lang
<jokke> jhass: what does covariant mean?
<jokke> should i allow returning covariant types from a type restricted method?
<jhass> do you see me participating in #1297? ;P
<DeBot> https://github.com/manastech/crystal/issues/1297 (Covariance and contravariance in generic types)
<jokke> :)
<jokke> so covariant is what is_a? does?
<jhass> I have no clue
<jokke> seems so
<crystal-gh> [crystal] jreinert opened pull request #1592: add support for polymorphic macro methods (master...polymorphic-macro-methods) http://git.io/vn7Vn
<jokke> i'd rather have asterite have a look at it though
rmosolgo has joined #crystal-lang
trapped_ has quit [Read error: Connection reset by peer]
<rmosolgo> Hi! I'm a Ruby developer and I just heard of this project.
<rmosolgo> Nice work, it looks really cool
<jokke> rmosolgo: welcome :)
<rmosolgo> Thanks :)
<jokke> rmosolgo: a lot of us are
<rmosolgo> I'm curious, have you ever seen a Crystal -> Ruby "compiler"?
<jokke> crystal -> ruby?
<rmosolgo> I'm thinking I would like to try the language, but everything I use is Ruby
<rmosolgo> yes
<jokke> ah you mean for gems and such?
<rmosolgo> so you can develop with type safety & compiling
<rmosolgo> but expose your project as Ruby to the outside world
<rmosolgo> yes
<jokke> hmm no i haven't seen anything like that
<rmosolgo> (A bit like using FlowTypes for JavaScript, but then removing the type definitions at compile-time)
<jokke> there is a project like that
<jokke> using annotations
<jokke> but i think it's pretty ugly
<jokke> forgot its name though
<rmosolgo> oh? I'll take a look
<jokke> it's kind of like a preprocessor
<jokke> oh?
<jhass> that's more writing a Ruby "C" ext with Crystal though
<jokke> ah i see
<rmosolgo> that's cool, though, similar!
<sfcgeorge> I think Crystal macros couldn't be transpiled to Ruby. But there is a subset of Crystal that is valid Ruby and vice vera, so a transpiler should be able to expand upon it
<sfcgeorge> It's something I've wondered about.
<rmosolgo> yeah
<rmosolgo> i'm only part way through the docs so ... I guess finishing that would be a good first step :)
<jokke> rmosolgo: i think the best option for you is to just start coding crystal and port everything you need over when you need it ;)
<jokke> hehe
<rmosolgo> :D
havenwood has quit [Ping timeout: 268 seconds]
<jokke> ?
<jokke> ah gotta try that bot
<jokke> waj: any thoughts on #1519?
<DeBot> https://github.com/manastech/crystal/pull/1519 (add real_path class method for File)
<jokke> \o/
Philpax has joined #crystal-lang
qard has quit [Ping timeout: 264 seconds]
qard has joined #crystal-lang
rmosolgo has quit [Quit: Page closed]
Regexident has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverDie has quit [Quit: http://radiux.io/]
NeverDie has joined #crystal-lang
NeverDie has quit [Client Quit]
guilleiguaran__ has quit [Ping timeout: 240 seconds]
rappo has quit [Ping timeout: 240 seconds]
chdorner has quit [Ping timeout: 240 seconds]
rappo has joined #crystal-lang