Who can apply for a loan Payday loans 100 or even up to

Snap! Build Your Own Blocks

September 17th, 2012

Snap!This has been a most amazing year.

As part of UC Berkeley’s FRABJOUS.CS project Snap development has won an NSF grant. Brian and I have been redesigning and reimplementing BYOB from the ground up, and renamed the new application Snap. The idea is to make Snap more accessible to school and college audiences by letting it run in the web browser, and by significantly speeding it up while at the same time preserving the brilliant Scratch 1.4 look and feel and extending BYOB’s additions to it.

We have been extremely fortunate in being supported by fantastic advisors, including some of my all-time CS heroes like John MaloneyDan IngallsMitch Resnick and Mark Guzdial. A personal highlight for me was having been invited to spend a few days together with Alan Kay and his group in L.A. discussing big ideas and exchanging different approaches to them. Alan had gathered many of the original PARC gang and most of the later Squeak team for this, and months later I’m still humbled and digesting all the provocative perspectives that came up there.

I’m also very pleased by our progress and by the results so far. At the moment of writing this (mid-September 2012) the current

 Snap! 4.0 alpha version

already supports most of Scratch’s and BYOB’s features:

  • Browser based. Snap! runs in any contemporary browser without needing to install any software or browser-plugin. Enjoy it on your iPad!
  • Speed. Snap! is up to 11 times faster than BYOB 3.
  • Build Your Own Blocks. Create custom commands, reporters and predicates for any category anywhere in the palette. Like variables, the scope of your custom blocks can be sprite-local or global “for all sprites”.
  • Drag-and-Drop. Import any resource (picture, sound, sprite, project, blocks-module) simply by dragging it from your desktop and dropping it onto Snap! Create scripts simply by dragging and dropping blocks. Run any script or block simply by clicking on it.
  • Tail-call optimized evaluator. Implement recursive loops and execute them forever without running out of memory.
  • Full closures. (Anonymous) First-class procedures (lambda) and fully closurized local variables let you extend the language with your own higher order functions and arbitrary control structures, and even implement a dispatch-procedure style OOP system on top. Build your own C-shaped, E-shaped and and even multi-C slotted blocks.
  • Temporary variables and formal parameters, lexically scoped.
  • First-class continuations let you implement even fancier control structures, such as CATCH-THROW for non-local exit.
  • First-class lists for arbitrary data structures. Snap’s lists now sport a hybrid architecture, allowing their usage both as dynamic arrays and as linked lists for recursive constant-time operations.
  • Variadic inputs. Use the right-arrow to expand many input slots.
  • Snap!shots. State-persistent projects. Smalltalk-style image based programming.
  • Modularity. Export and share projects, sprites and block-modules as XML, costume graphics and pictures of scripts.
  • Morphic. Snap! uses its own Squeak-like GUI system for the best lively user experience. Switch to development mode to look under Snap’s hood, inspect it and deconstruct it!
  • Pause. Presss the pause button to suspend a running a project and inspect it’s state. Press it again to resume execution.
  • Threads, events, atomicity control etc.

Part of what lets me enjoy working on Snap! so much is building it all from Scratch. Today most software isn’t really written, but merged out of more or less pre-fabricated templates and industrial frameworks along with some manual configurations and “glue code”. It’s such a blast to be able (and allowed) to instead design and code a real system using nothing but a programming language (JavaScript) and the web browser. More projects should be like this, it’s all about making Beauty and Joy of Computing intrinsic!

This summer, the charismatic Dan Garcia and my Snap colleague and co-developer Brian Harvey have been tirelessly traveling all over the U.S. (and just about all over the rest of the world) teaching teachers the Beauty and Joy of Computing, and gradually shifting from BYOB to the new Snap along the way. Again, so far the results have been very encouraging.

It really has been an exceptional year for me and for Snap. I am now working full-time on Snap, and grateful to my employer MioSoft for generously supporting this effort. There is also exciting development in the pipeline, such as taking Snap! to the Cloud.

Stay tuned!
-Jens Mönig

BYOB 3.1 - Prototypal Inheritance for Scratch

May 30th, 2011

sicpDo you believe in OOP? Sometimes object oriented programming seems to boil down to a religious faith, even to the point where any indication of failure gets countered by dogmas about real OOP, and how just this isn’t. One such dogma holds that a program must incarnate the trinity of inheritance, polymorphism and encapsulation to qualify as real OOP.

