canhtak_ has joined #crystal-lang
canhtak has quit [Ping timeout: 255 seconds]
canhtak_ is now known as canhtak
<zamith> Hey
<zamith> I get can't find file 'http/server' relative to '/tmp/build_79f4a2b75a3722bb6733add20b7e4b01/libs/frank/frank', while trying to deploy to heroku
<zamith> from the looks of it, the std lib is not in the crystal path, right?
<zamith> waht can I do here?
<zamith> *what
<jhass> start debugging the buildpack I guess :P
<jhass> looks like it downloads http://dist.crystal-lang.org/crystal-latest-linux-x86_64.tar.gz which is a 0.5.3 :/
<jhass> zamith: you might want to fork it to download a 0.5.8 from github
<zamith> yeah, I did that
<zamith> still won't work, but a different error
<zamith> here's the buildpack I forked
Cassyblanca has joined #crystal-lang
<zamith> it seems the -C flag for tar is not working properly
CeBot has quit [Quit: Crystal]
<jhass> uhm the git repo has no binary checked in
<jhass> you want to get the thing from the release URL
<zamith> I'm getting the latest release, which is basically a pointer to that
<zamith> locally it extract it fine, without the -C flag
<zamith> and it should work, apart for permission errors or something like that
<zamith> :S
<jhass> because that's just a dump of the git repo
<zamith> but it has a bin, right?
<zamith> I will try with the other link
<jhass> no, it doesn't
<zamith> hum...
<zamith> if I extract it, it has a crystal bin
<zamith> that seems to work though
<zamith> I really thought that tarball had a binary
<zamith> thanks
<jhass> bin/crystal is a shellscript
<jhass> that sets CRYSTAL_PATH and runs .build/crystal or a globally available one as fallback
<zamith> oh yeah, I forgot about that one
<zamith> I know, I've been using it
<zamith> I just didn't think it was going to be that
<zamith> :S
<zamith> well, I just deployed the very first draft of what I expect to be a repository of all crystal libraries, which we are (for the moment) calling shards
<zamith> it needs a design and more info, and a proper way to find out if it is a proper library, but it's a start
<zamith> if you have feedback, ideas, etc..., here's the repo https://github.com/zamith/crystalshards
<zamith> any help is welcome
<zamith> ;)
<jhass> cool!
<jhass> maybe link the site in the repo description :P
<zamith> sure, I need to write a README, too
<zamith> also, I intend to buy crystalshards.org
<zamith> but wanted us (the community) to settle on the name for the libraries
<zamith> I personally like shards, but you never known if someone has a better idea
<zamith> :)
canhtak has quit [Quit: canhtak]
bcardiff has joined #crystal-lang
<jhass> shard is great
<zamith> cool, then let's roll with it
<jhass> I didn't come up with anything in the past months, so I don't expect it'll happen :P
<zamith> what about crystalshards.org
<zamith> ?
<zamith> too rubygemsy?
<jhass> maybe we can get shards.crystal-lang.org ?
<zamith> hum...
<zamith> that would be nice, but out of my hands
<zamith> :)
<jhass> yeah, we gotta poke asterite about it ;D
<zamith> that's something for tomorrow, I'm done for the day
<zamith> :)
<zamith> thanks for the help and feedback
<zamith> ;)
<jhass> yw, have a good night/evening/whatever ;)
<zamith> I'm GMT
<zamith> it's night
<zamith> :)
<zamith> and thanks
<zamith> you too
CeBot has joined #crystal-lang
<jhass> >> `uname -m`
<CeBot> jhass: "i686\n"
<jhass> \o/
<tymat> call them atoms?
<tymat> or lattice
<jhass> that I had to put into a dictionary :P
CeBot has quit [Client Quit]
CeBot has joined #crystal-lang
<jhass> bcardiff: how about making the topic a bit prettier? :)
bcardiff has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
zamith has quit [Quit: Be back later ...]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1826 (master - 1659435 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
canhtak has joined #crystal-lang
zamith has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1827 (master - 884438c : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
canhtak has quit [Quit: canhtak]
asterite has joined #crystal-lang
<jhass> asterite: btw, how about a prettier topic? :)
<asterite> Sure. I don’t know how to change it :blush:. But I should because I’m an admin or something?
<jhass> just /topic blablabla (or make me an op :P)
<jhass> my suggestion: The Crystal programming language | http://crystal-lang.org | Crystal 0.5.8 | 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
jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.5.8 | 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
<asterite> Done :)
<jhass> ty
<asterite> It wasn’t me, I think it was CeBot
<jhass> heh
<jhass> btw you should ask waj to give you +F ;)
<asterite> What’s “Paste > 3 lines of text to https://gist.github.com” ?
<asterite> Why 3 lines?
<jhass> common standard
<asterite> Ok :)
<jhass> below the flood protection limit
<jhass> so it won't be delayed
<jhass> and doesn't interrupt other ongoing conversations
<jhass> and renders still somewhat readable in most clients
<asterite> But can you past eit from here?
<jhass> you mean like /gist blabbla and then it'll automatically post it there and link it?
<jhass> no, that would be a client feature
<asterite> So how can the channel flood?
<asterite> (sorry, I don’t know much about irc)
<jhass> okay, not many people, let's demonstrate
<jhass> @[Link("pthread")]
<jhass> @[Link("gc")]
<jhass> lib LibGC
<jhass> fun init = GC_init
<jhass> fun malloc = GC_malloc(size : UInt32) : Void*
<jhass> fun malloc_atomic = GC_malloc_atomic(size : UInt32) : Void*
<jhass> fun realloc = GC_realloc(ptr : Void*, size : UInt32) : Void*
<jhass> fun free = GC_free(ptr : Void*)
<jhass> fun collect_a_little = GC_collect_a_little : Int32
<jhass> fun collect = GC_gcollect
canhtak has joined #crystal-lang
<jhass> fun add_roots = GC_add_roots(low : Void*, high : Void*)
<jhass> fun enable = GC_enable
<jhass> fun disable = GC_disable
<jhass> fun set_handle_fork = GC_set_handle_fork(value : Int32)
<jhass> type Finalizer = Void*, Void* ->
<jhass> fun register_finalizer = GC_register_finalizer(obj : Void*, fn : Finalizer, cd : Void*, ofn : Finalizer*, ocd : Void**)
<jhass> fun invoke_finalizers = GC_invoke_finalizers : Int32
<jhass> fun get_heap_usage_safe = GC_get_heap_usage_safe(heap_size : C::SizeT*, free_bytes : C::SizeT*, unmapped_bytes : C::SizeT*, bytes_since_gc : C::SizeT*, total_bytes : C::SizeT*)
<jhass> fun set_max_heap_size = GC_set_max_heap_size(C::SizeT)
<jhass> fun get_start_callback = GC_get_start_callback : Void*
<jhass> fun set_start_callback = GC_set_start_callback(callback : ->)
<jhass> fun set_push_other_roots = GC_set_push_other_roots(proc : ->)
<jhass> fun get_push_other_roots = GC_get_push_other_roots : ->
<jhass> fun push_all = GC_push_all(bottom : Void*, top : Void*)
<jhass> $stackbottom = GC_stackbottom : Void*
<jhass> end
<jhass> # Boehm GC requires to use GC_pthread_create and GC_pthread_join instead of pthread_create and pthread_join
<jhass> lib PThread
<jhass> fun create = GC_pthread_create(thread : Thread*, attr : Void*, start : Void* ->, arg : Void*)
<jhass> fun join = GC_pthread_join(thread : Thread, value : Void**) : Int32
<jhass> end
<jhass> fun __crystal_malloc(size : UInt32) : Void*
<jhass> LibGC.malloc(size)
<jhass> end
<jhass> fun __crystal_malloc_atomic(size : UInt32) : Void*
<jhass> LibGC.malloc_atomic(size)
<jhass> end
<jhass> fun __crystal_realloc(ptr : Void*, size : UInt32) : Void*
<jhass> LibGC.realloc(ptr, size)
<jhass> end
<jhass> module GC
<jhass> def self.init
<jhass> LibGC.set_handle_fork(1)
<jhass> LibGC.init
<jhass> end
<jhass> def self.collect
<jhass> LibGC.collect
<jhass> end
<jhass> def self.enable
<jhass> LibGC.enable
<jhass> end
<jhass> def self.disable
<jhass> LibGC.disable
<jhass> end
<jhass> def self.free(pointer : Void*)
<jhass> LibGC.free(pointer)
<jhass> end
<jhass> def self.add_finalizer(object : T)
<jhass> if object.responds_to?(:finalize)
<jhass> LibGC.register_finalizer(object as Void*,
<jhass> ->(obj, data) {
<jhass> same_object = obj as T
<jhass> if same_object.responds_to?(:finalize)
<jhass> same_object.finalize
<jhass> end
<jhass> }, nil, nil, nil)
<jhass> nil
<jhass> end
<jhass> end
<jhass> end
<jhass> now, would you like that?
<jhass> keep in mind that there might be active conversations between other parties when someone does that
<jhass> also my client is blocked for a while and I can't react to replies for some time
leafybasil has joined #crystal-lang
<jhass> haha ‘Saying that Java is nice because it works on all OS’s is like saying that anal sex is nice because it works on all genders’
<jhass> sorry, just had to spread that :P
<asterite> I understand now :)
<asterite> lol, I just see that quote :)
<jhass> btw did you read backlog and saw https://crystalshards.herokuapp.com/?
<asterite> whoa
<asterite> who did that?
<jhass> zamith:
<jhass> do you like the term shard?
<asterite> Maybe. I’m currently using elasticsearch and see “shard” in the logs everywhere...
<asterite> but of course shard is a word, so
<asterite> But shard is short and nice, it could work
<asterite> I like it that the website is done in Crystal :)
<asterite> I always expect to see projects written in Ruby for some reason, thinking Crystal can’t still manage to do that
<jhass> hehe
<jhass> I think we are at a point where there are little to no language features missing and it's a question of having libraries that make it not only possible but also easy
<asterite> Yes. That, and documentation, and fixing the missing bugs (not many, there are about 20 labelled with “bug”)
<asterite> I’d like to make the language more robust and with less bugs… finding bugs in a new language might maybe put you off and not want to use it
<asterite> I’m also amazed that the webapp is on heroku
<jhass> the buildpack needed some tweaks, check his fork
<jhass> basically just the new URL for the new release
<asterite> I hope he sends a pull request :)
<asterite> I was telling waj the other day, Java was a small language in the beginning but it was pretty robust and it worked, so little by little it started growing. I think Go is the same, it’s not very big but it does what it does pretty well. Rust too (they don’t have much syntax sugar, the code ends up very verbose in my opinion, but it works). Crystal is small, it boils down to objects and methods (and blocks), and then some syntax sugar on top of th
<asterite> So I’d like to stop adding features for a while, stabilizing things, documenting, etc.
<asterite> We’ll also work on libuv bindings and have a model similar to node.js for now… waj says: “if it works for them, it could work for us” (at least as a start)
<asterite> (the model will be optional, so if you are doing a game you won’t use evented io)
<jhass> given that crystals user base will likely come from languages that don't use evented io, I wouldn't make it the default either tbh.
<jhass> it's a great feature to have in the standard library though
naps62 has joined #crystal-lang
<asterite> Yes, we want to have it so that if you can compile your program in evented mode, or not. I think for now ifdef is enough to do that (but we’ll see), we didn’t write much code yet
<asterite> With node.js model there’s also no way to have data races, because there’s a single thread
<zamith> asterite: we were discussing moving that site to shards.crystal-lang.org
<zamith> what do you think?
<asterite> Yes, could be :) I have to ask waj and others what do they think about the name “shard"
<asterite> There’s also this: http://terraria.gamepedia.com/Crystal_Shard :-P
<asterite> (first hit on google)
<jhass> silly little gaming community
<jhass> as if we won't just overrun them! :P
<jhass> there's also http://crystalshard.net/ apparently
<asterite> There’s two already, so why not a third, right?
<jhass> right
<jhass> tymat proposed "atoms" and "lattice" after zamith left yesterday, but I think the former is too common and the later a bit obscure
<jhass> and I think we won't have a problem with shard just because some games use it
<jhass> worst thing is that some will join here and ask questions about game
<jhass> like it happens in #diaspora from time to time :P
<asterite> There’s also play rust :)
<asterite> http://www.reddit.com/r/playrust/: Rust on Reddit
<asterite> :-P
<asterite> There’s also the possibility to call the packages just “package” or “library”. Why the need for a different name?
<jhass> in my experience having your own terms helps to identify with and thus build up a community ;)
<jhass> I know, it's shady "social media speak", but eh
<asterite> Yes, I think it’s kind of marketing, but if it works...
canhtak has quit [Quit: canhtak]
<asterite> >> PROGRAM_NAME
<CeBot> asterite: "/tmp/crystal-run-eval.eQpz4M"
asterite has quit [Quit: asterite]
endou______ has quit []
endou______ has joined #crystal-lang
asterite has joined #crystal-lang
tmoore_ has quit []
tmoore_ has joined #crystal-lang
zamith_ has joined #crystal-lang
zamith has quit [Ping timeout: 245 seconds]
canhtak has joined #crystal-lang
shama has joined #crystal-lang
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 244 seconds]
asterite_ has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
asterite_ is now known as asterite
asterite has quit [Quit: asterite]
zamith_ has quit [Quit: Be back later ...]
naps62 has quit [Remote host closed the connection]
zamith_ has joined #crystal-lang
asterite has joined #crystal-lang
bcardiff has joined #crystal-lang
<jhass> >> require "json"; Array(Hash(String, String|Array(Hash(String, Int32)))).from_json ""
<CeBot> jhass: in /usr/lib/crystal/json/from_json.cr:75: undefined method 'new' for String
<jhass> asterite: ^ supposed to work?
<asterite> Nope, unions don’t work there
<jhass> then how would I parse such json?
bcardiff1 has quit [Ping timeout: 245 seconds]
<asterite> What are you parsing?
<asterite> You can use json_mapping. Do you know it?
<jhass> I'll take a look
<asterite> You have to write the “mapping”, but it ends up being more type safe and also more efficient
<jhass> other topic: I did notice something lacking that's close to a language feature
<jhass> encodings
<asterite> Can’t it be done in a library? It’s also probably missing in IO-related code
<jhass> reading data from an IO (socket in my case) that's not UTF-8 fails
<jhass> think HTTP responses
<asterite> Yes, it’s lacking. We know it, but we didn’t have time to implement it yet
<jhass> I think we don't necessarily need strings to know encodings, but being able to specify the conversion in calls like IO#read should be possible
<jhass> and that should actually default to what the system locale has set and only if that's unset fallback to UTF-8
<asterite> Yes. Our plan is to let String always have UTF-8, but when you read from an IO (or write, probably) you can specify an encoding
<asterite> Maybe we can just have EncodedIO(Encoding) or something like that, that would do the conversion
<asterite> but we don’t know yet
<asterite> It’s definitely something that we need to implement, but didn’t have time yet
<jhass> not sure, it should have three layers IMO
<jhass> (system encoding|fallback) -> per IO encoding -> per read/write call encoding
<jhass> so on a read call, encoding to build the string is determined by parameter || @encoding || system_default || fallback
<jhass> same for write call etc.
<jhass> system default is ENV["LC_CTYPE"] || ENV["LANG"]
<jhass> actually ENV["LC_CTYPE"] || ENV["LC_ALL"] || ENV["LANG"]
<jhass> maybe there's a libc call for that, I don't know
<jhass> how do I define the nested array (data) in json_mapping? Can't deduce that from the specs. type: Array(DataPoint) ?
<asterite> Yes
<jhass> heh, I did but I didn't memorize :D
<jhass> mmh, suppose I have a generic class A(T) and an instance of A has a T of Array(K, V), is there a way to get K, V in a method in of A?
<jhass> er, that doesn't make sense I guess
<jhass> nvm
<zamith_> hey guys
zamith_ is now known as zamith
<asterite> hey zamith
<zamith> is there a logo for crystal, or any type of design material?
<asterite> There’s the spinning crystal… we asked our designer to do a static version, but he likes the dynamic one too much :-P
<asterite> Our idea was to have different crystal shapes for each minor version, and each major version would have a different color (right now its grey because it’s 0)
<zamith> oh ok
<asterite> Do you need a logo?
<zamith> not sure, just wondering
<zamith> it's always nice to have it on the README, or even shirts...
<zamith> who knows
<zamith> :P
<zamith> a spinning one is harder to put on a shirt
<zamith> :)
<zamith> btw, would you guys be available to come to http://rubyconf.pt/?
<asterite> Will there be a talk about Crystal? :)
<zamith> You could give it
<zamith> ;)
<asterite> Do you organize it?
<zamith> yes
<asterite> Cool!
<asterite> Because we wanted to talk about Crystal here in the ruby conf (Argentina) and have been rejected a couple of times now :(
<zamith> We're still working on the speakers, but it's something to have in mind
<zamith> ;)
<asterite> The only problem is that Portugal is a bit far from us, and travelling there is kind of expensive
<zamith> yeah, I know
<zamith> :S
<zamith> we'll see what we can do
<asterite> I’ll talk with waj, we’ll see what we can do on our side too
<zamith> I was thinking of also organizing a crystal conf on the day before
<zamith> a smaller thing of course
<zamith> but there are already some interested people here in portugal
<zamith> maybe we can get sferik to come again, he came last year to rubyconf pt
<asterite> Where is he from?
<zamith> usa, but living in germany
<zamith> Also, I'm speaking about crystal again next week, on a meetup on another city
<asterite> :o
<zamith> so, expect to hear from me with more doubts
<asterite> You are amazing
<zamith> loool
<zamith> thanks
<zamith> but the people are interested in the language
<zamith> it's not really because of me
<zamith> :P
<asterite> You are the one giving the talks :)
<zamith> a small group at a time
<zamith> trying to convert everyone
<zamith> we need as many people as we can, to build a string comunity
<asterite> My only worry is that the language still lacks many things, so maybe people will be frustrated by that (or by some of the known or unknown bugs)
<asterite> But maybe that’s expected from a new language, I don’t know
<zamith> yeah, I think it is
<zamith> people know it's a new language
<zamith> and you need to contact many to get few
<asterite> The idea was also to name each release with the crystal name
<asterite> (he seems to like crystals and their shapes :-P)
<asterite> (but don’t use that name, all of that takes some time and we are more busy in the real language now, hehe)
n20163 has joined #crystal-lang
n20163 has quit [Remote host closed the connection]
asterite_ has joined #crystal-lang
asterite has quit [Ping timeout: 264 seconds]
asterite_ is now known as asterite
asterite has quit [Quit: asterite]
asterite has joined #crystal-lang
<asterite> zamith: will you reuse your slides?
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 276 seconds]
naps62 has joined #crystal-lang
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1830 (master - 55e8969 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
bcardiff1 has quit [Quit: Leaving.]
<jhass> >> / \d/ # that's #337 right?
<CeBot> jhass: Syntax error in eval:3: unexpected token: /
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1831 (master - 0ce03c3 : Ary Borenszweig): The build passed.
travis-ci has left #crystal-lang [#crystal-lang]
<asterite> Yes. Basically, regex with a leading space doesn’t work
<asterite> it’s always treated as a division operator
<asterite> I’ll try to fix it :)
<asterite> It’s not the same as /\s\d/, right?
<jhass> right
<jhass> \s is [ \t\n\r\one_i_forgot]
<jhass> \v i guess
<asterite> I’ll try to fix it today in a couple of hours if I can :)
<asterite> I’ll also merge the UDP-related pull request and try to make it work on mac
<asterite> Gotta go now… bye!
<jhass> no hurry, found a workaround ;)
<asterite> >> exit
<jhass> heh
<CeBot> asterite: Sorry, that took too long.
asterite has quit [Quit: asterite]
zamith has quit [Quit: Be back later ...]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1832 (master - a8d26a8 : Ary Borenszweig): The build was broken.
travis-ci has left #crystal-lang [#crystal-lang]
canhtak has quit [Quit: canhtak]
zamith has joined #crystal-lang
<zamith> asterite: Yeah, the bulk of them, any thing you would like me to change/add to them?
shama has quit [Remote host closed the connection]
shama has joined #crystal-lang
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1833 (master - 6646f6b : Ary Borenszweig): The build is still failing.
travis-ci has left #crystal-lang [#crystal-lang]
travis-ci has joined #crystal-lang
<travis-ci> manastech/crystal#1833 (master - 6646f6b : Ary Borenszweig): The build is still failing.
travis-ci has left #crystal-lang [#crystal-lang]