mverzilli has joined #crystal-lang
waj has joined #crystal-lang
e_dub has joined #crystal-lang
e_dub has joined #crystal-lang
waj has joined #crystal-lang
r0ast has joined #crystal-lang
<r0ast> Hello
<r0ast> I have a few questions about the status of crystal lang
<r0ast> I was hoping someone could explain the differences in syntax from ruby, if there are any
<r0ast> Anyone know?
<waj> The syntax is inspired by ruby but there are actually many differences
<waj> mostly some type annotations that must be specified sometimes
<r0ast> Do we have a list somewhere?
<r0ast> Of what is different?
<waj> there is not a list of the differences but we have a work in progress documentation: http://crystal-lang.org/docs/
<r0ast> Awesome. I'll take a look.
<r0ast> I'm really interested in the project
<waj> thanks! :)
<waj> are you thinking in any particular use?
<r0ast> Not sure yet
r0ast_ has joined #crystal-lang
<r0ast_> Switching from my phone to my laptop
<r0ast_> Just a moment :)
r0ast has joined #crystal-lang
<r0ast> Ok, back
<r0ast> Has there been any attempt to expand the standard library?
<waj> ok, in which platform are you running?
<r0ast> OS X Yosemite
<waj> we're expanding it all the time :)
<r0ast> Awesome
<r0ast> I was thinking of how to get it expanded quickly
<waj> but instead of just adding classes we have some pet projects in Crystal and we add stuff to the std as needed
<r0ast> Have you tried converting the Ruby std lib to crystal
<r0ast> ?
<waj> no… I don't think that's feasible
<r0ast> Ok, that was my thought
<waj> metaprogramming in crystal is quite different
<r0ast> It's written in ruby, but i wasnt sure of teh syntax differences
<r0ast> the*
<waj> in ruby you have a dynamic language
<r0ast> Ahhhhh true
<waj> while in Crystal metaprogramming is mostly done using macros
<r0ast> Yep.
<r0ast> Got it
<r0ast> Has anyone written an Http server?
<waj> on the other hand… much of the interesting stuff of Ruby's std is written in C
<r0ast> Other than the example?
<waj> yes!
<waj> the example is reeeeealy old. I think one of the first examples we had :)
<r0ast> That's amazing news!
<waj> but there is a much more functional HTTP::Server in the std right now
<r0ast> I havent seen it, but that's great
<waj> also, we're playing with a Sinatra like server
<r0ast> It's on github?
<waj> we called "Frank" ;)
<waj> yes
<r0ast> That would be amazing.
<r0ast> Seriously
<r0ast> 1 sec
<r0ast> That's awesome
<r0ast> All my projects that I write in ruby start with sinatra
<r0ast> So I'm really excited
<r0ast> What's missing?
<r0ast> From Frank?
<waj> everything :)
<r0ast> Haha ok
<r0ast> I'd like to contribute if possible
<r0ast> To anything :)
<waj> sure!
<waj> there is tons of stuff to do
<r0ast> This is a really exciting
<r0ast> project
<r0ast> Who's running the project?
<r0ast> Are there any companies involved?
<r0ast> I'd really like to be involved
<waj> it's actually a side project but the main contributors we work at Manas (http://www.manas.com.ar/)
<waj> if you wan't to contribute you can start sending PR
<r0ast> Very cool
<r0ast> I'll start working on some things
<waj> great!
<waj> don't hesitate to ask
<r0ast> I mean, building projects and filling in the holes
<waj> btw, where are you based?
<r0ast> Tomsk, Russia
<r0ast> I'm a US citizen though
<r0ast> From california....
<waj> cool :)
<r0ast> And now I live in siberia
<r0ast> Anyway
<waj> we're in Buenos Aires, Argentina
<r0ast> Is Manas Hiring at all?
<r0ast> :)
<r0ast> I'm not working at the moment
<waj> so… seems there is 10 hours
<r0ast> Yep
<r0ast> Something like that
<r0ast> Can i PM you my github?
<waj> PM?
<r0ast> Private message
<waj> oh! ok, no problem
<r0ast> Or I can post it here, whatever's easier
<waj> I prefer to keep conversations open if possible
<waj> we have a mailing list as well
<r0ast> Makes sense, I prefer IRC
<r0ast> Let me know if you need another devloper :)
<waj> ;)
<r0ast> Also, If you want it
<waj> ok
<r0ast> Anyway, I'll start building and submit PRs if I find any gaps
<waj> nice!
<r0ast> It's probably early, but do you have any kind of package manager?
<r0ast> Like rubygems is to ruby
<waj> no… not yet
<r0ast> Ok
<r0ast> Is there a need?
<waj> we tried to design something that doesn't need a central server
<r0ast> Yeah, hosting those is not cheap
<waj> but… as there isn't many crystal libraries yet, it's not a high prio
<r0ast> Exactly
<r0ast> Another question
<r0ast> Is the HTTP lib included in the distribution?
<r0ast> Where can I find it?
<waj> yes
<r0ast> Ok cool
<r0ast> Awesome
<r0ast> Is the latest version on the brew tap?
<waj> the tap has the latest release
<waj> 0.4.4 at the moment
<r0ast> Ok, great
<r0ast> That's what I have
<r0ast> Cool
<r0ast> Is there vim highlighting?
<r0ast> I didn't see anything
<waj> things change fast anyway :)
<waj> yes, I know someone did one
<waj> let me see… I don't use much vim myself
<r0ast> Ok
<r0ast> I can make one if not
<r0ast> Yep
<r0ast> Found it
<waj> we have coloring for sublime as well: https://github.com/manastech/sublime-crystal
<r0ast> Great!
<r0ast> I just got it working in Vim
<waj> ok… time to shut down for me ;)
<r0ast> No worries
<r0ast> Thanks for your help! Really excited to contribute
<waj> nice to meet you Sam! I hope you can join us on this project!
<waj> bye
r0ast has joined #crystal-lang
LinkError has joined #crystal-lang
<LinkError> Hello
e_dub has joined #crystal-lang
<LinkError> Does anyone know what would cause this error: "ld: library not found for -lgc" (On a mac with Crystal 0.4.4 [ef755e1] ) .
<jhass> LinkError: sounds like you didn't install libgc (correctly)
<jhass> how did you install crystal?
<LinkError> I used brew
<LinkError> Must I install libgc as well?
<LinkError> brew says it install three dependencies: llvm33, bdw-gc, libpcl
<LinkError> bdw-gc-7.4.2 is installed
<jhass> bdw-gc should be it. I guess we have to wait for someone with actual mac/brew experience ;)
<LinkError> yeah I'll try installing via the source repository
<LinkError> I'll see if that makes a difference
<jhass> os x dynamic library system seems weird, people seem to have troubles with it all the time
r0ast has joined #crystal-lang
<r0ast> Hello!
<jhass> hi
mverzilli has joined #crystal-lang
bcardiff has joined #crystal-lang
asterite has joined #crystal-lang
waj has joined #crystal-lang
e_dub has joined #crystal-lang
<LinkError> using the sample code on "http://en.wikipedia.org/wiki/Boehm_garbage_collector" works if I compile with "clang test.c -I/usr/local/include -L/usr/local/lib/ -lgc" but gives me an error when I exclude "-L/usr/local/lib/". now my question is where does crystal look for "libgc.a" (on mac)?
<LinkError> I've been at this for about 1:40mins... can't figure out why I get: "ld: library not found for -lgc"
<asterite> It's strange, because I read you installed with it homebrew
<LinkError> yes..
<asterite> You can compile a program with —verbose, it will output the linker line we are using
<asterite> and copy it here so we can see what's wrong
<LinkError> Ok.. I'll try that now...
<waj> so strange your compiler is not looking at /usr/local/lib by default
<waj> crystal doesn't add that path to the search path so that should be the problem
<r0ast> Hello again
<r0ast> I was working on a small test app with frank, and wanted to use Elasticsearch as a data store
<r0ast> Has anyone written a lib for that?
<LinkError> Not looking at /usr/local/lib is definitely the problem.
<LinkError> Here is the output: http://pastebin.com/ha4MWNuY
travis-ci has joined #crystal-lang
travis-ci has left #crystal-lang [#crystal-lang]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/manastech/crystal/builds/36051586
<travis-ci> [travis-ci] manastech/crystal#1486 (master - d7827f0 : Ary Borenszweig): The build has errored.
<r0ast> Do we have anything like post_json in the stdlib? I saw get_json, but I specifically need POST
<r0ast> I made a function like that in my Elasticsearch client, but I think it could be in net/http as well... Code is here: https://github.com/samsheff/Stretchy/blob/master/stretchy.cr
e_dub has joined #crystal-lang
<asterite> @LinkError we have no idea why cc isn't looking in the correct places
<asterite> If you take that line in the pastebin and replace cc with clang, does it work?
<LinkError> it doesn't, but if I change "cc" to "clang -L/usr/local/lib" it works :) I still need make cc search /usr/local/lib.
<LinkError> it seems like both cc and clang are not searching /usr/local/lib
e_dub has joined #crystal-lang
<asterite> @r0ast Cool, we use ElasticSearch a lot here
<r0ast> Awesome, It's one of my favorite tools
<r0ast> Or I guess it's more of a technology, but whatever ;)
<r0ast> asterite: Should i submit a PR for the post_json method? I think it's a stdlib thing since it has a broad range of uses
<asterite> I'm sure posting json is very common… I'm just not sure a response for that is always a json
<asterite> In fact, maybe get_json shouldn't belong to HTTP::Client, since you can just do Json.parse HTTP::Client.get(…).body.not_nil!
<r0ast> True, but we have get_json, so it might be good just for sake of completeness
<r0ast> This is true
<r0ast> Also - Just so I make sure I'm not reinventing the wheel, Frank doesn't have a the ability to parse URL params, right?
<r0ast> Something like ?q=blahblah
<asterite> Right, it doesn't… I remember for that we needed to parse those so we wrote the CGI module
<asterite> but then we continued with other things… :-P
<r0ast> I didn't see anything in the frank project, so i built it
<r0ast> I can submit a PR
<r0ast> If you think it's good
<asterite> Cool! Did you use the CGI module?
<r0ast> I didn't know we had one
<r0ast> But I did it manuall
<r0ast> y
<asterite> Sorry, we don't have something like rdoc yet :(
<r0ast> All good
<r0ast> Let me look at it
<r0ast> I see parse, but is that only for POST requists?
<r0ast> requests*
<asterite> @LinkError maybe you can use LIBRARY_PATH=/usr/local/lib to compile
<r0ast> Oh wait
<r0ast> I read the comment
<asterite> It parses a query string
<r0ast> I see now
<r0ast> My bad :)
<asterite> Similar to Ruby
<r0ast> Yep
<r0ast> I'll use that instead
<asterite> You also have a method that received a block, in case you don't want to build an array
<r0ast> Ah cool
<asterite> A hash, sorry
<r0ast> All good
<r0ast> I had it parse it into a hash
<r0ast> For example, ?yolo=yes would equal a hash where hash["yolo"] == "yes"
<r0ast> Which i think is good because it's cleaner, and often times a block is overkill
<r0ast> But I think it should definitely be in the CGI module
<asterite> The problem is that a param can appear multiple times… we still don't know how to properly handle those in frank
<asterite> Lunch time, talk to you later :)
<r0ast> Ok, enjoy
e_dub has joined #crystal-lang
<LinkError> "LIBRARY_PATH=/usr/local/lib" works but it has to be on the same line as "crystal test.cr".
<LinkError> I added "export LIBRARY_PATH=/usr/local/lib" to my ~/.bash_profile, and now it works :D
mverzilli has joined #crystal-lang
e_dub has joined #crystal-lang
asterite has joined #crystal-lang
bcardiff1 has joined #crystal-lang
<LinkError> Hey, asterite! I got it to work :D I just added "export LIBRARY_PATH=/usr/local/lib" to ~/.bash_profile
<asterite> Cool!
<asterite> (but I think it's not mentioned anywhere)
<LinkError> Thats cool! (I guess I didn't need to repeat myself then :P )
<asterite> :)
<asterite> If you have another issue, just report it here
<asterite> Though I guess someone with a different nickname will report it? :-P
<LinkError> :D I'll probably join as TheBlueCrane next time.
TheBlueCrane has joined #crystal-lang
<TheBlueCrane> I changed my name to TheBlueCrane and registered it.
<asterite> :)
mverzilli_ has joined #crystal-lang
e_dub has joined #crystal-lang
mverzilli_ has joined #crystal-lang
mverzilli has joined #crystal-lang
e_dub has joined #crystal-lang
mverzilli has joined #crystal-lang
bcardiff has joined #crystal-lang
mverzilli_ has joined #crystal-lang
CraigBuchek has joined #crystal-lang
travis-ci has joined #crystal-lang
travis-ci has left #crystal-lang [#crystal-lang]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/manastech/crystal/builds/36097522
<travis-ci> [travis-ci] manastech/crystal#1487 (master - a99e6d0 : Ary Borenszweig): The build has errored.
mverzilli has joined #crystal-lang
bcardiff has joined #crystal-lang