HNHacker News
TopNewBestAskShowJobs

rmind

817 karma · joined February 12, 2016

submissionscomments
rmind··on Show HN: Rvault – secure store using envelope encryption and OTP authentication
Why rvault? If you are using a simple file/directory/disk encryption with a passphrase, then the data is compromised if: 1) the computer or the disk is compromised i.e. the encrypted data becomes accessible; and 2) the passphrase is compromised. The attack surface in such case is quite significant. The computer/disk can be stolen, lost, breached; it may be left temporarily unattended giving an attacker enough time to tamper with the hardware; the system might have a malware which could steal the encrypted data and/or the passphrase (e.g. using they keylogger); passphrase might also be leaked accidentally, e.g. by being typed or copy-pasted into a wrong place; there are other threats, e.g. HD cameras which may capture typing of the passphrase. These are just a few examples.

rvault attempts to reduce the attack surface significantly by making (1) and (2) generally insufficient, yet keeping the data storage local.

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
You were talking about investing into gas in the context of "zero-emission electricity". Are you seriously drawing equality to gas power plants and an LNG terminal?

The purpose of the Lithuanian LNG terminal was diversification of the gas supplies, thus minimizing the dependence on the Russian gas. It was a very successful project, cutting the gas price significantly and forming an effective gas market i.e. allowing the country to buy gas for the global market price (whoever sells for cheapest). Lithuania did not build new gas power plants, though. Quite the opposite, the strategy in the last decade has been to increase the electricity supply from the renewable energy which resulted in building wind and solar plants.

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
In the Soviet and other totalitarian systems the government could build wherever the hell they wanted, so their decision making is really far from exemplary. I have no idea why would you build an NPP so close to densely populated areas these days, if you have other options. I can see the issue in a smaller and densely populated country like Netherlands, but not in France which is quite more spacious.

A hundred years ago you could happily buy all sorts of drugs in your local pharmacy, but it doesn't mean it was healthy for people. We came a long way with the safety standards and general attitude towards safety. So, the point here is: embrace it instead of looking for excuses. There really were better sites to build the Belarusian NPP, but they built it in violation of the Espoo convention instead of embracing safety and cooperation with your neighbours.

P.S. It is an official recommendation by the Association of Regulators of Western Europe (WENRA) to avoid building NPPs closer than 100 km to the big cities. WENRA was established in 1999, though, so it's relatively recent.

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
You have a point here, but I think the proximity is still concerning: compare the distance between Ignalina and Riga with the distance between Belarus' Power Plant and Vilnius.

It is worth mentioning that the UN commission has decided that the location of the Belarusian power plant was chosen in violation of the Espoo Convention. That's why it's not OK.

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
It's a bit of a stretch, isn't it? :) In addition to the safety concerns, you are absolutely right that it was also a Russian geopolitical project, though, just with more realistic and with more practical objectives.

