HN user

erlehmann_

534 karma

http://news.dieweltistgarnichtso.net/about/cv.html

Posts5
Comments220
View on HN

http://flatkill.org/ claims that “The sandbox is a lie”:

Almost all popular applications on flathub come with filesystem=host, filesystem=home or device=all permissions, that is, write permissions to the user home directory (and more), this effectively means that all it takes to "escape the sandbox" is echo download_and_execute_evil >> ~/.bashrc. That's it.

To make matters worse, the users are misled to believe the apps run sandboxed. For all these apps flatpak shows a reassuring "sandbox" icon when installing the app (things do not get much better even when installing in the command line - you need to know flatpak internals to understand the warnings).

I have not used flatpack. Is this description accurate? Also:

Up until 0.8.7 all it took to get root on the host was to install a flatpak package that contains a suid binary (flatpaks are installed to /var/lib/flatpak on your host system). Again, could this be any easier? A high severity CVE-2017-9780 (CVSS Score 7.2) has indeed been assigned to this vulnerability. Flatpak developers consider this a minor security issue.

I strongly suggest to not use this. Instead, create URIs that contain arbitrary content with the data URI scheme: https://en.wikipedia.org/wiki/Data_URI_scheme

The data URI scheme is standard and widely supported, does not rely on the host bitty.site being reachable and does not need JavaScript. One can even create data URIs with a small shell script that is given a filename argument:

  #!/bin/sh -eu
  printf 'data:%s;base64,%s' "$(file -bi "$1"|tr -d ' ')" "$(base64 -w 0 "$1")"

