<FromGitter>
<fridgerator> Is it just me, or is the crystal channel becoming busier?
<FromGitter>
<Sija> Had the same feeling @fridgerator
<FromGitter>
<Sija> @j8r IMHO inheritance works best if u need hierarchy, like `Number` from stdlib, composition OTOH is especially useful in cases where u need to “wrap” another class with added / changed functionality, like for example simple in-memory cache store which could wrap `Hash` for keeping internal data, just my 2c
Groogy1 has quit [Ping timeout: 246 seconds]
baweaver is now known as baweaver_away
moei has joined #crystal-lang
<FromGitter>
<watzon> Hey guys, it's been a bit
rohitpaulk has joined #crystal-lang
baweaver_away is now known as baweaver
<FromGitter>
<kolyaio> Currently reading the Crystal by program it’s nice 🙂
<FromGitter>
<dscottboggs_gitlab> hooray I got it right haha
<FromGitter>
<fenicks> I have an issue when compiling my program with OpenSSL on CentOS 7: ⏎ [dynamic]: `error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory` ⏎ [static]: `SSL_connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed` ⏎ ⏎ Thanks for your help [https://gitter.im/crystal-lang/crystal?at=5bb07026271506518d94dd9d]
<FromGitter>
<fenicks> I see a difference for OpenSSL version between my desktop and the server: ⏎ [Ubuntu 18.04 desktop]: `OpenSSL 1.1.0g 2 Nov 2017` ⏎ [CentOS 7 server]: `OpenSSL 1.0.2k-fips 26 Jan 2017` ⏎ ⏎ Probably a custom installation to upgrade the CentOS7 to version 1.1.0 could works ? Or I will try to run inside a ubuntu 18.04 docker container. [https://gitter.im/crystal-lang/crystal?at=5bb077095af48530683b33ff]
JuanMiguel has quit [Quit: This computer has gone to sleep]
<FromGitter>
<fusillicode_twitter> I'm also encountering an error with libssl but I think that they're totally unrelated 😞
<FromGitter>
<sam0x17> is there a way to define a destructor in crystal? I'm wrapping a C binding and this class needs to execute some particular code when it gets de-allocated / garbage collected
<FromGitter>
<codenoid> my type : `{} of String => Int32 | Int64`
<FromGitter>
<codenoid> `temp_res.to_a.sort_by { |key, value| value }.to_h.to_json`
<FromGitter>
<girng> hello @watzon welcome back
<FromGitter>
<fusillicode_twitter> @proyb6 thanks a lot 🙇. Btw I didn't investigate my issue because I was already using docker for building and running but let me try it :)
<FromGitter>
<proyb6> No problem:)
<FromGitter>
<fusillicode_twitter> @proyb6 ok JFYI it worked like a charm ;) ⏎ Anyway I'm still surprised by how fast the compiler runs...I'm really working by coding and running `docker build . -t my-app && docker run myapp`
<FromGitter>
<kingsleyh> But doesn’t seem to allow that
<FromGitter>
<dscottboggs_gitlab> oh weird
<FromGitter>
<kingsleyh> Just a short piece of work
<FromGitter>
<kingsleyh> Maybe only they post the official jobs
ashirase has quit [Ping timeout: 260 seconds]
ashirase has joined #crystal-lang
<FromGitter>
<vladfaust> Wow, there is someone with a job, nice! I’m the maintainer of CrystalJobs, and currently there is no functionality of jobs themselves 😅 I’m working on it and it’s going to be released this week I guess
<FromGitter>
<vladfaust> For now you could ask someone in the chat, I’m sure you’ll find someone, Kingsley
* FromGitter
* dscottboggs_gitlab begs
Tortice has joined #crystal-lang
<FromGitter>
<kingsleyh> Hey @vladfaust great - I filled out my profile and hit Save but when I go back my profile is empty
<FromGitter>
<kingsleyh> Also my piece of work isn’t a proper full time job it’s more of a small piece of work
<FromGitter>
<kingsleyh> That I would usually advertise on a freelancer site
<FromGitter>
<vladfaust> Yep, profiles are moderated manually at the moment, will add you soon
<FromGitter>
<kingsleyh> Anyway if anyone wants to get paid a small amount of money to code some Crystal - please let me know
<FromGitter>
<vladfaust> I’m available for $50/hour, if that’s ok, drop me an email
<FromGitter>
<bajro17> hi if someone know how to generate in amber api with new and edit
<FromGitter>
<bajro17> when I generate normal it generate me without new and edit
<FromGitter>
<crystallangjobs> Hello Crystal devs, I have created a job board with less barrier to post your profile in one place! Let me know if anyone interested or if you prefer Vlad Faust's site. ⏎ https://github.com/crystallangjobs/crystallangjobs/
JuanMiguel has joined #crystal-lang
<FromGitter>
<bajro17> @crystallangjobs you can do different to people can post there jobs if they search for crystal programmers
<FromGitter>
<bajro17> @vladfaust just display programmers
<FromGitter>
<bajro17> but anyway we need as much more is possible projects with crystal to be in production
<FromGitter>
<bajro17> to people see how awesome is crystal lang
<FromGitter>
<Sija> @sam0x17 `def finalize`
<FromGitter>
<sanderhahn> Hello all, playing a round with Crystal a bit and trying to use an abstract class but it gives me `abstract 'def Request(Params)#call(params : Params)' must be implemented by AddRequest`
<FromGitter>
<sanderhahn> What am i doing wrong here?
JuanMiguel has quit [Quit: This computer has gone to sleep]
Heaven31415 has joined #crystal-lang
<Heaven31415>
Hi
<Heaven31415>
Is it possible to have a macro and a method defined with the same name in the same scope?
<FromGitter>
<crystallangjobs> @bajro17 No problem, I have updated the Readme for organizations/startups to seek Crystal Devs. Great thanks for the suggestion!
<FromGitter>
<bajro17> @crystallangjobs You most welcome :)
<FromGitter>
<bajro17> @crystallangjobs just it will be better if you make site instead use only repo
<FromGitter>
<bajro17> probably also will be good to use crystal to make site :)
<FromGitter>
<ohenepee> I hit a bug doing something "probably" non-idiomatic
JuanMiguel has joined #crystal-lang
<JuanMiguel>
is someone using Kemal with WebSockets? Have you found any problem with client disconnecting and causing exceptions on the server?
ua has quit [Remote host closed the connection]
ua has joined #crystal-lang
Tortice has quit [Read error: Connection reset by peer]
<FromGitter>
<vladfaust> Excuse me, can I safely check if a variable is initialized? ⏎ ⏎ ```x = uninitialized Int32 ⏎ # Some code ⏎ if x # May cause a memory leak``` ⏎ ⏎ I'd like to avoid additional `initialized_vars` list if possible [https://gitter.im/crystal-lang/crystal?at=5bb0def3ef4afc4f28fa273f]
<FromGitter>
<vladfaust> Some kind of `initialized?(x)`
<FromGitter>
<vladfaust> Okay, ended up with `initialized = {} of String => Bool`
<FromGitter>
<Prutheus> Hello. What does it mean when I declare the type of my variable to be a class but with the `?` symbol behind the name of the class? what stands the `?` for? e.g. here: ⏎ ⏎ ```class Test ⏎ # ... ⏎ end ⏎ ⏎ a : Test?``` [https://gitter.im/crystal-lang/crystal?at=5bb0e2e4600c5f642331e35e]
<FromGitter>
<Prutheus> Now an other question: I am using Hedron (LibUI interface) for a gui task. Here is my script: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Why? I do not understand how Procs works ... :/ [https://gitter.im/crystal-lang/crystal?at=5bb0ee44600c5f64233221f5]
<FromGitter>
<Blacksmoke16> need to tell it what tz that time is from, since it cant parse it from the string
JuanMiguel has quit [Quit: This computer has gone to sleep]
<FromGitter>
<Prutheus> Can anybody answer my question?
<FromGitter>
<j8r> `Proc(Hedron::Button, Nil)` not `Proc(Hedron::Button, (Process | Nil))`
<FromGitter>
<j8r> make sure to always use `Nil`, not enventually `Process`
<FromGitter>
<Prutheus> But why is it Process there? When I comment my run_bot and stop_bot lines, it is ok, but when the proc functions calls these lines, then the type is wrong
<FromGitter>
<Prutheus> I dont use Process directly, just call functions which use them ... I dont know why Process appears in Proc call
rohitpaulk has joined #crystal-lang
<FromGitter>
<j8r> You do Process.new
<FromGitter>
<bajro17> I need help with json to postgres save
<FromGitter>
<girng> what happens to `123123`, after its left the scope of the `method`, does it get free'd by the GC at a later time or?
<FromGitter>
<girng> for example, https://play.crystal-lang.org/#/r/54n9 in C++ i could write a `void` function and change the value of name if i passed by reference
<FromGitter>
<girng> but it seems here, it's passed by value, right? so is that code i just linked essentially a tiny, tiny memory leak?
<FromGitter>
<Sija> nope, it’s passed by copy
<FromGitter>
<Sija> to change the value you’d need to use `pointerof(test)`
<FromGitter>
<Sija> and from C++ side take it as `int*` argument (or `void*` and cast it manually)
<FromGitter>
<girng> interesting so crystal lets use use pointers if we wanted?
JuanMiguel has joined #crystal-lang
<FromGitter>
<Sija> sure
<FromGitter>
<bew> @Prutheus I'd suggest to change the return type of `button_clicked`to Nil, instead of changing `run_bot`'s return type
<FromGitter>
<bew> Because, if you change the implementation of `button_clicked`, you may get another error like this.. If you force it to return nil, you can change the implementation, and it'll still always return nil
<FromGitter>
<Sija> 👍
return0xe has joined #crystal-lang
<FromGitter>
<Sija> has any1 here upgraded to macOS Mojave? if so, I’m curious is there a noticeable perf difference in comparison to older versions? (I’m on 10.11 atm so it’d be a 3 version jump - having 2013 MBA with 8gb of RAM, so not that much for today’s standards…) thanks!
return0e has quit [Ping timeout: 245 seconds]
return0xe has quit [Remote host closed the connection]
return0e has joined #crystal-lang
ua_ has joined #crystal-lang
ua has quit [Ping timeout: 252 seconds]
Tortice has quit [Remote host closed the connection]
baweaver_away is now known as baweaver
JuanMiguel has quit [Quit: Saliendo]
<FromGitter>
<girng> @Sija that's very cool. gonna read the gitbook page on that some more
<FromGitter>
<girng> my `distance_between(a, b)` is going to be run in a 15hz game loop. so i'm not sure if i should be copying values to the method every tick. a and b will be coming from my players x and y position in the game world
<FromGitter>
<girng> would this be a good use case to use the pointerof, and check it by reference instead?
<FromGitter>
<bajro17> @rishavs do you plan to make more post on this series about cove?
DTZUZO has joined #crystal-lang
DTZUZO has quit [Ping timeout: 245 seconds]
druonysus has quit [Read error: Connection reset by peer]
DTZUZO has joined #crystal-lang
<FromGitter>
<codenoid> something in kemal make my application slow :/ ⏎ sometimes the request not loaded ⏎ sometimes need to trigger 1 request with the next request ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/crystal-lang/crystal?at=5bb1420f5af48530683f9f62]
<FromGitter>
<dscottboggs_gitlab> is there any way to view the full source that a macro generates?
<FromGitter>
<codenoid> fixed with route caching
<FromGitter>
<dscottboggs_gitlab> I found it, `crystal tool expand`
<FromGitter>
<dscottboggs_gitlab> @girng here's my implementation - a simple refactoring of your own. It really helps to get into the object-oriented mindset when writing crystal