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
BlaXpirit has quit [Quit: Konversation]
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blue_deref has joined #crystal-lang
greengriminal has joined #crystal-lang
reed_ has quit [Ping timeout: 256 seconds]
qard has quit [Quit: Textual IRC Client: www.textualapp.com]
<crystal-gh> [crystal] adlerhsieh opened pull request #1765: Fix one broken link in contributing guide (master...add-doc) http://git.io/vCbFW
NeverDie has joined #crystal-lang
buggs has quit [Quit: WeeChat 0.4.2]
datanoise has joined #crystal-lang
nakilon has quit [Ping timeout: 244 seconds]
Philpax__ is now known as Philpax
glenab has joined #crystal-lang
glenab has quit [Remote host closed the connection]
glenab has joined #crystal-lang
glenab has quit [Remote host closed the connection]
glenab has joined #crystal-lang
glenab has quit [Remote host closed the connection]
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 252 seconds]
jeromegn_ has joined #crystal-lang
endou_ has joined #crystal-lang
bmcginty_ has joined #crystal-lang
jhass|off has joined #crystal-lang
dom96_ has joined #crystal-lang
bmcginty has quit [*.net *.split]
zz_Cidan has quit [*.net *.split]
lokulin has quit [*.net *.split]
Liothen has quit [*.net *.split]
jeromegn has quit [*.net *.split]
manveru has quit [*.net *.split]
n1ftyn8_ has quit [*.net *.split]
dom96 has quit [*.net *.split]
endou has quit [*.net *.split]
jhass has quit [*.net *.split]
dom96_ is now known as dom96
jeromegn_ is now known as jeromegn
jhass|off is now known as jhass
Liothen has joined #crystal-lang
Liothen has joined #crystal-lang
Cidan has joined #crystal-lang
manveru has joined #crystal-lang
n1ftyn8_ has joined #crystal-lang
lokulin has joined #crystal-lang
glenab has joined #crystal-lang
<travis-ci> manastech/crystal#7cfeedb (master - Formatter: align condition of suffix if/unless): The build has errored. https://travis-ci.org/manastech/crystal/builds/85967200
greengriminal has quit [Quit: Leaving]
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 260 seconds]
glenab has quit [Remote host closed the connection]
cyjimmy264 has joined #crystal-lang
pawnbox has joined #crystal-lang
glenab has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
BlaXpirit has joined #crystal-lang
bcardiff has joined #crystal-lang
gamemanj has joined #crystal-lang
datanoise has quit [Ping timeout: 244 seconds]
barosl has quit [Quit: Leaving]
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 244 seconds]
Ven has joined #crystal-lang
Ven has quit [Client Quit]
barosl has joined #crystal-lang
silverweed has joined #crystal-lang
<silverweed> hello guys, can I ask help about modules?
<silverweed> I have a project with the standard directory hierarchy (libs/ and src/), and have several files under src/ which are under module "LE"
<silverweed> in one of these files, I'm trying to define some util functions under the submodule Utils
<silverweed> so, let's say I have file utils.cr where the "get_file" util function is defined (under module Utils)
<silverweed> I want to call this function from file foo.cr. But I cannot figure out how to do it, as if I do "include Utils", or "include LE::Utils", the compiler tells me "undefined constant"
<silverweed> if I don't include anything, it says "undefined method get_file"
<silverweed> what am i doing wrong?
datanoise has joined #crystal-lang
<silverweed> another oddity is that if I compile only foo.cr, without using "Utils" but only the bare function "get_file", it compiles; but if I compile all the files it gives me undefined method
bcardiff has quit [Quit: bcardiff]
datanoise has quit [Ping timeout: 240 seconds]
barosl has quit [Quit: Leaving]
reed_ has joined #crystal-lang
barosl has joined #crystal-lang
buggs has joined #crystal-lang
<silverweed> ...is the compiler sensitive to the order of file i pass in?
<silverweed> crystal build a.cr b.cr -> fails / crystal build b.cr a.cr -> succeeds
<silverweed> that's really odd
silverweed has quit [Quit: Page closed]
pawnbox has quit [Ping timeout: 268 seconds]
<jhass> and of course the leave the moment I want to respond
<crystal-gh> [crystal] jhass closed pull request #1765: Fix one broken link in contributing guide (master...add-doc) http://git.io/vCbFW
<travis-ci> manastech/crystal#2153edf (master - Merge pull request #1765 from adlerhsieh/add-doc): The build passed. https://travis-ci.org/manastech/crystal/builds/86010085
<DeBot> https://github.com/manastech/crystal/pull/1765 (Fix one broken link in contributing guide)
datanoise has joined #crystal-lang
<Philpax> is this expected behaviour? http://play.crystal-lang.org/#/r/j6q
<Philpax> with `def` it works as expected http://play.crystal-lang.org/#/r/j6t
<jhass> I think so, yes
<jhass> ah, mh
<jhass> well, that's indeed inconsistent, both should do the same
<jhass> mind opening an issue about the inconsistency?
<Philpax> I'm guessing `fun` is instantiated at the definition site, while `def` is instantiated at the call site
<jhass> mh, yeah
<Philpax> will do, but I'm not entirely sure this is fixable
datanoise has quit [Ping timeout: 244 seconds]
<Philpax> okay, now this is counterintuitive behaviour http://play.crystal-lang.org/#/r/j6y http://play.crystal-lang.org/#/r/j6x
<Philpax> is using the def variant forcing instantiation to be delayed to a later stage?
<Philpax> how odd
trapped has joined #crystal-lang
<BlaXpirit> Philpax, :o
pawnbox has joined #crystal-lang
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 252 seconds]
datanoise has joined #crystal-lang
blue_deref has quit [Quit: Taking myself out of hear.]
datanoise has quit [Ping timeout: 272 seconds]
ssvb has quit [Quit: Leaving]
benoist has joined #crystal-lang
reed_ has quit [Ping timeout: 268 seconds]
reed_ has joined #crystal-lang
unshadow has joined #crystal-lang
<unshadow> Hi benoist , it's bararchy from github
<benoist> Hey :)
<benoist> i'm using the latest built
<benoist> Crystal b8c218e (Sat Oct 17 14:25:20 UTC 2015)
<unshadow> benoist: I can't use 0.9.0 becuase of the LLVM issue
<jhass> unshadow: pacman -S llvm35
<unshadow> jhass: Thanks, Trying to build from AUR now
<jhass> mmh, crystal-git should have a makedepends on it by now
<unshadow> jhass: you should add llvm35 to the dependencies
<jhass> nope
<jhass> it's already in the makedepends
<jhass> and it's no runtime dependency
<unshadow> jhass: Oh, ok
<jhass> oh
<unshadow> anyway benoist , I'm compiling and re-test in 5min, I'll let you know
<jhass> somehow I ended up with two makedpends -.-
<unshadow> jhass: XD that explains it
<benoist> k
<benoist> I've added your changes, but getting the same failing specs
<yxhuvud> I'm a bit confused by the following: https://gist.github.com/yxhuvud/b227e95f69351986d6ad
<yxhuvud> can anyone explain why the overload doesn't match?
leafybasil has quit [Remote host closed the connection]
<jhass> yxhuvud: probably an issue in the vein of #357 #1203 #1693 (and a couple more I think)
<DeBot> https://github.com/manastech/crystal/issues/357 (Tuple covariance) | https://github.com/manastech/crystal/issues/1203 (No overload matches StaticArray) | https://github.com/manastech/crystal/issues/1693 (Problem merging Hash with recursive types)
<yxhuvud> I see. I guess I'll have to use a struct instead then, since that seem to work.
<jhass> yxhuvud: however feel free to open an issue, the wonky overload matching on unions & parent types is starting to get too much of a pain point of the language, the usecases that don't work we see the better
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
<unshadow> benoist: New issue now
<benoist> yes setting the length of an array is changed
<benoist> array length changed to size
<benoist> and size= is private
<unshadow> benoist: did you changed those ? how are you not getting those errors ?
<benoist> that's why I was wondering if you were using my branch
<benoist> it's changed here
<benoist> i'm not sure if thats the way to go, I used that to compile the code, but inspecting the output of the function yields an empty array anyway
<crystal-gh> [crystal] MakeNowJust opened pull request #1770: Add `crystal help` and `crystal version` subcommand (master...crystal-help) http://git.io/vCNbv
<yxhuvud> Hmm. What does "Program received and didn't handle signal BUS (7)" mean? compiler crash? infinite loop? something else?
<unshadow> benoist: thats wierd ... I did a clone of your repo, then, git checkout -b origin/feature/0.8+
<benoist> -b makes a new branch right
<unshadow> benoist: oh ....... my bad
<benoist> i think you need to omit the -b and just do git checkout feature/0.8+
<unshadow> benoist: OK, now it's working
<benoist> :)
<unshadow> benoist: let me take a look now :)
gamemanj has quit [Remote host closed the connection]
gamemanj has joined #crystal-lang
<unshadow> benoist: What does "out" do ? as in "out outl" ?
<benoist> I believe the C function copies the result into that variable
<benoist> you changed it to pointerof, which might do the same but allows you to initialize the pointer yourself
<unshadow> benoist: It expects for a Pointer(Int32), So I guess "out" creates a pointer of the data ? anyway even with my change this dosn't seems to be the issue, I'll keep looking
<unshadow> benoist: Maybe something change regarding .size\.length that broke something
<benoist> unshadow: yes that's my guess as well
<unshadow> jhass: can you remmber if the .length to .size for array change was more then a symantical change ?
<jhass> what do you mean?
<jhass> for Array it didn't involve any compiler changes, only for Tuple
<unshadow> jhass: We have an issue with datanoise's OpenSSL.cr lib, it was built against 0.7.0, it used a few "Array.length=" statments, for compatabilty we changed those to "Array.size=", but now something seems to be broken and we suspect that maybe there was more to this change then just the method name
<unshadow> jhass: If not, then we should keep looking elseware
<benoist> unshadow: I've got something
<benoist> changing Array to Slice gets some output
<jhass> I never realized we even have Array#size=, that seems odd
<unshadow> Array to Slice ? where ?
<benoist> unshadow: new version pushed
<unshadow> >> a = [] of Int32; a.size=2
<DeBot> unshadow: protected method 'size=' called for Array(T) - http://carc.in/#/r/j72
<unshadow> It was private before, and became protected now, this could be one of the issues we have
<unshadow> benoist: Pulling
<benoist> jhass: do you know what's better to use Array(UInt8) or Slice(UInt8) when dealing with C calls?
<jhass> I prefer Slice most of the time. StaticArray is also a (stack focused) option
<unshadow> benoist: ok, we are getting there, now we have an issue with "\0" before and after the cipher text
<unshadow> benoist: But if you look, the numbers are ok, just the zeros need to go
<benoist> and it's not complete
<unshadow> benoist: Oh, true
<benoist> I really have feeling it might need a bigger overhaul tho
<unshadow> I wish datanoise would take a look, I managed to help with a few added features to the lib, but those parts are really Low-level implamentations of cryptography
nakilon has joined #crystal-lang
gamemanj has quit [Remote host closed the connection]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<benoist> unshadow: it's also one those things that needs to be done properly, if the implementation misses key things the library is basically useless in terms of security
<unshadow> benoist: True.
gamemanj has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vCNhy
<crystal-gh> crystal/master 292df63 TSUYUSATO Kitsune: Add `crystal help` and `crystal version` subcommand
<crystal-gh> crystal/master 11cfd5c Jonne Haß: Merge pull request #1770 from MakeNowJust/crystal-help...
mhib has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 250 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<benoist> unshadow: I've added a worksheet file in my branch with a working Cypher
<benoist> I've isolated the code
<unshadow> benoist: Nice !
<unshadow> Should I pull ?
<benoist> I just broke the api a bit so i'm trying to convert it so it stays the same :)
<unshadow> benoist: Yeha, nice work ! the worksheet is working nicly :)
<crystal-gh> [crystal] maclover7 opened pull request #1772: Extend license to 2015 and convert to Markdown (master...patch-1) http://git.io/vCATL
<benoist> unshadow: yeah, i'm thing to change the API anyway so it allows streaming into a file
<benoist> I guess the MemoryIO is beter then creating new array's anyway
datanoise has joined #crystal-lang
<unshadow> benoist: It should be
glenab has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 252 seconds]
glenab has joined #crystal-lang
leafybasil has joined #crystal-lang
trapped has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vCAqu
<crystal-gh> crystal/master 74b76fe Ary Borenszweig: Formatter: format hash literals with upper-case symbol notation. Fixes ##1771
<crystal-gh> crystal/master c6a8f08 Ary Borenszweig: Formatter: indent enum members after a comma and newline. Fixes #1767
pawnbox has quit [Ping timeout: 240 seconds]
maclover7 has joined #crystal-lang
<maclover7> Are there any good examples of crystal's websocket stdlib in use? Looked in samples/ and didn't see anything
<maclover7> was going to open up a ticket about this
<jhass> maclover7: the mailing list has that question one or two times I think
<trapped> is a module's .initialize method ever executed at runtime?
<maclover7> ok, cool. do you have a link for the mailing list?
<jhass> trapped: .initialize method? like def self.initialize?
<trapped> yes
<trapped> like a C# static class
<jhass> not unless you invoke it, no
<trapped> alright
<jhass> ?ml=https://groups.google.com/group/crystal-lang
<DeBot> jhass: Set ml.
<jhass> ?ml maclover7
<maclover7> thanks!
<trapped> can you iterate over a range (x..y) using for/in in a macro?
<travis-ci> manastech/crystal#c6a8f08 (master - Formatter: indent enum members after a comma and newline. Fixes #1767): The build passed. https://travis-ci.org/manastech/crystal/builds/86030229
<DeBot> https://github.com/manastech/crystal/issues/1767 (Formatter, next lines on enum not indented)
glenab has quit [Remote host closed the connection]
glenab has joined #crystal-lang
unshadow has quit [Quit: leaving]
leafybasil has quit [Remote host closed the connection]
<jhass> trapped: I think so, did you try?
Philpax_ has joined #crystal-lang
<trapped> i think it only works if you write "x .. y" and not "x..y"
benoist has quit [Quit: Page closed]
<jhass> easy enough to just try really
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vCAsF
<crystal-gh> crystal/master 4a204df Ary Borenszweig: Formatter: don't skip newline after is_a?. Fixes #1762
Philpax has quit [Ping timeout: 256 seconds]
<trapped> i did try in fact, but when i tried it didn't work, after a couple changes (including adding the spacing) it worked but i wasn't sure it was that so i said "i think"
<travis-ci> manastech/crystal#4a204df (master - Formatter: don't skip newline after is_a?. Fixes #1762): The build passed. https://travis-ci.org/manastech/crystal/builds/86033381
<DeBot> https://github.com/manastech/crystal/issues/1762 (Incorrect format when method is invoked in postfix 'if' condition)
glenab has quit [Remote host closed the connection]
ssvb has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
maclover7 has quit [Ping timeout: 246 seconds]
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
NeverDie has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
NeverDie has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Philpax_ has quit [Ping timeout: 240 seconds]
Ven_ has joined #crystal-lang
greengriminal has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
datanoise has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
glenab has joined #crystal-lang
datanoise has quit [Ping timeout: 250 seconds]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 240 seconds]
Ven has quit [Ping timeout: 265 seconds]
Ven has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reed_ has quit [Ping timeout: 250 seconds]
datanoise has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
blue_deref has joined #crystal-lang
Ven has joined #crystal-lang
trapped has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
datanoise has quit [Ping timeout: 250 seconds]
mhib has quit [Quit: Leaving]
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
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
datanoise has joined #crystal-lang
<crystal-gh> [crystal] benoist opened pull request #1775: MemoryIO added initializer for Slice(UInt8) (master...feature/memory_io_slice) http://git.io/vCxTX
datanoise has quit [Ping timeout: 260 seconds]
benoist has joined #crystal-lang
datanoise has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reed_ has joined #crystal-lang
<trapped> why doesn't IO work inside spawned blocks? http://carc.in/#/r/ja1
<jhass> trapped: it does, the coroutine gets never executed since you never block the main coroutine
leafybas_ has joined #crystal-lang
<crystal-gh> [crystal] jreinert closed pull request #1608: add SliceIO Implementation with specs (master...slice-io) http://git.io/vnhED
leafybasil has quit [Ping timeout: 260 seconds]
leafybas_ has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
benoist has quit [Remote host closed the connection]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
Ven has joined #crystal-lang
leafybasil has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
<ddfreyne_> I’m attempting to upgrade to Crystal 0.9, but `brew upgrade` seems to be stuck here:
<ddfreyne_> ./bin/crystal build --release -o .build/crystal src/compiler/crystal.cr
<ddfreyne_> It’s taking many minutes.
<jhass> "many"?
<ddfreyne_> 5+ minutes so far
<jhass> that's still reasonable depending on your machine
<jhass> --release takes time ;)
<ddfreyne_> Yeah, I’ve noticed --release making the compilation quite a bit slower… but 5+ minutes seems to be far more than I’m used to.
<ddfreyne_> I don’t think previous Homebrew crstal releases were compiled using --release…
<ddfreyne_> Oh! It finished.
<ddfreyne_> I guess I was just impatient!
<jhass> ;)
trapped has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
reed_ has quit [Ping timeout: 256 seconds]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
canhtak has joined #crystal-lang
benoist has joined #crystal-lang
nakilon has quit [Ping timeout: 250 seconds]
<ddfreyne_> I used a few languages for playing around with game design… Crystal seems to be the one that might stick.
nakilon has joined #crystal-lang
<ddfreyne_> I love (need?) prototyping functionality, and Ruby (RubyGame) and Lua (LÖVE) offer that. But once you get to the point where the game is slow, you need profiling tools and probably an environment that’s not as slow…
<ddfreyne_> Here’s hoping that Crystal will actually bridge that gap.
<gamemanj> Native code FTW! Though I'm wondering what kind of 2D game gets to that point... large quantity of bullets avoidance?
<ddfreyne_> gamemanj: I had a 2D top-down Minecraft-like game written in LÖVE, and when performance started going downhill, I had to resort to profilers.
<ddfreyne_> gamemanj: Sadly, the profiling tools make the code execute 10x slower, and there’s no real useful output.
<ddfreyne_> gamemanj: I can use Instruments.app + dtrace to get insights in what my app is doing!
<gamemanj> Ah, I presume said game has an infinite world and chunks and all the things that generally nom evem more resources like biscuits from a biscuit tin...
<ddfreyne_> gamemanj: It was getting trouble at 512x512 tiles, so definitely not big at all. But the lack of tooling for making something performant put me off.
<ddfreyne_> Not that Lua by itself is necessary slow--it actually has pretty nice performance.
<ddfreyne_> But the answer to “how do I make it fast?” is for me a lot more clear in Crystal than in Lua
<ddfreyne_> (LÖVE is great btw.)
benoist has quit [Remote host closed the connection]
benoist has joined #crystal-lang
gamemanj has quit [Ping timeout: 256 seconds]
nakilon has quit [Ping timeout: 264 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has quit [Ping timeout: 265 seconds]
<BlaXpirit> ddfreyne_, what lib are you looking at for making games?
glenab has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
glenab has joined #crystal-lang
<CompanionCube> heck, in some cases LuaJIT can be faster than C.
glenab has quit [Remote host closed the connection]
glenab has joined #crystal-lang
datanoise has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
<buggs> CompanionCube, last time I checked luajit was C ;-)
datanoise has quit [Ping timeout: 246 seconds]
datanoise has joined #crystal-lang
cyjimmy264 has quit [Ping timeout: 244 seconds]
glenab has quit [Remote host closed the connection]
xd1le has joined #crystal-lang
glenab has joined #crystal-lang
canhtak has quit [Quit: canhtak]
kulelu88 has joined #crystal-lang
kulelu88 has joined #crystal-lang
glenab has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
ukd1 has joined #crystal-lang
<ukd1> I'm trying to convert an array to a hash; Hash[*some_array] isn't working? Any tips?
<jhass> ukd1: .to_h
<jhass> works in Ruby too these days btw
<ukd1> ....lol.... :(
<ukd1> lol
<ukd1> jhass...thx
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
datanoise has quit [Ping timeout: 252 seconds]
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 250 seconds]
datanoise has joined #crystal-lang
datanoise has quit [Client Quit]