What programing/scripting languages do you use and why?

Yea, I suppose it is. I have looked at this stupid problem every day this week. And just today read a comment by username ‘scythe’ here to leave off the dollar sign, and then it clicked: https://stackoverflow.com/questions/20501737/not-a-valid-identifier-error-with-read-command

It really is that kind of experience that burns things into memory in a way that breakdancing through a bunch of stuff super successfully doesn’t. It’s a win for your future self!

I also have another reason not to use bash scripting! :smiley:

:smiley:

I don’t mind the headbanging so much. It can be fun to be challenged for sure. But it is better when it ends with figuring it out on your own, not by reading something on the internet. But in some cases, I’ll take it any way I can get it.

I have seen tons of people complain about bash, preferring python or perl or something else. Is bash really a crappy language, or does the documentation just suck hard to make sense of? I think I haven’t seen anything horrible yet in bash, but making out what is what can be a real pain.

Phew, I have used almost a full quill of arrows shooting the bits I don’t like on one line of code:

   v  v      v    v v      v
   v  v      v    v v      v
   |  |      |    | |      |
   |  |      |    | |      |
   v  v      v    v v      v
if [[ $mol -ne 42 ]]; then fi

It doesn’t help that there are usually cryptic calls to sed, awk, grep etc mooshed in among all of that.

edit: actually there might be a semi-colon missing after then there.

I’m definitely with you on sed, awk, grep, etc. (globbing, pattern matching, regular expressions, expansions) Not having a good command over each of those can quickly turn bash scripts into craziness.

You might be talking me out of bash. Even grep usage alone can be like a little mini language.

Don’t let me talk you out of it, even the regex in sed or whatever is a useful thing to know. It’s a result of “everything is a file, everything is a string” Linuxland vs something like Powershell where everything is an object. Or normal programming languages where being able to call os commands is easy and the rest of the language is much nicer.

I looked up people parsing JSON with grep, which is nice and all but there are libraries out there, y’know?

It’s worth knowing just because it’s so ubiquitous. I can’t write them beyond sticking a few commands together or debug them but I’ve read more than a few, most of them build file glue.

Well once upon a time I think I wanted to better understand all the shell gobbledygook. I don’t know that I care so much anymore. On a commandline I really only care about dealing with files and folders, a bit of admin stuff, occasional pattern matching, and running a few programs. And a more general purpose scripting language seems nicer to have a handle on now than a command based scripting language and probably for less time and effort.

I’d say so in general, every tool has its place though. I suppose one the problems I have with shell scripting in general is that I haven’t memorized the one letter cli options for wget/tar/awk/grep etc and can’t sight read regex so shell scripts with the standard lack of comments seem like dark arts spells.

I get common cli argument being abbreviated and definitely for typing live when you know them, but there’s no point in a script.

I may be coming around to, right scripting language for the job.

Bash’s place is linux admin / development, being a command based scripting langauge. Good for someone working in those fields where those commandline tools will be used on a regular basis and will be memorized by way of using them out of necessity. And I suppose those people do get used to needing to quickly bang out problem solving scripts for those purposes without time or concern for making them readable by others.

For someone looking to bash as a general purpose scripting language (outside of admin / development), I think it is going to be less useful while requiring much more effort to learn than a general purpose scripting language, such as python.

Yeah, that’s about it. But at the same time learning a language that’s an absolute PITA is good for the next one! Bash isn’t really designed for anything too complex, same with Powershell, and because of these beginnings the cracks do show with the way various things are done.

Know of any language similar to jsfx? Small, with a small general purpose library, not requiring extra baggage. Seems similar to what BASIC was in it’s day but with a few advanced functions for audio dsp.

Bevo previously mentioned in this thread, Nim. I’m giving it a look now. Edit: Nim doesn’t look small. Doesn’t have the baggage of Python though.

It depends what you mean by baggage and what you want to do. Some people think a GUI is essential, or networking or whatever while that stuff would just be bloat for somebody else.

Is it not having the script/program encapsulated in a single, sharable file that’s the issue? That one does annoy me too since in compiled languages the package management is normally done by the dev, although I am scowling Linux’s direction as I type that. At the same time you can write scripts to install deps, or do whatever other tips and tricks are available.

I said that poorly. By baggage I meant feature bloat (trying to cover every programming paradigm and abstraction type), as well as external baggage such as all that is Python. Depending on which resources you might use to learn the language, you might need to install this or that interpreter and python packages, same for running anything written in python, and all the updates that come with it. And yes, standalone scripts/programs is ideal to me. If I want to share something with someone or just run something that I wrote on another machine, there is nothing else required to install and keep updated.

I suppose what I’m most interested in using a language for is something of a mixed applications playground that doesn’t run like a starved dog. So not really a systems language or a command glue language. Probably not interpreted. Compile time for small’ish programs seems trivial. Has a small general purpose library for files, i/o, networking, math, graphics, sound. Really, something of a self-contained programming application that compiles standalone applications.

There’s SFML that would do the A/V + networking part of that requirement. It’s popular and most (?) languages would have bindings for it, I’d imagine.

1 Like

I forgot about SFML. It looks about ideal.

There isn’t much literature about Nim compared to other languages,
so googling answers isn’t the same.
There’s a decent forum you can ask questions about but some users can be a bit prickly with noobs :wink:

If you know lua, this might interest you:



Are you still using Nim? I was playing with it last night and it seems alright for first impressions, nimble seems like it works as well. I see there’s a bit of a problem with compiling static libraries at the moment, but they should be able to sort that out.

Nope, just plugins, daws and music at the moment here, no coding

Nim had a crypto sponsor last I checked
I think the main dev was positioning Nim for blockchain use
It needs some niche industry to give it more visibility

Never learned any Lua.

It’s looking like I need to get back on the C++ horse (for real this time).