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 3y ago · link · parent

> trained on 12 million hours of speech

Humans train to recognize speech on much smaller datasets. If a small human is awake 16 hrs/day, that amounts to maximum 5840 hrs/year or 58400 hrs per 10 years. Why do mathematical models use more data and produce lower quality results? Is it because they don't understand the meaning of words?

comment 3y ago · link · parent

This puts too much unnecessary burden on developers and maintainers. It doesn't make sense to adapt software to tens of distributions (and then to different OS like FreeBSD).

Apt should be used only for system software (like init system, system libraries) but not for applications.

Also apt allows to run scripts as root during installation and this is not secure.

comment 3y ago · link · parent

It looks like Paypal is acting in full accordance with laws and regulations. Since when complying with regulations is considered "stupid"?

> planet destroying ponzi

I don't see how Bitcoin is a ponzi scheme.

comment 3y ago · link · parent

I hope all people here who love AML/KYC and hate crypto and believe it is only for criminals and current legal system is absolutely fair will wholeheartedly approve this lawful decision.

comment 3y ago · link · parent

This is an interesting observation. Governments officially support inflation, i.e. stealing your hard earned money (as stealing money seem to be better for economy) and you cannot do anything with it.

comment 3y ago · link · parent

But in America some of that illegal stuff became legal now.

comment 3y ago · link · parent

Crypto is a technology that offers just one thing: electronic payments without anything unneessary bundled with it. Crypto is a model of what banking should be.

For comparison, to use a bank card you first need to provide all your details to bank which can share them with anyone they want, and then your application can be rejected for arbitrary reasons. And after this again the bank can share information about anything you bought with the card. There is even an official organization for sharing data about consumers loan history and this is totally not a crime in our weird society.

comment 3y ago · link · parent

Wrong. Cryptocurrency demonstrate what electronic payment system should look like: without ability to sell user data and spy on users. Cryptocurrency is the payment system which is designed only for payment without unnecessary features.

Today if you pay with card you basically consent to collecting your data by corporations and following you offline and online, creating a detailed history of your activity. Corporations exchange data with each other, so using card on only one site or in one app can make your identity known to hundreds of other sites even when using incognito mode. With face recognition surveillance can be extended even to places where you don't use the card. And there is no way to opt out from it.

comment 3y ago · link · parent

As I understand that is performance in a simulator, and it is unknown what delays are going to be between pipeline stages on real hardware.

comment 3y ago · link · parent

So it can create and run programs, not just call some pre-defined set of utilities? That's impressive.

comment 3y ago · link · parent

It seems like the article talks a lot about what can be done with a new model but doesn't say how a language model (ChatGPT) is integrated with code interpreter, how they exchange data and how the data is represented as tokens for a language model. Can someone please explain? I understand how language model works, how it consumes and predicts tokens, just don't understand how it can run code and process the output and how all of this fits into token number limit.

comment 3y ago · link · parent

The manufacturers do everything wrong. Why not add 10 ports to every laptop? Are USB-A sockets so expensive?

It surprises me especially that MacBooks seem to be targeted at professionals, like creators and creators always have lot of stuff with USB plugs - like MIDI keyboards, MIDI controllers, external audio interfaces, mouse, drawing tablet, external hard drives - but MacBook only has like 3 sockets, despite being super expensive.

comment 3y ago · link · parent

4:3 is definitely better for coding and working with documents because programs and documents usually span vertically, not horizontally. It is disappointing that manufacturers target people watching videos instead of people who do work.

comment 3y ago · link · parent

What 16:9 is good for? It is inconvenient for any work: for coding, reading articles or working with documents more height is better. Please explain for what kind of activity wide, but low height screen is the most suitable?

The only thing that comes to mind is killing time by watching videos on social networks sites.

comment 3y ago · link · parent

