Live data from Hacker News

The Web Is Becoming Smalltalk

zacharyvoase.com

31–40 of 112 posts

Re: The Web Is Becoming Smalltalk

#31

So you want your live editing beeing persistent? What about testing? I think you should first write a test that fails before attempting to fix it...

Writing a test that fails is a subset of what you can do. Pharo (and other Smalltalks) support writing traditional test cases and running them in a test runner. However you can also:

  - write snippets in a workspace, as vincie mentioned.  
  - write code against an API that doesn't exist, run it, have it fail, and then fill in the API and implementation.  
  - write stubs that fail automatically, and then fill them out (similar to above).
The difference is, when things fail:

  - you get to play with the live objects in a work space.  
  - fill in missing implementation.  
  - fix any errors.
And then much of the time continue execution from the point of failure. No need to restart anything. I simply could not appreciate the variety of options available in a Smalltalk environment until I used it for some fun projects over a few months.

Be warned, you might hate your so called modern environments once you get back to them. For Objective-C coders there is hope: http://injectionforxcode.com

Re: The Web Is Becoming Smalltalk

#32
> Now that conventions are moving towards ‘single-page’ web apps, the concept of a ‘page’ is losing its special meaning.

The web is so broken. The whole "web app" concept is just a giant hack.

The job of us web developers today consists in employing a never ending pile of hacks (e.g. AJAX, long-pooling, semi-broken languages and implementations, non-standard vendor APIs) to fight a browser into submission so it can be used to run a general application instead of simply navigating hypertext, it's original purpose. All that because there's incentive in keeping users inside walled gardens and holding a ransom on their data.

It's unbelievable we take as granted reinventing the wheel over and over again, dealing with weak standards and APIs designed by committee, fighting browsers into rendering interfaces and invoking the right callbacks.

I would rather take a web based on open APIs and rich clients (running native code) than the kludges we have today. The trend around mobile apps and some very successful native apps on the Mac App Store that consume web services seems to me as a best-of-two-worlds approach.

> I have a hunch that WebDAV combined with standard HTTP authentication could be the answer. I’m not 100% sure on it, but I can easily envision a world where you fix bugs in your website by opening it up in a browser, reading a stack trace, fixing the JS in that same browser and persisting your changes back to the server. > I dream of the days when the Web truly does resemble SmallTalk.

This would be more like a world with 5 different SmallTalk implementations, each slightly different, and all with a crappy/non-existant standard library and security model.

Re: The Web Is Becoming Smalltalk

#33
While a lot of the comments here are focussing on other aspects of the article, I think the most basic actionable takeaway is we need a simple method of persisting changes made in Firebug/Developer Tools to the code. Once mentioned, it seems like a no brainer - why doesn't this already exist?

Re: The Web Is Becoming Smalltalk

#34
post #11

This kind of hot-swapping can be achieved on quite a few languages; certainly Perl and Ruby in addition to JS, and I'm sure there's a dozen more languages that allow you to redefine at runtime. The difference is that Smalltalk made hot-editing the default. SmallTalk is an uncommon language these days, with the exception of its half-descendant, Objective-C. Ruby borrows Smalltalk's OO semantics pretty much completely.…

Small rant ahead. You have been warned.

My favorite system that supports hot-swapping is Linux.

It works with every language, there is an excellent scheduler, processes are protected from each other, there are all kinds of interprocess communication techniques available, you can choose between files and databases for persistence.

I think the lame workflows people have while working within a conventional OS are a failure of imagination and a lack of understanding about how operating systems work. In particular, I suspect that a lot of people overestimate the cost of exec and IPC. Or, for example, do you really appreciate the fact that the operating system keeps file system data in RAM even if you exit the program and start up another one accessing the same file a microsecond later? Image-based persistence is not necessary for responsiveness.

Use exec(), use a database, create the editors that make you productive. I've used Lisp and Smalltalk and I've created a miniature VM/OS running in the browser with processes and persistence and all that. These days I'm more excited about old fashioned Unix techniques.

