HN user

no_gravity

2,245 karma

Serial Webpreneur. Like to meet like-minded people.

www.gibney.de

Posts70
Comments311
View on HN
news.osu.edu 5y ago

Warming of the Greenland ice sheet passed the point of no return

no_gravity
6pts0
www.ycombinator.com 6y ago

YC Companies Responding to Covid-19

no_gravity
144pts33
en.wikipedia.org 6y ago

List of Silent Musical Compositions

no_gravity
1pts0
en.wikipedia.org 6y ago

Quantum Radar

no_gravity
1pts0
www.gibney.de 7y ago

The behaviour of Linux pipes can be indeterministic

no_gravity
2pts6
www.esa.int 7y ago

First evidence of planet-wide groundwater system on Mars

no_gravity
132pts14
twitter.com 7y ago

How often can you divide a 64 bit floating point value by 2?

no_gravity
2pts1
www.instagram.com 7y ago

#beautifulcaptchas

no_gravity
1pts0
solar.lowtechmagazine.com 7y ago

Low-Tech Magazines website: Solar powered, offline during cloudy weather

no_gravity
2pts0
techcrunch.com 7y ago

Upwork is now a publicly traded company. Market cap is at about $2 billion.

no_gravity
4pts0
www.gibney.de 7y ago

The search volume for "web app" spikes every September

no_gravity
93pts23
www.productchart.com 8y ago

Show HN: Lineage OS – An Interactive Comparison Chart of Popular Phones

no_gravity
2pts0
www.productchart.com 8y ago

Show HN: Swapping Position and Brightness in Grayscale Images

no_gravity
36pts15
www.theverge.com 8y ago

GM says it will launch a robot taxi service in 2019

no_gravity
2pts0
www.scmp.com 8y ago

China invents Rice that can grow in Salt Water

no_gravity
2pts0
i.imgur.com 9y ago

The Full Rotation of the Moon as Seen by NASA's Lunar Reconnaissance Orbiter

no_gravity
1pts0
www.productchart.com 9y ago

Show HN: Similar 3D-Printer Finder

no_gravity
16pts14
panorel.la 9y ago

Panorella – Panoramic Umbrellas

no_gravity
1pts0
www.dailymail.co.uk 9y ago

German retailer Media Markt tests home delivery by robot

no_gravity
1pts2
newatlas.com 9y ago

Dronesurfing

no_gravity
1pts0
www.productchart.com 9y ago

Show HN: An interactive comparison of 256 popular monitors

no_gravity
7pts3
www.ventusky.com 10y ago

Ventusky shows the weather from all around the world

no_gravity
3pts0
daohub.org 10y ago

The DAO close to $100m in funding. Soon to be the largest crowdfunding ever

no_gravity
52pts79
www.gartner.com 10y ago

Worldwide PC Shipments Declined 9.6 Percent in First Quarter of 2016

no_gravity
6pts0
github.com 10y ago

CNNMRF – A new approach to Deep Dream artwork

no_gravity
1pts0
blockchain.info 10y ago

Bitcoin mining power reaches 1000 petahashes per second

no_gravity
12pts14
www.productchart.com 10y ago

3D Printer Specifications explained

no_gravity
4pts1
www.businessinsider.de 10y ago

China extends six-month ban on stock sales by large shareholders

no_gravity
1pts0
uk.reuters.com 10y ago

China stocks tank, trading halted

no_gravity
5pts0
blockchain.info 10y ago

Bitcoin hashrate explodes

no_gravity
3pts0

From how I read it, this reduces the probability that the data gets deleted due to low disk space / garbage collection:

    Persistent storage can help protect
    critical data from eviction, and
    educe the chance of data loss.
Are you sure this keeps the data when the user deletes their browser data? To me it sounds like it does not:
    Persistent storage is not deleted by the browser,
    even if storage is running low. It will only be
    deleted if the user chooses to remove it via
    their site settings.

Keeping the user logged in is not the issue. A PWA can inject a unique ID into the installation in various ways.

The problem is the data. Imagine a text editor where all your text documents are gone after you cleared the data of a different app, the browser.

I wrote a fitness app as a PWA some time ago and its pretty annoying to download all the instruction videos again every time you clear your "browser data". Plus all infos about which exercises you did and when is gone for good of course.

Can you elaborate why it could be a good thing for users?

Not being able to reliably store data on the device means that PWAs have to send the users data over the internet and store it on an external server. I would think users rather do not like that.

I am only talking about installed PWAs here. Of course not every website should be able to avoid having its cookies deleted.

The main problem I see in PWAs these days is that they cannot permanently store data on the device. As soon as the user deletes their "browser data", all the data of the PWAs on the device is lost too.

If PWAs would get their own permanent storage like other apps, it would be a huge step forward.

