Better HN
topnewbestaskshowjobs
Log inSign up

xtrapolate

529 karma · joined Jan 2, 2018 (8y ago) · 142 submissions

Submissions

comment 8y ago · link · parent

You're free to do as you please here. You don't have to use malloc()/free(), just implement your own LIBRARY_Alloc()/LIBRARY_Free()/LIBRARY_GetMemorySizeBytes() :)

comment 8y ago · link · parent

I appreciate the insights, and respect OP's point of view, but some of these "takes" are extremely dichotomous.

> "Microsoft - I don’t know that there’s much about their culture or current business that’s particularly admirable."

Really? Absolutely nothing at all about Microsoft's culture/business practices is "particularly admirable" to OP?

comment 8y ago · link · parent

Blocking the whole country is an interesting move, mostly because it has the potential to generate a much greater public outcry than simply masking away the few specific books in question, putting a greater public pressure to reevaluate the entire legal constructs surrounding these issues. It's a display of standing for your principles without compromise.

comment 8y ago · link · parent

As a business person, you're going to have to sell yourself/your services to other people. Perhaps that's not too different from pitching yourself to an "anonymous promotions committee"?

Interesting and insightful read. Thanks for sharing, and good luck with your future endeavours!

comment 8y ago · link · parent

Sure, you can call your "ex-coworkers at Microsoft" (most of which are irrelevant to debugging/verifying this issue) - or, you can just spend some time reading the documentation, as previously suggested.

The coherency issues are your "tread lightly" warning. The docs regarding FlushViewOfFile expand on this specific issue:

Flushing a range of a mapped view initiates writing of dirty pages within that range to the disk. Dirty pages are those whose contents have changed since the file view was mapped. The FlushViewOfFile function does not flush the file metadata, and it does not wait to return until the changes are flushed from the underlying hardware disk cache and physically written to disk. To flush all the dirty pages plus the metadata for the file and ensure that they are physically written to disk, call FlushViewOfFile and then call the FlushFileBuffers function.

So, after carefully reading this documentation, we can clearly conclude OP's pull-request is actually missing a call to FlushViewOfFile prior to calling FlushFileBuffers.

comment 8y ago · link · parent

Answer is: "none of the above".

Coherency is covered by the WinAPI documentation (check the remarks section). Always RTFM.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...

comment 8y ago · link · parent

  Twitter was twitter before they had all those people.
Sure, but it can't scale without them. How exactly is Twitter supposed to pay the bills? People use this platform because, for the most part, the basic premise is entirely free. How else can they fund the infrastructure/R&D costs?

comment 8y ago · link · parent

People make mistakes, "punishment" isn't the way forward here. There are alternatives out there to Intel, but kindly remember that other chip makers also released hardware that is susceptible. Also, you can trust this won't be the last time issues such as this come up.

comment 8y ago · link · parent

This same logic can literally be applied to anyone working on anything. Engineers, carpenters, pilots, literally anyone.

I bet there are many people who know everything about "XMLHttpRequest", but know nothing about congestion control. Or how a network stack comes together...

You do realize "XMLHttpRequest" wasn't even a thing until several years ago, and it's safe to assume further down the road it may well be phased out (in favor of better/more secure APIs).

Instead of asking about "XMLHttpRequest", wouldn't it be better to talk about the general need for "websites" to communicate with a backend on demand, at runtime, after everything has been loaded and rendered? Or, put "XMLHttpRequest" on the table, and talk about how one would implement such an API within the context of a browser?

comment 8y ago · link · parent

When I'm thinking about bloated web frameworks and inefficient libraries, I often come back to memories of 64k demos released by groups such as Farbrausch. Here's what they've pulled off in 2000: https://www.youtube.com/watch?v=Y3n3c_8Nn2Y - as somewhat of a "contrast", jQuery alone (3.0.0-alpha1, minified) weighs 84522 bytes.

Use (what you deem as) the right tool for the job. As to how we've got to where we are today, there are lots of reasons - but personally, I feel it's pointless to constantly talk about it. Whether things are more complex than they used to be is up for debate, it's entirely subjective.

It's natural for things to evolve given the rising popularity and increased demands - but they evolve organically. People flock to frameworks because there's abstraction, and the "dirty work" has been offloaded to a third-party. This saves people time and effort. It's a bet - frameworks come and go, maintainers disappear; that's just the nature of it.

comment 8y ago · link · parent

If your clients trust the self-signed certificates (by updating their certificate stores, adding up a self-signed root CA), then, as of today, as far as I'm aware there won't be any warnings. No guarantees that this situation won't change further down the road.

comment 8y ago · link · parent

  Now how the hell do we create a webserver that will work reliably for the next 30 years if we have to embed SSL certificates with built-in expiration dates in the range of 1 to 3 years?
You can use self-signed certificates. Your clients will have to trust them (by updating their stores). That's hardly an ideal solution (deployment and security wise).

More broadly speaking, you can't rely on anything to stay the same in 30 years, in terms of infrastructure. Many companies therefore deliver both the devices themselves, as-well as the systems to control them (ie. custom laptops/tablets). More costly for everyone involved.

comment 8y ago · link · parent

The doctor example is great, but where do we draw the line exactly? Offloading some aspects of your work by utilising other people and their expertise is surely the way to go, but there's a balance to be kept. Sticking to your example, good secretaries (much like good engineers) are expensive, and are hard to come by - isn't that enough to explain why public health services skimp on those?

