jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.2 | 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
zz_Cidan is now known as Cidan
vikaton has quit []
Cidan is now known as zz_Cidan
zz_Cidan is now known as Cidan
Cidan is now known as zz_Cidan
vikaton has joined #crystal-lang
zz_Cidan is now known as Cidan
Cidan is now known as zz_Cidan
<Mercurial_> Hi sorry I just got back from being out
<Mercurial_> how would type declaration work for the slice method in Crystal?
<Mercurial_> It tries to give me "overhead matches" but they don't work
qb has joined #crystal-lang
<vikaton> Mercurial_: do you mean "Overload" matches?
datanoise has quit [Ping timeout: 272 seconds]
mdz_ has quit [Remote host closed the connection]
<Mercurial_> This is the error "no overload matches 'Array(Int32)#[]' with types Int32, Float64
<Mercurial_> The error tells me that no overload matches 'Array(Int32)#[]' with types Int32, Float32
<Mercurial_> Overloads are:
<Mercurial_> - Array(Int32)#[](start : Int, count : Int)
<Mercurial_> - Array(Int32)#[](index : Int)
<Mercurial_> - Array(Int32)#[](range : Range)
<Mercurial_> That's what it gives me
<vikaton> Mercurial_: code?
<Mercurial_> last_group = self[start, length](start : Int, count : Int)
<Mercurial_> That's what I'm getting an error on
<flaviu> Mercurial_: The error message seems straight-forward enough. Float32 is not Int.
<vikaton> length is Float64 in this case I believe
<Mercurial_> I'm getting an unexpected token error in this format too
<Mercurial_> for the first parenthesis
havenwood has quit [Ping timeout: 265 seconds]
mdz_ has joined #crystal-lang
datanoise has joined #crystal-lang
<Mercurial_> hi , could anyone help me with my problem? Sorry if I sound rude
<vikaton> Mercurial_: if you provide the code we can help
<Mercurial_> sorry I'm new to Crystal, so I've been having a hard time
<Mercurial_> division = size.fdiv number
<Mercurial_> modulo = size % number
<Mercurial_> groups = [] of (Int32 | String | Char)
<Mercurial_> start = 0
<vikaton> Mercurial_: in gist or pastebin please
<Mercurial_> number.times do |index|
<Mercurial_> length = division + (modulo > 0 && modulo > index ? 1 : 0)
<Mercurial_> last_group = self[start, length]
<Mercurial_> groups << last_group
<Mercurial_> last_group << fill_with if fill_with != false &&
<Mercurial_> modulo > 0 && length == division
<vikaton> preferably gist
<Mercurial_> start += length
<Mercurial_> end
<Mercurial_> ok, no prob
<Mercurial_> oh, sorry I didnt see your message
<vikaton> its ok
Mercurial_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Mercurial_ has joined #crystal-lang
<Mercurial_> vikaton: is there anything specifically wrong with my code?
<vikaton> Mercurial_: what was the error you got?
<Mercurial_> vikaton: I got an unexpected token error
<Mercurial_> last_group = self[start, length](start : Int, length : Int)
<Mercurial_> last_group = self[start, length](start : Int, length : Int)
<Mercurial_> with that line
Mercurial_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Mercurial_ has joined #crystal-lang
<vikaton> sorry
<vikaton> pc forze
<vikaton> froze*
<vikaton> looking into it rn
<vikaton> Mercurial_: what is 'size' ?
<Mercurial_> vikaton: sorry that should be self.size
<Mercurial_> the size of the array being entered into the function
<vikaton> Mercurial_: I'm gonna need more of your code so I can test this
<Mercurial_> this is for the language
<Mercurial_> its meant to be implemented in the language
<Mercurial_> vikaton:
<vikaton> Mercurial_: a method for Array?
<Mercurial_> vikaton: yeah
<vikaton> I got it working with programming concepts I've never used before :D
<vikaton> now onto the error
<vikaton> Mercurial_: well to fix your particular issue, it should be
<vikaton> last_group = self[start, length.to_i32]
<vikaton> but then another error pops up
<vikaton> Mercurial_: did you try the .to_i32 method?
<Mercurial_> yeah i tried it
<Mercurial_> I get another error too
<vikaton> mhm
<Mercurial_> vikaton: no overload matches 'Array((String | Int32 | Char))#<<' with types Array(Int32)
<vikaton> Mercurial_: you do realize you are pushing the whole array into groups?
<vikaton> if you want to push arrays in arrays you do
<vikaton> groups = [] of Array(In32) and son
<vikaton> so on*
<Mercurial_> what do you mean?
<Mercurial_> I don't get how to push arrays into arrays
<vikaton> Mercurial_: you know how oyu have Array(String | Int32 | Char)
<vikaton> ?
<Mercurial_> vikaton: yeah
<vikaton> Mercurial_: and how '<<' pushes to the array?
<vikaton> well in your code, instead of pushing an Int32, you were pushing an Array(Int32)
<vikaton> which isnt valid for groups
havenwood has joined #crystal-lang
<vikaton> so it had to be Array(Array(String) | Array(Int32) | Array(Char))
<vikaton> for it to accept Arrays
JBat has joined #crystal-lang
JBat has quit [Client Quit]
<Mercurial_> vikaton: the entire array last_group has to be string/int32/char then?
<vikaton> Mercurial_: that's what you set it as
<vikaton> yes
<Mercurial_> vikaton: I'm still a bit new with certain parts of Crystal's syntax, what would be the best way to declare the array as that while still slicing it from start to length?
<vikaton> uhh not sure what you mean there
<Mercurial_> if the last_group array has to be string/int32/char, how would I go about doing that?
<willl> if this is a method for array, use Array(Array(T)) because T inside array is the type of what it contains https://github.com/manastech/crystal/blob/master/src/array.cr#L46
strcmp1 has quit [Quit: Leaving]
<vikaton> Mercurial_: well to be clear, do you want to push an Array(Int32) to groups or Int32?
<Mercurial_> I wanna push the array
<Mercurial_> I'm trying to bas eit off this ruby method
<vikaton> Ok
<Mercurial_> that does something similar, it's based off the rails source code cause the code I tried to make around it didn't work out
<vikaton> well last_group will be w/e the passed array is
<vikaton> now I don't enough of Crystal to know about Type restrictions with types in Arrays
<vikaton> but groups should be arrays of either string, Int32, or char
<willl> what if you want to group an array of symbols
<willl> you want array of array of T
<vikaton> Yeah true ^
<vikaton> willl: but I think he only wants to restrict it to String, Int32, and Char
<Mercurial_> yeah I was planning to restrict it
<willl> why?
<vikaton> Oh hey Generics is there now :D
asbradbury has quit [*.net *.split]
asbradbury has joined #crystal-lang
Mercurial_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Mercurial_ has joined #crystal-lang
<Mercurial_> willl: I wanted all array types to work so that the user could try use the method on any array
havenwood has quit [Ping timeout: 256 seconds]
Mercurial_ has quit [Client Quit]
Mercurial_ has joined #crystal-lang
<vikaton> Why doesnt this macro work?
<Mercurial_> I'm still stuck on this thing, I guess I'll just look at it tomorrow
<Mercurial_> I wish I could help you vikaton :(
Mercurial_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
datanoise has quit [Ping timeout: 250 seconds]
datanoise has joined #crystal-lang
strcmp1 has joined #crystal-lang
mdz_ has quit [Remote host closed the connection]
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 258 seconds]
<crystal-gh> [crystal] wmoxam closed pull request #749: Adds modulo support to Float (master...add-float-modulo-support) http://git.io/vICWa
unshadow has quit [Quit: leaving]
sandelius has joined #crystal-lang
<crystal-gh> [crystal] wmoxam opened pull request #756: Adds %, modulo & remainder to Float (master...add-float-modulo-support) http://git.io/vIlun
<crystal-gh> [crystal] wmoxam closed pull request #756: Adds %, modulo & remainder to Float (master...add-float-modulo-support) http://git.io/vIlun
<wmoxam> :p
Mercurial_ has joined #crystal-lang
<crystal-gh> [crystal] datanoise opened pull request #757: Improve performance of File#each_line iterator. (master...master) http://git.io/vIlaR
<willl> Mercurial_: but String, Int32, and Char are not all array types, there are infinitely many types of arrays
<willl> array of symbols, arrays of tuples, arrays of int64s arrays of booleans, arrays of floats, arrays of custom classes
<Mercurial_> ahh
<Mercurial_> will: is there any way to not limit it then?
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<willl> i dont think you'd want to
<willl> use T
<Mercurial_> I'm a bit confused by what you mean when you say use T. How would that work in this context? Sorry I 'm really knew to Crystal
<willl> so if you look at the array class it is Array(T) https://github.com/manastech/crystal/blob/master/src/array.cr#L46
<willl> when you make an array of Int32, inside that class you can imagine that T is replaced with Int32
<willl> when you make an array of String, T is String. and so on
<willl> so inside Array(T), you can reference T as the type for whatever it happens to be
<Mercurial_> thank you, I'll check it out
<Mercurial_> how would I then add things to an array?
<Mercurial_> What's the function for that?
<willl> << would work, but if you know the size of the smaller array up front ( which I think you do in your case), it's faster to use https://github.com/manastech/crystal/blob/master/src/array.cr#L96-L107 this one because it doesn't have to grow the array
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Mercurial_> It's calling '<<' and undefined method
<Mercurial_> either way I have to go to sleep, I'll try to look at this with fresh eyes tomorrow
<Mercurial_> I'm sorry for being such a noob at this, lol
<willl> nah, everyone has to learn somewhere
<Mercurial_> bye
Mercurial_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<willl> seeya
BlaXpirit has joined #crystal-lang
sandelius has joined #crystal-lang
datanoise has quit [Ping timeout: 256 seconds]
<willl> This is how I would make that method http://carc.in/#/r/2ct
datanoise has joined #crystal-lang
Ven has joined #crystal-lang
unshadow has joined #crystal-lang
badeball has joined #crystal-lang
dideler has quit [Remote host closed the connection]
unshadow has quit [Ping timeout: 246 seconds]
unshadow has joined #crystal-lang
mdz_ has joined #crystal-lang
<unshadow> Looking at Ruby's io.eof?, http://ruby-doc.org/core-2.2.2/IO.html#method-i-eof , I see they are using rb_io_eof function, is there something like that in LibC or this is something that should be developed from 0 ?
mdz_ has quit [Ping timeout: 250 seconds]
<jhass> rb_ are MRI functions
datanoise has quit [Ping timeout: 258 seconds]
ponga has joined #crystal-lang
<unshadow> jhass: cool, so it seems this is just using another rb_ call to check if the buffer is empty?
<jhass> eh, I'd say better not make conclusions from the openssl binding to the general stuff
<unshadow> So, they are reading BLOCK_SIZE = 1024*16 of bytes, then rescue an EOFError
<unshadow> oh...
<wuehlmaus> hi, all, i use archlinux and i am not able to build the git version of crystal. my errors are here: https://freeshell.de/~wuehlmaus/builderror'
<unshadow> Error executing system command '/bin/sh': Cannot allocate memory
<unshadow> RAM issues ?
<unshadow> can you check with top or htop and see if you are full at the RAM or HD ?
<unshadow> maybe you are building on /tmp/ and it's a smaller partition ?
<jhass> wuehlmaus: yeah, you ran out of memory
<wuehlmaus> could be ram issues, i don't have swap space
<wuehlmaus> ah
<jhass> wuehlmaus: make sure to not build in /tmp
<jhass> makepkg --nocheck can help too
<wuehlmaus> ah, i did build in /tmp :)
<wuehlmaus> jhass: thanks for the hint
ponga has quit [Quit: Leaving...]
unshadow has quit [Ping timeout: 272 seconds]
<wuehlmaus> first run in home directory did not work, too. I test again
<wuehlmaus> Mem[||||2380/3842MB]
<wuehlmaus> that's what htop says
<jhass> yeah, the build peeks at 2.3 gig for me unfortunately
<jhass> adding a (temporary) swapfile might help
unshadow has joined #crystal-lang
<wuehlmaus> that was my stupidity
<wuehlmaus> i use the btrfs file system and forgot to have swap space
<wuehlmaus> and IIRC btrfs is not able to use a swap file
<wuehlmaus> did not build
<wuehlmaus> perhaps a kind soul can link to an archlinux 64bit package?
<wuehlmaus> i seem not be able to build crystal but i am very curious :)
<wuehlmaus> makepg --nocheck did not help
<wuehlmaus> makepkg
<unshadow> just download the AUR package to the Desktop, and use makepkg PKGBUILD
JBat has joined #crystal-lang
<unshadow> Also, why not just clone the git and run stright from bin/crystal
<unshadow> ?
<unshadow> jhass: Would you say this is the general defenition ? http://rxr.whitequark.org/mri/source/io.c#1732
JBat has quit [Client Quit]
<jhass> probably the right direction
<jhass> whether it actually fits into the libevent stuff, idk
<unshadow> maybe I should just lookup if libevent supports some kind of an EOF check ?
alsm has joined #crystal-lang
<wuehlmaus> i am not able to build crystal-git on my system. it just doesn't work :(
<wuehlmaus> same memory message and i am not using /tmp anymore.
<unshadow> wuehlmaus: what do you mean by that ? both me and jhass has Arch linux 64bit, so I dont think this is some ARCH specific issue
<unshadow> can you build the git ?
<wuehlmaus> no as i said
<unshadow> as in clone the git, cd to it and use make ?
<unshadow> not the package, the actual git
<wuehlmaus> i did before and that did not work
<wuehlmaus> i try again
<unshadow> how much RAM do you have ?
<jhass> wuehlmaus: do you have any swap space?
<unshadow> jhass: no, he dosn't
<unshadow> wuehlmaus: do you have less then 500 free MB of RAM ?
<wuehlmaus> no
<wuehlmaus> 1Gb of free RAM
<wuehlmaus> 4Gb in total
<unshadow> when you build, can you run htop or top in a different window, and see if you are filling up the RAM to the maximum ?
<wuehlmaus> i looked and it was not the case
<wuehlmaus> i use tmux
<unshadow> Ok, what about Hardisk ? do you have above 1Gb free ?
<unshadow> in the partition you are building at
<wuehlmaus> 17Gb of free space
<wuehlmaus> using a flash drive
<BlaXpirit> but tmpfs can't take all the remaining ram
<BlaXpirit> it's limited
<unshadow> well.... wuehlmaus can you use "git clone https://github.com/manastech/crystal.git; cd crystal; make" ?
<unshadow> and see if you get the same error as building from the PKGBUILD ?
<unshadow> I myself had some issues with the PKGBUILD before, and manually building seems to work for me
<jhass> wuehlmaus: you'll need about 2.5G of available memory, I'd suggest adding a swapfile
<unshadow> jhass: 2.5G for building crystal ?
<unshadow> wow....
<wuehlmaus> it wants a crystal, then stops
rpitt has joined #crystal-lang
<jhass> unshadow: yes, unfortunately
<wuehlmaus> , if it needs that much memory, i am lost
<jhass> how about a swapfile?
<wuehlmaus> and as i said i am suffering from an old mistake of mine of not building a swap partition
<wuehlmaus> btrfs issue
<jhass> ah
<jhass> x86_64?
<jhass> let me upload the package
<unshadow> wuehlmaus: can't you upgrade some RAM ? usually most laptops or desktops can take 8Gb even id they are a few years old
<wuehlmaus> it's a netbook. i probably do some day
<unshadow> wuehlmaus: maybe use the non-git version, this way you dont need to build it from source
<unshadow> so no memory issues
<wuehlmaus> hmm, i do at once if you point me at it?
<wuehlmaus> archlinux doesn't have one i think
jeromegn has quit [Quit: jeromegn]
<wuehlmaus> i try the aur crystal version without git
<jhass> wuehlmaus: cloud.aeshna.de/u/mrzyx/crystal-0.7.3-1-linux-x86_64.tar.gz
<unshadow> Oh, do you have issues with the non-git version ?
<jhass> well, both versions take that much to build after all
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<unshadow> Isn't there a pre-built package (as in only bineris for ARCH) ?
<wuehlmaus> no
<wuehlmaus> i would have used that, i swear :)
<unshadow> hm..... well, if you want I can build it on my machine and send you the bins
<wuehlmaus> that would be wonderful!
<wuehlmaus> just the xz file
<jhass> wuehlmaus: I just linked you one?
<jhass> mh, wait, why is it a .gz
<jhass> anyway
<strcmp1> jhass, congrats, you did it! '#ruby'.merge!('#ruby-lang').
<jhass> oh, no, that's the source tarball
<jhass> sorry
<jhass> strcmp1: a week ago already :o
<strcmp1> just noticed now :)
<unshadow> jhass: we need to have a packaged crystal bin which is staticlly built for every version ;)
<wuehlmaus> that's so nice, thanks, jhass!!
<strcmp1> unshadow, what do you want a statically linked compiler for?
<vikaton> hey guys
<vikaton> Why doesnt this macro work?
<vikaton> I'm getting unexpected token 'and'
<jhass> vikaton: it doesn't work because there's an unexpected token 'and' in it
<jhass> or rather the way you call it is wrong
<vikaton> jhass, how should I call it?
<jhass> and(2 > 5, 7 <5)
<vikaton> oh
<unshadow> strcmp1: becuase then you can just package a single bin file and send it all around :)
<vikaton> I was hoping Crystal macros worked a bit like Nim templates
<vikaton> I just realized Crystal blew up on HN 2 days ago lol
unshadow has quit [Ping timeout: 264 seconds]
unshadow has joined #crystal-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
<unshadow> Is there a way to do a rescue; retry ?
<unshadow> apperently there is not retry namespace
<unshadow> >> raise(ex : Exception)
<DeBot> unshadow: Syntax error in eval:4: expecting token ')', not ':' - http://carc.in/#/r/2dw
<strcmp1> unshadow, define a method as the body of the begin block, and call it again in your rescue block.
<strcmp1> thats the only way atm, afaik.
<unshadow> strcmp1: cool
<unshadow> >> raise ex : Exception
<DeBot> unshadow: Syntax error in eval:4: unexpected token: : - http://carc.in/#/r/2dx
sandelius has joined #crystal-lang
<strcmp1> its kind of cool, you don't have access to the locals :)
<unshadow> so it's easier to manage in threaded enviroment
<unshadow> :)
<strcmp1> yeah, could be
<unshadow> btw, how do I use raise, I'm trying to raise a IO::EOFError, but raise(ex : IO::EOFError) wont work
<strcmp1> >> raise IO::EOFError, 'hello'
<DeBot> strcmp1: Syntax error in eval:4: unterminated char literal - http://carc.in/#/r/2e1
<strcmp1> >> raise IO::EOFError, "hello"
<DeBot> strcmp1: Error in line 4: wrong number of arguments for 'raise' (2 for 1) - http://carc.in/#/r/2e2
<strcmp1> >> raise IO::EOFError.new("hello")
<DeBot> strcmp1: IO::EOFError: hello - more at http://carc.in/#/r/2e3
<unshadow> oh, nice
<strcmp1> like that, basically. lol
<unshadow> thanks :)
<strcmp1> de nada.
<unshadow> Russian ha ?
<strcmp1> spanish, translates as "nothing" although im irish, dont know spanish properly, & have no connection to spain.
<unshadow> hahah
<unshadow> I'm getting some exception, and I'm trying to see why, but it seems doing rescue e : Exception and then p e just produces this: #<Exception:0xeb7a20 @message="read_nonblock: read nothing", @cause=nil, @backtrace=["*raise<String>:NoReturn +70 [93]", "~fun_literal_12 +340 [93]", "~fun_literal_3 +33 [93]", "co_exit +75 [93]", "__start_context +0 [93]"]>
<unshadow> how do I catch this specific error ?
<strcmp1> that looks like a crystal bug to me, but i guess it'd be an IOError from the message.
<unshadow> or does the :0xeb7a20 part is some kind of an identifier ?
<strcmp1> that's just the object_id (in ruby anyways)
BlaXpirit has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
Ven has joined #crystal-lang
NeverDie has joined #crystal-lang
rpitt has quit [Ping timeout: 255 seconds]
<unshadow> How should I use this : TCPSocket#read(slice : Slice(UInt8)) ?
<unshadow> let me phrase better
<unshadow> I used socket.read(1024), it was pointet out to me that it's better to use read(s: Slice(UInt8)) which returns the number of bytes read
<unshadow> doing socket.read(s: Slice(UInt8)) returns an error
<unshadow> expecting token ')', not ':
<unshadow> datanoise: Thanks :)
<jhass> mmh, I think we need a better API for that
<unshadow> Yes please ! it's kinda excessive this way, 4 lines to do a socket.read
NeverDie has quit [Quit: Textual IRC Client: www.textualapp.com]
<unshadow> btw, ruby has an IO.pending? check that returns number of pending bytes, using something like that it's easier to make a better read loop, also .eof? and .closed? will be really cool to have :)
<datanoise> well, yes. it is a bit verbose. what would be a better API?
<jhass> that's the tricky part I guess
<jhass> would it be too bad to switch the default contract to up to?
<jhass> get a slice back and you have to check it's .size
<datanoise> the problem with allocation and error reporting. the current API doesn't allocate and reports errors at the same time without using exceptions...
<unshadow> For me (a dumb user) the easiest way is less converts, if socket.read() expects a UInt8 slice, why wont do that inside the read method and allow me to pass a Int32 like every other language out there ?
<jhass> .read(max: 1024), .read(min: 1024) /.read(exactly: 1024)
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<unshadow> cool idea :)
<datanoise> yes, but all of them must use exceptions to indicate IO errors. that's a performace killer
rpitt has joined #crystal-lang
NeverDie has joined #crystal-lang
<crystal-gh> [crystal] wmoxam opened pull request #761: Adds %, modulo & remainder to Float (master...add-float-modulo-support) http://git.io/vI48H
havenwood has joined #crystal-lang
<unshadow> datanoise: but IO works almost entirely using EOFErrors, WAITREAD, WAITWRITE etc... for non_blocking modes, there is not too much to do I think
<datanoise> unshadow: i don't mind helper methods for common tasks, ppl just need to know the trade-offs.
<datanoise> unshadow: calling .read(min: size) always allocates and raises exceptions which should not be your go-to method for working with IO
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<unshadow> datanoise: what kind of exceptions ? logicly read(min) mould maybe raise EOFError, and WAITREAD, also always "wouldblock" becuase we are working in a non-blocking mode, the question is would you handle those inside the helper method or outside of it ?
bcardiff has joined #crystal-lang
asterite has joined #crystal-lang
<datanoise> unshadow: generic read method doesn't know how to handle your IO errors. there are much more errors that it seems there are: http://linux.die.net/man/3/read
<asterite> jhass: o/ I have some questions for you :-)
<jhass> o/
<asterite> In 2048.cr, if you change read_nonblock to read, does it still work?
<asterite> I tried it in mac and an ubuntu vm and it works for me
<jhass> back when I wrote it, it didn't
<jhass> let me try again
<asterite> I think back then we didn't have read(length), but I'm not sure
<jhass> it breaks quitting with escape
<jhass> mh, well, that seems to be broken with nonblock too
rpitt has quit [Ping timeout: 264 seconds]
<jhass> but I remember that it worked with my original _nonblock
<asterite> Yes, it's because I had to change it after we made the swap to non-blocking IO
<asterite> I probably broke it :(
<asterite> Well, nevermind :)
<asterite> Second question: so this pull request https://github.com/manastech/crystal/pull/745 does speed up things, right?
<jhass> yes
<asterite> Cool. I'll try it one more time on mac, not sure why it's slower there
<jhass> try to follow the path of my last comment too on mac
<asterite> and do you know if memory consumption drops with that patch? Because on my machine compiling the compiler peeks at about 850Mb, not 2.5Gb
<asterite> jhass: what last comment?
<jhass> I measured the 2.3G when building the package, so that means release mode compiler and non release mode all_specs
c0r5um has joined #crystal-lang
Codcore has joined #crystal-lang
<asterite> Oh, right... I wonder if that memory is taken by llvm, though... the type inference doesn't change in release/non-release mode
<asterite> At least when compiling Rust I remember getting more than 1Gb too in the llvm phase, so maybe that's it
<jhass> btw I also did proper measuring via a cgroup, maybe you have several of those 850M processes?
<asterite> would be interesting to implement a C backend one day
<Codcore> Congradulations, Crystal has more stars on Github, than Nim! ;) - https://github.com/Araq/Nim
<asterite> Codcore: :-)
<asterite> Codcore: next target, Rust: https://github.com/rust-lang/rust
<asterite> Hahaha
<asterite> They have a crazy amount of stars
mdz_ has joined #crystal-lang
<jhass> https://github.com/ruby/ruby ruby is actually reached first
<strcmp1> crazy amount of money too
<datanoise> so much hype :)
<strcmp1> so much money they can afford to contract companies to build cargo, and hire people full time to work on *docs*
<strcmp1> yeah i dont like rust
<Codcore> Rust is ugly
<BlaXpirit> so rust has mor commits than ruby
<BlaXpirit> mmkay
<strcmp1> but i do like nim, so that's kinda depressing :P
rpitt has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Codcore> Installing Crystal 0.7.3 on Manjaro Linux, got such spec failures - https://gist.github.com/Codcore/cfa0b90da68cebc8a3e4
<jhass> looks like the 32bit ones
<asterite> You should like all languages, all of them have good ideas :-)
<strcmp1> asterite, true
<Codcore> jhass, yeah, 32bit
<asterite> BlaXpirit: I think the first commit isn't *the* first commit: https://github.com/ruby/ruby/commits/trunk?page=1132
<jhass> Codcore: gotta do --nocheck for now until asterite fixes them :P
<Codcore> jhass, thanks
<asterite> Or until somebody sends a pull requests ;-)
mdz_ has quit [Remote host closed the connection]
<jhass> asterite: http://carc.in/#/r/2dj downside of that sample :P (it's like the 10th attempt)
<asterite> lol
<jhass> granted, they tried it prior you putting that up
<asterite> That one seems to be the one from the docs
<asterite> Is there a way to see all submissions?
<jhass> oh, yeah
<jhass> well, the ids are serial, I got a bookmarklet to page through them
<jhass> next: javascript:(function(){window.location.hash="#/r/"+(parseInt(window.location.hash.substring(4),%2036)+1).toString(36);})();
<jhass> previous: javascript:(function(){window.location.hash="#/r/"+(parseInt(window.location.hash.substring(4),%2036)-1).toString(36);})();
<asterite> Nice. Would be nice to be able to browse them, though I'm not sure somebody wouldn't like their code to be seen
<jhass> yeah, not to keen of an index, also baits spammers
Ven has joined #crystal-lang
<jhass> http://carc.in/#/r/2eb that ones is another favorite
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
jtarchie has joined #crystal-lang
<asterite> Cool :)
<asterite> For some reason I can't paste code into the edit box in carc
<jhass> huh
<jhass> works fine here :/
<asterite> So, on mac the "Reduce threads spawned for codegen" patch is slower, but on linux it seems it's faster... should we use an ifdef?
<asterite> I really wonder why there's a difference
<jhass> well, different schedulers, different fork implementations
<jhass> can't repro the paste issue with FF or Chromium here
<jhass> but it's codemirror, would be kinda surprising if it was that untested on safari
<crystal-gh> [crystal] asterite closed pull request #753: Remove superfluous spec (master...remove-superfluous-spec) http://git.io/vIWgP
<unshadow> asterite: do you have any hints regarding the read, read_nonblock thingy ?
NeverDie has joined #crystal-lang
<asterite> jhass: oh, now the paste works, don't know what happened
<asterite> I'm using chrome too, I think there was something wrong with that tab
NeverDie has quit [Client Quit]
<travis-ci> manastech/crystal#2433 (master - 9a2b553 : Ary Borenszweig): The build passed.
<asterite> unshadow: it's what datanoise says, read(1024) tries to read all 1024 bytes and blocks otherwise
<asterite> for a loop that reads and prints you should use a static array... it's low level, but it's the only way to get good performance
NeverDie has joined #crystal-lang
bombless has joined #crystal-lang
rpitt has quit [Ping timeout: 272 seconds]
bcardiff has quit [Quit: Leaving.]
<unshadow> asterite: This part is fine, right now thanks to datanoise the loop reads and behaves as it should, my issue now is that it seems to read untill it stops, I'm not sure if it becuase of spawn? (as in the spawned fiber is sleeping until the main thread does the gets from user) or maybe it's just something else that makes read behave differently
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<unshadow> btw, in "read untill it stops" I mean it reads, and then it wont read anymore, even though there is more data to read
asterite has quit [Ping timeout: 246 seconds]
<datanoise> unshadow: read should always return data when available. do you have an example where it doesn't?
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vIBTt
<crystal-gh> crystal/master f2776c3 Wesley Moxam: Adds Float modulo & remainder support
<crystal-gh> crystal/master 73d8f0f Ary Borenszweig: Merge pull request #761 from wmoxam/add-float-modulo-support...
mdz_ has joined #crystal-lang
<unshadow> datanoise: yeha, you can use my code from here: https://github.com/bararchy/aeon-client/ check out how the read behaves v.s how a simple telnet to the same server and port does .
mdz_ has quit [Ping timeout: 265 seconds]
<datanoise> unshadow: your autoreader reads first 4096 bytes and then quits
<datanoise> unshadow: you should use loop/while i believe
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vIBqz
<crystal-gh> crystal/master 782f499 Ary Borenszweig: HTTP::LogHandler: show elapsed time
<unshadow> datanoise: it was inside a while true, loop do, while connection, until the_end_of_days...
<unshadow> it wont change
<travis-ci> manastech/crystal#2434 (master - 73d8f0f : Ary Borenszweig): The build passed.
<unshadow> datanoise: I changed it back to loop do on the git now, still same issue, I dont get all the data until a Ctrl + C is pressed and the program exits
<unshadow> (i'll follow on the IRC logs, need to disconnect for a hour)
unshadow has quit [Quit: leaving]
bcardiff has joined #crystal-lang
c0r5um has quit [Remote host closed the connection]
Ven has joined #crystal-lang
unshadow has joined #crystal-lang
unshadow has quit [Client Quit]
<travis-ci> manastech/crystal#2435 (master - 782f499 : Ary Borenszweig): The build passed.
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vikaton has quit [Quit: Connection closed for inactivity]
<asbradbury> am I correct in thinking Crystal will do no automat type coercion for numbers? e.g. allowing you to pass an Int32 instead of an Int64?
asterite has joined #crystal-lang
<asterite> asbradbury: correct, there's no type coercion
<asbradbury> asterite: and in the example you posted on the bugtracker from FileUtils, I assume the motivation for `buf1 :: UInt8[1024]` is to allocate a static array without initialising it, as you would with `buf1 = StaticArray(Uint8, 1024).new(0.to_u8)`. That, and it's shorter :)
<asterite> Yes. I actually don't know which one I prefer, ":" or "::" :-)
<asterite> I know for sure that we tried with ":" first and then switched to "::"
<asbradbury> yeah, I can kind of see the argument that :: isn't the same thing. Just thought I'd share my first impression as someone new to the language
<asbradbury> I'm too used to :: being cons
<asterite> in lisp?
<asbradbury> standard ML
<asbradbury> or ocaml
<asterite> In any case, "::" isn't used frequently. I can find it 51 times in the whole repo
<asterite> but don't close the issue, I'd like to know others' opinion on this
<asbradbury> that's a good point. I'm used to having type annotations all over the place, while it seems normal crystal style allows you to very effectively avoid them in most places
<bombless> github issue?
<asbradbury> you could even argue for something like alloc(TYPE_EXPR) or unsafe_alloc(TYPE_EXPR). It doesn't have the same effect as :: but would probably be usable in most of those cases, and would make it clearer that this is potentially unsafe
<bombless> asbradbury thanks
<asbradbury> e.g. buf1 = alloc(UInt8[1024]). It would be in the same class as sizeof() and instance_sizeof(), but I can also see why you'd want to minimise these keywords
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<Codcore> sorry for offtopic, new version of my webframework written in Crystal available - https://github.com/Codcore/Amethyst/releases/tag/v0.0.7 From now, it is good replacement for Moonshine, I think
<qb> can someone explain what I'm doing wrong here? http://play.crystal-lang.org/#/r/2f3
NeverDie has joined #crystal-lang
<asterite> gb: match can potentially return nil
<asterite> but then you get an index out of bounds because there are no groups
<qb> I see
Ven has joined #crystal-lang
asterite has quit [Ping timeout: 246 seconds]
bombless has quit [Ping timeout: 272 seconds]
vikaton has joined #crystal-lang
mdz_ has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
shama has joined #crystal-lang
<crystal-gh> [crystal] rhysd opened pull request #763: Added Hash#size and SimpleHash#size (master...hash-size) http://git.io/vIRej
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mdz_ has quit [Remote host closed the connection]
mdz_ has joined #crystal-lang
waj has joined #crystal-lang
alsm has quit [Ping timeout: 258 seconds]
wmoxam has quit [Quit: leaving]
wmoxam has joined #crystal-lang
Codcore has quit [Ping timeout: 246 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
vikaton has quit []
NeverDie has joined #crystal-lang
izzol has joined #crystal-lang
<izzol> hello
Ven has joined #crystal-lang
<jhass> hi
zz_Cidan is now known as Cidan
<izzol> This example Hello World is not working for me :(
<izzol> there is no hello after calling crystal hello.cr
<jhass> huh
<jhass> what crystal version and what example exactly?
<izzol> I installed crystal from brew, but let me try the linux version.
<jhass> well, crystals main devs work on os x, should definitely work ;)
<izzol> Maybe i'm doing somethigs not right
<jhass> huh?
<jhass> it prints Hello world
<jhass> what else do you expect?
<izzol> ahh, ok
unshadow has joined #crystal-lang
<izzol> on the doc there is a "./hello"
<izzol> so I was expecting it will create a new file as well :P
<izzol> or soemthing.
<jhass> ah, you can get the binary with crystal build hello.cr
<izzol> ok
<izzol> now works :-)
<izzol> cool.
<izzol> like a go.
<jhass> a gotcha right on (not that it makes any difference for a hello world sample), to get a fully optimized binary the invocation is crystal build --release hello.cr
<jhass> use that e.g. for benchmarks
<ddfreyne> Is there a reason for not beign able to specify the return type of a function/method?
<ddfreyne> I'd like to let a function return an Enumerable rather than Array, because I don’t want to guarantee for the future that the return value will be ordered in a certain way.
<jhass> you can actually as of 0.7.2 or 0.7.3, I don't remember
<jhass> >> def foo(bar : String) : Int32; bar.size; end; foo("bar");
<DeBot> jhass: # => 3 - http://carc.in/#/r/2fg
<jhass> >> def foo(bar : String) : Int32; bar; end; foo("bar");
<DeBot> jhass: in line 4: type must be Int32, not String - http://carc.in/#/r/2fh
<ddfreyne> Oh, huh. Interesting.
<izzol> yntax error in ./blockdlp.cr:4: unterminated char literal. => require 'mail' uh :(
<ddfreyne> >> def stuff() : Enumerable ; [:a, :b] ; end ; p stuff[0]
<DeBot> ddfreyne: :a - more at http://carc.in/#/r/2fi
<ddfreyne> I expected that to fail (because Enumerable does not implement #[])
<jhass> izzol: 'c' is a char literal, "foo" is a string
<jhass> ddfreyne: I guess it only does a check and still types it according to the actual return type
<jhass> >> def foo : Enumerable(Symbol); [:a, :b]; end; foo.class
<DeBot> jhass: Error in line 4: Enumerable(T) is not a generic class, it's a generic module - http://carc.in/#/r/2fj
<jhass> >> def foo : Enumerable(Symbol); [:a, :b]; end; typeof(foo)
<DeBot> jhass: Error in line 4: Enumerable(T) is not a generic class, it's a generic module - http://carc.in/#/r/2fk
<jhass> heh
<jhass> >> def foo : Enumerable; [:a, :b]; end; typeof(foo)
<DeBot> jhass: # => Array(Symbol) - http://carc.in/#/r/2fl
<jhass> and
<jhass> >> [:a, :b].is_a? Enumerable
<DeBot> jhass: # => true - http://carc.in/#/r/2fm
<ddfreyne> Hm, that’s a little annoying. I guess it is useful when you want to verify that the body of the function *does* return what you expect.
<jhass> well, I'd say crystal still embraces duck typing and that's a good thing
<ddfreyne> jhass: It is useful for writing libraries, because with that approach you can prevent implementation details from leaking
<ddfreyne> "If it compiles, it wil work" no longer holds true without it
<ddfreyne> (Admittedly, it's the same in Ruby.)
<jhass> I don't find it very likely though that you leak an object with the same API but a different contract
<ddfreyne> jhass: Replace Array in an internal method with Set, and code will break if the consumer relies on it being an Array (i.e. responds to #[])
<jhass> it won't compile then
<ddfreyne> It will at first, but not after the upgrade
<jhass> yeah
<jhass> that's what compile time duck typing does
<ddfreyne> I argue that it shouldn't have compiled in the first place, because the API you expose (Enumerable rather than Array) will have prevented that.
<jhass> I think what you specify in the restriction will appear in the docs
<jhass> so the consumer would rely on undocumented behavior
<ddfreyne> Doesn't it make sense to let the typecheck fail, then?
Codcore has joined #crystal-lang
<jhass> I guess, I won't be using that only if I have to hint the compiler anyway
<ddfreyne> (In the original example, where the consuming code assumes an Array instead of an Enumerable)
<jhass> *will
<asbradbury> how does crystal handle breaking changes to the compiler. e.g. if a change in 0.7.4 means that 0.7.3 can't compile the newer compiler? Rust has stageN annotations as I recall
<ddfreyne> jhass: It'd be mainly useful for libraries.
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
asterite has joined #crystal-lang
<asterite> ddfreyne: but what's the contract for Enumerable?
<asterite> asbradbury: what's a breaking change to the compiler?
Ven has joined #crystal-lang
<asbradbury> asterite: anything that would mean the previous version couldn't compile the new one
<ddfreyne> asterite: Not sure what you mean :(
<ddfreyne> I also suppose that what I’m interested in is interfaces, not necessarily modules (like Enumerable).
<asterite> asbradbury: what's wrong with that? You use version A to compile A + 1, if A doesn't compile A + 2 it's not a problem
<asterite> ddfreyne: but Enumerable can be reopened and changed, so there isn't really an interface
<asterite> But yes, I understand the point about interfaces... we don't have them right now, though we might have them in the future
<asbradbury> asterite: ok, so you accept that sometimes people might need to grab a newer binary build or else build their way through a couple of commits
<asterite> ddfreyne: you can however make a dummy struct that wraps your value and only provides the methods you want clients to use, and that doesn't have any performance impact
<asterite> asbradbury: We don't commit things that don't compile with the latest compiler. Maybe I'm not understanding the problem
<asterite> asbradbury: Oh, maybe I understand now
<asterite> We run `make clean crystal spec`. That compiles a compiler and with it runs the specs (which exercise the compiler)
<asterite> so that makes sure that the next compiler and compile itself and nothing breaks
<asterite> But again, not sure that's your worry
<asbradbury> asterite: take the suggested change that octal be prefixed with 0o rather than just o. I was looking at it for a simple first patch. 1) add support for parsing 0o, 2) replace all existing octal constants in the codebase with 0o, 3) drop support for 0 (and give an error indicating the syntax change)
<asbradbury> somebody who does a git pull and ends up with something that contains all those commits, won't be able to build using their older compiler
<asterite> Oh. We would do 1 first, then make a release. Then we would do 2 and 3.
<asbradbury> got it, was just wondering if there was any system for handling this between releases.
<asbradbury> thanks
<asterite> So we are at 0.7.3, say we do 1 for 0.7.4. If somebody wants to compile code after the 0.7.4 tag, they will need 0.7.4, 0.7.3 might not compile it anymore
<datanoise> asterite: regarding https://github.com/manastech/crystal/issues/759#issuecomment-110031937, do you want me to open a separate issue?
<asterite> Also, if you do 1, 2 and 3 at the same time, there won't be any compiler out there to compile those changes, as none of them support the 0o syntax
<asterite> so you won't be able to push that pull request :)
<asterite> datanoise: no worries, I just fixed it, I'll push right away
<asterite> thanks for reporting it :)
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vIR1L
<crystal-gh> crystal/master 32bf333 Ary Borenszweig: Fixed a bug that was mentiond in #759
<datanoise> np :)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zipR4ND has joined #crystal-lang
<zipR4ND> hey all, is there some kind of a debug macro in crystal that prints out the expression-string and then its value to the console?
asterite has quit [Ping timeout: 246 seconds]
<jhass> zipR4ND: of a macro? yes, just got added
<jhass> >> macro foo; 1+1; {{debug()}}; end; foo
<DeBot> jhass: 1+1; - more at http://carc.in/#/r/2fn
<BlaXpirit> i don't get it
<BlaXpirit> this works nicely though http://carc.in/#/r/2fo
<datanoise> or pp
<datanoise> >> pp 1 + 1
<DeBot> datanoise: 1 + 1 = 2 - more at http://carc.in/#/r/2fq
<BlaXpirit> riiiight
<BlaXpirit> zipR4ND,
<strcmp1> so the equivalent of the nim template works now in crystal? sorry. lazy reading.
<jhass> uh, no
<qb> Swift 2
<qb> woops, wrong tab
<strcmp1> seems not.
<jhass> http://carc.in/#/r/2fs most wanted construct apparently (that's like the 30th attempt)
<zipR4ND> ok thanxx, ill look into ti
<travis-ci> manastech/crystal#2437 (master - 32bf333 : Ary Borenszweig): The build passed.
<zipR4ND> a no i ment a macro to put before any expression
<jhass> then pp it is ;)
<zipR4ND> thanks jhass
<asbradbury> Swift is going to be open sourced "later this year". Might actually be worth looking at
<BlaXpirit> no
datanois1 has joined #crystal-lang
bcardiff1 has joined #crystal-lang
datanoise has quit [Ping timeout: 244 seconds]
bcardiff has quit [Ping timeout: 258 seconds]
<wuehlmaus> asbradbury: is that definite?
<wuehlmaus> was it stated today?
<wuehlmaus> wikipedia still has "proprietary license"
<wuehlmaus> well german wikipedia has "undecided" instead of proprietary
<wuehlmaus> great news
<wuehlmaus> colleagues of mine said that it was likely
<wuehlmaus> [because of clang and the involvement of its author]
<crystal-gh> [crystal] asb opened pull request #764: add support for octal numbers with the 0o prefix (master...add_octal_0x) http://git.io/vI0MZ
<crystal-gh> [crystal] barca opened pull request #765: grammar (gh-pages...gh-pages) http://git.io/vI0Dt
bcardiff1 has quit [Quit: Leaving.]
<asbradbury> building all_spec with --release takes a *long* time. 19mins and counting
me has joined #crystal-lang
me is now known as Guest77258
asterite has joined #crystal-lang
<asterite> asbradbury: there's no need to compile specs in release mode
<jhass> hehe, you're probably the first one doing it :P
<asbradbury> asterite: I know there's no need, doesn't mean I'm not going to try it :)
<asterite> :-D
<asbradbury> I was interested in seeing the typecheck time, so added support to the Makefile for passing FLAGS to the specs build. Then I figured I might as well try a release mode build
<asterite> I think I tried that too but gave up on waiting
<willl> I actually gave a try at having spec always be in release to see if it would make specs faster, but waited a few minutes and gave up
<asbradbury> type inference was only 6.3 seconds
<willl> I'm working now at adding Crystal to travis community support, but need at least 2 others to be on the hook for fixing things, any takers? http://docs.travis-ci.com/user/languages/community-supported-languages/
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vI0AE
<crystal-gh> crystal/master 9eb2859 Alex Bradbury: add support for octal numbers with the 0o prefix...
<crystal-gh> crystal/master 51e66d9 Ary Borenszweig: Merge pull request #764 from asb/add_octal_0x...
<jhass> potentially interested though I didn't look at travis codebase for a very long time
<crystal-gh> [crystal] asterite closed pull request #763: Added Hash#size and SimpleHash#size (master...hash-size) http://git.io/vIRej
<willl> so far, it looks like just a copy of the dart file will be good enough https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/script/dart.rb
<asterite> willl: I'm interested. waj?
<asterite> willl: what would we need to do in the future for travis support? Change something each time we do a release?
<willl> maybe just keep dist.crystal-lang.org/crystal-latest-linux-x86_64.tar.gz up to date (which last I checked was 0.5.3 https://github.com/manastech/heroku-buildpack-crystal/issues/2) and offer ssl on that
<willl> curl: (7) Failed connect to dist.crystal-lang.org:443; Connection refused
<willl> could maybe go the apt route though too
<waj> will: that would be nice!
<jhass> oh, waj is around. Shall we "fix the topic"? ;P
bcardiff has joined #crystal-lang
asterite1 has joined #crystal-lang
asterite1 has joined #crystal-lang
asterite1 has quit [Client Quit]
<waj> hehe, can you remind me how to give access to you?
<jhass> /msg ChanServ ACCESS #crystal-lang ADD jhass +AfRefiorstv
<waj> will: dist.crystal-lang.org is actually hosted in S3
<willl> waj: did you put .s in your bucket name?
asterite has quit [Ping timeout: 246 seconds]
mdz_ has quit [Remote host closed the connection]
<willl> "Any . characters cause certificate failures when using SSL or TLS."
<willl> our devcenter article afak is the only place that has put together all the ways you can screw yourself over when making buckets :/
<waj> mm… that’s right
asterite has joined #crystal-lang
<jhass> asterite: sorry but either we make this something more permanent or you learn to use the /topic command ;) (and better /kick and /ban too)
<jhass> I'm happy to moderate the channel
<jhass> but I can't do that if I can't gain ops
<asterite> jhass: you are right. I need to send that string of chars you told waj?
<jhass> yes
<travis-ci> manastech/crystal#2440 (master - 9e6a827 : Ary Borenszweig): The build passed.
<jhass> I wrote it again above in case you didn't notice
<crystal-gh> [crystal] asb opened pull request #766: pass flags when building the spec target (master...spec_flags) http://git.io/vIEeZ
<waj> jhass: done!
<jhass> awesome, thanks for the trust!
jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.3 | 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
<waj> you know, with big power… ;)
<jhass> I'm op in #ruby if that means anything... ;)
<jhass> asterite: bcardiff I'll remove your +O flag (auto op on join) since on freenode it's considered bad attitude to permanently display authority ;)
<asterite> Sure
<jhass> while we're at it, shall we decide on one official logger bot?
<asbradbury> all the cool kids are using botbot.me
<jhass> well, we already have two here running for a while and got some history in them. _whitelogger is widely used and trusted
<asbradbury> yes, _whitelogger works great
<jhass> though if asterite & waj want to keep http://irclog.crystal-lang.org/ running that's fine with me too, it's the same software after all
<jhass> I just find having both a bit redundant :)
<waj> I’m keeping the irclogger running just in case we want to migrate to something else, I already have all the history in the db
<waj> maybe to something written in crystal? :)
<waj> botbot.me crashes a lot to me, and the search is really slow
<jhass> you still want to keep _whitelogger as "official" though?
waterlink has joined #crystal-lang
<waj> I just didn’t think about it
<waterlink> Is `with self yield` works currently? Am I right, that passed block will be executed in context of `self` and have access to its methods?
<jhass> waterlink: yes, though it won't work for captured blocks and Procs
<waterlink> what do you mean by captured?
<waterlink> `&blk` ?
<jhass> yeah
<waterlink> hm, any reason why ?
<jhass> I think it's something with them getting converted to function and not being able to attach different contexts to that functions or something
<waterlink> even without `&blk` and with simple yield, I cannot make it see the method..
<jhass> the compiler would need to trace the particular Proc instances and generate different functions for each with call
<jhass> >> class Foo; def foo; puts "hi"; end; def me; with self yield; end; end; Foo.new.me { foo }
<DeBot> jhass: hi - more at http://carc.in/#/r/2gv
<waterlink> So, this definitely works: http://carc.in/#/r/2gw
<jhass> yeah
<waterlink> I will try to reduce to smallest not working example..
<waterlink> oh
<waterlink> that was dumb error from my side
<waterlink> signature of the method is wrong
<waterlink> and the error is kinda misleading
Codcore has quit [Ping timeout: 246 seconds]
<waterlink> what about nested `with obj yield`? Do they work?
<waterlink> it is: http://carc.in/#/r/2gz
<flaviu> Does irclog.crystal-lang.org support a light theme?
<flaviu> Looks like http://irclog.whitequark.org supports it.
<waj> the version running is pretty old
<flaviu> Ah, I see. I'd also like to suggest moving irclog.crystal-lang.org to crystal-lang.org/irclog/.
<flaviu> Wildcard SSL certs can get expensive.
<BlaXpirit> just use whitequark
<asbradbury> letsencrypt.org will hopefully solve the ssl cert problem
<jhass> ^
<jhass> still wish DANE would solve it instead
<flaviu> I'm not sure if Let's Encrypt will provide wildcard certs.
<jhass> they won't
<jhass> but you'll be able to script deployment
<jhass> without human interaction
<jhass> so that's actually better than wildcard
<jhass> since you can revoke individual subs
<flaviu> Ok, sounds good then.
<jhass> still, DANE would potentially require no external interaction at all after DNSSEC was set up
<jhass> I'm still heavily disappointed that mozilla has chosen to invest in letsencrypt instead of getting DANE support first
<asbradbury> letsencrypt seems the pragmatic next step, given the massive lead time that would be involved in waiting for most users to have access to a browser supporting DANE
havenn has joined #crystal-lang
<jhass> it's only browser support that's lacking though, new gtlds are all required to support DNSSEC and the relevant ccTLDs already do
<jhass> letsencrypt is removing a lot of pain out of the inherently flawed CA system, delaying its deprecation
<jhass> the best strategy of course would be to do both with emphasis on DANE and letsencrypt as a migration technology
havenwood has quit [Ping timeout: 276 seconds]
havenn is now known as havenwood
asterite has quit [Quit: Leaving.]
BlaXpirit has quit [Quit: Quit Konversation]
bhishma has joined #crystal-lang
zipR4ND has quit [Ping timeout: 264 seconds]
mdz_ has joined #crystal-lang
mdz_ has quit [Remote host closed the connection]
bhishma has quit [Quit: Page closed]
mdz_ has joined #crystal-lang
mdz_ has quit [Remote host closed the connection]
mdz_ has joined #crystal-lang
waj has quit [Quit: waj]
mdz_ has quit [Remote host closed the connection]
bcardiff has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
datanois1 has quit [Ping timeout: 255 seconds]
Guest77258 has quit [Remote host closed the connection]
me has joined #crystal-lang
me is now known as Guest72831
wmoxam has quit [Ping timeout: 245 seconds]
Guest72831 has quit [Remote host closed the connection]
wmoxam has joined #crystal-lang
waj has joined #crystal-lang
flaviu has quit [Read error: Connection reset by peer]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
datanois1 has joined #crystal-lang