Scratch is about controlling sprites with blocks. Since user interaction with both is quasi-physical, regarding them as objects isn’t all that far fetched to begin with.

Except, you can do funny things with computer objects that defy the laws of the physical world. Like, having the same object be present at a dozen different locations all at once through variables. Or like cloning stuff. These things aren’t rocket science, they’re plain old magic. Rather useful, too. In fact, if it weren’t for magic why bother with computers at all?

Still, magic is kinda hard getting used to for novices. I suspect that’s the reason why  Scratch doesn’t support such preternatural phenomena out the box. first class blocks? Nope. Storing sprites in variables? Not in Scratch. Propagate a costume change to all clones? Negative.

Scratch also is about walls. Sure, they’re “wide”, the threshold is “low” and the ceiling is “high”. But remember, the difference between a palace and a prison cell is merely a matter of perspective, if the design is to keep you inside. Magic this isn’t.

A few days ago Brian Harvey and I released BYOB 3.1, adding first-class sprites, a generalized object interface and prototypal inheritance. Plenty of new magic to play with.

Enjoy!
–Jens Mönig

morphic.js - Morphic for JavaScript

January 5th, 2011

morphic.js - Morphic for JavaScriptDid I mention that I love Morphic?

I am infatuated with touch screen apps and Minority Report like user interfaces. Just imagine how this could change the craft of programming itself! Make scripting more fun and accessible, turn it into an activity that can be carried out anywhere and everywhere. Ubiquitous casual programming. Wouldn’t that be a blast?

A year ago I ported Morphic to Python and PyGame, then I was busy with finishing BYOB 3.0 in time for UC Berkeley’s new CS10 pilot course. At last summer’s Scratch Conference Brian Harvey and I were discussing ways for Scratch/BYOB to run directly in a web browser with our friends at the MIT MediaLab, and Brian Silverman suggested we take a look at JavaScript, which he claimed was a lot like “Scheme in a browser”. John Maloney and the MIT Scratch developers are currently porting Scratch to Flash, and there is also a very cool Scratch-like IDE called DesignBlocksJS written entirely in JavaScript by Evelyn Eastmond. On the last day of the conference John and I wound up wondering whether with all the recent advances in browser technology it would be possible to bypass the browser DOM and CSS and do it all in a single Canvas element instead.

I started out by looking at Dan Ingalls’ Lively Kernel, which, of course, being based on SVG instead of Canvas is not only unspeakably elegant but also the “Gold Standard” in this field. Probably the Lively Kernel offers all that I would ever need or want, but mainly out of wishing to learn JavaScript in the first place I decided to try another JavaScript / HTML5 / Canvas implementation of Morphic myself, even if I might eventually end up throwing it away. Morphic.js began as a more or less direct port of my previous Python implementation, and I refined it and made it more complete along the way, being able to use some parts of the Squeak implementation as well. All the time John Maloney supported me with advice, encouragement and enthusiasm, making my second pass at Morphic even more fun than last year’s.

The result is a limited but solid and (I think) snazzy little JavaScript library that turns HTML canvas elements into veritable Morphic worlds right in the browser. It’s a far cry from the Lively Kernel or from current Squeak, but simple enough to get your head around, not unlike the Morphic that’s found in Scratch’s Squeak image. And that’s really what morphic.js is all about: To become a framework for future experimental versions of Elements and BYOB, perhaps even for a General Purpose Blocks Language (GPBL). Ubiquitous casual programming, yeah!

I am releasing morphic.js as free and open software under an MIT license. You can

All the documentation needed to start creating your own Morphic browser projects is embedded in the morphic.js file, including sample HTML code for

To round it off, in case your browser or text editor cannot display JavaScript correctly, I’m also posting the

as a separate text file.

Enjoy!

-Jens Mönig

P.S. Thanks for all the comments and the many individual e-mails in response to this blog post! I’m sorry for having to turn off comments altogether because of all the spam. The web is becoming an increasingly #?=!-up place for original content. You can still e-mail me until I’ll be signing off completely and revert to longhand again :-(

First Class Procedures for Scratch

May 10th, 2010

Lambda-GoboScratch is a fantastic first programming language. And afterwards kids go on to study C and Java, right? Think again.

