The design will look like this:
The big blue arrow leads to the articles which are related to the topic in the center.
Now parsing through a big German text corpus to calculate where the research topics will be placed on the map.
2,245 karma · joined August 19, 2011
www.gibney.de
The design will look like this:
The big blue arrow leads to the articles which are related to the topic in the center.
Now parsing through a big German text corpus to calculate where the research topics will be placed on the map.
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.Great, so there is light at the end of the tunnel!
> store that data on the server
Well, we talked about that already:
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.
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.
If PWAs would get their own permanent storage like other apps, it would be a huge step forward.
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.
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".
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.
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.
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.
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.
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.
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?
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?
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.
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.
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".
- 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.
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.