Better HN
topnewbestaskshowjobs
Log inSign up

PhilipRoman

1,998 karma · joined Oct 20, 2018 (8y ago) · 892 submissions

Submissions

comment 3h ago · link · parent

well lean is not written in C, so simple buffer overflows will not work. It also has some resource limits, like maxHeartbeats for CPU, although I'm not sure about memory (you can limit recursion depths though). But I personally cannot think of any situation where lean would indicate proof as valid in case of resource exhaustion. In practice it's been verified by different people in different environments. We have machines with terabytes of memory and petabytes of NVME (that you can in principle use as swap) so I don't think we will hit hard limits any time soon.

comment 4d ago · link · parent

Assuming Lean kernel is correct (and there are multiple independent implementations of it, some proved in other ways themselves), the only part up for debate is whether the Lean-translated theorem (roughly half a page of code, maybe a bit more if you fully expand all the libraries it uses) accurately models the original GRH

The GRH is a bit too long to paste (but i encourage you to read it: https://github.com/google-deepmind/formal-conjectures/blob/m...), but for a sense of scale, here is the entire ABC conjecture:

  def radical (n : ℕ) : ℕ := n.primeFactors.prod id
  @[category research open, AMS 11]
  theorem abc (ε : ℝ) (hε : 0 < ε) :
      {(a, b, c) : ℕ × ℕ × ℕ | 0 < a ∧ 0 < b ∧ 0 < c ∧ ({a, b, c} : Set ℕ).Pairwise Nat.Coprime ∧
      a + b = c ∧ (radical <| a * b * c : ℝ)^(1 + ε) < c}.Finite := by
    sorry
not exactly beyond the realm of human review

comment 5d ago · link · parent

I generally agree with your idea, however you can also say "Hey Claude, I want to vibe code XYZ, set up an AI friendly automation environment" and it will have no problem throwing something together with qemu, etc. And of course it doesn't have to be you saying that, it could be a N+1 level agent, who loaded his /ai-project-management-best-practices skill.

comment 6d ago · link · parent

Question is if they expose it to the guest. Many (most?) cloud platforms will make the guest see the lowest common denominator, specifically to avoid angry customers when their working setup suddenly breaks.

In the case of transparent migration, I think it's basically a must. No JIT (or even libc probably) is going to support CPU features changing at runtime.

comment 1w ago · link · parent

I didn't read the full PDF, but at least in the linked article, I think the number of native speakers as a metric penalizes English (and French), making them look more efficient in the graphs. There are about 3x more non-native speakers than native, and vast amounts of training material has been written by them.

comment 1w ago · link · parent

Call me crazy but I think it's much better for software to recover from (some) asynchronous/transient conditions by itself (at least if it's not a trivially stateless service). I've had to go great lengths to implement transparent redundant networking for software which doesn't know how to reconnect a TCP socket and instead just hangs for 5 minutes.

comment 2w ago · link · parent

This comment is comedic perfection

comment 3w ago · link · parent

I think the number is mostly meaningless even if we ignore whether they're distinct or not. Consider ioctl() - it's a single syscall but if I remember correctly the number of subcommands is in the thousands.

comment 3w ago · link · parent

I wouldn't call any of them similar, except for 'pread' maybe. Each one has a lot of subtle semantics. Either way, it's syscall.tbl that determines whether they are distinct syscalls, not the author's page

comment 1mo ago · link · parent

1) You can use interpreted version for rapid development and switch to compiled for release

2) You may like Lua as a language and want to use it for general purpose programming, not necessarily embedding into host program

I will say though that the performance aspect has to be taken with a grain of salt, "native compilation" is not a meaningful improvement if every source line translates to multiple branches or vtable lookups. From my experience plain conversion of Lua to C (assuming you faithfully follow the specification, including coroutines, metatables, etc.) produces equal or slower code with rare exceptions for numerical loops. If it wasn't all AI generated I'd maybe spend time understanding this project.

comment 1mo ago · link · parent

Maybe that wasn't the best example since you cannot even cast to a function pointer within standard C (but you can in POSIX). If you consider POSIX as portable then writing your own dlopen is pretty simple and you don't even need to be aware of calling conventions, though there are some architecture specific things in the ELF format. But either way it will not integrate well with mechanisms that people expect to work like LD_* environment variables, /etc/ld.so.conf and so on. So I still think it matches the "possible but will not integrate with rest of the system"

