waj has quit [Read error: Connection reset by peer]
waj has joined #crystal-lang
waj1 has joined #crystal-lang
waj has quit [Read error: Connection reset by peer]
waj1 has quit [Ping timeout: 244 seconds]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1680 (master - c80b959 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
bcardiff has quit [Quit: Leaving.]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1681 (master - 2f163c4 : Ary Borenszweig): The build was broken.
travis-ci has left #crystal-lang [#crystal-lang]
waj has joined #crystal-lang
waj has quit [Client Quit]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1682 (master - 41a8a84 : Ary Borenszweig): The build was fixed.
travis-ci has left #crystal-lang [#crystal-lang]
waj has joined #crystal-lang
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1683 (master - 20bb020 : Ary Borenszweig): The build was fixed.
travis-ci has left #crystal-lang [#crystal-lang]
waj has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1684 (master - b61c6c7 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1685 (master - e4142a5 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1686 (master - 6939d00 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
bcardiff has quit [Quit: Leaving.]
waj has joined #crystal-lang
e_dub has quit [Quit: ZZZzzz…]
e_dub has joined #crystal-lang
e_dub has quit [Client Quit]
waj has quit [Quit: Leaving.]
e_dub has joined #crystal-lang
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
waj has joined #crystal-lang
waj has quit [Ping timeout: 265 seconds]
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1687 (master - 25fc462 : Juan Wajnerman): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
canhtak has quit [Quit: canhtak]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1688 (master - bc9afa4 : Juan Wajnerman): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
canhtak has joined #crystal-lang
shvelo has joined #crystal-lang
<shvelo> Ahoy!
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1689 (master - 06da8bd : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1690 (master - 7ae7f4d : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
shvelo has quit [Ping timeout: 264 seconds]
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
shvelo has joined #crystal-lang
<shvelo> This is unacceptable
shvelo is now known as lemongrab
lemongrab is now known as earl_of_lemongra
earl_of_lemongra is now known as shvelo
shvelo has left #crystal-lang ["Leaving"]
asterite has joined #crystal-lang
asterite has quit [Quit: Leaving.]
sferik has joined #crystal-lang
<sferik> hi all
<sferik> I’m trying to make some software with Crystal
asterite has joined #crystal-lang
asterite1 has joined #crystal-lang
<asterite1> hi sferik, what kind of software?
<sferik> asterite1: I think Crystal is much better suited to CLIs than Ruby
<sferik> asterite1: so I was thinking of porting http://sferik.github.io/t/
<asterite1> What's CLI? Command Line Interface?
* sferik nods
<asterite1> t looks nice, and it's a good small application to test crystal :)
<sferik> asterite1: I would like to distribute it as a binary, which is rather difficult in Ruby
<asterite1> We already have an http client, and oauth 1 and 2
<asterite1> plus json
asterite has quit [Ping timeout: 240 seconds]
<sferik> asterite1: Yes, I was pleased to see that.
<sferik> asterite1: before I start on the CLI, I'd like to create a generic Twitter API client, similar to http://sferik.github.io/twitter/ in Ruby
<sferik> asterite1: which others can use to build applications using the Twitter API
<asterite1> Awesome :)
<sferik> asterite1: Can you explain how libraries work?
<sferik> asterite1: I noticed there was a `crystal deps` command
<sferik> asterite1: which reads from a Projectsfile
<sferik> asterite1: and creates a .deps.lock file
<sferik> asterite1: and a libs directory
<asterite1> Yes, the deps command still lacks a lot
<sferik> asterite1: Is the format for the Projectfile document?
<asterite1> Eventually it will be everything you need, but right now it's very basic
<sferik> should the `libs` directory be ignored in my project's .gitignore?
<asterite1> It's a crystal file
<asterite1> Yes, I think so
<sferik> what's the difference between libs and .deps/
<sferik> asterite1: I guess that should also be ignored?
<sferik> asterite1: as well as the .deps.lock file
<asterite1> libs is in the path by default, same as src
<asterite1> Yes
<asterite1> But…
<asterite1> We started this command just some weeks ago and it still needs a lot of thought
<asterite1> Right now I would advice to do this:
<asterite1> Mmm… Well, yes, basically what you said, put libs and .deps in the ignore
<asterite1> But, for example, if you develop against a library and need to uppdate it, there's no 'deps update' command, you have to delete it and run the command again
<asterite1> Also, there's no way to work against a local path
<asterite1> Because… we started it just very recently
<asterite1> That's why I wouldn't depend that much on deps (no pun intended :-P)
<sferik> asterite1: okay
<sferik> asterite1: I am also interested in working on a REPL, as I mentioned earlier
<sferik> asterite1: I started spiking something out, but didn't make it very far
<sferik> asterite1: I agree, it will be difficult, but I think it is possible
<sferik> asterite1: however, it might require some changes to the language itself :-o
<sferik> asterite1: but I'm not sure about that
<asterite1> changes like what?
<sferik> asterite1: I'd like to spend some more time investigating
<sferik> asterite1: let me follow-up when I have more information
<asterite1> A possibility would be to have a different backend, a way to generate code maybe less efficiently but with more reflection, but only for the REPL
<asterite1> (but then that would make it impossible to connect to an existing process)
<sferik> asterite1: that's would be less than ideal, but might be a good way to start
<sferik> asterite1: by the way, I am very inspired by Crystal
<sferik> asterite1: I know it is still early, but I think what you have done is very impressive
<sferik> asterite1: one more questions about porting the Twitter library...
<asterite1> :)
<sferik> asterite1: is there anything like https://github.com/bblimke/webmock in Crystal?
<asterite1> :) I imagined you would ask something like that
<asterite1> No, there isn't… and right now we are like http specs
<asterite1> We thought about some possibilities
<asterite1> One is to use netcat so simulate http requests… that good thing is that this will mock the very low level, so it'll probably work (although maybe be a bit slower?)
<sferik> asterite1: okay, but there's no good way to specify netcat as a dependency, is there?
<asterite1> Another is to allow doing something like `require "net/http/mock"' and that would change HTTP::Client to allow mocking functionality
<sferik> asterite1: I guess I'll need a Makefile
<asterite1> No, there isn't
<asterite1> But I think testing a rest api like twitter doesn't add a lot of value
<asterite1> like… those specs are "I expect a post here with this info" and then on the real code you do a post there with that info
<sferik> asterite1: yes and no
<asterite1> then when the api changes you actually don't know that something really broke, and then you change it in both places
<sferik> asterite1: I have found tests like those to be useful for saying, "I expect this request will be executed exactly 1 time"
<asterite1> Ah, I see…
<asterite1> Another option we have in mind is to support mocks in the language, although we don't know yet how to do it (we have some basic ideas)
<sferik> asterite1: I should be able to work around it for now
<sferik> asterite1: any plans to support new-style RSpec syntax in the spec library?
<sferik> asterite1: my fingers have gotten very used to typing `expect` instead of `should`1
<sferik> asterite1: again, not a big issue, just a question
<asterite1> Yes, we could do it… I'm not sure what was the problem with "should"
<sferik> asterite1: I think the issue was monkey-patching every object to have a `should` instance method
<asterite1> Why would anyone else define a should method?
<asterite1> I mean, I can't imagine "should" to have another meaning
<sferik> asterite1: ¯\_(ツ)_/¯
<asterite1> unless it's another spec framework, but then there would be no conflict :)
<sferik> asterite1: yeah, I think it was more of a philosophical concern
<sferik> asterite1: it doesn't bother me that much, either way
<asterite1> I think we can add both ways, it should be pretty easy
<sferik> asterite1: I actually prefer `must` to `should`
<sferik> asterite1: in the spirit of https://www.ietf.org/rfc/rfc2119.txt
<sferik> asterite1: `should` is optional, `must` is required
<sferik> actually, `may` is optional, `should` is recommended, `must` is required
<sferik> asterite1: anyway, I'm going to get back to coding for a little while
<sferik> asterite1: I'll let you know if I encounter anything strange
<asterite1> You can put this in your project until we add it to our spec framework: https://gist.github.com/asterite/0a40ce50e43706b403bd
<asterite1> so you can type faster :)
<sferik> asterite1: :D
<sferik> asterite1: that's awesome! thanks!
<asterite1> In fact something that we dislike more right now, because of the way things are, is that eq, be, be_a, etc., are global methods… maybe `expect(1).to.eq(…)` would be better
<asterite1> I never understood why there needs to be a space after `to`, `should`, `should_not`
<asterite1> By the way, there's no `before(:each)` either yet :(
<sferik> asterite1: that's another argument for wrapping the expectation
<asterite1> In fact, maybe it would be better for us to do something like Test::Unit instead, because rspec is very hard to simulate right now :(
<sferik> asterite1: then eq, be, be_a, etc. don't need to be global
<sferik> asterite1: yeah, I actually don't have a strong preference
<sferik> asterite1: i work in projects that use both RSpec and Minitest
<jhass> When toying around with an alternate spec implementation, I got as far as being able to make be, eq and so on only available in the Context class that's created by describe
<sferik> jhass: nice!
<jhass> but I think before/before(:all)/let just won't work, since we can't dynamically attach methods to a particular instance
<asterite1> You think having something like test_unit would be very bad? It's not that idiomatic but you can do more things with less magic
<jhass> I think I could imagine a hybrid to be viable
<jhass> class MyTest < Spec; let(:foo)... it ".."... end;
<jhass> without context nesting
<asterite1> You are right… let could easily be implemented as a macro like that
<asterite1> but it'll be one of the few macros we would need
<jhass> yes, I think if we want a nice DSL there, macros are what's needed. I just would like them to be scoped in some way, not polluting the global namespace
<asterite1> Agreed
<asterite1> Well, lunch time… talk to you later :)
asterite1 has quit [Quit: Leaving.]
<sferik> let me know if it's missing anything
<jhass> maybe a Makefile/Rakefile to build it, but I think I'd end up with the same thing currently
e_dub has quit [Read error: Connection reset by peer]
e_dub has joined #crystal-lang
<sferik> one more question...
whomp has joined #crystal-lang
<sferik> I noticed that `coverage/` was in Crystal's `.gitignore` file
<whomp> is crystal going to support any ruby gems?
<sferik> but I couldn't find a code coverage standard library coverage
<sferik> whomp: what do you mean by that?
<whomp> like, would you be able to use ruby gems with crystal, or are the two languages generally too different?
<sferik> whomp: Crystal and Ruby do not have 100% compatible syntax, so it's unlikely gems would work out of the box
<whomp> sferik, good to know :)
<rpag> they're similar enough that some gems would work, and different enough that some wouldn't
<sferik> whomp: The syntatic difference between attr_accessor (Ruby) and property (Crystal) would break almost everything, I suspect
<sferik> whomp: of course, it would be easy to create aliases to fix that specific issue, but there are many others
<whomp> ah i c
<sferik> rpag: I would be pretty surprised if any gems worked completely unmodified
<sferik> rpag: maybe really a few micro libraries
<rpag> yeah i agree
<sferik> whomp: a better approach would be creating a transpiler
<sferik> that compiles Ruby source to valid Crystal syntax
<whomp> yeah that would help
<sferik> whomp: however, there are some things that cannot be converted (e.g. eval)
<whomp> at that point, crystal would also simply be a ruby "compiler"
<whomp> yeah
<sferik> whomp: it's better to think of Crystal as a completely different language with Ruby-inspired syntax
<whomp> right
<sferik> whomp: this is a good blog post to read, if you haven't yet: http://crystal-lang.org/2013/09/04/happy-birthday-crystal.html
<sferik> whomp: that said, if you're written a gem in Ruby, it should be relatively easy to port over manually
<sferik> whomp: the biggest thing that's missing is the ecosystem of other gems (i.e. dependencies)
<whomp> yeah
<jhass> sferik: I think the coverage/ is a relict from when the compiler was written in ruby
<sferik> jhass: that explains it!
e_dub has quit [Quit: ZZZzzz…]
whomp has quit [Ping timeout: 240 seconds]
whomp has joined #crystal-lang
e_dub has joined #crystal-lang
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
whomp has quit [Ping timeout: 258 seconds]
sferik has joined #crystal-lang
sferik has quit [Client Quit]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1691 (master - 4beac29 : Juan Wajnerman): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
whomp has joined #crystal-lang
e_dub has quit [Read error: Connection reset by peer]
e_dub has joined #crystal-lang
sferik has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff has quit [Ping timeout: 265 seconds]
bcardiff has joined #crystal-lang