51 ms·
Why the downvotes? is there anything wrong in my question? I read the webpage and the answer is nowhere (at least I could not find it), and looking at the docs
by nudpiedo 8y ago
Why the downvotes? is there anything wrong in my question? I read the webpage and the answer is nowhere (at least I could not find it), and looking at the docs is not so easy to find this information, it seems that I have to get deep in a chapter of a book or a video in order to find out whether this tool has anything to do with my work, tool or area at all.
Does it compile to other platforms? Binary code, compile to C, to LLVM? Does it compile to other VMs like Java and it is compatible with javascript engines? For me this is a basic aspect of a language.
- Tomte 8y agoThe download page clearly shows Windows, Mac and Linux.
- nudpiedo 8y agoBut that's the development environemnt/compiler and tooling. It still could generate binaries for microcontrolers for example.
- Tomte 8y agoNo, it couldn't. It's image-based. Your application is the development environment. That's the point of Smalltalk.
- klibertp 8y agoBut it does, apparently: https://github.com/pharo-iot/PharoThings https://github.com/pharo-iot/PharoThings EDIT: Nope! I was wrong, see comment below. It promises Arduino support but via some firmware with Pharo itself still running on the desktop.
- detaro 8y agoThat runs the VM on the embedded Linux computer, and provides remote access to the development tools/an API to run development tools against.
- deleted 8y ago[deleted]
- ljm 8y agoFor what it's worth I think these are decent questions to ask, even if others think they're worthy of a downvote. As far as I understand it: it doesn't necessarily compile in that sense. You are constructing an 'image', which is basically a living environment that your program runs in, and maybe it corresponds somewhat to a VM. But you're not really treating the code that the VM runs as separate to the VM itself. In some sense I think you might map it to something like a Lisp machine, where you can interact with a running program and its state through a REPL. Someone more knowledgeable might be able to elaborate on that (or correct the misunderstandings), but it felt worth offering something other than a straight up dismissal of your question.
- klibertp 8y agoSmalltalk system consists of a VirtualMachine and an image. An image is just some Smalltalk code compiled into a form suitable for VM to read it into memory. The initial image contains all the standard classes of Smalltalk plus the GUI and various tools. When you add a method to some class inside the GUI, it gets compiled and added to the image held by the VM in memory. Later, you can dump the modified image to disk, producing a new initial image you can later use. This is indeed similar to Common Lisp and Emacs. Back to the original question: the VM runs on Windows/Mac/Linux and on some IoT devices. The code is compiled to bytecode which can then be JIT compiled further on some architectures/OSes. The compiler and the whole infrastructure is exposed and available on runtime. Pharo has classes for easy FFI to C and for bundling native libraries. I don't know if it's possible to call back from C to Pharo, but I assume yes (many libraries require this). There is no FFI or other integration with any other language (at least as a built-in, there are RPC interfaces for some langs as add-on packages). As for "standalone binaries" - almost, as you need to bundle the VM with the image; there are some helper scripts for bundling and then launching images. The most obvious use case is GUI programming, there's also old-school Web programming with Seaside, data crunching and visualization with Roassal. Other than these killer-apps, Pharo is just as capable as any other high-level language, although with a much smaller selection of libraries available.
- lispm 8y agoSome/many Common Lisp implementations. But there are a bunch of Common Lisp implementations which are not image-based. Another difference might be that most image-based Common Lisp implementations don't use portable byte-code. Some are using byte-code engines, but those are usually not portable across operating systems and/or machine architectures.
- fstephany 8y agoLike Java, it runs on a VM. This VM works on the mainstream OS. One of the peculiarity of Pharo (and Smalltalk) is that when you shutdown the system, you can persist the whole system on disk (called "the image"). Next time you open it, you start exactly where you left. All the development tools are mixed with your code. There is no differences between the coding time and runtime (i.e., you code at runtime). If you are familiar with IRB in Ruby, imagine a GUI running in IRB. This means that it is hard to see the limit between your code and Pharo's code. Pharo 7 seems to bring a bootstrap process where you can build images from scratch. This is an interesting evolution that will vastly improve the development/reproducability/deployment story.
- tome 8y ago> Why the downvotes? Please don't complain about downvotes, especially not within the first 23 minutes. It's common to receive one random downvote and a couple more piling on, but given a few hours a decent comment will be back in the black.