qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has joined #crystal-lang
duane has joined #crystal-lang
jnyw has quit [Ping timeout: 252 seconds]
cremes has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cremes has quit [Quit: cremes]
LastWhisper____ has joined #crystal-lang
jnyw has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
Guest23132 is now known as c-c
<FromGitter>
<Dillybob1992> Good afternoon!
<FromGitter>
<Dillybob1992> @watzon what's difference between that and using bcrypt, should i be switching?
duane has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
snsei has joined #crystal-lang
<FromGitter>
<watzon> Absolutely. Bcrypt is known to have certain security flaws. ROT26 is a very cryptographically secure algorithm that operates by rotating each character in a string by 26 characters. Characters that aren't a part of the standard english alphabet are ignored.
<FromGitter>
<watzon> wink wink
<FromGitter>
<aisrael> There’s a paper I read somewhere that demonstrates that ROT26 or 2ROT13 isn’t as secure as 3ROT13 though. So I’d rather not take my chances.
<FromGitter>
<Dillybob1992> lol joke flew by my head i think i get it now my bad
<FromGitter>
<watzon> My package is capable of performing 3ROT13 as well. All you have to do is `ROT26.encrypt_any("Your password", 13 * 3)`
<FromGitter>
<watzon> @Dillybob1992 don't worry about it. When I first saw the rot26 rust package it took me a second to get it.
<FromGitter>
<Dillybob1992> i thoought it was some new algorithm that is going to take over bcrypt at first lol should have looked at the doc page closer. the name of it is what got me i think
<FromGitter>
<jaitaiwan> Hey folks, just wondering if anyone knows how to STDIN.read_char without requiring ENTER? Just want to get a char from the STDIN as soon as it's pressed
<c-c>
jnyw: getc or its ilk?
<c-c>
sorry jnyw, I meant jaitaiwan
cremes has joined #crystal-lang
<FromGitter>
<Dillybob1992> for some reason i have this really sharp pain right at the top of my wrist. if i put any pressure on it, it's a sharp nerve pain. i've been coding a lot and typing online lately so i know it has something to do with it. but what's funny is my right hand doesn't have this problem at all. although, when typing it doesn't hurt at all..
<FromGitter>
<elorest> What hand do you mouse with?
<FromGitter>
<Dillybob1992> right hand
<FromGitter>
<jaitaiwan> c-c: There's no getc command. I can see read_char but it waits for a return before going
<FromGitter>
<Dillybob1992> wait, it's not when i put pressure on it. it's when i extend my wrist backwards
<FromGitter>
<elorest> Hmmm. Most of my pain comes from the poor placement of trackpads on laptops.
<FromGitter>
<jaitaiwan> Dillybob1992 I've had that before. Just had to adjust my wrist positioning. I got a microsoft ergo keyboard and within a week it had eased right back off
<FromGitter>
<Dillybob1992> oh really, prob time for a new keyboard then
<c-c>
Dillybob1992 its time for a jog, pushups and squats every day!
<c-c>
jaitaiwan may be you need to implement a non-blocking read, then
<FromGitter>
<Dillybob1992> might be that time...
<FromGitter>
<jaitaiwan> c-c: *whosh* that'd be the sound of how to do that going over my head haha
<FromGitter>
<jaitaiwan> @Dillybob1992 it takes a little to get used to but well worth it. Desk positioning for your hands can help heaps too. I use a similar rule to what my piano teacher taught me... elbows at almost 90 degrees to the keys with a slight drop in them.
<FromGitter>
<Dillybob1992> lol really my elbows are like 45 degress below my wrists, LOL
<FromGitter>
<watzon> Just tried doing `extend self` too and getting rid of the static part of the methods. Still doesn't work.
<FromGitter>
<xfbs> Well imagine you call `self.arrange(1, 2)`, should it call `self.arrange(ending, step)` or `self.arrange(start, ending, step = 1)` with `step` having the default argument?
<FromGitter>
<xfbs> If you do overloads, I think you can't use default args like this
<FromGitter>
<watzon> Ahh good point
<FromGitter>
<watzon> I know an easy fix
<FromGitter>
<watzon> Or I thought I did anyway. What is the syntax for making it so that all arguments after a certain point have to be named arguments rather than positional?
<FromGitter>
<watzon> I thought it was `arrange(start, ending, *, step = 1)` where everything after the `*` is named
<FromGitter>
<xfbs> Is that related to `arrange(start, ending, everything_else = {})`?
<FromGitter>
<watzon> Or maybe I'm confusing Crystal and Nim haha. It's late
<FromGitter>
<watzon> Can anyone explain why the last example gets all funky with the floats. It's reminding me a little of JavaScript https://play.crystal-lang.org/#/r/3g4l
<FromGitter>
<xfbs> @watzon I'm pretty sure that has to do with the printing routine. Floats always have inherent imprecision, normally the printing routines have algorithms for chopping off the non-significant parts at the end
snsei has quit [Remote host closed the connection]
Ven`` has quit [Ping timeout: 240 seconds]
Ven`` has joined #crystal-lang
jnyw has quit [Quit: WeeChat 2.0.1]
ua has quit [Ping timeout: 248 seconds]
hightower3 has joined #crystal-lang
adeen-s has left #crystal-lang [#crystal-lang]
oprypin has quit [Ping timeout: 240 seconds]
oprypin has joined #crystal-lang
DTZUZO has quit [Ping timeout: 264 seconds]
<FromGitter>
<l3kn> @watzon If you add a type to num it works `def *(num : Int32)`
bazaar has quit [Ping timeout: 260 seconds]
bazaar has joined #crystal-lang
<FromGitter>
<watzon> Bu I need it to be `Int | Float`, and that doesn't work
<FromGitter>
<l3kn> I think if the type of your new function is less specific than the existing ones, instead of redefining it, it will just add a new ‘clause’ after the existing ones
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<FromGitter>
<ShriekBob> This news excites me
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter>
<ShriekBob> So, I want to contribute, but I'm intimidated. I've never worked on a compiler before, I've only written hobbyist Crystal (like most people I guess) before, and frankly I've never contributed to Open Source before.
<crystal-gh>
[crystal] blankoworld opened pull request #5640: Missing ref to mkstemps in ARM (master...patch-1) https://git.io/vNidi
snsei has quit [Remote host closed the connection]
<FromGitter>
<ShriekBob> and I know I should just find something, and dive in, but I know what I write is gonna suck, and I have no way in which to understand whether an issue I pick is even "beginner friendly" or not
snsei has joined #crystal-lang
<FromGitter>
<sdogruyol> not sure if the compiler is the friendliest to start with :P
snsei has quit [Remote host closed the connection]
<FromGitter>
<sdogruyol> I understand you excitement btw :)
<FromGitter>
<sdogruyol> your*
snsei has joined #crystal-lang
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snsei has quit [Ping timeout: 240 seconds]
<RX14>
@ShriekBob you don't need to start with the compiler
<RX14>
there's plenty to do in the stdlib
qard has joined #crystal-lang
<FromGitter>
<ShriekBob> Because that's less intimidating ;)
<FromGitter>
<ShriekBob> ...and honestly, maybe I'm being dumb, but how do you help with the windows standard library without a compiler?
<RX14>
oh you're windows only?
<RX14>
in that case you can use WSL
<RX14>
@ShriekBob the linux crystal compiler can already compile for windows
<RX14>
the stdlib is 99% of the porting work to windows
<FromGitter>
<ShriekBob> Ohhh, I didn't know that, or rather, I think I remember reading that, but I didn't realize that was how it worked. I was working under hte assumption that WSL would use the linux stdlib not the windows stdlib
<FromGitter>
<ShriekBob> Well that changes things
<RX14>
Wsl uses the linux stdlib
<RX14>
i think I confused you
<RX14>
WSL uses the linux crystal stdlib
<RX14>
but all the problems with windows aren't with the crystal compiler
<RX14>
they're with the crystal stdlib
<FromGitter>
<ShriekBob> and I'm not windows only (I'm currently on MacOS) but given I think Crystal could have an interesting line in game development, and that means first class windows support, it's certainly the thing I care the strongest about
<FromGitter>
<ShriekBob> So you can call the compiler on linux, and ask it to output windows binaries
<FromGitter>
<ShriekBob> *on WSL
<RX14>
or on mac
<RX14>
well
<RX14>
it's a bit complex
<RX14>
linux and mac can call the compiler and ask it to generate a windows object file
<RX14>
you think link that on windows
<RX14>
the problem is that most of the standard library simply isn't ported on windows
<RX14>
so that means the typical crystal program won't compile for windows
<RX14>
the process right now is working through the satndard library and making it work on windows
<RX14>
and that directly affects having the compiler working on windows
<RX14>
because the crystal compiler is written in crystal
<RX14>
so the crystal compiler depends on the crystal stdlib
<RX14>
so the stdlib always has to be ported first
<FromGitter>
<ShriekBob> I see, it's a chicken and egg situation
<FromGitter>
<ShriekBob> yeah, I get it
<RX14>
yes - which is why we have cross-compilation
<RX14>
so we can use a working compiler to compile "hello world" on windows
<RX14>
and then work the way up to building the crystal compiler on windows
<RX14>
and then test to see if that windows compiler can build itself
<RX14>
thing is porting to a new platform isn't what i'd suggest as a first thing to do on crystal
<FromGitter>
<ShriekBob> Is there any good suggestions on places for beginners on where to start? I'm definitely interested in contributing
<FromGitter>
<j8r> maybe you can just pick an issue that you feel able to work on ;)
sz0 has joined #crystal-lang
<FromGitter>
<ShriekBob> Which returns us back to stage 1, as a beginner I have no context by which to determine whether something is beginner appropriate or not
<FromGitter>
<j8r> You can begin to improve docs, that's a good start
<FromGitter>
<j8r> this is just a suggestion
<FromGitter>
<ShriekBob> Hey that's not a terrible idea
<FromGitter>
<ShriekBob> On a random off-topic note, I've been using CLojurescript to do some webdev for the last eighteen months. I decided a few days ago to try and go wholesale to Javascript and have been following the js-stack-from-scratch tutorials
<FromGitter>
<ShriekBob> Wowzers, setting up a basic, productive, react/redux et al JS setup is awful
<FromGitter>
<ShriekBob> it feels totally impenetrable
<livcd>
it feels so fragile you do one wrong thing and it explodes :)
<FromGitter>
<ShriekBob> It reminds me of my worst experiences in C++, or like writing 90s enterprise Java
<FromGitter>
<ShriekBob> I just keep looking at this mass of tightly coupled code, and random files, and wondering how it ended up like this
<FromGitter>
<ShriekBob> It's worse because I've been using reagent/reframe in Clojurescript for over a year, which is a very similair stack to React/Reframe + Express
<FromGitter>
<ShriekBob> ...and it's night and day
<FromGitter>
<j8r> @ShriekBob My person preference is Vue.js, with vue-router
<FromGitter>
<bmulvihill> My personal preference is avoid javascript at all costs
<FromGitter>
<bmulvihill> :)
<FromGitter>
<ShriekBob> It's so odd, like why do people do this to themselves?
<FromGitter>
<ShriekBob> I mean, I'm gonna stick it out, but gods
<FromGitter>
<j8r> That's not so bad, with `let`, `class` and some nice features of ES6
<FromGitter>
<ShriekBob> I have no graet problem with the language itself, js quirks aside
<FromGitter>
<j8r> i've problems using with virtual DOM
<FromGitter>
<ShriekBob> It's the complexity of the stack, and how brittle it all feels, like the basics of putting it all together has taken days and doing fairly simple things seems incredibly complex
<FromGitter>
<codenoid> yeah @bmulvihill
<FromGitter>
<bmulvihill> I agree its not the language as much as its ecosystem
<FromGitter>
<j8r> the good and bad point is that the ecosystem is fast moving
<livcd>
i feel it's only bad
cremes has quit [Quit: cremes]
<FromGitter>
<ShriekBob> I'm looking at this js-boilerplate I'm slowly building and it feels like a house of cards
<FromGitter>
<ShriekBob> It's like one giant code smell
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<codenoid> I'm allergic to seafood,
<FromGitter>
<codenoid> my body itching when coding with crystal
<FromGitter>
<codenoid> when eating fried shrimp
greengriminal has joined #crystal-lang
<FromGitter>
<ShriekBob> Another random note, Crystal has more stars and forks than Clojurescript
<FromGitter>
<ShriekBob> That's pretty impressive for a language so much younger
<FromGitter>
<imonmyown> @codenoid if you got it from chickendinner it might be not what you expect
<FromGitter>
<drosehn> There's a lot about Clojure which interests me, but I want a language which compiles to machine code, and Rich prefers to write compilers to "environments", such as the JVM or Javascript.
<FromGitter>
<robacarp> The 2018 Stackoverflow Developer Survey is out: https://stackoverflow.com/dev-survey/start/ This would probably be a great place to promote Crystal. They don't list Crystal as a language yet, so I had to write it in.
qard has joined #crystal-lang
qard has quit [Client Quit]
hightower has joined #crystal-lang
<FromGitter>
<sdogruyol> @robacarp thank you
<RX14>
hmm, can I enter a negative number for my salary?