Is Scratch’s brilliance really all about programming? Can the Scratch experience be reduced to events, threads, conditionals, loops and variables? What about expressing ideas, imagining activities and reflecting results? What about researching, discussing and remixing? Participating? I love Scratch, because it makes such abstract concepts come to life. To me, Scratch’s biggest gift is that it lets kids create. And share. Produce. Plus, Scratch is intrinsically fun and gratifying. But it’s not easy. Let me repeat that slowly: Scratch. is. *not*. easy. Ever tried to impress someone with an interactive presentation? Ever had to invent your own user interface framework? These things are hard. Resources have to be organized, goals must be evaluated, steps need to be carefully layed out. The Latin word is programmare. Programming. Programming helps organizing hard stuff.

Or does it? How often did silly syntax get in your way, did enigmatic grammar force detours on you? I also love Scratch because it liberates programming from this sort of bigheadedness. Scratch lets kids focus on the hard stuff without imposing silly rituals. More programming languages should be like this.

Why not stay with Scratch?

Until now Scratch had a hard ceiling. You could do amazing projects with Scratch, but you would bump into that ceiling soon enough. It doesn’t have to be this way. Last summer two Berkeley CS instructors (Brian Harvey and Dan Garcia) asked me for a version of my experimental BYOB software which they could use in a new undergraduate pilot course named “The Beauty and Joy of Computing”. As that course unfolded, Brian Harvey (easily one of the world’s best programming teachers), involved me in a discussion about first class procedures. Together we began experimenting with enhancing BYOB little by little, and by late fall we suddenly realized that we were inventing a new graphical programming language. Only we weren’t. It’s still Scratch. We just added less than a dozen new blocks, re-wired some things under Scratch’s hood and tweaked the GUI a little. What’s more, we didn’t even invent these new blocks ourselves, we took them from the Scheme dialect of the LISP programming language.

But see for yourself what it lets Scratch do now:

byob.berkeley.edu


BYOB 2.99 is an alpha test version for the new BYOB 3, which is scheduled for release this August.

Highlights:

  • new Reference Manual with lots of examples and tutorials by Brian
  • Tools library of higher-order-functions (also by Brian)
  • lambda, including full closures (anonymous custom blocks)
  • anonymous dynamic lists
  • lists of lists
  • global and local procedures
  • SICP style OOP
  • state-persistent projects, Smalltalk-style image based programming

plus all the goodies of previous versions:

  • custom blocks “build your own blocks” (from v.1)
  • sprite aggregation “nested sprites” (from v.2)
  • inspect the underlying primitive code in the Elements visualisation
  • share projects as windows .exe
  • open or import any Scratch project/sprite

Enjoy!

-Jens Mönig

Morphic for Python

February 8th, 2010

Morphic for PythonI love Morphic. Contrary to many I believe Morphic is what sets Squeak apart from any other programming environment. It’s cool that Squeak is based on Smalltalk, but it’s Morphic that makes it great!

I’ve long since wanted to try building a blocks-based programming environment for Python. So I started by implementing a small Morphic port. It’s very basic and straightforward, doesn’t use any of Python’s advanced features, and implements only the barest of Morphic’s: It’s a simple, single-world, single-hand environment with just the minimum GUI-elements to start building something more complex. It’s also unfinished, because in the meantime I have been sort of pulled back into developing BYOB further (hang on for more).

What’s unique about Morphic? Three things:

  1. It’s a programming language independent mechanism for  modelling concurrency. You don’t have to use native threads and processes in order to create lively, interactive applications. Just look at Scratch!
  2. It doesn’t use any OS-native widgets. You get to do what you really want, not what some industry standard thinks is cool. Again, take a look at Scratch!
  3. It’s easily portable.  Okay, this is really the essence of the first two points: Because you neither use Smalltalk processes nor Smalltalk’s dependent-update mechanism, nor any OS-specific widgets, your application can easily be ported to both any other programming language as well as any other OS.

On the technical side, my little Morphic implementation uses the - awesome - PyGame library for primitives. To get an impression, please feel free to download the module morphic.py, and run it with Python 3.1.1 and PyGame 1.9.1. I’m aware that it looks and feels a lot like Squeak, it’s supposed to be that way :-).

You’re invited to use and modify / complete it any way you wish!

-Jens Mönig

Nestable Sprites for Scratch

