RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qard has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
hightower has joined #crystal-lang
codenoid has quit [Ping timeout: 240 seconds]
<hightower> Are there daily snapshots/binaries available somewhere?
<FromGitter> <kazzkiq> Is it possible to compile binaries with docker mimicking production environment?
hightower has quit [Ping timeout: 268 seconds]
<FromGitter> <aisrael> @kazzkiq What do you mean “mimicking production environment”? Isn’t it that you build an image and that’s what you deploy to production?
<FromGitter> <graken> Hi!, ⏎ can i reopening or inject new methods to classes ?
<FromGitter> <bew> Yes @graken
<FromGitter> <graken> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a790158a3447aac75478b51]
faustinoaq has joined #crystal-lang
<FromGitter> <graken> perfect!, but how can i do it with modules?
<FromGitter> <graken> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a7901f2e217167e2c48de21]
<FromGitter> <bew> What are you trying to do with this module?
<FromGitter> <bew> Include the methods in the module, in Tags?
<FromGitter> <graken> I would like to extend a library class with modules
<FromGitter> <bew> You can reopen the class and include a module with the extra methods you want to add to the class, or just reopen the class, and add the methods directly there
<FromGitter> <graken> great!, thanks
cremes has joined #crystal-lang
greengriminal has joined #crystal-lang
cremes has quit [Client Quit]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnyw has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
return0e has quit [Remote host closed the connection]
greengriminal has joined #crystal-lang
snsei has joined #crystal-lang
codenoid has joined #crystal-lang
cremes has joined #crystal-lang
codenoid has quit [Quit: Leaving]
cremes has quit [Quit: cremes]
greengriminal has quit [Ping timeout: 240 seconds]
greengriminal has joined #crystal-lang
snsei has quit [Remote host closed the connection]
cremes has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
qard has joined #crystal-lang
rohitpaulk has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
rohitpaulk has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
Liothen has quit [Remote host closed the connection]
Liothen has joined #crystal-lang
rohitpaulk has joined #crystal-lang
qard has quit [Quit: qard]
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #crystal-lang
return0e has joined #crystal-lang
<FromGitter> <iambudi> > codenoid: yes, the current GC is really bad in regards to wanting to use "a lot" of memory :-( ⏎ ⏎ @asterite will this happen any time or in what case this happend so we can avoid having this issue?
cremes_ has joined #crystal-lang
cremes has quit [Ping timeout: 268 seconds]
cremes_ is now known as cremes
alex`` has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 256 seconds]
alex`` has joined #crystal-lang
mark_66 has joined #crystal-lang
hightower has joined #crystal-lang
jnyw has quit [Quit: WeeChat 2.0.1]
foxbot has quit [Ping timeout: 256 seconds]
jokke has quit [Ping timeout: 240 seconds]
jokke has joined #crystal-lang
jokke has quit [Ping timeout: 260 seconds]
jokke has joined #crystal-lang
jokke has quit [Ping timeout: 240 seconds]
jokke has joined #crystal-lang
DTZUZO has joined #crystal-lang
A124 has quit [Ping timeout: 256 seconds]
hightower3 has joined #crystal-lang
A124 has joined #crystal-lang
hightower2 has quit [Ping timeout: 256 seconds]
aarongodin has quit []
aarongodin has joined #crystal-lang
jokke has quit [Ping timeout: 260 seconds]
jokke has joined #crystal-lang
hightower has quit [Ping timeout: 240 seconds]
<FromGitter> <asterite> it will happen if you allocate "a lot" of memory. I don't know the details. I think there's a GC setting that you can tweak, but in my opinion it's ridiculous, you should be able to allocate as much memory as you want
greengriminal has joined #crystal-lang
greengriminal has quit [Read error: No route to host]
greengriminal has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Ping timeout: 240 seconds]
greengriminal has joined #crystal-lang
<FromGitter> <kazzkiq> @aisrael I want to deliver a binary to a low-memory environment. But Crystal can't be easily compiled in said environment because of high memory usage. My question is, could I use docker in my development machine, so I can compile the binary and simply copy it to the low-memory production environment?
<travis-ci> crystal-lang/crystal#68fd656 (ci/nightly - DRY checkout of distribution-scripts. Use docker executor where possible): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338023549
<FromGitter> <kazzkiq> By using docker I mean using a linux image close to what I will have in my production env, etc.
<FromGitter> <fridgerator> @kazzkiq yes you can compile a crystal using docker and copy the executable to a server
<FromGitter> <fridgerator> its my preferred deployment method
<FromGitter> <straight-shoota> @kazzkiq You could even cross-compile for the target architecture. Then you just need to link the compiled program on the target machine.
n7olkachev has joined #crystal-lang
snsei has joined #crystal-lang
<travis-ci> crystal-lang/crystal#c074f48 (ci/nightly - DRY checkout of distribution-scripts. Use docker executor where possible): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/338028452
qard has joined #crystal-lang
<travis-ci> crystal-lang/crystal#574f8da (ci/nightly - DRY checkout of distribution-scripts. Use docker executor where possible): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/338029529
<FromGitter> <j8r> @kazzkiq You can see my ugly project https://github.com/DFabric/apps-static , specially `source/dppm-static`where I do this. I'm currently working on the aarch64 and armhf target also. The binary will be *statically linked*, all is self contained - you have just to worry about the architecture :)
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#22f60e9 (ci/nightly - DRY checkout of distribution-scripts. Use docker executor where possible): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338045230
n7olkachev has quit [Quit: WeeChat 1.9.1]
n7olkachev has joined #crystal-lang
n7olkachev has quit [Ping timeout: 260 seconds]
greengriminal has quit [Read error: Connection reset by peer]
n7olkachev has joined #crystal-lang
n7olkachev has quit [Client Quit]
mark_66 has quit [Remote host closed the connection]
snsei has joined #crystal-lang
n7olkachev has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
ua_ has quit [Ping timeout: 256 seconds]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ua has joined #crystal-lang
qard has joined #crystal-lang
<travis-ci> crystal-lang/crystal#4e6b6f2 (ci/nightly - DRY checkout of distribution-scripts. Use docker executor where possible): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338094434
<FromGitter> <graken> How to declare array of classes x = [] of ??
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <bararchy> @graken Array(MyClass).new
<FromGitter> <bararchy> ?
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
return0e has quit []
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <r00ster91> how do I install a branch like "master"? or "windows"? can I specify this here somehow: ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5a79e82fce68c3bc74520b63]
snsei has quit [Remote host closed the connection]
<FromGitter> <bararchy> Branches are github things, you need to use git to 'clone' a branch , then build it . please search for 'clone specific github branch'
<FromGitter> <r00ster91> oooh
<knight_> oops, sorr
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
<FromGitter> <straight-shoota> @r00ster91 only the latest Crystal release is distributed as binary package. Everything else you'll need to build from source.
<travis-ci> crystal-lang/crystal#75c2c8d (ci/nightly - DRY checkout of distribution-scripts. Use docker executor where possible): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338117130
<FromGitter> <graken> @bararchy Thanks!
<FromGitter> <graken> @bararchy Array(MyClass).new it's a array of instances, I need an array of constants
<FromGitter> <fridgerator> `Array(MyClass.class).new`
<FromGitter> <asterite> Or just `[] of MyClass.class`
<FromGitter> <graken> Perfect!
vivus has joined #crystal-lang
cremes has quit [Quit: cremes]
greengriminal has joined #crystal-lang
alex`` has quit [Ping timeout: 276 seconds]
<FromGitter> <greenbigfrog> Anyone ever looked into adding crystal support to codeclimate? https://github.com/codeclimate/codeclimate-duplication/issues/121
<travis-ci> crystal-lang/crystal#e3c3f7f (ci/nightly - DRY checkout of distribution-scripts. Use docker executor where possible): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338134036
return0e has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #crystal-lang
<watzon> So if I have a class that I want to basically have all the same features as the Array class, but I don't want to extend the array class; is there a way to do that? I have a single property that's an array and I want all of the array methods to affect that property.
codenoid has joined #crystal-lang
<oprypin> watzon, there's no good way to have *all* the methods of Array (because frankly most of them shouldnt be Array-specific) but the right approach is to include Indexable
<oprypin> also your use case is not clear to me
<watzon> Ahh that makes sense
<watzon> I'm probably thinking about the problem wrong. I have a class TextBuffer which has a @buffer property that is an Array of Chars. I want to be able to use Array methods on TextBuffer and have them relayed to the @buffer. But now that I think about it that's probably more of a Ruby `method_missing` type thing and not very Crystal like
<watzon> So maybe I should just extend Array
<travis-ci> crystal-lang/crystal#a16b596 (ci/nightly - Parametrise previous crystal release, package iteration and docker): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338147769
vivus has quit [Quit: Leaving]
alex`` has joined #crystal-lang
slightlyamusing has joined #crystal-lang
<codenoid> morning
<FromGitter> <r00ster91> i have evening
<codenoid> same, i have evening sky, it's 02:51
<Yxhuvud> watzon: even in Ruby I'd go for delegation and implement whatever of Enumerable and Indexable I needed and have the necessary parts delegate to the underlying array.
<travis-ci> crystal-lang/crystal#dc7f8aa (ci/nightly - Parametrise previous crystal release, package iteration and docker): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338167281
duane has quit [Ping timeout: 268 seconds]
<travis-ci> crystal-lang/crystal#66600d6 (ci/nightly - Parametrise previous crystal release, package iteration and docker): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/338176329
cremes has joined #crystal-lang
dannyAAM has joined #crystal-lang
dragonkh has joined #crystal-lang
<dragonkh> hi - I've got an Array(UInt8) and I want to convert it to a hex string - I can't seem to figure it out
<FromGitter> <bew> sth like: `arr.to_unsafe.to_slice(arr.size).hexstring` where does the array come from?
<dragonkh> its a myhexstring.bytes
<FromGitter> <bew> What are you trying to do exactly? Just learning how to do stuff?
<dragonkh> I'm trying to convert a public_key between hex and bytes and and the other way
<dragonkh> for my crypto lib
<dragonkh> so this public_key = "d68fca4a2e96b50ea39ddeff1089d8964af82d8e8629791015ccb7816e5f3661260344ba9b6677dca2a66ca038a23494e18ed3bd1806f98e158c7c658d93e4b5"
<dragonkh> public_key.bytes - gives me Array(UInt8) - a byte array
<dragonkh> and from that byte array - I want to get back to that hex string
<FromGitter> <bew> So you already have the hexstring, what's the point of converting it ?
<dragonkh> because I need it as bytes when dealing with another lib
<dragonkh> and also as hex for my lib
<dragonkh> so have to be able to go between them
<dragonkh> unfortunately your suggested code makes a different string - one half the size
<FromGitter> <bew> Ok, then just store the hexstring in your lib and pass the bytes to the other lib?
<dragonkh> well I'm also getting back bytes from the other lib as well - which I want to have as hex
<FromGitter> <bew> I don't think `public_key.bytes` is what you actually want
<dragonkh> oh?
<FromGitter> <bew> I think you want `public_key.hexbytes` https://crystal-lang.org/api/0.24.1/String.html#hexbytes%3ABytes-instance-method
<FromGitter> <bew> To transform the hex to actual bytes
<FromGitter> <bew> No?
<dragonkh> oh a Slice(UInt8) which has alias Bytes
<dragonkh> that seems right
<dragonkh> yeah that works - great thanks :)
<FromGitter> <bew> You're welcome ;)
codenoid has quit [Quit: Leaving]
Ven`` has joined #crystal-lang
n7olkachev has quit [Ping timeout: 260 seconds]
slightlyamusing has left #crystal-lang ["WeeChat 2.0.1"]
Ven`` has quit [Ping timeout: 256 seconds]
<frojnd> Anyone uses https://github.com/rhysd/vim-crystal on Linux?
<frojnd> I am having this problem with *.ecr files. Crystal code is highlighted but html is not.
<FromGitter> <bew> Yes, that's normal
<FromGitter> <bew> How should it know that the rest of the file that is not crystal code is actually html code?
<FromGitter> <bew> It could be anything elsr
<FromGitter> <bew> You can try to apply both html & crystal highlighting for the file, by doing `:set filetype=crystal.html<cr>` then reload the file with `:e<cr>` but I can't promise it will look good
<FromGitter> <bew> It's a common problem when you have multiple languages in the same file
duane has joined #crystal-lang
<frojnd> @bew the thing is that when I open .erb file which is what ftindent uses: https://github.com/rhysd/vim-crystal/commit/c6077c2790e042f8ccdb2680e5b77ef7ae1bcd03 it highlights html + ruby code
<frojnd> It should work exactly the same with .ecr
<frojnd> I just literally changed my .ecr file to .epub and it highlights perfectly html + crystal... filetype being eruby
duane has quit [Ping timeout: 260 seconds]
<frojnd> sorry not .epub .erb
duane has joined #crystal-lang
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 256 seconds]
alex`` has quit [Ping timeout: 260 seconds]
moei has quit [Quit: Leaving...]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
greengriminal has joined #crystal-lang
greengriminal has quit [Remote host closed the connection]
jokke has quit [Ping timeout: 260 seconds]
jokke has joined #crystal-lang
sotrhraven_droid has joined #crystal-lang
duane has quit [Ping timeout: 240 seconds]
dragonkh has quit [Ping timeout: 260 seconds]
<sotrhraven_droid> I get an error that can't find prelude. I am requiring a file. it is in my share.yml.
<sotrhraven_droid> *shard
<FromGitter> <jwoertink> Is there a shard anyone is using to do test database cleaning type deal for specs?
<sotrhraven_droid> crystal is Installed via asdf