onethirtyfive has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
<crystal-gh>
[crystal] asterite opened pull request #3311: Compiler: respect C ABI for procs and top-level methods that involve extern structs (master...feature/fix_proc_extern_structs) https://git.io/virC7
olek_poz has joined #crystal-lang
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/virCj
<crystal-gh>
crystal/master 1f3e8b0 Ary Borenszweig: Fixed a couple of typos
<FromGitter>
<aolko> oh no, take cover, anothe vim vs. emacs holywar
<FromGitter>
<mverzilli> haha, I don't think so, I'm a spacemacs newbie so no fanaticism here yet
A124 has quit [Read error: Connection reset by peer]
A124 has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
pawnbox has joined #crystal-lang
snsei has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
bjz has joined #crystal-lang
<asterite>
I use sublime text in vim mode, to end the war: no, I don't use vim, but I like it :-P
<asterite>
BlaXpirit: here?
<BlaXpirit>
hi
<asterite>
o/
<asterite>
it'll be faster if we talk here, I think
bjz has quit [Read error: Connection reset by peer]
<BlaXpirit>
sure
<asterite>
can I somehow reproduce your error locally?
<asterite>
is your project public?
<asterite>
I have an idea of where the problem might be, but I want to reduce it and add a test case
<BlaXpirit>
it's in uncommitted uncleaned changes of an otherwise public project :s
bjz has joined #crystal-lang
<asterite>
One thing you can do to spot where the problem might be (so we can reason about it and I can try to fix it)...
<asterite>
is, in codegen.cr there's a line ` def visit(node : ProcLiteral) `
<asterite>
add `pp node, node.location` after that
<asterite>
and recompile the compiler, and then compile your file. Before the crash stacktrace it will be printed which proc is the problematic one, and from there we'll move on
<asterite>
(I'll be back in 20 minutes, but I'll see messages here)
<asterite>
Great! I'll debug it later. I also found a different case where it breaks on my side
<BlaXpirit>
ok thanks
mgarciaisaia has left #crystal-lang [#crystal-lang]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
<BlaXpirit>
asterite, another thing worth mentioning, _cp_gather just makes another method that returns an array instead of yielding, based on the existing one. also, after you've defeated the crash, may be worth trying the specs in space_spec.cr (replace `pending` with `test`). I have confirmed that these pending tests give incorrect results on your previous commit b05936a, while on your latest commit 56bc69d it crashes (not too late to diff between them)
pawnbox has joined #crystal-lang
<FromGitter>
<jwaldrip> Does crystal have a way to install global packages in your path. i.e. command line tools or generators. If not, I would love to add something like that to the crystal cli.
<FromGitter>
<crisward> like `npm install -g`?
onethirtyfive has joined #crystal-lang
<BlaXpirit>
jwaldrip, no, nothing like that at all
<BlaXpirit>
let alone installing, even using libs can be done only from current folder
<BlaXpirit>
not that there's a real need for this
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Client Quit]
Philpax has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
<FromGitter>
<sdogruyol> @crisward what's the use case for that?
<FromGitter>
<sdogruyol> if you want you can add it to your handlers as a middleware
<FromGitter>
<jwaldrip> Correct
<FromGitter>
<jwaldrip> @crisward correct
perks has joined #crystal-lang
perks has quit [Client Quit]
<FromGitter>
<crisward> @sdogruyol I've added it as middleware, which is fine. I just try and gzip everything I can for quicker downloads. Crystal seems to do this fairly effortlessly, so it could be nice to have as a config option. Obviously skipping binaries is a necessary, but css, js and html really benefit from gzip.
<FromGitter>
<sdogruyol> Yeah I noticed that
<FromGitter>
<sdogruyol> Maybe I should enable it by default
mark_66 has quit [Remote host closed the connection]
<FromGitter>
<crisward> it would be good for it to be optional, as you may want to run kemal behind a proxy.
emancu has joined #crystal-lang
qard has joined #crystal-lang
<FromGitter>
<sdogruyol> @crisward yeah
<FromGitter>
<sdogruyol> something like `enable_gzip` would be cool
<FromGitter>
<sdogruyol> @crisward gzip true , it's false by default
<asterite>
should be true by default
bew78 has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
mgarciaisaia has left #crystal-lang [#crystal-lang]
<FromGitter>
<sdogruyol> @asterite i wonder how it plays with nginx
<FromGitter>
<sdogruyol> Rack::Deflater is not enable by defaut in Sinatra, Rails e.g
soveran has quit [Remote host closed the connection]
<FromGitter>
<crisward> @sdogruyol Not sure what nginx does if it proxies gzip, I imagine if it sees the headers it just passes it through. Even so, I think off by default seems more logical. Just trying to work out how to gzip static files too
bew78 has quit [Ping timeout: 244 seconds]
<FromGitter>
<sdogruyol> @crisward isnt adding HTTP::DeflateHandler to handlers solves that?
Oliphaunte has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
<RX14>
i don't think gzip should be true by default
<FromGitter>
<crisward> `Kemal.config.add_handler gzip_middle` only adds it normal routes, not static
<FromGitter>
<crisward> `gzip_middle` is my middleware which is just an empty class extending deflate
<RX14>
also, crystal shouldn't generate another tool for installing commandline tools, that should be left to the system package manager
<RX14>
there probably should be an option for shards installing binaries to a project-local bin folder
<RX14>
which stuff like crenv could possibly add to the path
<RX14>
if you're in that folder of course
<RX14>
but nothing global, there's too many package managers out there
<RX14>
maybe even design it as shards tool <x>
<RX14>
instead of a bin folder
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
<FromGitter>
<jwoertink> Is there a way to include a Makefile as a part of a shard?
<FromGitter>
<jwoertink> or, I guess the better question is, if a shard has a Makefile, when you run `shards install` how come that Makefile doesn't show up in the libs folder?
<RX14>
@jwoterlink, shards only has the src folder
<RX14>
shard/src -> libs/shard_name
<RX14>
rest is discarded
<FromGitter>
<jwoertink> Is there a way to override that?
<BlaXpirit>
confused_crystal, that's a nice echo chamber
<RX14>
BlaXpirit, ?
<FromGitter>
<sdogruyol> crystalshards.xyz is down for the moment
<FromGitter>
<sdogruyol> payment issue
<FromGitter>
<sdogruyol> fkadev is fixing it
<RX14>
is crystalshards.xyz open source?
<FromGitter>
<sdogruyol> yeah
<confused_crystal>
@sdogruyol I was using will/crystal-pg, do you know if its possible to do names parameters? at the moment all the examples use $1, $2 etc?
<FromGitter>
<sdogruyol> that's actually named parameters
<confused_crystal>
sorry typo
<FromGitter>
<sdogruyol> SELECT * FROM users WHERE id = $1 and you pass the named parameter like that
<confused_crystal>
but I want to be able to do "select * from user where id = :id" like in other libraries
<FromGitter>
<f> Hello. Sorry for the problem on CrystalShards.xyz
<FromGitter>
<f> I didn't pay the bill to the Heroku, they suspended my account completely :/
<confused_crystal>
in psycopg2 you can do something like "select * from bla where email = %(email)s", {"email", "dsdsdd"}
<FromGitter>
<f> And I paid back now, now it's alive.
<FromGitter>
<f> I need a donation thing for CrystalShards.xyz :smile:
<BlaXpirit>
there is no problem with the voting system, i'm just saying the absolute value is not the answer
<FromGitter>
<piedoom> Hey, I'm just spitballing here.
Oliphaunte has quit [Ping timeout: 250 seconds]
<RX14>
BlaXpirit, BTW is there a better power_assert macro?
<RX14>
or was it just compiler mods + other assert macros
<FromGitter>
<piedoom> I think a good simple solution is probably taking the amount of stars/last updated date into account and weighting results for trending
<BlaXpirit>
RX14, i've put up a simple assert macro for just top level expressions that cooperates with standard library spec spec
<FromGitter>
<piedoom> So a popular repo won't be removed just because it's old
<RX14>
hmm
<BlaXpirit>
piedoom, it's a very minor improvement
<RX14>
what about
<RX14>
manual outdated marking
<FromGitter>
<piedoom> that could work as well
<RX14>
people can report outdated, which is reviewed by humans
<BlaXpirit>
i'm afraid that a proper solution will require (for example) daily snapshots of stars for each repo
<RX14>
the proper solution is human
<BlaXpirit>
and simply take growth as well as absolute value into account
<FromGitter>
<piedoom> Might be necessary since it's impossible to tell between stuff that is old and needs updating and stuff that is old but still works.
<RX14>
BlaXpirit, power_assert.cr is broken in 0.19.1
<BlaXpirit>
old stuff that still works will usually also get growth
<BlaXpirit>
RX14, well i think power_assert is beyond repair
<RX14>
uhh
<BlaXpirit>
has some long standing issues but the performance just kills it
<FromGitter>
<f> any idea to get a "outdated" date from github api?
<FromGitter>
<piedoom> Doesn't it already have the last updated date?
<RX14>
uhh
<RX14>
get the latest commit?
<BlaXpirit>
sigh
<RX14>
github has a commits API
<FromGitter>
<f> no no
<BlaXpirit>
crystalshards.xyz has such information
<FromGitter>
<f> i mean community will mark repo as outdated
<BlaXpirit>
outdated is not a concept that can be covered by an automatic api
<FromGitter>
<f> and so i can know outdated
<BlaXpirit>
of course github doesnt have such a specific feature
<FromGitter>
<f> but this data should be in gh api
<RX14>
...
<RX14>
why
<FromGitter>
<piedoom> All the data you can get from the API is the last commit
<FromGitter>
<f> i don't mean gh should have :D
<FromGitter>
<f> i mean abusing gh api to have this feature-ish
<FromGitter>
<piedoom> Maybe if we train a neural network on old github repositories.......
<FromGitter>
<f> (thinking loudly)
<BlaXpirit>
[00:20:11] <BlaXpirit> i'm afraid that a proper solution will require (for example) daily snapshots of stars for each repo
<FromGitter>
<f> @piedoom I tried GH's new feature of "Review" with your commit.
<FromGitter>
<f> :)
pawnbox has quit [Ping timeout: 265 seconds]
<FromGitter>
<piedoom> Cool! let's see if I can figure out how to use git properly :)
<FromGitter>
<piedoom> Oh whoops. I guess dragging files into VSCode copies them and doens't actually open the original :P
<FromGitter>
<mverzilli> the Elm packages site (http://package.elm-lang.org/) pushes down and grays out packages that don't compile with the latest version
<FromGitter>
<mverzilli> doing that and sorting by stars seems to work really well
Oliphaunte has joined #crystal-lang
<FromGitter>
<mverzilli> but of course, it's kind of difficult to pull of since we would need to think of some automated way of determining whether a shard compiles in the latest Crystal
<FromGitter>
<mverzilli> *pull off
<FromGitter>
<piedoom> That's pretty interesting
<FromGitter>
<piedoom> Does Travis CI offer any tool like that? I know they do testing for Crystal but I'm not too familiar with the service.
Oliphaunte has quit [Ping timeout: 265 seconds]
<FromGitter>
<piedoom> Does anyone know how I might go about creating an object with the JSON mapping feature, when the JSON I want to target isn't root-level? Here's a gist of the data I'm dealing with - ⏎ ⏎ https://gist.github.com/piedoom/41985198d98c67bdfa8bc5eea0f952b2
<FromGitter>
<piedoom> I want to get everything within the "user" object, and ignore the rest. Only thing I thought of so far is to parse the JSON, and then send in a hash, but I'm sure there's a better way.
<Liosha>
Thanks you @raydf! Nice VSCode theme "theme-crystaldark" +1, Also, could be good a "light theme" XD
onethirtyfive has quit [Remote host closed the connection]