Finally, a proper screen size instead of toy-level 13 inches. You cannot code on a 13-inch display (unless you have eagle's eyes and use tiny font) and it feels like the only use for 13-inch laptop is to watch videos and photos on social network sites while sitting in a cafe which makes it a toy, not a real laptop for work (but Apple seems to be selling such toy laptops successfully).

By the way the current trend is to install wide, but low height screens. What's the use of such screens? For coding, reading articles or working with documents height is more important than width, but manufacturers lower the height and extend the width.

Regarding keyboard layout, it is designed poorly: it has small Up/Down keys (easy to hit the wrong key) and it doesn't have Page Up/Down and End/Home keys which are necessary for coding or working with documents (but it has useless CapsLock key). What is the intended use of the keyboard? To post short messages on social network sites. They seem to copy the layout from toy laptops without much thinking about the target audience. They claim that "Whether you’re a gamer, developer, heavy Linux user, creator, or have other performance-demanding work, the Framework Laptop 16 is built to be customized to your needs.". No, your keyboard doesn't match the needs of those audiences (except for gamers and vi users who can program even on a calculator).

Also, many non-Latin based languages have more that 26 letters, but the keyboard doesn't offer additional keys for those letters, and two additional keys to switch to Latin and non-Latin layout. Nobody seems to care about this. Not Apple, not Framework, nor ordinary laptop vendors do not want to adapt keyboards to non-Latin languages and think that 26 keys should be enough for everyone.

comment 3y ago · link · parent

This can be solved by using namespaced names for packages from third-party repositories, e.g. "pytorch/triton" instead of just "triton". In this case package from one repo cannot replace another repo's package.

comment 3y ago · link · parent

It looks like totally overengineered solution to me. The CPU already has a protected mode which doesn't allow the program to access any files directly. Why do you need to run a VM which by the way is run from the kernel (privileged mode) in Linux? Why cannot you run untrusted programs in protected mode?

comment 3y ago · link · parent

One of the reasons why this happens is because Linux uses outdated security model. Linux protects one user's data from other user, but doesn't protect user's data from programs run by the user. This means that for example, third-party software like VSCode or Dropbox has permission to read your browser's cookies, history and saved passwords. Or it can debug your browser and read its memory.

Linux's security model would work well on multi-user mainframes in 80s but doesn't make much sense for an Internet-connected computer with a single user. The threats now are completely different.

For comparison, iOS and Android's security model would not allow a Python package to steal SSH keys. But the best solution would be to implement least privileges principle and do not grant unnecessary privileges to programs.

Another solution which could protect from such attacks would be to hire someone to inspect the packages. But it seems thatnobody is providing such services. Is it because people got used to everything being free?

comment 3y ago · link · parent

Great. But can you run Gnome Desktop environment on the same machine?

comment 3y ago · link · parent

Under this reasoning, American apps and websites should be banned in other countries as well.

comment 3y ago · link · parent

It is interesting, that while technologies like canvas, WebGL or WebRTC were intented for other purposes, their main usage became fingerprinting. For example, WebGL provides valuable information about GPU model and its drivers.

This shows how browser developers race to provide new features ignoring privacy impact.

I don't understand why features that allow fingerprinting (reading back canvas pixels or GPU buffers) are not hidden behind a permission.

comment 3y ago · link · parent

Isn't AI good for search? For example, isn't it possible to make an AI that would read all articles on the Internet and filter out low-quality ones from search results?

comment 3y ago · link · parent

If you want to learn to create sounds from scratch then maybe you should try a virtual modular synthesizer like VCVRack. It allows you to connect oscillators, filters, envelope generators together with patch cables.

If you want lower-level stuff and program a synth manually, then you can try PureData, but it might be too low-level for you and require dealing with math equations and algorithms. Also, its GUI is a little outdated.

If you want to know how certain sounds are created, you can look for tutorials or Youtube videos. Or you can take any virtual synthesizer, choose the preset you like and see how it's made. You can disable units one by one and see how it changes the sound. For example, you can take Dexed or Surge, both of which are free.

Of course, beforehands you have to learn the basics (what kind of waves are there, what is a spectrum, an envelope, how filters work and so on).

Regarding music theory, I think that tracker or 8-bit music uses standard notes and chords and you don't need any special music theory for it. Also if you can hear the notes then it will help you a lot. A good ear is important because it helps you to hear what is wrong with the sound and how to fix it.

Also, a desktop DAW like Ableton (which is recommended by neighbour comment) might be easier to use than a tracker.

Also, you can listen to the melodies you like and reverse-engineer them, if they are available in a tracker or MIDI format.

comment 3y ago · link · parent

I am not a user of Pico8, and probably never going to use this app, but wanted just to comment on usability.

Judging by demo videos, I think that the UI is not very efficient. For example, let's count how many gestures an user has to make to add an oscillator and connect it to a speaker:

- click "+"

- carefully read the menu, locate and click "oscillator"

- maybe drag the oscillator to a desired location

- click "+"

- carefully read the menu, locate and click "cable"

- drag the cable to the oscillator

- catch another end of the cable, which is swinging and trying to escape from your mouse cursor

- drag it to a tiny speaker's socket

This takes too much time. I believe the UI can be significantly improved. Or maybe this can be turned into a game where the devices are playing against you, jump and crawl trying to escape from you (but you can bind them with cables), and so on.

Also, "+" button is too close to a trash button, and it is easy to accidentally click it.

comment 3y ago · link · parent

> I'm not sure that's how it works

This article [1] contains benchmark results for several SSDs and a good HDD. You can compare sequential read speed in fastest mode (SEQ1M) and random read speed in slowest mode (RND4K) and see that there is a huge difference for both HDD and SSD on order of 50x (for SSD) and 300x (for HDD).

HDD is very slow for random read/write access because it needs to wait until the desired sector will spin underneath the head, one spin takes approximately 10 ms, and on average you need to wait half of that time.

> For your HDD to reach that speed in sequential write, the free space should be contiguous.

If the file system is smart enough to allocate large chunks of free sectors then the write will be sequential. If there are no large contiguos chunks then maybe you need to defragment your drive using standard Windows tools (don't know if there are similar tools for Linux) otherwise write speed will be very low.

> SSDs actually can take advantage of parallelization

This doesn't matter when you need to swap pages in because you retrieve one page after other and cannot parallelize this (as pages are swapped in only when they are accessed by the program).

But I can agree that buying $30 SSD is probably the cheapest way to speed up an old computer.

[1] https://glennsqlperformance.com/2020/12/13/some-quick-compar...

comment 3y ago · link · parent

> Or when you're swapping memory back in for an app/page that's scattered among many 4 KB pages on disk... but the point is that should still be faster than reloading the page over the internet!

I don't think so. HDD can do approximately 100 IOPS, and with 4kB pages that gives you speed of 400Kb/s.

I had different cases when system worked poorly when there was not enough RAM. All of these happened to me on 4Gb Linux system:

- when a heavy page is opened in Firefox and it tries to allocate more than 500 Mb of RAM (for example, Google Street View that leaks RAM), the system swaps out Gnome desktop compsitor, and everything freezes for several minutes, you cannot even move a mouse or switch to a text console. Often the only solution is reboot. Why cannot Linux protect Wayland compositor from being swapped out I don't understand.

- when the system turns off the screen, it can swap out desktop compositor because it is not used, and there is a freeze for 20-30 seconds when you try to wake up the system. Why cannot it swap out something less important I don't understand.

So in practice swapping can produce long freezes when the system becomes completely unresponsive. I cannot agree with your statement that getting a page from swap is faster than loading from Internet.

If instead of swapping separate pages the system swapped out and in whole processes, the situation might be better.

By the way, out of curiosity I tried to investigate who uses so much memory that 4Gb becomes not enough by summing PSS (proportional set size) of processes, and I never got 4Gb used, it always was about 2.6-2.8 Gb used after which the system becomes prone to sudden freezes. "free" command also never showed number of "used" RAM above 3Gb. I guess Linux has not only issues with swapping, but also with counting used memory as well.

comment 3y ago · link · parent

I don't think so. I tried to look up the price of CPU in my laptop, but it is not sold separately (it is soldered on the motherboard). The desktop version of the same CPU, which has 50% higher score in Passmark benchmark, costs 25% of the price of laptop. RAM costs approximately 10% of the price. So RAM + CPU make only 35% of total price.

comment 3y ago · link · parent

Regarding Apple Silicon, they claim that their soldered LPDDR5-6400 RAM can provide 100Gb/s of bandwith (per one chip?), which is amazing, but it seems that the CPU cannot fully utilize this bandwith.

For comparison, a cheap removable DDR4 module at 3200MT/s can provide theoretical bandwith around 25 Gb/s and two of them can provide 50 Gb/s which is also very fast (for me) and good enough for many tasks. More expensive DDR5 modules can provide up to 50 Gb/s bandwidth per module, and four of them give you 200 Gb/s of theoretical throughput.

So I don't see problems with using removable DDR5 modules. They are good enough, and being able to expand RAM cheaply is more important, than getting 2x bandwidth, that you cannot utilize, at a premium price.

comment 3y ago · link · parent

For HDD and SDD, it is much faster to write a large chunk of data at once than write many small chunks. For example, writing 500 Mb at once is faster than writing 50Mb worth of 4Kb chunks.

For HDD, sequential write speed can be 50 Mb/s and random write speed for 4Kb chunks can be as low as 400 Kb/s. For SSD, there is also a difference in speed on order of 50x.

Swapping uses 4Kb chunks and therefore uses the drive in the most inefficient mode. Alternative mechanism can employ faster and effective sequential access.

1
100101102
185