August 30th, 2009

NestingBYOB 2.0 is here for you to download. I’m surprised and a bit scared about the enthusiastic reception of the my little build-your-own-block experiment for Scratch. I never intended BYOB to be actually used in highschool classrooms and university courses in different parts of the world.

It also feels wonderful! I have been getting excellent suggestions from very bright people, and the idea to gradually distill class-like constructs out of Scratch and turn BYOB into a CS intro environment has got me hooked (and slightly overwhelmed, too).

So I decided to share only those experiments I feel confident about, even if the whole of them doesn’t yet go all the way towards that starry goal. In BYOB 2.0 I resisted the urge to add new blocks, focusing instead on improving the experience to let you create your own ones, and on introducing compositional object relationships to Scratch. Still, please expect to encounter many bugs.

What’s new in BYOB 2.0:

custom blocks (functional recursion)

  • now have all Scratch 1.4 features (esp. string functions)
  • can open / import any Scratch project (also older ones)
  • arguments now take  both numerical and text input (and reporters)
  • double click on a custom reporter block to show its result
  • fixed the block editor’s answer field to improve drag & drop
  • new debugging functions (error blocks are displayed red)
  • fixed escaping out of infinite atomic loops (thanks to Brian Harvey for catching this!)
  • the block editor now is resizable (thanks to Dan Garcia for suggesting this!)

nestable sprites (structural recursion)

  • you can now create composite sprites (made out of subsprites)
  • sprites can be nested infinitely, making them “parts” of more complex simulations
  • subsprites follow their owner’s motion, heading, resizing and graphical effects, and serve as their owner’s extended sensors
  • subsprites can be set to follow their owner’s rotation, or to rotate independently

other

  • you can now share sprites (also nested ones) in a mesh network
  • built-in compiler lets you convert any Scratch/BYOB project into an .exe
  • autoscrolling
  • scrolling by dragging
  • undo (!) - Why didn’t I think of this before…

Elements - blocks of code all the way down to the VM

  • you can now inspect (and awkwardly edit) any non-custom standard Scratch block in my experimental Elements for Smalltalk GUI. This is a taste of Zukunftsmusik…

Smalltalk has helped

BYOB’s new nestable sprites feature was not nearly as difficult to implement as I first expected, because Smalltalk has helped. A central problem was to recursively propagate the owner sprite’s settings to all of its subsprites whenever they are changed. This is about navigating down an ordered tree towards its leaf nodes and basically trivial. What’s tedious about it is that you have to add additional methods for each and every possible modification of any node, which is not exactly “copy & paste” but nonetheless repetitive and boring stuff. Here Smalltalk’s meta-programming capabilities allowed me to write a single simple method instead managing that task for any context:

spread
“private - apply the method calling me to all subsprites
| sel args |
subsprites isEmpty ifTrue: [^self].
sel _ thisContext sender method selector.
args _ OrderedCollection new.
1 to: thisContext sender method numArgs do: [:idx |
    args add: (thisContext sender tempAt: idx) ].
subsprites do: [:eachPart |
    args isEmpty
        ifTrue: [ eachPart perform: sel]
        ifFalse: [ eachPart perform: sel withArguments: args asArray]]

A simple, consistent syntax is worth more than abundant libraries. Gotta love languages for the lazy!

Enjoy!

-Jens Mönig

Elements - a Scratch-like Smalltalk

March 5th, 2009

