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
http_GK1wmSU has joined #crystal-lang
http_GK1wmSU has left #crystal-lang [#crystal-lang]
Split has joined #crystal-lang
[spoiler] has quit [Ping timeout: 276 seconds]
[spoiler] has joined #crystal-lang
bcardiff has joined #crystal-lang
snsei has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
snsei has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
Papierkorb has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 260 seconds]
<crystal-gh> [crystal] wmoxam opened pull request #4781: Fixes specs broken on BSD (master...fix-openbsd-specs) https://git.io/v7gGe
rohitpaulk has joined #crystal-lang
Split_ has joined #crystal-lang
Split has quit [Ping timeout: 248 seconds]
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
mark_66 has joined #crystal-lang
Philpax__ has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
Philpax_ has quit [Ping timeout: 276 seconds]
Split__ has joined #crystal-lang
Split_ has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
Philpax has joined #crystal-lang
Philpax__ has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
DTZUZO has quit [Ping timeout: 255 seconds]
hightower2 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
Split_ has joined #crystal-lang
Split__ has quit [Ping timeout: 240 seconds]
Split_ has quit [Ping timeout: 255 seconds]
<FromGitter> <piperun> Hello everyone, I'm a little curious about crystal, as far as I know it's a compiled language but I'm wondering if it's possible to use Crystal as a script language in say making video games?
tosmi has joined #crystal-lang
<tosmi> hi, i'm trying to compile crystal on freebsd 10.3
<tosmi> following the comment in https://github.com/crystal-lang/crystal/issues/4185, i'm using the 0.19 freebsd binary to build 0.20.0
<tosmi> gmake works, but call gmake spec or running gmake a second time yields the following error message
alex`` has joined #crystal-lang
<tosmi> any hints what i'm donig wrong here? thanks
<FromGitter> <bararchy> @piperun there are more then a few people doing game development in Crystal , I don't really understand the Script part in the question though
Anon1546 has joined #crystal-lang
Anon1546 has quit [Quit: Page closed]
hightower2 has quit [Remote host closed the connection]
hightower has joined #crystal-lang
Papierkorb has joined #crystal-lang
saadq has quit [Ping timeout: 260 seconds]
saadq has joined #crystal-lang
flaviodesousa has joined #crystal-lang
<FromGitter> <straight-shoota> I think @piperun want's to use Crystal as an interpreted language to easily allow custom modifications.
<FromGitter> <straight-shoota> This would be very difficult and probably not really helpful, because Crystal's type inference for example needs to assess the whole program and not just parts of it.
<FromGitter> <straight-shoota> @tosmi I don't know if it helps, but does src/lib_c/x86_64-portbld-freebsd/c/dlfcn.cr exist?
<FromGitter> <straight-shoota> Oh I see you figured that^^
Split has joined #crystal-lang
Split has quit [Client Quit]
rohitpaulk has joined #crystal-lang
<FromGitter> <piperun> @straight-shoota I see, thanks for the input!
DTZUZO has joined #crystal-lang
<FromGitter> <straight-shoota> you could probably better use Lua (or somthing similar, maybe mruby). This language was explicitly designed for such tasks. IIRC there are Crystal bindings for liblua.
<FromGitter> <straight-shoota> https://github.com/veelenga/lua.cr
<tosmi> got 0.20.0 to compile after renaming lib_c/x86_64-portbld-freebsd to lib_c/x86_64-unknown-freebsd
<tosmi> but now 0.20.1 fails with in src/compiler/crystal/compiler.cr:155: undefined method 'merge!' for Set(String) (did you mean 'merge'?)
<tosmi> any hints?
<FromGitter> <akzhan> @tosmi to to use usual crystal cpmiler with cross-compile to x86_64-unknown-freebsd triple
<tosmi> with changing the dir (creating a link) it failed with https://gist.github.com/tosmi/5d48acecece6e2e581b8267fc2141a94
<tosmi> ^with^without
<FromGitter> <akzhan> Strange. dlfcn should be found in triple files (add_target_path responds to this behavior).
<FromGitter> <akzhan> Anyway you should upgrade your crystal o 0.22.x at least
<tosmi> the thing is i try to get the latest version compiled, but i have to start with 0.19, that was the latest release providing freebsd binaries
<tosmi> but it seems i'm too stupid for this
<tosmi> compiling 0.20.0 with 0.19 worked (after fixing the dir) but compiling 0.20.1 with 0.20.0 failed with the merge error message
<FromGitter> <akzhan> can you cross compile crystal on another platform to yours one?
<tosmi> ok, i could try that as well
<tosmi> but it seems my problem is related with the crystal standard library
<tosmi> maybe there's no merge! for Set(string) in 0.20.0 but 0.20.1 uses this
<tosmi> so how do i compile crystal 0.20.1 with 0.20.0?
<FromGitter> <akzhan> it looks like you got wrong source code: 0.20.1 stdlib introduces merge! method
<FromGitter> <straight-shoota> but you should be able to compile 0.20.1 with 0.20.0
<tosmi> i'm using bash here and after compiling 0.20.0 i did a export PATH=.../crystal-0.20.0/bin and tried to compile 0.20.1
<tosmi> seems to be wrong...
<tosmi> so my workflow is setting the path, changing to the new crystal version and running gmake
<FromGitter> <straight-shoota> I guess you could just keep everything in the same directory... make builds compiler into .build/crystal, then checkout next release and make uses .build/crystal from previous build
<tosmi> @straight-shoota: thanks! looks like that's the issue here. i will try that a little bit later
bcardiff has joined #crystal-lang
w-p has quit [Ping timeout: 276 seconds]
bcardiff has quit [Quit: bcardiff]
tzekid has quit [Remote host closed the connection]
w-p has joined #crystal-lang
bcardiff has joined #crystal-lang
sz0 has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] MakeNowJust opened pull request #4784: Parser: allow to use trailing comma after named arguments in index notation (master...fix/crystal-parser/allow-trailing-comma-in-index) https://git.io/v72eM
rohitpaulk has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
alex`` has quit [Ping timeout: 246 seconds]
alex`` has joined #crystal-lang
hightower has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 258 seconds]
mark_66 has quit [Remote host closed the connection]
<FromGitter> <eliasjpr> Does crystal have `throw/catch` control flow?
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden closed pull request #4781: Fixes specs broken on BSD (master...fix-openbsd-specs) https://git.io/v7gGe
hightower has joined #crystal-lang
<travis-ci> crystal-lang/crystal#890ab45 (master - Fixes specs broken on BSD): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/260690738
ANon1543 has joined #crystal-lang
<ANon1543> Just out of curiousity: nullpointer, nil and false are considered the only falsey. so 0 is also considered a truthy value?
<Papierkorb> yes
<ANon1543> that....feels weird
<Papierkorb> Coming from C/C++?
<ANon1543> how did it come to that design decision
<ANon1543> c
<Papierkorb> Ok. Former C++ developer, before going to Ruby and later Crystal here. It's a non-issue. In C/C++, you often have to check for a zero or non-zero value, right? Yeah, not so much in Crystal or Ruby
<Papierkorb> Say you have a method which reads some integer value. In C, you might use a pointer argument as target and a bool return type (or int) to tell the caller if the call was successful, right?
<Papierkorb> Well, in Crystal, you'd just return a `Int32 | Nil`, that is, an Int32 (the call was successful), or `nil` (the call failed)
<Papierkorb> Done. No `if (!foo()) { /* actually the success path */ }` stuff necessary.
<ANon1543> Makes sense.
<ANon1543> Thanks and have a nice day.
ANon1543 has quit [Quit: Page closed]
<FromGitter> <eliasjpr> <oprypin> raise and rescue serves a diferrent purpose
bcardiff has quit [Ping timeout: 260 seconds]
<FromGitter> <eliasjpr> catch/throw are not the same as raise/rescue. catch/throw allows you to quickly exit blocks back to a point where a catch is defined for a specific symbol, raise rescue is the real exception handling stuff involving the Exception object.
<FromGitter> <eliasjpr> raising exception is a little expensive in the case I would like to use it for, throw seems ideal, but I guess I will have to live with raise/rescue
<Papierkorb> do you mean catch/throw as in ruby's sense?
<FromGitter> <eliasjpr> yes
<FromGitter> <eliasjpr> I just wondered if Crystal has that kind of control flow
<Papierkorb> break etc. - Don't use the exception mechanism for control flow
<FromGitter> <eliasjpr> I hate using exception for my case, and break just exits the current method, when I really want to do is jump to a different flow
<FromGitter> <eliasjpr> maybe that’s a feature request?
<Papierkorb> That feature is barely needed, and would potentionally be hard to do - Not even speaking of doing it right
bcardiff has joined #crystal-lang
<Papierkorb> If "doing it right" is even possible
<FromGitter> <eliasjpr> interesting, I gues the dynamic nature of ruby allow this to be done more easily
rohitpaulk has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#890ab45 (master - Fixes specs broken on BSD): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/260690738
<FromGitter> <straight-shoota> That might be a factor... but I'm not sure if it would be too difficult to add to Crystal . But as I understand it, it is deliberately not a thing because there is no real usecase and it makes things unnecessarily complicated.
<FromGitter> <eliasjpr> @straight-shoota is there any documentation of the lifecycle when an exception is raised?
<FromGitter> <straight-shoota> sorry, I don't know
<FromGitter> <eliasjpr> @straight-shoota thanks reading
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Quit: Ping timeout (120 seconds)]
w-p has quit [Ping timeout: 260 seconds]
w-p has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
bcardiff has joined #crystal-lang
renich has joined #crystal-lang
w-p has quit [Ping timeout: 255 seconds]
bcardiff has quit [Quit: bcardiff]
olbat[m] has quit [Changing host]
olbat[m] has joined #crystal-lang
olbat[m] has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9]
bcardiff has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
hightower has quit [Ping timeout: 260 seconds]
alibby has quit [Ping timeout: 258 seconds]
alibby has joined #crystal-lang
cyberarm has quit [Ping timeout: 260 seconds]
cyberarm has joined #crystal-lang