Better HN
topnewbestaskshowjobs
Log inSign up

buybackoff

785 karma · joined Sep 23, 2014 (12y ago) · 216 submissions

Submissions

comment 2d ago · link · parent

It's far from straightforward. And I need a special mode, eg during application start it may generate a lot of garbage, I want that collected, but then continue with idle GC. With an option to collect overnight, or when too much is allocated, but in controlled way.

comment 3d ago · link · parent

What about Span<char> over char[]? Or a tiny struct wrapper with the length. Or do you mean some deeper runtime support?

comment 3d ago · link · parent

It does not work the way I described. It is only for short periods and is not a guarantee, and has overheads for repeated calls.

comment 3d ago · link · parent

For C# as is, what I really would appreciate is a frozen GC mode. Not zero GC, similar to Epsilon GC in Java. After initial state loading and forced GC, I would like to be able to apply a SustainedNoGC mode, that just does not even try to collect, no scanning, no pauses at all, it can only allocate. And notifications (an event) after some X bytes allocated, or just a reliable way to monitor the allocated size. The existing modes such as SustainedLowLatency or NoGCRegion are good but not enough. For some low latency workloads it's OK to allocate many GBs and then pause explicitly.

Random forced pauses are the only problem that comes from GC, otherwise it's great for throughput and just a nice feature, as a sibling comment says. No GC languages do not make code magically faster, they still have malloc/free. However, GC is surrendering control over when a program may be paused.

comment 1w ago · link · parent

I've been fighting with this Sol/Astra tendency. I noticed that Sol Light is less bad with that, the higher the effort the worse that bias to overengineer is. It takes time to understand the limits, but a dumber model that is faster and does less annoying things was better for my productivity as default.

In addition, I have spent some time to fine tune my custom instructions for Codex. It went like every time it violated my desired behavior, I asked why it did not understood my instructions and did this and that. In the end, the resulting instructions seem to work.

In the process, the model explained that the master instructions built in the Codex just tell it to push to the end and do as much as possible to satisfy a user. And these master instructions have precedence, so it's better to put the custom instructions into the developer_instructions section in the toml config file, as it has more weight, and not (only) in AGENTS.md. I ended up having both, with more details in the system AGENTS.md.

comment 1w ago · link · parent

Anton Petrov had an episode on this 3 weeks ago: https://www.youtube.com/watch?v=3h_aeB4TPxo

comment 1mo ago · link · parent

Time Machine support has been working on TrueNAS Scale, just via one checkbox on a SMB share config, for years. I thought it was just something in a share config that was always there. Now I wonder how did they do it.

comment 2mo ago · link · parent

Shadowing at AST level with the lexical scope is easy to implement, it's just each usage looks up inside out to parent scopes. But if we treat each assignment as a kind of shadowing, it works in a similar way and turns into a kind of SSA. The complexity arises with phi-nodes when multiple paths join. I think the confusion comes from the strict definition of SSA as something useful for the very late stage in the pipeline, but the same concept can exist much earlier in the pipeline.

comment 2mo ago · link · parent

