HN user

zvrba

1,932 karma

Computer programmer also interested in martial arts. You can learn more about me on my website: http://zvrba.net

Posts39
Comments863
View on HN
dl.acm.org 1y ago

The Ubiquitous Skiplist: A Survey of What Cannot Be Skipped About the Skiplist

zvrba
3pts0
zvrba.github.io 1y ago

Open-sourcing code after shutting down a startup (Quine AS)

zvrba
1pts1
zvrba.github.io 1y ago

Open-sourcing code after shutting down a startup (Quine AS)

zvrba
3pts1
nsarchive.gwu.edu 4y ago

NATO expansion – what Gorbachev heard

zvrba
6pts0
github.com 4y ago

Show HN: Fast(er) Sorting with Sorting Networks

zvrba
28pts4
github.com 4y ago

A library design for programming with effects and handlers in C#

zvrba
3pts0
www.seattletimes.com 4y ago

Senators want to rein in Apple and Google’s alleged app store monopolies

zvrba
26pts2
arstechnica.com 5y ago

EU says Apple’s 30% cut from rival music providers violates competition law

zvrba
2pts0
newatlas.com 6y ago

New desalination method could get industry out of a salty pickle

zvrba
3pts0
conferences.sigcomm.org 6y ago

Taking a long look at QUIC [pdf]

zvrba
1pts1
www.bailis.org 7y ago

ACIDRain: Concurrency-Related Attacks on Database-Backed Web Applications (2017) [pdf]

zvrba
139pts37
weakdh.org 7y ago

Weak Diffie-Hellman and the Logjam Attack

zvrba
1pts0
docs.microsoft.com 7y ago

Windows projected file system

zvrba
18pts7
chrome.google.com 7y ago

Google Analytics opt-out plugin

zvrba
2pts0
zvrba.net 8y ago

My Review of Yegor Bugayenko's “Elegant Objects” (abstract and PDF)

zvrba
1pts0
www.sciencedaily.com 10y ago

New, non-invasive method developed to wipe out cancerous tumors

zvrba
2pts0
digg.com 10y ago

Uncovering the secret history of Myers-Briggs

zvrba
3pts0
magit.vc 10y ago

Magit: a Git porcelain inside emacs

zvrba
97pts14
lists.apple.com 10y ago

If Apple implemented Posix unnamed semaphores, how many X Serves would you buy?

zvrba
1pts1
research.microsoft.com 10y ago

Teaching Concurrency (2009) [pdf]

zvrba
20pts1
www.usatoday.com 10y ago

Snapchat announces pay to replay

zvrba
3pts0
www.theguardian.com 10y ago

The end of capitalism has begun

zvrba
3pts1
arstechnica.com 10y ago

Microsoft open-sources its Objective C implementation

zvrba
3pts0
thecodelesscode.com 11y ago

The codeless code #196: Fee

zvrba
4pts0
www.linux.com 11y ago

Acrobat reader for Linux discontinued

zvrba
1pts0
queue.acm.org 11y ago

META II: Digital Vellum in the Digital Scriptorium

zvrba
11pts0
news.ycombinator.com 11y ago

How much memory is saved by shared libraries?

zvrba
1pts0
www.usenix.org 11y ago

Designing Crypto Primitives Secure Against Rubber Hose Attacks

zvrba
56pts24
www.berghel.net 11y ago

Why Clouds Give Me a Case of the Vapors

zvrba
1pts0
cacm.acm.org 11y ago

The data on diversity

zvrba
6pts0

Isn't plain JSON even worse? At least the design you're criticising has a dynamic schema definition separate from code.

The point is that "dynamism" isn't needed in this case. It's used to define fixed parameter sets for different components, so those components could just as well define a class and use json to (de)serialize it.

IOW: Defining new fields, classes and values is worthless unless the underlying component can interpret them. So code changes are needed anyway, and then class is way better and safer to use.

I've seen a set of SQL tables designed to mimic "flexible classes". There's a table for the "class", another table defining its "fields", and two other tables defining class instances and related field values (all as varchar).

Flexible, yes. You can store anything. The downside is, that I've also found "anything". Stuff attached to the wrong "class", wrong datatypes, missing "obligatory" fields, etc, etc.

