Live data from Hacker News

The Web Is Becoming Smalltalk

zacharyvoase.com

91–100 of 112 posts

Re: The Web Is Becoming Smalltalk

#91
post #86

Earlier quoted context omitted.

> I would rather take a web based on open APIs and rich clients (running native code) than the kludges we have today. But that exists. It's called native programs, which are free to access web API's and whatnot just as much as any browser is. The whole point of the web is you don't have to download software, you don't have to store your data locally. Sure, it's a pain to support the quirks of different browsers and s…

Sure, you don't have to download software. On the other hand, the platforms we /do/ download software onto (in real time) are disgusting. (I wrote PHP for the first time last week. Oh. My. God. Why does this crap exist? WHY IN GOD'S NAME (yes I am shouting) DO WE PUT UP WITH THIS UNBELIEVABLY MISERABLE CRAPFEST WE CALL MODERN WEB DEVELOPMENT!?) Um . . . breathe. I don't have any answers today that don't involve burni…

PHP has nothing to do with the browser (i.e. the "platform you download software into"). If you don't like programming in PHP, then pick a different server side language instead. Even JavaScript can mostly be avoided, if you want, by using one of the higher level languages that compiles down to JavaScript.

Re: The Web Is Becoming Smalltalk

#92
An editor that might no be too well known in the web world, Unity3D's editor, has an awesome way to edit code on the fly. Public variables are represented as generalized form controls like sliders and dropdowns. Very nice for the later phases of development. Tweaking the timing and speed of an animation or the effects of some physics float can be a pain without being able to change on the fly. I wish the web tools had a similar setup.

http://docs.unity3d.com/Documentation/ScriptReference/Editor...

Re: The Web Is Becoming Smalltalk

#93
post #81
post #64

Earlier quoted context omitted.

"A giant hack" is your name for evolved technology, as opposed to designed technology. Of course, there's nothing truly "evolved" in software and nothing designed that didn't evolve, it's just two ends of an axis measuring a weird think like "control and unitary vision". An extreme of "evolved" technology are things like the browsers and PHP - the templating language that was never intended to be a programming langua…

I think there is a distinction between a platform's authors adding more functionality and the platform's users abusing existing functionality to make it do something it was never meant to. I would define the former as evolved and the latter as a hack. Web technology seems to have developed from a little of each. People were using iframes to do HTTP requests so XMLHttpRequest was added to IE, People were using long po…

I don't like the distinction because for a software whose developers respond to what the users are doing, after every hackish new way the users find to (ab)use it, the developers come and add things that make it easier to do the things done by "hacks" (but at the same time they also need to keep the hacks working). And if the "users" of a software like the browsers are actually developers, it's obvious that they are not going to expect for features to be properly implemented, they will just (ab)used whatever half-assed features they can find.

...in my view, if you can clearly see "the distinction" between authors adding functionality and users abusing existing functionality for new purposes, it means that one party is clearly moving too slow: either the "users" are too slow to discover new ways to adopt and (ab)use the new software or the developers are working to slow and the users-developers need to do too many ugly hacks because the features they need take too long to be released and standardized (unfortunately the current state of web-development seems closer to this state of affairs).

But there are possible solutions: I think things like standardization could be accelerated by having "tzars" in all committees (people that can just choose by themselves how some things over which they have authority get to work without needing a consensus or to justify to others why they choose one way) - I'm using the word "tzar" as in Haskell's "syntax tzar", the guy who could just choose what syntax a certain language feature needs and end the discussion right there because nobody had the right to contradict him [1] (I consider H's design-by-committee the only example where a committee did something mostly right and I wish similar "committees" would work on things like CSS and new ECMAScript versions...). But again, if standards evolve too fast, implementors will have to play catch-up and end-up with half-done implementations, which today happens even for sloth-slow evolving things like CSS.

...but of course, the real "root of all evil" is the backwards compatibility requirement, but we can't get away from this.

...and I know, some people will want to burn me at stake for screaming the "we're not going fast enough" heresy about web tech :)

[1] http://my.safaribooksonline.com/book/software-engineering-an...

Re: The Web Is Becoming Smalltalk

#94
post #29

I felt this way when I first saw better_errors: https://github.com/charliesome/better_errors It's a little surprising how much we keep reinventing.

Stuff like that has been in Python for a long time. (Werkzeug)

That sounds like a clone of Rack, that doesn't support the latest version of Python.

Re: The Web Is Becoming Smalltalk

#95
post #78

Earlier quoted context omitted.

You might be fighting a battle that's already lost. For most people, live programming is having a running system with a REPL or equivalent attached so that you can run & update code inside that system. For example a running web server with some mechanism to add a new request handler while the server is running. Or a program that's playing programmatic music or some kind of graphical demonstration where you can add an…

> You might be fighting a battle that's already lost. REPLs and interactive programming existed long before the "live programming" experience was defined (by Hancock), and I only use the term to describe what Bret was showing off in his IoP talk as well as the experience the Light Table people seem to be striving for. I might be a bit pedantic, but there are plenty of other terms to describe the older less live exper…

> Whereas "live coding" is about some programmer coding "live" in front of an audience, live programming is about receiving continuous comprehensible feedback about your program edits in the context of a running program. Quite a huge difference in meaning with very different goals!

Yes that's what I mean! A tiny difference in the terms we use: live coding vs live programming. That's why it's confusing to people.

> Why should we back off and invent yet another new term to describe the new experience whose original term was hijacked to descirbe old experiences because people couldn't understand the new one? Crazy!

Sometimes you have to cut your losses ;-) Another reason why I dislike the term "live programming" is because it confuses two separate concepts: continuous feedback and rich feedback. Conventional debugging is pressing a button to run your code and see what the result is. Instead of just displaying the result, you could display the entire execution trace (time traveling debuggers). You could write unit tests and display which passed and which failed. You could output some visualization of some data structure in the program. For a game you could output a series of frames overlaid on each other (like Bret Victor does). Then you have type checking, for numerical code sensitivity to floating point bit width, performance profiling, etc. This is all about giving different kinds of feedback. Continuous feedback is about getting feedback without having to press a button. Classical live programming is running the program continuously and continuously displaying its output. This is the continuous feedback version of ordinary debugging. Automated background unit test runners are the continuous version of unit testing. In the same way you have a continuous version of the other debugging techniques. Both continuous feedback and rich feedback are very valuable, and although they are stronger together they are separate concepts. Perhaps it would be a good idea to have separate words for them, that would certainly greatly clarify "live programming".

> but you can always "record" the input event history of your program and re-exec the entire program on a code change; i.e. there is an inefficient baseline. You still have problems with causality between program output and input; e.g. consider the user clicking a button that no longer exists or moved!

Yes, this is robust to internal data structure changes but no longer robust to UI changes. Viewing a program as a series of event stream transformers and time varying values as in FRP may help a bit. At the lowest level you have a stream of mouse clicks on pixel (x,y) and keyboard events with keycode k. Then the UI toolkit transforms that stream of events to event streams on UI elements: click on button "delete", text input to textfield "email address". Then that gets transformed to logical operations and data: delete_address_book_entry(...) and email_address. Then that gets transformed to the complete time varying high level state of the entire program (address_book_database). You can try to transport the state on each of the different levels, but in the end I think a completely automated solution is impossible. You are going to need domain specific info on how to do schema migration in the general case. For live programming that may not be worth it because you can just start over with a fresh state, but for things like web site databases you don't want to lose data so you have to manually migrate. [tangent: Currently there are a lot of ad-hoc solutions to this e.g. never remove an attribute from your data model, and when you add new attributes make sure all code works even if that attribute is missing. Reddit even goes so far as to structure its entire database as "key,attribute,value" triples instead of using a structured schema so that the schema never needs to change, but of course this just moves the problem from the database into the code that talks to the database. A principled approach where you write an explicit function to migrate your data from schema version n to schema version n+1 would work better. That migration function takes the entire state/database with schema n as input and produces an entire new state/database with schema n+1. When the state/database is large this would take too long to do it in one pass, but with laziness that can be done on-demand.]

You don't need to limit yourself to running one instance of the program. You could record multiple input sequences representing multiple testing scenarios, and display the results of running each of them, or even display each of them being continuously performed so that you can see all the steps in between. In any case as you say there is lots of work still to be done.

Re: The Web Is Becoming Smalltalk

#97
post #91
post #86

Earlier quoted context omitted.

Sure, you don't have to download software. On the other hand, the platforms we /do/ download software onto (in real time) are disgusting. (I wrote PHP for the first time last week. Oh. My. God. Why does this crap exist? WHY IN GOD'S NAME (yes I am shouting) DO WE PUT UP WITH THIS UNBELIEVABLY MISERABLE CRAPFEST WE CALL MODERN WEB DEVELOPMENT!?) Um . . . breathe. I don't have any answers today that don't involve burni…

PHP has nothing to do with the browser (i.e. the "platform you download software into"). If you don't like programming in PHP, then pick a different server side language instead. Even JavaScript can mostly be avoided, if you want, by using one of the higher level languages that compiles down to JavaScript.

My objections don't start (or end) with PHP. Browsers are terrible platforms, and the protocols we have to deal with are likewise terrible (ever written an HTTP proxy? Oh boy).

Re: The Web Is Becoming Smalltalk

#98

Earlier quoted context omitted.

> I fail to see how web apps are a hack at all. (...) Sure, they're not the "original purpose" of the web, but they work awfully well for things like GMail, GDocs, GMaps, etc. Well, you realize all the products you mention were only possible because someone figured out a hack (XMLHttpRequest), and now everybody relies on something that wasn't thought out in any shape or form? Can you see how fragile is the software s…

Arguments about the hacky-ness and fragility of web apps are always extremely silly. Unix was also a hack. C was also a hack. Windows 95 was also a hack. Windows NT had better design, but with hacks bolted on to make it compatible with Win 9X. Java was a hack. Linux was a hack. The Internet itself is the biggest hack of all. In fact I dare you to name one successful platform that wasn't a hack. Because from where I'm…

On the Windows 95 "hack": http://yuhongbao.blogspot.ca/2012/12/about-ms-os2-20-fiasco-...

Re: The Web Is Becoming Smalltalk

#99
post #95

Earlier quoted context omitted.

> You might be fighting a battle that's already lost. REPLs and interactive programming existed long before the "live programming" experience was defined (by Hancock), and I only use the term to describe what Bret was showing off in his IoP talk as well as the experience the Light Table people seem to be striving for. I might be a bit pedantic, but there are plenty of other terms to describe the older less live exper…

> Whereas "live coding" is about some programmer coding "live" in front of an audience, live programming is about receiving continuous comprehensible feedback about your program edits in the context of a running program. Quite a huge difference in meaning with very different goals! Yes that's what I mean! A tiny difference in the terms we use: live coding vs live programming . That's why it's confusing to people. > W…

> Sometimes you have to cut your losses ;-) Another reason why I dislike the term "live programming" is because it confuses two separate concepts: continuous feedback and rich feedback.

Again if we go back to Hancock's thesis, it's all there! It's not just about continuous feedback, it's about feedback with respect to a steady frame, it's about feedback that is relevant to your programming taks, it's about feedback that is comprehensible. Hancock got it right the first time, there is no classical live programming (though there were other forms of liveness before). Actually, this is something I didn't get myself in my 2007 paper.

I don't think I need to abondon my word, especially since the standard bearer are Bret's demos; people want "that", not some sort of vaguely defined Smalltalk hot swapping experience. The community I'm fighting for the word is small and insignificant vs. the Bret fans :).

As for the rest of your post, explicit state migration is a big deal for deployment hot swapping (Erlang?) but ultimately a nuance during a debugging session. A "best" effort with reset as a back up is more usable.

But maybe take a look at our UIST déjà Vu paper [1]: here the input is defined as a recorded video that undergoes Kinect processing, and we are primarily interested in the intermediate output frames, not just the last one. So the primary problems are one of visualization, while we ignore the hard problem of memoization and just replay the whole program. We even have the possibility to manage multiple input streams and switch between them.

Kinect programs are good examples of extremely stateful programs with well defined inputs. One of the next problems I'm trying to solve is how to memoize between the frames of such programs to make the feedback more lively.

[1] http://research.microsoft.com/apps/pubs/default.aspx?id=1793...

Re: The Web Is Becoming Smalltalk

#100
post #95

Earlier quoted context omitted.

> Whereas "live coding" is about some programmer coding "live" in front of an audience, live programming is about receiving continuous comprehensible feedback about your program edits in the context of a running program. Quite a huge difference in meaning with very different goals! Yes that's what I mean! A tiny difference in the terms we use: live coding vs live programming . That's why it's confusing to people. > W…

> Sometimes you have to cut your losses ;-) Another reason why I dislike the term "live programming" is because it confuses two separate concepts: continuous feedback and rich feedback. Again if we go back to Hancock's thesis, it's all there! It's not just about continuous feedback, it's about feedback with respect to a steady frame, it's about feedback that is relevant to your programming taks, it's about feedback t…

> Again if we go back to Hancock's thesis, it's all there!

Yes, the problem is not with the definition of the term, but with the term "live programming" itself! It is too vague and can apply to too many concepts, and hence we're seeing people use it and interpret it for many different concepts. Nobody will go read a thesis to learn what a term means. But then again "object oriented programming" is vague as well. The notion of "steady frame" does seem oddly domain specific. In the words of that thesis: water hosing your way towards the correct floating point cutoff value or towards the value of a parameter in a formula that produces an aesthetically pleasing result works great, but I'm not convinced that you can "water hose" your way to a correct sorting algorithm for example. Perhaps I have misunderstood what he meant though.

> A "best" effort with reset as a back up is more usable.

Yeah, I agree. I think the same primitives that can be used for building good explicit state migration tools, like saving the entire state and recording input sequences or recording and replaying higher level internal program events, can also be used for building good custom live programming experiences. So they are not two entirely disjoint problems.

> But maybe take a look at our UIST déjà Vu paper [1]

That's very interesting and looks like an area where live programming can work particularly well! A meta toolkit for building such domain specific live programming environments may be very useful if live programming is to take off in the mainstream. Of course LightTable is trying to do some of that, but while it started out in a quite exciting way they seem to be going back to being a traditional editor more and more (albeit extensible).

> One of the next problems I'm trying to solve is how to memoize between the frames of such programs to make the feedback more lively.

Probably you've seen that already, but have you looked at self adjusting computation? http://www.umut-acar.org/self-adjusting-computation

Post reply on HN