ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.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
thews has quit [Ping timeout: 248 seconds]
thews has joined #crystal-lang
<FromGitter> <codenoid> morning, can I get the total of child process (from the fork) that is running?
<FromGitter> <bew> 'night! not easily I think
<FromGitter> <codenoid> ok, so crystal does not provide innate functionality for it, "``"
<FromGitter> <bew> neither does the OS iirc (not sure about that though)
weston1 has quit [Ping timeout: 248 seconds]
weston1 has joined #crystal-lang
<FromGitter> <wwselleck> > are there anyy examples of crystal apps using a plugin architecture?
Philpax__ has quit [Ping timeout: 255 seconds]
Philpax has joined #crystal-lang
greengriminal has joined #crystal-lang
weston1 has quit [Ping timeout: 240 seconds]
weston1 has joined #crystal-lang
weston1 has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] mverzilli closed pull request #4862: Remove unnecessary parenthesis from `Cast#to_s` result (master...fix/crystal/cast-to-s-unnecessary-paren) https://git.io/v5fUV
greengriminal has quit [Quit: This computer has gone to sleep]
tax has joined #crystal-lang
<travis-ci> crystal-lang/crystal#f5abb5b (master - Remove unnecessary parenthesis from `Cast#to_s` result): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/277582509
greengriminal has joined #crystal-lang
crystal-lang672 has joined #crystal-lang
snsei has quit [Remote host closed the connection]
tax has quit [Ping timeout: 246 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
bmcginty has quit [Ping timeout: 240 seconds]
bmcginty has joined #crystal-lang
crystal-lang672 has quit [Quit: Page closed]
alex`` has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
snsei has joined #crystal-lang
alex`` has quit [Ping timeout: 264 seconds]
ShalokShalom has quit [Read error: Connection reset by peer]
ShalokShalom has joined #crystal-lang
Papierkorb_ has joined #crystal-lang
<Papierkorb_> Morinin'
Groogy has quit [Quit: WeeChat 1.7.1]
<FromGitter> <sdogruyol> Good morning everyone
<FromGitter> <txdv> good day sir
<FromGitter> <txdv> i really hate that it is highlighting me in the irc when i write here
<FromGitter> <sdogruyol> just use gitter :P
<FromGitter> <sdogruyol> I've stopped using IRC for this channel long time ago
<FromGitter> <txdv> That is no argument
<FromGitter> <txdv> There a lot of great people who stopped living, should I do the same?
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
claudiuinberlin has quit [Client Quit]
snsei has quit [Ping timeout: 246 seconds]
Groogy has joined #crystal-lang
<Groogy> Morning! o/
<FromGitter> <alex-lairan> No, but stop irc, yes :D
<FromGitter> <alex-lairan> Saluton Groogy
<FromGitter> <sdogruyol> @txdv just an opinion :P
mark_66 has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
<FromGitter> <txdv> Well, add some arguments to the opinion
<FromGitter> <txdv> Death to all infidels, IRC is the greatest network of them all!
<Groogy> then why aren't you on IRC then huuuuuh? ;D
claudiuinberlin has quit [Client Quit]
rohitpaulk has joined #crystal-lang
<txdv> i am?
<Groogy> no go away you traitor! I see the FromGitter bot forwarding your messages on Gitter!
claudiuinberlin has joined #crystal-lang
<txdv> my irc chat logs track my conversation back to before you were even born
<txdv> (im actaully not that old)
<Groogy> I am that old ( ゚∩゚)
<Groogy> no not really but my earliest usage was to find scrims with random people for counter strike years ago
<txdv> lol
<txdv> either programming or find someone to scrim
<txdv> freenode and quakenet
<txdv> the last bastions of the irc empire
<txdv> the outcasts who dared to mix races (gamers and coders) live at gamesurge
<Papierkorb_> I've met some of my longest IRL friends in IRC (And we still hang out there). Why on earth would I want to drop IRC
<FromGitter> <sdogruyol> yeah the same for me
<FromGitter> <sdogruyol> I've started Ruby Turkey user group on IRC. Now we have 1000 members, lol
<FromGitter> <sdogruyol> the sad part is that we don't use IRC anymore
<txdv> did the government ban it?
rohitpaulk has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
<crystal-gh> [crystal] akzhan closed pull request #4555: Drop XSS escaping because it should be aside HTML escaping. (master...classic-HTML.escape) https://git.io/vH93G
<FromGitter> <marin117> hi guys
<FromGitter> <marin117> I have question about queries and postgres
<FromGitter> <marin117> I have timestamp data in database and I have to read it in crystal
<FromGitter> <marin117> what type of data should I write in result_set.read()
<FromGitter> <marin117> because query returns me a Slice(UInt8)
<FromGitter> <marin117> is it even possible to read show timestamp data as it is in crystal
<FromGitter> <marin117> read/show *
<crystal-gh> [crystal] akzhan opened pull request #5011: Eliminate doubled case in visit_cast. (master...eliminate-doubled-case-in-visit_cast) https://git.io/v5pur
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
<FromGitter> <marin117> it returns me just some letters
<FromGitter> <codenoid> 1) not valid letter
<FromGitter> <codenoid> with non utf-8 character
<FromGitter> <codenoid> because the string infected by `.to_json` : (
<FromGitter> <bararchy> @sdogruyol @txdv https://xkcd.com/1782/
<FromGitter> <marin117> so I should encode Slice and something magical could happen?
<FromGitter> <codenoid> fixed with `strict_encode` https://play.crystal-lang.org/#/r/2rel
rohitpaulk has joined #crystal-lang
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
claudiuinberlin has joined #crystal-lang
<FromGitter> <anonymframework> hi guys
<FromGitter> <bew> hello
<FromGitter> <anonymframework> can we use RubyMine for Crystal ?
<FromGitter> <bew> no, the two languages are too different for that
<FromGitter> <bew> if you're looking for how editor support we have, there is a list here https://github.com/crystal-lang/crystal/wiki#editor-support
<FromGitter> <anonymframework> but the syntax is really similar, i think a Intellij plugin would be awesome
claudiuinberlin has quit [Read error: Connection reset by peer]
<FromGitter> <sdogruyol> @bararchy rofl :D
A124 has joined #crystal-lang
Philpax__ has joined #crystal-lang
Philpax_ has quit [Ping timeout: 255 seconds]
<FromGitter> <marin117> so how do I read timestamp data from database?
<FromGitter> <slava-dzyba> hey everyone. ⏎ I'm trying to figure out how to structure code and configs (e.g. for different environments like dev, prod, etc) for Kemal application. ⏎ could someone pls suggest some example Kemal repo or any related article?
Philpax_ has joined #crystal-lang
<FromGitter> <faustinoaq> @slava-dzyba please, for Kemal questions use Kemal room 👉 https://gitter.im/sdogruyol/kemal 😅
Philpax__ has quit [Ping timeout: 246 seconds]
<FromGitter> <faustinoaq> > I'm trying to figure out how to structure code and configs ⏎ ⏎ You can use environment variables http://kemalcr.com/guide/#environment
<FromGitter> <slava-dzyba> thanks
bmcginty has quit [Ping timeout: 260 seconds]
bmcginty has joined #crystal-lang
snsei has joined #crystal-lang
<livcd> yay emacs support
Philpax__ has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
Philpax_ has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 255 seconds]
A124 has quit [Ping timeout: 260 seconds]
A124 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
DTZUZO has quit [Ping timeout: 240 seconds]
ShalokShalom has quit [Read error: Connection reset by peer]
ShalokShalom has joined #crystal-lang
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 246 seconds]
ShalokShalom_ is now known as ShalokShalom
A124 has quit [Ping timeout: 260 seconds]
Philpax_ has joined #crystal-lang
Philpax__ has quit [Ping timeout: 255 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] mverzilli reopened pull request #4861: Remove 1 item Expressions normalization (master...fix/crystal/remove-1-expression-normalize) https://git.io/v5ffa
tax has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
A124 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
<crystal-gh> [crystal] asterite closed pull request #5011: Eliminate doubled case in visit_cast. (master...eliminate-doubled-case-in-visit_cast) https://git.io/v5pur
<crystal-gh> [crystal] asterite opened pull request #5012: Let HTML.escape only escape &<>"' (master...bug/3233-html-escape) https://git.io/v5pAb
hightower3 has joined #crystal-lang
hightower4 has quit [Ping timeout: 246 seconds]
<travis-ci> crystal-lang/crystal#0fdf721 (master - Merge pull request #5011 from akzhan/eliminate-doubled-case-in-visit_cast): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/277752483
<DeBot_> https://github.com/crystal-lang/crystal/pull/5011 (Eliminate doubled case in visit_cast.)
<FromGitter> <txdv> @bararchy omg, i thought xkcd would be the last person to diss irc
rohitpaulk has joined #crystal-lang
greengriminal has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
alex`` has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
Papierkorb_ has quit [Quit: Konversation terminated!]
<FromGitter> <faustinoaq> This amount of issues is insane 👇 ⏎ ⏎ ((https://i.imgur.com/8tcXTXO.png)) ⏎ ⏎ VSCode Core Team does a hard work 💪 ... [https://gitter.im/crystal-lang/crystal?at=59c2752acfeed2eb6530394e]
<FromGitter> <txdv> vscode is really nice and awesome
<FromGitter> <txdv> one of those projects they got all right
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/v5hkJ
<crystal-gh> crystal/master 12ed6df Ary Borenszweig: Implement `Exception#inspect` (#5008)
LastWhisper____ has joined #crystal-lang
<FromGitter> <rufusroflpunch> vscode vim's plugin is also excellent
<travis-ci> crystal-lang/crystal#12ed6df (master - Implement `Exception#inspect` (#5008)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/277783444
<DeBot_> https://github.com/crystal-lang/crystal/pull/5008 (Implement `Exception#inspect`)
greengriminal has quit [Quit: This computer has gone to sleep]
alex``` has joined #crystal-lang
alex``` is now known as alexherbo2
alexherbo2 is now known as alex```
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #crystal-lang
DTZUZO has joined #crystal-lang
greengriminal has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <faraazahmad> Hi! I'm new to Crystal. is it really as fast as C? :)
<FromGitter> <faustinoaq> Hi @faraazahmad yeah, Crystal is very fast, but depend of situation, the advantage of Crystal is the easy syntax see 👉 https://github.com/kostya/benchmarks#havlak
<FromGitter> <faustinoaq> C is still faster that almost every language, except Assembly, but is harder to write and mantain 😅
<FromGitter> <bew> faster than* :D
<FromGitter> <faustinoaq> Rust, Nim, Crystal, Julia, Swift, etc have aims to be fast as C Of course everything has it's own price. ⏎ ⏎ Crystal isn't just fast but also type safe, compiled, and have an easy concurrency model based on CSP.
<FromGitter> <bew> Welcome @faraazahmad!
ShalokShalom has quit [Remote host closed the connection]
<FromGitter> <faustinoaq> > Of course everything has it's own price. ⏎ ⏎ I think the price that Crystal have to pay is the slightly slowness at compilation phase. ⏎ ⏎ Good syntax and fast execution aren't cheap 😅 [https://gitter.im/crystal-lang/crystal?at=59c28b34bac826f054dea701]
<FromGitter> <faustinoaq> Luckily, it compiles once and runs many times
<FromGitter> <sdogruyol> A kindly reminder for 2017 State of Crystal survey, it's closing this week :) Please attend and give us your feedback about Crystal https://docs.google.com/forms/d/e/1FAIpQLSeDXN0jZJFgXHUZXOBsOtKlWxXV9XxtCURmFz8xx5V0FWfJZg/viewform
ShalokShalom has joined #crystal-lang
<FromGitter> <faustinoaq> I forgot I filled this survey, and filled twice 😅
<FromGitter> <faustinoaq> My bad
<FromGitter> <faustinoaq> > faster than*
<FromGitter> <sdogruyol> :D
<FromGitter> <faustinoaq> Thanks you @bew 😉
<FromGitter> <bararchy> @faraazahmad as fast as an OO language with a Garbage collector can be ;)
<FromGitter> <bararchy> But I suggest you keep your eyes on what else the lang has to offer
rohitpaulk has joined #crystal-lang
<Papierkorb> Can I change key bindings in VSCode without messing with config files?
tax has quit [Ping timeout: 246 seconds]
<FromGitter> <bew> Papierkorb seems so https://code.visualstudio.com/docs/getstarted/keybindings
<Papierkorb> Thank some deity for that. That part of Atom *sucks*
<Papierkorb> Mh though now I have to check if disabling the "telemetry" nonsense actually does disable it.
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
raz has quit [Changing host]
raz has joined #crystal-lang
<FromGitter> <drosehn> FWIW, there's an issue at RubyMine asking that it add support for Crystal.
claudiuinberlin has joined #crystal-lang
<Papierkorb> sdogruyol, Does Kemal use YAML for configuration?
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex``` has quit [Quit: WeeChat 1.9]
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <crisward> For developing crystals web sockets to full compliance, this could be useful - https://github.com/crossbario/autobahn-testsuite
<FromGitter> <fridgerator> 👍 awesome
<FromGitter> <sdogruyol> @Papierkorb it doesn't force you to use a config.yml or so
<FromGitter> <sdogruyol> however you can do that easily
rohitpaulk has joined #crystal-lang
<FromGitter> <ansarizafar> How can we change value in named tuple user = {count: Int32, name: String}
<FromGitter> <ansarizafar> user[:count] = 2 not working
<Papierkorb> You can't. Use Hash.
<Papierkorb> Looks like the tuple docs need a stern wording
<FromGitter> <ansarizafar> If I use user = {data: [] of {id: Int32, name: Sting}} and then user[:data] << value it works
<Papierkorb> ..So?
<Papierkorb> That's expected
<FromGitter> <ansarizafar> It seems it works for array but not for individual values
<Papierkorb> You're not changing the array value. You're changing its content.
<Papierkorb> NamedTuple are *structures*, not dynamic containers like Hash.
snsei has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
snsei has quit [Ping timeout: 240 seconds]
<FromGitter> <uSide> I think people (who came from ruby) confused with hash syntax. Like in ruby they can cast hash by x = {s: 2, w: 3}, but in crystal this code will produce NamedTuple instead of Hash
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] luislavena opened pull request #5013: Support LLVM 4.0 postfixed versions (master...support-llvm-config-4.0) https://git.io/v5jTl
<FromGitter> <georgeu2000> Is there an ORM for Mongo? I didn't see it on https://github.com/veelenga/awesome-crystal
alex`` has quit [Ping timeout: 246 seconds]
<FromGitter> <uSide> its not an ODM, but still useful
<FromGitter> <georgeu2000> Cool, ODM could use it.
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <ziprandom> hey anybody around still?
<Papierkorb> to some extent
<FromGitter> <ziprandom> nice :)
<FromGitter> <ziprandom> I try to use a C function
<FromGitter> <ziprandom> that writes to a buffer (which is a struct that it defines)
<FromGitter> <ziprandom> when I pass in the buffer like this:
<FromGitter> <ziprandom> `c_func out buf` I get an error from the library: `cannot grow a borrowed buffer`
<FromGitter> <ziprandom> I'm afraid this is not an easy one ...
<Papierkorb> that's a library specific error. Though most likely, you have to initialize said structure first (probably through a library function)
<FromGitter> <ziprandom> I already looked for an initializer, to no luck. this is the function I'm trying to call: https://github.com/mosop/git/blob/master/src/lib/c/auto_generated.cr#L862
<Papierkorb> Look up the original C docs of the library. There's probably more on that to found there, instead of wading through funs and struct definitions alone
<FromGitter> <ziprandom> https://libgit2.github.com/libgit2/#HEAD/type/git_buf I don't find anything
<FromGitter> <ziprandom> It says that libgit can only grow the buffer if it created it by itself ...
greengriminal has quit [Quit: This computer has gone to sleep]
<FromGitter> <ziprandom> Oh I got it working
<FromGitter> <ziprandom> by allocating
<FromGitter> <ziprandom> ` ⏎ buf = C::Buf.allocate ⏎ c_func pointerof(buf) ⏎ ` [https://gitter.im/crystal-lang/crystal?at=59c2eba7bac826f054e09538]
<FromGitter> <uSide> Guys, I have some strange code for you 😄 ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ `Test.new(x: "s")` works fine, but compiler goes down when some other type in NamedTuple (`Test.new(x: "s")`). Can I specify what type I need to take from #fetch ? ... [https://gitter.im/crystal-lang/crystal?at=59c2ed821081499f1f561aee]
<FromGitter> <uSide> ```x = {s: "w"} ⏎ p typeof(x) ⏎ p x.has_key?(:s) ⏎ p x[:w] if x.has_key?(:w)``` ⏎ ⏎ fails with Error in line 4: missing key 'w' for named tuple NamedTuple(s: String) [https://gitter.im/crystal-lang/crystal?at=59c2ef70614889d475210bbc]
<FromGitter> <uSide> but why? I try to use it only when key exists (has_key?)
greengriminal has joined #crystal-lang
<FromGitter> <ziprandom> the compiler knows at compile time that x doesn't have the key so it throws an error if you try to access it. here it is not smart enough to know, that the if condition will fail anyway
<FromGitter> <ziprandom> this works: ⏎ ⏎ ```a = {x: 1} ⏎ p a[:y] if a.is_a?({y: Int32})``` [https://gitter.im/crystal-lang/crystal?at=59c2f329210ac2692055e8ba]
<FromGitter> <ziprandom> `#has_key?` is smth. you usually use on a hash where you don't know at compile time which keys exist ...