daemonwrangler has quit [Quit: ZNC 1.6.5 - http://znc.in]
daemonwrangler has joined #crystal-lang
<FromGitter>
<securefab_gitlab> Hello
<FromGitter>
<securefab_gitlab> I'm trying to build a secure web server. When I'm testing my crystal server with testssl.sh, I have the following vulnerability : "Secure Client-Initiated Renegotiation VULNERABLE (NOT ok), DoS threat". Any idea ?
<jhass>
no idea but I would guess if you google for that error and look for a solution for OpenSSL in C it'll be something we probably can adapt
<FromGitter>
<dscottboggs_gitlab> @securefab_gitlab could you post some example code?
<FromGitter>
<stronny> also `t` is an unfortunate "call" for a global namespace
<FromGitter>
<j8r> right
<FromGitter>
<stronny> I guess the only way is to patch the lexer-parser
<FromGitter>
<wout> @stronny I agree on `t`.
<FromGitter>
<j8r> @wout generally, if the Tuple is too big - use macros to build it
<FromGitter>
<stronny> if the tuple is too big consider using records
<FromGitter>
<Blacksmoke16> there is a limit on tuple size as an fyi
<FromGitter>
<Blacksmoke16> like 200 iirc
<FromGitter>
<j8r> yep
<FromGitter>
<j8r> same for ivars, generate them with a macro if too much
<FromGitter>
<wout> True.
<FromGitter>
<sam0x17> hmm so I have a line that is like `MY_CONST = {{read_file("path/in/my/repo.txt")}}` and it is working fine in the actual shard but when I try requiring the shard in other shards it fails -- saying it can't find the file -- how to fix?
<FromGitter>
<Blacksmoke16> what if you do `"#{__DIR__}..."`?
<FromGitter>
<sam0x17> I'll try that
renich has joined #crystal-lang
chachasmooth has quit [Ping timeout: 260 seconds]
<FromGitter>
<sam0x17> that worked, thanks @Blacksmoke16 !
<FromGitter>
<jwoertink> The `@[AlwaysInline]` annotation means that everything inside of that method is basically placed in the spot it's called, right?
<FromGitter>
<stronny> that's my understanding
<FromGitter>
<jwoertink> Is that a performance boost or compile speed increase?
<FromGitter>
<stronny> you should rarely need to control for that manually
<FromGitter>
<stronny> one of the worst programmers' sins is premature optimization
<FromGitter>
<jwoertink> I'm not sure what any of that document says
<FromGitter>
<stronny> don't bother with inlining
<FromGitter>
<stronny> compiler should do that for you anyway
<FromGitter>
<naqvis> that is simply a hint to llvm compiler and there is no guarantee that function you annotated get inline if its missing the pre-requisites. To get better insights on its purpose and usage, take a look at LLVM docs
<FromGitter>
<jwoertink> Oh, so that's a LLVM thing, and not a crystal thing
<FromGitter>
<naqvis> yeah
<FromGitter>
<jwoertink> Ok, that answers my question. Thanks
<FromGitter>
<naqvis> ywc
<FromGitter>
<wout> @jwoertink I was actually wondering about the same today. Thanks for asking. 😄
<FromGitter>
<jwoertink> Yeah. I just want to understand the language a bit better. I don't know C or LLVM at all, so I see these weird things and have no clue what they mean.
<FromGitter>
<sam0x17> is there a be_less_than (or something) `Spec` thing that I'm missing somewhere or should I just assert that the inequity `eq true`?
<FromGitter>
<wout> @jwoertink I'm the same boat.
<FromGitter>
<Blacksmoke16> @sam0x17 you should be able to do like
<FromGitter>
<Blacksmoke16> `val.should be < 10`
<FromGitter>
<stronny> @wout @jwoertink I would advise writing a nontrivial C program
<FromGitter>
<wout> @stronny That might be a good idea.
<FromGitter>
<stronny> or maybe trying to just read a C faq
<FromGitter>
<wout> I've learend a lot since I started using Crystal (coming from Ruby).
<FromGitter>
<wout> Learning a bi of C won't hurt.
<FromGitter>
<stronny> C language isn't the point
<FromGitter>
<stronny> you'll have to come to terms with hardware like memory
<FromGitter>
<stronny> C just exposes that in a ubiquitous way
<FromGitter>
<wout> That's exactly what I learend most about.
renich has quit [Ping timeout: 246 seconds]
renich has joined #crystal-lang
renich has quit [Ping timeout: 256 seconds]
renich_ has joined #crystal-lang
chachasmooth has quit [Ping timeout: 256 seconds]
HumanG33k has quit [Remote host closed the connection]
chachasmooth has joined #crystal-lang
HumanG33k has joined #crystal-lang
ur5us has joined #crystal-lang
<FromGitter>
<sam0x17> anyone know how to get (insert ORM here) to local development postgres the way rails does -- I have a user role set up with passwordless login, however all the ORMs in crystal are giving me `Unhandled exception: (no message) (DB::ConnectionRefused)`
<FromGitter>
<Blacksmoke16> is there some query param you can add to the connection string?
<FromGitter>
<sam0x17> I'm just doing `Clear::SQL.init("postgres://#{ENV["USER"]}@localhost/kagi_development", connection_pool_size: 5)`
ua has quit [Quit: Leaving]
ua has joined #crystal-lang
renich has joined #crystal-lang
renich_ has quit [Ping timeout: 256 seconds]
<FromGitter>
<hugolgst> Hi
<FromGitter>
<hugolgst> I would like to contribute to crystal
<FromGitter>
<hugolgst> but I don't really know where to begin
<FromGitter>
<hugolgst> what to do on the language
blackbeard420 has quit [Quit: ZNC 1.7.5 - https://znc.in]
blackbeard420 has joined #crystal-lang
tdog has quit [Ping timeout: 246 seconds]
<FromGitter>
<sam0x17> @hugolgst a great way is to just work on personal projects and when you find something in the standard library that seems missing or annoying talk to people on gitter and maybe submit a pull request
<FromGitter>
<sam0x17> I've got several changes in that way
chachasmooth has quit [Ping timeout: 250 seconds]
_ht has quit [Quit: _ht]
chachasmooth has joined #crystal-lang
<FromGitter>
<sam0x17> ok guys what's a good ORM these days
<FromGitter>
<sam0x17> my wishlist: a CLI for migrations (i.e. like rake db:migrate etc), only need to support postgresql, as rails-like as possible
<FromGitter>
<sam0x17> doesn't have to be an ORM maybe just a migration system
renich has quit [Ping timeout: 264 seconds]
renich has joined #crystal-lang
<FromGitter>
<Blacksmoke16> why not just use like micrate and write the raw SQL?
renich has quit [Ping timeout: 250 seconds]
<FromGitter>
<Blacksmoke16> should try out some Athena @sam0x17 😉
renich has joined #crystal-lang
<FromGitter>
<sam0x17> I might go micrate for that
<FromGitter>
<sam0x17> is it micrate or migrate these days wasn't one more up to date?
<FromGitter>
<sam0x17> and yeah I'll try Athena
<FromGitter>
<Blacksmoke16> not sure, not super familiar with either
<FromGitter>
<Blacksmoke16> and nice :) i invited you to the gitter ch. Feel free to ask any questions etc