It's a PITA to work with. If I could design it from scratch, it'd be a single table with JSON payload.

Similar story here. C64 was amazing, even to load a game, you had to learn some commands. (Unless the game was in a cartridge.)

Then I got a PC, and learned structured programming with Borland Pascal and later Turbo C. These were great IDEs for the time.

What'd I tell to Bjarne:

- In the future, you'll carry in your pocket a computer more powerful than the sum of all computers currently present at the university

- The unchecked flat memory model of C will cause numerous security issues with sometimes grave consequences in the "real world"

- Follow the design of Standard ML (SML) and adapt it to systems programming (yeah, it appeared in 1983, but surely papers have been published before that)

- Do not even think about using unsigned types for sizes and get rid of implicit numeric conversions: if (v.size() - 1 < 0) fails on empty vector in today's C++

- Deterministic resource management is still important and is _the_ feature that C++ gets praised for.

- Lack of standard ABI will cause a lot of headaches and lost time.

- I would tell him about LLVM IR, .NET assemblies, metadata and encourage him to first standardize an intermediate format which the compiler could read and write. That'd ensure seamless interoperability between compilers and even other languages.

- Related to the above point: the header/source split will become a burden.

Because with POST you have a RPC (remote procedure call) with arbitrary semantics and HTTPS is just a convenient transport.

That's also why I only use a couple of status codes: Ok, Created, NoContent, BadRequest, Forbidden, Unauthorized an InternalServerError (the latter two generated automatically by the framework).

GET, PUT, DELTE, etc. seem to be tailored towards entities, but as soon as the endpoint is not an "entity", the semantics get vague and break down.

By "nature" i mean e.g., mountains. Not necessarily managed park. IIRC, the people have also protested against high-voltage lines because... dunno, they "ruin the view" across the fjord I guess.

reindeer herding areas

