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
unn4m3d10 has quit [Ping timeout: 260 seconds]
unn4m3d10 has joined #crystal-lang
unn4m3d has quit [Ping timeout: 240 seconds]
unn4m3d has joined #crystal-lang
unn4m3d10 has quit [Ping timeout: 248 seconds]
unn4m3d has quit [Ping timeout: 248 seconds]
lvmbdv has quit [Ping timeout: 245 seconds]
heaven31415 has quit [Ping timeout: 268 seconds]
unn4m3d has joined #crystal-lang
qard has joined #crystal-lang
heaven31415 has joined #crystal-lang
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
straight-shoota has quit [Remote host closed the connection]
straight-shoota has joined #crystal-lang
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
unn4m3d10 has joined #crystal-lang
unn4m3d has quit [Ping timeout: 264 seconds]
<FromGitter> <TheRealCodeTrooper> So I am trying to install Crystal... but when I type `curl https://dist.crystal-lang.org/apt/setup.sh | sudo bash`, it tells me that curl is not installed. Do I just go ahead and install it? What is it? Also, I am done with Windows. Got corrupted too many times for me. Anyways, I went de wey of de linux. 😎
<duper> How do I craft DNS requests in crystal?
<FromGitter> <bew> yes you should install curl first @TheRealCodeTrooper
<FromGitter> <bew> it is a common tool to fetch a webpage
<FromGitter> <bew> what linux distribution are you using @TheRealCodeTrooper ?
<FromGitter> <TheRealCodeTrooper> Just curious what is the difference between using `apt-get install` and just `apt install` to install stuff?
<FromGitter> <TheRealCodeTrooper> Ubuntu @bew . I am a noobie.
<FromGitter> <bew> `apt-get` is the legacy way, `apt` is the new way iirc (people got tired to type `-get` ^^)
<FromGitter> <bew> actually I don't know, I only know that `apt` is newer
<FromGitter> <bew> so basically `apt` is a kind of wrapper around other tools like `apt-get`, `apt-cache`, etc... You as a normal user should use `apt`
<heaven31415> cool, im a ubuntu newbie too
<heaven31415> but i really love it after swtiching from windows
<heaven31415> even with all it problems
<heaven31415> like a child, which you love even if it stupid and sick XD
<heaven31415> if it is*
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
<FromGitter> <TheRealCodeTrooper> Yay I installed Crystal and did Hello World!
yxhuvud has joined #crystal-lang
<FromGitter> <bew> 🎉 welcome to the party 🙏
<FromGitter> <TheRealCodeTrooper> Yeah I switched from Windows yesterday @heaven31415. Though I do have a little experience from using it as a escape hatch in the past when Windows failed.
<FromGitter> <TheRealCodeTrooper> ./File is cool too for stuff like C++ ⏎ Okay back to Crystal... is there anything that documents the language? I will be looking right now too.
<FromGitter> <TheRealCodeTrooper> Oh, I think I found it. Cool!
<heaven31415> there is a book and there is API docs
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] bew opened pull request #5883: Allow a path to declare a constant (master...allow-path-to-declare-constant) https://git.io/vxVqB
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
That_Guy_Anon1 has joined #crystal-lang
That_Guy_Anon has quit [Ping timeout: 240 seconds]
heaven31415 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<crystal-gh> [crystal] bew opened pull request #5884: Fix typo (master...at_exit-typo) https://git.io/vxVmn
qard has joined #crystal-lang
unn4m3d has joined #crystal-lang
unn4m3d10 has quit [Read error: Connection reset by peer]
unn4m3d10 has joined #crystal-lang
unn4m3d11 has joined #crystal-lang
unn4m3d10 has quit [Read error: Connection reset by peer]
unn4m3d10 has joined #crystal-lang
unn4m3d11 has quit [Read error: Connection reset by peer]
unn4m3d has quit [Ping timeout: 264 seconds]
unn4m3d has joined #crystal-lang
That_Guy_Anon1 has quit [Quit: Leaving]
unn4m3d10 has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] Willamin opened pull request #5885: Update docs for Enum (master...patch-1) https://git.io/vxVmN
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
yxhuvud has quit [Client Quit]
yxhuvud has joined #crystal-lang
shelvacu has quit [Ping timeout: 248 seconds]
wmoxam has quit [Ping timeout: 248 seconds]
wmoxam has joined #crystal-lang
shelvacu has joined #crystal-lang
That_Guy_Anon has joined #crystal-lang
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
duane has quit [Ping timeout: 264 seconds]
duane has joined #crystal-lang
unn4m3d10 has joined #crystal-lang
unn4m3d has quit [Read error: Connection reset by peer]
straight-shoota has quit [Read error: Connection reset by peer]
straight-shoota has joined #crystal-lang
<FromGitter> <faustinoaq> https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation ⏎ ⏎ ^ Very impressive how Visual Studio Code Team have pushed JavaScript to the Limits, even faster than C++ in some cases, because better algorithms and data structures. ⏎ ⏎ Not always compiled is faster than interpreted, sometimes it depends on other things ... [https://gitter.im/c
<FromGitter> ... rystal-lang/crystal?at=5abc70755f188ccc150a67b0]
straight-shoota has quit [Read error: Connection reset by peer]
<FromGitter> <bew> very interesting, thanks!!
straight-shoota has joined #crystal-lang
unn4m3d has joined #crystal-lang
unn4m3d10 has quit [Ping timeout: 264 seconds]
<FromGitter> <bew> .... and then you rewrite vscode in Crystal, so you have beautiful & fast code at the same time :P
<FromGitter> <faustinoaq> ....with a very low memory footprint 😜
unn4m3d has quit [Ping timeout: 248 seconds]
unn4m3d has joined #crystal-lang
<FromGitter> <faustinoaq> Nah, VSCode is pretty nice in TypeScript, at least we can compile crystal to JS (https://github.com/crystal-lang/crystal/issues/4778#issuecomment-320440976) as well 👀
return0e has joined #crystal-lang
unn4m3d has quit [Read error: Connection reset by peer]
unn4m3d10 has joined #crystal-lang
return0e has quit [Ping timeout: 246 seconds]
unn4m3d has joined #crystal-lang
unn4m3d10 has quit [Read error: Connection reset by peer]
unn4m3d has quit [Ping timeout: 248 seconds]
unn4m3d has joined #crystal-lang
<FromGitter> <bararchy> Wow ⏎ ⏎ https://github.com/geppetto-apps/crow
<FromGitter> <bararchy> Sad to see this didn't continue, its pretty cool, also, the other way around could be much more helpful
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <bararchy> I think right now there is also a way to transpile to C++ via papierkorb lib
unn4m3d has quit [Ping timeout: 240 seconds]
unn4m3d has joined #crystal-lang
That_Guy_Anon has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> Right, that's the one
<FromGitter> <bew> bindgen doesn't compile cr to cpp
unn4m3d has quit [Remote host closed the connection]
<FromGitter> <bararchy> No? It has c/c++ <> crystal
<FromGitter> <bararchy> Thibgy
unn4m3d has joined #crystal-lang
<FromGitter> <bew> it generate C wrapper and corresponding Crystal bindings, for a C++ library
<FromGitter> <bararchy> Oh
<FromGitter> <bararchy> So I guess only the cppiz
<FromGitter> <bararchy> As we near the end of Q1 2018 is this a good time to get some updated from Manas ? Something along the lines of next AMA or some info regarding devs working on Crystal etc..
<FromGitter> <bararchy> @mgarciaisaia ? :)
<livcd> paralellism incomign ? :O
<FromGitter> <bararchy> Windows support will be here before as its been actively worked on by RX14, in opposed to paralellism , where no one is actually working on XD
<FromGitter> <bararchy> @waj worked on parallelism, then
<FromGitter> <bararchy> @bcardiff
<FromGitter> <bararchy> And now.... No one AFAIK
<FromGitter> <bararchy> RX14 BTW, if you open a bounty source program for your windows contribution I'll start throwing $ on that angle as well :)
<livcd> good idea imho
<FromGitter> <bararchy> Yeha, maybe we can create a specific bounty for each relevant project
<FromGitter> <bararchy> Windows, threading , etc..
<FromGitter> <bararchy> TBH I'll just go with merge the thread branch, and let optimizations come when they come
benharri has quit [Quit: The Lounge - https://thelounge.github.io]
elia has joined #crystal-lang
benharri has joined #crystal-lang
straight-shoota has quit [Ping timeout: 248 seconds]
return0e has joined #crystal-lang
straight-shoota has joined #crystal-lang
elia has quit [Client Quit]
elia has joined #crystal-lang
straight-shoota has quit [Ping timeout: 276 seconds]
straight-shoota has joined #crystal-lang
<livcd> on the other hand tat generic bounty source contains all the main goals
<livcd> and it did not even reach the goal...so might be pointless to create another one
unn4m3d10 has joined #crystal-lang
unn4m3d has quit [Read error: No route to host]
unn4m3d has joined #crystal-lang
unn4m3d10 has quit [Read error: Connection reset by peer]
<FromGitter> <bararchy> The reasons it wont work is that it's generic. ⏎ you dont know who youre paying to, you dont know what they actually working on etc..
<FromGitter> <bararchy> once a few moths we get a "sorry we promised and didn't deliver" speach. ⏎ much better to take smaller projects, assagined specific people, and then work with that
<FromGitter> <bararchy> for example RX14 is working on Windows. ⏎ that's something you can understand.
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> manas is working on crystal.... well... that's a little too vague
Groogy has quit [Disconnected by services]
Groogy_ is now known as Groogy
Groogy2 has joined #crystal-lang
<Groogy> Ugh I give up on trying to fix the projection code ;_;
<Groogy> I'll find some sort of work around and use that for now until I can fix it
<FromGitter> <bararchy> Groogy didn't @ArtLinkov manged to help you out ?
<Groogy> Nah he doesn't know enough when it comes to graphical stuff :P
<Groogy> he knows the math, not how it is used to project/unproject to a 2d plane
<Groogy> Either way I mean it is "sort of there" ALMOST.... it's just inversed
<FromGitter> <bararchy> Groogy can't you just "hack" it with a `* -1` or something
<Groogy> nah, because it means whenever you rotate
<Groogy> it sort of goes opposite right
<Groogy> because the rotation isn't inversed
<FromGitter> <bew> #yolo
<FromGitter> <bew> oops x)
<FromGitter> <bararchy> lol @bew
<Groogy> I'll just put up that it will highlight points instead or something :/
<Groogy> and you navigate with keyboard for now I guess
<FromGitter> <bararchy> What say you guys? https://github.com/crystal-lang/crystal/issues/5886
<FromGitter> <bararchy> Groogy keyboard is how realy games are played :) (like gothic ftw)
<Groogy> hehe
<Groogy> though I am going to have a lot of menus/interface :P
<FromGitter> <bararchy> Tab to the rescue
<Groogy> well will probably have arrows and enter to confirm I guess
<Groogy> it sucks but someone will fix it in the future form e hopefully ;D
<FromGitter> <bararchy> Can't you ask one of your team to help out ?
straight-shoota has quit [Ping timeout: 240 seconds]
unn4m3d10 has joined #crystal-lang
unn4m3d has quit [Read error: Connection reset by peer]
unn4m3d has joined #crystal-lang
straight-shoota has joined #crystal-lang
unn4m3d10 has quit [Read error: Connection reset by peer]
unn4m3d10 has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
unn4m3d has quit [Ping timeout: 268 seconds]
straight-shoota has quit [Read error: Connection reset by peer]
straight-shoota has joined #crystal-lang
straight-shoota has quit [Read error: Connection reset by peer]
straight-shoota has joined #crystal-lang
<Groogy> @bararchy eh problem then it could become legal problem right? If I use my teams resources etc.
<FromGitter> <bararchy> Groogy not if you ask a friend from your team to take a look :) ⏎ I don't mean start getting everyone work on it instead of work, but, if you have someone there who can take a look and help you out maybe you should use them
<FromGitter> <bararchy> if they agree and have time
<FromGitter> <bararchy> even "after work time"
<FromGitter> <bararchy> lots of companies contribute to opensource projects btw, not only my comp but big ones, MS, google, FB, intel all have a hand in the Linux kernel and rivers or this or that programming languge
<FromGitter> <bararchy> I don't see how it's a legal issue
<FromGitter> <bararchy> only if you make the project commercial
flaviodesousa has quit [Remote host closed the connection]
straight-shoota has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] ysbaddaden closed pull request #2829: DNS: threaded resolver [WIP] (master...dns-threaded-resolver) https://git.io/volrd
straight-shoota has joined #crystal-lang
straight-shoota has quit [Read error: No route to host]
straight-shoota has joined #crystal-lang
<FromGitter> <Schniz> Hey there, a small question: ⏎ I try to statically compile a crystal app that uses TCP, and then use the binary with another image, using multi-stage docker builds
<FromGitter> <Schniz> unfortunately, I always get something that looks like a name resolution errors
<FromGitter> <Schniz> is there something that I need to pull with it too? I tried using `FROM scratch` and `FROM debian:jessie` (that should be enough), but maybe i need to install something else as well
elia has joined #crystal-lang
<FromGitter> <Schniz> okay, on `debian:jessie` it works, so it is probably some small configuration that missing
<FromGitter> <Schniz> I'll try use alpine :)
<FromGitter> <bararchy> alpine is best for static compile
<FromGitter> <bararchy> Linux dosent really like static bins
<FromGitter> <bararchy> :)
<FromGitter> <Schniz> hehe
<FromGitter> <Schniz> alpine has the same problems either
<FromGitter> <Schniz> No address found for HOST:PORT over TCP (Socket::Error)
<FromGitter> <bararchy> sounds like a dns error
<FromGitter> <bararchy> tbh
<FromGitter> <bararchy> maybe container doesn't have network enabled? or can't resolve calls
<FromGitter> <Schniz> no ;( wait maybe I'll try some other flag in the build
<FromGitter> <Schniz> (same container settings, but with `debian:jessie` works)
<FromGitter> <codenoid> hi, how i can run binary application from Crystal with non-blocking
<FromGitter> <bararchy> non blocking what? IO?
<FromGitter> <codenoid> yes
<FromGitter> <codenoid> without waiting the app finish
<FromGitter> <bararchy> I don't get what you mean? ⏎ as in CLI app? or sending data via TCP ?
<FromGitter> <codenoid> i want call binary application within crystal
<FromGitter> <bararchy> using C binding or system() ?
<FromGitter> <codenoid> and just call, without waiting the app exit
<FromGitter> <bararchy> Process.new should do it
<FromGitter> <bararchy> or Process run
<FromGitter> <codenoid> ```fork { `/call/some/app` }```
<FromGitter> <codenoid> ?
<FromGitter> <bararchy> yeha for example
<FromGitter> <bararchy> maybe you should give it a new `setsid` so it wont become a zombie process when parent dies
<FromGitter> <codenoid> yeah
straight-shoota has quit [Read error: Connection reset by peer]
straight-shoota has joined #crystal-lang
straight-shoota has quit [Read error: Connection reset by peer]
straight-shoota has joined #crystal-lang
<FromGitter> <bew> @codenoid your example will fork twice
<FromGitter> <bew> Either use `Process.new` or if you want full control, use `Process.fork { Process.exec("/bin/app") }`
flaviodesousa has joined #crystal-lang
<FromGitter> <codenoid> ok @bew
unn4m3d10 has quit [Ping timeout: 248 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
straight-shoota has quit [Read error: Connection reset by peer]
straight-shoota has joined #crystal-lang
<FromGitter> <unn4m3d> lol what
<FromGitter> <unn4m3d> writing code in Atom
<Groogy> shaders
<Groogy> what is that?
<Groogy> not shaders in itself but the thing the image is off
<FromGitter> <unn4m3d> https://github.com/nya-engine/nya
<Groogy> how do you do your math?
<Groogy> don't see matrix, vector etc. files
<FromGitter> <unn4m3d> Math is in separate shard :)
<Groogy> huh... your matrices are reversed compared to mine 🤔
<Groogy> maybe that's why my unproject code doesn't work
<Groogy> looking specifically at this
<FromGitter> <unn4m3d> > Column-major versus row-major is purely a notational convention. Note that post-multiplying with column-major matrices produces the same result as pre-multiplying with row-major matrices. The OpenGL Specification and the OpenGL Reference Manual both use column-major notation. You can use any notation, as long as it's clearly stated.
<FromGitter> <bew> @Groogy it's the same, his arguments are reversed compared to yours
<Groogy> I know it is the same
<Groogy> but it does mean math goes bad if you mix it and I might be mixing stuff somewhere?
straight-shoota has quit [Ping timeout: 248 seconds]
straight-shoota has joined #crystal-lang
unn4m3d10 has joined #crystal-lang
<FromGitter> <bew> For this kind of method where it's easy to mix the 2 args, I usually force the usage of named arguments, it's a bit longer but it makes sure it's correct and easily readable
rohitpaulk has quit [Ping timeout: 256 seconds]
unn4m3d has joined #crystal-lang
unn4m3d10 has quit [Read error: Connection reset by peer]
unn4m3d11 has joined #crystal-lang
unn4m3d has quit [Read error: Connection reset by peer]
unn4m3d has joined #crystal-lang
DTZUZO has quit [Ping timeout: 264 seconds]
marius has quit [Quit: Ping timeout (120 seconds)]
unn4m3d11 has quit [Ping timeout: 264 seconds]
marius has joined #crystal-lang
straight-shoota has quit [Ping timeout: 260 seconds]
unn4m3d has quit [Ping timeout: 264 seconds]
wuehlmaus has quit [Quit: Lost terminal]
<FromGitter> <yorci> there is any method like Ruby's "send" method? or i have to use macro for call dynamicly call class methods?
<FromGitter> <waghanza> @yorci you have to use macro
<FromGitter> <waghanza> no `send` could be done (but mimic) since `crystal` is compiled
<FromGitter> <yorci> alright, thanks
wuehlmaus has joined #crystal-lang
ua has quit [Ping timeout: 260 seconds]
ua has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
That_Guy_Anon has joined #crystal-lang
shalmezad has joined #crystal-lang
<jokke> hey
<jokke> does crystal have support for inotify?
<jokke> ah
elia has joined #crystal-lang
<crystal-gh> [crystal] r00ster91 opened pull request #5887: Fix HEREDOC error message grammar (master...patch-11) https://git.io/vxV5Q
Papierkorb has joined #crystal-lang
<crystal-gh> [crystal] RX14 closed pull request #5885: Update docs for Enum (master...patch-1) https://git.io/vxVmN
<crystal-gh> [crystal] RX14 closed pull request #5884: Fix typo (master...at_exit-typo) https://git.io/vxVmn
Papierkorb has left #crystal-lang ["Konversation terminated!"]
That_Guy_Anon has quit [Remote host closed the connection]
That_Guy_Anon has joined #crystal-lang
DTZUZO has joined #crystal-lang
<travis-ci> crystal-lang/crystal#c2efaff (master - Update docs for Enum (#5885)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/359809749
<travis-ci> crystal-lang/crystal#4927ecc (master - Fix typo (#5884)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/359810143
alex`` has joined #crystal-lang
alex`` has quit [Client Quit]
qard has joined #crystal-lang
<FromGitter> <bararchy> jokke nice find
hightower2 has joined #crystal-lang
hightower3 has quit [Ping timeout: 264 seconds]
<jokke> i have two paths: /foo/bar/baz and /foo/bar/baz/foobar/baz. What's the most elegant and correct way to get the part from the second path which is relative to the first one?
<jokke> as in foobar/baz
<FromGitter> <plainas> So the other day we were talking about how to_json and to_yaml would be removed from Object. This is a huge change, I believe many objects will still
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vxwTq
<crystal-gh> crystal/master 0424b22 r00ster91: Fix HEREDOC error message grammar (#5887)...
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<Groogy> Oh they will?
<Groogy> Nice never liked that
<FromGitter> <alex-lairan> > no `send` could be done (but mimic) since `crystal` is compiled ⏎ ⏎ Yes, and it's more sure than the ruby way ! :D
<FromGitter> <plainas> I actually thought it was a nice convenience, but of course, it doesn't make sense to put such a burden in all object types. In practice, many of them have it broken
rohitpaulk has joined #crystal-lang
<Groogy> In my framework I like more having a module I mixin marking it as serializable and to the module I provide what type is responsible to serialize it.
<Groogy> i.e class Foobar; include Serializable(FoobarSerializer); end;
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Read error: Connection reset by peer]
<FromGitter> <plainas> where is class_property documented?
rohitpaulk has joined #crystal-lang
<FromGitter> <plainas> I can't find documentation about it neither in the docs nor in the api docs
<FromGitter> <bararchy> It seems Crystal deva don't like StackOverflow
<FromGitter> <bararchy> Haha
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
heaven31415 has joined #crystal-lang
<FromGitter> <bararchy> Though its cool to see we have more github projects then ASP
baweaver has quit [Quit: Off to do something important-sounding]
Groogy2 has quit [Quit: WeeChat 2.0.1]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #crystal-lang
<heaven31415> hi, I tried to install crystal-book via docker, however it is unable to locate two required plugins: "edit-link" and "offline", it tells me to run 'gitbook install` to install them, however I have no idea how to explain it to docker :P
<heaven31415> ok nmv, added this to commands in docker-compose.yml
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 256 seconds]
<FromGitter> <dandyvica> Hi all
<FromGitter> <dandyvica> How can I access to the core TCPServer from an HTTP::Server?
<FromGitter> <dandyvica> The @server variable is not property isn't it?
vivus has joined #crystal-lang
vivus has left #crystal-lang [#crystal-lang]
knight_ has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
<FromGitter> <meraxes_twitter> Though not intential HTTP::Server#bind will return it just by glancing at it.
return0e_ has joined #crystal-lang
return0e_ has quit [Remote host closed the connection]
return0e has quit [Ping timeout: 240 seconds]
benharri has quit [Quit: The Lounge - https://thelounge.github.io]
benharri has joined #crystal-lang
benharri has quit [Quit: The Lounge - https://thelounge.github.io]
benharri has joined #crystal-lang
baweaver has joined #crystal-lang
baweaver has joined #crystal-lang
baweaver has quit [Changing host]
return0e has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
return0e has quit [Ping timeout: 248 seconds]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
qard has joined #crystal-lang
<oprypin> heaven31415, ok you know what? installing a book via docker is where i draw the line
<heaven31415> I'm sorry I really don't know docker
<heaven31415> I just liked the idea of not having to install dependencies globally
<oprypin> heaven31415, ok so don't install them globally, i guess
<heaven31415> why is using docker for this so wrong?
<oprypin> cuz it's a freakin BOOK
<oprypin> heaven31415, this is local enough https://gist.github.com/9af19c40dec06eff25ffb6bcd30c74d3
<FromGitter> <j8r> @oprypin i see you have worked more with nim is the past, and now more on crystal. Why have you moved?
<oprypin> though it does also create $HOME/.gitbook
<oprypin> j8r, nim is complicated and inconsistent and hard to use
<heaven31415> sounds like c++ ^^
<FromGitter> <j8r> Oh! Syntax or compiler wise? It compiles to C/javascript
<FromGitter> <j8r> A pythonised c++ I guess?
<oprypin> btw i consider crystal much closer to python than nim to python
<FromGitter> <j8r> If with looks only at the syntax, it seems nim =~ python and crystal =~ ruby. But probaly you're talking about the philosophy behind
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <kazzkiq> I want to do a `Process.run` that actually blocks the rest of my code execution, making it run only after the process run is done.
<FromGitter> <kazzkiq> Failing miserably.
<FromGitter> <kazzkiq> Anyone already did that?
<oprypin> kazzkiq, that's what already happens
<FromGitter> <bew> Yeah Process.run should block the current fiber already..
<FromGitter> <bew> (how did you got a commit-specific link of a specific line so fast? Is there a shortcut I'm missing? Because I always get a master-link, and have to copy-paste the hash of the last commit.. Which take quite some time, am I missing sth?)
<oprypin> bew, click `⋯` on the left
<FromGitter> <bew> Oooh forgot that, ty
shalmezad has quit [Quit: It's 5 o'clock here]
<FromGitter> <plainas> What's this? what does the ru subdomain mean? http://ru.crystal-lang.org/api/Matrix.html
<FromGitter> <bew> Russian?
<FromGitter> <plainas> Then why is it in english?
<FromGitter> <plainas> The reason I ask is because if I remove the ru, then the link is broken, and indeed the file doesn't exist in the source anymore
<oprypin> plainas, well it was probably meant to be a gradual translation project
<FromGitter> <plainas> matrix.cr
<oprypin> and yes, it is very outdated
<FromGitter> <bew> Maybe only some parts are translated? Otherwise i don't know
<oprypin> if 0% is "some"
<oprypin> this should be deleted
<FromGitter> <plainas> why was matrix.cr removed?
<heaven31415> maybe they were testing something with it
<oprypin> plainas, it's just not a good fit for standard library, because the average person doesnt care about it, and for the mathematician it's not nearly enough
<FromGitter> <plainas> Personally I don't think it would be tooooo specific, I certainly use matrices for many different purposes. But that alright, looks like there's an implemenattion by @Exilor
<oprypin> plainas, it is the exact same implementation. originally written in stdlib, then moved out into a separate lib by the original author
<FromGitter> <plainas> I see
alex`` has quit [Ping timeout: 276 seconds]
DTZUZO has quit [Ping timeout: 260 seconds]
heaven31415_ has joined #crystal-lang
heaven31415 has quit [Ping timeout: 248 seconds]
<FromGitter> <plainas> is there anything like class_property macro but for instance variables?
<heaven31415_> property?
gloscombe has joined #crystal-lang
<FromGitter> <plainas> Yes, that is what I was looking for
<FromGitter> <plainas> Is there a macro that provides simplified syntax for a class with a bunch of properties and a constructor that accepts them in order?
<RX14> @plainas `record`
<RX14> @plainas https://crystal-lang.org/api/master/toplevel.html#record(name,*properties)-macro
<RX14> it's actually for a struct and it's immutable
<RX14> but thats a good thing
<FromGitter> <plainas> Cool
<FromGitter> <plainas> I guess I could write my own for a class instead of a struct, as an exercise
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qard has joined #crystal-lang
<gloscombe> hey someone have 2 mins to take a quick look at whats probably a beginners error. Trying to push an element to an array inside a hash, and getting a compiler error
<FromGitter> <bew> When you do `hash2["hello"]` the type of the value you get here is `Array(String) | Int32`, and here the compiler has no way to know that it will be the Array
<FromGitter> <bew> try `typeof(hash2["hello"])` instead of `hash2["hello"].class`
<gloscombe> okeys, wouldn't the compiler be able to infer the type of the hash["hello"] as array(string) at that point as it was just assigned?
<FromGitter> <bew> so you have to handle the case where the value is an `Int32`
<FromGitter> <bew> no, you can't know what could happen between the assignement and the usage, the compiler can't reply on that
<FromGitter> <bew> rely*
<gloscombe> okays makes sense =)
<FromGitter> <bew> you can also use a local variable: `hash2["hello"] = h = [] of String` and later do `h.push("world")`
<FromGitter> <bew> so `h` will have a reference to the array, and have the type of the array
<gloscombe> appreciated I'll give that a go
<FromGitter> <bew> you can also first build the array: `h = [] of String; h << "world"` then add the array to the hash: `hash2["hello"] = h`
<FromGitter> <bew> with better variable naming please, because `h` being an array is quite stupid, sorry about that ^^