I will try that. At first I would like to see if I can find the problem. I would have thought that when the SD card is not responding, it would show up as "wa" in top and "%util" in iostat -x. But both are zero for the next output after a freeze.

My PI is too cool. It freezes.

I have playing with a PI Zero W over the last weeks. At first everything worked as expected.

But now it developed some strange "hangings" I cannot explain. It kinda randomly freezes in time for a few minutes every now and then.

Sometimes it takes several minutes to ssh into it. Sometimes, the terminal just freezes for several minutes.

Neither top nor iostat seem to show any elevated activity during these periods. Since they hang throughout the freeze, its a bit hard to say though.

The strangest thing: Pings to the PI always come back fast. So its probably not that the hardware really freezes completely.

P2P Matrix 6 years ago

Ok, great. Here comes more feedback :)

Since I did not save my password when signing up, I proceeded to set an email. Got a confirmation email and clicked the link in it.

Then signed out and clicked the "Set a new password" link.

But it does not work. I always get the message "Failed to send email: This email address was not found".

P2P Matrix 6 years ago

I think someone needs to look into the onboarding process. My experience so far:

1: Clicked on "Try Now".

2: Was greeted with a blob of text. Spotted "The easiest way to try Matrix is to use the Riot Web ...".

3: Clicked on "Riot Web" because that is a link.

4: Got transferred to a different website with a lot of buttons on it.

5: Clicked on the green "Get started button"

6: Got transferred to another page with a bunch of buttons on it

7: Clicked on "Browser"

8: A new window with a "Sign in" and a "Create Account" button opened

9: Clicked on "Create account"

10: Entered a username and password

11: Got asked to do the Google Captcha

12: Had to select 4 tiles with traffic lights and cklick next

13: Was told to select stairs.

14: Since there were no stairs, I clicked "Skip"

15: Had to select 7 tiles with fire hidrants and click next

16: Had to select 4 tiles with traffic lights and click next

17: Had to select 3 tiles with traffic lights and click next

18: Had to accept terms an conditions and click "accept"

19: Had to enter a recovery passphrase.

20: Had to confirm my recovery passphrase.

21: Was forced to click a "copy" button to copy the recovery passphrase.

22: Had to click "continue"

23: Staring at a spinner for a while.

24: Was prompted with an "OK" button. Clicked it.

25: Was prompted with a "Welcome to Riot" page with different options.

26: Clicked "Explore public rooms".

27: Clicked on the first one.

28: Had to look at a spinner for a while with "Joining room" next to it.

29: Still looking at the spinner ...

30: Spinner is still spinning ... will take the time to post this to HN.

Update:

31: Back to the Matrix window. Hurray! I'm in a channel. Typing "Hello" and enter. It seems to work.

I wonder if it would be an option to shortcut these 31 steps into just one and throw everyone who clicks "Try Now" into a "Welcome to Matrix" channel.

I wanted to play with variations of the code. For that it is useful to make it output a "summary" so you know the variation you tried is computationally equivalent.

For the first benchmark, I added a combined string length calcuclation:

    def main():
     r = 0
     for j in range(20):
       for i in range(1000000):
         r += len(str(i))
     print(r)
    main()
When I execute it:
    time python3 test.py
I get 8.3s execution time.

The PHP equivalent:

    <?php
    function main() {
     $r = 0;
     for ($j=0;$j<20;$j++)
       for ($i=0;$i<1000000;$i++)
         $r += strlen($i);
     print("$r\n");
    }
    main();
When I execute it:
    time php test.php
Finishes in 1.4s here. So about 6x faster.

Executing the Python version via PyPy:

    time pypy test.py
Gives me 0.49s. Wow!

For better control, I did all runs inside a Docker container. Outside the container, all runs are about 20% faster. Which I also find interesting.

Would like to see how the code performs in some more languages like Javascript, Ruby and Java.

This seems to be a compatibility list of Surface devices with a special kernel made by someone. I don't see how it is related to what is in the Ubuntu repos?

If anything, the exsitence of this kernel seems to be an indication that the major distributions do not cope well with the Surface and do not work out of the box.

Do you have a link where someone describes how he got Ubuntu to run on the Go natively without installing software from outside of the repos? The user reports I saw did not get WiFi to work with what is in the Ubuntu repos.

Is there a tablet that can run one of the major Linux distributions?

I am surprised that there is not a single commercial Linux tablet on the market. Given how many developers use Linux, one would think the market is big enough for at least one product?

And it seems no major distribution supports any of the tablets out there.

PHP has a lot going for it. It is popular, fast, has a nice syntax and a ton of useful functionality baked right into the language.

The main weakness I see in PHP is the lack of modules. PHP provides namespaces to avoid name conflicts. First of all, that does not completely root out naming conflicts. The developer who puts a namescpace into their code can only hope that it does not clash with someone else's.

