jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.11.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
tomchapin has quit [Ping timeout: 272 seconds]
elia has joined #crystal-lang
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
mondok has quit [Ping timeout: 250 seconds]
dylanmei has quit [Quit: ZZZzzz…]
benner_ has joined #crystal-lang
benner has quit [Read error: Connection reset by peer]
elia has quit [Quit: Computer has gone to sleep.]
jbye_ has quit [Ping timeout: 264 seconds]
jbye has joined #crystal-lang
tomchapin has joined #crystal-lang
tomchapin has quit [Ping timeout: 260 seconds]
dylanmei has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
A124 has quit [Read error: Connection reset by peer]
A124 has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vzKih
<crystal-gh> crystal/master 96b988a Ary Borenszweig: Fixed #2064: give error when using `out` at varargs position
<travis-ci> manastech/crystal#96b988a (master - Fixed #2064: give error when using `out` at varargs position): The build passed. https://travis-ci.org/manastech/crystal/builds/104544667
<DeBot> https://github.com/manastech/crystal/issues/2064 (Compiler bug on dll call)
trapped has joined #crystal-lang
alsm has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
elia has joined #crystal-lang
mondok has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 256 seconds]
mondok has quit [Ping timeout: 276 seconds]
trapped has joined #crystal-lang
ssvb has quit [Remote host closed the connection]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
onionhammer has quit [Ping timeout: 265 seconds]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
ton31337 has joined #crystal-lang
<ton31337> guys, something is wrong with the latest release
trapped has joined #crystal-lang
<ton31337> [root@default-centos-72 razor]# crystal deps
<ton31337> Using crystal-redis (1.2.1)
<ton31337> [root@default-centos-72 razor]# crystal razor.cr
<ton31337> Error in ./razor.cr:1: while requiring "redis": can't find file 'redis' relative to '/opt/razor'
<ton31337> require "redis"
<ton31337> the same is with require "crystal-redis"
<ton31337> it works only like this:
<ton31337> require "./libs/crystal-redis/redis"
<jiriki> btw
<jiriki> does crystal have low-level memory functions btw?
aladagemre has joined #crystal-lang
<aladagemre> hi all. are older versions of crystal saved in ubuntu repo? I couldn't find 0.10.2 in the repo.
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vz6Nm
<crystal-gh> crystal/master 67353b2 Ary Borenszweig: Fixed bug: clear headers in HTTP::Server::Response after each request
<travis-ci> manastech/crystal#67353b2 (master - Fixed bug: clear headers in HTTP::Server::Response after each request): The build passed. https://travis-ci.org/manastech/crystal/builds/104639724
luislavena has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asterite> ton31337: it seems to be an issue with the crystal-redis shard https://github.com/stefanwille/crystal-redis/pull/9
<asterite> jiriki: yes
<ton31337> cool
aladagemre has quit []
tomchapin has joined #crystal-lang
<jiriki> oh nice
<jiriki> I Thought it was like ruby with fast
triangles has quit [Quit: Leaving]
<asterite> jiriki: what's ruby with fast?
<jiriki> fast execution time
fowlduck has joined #crystal-lang
fowlduck_ has joined #crystal-lang
fowlduck has quit [Ping timeout: 256 seconds]
trapped has joined #crystal-lang
fowlduck_ has quit [Ping timeout: 250 seconds]
fowlduck has joined #crystal-lang
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asterite> jiriki: oh, it looks like ruby in a lot of ways, but it's definitely not ruby
shama has joined #crystal-lang
<smarr> Hi, I am trying to create a tree of arrays, is there any way to type that?
dylanmei has joined #crystal-lang
shama has quit [Read error: Connection reset by peer]
shama has joined #crystal-lang
<asterite> smarr: maybe define a class Tree(T) with a children property that's an Array(Tree(T))?
elia has quit [Quit: Computer has gone to sleep.]
<asterite> smarr: another way is to use a recursive alias, but the alias can't be generic
<smarr> asterite: hm, well, all I need is essentially Array(Array(recurs)?), it is not really for a practical application, just few lines of toy code
<smarr> asterite: found it in the docs, will try alias
<smarr> asterite: that helped, thanks!
<asterite> Great! :-)
<smarr> do I need to indicate via type hints that a class has virtual methods? the compiler tells me sometimes that the inferred type is `AbstractThing+` so, do I need to use that as well? I saw docs with an add method where the arguments where typed as Number without `+`
acetoxy has joined #crystal-lang
alsm has quit [Ping timeout: 256 seconds]
<asterite> The `+` is an internal thing and shouldn't be used, we'll soon remove it
<asterite> All methods are virtual by default and there's no way to make them final
trapped has joined #crystal-lang
<smarr> ok, strange thanks. One of the issue I was seeing was that an 'abstract' method was called (with a raise) instead of a concrete one, thought that might have been related
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mondok has joined #crystal-lang
<asterite> smarr: don't know, would have to see some code to understand
<jiriki> asterite: yeah because I'm thinking of learning rust
<jiriki> crystal is alternative
<BlaXpirit> jiriki, you can also start learning rust, see that it's hopeless, and then learn crystal
<jiriki> heh
<jiriki> does crystal have
<BlaXpirit> i've tried to learn rust 3 times so far
<jiriki> ah nvm
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
tomchapin has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
<smarr> ok, so, I am still having this problem: in a class hierarchy, an 'abstract' method gets called, while a method of one of the subclasses should be called
<smarr> and the method that is called is AbstractConstraint.inputs_do instead of UnaryConstraint.inputs_do
<smarr> the concrete subclass instantiated is StayConstraint.
<smarr> The code should be fine, it types check, and otherwise is identical to its Ruby version
<smarr> and ideas/suggests how do debug this would be appreciate
<asterite> smarr: it would be nice if you could reduce the code a bit
<asterite> smarr: and a method that raises is not abstract in crystal, an abstract method in crystal is `abstract def ...`
<Papierkorb> asterite: Have you ever considered adding a 'const' keyword, to guard variables from write access?
<Papierkorb> Pendant to C/C++'s const
<asterite> Mmm... no, I don't find that very useful
<asterite> if you don't want to write to a variable, just don't write to it. If you write to it by mistake then a test will probably fail, or the app will fail in some point
<Papierkorb> I really don't like that when you have some method you've never seen before, that you'd have to read it, and actually all of the underlying methods too, to know if it will mess with your data structure you're passing in
<asterite> smarr: I don't quite agree with those specs "are we fast yet", they create their own Vector type, but that's slow, Array is fast because it's implemented on top of Pointer. Vector should be Array
<asterite> Oh, but that's different from a const variable, that's a const data structure... that would make everything much more complex, I'm sure
<asterite> like how it's done in D with const/immutable
<Papierkorb> Never used D, 'only' C/C++
<Papierkorb> The most important part in that was probably being able to declare a method being 'const', a contract saying "i won't modify the value of 'this->'"
<asterite> smarr: how to run that deltablue?
<Papierkorb> I'm really missing such a feature in other languages like ruby (okay, scripting language, completely dynamic et al) or Java (no excuse here IMO)
<smarr> asterite: thanks for the pointer to abstract methods, looks like it is an issue with not matching signatures
<asterite> smarr: if you declare them as `abstract def output`, `abstract def choose_method(mark)`, then later if you fail to implement them the compiler will give you an error :-)
<smarr> asterite: yepp, it is doing that now, thanks
<asterite> Papierkorb: well, actually, waj wants to have const, I think. Maybe in the future we'll have it? I don't know. For me it will complicate things a lot, because most aren't interested in const, but if you have it then everyone will have to learn it
<smarr> asterite: and with respect to Vector, I am not interested in comparing different Vector implementations, or language-specific semantics of Array, I am interested in comparing compiler efficiency. So, fixing what Vector is removes one variable from the equation
<asterite> I see. Well, once you have results, please share them! We always like benchmarks and knowing what we can improve
<smarr> hm, so, what does the signature need to look like to pass a block? abstract def inputs_do(&block)?
<smarr> if I have `def inputs_do(&block)` in the subclass, the compiler still complains
<Papierkorb> asterite: Should I open a PR or is there some ML or is it out of scope atm?
<Papierkorb> Err, I meant a GH issue, not PR ;)
<asterite> smarr: `def inputs_do(&block)` should work, I just tested it and it works
<asterite> or just defining a method that yields (without needing &block)
<asterite> Papierkorb: an enhancement request for const?
<Papierkorb> asterite: Correct
<asterite> You can send one, but it should say how it works in every case, how the syntax changes and what's the semantic of it
<Papierkorb> k, thanks
<smarr> hm, strange, adding types to the block helped
<smarr> bye the way, does Crystal do any kind of dynamic compilation? I saw unexpected speedups after 260 something iterations of a benchmark
ssvb has joined #crystal-lang
Excureo has joined #crystal-lang
matp has quit [Remote host closed the connection]
<Papierkorb> Huh, I'm now receiving spam because my Github account is somehow associated with Crystal Oo
<Papierkorb> > I’m on the software development research team at [REDACTED], [...]. We’re collecting small stack samples from Crystal developers, [...].
<Papierkorb> asterite: https://github.com/manastech/crystal/issues/2067 Tried my luck at a write up
elia has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
mondok has left #crystal-lang ["Leaving"]
grindhold has quit [Read error: Connection reset by peer]
trapped has quit [Quit: Textual IRC Client: www.textualapp.com]
luislavena has quit [Ping timeout: 264 seconds]
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang
matp has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
dylanmei has joined #crystal-lang