ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.30.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
ternarysolo has quit [Write error: Connection reset by peer]
beepdog has quit [Read error: Connection reset by peer]
erdnaxeli has quit [Remote host closed the connection]
olbat[m] has quit [Remote host closed the connection]
beepdog has joined #crystal-lang
f1refly has quit [Ping timeout: 258 seconds]
chachasmooth has quit [Ping timeout: 246 seconds]
chachasmooth has joined #crystal-lang
olbat[m] has joined #crystal-lang
ternarysolo has joined #crystal-lang
chemist69 has quit [Ping timeout: 246 seconds]
chemist69 has joined #crystal-lang
<sagax> hi all!
<sagax> what do you think about https://en.wikipedia.org/wiki/SOLID ?
<sagax> must have? or not needed for crystal?
ht_ has joined #crystal-lang
<FromGitter> <watzon> SOLID is a design principle and a good one. A lot of Crystal libraries actually use SOLID principles.
ht_ has quit [Quit: ht_]
teardown has quit [Ping timeout: 246 seconds]
teardown has joined #crystal-lang
<FromGitter> <codenoid> idk what is SOLID, but i'm always try to keep my code `simple & clear`
<FromGitter> <codenoid> can someone simply explain, what is SOLID, how it's looks like
absolutejam1 has joined #crystal-lang
absolutejam1 has quit [Quit: WeeChat 2.5]
absolutejam has joined #crystal-lang
<frojnd> Hi there.
hightower2 has quit [Ping timeout: 245 seconds]
sagax has quit [Remote host closed the connection]
absolutejam has quit [Ping timeout: 240 seconds]
hightower2 has joined #crystal-lang
absolutejam has joined #crystal-lang
sagax has joined #crystal-lang
return0e has quit [Ping timeout: 258 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 258 seconds]
Raimondii is now known as Raimondi
return0e has joined #crystal-lang
absolutejam has quit [Ping timeout: 268 seconds]
absolutejam has joined #crystal-lang
absolutejam has quit [Ping timeout: 246 seconds]
absolutejam has joined #crystal-lang
alex`` has joined #crystal-lang
gangstacat has quit [Ping timeout: 276 seconds]
gangstacat has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.6]
devil_tux has quit [Ping timeout: 258 seconds]
<FromGitter> <Blacksmoke16> o/
f1refly has joined #crystal-lang
<FromGitter> <watzon> It's not possible to create an abstract class method right?
<FromGitter> <watzon> Just instance
<FromGitter> <Blacksmoke16> Unfortunately yes
<FromGitter> <watzon> Do you know if there are any plans to change that? I looked at the issues, but didn't really find anything relevant.
<FromGitter> <Blacksmoke16> could maybe do something with macros in a macro included/inherited until then
<FromGitter> <Blacksmoke16> not sure
<FromGitter> <asterite> The problem is that classes are already instantiated by default
<FromGitter> <straight-shoota> I've encountered a strange situation. The compiler hangs at `Codegen (bc+obj)` stage. The exact same build used to work previously, and now the hang reproduces consistently. I'm not sure what's changed in between.
<FromGitter> <asterite> with an abstract method you can't call it because you can't instantiate the type
<FromGitter> <asterite> @straight-shoota you mean, with the same compiler version?
<FromGitter> <straight-shoota> Yes, same compiler version. It's installed in a dockerfile and uses 0.30.1 from alpine:edge
<FromGitter> <asterite> Strange. Maybe a cache issue?
<FromGitter> <straight-shoota> It's the first step involving the compiler, so the cache doesn't even exist
<FromGitter> <straight-shoota> Oooh, but now I've got an END_OF_STACK error
absolutejam has quit [Ping timeout: 276 seconds]
<FromGitter> <naqvis> @watzon just a quick thought ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d80f96f62bfc95112052693]
<FromGitter> <straight-shoota> @asterite If you want to try it: https://github.com/shardbox/shardbox-web/blob/dev/Dockerfile
rohitpaulk has joined #crystal-lang
ht_ has joined #crystal-lang
<FromGitter> <j8r> @straight-shoota in the dockerfile, `openssl-libs-static` is missing
<FromGitter> <Blacksmoke16> would be nice to get official alpine images for static linking
<FromGitter> <j8r> git will work, but libsass my not have the .a archives
<FromGitter> <straight-shoota> @j8r This exact dockerfile used to work, without any changes to dependencies
<FromGitter> <j8r> also `libgit2-static`
<FromGitter> <j8r> @straight-shoota thats normal
alex`` has joined #crystal-lang
<FromGitter> <j8r> Alpine is moving gradually the static archives in `-dev` packages to `-static` packages
<FromGitter> <j8r> libsass won't work, static is disabled
<FromGitter> <straight-shoota> Oh, you're talking about the issue with static linking. I really don't care about that ATM. It's not a priority to link fully statical.
<FromGitter> <straight-shoota> The current issue is that the compiler hangs at `Codegen (bc+obj)`
<FromGitter> <straight-shoota> > libsass won't work, static is disabled ⏎ ⏎ I know. I've tried building libsass myself, but IIRC correctly, there was some kind of issue with that, so I postponed
<FromGitter> <j8r> ok
<FromGitter> <j8r> you can try using `--release`/`--no-debug`, or not
<FromGitter> <kinxer> Is there a simple way to read from and write to the same IO buffer with separate read/write positions?
<FromGitter> <stronny> two IO::Mems atop of the same slice?
<FromGitter> <kinxer> I assume that wouldn't allow for an easily-resizable buffer?
<FromGitter> <stronny> slices are optionally resizeable
<FromGitter> <naqvis> `IO#pipe` https://crystal-lang.org/api/0.30.1/IO.html
<FromGitter> <naqvis> direct from the documentation ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8105e4b84cb24c7ee68d2b]
<FromGitter> <kinxer> Ah... I saw that the class method existed, but I hadn't seen that example.
<FromGitter> <kinxer> I think `IO.pipe` is probably what I want.
<FromGitter> <stronny> bytes will go through kernel though
<FromGitter> <stronny> what is it that you want?
<FromGitter> <kinxer> I'm trying to figure out how I would approach the problem @jwoertink was talking about yesterday (interacting with a CLI through `Process.run`).
<FromGitter> <jwoertink> I decided to not attack that path, and took a cheap workaround
<FromGitter> <jwoertink> My guess is there's no way to know when a script hits a `gets` unless you pass in some arg, and then do something like `arg || gets`
<FromGitter> <stronny> I still don't understand the problem
<FromGitter> <jwoertink> My problem was I have a CLI script that does something like
<FromGitter> <jwoertink> ```puts "Project name?" ⏎ answer = gets``` [https://gitter.im/crystal-lang/crystal?at=5d810775d5c523462f9c6447]
<FromGitter> <jwoertink> then that file gets accessed from calling `Process.run`
<FromGitter> <stronny> so where's the problem?
<FromGitter> <jwoertink> For me, `Process.run` would hit the `gets` and wait for input.... but there's no where to give input because the script was running on travis
hightower2 has quit [Ping timeout: 276 seconds]
<FromGitter> <stronny> `input : Stdio = Redirect::Close`
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <jwoertink> I don't know what that is
<FromGitter> <stronny> let me cook an example
<FromGitter> <stronny> Process.run w/o block closes STDIN/STDOUT/STDERR of the child bu default. Process.run with a block creates pipes by default.
<FromGitter> <stronny> You may want to investigate Process.new arguments to understand what's going on with fork-execs in Crystal
<FromGitter> <kinxer> This is what I have right now: https://play.crystal-lang.org/#/r/7l36
<FromGitter> <kinxer> Though `tr` may not be right as a way to test it.
<FromGitter> <kinxer> Execution times out with no output on play.crystal-lang.org, but on my machine it outputs `First prompt` and then hangs.
<FromGitter> <stronny> usually programs don't read just one line
<FromGitter> <stronny> `tr` will consume the pipe until you close it, but you don't.
<FromGitter> <kinxer> That makes sense.
Human_G33k has quit [Remote host closed the connection]
Human_G33k has joined #crystal-lang
<FromGitter> <kinxer> Success?
<FromGitter> <stronny> easy https://play.crystal-lang.org/#/r/7l3b
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
companion_cube has left #crystal-lang ["WeeChat 2.3"]
absolutejam has joined #crystal-lang
alex`` has quit [Ping timeout: 276 seconds]
alex`` has joined #crystal-lang
<FromGitter> <c-cube> with the advent of multicore, should the stdlib be extended with more concurrency primitives (conditions, barriers, etc.)?
HumanGeek has joined #crystal-lang
Human_G33k has quit [Ping timeout: 258 seconds]
alex`` has quit [Quit: WeeChat 2.6]
ht_ has quit [Remote host closed the connection]
<FromGitter> <Sija> @asterite is a compile-time perf regression with `—release —no-debug` flags sth to be expected in `v0.31`? (see https://travis-ci.org/Sija/raven.cr/jobs/586240511#L475 - `96.01s` vs the same for `v0.30.1`: `50.40s` - see https://travis-ci.org/Sija/raven.cr/jobs/586240510#L252)
<FromGitter> <wontruefree> We are starting up the Chicago Crystal Meetup and we are making it super remote friendly. There will be remote speakers and a remote dial in https://www.meetup.com/Crystal-Lang-Chicago/events/lxmhvqyznbfb/
<FromGitter> <sam0x17> this is happening for me when hitting an https link from a kemal-based lambda function using up.sh -- it happens only in the deployed lambda and not in local tests that hit the exact same url: Sep `17th 04:48:14pm ERRO staging 12aa2f7 Unhandled exception in spawn: SSL_connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed (OpenSSL::SSL::Error)`
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<FromGitter> <sam0x17> this is the offending code: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d81480336461106bb372bc5]
<FromGitter> <sam0x17> I'm afraid this is that SSL issue that only happens when crystal is built a certain way that is so hard to debug
<FromGitter> <Blacksmoke16> got all the deps installed? like certs lib
<FromGitter> <Blacksmoke16> i.e. like the `ca-certificates`
<FromGitter> <sam0x17> maybe I could try that
<FromGitter> <sam0x17> its using an alpine image
<FromGitter> <sam0x17> ty
hightower3 has joined #crystal-lang
HumanGeek has quit [Remote host closed the connection]
<FromGitter> <fridgerator> @wontruefree awesome!
HumanGeek has joined #crystal-lang
<FromGitter> <c-cube> is it idiomatic to use channels as futures, as in @sam0x17 's code?
<FromGitter> <c-cube> (seems like it'd be convenient to have actual futures, too)
issyl0 has quit [Read error: Connection reset by peer]
issyl0 has joined #crystal-lang
<FromGitter> <watzon> Crystal actually has futures, more or less https://crystal-lang.org/api/0.30.1/toplevel.html#future(&exp:-%3EUNDERSCORE)-class-method
<FromGitter> <c-cube> ooh, neat, thanks.
<FromGitter> <c-cube> Should help with synchronization…
<FromGitter> <c-cube> wondering why `Concurrent::Future` isn't exported in the docs, though
<FromGitter> <watzon> That I don't know
absolutejam has quit [Ping timeout: 245 seconds]
<FromGitter> <didactic-drunk> Weird. `future is documented`. Maybe you're supposed to use that?