Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

So I never used "bouton" for "to push forward", and while it is used for a pimple, above all, today, a bouton is simply... a button.


Portability for shell scripts is over rated in 2022.

If your shell scripts are small, it's easy to write several versions of them.

It they are long, you should use something else than shell scripts for your program, like python.

Worse case scenario, provision the same interpretter everywhere, vendor it, or use a compiled language.

There are some edge cases where portability makes sense (e.g: you are scripting for an heterogeneous parc of routers), but they are niche usages most companies don't care about.


Because pulling in a huge python installation on small/embedded systems is fun, just because some people are unable to keep their scripts POSIX compliant


Scripting in bash in a portable manner on embedded system is exactly the niche use cases I talked about. The router example is aimed at it, because it's the right size ratio to be small, but have an OS running.

Still, the vast majority of IT projects do not fall in that category.

It exists, but it's a very, very small % of why you need a bash script. And in fact, even those advocating for bash portability almost never fall into the category of people that have to do it in their daily job.

I'll go even further and even state that a lot of embedded system don't even have bash scripting capabilities in the first place.


Tcl, lua, or a lisp/scheme work well here


The nice thing is that many, many shells implement POSIX, so there is enormous portability.

Busybox bundles the Almquist shell, and there is a Windows port available. This is the easiest and least intrusive way to run shell scripts on Windows.

Busybox advertises that it bundles bash, but this is not true - it's Almquist with some added bashisms.

It also bundles their own awk implementation, but not Tcl/lua/lisp/scheme.


It’s not the compatibility which is the problem, but the 3 bugs/line that bash causes.


If you cannot take the time to learn the language, what makes you so confident your python doesn't also have 3 bugs per line as well?


Did you run shellcheck on it, to actually recognize all the errors, before you assumed it is correct?


Writing bash scripts is really not that difficult - despite what folks might want to convince you of.

ShellCheck is a great tool, yes, and can be run natively inside your IDE. Just like any language, you need to learn the language and learn it's tools.

Blanket statements like "write all your scripts in python because there's less bugs" really just means the commenter is more familiar with python. Do enough script writing and you'll realize how absurd that statement is.

It's a lot like the folks that scream nobody should ever write a single line of C or C++ because it's "dangerous" - yet untold number of lines of C/C++ are written every day. A pencil can be dangerous in the wrong hands...


Yes I did. And I hope you ran mypy on yours.

BTW both shellcheck and mypy are equally optional, so I'm not sure what your high horse is about.


Well I use both extensively, and I'm very confident that I can write a script of 1000 lines with much less bug and much better error handling that in bash, in half the time it would take me.

In fact, as soon as you need to use arrays, it's game over.


1000 lines in python is a bash oneliner and planning for failure is bad design.

>In fact, as soon as you need to use arrays, it's game over.

Why?

PS. comfortable with both. I don't draw lines based on LOC or arrays.


That's what Microsoft is paying Guido for, for the next versions of python.


I think that's not really the plan - they're talking about just basic template compilation, nothing like V8 https://github.com/markshannon/faster-cpython/blob/master/pl....


Mind you, it still requires to have a c compiler, to be installed separately. It's very easy on linux, but a x-code install on mac, and can be fiddling on windows.

Still nice, but not like golang or rust where you have a stand alone solution.

It's an alternative to nuitka, which I recommend to try out.


It was 17 years since I lived in the UK, so it may have changed a lot, but my experience with trains was not that great:

- very expensive

- not enough space, and too small rack areas for luggages

- booking that crossed over several private train companies was complicated and unreliable

The experience was much better in France.

But as I said, it could have changed a lot.


Only the third point isn’t valid still, and to be honest I’m not sure it was valid 17 years ago either. There are many complaints I have about the British rail system, but I’ve never had a problem booking tickets that cover multiple operating companies.


I don't know, it doesn't seem very far form the python version:

    values = (
        key_value.partition('=')[-1]
        for key_value in 
        s.partition('?')[-1].split('&')
    )


This is already showing why the the Python list/iterator comprehension syntax isn't great. The part "s.partition('?')[-1].split('&')" reads from left to right, and then the rest is read from end to beginning. It gets even more confusing with nested comprehensions. In my opinion both the dotted pipeline style and the Lisp style where you always start from the deepest nesting level are both more readable than Python's approach with sometimes from left to right, sometimes from right to left and sometimes from middle out.


On the other hand, of very good friend of mine, a prestigious doctor in Monaco, was adament the vaccine caused no major heatlth problem.

This month, I had weird health problem that sent me to the hospital, and asked again if anything could be related to the vaccine. This time, he said it was a possibility because has has seen some similar cases in the past.

The problem here is not changing your mind using fact. That's how you should do it.

The problem here is stating at first he was sure it could not cause any grave problem (at least not worse than covid). Because this was not rooted in fact, we didn't have remotely enough data to know this.

But this is what a lot of the medical and political elite claimed during the pandemics, and questioning it would get us the rethoric you just used in your comment. This is what a lot of comments on HN, twitter and the whole internet agressively screamed, with disdain toward people that were raising pragmatic worries.

This is not a sane way of approaching science. This is arrogant, and creates distrusts in a world where we desperatly need humility and bonding together.

In fact, you know your position is not in the best light because you are using a throwaway account to state your position, in a thread that has been very cordial.


I dreamed of this for a long time.

Being always on the road, I often have my emails/contacts/todolist/pictures/whatever scatered accross all my devices, with no easy way to synchronize them without getting access to wifi.

This means in transport, in the country side, or in another country, my system is in shamble. Also, it means everything is slow to sync.

Yesterday I had to send a AI model to my colleague next to me. I was on linux, he was on windows. The fastest way was to get a usb stick. That should be a click in 2022. The closest to something reliable to do this was duckto, but it's not maintained anymore.

Good luck to ditto!


Magic Wormhole comes close, I think: https://github.com/magic-wormhole/magic-wormhole

Syncthing is painless, with available local network detection of other clients. If either device has a webcam, the QR codes in the web UI make it quite quick to have a synchronized folder between two systems.


Yeah it's really cool. I tried to introduce it years ago, but something you must pip install is a deal breaker for most people, even python devs. Too many ways to fail. Besides, casual drag and drop is always going to be easier than cli for windows users.



That doesn't work on the local network, does it?


It does if the two peers can negotiate a connection successfully which happens in webrtc signaling


nice !


As the answer to the tweet says:

- it didn't get billions of dollar of investment

- it was born 30 years ago in a different time and carry the weight of those decisions and legacy

- it only got serious focus and investments the last decade, while alternative got 100 times more

- "this is all you get" downplay the enormous qualities of python to focus only on what's wrong with it. It never was in a situation to have success by default, it gained market share because it was good. No monopoly on the browser, no jump start at the begining of the web like php, no .net style founding by a giant. Somehow, the author must ignore some inherant good stuff to the language.


And yet despite 30 years of people telling everyone how lisp is amazing, most people keep avoiding it despite that it's free, stable, and available everywhere. Meanwhile, new languages like rust or zig have no problem to be adopted, C#/Php/JS/python are still used massively and produced a lot of value.

But it's probably everybody that is wrong, there is no way Python has a value proposal that is worth something to a lot of people.


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

Search: