ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.2 | 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
hightower2 has quit [Ping timeout: 240 seconds]
heaven31415_ has quit [Ping timeout: 240 seconds]
mooe has quit [Quit: Connection closed for inactivity]
<crystal-gh> [crystal] jirutka opened pull request #5861: WIP: Add support for target aarch64-linux-musl (master...aarch64-linux-musl) https://git.io/vxRcv
<RX14> back working on windows :)
<RX14> I shouldn't be awake at 2am
<FromGitter> <unn4m3d> I tried to port sockets to windows some time ago and found out that there's no way to check if socket is blocking or not
<FromGitter> <codenoid> morning
That_Guy_Anon1 has joined #crystal-lang
That_Guy_Anon has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> RX14 great work on File
That_Guy_Anon has joined #crystal-lang
That_Guy_Anon1 has quit [Ping timeout: 240 seconds]
Majost has quit [Quit: Updating details, brb]
Majost has joined #crystal-lang
alex`` has joined #crystal-lang
yaewa has joined #crystal-lang
moei has quit [Ping timeout: 240 seconds]
moei has joined #crystal-lang
yaewa has quit [Ping timeout: 276 seconds]
That_Guy_Anon has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
ashirase has quit [Ping timeout: 240 seconds]
ashirase has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <faustinoaq> > Crystals are often used in pseudoscientific practices such as crystal therapy, and, along with gemstones, are sometimes associated with spellwork in Wiccan beliefs and related religious movements ⏎ ⏎ Oh, that's the reason why I found so a lot of crystal health related videos in yt XD ⏎ ⏎ ^ https://en.wikipedia.org/wiki/Crystal [https://gitter.im/crystal-lang/crystal?at=5ab75d232b9dfdbc3a1cf4a2]
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Quit: Bye]
FromGitter has joined #crystal-lang
oprypin has joined #crystal-lang
oprypin_ has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
oprypin has quit [Client Quit]
FromGitter has joined #crystal-lang
<lvmbdv> is there a way to enforce a class' children to define a class method
oprypin has joined #crystal-lang
<lvmbdv> because i cannot mark class methods as abstract ;~~~~~;
<Yxhvd> sounds like you are trying to solve the wrong problem. Crystal is very similar to ruby in stuff like that and I've never wanted to have inherited but specialized classmethods like that.
<lvmbdv> probably
<lvmbdv> i am probably using them wrong when languages dont have a feature
<lvmbdv> happened with C++ and reflection
<FromGitter> <unn4m3d> maybe `raise` in a `inherited` macro ? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ab7638ce4ff28713a6f72a0]
<Yxhvd> What would be the task the class methods would solve?
<lvmbdv> deserialization
<lvmbdv> i.e. self.from_io
<lvmbdv> thank you Yxhvd that's a nice hack
<Yxhvd> dont' blame me :P
<lvmbdv> i am not, it can't be helped since what i am asking is not OOP friendly
<Yxhvd> what I meant was, it was not my hack :P
<lvmbdv> oh :P
<Yxhvd> but it may be worth looking into JSON.mapping to see similar problems being solved in a more declarative manner
heaven31415 has joined #crystal-lang
hightower2 has joined #crystal-lang
oprypin_ has quit [Ping timeout: 276 seconds]
hightower2 has quit [Ping timeout: 276 seconds]
heaven31415 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
That_Guy_Anon has joined #crystal-lang
<Groogy> @faustinoaq we also get people from time to time post in the reddit as well :P
Ven`` has joined #crystal-lang
Papierkorb has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Papierkorb has left #crystal-lang ["Konversation terminated!"]
rohitpaulk has quit [Ping timeout: 256 seconds]
That_Guy_Anon has quit [Remote host closed the connection]
That_Guy_Anon has joined #crystal-lang
Ven`` has quit [Read error: Connection reset by peer]
Ven`` has joined #crystal-lang
nima has joined #crystal-lang
<nima> helloo! i come from the land of c++ and rust, i found crystal quite interesting. for what kind field of applications would you use crystal?
<Groogy> making languages ;D
<Groogy> /s
return0e has quit [Ping timeout: 256 seconds]
return0e has joined #crystal-lang
<RX14> nima, a lot of people use it for web stuff but it's well suited for a lot of things
<Yxhvd> nima: I'd use it for a vast amount of stuff. About the single thing where I wouldn't want it is areas where low level control over memory is necessary.
<RX14> the crystal compiler is written in crystal
<RX14> daemons, commandline tools, etc
<RX14> someone made a kernel in crystal and it worked but I wouldn't recommend it lol
<FromGitter> <unn4m3d> I'm trying to write some gamedev thing 😅
<Yxhvd> or for places where you need the rust borrow checker to be confortable
<RX14> you can get the same safety as the borrow checker in crystal
<RX14> it's just called gc
<RX14> and it has an overhead
<Yxhvd> I was thinking more about the interactions with threaded code
<RX14> ok fair enough
<Yxhvd> where GC doesn't help you
<RX14> yeah i remembered that just after i said it lol
<Yxhvd> or well it helps as keeping track of allocations is a hassle in multi threaded environments, but the ownership control is a great feature there
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duper has joined #crystal-lang
<nima> i sadly just read crystal does not support windows yet, sadly stuck on windows, haha. would have to fire up a vm
<FromGitter> <unn4m3d> nima : crystal works fine in WSL
<nima> for web stuff? as in backend? RX14
<RX14> Yes that's what most people use it for
<Yxhvd> yes, backend and template generation.
<RX14> But I don't use it for that much
<RX14> I think that's boring
<RX14> :)
<nima> i do not use win10 and will never : )
<RX14> for example @bararchy is using it for cybersecurity/fuzzing using neural networks
<RX14> it's pretty generic
<RX14> actually i'd go as far to say it can be used for anything java is used for
<RX14> but actually more since it's easier to deploy and uses less ram
<RX14> and has faster startup times
<FromGitter> <unn4m3d> nima : install gentoo :)
<RX14> nima, i'm working on windows stuff right now
<RX14> so hopefully it wont be too long until windows can be released
<FromGitter> <bararchy> nima: There are people using Crystal for anything between cyber security, genetic analysis (diploid) or game engine developemtn, we also use it for machine learning like RX14 has said, and there are multiple interesting projects under awsome-crystal repo
<nima> oh, you have nothing alike to crates.io from rust? i read about shards but there is nothing browsable to find deps?
<FromGitter> <unn4m3d> crystalshards.xyz
<nima> thanks : )
<RX14> nima, we don't have a central registry because shards are decentralised
<RX14> so we have to have search tools which scrape github instead of just a central registry site
<RX14> I think its better not to have a central registry though, less name conflicts, less expensive to host
<RX14> nothing to ddos
<RX14> etc...
<RX14> well you can ddos github but good fucking luck
<FromGitter> <faustinoaq> > helloo! i come from the land of c++ and rust, i found crystal quite interesting. for what kind field of applications would you use crystal? ⏎ >> making languages ;⁠D ⏎ ⏎ It's funny because it's true XD [https://gitter.im/crystal-lang/crystal?at=5ab78be635dd17022e9a6a3c]
<FromGitter> <unn4m3d> 😅
<Yxhvd> I expect a registry or dicovery service is inevitable at some point, but so far crystalshards seem good enough
<FromGitter> <faustinoaq> > It's funny because it's true XD ⏎ ⏎ ...and there is one more WIP called Mint: https://www.mint-lang.com/
<FromGitter> <faustinoaq> Yxhvd, yeah https://crystalshards.xyz is pretty good, it's maintained by @f, he has been paying the domain and hosting from almost 2 years, he is a kemal (http://kemalcr.com) user and friend of @sdogruyol , a very nice developer 😄
<FromGitter> <faustinoaq> Another great tool is https://shards.rocks/
DTZUZO_ has joined #crystal-lang
<FromGitter> <faustinoaq> Amber team have been using shards rocks on latest months, and is very useful to keep dependencies up to date ⏎ ⏎ ^ https://shards.rocks/github/amberframework/amber
<FromGitter> <unn4m3d> 👀 didnt know about shards.rocks, thanks
DTZUZO has quit [Ping timeout: 240 seconds]
<FromGitter> <faustinoaq> Yeah, BTW, Surprisingly shards rocks is written in crystal 0.10.2 (https://github.com/shardsrocks/sharock-server/blob/master/.crystal-version), and the compiled binary was deployed almost 2 years ago, and is still running without any issue 😎
<FromGitter> <faustinoaq> ^ using Kemal 0.7.0 ⏎ ^ @sdogruyol 🎉
<FromGitter> <bararchy> how do I get shards to install a private repo from github using ssh keys? (as in git@ not https)
<FromGitter> <faustinoaq> Very nice how a binary can run so long without dependency issues, because once compiled is all ready 👍 ⏎ ⏎ So, no broken/outdated gems, packages, modules, etc
<FromGitter> <bararchy> @faustinoaq also no security updates and bug fixes via 3rd party libs it uses ;)
<FromGitter> <faustinoaq> Oh, yeah! 👏 ✨
return0e has quit [Ping timeout: 240 seconds]
<FromGitter> <faustinoaq> always, you can link new dynamic libraries, using `ln -s /usr/lib/mylib-updated.so /usr/lib/mylib-required.so` 😉
<FromGitter> <bararchy> it wont use it while running
<FromGitter> <bararchy> you will have to restart
<FromGitter> <bararchy> :)
<FromGitter> <faustinoaq> Well, you can use reuse-port, run multiple instances and restart them progressively 😃
<FromGitter> <faustinoaq> Or just use more docker 😉
return0e has joined #crystal-lang
nima has quit [Ping timeout: 260 seconds]
oprypin_ has joined #crystal-lang
<Groogy> fucking finally managed to get my math work and is correctly unprojecting a ray from a mouse click on screen *sigh*
<Groogy> I hate math
<FromGitter> <bararchy> aint we all ?
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> Groogy usually when @ArtLinkov is talking about ML math i'm getting sleepy in a sec or two XD\
<Groogy> ML as in Matlab?
<Groogy> anywy my ray is acting as I want at least, just need to figure out why the ray is so extremly strong in the Z direction
<Yxhvd> I'd guess machine learning
<FromGitter> <bararchy> Groogy ML as in Machine learning :)
<Groogy> ah
rohitpaulk has quit [Remote host closed the connection]
<FromGitter> <faustinoaq> @ysbaddaden Do you have some mini guide to use https://github.com/ysbaddaden/android.cr ? I have seen the examples but I don't know how to setup all things 😅
<Groogy> I'm almost moved to tears ;_;
<Groogy> one number was too small in the projection matrix (the z-near) so it threw off al lthe math
<crystal-gh> [crystal] jirutka opened pull request #5862: WIP: Add support for arm-linux-musleabihf (master...arm-linux-musleabihf) https://git.io/vxRDg
<FromGitter> <codenoid> hi
<FromGitter> <codenoid> how i can kill parent process from forked process
<FromGitter> <picatz> @codenoid `#ppid` should show parent process for the child? Then I guess you could `#kill` that process id.
<FromGitter> <picatz> https://crystal-lang.org/api/0.24.1/Process.html#ppid%3ALibC%3A%3APidT-class-method
<FromGitter> <picatz> Maybe I don't know what I'm talking about though. 😅
oprypin_ has quit [Ping timeout: 260 seconds]
oprypin_ has joined #crystal-lang
<FromGitter> <codenoid> yeah
<FromGitter> <codenoid> but it will break my logic
<FromGitter> <codenoid> to check is pid still exist
<FromGitter> <codenoid> ah idk
heaven31415 has joined #crystal-lang
Yxhvd is now known as yxhuvud
<FromGitter> <r00ster91> Uhm why is the escape sequence `\a` not supported in Crystal ? In Ruby for example it plays a little beep when you print the `\a` escape sequence. And it's also supported in C. https://en.wikipedia.org/wiki/Escape_sequences_in_C ⏎ ⏎ Could I maybe write some binding from C to Crystal?
<FromGitter> <r00ster91> Because sometimes this can be helpful in terminal programs.
<heaven31415> yeah, you can implement music in your first console game
<heaven31415> but more seriously, I know a piece of software which is using this when you open a server application and it's ready to be used
<FromGitter> <picatz> I've used beeps before for applications intended users that have wanted distinct audio feedback on different steps in a long, automated operation.
<FromGitter> <r00ster91> Oh! I got it! With `puts "\x07"` it works! `07` is the HEX value in ASCII of `\a`. But I still think that Crystal should support `\a` directly.
heaven31415 has quit [Ping timeout: 256 seconds]
<FromGitter> <picatz> Good to know!
rohitpaulk has joined #crystal-lang
<FromGitter> <faustinoaq> ^ haha
<FromGitter> <fridgerator> I know that guy
<FromGitter> <bararchy> It's really annoying when people say "why use crystal ? We will never find devs", and I'm like " take every Ruby/C++ dev and he can pick it up in 2 days"
<oprypin_> yeah i never considered that, it's actually one of the bigger strengths
oprypin_ has quit [Quit: Bye]
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
oprypin has quit [Client Quit]
oprypin has joined #crystal-lang
<crystal-gh> [crystal] r00ster91 opened pull request #5864: Add \a escape sequence (master...patch-8) https://git.io/vxRbf
<FromGitter> <r00ster91> oprypin_ why a downvote on the pull request for the \a escape sequence
<oprypin> wrote a comment now
azur_kind has joined #crystal-lang
<FromGitter> <r00ster91> hmm ok
heaven31415 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
<yxhuvud> hmm. crystal tool expand -c src/projname/file.cr:row:line src/projname.cr fails to expand a property macro for me. putting file.cr in the last argument fails as it is projname.cr that does all requires. Is it possible to expand macros in projects without requiring everything in every file?
rohitpaulk has quit [Ping timeout: 264 seconds]
<yxhuvud> Oh, it worked if both were added as program files. Taht was not very obvious.
<FromGitter> <bew> Yeah, the location is where you want to expand, the other one is the "main" file that requires everything
<yxhuvud> and the documentation doesn't even mention it is possible to supply multiple program files. Why does it requrie the expanded file both in -c and as a program file? that seem pretty redundant.
<FromGitter> <bew> Because as you just experienced, the file where you want to expand is not necessarily the one you use to compile your program
<yxhuvud> What I am saying is that I have to do `crystal tool expand -c src/cabbage/derivation.cr:4:5 src/cabbage/derivation.cr src/cabbage.cr`. The middle reference to derivation is redundant as it is already present in the cursor.
<FromGitter> <bew> I think you should be able to do `crystal tool expand -c src/cabbage/derivation.cr:4:5 src/cabbage.cr`
<yxhuvud> then I get "no expansion found"
<FromGitter> <bew> Ah that's weird then
<yxhuvud> also the order matters, cabbage.cr must be last.
<FromGitter> <bew> It was just idea on the usage, I never had to use it like this for now
DTZUZO_ has quit [Read error: Connection reset by peer]
heaven31415 has quit [Ping timeout: 263 seconds]
azur_kind has quit [Remote host closed the connection]
heaven31415 has joined #crystal-lang
hightower has joined #crystal-lang
alex`` has quit [Ping timeout: 246 seconds]
t0nyandre is now known as t0nyaway
sz0 has joined #crystal-lang
DTZUZO has joined #crystal-lang
heaven31415_ has joined #crystal-lang
heaven31415 has quit [Ping timeout: 240 seconds]
hightower2 has joined #crystal-lang
hightower has quit [Ping timeout: 256 seconds]
heaven31415_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<crystal-gh> [crystal] jirutka opened pull request #5866: Fix codegen/asm and codegen/sizeof specs (master...fix-codegen-specs) https://git.io/vx0It
lune has joined #crystal-lang
pracabor has joined #crystal-lang
z64 has quit [Ping timeout: 276 seconds]
robacarp has quit [Ping timeout: 276 seconds]