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
alex``` has quit [Ping timeout: 246 seconds]
_whitelogger has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 245 seconds]
chachasmooth has quit [Ping timeout: 265 seconds]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d86e21428c1df0ed673491a]
<FromGitter> <Blacksmoke16> also did this
chachasmooth has joined #crystal-lang
<FromGitter> <tenebrousedge> that second one seems more meowy
<FromGitter> <tenebrousedge> probably that means "good"
chemist69 has quit [Ping timeout: 264 seconds]
chemist69 has joined #crystal-lang
<FromGitter> <codenoid> cool
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
ua has quit [Ping timeout: 265 seconds]
ua has joined #crystal-lang
ua has quit [Quit: Leaving]
ua has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <wwselleck> Is there any way to use ecr to render templates that are unknown ahead of time? Like if I wanted to create a program that fetches some JSON data, and feeds it into the user defined ECR templates, how would I go about that? From what I can tell from the docs, you need to define a custom class for each template, and declare the path of the specific template file ahead of time.
<FromGitter> <bew> @wwselleck ECR is a compile-time only templating language, so everything must be known ahead of time (at compile time). For dynamic / runtime templating language I suggest looking for another tool, like crinja, crustache, slang, kilt... http://crystalshards.xyz/?filter=template
<FromGitter> <wwselleck> @bew Thanks! Side question, https://github.com/jeromegn/kilt/blob/master/src/kilt.cr ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ What is the purpose of these being macros and not just regular functions? ... [https://gitter.im/crystal-lang/crystal?at=5d872bb028c1df0ed675284f]
<FromGitter> <bew> I guess this is becaue kilt supports ECR out of the box, which needs to work at compile time (with macros)
<FromGitter> <wwselleck> So I couldn't call `Kilt.render fileNameVariableAtRuntime`?
<FromGitter> <bew> hum, looks like you can't do that indeed, Kilt works only if you know your templates ahead of time (but these can be an any of the supported template languages)
ht_ has joined #crystal-lang
_whitelogger has joined #crystal-lang
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 276 seconds]
hightower2 has joined #crystal-lang
alex``` has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
gangstacat has quit [Ping timeout: 252 seconds]
gangstacat has joined #crystal-lang
hightower2 has quit [Ping timeout: 245 seconds]
_whitelogger has joined #crystal-lang
alex``` has quit [Ping timeout: 245 seconds]
alex``` has joined #crystal-lang
<FromGitter> <Daniel-Worrall> I wish I could help with the Windows support but I really wouldn't know where to start
HumanG33k has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
Yxhuvud has joined #crystal-lang
<FromGitter> <Daniel-Worrall> Well the Porting to Windows wiki, but I've done that before and just been lost
<Stephie> i remember when make std_spec used to run in under 10s ;;
<Stephie> might get so annoyed and yak shave cleaning up the slowest tests
<FromGitter> <asterite> It would be great! And now we have a way to know which are the slowest tests. I believe it's possible to make it faster
<Stephie> yeah
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
gangstacat has quit [Ping timeout: 246 seconds]
<FromGitter> <Daniel-Worrall> So it seems Clear, Grante and Avram all don't support composite ekys
<FromGitter> <Blacksmoke16> i mean could just do like `Model.find_by(key1: value, key2: value2)`?
<FromGitter> <Daniel-Worrall> According to Granite's docs, you can't define a model without a primary key, and it doesn't support composite
<FromGitter> <Blacksmoke16> so just define one column as a primary key and the other not and use find_by?
<FromGitter> <Blacksmoke16> the underlying table can still have the dual PK
<FromGitter> <Daniel-Worrall> but then there's going to be multiple results with the same pkey
<FromGitter> <Blacksmoke16> so? if you're doing your querying with find_by and specifying both keys should be fine no?
<FromGitter> <Daniel-Worrall> I'm not sure on the internals so... *shrug*
<FromGitter> <Blacksmoke16> should be fine
<FromGitter> <Blacksmoke16> not ideal but doable
<FromGitter> <tenebrousedge> @Daniel-Worrall why a composite PK?
alex``` has quit [Read error: Connection reset by peer]
alex``` has joined #crystal-lang
ht_ has quit [Quit: ht_]
HumanG33k has quit [Remote host closed the connection]
<FromGitter> <Daniel-Worrall> I'm having problems building Kemal statically on alpine
<FromGitter> <Daniel-Worrall> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d87e0c7c77f285fb1c5c5b4]
<FromGitter> <Daniel-Worrall> literally just ```require "kemal" ⏎ ⏎ Kemal.run```
<FromGitter> <Daniel-Worrall> I could have sworn this was working a week ago
<FromGitter> <bew> new crystal version maybe?
<FromGitter> <Daniel-Worrall> Not out yet
<FromGitter> <Daniel-Worrall> I've been on 0.30.1 since it came out
<FromGitter> <Daniel-Worrall> Actually, no, I didn't test kemal on static alpine yet
<FromGitter> <Daniel-Worrall> that was something else
<FromGitter> <Daniel-Worrall> Anyone wanna help me reduce the problem and see if it's already reported?
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
<FromGitter> <Daniel-Worrall> Could it be not having the right libraries on my env?
<FromGitter> <bew> you can verify that
<FromGitter> <bew> there should be a file `VERSION` in the directory where the stdlib source code is
<FromGitter> <bew> which you can find with `crystal env | grep CRYSTAL_PATH`
<FromGitter> <Daniel-Worrall> It works fine on buntu
<FromGitter> <Daniel-Worrall> but not on my docker alpine image
<FromGitter> <bew> is the VERSION correct on alpine?
<FromGitter> <bew> is it a container? can I try to reproduce it here?
<FromGitter> <Daniel-Worrall> Oh
<FromGitter> <Daniel-Worrall> Shit :^)
<FromGitter> <Daniel-Worrall> Yeah, that should have been obvious
<FromGitter> <Daniel-Worrall> I was using latest, and latest was tagged up on 0.29.0
<FromGitter> <Daniel-Worrall> for whatever reason
<FromGitter> <Daniel-Worrall> blame @j8r
<FromGitter> <bew> ^^
<FromGitter> <Daniel-Worrall> I fell victim to versioning when I sat down today in another way. pg updated to use 0.7.0 of db last night so I had to specify a version
<FromGitter> <asterite> i
<FromGitter> <repromancer_gitlab> I'm having trouble finding the equivalent of Ruby's `Module#ancestors` method.
<FromGitter> <repromancer_gitlab> Maybe I'm going about this a non-Crystally way, but I'm trying to print out the class hierarchy of a class from an external library, and my first instinct is just call `puts thing.ancestors` or `thing.class.ancestors`
<FromGitter> <naqvis> you will have to use macro here. https://crystal-lang.org/api/0.30.1/Crystal/Macros/TypeNode.html#ancestors:Crystal::Macros::ArrayLiteral(TypeNode)-instance-method
<FromGitter> <repromancer_gitlab> (and by "print out the heirarchy", I just mean "find out what it inherits from"; not trying to do any fancy generated code stuff)
<FromGitter> <naqvis> look into `ancestors`
<FromGitter> <repromancer_gitlab> oh, that's embarassing. I must have misspelled it when I searched there. thanks
<FromGitter> <naqvis> np
<FromGitter> <Blacksmoke16> can also use `superclass` if you just want the parent of it
<FromGitter> <Blacksmoke16> vs all the parents
<FromGitter> <naqvis> @Blacksmoke16 now parallelism in place, is there any way to parallelize specs?
<FromGitter> <Blacksmoke16> not that i know of
<FromGitter> <naqvis> thanks @Blacksmoke16
<FromGitter> <Blacksmoke16> you mean the compiler/stdlib specs?
<FromGitter> <bew> with the env var SPEC_SPLIT (not really documented) you could run a fraction of the spec, and run each chunks in multiple process (manually though)
<FromGitter> <bew> checkout how the CI does it
<FromGitter> <bew> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d8808ad5ab93616943d8551]