BTW if we remove error handling, I think ABS' code would look like:
ip = `curl -s 'https://api.ipify.org?format=json'`.json().ip
total = ip.split('.').map(int).sum()
if total > 100 {
echo("The sum of [$ip] is a large number, $total.")
}
I would suggest implementing decorators in NGS. Not because you will need them, but because they're easily the most fun part I had to write in ABS :) That, and seeing stdin() working for the first time on my terminal!
Sorry the example on the docs is definitely not a good one, though I've had a hard time finding something more appropriate that can fit within that block :) Suggestions are more than welcome!
Hash keys need to be string (eg. n -> n.str()), I fixed the example on the homepage.
I just wanted to say thanks for sharing this, it made my day. I started ABS a couple Christmases ago as I had a week off and the constant thought that there's gotta be a "nicer" way to script things, without the verbosity of higher-level languages...and I'm happy to see folks finding ABS useful.
I haven't updated it in a couple of months as I find it pretty "complete" from my perspective, but I also have some crazy ideas every now and then that I know I'll want to throw into the language.
Again, thanks for giving ABS a try!
PS. I wanted to credit Thorsten Ball for his books, without them I would have never been able to build ABS:
Hi - glad to see you here. I just posted a comment about the sample code on the home page - your comment wasn't up when I started writing it or I might have replied here.
Yes, I replied to your original comment. Again, truth to be told I've got limited space to work with on the UI to showcase some of the syntax but I agree that snippet doesn't make a lot of sense...suggestions welcome!
Thx for stopping by! would be great if you could provide bit more details of what platforms are supported (eg does it run on any of the BSDs, Windows, more esoteric OSs?)
having a full-featured cross OS scripting, that also hides OS-specific and distro-specific differences, where possible -- would be very useful.
Since you had written in Go, perhaps long term those cross-OS capabilities, were part of your aspirations
> If you're making ~$60,000 or more in the US, you are overwhelmingly going to have good health insurance. If you're making $140,000, you're going to have great health insurance. I fail to see how universal healthcare is a lure in this case.
If you get insured.
I think most Europeans are proud to pay taxes to make sure a random fellow living down the street who got cancer can afford his treatments. At least that has been my mentality around taxes for as long as I've lived there.
Sure, taxes don't all go towards nice things :) but at the end of the day I'm proud to be helpful to those who are in need.
Never understood the healthcare system in the US, it just sounds "wrong" to me.
Due to the housing meltdown, many people have underwater realty of negative value, yet this asset disqualifies many low cost programs.
The asset limits are very low on Medicaid ($2k individual, $3k couple)
Even medicare is quite low ($7.5k, $11.5k). To qualify, you must effectively divest all your assets and it becomes an insurance bet with the state that you'll die quickly. (@ $7k/month for a nursing home, its not a very good bet)
If you can't pay hospitals and nursing homes kick you out, just happened to a friend. Medicare wouldn't pay for more than two months of care -> on the street.
For most people, the value of selling their house (say $100k, would pay for only 1 year of senior care in the US)
Even better, the care is often lackluster for the cost. (Admittedly at $7k/month I would be expecting marble floors and gold faucets)
By the way, claps for Tim for the amazing job. He contacted various people and gave them heads up weeks ago. I think the wat this was handled was awesome.