Re: The Web Is Becoming Smalltalk

#35
>I’m not 100% sure on it, but I can easily envision a world where you fix bugs in your website by opening it up in a browser, reading a stack trace, fixing the JS in that same browser and persisting your changes back to the server.

Where does version control fit in this vision?

Re: The Web Is Becoming Smalltalk

#36

Chris Granger's Light Table is also trying to do it. Of course, Bret Victor's talk breathed new life into this whole thing. But everything old is new again. People want to build software from a small kernel that scaffolds itself. They want to immediately switch between "testing the app" mode and "building the app" mode. They want something more than a text file, a tool pipeline, and an executable at the other end. On…

Add me to the list of people dedicating themselves to trying something in this very area.

I don't exactly know what I'm creating yet (maybe there aren't terms for it yet), because I change things as I go and it's not done yet. But the current vision is a sustainable automation platform, where you can add/change/build/do anything (because it's open source) with what you're working with. So you can create yourself a "testing the app" button and "building the app" button, and that will become something that's available to you. Actually, I'm trying to make it so that those buttons will be automatically available for you as you naturally do the things you'd normally do, but I haven't gotten to this part yet. (Oh, and perhaps instead of buttons you have to press, new output can simply appear on your screen right away.)

In short, my vision agrees very much with what you're saying, but I still have a lot of work to make my project a viable building tool, and it is happening very slowly indeed.

Re: The Web Is Becoming Smalltalk

#37
post #23

I can't believe that the fact that Chrome can hot-swap code is surprising to anyone... Have you never been working on an app, opened up the console, changed a variable or function definition and seen the effect in real time?

I'm with you on that. It's the surprising the number of web developers who are just now finding out about this which leads me to another questions, what tools do they use if not Chrome Developer tools?

Re: The Web Is Becoming Smalltalk

#38
I recently tried out the binary at squeak.org. It was recommended to me when I described to some people what I'm trying to create (a system for building software using which you can improve itself).

It was very neat, and so easy to try out. You essentially download it, run it, and it's like a mini-operating system running. You can inspect the system itself and make changes, and then save/load these images. Basically what the article described. There are definitely some very good ideas there. Unfortunately, it wasn't easy for me to figure out how to write some simple programs that print stuff to standard output, and I couldn't really find any samples online. It really makes me appreciate golang.org's Hello World sample right on the front page.

Re: The Web Is Becoming Smalltalk

#39

Chris Granger's Light Table is also trying to do it. Of course, Bret Victor's talk breathed new life into this whole thing. But everything old is new again. People want to build software from a small kernel that scaffolds itself. They want to immediately switch between "testing the app" mode and "building the app" mode. They want something more than a text file, a tool pipeline, and an executable at the other end. On…

Its not the same. Light Table and Bret's demos go way beyond what Smalltalk ever did. Its not just about hot swapping, but liveness, and the Smalltalk community never got that [1]. But it doesn't stop them from saying they've already done it because they don't understand what they are seeing, and thinking is hard. [1] John Maloney got it with Morphic, and even coins the term Liveness at about the same time Tanimoto d…

I don't quite understand this distinction between liveness and hotswapping, as all the examples of liveness that I've seen involve hotswapping code that causes graphic or audio side effects, and clearly that sort of thing has very real practical limitations.

Re: The Web Is Becoming Smalltalk

#40
post #37
post #23

I can't believe that the fact that Chrome can hot-swap code is surprising to anyone... Have you never been working on an app, opened up the console, changed a variable or function definition and seen the effect in real time?

I'm with you on that. It's the surprising the number of web developers who are just now finding out about this which leads me to another questions, what tools do they use if not Chrome Developer tools?

I imagine a text editor, terminal, browser, and a lot of Alt/Cmd+Tab, F5/Cmd+R, Ctrl+C+up+enter. But I can't say for sure.
Post reply on HN