HNHacker News
TopNewBestAskShowJobs

v_lisivka

0 karma · joined December 14, 2017

Ukrainian from Ukraine.

Volodymyr M. Lisivka vlisivka@gmail.com

Don't forget to quote me!

submissionscomments
v_lisivka··on Why I rewrote the mesh generator of Dust3D from Rust to C++
Split memory into pages. Then create two types: OwnedMem, and SharedMem. OwnedMem will own page(s), so access to memory will require no Arc. SharedMem will implement safe protocol to access memory from different threads using Arc or atomic operations. SharedMem must also implement .clone(), so both CPU and GPU will be able to hold it.

> And I think that for certain problem domains, rust provides more safety than you actually want.

If writing of unsafe Rust by hands is hard for you, then write code in plain C, then convert it into unsafe Rust using crust.

v_lisivka··on Why I rewrote the mesh generator of Dust3D from Rust to C++
It's hard to implement unsafe patterns in safe language. It's hard like using ASM with Java, because Java is platform independent language, while ASM is platform dependent language. This impedance mismatch causes problems, which can solved by wrappers.

If we are talking about emulator, why not just make clear communication between CPU, RAM, and graphic device? Memory can be split into rows (e.g. by split_at()), so graphic device can take ownership of a single scan line at a time, leaving majority of the memory unlocked. We cannot avoid problem, but we can make scale of the problem much smaller by splitting memory into pages, so CPU can take ownership of pages, it works with right now, while graphical device can work with it own pages.

v_lisivka··on Calculating a record-breaking 31.4T digits of Pi with GCP
We can celebrate Pi day every month at 3 14:15:92.65359.
v_lisivka··on Major bank accidentally published a private package to the public NPM Registry
As you see, it doesn't change anything: I will be downvoted, then sued, then jailed despite my beliefs.
v_lisivka··on Lambdas: From C++11 to C++20, Part 2
You can mix Rust and C++. I use mainly Rust on my project, while other developers are using C&C++.
v_lisivka··on Major bank accidentally published a private package to the public NPM Registry
I have good faith belief that all software on torrent trackers are in public domain or had permission from the copyright holder.
v_lisivka··on Single-file cross-platform C/C++ headers implementing self-contained libraries
If you are doing engineering, then it better to follow engineering best practices, with descriptive names. If you are doing science, it's better to follow science best practices.

For example, we have two competing coordinate systems: first is x // width, y // height, z // depth, and second is x // width, y // depth, z // height. With descriptive names we will have no such problem.

However, it's much easier to load large and complex algorithm into head if it written concisely: one letter per variable or function, minimum unnecessary separators. When I need to understand someone else codebase, I will often concatenate all files, delete all comments and obvious functions (getters, setters, eq, hash, etc.), abbreviate long names via search and replace, remove unnecessary symbols and convert functions and classes into oneliners, until I will see whole algorithm at once. However, reading of such code requires some additional training.

To summarize, it's possible and is easy to convert descriptive names into abbreviations, so, it's better to stick with descriptive naming in public interfaces.

v_lisivka··on Show HN: tor_ssh.sh – One command to enable SSH access via Tor
Of course, I can get malware in both ways, so recommended way is to trust a third party, a maintainer, which will review code, and then will create signed package.
v_lisivka··on Show HN: tor_ssh.sh – One command to enable SSH access via Tor
It looks like you assume that SSL guarantees correctness of the file.

First, I had experience with substituted SSL certificates (by our government, at revolution), when errors were reported by Chrome only due to certificate pinning for Google services.

Second, site can be hacked and replaced directly at the site.

v_lisivka··on Show HN: tor_ssh.sh – One command to enable SSH access via Tor
No, you can't. Nothing will check SHA256 of a malware downloaded in this way, so nothing will stop malware from owning your host. To check, just put "127.0.0.1 gitlab.com" into your /etc/hosts and try to serve your own file from your URL. Git will detect this, curl will not.
v_lisivka··on Show HN: tor_ssh.sh – One command to enable SSH access via Tor
malware
v_lisivka··on Show HN: tor_ssh.sh – One command to enable SSH access via Tor
Of course, it's better, because we can link to specific commit by sha256 hash, which is way more secure.
v_lisivka··on Transform ML models into native code with zero dependencies
Try Yolo: https://pjreddie.com/darknet/yolo/ . It's written in C.
v_lisivka··on What Every Programmer Should Know About Memory (2007) [pdf]
memcpy != memmove , $#$@#@