I use strace(1) look for stat(2) syscalls that fail with ENOENT. An advantage of this approach is that I do not have to imitate the C preprocessor, so parser differentials can never happen. The following default.o.do file from my blog post [1] handles the case:

  #!/bin/sh
  redo-ifchange $2.c
  strace -e stat,stat64,fstat,fstat64,lstat,lstat64 -f 2>&1 >/dev/null\
   gcc $2.c -o $3 -MD -MF $2.deps\
   |grep '1 ENOENT'\
   |grep '\.h'\
   |cut -d'"' -f2 2>/dev/null\
   >$2.deps_ne
  
  read d <$2.deps
  redo-ifchange ${d#*:}
  
  while read -r d_ne; do
   redo-ifcreate $d_ne
  done <$2.deps_ne
  
  chmod a+x $3
This approach is also used for building Liberation Circuit if strace is installed [2].

I think the compiler should output the necessary information. To quote Jonathan de Boyne Pollard [3]:

As noted earlier, no C or C++ compiler currently generates any redo-ifcreate dependency information, only the redo-ifchange dependency information. This is a deficiency of the compilers rather than a deficiency of redo, though. That the introduction of a new higher-precedence header earlier on the include path will affect recompilation is a fact that almost all C/C++ build systems fail to account for.

I have written, but not yet released, a C++ tool that is capable of generating both redo-ifchange information for included files and redo-ifcreate information for the places where included files were searched for but didn't exist, and thus where adding new (different) included files would change the output.

JdeBP, could you please release your tool under a free software license? I suspect it has fewer errors than the similar CMake approach [4].

[1] http://news.dieweltistgarnichtso.net/posts/redo-gcc-automati...

[2] https://github.com/linleyh/liberation-circuit/blob/master/sr...

[3] http://jdebp.eu./FGA/introduction-to-redo.html#CompilerDefic...

[4] https://github.com/Kitware/CMake/blob/master/Source/cmDepend...

There exists DJB's redo approach [0], which i implemented [1], where dependencies and non-existence dependencies are only recorded after the build. A typical dofile is a shell script, so you do not need to learn another language. Targets also automatically depend on their own build rules (I have seen such a thing only in makefiles authored by DJB).

I wrote a blog post to show how to integrate dependency output for both dependency and non-existence dependency generation [2]. The game “Liberation Circuit” can be built with my redo implementation; you can output a dependency graph usable with Graphviz [4] using “redo-dot”.

There is only one other redo implementation that I would recommend, the one from Jonathan de Boyne Pollard [5], who rightly notices that compilers should output information about non-existence dependencies [6].

I would not recommend the redo implementation from Avery Pennarun [7], which is often referenced (and introduced me to the concept), mainly because it is not implemented well: It manages to be both larger and slower than my shell script implementation, yet the documentation says this about the sqlite dependency (classic case of premature optimization):

I don't think we can reach the performance we want with dependency/build/lock information stored in plain text files

[0] http://cr.yp.to/redo.html

[1] http://news.dieweltistgarnichtso.net/bin/redo-sh.html

[2] http://news.dieweltistgarnichtso.net/posts/redo-gcc-automati...

[3] https://github.com/linleyh/liberation-circuit

[4] https://en.wikipedia.org/wiki/Graphviz

[5] http://jdebp.eu./Softwares/redo/

[6] http://jdebp.eu./FGA/introduction-to-redo.html#CompilerDefic...

[7] https://github.com/apenwarr/redo

An issue I have with make is that it can not handle non-existence dependencies. DJB noted this in 2003 [1]. To quote myself on this [2]:

Especially when using C or C++, often target files depend on nonexistent files as well, meaning that a target file should be rebuilt when a previosly nonexistent file is created: If the preprocessor includes /usr/include/stdio.h because it could not find /usr/local/include/stdio.h, the creation of the latter file should trigger a rebuild.

I did some research on the topic using the repository of the game Liberation Circuit [3] and my own redo implementation [4] … it turns out that a typical project in C or C++ has lots of non-existence dependencies. How do make users handle non-existence dependencies – except for always calling “make clean”?

[1] http://cr.yp.to/redo/honest-nonfile.html

[2] http://news.dieweltistgarnichtso.net/posts/redo-gcc-automati...

[3] https://github.com/linleyh/liberation-circuit

[4] http://news.dieweltistgarnichtso.net/bin/redo-sh.html (redo-dot gives a graph of dependencies and non-existence dependencies)

While you are right about POSIX problems (like using “local”) I actually targeted Dash and older versions of BusyBox – not Bash.

I plan to work on POSIX compatibility for my redo implementation.

The following sentence about my redo implementation is wrong:

In 2014, Nils Dagsson Moskopp re-implemented Pennarun redo, retargetting it at the Bourne Again shell and BusyBox.

I targeted the Bourne Shell (sh), not the Bourne Again Shell (bash). Also, my redo implementation contains redo-dot that paints a dependency-tree – I have not seen this otherwere.

Note that I made a different proposal above the quote.

I think SPAs are either fundamentally dishonest engineering, in the same way that a microwave wrapped in artificial wood veneer is (and a stainless steel microwave is not) or should result in such a template. If you really think that this is too much, IMO you should not make an SPA in the first place.

Templates cause bugs. The solitary appropriate solution is an unparser – a component that walks an AST and serializes it.

Making sure the result conforms to the grammar of the output language without any unparser would always involve a parser.

As soon as I'm looking at more than one programming or markup language in the same file, I'm looking at spaghetti code.

Iain Dooley, December 2011

http://www.workingsoftware.com.au/page/Your_templating_engin...

I wrote Hayan Zhang the following Email with the subject line “Source code & schematics for Parkinson's device?”:

Hello Hayan Zhang,

I have read several articles about the “Emma device” you have built, but could not find any details. Have you published source code & schematics?

The BBC has a GitHub repository for code related to the documentary. The one open issue on it is from a person who wants to help their father who has been affected by Parkinson's <https://github.com/bbc/MiD/issues/3>:

I am hoping to design a similar item to help my father with both writing, and potentially in continuing other activities that his Parkinson's is starting to inhibit, and while the Big Life Fix episode covering it gave some hints at the details, there wasn't that much concrete information.

In a Reddit thread, other people also want to know how the “Emma device” works and built it for their relatives who are afflicted by Parkinson's: <https://www.reddit.com/r/Parkinsons/comments/5hh2fx/emmas_wa...

Since you seem to have zero interest in commercializing your findings, I do not understand why the information on the details seems hard to find. Have you published something (like a scientific article) on the subject?

Greetings,

It was not my intention to complain, as I neither feel pain, dissatisfaction or resentment against those who downvote me. I wanted to point out that my comment asking if this is PR was downvoted to the bottom. I remember such a voting pattern from only one other thread on HN. I just looked for it and it was also on a thread about Microsoft [1]. I can not remember such voting patterns for any comment not about Microsoft.

I will probably not respond to further comments about those downvotes, as it seems off-topic; dang has already commented extensively regarding previous astroturfing accusations against Microsoft [2]:

If MS "infiltrated" HN, it's news to me and I'd like to know about it. If anybody did anything to HN that could fairly be described as "infiltration", we'd be pissed. It's our job to protect the integrity of this place for the community and we take it seriously. When we see gaming and manipulation we crack down on it hard. But actually the BigCos aren't the ones who do such things, probably because they're (rightly) too risk-averse.

[1] https://news.ycombinator.com/item?id=12319829

[2] https://news.ycombinator.com/item?id=11844253

In the article, Hayan Zhang is described as a researcher. She (claims to have) created a device that improves the quality of life of people who have Parkinson's. The device seems to have been built with easily obtainable components. Similar effects to the one she exploits have been described scientifically [0], although it seems questionable if the result comes from the vibration [1].

Expecting publication of source code from a researcher seems appropriate to me. From another article about the “Emma device” [2]:

Haiyan has no plans to commercialize the technology, but hopes other researchers will take on the project and run with it. “I think it warrants more trials,” she noted. “It definitely works for Emma. I’m amazed how well it works for her.”

How can others improve on her work when it is not published? To me it looks like this invention is milked for PR as much as possible, while details about implementation are scarce. That device helps only one person right now, while potential is there to help a lot of people.

[0] https://www.ncbi.nlm.nih.gov/pubmed/20037223

[1] https://www.ncbi.nlm.nih.gov/pubmed/23939405

[2] https://mspoweruser.com/microsoft-researcher-creates-wearabl...

As part of her work, Zhang researched the root cause of tremors. She spent six months, off and on, building prototypes. She sometimes worked in her London home, soldering wires to PC boards and tinkering with coin cell motors to create vibrations. She tested early versions with four other people with Parkinson’s, producing promising results for three, spurring the idea forward, she says.

This paragraph reads like the solution is not as simple as strapping a vibrator to a wristband. So where are those results documented? Does anyone have an idea where the source code and schematics are for the singular Emma device prototype?

Edit: I have not been able to find source code yet. A reddit thread about the device [1] from December 2016 links to a screenshot [2] of a BBC documentary from which one can infer that Zhang used six motors for the Emma device and timed them in a specific way.

Edit 2: I noticed that my other HN comment [3] asking if this article is a PR submarine was first upvoted until it was shown at the top of the thread. It was then downvoted until it moved to the bottom of the thread. If a HN mod is reading this: Does that voting pattern seem normal?

Edit 3: Now this comment is also receiving downvotes?

Edit 4: The BBC has a GitHub repository containing other code related to the documentary. There has been an issue opened in January 2017 [4] from a person who wants to help his father who has Parkinson's. No source code seems to have been released since then.

[1] https://www.reddit.com/r/Parkinsons/comments/5hh2fx/emmas_wa...

[2] http://i.imgur.com/0q0QHsj.png

[3] https://news.ycombinator.com/item?id=14388178

[4] https://github.com/bbc/MiD/issues/3

So is this what a PR submarine [1] looks like? I remembered that I had read such a story before and found that Emma could also write again in March 2017 [2], December 2016 [3], November 2016 [4] and probably other months between now and then.

[1] http://www.paulgraham.com/submarine.html [2] https://theassistiveblog.areavoices.com/2017/03/30/emma-a-we... [3] https://mspoweruser.com/microsoft-researcher-creates-wearabl... [4] http://www.dailymail.co.uk/femail/article-3979182/Engineer-c...

Bitcoin at $2000 9 years ago

It seems to me that getting rich by investing a little money in the right thing at the right time has its emotional appeal for many. There is a thing I do not understand about cryptocurrencies, though: Why should a private person hold any amount of a cryptocurrency for any other reason than speculation? If people use Bitcoin to pay online, it does not matter if 10$ buys 0.02BTC or 0.002BTC, as price tags show dollar amounts.

Many other commodities have at least some practical value even if their price tanks. But at a low price, a cryptocurrency makes online payment as easy as it would make it at a high price – as long as there exists a small enough currency unit. One thing that would make payment with cryptocurrencies problematic would be short-term price volatiity – but long-term shifts in value do not seem to matter for that purpose.

Does anyone privately hold an amount of cryptocurrency long-term for any other purpose than speculation? If so, what is their movivation?

I use both the Gmail web interface (at work) and notmuch-mode from within Emacs as an offline client. My evaluation: notmuch has a nice local search interface, supports tags and threaded views and handles PGP, but is similar enough to the Gmail interface. I find it much easier to use: https://notmuchmail.org/screenshots/

By coincidence, I used Sylpheed before and Thunderbird before that. I found both easier to learn than notmuch-mode, but ultimately lacking, especially regarding handling of encrypted messages.

I think when undefined behaviour is used for optimizations the programmer does not want it is more of a misunderstanding than one party (programmer or compiler) necessarily being “wrong”, as a compiler assumes that a program should make sense (i.e. is not undefined) and infers things from that. To clarify, would you say that assumption is problematic?

To me, undefined behaviour analysis and typing analysis seem very similar: Both allow a compiler to infer things that can help improve performance … So why do you see the claims that both can help performance as “opposite”?

I see advertising for Matrix every single time the chat topic comes up. Having looked at the protocol, it seems massively more inefficient than just using XMPP, which has numerous clients and a lot of features. Can Matrix do anything that XMPP can not?

Note that I have read the claims at http://matrix.org/docs/guides/faq.html#what-is-the-differenc... but critizising the minimal XMPP baseline feature set while claiming that XMPP is not being “well designed for mobile use cases” seems like someone wants to have their cake and eat it too – I have used XMPP over low-bandwith high-latency mobile data connections for years and noticed that XMPP's stream syncronization is a really nice feature for that use case.

Under the hood, Minetest is way cooler than it looks: It actually implements a generalized 3D cellular automaton framework in which each cube in the world is driven by a small Lua program – which makes it much easier to mod than Minecraft. Many people like the Minecraft-style mod, but there exists, for example, an implementation of Wireworld: https://en.wikipedia.org/wiki/Wireworld

Disclosure: I was an early Minetest contributor when you still had to provide C++ patches to add new features (2011) and drew some textures.