<FromGitter>
<asterite> wmoxam: you can also try --threads=1, that way modules will be compiled one by one and I think in total less memory will be allocated. We are using that on CI
<FromGitter>
<meltheadorable> hard agree on yak shaving
<wmoxam>
@asterite Thanks! The problem ended up being a process limit set too low. Fiddled with ulimit and got it working
<wmoxam>
It's nice to see Crystal working on OpenBSD again 😅
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<watzon> Yes, yes it is
<FromGitter>
<andrius> Good morning, I am trying to add named hooks/events: name -> proc), but my code failing: https://play.crystal-lang.org/#/r/7d2g. Whats wrong?
<FromGitter>
<watzon> @andrius so when passing blocks around you always need to provide a type signature for the block
<FromGitter>
<absolutejam_gitlab> I'll just run `uname`
<FromGitter>
<absolutejam_gitlab> :shrug:
laaron has joined #crystal-lang
<FromGitter>
<absolutejam_gitlab> Is there any merit in adding an implicit `STDOUT` and `STDERR` for the backtick operator?
<FromGitter>
<absolutejam_gitlab> Theres `$?` but that's pretty much the only benefit vs. using `Process`
<FromGitter>
<tenebrousedge> an implicit STDOUT? what?
<FromGitter>
<absolutejam_gitlab> Automatically capture the stdout/stderr I mean
<FromGitter>
<absolutejam_gitlab> and provide it as a variable or something
<FromGitter>
<tenebrousedge> it already captures stdout, if you want stderr I'd just do `2>&1`, if you want separate streams then `Process` sounds like a thing
<FromGitter>
<absolutejam_gitlab> Oh I didn't realise it returned stdout
dingenskirchen has quit [Ping timeout: 264 seconds]
dingenskirchen has joined #crystal-lang
fyber has quit [Remote host closed the connection]
lucasb has joined #crystal-lang
dwdv has left #crystal-lang ["User left"]
<FromGitter>
<bajro17> Anyone offer crystal lang job ? :)
<jokke>
bajro17 where are you from?
<jokke>
i'm coding crystal at work and we're always looking for new talents :)
<FromGitter>
<tenebrousedge> jokke what are you guys working on?
<jokke>
microservices mainly
<jokke>
usually web related but seomtimes not
<FromGitter>
<tenebrousedge> sounds like a good fit for Crystal. Where are you located?
<jokke>
frankfurt
<jokke>
germany
<jokke>
shards gives me this error: Error resolving db (~> 0.6.0, *, ~> 0.5.0). What exactly does it mean?
<FromGitter>
<tenebrousedge> what is your restriction for that shard?
<jokke>
i haven't specified any in shard.yml but lemme check crecto...
<jokke>
~> 0.5.0
<FromGitter>
<Blacksmoke16> ouch, still using `crecto`?
<jokke>
yeah :/
<jokke>
there's no alternative yet
<jokke>
(for me
<jokke>
so what's the issue? db has dropped 0.5.0?
<FromGitter>
<tenebrousedge> huh, https://shards.xyz has 0.5.0 and not 0.6.0
<jokke>
Blacksmoke: eventually i'm going to try and migrate to avram but it's gonna be a huge effort. i have very complex queries and transaction logic. :/
<FromGitter>
<j8r> have you specs?
<FromGitter>
<Blacksmoke16> yea i can only imagine what an undertaking it would be
devil_tux has quit [Ping timeout: 258 seconds]
<jokke>
j8r: sure
<FromGitter>
<tenebrousedge> jokke, the error suggests that it's trying to satisfy both `~> 0.6.0` and `~> 0.5.0`
<jokke>
hm weird
<jokke>
locally it seems to be working...
<jokke>
just not in docker on crystal 0.27.0
<FromGitter>
<tenebrousedge> `ag -Q "0.5.0"` and `ag -Q "0.6.0"` and see what pops up
<jokke>
nothing
<FromGitter>
<absolutejam_gitlab> I keep getting `Unhandled exception: Unexpected char '#' at 1:1 (JSON::ParseException) ` trying to load json from a file
<FromGitter>
<Blacksmoke16> sure the json in the file is valid
<FromGitter>
<absolutejam_gitlab> `jq` likes it
<FromGitter>
<absolutejam_gitlab> and jsonlint
<FromGitter>
<tenebrousedge> hmmmm
<FromGitter>
<Blacksmoke16> got some example code?
<FromGitter>
<tenebrousedge> jokke, that sounds bizarre
<FromGitter>
<Blacksmoke16> i had a project going i need to revive
<FromGitter>
<Blacksmoke16> was half like a query builder type thing, and have allows you to reuse queries
<jokke>
`Post.where(published: true, author_id: User.first!.id)` does this fail to compile if no column `published` is defined?
<FromGitter>
<Blacksmoke16> mmm let me see
<jokke>
because that is what i find so nice in avram
<jokke>
you have to try _really_ hard to eff up your queries :D
<jokke>
mps_: are you the maintainer of the crystal package on alpine?
<mps_>
jokke: not officially, but I maintain it for a year or more.
<mps_>
I didn't took maintainer-ship because previous maintainer (jirutka) is still active on Alpine
<jokke>
close enough! i was wondering if you'd like to collaborate on my alpine-crystal image. There's some optimization to be done. Currently it basically just gets the latest alpine and installs crystal from edge. But i'd rather like to install a specified version of crystal for which i'd need your expertise
<mps_>
and jirutka's knowledge is a loot better than mine about crystal
<FromGitter>
<Blacksmoke16> jokke, i tried it out, its not a compile error but would be runtime, mainly from the db shard complaining that column doesnt exist
<mps_>
(and not only crystal, to be honest)
<FromGitter>
<Blacksmoke16> `Unhandled exception: no such column: foo (SQLite3::Exception)`
<FromGitter>
<Blacksmoke16> i dont think it would be hard to catch that in the query builder and throw some higher level exception
<FromGitter>
<Blacksmoke16> if you want to make an issue
<mps_>
ok, will look later
<FromGitter>
<Blacksmoke16> it would still have to be runtime as you dont have access to them at compile time
<jokke>
yeah no i'd want it to happen on compile time
<jokke>
mps_: currently it's just super trivial because it's not actually building the crystal package. but since you understand how alpine package build files work you might be able to point me in the right direction
<FromGitter>
<Blacksmoke16> that would be trickier
<jokke>
yeah
<jokke>
a lot of macro magic involved :P
<FromGitter>
<Blacksmoke16> does avram do that?
<jokke>
yeah
<mps_>
jokke: I see. maybe you can join #alpine-devel where you can get help from more alpine developers
<jokke>
which also only accept attributes of the correct types
<FromGitter>
<j8r> Why you would need alpine knowledge jokke?
<jokke>
it's beautiful
<FromGitter>
<j8r> just get the crystal source, checkout the tag, then make install
<jokke>
j8r: for building the alpine package for crystal
<jokke>
hmm
<jokke>
j8r: you're probably right
<mps_>
ehm, I forgot to mention j8r who has a deep knowledge with crystal on alpine
<FromGitter>
<j8r> that's a exaggerating a bit my skills 😅
<mps_>
j8r: ;-)
<jokke>
j8r: hm and what about all the dependencies?
<jokke>
is it possible to use apk to install just the _dependencies_ of a package? :)
<FromGitter>
<j8r> jokke: you install them at first with `apk add`
<jokke>
yeah sure but i have to manually define them
<FromGitter>
<j8r> or jokke, better
<FromGitter>
<j8r> you can also create your own alpine repo
<jokke>
oh
<jokke>
that's nice
<FromGitter>
<j8r> with different crystal versions, and shards version
<mps_>
or alpine virtual apk, which contains just deps
<jokke>
mps_: ?
<FromGitter>
<j8r> oh I see
<FromGitter>
<Blacksmoke16> ah so it uses the lack of a method being defined for it? jokke?
<jokke>
Blacksmoke16 exactly
<jokke>
or if you want to search for `.name(16.3)` it would fail
<jokke>
because name is a column of type String
<jokke>
without you having to write a single test for the query
<mps_>
jokke: 'apk add -h' and look at --virtual option description
<mps_>
maybe this will help you
<jokke>
mps_: ah sweet
<jokke>
thanks
<FromGitter>
<Blacksmoke16> pretty neat approach
<jokke>
yeah
<FromGitter>
<j8r> dependencies aren't the hardest part
<FromGitter>
<j8r> the hardest one is specs
<jokke>
mps_: hmm i'm still not sure how that would work
<jokke>
Instead of adding all the packages to 'world', create a new virtual package with the listed dependencies and add that to 'world'; the actions of the command are easily reverted by deleting the virtual package
<jokke>
what listed dependencies?
<jokke>
join #alpine-devel
<FromGitter>
<absolutejam_gitlab> I love that feature in alpine
<FromGitter>
<Blacksmoke16> so common queries can be abstracted into a class that could easily be reused/tested
<FromGitter>
<Blacksmoke16> which is also type safe, but doesnt handle missing columns atm
<FromGitter>
<meltheadorable> nooooot a fan of that but i think we just have thoroughly incompatible views on what a nice web app looks like 😂
<FromGitter>
<Blacksmoke16> yea you seem to not like everything i like :P
<FromGitter>
<Blacksmoke16> what arent you a fan of this time?
ht_ has joined #crystal-lang
<FromGitter>
<meltheadorable> the query builder in general, i think moreso than the specific way it copes with reusability, needing to create entire classes for every reusable query piece for each type of model is a lot, and that seems to be a consequence of the builder being based around classes rather than chainable methods
<FromGitter>
<Blacksmoke16> should also mention the generics on each operator are optional, just wouldnt get type safety. But yea valid points
<FromGitter>
<Blacksmoke16> the idea is you make the classes for common things, that could be shared between models for example
<FromGitter>
<Blacksmoke16> or larger common queries for determining if a customer is active or something
<FromGitter>
<meltheadorable> Yeah, I just often have like 10-15 queries I’ll reuse a bunch of places per model in a largeish app, that’s 10-15 more files per model, maybe minus 4 or 5 that can be shared between multiple models somehow
<FromGitter>
<Blacksmoke16> by common i mean like very high level stuff
<FromGitter>
<Blacksmoke16> granted the benefit of that isn't super high but you get the idea
<FromGitter>
<meltheadorable> I get that, I’m saying reproducing the entire specify chain for every query I use more than once or twice in a given model though would be worse than adding classes for all of them, but neither option is great
<FromGitter>
<Blacksmoke16> indeed
<FromGitter>
<Blacksmoke16> the idea also is it would be ORM independent, as long as each ORM implements some common stuff, like a way to get the table name
<FromGitter>
<Blacksmoke16> so the ORM specific builder is also valid, then can just use it for specific things
<FromGitter>
<Blacksmoke16> is quite low on my list atm so meh
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<bajro17> mps where are you from?
<FromGitter>
<meltheadorable> @Blacksmoke16 i didn’t mean to like, shit on it for you, im sure theres people out there who would prefer your approach based on wherever they’re coming from, im afraid i wasn’t clear enough when i started about like, us just having a disagreement about these things — i really meant that, it’s a disagreement, obviously i think it’s right, but there’s room for both of us to have opinions we
<FromGitter>
... think we’re right about here 😅
<mps_>
bajro17: I live in Serbia, but when I was child I lived some years in Bosnia.
<mps_>
so, we are neighbors :)
<FromGitter>
<bajro17> oh so nice I never visit it even we are so close
<mps_>
bajro17: you must be young man then, I think
<FromGitter>
<bajro17> I'm 28 years old I just marry before 2 months :D
<mps_>
bajro17: my congratulations :)
<mps_>
I visited Mostar, Sarajevo, Banjaluka and some other cities there but that was long time ago
<mps_>
nice to know we are near, in case someone of us start to think of organizing crystal conference or workshop
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen1 has joined #crystal-lang
<FromGitter>
<Blacksmoke16> @meltheadorable all good. you have valid points.
<FromGitter>
<Blacksmoke16> but i think i tend to agree :P
<FromGitter>
<meltheadorable> yeah i just didn’t wanna be like, discouraging you working on it, it’s not for me but it doesn’t have to be
dingenskirchen1 is now known as dingenskirchen
<FromGitter>
<Blacksmoke16> was a fun project but i dont have a need for it either atm haha
<FromGitter>
<bajro17> mps_ thank you so much :)
<FromGitter>
<bajro17> I was planning this also if it be possible
<FromGitter>
<bajro17> to do some kind of conference
<mps_>
well, maybe when bararchy open his office (if he didn't opened it already, I didn't talked with him for some time)
<mps_>
bajro17: yes, I found IRC log: '2019-05-27 12:25............ bararchy| Anyone here from Bosnia?'
<mps_>
my memory still works ;-)
<mps_>
and: '2019-05-27 12:54............ bararchy| We just opened a new office there, I wanted to see if we have fellow Crystal devs in the area'
<FromGitter>
<watzon> Ahh yeah I forgot NeuraLegion had an office in Bosnia
<FromGitter>
<watzon> Hopefully I'll get to visit all the places we have offices soon
<mps_>
watzon: you work for NeuraLegion ?
<FromGitter>
<bajro17> I want work there :'(
<FromGitter>
<bajro17> I will check where it is
<mps_>
bajro17: bararchy told me office is in Mostar
<FromGitter>
<bajro17> I will check are they on google maps to I try go visit :)
<FromGitter>
<watzon> @mps_ yes I do :)
<mps_>
OMG, this channel could add 'NeuraLegion' in topic :D
<FromGitter>
<watzon> Lol, I mean it's one of the few companies using Crystal in production
<FromGitter>
<watzon> And we're doing awesome things with it
<mps_>
just kidding, nice to know. I read about NeuraLegion success with crystal, read bararchy's interview in 'Programming Crystal' and talked with him some times, and all this was that persuaded me to use crystal in my company
<FromGitter>
<meltheadorable> i would personally love to get a little crystal in production at work, but it’s hard to justify for most of what we do
<mps_>
also I'm waiting for API and lang stabilization, before using in big apps
<mps_>
for now we are using it for small things/jobs
<FromGitter>
<watzon> Smart
<FromGitter>
<watzon> I really hope we'll get v1 in 2020
<mps_>
also I hope we will not wait to loooooong
<FromGitter>
<bararchy> @bajro17 already open NeuraLegion :) we have an office there
coderobe has quit [Read error: Connection reset by peer]
<mps_>
bararchy: good day :-) I mentioned you few times here today. hope you are not angry at me
<FromGitter>
<bararchy> LOL not at all, gitter is usually closed, good thing @watzon pinged me XD
<FromGitter>
<watzon> Lol @bararchy likes the attention 😉
<FromGitter>
<bararchy> hahahah
<FromGitter>
<bararchy> mps_: how's it going btw?
<mps_>
just returned from vacation two days ago, so for now I feel good, thanks. and you?
<FromGitter>
<bajro17> So beautiful to hear in Bosnia we have office who use crystal lang
<FromGitter>
<bajro17> @bararchy is it allowed to visit company?
<FromGitter>
<bararchy> I guess you can talk with @duraki for the guided tour? ;)
<mps_>
straight-shoota: I see you are here again. I'm upgrading crystal to 0.30.0 for Alpine. x86_64 is ok and compile/build on aarch64 is ok, but 'make spec' still segfaults
<mps_>
i.e. 'Invalid memory access (signal 11) at address 0x20'
<mps_>
I'm not in hurry, when you find some time
<FromGitter>
<watzon> I gotta get myself over to Europe
<FromGitter>
<watzon> I want to meet some people in person lol
<FromGitter>
<bajro17> @watzon if you ever be in Bosnia I will pay for you hotel and all things in Bosnia you are welcome
<FromGitter>
<watzon> @bajro17 that's a very generous offer :)
<FromGitter>
<watzon> I'm hoping to be able to take a trip over that way sometime next year
Raimondi has quit [Quit: WeeChat 2.5: ¡Chau!]
<FromGitter>
<kingsleyh> I've upgraded to 0.30.0 but getting an error:
<FromGitter>
<straight-shoota> Unfortunately I don't have aarch64 hardware to work on it
<FromGitter>
<kingsleyh> what does it mean `internal` is missing?
<FromGitter>
<straight-shoota> @kingsleyh That looks weird
<FromGitter>
<straight-shoota> is that all the error output?
<FromGitter>
<kingsleyh> I guess it's this ` new(method, resource, headers.try(&.dup), body, version, internal: nil)`
<FromGitter>
<kingsleyh> that last argument must be new since 0.30.0
<FromGitter>
<straight-shoota> yes it separates the internal `new` implementation from the public one. The public method dupes the headers, the internal one doesn't
<mps_>
straight-shoota: hi! I can post you my build log if you want to look at it
<FromGitter>
<straight-shoota> Oh, the issue is probably that you're overriding `initialize`, but `initialize` has only the internal implementation (which requires `internal` argument). You need to override `new` instead. That's always better, anyway.
<FromGitter>
<Blacksmoke16> its defined in those three files since in each i do `module Athena`
<FromGitter>
<Blacksmoke16> i.e. if you have a class defined in one file and reopen it to add something else in another file, those two files would be listed under that section
<FromGitter>
<absolutejam_gitlab> I've got multiple files with `module Climax` but nothing in `Defined in:`
<FromGitter>
<absolutejam_gitlab> but they're sourced with `require "./*"`
<FromGitter>
<absolutejam_gitlab> not explicitly
<FromGitter>
<absolutejam_gitlab> would that affect it?
<FromGitter>
<Blacksmoke16> not sure
<FromGitter>
<Blacksmoke16> my assumption was it represented where that type is defined
<FromGitter>
<absolutejam_gitlab> was just comparing it against Athena is all
<FromGitter>
<Blacksmoke16> yea and now that you mention it i deff do `module Athena` in more than 3 places
ht_ has quit [Remote host closed the connection]
<FromGitter>
<Blacksmoke16> based on the code it just looks like it should be each file that type is defined in
<FromGitter>
<Blacksmoke16> i.e. declaring the same class in three files, that section should mention those three files
<FromGitter>
<straight-shoota> yes, that's how it works @Blacksmoke16
<FromGitter>
<straight-shoota> @absolutejam_gitlab Are you sure all locations are included in the docs code?
Raimondi has joined #crystal-lang
sorcus has quit [Ping timeout: 252 seconds]
<FromGitter>
<omidathari> Hi guys, Does anyone use Atom for crystal editor. Is there a global comment or multi-line comment trick?
<dingenskirchen>
have you tried "toggle line comments" in the command palette?
<dingenskirchen>
works with multiline selections too