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

It supports WinAmp skins too… Dare I say it?

It really whips the llama's ass?

The cool thing about programming languages like Ruby is that they’re very conducive to one-liners. You can use them to generate bash statements that you can then pipe back to bash. `ls | ruby -nle 'puts "mv #{$_} #{$_.gsub(/_/, ".")}"' | bash` is a pattern I use all the time, for example. Easy way of generating complex bash statements without having to bother with the bash man page.


Do you need to pipe the ruby output to bash? Ruby could just run the mv directly by wrapping in backticks instead of quotes.


Running it through the pipe lets you preview the command first and make sure it actually looks correct. Then you just re-run the command and append the bash pipe.


If you want to use ruby then just use ruby? That is a very fragile way to use bash that could easily lead to bad things.


ls | while read filename; do mv "$filename" "$(echo "$filename" | sed "s/_/./g")" || break; done

I think there's a variable expansion syntax that does replacement, but I haven't learned it so I use sed.

I find that piping to a while loop is often simpler and more flexible than something like you've written, but maybe not in this specific case with the weird string replacement syntax. However, mine doesn't have a command injection vulnerability (that I know of).

A real scripting language can also do this easily:

for f in os.listdir("."): os.rename(f, f.replace("_","."))

Sometimes I'm tempted to make Python my shell. The fewer different syntaxes you need to learn for the same basic operations, the better!


As a primarily FreeBSD user who feels like I have to relearn the idiosyncrasies of practically the entire system every I install a new Linux distro, the mess of configuration options somehow actually seems entirely on-brand to me.


something something XKCD competing standards something something


Creating something new for a different use case isn't pointless. It's like comparing inline skates to ice skates.


Believe me, I tried sticking to SQLite or aard2 or stardict, they just were fundamentally inadequate with no good pwa cross platform tooling.


Does this remain true now that SQLite has a WASM build?


Yes, because originally when I started PeakSlab it used the SQLite wasm build.


Doesn’t even apply unless someone says that (1) there are too many “standards”, and (2) so we are making this standard (neither apply here). Someone made something.

We should really consider eventually retiring memes because they just end up as thought-terminating cliches.

This is of course referring to xkcd #927. How do I know that?


Not at all. That’s like saying learning how different kinds of engines work is redundant in the age of taxis. You don’t have to know any of this stuff in order to get from A to B. But if you want to understand the processes involved in getting there, or you maybe want to be the one that builds a better self-driving vehicle, this is where you should start.


This is both simultaneously false, and true but largely meaningless. If you mean the Mona Lisa is somehow directly encoded somewhere in pi, then of course it’s not. It’s just a number.

If you mean that when you feed the numbers starting with some offset of pi into a specific algorithm you will get a rendering of the Mona Lisa, then yes, but so what? Allow me to introduce you to the PiMona algorithm. I won’t bother you with the implementation details, but it takes exactly one integer parameter. If it’s 3, it produces a beautiful rendering of the Mona Lisa. Anything else and it generates random garbage. Turns out, it’s really easy to find where the Mona Lisa is encoded in pi! It’s right there at the start.

But let’s say you meant that the digits of pi at some offset, when encoded properly and fed into any algorithm that is theoretically capable of generating the Mona Lisa will cause that algorithm to do so, then sure. But that’s also true of random noise, and says more about the algorithm and the nature of random numbers than about the Mona Lisa somehow being encoded into the fabric of the universe (which I’m sure isn’t what you meant, but I’m just saying there’s nothing really special about pi in that regard, except that as far as we know, it continues infinitely).


I think they're going for more of a 'monkeys will eventually produce shakespeare' thing here. Which you can apply the same argument to - monkeys do not know english, don't know what they're typing, and theoretically english could devolve to a state where every sentence could be qualified as shakespeare, right? Your argument just seems unnecessarily pedantic.


Passersby


And likewise the Romanian “dumneavoastră” evolved into… nothing, that’s still the polite form of “you” in Romanian. Interestingly though, it can be used in both the singular and plural, and takes verbs conjugated exactly the same way for both forms (i.e. the second person plural).


Note that Romanian also has a second person singular formal pronoun, "dumneata", though it's use today is very rare and isn't actually considered polite. This is probably since Romanian, like most Romance languages, often omits the subject in phrases, so the real politeness marker ends up being just the use of second person plural verb forms to refer to a singular speaker ("mă puteți ajuta" is far more common instead of "dumneavoastră mă puteți ajuta" without the omitted subject, while the informal version is the singular "mă poți ajuta", which "dumneata mă poți ajuta" would also require - all of these phrases meaning "can [you] help me").

The origin for both is more "your lordship" ("domnia ta/voastră") than "your mercy", as well.


The 2019 Intel Mac Pro had PCIe slots. The Apple Silicon Mac Pro still has them as well, but they’re pretty much useless.


Except that requiring you to testify in order to absolve yourself of guilt violates your Fifth Amendment right not to testify in a trial against you. It is up to the government to prove you did something, not up to you to prove you didn’t.


You can not testify all you want, but you should still be on the hook for your vehicle getting tickets, just like you are on the hook for your vehicle accruing toll fees.

If your car was magically stolen and returned, and you have no idea that it happened, or who could have done this... Well, that's certainly an interesting legal argument that you could make to a judge. I doubt he'll believe you.


In the old days it certainly happened. Joyriding. Take someone's vehicle for a spin, put it back. Illegal but nowhere near as serious a penalty. Car security systems have gotten a lot better since then.


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

Search: