Hacker News new | past | comments | ask | show | jobs | submit | pwagland's comments login

Given that http://susam.net:8000 has stopped responding, I suspect that there will be a lot more beeps today.

I got an ok!

Did not get one. Somehow I'm relieved, I would have hated to torture the poor man with beeps :)

Same here. Did a bunch of F5's in a browser and always 'ok'

You do know each of those was 4 beeps? :D

Yes i do know that. :D

Got 2 ok's out of about 14 attempts. ;)

It's not an http server. Try with something like nc or telnet, and you should get an 'ok' response before it disconnects.

    telnet -4 susam.net 8000

From the article:

> The other party can use whatever client they have to connect to port 8000 of my system, e.g., a web browser, nc HOST 8000, curl HOST:8000, or even, ssh HOST -p 8000, irssi -c HOST -p 8000, etc.


Oops, that'll teach me to read articles properly before commenting, rather than just skimming.

Now I feel a bit like writing some tool to automatically follow your posts (easy with existing HN replies) do a semantic analysis on them to determine when you will make that misstake again and give some alert (the hard/expensive part).

Maybe the alert could be four beeps on your terminal

And then I write a blog post about it. But maybe I find something more novel. (And I have, but maybe I can actually use it for the task above)

To get an OK I had to force curl to use http 0.9

> curl -v --http0.9 susam.net:8000


An interesting tidbit is that FSD is almost guaranteed to turn off before any accident occurs. Last I looked, the data was not available to see how long after FSD deactivation the accident occurred.

Note: I have an older Tesla, and actually quite like it. I don't have FSD, but I do have enhanced autopilot (EAP) and like it as well. That said, it is very easy to believe that people ignore the road for longer than they should with FSD/EAP turned on.

The grandparent comment also didn't mention the split between FSD miles/non-FSD miles. It is possible that FSD is so good, that every Tesla driver becomes useless when they are required to drive for themselves, and that is what drives the higher accident rate.


>An interesting tidbit is that FSD is almost guaranteed to turn off before any accident occurs. Last I looked, the data was not available to see how long after FSD deactivation the accident occurred.

How can you make that assertion when there's no data? Are you just assuming the worst in the absence of data?


You have to insert 5c.

The free version of the IntelliJ IDEs are reasonably good, at least if you are using one of the languages that the free versions support.


Actually I have not even seen the free versions yet as I was always priviliged with the paid ones by my school. I do not think I'll check them out though, already invested time in configuring and you know... sunk cost fallacy :D


> sunk cost fallacy

Not as much as you think. Learning vim translates to a lot of things. I started learning vim by using vim emulator on vscode for a week, once I was comfortable with moving around in a file I moved to using neovim, learned lua to set it up the way I wanted. Eventually ended up just using lazyvim with some custom opts, custom keybindings and plugins I like.

But the point really is, what you learn in vim can be carried to most (if not all) code editors. Most will have a way to setup custom key bindings or a vim emulator.

I say that because there are times when you need to use a code editor that most devs use (mostly vscode) to work with other devs. And for those times, I really appreciate that I can keep using vim motion and key bindings.


The other advantage that the article misses for aliases is that completions will work through aliases. So, in the case give for `alias g=git` typing `g <tab>` will give you the bash/zsh completions for git. You _can_ do this for the script as well, but then you need to code that up separately.


Yes, and this is why I recommend against the alias-y wrappers.

Personally, I like using abbreviations ("abbr") in fish, which automatically expand as you hit space. This is especially helpful when screen sharing: No more "what does this gcob command do" questions!


Yeah, I do something kind of similar, using Dash [1] snippets which expand to full commands.

Since I'm almost always on my mac, it means they're available in every shell, including remote shells, and in other situations like on Slack or writing documentation.

I mostly use § as a prefix so I don't type them accidentally (although my git shortcuts are all `gg`-consonant which is not likely to appear in real typing).

[1] https://kapeli.com/dash


I was nearly 10 years old (i.e. as a Fish user) when I learned about abbr. I used to use functions for everything. :facepalm:


Came here to mention just this, all the more as the article mention that the author is considering a move to Fish.


Another advantage of using alias: `which [alias]` actually tells you what that alias is mapped to, and not just the location of a script in your bin folder.


On what shell? That doesn't work in bash. I use `type` for that, since it'll tell you if it's on PATH, a function, or an alias

which gdb /opt/homebrew/bin/gdb

