Welcome to HCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to HCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Compile and run Smalltalk code online instantly with HCODX. Our free cloud-based Smalltalk compiler supports real-time execution, standard input, syntax highlighting, and code download. No installation or configuration required. Start coding in Smalltalk now.
Run Smalltalk instantly without installing any IDEs or configuring environments. Our cloud-based Smalltalk handles libraries, runtimes, and dependencies automatically so you can focus on writing code.
Whether you are studying algorithms in Smalltalk, practicing data structures in Smalltalk, or exploring functional programming, our tool provides real-time stdout/stderr feedback with interactive standard input support.
HCODX is a free online compiler and code runner: write code in your browser, execute it on a cloud sandbox, and interact with your program through a live terminal. Students use it for coursework and interview practice; developers use it to test snippets in 85+ languages without setting up a local environment.
Smalltalk, designed by Alan Kay's team at Xerox PARC in the 1970s, is where modern object-oriented programming was invented: everything is an object, all computation happens through message passing, and even control flow like ifTrue: is just a message sent to a Boolean. Its ideas shaped Objective-C, Ruby, Python, and the MVC pattern itself. The code on this page runs under GNU Smalltalk, a scripting-friendly implementation that executes plain source files rather than requiring a graphical image. The attached terminal is fully interactive, so expressions like stdin nextLine actually pause and wait for your keyboard, letting you experience live message-driven programs with nothing installed.
| name square |
Transcript showCr: 'What is your name?'.
name := stdin nextLine.
Transcript showCr: 'Hello, ', name, '! Everything here is an object.'.
square := [:n | n * n].
1 to: 4 do: [:i |
Transcript showCr: i printString, ' squared is ', (square value: i) printString].
#(3 1 4 1 5 9) asSortedCollection do: [:each |
Transcript show: each printString, ' '].
Transcript cr.
Smalltalk is the classic vehicle for teaching pure object orientation in programming-languages courses, since concepts like message passing, blocks as first-class closures, and metaclasses appear here in their original form. Developers studying Ruby's design or the history of MVC, test-driven development, and refactoring tools (all pioneered in Smalltalk environments) use this page to run canonical examples. It also serves maintainers of legacy Smalltalk systems in finance and shipping who want a quick scratchpad for collection protocols and cascades without launching a full image. HCODX is a free online Smalltalk editor, runner and interpreter — an IDE-grade compiler and playground to write and run code online, execute code with live output and live preview, no downloads or web server required.
Yes. GNU Smalltalk exposes standard input as the stdin object, and sending it nextLine blocks until you enter a line in the live terminal. Combined with Transcript showCr: for output, you can write interactive scripts, prompts, and simple text games entirely in message-passing style.
Code executes under GNU Smalltalk, which reads ordinary text source files, making it ideal for a browser terminal. Pharo and Squeak, the popular image-based environments, share the same core language and collection protocols, so most expressions transfer directly; what you will not find here are their graphical browsers and Morphic UI tools.
In Smalltalk even conditionals and loops are messages: ifTrue: is sent to a Boolean object with a block argument, and to:do: is a message to a number. There is no privileged syntax layer, so the language stays tiny and uniform, and you can inspect or override nearly any behavior, which is the property later languages like Ruby borrowed.
Your current code will be replaced with the default sample. This cannot be undone — download your code first if you want to keep it.
You have unsaved changes. Do you want to save your code before continuing?