HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Beltalowda

no profile record

comments

Beltalowda
·4 years ago·discuss
I've actually had quite a few people positively comment on my unmatched socks, including on dates. I now wear unmatched socks on purpose.
Beltalowda
·4 years ago·discuss
I never used CircleCI so I can't speak to it specifically, but there's tons to improve on GitHub actions.

The Actions web UI is so bad it's almost a parody. Debugging stuff is harder than it needs to be. No good way to manually control builds. Possible but not very easy to run stuff locally. Very limited platform support (Linux Windows, and macOS, although other platforms are possible with VirtualBox hackery but it's SLOW and pretty unreliable).

It is enough to make a viable business when GitHub actions is right there? Who knows... But there are tons of reasons for external CI tools to exist, IMO.
Beltalowda
·4 years ago·discuss
Sure, I understand your point; it's a perfectly reasonable. My gripe was with the "that's delusional".
Beltalowda
·4 years ago·discuss
> Waterproof bags probably exist, but I can't say I've seen them available, or used, by anyone at all.

What? Almost all non-cheap backpacks are water-proof. Water-proof packs are around everywhere.
Beltalowda
·4 years ago·discuss
I've cycled and driven mopeds in some pretty serious rains (including tropical monsoon downpours), and the right preparation makes all the difference. Being "stuck" on a two-wheeler during unexpected rainfall is definitely a big bummer, but a good raincoat or poncho makes all the difference, and you tend to come out reasonable dry at the end of it.
Beltalowda
·4 years ago·discuss
> riding in the rain, and especially when it's snowy/icy - is order of magnitude more dangerous - traction/breaking/reduced visibility.

Yes, it's more dangerous. No one said it's not. No one even mentioned safety until you brought it up yourself.

If you want to bring up safety: great! Go for it! But no need to start calling people "delusional" right from the bat.
Beltalowda
·4 years ago·discuss
> The posix shell spec is missing a lot of reality. It’s not very actively maintained, unfortunately

POSIX was primarily intended a descriptive specification, rather than a prescriptive.

That is, it attempted to document and standardize the common behaviour found on many platforms during the Great Unix Wars, rather than say "hey we thought of this great new thing and released a spec, go implement it!", which is more how, say, web standards work. I does/did have some of that, but it was never the main goal.

These days "whatever Linux does" is the de-facto standard, for better or worse, and the need for POSIX is much less.
Beltalowda
·4 years ago·discuss
Quite a few things can't be disabled; for example AFAIK it doesn't offer a way to disable the autocomplete altogether, or the "fuzzy" matching. I really dislike these things. Fish is a great shell, but very opinionated which is great if your preferences align with that, and not-so-great if they don't. Which is fine because it makes the project better for those who do want these things, and not every project needs to cater to everyone.
Beltalowda
·4 years ago·discuss
> Don't you find its syntax cumbersome?

Not really; just seems the same as most other dynamic languages. Awk does a lot of stuff for you (the "implied loop" your program runs in, field splitting) that's certainly possible (even easy) to replicate in Python or Ruby, but Awk it's just so much more convenient.

I use it for things like processing the Unicode data files, making some program output a bit nicer (e.g. go test -bench), ad-hoc spreadsheets, few other things. I got started with it as I needed to process some C header files and the existing script for that was in Awk; it worked pretty well for that too.

The Awk Programming Language book is pretty good. GNU Awk has a bunch of very useful extensions, but pretty much everything in the book still works and is useful today. You can get it at e.g. https://archive.org/details/awkprogrammingla00ahoa or https://github.com/teamwipro/learn_programing/blob/master/sh...

The GNU Awk docs are also pretty decent.
Beltalowda
·4 years ago·discuss
Yes, I was talking about scripting. I don't care what people use for their interactive shell: that's their own personal choice.
Beltalowda
·4 years ago·discuss
Indeed; that was my point exactly. People complain about things like "curl https://sh.rustup.rs | sh" from the Rust homepage, but it's essentially the same as trusting "cd vim && ./configure && make && make install" (plus, if I would hide anything I'd do it in the probably quite large binary that script downloads, which is much harder to audit).
Beltalowda
·4 years ago·discuss
It works inside [[ ]], just not in [ ].

=name will expand to the entry in your PATH. e.g. =ls expands to /usr/bin/ls. So == expands to an executable named =, or rather, it tries to as you probably don't have = in your PATH.

[[ ]] disables expansions (e.g. [[ * = * ]] will work too) so it's not an issue there.
Beltalowda
·4 years ago·discuss
> I had to work with Sencha/ExtJS early 2010. It was the same feeling. Yes, it is powerfull, but too much magic happen for something without a clear orientation (at the time, now it is used for data loaded frontend i think). PS i don't understand what it wants me to do.

