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

Adding XSLT support is as absurd as adding React into a browser (especially given that it's change detection is inefficient and requires lot of computation). Instead, browsers should provide better change tracking methods for JS objects.

comment 1y ago · link · parent

There is no point in several layers because to maximize compatibility developers would need to target the simplest layer. And if they don't, simple browsers won't be able to compete with full-fledged ones.

comment 1y ago · link · parent

What WebAudio needs to provide is only means to get or push buffers from/to audio devices and run code in high priority thread. There is no need for browser to provide implementation of low-pass filters, audio proccessing graphs and similar primitives.

comment 1y ago · link · parent

This is actually not a bad idea. Why should the browser contain a specific template engine, like XSLT, and not Jinja for example? Also it can be reimplemented using JS or WASM.

The browsers today are too bloated and it is difficult to create a new browser engine. I wish there were simpler standards for "minimal browser", for example, supporting only basic HTML tags, basic layout rules, WASM and Java bytecode.

Many things, like WebAudio or Canvas, could be immplemented using WASM modules, which as a side effect, would prevent their use for fingerprinting.

comment 1y ago · link · parent

Airplane mode.

comment 1y ago · link · parent

Sadly it doesn't work for JS modules, only for legacy JS scripts.

comment 1y ago · link · parent

There should be some way to mark files as accessible, for example, place them into a folder with a specific name (like "html-accessible-files") on the same level as HTML file.

comment 1y ago · link · parent

It does, given that I don't always remember the path to the app. Also, on my Linux system the terminal doesn't remember windows and tabs and I have to open them all manually after reboot (I could ask ChatGPT to write a script for that but it would be easier if I hadn't to).

comment 1y ago · link · parent

And to embed them you need a build step, and setting it up might take longer than writing the mini app itself.

comment 1y ago · link · parent

> As for running a local server, VS Code devcontainers are the solution. Open your workspace, it runs the devcontainer, and you have a server up without extra hassle

it's not easy to install VS Code, let alone use it. VS Codium (and VS Code) are Electron apps, and it is difficult to sandbox them, as Electron (and Chromium as well) use suid helper - a priviledged binary that launches as root, and I won't allow suid binaries in a sandbox. Also, it requires GPU access for fast rendering, and it is difficult to provide in a safe way or switch to software rendering (I couldn't figure it out). Electron apps are a pain to install.

One could use a virtual machine, but it would use more resources.

Obviously, that's not VS Code's issue, it is a problem with Linux which doesn't come with a good sandbox.

It is much easier to type python -m http.server to launch a server, but you need to open a terminal and navigate to a directory first, that takes lot of time I would rather spend on something different (like figuring out how to work around issues with suid binary in Electron apps). And this looks like a hacky workaround, launching a web server only to gain more privileges in a browser.

comment 1y ago · link · parent

I would like web standards have better support for pages stored in a local file (opened using file:// protocol). Sometimes I write simple HTML/Vue based mini-apps for myself and every time something doesn't work and I need workarounds, for example:

- local HTML file cannot import local JS modules, so I have to use legacy writing style

- local HTML file cannot open other local files (for example, audio files)

I understand that there is a risk if we allow local HTML files to access anything, but there should be some way - for example, a file or directory might have some suffix that allows access to it.

I do not want to use a web-server because it feels like overengineering and I don't want to open a terminal, navigate to a directory and start a server every time, it takes too much time. I just want to type the URL and have my app running.

comment 1y ago · link · parent

You can emulate sum types with classes and inheritance (N classes inherit from an empty base class), can't you?

comment 1y ago · link · parent

Actually English spelling is pretty complicated and completely different from pronunciation. Why on Earth you Englishmen write "a" (as in skate) but pronounce it as "ei". And why you have so many versions for each vowel and why you have 3 letters for "k" sound and 2 letters (i, y) for the same sound.

comment 1y ago · link · parent

The advantage though is that even if you don't know the word, you can guess the meaning if it contains familiar character(s). Also except for the first one, your examples are easy to distinguish.

comment 1y ago · link · parent

One of the advantages of Chinese characters is that you can express an emotion using a single character - like "laugh" or "tears" and you don't need emoji for that. Western alphabet cannot do this.

Also the text is more dense and you can write more using limited number of characters, for example, when you have a button in UI with limited size.

comment 1y ago · link · parent

That reads as a foreigner suggesting to abandon many thousands years long history and culture just because the characters are too difficult for him.

It doesn't even make sense because today we have computers and ML. If you want to write something, you just type the spelling, and the program automatically converts it into proper characters. And if you don't understand the character, AI can translate it for you. I am sure this can be integrated into electronic glasses.

comment 1y ago · link · parent

You just want to train a neural network in your head to be more knowledgeable about confronting evil empires, space flights and laser weapon, I think it is a "fair use". It's not like I planned to enjoy it.

comment 1y ago · link · parent

What's the point of having several yachts? You cannot be on board several of them at the same time anyway.

comment 1y ago · link · parent

> and initially refused to pay her college fees

I don't understand this part, in America, you cannot enter the college for free even with good grades?

comment 1y ago · link · parent

Tax on recordable media is unfair because honest people who don't pirate anything also have to pay. As with the case above, honest people get screwed the most.

comment 1y ago · link · parent

When billion dollar companies, which are praised and supported by governments, download pirated material and do not pay, why should ordinary people restrain themselves and pay? I cannot see how one can make moral arguments against piracy now. It makes no sense to pay if others are not paying and not punished for it. People also have a right to train their real neural network for free without paying.

comment 1y ago · link · parent

The problem is not that credit card companies charge large fees. The problem is that they do not allow to pass the fee on the customers. Because of this I don't like European regulation - instead of capping the fees they should just make clauses that not allow merchants to set a card acceptance fees, illegal.

The clause that doesn't allow passing fees on the customer is the only thing that makes market non-free.

I think it would be only fair if people paying with a card were charged more. They get the cash back from the bank anyway.

Also I know that there are super-discounted stores in my country that do not accept cards for this reason.

comment 1y ago · link · parent

What I need is not lower fee cards, but anonymous pre-paid debit cards that do not allow linking purchases to a person and profiling people. Until that appears, I will use cash only.

comment 1y ago · link · parent

To prevent from something bad happening?

comment 1y ago · link · parent

Why OpenAI doesn't block the chatbot from participating in such conversations?

comment 1y ago · link · parent

Most of European Union?

comment 1y ago · link · parent

If you trust that the law works then the data is protected by it and there is no need for encryption. But it seems that you don't trust. Aren't you planning something illegal by chance?

comment 1y ago · link · parent

The surveillance is there not to catch small thieves, but those who are against the government, against wars etc. A small thief doesn't threaten the regime in any way so he can be dealt with after more dangerous people are dealt with.

comment 1y ago · link · parent

My experience is that sometimes, for example, when I watch a lecture in a foreign language, there could be some terms for which I don't know the correct translation so I cannot think about or mention them in my native language, while I understand what they mean.

comment 1y ago · link · parent

But in "you sing", "s" is pronounced as "s", not as "z" from "using", right?
1
414243
185