~ type gdb gdb is aliased to `gdb -q'


In bash this is how I get git completions working (with bash functions rather than aliases):

    __git_complete grm _git_rm
    grm() {
      git rm "${@}"
    }

Internally git uses the __git_complete function to set up completions for its subcommands, though this may be specific to your OS/distro and perhaps or git version.

This does seem to ship as part of git now, here[1].

[1]: https://github.com/git/git/blob/6a64ac7b014fa2cfa7a69af3c253...


zsh for me

~ ▸ which k

k: aliased to kubectl


This is something I've never seen. `which` (at least on the hosts I currently have access to) is its own binary `/usr/bin/which` and unrelated to the shell and its aliases or abbreviations.

`type` is a builtin on both fish and bash though, and does resolve aliases.

[edit] TIL: `zsh` has its own `which`.


Some distros use an alias which pipes all the aliases into 'which', which has a flag that supports reading aliases from stdin.

Fedora does it. It's very convenient.


`alias | grep [alias name]` works as well, for me at least


I remember years ago seeing a trick related to this to allow aliases after `sudo` (which I think by default won't recognize them due to running as a separate user) by doing `alias sudo="sudo ".


This doesn't work for me in Ubuntu 22.04. Is it a recent feature of bash?


This is a feature in zsh (I don't think it works in bash and the autocomplete in bash is also a bit inferior to the zsh one)


I came here to say the same thing. I'm also not convinced about the instant reload aspect. You can always just define your aliases in a different file and source it when updating aliases (how often does that happen anyway?), source your .zshrc, or just open a new terminal window.


Sourcing .zshrc works reasonably well. I have the following at the end of setup.sh -- which creates symlinks and sets up other configurations.

makeLinks does most of the work, then sets Homebrew's zsh as the default shell -- this currently runs in bash, so it probably will need to be updated at some point -- and everything gets reloaded.

    makeLinks && chsh -s /usr/local/bin/zsh
  
    exec $SHELL && brew doctor


I have an alias reload="exec zsh" for fast reloading. Admittedly, this does wreck up everything set up locally but I doubt you will be modifying ~/.[zsh|bash]rc file often


I have alias s='source ~/.zshrc'.


nobody tell him


> nobody tell him

What?


But that really isn't true either. The model 3, for example, has undergone 3 or 4 refreshes that change a lot. They have not dramatically changed the exterior of the car, which I know a lot of people think is absolutely critical, since an 8 year old model 3 looks almost identical to a new model 3.

Most car makers haven't released new models in a long time, they just update their current models, and make them visibly different from the outside.

Now… if you were talking about the lack of new feature _in_ the car, then I would be happy to agree. And if you want to talk about the _still_ lacking functionality of automatic wipers…


Yes - Tesla seem to make very big changes under the hood that aren't obvious from outside so you don't realise they're actually refreshing the models. For example at a refresh of the Y they changed it so that the whole floor was battery and the seats etc bolted to that. Massive castings come and go. Pretty huge updates.


What's the benefit to the customer? Usually the silent changes are for making the product cheaper and increasing profits. Did it provide more leg room or battery capacity, or something else?


Yeah not sure what they're talking about. I'm not gonna buy a tesla because their quality is usually crap and mediocre when you "get a good build". Now with his shenanigans and experimentation with fascism and ignorance of the constitution, I can confidently say I will never want to be associated with that. I am thinking on a hybrid small SUV now.


>> How do you square that with the fact that spending as a percentage of GDP is only slightly elevated compared to the historical average...? > Why should it scale linearly with GDP? I can see an argument that it should scale linearly with population (maybe), but if GDP per capita increases, you could also expect better tech/productivity to allow gov spending per capita to decrease.

Over time it _can't_ scale linearly with population, unless you decide to not adjust for inflation. It _could_ scale with population and inflation, assuming that you agree that you don't want more services from your government.

Don't forget, a percentage of that GDP increase is just inflation.

Most people, as they get richer, want to have services increase, as they can afford to pay more. For example, they go to nicer restaurants, nicer hotels, maybe they get a massage, where previously they would not have, etc.

This is largely also true of a population. We expect that our children will be better educated. We expect better roads/bridges/other infrastructure. Heck, we might even expect better public infrastructure such as trains, buses, etc.


> Don't forget, a percentage of that GDP increase is just inflation.

By design, GDP measurements are adjusted for inflation, unless you're looking at 'nominal GDP' (which nobody does because it's pointless).

> Most people, as they get richer, want to have services increase, as they can afford to pay more

This makes sense. But I'm not sure how many people believe that they're getting what they pay for, esp when it's not actually paid for, but financed


Sometimes, but not always. Sometimes it is also based on the locales in your browser.


Related to that, the first 100 days are typically when there is the highest number of orders per day. https://edition.cnn.com/interactive/2021/politics/biden-exec...

Tump did 20% of his total, from the first term, in the first 100 days. Biden did just under 1/3 of his total in the first 100 days.


Sadly, this is just another example of "A lie can travel halfway around the world before the truth puts on its shoes."

That doesn't mean that every sensational thing is a lie, but verifying the truth definitely takes time!


Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: