Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 1y ago · link · parent

Firefox doesn't have ad measurement and interests sharing built in yet (or am I wrong?) so it is very relevant for me. I would rather use black-and-white selects everywhere rather than having an advertising engine built into the browser.

comment 1y ago · link · parent

Making web standards even more complicated one change at a time.

comment 1y ago · link · parent

What happens if your online Windows account gets banned? How do you log in?

comment 1y ago · link · parent

By the way I looked through the code, and had to read about metaprogramming in C++. I wonder why is it so complicated? For example, why constraints like std::is_integral are represented by structs. Doesn't make much sense to me. A function wouldn't be better here?

comment 1y ago · link · parent

It doesn't look like zero-copy though in this example:

    UserPacket packet;
    stream >> packet;
That is at least one copy.

comment 1y ago · link · parent

Data retention time matters though. One thing if it is one week, another if it is one century.

comment 1y ago · link · parent

Git is unnecessary here anyway.

Git is useful for collaboration of multiple people on the same project. Is law making a collaboration? Typically there is a single person which signs the bill into a law. But there is collaboration during work on the bill, though.

But I do not think that people who make laws want to write git commands in the console. They want the GUI (ideally integrated into Microsoft Word). And if we are making GUI why not drop git and use a traditional relational database for storing the data?

comment 1y ago · link · parent

Plus autostart on boot and daily notifications.

comment 1y ago · link · parent

By the way I now realized that simply adding an equalizer before the amp might be not enough; speakers typically produce different sound in different directions, so for a perfect sound you need to somehow track location of the head and adjust filter curves.

comment 1y ago · link · parent

Git/github doesn' provide "Go to definition" and original post was about uselessness of committing law texts into git.

comment 1y ago · link · parent

On desktop you can just read process memory and extract all the keys and tokens.

comment 1y ago · link · parent

I wonder whether the phones and software used were certified for discussing such sensitive issues and if there are risks of leaking the data because of this.

comment 1y ago · link · parent

Mr. Trump's return into White House made news about America interesting again.

comment 1y ago · link · parent

It is not that easy. You need to open console and navigate to the project directory first. While with ordinary HTML files all you need is to start typing its name in address bar (or simply never close the tab).

comment 1y ago · link · parent

Technically yes, but you can see below that there are several comments about exactly this, i.e. adding raw legal texts into git.

comment 1y ago · link · parent

I remember reading about someone simply adding legal texts to git. This is pretty much useless. I think that people who do this never saw a commercial legal database (or how it is called).

What one usually need, is for example, to have cross-references, i.e. when a law contains phrase like "the certification is issued by a relevant authority", you want to have the "relevant authority" wrapped in a hyperlink pointing to an government order that designates that authority. Also, you typically want to have links to court cases related to some paragraph near it etc. If some change is planned to the law you want to have a note in the text like "this is going to change on September, 1", etc.

Given that many countries have local laws, you might want to be able to filter by a place.

Github might be used for storing raw documents as some weird kind of a database, but it is useless for actually trying to find out the answers to legal questions.

To make an analogy, reading laws on Github is like reading source code without syntax highlighting and navigation.

comment 1y ago · link · parent

> For speakers they modify what gets sent to the hardware so that the actual output then does match the frequency response

As I understand, this is not a magic pill: it probably won't help to pull out frequencies which are suppressed by 30-40 dB and I assume that if the frequency response graph is too wavy (lot of narrow peaks and dips), it won't help either.

Also, you need to have calibration files to use this method, right?

comment 1y ago · link · parent

Doesn't work in a browser [1]:

> file: URLs are supported by many non-browser runtimes such as Node, since scripts there already have file: URLs, but they are not supported by browsers due to security reasons.

If you open HTML file directly in a browser, it cannot import ES modules from a filesystem. It can import legacy scripts, but they, as I understand, cannot import anything at all.

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

comment 1y ago · link · parent

Sadly ESM don't work with local files (file:// protocol).

comment 1y ago · link · parent

You don't use modules as a replacement for DI?

comment 1y ago · link · parent

I am surprised they still use outdated syntax when there is a standard for modules. Also, it is much better when you specify full path to the file and do not have to remember the resolving rules.

Also, last time I tried to use ESM in a browser with Vue and unpkg without builders and web server, it didn't work (probably because one cannot import modules from a local folder). I wish support for ESM and localhost was improved also. I don't want to use a webserver or a bundler because it is easier without them so I switched to legacy scripts without modules.

comment 1y ago · link · parent

I hate such sites. You open it to play for a minute and hours get lost.

Also, when creating a new variation, a blank pattern is created. It would be cool if I could copy one of previous patterns and modify it instead of recreating it from scratch.

Also, drums seem to not be balanced perfectly - in some patterns, when several sounds are playing simultaneously I cannot hear all of them. Are some drums too loud or is it a problem with me maybe?

comment 1y ago · link · parent

This doesn't allow hiding things like /proc/cpuinfo or /proc/cmdline or /proc/modules etc.

comment 1y ago · link · parent

They made a choice that safe addition takes 3-4 instructions, and wrapping one (rarely used except for cryptography) takes 1 instruction. Doesn't it make more sense to make often-needed safe addition 1 instruction and rarely needed one to take 3-4 instructions?

comment 1y ago · link · parent

C macros and gcc do not allow to run arbitrary code during compilation.

comment 1y ago · link · parent

From the caption I thought there was someone (like ex-boyfriend) who targeted ill-meaning ads (like an ad for funeral services) against the woman, but it turns out it was not so bad.

comment 1y ago · link · parent

The problem is not macros, it is concatenation of identifiers. I stumbled upon this a lot when working with CSS preprocessors which allow you to write code like this:

    .user {
        &--profile { color: red; } 
    }
Now, searching for "user--profile" CSS class becomes imposible. Despite this, SASS and similar preprocessor seem to be popular and used almost everywhere. Well, I never had high expectations of front-end developers, so I am not very disappointed.

So I think as long as you don't break identifiers, the code should be searchable. But, your IDE will probably not able to help you with auto-complete and navigation.

comment 1y ago · link · parent

For simply copy-pasting code you could start with using simplest traditional macros. No matter what approach you choose your code will be pain to read and understand (maybe we need to have "show generated code" button in our IDEs).
1
575859
185