Readit News logoReadit News
jsjolen commented on What’s in that .wasm? Introducing wasm-decompile   v8.dev/blog/wasm-decompil... · Posted by u/slow-typer
kazinator · 5 years ago
The clang disassembly given in the article sure makes it look like WASM is a nested expression tree, which leaves the choice of stack versus register to the implementation.

      (f32.add
        (f32.add
          (f32.mul
            (f32.load
              (local.get 0))
            (f32.load
              (local.get 1)))
          (f32.mul
            (f32.load offset=4
              (local.get 0))
            (f32.load offset=4
              (local.get 1))))
        (f32.mul
          (f32.load offset=8
            (local.get 0))
          (f32.load offset=8
            (local.get 1))))
The outer f32.add could translate into a byte code instruction that finds its two operands on a stack, or to one which gets them from registers.

The code only says that there is a f32.add call which has two operands that are the result of a f32.add and f32.mul and so on.

The implementations will agree in their treatment of locals: that there are two locals 0 and 1, which support loading at offsets and such.

Both stack and register machines can support locals.

jsjolen · 5 years ago
That's just the pprinter working its magic :-).

Just read the standard, it's quite clear from the semantics that it's a stack machine: https://webassembly.github.io/spec/core/exec/runtime.html#st...https://webassembly.github.io/spec/core/exec/instructions.ht...

jsjolen commented on Sweden to shut bars and restaurants that ignore coronavirus restrictions   uk.reuters.com/article/uk... · Posted by u/samizdis
davidw · 5 years ago
> The ones who need to save face are the ones which are committing to full lockdown right now.

That's quite the assertion. The very word quarantine comes to us from when there was a Republic of Venice. The notion of shutting things down in times of plague is an old one.

Yes, it's a very blunt instrument, and you'd hope we could do better these days - and some places like South Korea and Taiwan appear to be managing that - but locking things down works.

jsjolen · 5 years ago
I'm not saying that because the lockdown has been a failure you need to save face. Is there something unclear in my reasoning from the rest of my comment that you'd like me to re-word?
jsjolen commented on Sweden to shut bars and restaurants that ignore coronavirus restrictions   uk.reuters.com/article/uk... · Posted by u/samizdis
casefields · 5 years ago
Just like abortion or guns, Republicans vs Democrats, there are 2 chunks of people on opposite sides that have staked out their bunkers. They are now at war.
jsjolen · 5 years ago
It is absolutely not the same, since Sweden may change their position because they are not inherently opposed by some inherent moral absolutism to do so.
jsjolen commented on Sweden to shut bars and restaurants that ignore coronavirus restrictions   uk.reuters.com/article/uk... · Posted by u/samizdis
notacoward · 5 years ago
"as the weather got warmer, people in the capital were beginning to ignore social-distancing rules"

So much for the argument that Sweden's approach was working because Swedes are so much better than the rest of world at voluntary compliance. Overall, it looks like Sweden is moving toward doing the same as every other country, but quietly so they don't have to admit it's a change of course.

jsjolen · 5 years ago
>[...] but quietly so they don't have to admit it's a change of course.

Where exactly does this come from? Sweden has no need to save face. We've been transparent and had open discussion from the beginning with the spoken assumption that we may, in fact, not be doing the right thing and that we may have to alter course as the situation changes.

The ones who need to save face are the ones which are committing to full lockdown right now. They're the ones who are making a big sacrifice and need to motivate it with the fact that "it's a necessity", seeing Sweden succeed otherwise would be a big blow to their egos and their personal sacrifices.

I will also say that voluntary compliance is still occurring here, which is notable both in what private companies are doing in adapting to the situation, and how the average person has changed their behaviour. This doesn't mean 100% compliance for everyone, which is unfortunate.

jsjolen commented on Mongolia to restore traditional alphabet   news.mn/en/791396/... · Posted by u/yorwba
pbhjpbhj · 5 years ago
Why don't you consider mutual intelligibility across nations to be good? I love the diversity of the many languages we have, but that's not really a useful aspect of the World - greater cooperation seems to me to be a noble target for the human race and commonality of language seems to aid that. People can share their unique culture with me because they speak a language (native, domestic, or otherwise learnt) that I can understand.
jsjolen · 5 years ago
Mutual intelligibility for the sake of information exchange is good, but we can have both. Most Europeans already have both. In the EU (the organization) it's Euro English.

The person above you has not said that mutual intelligibility is bad.

You want people to share their culture with you, yet you are fine with them throwing away something which acts as one of the backbones of their cultural history for the sake of an imagined increase in cooperation.

And also, why does everything have to be useful? The useless things in life are often the best. Like ice cream, poetry, wasting an afternoon away, or hacking. In fact that's why I work, to enjoy the useless things in life.

jsjolen commented on Mongolia to restore traditional alphabet   news.mn/en/791396/... · Posted by u/yorwba
lotsofpulp · 5 years ago
What if being more fluent in English leads to better economic outcomes for Mongolians, and hence more secure access to resources?

I notice that in our family and friends of immigrants, the parents who were fluent in English and able to access all the resources in English, were able to provide their children better advice and their kids are more economically successful than those who didn’t have that resource.

jsjolen · 5 years ago
1. They can do both, learning a separate script that's as simple as the Latin one is not a huge investment.

2. You're talking about people who immigrate to an English speaking country, correct? Good advice for people living in Mongolia surely is available in Mongolian.

Mongolians today learn English, at least the guy who went to Sweden to work as a chef that I talked to a couple of years ago did.

jsjolen commented on Mongolia to restore traditional alphabet   news.mn/en/791396/... · Posted by u/yorwba
koheripbal · 5 years ago
> The latter does not inevitably follow from the former.

Some subject always loses out when you need to teach something extra. Education is not infinite.

jsjolen · 5 years ago
Interesting! Would you like to expand on that argument?
jsjolen commented on Language Design: Use [ ] instead of < > for Generics   soc.me/languages/stop-usi... · Posted by u/signa11
AnimalMuppet · 5 years ago
I would say it's in a small subset of people who think like computer scientists rather than like software engineers. Computer scientists think about better syntax for computer languages. (I don't think that this is actually a better syntax, especially given the already-established conventions. But thinking about array indexing as a function call is, in my view, an interesting take.)

Software engineers, on the other hand, worry about how to efficiently write non-trivial programs. For that problem, this change doesn't move the needle whatsoever.

Most non-junior programmers think more like software engineers than like computer scientists. And even many who think like computer scientists can see the forest, not just the trees.

jsjolen · 5 years ago
I've never seen a computer scientist put a lot of effort into syntax. The POPL people are more interested in type systems and semantics than they are in syntax.
jsjolen commented on Language Design: Use [ ] instead of < > for Generics   soc.me/languages/stop-usi... · Posted by u/signa11
aloknnikhil · 5 years ago
Right. The difference being the "."

The article proposes using basic function call syntax. That makes no sense to me. And with .(), you now have 3 characters to type instead of 2 with []. Obviously all of this is pedantic, but then again so is the article.

jsjolen · 5 years ago
All of what the author said is what Scala does (author likes Scala).

I've written a decent amount of Scala, it's fine.

I've also written a lot of Common Lisp, where array access is done using aref. That was also fine.

jsjolen commented on Vim rendered on a cube for no reason   github.com/oakes/vim_cube... · Posted by u/ohjeez
jsjolen · 5 years ago
Now we just need to render Emacs onto a tesseract.

u/jsjolen

KarmaCake day146December 3, 2016View Original