HNHacker News
TopNewBestAskShowJobs

ts4z

181 karma · joined March 9, 2011

submissionscomments
ts4z··on Why can't you reverse a string with a flag emoji?
IIRC Unicode doesn't define country codes. It was a workaround for a political issue of which countries recognize which other countries.

It would have been difficult to get the CN delegation to sign off on a list that contained TW, although there are probably others.

ts4z··on Notes on the Go translation of Reposurgeon (2020)
I disagree. Go provides a low-runtime way of writing programs, like C, without having to resort to managing memory and threads super carefully. No VM, no interpreter, fairly straightforward to imagine what the compiler is doing.

You can do the same work in Java but you can't statically link the JVM. You can sort of do these in Python, but the compiler story is murky at best, and the language isn't as type safe.

ts4z··on Intel updates mysterious ‘software-defined silicon’ code in the Linux kernel
Tesla sold 75kWh cars to people who bought 60kWh cars. Then, during the wildfires here in California, they remotely unlocked the extra 15 for people trying to get out of town. If you wanted to get access to what you had legal title to, well, that's an upcharge.
ts4z··on Ideal Monitor Rotation for Programmers
I have two 27" monitors and got a webcam between them. It works well if you aren't bothered by the hard border between monitors.
ts4z··on Google's infamous internal 2010 “I just want to serve 5TB” video now public
Xtranormal was a video service that would animate scripts with some stock characters.

Someone made a bit of internal-only snark, and "I just want to serve 5TB" became an in-joke for turning easy problems into exercises in frustration.

Some of these things have, actually, been addressed.

ts4z··on Google's infamous internal 2010 “I just want to serve 5TB” video now public
To be fair, they did, and many things have improved. And this video was used as an uncomfortable reminder to make some of those changes.
ts4z··on Western Maryland asks West Virginia to 'consider adding us' to their state
2019: water.

2020: water, and vaccine mandates.

ts4z··on Show HN: O's URL Lengthener
Sneaky. I like it.
ts4z··on Fork Bomb
In the late '90s, I was working for CMU as a programmer and general-purpose janitor for the Andrew system, the campus computing environment. Students frequently worked on a pool of shared machines, particularly for a class like Operating Systems that required Unix. (Yalnix did not run on Linux at the time.) The shared machines had no per-user quota, and generally, abuse wasn't a problem.

But one semester, the OS class added a new first assignment: write a shell. It took about a day or two, but after the second or third accidental fork bomb, a generous per-user process limit was imposed.

ts4z··on ABCL – Common Lisp on the JVM
I bet CL allows generalizing nth and cdr. My point is still that the list structure in Lisp is very baked into the language.
ts4z··on ABCL – Common Lisp on the JVM
The structure of a list is still exposed, and that decision is baked into the essence of Lisp. If you have a list, you cannot substitute a skip list or an array. If you have a skip list, it is (I think) not a language-level sequence and so things like rest and nth won’t work on it.

Arrays, struts, all other things are possible, but the things that make Lisp Lisp mean that you may get a list where repeatedly calling cdr may result in something that is not listp (cons or nil). And that’s weird. It enables some things that are wonderful, but I think the Lisps are practically unique in conflating pairs and list elements.

ts4z··on ABCL – Common Lisp on the JVM
A lot of things in Lisp force the implementation of lists as cons cells. It’s probably possible to do something different, but no one has, and the result won’t be a Common Lisp.

(Consider that the detail of improper lists is enshrined in the language.)

ts4z··on Ten Commandments of How to Write an IMAP Client (2006)
This is a good plan, probably a notch better than using UIDs. You can use UIDs as a cursor to the server as a hint to speed up the operation if that’s what you meant in the other thread, and that’s a great thing to do.
ts4z··on Ten Commandments of How to Write an IMAP Client (2006)
Most clients want to use UID, and it’s a good key for the same reason a SQL row number is, and inconvenient for servers for the same reason consistent hashing schemes don’t have it. I’m not sure what you mean about a cursor. I’m sure clients use UIDs as cursors. They’re good for that.
ts4z··on Ten Commandments of How to Write an IMAP Client (2006)
> Does #1 mean that there are IMAP servers where my phone and my desktop and my laptop (etc.) can't all read my mail simultaneously?

[edited]

I believe that's the case. The ancient and venerable UW implementation of the ancient, venerable, and awful Unix "mbox" format from the UW server has a lot of these sorts of problems.

The UW server did not have this problem with some of the other formats. It suffered a lot from supporting a lot of different formats in borderline hostile conditions (i.e., users were assumed to have filesystem access to the server so no improvement to locking or caching was practical).

None of the current commercial implementations suffer from this, but I suppose I can say that the lowest common denominator is still pretty low.