Secondly, it makes it necessary that both, the code that provides reusable functionality and the code that uses it have to deal with the issue of namespaces.

A module system like Python and Javascript have is superior to this. Then only the user of the reusable code decides where to put it into the namespace.

From what I read in this article and other sources, performing more tests seems to be a very promising approach to get this pandemic under control.

The number of positive tests and death rates are published every day on all channels. I wish the number of performed tests would be also published daily. What gets measured gets managed.

I wonder what limits the number of tests that can be performed. How much would it cost to ramp up testing capabilities so that every person with symptoms can be tested? How much to increase it to a level that everyone can be tested?

Interesting. I have never seen that happen and can not reproduce it. Anything special about the browser you use? Feel free to shoot me an email then we can figure it out.

The main reason I often use Chromium instead of Firefox is that it starts up faster.

I even wrote a oneliner to see if it is just an illusion:

http://www.gibney.de/browser_startup_speed

As can be seen in the tests, it is mainly about the startup time after a reboot. Where Chromium is way faster.

Not sure what the reason. Maybe Chromium actively caches something right during the boot? Or maybe it uses less dependencies?

How much better are the photos you get out of the Fuji then the ones you get out of your iPhone?

The Fuji X100F is about 3 times as heavy then a usual smartphone. So carrying it around would quadruple the weight of my "camera equipment".

I wish somebody would run around with a pocket camera and a phone for a day and then write a blog posts with comparison shots.

1: A slim stack

Every part of the stack will need maintenance every now and then. Some parts even introduce breaking changes and force you to alter your own code. The slimmer the stack, the less often you have to fix it. And the less often you have to fix or refactor your application.

2: A stack that values stability

Linux is a good example. Linus Torvald: "We do not break userspace!"

PHP is a another one. The core developers rarely introduce breaking changes. And when they plan to do so, there is usually an intense fight over it.

3: Acceptance Testing

In the simplest form that means sending http requests to your web application and check if it returns the expected output. In my experience, acceptance tests find more real world issues then unit tests.

4: Write less code

Writing the same functionality with less code has multiple advantages. One of them is that it will break less often. Much more could be said about it. Paul Graham brings up the value of terseness frequently:

https://twitter.com/paulg/status/1068483193605681152 https://twitter.com/paulg/status/1126403387044573185 https://twitter.com/paulg/status/1056858408039735297

Less is more. This is actually one of the reasons why I named my account no_gravity.

As I understand it, the author conducted the test on an unusually slow connection. With a roundtrip time of almost half a second. Even a typical consumer line is multiple times faster.

He states that the workload is "saving one event to the database".

And then sees 0.42s for his old solution and 0.48s for the serverless solution.

Even if the server waits for the event being written to disk before it answers the request - that should be a negligible time compared to the roundtrip time he sees.

So the "15%" only hold for his very slow connection. If he repeated the same test on a faster connection, then it could turn out the serverless architecture is not only 15% slower but multiple times slower.

If 0.40s of those "0.42s vs 0.48s" he sees are due to his slow connection, then on a fast line it would be 0.02s vs 0.08s. Then his conclusion would be "4x slower" instead of "15% slower".

I really like the direct DB to filesystem mappings of the MyISAM engine in MySql. A database is simply a directory. A table is simply 3 files in that directory:

    - One for the structure
    - One for the data 
    - One for the indexes
You can simply copy a MyISAM database by copying the directory (while the MySql server is stopped).

MariaDB has forked the MyISAM engine and created the Aria engine. It is a crash safe version of MyISAM and is now their default engine for all system tables.

So in contrast to MySql, you can completely disable InnoDB in MariaDB. MySql does not support that anymore as their system tables are InnoDB.

Especially for non-concurrency workloads, MyISAM and Aria are super fast.

For these reasons, I really like MariaDB.

Not sure if eval is the right choice as the article compares parsing json to using a native js structure as well.

The correct comparison would be to try it on the 7MB json data the article is based on.

    Because the JSON grammar is much simpler than
    JavaScript’s grammar, JSON can be parsed more
    efficiently than JavaScript.
Hmm.. shouldn't that hold for most programming languages then?

Let's try it for PHP:

    time php -r 'for ($i=0;$i<10000000; $i++) $data = [1,2,3];'
    
    real 0m0,173s
    user 0m0,161s
    sys  0m0,012s

    time php -r 'for ($i=0;$i<10000000; $i++) $data = json_decode("[1,2,3]");'
    
    real 0m4,125s
    user 0m4,120s
    sys  0m0,005s
So for 10 million repetitions, a small PHP structure is about 20x faster then parsing JSON. But to test the point of the article, one should use the sama data structure it uses (https://raw.githubusercontent.com/WebKit/webkit/ffdd2799d323...) and parse it only once.