HNHacker News
TopNewBestAskShowJobs

AlexAltea

539 karma · joined July 9, 2014

Security, reversing, mathematics.

Writing emulators and hypervisors.

Alexandro Sanchez <alexandro@phi.nz> https://phi.nz/

submissionscomments
AlexAltea··on GNU lightning: generates assembly language code at run-time
Might not be the reason, but six registers make it trivial to write a backend for 32-bit x86 CPUs, since they offer 8 general-purpose registers minus 2 typically used for stack pointer and base (ESP, EBP respectively). That leaves 6 registers usable by compilers: EAX, EDX, ECX, EBX, ESI, EDI.

To my knowledge, any other architecture targeted by GNU lightning offers more registers, so this magic number is effectively the largest number of registers one can offer where register allocation would become trivial for all architectures.

AlexAltea··on Android Ported to RISC-V
Related: https://www.cnet.com/news/chip-designer-arm-ditches-huawei-b...

Unsurprisingly, this has been done by Alibaba-owned T-Head Semiconductor. The obvious result if Chinese vendors start facing obstacles to obtain licenses to manufacture ARM-based chips (or any other non-Chinese architecture).

How can anyone expect that software/hardware-bans to global superpowers can result in anything but their software/hardware-independence in the long run?

AlexAltea··on Being good at coding competitions correlates negatively with job performance
Correlations don't have to "work" as they don't imply causality. Orange Tsai is indeed quite talented at both competitions and research (but it would prove as little as my own anecdotes).

If I'm biased, it might be because I defined the "cybersecurity industry" too broadly, not too narrowly: One can acquire certain skills from competing in CTFs/competitions, e.g. hard skills related to reverse engineering and vulnerability research... but I believe in most cases further skills are additionally needed to succeed in the industry, e.g. software engineering, and softer skills such as communication, planning and negotiation (useful for other jobs as well).

Overly optimizing skills to win CTFs while neglecting other matters can be harmful, like badly assigned character points in an RPG. :-)

AlexAltea··on Being good at coding competitions correlates negatively with job performance
Anecdotal, but I have noticed a similar correlation between achievements in Capture The Flag (CTF) competitions and performance in the cybersecurity industry. As some people have pointed out, this effect appears when observing just people within the field, not the general population.

Disclaimer: I don't have any data to back this up.

AlexAltea··on Web Neural Network API
I don't think the WebNN API is trying to solve this problem, are they? Skimming through the specification, WebNN provides a way of describing the topology of a neural network, and compile+run it on different hardware (DSP, NPU, GPU, etc). However, the parameters of the network (which are by far the largest part) have still to be provided.
AlexAltea··on Web Neural Network API
Thank you, I didn't know that! It feels scary to see that all these NN APIs are appearing around the fact that we cannot talk to DSPs, NPUs, GPUs, CPUs under a same language. By creating such highly-specialized APIs it feels like "giving up" on ever accomplishing that.

Decades ago, compiler developers solved dealing with multiple CPU architectures, by creating languages that succinctly expresses their common traits: Doing arithmetical-logical operations and accessing memory. Languages like C abstracted us from CPU registers, stacks. Optimization passes like vectorization abstracted us from different ISA extensions.

