Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:14
    straight-shoota labeled #9803
  • 16:14
    straight-shoota unlabeled #9803
  • 14:44
    mamantoha closed #12567
  • 14:37
    beta-ziliani edited #12568
  • 14:35
    beta-ziliani opened #12568
  • 13:23
    Blacksmoke16 labeled #12567
  • 13:18
    Blacksmoke16 labeled #12567
  • 13:06
    mamantoha synchronize #12567
  • 13:05
    mamantoha edited #12567
  • 13:03
    mamantoha synchronize #12567
  • 12:12
    mamantoha synchronize #12567
  • 12:10
    mamantoha opened #12567
  • 11:23
    straight-shoota synchronize #12541
  • 11:15
    straight-shoota closed #12530
  • 11:14
    straight-shoota closed #12564
  • 11:14
    straight-shoota demilestoned #12564
  • 11:14
    straight-shoota milestoned #12564
  • 11:14
    straight-shoota demilestoned #12564
  • 11:14
    straight-shoota milestoned #12564
  • 10:45
    straight-shoota milestoned #12564
Lance Dillon
@riffraff169
i use make with shards
moe
@moe:busyloop.net
[m]
i was never a fan of these custom make-clones. can never remember their syntax, always have to double check (is it yarn or npm here?), just give me a makefile any day please.
worst is when their magic blows up with some obscure stack trace that doesn't even tell you whether some command/function failed or the silly tool itself
George Dietrich
@Blacksmoke16
@SebastianSzturo prob not going to happen: crystal-lang/shards#110
most of the tasks required for crystal are around building, running tests, generating docs etc. Make does a fine job at it. if you need console commands to use in prod or something, there are a few shards to help build CLIs that you could use
From IRC (bridge bot)
@FromIRC
<wwalker> anyone here programming crystal? For me, Syntastic is not working. It shows checker coreectly, but :⁠SyntasticCheck does nothing. "Currently enabled checkers: crystal" If I set the checker to ameba, I get great linting. Any idea why the crystal checker does nothing?
George Dietrich
@Blacksmoke16
From IRC (bridge bot)
@FromIRC
<riza> wwalker: which language server are you running
From IRC (bridge bot)
@FromIRC
<wwalker> riza: none. Never used a language server before. Reading now.
<wwalker> riza: which do you recommend? I see crystalline, awesome-crystal, and scry (which is apparently a WIP)
<wwalker> ah.. awesome-crystal isn't a language server just a project list
From IRC (bridge bot)
@FromIRC
<riza> wwalker: i think crystalline is the most maintained, yeah
<riza> ive used vim-ale as my lsp connection for a while and it connects well with crystalline
<riza> syntastic might also have an lsp mode, but i dont remember
<wwalker> riza: Thanks. I've never used vim-ale, may be a good time to switch to it from syntastic. I rock back and forth between being a developer and a sre/sysad/devops every few years. Today, as an SRE, I needed to do some serious dev work, used to do a lot of ruby (10 years ago) so crystal looked good.
Lance Dillon
@riffraff169
so puppet instead of ansible
From IRC (bridge bot)
@FromIRC
<riza> wwalker: hey that sounds like how i work, welcome to the language and i hope you find what you need in it
WintonMc
@WintonMc_twitter
y este lenguaje tiene GUI para trabajar?
George Dietrich
@Blacksmoke16
There are a few GUI libs, but I wouldn't say that's crystal's strongest area at the moment
From IRC (bridge bot)
@FromIRC
<Elouin> Is there some library for receiving emails? i only found libs for sending mails.
George Dietrich
@Blacksmoke16
not that im aware of
From IRC (bridge bot)
@FromIRC
<Elouin> Ahh, https://github.com/annwyl/crystal-lang-imap . but no update since over a year.
George Dietrich
@Blacksmoke16
ah nice, if it was written for 1.0 probably still works
From IRC (bridge bot)
@FromIRC
<riza> Elouin: if you've got a web service running, a decent pattern is to use a postfix plugin to act on a received email and then post it to an api endpoint
<riza> email being so notoriously overridden with bugs and exploits, it's probably worth relying on an establish project to handle the bulk of the work and just hooking the output of their stuff
From IRC (bridge bot)
@FromIRC
<Elouin> I just want a small mailinglist application, no web service.
From IRC (bridge bot)
@FromIRC
<riza> Elouin: makes sense. looking at the options for postfix, that might still be a nice option. https://www.postfix.org/FILTER_README.html
From IRC (bridge bot)
@FromIRC
<Elouin> riza: but if I use IMAP to get the mails from some provider, isnt then something like that already on the server?
From IRC (bridge bot)
@FromIRC
<riza> Elouin: oh, probably. Then you're using gmail or whatever as your mail server, sure.
From IRC (bridge bot)
@FromIRC
<Elouin> since gmail will soon have no imap anymore not that, but yeah.
From IRC (bridge bot)
@FromIRC
<riza> I hadn't heard that...seems like a strange move to me. But ok
moe
@moe:busyloop.net
[m]
is there any way to get at the return type that crystal magically determines for a method during compilation when none is explicitly specified?
i assume probably not :/
From IRC (bridge bot)
@FromIRC
<Guest38> Hey folks. If someone has a wikipedia account they could modify the page for Rust to mention Crystal as well. Seems pretty fitting among the listed languages in this sentence: "... commented on Rust's chances of becoming a competitor to C++ and to the other up-and-coming languages D, Go, and Nim (then Nimrod)"
From IRC (bridge bot)
@FromIRC
<jhass[m]> You don't need an account to edit wikipedia, https://en.wikipedia.org/w/index.php?title=Rust_(programming_language)&action=edit
George Dietrich
@Blacksmoke16
@moe:busyloop.net no, because it could probably change? If possible this is why its just easier to add a return type
3 replies
Quinton Miller
@HertzDevil
the def is separately instantiated for each set of argument types, so there isn't "an" inferred return type of the def
moe
@moe:busyloop.net
[m]
hmm makes sense. guess what i'd like is a way to inspect all the def's that are generated.
but i see why that isn't exactly feasible.
moe
@moe:busyloop.net
[m]
well, in principle, yes. hmm, maybe i'm indeed making it too complicated.
i'll see how far i can get by forcing that def to be explicit.
George Dietrich
@Blacksmoke16
only exception is error responses, but if you raise them, they technically wouldnt be returned and you could handle that elsewhere
moe
@moe:busyloop.net
[m]
yeh, those i already got covered. in the renderer for an exception type you can declare whether it should automatically be injected into the swagger docs for all endpoints (useful for all the base-exceptions that can happen on any endpoint). and endpoints can declare the additional exceptions that they may throw (no way to discover them otherwise).
actually happy with how that part looks. thought that would be the harder one, but turns out the return types is actually more tricky as it fans out into return-type(s) -> renderer -> content-types.
getting that stuff to work at runtime was surprisingly easy (yay for crystal!). now discovering it before runtime to build those swagger docs. uff.
George Dietrich
@Blacksmoke16
i just made them required in athena, for diff reasons but the point is the same
not super familiar with swagger, but i know they have a concept of models of which you'd use to represent the response yea? then from there is prob a way to show how they are rendered given various content types?
i.e. the core type of the response doesnt change, just its representation
serialized representation that is
moe
@moe:busyloop.net
[m]

ha, yea, you're pointing right at the hard part.
at first i had the models generate their swagger-schema.

but then i realized, endpoints often only return a partial view of a model
(i.e. you don't want to include the password-field with users and don't want
that mentioned in the swagger-docs either).

so... it's kinda annoying, i guess my renderers (aka serializers)
have to be aware both of their model and the endpoint.

maybe it's just not solvable without really forcing the user
to explicitly declare it...

George Dietrich
@Blacksmoke16
prob a good idea to have a separate object used to represent payload/responses versus assuming that is going to match the DB model 1:1