HN user

ingenter

601 karma
Posts3
Comments98
View on HN

Would it be better if GPU drivers could compile open-spec bytecode and upload the result to the GPU to do all of the computation? This way OpenGL may be used as a library, shipped with the application.

React Draft Wysiwyg 10 years ago

To be fair "React Draft Wysiwyg" is using contenteditable too, but it also builds a full model of the document.

React Draft Wysiwyg 10 years ago

I just came here to write that I think this is THE right approach for wysiwyg editor. Having a full model of the document tree rather and working from that rather than sanitizing `contenteditable`. I expect this approach to automatically solve many problems that other wysiwyg editors have.

No, light is not different. If you want to adjust for "red/blue shift", you may use special relativity, and in special relativity you have the conservation of 4-momentum, which will give you the same result.

What is it that super intelligence is supposed to be able to do that cannot otherwise be done?

Find patterns a human would never be able to. Find winning strategies we could not predict. Building models that don't fit a human brain.

An example would be recent AlphaGo matches: AlphaGo wins. We don't know how it wins, we can't predict it's strategy, we just know it wins.

From what I see, the only thing that can help with post-mortem debugging is changing the promise so that it doesn't catch the exception when calling the initialiser or handler. You can still do whatever you could with Promises (but you have to do `Promise.reject(...)` or `reject(...)` instead of `throw ...`), but it's not going to conform with the standard. Many libraries are probably going to break if you drop-in a Promise implemented this way.

Edit: I didn't explain why this change is important: if the Promise is catching the exception, the Execution Context where exception was thrown is lost and (potentially) irrecoverable, the program has to crash there and now if you want to debug the reason for the exception. This is a property of the Promise standard, changes to debugging tools or environment won't help. You could make Node aware of promises, and capture the execution context with promise exception, but I don't think Promises are special enough.

Your prelude and the followup question is not well-formed.

Thank you for your feedback, I appreciate it.

C++ programmers do not have a bias against GC as a specific problem-solving technique. Expert C++ programmers can embrace GC

Please watch this portion of the video, and the way the speaker is pronouncing the word "collect":

https://www.youtube.com/watch?v=JfmTagWcqoE#t=1h5m25s

Regarding general-purpose GC:

I don't support using GC for everything. If there is a problem that can only be solved with GC, it doesn't mean that we should express our entire running programs in terms of dynamic cyclic graphs. I believe we can do much better, with much fewer resources.