One of the objectives was an attempt to make the Baltic States dependant on the Russian (well, Belarusian, but due to political realities it doesn't quite matter) energy supplies by flooding them with cheap electricity and discouraging them from diversification. Such dependency would give some means to make political influence to the Baltics. This was in addition to another objective of making Belarus even more economically reliant on Russia (in this case, very cheap but large loans given to build the power plant).

However, I don't think they managed to gain anything in the Baltics, because of a robust strategic response from the Baltic States: 1) they diversified their electricity supply with more links to Scandinavia and Poland (see NordBalt, EstLink and LitPol projects) 2) created an open and well functioning electricity market (see Nord Pool) 3) eventually decided to boycott the electricity from the Belarus Power Plant, undermining its economic basis.

Russia succeeded in tightening the economic grip on Belarus, but in terms of economic dependency, things are already pretty grim there..

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
I don't know about China, but I would guess that the economies of scale might have an impact. If you are planning to building 100 power plants, you can probably design your processes such that after the initial production, the further ones could be built much quicker.. as you already have your assembly lines ready and busy.
rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
Even for a strong democracy it is tough to sustain the blow of a magnitude 9.0 earthquake followed by tsunami. And no, reactors/technology in Fukushima were not new, they were from 1960s.
rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
I agree that INES Level 7 accident (well, a disaster at this level) is very unlikely and VVER-1200 generally ought to be matching the quality of the Western designs at this point. Even if the level 7 disaster would happen, the 50 km distance is not great and it's "living on the edge", but it ought to be just about enough for the population to be okay.

However, there are some points you miss:

- There is a lot of space for smaller accidents which can happen, including nuclear fuel leaks. Belarusian Power Plant is very close to River Neris and, as far as I know, uses its water for cooling. River Neris goes through Lithuanian capital Vilnius and there is a great concern that accidents can contaminate the water.

- See my point in a post bellow about the nuclear power plants not being built equal, even if they use the same reactor technology.

- Both political systems produced nuclear disasters, but accidents above INES Level 5 only occurred in the Soviet Union; I am not including Fukushima, because its cause was a natural disaster: earthquake followed by tsunami (and their 1960s tech was still holding in the immediate aftermath). Poor quality standards, general attitude to safety, disregard to procedures, etc -- these are the common problems in such political systems like the Soviet one. Also, many of the accidents in the West occurred in 1950s when the nuclear technology was still in its early days. So, no, I don't draw the equality between different political systems in the context of nuclear safety, although perhaps it shouldn't be overestimated either.

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
Yup: https://www.lrt.lt/en/news-in-english/19/1256930/vilnius-han...
rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
By the way, just one more point: Generation III+ VVER-1200 reactors and all the systems around them are not the same in different power plants.

VVER-1200 is used in Hanhikivi Nuclear Power Plant built in Finland by Russian Rosatom. This particular power plant uses comprehensive "package" with extra safety features and also a lot of European equipment. Yet, the regulators still identified a considerable list of issues to be addressed.

Belarus, on the other hand, opted for the cheapest "basic" package with the bare minimum and pretty much "winged" the whole construction, ignoring all foreign concerns.

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
A few points:

- The RBMK-1500 in the now decommissioned Ignalina Power Plant wasn't built near a big city, unlike the Belarusian power plant.

- Lithuania invested a lot into the safety of the Ignalina Power Plant, installing the latest European safety systems. Partly thanks to EU, yes, but the point is that there was cooperation and safety improvements. Belarus largely ignored the safaty concerns and recommendations by the International Atomic Energy Agency (IAEA).

- Lithuania didn't invest into natural gas -- this is just factually not true. Elektrenai Power Plant was modernized (well, in fact, they just built a modern one in the same site and closed down the old units) as a strategic "backup" power plant, but the overall capacity was not expanded. If anything, Lithuania has been investing significantly into renewable energy, although perhaps not as much as we would wish.

rmind··on Lithuania plans to hold drills in case of accident at the Belarus nuclear plant
Some context:

  - https://www.ft.com/content/a98322de-96f7-11e7-b83c-9588e51488a0

  - https://www.rferl.org/a/belarus-launched-nuclear-power-plant-despite-safety-issues-/30928660.html

  - https://www.euronews.com/2020/05/21/belarus-nuclear-plant-minsk-set-to-fire-up-reactor-just-45km-from-vilnius
Basically, Belarus mostly ignored numerous safety recommendations by International Atomic Energy Agency (IAEA) and other parties. There were several accidents during the construction of the power plant, including the one where workers dropped the 330 ton reactor vessel. All that raised many questions about the general quality standards in the Belarusian project.

Lithuania issued several diplomatic notes and protests, requesting to address the safety issues, but there was little cooperation from the other side.

rmind··on Lithuania is paying people to trade in polluting cars for escooters and ebikes
Perhaps you meant electric buses, e.g. https://www.dancerbus.com/ ?
rmind··on Lithuania is paying people to trade in polluting cars for escooters and ebikes
Lithuania is indeed quite flat, but perhaps not as flat as Netherlands. There are quite hilly areas in the country too. The more important aspect, though, is that the highest car concentration is in the cities and they, in general, tend to be flat(ish).
rmind··on The problem with C
Linux, BSDs and all other UNIX-like systems, PostgreSQL, Redis, Nginx, HAProxy, interpreters of Python and many other languages, tons of libraries, ... and the list could go on and go on.

A lot of very successful and robust software is written in C. The preference for the C language is certainly not due to a personal opinion of only one person.

rmind··on Lithuanian capital to be turned into vast open-air cafe
Well, at least these streets have pavements, but letting cars in the Pilies street (generally a pedestrian street full of tourists) is absolutely ridiculous. Can we start a petition? :)
rmind··on Tell HN: C Experts Panel – Ask us anything about C
Given the above, it is worth pointing out that the compilers are also much much better in verification and useful warnings/errors. Back in the (very old) days, there was a motivation to cut down PCC (Portable C Compiler) and give the birth to Lint as a separate application (because cutting the compilation time was a greater priority). The current trends are completely the opposite: compilers are getting increasingly more powerful built-in static analyzers and sanitizers by default.