comment 1mo ago · link · parent

Emitting strings is fine, it's the parsing that sucks.

comment 1mo ago · link · parent

Case in point: echo y | LANG=lv_LV.UTF-8 grep '[a-z]'

comment 1mo ago · link · parent

I would say there are 3 broad classes of libc functions

1) functions that you cannot implement in portable C - syscalls, signals, ABI specific things like longjmp and setcontext

2) functions that you could implement by yourself in portable C, but they are expected to play nice with the rest of the system - a lot of POSIX user stuff, dns management, dlopen, all the nsswitch mess. Can't think of any standard C examples because of the extreme portability requirements of C. Maybe the locale stuff, although it's usefulness is dubious.

3) functions that are there for convenience and sometimes compiler special-casing, like math, str*, <db.h> stuff that was thankfully removed from glibc

Most of #3 should be ignored. #2 is optional, especially if your software is for end users and not packaged by a distro. Sometimes it's safer to ship your own MDNS implementation for example rather than hope that the distro has sane defaults.

comment 1mo ago · link · parent

I'm curious why do you need manual intervention after a power cut. Isn't configuring bios enough for this?

comment 1mo ago · link · parent

another comment on a different HN thread pointed out a similar issue. Now I'm wondering if backdrop-filter can be used correctly at all or should just be avoided entirely

comment 1mo ago · link · parent

GitHub could make it the default for new repositories created via web UI and devs who don't touch the CLI probably wouldn't even notice

comment 1mo ago · link · parent

I'm in the process of building one myself. Take what I'm saying with a massive grain of salt, but I believe you basically need three things - objective, tube lens and a camera module.

If I were you, I would probably buy a normal microscope that supports a microscope camera attachment, instead of specifically looking for USB microscope. There is a lot of misleading marketing around USB microscopes, a lot of them are literally just doing digital zooming in (I have a 30€ "1000x" microscope from Amazon which is nice for soldering and such things, but these fake microscopes appear even at higher price ranges). Treat anything >1000x for light-based microscopes as a red flag.

comment 2mo ago · link · parent

In C, const can also answer B, but only in non-pointer contexts.

comment 2mo ago · link · parent

The doc won't point it out explicitly and I apologize if my explanation offends anybody, but the intention is basically leftist, state-friendly bitcoin. The authors took a look at the anarchy of real cryptocurrencies and realized they don't actually like anarchy, so instead they want to make something "wholesome" that governments would be willing to go along with (since they can tax it).

They are funded by EU and banks in an attempt to claw back some market share from cryptocurrencies which are slowly getting banned.

comment 2mo ago · link · parent

The way caches are managed in CI is bonkers (at least in GitLab, but GitHub probably does the same). I guess it's built to conveniently work with the simplest of projects. I had to reimplement the mechanism by hand just to get basic things working, like not downloading the entire cache when only a few entries will be used for each build

comment 2mo ago · link · parent

and for programs that don't respect this convention ./--file

comment 2mo ago · link · parent

I'd say Java's virtual threads are also a parallelism construct (at least in the performance sense, not logical guarantees), since they're scheduled on a pool.

comment 2mo ago · link · parent

Just to nitpick, it's a 8MB-sized mapping, not 8MB of RAM.

comment 2mo ago · link · parent

Write a subleq interpreter with a magnet and a steady hand? (Hopefully the magnet is not compromised)

comment 2mo ago · link · parent

I can believe that... We've had logging macros break because line numbers no longer fit in an u16

I would love a TV show like "Hell's kitchen" except it's code bases and development processes.

comment 3mo ago · link · parent

W^X is typically per mapping, not per memory page and does not interfere with JIT compilation.

comment 3mo ago · link · parent

"per band" is also hilarious, as if you could get that kind of data rate in 2.4GHz

comment 3mo ago · link · parent

Am I missing something? For practical use you only care if it carries a certain amount of packets per second without excessive retries, not whether it preserves the waveform exactly.

comment 3mo ago · link · parent

I even saw it using the -bearing suffix in other cases, like describing a function responsible for 802.11 radar detection as "radar-bearing"
12345
30