No program language I am aware of (and I don't claim to know all) are good at saying "GC this 5%, I'll explicitly handle everything else"

I haven't used rust in production, but I think it allows you to do precisely this, using the following crate: https://github.com/Manishearth/rust-gc.

Of course, there is an argument that just GCing everything is as efficient as bothering with manual memory management

I specifically said that it should be possible to mix GC with other types of memory management.

The problem is that I often hear from C++ crowd "GC is bad, mmkay!", without mentioning that there are specific cases where you have to use/implement GC.

Do you understand that the linked article, and the talk referenced in the article describe a way to implement garbage collection as a solution to (memory management for) data structures with cycles?

Do you think that this problem is not equivalent to "how do I allow my dog to make a 'press this button for fart sound' app?"?

Do you have a better solution to reclaiming data structures with cyclic pointers?

I recently watched Herb Sutter's talk "Leak-Freedom in C++", described in the article [1], and I can't help but notice that C++ community has a strong bias against garbage collection. ... And then he describes the very problem you can't solve without GC: memory management for graphs with cycles. Solving this problem is equivalent to implementing GC. Of course, having your own specialized GC may help, but you may also benefit from your own memory allocation.

Why can't you acknowledge that there are problems that have GC as the only and best solution?

(Note: it's possible to mix memory management approaches, e.g only pointers to graph nodes are being garbage collected and everything else has a nice hierarchical ownership.)

[1] https://www.youtube.com/watch?v=JfmTagWcqoE

Because there is always a way to extract the "protected" work. See: https://en.wikipedia.org/wiki/Analog_hole.

If you're a photographer, I can always make a screenshot, or record the video from my HDMI/DVI cable to the monitor or take a very precise photo of my screen, and I WILL get the photo from your website or app.

There is plenty of evidence that DRM doesn't stop copying: millions of torrents ripped from crunchyroll/hulu/netflix/Blu-Rays, all of those have some sort of DRM, all of them were circumvented. There are people who think that DRM is not designed to stop copying, but it's designed to control how legitimate users consume your product (see: DVD ads).

Edit: Please don't assume that this is the only argument I have, it's just the most obvious argument from the top of my head. There are plenty of people who explain the negative sides of DRM and reasons it doesn't solve the problem you described. They do it in a very eloquent way with rigorous arguments, and I don't believe that I need to repeat those arguments. I'd like you to listen to Cory Doctorow: https://www.youtube.com/watch?v=HUEvRyemKSg

DNS-over-HTTPS 10 years ago

- It has happened, see the comment below (openresolve).

- It doesn't solve the problem, unlike other existing solutions for encrypting DNS.

- It adds unnecessarily high overhead.

There is a significant difference between self-driving cars in 1960, flying cars and self-driving cars today.

Flying cars are doable, and there are several prototypes of a flying car. However, flying cars aren't safe and aren't cost-effective.

Self-driving cars in 1960 require a significant infrastructure to operate, and can't operate with human drivers. (Edit: Not to mention they don't exist)

Self-driving cars today work, and are cost-effective, and it's likely that they will be safer and create a much better traffic ecosystem than humans ever will.

If you're going to use magsails to slow it down, why not use a magsail to get it there? The trip is basically symmetrical.

If you launch a strong magnet in interstellar space, it will slow down relatively to plasma by deflecting charged particles.

In order to speed up, you need to spend energy.

The symmetry is broken between accelerating and slowing down relatively to interstellar plasma (Edit: or solar wind).

Steam in Docker 10 years ago

I'm running steam in a systemd container, the main issues were sound and notifications: I don't understand how pulseaudio works, so I had to give share some system directories with the guest system to get the sound working. Notifications were solved by sharing dbus. GPU was shared by sharing a single directory in /dev with correct persmissions

There is theoretical pure black in any modern representation of color. If the term confuses you, you can replaces it with #000000. If the black vs red comparison still confuses you, you can replace it with #600000 vs #FF0000. You might also want to address my actual argument, instead of irrelevant technicalities.

So you're using a numeric representation of colors (RGB) to prove to me that black is darker than red.

By doing this, you're basically proving my point.

1) different people may have different opinions on "obvious" statements

2) the simpler the statement is, the easier it is to accept or reject it

If you give me two color plates, one is black, and one is red, I might find people who disagree which one is darker.

But if you give me photo measurements, I will say that one is objectively darker with respect to a specific metric (e.g. visible photon energy flux, YCbCr luminosity, CIECAM02 luminosity).

I believe you're mistaken. There is value in axioms and axiomatic proofs: two different people will most definitively have a different notion of "obvious", and even have a different understanding of a mathematical problem. So a proof may be accepted by one person and rejected by another.

Given a set of axioms and proofs it's possible to mechanically check a proof. It's not quite possible to reliably check proofs otherwise.

No need for ternaries!

    Array.from(Array(100).keys()).map(k => k + 1).map(i => [i,'Fizz','Buzz','FizzBuzz'][!(i%3)+2*!(i%5)])

This reminds me of my multiple attempts in writing a declarative scrapper framework. In the end, I've chosen to just write the code.

What I see is a crappy ad-hoc scripting language. I feel bad saying so, but I can only view this project as a bad solution to whatever problem you have.

You could have chosen to send actual code, be it JavaScript, Python, Java or even Linux binaries, executed with limited privileges. How would that look like? AWS Lambda.