https://sourceware.org/bugzilla/show_bug.cgi?id=12518

v_lisivka··on Accepting Bitcoin as a Small Business – 4 Years In, No Customers
Almost 3%, if combined with ChromeOS. IMHO, it is huge success, even if we forget about Linux domination in market of supercomputers, servers, smartphones, and large segment of market in IoT and robotics.

Bitcoin is far far away from such success.

v_lisivka··on Why Portland's Public Toilets Succeeded Where Others Failed (2012)
Subsidized home is not equal to free home.
v_lisivka··on Why Portland's Public Toilets Succeeded Where Others Failed (2012)
> It works in Portugal.

Is number of drug uses reduced? Nope. It risen.

Is criminal drug activity reduced? Nope. It risen.

So, what exactly "works" in Portugal?

> Public healthcare works in almost every country on Earth, and in most of developed countries it works really well. At least better than that in USA (looking at the life expectancy).

If you are not a drug user, your life expectancy is at same level as in Europe.

I have personal experience with public health care. Public healthcare is interested in popping you out of clinic as fast as possible.

For example, I received no treatment for my little pain in the back until I was unable to move. In result, I spent more than year in bed. Private clinic identified my problem _decade_ before, but their results were ignored by government clinic. I was stupid enough to trust government clinic. And so on. I can tell a lot if you want to listen.

> That's what taxes are for.

I want to be homeless then.

v_lisivka··on Why Portland's Public Toilets Succeeded Where Others Failed (2012)
1. Drug use was not a crime few decades bug. Smoking is not a crime today. It tried before. It doesn't work. 2. Public healthcare is working well if you are not interested in result. It tried before. It doesn't work. 3. Nobody will pay ever penny to care about zero cost homes. It tried before. It doesn't work.
v_lisivka··on The phone-makers bringing back buttons
So, if we need to do something without looking at the screen, we should keep hardware buttons, right? And if we don't need that, if we are looking at the screen _with_ buttons already, then hardware buttons are redundant.
v_lisivka··on Heat Your House with a Water Brake Windmill
> As noted in the article, wind can be highly variable in most areas. Optimizing a wind turbine for the average low speed (like here in the US Midwest) means that at super high speed winds can damage your turbine and it may need to be shut off. If you optimize for the high speeds you can get a ton of energy at those speeds but your turbine will mostly be still. Regions with a nice steady wind profile work better for power generation.

This problem is solved centuries ago. Just cover only part of the blade with cloth.

v_lisivka··on The phone-makers bringing back buttons
With bluetooth keyboard and cover it even bulkier.
v_lisivka··on The phone-makers bringing back buttons
I still own Droid4 and 4 other Droid's for spare parts. Two batteries are dead now, one battery is weak, but two batteries are still usable, so I can use my Droid 4 for next two or three years. I like to enter text using Droid 4 when I outside.
v_lisivka··on The phone-makers bringing back buttons
But even iPhone have fixed hardware buttons. Why they are not replaced by pixels on the screen? Can you cite?
v_lisivka··on A Famous Photo of Chernobyl’s Most Dangerous Radioactive Material (2016)
It looks like he treated his cataracts, because he wears glasses on his 2016 selfie at his page on Facebook: https://www.facebook.com/profile.php?id=100013326305771 .
v_lisivka··on Don't Let Robots Pull the Trigger
Forbid robots and send this guy instead. Two problems solved.
v_lisivka··on Don't Let Robots Pull the Trigger
I.e. they are more effective against humans.
v_lisivka··on Don't Let Robots Pull the Trigger
Mines and other kinds of death traps are primitive robots too.
v_lisivka··on Mars One, which offered 1-way trips to Mars, declared bankrupt
When I was student, I wear no hat up to -25°C (-13°F) (but I still have minor problem with right ear for 20 years after).
v_lisivka··on Mars One, which offered 1-way trips to Mars, declared bankrupt
Finland, Norway, Iceland, Sweden - they are pretty happy countries. https://www.youtube.com/watch?v=_6IsFPRoslY
v_lisivka··on In the foundations of physics we haven't seen progress for the past four decades
Yep, so it's why it was forgotten so many times in history.
← PreviousPage 4 of 20Next →