I think the lack of powerful tools in 1990s-2000s contributed to the thought by some that C is 'diffcult' in terms of safety. However, things have moved on.

rmind··on Tell HN: C Experts Panel – Ask us anything about C
Well, one argument is that the vendors should not compile C89 code as C17. If you write C89, then stick with -std=c89 (or upgrade to the latest officially compatible revision).

It makes sense to preserve language compatibility within several language revisions, gradually sunsetting some features, but why do that for the eternity? Gradual de-supporting would push the problem to the compilers, but while it is no fun supporting, let's say, C89 and a hypothetical incompatible language C3X, this is where the effort should go (after all, companies with the old codebases can stick with older compilers). There is a great value in paving a way for a more fundamental C language simplifications and clean ups.

rmind··on Tell HN: C Experts Panel – Ask us anything about C
I assume you mean something like that:

    struct obj_impl {
        // real members
        ...
    };

    In public API header:

    struct obj {
        unsigned char _private[N]; // -- where N is the size of obj_impl
    };
I have seen such code too. It is also potentially error-prone. Certainly not advocating for it.
rmind··on Tell HN: C Experts Panel – Ask us anything about C
A lot C programmers prefer to keep structures within the C source file ("module"), as a poor man's encapsulation. For example:

component.h:

    struct obj;
    typedef struct obj obj_t;

    obj_t *obj_create(void);
    // .. the rest of the API
component.c:

    struct obj {
        int status;
        // .. whatever else
    };

    obj_t *
    obj_create(void)
    {
        return calloc(1, sizeof(obj_t));
    }
However, as the component grows in complexity, it often becomes necessary to separate out some of the functionality (in order to re-abstract and reduce the complexity) into a another file or files, which also operate on "struct obj". So, we move the structure into a header file under #ifdef __COMPONENT_PRIVATE (and/or component_impl.h) and sprinkle #define __COMPONENT_PRIVATE in the component source files. It's a poor man's "namespaces".

Basically, this boils down to the lack namespaces/packages/modules in C. Are you aware of any existing compiler extensions (as a precedent or work in that direction) which could provide a better solution and, perhaps, one day end up in the C standard?

P.S. And if C will ever grow such feature, I really hope it will NOT be the C++ 'namespace' (amongst many other depressing things in C++). :)

rmind··on Tell HN: C Experts Panel – Ask us anything about C
Just FYI -- there are macros for the fixed-length types, e.g.:

    printf("U32: %" PRIu23 ", U64: " PRId64, (uint32_t)1, (int64_t)2);
Perhaps not as handy as %u32 or %s64, but it's here.
rmind··on Tell HN: C Experts Panel – Ask us anything about C
There have been some disagreements on strlcpy/strlcat (BSD vs glibc crowd), although by now the debate has died off and these functions are pretty widely used. Also, while here, it would be lovely to have strchrnul() included.
rmind··on Glibc malloc inefficiency (2016)
Umm.. that's not really true.

Most userspace memory allocators are based on mmap(). Using sbrk() is legacy. The slab allocator (Bonwick, 1994) is the dominant algorithm (both in userspace and the UNIX-like kernels), although there are various flavours and somewhat different implementations of it. Since it uses fixed-sized allocations under the hood, they are nicely packed in pages. Those pages can be released with munmap() once there are no used blocks. Sure, depending on the application and workload, allocations can be become quite distributed amongst the pages over the time, but that is a separate problem.

Also, as another comment states: madvise() is also an option, but it doesn't reclaim the virtual address space. On 32-bit systems VA space exhaustion can be a problem, especially with "modern" applications.

rmind··on Time to Get Serious about Tick-Borne Diseases
Just some observations:

- In my country, Lithuania, tick-born diseases have been increasingly becoming a major problem. We had them for some time, but I think the problem has been amplified by the climate change in the last few decades. At least, the summers got hotter and the winters certainly start later than they used to in my childhood.

- Ironically, cleaner environment and stricter EU regulations on the use of pesticides and other chemical compounds also played a role: tick population is flourishing. The government doesn't have or at least cannot come up with some means to control it. Spraying forests with some chemical compounds would certainly produce serious side effects and would do more harm than good (unless something new gets invented). There have been some discussions in the parliament to raise the issue at the EU level.

- There are essentially two main diseases: tick-borne encephalitis (TBE) and Lyme disease. They are both very nasty. There is a vaccine from TBE. Unfortunately, vaccination is not universally funded or compensated by the government. Only for certain groups (forest rangers, members of the armed forces, etc). Nevertheless, a lot of people (including myself) get vaccinated and it's one of the most popular vaccines.

- Apparently, there is also a vaccine from the Lyme disease: https://en.wikipedia.org/wiki/Lyme_disease#Vaccination . In 2000s, it was tried in the US, but then subsequently pulled out from the market. It is unclear whether the vaccine really had side effects or it was due to anti-vaxxers.

IMO, more effort should be put on: 1) large scale vaccination 2) research on possibilities to control the tick populations.

rmind··on Global Passport Power Rank 2019
IMO, the countries passport holders can travel should be weighted by: 1) their size and economic strength 2) attractiveness as a tourist destination.

For example, right now, Estonian and Polish passports have the same score. However, Estonians do not need visa to travel to the USA, while the Polish need it. This is arguably a significant difference.

How exactly countries should be weighted is a separate debate.

rmind··on Soviets say Allied version of D-Day is a 'distortion' of history (1984)
If anything, the 'distortion' of history is that only one brutal totalitarian regime was defeated and condemned, but not the other. It is often forgotten that the World War II was started by both the Nazi Germany and Soviet Russia [1][2].

This does not undermine the tremendous human sacrifice by the ordinary people on the Soviet/East side: it must be remembered and respected. However, the fact that the Soviet Union was on the winning side undermined the terror, repressions and immense suffering inflicted on millions of people, including their own people and the people of the countries they invaded [3][4][5][6]. The Soviet regime, as a political subject, should not be glorified; and they certainly should have had very little to complain about. Let alone the D-Day.

[1] https://en.wikipedia.org/wiki/Invasion_of_Poland [2] https://en.wikipedia.org/wiki/Winter_War [3] https://en.wikipedia.org/wiki/Stalinism [4] https://en.wikipedia.org/wiki/Gulag [5] https://en.wikipedia.org/wiki/Political_repression_in_the_So... [6] https://en.wikipedia.org/wiki/Military_occupations_by_the_So...

rmind··on European Parliament approves copyright reform
Realistically:

1. Establishing and consolidating a strong lobbying organisation. There are some NGOs and other interested parties (e.g. companies like Google or supporting organisations like Wikipedia), but they are not united. A united body brings coordination and single, quite more substantial, budget. Then you can efficiently deploy: 1) lawyers 2) accredited lobbyists in the corridors of Brussels 3) public relations professionals running far reaching campaigns.

2. Voting in the EU elections. There are various parties which are consistent in their opposition to such laws (e.g. "Pirate" parties, some Greens and Liberals). It might be a difficult choice, as there may be other positions of such parties you disagree with, depending on your political views. However, such voting could be considered as "tactical" i.e. with a goal to increase their presence or force coalitions, rather than driven by the desire to see them fully in power. It is a question of your priorities.

rmind··on European Parliament approves copyright reform
It is not the EU which is the problem. It is the reluctance of the political establishment (both within the countries and across the EU) to acknowledge the opposition to such laws.
rmind··on Hashed and Hierarchical Timing Wheels: Data Structures for Timers (1987) [pdf]
It is one of quite overlooked papers.. It is also an algorithm used in most UNIX-like (at least) operating systems.

If you are looking for code, here is a C implementation of the hierarchical timing wheel: https://github.com/rmind/ttimer

rmind··on US citizens will need a visa to visit Europe starting in 2021
I don't follow you. Which treaty are you referring to? Are you talking about the EU directive regarding the visa policy? If so, how is this relevant to the negotiations/decision-making concerning the EU-US agreements?

EU directives are domestic legal acts. I guess you can think of them as US federal laws. Let me put it this way: let's say, just hypothetically, US would have some federal law regulating the movement (perhaps imposing some barriers) between the US states. Why and how exactly would this be relevant to the US-EU visa/travel agreements? What matters is that 27 countries agree to negotiate together, so the European Commission negotiates with the US on behalf of the EU, including those five countries. For the purpose of the agreement, it does not matter what legal instrument (EU directive, 27 bilateral treaties, whatever) is used to implement that agreement.

← PreviousPage 3 of 4Next →