ElementsElements is a new graphical user interface for the Smalltalk-80 programming language inspired by MIT’s Scratch (http://scratch.mit.edu). Like Scratch, Elements offers draggable “bricks” of code, which can be accumulated and assembled LEGO-wise into complex programming constructs, rather than entering text through a keyboard. The Elements project wants to find out, if and how Scratch’s design can be applied not only to educational microworlds, but also to a full-fledged professional, object-oriented programming environment. As a proof-of-concept study I’m supplying both a minimal programming environment to start with, as well as a version of the Scratch Source Code Squeak environment which strives to be completely malleable by means of these Elements, thereby implementing Scratch quasi in itself.

Few pieces of software have inspired me the way Scratch has, with the possible exception of the Smalltalk programming language and the Morphic user-interface paradigm. In fact, I have come to love Scratch so much that I want everything to look and feel like Scratch. If such blissful narrow-mindedness turns you off, don’t even bother reading any further, let alone downloading these demos. I also enjoy the nerdy delight coming out of manipulating something by means of itself. By letting Elements plug into Squeak’s compiler/decompiler structure Elements can be modified and enhanced through itself.

If you’re curious, you can download the prototype here:

This first version of Elements is a tentative experimental prototype, comparable to a novel’s first draft. I’d like to use this prototype to gather experience and feedback for a more refined and mature design, and for a better and more stable GUI. Most, if not all of Smalltalk’s compiler nodes can be decompiled into syntax elements, with the exception of certain Squeak-specific constructs, such as BraceNodes (Arrays within {}).

Credits
Elements is completely inspired by and based in essential parts on the fantastic and brilliant work of the MIT Media-Lab’s Scratch-team, encouraged by their willingness to share ideas, designs, code, and enthusiasm.

Thank you, John, Evelyn, Mitchel, Natalie, Andrés and Eric!

 Enjoy!

-Jens Mönig

Build Your Own Blocks in Scratch

October 21st, 2008

Building BlocksSo, you want to define your own procedures and functions in Scratch? Build your own blocks (BYOB :) )?

You might as well try this new experimental prototype I have been developing over the last weeks. You can download and read through an overview (pdf), or download the whole application (including the overview) and start playing with it right away.

This prototype lets you build your own custom blocks in Scratch using the standard Scratch blocks, as well as other blocks you defined elsewhere. You can create your own command blocks (procedures) and reporter blocks (functions), both regular (”round”) and boolean (”diamond”). You can specify for each block to be atomic (run at the speed of a single block) or interleafed. Your custom blocks are defined for each sprite and can be shared among projects together with the sprite they were created for. Oh, and you can even use a block within itself (recursion).

This prototype is very, very, experimental, so be prepared to encounter lots of bugs. I’d be very interested in feedback about your experiences and insights.

Enjoy!

-Jens

update: Check out recent and ongoing BYOB-development (first class procedures etc.) at: byob.berkeley.edu

Lists and Files for Scratch

May 7th, 2008

GänsemarschI have been experimenting with lists and files in Scratch and built a little prototype. I have documented my proposal and the prototpye in a short pdf (well it’s not really short, but it’s mostly screenshots) which can be accessed from here:

http://chirp.scratchr.org/dl/Lists and Files for Scratch.pdf.

The prototype itself along with this documentation, some demo projects and a compiler (!) can be obtained from this link:

http://chirp.scratchr.org/dl/Lists and Files for Scratch.zip.

This fully functional prototype is deployed as a stand-alone application. I might eventually merge it with Chirp if future versions of Scratch will not feature someting similar.

The Same As For Kids Only Worse?

May 6th, 2008

maxim gorky exlibrisSo, how do you write software for grown-ups?

The part I like best about MIT Media Lab’s Lifelong Kindergarten Group is lifelong. Hey, life is supposed to go on after graduating from elementary school, and some of us even grew up, sort of. But we still love our sandboxes, crayons and bricks, don’t we? And sometimes I get that nagging feeling that pencils and paper used to be way more powerful, intuitive and inspiring back then than all those expensive gadgets and gimmicks they made me pick up along the way to adulthood.

When they asked Russian playwright Maxim Gorky how to write books for children, he supposedly replied: “The same as for adults, only better”. That non-descriptive quote has been abused all over the internet and in probably every second essay about anything educational. It’s good for a quick smile but leaves you wondering about the consequence: Will I really have to make up with increasingly mediocre prose for the rest of my days?

These questions in part reflect how I feel about Scratch. You may not be able to actually do much with it, but creating a Scratch project is an eye-opening experience every time. Because you’re being productive in a way you probably haven’t been since you forgot about those crayons in your old childhood drawer.

That spectacular productivity makes up for a lot of constraints in Scratch. Some of Scratch’s limitations may be based on educational design, others are probably the result of needing to stay compatible with the online version. But to imagine gradually freeing Scratch from such self-imposed bounds makes my mind reel and my mouth water. And I’m not dreaming about “prototyping”, not having “toys” in mind. I’m after the real thing.

My motivation behind Chirp is primarily a playful one: To experiment with the Scratch Source Code. But sometimes it goes beyond: Let’s not accept mediocre software anymore! Let’s program like kids again!

Gimme back my crayons, now …