jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.28.0 | 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
<FromGitter> <dscottboggs_gitlab> I'm so excited that this is a thing holy shit
<FromGitter> <watzon> Hopefully I'll be introducing a github pages hosted version of the docs later today
<FromGitter> <dscottboggs_gitlab> shouldn't `Cadmium::Inflectors::PresentTenseVerb.new.singularize("become")` be "becomes" not "became"?
<FromGitter> <Blacksmoke16> *grammar*
<FromGitter> <watzon> I'm fairly certain "became" is correct
<FromGitter> <dscottboggs_gitlab> ...welp. ok
rohitpaulk has joined #crystal-lang
<beepdog> fish shell for the win!
<FromGitter> <dscottboggs_gitlab> fish shell is nice but I didn't feel like learning yet *another* scripting language so I'm sticking with ZSH for now since I know POSIX SH decently.
<FromGitter> <dscottboggs_gitlab> if I'm setting up a computer for a noob to linux though I always install fish and set it as the default shell
<beepdog> TBH, I still write bash scripts
<beepdog> but I love having fish for my primary shell
<beepdog> I should get a screenshot up there
<FromGitter> <dscottboggs_gitlab> ayup
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <watzon> Oh yeah I forgot you asked about my zsh theme @dscottboggs_gitlab. It's `robbyrussel` from oh-my-zsh
<FromGitter> <dscottboggs_gitlab> really?
<FromGitter> <dscottboggs_gitlab> huh.
<FromGitter> <dscottboggs_gitlab> I thought it looked familiar but... huh. I thought I remembered it being more plain. I should look through the themes again I think.
<FromGitter> <watzon> I'm also using the Numix-Frost xfce theme with the xfce-4 terminal
<FromGitter> <watzon> Numix-Frost is where the colors came from I believe
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo28 has quit [Ping timeout: 248 seconds]
<FromGitter> <watzon> Anyone know if there's an easy way to get the bitsize of an Array?
<FromGitter> <Blacksmoke16> bytesize?
<FromGitter> <watzon> I suppose that would work too
<FromGitter> <watzon> I was thinking size in bits, but bytesize could always be divided by 8
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter> <Blacksmoke16> prob but i dont have any ideas atm
<FromGitter> <watzon> I'm surprised a method doesn't exist
<FromGitter> <watzon> But I cant find one in the docs
<FromGitter> <Blacksmoke16> im sure there is one, i just dont know where :p
<FromGitter> <watzon> sizeof only works with constants
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6vc1 ?
<FromGitter> <Blacksmoke16> idk what im doing
<FromGitter> <Blacksmoke16> :p
<FromGitter> <watzon> Those are always going to be 8 and 24 no matter what the array contains. I need to be able to do ⏎ ⏎ ```arr = [12_u64, 42_u64] ⏎ puts arr.bitsize``` ⏎ ⏎ and have it print 128 since the array contains two values of 64 bits each [https://gitter.im/crystal-lang/crystal?at=5cd24fe60824230a77f8d03b]
<FromGitter> <Blacksmoke16> ah sec
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6vc6
<FromGitter> <Blacksmoke16> have to convert to slice first
<FromGitter> <watzon> Ahh there we go
<FromGitter> <watzon> Thanks :)
<FromGitter> <Blacksmoke16> np
rohitpaulk has joined #crystal-lang
<FromGitter> <Blacksmoke16> oh
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6vc8
<FromGitter> <watzon> Hmm interesting. I had considered that, but I wasn't sure how it would react with Arrays that have multiple possible types
<FromGitter> <Blacksmoke16> prob not much diff than what slice is doing under the hood
<FromGitter> <Blacksmoke16> but idk, not my area of expertise
<FromGitter> <Blacksmoke16> anyway im off to bed o/
<FromGitter> <watzon> Good night!
rohitpaulk has quit [Ping timeout: 255 seconds]
<FromGitter> <watzon> Ok this is driving me crazy, can anyone explain why these two methods, one in javascript and one in crystal, which are basically exactly the same, are giving two different results? ⏎ Javascript: https://repl.it/repls/LeanPepperyTruetype ⏎ Crystal: https://repl.it/repls/CoralInternalTransfer
<FromGitter> <watzon> Or if you don't want to visit the repls ⏎ Javascript ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cd2621db149ca50985303de]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
DTZUZO has quit [Ping timeout: 248 seconds]
<FromGitter> <bew> The forum is down? (unreachable for me) https://forum.crystal-lang.org
<FromGitter> <bew> @watzon the js version uses signed integers, so `x << (32 - len)` is negative
<FromGitter> <vladfaust> @bew confirming
<FromGitter> <watzon> @bew how would I fix it then? Changing the UInt64 to a normal Int64 doesn't work.
<FromGitter> <bew> Yeah i figured.. I'm on phone right now, but i'd say try to see the types of the js version, what are the wanted results, or fully understand the code and redo it in Crystal (maybe a bit differently)
<FromGitter> <bew> (btw the repls are impossible to use with my phone, the auto completion gets in the way so much and my keyboard is lost :/)
<FromGitter> <watzon> The JavaScript version returns `1097364144128` and the Crystal version returns `1101659111424`
<FromGitter> <watzon> I just don't understand. I've been scratching my head for hours lol
<FromGitter> <vladfaust> @watzon I advise you to split the JS code into logical blocks and understand what each of them does and experiment with inputs and outputs
<FromGitter> <watzon> I've tried that haha. You wouldn't think that such a small block of code would be so hard to make work correctly
<FromGitter> <vladfaust> Indeed. I'm dumb in numbers manipulation, so I wouldn't make it work either
* FromGitter * vladfaust doesn't know numbers, but does frameworks
<FromGitter> <vladfaust> A little thing to share. I've setup onyx CI on Travis so it triggers dependent builds. This way I'm more confident about the changes
<FromGitter> <vladfaust> The latest three were triggered by the `onyx` commit
notdaniel has joined #crystal-lang
<FromGitter> <vladfaust> See the message, it's the commit which triggered the build
<FromGitter> <vladfaust> I inject them certain commits in `.shard.yml` like this: https://github.com/vladfaust/crystalworld/blob/master/.travis/inject-dependencies.js
notdaniel has quit [Remote host closed the connection]
<FromGitter> <watzon> @vladfaust is indeed good at frameworks
blassin has quit [Quit: The Lounge - https://thelounge.chat]
waheedi has joined #crystal-lang
blassin has joined #crystal-lang
<FromGitter> <MrSorcus> Hi there. ⏎ `LibC::VaList` in `fun` is not usable?
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 258 seconds]
_whitelogger has joined #crystal-lang
<FromGitter> <bew> Usable how?
<FromGitter> <vladfaust> Experimenting with `Thread`s. https://carc.in/#/r/6vf8 works on local machine, but a simple task hangs forever, although putting `task completed` two times -- https://carc.in/#/r/6vfb
<FromGitter> <vladfaust> `Channel#send` doesn't work in this case for some reason
DTZUZO has joined #crystal-lang
sz0 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron- has joined #crystal-lang
<FromGitter> <Blacksmoke16> @watzon order of operations maybe?
<FromGitter> <Blacksmoke16> its the bitwise operator @watzon
<FromGitter> <Blacksmoke16> wait
<FromGitter> <Blacksmoke16> interesting
waheedi has quit [Quit: waheedi]
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6vh0
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6vh0
<FromGitter> <Blacksmoke16> maybe a bug with autocasting?
<FromGitter> <Blacksmoke16> the first prob overflows
<FromGitter> <Blacksmoke16> hr
waheedi has joined #crystal-lang
lucasb has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
alexherbo2 has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
OvermindDL1 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
moei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
waheedi has quit [Quit: waheedi]
waheedi has joined #crystal-lang
jeremycw has joined #crystal-lang
<FromGitter> <jwoertink> I love that @Sija will comment in the future about the times being wrong in the past
<FromGitter> <jwoertink> 😂
rohitpaulk has quit [Remote host closed the connection]
return0e_ has quit [Remote host closed the connection]
olbat has joined #crystal-lang
lucasb has quit [Quit: Connection closed for inactivity]
alexherbo2 has joined #crystal-lang
<FromGitter> <watzon> Just sent in my resume to Manas :D
jeremycw has quit [Ping timeout: 244 seconds]
<FromGitter> <bew> @watzon really? Do you apply for an open position?
<FromGitter> <watzon> @bew nothing specific. I just sent in my resume and cover letter to the jobs email.
rohitpaulk has joined #crystal-lang
<FromGitter> <bew> Oh ok, nice!
alexherbo20 has joined #crystal-lang
dostoyevsky has quit [Ping timeout: 250 seconds]
alexherbo2 has quit [Ping timeout: 250 seconds]
dostoyevsky has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <mwlang> Greetings, folks. I'm looking how to write Crystal bindings for Ruby. I found this: https://www.slideshare.net/AnnaKazakova/how-to-write-ruby-extensions-with-crystal and followed his examples in the slides, but it doesn't work when it comes to compiling with make because there is no /usr/local/opt/crystal/embedded/lib in the HomeBrew installed crystal folder he's referencing.
<FromGitter> <mwlang> so...google-fu failing me, are there other blogs or articles out there more recent and documenting how to write libraries in Crystal for Ruby consumption?
<FromGitter> <mwlang> Also found this: https://github.com/phoffer/crystalized_ruby but likewise seems to be out of date three years later.
rohitpaulk has quit [Ping timeout: 255 seconds]
<FromGitter> <straight-shoota> @mwlang I'm not sure how homebrew sets up your dir structure
<FromGitter> <straight-shoota> But there should be a lib directory somewhere alongside the location of the `crystal` program
<FromGitter> <straight-shoota> Unrelated link promotion: https://crystal-lang.org/2019/05/08/formatting-pretty-numbers-for-humans.html =)
<FromGitter> <straight-shoota> > I love that @Sija will comment in the future about the times being wrong in the past ⏎ ⏎ There is something really strange going on with Github's clocks today... But IIRC this has happened before some time ago
<FromGitter> <mwlang> @straight-shoota well, I did find /usr/local/opt/crystal/src/lib_c and /usr/local/opt/crystal/src/lib_z
<FromGitter> <mwlang> upgraded from 0.27 to 0.28 and now I have embedded folder.
<FromGitter> <mwlang> Getting an error, "Undefined symbols for architecture x86_64" , https://gist.github.com/mwlang/6db6a1609f83ed112639a1cf527ae8f8 so that's progress, but I'm not sure where to go from here.
<FromGitter> <mwlang> seems to be finding the libraries now, but not the x86_64 architecture.
<FromGitter> <mwlang> spoke too soon, I reckon. The embedded folder is present, but it's empty.
<FromGitter> <mwlang> perhaps I need to install with homebrew with flags to get it to populate this folder?
<FromGitter> <straight-shoota> Crystal 0.28.0 needs a custom build libgc.a which should be distributed with the compiler
<FromGitter> <straight-shoota> typical path for this would be `$(dirname $(which crystal))/../lib/crystal/lib`
<FromGitter> <straight-shoota> libevent, libiconv, libcpcre should be installed on your system as dependencies of the crystal package. Maybe you just need to point cc to the correct location?
<FromGitter> <straight-shoota> It might also be that you're using cc somehow incorrectly here, I don't know.
<FromGitter> <straight-shoota> As long as you have a `cr_math.o` it's not Crystal's fault though 😆
<FromGitter> <straight-shoota> But instead of `--cross-compile` you should probably better use `--emit obj`
<FromGitter> <straight-shoota> Probably doesn't make a difference, but better expresses the intent
jeremycw has joined #crystal-lang
jeremycw has quit [Ping timeout: 252 seconds]
moei has quit [Quit: Leaving...]
<FromGitter> <watzon> `foot.in_door = true`
<FromGitter> <mwlang> Let me try --emit obj
<FromGitter> <mwlang> well, that didn't change the error, but I do have a cr_math.o
<FromGitter> <watzon> It's unfortunate that `.cr` domains are so expensive
<FromGitter> <kevinelliott> that's why i got a `.st` domain (`cry.st`)
<FromGitter> <kevinelliott> and `crystal.sh`
<FromGitter> <Blacksmoke16> `cryst.al`
<FromGitter> <Blacksmoke16> :p
<FromGitter> <kevinelliott> You can look at my size domz.io to find the cheapest places to register those.
<FromGitter> <kevinelliott> I guess I only know of one place to register it... :( https://www.domz.io/tlds/cr
<FromGitter> <mwlang> I need ruby.crystal :-)
<FromGitter> <girng> who has crystal.cr?