Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:21
    straight-shoota milestoned #12781
  • 11:21
    straight-shoota milestoned #12781
  • 02:15
    straight-shoota assigned #11331
  • Nov 25 23:24
    straight-shoota labeled #12782
  • Nov 25 23:24
    straight-shoota labeled #12782
  • Nov 25 23:24
    straight-shoota opened #12782
  • Nov 25 23:17
    straight-shoota labeled #12781
  • Nov 25 23:17
    straight-shoota labeled #12781
  • Nov 25 23:17
    straight-shoota opened #12781
  • Nov 25 23:01
    straight-shoota synchronize #11635
  • Nov 25 22:56
    straight-shoota synchronize #11840
  • Nov 25 22:49
    straight-shoota labeled #12636
  • Nov 25 19:21
    straight-shoota labeled #12780
  • Nov 25 19:21
    straight-shoota labeled #12780
  • Nov 25 19:21
    straight-shoota labeled #12780
  • Nov 25 19:21
    straight-shoota opened #12780
  • Nov 25 19:11
    straight-shoota labeled #12779
  • Nov 25 19:11
    straight-shoota labeled #12779
  • Nov 25 19:11
    straight-shoota opened #12779
  • Nov 25 19:11
    straight-shoota labeled #12779
George Dietrich
@Blacksmoke16
are you familiar with jq?
From IRC (bridge bot)
@FromIRC
<mfiano> No
Benjamin Wade
@RespiteSage
Well, no questions are stupid questions. :)
George Dietrich
@Blacksmoke16
A performant, and portable jq wrapper to facilitate the consumption and output of formats other than JSON; using jq filters to transform the data.
From IRC (bridge bot)
@FromIRC
<mfiano> Ah, I missed that your repo is oq. I was reading RespiteSage's message out of context
<mfiano> Well thanks for the tips. I'll study some projects and see what would work best for me
George Dietrich
@Blacksmoke16
np
fwiw crystal itself doesnt use that extra dir
so :shrug:
From IRC (bridge bot)
@FromIRC
<mfiano> btw which shards database/search website do you recommend. I noticed there are like 4 or 5 after the one i used has been down for some time
<mfiano> ?
Benjamin Wade
@RespiteSage
You can't go wrong looking through @Blacksmoke16's projects, though maybe don't worry too much about understanding the macros yet (stuff in {{ }} or {% %}, usually).
From IRC (bridge bot)
@FromIRC
<mfiano> Crystal macros are very understandable, being a small subset of Lisp macros
Benjamin Wade
@RespiteSage
To be honest, I'm not sure. I tend to prefer shardbox.org, but it often doesn't have stuff I'm looking for.
awesome-crystal is a good starting point for quality applications and libraries of various kinds, but it's far from comprehensive.
From IRC (bridge bot)
@FromIRC
<mfiano> Ok yeah I noticed shardbox tracks ~1k, and the (now down) crystalshards.xyz had ~6k
Benjamin Wade
@RespiteSage
Yeah. And for whatever reason the language-constrained search on GitHub also rarely works for me.
George Dietrich
@Blacksmoke16
shardbox is curated as is awesome-crystal, others just scrape GH
From IRC (bridge bot)
@FromIRC
<mfiano> the * search on github rarely works good ;⁠)
Benjamin Wade
@RespiteSage
Lol.
Also, @Blacksmoke16, my usual pattern for applications was initially inspired by the scry entry point file.
George Dietrich
@Blacksmoke16
only for the reason to make it more obs what the entrypoint file is?
Benjamin Wade
@RespiteSage
Yeah, basically. I also like splitting out the driver and configuration logic from the rest of the application logic. Though that does make it hard to test the driver and configuration logic.
My discryb src/ might be the only example of my own that's publicly-available.
From IRC (bridge bot)
@FromIRC
<mfiano> to be fair, my first project was actually going to be a library, so maybe i should have clarified before asking :⁠)
George Dietrich
@Blacksmoke16
@RespiteSage take a look at oq_cli.cr
might be easier to test
Benjamin Wade
@RespiteSage
Yeah, libraries bypass those considerations.
George Dietrich
@Blacksmoke16
i.e. use option parser to process the args and create an instance of the actual type, passing in those args
From IRC (bridge bot)
@FromIRC
<mfiano> Doubtful, as all the new kids seem to prefer vscode, but anyone using vim/nvim for crystal?
Benjamin Wade
@RespiteSage
I am one of those new kids, but I know I've seen people talk about using vim/nvim (and at least one or two other terminal editors) when writing Crystal.
From IRC (bridge bot)
@FromIRC
<mfiano> I guess one of the questions I have is editor agnostic...is crystalline the preferred LSP server?
George Dietrich
@Blacksmoke16
thats what i hear yes
Yeah, Scry has been around longer, but Crystalline seems to have more features and be more actively maintained.
From IRC (bridge bot)
@FromIRC
<mfiano> Great thanks
<mfiano> I'm happy to see vim-based does take a nice second place on that pie chart :⁠)
Benjamin Wade
@RespiteSage
You may already have this info, but there was a thread that includes some links to a vim plugin.
George Dietrich
@Blacksmoke16
From IRC (bridge bot)
@FromIRC
<mfiano> crystalline seems to support jumping to definition just fine. keeping a tags database seems un-needed just yet
Benjamin Wade
@RespiteSage
@Blacksmoke16 Just looked at oq_cli.cr. That's a solid pattern. It reminds me of factories in Java, just with less bloat.
George Dietrich
@Blacksmoke16
kinda yea, works quite well as the lib itself is decoupled from the CLI context
From IRC (bridge bot)
@FromIRC
<mfiano> That project seems to be structured well and very easy to read
<mfiano> (and nicely documented)
George Dietrich
@Blacksmoke16
i try :smiley:
From IRC (bridge bot)
@FromIRC
<mfiano> at least as a first real project I've seen
Jason Waldrip
@jwaldrip
Getting some weird behavior...
class Psykube::Generator::Podable < ::Psykube::Generator
  alias Resource = Pyrite::Api::Apps::V1::Deployment | Pyrite::Api::Batch::V1beta1::CronJob | Pyrite::Api::Batch::V1::Job | Pyrite::Api::Apps::V1::StatefulSet | Pyrite::Api::Apps::V1::DaemonSet | Pyrite::Api::Core::V1::Pod

  protected def result : Resource
    case manifest.type
    when "Deployment"
      Deployment.result(self)
    when "Cron"
      CronJob.result(self)
    when "Job"
      Job.result(self)
    when "StatefulSet"
      StatefulSet.result(self)
    when "DaemonSet"
      DaemonSet.result(self)
    when "Pod"
      Pod.result(self)
    else
      raise "Invalid type: `#{manifest.type}`"
    end
  end
end