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

Yeah...HTTP/1 is one of those weird cases where the older protocol is considerably more difficult to implement correctly than the newer ""more complex"" standard. This is especially true if you want your server to work with they myriad of questionably compliant clients out in the world.

HTTP/3 might have been easier, and using QUIC+HTTP/3 in your hobby OS is a fun flex :)


httpdito http://canonical.org/~kragen/sw/dev3/server.s implements HTTP/1.0 GET in about 320 machine instructions, and I haven't yet found a questionably compliant client that doesn't work with it. Writeup in http://canonical.org/~kragen/sw/dev3/httpdito-readme.

I don’t think that http/3 is easier to implement than http/1.1 especially since h3 is stateful where http/1.1 is not. Especially not when everything should be working correctly and securely because the spec does not always tell about these things. Oh and multiplexing is quite a hard thing to do especially when you are also dealing with a state machine and each of your clients can be malicious.

I can't speak to http/3 (I haven't tried to impl it), but I can say that a bare-bones http/2 is very easy to implement because it doesn't try to pretend to be prose.

sbrk grows linearly, and if anything is mapped in the way it fails. mmap can map anywhere there's space as it is not restricted to linear mappings. So, you'd better hope a mapping doesn't randomly land there and run you out of space.

It's not a failure but relatedly as sbrk is linear, you also don't really have a reasonable way to deal with fragmentation. For example, suppose you allocate 1000 page sized objects and then free all but the last one. With an mmap based heap, you can free all 999 other pages back to the OS whereas with sbrk you're stuck with those 999 pages you don't need for the lifetime of that 1000th object (better hope it's not long lived!).

Really, sbrk only exists for legacy reasons.


> For example, suppose you allocate 1000 page sized objects and then free all but the last one. With an mmap based heap, you can free all 999 other pages back to the OS whereas with sbrk you're stuck with those 999 pages

Actually... you can free those 999 sbrk() pages using munmap() on Linux and Darwin (so most likely the BSDs too). You can also change the mappings within the sbrk()-allocated range, much like any other mmap.

This feature is not well known, nor particularly useful :-)


> With an mmap based heap, you can free all 999 other pages back to the OS whereas with sbrk you're stuck with those 999 pages you don't need for the lifetime of that 1000th object (better hope it's not long lived!).

Thanks to the wonders of virtual memory, you can madvise(MADV_DONTNEED), and return the memory to the OS, without giving up the address space.


Not giving up the address space feels like an anti feature. This would mean, among other things, that access to the DONTNEED memory is no longer a segfault but garbage values instead, which is not ideal.


Most of the laws which touch on DRM are federal, and so they override any state laws due to the supremacy clause.


Test pads are great for these anxious breakouts. I usually drop tons and tons of test pads on the back of my boards as it's a very dense and unobtrusive way to expose traces that you probably don't need.


I used to really believe this too, but I stumbled across the "Five Geek Social Fallacies" and it really helped me understand why I was so apprehensive to exclude others.

Some people just don't mesh well, and trying to force it will just ruin the entire vibe. You don't have to throw all your volatile or otherwise abrasive friends to the side, but it's important to understand that some friends are better one-on-one as opposed to group gatherings (especially with people who aren't familiar with their quirks). Trying to force it just makes everyone miserable.

[1] https://plausiblydeniable.com/five-geek-social-fallacies/


>it's important to understand that some friends are better one-on-one as opposed to group gatherings

sounds like a great origin story for someone who finds out they aren't invited to any parties and then self-exiles themself from the group. Or society as a whole.

The article says as much:

>when nothing smacking of social selectiveness can be discussed in public, people inevitably begin to organize activities in secret. These conspiracies often lead to more problems down the line, and the end result is as juvenile as anything a seventh-grader ever dreamed of.

I wish people could just be direct and tell Cat Piss Man to take a good shower and clean their literbox more often instead of playing these mindgames. If they don't correct their behavior, then sure. You need to cut them off. But in my experience around neurodivergence, it's much easier to be upfront about these things than avoiding it.


There are lots of justifications. It's the same as why people can be soldiers or build missiles and still sleep at night: you believe (or at least tell yourself) that you're stopping bad people.

There are good applications of these tools. If you can hack the phones of a terrorist organization, you can find out about attacks before they happen and stop them. If you can extract data off of locked computers, you can help win convictions that wouldn't otherwise be possible against people who do truly awful things.

The question, of course, is whether these good applications outweigh the misuse, but that's where it gets murky in a hurry. Individual researchers at these privately owned "boutique" exploit companies (to my knowledge) tend not to know the nitty gritty details of how their work is used out in the world unless it gets caught and dissected online. The more reputable western companies sell only to "democratic" governments which are political allies, but that only goes so far as misuse and abuse is always a risk (not to mention the shaky nature of...certain... western democracies).

At the end of the day, you really just have to hope your work is being used to target terrorists and not journalists. The money obviously makes it easier, but it's not completely disingenuous of the people who work there to believe they're doing good.


> "The money obviously makes it easier, but [...]"

But, but, but.

> "[...] it's not completely disingenuous of the people who work there to believe they're doing good."

Given how well and widely NSO and their merchandise were reported on, including the dissection of various associated scandals in the mainstream media, I beg to differ. These people are not dumb, they know exactly what they do, and who their clients are. Your good-faith assumptions with regards to these players come across as extremely naive, to put it mildly.


> First they ignore you. Then they laugh at you. Then they fight you. Then you win.

--Juicero


It's fairly common to use something like nginx as a forward proxy and do TLS there. IPv4 and NAT makes this essentially mandatory if you want to host multiple services due to eSNI. You wouldn't necessarily have protection inside the server network (which isn't great) but you at least get protection everywhere else.


Vivado has free and paid tiers. The free tiers ("WebPack") support their a myriad of their smaller devices (which includes the Kria boards). The larger devices (Virtex, etc.), however, are generally only supported by the paid versions of Vivado.

It's inconvenient for hobbyists, sure, but for enterprise uses the cost of Vivado for a team is largely inconsequential (which I suspect is why they get away with this).


The licensing scheme is not terribly robust, either; there are a number of cracked (full) licenses floating around if you know where to look. Given that AMD makes most of their money on hardware sales, and the software is only really useful in conjunction with that hardware, I suspect they don't care very much.


It is clear from the quality that all vendors of EDA software actively hate their paying customers.

Just wonder - why are EDA tools just now starting to get HiDPI support? I’m pretty sure Altera, Xilinx/AMD, etc haven’t bought HiDPI monitors for their own developers!


> avoid the hardest and most essential skill: translating from your language to the other.

The hardest and most essential skill, second only to: not translating from your language to the other :)

(or maybe it should be the other way around; translating is useful but a really hard crutch to kick. Keeping it around will make it hard to keep up while speaking/listening and make reading a slog)


> Keeping it around will make it hard to keep up while speaking/listening and make reading a slog

That's not something against translating, that just means you haven't done it enough yet, so you're still too slow.

The first time you translate a basic sentence it might take 10s. 2nd time 5s. And so on. The 100th time it takes 0.05s and you can just say it without thinking. If one just keeps translating, you automatically reach that point.


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

Search: