<FromGitter>
<drosehn> @elorest : I think the libevent error has something to do with the way `brew` does things. One user suggested that this command would fix that problem: `brew switch libevent 2.1.8`.
<FromGitter>
<drosehn> In my case, I fixed it the stupid way, by creating a symlink for the version it *wanted* which points to the version of libevent that `brew` actually built.
<FromGitter>
<samueleaton> I enjoy doing more functional-style programming and have so `Proc`s in crystal seem natural to me, but I don't tend to see them a lot in other people's code. Is it weird to expose APIs in my shards that take procs and whatnot. What is the general opinion of Procs?
<FromGitter>
<faustinoaq> @samueleaton I use proc when I want a function as argument because I can do `call` but I don't see many Procs in crystal shards.
sz0 has quit [Quit: Connection closed for inactivity]
Raimondi has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 246 seconds]
tzekid has joined #crystal-lang
Raimondi has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
vifino- is now known as vifino
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
Raimondi has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
Ven has joined #crystal-lang
Ven is now known as Guest87256
Guest87256 has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
<FromGitter>
<luislavena> @vegai_ you cannot statically compile glibc, it will still load at runtime. While musl support exist and there is an Alpine repo, there is no static build with musl since it will also require building everything statically.
<FromGitter>
<luislavena> (zib, openssl, etc)
snsei has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tzekid has quit [Remote host closed the connection]
Raimondi has quit [Ping timeout: 268 seconds]
<FromGitter>
<ysbaddaden> my problem was LLVM, but AlpineLinux now distributes static packages for it, so I guess we could distribute a fully static crystal compiler (compiling zlib or gc or pcre isn't as scary as compiling LLVM)
Raimondi has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
elia has joined #crystal-lang
<kodo[m]>
🔮🔮🔮🔮🔮🔮🔮🔮🔮
<FromGitter>
<sdogruyol> what's that
<FromGitter>
<alex-lairan> Hi :) What the most mature shards for games? :)
<FromGitter>
<luislavena> @ysbaddaden was my understanding that Alpine didn't provide static version of their packages, so you couldn't use `-static` and generate standalone exectuables
<FromGitter>
<ysbaddaden> not always, it would seem
<FromGitter>
<ysbaddaden> they only provide a single llvm version... that breaks compatibility quickly
<FromGitter>
<ysbaddaden> so maybe they started distributing static packages, so binaries compiled against llvm won't break on a llvm libs upgrade
<FromGitter>
<fridgerator> excluding the windows ole stuff
<FromGitter>
<f-a-a> Hi all, I just started toying around with Crystal and Kemal, but I'm starting to feel running `crystal build --release src/your-app.cr && ./your-app` every code change is tedious. So how do you guys do it?
Raimondi has quit [Ping timeout: 268 seconds]
<FromGitter>
<fridgerator> you don't have to build for release every time, you can just do `crystal src/your-app.cr`
<FromGitter>
<fridgerator> also there are a couple of tools available that watch for when files change and reload your app for you
leonardschuetz has left #crystal-lang [#crystal-lang]
<FromGitter>
<domgetter> If not, it looks like I know what my first Crystal project will be :)
<FromGitter>
<samueleaton> @f-a-a I wrote sentry to solve that problem. Just run the install and do `./sentry` and it will do everything for you.
<FromGitter>
<samueleaton> Guardian is good for a wider variety of tasks but takes a little more setup for something like monitoring/restarting your app process whereas Sentry was made with that specific use case in mind and doesn't do much else.
<FromGitter>
<tzekid> @domgetter ECR templates seem to be the closes thing you'll get to hiccup, afai. found
Raimondi has joined #crystal-lang
<FromGitter>
<elorest> @fridgerator I just googled glass ruby paperweight.
<FromGitter>
<fridgerator> nice :thumbsup:
gloscombe has quit [Ping timeout: 268 seconds]
<FromGitter>
<elorest> Is anyone here going to railsconf?
<FromGitter>
<fridgerator> I am not
<FromGitter>
<elorest> Ok. We
<FromGitter>
<fridgerator> haha, do it
<FromGitter>
<fridgerator> "would you like to hear about my lord and savriour crystal?"
<FromGitter>
<chuckremes> Anyone have any information on crystal’s roadmap regarding threads? The wiki says it’s on a branch for now. Last commit was a month ago. Just curious if that’s a hot topic.
<BlaXpirit>
chuckremes, it's a hot topic in that people anticipate it
<FromGitter>
<chuckremes> Also, I may have some interest in creating a celluloid-like library for Crystal. I can do that now with just Fibers but it sure would be nice to be able to scale to multiple threads. :)
<BlaXpirit>
but it's very hard. almost all work was done within Manas and they don't publicise much about it, until it's done, I guess
<FromGitter>
<chuckremes> I see. Just did a quick search and see that Manas is the company behind crystal.
<FromGitter>
<chuckremes> I’ve worked on Rubinius for a while and have some inkling of the difficulties. I imagine they are wrestling with how to allow Fibers to migrate across Threads (way easier to disallow it).
<BlaXpirit>
meanwhile, yet another effort to support Windows seems to have died
<FromGitter>
<chuckremes> I’m less interested in that. I do use Windows & Ruby for work but JRuby has been very solid for me there. I imagine TruffleRuby will be good as well when I need more performance.
<BlaXpirit>
chuckremes, don't operating systems sometimes migrate threads across CPUs? are you sure this is useful?
<BlaXpirit>
oh right if it's a thread pool who cares if the thread migrates if it still has, for example, 50 fibers on it
<FromGitter>
<chuckremes> Yes, OS’s do migrate threads across cpus. That’s a world of difference from migrating fibers between threads.
<FromGitter>
<chuckremes> yep
<FromGitter>
<chuckremes> crystal made a good choice in creating channels as first-class objects
<FromGitter>
<chuckremes> if all fiber-to-fiber communication is managed via channels then the complexity is hidden from the end-user programmer. It’s hard on the compiler writer though. :)
pduncan has quit [Ping timeout: 246 seconds]
<FromGitter>
<fkchang> @elorest good luck, I've had a number of conferene proposals on crystal rejected, I did get a question on one I submitted to RubyConf last year before it was rejected
bjz has joined #crystal-lang
elia has joined #crystal-lang
elia has quit [Client Quit]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter>
<elorest> I'll just give a 15 minute lighting talk.
<FromGitter>
<elorest> lame that rust and elixir get air time at Railsconf but crystal can't
<FromGitter>
<elorest> Is there an opposite of includes? excludes? doesn't exist apparently.
<FromGitter>
<fridgerator> just `!includes?` ?
olek_poz has quit [Ping timeout: 260 seconds]
<FromGitter>
<redcodefinal> Hi guys, wanted to make sure I understand this correctly. https://play.crystal-lang.org/#/r/1slk. ⏎ ⏎ The test method here can only accept a class that has inherited from A correct?
<Papierkorb>
redcodefinal, that code is broken. Line 24 should be `def test(a : A)`
<Papierkorb>
Oh, that you mean
<Papierkorb>
redcodefinal, Line 24 .. try `def test(a : A.class)`
<FromGitter>
<redcodefinal> But I don't want to accept an instance of A, I want to accept the class A or it's inherited children
<KCreate>
Hey, does crystal have a factorial function somewhere?
bjz has joined #crystal-lang
<FromGitter>
<redcodefinal> I believe Math.gamma is what you are looking for. It's the same as fact(n-1)
<KCreate>
I'm getting: "undefined fun 'tgamma' for LibM"
<KCreate>
Do I need to install that somehow? I'm on macOS 10.12.3
<FromGitter>
<gettalong> Hey everybody! A quick question: If I use `when '\n'.ord` instead of `when 10`, does this incur a performance penalty or is this optimized by the compiler? How could I find such things out for myself?
<Papierkorb>
gettalong, the compiler should optimize that (or rather, LLVM)
<Papierkorb>
gettalong, you can read the disassembly (of the binary, or LLVM IR code), or you can write a lil' benchmark
<Papierkorb>
to see for yourself
<FromGitter>
<gettalong> Papierkorb: Thanks, good to know! Yeah, I thought about the benchmark but this would get old for every small change :wink:
<Papierkorb>
gettalong, write code fast first, then write fast code if needed
<FromGitter>
<gettalong> Just found the `crystal build --emit llvm-ir`, interesting but hard to decipher on first try :)
<Papierkorb>
Not trying to say you shouldn't think about your code, data structures etc., but `case 'f'.ord` is worth it if alone for being readable
<FromGitter>
<gettalong> Papierkorb: Yes, I should probably do that but my interests in how Crystal works behind the scenes sometimes gets the better of me. For what's worth, the last few days were quite enlightening
<Papierkorb>
I was (and sometimes still am) really impressed of what crazy optimizations LLVM does
<Papierkorb>
I wrote a `memcpy()` in Crystal. The generated disassembled function of that was shorter line-wise than what I wrote in Crystal. Kinda insane.