RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.20.4 | 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> I really need a parser generator. I really don't want to build a parser generator. durr.
<RX14> why do you need a parser gnerator?
<Papierkorb> Wanna explore LLVM, so I need to parse code to do something useful with it
<RX14> why not just build a traditional lexter + parser?
<RX14> It's really not that hard, and I think it's easier in the long run
<Papierkorb> for a LL parser, you can do that, not great to read but yes. Not for any other algorithm though
<Papierkorb> Or simply harder to read than that BNF-esque file you stuff into the generator
<RX14> can't lexer + recursive descent parser parse pretty much everything?
<Papierkorb> LL can't do left recursion
<Papierkorb> Which isn't that big of a deal to me
<RX14> I've never really covered that part of theory
<Papierkorb> I just like the EBNF syntax more
<Papierkorb> It's easier to see if you've got a parser bug in `foo bar baz { do_stuff }` than in `when "foo" case next_tok when "bar" ...`
<Papierkorb> In fact, one could go wild and write a crystal parser generator which works through the macro run method.
<Papierkorb> I still think of the `run` macro method as being insane, but, if it's of use to me .. :P
Philpax has joined #crystal-lang
bjz has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
<Papierkorb> "I don't want to build a parser generator" he said
<Papierkorb> gg
<Papierkorb> But who parses the parser generators input syntax file?
<Papierkorb> durr
<FromGitter> <samueleaton> What does a leading double colon mean? like `alias Int32OrNil = Int32 | ::Nil` or here https://github.com/crystal-lang/crystal/blob/591f8ef030fe81d052b8e868ee1b08b451623cdf/src/json/mapping.cr#L200
<Papierkorb> samueleaton, forces Crystal to look up `Nil` starting at the global scope, and not on the local scope
<FromGitter> <samueleaton> Oh ok. makes sense. I was assuming it meant to traverse up the module scope (like `../` in a filesystem) haha so I was close.
ome has joined #crystal-lang
Philpax has quit [Ping timeout: 248 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
<FromGitter> <MaxLap> So the docs is run through gitbook? i'm not familiar with it, but am I correct in thinking that this means "we" have no control over the actual rendered website?
pawnbox has quit [Ping timeout: 248 seconds]
pawnbox 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]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
snsei 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
unshadow has joined #crystal-lang
unshadow has quit [Client Quit]
unshadow has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: No route to host]
pawnbox has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #3892: Annotate private to spec methods/classes more (master...fix/specs/more-private) https://git.io/vMVRD
<DeBot> https://github.com/crystal-lang/crystal/pull/3892 (Annotate private to spec methods/classes more)
unshadow has quit [Ping timeout: 258 seconds]
pawnbox has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 252 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
ome has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<FromGitter> <david50407> @MaxLap what do you mean the control over the rendered website?
<FromGitter> <david50407> Right now, the doc is rendered by gitbook-cli tool which supports many plugins and custom template
<FromGitter> <david50407> (not the gitbook.com one, gitbook released its toolchain as open source project that we can render by ourself
snsei has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
DeBot has quit [Remote host closed the connection]
DeBot has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
<FromGitter> <samueleaton> @MaxLap The gitbook repo is here: https://github.com/crystal-lang/crystal-book ⏎ Any changes to the master branch are reflected in the site.
bjz has joined #crystal-lang
pawnbox 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
snsei has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
snsei has quit [Ping timeout: 258 seconds]
<crystal-gh> [crystal] hinrik opened pull request #3893: Fix misplaced \n in String documentation (master...fix_string_doc_multiline) https://git.io/vMVgb
<DeBot> https://github.com/crystal-lang/crystal/pull/3893 (Fix misplaced \n in String documentation)
pawnbox has joined #crystal-lang
<literal> is myset.to_a.sample the most efficent way to get a random element from a set?
pawnbox has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
Raimondi has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 252 seconds]
<BlaXpirit> literal, well it's probably the most reasonable way currently
Raimondi has joined #crystal-lang
<literal> alright
<BlaXpirit> literal, it might be more efficient to do like... taking random number in range of the size, then each_with_index and return value when index equals that number
<literal> I see
<BlaXpirit> literal, what you're doing wrong: the hash table contains values of the type Set(Int32), but you're trying to add a value of the type Set(Int32).class
<BlaXpirit> trying to add the type itself, not a value of the type
<BlaXpirit> probably want Set(Int32).new instead
<literal> ah, right
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 245 seconds]
<Yxhuvud> papierkorb: I have a parser generator. One problem though - it is only a recognizer so far as I've never figured out how to build the damned parse trees. (yeah, the plural on trees is intentional. It would generate them all)
<Yxhuvud> I should probably revisit it though - it has been many crystal versions since I looked at it and there are plenty of new features (and insight on my side) that should be applied.
pawnbox has joined #crystal-lang
<Yxhuvud> I should figure it out some day. Or year ;)
bjz has joined #crystal-lang
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
elia has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<crystal-gh> [crystal] MakeNowJust opened pull request #3895: Enclose true, false and nil in backquote on document comment (master...fix/doc/enclose-nil-true-false) https://git.io/vMVoD
<DeBot> https://github.com/crystal-lang/crystal/pull/3895 (Enclose true, false and nil in backquote on document comment)
<crystal-gh> [crystal] ysbaddaden closed pull request #3893: Fix misplaced \n in String documentation (master...fix_string_doc_multiline) https://git.io/vMVgb
<DeBot> https://github.com/crystal-lang/crystal/pull/3893 (Fix misplaced \n in String documentation)
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <MaxLap> @samueleaton I found that, but i was referring to things like improving the search for example
<FromGitter> <MaxLap> @david50407 Ah, interesting, the plugins route could be helpful for what I have in mind
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#ab64b03 (master - Fix misplaced \n in String documentation (#3893)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/191891940
<DeBot> https://github.com/crystal-lang/crystal/pull/3893 (Fix misplaced \n in String documentation)
pawnbox has quit [Remote host closed the connection]
A124 has quit [Ping timeout: 260 seconds]
A124 has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] mverzilli closed pull request #3895: Enclose true, false and nil in backquote on document comment (master...fix/doc/enclose-nil-true-false) https://git.io/vMVoD
<DeBot> https://github.com/crystal-lang/crystal/pull/3895 (Enclose true, false and nil in backquote on document comment)
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 248 seconds]
<travis-ci> crystal-lang/crystal#45e4f22 (master - Merge pull request #3895 from MakeNowJust/fix/doc/enclose-nil-true-false): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/191899619
<DeBot> https://github.com/crystal-lang/crystal/pull/3895 (Enclose true, false and nil in backquote on document comment)
Kug3lis has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <exts> is there a way to force crystal deps to delete shard.lock? i ran `crystal deps` and it kept checking for an old commit until i deleted that file. that normal? currently building from vagrant box ubuntu/trusty64 14.04
<FromGitter> <exts> nvm i know what happened, I'm an idiot - i was running crystal deps locally instead of through the vm... oops
A124 has quit [Ping timeout: 240 seconds]
A124 has joined #crystal-lang
Kug3lis has joined #crystal-lang
<FromGitter> <exts> anyone have an SMTP shard that supports auth?
<crystal-gh> [crystal] MaxLap opened pull request #3896: `crystal doc` checks is_crystal_repo based on any remote (master...max_fix_is_crystal_repo) https://git.io/vMVH4
<DeBot> https://github.com/crystal-lang/crystal/pull/3896 (`crystal doc` checks is_crystal_repo based on any remote)
<Papierkorb> Why does `alias Map = Hash(String, Map | String); Map.new` complain about `Map.new` not existing?
<Papierkorb> Was an old issue, but how do I do that then?
unshadow has joined #crystal-lang
<BlaXpirit> yeah weird, i don't know
<Papierkorb> Using a `record` for now. it's more annoying though
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
snsei has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 252 seconds]
<Yxhuvud> Hmm. Do we have any example somewhere of a self-recursive array type?
pawnbox has joined #crystal-lang
<Papierkorb> No, as they don't work :)
<Yxhuvud> that's inconvenient when working with trees :/
Kug3lis has joined #crystal-lang
<Papierkorb> Yep exactly my use-case
<splitty_> Do we have bitfield support in Crystal?
<RX14> also #bit on Int
<RX14> but not really in structs
<splitty_> Sadly neither of those are gonna work for me
<splitty_> So bit twiddling it is
<RX14> well you can copy #bit
<RX14> or do you need to do like
<RX14> multi-bit bitfields
<splitty_> I've already implemented #bit, but I need to set multiple bits
<splitty_> Y eah
<splitty_> RX14, I need to translate the following struct to Crystal: https://hastebin.com/opozuworic.cpp
<splitty_> Right now I just use a single UInt32 and use #bit and some bit twiddling to get the frame
<RX14> so thats... one and a half bytes before "frame"?
<RX14> who designed this!
<RX14> but yes, bit twiddling seems like the only way to do this
<RX14> you could open an issue
<RX14> and I think it would get momentum
<splitty_> I'll add it to my To-Do list
unshadow has quit [*.net *.split]
unshadow has joined #crystal-lang
<FromGitter> <spalladino> @Papierkorb have you seen https://github.com/ziprandom/cltk ?
DeBot has quit [Remote host closed the connection]
DeBot has joined #crystal-lang
<Papierkorb> spalladino, no I haven't
<Yxhuvud> spalladino: What parsing algo does that implement?
unshadow_ has joined #crystal-lang
unshadow has quit [Ping timeout: 255 seconds]
matp has joined #crystal-lang
unshadow_ has quit [Quit: leaving]
DeBot has quit [Read error: Connection reset by peer]
DeBot has joined #crystal-lang
<crystal-gh> [crystal] kostya opened pull request #3899: Select: fix case when select send executed before select receive, fixed #3862 (master...fix_select) https://git.io/vMwIr
<DeBot> https://github.com/crystal-lang/crystal/pull/3899 (Select: fix case when select send executed before select receive, fixed #3862) | https://github.com/crystal-lang/crystal/issues/3862 (Select in some cases hangs forever)
bjz has joined #crystal-lang
A124 has quit [Remote host closed the connection]
A124 has joined #crystal-lang
elia has joined #crystal-lang
matp has quit [Quit: ZZzzzZz...]
matp has joined #crystal-lang
vikaton has joined #crystal-lang
bazaar has quit [Quit: leaving]
bazaar has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]