You could argue that in an ideal world/society, everyone would just do those few specific things they're really good at/love, and nothing else.

comment 8y ago · link · parent

  In a modern office there are no specialist typists; we all need to be able to pick our way around a keyboard. PowerPoint has made amateur slide designers of everyone. Once a slide would be produced by a professional, because no one else had the necessary equipment or training. Now anyone can have a go — and they do.
I'm struggling to follow. Putting your thoughts down on a piece of paper is something we all need to be able to do. Do people waste time doing it? Sure, some people will waste some time. A myriad of reasons to it. Boredom, clumsiness, a strong need to let out your creative sides, just to name a few.

Perhaps this entire piece comes down to being more aware of the things that distract you. The side quests that often start small, but end up consuming large portions of your time.

  In a modern office there are no specialist typists
Sure, in a modern office you won't come across many such people (amongst other esoteric examples). But there's a counter argument here - forcefully introducing additional bureaucracy by proxies is just as hurtful, if not more.

comment 8y ago · link · parent

  I have been working on Snow, a unit testing library for C.
OP requires a unit testing library for C, so they've written one. What is the alternative solution you propose? The framework itself may appear complex, but the entire end goal here is to provide simple/abstract tools to write tests in a readable/self-documenting manner. The framework itself is the mean, not the end goal.

comment 8y ago · link · parent

Decoupling code/infrastructure is not a bad practice. As it so often turns out to be, "Microservices"/"Monoliths" mean different things to different people, and your mileage may vary. Difficulties may be introduced going either way.

Choosing the right tool for the job is difficult, there are many variables at play. There's a lot of value to people sharing their perspectives/experience about these issues. At the same time, I think the overall discussion shouldn't be so dichotomous.

comment 8y ago · link · parent

  Meltdown and Spectre have opened up new hacking threats, sparked class actions, and enraged longtime partners.
At this point in time, it is known that Intel isn't the only vendor producing hardware susceptible to Meltdown and Spectre, which is another of saying AMD is in the same boat. Given this fact, I'm struggling to understand why Intel is being continuously singled out.

Meltdown and Spectre aren't the first, won't be the last. I personally feel that a more interesting discussion should take place: how to prepare/plan-for/deal-with similar issues further down the road. One particular thought that comes to mind is that this industry lacks an effective recall mechanism.

comment 8y ago · link · parent

Are you suggesting that the change is too slow/not drastic enough? Or perhaps that a change isn't taking place at-all in the first place, that it's all just hot air?

comment 8y ago · link · parent

  Precise control over memory layout and allocation which can translate into massive performance gains of several orders of magnitude.
"Can translate" is not "translates to". Performance gains can be achieved when executing an efficient instruction set over a performant VM. Are you arguing that the JVM falls short as opposed to a browser in that regard?

Also, with most operating systems, physical memory is abstracted from user-mode processes entirely. Kernel-mode is a different story, but I fail to see how a browser/WASM in user-mode do better than a JVM in user-mode in that regard.

  LLVM IR is unstable and low level.
Interesting. What makes an instruction set "stable"? Is this about being backwards/forward compatible? About being encoded/decoded efficiently?

What about the actual APIs exposed by the browser to WASM? Are those considered "stable"? Browsers today "break" all the time - inconsistencies between minors of the same browser, let alone different browser vendors.

comment 8y ago · link · parent

  It feels like solving traffic mortality by pasting a "drive carefully"-sticker inside the windshield
Wouldn't a better analogy here be to "solve traffic mortality" by considerably reducing your exposure to dangerous situations (as in, driving less)?

There's a demand for meat, hence an industry working to supply (and profit-off-of) it. Encouraging people to eat less meat is making a difference.

comment 8y ago · link · parent

Appreciate your insights. I don't really have an answer to your question. I respect the popularity factor, I just can't help but think that we've had (and still currently have) competing technologies which are far more mature and capable. Not saying WASM won't end up on top in the future. There are plenty of applications today that build on parallelisation, synchronisation primitives, IO, IPC... all of which are already perfectly possible today over the JRE/JVM (as an example), but the same can't be said about browsers today (no doubt that with enough work, it can all change sometime in the future). Just feels like reinventing the wheel.

comment 8y ago · link · parent

Having some random thoughts about the comments here, some of which talk about having a "browser" drive large parts of what we consider today an "operating system". I agree that certain aspects of what most modern operating systems do today can be abstracted away behind a unified, convenient (and perhaps browser-accessible) API. The entire user-experience stack comes to mind immediately, but there are counter examples as-well. The answer to non-unified execution environments (as in different operating systems and architectures) was the rise of high-level, interpreted languages (in addition to corresponding VMs), and runtime environments which exposed a platform-independent set of APIs. We've been exploring the possibilities of implementing bytecode VMs in hardware (https://en.wikipedia.org/wiki/Java_processor), or running a managed code operating system (Microsoft's Midori) for a while now, so the concept itself isn't particularly new. What is WASM's advantage over, say, Java's bytecode? Did we really have to go through so many hoops (reinvent another instruction set and a VM that can execute it across multiple platforms)? Why wasn't an existing technology re-used here to achieve the same/similar goals?
12345