ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.21.1 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
IRCFrEAK has joined #crystal-lang
IRCFrEAK has quit [K-Lined]
kodo[m] has joined #crystal-lang
<kodo[m]> Coming from ruby world I'm kinda confused on when I should be using channels.
<kodo[m]> If I want concurrency it seems like I would just spawn another fiber
<kodo[m]> I guess channels are the way to share information between fibers?
Guest27220 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> kodo[m]: Yep
Ven has joined #crystal-lang
Ven has quit [Client Quit]
bjz has joined #crystal-lang
Guest62166 has joined #crystal-lang
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <Zhomart> Hi, in the end I decided to use `Slice` to store huge data. Apparently under the hood it just uses `Pointer` to store data. Initially I feared that whole data will be stored in stack.
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
Guest62166 has quit [Quit: Quite]
sardaukar has joined #crystal-lang
<sardaukar> hello!
<sardaukar> is there a better way to write this? https://gist.github.com/sardaukar/def288fbbf9c2284fcce8d14c6b400e3
<sardaukar> basically, I want to pass in N arguments and return a slice with a constant as the first element, and the rest of the args passed in the slice
tax has joined #crystal-lang
<FromGitter> <Zhomart> <sardkaukar> this should work ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58ce00b56701410e5851ffde]
<sardaukar> that's better, but I was hoping of a more magical way of using the splat on the Slice's initializer :D
sardaukar has quit [Quit: Leaving]
_whitelogger has joined #crystal-lang
tax has quit [Quit: Leaving]
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
Qchmqs has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Qchmqs has quit [Remote host closed the connection]
Qchmqs has joined #crystal-lang
_whitelogger has joined #crystal-lang
bjz has joined #crystal-lang
Qchmqs has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
pawnbox has quit [Quit: gotta go guys.]
Ven has joined #crystal-lang
Ven is now known as Guest61044
Guest61044 has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
akwiatkowski has joined #crystal-lang
Ven_ has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] Sija opened pull request #4163: Print sigfaults and exceptions to STDERR (master...print-sigfault-to-stderr) https://git.io/vydnG
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 264 seconds]
_whitelogger has joined #crystal-lang
IRCFrEAK has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IRCFrEAK has quit [K-Lined]
<RX14> I think i'll just manage shards versions completely independantly of crystal versions in crane
<RX14> and probably not *really* support older versions of crystal
bungoman_ has joined #crystal-lang
bungoman has quit [Ping timeout: 246 seconds]
daemonwrangler has quit [Ping timeout: 264 seconds]
akwiatkowski has joined #crystal-lang
daemonwrangler has joined #crystal-lang
daemonwrangler has quit [Ping timeout: 256 seconds]
daemonwrangler has joined #crystal-lang
sija has quit [Quit: Connection closed for inactivity]
<RX14> well Papierkorb it looks like git's going to try and be ready to change hashes at least
<FromGitter> <schoening> When I read through the 2017 goals it says you want crystal to be usable to create cross platform desktop apps. No love for smartphone devs? :worried:
<FromGitter> <KCreate> I remember someone from the core team publishing (experimental) support for android
<RX14> well i'm pretty sure iOS is off the table
<RX14> but android is being worked on
<FromGitter> <KCreate> It was @ysbaddaden if i recall correctly
<RX14> yup
<FromGitter> <KCreate> why would iOS be off the table?
<Papierkorb> Found a bug in String's unicode processing. At least #insert(Int32, Char) (or more?) break on unicode Chars
<Papierkorb> `line = ""; char = 'ä'; line = line.insert(0, 'ä'); pp line.ascii_only?` should give "false", but is actually "true". If you try "ä".ascii_only? the result is as expected
<FromGitter> <schoening> Isn't swift llvm too? What would stop crystal to work on ios?
<Papierkorb> apples blessing?
<RX14> i'm sure it's against their TOS somewhere
<FromGitter> <KCreate> doesn't xcode just upload the unoptimized llvm bytecode?
<RX14> well tyhen i guess it's kinda possible
<FromGitter> <KCreate> so there shouldn't be a problem with that i guess
<RX14> still would need to get rid of the GC
<Papierkorb> but can you deploy it to their market?
bungoman_ has quit [Ping timeout: 246 seconds]
<FromGitter> <dreyks> you can develop for ios even using ruby. why wouldn't it be possible for crystal?
<RX14> because ruby is interpreted
<FromGitter> <dreyks> ah maybe it is transpiled to swift then
<FromGitter> <schoening> Hm. How does interpreted ruby get around gc RX14? o:
<RX14> ruby's GC is precise i would think and doesn't have to scan stacks
<RX14> libgc that we use also relies on being able to send signals to stop the world
<RX14> which i guess isn't in the iOS api...
<FromGitter> <schoening> Fascinating. Thx for the info. :) kinda sad tho..
<kodo[m]> any ETA of parallelism?
<kodo[m]> Is that a ways out still?
<kodo[m]> ETA on*
<RX14> it's being worked on in a branch
<RX14> it'll be ready when it's ready
<kodo[m]> like best guess... ballpark
<crystal-gh> [crystal] Papierkorb opened pull request #4164: Fix String#insert not working with non-ascii Char (master...master) https://git.io/vydVY
bungoman has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 260 seconds]
<FromGitter> <drosehn> There's rubymotion, but I think that's compiled. Apple has been against interpreted languages, not compiled ones. And they want languages where they can enforce restrictions on what iOS api's can be called by apps.
<FromGitter> <drosehn> There would still be a lot of effort to generate crystal binaries which would run on iOS, and crystal's goals for 2017 are already *very* ambitious (IMO). iOS apps could wait until 2018, I think. (and yes, I'm technically an iOS developer)
p0p0pr37 has quit [Read error: Connection reset by peer]
<FromGitter> <dreyks> yes i was talking about rubymotion
<FromGitter> <schoening> @kodo[m] 2017 is the goal mate
<FromGitter> <tzekid> I tried the kemal tutorial and it doesn't compile :O [ https://git.io/vydi0 ]
<FromGitter> <schoening> The 2017 list is truly massive. ⏎ Why are they against them @drosehn? They seem fine with JIT'ed languages at least? Ejecta, Cordova etc are allowed.
<FromGitter> <tzekid> Is just me, or ?
<FromGitter> <tzekid> Thanks
<FromGitter> <drosehn> Apple has loosened up over time, but originally they were pretty dead set against interpreted languages on iOS devices. My guess is that they were very concerned about both memory usage of each app, and overall battery life.
<FromGitter> <drosehn> Obviously the hardware of iOS devices has improved by a massive amount over these last ten years...
<FromGitter> <schoening> I haven't owned an iPhone myself but the hardware is great. I wish android would stop the marketing gimmick of adding more and more cores and just build fewer better ones... Javascript performance is just magnitudes better on iPhone.
<FromGitter> <schoening> That's not really crystal related :p but js is my main language and will be until crystal goes cross platform
<FromGitter> <dreyks> android cores are for battery, not for performance
<FromGitter> <schoening> So 8+ cores is not a marketing gimmick like the bitwars in the 80ties?
<FromGitter> <dreyks> as far as i know it turns off unused cores to save energy
<FromGitter> <schoening> Well, those engineers and devs are way smarter than me so there is probably validity to it all. But it's frustrating to have some webgl stuff run at 60fps on iphone 5 and crippling 15fps on flagship android phones :/
bjz has joined #crystal-lang
<Papierkorb> schoening, the octacores are actually dual quad cores. 4x slow processors, 4x fast processors. the phone then switches between those as needed. They can't even run at the same time, as afaik, the slow and fast ones share caches
<Papierkorb> But single-core performance is mediocre, yes
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
<FromGitter> <schoening> Thanks for the info. It's not so easy to make JS work well with multicore. ⏎ So gonna keep learning crystal and hope for the best :D
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<FromGitter> <schoening> Anyone tried out crow to compile crystal to js? I am getting the following error: ⏎ bash: /usr/bin/crow: cannot execute binary file: Exec format error
<FromGitter> <KCreate> What's crow?
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <schoening> https://github.com/geppetto-apps/crow
<FromGitter> <schoening> crystal to js transpiler/compiler
<RX14> @schoening build the thing from source
<RX14> looks like it's a binary distribution
<RX14> and they only distribute a binary for 1 platform
<RX14> which is weird
<FromGitter> <schoening> Shoulndt I have gotten some error when installing via npm :o ?
<RX14> not if it's badly packaged
<RX14> which i'm pretty sure it is
<RX14> like really badly packaged
<RX14> looks like they just copy an osx binary into the npm package and publish it
<RX14> i assume you're using linux
<FromGitter> <schoening> Ya
<RX14> crystal build --release src/cli.cr -o crow should do
<RX14> make sure to shards install first
<FromGitter> <schoening> I'm a newb. Can you elaborate on the last bit? What does that mean.
<RX14> shards is crystal's package manager
<RX14> `shards install` is a command
<RX14> installs dependencies
<FromGitter> <schoening> Ohh ok!
<FromGitter> <schoening> Like npm install
<FromGitter> <schoening> It worked. My fan is spinning wildly, compiling in progress :p
<FromGitter> <KCreate> crystal deps should do the same
<RX14> crystal deps is a legacy alias for shards
<RX14> it's longer
<RX14> does the same thing though
<RX14> it's useful if you only have the omnibus because that only exports shards behind crystal deps
<FromGitter> <schoening> @RX14 it worked. Thank you :)
<RX14> for some reason
p0p0pr37 has joined #crystal-lang