asterite changed the topic of #crystal-lang to: #crystal-lang The Crystal programming language | http://crystal-lang.org | Crystal 0.6.1 | 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
ismaelga has joined #crystal-lang
havenwood has quit []
<a5i> >> a = "hello world"; a.index("l", 3)
<DeBot> a5i: 3
<a5i> nvm fixed!
ismaelga has quit [Remote host closed the connection]
Cassyblanca has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 3 new commits to master: http://git.io/veySk
<crystal-gh> crystal/master 890aa44 Ary Borenszweig: Fixed: new concurrent sleep didn't work with float
<crystal-gh> crystal/master fd365f8 Ary Borenszweig: Fixed: Number#step didn't allow type change. And don't create an unnecessary number union
<crystal-gh> crystal/master 2adc0dd Ary Borenszweig: Use CC environment variable if available. Fixes #525
<a5i> Parsgin JSON same was as ruby?
Cassyblanca has left #crystal-lang [#crystal-lang]
ponga has joined #crystal-lang
ponga has quit [Client Quit]
havenwood has joined #crystal-lang
<a5i> >> a = {foo: 1, :bar => 2, "baz" => 3, {1.0 => 2} => 4} a[foo]
<DeBot> a5i: Syntax error in eval:3: unexpected token: a
<a5i> >> a = {foo: 1, :bar => 2, "baz" => 3, {1.0 => 2} => 4}; a[foo]
<DeBot> a5i: Error in line 3: undefined local variable or method 'foo'
<a5i> >> a = {foo: 1, :bar => 2, "baz" => 3, {1.0 => 2} => 4}; a["foo"]
<DeBot> a5i: MissingKey: Missing hash value: foo
<a5i> >> a = {foo: 1, :bar => 2, "baz" => 3, {1.0 => 2} => 4}; a["baz"]
<DeBot> a5i: 3
<travis-ci> manastech/crystal#2209 (master - 2adc0dd : Ary Borenszweig): The build passed.
<a5i> Can anybody help me with this? https://gist.github.com/Ap0ph1s/ef0fef7f2e002f4bca34
<a5i> the keys are fake
weskinner_work has joined #crystal-lang
ponga has joined #crystal-lang
ponga has quit [Client Quit]
weskinner_work has quit [Ping timeout: 264 seconds]
<a5i> This literally makes no sense, It's not a Nil yet it is a nil.. any thoughts @ jhass?
k2b6s9j has joined #crystal-lang
k2b6s9j has quit [Client Quit]
havenwood has quit []
aemadrid has joined #crystal-lang
aemadrid has quit [Client Quit]
havenwood has joined #crystal-lang
ponga has joined #crystal-lang
ponga has quit [Remote host closed the connection]
k2b6s9j has joined #crystal-lang
ponga has joined #crystal-lang
JuryBatenko has joined #crystal-lang
a5i has quit [Quit: Connection closed for inactivity]
ponga has quit [Quit: Leaving...]
colorisco has joined #crystal-lang
k2b6s9j has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
JuryBatenko has quit [Quit: Computer has gone to sleep.]
ponga has joined #crystal-lang
havenwood has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 272 seconds]
leafybasil has quit [Remote host closed the connection]
ponga has joined #crystal-lang
ponga has quit [Remote host closed the connection]
ponga has joined #crystal-lang
leafybasil has joined #crystal-lang
ponga has quit [Ping timeout: 264 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ponga has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybasil has quit [Ping timeout: 250 seconds]
Ven has joined #crystal-lang
canhtak has joined #crystal-lang
a5i has joined #crystal-lang
canhtak has quit [Quit: canhtak]
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
canhtak has joined #crystal-lang
ponga has quit [Remote host closed the connection]
ponga has joined #crystal-lang
JuryBatenko has joined #crystal-lang
ismaelga has joined #crystal-lang
ismaelga has quit [Client Quit]
colorisco2 has joined #crystal-lang
colorisco has quit [Read error: Connection reset by peer]
colorisco2 has quit [Ping timeout: 244 seconds]
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
colorisco has joined #crystal-lang
havenwood has joined #crystal-lang
bcardiff has joined #crystal-lang
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
canhtak has quit [Ping timeout: 256 seconds]
weskinner_work has joined #crystal-lang
canhtak has joined #crystal-lang
canhtak has quit [Ping timeout: 246 seconds]
canhtak has joined #crystal-lang
asterite has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
canhtak has quit [Quit: canhtak]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ponga has quit [Remote host closed the connection]
<a5i> How do I use colorize with Crystal?
<bcardiff> you beat me :-P I was going to suggest
<bcardiff> with_color.green.surround(io) do
<bcardiff> io << "Hulk"
<bcardiff> end
<a5i> oo
canhtak has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
asterite has joined #crystal-lang
<asterite> bcardiff: it's simpler than that
<asterite> >> require "colorize"; puts "hello".colorize.red
<DeBot> asterite: hello
<asterite> >> require "colorize"; with_color.green.surround(STDOUT) { STDOUT.puts "hello" }
<DeBot> asterite: hello
leafybasil has quit [Ping timeout: 252 seconds]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/ve7SR
<crystal-gh> crystal/master af236e8 Ary Borenszweig: Attach the GC finalizer after an object was fully initialized, not before it
<crystal-gh> crystal/master 784d459 Ary Borenszweig: Fixed: C unions to_s/inspect was broken. Fixes #527
<colorisco> does crystal have something like to roda or hobbit?
<colorisco> microframework for web api?
<asterite> colorisco: Crystal is too young, there are no frameworks for it yet
<asterite> There's this: https://github.com/manastech/frank , a small clone of sinatra, but it's incomplete
<asterite> (read: very incomplete)
<a5i> asterite: you should rename it Quartz
<a5i> or some other specific crystal
<jhass> no, the other guy should rename
<a5i> who
<asterite> a5i: you mean frank?
<a5i> asterite: yeah
<colorisco> hobit has 4 files
<asterite> But how many lines in those 4 files? :-)
<colorisco> its not difficult write similar lib for guys like you
shama has joined #crystal-lang
<asterite> colorisco: you are right, but it takes time. Also, even if we have a minimalist web framework, you would still need view templates (we have something very small convering that), DB, and other things, I guess
<a5i> jhass: That's the lib, Im talking about renmaing Frank, not Crystak
<a5i> Crystal
<asterite> a5i: what's wrong with frank?
<a5i> Idk, It's a generic first name and I think it deserves a better name :P
<a5i> thats just my opinion
<colorisco> asterite, is possible work with postgre?
<asterite> a5i: but you do know why we chose that name, right? (well, waj chose it)
<asterite> colorisco: no bindings for postgres yet
<a5i> asterite: Yeah from Sinatra you put his first name, then again this is just my opinon
canhtak has quit [Quit: canhtak]
<travis-ci> manastech/crystal#2210 (master - 784d459 : Ary Borenszweig): The build was broken.
mah has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
mah has quit [Quit: Page closed]
ic5y has joined #crystal-lang
jua_ has joined #crystal-lang
k2b6s9j has joined #crystal-lang
ponga has joined #crystal-lang
ponga has quit [Ping timeout: 240 seconds]
k2b6s9j has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ic5y> anyone tried to build crystal for win?
<jhass> we have a guy here working on porting it to windows
<jhass> a snapshot of his work is in https://github.com/manastech/crystal/tree/windows
<ic5y> i found the branch, just got some linker error, and dont know how to solve it
<ic5y> yup
<jhass> then you'll have to stick around until wanderer returns ;)
<ic5y> okay, i try to solve it until he returns
ic5y has quit [Quit: Page closed]
havenwood has quit []
markhend has joined #crystal-lang
<markhend> num % (num+x) seems to work but not same expression w/o a space after '%'. e.g. num%(num+x).
<markhend> Is this a known issue?
<jhass> no, first time I hear it, feel free to open an issue :)
k2b6s9j has joined #crystal-lang
<a5i> Think I'm gonna start some crystal tutorials
<jhass> great idea
asterite has joined #crystal-lang
<asterite> jhass: Maybe you know this... why Enumerable#select without a block returns an Enumerator?
<jhass> consistency
<jhass> I think all of them do
<asterite> But [1, 2, 3].each, [1, 2, 3].select and [1, 2, 3].map are just the same?
<jhass> yeah, looks like it
<asterite> Weird... I don't think we'll do that in Crystal
<jhass> I wouldn't have an issue with not returning an Enumerator for these
<jhass> yeah
<jhass> oh, actually
<jhass> it's for .select.with_index
<jhass> and the like
<a5i> I like how you can make Ruby as verbose as you like
<a5i> accepting little things from other languages
<jhass> asterite: ^
<asterite> jhass: I see... I wonder how that works
<asterite> In crystal you can do
<asterite> >> require "iterator"; [10, 20, 30].iterator.with_index.map { |tuple| "Value: #{tuple[0]}, Index: #{tuple[1]}" }.to_a
<DeBot> asterite: ["Value: 10, Index: 0", "Value: 20, Index: 1", "Value: 30, Index: 2"]
<asterite> I think I'll rename "iterator" to "each" and make iterator always required
<asterite> so you can do: [1, 2, 3].each_with_index.map { ... }
<asterite> And, unlike ruby, once you go into an iterator, that will always be lazy until you enumerate it with each, or call to_a, sum, etc.
<asterite> I meant [1, 2, 3].each.with_index.map, but I guess [1, 2, 3].each_with_index will also be avaialble
k2b6s9j has quit [Ping timeout: 264 seconds]
colorisco has quit [Ping timeout: 246 seconds]
havenwood has joined #crystal-lang
JuryBatenko has quit [Quit: Computer has gone to sleep.]
bcardiff has quit [Quit: Leaving.]
leafybasil has joined #crystal-lang
havenwood has quit [Ping timeout: 250 seconds]
havenwood has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
saml has quit [Quit: Leaving]
k2b6s9j has joined #crystal-lang
jua_ has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
k2b6s9j has quit [Remote host closed the connection]
weskinner_work has quit [Ping timeout: 256 seconds]
markhend has quit [Ping timeout: 246 seconds]
canhtak has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
ponga has joined #crystal-lang
canhtak has quit [Quit: canhtak]
bcardiff has quit [Quit: Leaving.]
ponga has quit [Remote host closed the connection]
ponga has joined #crystal-lang
a5i has quit [Quit: Connection closed for inactivity]
weskinner_work has joined #crystal-lang