Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:05
    straight-shoota opened #12535
  • 15:05
    straight-shoota labeled #12535
  • 15:05
    straight-shoota labeled #12535
  • 14:09
    CoelacanthusHex synchronize #11980
  • 13:49
    yb66 opened #12534
  • 13:49
    yb66 labeled #12534
  • 11:28
    asterite closed #12532
  • 11:28
    asterite closed #12533
  • 11:24
    analogsalad synchronize #12530
  • 11:24
    analogsalad synchronize #12530
  • 09:01
    straight-shoota closed #12527
  • 09:00
    straight-shoota milestoned #12533
  • 09:00
    straight-shoota milestoned #12533
  • 08:48
    asterite labeled #12533
  • 08:48
    asterite labeled #12533
  • 08:48
    asterite opened #12533
  • 06:03
    CoelacanthusHex synchronize #11980
  • 02:29
    Blacksmoke16 labeled #12532
  • 02:28
    cyangle opened #12532
  • 02:28
    cyangle labeled #12532
Kent 'picat' Gruber
@picatz
I want the user to be able to do that.
Weston
@wwselleck
you want that configurable or something?
Kent 'picat' Gruber
@picatz
Maybe that'd be cool
But, it can be just sort of naturally enfored in the app's style
like the person developing the app could choose to use - or -- style flags or not
The string really shouldn't matter, after I thought about it
Weston
@wwselleck
whatr the other flag options?
Kent 'picat' Gruber
@picatz
Right now it's just a silly short and long thing going on
Command lion handles flags how I want argz to.
the flags keyword for a command block does some nice things :
Weston
@wwselleck
ahh ok ill take a look at that
Kent 'picat' Gruber
@picatz
It will take the first argument as the the short argument if not used in a block
Weston
@wwselleck
also, any particualr reason you're double dipping in ruby and crystal and not just full on crystal?
im no ruby dev, but to me it looks like there are only upsides to crystal
as opposed to ruby
Kent 'picat' Gruber
@picatz
I love ruby, a lot.
Weston
@wwselleck
i want to love ruby, but have always been turned off by the speed
Kent 'picat' Gruber
@picatz
There's also some really nice debugging support that I miss when developing crystal.
Ruby's speed has come into play a handful of times in my life.
But, usually I just like the syntax compared to something like go
Weston
@wwselleck
oh i use go at work and do not like it at all
Kent 'picat' Gruber
@picatz
I love the crystal takes the best of both worlds in a way
Weston
@wwselleck
i tried making that "my" language, but just coudlnt
Kent 'picat' Gruber
@picatz
I've done some weird stuff like doing go bindings to ruby.
Weston
@wwselleck
its just tooo bare bones. Just to make a data type sortable takes like 50 lines.
Kent 'picat' Gruber
@picatz
I think Crystal does everything go does better ( in my opinionated opinon )
Feel free to make issues or whatever as you find them and we can address them on github / put that shiz into version control
Even if you have questions for how something works.
That way, if someone else had a similar question, at least it'd be documented.
This would be triggered using ./myprogram --read
?
Kent 'picat' Gruber
@picatz
it'd be $ruby app.rb --read file.txt
for that one
( I'm dumb sometimes, sorry :smile: )
I'd like to add :file type I'd think
That way I can have a nice little wrapper for when users are working with files perhaps.
It'd be an opt-in thing, where they could just use :string and then open the file.
But, I'd like for a :file type to have some sort of builtin helper method to abort if the file doesn't exist or something maybe.
Weston
@wwselleck
command :hello do
  flag "hello"
is the flag redudant there
Kent 'picat' Gruber
@picatz
The flag would probably be redundant there, yeah.
Don't forget the end of course ;)
The command :index is used to basically be able to reference the command object elsewhere in the app.
commands and options ( which are direct subclasses of commands ) are indexed in hashes basically.
the index ( key ) being the :index symbol you give it.
The index is also used as the default flag if not specified otherwise.
I've sort of recently adopted that.
But, I'm cool with it. I think it makes things simpler without adding too much complexity. I think.
In practice there wouldn't be a big problem being redundant if people didn't know and always set the flag