jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.28.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
lucasb has quit [Quit: Connection closed for inactivity]
<FromGitter> <girng> eh, maybe i need to brush up on learn / understand more about mutexes
<FromGitter> <Sija> @girng yep, will do you good concurrency-wise :)
alexherbo2 has joined #crystal-lang
<FromGitter> <girng> 👍
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alex`` has quit [Ping timeout: 258 seconds]
alex`` has joined #crystal-lang
_whitelogger has joined #crystal-lang
chemist69 has quit [Ping timeout: 252 seconds]
chemist69 has joined #crystal-lang
bougyman has quit [Read error: Connection reset by peer]
bougyman_ has joined #crystal-lang
<FromGitter> <girng> Hello!
ashirase has quit [Ping timeout: 258 seconds]
ashirase has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> @tenebrousedge @Blacksmoke16 @jwoertink https://carc.in/#/r/70ka here's where I got. If we can figure out the problem I have a shard ready that lets you just write to an encrypter IO or read from a decrypter IO.
<FromGitter> <dscottboggs_gitlab> created the shard so that when we do get it working it'll be ready to go https://github.com/dscottboggs/crypher ⏎ ⏎ Simple one-shot String and Slice encryption works, it's just the IOs that don't.
<FromGitter> <j8r> @dscottboggs_gitlab you don't need https://github.com/dscottboggs/crypher/blob/master/src/crypher.cr#L27
<FromGitter> <j8r> just `if key` ;)
<FromGitter> <j8r> anyway, good job
<FromGitter> <j8r> what cyphers will be supported?
<FromGitter> <dscottboggs_gitlab> it depends on the local system
<FromGitter> <dscottboggs_gitlab> OpenSSL::Cipher determines it
<FromGitter> <dscottboggs_gitlab> > good job ⏎ ⏎ Thank you! :D
<FromGitter> <j8r> but, we can already do this with stdlib?
<FromGitter> <dscottboggs_gitlab> OpenSSL::Cipher offers an interface to do it, but it's super complicated
<FromGitter> <dscottboggs_gitlab> this is supposed to make that easier to use
<FromGitter> <dscottboggs_gitlab> I wish that had come up when I searched crystalshards.xyz :/
<FromGitter> <dscottboggs_gitlab> @j8r were you saying I don't need to set the initialization vector, or that I don't need to sepcifically set a random value, or that I didnt' need `if k = key`? The line number you selected didn't seem to match up with the comment I had made
<FromGitter> <dscottboggs_gitlab> Anyway I'll get to it later I gotta go for now
<FromGitter> <j8r> yes
<FromGitter> <j8r> I wish this part of the stdlib will be simple, too
<FromGitter> <j8r> This merits a forum post
dannyAAM has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
[spoiler] has quit [Ping timeout: 257 seconds]
OvermindDL1_ has joined #crystal-lang
mntmn_ has joined #crystal-lang
laaron- has joined #crystal-lang
dannyAAM has quit [Ping timeout: 248 seconds]
laaron has quit [Ping timeout: 256 seconds]
mntmn has quit [Ping timeout: 252 seconds]
OvermindDL1 has quit [Ping timeout: 252 seconds]
mntmn_ is now known as mntmn
OvermindDL1_ is now known as OvermindDL1
go|dfish has quit [Ping timeout: 252 seconds]
[spoiler] has joined #crystal-lang
dannyAAM has joined #crystal-lang
alex`` has quit [Ping timeout: 272 seconds]
go|dfish has joined #crystal-lang
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 244 seconds]
alex`` has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<alex``> How to close stdin?, I use STDIN to read files in my program, but when running system("{editor} {file}"), the editor tries to read stdin
<FromGitter> <dscottboggs_gitlab> shouldn't the editor try to read the file you specified?
alex`` has quit [Quit: WeeChat 2.4]
alex`` has joined #crystal-lang
moei has joined #crystal-lang
laaron- has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
alex`` has quit [Ping timeout: 252 seconds]
alex`` has joined #crystal-lang
oz has quit [Quit: EOF]
oz has joined #crystal-lang
alex`` has quit [Ping timeout: 272 seconds]
alex`` has joined #crystal-lang
<FromGitter> <jwoertink> @dscottboggs_gitlab https://carc.in/#/r/70nz Here's an example that works. Mainly taken from https://github.com/anujdas/cryogen
<FromGitter> <dscottboggs_gitlab> thank you
<FromGitter> <bararchy> @j8r one of the bluetooth is direct C bindings, the other one uses the DBUS interface
<FromGitter> <bararchy> How comes `URI#to_s` won't automaticlly encode the URI ?
<FromGitter> <j8r> Thx @bararchy , I haven't seen DBUS mentioned – I think it can be added
<FromGitter> <bararchy> hmmm
<FromGitter> <bararchy> Added as in README ?
_whitelogger has joined #crystal-lang
<FromGitter> <j8r> When reading the readmes and GitHub description, they looks the same – no mention of DBUS interface
<FromGitter> <bararchy> 🙏 no probs
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<oprypin> meh, this kinda sucks
<oprypin> would be nice for me if it was different from https://carc.in/#/r/70ov
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang/crystal/pull/7841 💯
<FromGitter> <girng> i'm sifting through all instances of *breaking-change* to see if something is gonna break my gameserver so far so good
<pracabor> > Rename Crypto::Bcrypt::Password#== to #verify
<pracabor> that'll break some things I know about
<FromGitter> <girng> i was just about to post about that
<FromGitter> <girng> https://github.com/crystal-lang/crystal/pull/7790 doe sthis mean we can't use `==` anymore?
<FromGitter> <girng> it just uses verify internally, if i'm reading that correctly
<FromGitter> <tenebrousedge> yes, but it's deprecated
<FromGitter> <kinxer> So it'll be removed "soon".
<pracabor> "gentle breaking change"
<pracabor> I can get behind that
<FromGitter> <girng> i think my codebase uses a lot of deprecated things LOL. that's why i'm stuck on `0.27.0` :D
<FromGitter> <girng> i'm scared to update, don't feel like fixing sht
<FromGitter> <girng> i'm at the point where i'm happy that things work the way they are
<FromGitter> <tenebrousedge> it's always unpleasant to pay down technical debt
<FromGitter> <tenebrousedge> > A well-used door needs no oil on its hinges. ⏎ > A swift-flowing stream does not grow stagnant. ⏎ > A deer blends perfectly into the forest colors. ⏎ > Software rots if not used. ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5cf1a165e41fe15e75ef1e07]
<FromGitter> <girng> i love those quotes
<FromGitter> <j8r> @girng just try with 0.28.0, you'll have to do it one day anyway. You won't be able to stick to a beta pre-1.0 forever
<FromGitter> <j8r> It shouldn't be hard, thank's to static typing
<FromGitter> <girng> @j8r i will give it a shot
<FromGitter> <tenebrousedge> @girng http://www.mit.edu/~xela/tao.html ⏎ It's very seriously silly
<FromGitter> <j8r> For `==`, that because there is already `Object#==`
<pracabor> incremental crystal versions have rarely been difficult to upgrade, and I don't think I remember one being difficult since 0.24 or so
<pracabor> if you keep up with it, and if you write tests around your code, it usually only takes 20min or so -- most of which is creating the release on github and such
<FromGitter> <girng> "tests"? What are those? :D
<FromGitter> <tenebrousedge> tests are those things that you write after things work well :P
<FromGitter> <girng> girng can't compute, error 404'd
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <j8r> 1) 29.0 is being preped https://github.com/crystal-lang/crystal/pull/7841
<FromGitter> <Blacksmoke16> Sigh
<FromGitter> <girng> lol i was joking, cause I knew you'd see it blacksmoke
dannyAAM has quit [Remote host closed the connection]
<FromGitter> <girng> you be like "wtf, i've explained to him what tests are already!"
dannyAAM has joined #crystal-lang
<FromGitter> <Blacksmoke16> Now if I can just get you to write some
<FromGitter> <girng> yeah.. about that
<FromGitter> <Blacksmoke16> Would just make your life easier
<FromGitter> <j8r> Tests are for the weak, its too easy with them then 😄
<FromGitter> <j8r> That's why I write tests :)
<FromGitter> <girng> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5cf1ab78702b7e5e760a89e1]
<FromGitter> <girng> nvm deleted, forgot what i was going to say
dostoyevsky has quit [Quit: leaving]
<FromGitter> <girng> oh good lord
dostoyevsky has joined #crystal-lang
<FromGitter> <girng> nanosecond is one billionth of a second
<FromGitter> <girng> so when a benchmark says "2.0 slower" when comparing in nanoseconds...
<FromGitter> <girng> is it *really* 2.0 slower?
<FromGitter> <girng> what does `**` do, never seen a double asterisk?
<FromGitter> <girng> > But ** just delegates to a gmp method ⏎ ⏎ What is a GMP method
<FromGitter> <Blacksmoke16> i think its to the power of
<FromGitter> <Blacksmoke16> same as ^
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter> <Blacksmoke16> `^` does bitwise comparison i think
<FromGitter> <Blacksmoke16> yea XOR
<FromGitter> <girng> oh yea
<FromGitter> <girng> https://crystal-lang.org/api/0.28.0/Int.html#%26%2A%2A%28exponent%3AInt%29%3Aself-instance-method
<FromGitter> <girng> WTF LOL
<FromGitter> <girng> wait
<FromGitter> <girng> https://play.crystal-lang.org/#/r/70pc what's the difference?
<FromGitter> <Blacksmoke16> one raises on overflow the other doesnt
<FromGitter> <girng> why would a developer not want an overflow error?
<FromGitter> <girng> > Intermediate multiplication will wrap around silently in case of overflow.
<FromGitter> <girng> use case for "wrap around silently" i guess
<FromGitter> <girng> i did not know there are so many methods for Int, TIL
<FromGitter> <Blacksmoke16> most are prob just generated via macros
<FromGitter> <Blacksmoke16> as you have to have `+` etc for each other numeric type
<FromGitter> <girng> i think it's be beneficial to help fill out more examples here https://crystal-lang.org/api/0.28.0/Int.html#downto%28to%2C%26block%3Aself-%3E%29%3ANil-instance-method
<FromGitter> <Blacksmoke16> make a PR :)
<FromGitter> <girng> yah good idea
<FromGitter> <girng> can i confirm with you first though before submitting it
<FromGitter> <Blacksmoke16> can make your PR as a draft in order to gather feedback
<FromGitter> <girng> https://crystal-lang.org/api/0.28.0/Int.html#humanize_bytes%28io%3AIO%2Cprecision%3AInt%3D3%2Cseparator%3D%26%2339%3B.%26%2339%3B%2C%2A%2Csignificant%3ABool%3Dtrue%2Cformat%3ABinaryPrefixFormat%3D%3AIEC%29%3ANil-instance-method
<FromGitter> <girng> That is EPIC
<FromGitter> <girng> One of the coolest methods I've ever seen