Hacker News new | past | comments | ask | show | jobs | submit | odino's comments login

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!


Looks pretty close :)

What happens in ABS if curl fails in this example? Or JSON parsing fails? In NGS, it's an exception with a stack trace.

> fun part

NGS is mostly use-cases oriented - https://github.com/ngs-lang/ngs/wiki/Use-Cases

Decorators are not implemented yet because there are other things higher up the list. Currently working on deeply nested data structures because it's needed for our use case for FHIR - https://github.com/ngs-lang/ngs/wiki/Deep-Data-Structures-Ma...


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 would check in a few weeks :)

https://github.com/abs-lang/abs/issues/447




Author here -- hi! :)

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:

https://interpreterbook.com/


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.

Does the sample code need updating?


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!


https://www.abs-lang.org/

Brings me joy every single day, even if I'm the only user in the world :)


Disclaimer: author here :)

This is something I've put together to see how scripting with an elegant language and easy bash commands would look like.

Happy to hear your feedback, both positive and negative!


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


Yeah, 100%. Being able to compile across platforms is one of the reasons Go was an absolute no-brainer:

https://www.abs-lang.org/misc/technical-details

Currently, there are binaries for a few different platforms:

https://github.com/abs-lang/abs/releases

Interestingly enough, the releases are built with an ABS script:

https://github.com/abs-lang/abs/blob/master/scripts/release....

:)


> 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.


The US has a socialized system of healthcare. It's indirect in the sense that if you can't pay you get covered anyways and the hospital takes a loss.

If you're low income you get Medicaid, if you're old you get Medicare.

People with cancer who get no treatment at all in the US is very rare and usually something else is happening behind the scenes.


This has Many notable exceptions.

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)


Medicare has no income limits. It's available to all over 65, as lots ng as you've paid in.


You are correct. I was mistakenly quoting the Medicare Savings Program. Cannot edit so posting this to reflect.


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.

<3 OSS


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: