Λ Snap – An inviting programming language for kids and adults for CS study

dr_kiszonka 133 points 74 comments September 11, 2026
snap.berkeley.edu · View on Hacker News

Discussion Highlights (17 comments)

stymaar

For those wondering the difference with scratch, it's on the about page: > About Snap! > Snap! (formerly BYOB) is a visual, drag-and-drop programming language. It is an extended reimplementation of Scratch (a project of the Lifelong Kindergarten Group at the MIT Media Lab) that allows you to Build Your Own Blocks. It also features first class[1] lists, first class procedures, and first class continuations[2]. These added capabilities make it suitable for a serious introduction to computer science for high school or college students.

sinuhe69

Snap is designed to be more expressive and powerful than Scratch. But I find debugging them is very painful. Changing the name of a variable or block for example, could create “holes” in the calling sites but the system can or cannot report an error and fails silently. Snap is IMO more flaky and the team seems more eager to add features than polish the existing ones or make the system mor robust and stable.

anguishe

Nice! I did a few chapters of this when I was learning. I'll have to add it to my list to go and check out any new updates/features they have. I can NOT wait to get my little one into something like this!

jc4p

I've been spending a lot of time with my nephews working on Scratch and Snap. They also attend local classes and their teachers switched from Snap to this which is way simpler and stickier with my nephews: https://www.microsoft.com/en-us/makecode

smlacy

I guess universities suffer from NIH-syndrome just as much as big tech does.

andrewla

I don't love graphical programming environments like this and Scratch and I can't quite put my finger on why I find them so unattractive. A big part of it is that you can, to some degree, learn programming from this. But you absolutely cannot learn software engineering from this.

DonHopkins

https://news.ycombinator.com/item?id=38016554 [...] I'm also a huge fan of Snap!, which has all the advantages of Logo (Lisp without parenthesis) and Scratch / eToys / Squeak / App Inventor family of block based visual programming languages, but all the power of Scheme. If you know Scheme, then it's easy to think about Snap!: it's just Scheme with a visual block syntax, but with some functions renamed to make them easier to learn, plus all the stage and turtle graphics stuff from Scratch, running in a web browser! I didn't realize until watching in amazement as Jens Mönig used his own creation, that it also has full keyboard support, so you can create and edit programs without using the mouse! It's much easier to teach Scheme to kids by teaching them Snap!, because the user interface is so much better than a text editor. I attended Snap!Con2023 in Barcelona recently, and we discussed some interesting possible extensions to Snap: Grammar defining blocks. Right now you can create your own custom vocabularies of blocks that fit together in particular constrained ways, by writing JavaScript Snap! extensions. Develop a set of blocks for visually defining new grammars and vocabularies of custom parameterizable blocks. For example, a grammar for representing plants with seeds, roots, stems, leaves, flowers, petals, etc. You can assemble and edit them manually by dragging and dropping from a palette, or write programs that generated and interpret and transform them, and pass them around as data, for example as instructions to the embroidery machine to sew, or logo turtle to draw. Turtlestitch - Coded Embroidery: https://www.turtlestitch.org/page/about Ken Kahn led a discussion about integrating LLMs like ChatGPT with Snap!. He's the developer of eCraft2Learn for teaching kids AI programming. Ken recently made some cool Snap! extensions for integrating LLMs with the speech synthesis and recognition system, and orchestrating conversations between different characters. Snap!Con2023: Creative uses of Snap! blocks using large language models like GPT: https://www.youtube.com/watch?v=d2rNGsbzkXI Enabling children and beginning programmers to build AI programs: https://ecraft2learn.github.io/ai/ But when it comes to LLMs, code generation, and code understanding, JavaScript has two huge insurmountable advantages over Snap! or any other block based visual programming languages: 1) First of all it's extremely well known, by both humans and LLMs. 2) And second of all, there's typically no efficient and faithful way to textually represent block based programs in a way that ChatGPT (or humans) can easily understand and generate. Of course you could just dump out the XML or JSON save file, but that wastes your token budget, and doesn't work well, because the LLM doesn't inherently understand the syntax and semantics of save files the way it deeply groks JavaScript. You need to define some equivalent text based language to serialize and deserialize your visual programs, or define some equivalency to an existing language, so you can translate back and forth without loss. Like Relax/NG has an XML syntax and also a simple concise human readable syntax, both which can express the same things. But no matter what equivalent language you come up with to serialize your block programs into, it'll never be as well known as JavaScript (unless it IS JavaScript). I think Snap! could take advantage of its equivalency with Scheme, and you could just parse Scheme into Snap! blocks, and the other way around. And ChatGPT knows scheme pretty well, though it's not as ubiquitous and standard as JavaScript. Logo would not be as good as Scheme, since it has ambiguities, because you need to know the number of parameters a function uses in order to parse it, since it's essentially Lisp without parens. [...]

k2xl

Question (serious) - Why teach kids programming anymore?

chrisjj

> inviting My first attempt to place a statement (play sound at Hz) failed with a Type Error. Android Chrome.

Dwedit

Any name that you can't type is going to be a problem.

aspizu

Scratch is how I first learned programming. I was building increasingly ambitious projects in it, and at some point the editor itself became the main thing I was fighting. Once a project got to around 10,000 blocks, it could get painfully laggy, and I ended up spending a lot of time engineering around Scratch's limits. That is what eventually led me to build goboscript: https://github.com/aspizu/goboscript I'm one of the programmers who owe their career to Scratch, this year, I joined https://ente.com as a software engineer. Scratch taught me how to code, and perhaps a bit of real-world engineering indirectly.

nico

Nice! Can this be used with a LEGO Wedo set? It would be cool to have some alternatives to the deprecated/unsupported official software, some of which no longer works (like the iOS app)

jacknews

Snap is a little intimidating compared to Scratch. It's clearly designed for older students, but at that point some of the advantages of blocks are lost. Most of these systems suffer from the 'canvas' model, where you have many stacks of blocks scattered around the canvas as they are created, possibly in no particular or logical order. It's difficult to find things or to get a good overview, and really becomes a navigation problem as projects get bigger. I think they would greatly benefit from a more traditional ide/file type structure, or some other way to structure 'stacks'.

avadodin

Welcome to the esoteric church of functional programming! Sure, you could use a Scratch for loop and be done with your cat piano program but have you considered constructing something that theoretically works like a for loop from obscure calculus? We even have the occult symbol! Joking aside, if base Scratch does lack a way to express trees as claimed Snap! may in fact be better from the perspective of teaching computer science concepts.

thrtythreeforty

I feel like HN shouldn't auto-capitalize "λ" in this instance. An anonymous function is a λ, not a Λ.

fnord77

the "code" looks like the comment section from a tumblr post

brian_harvey

A note to those commenters who complain that visual programming doesn't help you learn software engineering: Right, you aren't our target audience. We're after the people who aren't going to major in computer science in college, but who're curious what all the fuss is about. They've taken high school algebra, so they know what a variable is and what a function is. (They don't have to know about functions as data, but we hope to teach them that.) These days, they probably used Scratch in elementary school, so we don't have to teach them the syntax of blocks, or what a sprite is, etc. Nobody's going to come straight out of our class into a software engineering job. They'll have plenty of opportunity to learn that later, supposing that (as happens gratifyingly often) they change their minds about what to study in college because of our course. They're not (or at least not yet) hackers, in the sense of people whose instinct on meeting a machine is to take it apart. Oh, P.S., there is one sense in which block languages are better for software engineering: you can have arbitrarily long names of things (including spaces between words), because you only ever need to type the name once, so you can give your procedures self-documenting names such as "convert upper case to lower case letters" instead of ugly "convUcLc".

Semantic search powered by Rivestack pgvector
6,278 stories · 57,251 chunks indexed