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

I tried to come off Trintellix. 4 weeks was fine. 5th week immense thoughts of doom. Had to take Xanax to bridge it kicking in again.

> we store the records as a single Box<[u8]> containing each record encoded as a 2-byte length prefix followed by its raw bytes.

Interestingly this is exactly how netlink works-ish: https://manpages.ubuntu.com/manpages/focal/man3/netlink.3.ht...

You start, get the type & length, and then that is how many bytes you read.

Some issues with that when you deserialize, from a raw stream in to `[u8; 4096]` buffer, the alignment is only guaranteed to be on 1 byte, not 4 bytes.

In practice it is 4 bytes, but if you run those tests with Miri, you'll get yelled at. So the fix there is to declare the buffer with a type that mandates the alignment of the largest type that you're going to be deserializing.

So then you start your buffer as follows: `[u32; 1024]`, and with `slice::from_raw_parts` you get to turn that into `[u8; 4096]` with the expected alignment.

As an exercise I wrote a streaming parser for netlink, the current existing package serializes everything, all at once.


This kind of encoding[0] is ubiquitous in networking protocols. It scales down to small silicon well and enables the receiver to estimate resource requirements or skip parts of a serial byte stream without storing it in memory first. These encodings usually aren't aligned by design.

[0] https://en.wikipedia.org/wiki/Type–length–value


It's called TLV encoding - tag/length/value. It's very common in all sorts of network protocols and serialisation formats. It allows you to skip unidentified tags. Sometimes, like in the PNG file format, there's a fixed bit in the tag that tells you whether it's safe to skip or if you have to reject the whole thing because you don't understand this tag.

Hey dang can I get my rate limit turned off pretty please?


The problem with shared is the issue of shared cost. How do you determine how much a user consumes?

There is also the issue of upgrading the shared infrastructure. Because of the size it's a lot more expensive to replace, so that is postponed for much longer because now everybody needs to pitch in.


H1-B and L1 can actually be done in-country, but for some reading going abroad and get consular processing has a lower chance of RFE.

You are talking about change (or extension) of status, not visa.

US is unique in that the visa sticker and your right to remain in the country (status) are two different things. The only purpose of the visa sticker is to allow you to travel to a U.S. port of entry, where you apply for admission, and therefore legal status. You can have legal status in the U.S. while the visa sticker has expired, and your status can be changed or extended domestically. However unless you have a valid sticker you cannot leave and return.


It's not unique: Japanese system is exactly as you described.

Australia too - however, to get a renewal all you need is an online connection and a credit card, the renewal (at least for me!) goes through automatically. (Notwithstanding that Australia just increased the PR-renewal cost from ~400-500 to ~1400-1500 AUD)

There actually is a pilot to renew h1-b visa foils while in the US without a consular appointment.

Which makes immigrants' lives easier (shocked!) so it won't get implemented

Similar even with LPR (Legal Permanent Resident) status. Your green card is valid for ten years. When the card expires it must be renewed, but your status does not expire. But you would need a current, valid card, to re-enter if you left (or have extenuating circumstances which you'd -reallllly- want to have worked through with a consulate prior to attempting.

I thought that was universal. The Visa gets you into the country. Your entry stamp shows how long you can stay. It was an extra white card in USA but I forget what designation the form had. Been a while.

One example I'm familiar with which is different, are Schengen tourist visas. You need to leave before the visa expires. That's not the case for US tourist visas.

Apparently the Form I-94 (Arrival/Departure Record) card is phased out. But it used to be that it contained your allowed term of stay. I am sure the digital version has something like that. You do not automatically get the max allowed duration per your visa. It might be that they are one and the same especially short visa terms of course. But i haven't actually been since mid 2000s so I wouldn't actually know for sure.

Based on my experience 20 years ago you could only renew the H-1B visa in the passport in-country under extraordinary circumstances. In the majority of cases they reject your request and would tell you to travel to a consulate.

Prior to the mid 00s you could renew at any consulate but they changed it so you could only renew in your home country.


the "only in your home country" change happened very recently, late 2025 or early 2026

Not really… Theoretically, you could get it issued in a third country under very restrict conditions (renewing to the same class, in Mexico or Canada, force majeure, etc). However, the likelihood of it being denied was considerably higher, so basically all immigration lawyers strongly recommended going back to the home country.

The recent policy change ended that possibility altogether.


This matched my experience. 2002 I renewed in Canada with no issue. 4 years later I had to go back to my home country as I was told by my immigration lawyer that unless I had a connection to Canada, they would redirect me to my home country.

at least for Indians, going to Mexico/Canada and renewing to the same class were both very large use cases. consulate appointments in the home country are super backed up.

The pause on visa appointments does not apply to H1-B and L1 as they are nonimmigrant visas. It applies to family based immigration visa, diversity visa, and EB-1/2/3 when you do processing abroad.

(You might have known that, but I thought it's worth clarifying).


Sadly 2 parts of Arizona use CA gas.

This means a couple of things: those places don't have 93, and the mileage you get out of a gallon is less.

I wish the government would ban 2 stroke engines (like leaf-blowers), which would have a much larger effect on air quality, vs using CA's oxygenated gas.


Those places, are they top tier?

> At one time, credit card companies forced vendors to charge the same, whether cash or credit, but that seems to have fallen by the wayside.

I miss that. I really dislike that it is allowed to charge extra for a credit card. It shows that the company doesn't understand the cost of cash.


Problem with a debit card is that if something goes wrong (product broken, or worse, debit card skimmed) it's my debit card, and thus my money.

Credit card? I file a charge-back which is a forcing mechanism for the vendor. Credit card skimmed? I get a new one, and I don't need to wait for my $ to be re-imbursed.


Debit cards on Visa/Mastercard have chargeback protection too, but yes, the money leaves one's account until the chargeback is successful.

In Belgium it is common knowledge that cash-only places don't report everything to the feds.

For the same reason those food establishments had to get a government approved White Cash Register, because there was so much money disappearing.


I'm surprised NY allows tinting of the whole front windshield. Here in AZ we're bound by the (stupid) AS-1 line. Tinting here would help more than in NY.

It’s cultural; style over function—-unless the function is more traffic deaths (for which I have no numbers of traffic deaths involving tinted windows, I freely admit. I have had uncomfortable interactions with tinted cars on the streets and highways, so they have earned my permanent enmity).

The trouble is both the cops and bully boys like tinted windows the same as acculturated Captain America and the Red Skull.


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

Search: