3,476 karma · joined April 10, 2007
This doesn't sound very compassionate to engineers leaving big, dysfunctional companies (which by the way preach the exact same ethos of personal responsibility). Basically, they are damaged goods who aren't expected to thrive in a better environment?
Some pretty hilarious and/or thought-provoking headlines! LSTMs capture so much about the input (compared to N-grams, say), it can be almost eerie.
Here's hoping for a world where Graal.js is released as open source and runs on an official JDK release! Then we can do all sorts of wizard magic with JS in the cloud, without running actual Node. I tell myself it could be any year now. I forget whether JDK 9 supports Graal and what the latest release date for 9 is; it's changed so many times. I know there was some indication that Graal.js would eventually be open-sourced, but that may have been taken back.
If anyone knows anything, I'd love an update.
The way to think about a situation like that is in terms of having boundaries, not about ego. Don't take abuse. You don't need a witty comeback. Or, it will come when you stop thinking you need to tolerate abuse.
The part about talking with your partner about what works for you in sex is lovely.
So do you have first-class support for video as well as images? It seems like to have fun with video editing in Luna, you'd need to have built-in support for videos an inputs and outputs, and have a way to play the video output on the screen, and maybe scrub through it, and at a minimum be able to run shaders on the "current frame" and export the resulting video out. The next level after that would be being able to load multiple frames into memory at the same time, and being able to do a combination of "offline" and "online" processing with some CPU involvement (e.g. calculating a motion track and storing it, or applying a filter that can't be expressed as a pure shader program).
I don't know enough about Luna yet to know what code to do these things would "look" like on the visual side, or come to think of it where the computation is being performed (in the browser?). Much more to learn, but the project looks great, a sort of "holy grail" in a way.
Every time you use an HTML input tag, you are using an abstraction over state, and the first time you need access to the input element's cursor and selection, you realize you've been pretending the element had less state than it had, which is a pretty useful thing to do.
If I can write a form component that needs an "editor for a string" component, specified as a type, and fill that need with a "fancy editor for a string" component that has a more elaborate model that I can abstract away, then I think we're in business, but I can't quite picture how that would work.
As someone who grew up on the Java VM and started my start-up/web career on it, I've always felt like Java programmers have a different relationship with threads than C programmers. Java gives you cross-platform, usable, debuggable native threads; it basically makes them free if you want them. In C/C++, on the other hand, threads are a library, and using them is a grungy affair. If you grew up on Rails, meanwhile, threads don't exist ("when you say worker thread, do you mean worker process? I'm confused").
Node.js was created by C programmers and launched with a lot of anti-thread propaganda, much like the link. They equated threads with shared state, and also said threads were too memory inefficient to be practical for a high-performance server (they meant that holding a native thread for every open connection would require too much stack space, which is true, but that's not what they said).
I immediately had a bunch more questions, some of which I tried to answer by playing around with the demo.
Is "this" the actual DOM element? (Yes.) Then how is "context inheritance" implemented? The section named "How Cell implements 'context inheritance' does not ever say how it's implemented ;) (Getters and setters are set up by the framework.) It feels like inheriting everything would be a little messy compared to specifying what goes in context.
Does changing something in "context" trigger updates in nested components that read that context? Apparently, no.
Does assigning to $components always give you brand-new components, or is there any sort of diff/patch as in React? Apparently, always new components and new DOM nodes, so don't recalculate your children; you should probably access them via the DOM API and call methods on them instead. So you don't get "props flowing down" as in React.
How are assignments to underscored props coalesced, e.g. using what notion of equality? What should you call props that you don't want to cause an $update?
Why is it ok to call methods on other cells from $update, causing further updates, when this is frowned on in React, partly because of timing issues? I sort of wonder if making state changes synchronous is a huge win and solves a lot of issues; a lot of people are wondering if React makes a big mistake there. At the same time, it seems like there would be situations where you update underscored properties on A and B, and A is actually an ancestor of B, so updating A would destroy B. Then you wonder if the framework is going to be smart about the update order, and smart about dealing with defunct components during the update cycle. Edit: That's not even a good example of a timing issue caused by cascading updates. Can't think of a good one off the top of my head.
Also edit: I haven't read the code, but it looks really short.
Having worked on sophisticated React apps, I've come to understand the benefits and shortcomings of its architecture.
One insight is that properly encapsulating UI components and their behaviors leads directly and naturally to nested state machines. React is cleanest if you have one state machine, or N independent global state machines, that drive your app. Once you start trying to compose state machines to make a sophisticated UI, you end up in setState/callback hell, and then you try the Redux/Elm model, in which states are composed to make bigger states. I think it's fruitful to experiment with ways of composing state machines in which you don't just glue the states together, but you let the machines interact. Of course you still want to keep your program easy to reason about and avoid spaghetti, but I'm sure there are interesting patterns lurking there.
Another issue is components in React aren't supposed to address each other. You can easily call methods on your children using refs, though this is discouraged and interacts badly with the update cycle and higher-order components. Components not talking directly to each other is a great feature right up until it's not, such as when you have to deal with focus and selection changes. You're forced to contemplate taking what you thought of as pure UI state -- local to a component and tied to that component's lifecycle -- and moving it outside of React into a store whose structure parallels the component tree (which in turn parallels the DOM), just so that you can traverse it in a reasonable fashion and update it synchronously while DOM updates remain asynchronous. In Cell.js, these three trees become one.
It seems like if the quicksort of a list L is defined as equal to the concatenation of 1) the quicksort of the subsequence of L consisting of items less than the pivot item, 2) (the list containing) the pivot item, and 3) the quicksort of the subsequence of L consisting of items greater than the pivot, then we can prove properties like "any two items of the resulting list are in sorted order" by case analysis on whether each item is part of (1), (2), or (3).
Maybe you would interpret "the quicksort of L is defined as..." to mean "if you're in state quicksort(L), you can proceed to state the-concatenation-of"? If we're working in the realm of mathematics, don't we get definitions, equations, and inductive proofs for free, without making a state machine do it?
Edit: Reading more, I guess I'm just doing the sorting inside the "next-state relation" of a state machine, so it's done in one state transition, and saying you could look at quicksort as one way to factor the relation, which by math is equivalent to other ways to factor the relation that resemble other sorting algorithms.
An entire program may have no observable state, like a command-line tool that reads stdin and writes stdout with no particular timing. It does have state inside it, of course, but only because it's running on a giant state machine. We can fully describe its behavior without making reference to any internal states, using functions or relations to talk about the relationship between its input and its output.
> I would say that the main difference between TLA+ and the functional approaches, is that in TLA+ you reason purely mathematically, while in the functional approaches you reason within a (complex) programming language.
This statement puzzles me, because we have great math for reasoning about pure functions (mappings). We have lambda calculus and category theory. You don't need a state machine to prove QuickSort works in a purely mathematical way, either, just statements about the equivalence of functions. The recursion can be handled using the fixed point operator and the algebraic laws it obeys.
Edit: In fairness, existing "functional approaches" to specification do seem complex and look like programming languages.
I came across an old comment of yours (https://news.ycombinator.com/item?id=11835178) that seemed to support the idea that FP and TLA+ have strengths for different kinds of programs, depending on whether they are more transformative or more reactive. I'm just as happy if learning more about TLA+ turns my idea of this on its head, though!
One thought I didn't see expressed, in all the comparisons of tools and approaches, is that sometimes you don't care about time and state. In purely "transformational" programs, like compilers, for example, all state is incidental complexity, so we can analyze them as pure functions. Meanwhile, all the questions such as whether we can just execute the spec and whether we can prove properties of real programs remain. New web frameworks are trying to keep the parts that deal with time and state as small and self-contained as possible, leaving the rest to be described using functions.
Couldn't we say that the factor of "do you care about time" is behind observations such as that TLA+ is mostly popular with concurrent and distributed systems, or that approaches that only look at function contracts often apply to pieces of a program but not the whole? As a more specific statement than, for example, that distributed systems are particularly hard so they necessitate particularly powerful tools.
How sad to convince ourselves not to matter to ourselves by saying look, I don't matter to the universe, so how could I possibly matter? Does anything matter to the universe? If not, it's probably not the best entity to look to to figure out what matters. If the universe does care about something, who says it doesn't care about you, just because it's big and you're small in comparison?
Prepack reminds me more of a "supercompiler," because it focuses on partial evaluation rather than optimization.
Here's one way to look at it. If you accept the claim, "My conscious experiences exist, non-physically," which seems true, you can reason to some interesting places from there. For example, it would be pretty weird if you were the only "conscious" person in the world, surrounded by zombies who only appear to have an inner life, so we can say that all brains have consciousness. Then, you can keep delicately applying Occam's razor to say that what we call consciousness could be just one manifestation of a more basic phenomenon, which fills a metaphysical explanatory void.
Even if we don't accept the claim, and we say consciousness doesn't really exist and we are merely projecting its existence, we could still discover new phenomena that seem just as real to us as the illusion of consciousness, despite not being clearly connected to physical laws. Maybe pretending that it's possible to have a "direct experience" of something can reveal that everyday consciousness is just one kind of direct experiencing.
Babies often don't have tears for the first few months, but I'm not sure that's important. I do think they play a role on the playground, and a lot of the speculation about their effects in social situations sounds right. I don't have any ideas to contribute on why crying is accompanied by tears.
In any other species, wearing a signal that advertises, "I recently lost in a dominance challenge," is a strict liability — an invitation for others to pile on, opportunistically, and attack you while you're down (or else to mentally note that you're no longer a good, strong ally). There's no upside, therefore, to using anything other than a quick facial expression or flash of body language, to show your submission only to the aggressor.
That sounds like an overly harsh picture of non-humans to me! I'm pretty sure at least certain apes help their potentially-non-kin in distress. Humans aren't the only social mammals.
As a semi-anxious person, I've found it is useful to deconstruct this stuff.
In the advice context of the article, the goal is (for an arbitrary person) to be successful and liked by an audience (whether the TED audience, or an audience of employees, or an audience of TV viewers, or in front of friends and acquaintances). In that context, I'd say being authentic doesn't make you likable, but if you can be authentic while simultaneously being likable, people love that.
Brutal honesty, which is a different thing, will not win you friends. No one likes the person who says, "What? I was just being honest!" Social interactions are transactional and layered with meaning. "I want to have sex with you right now" is not merely a random act of stating a fact, and neither is a personal criticism (e.g. "you're ugly"). An exec who asks her employees for emotional support is making an ask that may not be comfortable.
My advice is to learn to be more authentic (with fewer self-inhibiting inner dictates), for your own personal reasons, and simultaneously to learn how to better relate to other people.