ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.21.1 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<Papierkorb> So I just commented the git clone line
<Papierkorb> rebuild and now it looks even more interesting
<RX14> yep
<RX14> well no
<FromGitter> <schoening> Whats the difference between @[Include( ... )] and @[Link(...)] ?
<Papierkorb> like it's not even sure itself what to do
<RX14> just run the executable many times Papierkorb
<RX14> you get yourself a random exception message generator
<Papierkorb> quite literally
<Papierkorb> I think you found Missingno
<Papierkorb> congrats
<RX14> it is BEYOND strange
olek_poz has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
<Papierkorb> RX14: is the issue somewhere in memory management? or is something else accidently overriden?
<RX14> not sure
<Papierkorb> interestingly enough my jit repl's show stopper is a memory corruption issue too, but I doubt it's connected
<RX14> i really should sleep
Ven has quit [Ping timeout: 240 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
j2k has joined #crystal-lang
j2k_ has joined #crystal-lang
j2k_ has quit [Read error: Connection reset by peer]
j2k_ has joined #crystal-lang
j2k has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
j2k_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <jwoertink> Is there anything in crystal similar to how in ruby you can do `Array(nil)` to get an empty array if the thing is nil?
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
<FromGitter> <fridgerator> do you know the type that will be in the array?
<FromGitter> <fridgerator> like `Array(String).new` ?
<FromGitter> <jwoertink> well, like, if I pass a hash of Hash(String, Array(String)?), and do something like `params["x"]`. that value could be an array of strings, or nil
<FromGitter> <jwoertink> so with ruby, I would do something like `Array(params["x"]).empty?`
<FromGitter> <jwoertink> because it will either be an empty array or an array of strings
bjz has joined #crystal-lang
<FromGitter> <fridgerator> `params["x"].nil? Array(String).new : params["x"].not_nil!` ?
<FromGitter> <fridgerator> i dont know if the `not_nil!` is necessary
<FromGitter> <jwoertink> bleh :p That's what I figured
<FromGitter> <fridgerator> yeah I don't know of a way without checking for nil
<FromGitter> <jwoertink> cool, thanks
<FromGitter> <jipiboily> Hey folks! I'm super new here, didn't even go through the doc yet...looking at the tools to see if I can do what I want, easily.
<FromGitter> <jipiboily> Is there an ORM that's kinda used by a good chunk of the community?
<FromGitter> <jwoertink> https://github.com/fridgerator/crecto
<FromGitter> <jwoertink> There's that thing ^
<FromGitter> <fridgerator> lol
<FromGitter> <jipiboily> I saw it, as well as like 6 or 7 others, none seemed very popular at first. Is crecto *wildly* used?
<FromGitter> <fridgerator> I don't know if any of them are wildly used at this point
<FromGitter> <jipiboily> fair enough
<FromGitter> <jwoertink> Yeah, by "wildly", do you mean by like more than 5 people?
<FromGitter> <jipiboily> I don't have a def, but I guess, maybe a decent percentage of the crystal community...doesn't look like any has this traction at first. And your answers sort of confirms my theory :)
<FromGitter> <jipiboily> so, most people are just doing plain SQL, with like crystal-pg?
<FromGitter> <jipiboily> When using a DB, that is.
<FromGitter> <fridgerator> I wrote crecto because I liked how ecto separates the business logic from the database logic
<FromGitter> <fridgerator> whereas with active record everything is in the model
<FromGitter> <jwoertink> I'm doing manual SQL for now because I'm still trying to get my crystal work flow going. I tried active_record but it didn't seem updated often
<FromGitter> <jipiboily> gotcha; I like that. Will look. Any big features still to be done that I should be aware is lacking?
<FromGitter> <jwoertink> I like how crecto is being setup, so I'll end up switching to that
<FromGitter> <jipiboily> yeah, also saw active_record.cr wasn't very active.
<FromGitter> <jipiboily> I'll give it a shot. kermal + crecto seems like what I'll try.
<FromGitter> <jipiboily> Thanks folks! :)
<FromGitter> <fridgerator> only supports mysql and postgres right now
<FromGitter> <jipiboily> all I need is pg, so I'm good.
<FromGitter> <jipiboily> Is there a Crystal Conference yet?
<FromGitter> <jipiboily> @ukd1 you should organize a Crystal conf in SF :D
<FromGitter> <fridgerator> there has been some meetups in various places, I thought I read about something they were trying to organize in SF
<FromGitter> <jipiboily> I used to work with @ukd1 who I think is organizing the SF meetup...hopefully he knows. Right Russ?
<FromGitter> <jipiboily> ok, another noob question here...well, not noob, but I like to know what's idiomatic and/or common when learning new languages and tools. Is there a more common way to build web apps in Crystal? More specifically, is it more generally accepted to build a backend app which is just an API with a front-end app in React or Angular, or people are often rendering views on the server side?
<FromGitter> <jipiboily> I might go the Crystal+React route...but curious to what's common, if there is anything common, yet!
<FromGitter> <jwoertink> I don't think anything is really common yet
<FromGitter> <jipiboily> gotcha
<FromGitter> <fridgerator> I think its a preference thing
<FromGitter> <jwoertink> The language itself is only about ~3 years old, and really only start gaining some serious traction in the past year ish
<FromGitter> <fridgerator> but IMO a lot of people are moving towards more of a microservice architecture, where the backend and frontend are separate
<FromGitter> <jipiboily> Exciting stuff so far.
<FromGitter> <jwoertink> me personally, I can't stand react or angular, so I render views on server side, but yeah, all about preference
<FromGitter> <jipiboily> :+1:
<FromGitter> <jipiboily> Thanks guys
<FromGitter> <jwoertink> Welcome to the community!
<FromGitter> <jipiboily> :heart:
<FromGitter> <jwoertink> Now there's 9 of us!
<FromGitter> <jwoertink> :D
<FromGitter> <jipiboily> lol
<FromGitter> <fridgerator> "there are literally dozens of us"
Ven has quit [Ping timeout: 246 seconds]
<FromGitter> <jwoertink> hahah. Baker's dozen
Ven has joined #crystal-lang
bew78 has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bew78> Hi, is it possible to parse a json looking like: `[1, 2, 3]` with JSON.mapping ?
<bew78> with: `class A; JSON.mapping(ints: Array(Int32)); end`
<bew78> how do I call the `A.from_json` ?
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 268 seconds]
<FromGitter> <jipiboily> What are you folks using for database migrations? `micrate` is not working here, and can't find why at first; maybe there's an alternative?
<FromGitter> <jwoertink> lol
<FromGitter> <jwoertink> Ruby
<FromGitter> <jipiboily> :)
<FromGitter> <jwoertink> I tried micrate and ran in to issues, so for now I just use Ruby to supplement what I can't do easily in crystal
<FromGitter> <jipiboily> kk
<FromGitter> <jwoertink> like with my shard Fez https://github.com/jwoertink/fez I use ruby for a few things
<FromGitter> <fridgerator> I havent had any issues with micrate
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 256 seconds]
<FromGitter> <jipiboily> Ah, ok, the brew install doesn't work but the Crystal API to micrate works it looks like.
bjz has joined #crystal-lang
Ven has quit [Ping timeout: 256 seconds]
Ven has joined #crystal-lang
<FromGitter> <fridgerator> gotcha
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
Ven has quit [Ping timeout: 256 seconds]
Ven has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 268 seconds]
pawnbox has joined #crystal-lang
Ven has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 268 seconds]
Ven has joined #crystal-lang
_whitelogger has joined #crystal-lang
olek_poz has joined #crystal-lang
bjz_ has quit [Ping timeout: 268 seconds]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
_whitelogger has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
xmonader has joined #crystal-lang
<synstack> oops
<synstack> wrong channel i'm very sorry
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
pawnbox has joined #crystal-lang
mjago has joined #crystal-lang
Qchmqs has joined #crystal-lang
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
akwiatkowski has joined #crystal-lang
olek_poz has quit [Ping timeout: 260 seconds]
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
IRCFrEAK has joined #crystal-lang
IRCFrEAK has quit [K-Lined]
Ven has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
Ven has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
Qchmqs has quit [Ping timeout: 246 seconds]
pawnbox has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olek_poz has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 260 seconds]
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
bjz has joined #crystal-lang
Ven has quit [Ping timeout: 264 seconds]
<FromGitter> <faustinoaq> ((http://i.imgur.com/WdYtebS.png)) #4127 :sweat_smile: *Random SEGFAULT/Exception Generator*
<DeBot> https://github.com/crystal-lang/crystal/issues/4127 (Segfault while raising on linux)
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
xmonader has quit [Remote host closed the connection]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 268 seconds]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Qchmqs has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Ven has quit [Ping timeout: 264 seconds]
Ven has joined #crystal-lang
bew78 has quit [Quit: WeeChat 1.7]
bew has joined #crystal-lang
bew is now known as bew78
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Ven has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ven has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
olek_poz has quit [Ping timeout: 260 seconds]
alibby has joined #crystal-lang
Ven has quit [Ping timeout: 246 seconds]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Philpax has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
Qchmqs has quit [Quit: Konversation terminated!]
greengriminal has joined #crystal-lang
A124 has quit [Quit: '']
Ven has quit [Ping timeout: 258 seconds]
A124 has joined #crystal-lang
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 258 seconds]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 256 seconds]
Ven has joined #crystal-lang
olek_poz has joined #crystal-lang
bew78 has quit [Quit: WeeChat 1.7]
pawnbox has quit [Remote host closed the connection]
Ven has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
Ven has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
bmcginty has quit [Ping timeout: 240 seconds]
bmcginty has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
bjz has joined #crystal-lang
<adam12> dyld: Library not loaded: /usr/local/opt/libevent/lib/libevent-2.0.5.dylib
<adam12> Hmph interesting.
<adam12> libevent: stable 2.1.8 (bottled)
<adam12> I guess that explains why the 2.0.5 version isn't found .. but I wonder how other Crystal'ers are handling this.
<FromGitter> <jipiboily> I had this yesterday when trying the brew version of migrate. Used their Crystal APPi instead. Also wondering what's up with that.
<adam12> This was for the Guardian project (which looks kinda abandoned, anyways): https://github.com/f/guardian
<adam12> I could build from source instead of using brew version, but I have my own things I thought about distributing so it makes sense maybe to figure out this linking bit.
bew78 has joined #crystal-lang
<bew78> How do I simply transform an Array(Array(T)) to Array(T) by merging all the arrays ?
<RX14> bew78, array.flatten?
<bew78> RX14: oh yes perfect I missed that one
Ven has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bew78 has quit [Quit: WeeChat 1.7]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
Ven has joined #crystal-lang
Ven has quit [Client Quit]
Ven has joined #crystal-lang
olek_poz has quit [Ping timeout: 246 seconds]
bjz has joined #crystal-lang
BlaXpirit has quit [Quit: Bye]
BlaXpirit has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phase_ has joined #crystal-lang
Philpax has joined #crystal-lang
<FromGitter> <elorest> How would I link a local c file. To become familiar with c bindings I'm just trying to link a simple helloworld function. https://gist.github.com/elorest/2ae9fe3ef00024f4ac4894cb4bd715e2
phase_ has quit [Quit: cya l8r alig8r]
mjago has quit [Ping timeout: 260 seconds]
<Papierkorb> elorest, compile the c file first: `gcc -c -o helloworld.o helloworld.c`
<Papierkorb> elorest, then link against that .o (= object) file
<FromGitter> <fridgerator> is `crystal docs` broken atm?
<FromGitter> <elorest> Thanks. What would the syntax for linking at the point be? @[Link("say.o")] ?
<Papierkorb> yeah try that elorest
<Papierkorb> say if it doesn't work
<FromGitter> <fridgerator> getting an error trying to build docs for Crecto in master branch: http://pastebin.com/Cw5tNZtZ
<FromGitter> <elorest> I'm still getting an error when I try to compile that in crystal.
<Papierkorb> elorest, then it's @Link[ldflags: "helloworld.o"]
<Papierkorb> elorest, err, correction @[@Link(ldflags: "helloworld.o")]
<FromGitter> <elorest> Thanks. I'm trying that.
<Papierkorb> @[Link(ldflags: "helloworld.o")]
<Papierkorb> jesus
<Papierkorb> maybe I should create a github pages block and write stuff like this down. Something's telling me you'll not be the last who asks about this.
<FromGitter> <elorest> Thanks for your help. It works when I provide the entire path: "@[Link(ldflags: "/Users/isaac/workspace/hello_c/helloworld.o")] ⏎ "
<FromGitter> <elorest> I've spent the last 4 hours reading everything I could find about linking on stackoverflow, google pages, github issues.
<Papierkorb> elorest, the quick rundown is that Crystal uses an external linker (not sure if it's `gcc` or using `ld` or whatever for that). So in fact you can write anything in the ldflags: argument there to have it copied *verbatim* to the linker line
<Papierkorb> elorest, your same code, try the build command and pass --cross-compile to it. It'll print a gcc line to use to link your program. You'll see it copied your helloworld.o path to it
<FromGitter> <elorest> Yeah I noticed that. Thanks. This seems to work fine: "@[Link(ldflags: "#{__DIR__}/helloworld.o")]"
<Papierkorb> elorest, that's even abused by Crystal itself: Passing $(), or ``, enables you to run code, effectively allowing you to e.g. use tools pkg-config to grab correct ldflags. I fear all of this makes much more sense if you have a C background
<Papierkorb> Good to know, thought about asking you to try that too
<FromGitter> <elorest> thanks for your help I'm working on writing a wrapper around bluez for bluetooth support in linux.
bjz has joined #crystal-lang
<FromGitter> <elorest> I've done a decent amount with c++ but basically nothing with c unfortunately. Thanks so much for your help