There was recently a case in the highest court, Sami people vs state where they wanted newly built wind park in Finnmark to be torn down because... reindeer, native land and rights. They (Sami) won. Funnily, some researchers have shown that reindeer got used to the windmills quickly with seemingly no adverse effects. (Truth to be told, Sami are also internally divided on many issues. There's also a bitter (relatively recent) history between Sami and the state where the state had suppressed Sami culture over decades.)

After the verdict, some lower-ranked politicians said that Finnmark is about to become a museum, no development will now be possible there. I jokingly once thought: give the whole area to Russia so Sami can demonstrate in front of Kremlj.

I don't think the windmills will get torn down, and what happens next, I have no idea.

(For reference: the area is about 48000 km2 and population is around 75000 people. Which gives about 1.5 person per square kilometer.)

eradication of native species like wolves

Not eradication but controlled number reduction. I'm personally opposed to it, but farmers somehow have a strong-hold on the government there. ATTACKS ON THE LIVE-STOCK! I don't know how much financial damage they suffer yearly, but that's the official explanation.

Nuclear has the highest energy density (kWh produced per km2). "Renewables" need much larger areas to produce equivalent power. This means that habitats for many species are negatively affected or destroyed.

This is an ongoing debate in Norway where local people are strongly against wind turbines because they want to preserve the nature as it is.

EDIT: Relevant poster in the picture. I once was approached by Greenpeace activist on the street who was collecting money. While I would gladly donate to WWF, I said sharp "NO" to him and explained that it was because Greenpeace opposes nuclear.

Allows me to move directories around, without having to depend on an IDE to keep namespaces in sync.

So... without and IDE, you'd move code around, let the NS be changed due to being placed in a different directory structure, and then fix namespaces on use-sites manually?

I want all of C#, with terseness and not forcing OOP.

C# does not force OOP on you. You can have a single namespace, single static partial class and spread its members across as many files as you want. So the "ceremony" consists of the following snippet _per file_

    namespace NS;
    static partial class C {
        // Your methods here
    }

C# allows file-level namespaces so you can write

    namespace Math;

    static class Adder {
      public static int Add(...) { ... }
    }

(one nesting level less). Next, elsewhere you can write
    namespace Whatever;
    using static Math.Adder;

    class CC {
      void M() {
        var z = Add(10, 20); // no NS qualification needed due to using static above
      }
    }

Java enforces directory structure to reflect package names, and this feature is not universally popular.

Pushing these into an IDE is the Windows way of doing things.

s/Windows/modern/

To win in Unix land, C# needs to be editable in a plain text editor.

I guess hard-core unix users still use sticks and stones to make fire.

[...] how do you find the code that will run when they do fail? You would have to traverse [...]

I work in a .NET world and there many developers have this bad habit of "interface everything", even if it has just 1 concrete implementation; some even do it for DTOs. "Go to implementation" of a method, and you end up in the interface's declaration so you have to jump through additional hoops to get to it. And you're out of luck when the implementation is in another assembly. The IDE _could_ decompile it if it were a direct reference, but it can't find it for you. When you're out of luck, you have to debug and step into it.

But this brings me to dependency injection containers. More powerful ones (e.g., Autofac) can establish hierarchical scopes, where new scopes can (re)define registrations; similar to LISP's dynamically scoped variables. What a service resolves to at run-time depends on the current DI scope hierarchy.

Which brings me to the point: I've realized that effects can be simulated to some degree by injecting an instance of `ISomeEffectHandler` into a class/method and invoking methods on it to cause the effect. How the effect is handled is determined by the current DI registration of `ISomeEffectHandler`, which can be varied dynamically throughout the program.

So instead of writing

    void DoSomething(...) {
        throw SomeException(...);
    }
you establish an error protocol through interface `IErrorConditions` and write
    void DoSomething(IErrorConditions ec, ...) {
        ec.Report(...);
    }
(Alternately, inject it as a class member.) Now, the currently installed implementation of `IErrorConditions` can throw, log, or whatever. I haven't fully pursued this line of though with stuff like `yield`.

Recently I wished for "VB for Web". Something that'd make it easy for a tech-competent, but a non-programmer, person to prototype a functional web application.

Hi,

I've been a co-founder of a Norwegian startup, Quine AS, that attempted to automate workflows in media productions (as in movies, series, commercials). Ultimately, we've failed; the company was dissolved in July 2024. I've used a couple of weeks of vacation to clean up and document the reusable parts of the code, and to write about (parts of) our history.

For those wondering: we (the co-founders) bought the IP back from the liquidation assets and agreed to open-source it.

Hi,

I've been a co-founder of a Norwegian startup, Quine AS, that attempted to automate workflows in media productions (as in movies, series, commercials). Ultimately, we've failed; the company was dissolved in July 2024. I've used a couple of weeks of vacation to clean up and document the reusable parts of the code, and to write about (parts of) our history.

Depends on how you define "persistent data structure". In most definitions that I've encountered, a new version is made after each update. This code makes a new version only when you explicitly request it with Fork(). This allows you to

- Use the data structure as a "standard" tree, sharing one instance across threads and use locking for thread-safety

- Use it as a fully-persistent structure by calling "Fork" before every modification

- Or anything in between

I needed the 3rd case: a cache manager gives out a forked view of the actual cache contents to its clients. Thus the cache is always in control of the "master" copy, and if a client modifies its own fork, the cache and other clients are not affected.

Git is an abysmal tool for many (most?) uses of it, but that unfortunately has become "standard". The sheer awfulness of git is witnessed by the amount of posts about it and little consensus on "best practices" (e.g., rebase vs merge).

So, I don't judge, but sympathize with people who just "delete the repo and start from scratch". Unintuitive, user-hostile tools call for heavy-handed solutions.

IME, most people are willing to learn something when they're shown the value for invested effort. That "delete the repo" is standard answer for fixing f*up, tells more about the tool than the people using it. (I.e. it requires disproportionately big investment of time for little value.)

Same here. Even though the "new" Dune has a lot of good VFX, I found it boring to watch, and that was only Part I. Before watching "new", I watched Lynch's to have something to compare to. I vastly prefer Lynch's Dune. It wasn't boring. He managed to cram the whole story in less than 2h30 and in (to me) coherent and understandable way. Although the movie did demand all of my attention and weaving of threads in my mind while watching. Lynch still wins, hands down, not the least because of the atmosphere.