<Papierkorb>
oprypin: Ah well. libTooling/Clang it is.
<Papierkorb>
Good thing linking anything against llvm and clang doesn't take ages /s
<crystal-gh>
[crystal] MakeNowJust opened pull request #4763: YAML: correctly parse scalar value having null character (master...fix/yaml/null-safe-scalar) https://git.io/v78eK
DTZUZO has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
deep-book-gk has joined #crystal-lang
deep-book-gk has left #crystal-lang [#crystal-lang]
<FromGitter>
<picatz> Crystal has been so much fun this weekend.
<FromGitter>
<picatz> Building it solely to help myself learn Crystal / have something to build command-line applications out of it.
alibby1 has joined #crystal-lang
alibby has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
alibby has joined #crystal-lang
alibby1 has quit [Ping timeout: 240 seconds]
alibby1 has joined #crystal-lang
alibby has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
alibby has joined #crystal-lang
alibby1 has quit [Read error: Connection reset by peer]
<FromGitter>
<drujensen> Crystal does bring back the joy that we all felt when we first used ruby.
<FromGitter>
<elorest> yeah.
DTZUZO has quit [Quit: WeeChat 1.9]
DTZUZO has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter>
<picatz> I didn't touch ruby once this weekend. Just did Crystal. Well, I also worked on converting a ruby project to Crystal -- but, whatever. It is great!
<FromGitter>
<kazzkiq> How to transform a MySql::ResultSet into a JSON::any?
<FromGitter>
<kazzkiq> I'm trying to simply use `.to_json` in my query results, but getting an error
_whitelogger has joined #crystal-lang
<FromGitter>
<codenoid> hi, how to pass `Incorrect string value: '\xC5\xB7 is ...' for column 'content' at row 1 (Exception)`
snsei has joined #crystal-lang
_whitelogger has joined #crystal-lang
GK1wmSU has joined #crystal-lang
GK1wmSU has left #crystal-lang [#crystal-lang]
_GK1wmSU has joined #crystal-lang
_GK1wmSU has left #crystal-lang [#crystal-lang]
tzekid has joined #crystal-lang
mark_66 has joined #crystal-lang
flaviodesousa has joined #crystal-lang
<crystal-gh>
[crystal] ysbaddaden pushed 1 new commit to master: https://git.io/v78c9
<crystal-gh>
crystal/master f387380 TSUYUSATO Kitsune: Correctly work __has_color check in bin/crystal
<FromGitter>
<bararchy> We need more people approved to check PR's and merge , I see lots of PR's getting stale and conflicated just because they are not getting looked at
<FromGitter>
<watzon> Sweet. Thanks @oprypin
<FromGitter>
<watzon> Another question, I see a PR from 2 years ago about adding a singleton module, but has there been any movement on anything like that. They also mentioned thinking about adding actors which, after a small foray into elixir, I think could be an awesome idea
<FromGitter>
<watzon> @bararchy I’m going to see if there’s anything I can do tomorrow. I’ve got a mostly free day other than a personal project I’m working on
<FromGitter>
<bararchy> @watzon Cool :) thanks
<FromGitter>
<watzon> Actually I misunderstood your post at first haha. I’m going to see if there’s anything I can do to get issues closed though
<FromGitter>
<bararchy> haha, closing issues is not less importent ;)
<FromGitter>
<watzon> I feel like I should put a little effort into the language itself. Haven’t done much on it yet
<FromGitter>
<bararchy> You can join the triage program
<FromGitter>
<sdogruyol> Anyone willing to help :P ?
<RX14>
which I have put on hold for a while now...
bjz has joined #crystal-lang
<FromGitter>
<straight-shoota> nightly builds would be great. But there are also lot's of other important issues...
<FromGitter>
<watzon> @sdogruyol looks like math to me.. 😕
<FromGitter>
<watzon> That being said, I’d definitely like to see the result
<FromGitter>
<sdogruyol> Yep
rohitpaulk has quit [Ping timeout: 276 seconds]
<w-p>
is there any significant memory overhead for union types?
<w-p>
or is the type declaration only relevant to the compiler?
<FromGitter>
<straight-shoota> @w-p IIRC it's just an Int32 to store the type id
rohitpaulk has joined #crystal-lang
<FromGitter>
<straight-shoota> @sdogruyol sounds like fun to do this in Crystal :D and it shouldn't be to complicated (and I expect quite fast) with IO and Char::Reader
<FromGitter>
<konovod> IIRC +sum of type sizes, not like in C union.
<w-p>
so for example `x : Bool | Int16` vs `y : String | Int32 | Float32`
<w-p>
rather `x : Bool | Int32` vs `y : Int32 | Float32`
<crystal-gh>
[crystal] MakeNowJust opened pull request #4765: Don't find in CRYSTAL_PATH if required path is relative (master...fix/crystal/not-find-crystal-path-if-relative) https://git.io/v785L
<FromGitter>
<straight-shoota> you know my crappy Ubuntu on Windows :D
<RX14>
@straight-shoota for the Benchmark.ips you'd be much better loading the entire file into memory first
<RX14>
not opening the file every single iteration
<RX14>
actually if each iteration is greater than 50ms then don't bother
<FromGitter>
<straight-shoota> the iterations take a lot longer :D
<RX14>
oh ok then
<RX14>
i think the array version is about optimal
<RX14>
what does the go version with the updated code from reddit compare
<FromGitter>
<straight-shoota> and loading all data into memory was not considered for the benchmark anyway, because it could be assumed that the data stream is arbitrary large
<RX14>
if you do a smiliar in-language iterative benchmark
bjz_ has quit [Ping timeout: 240 seconds]
<RX14>
yes you couldn't design your code such that it required everything in memory
<RX14>
but you could put the stream in memory
<RX14>
and in fact it will be in the OS cache which is in memory
<FromGitter>
<straight-shoota> yeah
<RX14>
see how much of a difference it makes
<RX14>
i'm interested
<FromGitter>
<straight-shoota> the Array implementation has good speed but it makes assumptions about the data
<RX14>
what assumptions?
<RX14>
that there are few fields?
<FromGitter>
<straight-shoota> that the highest key is 2008
<oz>
@straight-shoota is that the "optimized" go code? The author states that it runs in 0.338s 🤔
<FromGitter>
<straight-shoota> The absolute running time depends on the system... I'd say that measurement seems quite reasonable for a fast machine. But Crystal would probably be faster :D
<RX14>
@straight-shoota please include the actual benchmark results in that gist
<oz>
@straight-shoota in my very short experience, Crystal is very fast. :)
<RX14>
@straight-shoota try gccgo
<RX14>
i'm reasonably sure crystal would get rekt
<RX14>
actually maybe not idk
<FromGitter>
<watzon> The GitHub unicorn is back 😢
<FromGitter>
<jsilverMDX> does anyone know how I can remove by _id with mongo.cr ???
<FromGitter>
<straight-shoota> Great 👍
<FromGitter>
<straight-shoota> Yeah I have sometimes high variations between individual runs and 0% derivation for most readings. It looks like benchmark.ips does not do multiple runs when the first one takes longer than about 4.X seconds or so
<FromGitter>
<straight-shoota> Ah no I misunderstood the `calculations` and `warmup` arguments :/ Its seconds not iterations
<FromGitter>
<straight-shoota> so of course with a default value of 5 seconds we're not getting far
DTZUZU has quit [Quit: WeeChat 1.9]
<FromGitter>
<straight-shoota> for reliable results you need to increase `calculations`
DTZUZU has joined #crystal-lang
<RX14>
@straight-shoota well ips is really meant for small microbenchmarks
<FromGitter>
<straight-shoota> yeah
<FromGitter>
<straight-shoota> but the output is also nice for longer benchmarks^^
<RX14>
yup
<RX14>
ideally it does both
<FromGitter>
<watzon> Any help here would be greatl appreciated #4767
<FromGitter>
<watzon> I can't get the compiler specs to pass on Manjaro linux
_tsound has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
Split has joined #crystal-lang
Split_ has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Split__ has joined #crystal-lang
Split has quit [Ping timeout: 260 seconds]
Split_ has quit [Ping timeout: 260 seconds]
Split__ has quit [Ping timeout: 240 seconds]
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
<_tsound>
quick question, does it matter the order in which you call functions matter?
<FromGitter>
<straight-shoota> in what context?
<_tsound>
like if one function calls another function thats below it?
<FromGitter>
<bew> _tsound, it doesn't matter, you can define a method anywhere
<_tsound>
thanks
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter>
<straight-shoota> @RX14 I updated the gist again and added among others a comparison with the Go implementation
rohitpaulk has joined #crystal-lang
<FromGitter>
<straight-shoota> I didn't get gccgo to produce a working binary
<w-p>
is there any guidance out there on profiling a crystal app?
<w-p>
i've been messing with HTTP::Server and in my very naive testing wrk is producing about 20k - 30k req/sec.
<w-p>
with pypy and falcon, things 'seem' quite a bit faster so I want see what i'm doing wrong.
alibby has quit [Quit: Leaving.]
<FromGitter>
<straight-shoota> @RX14 now also with nuts mode, which loads all data into memory
<FromGitter>
<straight-shoota> cuts time in half on my system
alibby has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
<Yxhuvud>
while interesting to see how much you can optimize it, is it really worth bothering to implement optimizations that could be done to the go variant as well?
<FromGitter>
<konovod> Crystal version is 2.9s (both with and without array) vs 2.1s with D (ldc) version on my machine. Still not bad.
<FromGitter>
<straight-shoota> @yxhuvud the nuts mode is actually taken from the go implementation, I was just trying to verify if the 0.338s stated for the Go version are possible in Crystal as well.
<FromGitter>
<straight-shoota> but the idea to use an array instead of a hashmap could be ported to Go as well
tzekid has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 240 seconds]
_tsound has quit [Ping timeout: 260 seconds]
<FromGitter>
<jsilverMDX> how do I sanitize Zalgo with Crysta;?
<FromGitter>
<jsilverMDX> Crystal
Split has joined #crystal-lang
<oprypin>
get a blacklist of characters ¯\_(ツ)_/¯
<FromGitter>
<straight-shoota> What the heck does the compiler complain about when it tells me `unexpected token: NEWLINE` and points after an `end`? 😄
<FromGitter>
<straight-shoota> I'd like to tell him to expect the unexpected...
<adam12>
LOL
<adam12>
@straight-shoota can you show some code?
<FromGitter>
<straight-shoota> I don't know if it's easily to condense... I'm deep into some macro-fu
<crystal-gh>
[crystal] RX14 opened pull request #4768: Rescue IO errors from input.close in HTTP request processor (master...bugfix/request-processor-errno) https://git.io/v7Blb
<FromGitter>
<jwoertink> @straight-shoota I saw your comment on my messed up PR lol. (I probably shouldn't be using git while taking percocet)
<FromGitter>
<jwoertink> anyway, from your idea on how to fix that, are you suggesting that I just close that PR, and open a new one with the fixed commits?
<FromGitter>
<jwoertink> If I create a new branch, cherry pick some commits, then force push, can I just override that branch?
<FromGitter>
<straight-shoota> no, you can keep the pr. just sort out the commit history locally and then force push to the PR branch
<FromGitter>
<straight-shoota> this will remove the current commits from the PR and update to the once you're going to push
<FromGitter>
<jwoertink> ok, so I checkout master, pull from upstream, checkout a new branch, cherry pick from old branch, then force push to old branch?
<FromGitter>
<straight-shoota> yep
<FromGitter>
<jwoertink> 👍 here it goes!
<FromGitter>
<straight-shoota> or you could directly checkout origin/master into a new branch