RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.2 | Fund Crystals 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
jamie_ca has joined #crystal-lang
jamie-discord2 has quit [Read error: Connection reset by peer]
Majost has quit [Ping timeout: 244 seconds]
Majost has joined #crystal-lang
havenwood has quit [Ping timeout: 244 seconds]
havenwood has joined #crystal-lang
havenwood has joined #crystal-lang
havenwood has quit [Changing host]
<FromGitter> <piedoom> That sounds like a perfect case.
rkeene_ is now known as rkeene
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
ylluminate has joined #crystal-lang
willl has quit [Quit: Connection closed for inactivity]
_jinks_ has quit [Ping timeout: 240 seconds]
eizua has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 252 seconds]
Raimondii is now known as Raimondi
_jinks has joined #crystal-lang
pawnbox has joined #crystal-lang
_jinks has quit [Ping timeout: 276 seconds]
soveran has joined #crystal-lang
ruby_ has quit [Remote host closed the connection]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
ylluminate has quit [Quit: Textual IRC Client: www.textualapp.com]
mose has quit [Changing host]
mose has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
fp_preist has joined #crystal-lang
_jinks has joined #crystal-lang
matp has quit [Quit: ZZzzzZz...]
bjz has joined #crystal-lang
matp has joined #crystal-lang
bjz has quit [Client Quit]
bjz has joined #crystal-lang
<fp_preist> Anyone reading this?
<FromGitter> <raydf> Hi
<fp_preist> I've been playing with Crystal lately.
<fp_preist> Mainly thanks to exercism.io
<FromGitter> <raydf> nice
<fp_preist> Do you know of any other ways I could learn more about Crystal?
onethirtyfive has joined #crystal-lang
<FromGitter> <raydf> There's a lot to do in crystal
<FromGitter> <raydf> maybe a small project for learning?
<fp_preist> That's an idea.
<FromGitter> <raydf> and this way you contribute to all the shards in the community :)
<fp_preist> Do you know any developer blogs that mention Crystal?
<FromGitter> <raydf> yes, let me give you some examples
<FromGitter> <raydf> http://www.mikeperham.com/
<fp_preist> Thanks!
<FromGitter> <raydf> http://soveran.com/
<FromGitter> <raydf> please try to read all the articles in the https://crystal-lang.org/ blog
<FromGitter> <raydf> there's a lot of info from the core developers
x0f has quit [Ping timeout: 265 seconds]
<fp_preist> I didn't know there was one.
<fp_preist> Thanks for pointing it out, I see it now.
<FromGitter> <raydf> I believe that's a lot of material for learning about the community :)
PhantomTaco has joined #crystal-lang
PhantomTaco has left #crystal-lang ["Leaving"]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x0f has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
_jinks has quit [Ping timeout: 276 seconds]
_jinks has joined #crystal-lang
matp has quit [Excess Flood]
pawnbox has quit [Remote host closed the connection]
_jinks has quit [Ping timeout: 276 seconds]
bew78 has joined #crystal-lang
<bew78> Hello, How can I make a Proc that can receive N number of arguments ?
<FromGitter> <david50407> bew78: Proc(A, B, C, D, ..., ReturnType)
<BlaXpirit> well yeah, but make sure you want an actual Proc in the first place. and do you mean it can be called with any number of arguments or exactly N
<bew78> I want to make a function like 'func(something, &block)' and depending on 'something', there will be 1, 2 or 3 (or more) arguments given to the block
<BlaXpirit> bew78, ummm so make 3 different ones?
pawnbox has joined #crystal-lang
<BlaXpirit> i don't think a Proc should be involved here
<BlaXpirit> u can make 3 methods with the same name, depending on the type of argument a different one will be called
<bew78> the 'something' is a string, and after parsing the string, the block will receive a bunch of args
matp has joined #crystal-lang
<BlaXpirit> that's.. not idiomatic
<bew78> BlaXpirit: hum, I don't understand that word..
<bew78> What do you mean ?
<BlaXpirit> i mean maybe there's an approach that aligns better with the features of the programming language
<BlaXpirit> maybe even your approach will just work, but i don't have time to try now
* BlaXpirit leaves
<bew78> I understand, thanks, I'll try
_jinks has joined #crystal-lang
jokke has quit [Remote host closed the connection]
jokke has joined #crystal-lang
bjz has joined #crystal-lang
_jinks has quit [Quit: leaving]
<bew78> I've found a way by using an Array(String) as first block argument, and by using Block arguments unpacking (ex: 'func(something) do |(arg1, arg2)| end' ), I can get what I want
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<bew78> BlaXpirit: do you think this aligns better with the features of crystal ?
<Papierkorb> bew78: Could you describe what you're actually trying to do?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
fp_preist has quit []
<bew78> an argument parser that allow me to do: 'parser.on "set USER ACL", "Add/Change user rights" do |(user, acl)| #something end' given a parser configuration for USER and ACL so it'll match a specific regex..
<bew78> Papierkorb:
<Papierkorb> ah
<Papierkorb> bew78: Mh yeah I think your argument unpacking approach is the best choice in this case then
<bew78> cool, I'm on the right track then :)
<Papierkorb> bew78: Maybe there's a way to do something like that though using macros
<Papierkorb> I'm fiddling with that atm, but I don't see much wrong with having () either..
<bew78> never really tried macro currently, I trying to get the most out no-macro code, but maybe there is a better way
<Papierkorb> Tbh, Macros aren't that bad. They're quite powerful and .. well they can at least .. read like normal code
<bew78> yeah true, macro are like 'next-level' for me, maybe later !
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bew78 has quit [Ping timeout: 264 seconds]
soveran has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<FromGitter> <sdogruyol> wow, this is pretty neat https://github.com/unn4m3d/crtype
<BlaXpirit> O_o
<BlaXpirit> i dont get it
<FromGitter> <sdogruyol> why?
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
<Papierkorb> What's the use-case?
<Papierkorb> Oh, to build a dynamic container. neat
<RX14> @piedoom you should contact asterite about labelling issues hacktoberfest
<BlaXpirit> a good way to get low-quality contributions
<RX14> we're not exactly going to be labelling compiler issues as easy
gewo1 has quit [Quit: WeeChat 1.0.1]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vPfWK
<crystal-gh> crystal/master c2cabff Julien Portalier: Add File.chown and File.chmod
gewo has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<travis-ci> crystal-lang/crystal#c2cabff (master - Add File.chown and File.chmod): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/163378429
<FromGitter> <dipnlik> what's the difference between http://crystalshards.herokuapp.com/ and http://crystalshards.xyz/ ? no additional info on either site, not sure which one is "better", even if both seem to get info from the same source
<RX14> @dipnlik crystalshards looks nicer, and seems to be better maintained
<RX14> they both get the info from github API
<BlaXpirit> dipnlik, 2nd is loosely based on 1st. 2nd seems uh... objectively better
<FromGitter> <dipnlik> @BlaXpirit that's what I thought, but I wanted to hear it from the community, didn't know if for example .xyz was a lame ripoff or maintained by an evil person or something like that
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
pawnbox has joined #crystal-lang
ruby_ has joined #crystal-lang
<asterite> the second one is basically "I think the first one has an ugly UI, so instead of sending a PR or discuss this with the maintainer I'll just make my version and not even mention the original source or effort in my copy"... which is something I kind of dislike, but, well, we can't control everything out there... I personally use the first one, it feels faster for me and the UI is simpler so easier to understand
<FromGitter> <sdogruyol> @asterite the first one is not maintained. So that's pretty much the reason we rolled out the 2nd :)
<FromGitter> <sdogruyol> Meanwhile it's not easy to remember something.herokuapp.com
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
<RX14> @sdogruyol did you try try to contact the crystalshards.herokuapp.com maintainer?
<FromGitter> <sdogruyol> sure, my friend @f did
snsei has joined #crystal-lang
<asterite> ah, i see...
snsei has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
ponga has joined #crystal-lang
johnjansen has joined #crystal-lang
<johnjansen> hi all, anyone know of an english language stemmer shard by chance?
mark_66 has quit [Remote host closed the connection]
<asterite> johnjansen: I don't think one exists, but the code here seems not very long, so a crystal port would be nice: https://tartarus.org/martin/PorterStemmer/ :-)
<asterite> (that is, if porter stemmer is good enough for you)
kulelu88 has joined #crystal-lang
<johnjansen> thanks @asterite, i was just contemplating that
<RX14> asterite, i don't know how i'm finding all these bugs recently but I suppose it's a good thing
<johnjansen> @asterite, in looking at some stemming code i just tripped over this (what i think is a regex) shortcut from ruby … which isnt valid crystal … never seen the syntax before and not sure if its something you want to support
<johnjansen> “Y” == ?Y
snsei has joined #crystal-lang
<johnjansen> or is it ternary
<pabs> johnjansen: it's a character test
<pabs> johnjansen: ?X is a ruby shortcut for a character literal (in older versions of ruby it would map to the character's ordinal value, now it's just a one-character string of the character)
<pabs> johnjansen: e.g., in ruby 1.8: ?x == 120, and in modern ruby ?x == "x"
<johnjansen> thanks for that … i had figured thats what it was, but you never know whats hiding behind syntax like that, and in case you were wondering, its impossible to search for that kind of stuff on the interweb ;-)
<johnjansen> just found this, which turns out to explain a bunch of other random stuff
pawnbox has joined #crystal-lang
Ven_ has joined #crystal-lang
Ven_ has quit [Ping timeout: 264 seconds]
Ven_ has joined #crystal-lang
kulelu88 has quit [Ping timeout: 244 seconds]
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
ishahnaz has joined #crystal-lang
ruby_ has quit [Ping timeout: 264 seconds]
soveran has quit [Remote host closed the connection]
<asterite> RX14: it's a good thing :-) Sometimes I'm surprised that some bugs are just found now, after so much time... but, well, it happens :-)
<RX14> asterite, yeah I feel like i've found half the bugs in 0.19.3!
<RX14> s/in/fixed for/
<asterite> Indeed :)
<RX14> i guess it's because my code is a bit messy and I remember more langauge features, so more of them get used in combination
<asterite> I usually program in one style so maybe I don't trigger some bugs... maybe your style of programming is pretty unique :-D
<RX14> maybe
<RX14> I've been working on https://github.com/RX14/clamd-continuousd
<asterite> I also sometimes check the ruby bug tracker and they still report syntax issues, so it's pretty amazing
<RX14> which watches a folder full of files
<RX14> and makes sure it's virus free
<RX14> I found most of the bugs doing that
<RX14> and the rand() Int64 bug was found randomizing timespans
<RX14> there should probably be a Time::Span.sample
<asterite> Oh, so they are real bugs! I thought you maybe was browsing the source code and considered some possible cases...
<RX14> which returns a point inside that timespan
<RX14> but then again
<RX14> that would have to be from now or ago
<RX14> asterite, nope
<asterite> In Rust one can random any value, I think they have to implement some kind of trait... it would be nice to have something similar in Crystal, don't know how yet
<RX14> I encountered the JSON bug while writing stats for it
<RX14> so I wanted an average files scanned per second in the last 10s, which was Infinity if there were no files scanned in the last 10s
<RX14> Time::Span.zero should exist too :)
<RX14> i forgot to add that to the issue tracker
<BlaXpirit> asterite, I have implemented a random number generation library, I can help on this topic
ruby_ has joined #crystal-lang
<BlaXpirit> that was for a different programming language, but I was able to generate random numbers of any type and any range. and well, for objects, they should just do it themselves
<asterite> BlaXpirit: nice!
<BlaXpirit> what's the problem with just making a `random` class method
<asterite> Yes, that's another approach. I think the use cases for random are pretty limited, like, mostly primitive types, time spans, but I don't know what else
<RX14> well
<RX14> you could assume the interface is
<RX14> to_i
<RX14> and new(i)
<RX14> then take a random using those numbers
<RX14> for ranges you would convert top/bottom to numbers
<RX14> then rand in the range
<RX14> then create a new with the random number
<RX14> but maybe thats a bit clunky
<RX14> .random would probably be nicer
<BlaXpirit> ow, so the standard library uses rand % max
<RX14> oh wow
<RX14> thats not particularly random
<BlaXpirit> and it will be problematic in a multithreaded environment
<BlaXpirit> seems like array.shufle use the global instance
<BlaXpirit> ah no, it's configurable, sorry
<BlaXpirit> still maybe the default instance should be thread local
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vPJUq
<crystal-gh> crystal/master 34689cb Ary Borenszweig: MD5: some renames
<crystal-gh> crystal/master c79f583 Ary Borenszweig: Fixed #3360: incorrect type flow regarding unreachable and '&&'
<BlaXpirit> anyway... once upon a time i implemented a way to avoid the imprecision of rand % max
<BlaXpirit> aaand i still can't be sure it's right
<BlaXpirit> at least it's quite easy with the limitation of uint32
<BlaXpirit> but limiting the RNG to uint32 is no good in the first place
<RX14> you can create a uint64 rng from 2 uint32s
<BlaXpirit> that's... not right
<RX14> why?
<BlaXpirit> you meant to say a random number probably
<BlaXpirit> oh wait, yeah, it is right but that's not the point
<RX14> why not?
<RX14> i mean
<BlaXpirit> i mean that some random number generators spit out 64 bit numbers, some spit out 8 bit numbers
<BlaXpirit> but standard library forces it to 32
<RX14> it's probablt got a rubish cycle size for a uint64 rng
<RX14> but there we go
<RX14> it would be nice if syscalls weren't so expensive, so we could just use kernel random
<BlaXpirit> been there, done that
<BlaXpirit> but yeah, it's for special uses only
jinnguyen has joined #crystal-lang
<jinnguyen> hi anyone using kemal at a production level ?
<RX14> yes, a few
<RX14> but i wouldn't recommend it unless you're a crystal expert already
<jinnguyen> I'm consider using it for some of my next api
<RX14> i mean, it's basically just kemal'c creator which uses it in prod
<jinnguyen> what would you recommend ?
<RX14> i assume you're new to crystal?
<jinnguyen> i'm new, just a week
<jinnguyen> been tinkering with kemal for some day
<RX14> you're going to have to upgrade your codebase through breaking changes every crystal release
<RX14> you're going to encounter bugs
<RX14> if you're ok with that, then sure
<RX14> it'll work great once it works
<jinnguyen> I see crystal as pretty fast, promising
<RX14> do you need fast? what's your data volume?
<jinnguyen> a few ten GBs though...
<jinnguyen> i mean my DB :D
<RX14> per what? what does this API do?
<RX14> oh
<RX14> i meant sort of requests per second
<jinnguyen> it's now around ~ 2k
<jinnguyen> for a product search
<RX14> well, it does sound like the kind of problem crystal would be good at
<RX14> but if you do it, be prepared to jump ship
<jinnguyen> i'm using crystall http request to couchbase since there is no driver yet
<RX14> if you can, start with only a small bit of crystal
<jinnguyen> get 10ms repsonse from db to client
Jomakasi has joined #crystal-lang
<BlaXpirit> well things are not that bad, after all old compiler versions are not going away
<BlaXpirit> but they can be insecure, you can't be sure about this aspect
<RX14> BlaXpirit, yes but the point is that we're not production ready or stable
<Jomakasi> hello
<RX14> sticking to an old compiler release is like sticking your head in the sand
<RX14> Jomakasi, hi
<jinnguyen> oh are you a crystal founder @RX14
<RX14> nope
<jinnguyen> yep
<RX14> i've been here... maybe a year?
<RX14> hmm
<jinnguyen> I read the protel been using crystal at product level
<BlaXpirit> jinnguyen, that's the company where creator of kemal works
<BlaXpirit> as mentioned previously
<jinnguyen> oh... okay
<RX14> hmm, looks like around august 2015 i came here
<jinnguyen> so he must be an expert to control his codebase :)
<jinnguyen> what do you guys doing with crystal ?
<jinnguyen> just asking for ref :D
<RX14> it's justa hobby for me
<wmoxam> ^^ same
<RX14> well, i don't have a job anyway... so
<RX14> i'm a student
<jinnguyen> oh cool
<jinnguyen> is crystal near it 1.0 yet ?
<RX14> probably not
<RX14> there's quite a todo list
<jinnguyen> 60% ~ 70% maybe ?
<RX14> and honestly I don't want to be releasing a 2.0 less than 2 years after 1.0
pawnbox has quit [Remote host closed the connection]
<RX14> jinnguyen, maybe about there
<jinnguyen> yep im spending 1hr each day for this ^^
<BlaXpirit> jinnguyen, i'm just porting some libs to write games in crystal. hopefully that will be a thing some day
<jinnguyen> oh game server or desktop :D
<BlaXpirit> i mean like normal games with graphics, not a server
pawnbox has joined #crystal-lang
ponga has quit [Quit: Connection closed for inactivity]
<jinnguyen> yep
<wmoxam> BlaXpirit: what libs are you porting?
<BlaXpirit> well one is very much done, the other just need a bit of docs
ishahnaz has quit []
<wmoxam> nice, chipmunk
<jinnguyen> +1
<wmoxam> I'm not familiar with SFML
<BlaXpirit> wmoxam, well it has an object oriented API which i directly mirror without having to invent things
<BlaXpirit> SDL is a mess in that regard, last i checked
<BlaXpirit> there are a few games made with SFML on Steam,
<BlaXpirit> but that's c++ of course
<wmoxam> cool
<wmoxam> I've mucked around with Gosu a bit in Ruby land
snsei has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Jomakasi has quit [Ping timeout: 272 seconds]
soveran has quit [Ping timeout: 264 seconds]
<jinnguyen> anyone try support multi core for crystal ?
<RX14> it should be coming
<jinnguyen> i'm running 3 different instances for 3 cores
<RX14> but it's a hard problem
<RX14> crystal will be multi-core by 1.0
<crystal-gh> [crystal] RX14 opened pull request #3362: Add Time::Span.zero (master...feature/span-zero) https://git.io/vPJmM
<travis-ci> crystal-lang/crystal#34689cb (master - MD5: some renames): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/163461693
pawnbox has quit [Remote host closed the connection]
<jinnguyen> im out now, have a nice day then
jinnguyen has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Ven_ has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vPJsQ
<crystal-gh> crystal/master 4b02fe5 Ary Borenszweig: Time: fixed bug introduced in 0.19.0 with a small typo
Ven_ has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
kulelu88 has joined #crystal-lang
<asterite> RX14: i would still recommend using and trying crystal, it's one of the best things to keep pushing the language forward
<RX14> asterite, yeah of course
<RX14> I would use crystal in production
<RX14> because I know I can handle it
<RX14> but i don't really want to recommend it to others
pawnbox has quit [Ping timeout: 272 seconds]
Ven_ has joined #crystal-lang
<RX14> asterite, will you be releasing 0.19.3 this friday?
<asterite> Yes, most probably
<RX14> nice
<johnjansen> @asterite ive done a quick and dirt port of a ruby based stemmer to crystal, just an FYI, thanks for the suggestion, thats one under my belt
<asterite> johnjansen: I saw it, just downloaded it and ran the specs :-P ... that was fast!
<asterite> johnjansen: how was the porting?
pawnbox has joined #crystal-lang
Ven_ has quit [Ping timeout: 264 seconds]
<johnjansen> pretty easy, the apis were so closely matched there wasnt much trouble with that, the tricky part was all the unusual references to global variables which i havent to be honest seen before like $` for eg, i wound up with irb and playground up side by side to resolve the differences
<johnjansen> the specs were also an almost direct port from the ruby library, so presuming its complete and correct, then we are all good
<asterite> Yeah, they look correct :)
<johnjansen> there is alot of tidy up which could be done, but otherwise im happy for today … its a rush job as i have a rush project which i decided id do in crystal
<asterite> I think the missing bit is $`, there was a discussion on our issue tracker about that... can't remember whether we decided it was a good idea to port the concept or not
<johnjansen> its part of a classifier im re-writing …
<asterite> Nice!
<johnjansen> on that note, do you know much about kemel-klassify
<asterite> No idea
<johnjansen> i know its meant to be a port of a python tool (which BTW is slower than anything ive seen before_
<johnjansen> ok no problem, cheers
<johnjansen> this might be a dumb question, but any likelyhood of implementing destructive versions of some of the string methods etc, like chop! and gsub! etc …
Ven_ has joined #crystal-lang
<asterite> johnjansen: not really, mutable strings have a lot of problems
<johnjansen> fair enough ;-) its not such a burden, just thought id ask
Ven_ has quit [Ping timeout: 240 seconds]
<travis-ci> crystal-lang/crystal#4b02fe5 (master - Time: fixed bug introduced in 0.19.0 with a small typo): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/163479957
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
Ven_ has joined #crystal-lang
Guest51435 is now known as Cyrus
Cyrus has quit [Changing host]
Cyrus has joined #crystal-lang
Ven_ has quit [Ping timeout: 272 seconds]
Ven_ has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vPJVJ
<crystal-gh> crystal/master 8086061 RX14: Add Time::Span.zero...
<FromGitter> <drosehn> In my own programming style, I prefer to use the more readable method names off of $~, instead of the 1-character special variables. So $~.pre_match instead of $`.
eizua has quit [Quit: Leaving]
Ven_ has quit [Ping timeout: 244 seconds]
<FromGitter> <drosehn> It's probably true that part of the reason I do that is that I'm also prone to saving away one regex-result while doing a second regex. So ` somestr =~ /a/ ; sav_res = $~ ; rem = $~.post_match ; rem =~ /b/`, and then I use both save_res and $~ at the same time.
<johnjansen> @drosehn the $` doesnt work in crystal anyway
<johnjansen> i didnt know about $~
<johnjansen> so thanks
<FromGitter> <drosehn> Given that habit, it seems goofy (to me) to use $` for post_match of $~ at the same time as using sav_res.post_match.
<FromGitter> <drosehn> I know that crystal doesn't have $`. I'm just explaining my own coding style in response to @asterite saying that he couldn't remember if the crystal developers had decided that it should eventually be added. (someday... :smiley: ). In my case, I'd prefer to go without any of the special $-variables which are shortcuts for methods of $~.
<FromGitter> <drosehn> ... but that's due to the coding style that I prefer when writing ruby.
<johnjansen> totally … in several years of ruby i havent tripped over those till today, and honestly there are far more explicit ways of doing the same thing
<johnjansen> the guys who’s code im porting obviously knows what he’s doing, but it was very hard to find reference to the shortcuts he used, which made the port slower than it could have been (since i had to trap a bunch of variables, inspect them and then run them through the code to see what the result was)
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
<johnjansen> BTW @drosehn thanks for the $~.pre_match that enabled me to tidy up a bit in this case
<FromGitter> <drosehn> That's what's nice about "just chatting" about code that you're working on. You never know when helpful tips will pop up!
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
Ven_ has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
<FromGitter> <raydf> Hi @johnjansen, are you gong to share the code so we can learn from the porting process?
<travis-ci> crystal-lang/crystal#8086061 (master - Add Time::Span.zero): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/163510086
<FromGitter> <raydf> No pressure, just asking :)
Ven_ has joined #crystal-lang
go|dfish has quit [Ping timeout: 250 seconds]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
go|dfish has joined #crystal-lang
<FromGitter> <DougEverly> is there a way to expand the macros prior to build to see the generated code?
<BlaXpirit> DougEverly, i think there is but not sure how
<BlaXpirit> at least you can expand one macro by adding {% debug() %} to it
<FromGitter> <drosehn> @raydf -- john's project is at: https://github.com/johnjansen/crystal-stemmer
<johnjansen> hi @raydf feel free to fork and submit any changes you make to crystal-stemmer … it was a very easy port in truth, especially with the help of everyone here
johnjansen has quit [Quit: johnjansen]
johnjansen has joined #crystal-lang
<FromGitter> <DougEverly> cool thanks @BlaXpirit . This worked.. ```macro test(x) ⏎ puts {{x}} ⏎ {% debug() %} ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=57ec3c55783fe9b945a5ca74]
johnjansen has quit [Quit: johnjansen]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Philpax has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 3 new commits to master: https://git.io/vPJbw
<crystal-gh> crystal/master 9cedc11 Ary Borenszweig: Added docs to OAuth, and a few refactors
<crystal-gh> crystal/master 3f84358 Ary Borenszweig: Added docs to OAuth2
<crystal-gh> crystal/master f7e5498 Ary Borenszweig: Removed some redundant interpolations
soveran has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<travis-ci> crystal-lang/crystal#3f84358 (master - Added docs to OAuth2): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/163549774
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
txdv has quit [Ping timeout: 276 seconds]
Philpax has joined #crystal-lang