RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.0 | 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
<FromGitter> <Blacksmoke16> docker can help with that too
<FromGitter> <Blacksmoke16> helps for sure if pc restarts or something fails in app
<FromGitter> <drum445> Yeah just got a service running and apache as a reverse proxy :D
<FromGitter> <drum445> Any reason to use nginx over apache, I used apache as I'm familiar with it but any reason to swap?
<FromGitter> <Blacksmoke16> :shrug: im sure everyone has their preference
<FromGitter> <Sija> @drum445 speed/security
<FromGitter> <drum445> oh right, apache2 old stuff these days is it?
<FromGitter> <Sija> seems like it is ;)
<FromGitter> <drum445> ha shame
<FromGitter> <Sija> i never liked it to be honest
<FromGitter> <Sija> nginx is built with efficency in mind for one of the biggest data pushers in history - porn biz ;)
<FromGitter> <drum445> haha was it really
<FromGitter> <Sija> that's what the X in nginX stands for ;)
<FromGitter> <drum445> Citation needed? ;)
<FromGitter> <Sija> that's what I read some yrs ago, maybe someone had his laugh, dunno ;)
<FromGitter> <Sija> lookin' for it! :P
<FromGitter> <drum445> lol
<FromGitter> <Sija> can't find it, maybe it was more about that all the porn sites are using nginx so it's battletested. Can't remember exactly atm, sorry ;)
<FromGitter> <Sija> found this tho' - https://news.ycombinator.com/item?id=12855554 - which turned out to be quite interesting read
<FromGitter> <Sija> the only good thing imo about apache are `.htaccess` files, or more specifically rewrite conditions you can put there
<FromGitter> <Sija> doin' it by hand in nginx `*.conf` files for *every* website is a real PITA
<FromGitter> <drum445> Yeah most things have a few positives
non-aristotelian has quit [Quit: non-aristotelian]
shmibs has quit [Quit: leaving =o]
<FromGitter> <Blacksmoke16> heres a question, how would you make a macro produce nested values
<FromGitter> <Blacksmoke16> like given the array `["one","two"]`
<FromGitter> <Blacksmoke16> produce
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bf8a2c3a115c91ef7821f3e]
<FromGitter> <Blacksmoke16> recursive stuff makes my brain hurt
shmibs has joined #crystal-lang
ska has left #crystal-lang ["Leaving"]
<FromGitter> <Makoren> hey guys, i found crystal a couple days ago but i have a few questions
<FromGitter> <Makoren> 1) When will Crystal be production ready? This is the first "in development" language I want to follow, so I have no idea how long these things take. ⏎ ⏎ 1) Would it make sense to start building something with Crystal now while it's still in development, or would I end up running into too many breaking changes? I plan on using Crystal for game engine development and graphics programming. ⏎ ⏎ 1) Will
<FromGitter> ... Crystal support Android and iOS? From what I understand, it already runs on mobile devices but is not actively supported on those devices. [https://gitter.im/crystal-lang/crystal?at=5bf8b0d166213138940b6e6c]
<FromGitter> <Makoren> i already posted this on the google groups page but it seems very inactive compared to gitter
<FromGitter> <Blacksmoke16> 1) TBD, are a few things the team wants to get done first afaik
<FromGitter> <Blacksmoke16> 1) Sure, just bear in mind breaking changes can happen and to account for them in your dev time, but for side projects and stuff it shouldnt be much of an issue, at least it wanst for me
<FromGitter> <Blacksmoke16> 3 not sure
<FromGitter> <sam0x17> @Makoren at BlockVue we have been using crystal in production for a year now, basically everything works perfectly there are just some minor breaking changes every other version or so
<FromGitter> <Makoren> ty for the answers, if anyone can chime in on question 3 id love to hear it
<FromGitter> <Blacksmoke16> came up with this for the recursive thing btw
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bf8ca24ced7003fe177e993]
<FromGitter> <Blacksmoke16> works well enough
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bf8cb83cfa682348d756438]
<FromGitter> <Blacksmoke16> noice
sp3ncer has joined #crystal-lang
sp3ncer has quit [Read error: Connection reset by peer]
sp3ncer has joined #crystal-lang
sp3ncer has quit [Read error: Connection reset by peer]
sp3ncer has joined #crystal-lang
C-o has joined #crystal-lang
sp3ncer has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <Qard> Is it possible, given an arbitrary proc, to get an array of its parameter types somehow?
DTZUZO has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
_whitelogger has joined #crystal-lang
<FromGitter> <bew> From macros yes, but if the proc is defined elsewhere, no
ashirase has quit [Ping timeout: 245 seconds]
ashirase has joined #crystal-lang
<FromGitter> <schoening> Amber getting really popular for SPA applications in Norway now
<FromGitter> <schoening> :p
<FromGitter> <vladfaust> Kek
<FromGitter> <j8r> @ed the main point of nginx is perf, less RAM, built-in cache, and features like load balancing
<FromGitter> <j8r> Docker Swarm with Traefik is also a good option
<FromGitter> <bararchy> What does this means? => https://github.com/ruby/ruby/pull/2026
<Yxhuvud> bararchy: just some troll.
<FromGitter> <bararchy> Oh... ok
<FromGitter> <bararchy> got it in the mail so had 0 context
<Yxhuvud> well look at the PR and it should be obvious
rohitpaulk has joined #crystal-lang
<FromGitter> <kingsleyh> grr trolls
<FromGitter> <bararchy> ok, lol got it now
<FromGitter> <bararchy> tohugh it would be damn awsome
<FromGitter> <bararchy> hahah
rohitpaulk has quit [Remote host closed the connection]
Yxhuvud has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<FromGitter> <drum445> @j8r sounds like it's worth switching to then
<FromGitter> <vladfaust> We have Jobs category now at https://forum.crystalcommunity.org/c/jobs - I find it more convenient than a separate website
<FromGitter> <vladfaust> Also I'm trying to revive https://t.me/crystallang, so if you have Telegram and speak English, join that chat :)
<FromGitter> <vladfaust> Also there is a channel dedicated to jobs - https://t.me/crystaljobs with a separate chat - https://t.me/crystaljobschat
Yxhuvud has joined #crystal-lang
<FromGitter> <kingsleyh> how can I make a new char array of a specified size to hold some char stuff
<FromGitter> <kingsleyh> maybe `Array(Char).new(32)`
<FromGitter> <kingsleyh> ah got it working thanks
Groogy has joined #crystal-lang
<FromGitter> <vladfaust> @kingsleyh https://crystal-lang.org/api/0.27.0/StaticArray.html
<FromGitter> <dscottboggs_gitlab> can you do `crystal tool expand` on a JSON::Serializable?
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> ouch I had a space between `converter` and its colon :(
<FromGitter> <dscottboggs_gitlab> very weird though, it doesn't throw an error in the playground... https://carc.in/#/r/5mbs
<oprypin> dscottboggs_gitlab, maybe report that
<FromGitter> <dscottboggs_gitlab> sure
<FromGitter> <dscottboggs_gitlab> #7111
<FromGitter> <Blacksmoke16> @vladfaust why would you accept anything but `NumberLiteral`?
<FromGitter> <Blacksmoke16> `[1,2,3].pop("foo")` wouldnt make sense?
<FromGitter> <vladfaust> Oh, I'm sorry, my bad
<FromGitter> <vladfaust> Yeah, pop is about popping
<FromGitter> <vladfaust> Happens sometimes :)
<FromGitter> <Blacksmoke16> all good :p
<FromGitter> <vladfaust> Thanks for the PR, though
<FromGitter> <drum445> Picking up our reverse proxy chat yesterday, is there a way to redirect ⏎ apiurl.../app1/etc ⏎ to a different port from ⏎ apiurl.../app2/etc [https://gitter.im/crystal-lang/crystal?at=5bf97004cfa682348d794ace]
<FromGitter> <drum445> app1 and app2 are on the same server but different ports, I want to send it to the right port depending on the first resource (app1 or app2) please?
<FromGitter> <Blacksmoke16> yes, on nginx can use proxy pass most likely
<FromGitter> <Blacksmoke16> its what i used to route like `example.com/api/xxx` to the api vs trying to render it with angular
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bf970add24f9324d247dadd]
<FromGitter> <Blacksmoke16> prob something like that?
<FromGitter> <Blacksmoke16> which when the url is /app1/` proxy the request to `example.com port 3000`
<FromGitter> <drum445> yeah nice, that'll do it. Location will be what I'll use for apache atm, cheers boss
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <drum445> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bf97287958fc53895e1c5df]
<FromGitter> <drum445> beautiful lol
<FromGitter> <Blacksmoke16> well there you go
<FromGitter> <j8r> that's the same like apache, `location` also exists
Jenz has joined #crystal-lang
rohitpaulk has joined #crystal-lang
* Jenz o/
rohitpaulk has quit [Remote host closed the connection]
<FromGitter> <Blacksmoke16> is there a way to test for compile time error?
<Jenz> What?
<Jenz> If there is a compile time error, the compiler prints an error
<Jenz> Do you mean like in a shell?
<FromGitter> <Blacksmoke16> yea is there a way to write a spec to make sure you get that compile time error
<FromGitter> <Blacksmoke16> and that the error is what you are expecting
<Jenz> Oh like that, hmm
<FromGitter> <pitosalas> Question about property... it seems like the getter and setter for a property don't work (or aren't available) in the constructor. The following doesn't compile: class Test ⏎ property s1 : String ⏎ ⏎ def initialize#() #x1 : String) ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5bf9931d97a8982b9a5a9a03]
<FromGitter> <Blacksmoke16> got a playground link?
<FromGitter> <dscottboggs_gitlab> yes, @pitosalas that is true
<FromGitter> <pitosalas> feature or bug?
<FromGitter> <pitosalas> (or to-be-impleented?)
<FromGitter> <dscottboggs_gitlab> you have to refer to the instance variable created by the property macro directly, rather than calling the setter from inside the initializer
<FromGitter> <Blacksmoke16> ^
<FromGitter> <dscottboggs_gitlab> I'm not sure about that, I'm sure allowing setters to be used in initialzers *could* be implemented, but I'm not sure whether it's not been as a design decision or because it's hard to do
<Jenz> @Blacksmoke16, here's one possible solution to your earlier question: https://play.crystal-lang.org/#/r/5md1/edit
<FromGitter> <dscottboggs_gitlab> that would require the type checker to go out and make sure that the setter actually sets the instance variable
<FromGitter> <Sija> @dscottboggs_gitlab that's precisely the reason it's not implemented
<FromGitter> <pitosalas> Very good to know.
<FromGitter> <pitosalas> Thanks
<FromGitter> <dscottboggs_gitlab> pretty good reason haha
<FromGitter> <Blacksmoke16> huh, nice one jenz
<FromGitter> <dscottboggs_gitlab> ooh, what if you ran it through Crystal::Format and expect_raises?
<FromGitter> <dscottboggs_gitlab> @Blacksmoke16
<FromGitter> <Blacksmoke16> hmm, dunno would have to play around with it
<FromGitter> <pitosalas> @Blacksmoke16 @dscottboggs_gitlab are you in the crystal developers?
<FromGitter> <Blacksmoke16> like the core team?
<FromGitter> <dscottboggs_gitlab> no sir, but it's not an exclusive club
<FromGitter> <Blacksmoke16> no
<FromGitter> <Blacksmoke16> its open source so anyone is able to contribute
<FromGitter> <pitosalas> is able <> does
<FromGitter> <dscottboggs_gitlab> fair
<FromGitter> <pitosalas> anyway thanks for your help ... it had me running around in circles for a bit
<FromGitter> <dscottboggs_gitlab> np haha, have you seen there's a tool to expand macros?
Jenz has quit [Ping timeout: 252 seconds]
<FromGitter> <sam0x17> eta on 0.27.1 anyone?
rohitpaulk has joined #crystal-lang
<FromGitter> <vladfaust> Soon
<FromGitter> <vladfaust> It usually takes a couple of weeks
Jenz has joined #crystal-lang
<Jenz> vladfaust, you're the one that created a crystal forum right?
<FromGitter> <vladfaust> Indeed I am, @Jenz
* Jenz :)
<Jenz> Well thanks for that, but what was the link again, I saw it on the fly, and forgot the domain-name
<Jenz> Can you post a link?
<FromGitter> <vladfaust> Yeah, sure, it's forum.crystalcommunity.org
<Jenz> Thanks!
<FromGitter> <vladfaust> I'm going to create a news portal @ crystalcommunity.org
<FromGitter> <vladfaust> Got so many things to do though
<Jenz> How will it differ from crystal-ann?
<FromGitter> <vladfaust> Yes
rohitpaulk has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 272 seconds]
Jenz has quit [Ping timeout: 268 seconds]
<FromGitter> <pitosalas> Hash#fetch(key) has been deprecated on purpose? https://play.crystal-lang.org/#/r/5mde
<FromGitter> <drum445> cheers @j8r yeah location seems to be working out nicely atm
<FromGitter> <Blacksmoke16> @pitosalas yea, fetch was just an alias for `[]`
druonysus has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]