<FromGitter>
<j8r> that's also strange to have benchmarks in `/src`
<FromGitter>
<robacarp> Amber router is essentially independent of Amber.
DTZUZO has quit [Ping timeout: 272 seconds]
DTZUZO has joined #crystal-lang
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
<FromGitter>
<j8r> if we wish to use it outside, the module is `Amble::Router` - meh :|
<FromGitter>
<j8r> The module is called `Amber::Router` - meh :|
<FromGitter>
<j8r> which assume we have already a module `Amber`
<FromGitter>
<rishavs> is there a nicer way to write; ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ This works but i would ideally want to compbine the if and each clauses. I want to iterate over the array only and only if it exists? [https://gitter.im/crystal-lang/crystal?at=5b801de960f9ee7aa48670f5]
<robacarp>
@j8r _essentially_ is the operative word. it's functional.
<FromGitter>
<rishavs> of course, I find out the answer the moment I type my question. :D ⏎ ` <% posts_list.try &.each do |item| %>` is a good way to combine the "if exists" and "iterate one ach" functionalities
<jokke>
uuff there're no libav bindings for crystal?
<jokke>
or ffmpeg
oprypin has joined #crystal-lang
akaiiro has joined #crystal-lang
<jokke>
lol
<jokke>
i looked at the libav codebase and now i know why
<jokke>
does anyone know if it's allowed to respond to a transfer-encoding: chunked http request before all chunks have arrived on the server?
<jokke>
i'm thinking of validating the file format of a very large file before the (very time consuming) transfer completes.
akaiiro has quit [Ping timeout: 268 seconds]
<FromGitter>
<bcardiff> @girng are you able to connect from a console `mysql -u username -h my.application.com -ppassword` ?
akaiiro has joined #crystal-lang
<FromGitter>
<girng> @bcardiff hmm just tried that and it hangs for a minute then says "ERROR 2003 (HY000): Can't connect to MySQL server on " however i went to https://www.yougetsignal.com/tools/open-ports/ and tried 3306 and it says it's open. maybe i need to configure my `my.cnf` better googling this error now
<FromGitter>
<girng> i don't tink crystal issue, i apologize for posting this i thought it was, def on my end.
<FromGitter>
<bcardiff> @rishavs No. DB mapping is not an ORM. It's a thin helper to DRY read calls
<FromGitter>
<rishavs> oh :(
<FromGitter>
<girng> did something change since 0.24.0? i keep getting `instance variable '@db' of Muffin must be DB::Database, not (DB::Database | Nil)`
<FromGitter>
<girng> i just had to use `property db : DB::Database` inside my `Class`, now it won't let me. if i do property db : DB::Database? then I can't use db.exec methods
<FromGitter>
<asterite> maybe you are not initializing it in all initializers
<FromGitter>
<asterite> that should work, unless you are somehow using something from `self` before assigning the result to `@db`
<FromGitter>
<asterite> I'd probably also connect outside of the class, and pass the DB instance in the constructor...
<FromGitter>
<asterite> much less coupling
<FromGitter>
<girng> unfortunately it gives me ` instance variable '@db' of Muffin must be DB::Database, not (DB::Database | Nil)`. however, i can fix this by doing `property db : DB::Database?` ⏎ ⏎ but then, i can't use any of my db methods, i get `undefined method 'exec' for Nil (compile-time type is (DB::Database | Nil))`
<FromGitter>
<asterite> Oooooh...
<FromGitter>
<asterite> In your code you have `rescue; put ...`
<FromGitter>
<asterite> that means, when the connection fails, it goes to the rescue, and that returns `nil`
<FromGitter>
<asterite> that's where the `nil` comes from
<FromGitter>
<asterite> if you raise in that `rescue`, it works fine
<FromGitter>
<asterite> or if you don't `rescue` at all...
<FromGitter>
<girng> oh wow, ty
<FromGitter>
<girng> i was pulling my hair out cuz i was like this used to work lol
<FromGitter>
<girng> when i made the isolated case i forgot to copy my entire connect_to_mysql i just wrote it out
<FromGitter>
<girng> 100% my fault derped hard sory about that
shalmezad has quit [Quit: Leaving]
hightower2 has quit [Remote host closed the connection]