Now it feels it's the same issue all over again. Is it really hard to simply express: `x' = W*x + b` and let the compiler target the CPU/GPU/NPU as needed?

AlexAltea··on Web Neural Network API
Why making this a Web API, rather than a library? We have WebAssembly threads which allows high-performance multi-threaded CPU code and WebGPU for general purpose GPU code.

Please correct me if I'm mistaken (not a ML expert): On top of these existing APIs, we can build efficient neural networks. Of course, we wouldn't be able to use specialized hardware such as Google's TPU or Graphcore's IPU, but I doubt there's a use-case for those in web.

Is there any non-GPU/CPU based consumer hardware aimed at fast neural networks that I'm missing?

EDIT: Seems "NPU"s have been slowly arriving for the past 2 years to iOS/Android-based devices... Maybe there's a raison d'être for the WebNN API after all.

AlexAltea··on The unending quest to explain consciousness
That makes sense. But thinking about OP's analogy, the information of a simulated trajectory of a rocket to the moon would also need to be delivered through a 2D monitor with finite resolution/framerate.

Simulations will always be as good as our computing power gets, and the results will be "understood" as good as our perception gets. So, in some sense, both scenarios are the same.

AlexAltea··on W3C recommends WebAssembly
JavaScript is often delivered minified without the corresponding original sources. If preventing reverse engineering is a goal, it could even be obfuscated, which certain sites already do.

In practice, there's nothing that WebAssembly offers that could hinder analysis even further. If websites want to be transparent they could provide the sources (akin to providing unminified/unobfuscated JavaScript).

AlexAltea··on The unending quest to explain consciousness
> But we can’t predict what new color we’d get by mixing two colors.

Can you elaborate more on this point? Links as to why this is impossible would be appreciated. If paint absorbs certain wavelengths while reflecting others (which are the perceived color), wouldn't the mixture of two colors absorb two subsets of the spectrum, and reflect everything else? And if so, why can't it be simulated?

AlexAltea··on Currency is popular again, especially the $100 bill
> 50$ bills are frowned on in retail

Where would that be? On every trip to the US I have exchanged cash, EUR to USD, resulting in mostly $100 bills which I've used everywhere, sometimes even for rather small purchases, and there's been no frown upon that (after few purchases I also get my hands on smaller bills which are also more convenient).

AlexAltea··on Germany in Uproar as Negative Rates Threaten Saving Obsession
> One can keep his own money as he wants, including under the mattress.

If only it was that easy. With several governments regulating against cash, e.g. banning cash transactions above a certain amount, and limiting withdrawing/depositing cash in bank accounts, can we really say we have right of property (of money at least)? It seems yet another right to throw under the bus for the sake of mitigating "money laundering" and "terrorism".

AlexAltea··on Soil Erosion: Why soil is disappearing from farms
This was literally unreadable for me on Firefox. It insists on me rotating my phone (?), even though I'm viewing it on a desktop computer.

The entire article is blocked behind that "rotating device" icon. Really terrible job.

AlexAltea··on Why Investigators Fear the Two Boeing 737s Crashed for Similar Reasons
The apparent difference in steepness arises from different scaling in both altitude ("typical flight" reaches almost 12 km, while "test flight" reaches almost 6 km) and time (the 5 minute intervals are twice as large in the "typical flight" graph).

The actual time to reach 6 km was around 6.5 minutes in the "typical flight" and around 5 minutes in the "test flight", as can be seen by scaling both graphs to the same proportions. (I've done it quickly with Paint here: https://i.imgur.com/IZyYoCl.png)

Is that 1.5 minute difference really that high? Honest question, I really don't know anything about this topic.

EDIT: Sorry, this should have been a reply to @rkagerer's comment.

AlexAltea··on Scientists are looking for ways to put the simulation hypothesis to the test
Maybe I worded it wrongly, sorry. I didn't mean "why does it matter?" as if people shouldn't care about those questions. It was rather a rhetorical question, to show that the "simulation" might not depend on anything "outside the simulation", so the questions would simply make no sense.

Then again, this was just one of many variants of the simulation hypothesis, just something unfalsifiable that shouldn't be taken too seriously. :-)

AlexAltea··on Scientists are looking for ways to put the simulation hypothesis to the test
Whenever the simulation hypothesis comes up, there's always the questions like: Who is simulating us? Where is the power coming from? What happens if they pull the plug?

But why would any of that matter? In the end it's just a blob of data, modified by some algorithm with every tick. That's not much different than computing 2+2=4. Does it matter whose computer calculated that? Will the answer be different if they pull the plug? None of that matters: maybe multiple beings are simulating the exact same universe, or maybe none of them are. Why would anything need to be computed "physically" to make the simulation happen?

This take on the simulation hypothesis is the main plot point of "Permutation City" by Greg Egan, which to this day, is (IMHO) the most reasonable variant of the hypothesis I have read.

AlexAltea··on Android Emulator – AMD Processor and Hyper-V Support
Yes, that's exactly what I was looking for! I might overlooked it last time I checked around May (was that documented at that time?). Thanks a lot for pointing it out. :-)
AlexAltea··on Android Emulator – AMD Processor and Hyper-V Support
> I just want to point out that you are free to use your own, more complete or faster instruction emulator with WHP.

True. This is an unimportant rant on my side, since it would be nice to have a complete emulator out-of-the-box. But it's true it can be solved in userspace (EDIT: now I wonder how could we inject exceptions back into the guest, should they occur during emulation in userspace).

> I'm curious what you mean about no guest debugging support.

This would allow the host to introduce software/hardware breakpoints and single-stepping through the guest. This is extremely relevant to debug bootloaders/microkernels, or in my case, closed-source kernels that do not support debugging. Some hypervisors, e.g. KVM (and soon HAXM), support this: check "KVM_DEBUG_GUEST" at https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt

> Also curious about the other shortcomings so that we can prioritize appropriately.

The API provides no way to add/override/hook arbitrary MSRs while handling guests's rdmsr/wrmsr instructions, or override CPUID leaves/subleaves. This is required to run certain kernels are designed to run in specific x86 processors. Of course, most hypervisors lack this feature and I understand that WHPX is fairly recent so I'm not complaining about the lack of it. My issue is rather that closed-source implementations are not helpful for researchers since shortcomings like these means the whole library is no longer usable for us. Comparatively adding such features to (say) KVM or HAXM takes just few hours.

Also, don't get me wrong. I feel it's incredibly valuable having finally an API allowing developers benefit from Hyper-V in userland. I'm just concerned about the current trend of hypervisor APIs, as every vendor eventually just ships a closed hypervisor library for its own platform, and developers have to put up with 5 different ways of doing the same thing.

(PS: I've invested quite some time on HAXM, but I'm not affiliated with Intel in any way)

AlexAltea··on Android Emulator – AMD Processor and Hyper-V Support
Microsoft's WHPX is closed source: we are stuck with an incomplete instruction emulator, no guest debugging support and other shortcomings. All of this locked to a single host OS. Same thing goes for Apple's HVF. Each vendor seems to care only about their own software and hardware.

I'm afraid that the ecosystem of hypervisor APIs are going the same way as with graphics APIs, e.g. thanks to Direct3D and Metal. I believe we should disregard such APIs in favor of cross-platform open alternatives such as Intel's HAXM: Support for Linux and AMD SVM is planned on my side, as it serves as basis for my PS4 LLE emulator.

AlexAltea··on The controversy over child killing among Amazon tribes in Brazil
Killing a child, or any conscious being willing to live, cannot be compared to terminating a pregnancy at a point where the embryo is just a blob of cells with no global survival instinct and consciousness whatsoever (just basic biochemistry-powered defensive reactions at cellular level).

It's ridiculous making such mental gymnastics to stretch this article in order to blame "the West".

AlexAltea··on Latex-mimosis: A minimal and modern template for your thesis
For the record, another simple and elegant LaTeX template for thesis is: http://cleanthesis.der-ric.de/
AlexAltea··on Yuzu – Nintendo Switch Emulator
Yuzu is fork from an existing emulator for the Nintendo 3DS written by essentially the same developers: https://citra-emu.org/
AlexAltea··on Bitcoin conf stopped taking Bitcoin payments because they don't work well enough
I used https://www.abitsky.com/ and if BTC fees decreased I would use them again without hesitation.
AlexAltea··on Bitcoin conf stopped taking Bitcoin payments because they don't work well enough
Essentially because every HN post concerning cryptocurrencies has become a joke, and long threads of cryptofanatics and cryptosceptics throwing shit at each other. No one is willing to just have rational conversation on the points they agree/disagree with, but instead write attacks like: "Hahahahaha this is hilarious, where are all the bitcoin {fanatics,sceptics} now" that don't contribute to the discussion at all. You will always get downvoted by one of the sides. Personally, I would downvote you if I could for adding yet another stick to the bonfire.

To be honest, this looks like a quarrel between baboons that have invested too much, and baboons that have shorted too much. I've never ever seen HN in such a state and hope to not see it.

AlexAltea··on Bitcoin conf stopped taking Bitcoin payments because they don't work well enough
> Nobody is using bitcoin for buying coffee or sending micropayments to websites.

I was, I've spent more Bitcoins than traditional currencies on buying actual products during last year (electronics, games, hotels, flight tickets, etc.). That ended, 1 months ago when fees rose to a point limit that made such relatively small operations inviable.

That said, I still hope for new cryptocurrencies to provide a solution to scalability issues. Maybe https://failsafe.network/ or maybe something else.

AlexAltea··on Wi-Fi startup Eero lays off 30 employees
Somewhat offtopic but:

> Eero [...] has laid off 20 percent of its workforce (about 30 employees), TechCrunch has learned. Eero confirmed about 30 employees were let go but declined to comment on its total workforce size.

Since the workforce size can be inferred from this information (specifically, Eero seems to have gone from 150 to 120 employees approximately). Am I missing something, or why do they say Eero declined to comment on the workforce size? How did TechCrunch learn that those 30 employees represented 20% of the company workforce?

AlexAltea··on Design of a silicon quantum computer chip
There are several misconceptions about what universal quantum computers could do. One of them is talking about exponential increase of computing power with each new qubit. It just doesn't work like that. This brief talk from Scott Aaronson tackles this issue quite well: https://www.youtube.com/watch?v=JvIbrDR1G_c

While quantum computers threaten some cryptographic schemes, it will just be the end of those schemes, not the end of cryptography in general (see: post-quantum cryptography). As long as we still have problems that are hard to compute and easy to verify, we can have cryptocurrencies. Quantum computers do not give "unlimited computing power" and do not threaten the existence of cryptocurrencies in general.

AlexAltea··on It Looks Like Nobel Economics Laureates Don't Like Bitcoin
Bitcoin would be circulating way more if more services and online stores, e.g. Amazon, PayPal, simply accepted it as just another currency. Rejecting it as payment method because it's not circulating is just circular logic.

I have been spending plenty of mBTC in the stores (shopping, flights, hotels) that accept it such as Overstock, Abitsky, Destinia, etc. and my experience there has been way more comfortable than shopping with credit cards or even Paypal.

AlexAltea··on MicroPython running “bare metal” in the browser via unicorn.js
If you are interested, here's the emulator they use: https://alexaltea.github.io/unicorn.js/
AlexAltea··on A history of the two-day weekend
> Priests and nuns work weekends, have done for centuries. Cops, food service, health care providers, prisons and the entertainment industry to name a few.

While such jobs require indeed people working on weekends, it doesn't mean that the workers themselves need to be present 7 days a week. It's possible to uniformly distribute 2 free days per week among workers and still guaranteeing 24/7 service.

> Those that lament its passing as some sort of societal shift show thier colours.

Not sure what "their colours" mean. Why should we lower our expectations to the lowest working conditions? Instead, why don't we all aspire to redistributing our working ours to ensure a fair share of free time.

← PreviousPage 3 of 4Next →