<FromGitter>
<Blacksmoke16> is there a way to pretty format numbers
<FromGitter>
<Blacksmoke16> like add commas?
francisl has quit [Quit: francisl]
<FromGitter>
<drosehn> Hmm. I have a cute trick-regex which adds commas in ruby, but it doesn't seem to work in crystal, and I'm not sure why. I'll try a few more experiments.
<FromGitter>
<drosehn> I'm too tired to figure this out right now, but...
<FromGitter>
<drosehn> that works in ruby to give you "9,123,456,789". If you get rid of the `#{$2}`, it will work in crystal to add *one* comma, but if you include the `#{$2}` it will error out.
<FromGitter>
<drosehn> The thing is, I'd have to look up regex's to remember what that pattern is doing. 😃
<FromGitter>
<drosehn> I asked the same question you did on a ruby-lang mailing list maybe 12-13 years ago, and someone replied almost immediately with the above pattern. I've used it ever since then, but I never looked up what it does.
<FromGitter>
<vladfaust> Should I write `at compile time` or `at compilation time`? And should I use hyphen, e.g. `at compile-time`?
<FromGitter>
<r00ster91> I'd take the latter
<FromGitter>
<bew> @r00ster91 what do you mean "it doesn't do anything"?
<FromGitter>
<r00ster91> @bew when I put the `#` in my sprintf format string, it's the same as when I don't put it in ⏎ ⏎ ```sprintf "%#X", -123 # => "-7B" ⏎ sprintf "%X", -123 # => "-7B"``` ⏎ ⏎ so it looks like its useless. So why is it there? is there a reason [https://gitter.im/crystal-lang/crystal?at=5b9cf88ff7e1580625d51839]
<FromGitter>
<drum445> Hello, when setting a key or iv for ```OpenSSL::Cipher.new("aes-256-cbc")``` am I right in thinking that if the length of either of those is greater than it needs it simply trims it?
<FromGitter>
<drum445> As the error is only raised for too short, not too long
lvmbdv has quit [Quit: WeeChat 2.2]
<FromGitter>
<robacarp> @vladfaust
<FromGitter>
<robacarp> Both are correct, but the first is more common. No hyphen needed
<FromGitter>
<vladfaust> Thanks
<FromGitter>
<drum445> Can't see a trim in the code, so would be interested to know please
<FromGitter>
<vladfaust> Can I specify crystal master branch in `.travis.yml`?
<oprypin>
vladfaust, you can do whatever you want, that field doesnt do anything
<FromGitter>
<cfsamson> @nulty Sorry, nothing besides the api docs as far as i know, or you can ask here or SO if you have any questions (I've usually seen questions usually have gotten a reply really fast on SO for exemple)
<FromGitter>
<drum445> cheers @r00ster91
<FromGitter>
<nulty> I'm looking at IO and how it uses Slices, that's informative. Not got the full picture yet though. It's not something I've had to deal with in interpreted languages so I'm just getting to grips with it.
<oprypin>
nulty, what languages have you worked with
<FromGitter>
<nulty> Ruby mostly
<FromGitter>
<nulty> Javascript, a little Elixir,
<FromGitter>
<cfsamson> @nulty I learned about slices just using them, and combining them with what i know about slices in Rust (which have a really good explanation if you can see beyond the rust spesific syntax). If you see here https://doc.rust-lang.org/book/second-edition/ch04-03-slices.html and scroll down to the String Slices section it's atleast something. Crystal slices are not that different...
<FromGitter>
<nulty> @cfsamson Thanks for the link, I'll read it now. Looks like a helpful resource.
<FromGitter>
<cfsamson> Well it's atleast something :)
sevensidedmarble has joined #crystal-lang
<FromGitter>
<drosehn> hi @codenoid -- I'm still checking in here pretty frequently (like, at least once per day), but I'm busy at work so I haven't been saying as much.