<FromGitter>
<Sophrinix> I'm sure this has been asked 100 times already, but I am not seeing it. How does crystal handle dependencies. Aka does crystal have the equiv of a Gemfile and bundler?
<Papierkorb>
We call them "shards"
<FromGitter>
<jwoertink> crystalshards.xyz
<FromGitter>
<jwoertink> ^ sorta like rubygems.org
<FromGitter>
<jwoertink> find one and check out the shard.yml file
<FromGitter>
<Sophrinix> okay this is making 100% more sense now
soveran has joined #crystal-lang
<FromGitter>
<jwoertink> Nice!
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/vXbfE
<crystal-gh>
crystal/master 584060e Bryan Mulvihill: Enum from_value when Flags (#3518)
<FromGitter>
<Sophrinix> next n00b question. the unit tests in a shard appear to be modeled after minitest or possibly rspec. Where is this documentation?
<FromGitter>
<Sophrinix> for that matter what is the unit test library called?
<Papierkorb>
It's Spec, modeled after rspec3 or so, with .should
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Philpax has quit [Ping timeout: 246 seconds]
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 246 seconds]
Philpax has joined #crystal-lang
onec has joined #crystal-lang
woodruffw has quit [Ping timeout: 250 seconds]
woodruffw has joined #crystal-lang
Philpax has quit [Ping timeout: 246 seconds]
Philpax has joined #crystal-lang
Philpax has quit [Ping timeout: 246 seconds]
soveran has joined #crystal-lang
Philpax has joined #crystal-lang
soveran has quit [Ping timeout: 250 seconds]
onec has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
sane_k_ has joined #crystal-lang
Philpax has quit [Ping timeout: 246 seconds]
Philpax has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
Philpax_ has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
Philpax has quit [Ping timeout: 246 seconds]
Philpax_ has quit [Ping timeout: 246 seconds]
Philpax has joined #crystal-lang
sane_k_ has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
Fichtenstein has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
mati_urunda has joined #crystal-lang
triangles has joined #crystal-lang
hako has quit [Ping timeout: 244 seconds]
hako has joined #crystal-lang
<FromGitter>
<maiha_twitter> How can I convert `String` to `Symbol`? Expected `to_sym` or `intern` method, but found nothing.
<BlaXpirit>
maiha_twitter, if you could convert a string to a symbol, then there would be no point to symbols
<BlaXpirit>
a symbol is meant to be a unique identifier, at compile time each symbol is converted to a number. at runtime you can't make up new symbols
<BlaXpirit>
(i'm not saying that symbols in ruby are pointless.. but they're pointless xD)
<FromGitter>
<maiha_twitter> I see. I want some function like `def symbolize(foo : String)` that returns `Symbol` or raise in runtime.
<BlaXpirit>
maiha_twitter, that would be... `case "a": :a case "b": :b`
<BlaXpirit>
if you tell more details, maybe we can come up with a neat macro to do this
<FromGitter>
<maiha_twitter> Yep, I'd like to call 3rd party library method defined as `def foo(name : Symbol)` via cli argument.
<BlaXpirit>
maiha_twitter, that library probably should've used an enum instead of a symbol
<FromGitter>
<maiha_twitter> Yeah, I hope it should be!
<FromGitter>
<sdogruyol> awesome!
<FromGitter>
<maiha_twitter> Strictly, we need some parser generator like racc, but I can't find some stuff in Crystal yet.
<FromGitter>
<maiha_twitter> So then, I'll manually parse XML by crystal-xml and CSS by myhtml for the first step.
onec has joined #crystal-lang
mester has joined #crystal-lang
<mester>
Hi
<FromGitter>
<fridgerator> hello
<mester>
I have a question about Crystal lang
<mester>
How I can read a string from stdin with function like fgets in C?
<mester>
if I write this code: "STDIN.gets somevar" the program freezes
<FromGitter>
<fridgerator> good question
<mester>
And, what is the solution?
<FromGitter>
<fridgerator> lol, not sure
<FromGitter>
<fridgerator> i'm looking around at some other libraries now to see if I can find an example
<mester>
If I write "somevar = STDIN.gets();"
<mester>
The program freezes and flushes the output after gets() call
<FromGitter>
<fridgerator> i'm not finding anything, someone else will have to answer your question
<tilpner>
mester - You just want to store a line from stdin to somevar, right? That will block if no input is available. Try typing something, then pressing enter
<tilpner>
I might misunderstand the question here
mester has quit [Ping timeout: 260 seconds]
<tilpner>
Well, sorry, no need to quit >.>
<FromGitter>
<fridgerator> lol
<FromGitter>
<jwoertink> If I had to guess, does LibC.fgets() work?
pawnbox has quit [Remote host closed the connection]
tilpner has quit [Remote host closed the connection]
<FromGitter>
<aurelien-ldp> Hi ! I was wondering if it is possible to get attributes of a class' instance at compile time. The same way we do for getting methods with `@type.methods`. Something like `@type.attributes` ?
<BlaXpirit>
aurelien-ldp, so.. what's an "attribute"?
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<FromGitter>
<aurelien-ldp> I mean a class variable