5 ms·
The ABS programming language
- gritzko 1y agoNext objective absh?
- djmips 1y agoOh boy another meaning mapped onto ABS!
- voxlax 1y agoAnother BS? Apologies, I actually do like it.
- djmips 1y ago:) it's fine. I think I was just thinking of ABS today so it was stuck in my mind. ABS brakes ABS plastic ABS function ABS muscles ABS programming language etc.
- gblargg 1y agoI was half-expecting this language to only have the abs function, and somehow build everything around it.
- shakna 1y agoCan anyone convince the Australian Bureau of Statistics to adopt it?
- Gabrys1 1y agoI'm normally very skeptical about new languages, but this one, actually looks very very promising! At places it looks like plain old PHP without the need for <?, in other I can see some goodies from JS with a bit of Python sprinkled as well. It really looks like the author gave it a proper thought! Good job!
- Gabrys1 1y agoFound first (!) thing that I cannot justify: sleep(number) sleeps for number of MILLISECONDS rather than - more naturally - seconds. The only possible explanation I found is that this maybe accepts a int rather than a float. (In this case the function should be called sleep_ms, not unlike unix_ms)
- IshKebab 1y ago> Bring back the joy of shell scripting. There was joy? Seriously though, this actually doesn't look half bad. The problem is you can easily achieve the same thing in basically any standard scripting language (Typescript, Python, etc.) just by replacing backticks with a function call. Actually in Typescript you can use tagged string so it could just be one extra character if you want: let result = x`ls -l`; Is saving that one character worth using a niche language?
- sauercrowd 1y agoI agree, it's a cool idea but I actually think the lack of mantainability of shell languages are a coincidental feature not a bug, making sure that once you hit a certain complexity you're forced to switch to a full programming language.
- ThomasCloarec 1y agoThis looks interesting! The syntax seems clean and the built-in concurrency features are quite appealing. Has anyone used this in production?
- OskarS 1y agoThe superpower of shell scripting languages is not just that it's easy to run external processes, it's also that you can run them extremely flexibly: chain them into pipelines, run them in background, redirecting streams, process substitution, etc. These kinds of things is why "just use Python or whatever!" is not always a great answer to "shell scripting sucks" (which it does, I agree). I mean, you CAN do all those things in Python, but it's a huge pain in the ass to write compared to the dedicated syntax of shell scripting. If the developers of ABS are reading this, it would be great some examples of that kind of thing to the homepage. Like, how would you do `curl <url> | grep something | sort | uniq | tee output.txt`? What about process substitution? What about redirecting stderr to stdout? And, the biggest problem with shell scripting is escaping problems, how does ABS handle that? Can you run a command with an array of strings as argument instead of having the shell split on (unescaped and unquoted) spaces?
- frou_dh 1y agoI remember someone made an interesting point that the notable thing about traditional shell scripting languages (as opposed to conventional scripting languages) is that the filesystem is effectively the "top level scope" of the language. i.e. you can refer to files (paths) much like they are variables that are ambiently defined.
- codethief 1y agoAgreed. Then again nothing stops a general-purpose language from providing a built-in syntax & data type for paths, see e.g. Nix.
- OskarS 1y agoYeah, and environment variables as well. It's notable that the syntax for reading an environment variable in bash is identical to the syntax for reading a "normal", process local variable (though setting is slightly different, you have to use "export"). It's like the ground scope is "the computing environment" (files, processes, env vars, ...), not the "program sandbox".
- 7thaccount 1y ago
- munchlax 1y agoI can see the intent of the logo but it looks like it's missing a left eye.
- frou_dh 1y agoNot sure I like `command` failing silently, i.e. having to remember to check the .ok property. Most guidelines for writing sh/bash scripts arrive at using "set -e" mode unless you have a good reason not to. So when designing a new language, why not flip the default?
- niutech 1y agoWhat's the rationale? We have many well established cross-platform shell languages, like PowerShell, Perl, Python, AWK. What does ABS do better than them?
- webdevver 1y agoAltogether Brilliantly Splendid
- tpoacher 1y agoPersonal nitpick, but whenever I see a project trying to promote itself by actively bashing (no pun intended) the current solution in its tagline, no-matter how catchy the tagline, my gut feeling is to avoid it without spending much time to evaluate the offering. I'm much more receptive to projects telling me how they're good, rather than how the competitor is bad.
- Imustaskforhelp 1y agoI can understand that but these are open source projects and the author might have valid feelings if he wants to bring back the joy of shell scripting because maybe that's why he created yet another shell scripting language... I can definitely understand both points of view but my pov is that we shouldn't avoid projects solely because of these and that there are greater merits to choose from. We are more similar than different :) in foss community I suppose Another thing is that sometimes, people don't like taglines telling how good the project is, like I searched fish and I love fish but fish is a smart and user-friendly command line shell for Linux, macOS, and the rest of the family. Maybe its me as I could only vouch for the user friendly part of fish from my small time using it (and the time I mimicked every aspect of fish for my zsh config file). I truly loved fish but I might not be sure about its smartness and what it means by that and that might be a nitpick but I still love fish and would recommend it to some people Maybe I can be wrong, I usually am and someone please feel free to correct me to make me understand what they mean by smart, I know that somethings scripting in fish can be more pleasant than bash and it has some nice features but just smart is really vague, I hope everybody gets it :)
- tpoacher 1y agoYes, obviously I'm making a bit of a strong point here, undiluted by necessary nuance. I don't shun otherwise good projects with a good reputation entirely from a mere sentence if I can avoid it. But the point is, I actually enjoy scripting in bash. Half the time people rant about it, there's something wrong in the argument. Not always of course, different tools for different people and all that. But having someone's primary marketing argument be a strong implication that "finally you can get rid of shitty bash and bring the joy back" rubs me the wrong way because for me it's not shitty and I'm already experiencing joy. So what I'm getting from the tagline is that it's condescending, uninformative, and the vibe I'm getting is that it's going to mess with what already works by suggesting oversimplified workarounds, which fail when you actually need that desired complexity. So this is already negatively predisposing me when it could have been avoided. Fish is similar, if you go to the webpage (https://fishshell.com/ https://fishshell.com/), the primary tagline isn't the one you mentioned (which I would have been very happy with), it's "Finally, a command line shell for the 90s". To me that's just petty, and this is despite the fact that I have tried fish before and liked it. Ironically, I then moved back to bash because in the end I decided it was still better. This isn't Coke vs Pepsi ads. I'm sure a project serving as an alternative for another popular project can promote itself without such pettiness right as the first sentence in the website. "Discover the joy of shell scripting" would have been great; but "Bring back" is petty.
- __alexs 1y ago"joy of shell scripting" feels like something only someone who has never done any shell scripting would say. Shell is a horrendous excuse for a programming language that is truly one of the hardest things to deliver working software in.