jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<deimos_> thanks, maybe it doesn't like my url
<FromGitter> <Blacksmoke16> is there an error or something?
<deimos_> i found it, i didn't have git: git://
<FromGitter> <Blacksmoke16> πŸ‘
<deimos_> i just had git: domain/path/to/raw
<deimos_> err, domain.tld/path/to/raw
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 272 seconds]
f1refly has joined #crystal-lang
chillfox has joined #crystal-lang
<FromGitter> ... lazy/greedy or other more advanced stuff.
<FromGitter> <jasonm23> > Your 7yr old understands regex? He's already a genius! :-) ⏎ ⏎ @asterite - Well, she's having more difficulty with the `when` than anything else. Seems it's harder to grasp/build that larger structure for her. The little bits of Regex in there were done in a Ruby IRB first so she could play with it faster. We only needed to cover character classes and the `|` or so it's not like we had to worry about
<FromGitter> <jasonm23> TBF she only needed to *understand* what I was typing in and guess what would happen next. She was primed with information beforehand / during. I would imagine if I ask her to explain this stuff again today, she'll not remember. Practice is vital isn't it.
chillfox has quit [Read error: Connection reset by peer]
Stephanie has quit [*.net *.split]
duane has quit [*.net *.split]
DTZUZU has quit [*.net *.split]
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
duane has joined #crystal-lang
DTZUZU has joined #crystal-lang
Stephanie has joined #crystal-lang
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
deavmi_ has joined #crystal-lang
deavmi has quit [Read error: Connection reset by peer]
deavmi_ has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
deavmi has quit [Remote host closed the connection]
deavmi has joined #crystal-lang
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
<FromGitter> <huuhait> anyone have example websocket server for crystal lang?
<FromGitter> <huuhait> Hi. ⏎ anyone have example websocket server for crystal lang?
<FromGitter> <j8r> note, it does not terminate sessions gracefully
<FromGitter> <asterite> Anyone knows what string search algorithm is this? https://github.com/ruby/ruby/blob/2e80c8347e27f8ecedab56bab105d69efa35cbea/re.c#L197-L217 It's really fast!
<FromGitter> <naqvis> skip search
<FromGitter> <asterite> thank you!
<FromGitter> <naqvis> Thank you Ary
<FromGitter> <asterite> first time I hear about that algorithm... I wonder why Ruby uses it... Go uses rabin karp, crystal too...
<FromGitter> <naqvis> in my knowledge, mostly influenced by Boyer–Moore string-search algorithm
<FromGitter> <naqvis> B-M uses skiptables
<FromGitter> <naqvis> PG uses the Boyer-Moore-horspool for finding substrings
<FromGitter> <naqvis> so it might have got influence from that
<FromGitter> <naqvis> sorry, don't know Ruby
<FromGitter> <asterite> thanks, it's okay
<FromGitter> <asterite> me neither, haha
<FromGitter> <naqvis> sure thing :P
<FromGitter> <asterite> I mean, I know a bit of using ruby but not so much how it's implemented
<yxhuvud> when it comes to string searching there is also the case of choosing which case you optimize for. The one that has slightly better theoretical performance also have slightly higher setup costs, so for most cases it won't be worth going for the "optimal" solution
duane has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
iwq has quit [*.net *.split]
iwq has joined #crystal-lang
<FromGitter> <asterite> yxhuvud: thanks! I guess I'll leave things as
<FromGitter> <asterite> they are... in the future someone will come and optimize this
tsujp has quit [Ping timeout: 256 seconds]
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
tsujp has joined #crystal-lang
postmodern has joined #crystal-lang
tsujp has quit [Ping timeout: 240 seconds]
renich has joined #crystal-lang
<oprypin> https://carc.in/#/r/9m69 😒
<oprypin> ah we're good https://carc.in/#/r/9m6b
<FromGitter> <asterite> probably a bug, `Bar` should point to the top-level
<FromGitter> <grkek> Henlo
<FromGitter> <Blacksmoke16> o/
mistergibson has joined #crystal-lang
<FromGitter> <lebogan> Hello all. I have a small app with the following:
<FromGitter> <lebogan> ```code paste, see link``` ⏎ ⏎ Does it make any sense to DRY this out using macros? Thanks [https://gitter.im/crystal-lang/crystal?at=5f4d5d50ec534f584fd49f48]
<FromGitter> <Blacksmoke16> seems kinda strange that these things set ivars and return them?
<FromGitter> <Blacksmoke16> like i assume they're used in other commands?
<FromGitter> <Blacksmoke16> but given you just have 2 prob not a big deal, really dont even need to use a macro...a private method would work just fine
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #crystal-lang
<FromGitter> <lebogan> @Blacksmoke16 yes I use the in other methods. You're right - it's probably not a big deal. Thanks.
<FromGitter> <lebogan> Still learning...
<FromGitter> <Blacksmoke16> idk enough about what its doing/what the goal is but I'm pretty sure you could prob abstract some of that tho
<FromGitter> <Blacksmoke16> like what this class is/hows its called
<FromGitter> <lebogan> This is the class:
<FromGitter> <lebogan> Typing... ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5f4d61d65580fa092b37bbe7]
<FromGitter> <lebogan> Well, that didn't come through well :(
<FromGitter> <Blacksmoke16> hm, what about doing something like
Xeago has quit [Ping timeout: 258 seconds]
Xeago has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/9m6k
Xeago has quit [Ping timeout: 265 seconds]
<FromGitter> <Blacksmoke16> granted these aren't really commands since they dont do anything
<FromGitter> <Blacksmoke16> its more of a provider
<FromGitter> <Blacksmoke16> providing the configuration/command required for a specific thing
<FromGitter> <Blacksmoke16> id also consider making a record for the creds
<FromGitter> <Blacksmoke16> actually i found a bug, abstract defs should prob enforce the visibility of the implementation. I.e. i defined them as protected but they are implemented as public
<FromGitter> <lebogan> From simplicity to sheer elegance! It's going to take me a while to unwind this and actually understand it. Thank you so much for the insight. Still learning at 71!
<FromGitter> <Blacksmoke16> np
Xeago has joined #crystal-lang
mistergibson has quit [Quit: Leaving]
_whitelogger has joined #crystal-lang
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang