jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.9.0 | Fund Crystals development: http://is.gd/X7PRtI | 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
canhtak has quit [Quit: canhtak]
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
xdougx has joined #crystal-lang
Tetsumi has joined #crystal-lang
NeverDie has joined #crystal-lang
NeverDie has quit [Client Quit]
xdougx has quit [Ping timeout: 244 seconds]
RX14 has quit [Ping timeout: 250 seconds]
NeverDie has joined #crystal-lang
bariscimen has joined #crystal-lang
NeverDie has quit [Client Quit]
Cidan is now known as zz_Cidan
RX14 has joined #crystal-lang
bariscimen has quit [Ping timeout: 268 seconds]
nakilon has quit [Ping timeout: 250 seconds]
<CompanionCube> Grr.
<CompanionCube> crystal_lib is producing no output
<CompanionCube> which sucks
<CompanionCube> anyone can help with that?
<CompanionCube> the input file is very damm close to pcre example
<CompanionCube> it's useles
leafybasil has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
bariscimen has joined #crystal-lang
bariscimen has quit [Ping timeout: 255 seconds]
bariscimen has joined #crystal-lang
bariscimen has quit [Ping timeout: 265 seconds]
pleiosaur has quit [Remote host closed the connection]
wmoxam has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 256 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
bariscimen has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
bariscimen has quit [Ping timeout: 240 seconds]
greengriminal has joined #crystal-lang
Tetsumi has quit [Quit: Leaving]
pawnbox has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
NeverDie has joined #crystal-lang
bariscimen has joined #crystal-lang
bariscimen has quit [Ping timeout: 260 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
xdougx has joined #crystal-lang
blue_deref has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
xdougx has quit [Ping timeout: 265 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
NeverDie_ has joined #crystal-lang
NeverDie has quit [Read error: Connection reset by peer]
NeverDie_ has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
Renich has quit [Quit: leaving]
adler has joined #crystal-lang
bariscimen has joined #crystal-lang
bariscimen has quit [Ping timeout: 244 seconds]
leafybasil has joined #crystal-lang
bariscimen has joined #crystal-lang
leafybasil has quit [Ping timeout: 240 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] adlerhsieh opened pull request #1830: Fix several broken links (gh-pages...gh-pages) http://git.io/vW9pb
greengriminal has quit [Quit: Leaving]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
nakilon has joined #crystal-lang
pawnbox has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
trapped has joined #crystal-lang
nakilon has quit [Quit: WHY NOT?]
pawnbox has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
bariscimen has quit [Remote host closed the connection]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
CraigBuchek has quit [Quit: Leaving.]
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Client Quit]
bariscimen has joined #crystal-lang
bariscimen has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 272 seconds]
pawnbox has joined #crystal-lang
leafybasil has joined #crystal-lang
alsm has joined #crystal-lang
leafybasil has quit [Ping timeout: 264 seconds]
xdougx has joined #crystal-lang
xdougx has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
elia has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
pawnbox has joined #crystal-lang
bariscimen has joined #crystal-lang
bariscimen has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 244 seconds]
edin has quit [Quit: Leaving]
pawnbox has joined #crystal-lang
bariscimen has joined #crystal-lang
bariscim_ has joined #crystal-lang
bariscim_ has quit [Remote host closed the connection]
bariscimen has quit [Ping timeout: 272 seconds]
someone_ has joined #crystal-lang
someone_ is now known as Guest60600
bariscimen has joined #crystal-lang
Guest60600 has left #crystal-lang [#crystal-lang]
A124 has quit [Read error: No route to host]
A124 has joined #crystal-lang
gamemanj has joined #crystal-lang
blue_deref has quit [Quit: bbn]
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
Bofu2U has joined #crystal-lang
<Bofu2U> Any chance someone has a link for a crystal benchmark on sockets (outbound, not inbound) like a web crawler or concurrency in general? Been trying to find one to no avail thus far.
<Bofu2U> and apologies for such a basic question, just having a hard time finding it heh
bariscimen has quit [Remote host closed the connection]
adler has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 252 seconds]
pawnbox has joined #crystal-lang
Guest714384753 has joined #crystal-lang
<Guest714384753> did anyone use amethyst with latest crystal-version?
<Guest714384753> either my code is broken or amethyst is...
<Guest714384753> my code: http://play.crystal-lang.org/#/r/kt9
ssvb has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
pawnbox has quit [Ping timeout: 264 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
xdougx has joined #crystal-lang
pawnbox has joined #crystal-lang
BlaXpirit has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<xdougx> jhass: exists property with type?
<crystal-gh> [crystal] ysbaddaden closed pull request #1830: Fix several broken links (gh-pages...gh-pages) http://git.io/vW9pb
<jhass> xdougx: while you can pass foo :: Bar, iirc it ignores it
ssvb has quit [Ping timeout: 272 seconds]
Tetsumi 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
trapped has joined #crystal-lang
BlaXpirit has quit [Read error: Connection reset by peer]
pawnbox has quit [Read error: Connection reset by peer]
BlaXpirit has joined #crystal-lang
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
<Guest714384753> jhass: yeah, the builds are failing. but it seems like that's another reason
<xdougx> jhass: Array(JSON::Type)? what should i do when i have it?
<xdougx> jhass: this `?`
<jhass> xdougx: that's |Nil
<xdougx> jhass: but it is always treating like nil, i have no idea why is nil, the piece of code is this: http://carc.in/#/r/ktj but there isnt getting Array(JSON::Type)?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<jhass> well then it isn't your real code
<xdougx> jhass: wow this is whats is happening http://carc.in/#/r/ktl
<jhass> xdougx: yes, instance variables don't reduce
<jhass> assign a local
pawnbox has quit [Read error: Connection reset by peer]
<xdougx> hummmm as local, i need to see if its possible
<jhass> xdougx: @sheet is not set in an initialize, so it's potentially nil
<xdougx> jhass: i already changed this code, the prepare was an initialize
<jhass> I can only explain from what you show
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
adler has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
bariscimen has joined #crystal-lang
pawnbox has joined #crystal-lang
Guest714384753 has left #crystal-lang [#crystal-lang]
<jokke> jhass: how would i print ANSI control chars in crystal?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<jhass> just do it?
<jokke> jhass: i'm trying to port this https://paste.xinu.at/OJQJ3e/ into crystal
<jokke> which is fairly easy since it's perl
<jokke> and very simple perl at that
<jokke> but it doesn't output any colors
<jokke> jhass: instead, this is what i get: https://p.jreinert.com/2fC/
<jokke> oh the greyscale ramp still needs editing
<[spoiler]> Yo! I am a bit confused. What does the question mark denote here: http://crystal-lang.org/docs/syntax_and_semantics/operators.html (section about Indexing)
<[spoiler]> `[]? # array index (nil on out of bounds)`
<jokke> yeah
<jokke> >> [1,2][3]
<DeBot> jokke: Index out of bounds (IndexError) - http://carc.in/#/r/ku7
<jokke> >> [1,2][3]?
<DeBot> jokke: # => nil - http://carc.in/#/r/ku8
<jhass> [spoiler]: first of all it's just a method call too
<jhass> rest ^
<[spoiler]> is it part of syntax, or is it "meta"?
<[spoiler]> oh it's part of syntax lol
<jhass> >> [1, 2].[]?(3)
<[spoiler]> Okay then
<DeBot> jhass: # => nil - http://carc.in/#/r/ku9
<[spoiler]> er part of the method name
<[spoiler]> sorry, ok I get it now
<jokke> yes
<[spoiler]> All cool now :D
<jokke> great
<[spoiler]> thanks :)
<jhass> jokke: mmh, does it work with \e instead of \x1b ?
<jokke> \e?
adler has quit [Remote host closed the connection]
<jhass> >> {'\e'.ord, 0x1B}
<DeBot> jhass: # => {27, 27} - http://carc.in/#/r/kuc
<jokke> mh
<jokke> i'll try
<jokke> jhass: \o/
<jokke> sort of
<jokke> something is still amiss
<jokke> but it's something else
pawnbox has quit [Ping timeout: 240 seconds]
adler has joined #crystal-lang
<jokke> jhass: is it currently possible to statically compile crystal bins?
<jokke> if not, will it be?
ssvb has joined #crystal-lang
<jokke> i tried --link-flags -static
<jokke> but i got a bunch of /usr/bin/ld: cannot find foobar
<jhass> jokke: you would need static (.a's) versions of the foobar's
<jokke> yeah
<jokke> jhass: and how would i get them?
<jokke> (under arch specifically)
pawnbox has joined #crystal-lang
<jhass> arch is pretty strict on no static libraries, makepkg strips them out of packages by default
<jhass> so unless you find something in the AUR you have to hack up the packages yourself
elia has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
elia has joined #crystal-lang
pawnbox has joined #crystal-lang
elia has quit [Ping timeout: 246 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vW5q4
<crystal-gh> crystal/master 2f74437 Ary Borenszweig: Fixed `Enum#parse` docs. Fixes #1831
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<jokke> jhass: yeah..
<Tetsumi> This hang the compiler http://play.crystal-lang.org/#/r/ktg, how can i define a recursive type of nested arrays (somewhat like a list) ?
<jhass> Tetsumi: that's a bug, please open an issue
<travis-ci> manastech/crystal#2f74437 (master - Fixed `Enum#parse` docs. Fixes #1831): The build has errored. https://travis-ci.org/manastech/crystal/builds/87913632
<DeBot> https://github.com/manastech/crystal/issues/1831 (enum .parse? method case insensitivity)
pawnbox has quit [Read error: Connection reset by peer]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
adler has quit [Remote host closed the connection]
alsm has quit [Ping timeout: 256 seconds]
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 272 seconds]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
<BlaXpirit> I don't understand how Thread captures variables
<BlaXpirit> >> result = [-1]*10; Array.new(10) { |i| Thread.new { result[i] = i } } .map &.join; result
<DeBot> BlaXpirit: # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - http://carc.in/#/r/kvb
<BlaXpirit> does it really copy the `i` into each thread or is this just a coincidence because the threads immediately run
<BlaXpirit> (tried with `sleep` but `sleep` doesnt work
NeverDie has joined #crystal-lang
victor_lowther has joined #crystal-lang
trapped has joined #crystal-lang
n0xff has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<xdougx> ls
bariscimen has quit [Remote host closed the connection]
<xdougx> someone already used capistrano to deploy crystal applications?
bariscimen has joined #crystal-lang
bariscimen has quit [Ping timeout: 250 seconds]
blue_deref has joined #crystal-lang
NeverDie_ has joined #crystal-lang
leafybas_ has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
leafybas_ has joined #crystal-lang
NeverDie_ has quit [Max SendQ exceeded]
NeverDie has quit [Ping timeout: 272 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
NeverDie has joined #crystal-lang
leafybasil has quit [Ping timeout: 268 seconds]
leafybas_ has quit [Ping timeout: 264 seconds]
bariscimen has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
NeverDie has joined #crystal-lang
BlaXpirit has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
<jokke> xdougx: um, crystal compiles into a single binary, why would you need capistrano?
<jokke> ok for assets and such maybe
<xdougx> automated deploy
<xdougx> already done it
<xdougx> just checking if everything is alright
leafybasil has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
pawnbox_ has quit [Remote host closed the connection]
<[spoiler]> is there an "elegant" way to read binary data from a slice/pointer and convert them to various types? I can't seem to find any other way apart from doing it manually.
<[spoiler]> Got this, basically: http://play.crystal-lang.org/#/r/kxr
<[spoiler]> Oh, and is there a more compact way of creating a slice/pointer (I know I could've used `Array#to_unsafe` on the `barr`, I was testing something with slices, so that's a leftover)
<[spoiler]> s/compact/pretty
<[spoiler]> I tried `Slice(UInt8){...}` but that didn't work :(
<[spoiler]> Oh and if the answer is "No, there ain't no pretty way to get that, data, you gotta do it manually, boy" then, would it be a good feature, so I can open a feature request and moan about it and/or add it myself?
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vWdX8
<crystal-gh> crystal/master d707aac Ary Borenszweig: Dir.glob: make it work with multiple consecutive file separators
<crystal-gh> crystal/master e4ee584 Ary Borenszweig: Fixed #1479: Make `crystal spec` only run files that end with `_spec.cr`
<[spoiler]> Also, is there a way to create a String from a Pointer/Slice without copying the actual bytes?
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
Sadin has joined #crystal-lang
NeverDie has joined #crystal-lang
<[spoiler]> ooh dur, IO sems to have what I need, MemoryIO might be helpful.
* [spoiler] plays around
bariscimen has quit []
Tetsumi has quit [Quit: Tetsumi]
<xdougx> jhass: is this possible def some; `cd /path/to/folder && rake some:taks`
<jhass> should just work
<xdougx> hope so :)
<BlaXpirit> [spoiler], hi, do you still have questions?
<BlaXpirit> if u have questions about pointers and stuff, feel free to ping me
<BlaXpirit> i don't think MemoryIO is the thing
<[spoiler]> BlaXpirit: Hi! I think I mostly figured stuff out now... 1. I didn't realise string were immutable and, 2. I didn't notice the #to_io/#from_io methods. Also, I discovered there's IO::ByteFormat stuff, and MemoryIO is helpful with testing! :D
<[spoiler]> Unless I'm doing something wrong, please let me know then
<BlaXpirit> sounds fine
BlaXpirit_ has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
Sadin has quit [Quit: Leaving]
xdougx has quit []
NeverDie has joined #crystal-lang
<crystal-gh> [crystal] rosylilly opened pull request #1834: Improve docs (master...improve-docs) http://git.io/vWFDI
BlaXpirit_ has quit [Ping timeout: 265 seconds]
gamemanj has quit [Ping timeout: 260 seconds]
Sadin has joined #crystal-lang
Ven has joined #crystal-lang
Sadin has quit [Client Quit]
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<[spoiler]> I'm curious why is this done like this: http://git.io/vWbfj wouldn't using htons/htonl and ntohs/ntohl be better for performance? Also, aren't the 8-bit ones extra, since endianess only applies to byte order (unless they were added for the sake of consistency)?
<BlaXpirit> [spoiler], why use lame C functions of limited availability for varying types
<BlaXpirit> and sure, consistency
Sadin has joined #crystal-lang
<[spoiler]> Hmm
<BlaXpirit> i dont see how these would improve performance
<[spoiler]> Well actually, it's a good point because you'll need to access them byte-by-byte anyway. I'd at least "write them backwards" (from highest to lowest index) rather than reverse and then write
<BlaXpirit> somehow it's "faster", whatever
<[spoiler]> BlaXpirit: I mostly meant the use of #reverse!, because I think C's `_to__s` (can't be bothered to type them all the time) just fiddle the bytes
<[spoiler]> oh well then
<BlaXpirit> i'm a proponent of what you're saying
<BlaXpirit> oh actually that bit fiddling implementation was bad
<BlaXpirit> lol no wonder reverse is "faster"
<[spoiler]> Hmm, it's still wise to use `unless SystemEndian == self` though. Also, not sure if there should be an `alias SystemEndian = LittleEndian`, since there *are* BE systems (rare, tho)
<BlaXpirit> [spoiler], point is crystal is not supported on such platforms
<[spoiler]> I think some hardware can be bi-endian, but I don't think there's an exclusively big-endian one anyway
<[spoiler]> That's outright discrimination!
<[spoiler]> #BEprocessorsmatter !
<BlaXpirit> no, they really don't
<[spoiler]> LOL
<BlaXpirit> this SystemEndian alias is better, don't you understand, so that people dont have to assume little endian themselves
<BlaXpirit> it can be changed if/when a big endian platform is supported
BlaXpirit has quit [Quit: Konversation]
<[spoiler]> oh yeah
Tetsumi has joined #crystal-lang
fowlduck has joined #crystal-lang
pleiosaur has joined #crystal-lang
fowlduck_ has joined #crystal-lang
fowlduck has quit [Ping timeout: 240 seconds]