RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.1 | 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
cremes has quit [Quit: cremes]
qard has joined #crystal-lang
alex`` has quit [Ping timeout: 255 seconds]
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
<c-c> jaitaiwan thers no getc or gets?
<c-c> jaitaiwan try ".gets(1)"
<FromGitter> <jaitaiwan> c-c: Figured it out somewhat... STDIN.raw!
<crystal-gh> [crystal] marksiemers opened pull request #5637: Documentation: Add API docs for Array sorting methods (master...ms/add-to-api-docs) https://git.io/vN6DK
<c-c> jaitaiwan afaics gets can take a limit argument, which would make it return after a certain number of chars inputted
<FromGitter> <bew> c-c yes but enter still needs to be pressed, unless the terminal is in raw mode
<FromGitter> <Dillybob1992> i wonder if i can use iptables on windows subsystem
<FromGitter> <Dillybob1992> does that still work even if on windows?
<FromGitter> <bew> Windows probably don't use iptables
<FromGitter> <bew> So no
<FromGitter> <bew> Oh sorry you meant in wsl
<FromGitter> <bew> I don't know but I doubt it
<FromGitter> <Dillybob1992> haha, yah. i was gonna test some rate limit stuff , instead of buying a tiny vps
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> livcd Are you coming to CyberTech ?
<livcd> bararchy: nope i am going to the dead sea :D
snsei_ has quit [Remote host closed the connection]
<FromGitter> <watzon> I'm confused. I have this code ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Can you not overload static methods on a module? Or am I just missing something obvious? [https://gitter.im/crystal-lang/crystal?at=5a6984f2ce68c3bc74ff1b36]
<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
<FromGitter> <watzon> Hmm interesting
<FromGitter> <xfbs> If you're interested in that or want to implement it in Crystal, here's two related papers: https://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf and https://www.cs.indiana.edu/~dyb/pubs/FP-Printing-PLDI96.pdf
<FromGitter> <watzon> Thanks for that
snsei has joined #crystal-lang
Ven`` has joined #crystal-lang
mark_66 has joined #crystal-lang
adeen-s has joined #crystal-lang
<FromGitter> <bararchy> Is anyone coming to CyberTech 2018 ?
snsei has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
<FromGitter> <watzon> Hmm can you not override built in types' methods?
alex`` has joined #crystal-lang
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
<FromGitter> <l3kn> Using two functions instead of `Int | Float` would work, too https://play.crystal-lang.org/#/r/3g5m
hightower3 has quit [Ping timeout: 252 seconds]
alex`` has quit [Ping timeout: 240 seconds]
hightower3 has joined #crystal-lang
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a69b77c517037a212f07e20]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <watzon> @codenoid bug report. That shouldn't happen.
ua has joined #crystal-lang
hightower3 has quit [Remote host closed the connection]
codenoid has joined #crystal-lang
<codenoid> ```Invalid memory access (signal 11) at address 0x4
<codenoid> [0x7f59e5c6c390] ???
<codenoid> [0x46425b] __crystal_sigfault_handler +75
<codenoid> [0x4728a6] *CallStack::print_backtrace:Int32 +118
<codenoid> [0x475355] *String#to_slice:Slice(UInt8) +21
<codenoid> [0x47c6a1] *String::Builder +17
<codenoid> [0x475308] *String#to_s<String::Builder>:Nil +24
<codenoid> [0x4db898] *June::Session#post<String, NamedTuple(url: String)>:JSON::Any +136
<codenoid> [0x4db7ec] *June::Session#url=<String>:JSON::Any +44
<codenoid> [0x4540a5] __crystal_main +1765
<codenoid> [0x466669] *_crystal_main<Int32, Pointer(Pointer(UInt8))>:Nil +9
<codenoid> [0x4fd9d6] *Crystal::main_user_code<Int32, Pointer(Pointer(UInt8))>:Nil +6
<codenoid> [0x4fd892] *Crystal::main<Int32, Pointer(Pointer(UInt8))>:Int32 +50
<codenoid> [0x45f056] main +6
<codenoid> [0x7f59e5251830] __libc_start_main +240
<codenoid> [0x4538e9] _start +41
<codenoid> [0x0] ???```
<codenoid> wtf
<ua> codenoid, you did something wrong
<codenoid> yeah
<ua> but not in a way to give compiler error
<codenoid> sorry
<codenoid> oh
<codenoid> yeah
<codenoid> just sharing'
<codenoid> i still change my code'
<Groogy> Oh first I thought it was the same problem that I had but yeah that looks like you messed up
<codenoid> fixed
<ua> codenoid, what was wrong?
<codenoid> that because i write a bad code
<ua> happens, wrong type somewhere or ?
<ua> hmm type would be recognized by compiler
<codenoid> idk, but it's a bad code, i define getter with a getter (?)
<codenoid> define class inside a getter (?)
<codenoid> define undefined function ,
<codenoid> is crystal have `delete` function ?
<ua> crystal-lang.org/api/0.24.1 is your friend :)
<FromGitter> <coderhs> I have a couple of yaml files who's structure is the same, how can i initialize them together rather than one after the other one. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a69c166d9f895c3605c275f]
<FromGitter> <l3kn> @coderhs Morning, MidNoon, etc all have the same mapping? Is their behavior (their functions) the same, too?
<FromGitter> <coderhs> All the same.
<FromGitter> <l3kn> Then one class (like `TimeOfDay` ) would be enough, no need to split it into multiple ones
hightower3 has joined #crystal-lang
<FromGitter> <l3kn> what do you mean by “initialize them together”?
<crystal-gh> [crystal] mjago opened pull request #5638: Raise ArgumentError if BigFloat initialized with invalid string (master...bigfloat_argument_error) https://git.io/vNiIK
hightower2 has quit [Ping timeout: 256 seconds]
<codenoid> in /usr/share/crystal/src/http/headers.cr:21: undefined method 'name' for String \n key2 = key2.name
sz0 has joined #crystal-lang
codenoid has quit [Quit: Leaving]
<FromGitter> <coderhs> @l3kn you are right, i get it now. thanks.
duane has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
Ven`` has joined #crystal-lang
za1b1tsu has joined #crystal-lang
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vNiWz
<crystal-gh> crystal/master 0f9af00 Martyn Jago: Raise ArgumentError if BigFloat initialized with invalid string (#5638)...
DTZUZO has joined #crystal-lang
cremes has quit [Quit: cremes]
cremes has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
<travis-ci> crystal-lang/crystal#0f9af00 (master - Raise ArgumentError if BigFloat initialized with invalid string (#5638)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/333269576
Ven`` has quit [Ping timeout: 268 seconds]
Ven`` has joined #crystal-lang
<FromGitter> <j8r> @coderhs You can use macros, with a `for` loop
<FromGitter> <j8r> Classes can't be generated, with them but like @l3kn said, a one main class can be used for the mapping
moei has joined #crystal-lang
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has quit [Ping timeout: 240 seconds]
cremes has quit [Quit: cremes]
gloscombe has joined #crystal-lang
greengriminal has joined #crystal-lang
Ven`` has joined #crystal-lang
za1b1tsu has quit [Quit: Leaving]
<FromGitter> <alehander42> o.O why can't classes be generated with macros?
<FromGitter> <coderhs> @j8r yes thats what I did.
<Papierkorb> You can generate any (by itself) valid AST through macros, including classes
Raffy has joined #crystal-lang
Raffy has quit [Changing host]
Raffy has joined #crystal-lang
alex`` has joined #crystal-lang
cremes has joined #crystal-lang
dahhowl has quit [Ping timeout: 240 seconds]
dahhowl has joined #crystal-lang
<FromGitter> <j8r> Really? I'haven't suceed to, we have to do a `macro module` or something?
<FromGitter> <j8r> or `macro class`? byt the way `macro my_def` works, indeed
<RX14> no
<RX14> you just do class in a macro??
<RX14> you seem to be using macros wrong
<FromGitter> <j8r> Papierkorb said we can generate class with macros
<FromGitter> <j8r> but I doubt
<RX14> yes
<RX14> you can
<RX14> lol
<RX14> it's used all over the place
alex`` has quit [Quit: WeeChat 1.9]
<RX14> `record` is a macro
<FromGitter> <j8r> I don't knew this, thanks @RX14
<RX14> how were you trying to do it?
<FromGitter> <j8r> `macro def my_def`, so `macro class my_class`. But that was before the 0.24
<RX14> that doesn't do what you think it does
<RX14> you could have just removed the `macro` from `macro def` and even before 0.24 it would have worked exactly the same
alex`` has joined #crystal-lang
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
cremes has quit [Quit: cremes]
<FromGitter> <j8r> I will create a PR about this in the guide so ;)
<FromGitter> <j8r> I can do this for modules and structs also? The only one we can't is for things like generating `when`s in a `case` block
<FromGitter> <j8r> If I've correctly understand the guide
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snsei has joined #crystal-lang
qard has joined #crystal-lang
<RX14> oh wow
<RX14> I managed to get the compiler to compile for windows
<RX14> **it doesn't run**
<RX14> before this gets posted anywhere
vivus has joined #crystal-lang
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> you always take away the `fun` :P
<RX14> good
<FromGitter> <sdogruyol> congrats btw 🎉
<RX14> it wasn't... hard
<RX14> well
<RX14> it wasn't easy
<FromGitter> <sdogruyol> well, that really depends..on the perspective haha
<RX14> for reference the commit name is "Shitty WIP stubbing in compiler"
DTZUZO has joined #crystal-lang
<Yxhuvud> how do you handle llvm there?
<RX14> i don't
<RX14> not yet
<RX14> thats why it compiles
<RX14> it doesn't like
<RX14> link*
<Yxhuvud> that would be part of the not running part I gues :D
<RX14> yep
<RX14> it's the most major part
Raffy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cremes has joined #crystal-lang
gloscombe has quit [Ping timeout: 240 seconds]
<RX14> well
<RX14> time to build LLVM in a VM
<RX14> fun...
<RX14> (not)
<Vexatos> As long as you have something else to do for the next six hours...
Raffy has joined #crystal-lang
<FromGitter> <j8r> what's the state of LLVM on Windows?
<RX14> it works
<RX14> like, llvm isn't a problem
Raffy has quit [Changing host]
Raffy has joined #crystal-lang
<FromGitter> <j8r> thas's the shared libraries, for linking?
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
<RX14> just unpacking windows takes too long on windows
<RX14> s/windows/llvm
mark_66 has quit [Quit: Leaving.]
<crystal-gh> [crystal] mjago opened pull request #5639: Documentation: BigFloat (master...big_float_docs) https://git.io/vNi7o
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> and then port the rest of the stdlib
<FromGitter> <ShriekBob> So the process right now is ⏎ ⏎ 1) Build on WSL ⏎ 2) Link on Windows ⏎ 3) Execute on Windows ... [https://gitter.im/crystal-lang/crystal?at=5a6a171bae53c15903342a62]
<RX14> it doesn't have to be WSL
<RX14> I use a windows VM
<FromGitter> <ShriekBob> Sure, but in principle
<RX14> I build on linux
<RX14> copy to the VM
<RX14> then link
<RX14> but yes, in principle you're right
<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> <watzon> Another new project in Crystal https://github.com/watzon/garlicoin.cr
<FromGitter> <watzon> 😁
snsei has joined #crystal-lang
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> what's garlicoin..it sounds funny
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <j8r> smells good!
<FromGitter> <watzon> Haha it's a new meme cryptocurrency. Currently worth about $2.50
<FromGitter> <watzon> Already surpassed DOGE in community and price and it just launched last week
<RX14> *sigh*
<FromGitter> <sdogruyol> $2.50?? per coin...
<FromGitter> <sdogruyol> how much is the totally supply..hopenot 65 billion lol
<FromGitter> <watzon> Haha nope. 69,000,000
<FromGitter> <sdogruyol> seriously...it has 137k subscribers on reddit..
<FromGitter> <watzon> And it uses scrypt-adaptive-n, so no ASIC issues
<FromGitter> <sdogruyol> has the world gone crazy...
<FromGitter> <watzon> In a word, yes
<FromGitter> <watzon> Is there a shard for parsing config files that have simple `key=value` options?
<FromGitter> <sdogruyol> you mean an ini file or smth?
<FromGitter> <watzon> Basically I guess haha. It's basically the same way a .env file is written too
snsei has quit [Ping timeout: 260 seconds]
<FromGitter> <j8r> it can be compatible with shell like variables, but beware of quotes, they aren't
cremes has quit [Quit: cremes]
qard has joined #crystal-lang
<FromGitter> <j8r> You don't need a shard, just a `File.read`, a `each_line` and a regex will do the job
<FromGitter> <ShriekBob> ....and then rreturn a map, and then turn the whole thing into a shard :D
<FromGitter> <ShriekBob> ...also random style point. I hate the ternary operator
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <watzon> Personally not a big fan either, but it gets the job done in some cases
<FromGitter> <j8r> for short conditions, its nice
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <codenoid> helo, how i can receive POST data with HTTP::Server, `context.response.body` gimme `#<HTTP::FixedLengthContent:0x275cd20>`
<FromGitter> <codenoid> and morning !
cremes has joined #crystal-lang
<FromGitter> <codenoid> `.body.not_nil!.gets_to_end`
<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
<FromGitter> <j8r> you're using react starter? I remember using https://github.com/vuejs-templates/webpack , works out of the box :)
<FromGitter> <j8r> for react, don't know
<FromGitter> <ShriekBob> This
<FromGitter> <j8r> you're courageous! I'm too lazy lol
<FromGitter> <codenoid> hi, is crystal have function to check is string contain valid url ?
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <codenoid> i dont see that function in uri.cr
<FromGitter> <j8r> Don't see any method either in https://devdocs.io/crystal/
<FromGitter> <j8r> Seems you have to made it @codenoid
<oprypin> ?? ? ? ?/
<oprypin> https://crystal-lang.org/api/URI.html#parse%28raw_url%3AString%29%3AURI-class-method
qard has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <j8r> devdocs don't show me, strange...
<oprypin> the only problem is that it never fails, but hey, one can add checks that 'scheme' and 'host' exist
sz0 has quit [Quit: Connection closed for inactivity]
snsei has quit [Read error: Connection reset by peer]
snsei_ has joined #crystal-lang
snsei_ has quit [Remote host closed the connection]
<FromGitter> <j8r> It never fails?! It also don't exactly return a Bool, but it's a base to build a new one
snsei has joined #crystal-lang
<FromGitter> <codenoid> yeah @oprypin , i wondering something like, "http:/chickendinner.com".url? # => false
cremes has joined #crystal-lang
<oprypin> z = URI.parse(); uri.host && uri.scheme
snsei has quit [Ping timeout: 240 seconds]
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?
qard has joined #crystal-lang
<travis-ci> crystal-lang/crystal#7f05801 (release/0.24 - Add formatter spec for uppercased fun call): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/333452245
<FromGitter> <imonmyown> @RX14 is that a fact or a wish?
<RX14> it's a student loan :(
<crystal-gh> [crystal] matiasgarciaisaia opened pull request #5642: (WIP) Crystal 0.24.2 (master...release/0.24) https://git.io/vNPll
<FromGitter> <imonmyown> RX14 praying for you, man
<crystal-gh> [crystal] matiasgarciaisaia closed pull request #5601: Fix default value for SSL::Context default_verify_param (release/0.24...fix/5266-ssl-verify) https://git.io/vNRLR
<ua> hmm, are there a companies looking for people writing in crystal?
<ua> eh but then i guess they would rather have someone with many years of earlier ruby experience ...
DTZUZO has quit [Ping timeout: 240 seconds]
edoput has joined #crystal-lang
<travis-ci> crystal-lang/crystal#e857ebd (release/0.24 - Version 0.24.2): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/333466654
<travis-ci> crystal-lang/crystal#bb7e1ec (release/0.24 - Bug: default_verify_param are inverted in SSL::Context::Client and SSL::Context::Server): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/333469260
<RX14> oh cool, a megabyte of linker errors
<RX14> just what I always wanted
<Vexatos> My favourite birthday present
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<travis-ci> crystal-lang/crystal#bb7e1ec (release/0.24 - Bug: default_verify_param are inverted in SSL::Context::Client and SSL::Context::Server): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/333469260
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<travis-ci> crystal-lang/crystal#1445529 (release/0.24 - Version 0.24.2): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/333469959
LastWhisper____ has joined #crystal-lang
cremes has quit [Quit: cremes]
<RX14> time to rebuild LLVM with the correct clags
<RX14> ...yay
<RX14> cflags*
qard has joined #crystal-lang
qard has quit [Client Quit]
<FromGitter> <ShriekBob> Sounds painful, but also sounds like progress
DTZUZO has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
greengriminal has joined #crystal-lang
qard has joined #crystal-lang
Raffy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moei has quit [Quit: Leaving...]
qard has joined #crystal-lang
tankfeeder has joined #crystal-lang