Bit off-topic, but I worked with ExtJS around the same time, and I found it one of the most confusing development experiences I ever had. "It's so easy, just add this one property to this deeply nested object you're passing to this function!" Thinking back on it, it's a really good example of "simple vs. easy". It didn't help it gave not a peep if you got one of those data structures wrong (capitalisation typo, wrong location, etc.)

Plus in hindsight the whole idea of "OS semantics in your browser!" was never a good one to start with, although that wasn't as obvious to me at the time.
Beltalowda
·4 years ago·discuss
tcsh was the default shell before that, and it didn't help much with its popularity, and for interactive usage tcsh can do most of the things bash can and is mostly okay (not scripting though).

I think being the de-facto default on Linux as part of "GNU plus Linux" has more to do with it.
Beltalowda
·4 years ago·discuss
The .sh extension told me it's a shell script of some kind.

I don't check everything I download from the internet; I don't think anyone does. It depends on what it is, where I'm getting it from, where I'm running it, etc. There are certainly some things I will review carefully, but other things I give just a quick check to see it's not in complete shambles, and others I barely check at all. I typically run the latest Vim from master, do I check every patch to see if after 30 years Bram finally sneaked in a crypto miner or password stealer? Do the people who package Vim for the Linux distros?
Beltalowda
·4 years ago·discuss
If you download a script then running "sh script.sh" is a lot quicker and easier than a chmod followed by ./script.sh. You can of course also type "bash script.sh", but I don't always have it installed on every system, and the .bash extension just clarifies it.

For things in my PATH I drop any suffixes like that.
Beltalowda
·4 years ago·discuss
Yeah, you can actually indent it with <<- so it doesn't look so ugly.

That said, I like doing the usage like so for short scripts:

  #!/bin/sh
  #
  # Sleep until a specific time. This takes a time in 24-hour clock format and
  # sleeps until the next instance of this time is reached.
  #
  #   % sleep-until 15:30:45
  #   % sleep-until 15:30      # Until 15:30:00
  #   % sleep-until 15         # Until 15:00:00
  #
  # Or to sleep until a specific date:
  #
  #   % sleep-until 2023-01-01T15:00:00
  #
  # Or space instead of T; can abbreviate time like above.
  echo " $@" | grep -q -- ' -h' && { sed '1,2d; /^[^#]/q; s/^# \?//;' "$0" | sed '$d'; exit 0; }  # Show docs
That will re-use the comment as the help:

    % sleep-until -h
    Sleep until a specific time. This takes a time in 24-hour clock format and
    sleeps until the next instance of this time is reached.
    …
It's a bit of a byzantine incarnation, but I just copy it from one script to the next, it saves a bit of plumbing, and generally looks pretty nice IMO.

I'm not 100% sure if I thought of this myself or if it's something I once saw somewhere.
Beltalowda
·4 years ago·discuss
zsh is not a "cleaned-up bash"; it's more of a clone of ksh (closed source at the time), with some csh features added in, as well as their own inventions. bash and zsh appeared at roughly the same time, many features were added in zsh first and added to bash later (sometimes much later, and often never).

This is kind of a good example of what I meant when people conflate "bash" with "shell".

As for your larger point: I kind of agree, but I think what zsh offers is the advantages of shell scripts with compatibility with existing scripts while still improving on it. That said, I believe oil also offers compatibility, but I haven't had the chance to look deeply in to it; just haven't had the time, and wanted to wait until it's stable (maybe it is now?)

Perl was initially invented as the "modern glue language" to replace shell. It's fallen a bit out of fashion these days though, and to be honest I never cared all that much for Perl myself either. Raku looks nice though. TCL also works well as a kind of "glue language", although it has some really odd behaviour at times due to everything being a string and I know some people hate it with a passion, but it always worked fairly well for me. But that has also fallen out of fashion.

I've also been told PowerShell is actually quite nice and has interesting concepts (and now also open source, and you can run it on e.g. Linux), but I could never get over the verbosity of it all. I'm an old unix greybeard and I want my obscure abbreviations dammit!
Beltalowda
·4 years ago·discuss
I personally really dislike fish as an interactive shell as it's just so busy. Things keep popping up, everything is in so many different colours, etc. It's great if you like that sort of stuff, but I really appreciate a "quiet" environment. This is also why I use Vim: all the IDEs I tried are just so "busy".

I was only talking about scripting; I know fish scripting is different, but I have no idea if it's any good. For interactive shells I don't care what people use: it's 100% a personal choice.
Beltalowda
·4 years ago·discuss
In e.g. "Read the great Oil Shell blogpost." it's not clear there's a link there: the "blogpost" is a link but you only see that if you hover your mouse.