Brandis, Marc M., and Hanspeter Mössenböck. "Single-pass generation of static single-assignment form for structured languages." (https://bernsteinbear.com/assets/img/brandis-single-pass.pdf).

comment 2mo ago · link · parent

Yes, a lexical scope with shadowing

comment 2mo ago · link · parent

My idea was that with single pass, I can build SSA form during AST construction, and use phi-nodes to update type flow info. Then I could use SSA form to prove that I can use certain optimized bytecode instructions when a variable/register is known to be of certain type (I have virtual registers and fat instructions, eg ADD takes 2 sources and destination). Maybe I'm mixing control flow, type flow and SSA. I do not understand where I should stop with the pipeline if I use bytecode/VM.

The paper is: Brandis, Marc M., and Hanspeter Mössenböck. "Single-pass generation of static single-assignment form for structured languages." (https://bernsteinbear.com/assets/img/brandis-single-pass.pdf). It was quite understandable to me. For a deeper dive with proper SSA construction with dominance frontiers I could not find time to dig deeper, many other papers on SSA require focused CS work on them, not practically feasible for a side project. Also, single-pass is a requirement for very fast compilation to bytecode and LSP feedback.

I tried to read TS and Pyright source code, they share the same style of immense files and nested local functions, that was quite a steep wall to understand actual inner workings in detail. Maybe TS implementation in Go will be easier to read, it's on my later TODO list. It's tempting to use AI for help, but I'm quite experienced already with undoing AI work when it takes a wrong direction and I do not notice early.

comment 2mo ago · link · parent

Yes, added the expansion

comment 2mo ago · link · parent

A genuine question: is the first point (flow typing / type narrowing) a subset of or intersection with or just an alias to SSA (static single assignment)? I'm playing with a small interpreted language implementation that is based on Lua, and have reached a point where I want to implement a single-pass SSA (there is a nice short CS paper on this), but cannot get my head around all the concepts, even if I need proper SSA for Typescript-like usability.

comment 3mo ago · link · parent

At least Options+ application works. I tried this one in June with my M720, which I like a lot, and it could not even detect it. Alpha quality at best. As another comment mentioned, the air-gapped download for Options+ is fine. Yes, Options+ is total garbage, and I noticed its autoupdate did not remove previous versions, so I noticed it as a huge multi GB folder. But it works, while OpenLogi does not.

comment 3mo ago · link · parent

This is something I'm ready to pay for. Not more per token, but I will be happy to burn through 20x Pro subscription as fast as I consume my Plus weekly limit now, with 10x more tokens per unit of time. I've learned how to deal with and steer Sol medium quite efficiently, but at the same time I realize it's so slow for the small tasks it can do well, and still so unreliable for open-ended tasks.

comment 4mo ago · link · parent

It's funny that I said "evacuate" and did not mention air travel. In that part of the world, trains are the default, with nuclear green power powering the majority of consumers. Maybe that other default is a problem. And yes, bien sûr, an abandoned personal flight or train will counter balance China, India or mega leaks of methane in US. And all AC owners must be incarcerated, it's so worse than a car. A new leftist mayor of Paris even said ACs warm up neighbors' places, should be forbidden obviously...

comment 4mo ago · link · parent

I've seen dozens of videos and articles about this strongest ever event. And I still have no clue if the next year I should evacuate from Paris for the summer because heatwaves may be even crazier than this year, or prolonged heavy rains are more likely and can make the city more livable.

comment 5mo ago · link · parent

I had plans to buy two Airs, was not sure if I needed 13 or 15, 24 or 32, which was better for my wife and what's the best strategy to buy one for her first and then understand my needs test-driving it. Maybe I actually needed Pro. Lot's of procrastination as none of us had a real need for an upgrade. It's all in the past tense now. I've just bought a 16GB model with 1TB on Amazon at 480 EUR cheaper that the new price, and it seems cheaper than the official old price. I will forget about MacBooks until a real need comes, or maybe good ARM laptops happen sooner. It's funny that if they did not have the dichotomy between 13 and 15, I would have thought less and bought M4 as soon as it was out with the support for 2 external displays + built-in.

comment 5mo ago · link · parent

In the context of a proxy one should mention epoll_wait busy poll. I've recently dived into this when reviewing low-latency options, and found that it's almost possible to do user space busy polling just for simple sockets, no DPDK/VMA/io_uring needed, and Fastly contributed to this and uses it.

It's too low level, I cannot even tell that I understand everything, only the concept, so I will just share some links. It works only per NAPI epoll context, and one cannot easily control NAPI ID, but if an entire machine is dedicated for a proxy one can do a simple trick of assinging sockets by NAPI ID to dedicated pollers.

In my use case, it was not a proxy, but N socket polling on a machine that then processes received data. It does not look feasible for such case, maybe round-robin polling of NAPI contexts from a single thread may work. What I would really want to have one day from the kernel is that I can easily tell it: trust me, I will poll this single socket eventually, never ever use IRQ path for it.

Previous HN discussion of the kernel feature: https://news.ycombinator.com/item?id=43749271 Nice presentation by the Fastly contributor, with nice diagrams making the big picture much easier to understand: https://netdevconf.info/0x18/docs/netdev-0x18-paper10-talk-s... LWN articles: https://lwn.net/Articles/1008399/, https://lwn.net/Articles/997491/, https://lwn.net/Articles/959462/ Kernel docs: https://docs.kernel.org/networking/napi.html#irq-mitigation

comment 6mo ago · link · parent

Picollo is a new library for serious performance work in .NET. Picollo stands for Performance Instrumentation and Continuous Observation for Low-Level Optimization. The initial public release of Picollo v0.1.0 contains two components. First, a modern version of an HDR histogram, which is much faster for recording data and easier to use. Second, a set of APIs for `perf_event_open`, including fast-path reads, that give raw access to PMU counters from .NET on Linux, WSL included.

21.

Picollo: Modern HDR histogram and PMU counters for .NET(hotforknowledge.com ↗)

5 points · by buybackoff · 6mo ago · 1 comment

comment 6mo ago · link · parent

No, it should be a required (by law) opt-in TRACK_ME_I_DO_NOT_CARE_OR_AM_A_TEAPOT=418.

The proposed way just normalizes tracking.

comment 8mo ago · link · parent

TrueNAS works perfectly as a VM eg on Proxmox with passing through a SATA controller from the motherboard. It may not work always with bad IOMMU groups, but I have this on an old Xeon Precision Tower 3420 and not so old Asus Z690 motherboard. NVMe passthrough should be straightforward as well. No need for LSIs or cheap PCI-to-SATA cards if the number of existing physical slots is enough. And as far as TrueNAS is concerned, it's baremetal disk access. Even the latest TrueNAS is not in the same league as Proxmox for managing VMs/containers, not even close.

comment 11mo ago · link · parent

For some time recently, I was zooming in on Bosch's The Garden of Earthly Delights. The floor's level of interactivity would be so nice there. At least on this floor, I can guess what's going on quite reliably. The experience is quite similar at some level though. I saw Bosch's originals (or 1-to-1 by size repros) many years ago and without zooming in, it was incomprehensible. With zoom, the details are overwhelming.

https://en.wikipedia.org/wiki/The_Garden_of_Earthly_Delights...

comment 11mo ago · link · parent

Group Policy Edit is the way to restrict many things. Disabling automatic updates helps. I have had forced reboots very rarely, I believe that were severe vulnerability fixes.

But my use case is never 24/7, I hibernate it overnight and every time I leave for longer than going to a grocery shop, and I have several Proxmox boxes with proper OSes for hosting stuff. Windows + WSL is my dev/media/web/files/OneDrive machine, a compact silent SFF box that is powerful enough for 90+% of my daily tasks. Lately I try Linux Desktop on Fedora/Ubuntu with every major version, however RDP server and secure boot that I can trust to work and not break myself - these things remain unsatisfactory.

comment 11mo ago · link · parent

Agreed. I had to run Windows recovery only once over the last 5+ years, after running some debloating script with many thousands stars on GitHub.

I think the Pro version is enough for reasonable experience, most of the terrible stories originate from the Home version, which should be avoided like the plague.

12345
8