RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.27.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
<robacarp> well but is the `forall T` part needed? Why not just `def method(&block : SomeType -> T) : T`
<FromGitter> <dscottboggs_gitlab> you'd get a `constant T is not defined` error, unless you were in a generic class like `class Gen(T)` with a T generic type
<FromGitter> <dscottboggs_gitlab> I don't know what the data returned from the block is going to be, I just know I'll be receiving it from a block and then returning it from the method
<robacarp> I think the only time I've wanted to note that is _in_ a generic class
<FromGitter> <dscottboggs_gitlab> I suppose that's a poor example because I `process result` which would require some knowledge of the type, but I've definitely come across a this a few times and thought it was a nice way of annotating that.
<FromGitter> <dscottboggs_gitlab> well, in a generic class then you don't need `forall` -- `forall` lets you annotate *just a method* as being generic, without the whole surrounding type being generic
<robacarp> there it is.
<robacarp> that's what I was missing.
<FromGitter> <dscottboggs_gitlab> kinda like C++ template functions or rust generic functions
<robacarp> I'm vaguely familiar with C++ template functions, but I have no experience with rust.
<FromGitter> <dscottboggs_gitlab> fair enough
<robacarp> @dscottboggs_gitlab @vladfaust thanks for the explanations
<FromGitter> <dscottboggs_gitlab> np glad to help
<FromGitter> <vladfaust> πŸ‘
DTZUZO has joined #crystal-lang
devil_tux has joined #crystal-lang
<devil_tux> good morning y'all
<z64> o/
chemist69 has quit [Ping timeout: 258 seconds]
chemist69 has joined #crystal-lang
<FromGitter> <paulcsmith> @vladfaust so the weird thing is _ as a return type does not work for type restrictions on an instance variable.
<FromGitter> <paulcsmith> Or at least I couldn’t figure it out. Maybe there is a way :P
<devil_tux> creating gif files in < 100loc https://play.crystal-lang.org/#/r/6g43
<FromGitter> <paulcsmith> Never mind! It has nothing to do with instance variables. It has to do with keyword arguments somehow changing the type of the Proc. It's pretty strange: https://github.com/crystal-lang/crystal/issues/7523
<FromGitter> <paulcsmith> @bew @vladfaust I also added a comment to https://github.com/crystal-lang/crystal/issues/3655#issuecomment-470812468
<FromGitter> <paulcsmith> Would love your input there if you have time
<FromGitter> <GabrielMorris> Hey! Running into an issue running crystal on Ubuntu - https://pastebin.com/a7qJNVb2. I'm in the folder with shards.yaml and I've run shards install after installing Crystal. Was working on my MBP earlier
ma_ has joined #crystal-lang
ma_ has quit [Read error: Connection reset by peer]
devil_tux has quit [Read error: Connection reset by peer]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <bew> devil_tux: `("00000010").to_i(2)` can be written `0b00000010`
<FromGitter> <kingsleyh> morning :)
<FromGitter> <kingsleyh> what's a good way to find the return type of a method in Crystal?
<FromGitter> <r00ster91> `typeof`: https://carc.in/#/r/6g64
<FromGitter> <kingsleyh> ooh nice thanks - didn't realise it worked for methods too!
<FromGitter> <alex-lairan> @kingsleyh this call the method :) ⏎ ⏎ So it's an rvalue type, not a method type ;)
<FromGitter> <kingsleyh> aha!
<FromGitter> <bew> No it doesn't call the method
<FromGitter> <bew> https://carc.in/#/r/6g69
<FromGitter> <bew> It forces the ompiler to analyze the method to find the return type
<FromGitter> <bew> Typeof is compile time only
<FromGitter> <alex-lairan> Oh ! My bad
DTZUZO has quit [Ping timeout: 255 seconds]
ashirase has quit [Ping timeout: 246 seconds]
ashirase has joined #crystal-lang
DTZUZO has joined #crystal-lang
ternarysolo has joined #crystal-lang
ternarysolo has quit [Ping timeout: 246 seconds]
blassin has quit [Ping timeout: 245 seconds]
blassin has joined #crystal-lang
return0e has quit [Remote host closed the connection]
<FromGitter> <vladfaust> Are there any girls in Crystal? :)
return0e has joined #crystal-lang
<FromGitter> <pynixwang> no
<FromGitter> <pynixwang> almost boys
<FromGitter> <pynixwang> who has a arm64 binary?
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 255 seconds]
<FromGitter> <j8r> of?
<FromGitter> <j8r> I compile a Crystal project to arm64 with a docker alpine container with qemu
<mps> j8r: any other distro besides Alpine have packaged aarc64 crystal?
ternarysolo has joined #crystal-lang
<FromGitter> <j8r> yes
<mps> I can't see it on Debian so probably Ubuntu and all derivatives doesn't have it
DTZUZO has quit [Ping timeout: 252 seconds]
<FromGitter> <pynixwang> I try to build a working compiler, but failed
<mps> pynixwang: on what OS / distro
<FromGitter> <pynixwang> mac host build
<FromGitter> <pynixwang> rpi ubuntu last phase
<mps> which llvm version
<FromGitter> <pynixwang> @6
<FromGitter> <j8r> @pynixwang I recommend you to use https://github.com/multiarch/qemu-user-static
<FromGitter> <pynixwang> I try
<FromGitter> <pynixwang> failed
<mps> hmm, also I have problem with llvm6, make spec doesn't pass
<FromGitter> <j8r> @pynixwang why do you want to do it?
<FromGitter> <pynixwang> I use this image and do a multistage build
<FromGitter> <pynixwang> but not working
<FromGitter> <pynixwang> get work with a rpi
<FromGitter> <pynixwang> raspberry 3 A+
<FromGitter> <pynixwang> I want to open a ec2 a1 instance for last phase
<FromGitter> <pynixwang> rpi is too slow
<FromGitter> <pynixwang> spec show a "*"
<FromGitter> <pynixwang> is pending?
<FromGitter> <Blacksmoke16> yes
<FromGitter> <pynixwang> I try again.
<FromGitter> <Blacksmoke16> pending as in that spec gets skipped
<FromGitter> <Blacksmoke16> `Test cases that have been defined or outlined but are not yet expected to work can be defined using pending instead of it. They will not be run but show up in the spec report as pending.`
<FromGitter> <pynixwang> I know
<FromGitter> <pynixwang> rpi ➜ crystal git:(60760a546) βœ— ./crystal eval 'require "http"' ⏎ free(): invalid pointer ⏎ [1] 16174 abort (core dumped) ./crystal eval 'require "http"'
<FromGitter> <pynixwang> compiler not work
<FromGitter> <pynixwang> only -v works
<mps> pynixwang: what OS you have on rpi
<FromGitter> <pynixwang> gave up
<FromGitter> <pynixwang> ubuntu server 18.04 aarch64
<mps> may I suggest you to try Alpine linux
lucasb has joined #crystal-lang
<FromGitter> <pynixwang> rpi ➜ ~ lsb_release -a ⏎ No LSB modules are available. ⏎ Distributor ID:Ubuntu ⏎ Description:Ubuntu 18.04.2 LTS ⏎ Release:18.04 ... [https://gitter.im/crystal-lang/crystal?at=5c82748386e34a126fa962a6]
<FromGitter> <j8r> just compile statically your app, and ship it to your RPi
<FromGitter> <pynixwang> use cross-tool?
<FromGitter> <j8r> I'm will create a Gist to explain how to do it
<FromGitter> <pynixwang> I try
<FromGitter> <j8r> but you need Docker
<FromGitter> <pynixwang> yes
<FromGitter> <pynixwang> and I try with multistage build.
<FromGitter> <pynixwang> not working.
<FromGitter> <j8r> wait, I do a gist (won't use a multi stage build)
<FromGitter> <pynixwang> maybe same result.
<FromGitter> <j8r> I now it works, I compile this myself https://bitbucket.org/dfabric/packages/downloads/
<FromGitter> <j8r> dppm is a Crystal project
<FromGitter> <TheOnlyArtz> Hey! what should I try to write when I'm practicing Crystal?
<FromGitter> <TheOnlyArtz> I'm still learning the language
<FromGitter> <r00ster91> Try making.. a typing game?
<FromGitter> <TheOnlyArtz> Like a Type Racer?
<FromGitter> <r00ster91> yeah
<FromGitter> <TheOnlyArtz> Oh ok
<FromGitter> <TheOnlyArtz> I'll go for it
<FromGitter> <TheOnlyArtz> I will use Kemal as the backend
<FromGitter> <pynixwang> try to make a bakefs static middleware
<FromGitter> <TheOnlyArtz> What's Bakefs?
<FromGitter> <j8r> @pynixwang there is also https://github.com/multiarch/alpine
<FromGitter> <pynixwang> bundle statics into binary
<FromGitter> <TheOnlyArtz> I will go with the type racer for now
<FromGitter> <TheOnlyArtz> What web framework would you suggest?
<FromGitter> <TheOnlyArtz> I really like Kemal right now but maybe there's something else I can look at?
<FromGitter> <pynixwang> Kemal is not fullstack
<FromGitter> <r00ster91> you could also try a newer one: https://onyxframework.org/ ⏎ or Amber or Lucky. ⏎ Or you make it in the command-line where you do everything with Crystal. When you make it a web game you will probably make some stuff with JavaScript, HTML etc
<FromGitter> <pynixwang> it 's a big project
<FromGitter> <pynixwang> why not try to write a shard
<FromGitter> <pynixwang> @j8r you build dppm with multiarch/alpine?
<FromGitter> <Blacksmoke16> @TheOnlyArtz what will it be for? JSON API or?
<FromGitter> <j8r> @pynixwang yes. Here is a gist to try https://gist.github.com/j8r/3315f936eee9a1f6fb87e2bcf5924b2b
<FromGitter> <j8r> the compilation is a bit long
<FromGitter> <pynixwang> you success?
<FromGitter> <j8r> sure
<FromGitter> <j8r> and you?
<FromGitter> <j8r> not sure this image works with multistage
<FromGitter> <j8r> but at least, you can have a static linked binary to include
<FromGitter> <pynixwang> I 'm try to build the compiler on rpi
<FromGitter> <pynixwang> not build app for it.
<FromGitter> <j8r> you can build the compiler this way too
<FromGitter> <j8r> this will be long, like few hours
<FromGitter> <pynixwang> I try
<FromGitter> <pynixwang> I hava a 4 cores hackintosh.
<FromGitter> <pynixwang> maybe faster
<FromGitter> <j8r> The compilation is only done in 1 core
<FromGitter> <j8r> the linking use 4, but this is a little part of the process
<FromGitter> <pynixwang> oh..
<FromGitter> <j8r> you have docker on you RPi?
<FromGitter> <pynixwang> no
<FromGitter> <pynixwang> hackintosh
<FromGitter> <j8r> ok I see!
<FromGitter> <TheOnlyArtz> Hey it's me again, how can I have an Hash like `data : Hash(String , AnyTypeOfData?)`
<z64> in `Hash(K, V)`, `V` needs to be a union of all types you want to store in the hash
<FromGitter> <TheOnlyArtz> z64 can I pm you on DIscord?
<z64> ok
<FromGitter> <pynixwang> not so long..
<FromGitter> <pynixwang> just 6 min
<FromGitter> <TheOnlyArtz> I've got an issue
<FromGitter> <pynixwang> CRYSTAL_PATH
<FromGitter> <TheOnlyArtz> What?
<FromGitter> <pynixwang> set to src
<FromGitter> <TheOnlyArtz> How am I doing that?
<FromGitter> <pynixwang> export
<FromGitter> <TheOnlyArtz> Can you be more descriptive ?
<FromGitter> <TheOnlyArtz> I don't get what you want from me
<z64> what OS? and what is `crystal -v`
<FromGitter> <TheOnlyArtz> OS - Solus Budgie
<FromGitter> <TheOnlyArtz> Crystal 27.2
<FromGitter> <TheOnlyArtz> LLVM 4.0.0
<FromGitter> <TheOnlyArtz> I've install crystal with the tar.gz
<FromGitter> <pynixwang> make spec is long long
<FromGitter> <TheOnlyArtz> I've copy pasted the bin/crystal and bin/shards to the /usr/bin directory
<FromGitter> <TheOnlyArtz> I feel like the compiler isn't even there?
<FromGitter> <pynixwang> copy src to /usr/local/lib/crystal
<FromGitter> <TheOnlyArtz> Oh!
<FromGitter> <pynixwang> export CRYSTAL_PATH=/usr/local/lib/crystal
<FromGitter> <TheOnlyArtz> Replace CRYSTAL_PATH with the actual path?
<FromGitter> <TheOnlyArtz> You're not that descriptive , I really can't understand
<FromGitter> <pynixwang> cd crystal && cp -r src to /usr/local/lib/crystal && export CRYSTAL_PATH=/usr/local/lib/crystal
<FromGitter> <pynixwang> copy and paste
<FromGitter> <pynixwang> the
<FromGitter> <pynixwang> above
<FromGitter> <pynixwang> command line.
<FromGitter> <pynixwang> to
<FromGitter> <pynixwang> you
<FromGitter> <pynixwang> shell
<FromGitter> <pynixwang> cd crystal && cp -r src /usr/local/lib/crystal && export CRYSTAL_PATH=/usr/local/lib/crystal
<FromGitter> <TheOnlyArtz> Dude I'm not autistic . just asked you to be descriptive that's it.
<FromGitter> <pynixwang> no "to"
<FromGitter> <pynixwang> doc?
<FromGitter> <pynixwang> I forget where to find it.
<FromGitter> <TheOnlyArtz> I've copy pasted crystal
<FromGitter> <pynixwang> android?
<FromGitter> <TheOnlyArtz> What?
<FromGitter> <pynixwang> works?
<FromGitter> <TheOnlyArtz> working on it
<FromGitter> <pynixwang> os like android.
<FromGitter> <TheOnlyArtz> It's called Solus Budgie
<FromGitter> <TheOnlyArtz> One of the best Linux experiences I've ever had
<FromGitter> <pynixwang> oh..
<FromGitter> <kingsleyh> wow Solus Budgie looks cool!
<FromGitter> <kingsleyh> I'd never heard of it - looks like it's written from scratch
<FromGitter> <TheOnlyArtz> It's really good IMO
<FromGitter> <TheOnlyArtz> @pynixwang Doesn't seem to work
<FromGitter> <pynixwang> add src to end.
<FromGitter> <TheOnlyArtz> What do you mean end?
<FromGitter> <pynixwang> /usr/lib/crystal/src
<FromGitter> <TheOnlyArtz> h
<FromGitter> <TheOnlyArtz> oh
<FromGitter> <TheOnlyArtz> It seems like Crystal works perfectly on specific environemnts
<FromGitter> <kingsleyh> it looks like Solus supports LinuxBrew - so installing that would make installing crystal and lots of other stuff easy
<FromGitter> <pynixwang> spec slow
<FromGitter> <TheOnlyArtz> @kingsleyh Seems about right
<FromGitter> <TheOnlyArtz> Where did you see that?
<FromGitter> <pynixwang> linuxbrew is awesome
<FromGitter> <TheOnlyArtz> *install LinuxBrew*
<FromGitter> <pynixwang> /crystal # ldd .build/crystal ⏎ /lib/ld-musl-aarch64.so.1 (0x4000000000) ⏎ libLLVM-5.0.so => /usr/lib/libLLVM-5.0.so (0x4001915000) ⏎ libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x4003ebb000) ⏎ libpcre.so.1 => /usr/lib/libpcre.so.1 (0x4004029000) ... [https://gitter.im/crystal-lang/crystal?at=5c828cb2e527821f0a25cb57]
<FromGitter> <pynixwang> oh. no...
<FromGitter> <pynixwang> CRYSTAL_PATH from bin/crystal wrapper script. @TheOnlyArtz
DTZUZO has joined #crystal-lang
<FromGitter> <kingsleyh> does Crystal run well on Solus?
<FromGitter> <TheOnlyArtz> I still didn't manage to test it
<FromGitter> <TheOnlyArtz> @kingsleyh
<FromGitter> <TheOnlyArtz> Installing it using brew
<FromGitter> <TheOnlyArtz> @kingsleyh I don't think it worked
<FromGitter> <pynixwang> /crystal # ldd .build/crystal ⏎ /usr/bin/ldd (0x4000000000)
<FromGitter> <kingsleyh> @TheOnlyArtz what was the last thing it said?
<FromGitter> <pynixwang> why a static build depend on ldd
<FromGitter> <TheOnlyArtz> idk Pynix
<FromGitter> <TheOnlyArtz> Kingsley, I'm reinstalling it after I'm removed the files I've put manually at /usr/bin
<FromGitter> <TheOnlyArtz> so sec
<FromGitter> <TheOnlyArtz> But doing `crystal` doesn't work
<FromGitter> <kingsleyh> strange!
<FromGitter> <pynixwang> rpi ➜ ~ ldd crystal1 ⏎ statically linked ⏎ rpi ➜ ~ file crystal1 ⏎ crystal1: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, with debug_info, not stripped [https://gitter.im/crystal-lang/crystal?at=5c8298c6c8e5bc51620aa121]
<FromGitter> <pynixwang> why..
<FromGitter> <kingsleyh> I don't see any docker image for Solus on dockerhub - which is a shame
<FromGitter> <TheOnlyArtz> Solus is underrated
<FromGitter> <TheOnlyArtz> lmao
<FromGitter> <TheOnlyArtz> I've managed to install it!
<FromGitter> <kingsleyh> nice
<FromGitter> <kingsleyh> what was the problem?
<FromGitter> <TheOnlyArtz> idk
<FromGitter> <TheOnlyArtz> I've manually pasted the bin to the `/bin`
<FromGitter> <TheOnlyArtz> Now it errors and says I need to install dev package for libgc
<FromGitter> <kingsleyh> oh maybe doing brew doctor will tell you if there any issues
<FromGitter> <TheOnlyArtz> hmm what
<FromGitter> <kingsleyh> sometimes brew install stuff but you then have to manually run another link command to symlink the binary to the path
<FromGitter> <kingsleyh> try running: brew doctor
<FromGitter> <kingsleyh> and see if it shows any problems
<FromGitter> <kingsleyh> @TheOnlyArtz on Ubuntu you have to install a list of extra deps for crystal to work with - so you might have to do the same depending on what Solus comes with: https://crystal-lang.org/reference/installation/on_debian_and_ubuntu.html
<FromGitter> <TheOnlyArtz> They are optional
<FromGitter> <kingsleyh> yeah - depends on what you want to code
<FromGitter> <TheOnlyArtz> I need to find that `libgc` - how to install it on SOlus
<FromGitter> <kingsleyh> probably you can install it with the Solus package manager
<FromGitter> <TheOnlyArtz> I can't manage to find it
<FromGitter> <TheOnlyArtz> There's only `libgcc`
<FromGitter> <straight-shoota> The bigger distributions usually provide libgc but it's not commonly available everywhere
<FromGitter> <straight-shoota> You'll probably need to build it yourself. See https://github.com/crystal-lang/crystal/wiki/All-required-libraries
<FromGitter> <TheOnlyArtz> What a hassle
<FromGitter> <straight-shoota> Or, actually. `libgc.a` is included in the linux download at https://github.com/crystal-lang/crystal/releases
<FromGitter> <straight-shoota> You might try if that works.
<FromGitter> <TheOnlyArtz> So I need to do it fully manual again?
<FromGitter> <TheOnlyArtz> What compressed file do I need to install from that release
<FromGitter> <TheOnlyArtz> crystal-0.27.2-1-linux-x86_64.tar.gz ⏎ ?
<FromGitter> <straight-shoota> yes
<FromGitter> <TheOnlyArtz> Ok I've installed it
<FromGitter> <TheOnlyArtz> Now what?
<FromGitter> <TheOnlyArtz> Do I need to put all the crystal/bin files in the correct dir?
<FromGitter> <straight-shoota> I've just written a Dockerfile to install crystal on alpine from the tar.gz, you essentially just need to do this: https://github.com/crystal-lang/distribution-scripts/blob/05c66e7bc5f9f381697a1d19c1cfa097fce8201e/docker/alpine.Dockerfile#L19-L24
<FromGitter> <TheOnlyArtz> That's not how Solus built tho
<FromGitter> <TheOnlyArtz> We don't have /someDir/local here
<FromGitter> <TheOnlyArtz> I've combined the libgc.a and the linuxbrew installment
<FromGitter> <TheOnlyArtz> Worked :)
<FromGitter> <kingsleyh> nice :)
crystal-lang564 has joined #crystal-lang
lucasb has quit [Quit: Connection closed for inactivity]
<FromGitter> <straight-shoota> πŸ‘
<crystal-lang564> help
<FromGitter> <Blacksmoke16> ?
crystal-lang564 is now known as micha-cr
micha-cr is now known as crystal-lang564
<FromGitter> <TheOnlyArtz> Did someone use Kemal before and knows how to use static files? I've followed the docs and it doesn't seem to work
crystal-lang564 has quit [Quit: Page closed]
crystal-lang564 has joined #crystal-lang
<FromGitter> <Blacksmoke16> @TheOnlyArtz im pretty sure if you create a `public` directory outside of `src` it would just do it for you
<FromGitter> <TheOnlyArtz> It doesn't work for some reason
<FromGitter> <TheOnlyArtz> https://github.com/kemalcr/kemal/issues
<FromGitter> <Blacksmoke16> but what happens if you move your `public` folder to same level as `src` and `spec` and not do `public_folder "src/public" ⏎ `
crystal-lang564 has quit [Quit: Page closed]
<FromGitter> <TheOnlyArtz> sec
<FromGitter> <TheOnlyArtz> Nope
<FromGitter> <TheOnlyArtz> Maybe it doesn't meant to work with ecr?
<FromGitter> <TheOnlyArtz> But then it would be kind of weird
<FromGitter> <Blacksmoke16> sec
<FromGitter> <Blacksmoke16> hm yea
<FromGitter> <Blacksmoke16> no it works
<FromGitter> <TheOnlyArtz> Did it work for you? @Blacksmoke16
<FromGitter> <Blacksmoke16> yes
<FromGitter> <Blacksmoke16> ```require "kemal" ⏎ ⏎ Kemal.run``` [https://gitter.im/crystal-lang/crystal?at=5c82b8fc293ac75db575460f]
<FromGitter> <TheOnlyArtz> With `.ecr`?
<FromGitter> <Blacksmoke16> `http://localhost:3000/foo.txt`
<FromGitter> <Blacksmoke16> ecr you have to render
<FromGitter> <Blacksmoke16> its not a static file
<FromGitter> <TheOnlyArtz> of course
<FromGitter> <TheOnlyArtz> But how do you access static files from an ecr
<FromGitter> <Blacksmoke16> `http://kemalcr.com/guide/#static-files`
<FromGitter> <Blacksmoke16> prob like you would in that HTML example?
<FromGitter> <TheOnlyArtz> But Kemal need to do that for you
<FromGitter> <TheOnlyArtz> Oh it works for me now too
<FromGitter> <Blacksmoke16> for ecr files you'd have to define kemal routes to render the ecr file to html or however that works
<FromGitter> <Blacksmoke16> which you can include static files like your css etc like in that example
<FromGitter> <TheOnlyArtz> ```code paste, see link``` ⏎ ⏎ I'm doing something like this [https://gitter.im/crystal-lang/crystal?at=5c82ba2bb4b6ef7bc8799757]
<FromGitter> <Blacksmoke16> yes
<FromGitter> <Blacksmoke16> afaik thats how you'd have to do it
<FromGitter> <TheOnlyArtz> Sweet
DTZUZO has quit [Ping timeout: 250 seconds]
<FromGitter> <Blacksmoke16> im more used to the non server rendered sites, like angular
<FromGitter> <TheOnlyArtz> gotcha
DTZUZO has joined #crystal-lang
go|dfish has quit [Ping timeout: 246 seconds]
ternarysolo has quit [Ping timeout: 250 seconds]
bmcginty has quit [Ping timeout: 250 seconds]
bmcginty has joined #crystal-lang
ternarysolo has joined #crystal-lang
go|dfish has joined #crystal-lang
ternarysolo has quit [Ping timeout: 252 seconds]
<FromGitter> <TheOnlyArtz> ``````
ua has quit [Ping timeout: 255 seconds]
<FromGitter> <TheOnlyArtz> ``````
<FromGitter> <TheOnlyArtz> Omg sorry , idk how to use gitter for phone, I guess there's not option to do a newline here
<FromGitter> <TheOnlyArtz> https://play.crystal-lang.org/#/r/6gc8 why does this code runs?
<FromGitter> <TheOnlyArtz> Shouldn't crystal be null safe?
<FromGitter> <Blacksmoke16> it is, but you're not doing anything that could result in a null pointer exception
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6gce
<FromGitter> <Blacksmoke16> now you're trying to use a method on a var that could be either `String` or `Nil` so would have to make sure its not nil before using it
<FromGitter> <Blacksmoke16> like ⏎ ⏎ ```if a ⏎ pp a.upcase ⏎ else ⏎ pp "a is null" ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5c82e00b25e4e24c0739e1c8]
<FromGitter> <Blacksmoke16> @TheOnlyArtz
ua has joined #crystal-lang