I may be overstating this because what I'm describing would also outlaw message delivery, which I don't think is the case. I think one of the formats did have problems with trivial concurrent access but I was never a UW-imapd expert. I am sure that the mbox format has problems with EXPUNGE (removing messages flagged deleted) as well as many other issues.

I guess it's also worth reiterating that STATUSing a SELECTed mailbox (one that's open in another connection) is a pretty big waste of server resources, as someone else noted.

ts4z··on Ten Commandments of How to Write an IMAP Client (2006)
Message-ID is not unique per message, or per folder or user. The trivial counterexample is a message that goes through a mailing list may exist from the list and in a Sent folder with the same Message-ID but possibly different content, among other (less convincing) reasons.

A UIDVALIDITY change should blow your whole cache. In practice they are rare.

ts4z··on MacBook Pro Keyboard Drives Me Crazy
Hear, hear! I used a 2018 MacBook for a little over a year; my work laptop is now a ThinkPad running Linux. My personal laptop is a 2015 MacBook. When it dies, I will not replace it with a butterfly-switch laptop.

(I also miss USB type A and MagSafe, but the keyboard was the deal breaker.)

ts4z··on Ask HN: What are the “best” codebases that you've encountered?
In 2010, the nginx source was quite startling. It's very readable C, but also somewhat difficult in that it did not mechanize a lot of bookkeeping. If it wanted to construct a string of 8 components, there were 8 components in getting the length right, then 8 adds to the string. This was toil, and error-prone. But it was always done with such precision, and so consistent, that it was still quite beautiful.
ts4z··on Why does Microsoft use onmicrosoft.com and microsoftonline.com?
This is exactly right. Different parts of the business have different security scopes, and different domains are the easiest way to keep things separate: make the browser help keep data separate, and not share things across the organization.

This can also reduce cookie size, which adds up.

ts4z··on A janitor at Frito-Lay invented Flamin’ Hot Cheetos (2017)
At your company, the modern equivalent is the janitor, who cleans your office -- but doesn't work directly for Mixpanel.
ts4z··on EINTR and PC Loser-Ing: The “Worse Is Better” Case Study (2011)
http://wiki.c2.com/?DanWeinreb Dan Weinreb was the MIT guy; Bill Joy was the Unix partisan. Before he passed away, Dan's blog had his side of this story; unfortunately, I can't find it now. Fortunately WikiWikiWeb knows a little!

Edit: found it! https://web.archive.org/web/20121107034606/http://danweinreb...

ts4z··on Where grep came from [video]
D’oh. Thanks.
ts4z··on Where grep came from [video]
CompuServe.
ts4z··on RFC 8314: Use of Transport Layer Security for Email Submission and Access
This has been status quo stuff for basically the last ten years. This will be fine.
ts4z··on Using select(2) the right way
I have worked on servers that had this problem with select(2). poll was better but kqueue was much much better (from near-100% utilization with a few thousand open fds to < 1% cpu utilization; please forgive the vague numbers, it was 7 years ago at a company that I no longer work for).

If you're using nonblocking I/O, or threads, select can become the bottleneck with a few thousand interesting connections at sizes that are much less than the FD_SETSIZE max.

The user-space CPU utilization should be near-0 since this is really a kernel I/O problem; the fact that it is much higher is an indication that a lot of wasted user space work is being done.

Select, by design, has a flaw: the kernel must scan the bitmask for the highest-numbered fd passed in, even if there is little change in the fd_set bitmask (as is usually the case). This means incurring a cost if any fd in the set has a high fd number. The fd on which you accept probably has a low number, but your client I/O fds will have increasing numbers as the server gets greater and greater utilization.

kqueue (and epoll, but I haven't used it) resolve this problem nicely. Only things that change state must be communicated. poll is better than select in this respect if the array is sparse, but if a large number of fds are interesting, it will also get expensive.

ts4z··on BART's Warm Springs extension to open March 25th
Sure, but given they are already planning on making massive changes to the bus schedule as well as light rail, might as well wait for BART to be in Milpitas before doing that, since it's supposed to be "this year".
ts4z··on BART's Warm Springs extension to open March 25th
VTA serves Santa Clara County and the station is in Alameda County; and the next BART station will connect with VTA's light rail and be next to a large transportation center.
ts4z··on /dev/random – a new approach
See lavarnd.org for a modernized (2003) version.
ts4z··on Ask HN: Does anybody still use Siri?
Weather, directions, sports scores and betting lines. I use it multiple times a day.
ts4z··on What's Stopping Me Using Java8 Lambdas – Try Debugging Them
There's no guarantee the method that created the lambda is still on the stack. If a method returns a callback, the method that created the lambda has returned before the lambda is called.
← PreviousPage 2 of 3Next →