TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Pharo, the Modern Smalltalk

157 点作者 louiscyphre超过 7 年前

21 条评论

edmundhuber超过 7 年前
Is there a snippet of example code to look at? I browsed the pharo.org website, but couldn&#x27;t find an example to give me a taste. I even tried googling &quot;pharo example&quot; and with a brief look at the results didn&#x27;t find an example.<p>Today, there are hundreds of programming languages competing for attention. It is in your interest to put an example front and center of why one should spend time looking into yet another programming language.
评论 #15401464 未加载
评论 #15400294 未加载
评论 #15400255 未加载
评论 #15400839 未加载
评论 #15400813 未加载
评论 #15405004 未加载
评论 #15399774 未加载
评论 #15402844 未加载
评论 #15401359 未加载
flavio81超过 7 年前
<i>&gt;Smalltalk has the cleanest, purest implementation of object-oriented concepts; not even Java, Ruby, nor CLOS can lay claim to that.</i><p>I&#x27;ll take &quot;powerful&quot; versus &quot;cleanest and purest&quot; any day, thank you very much. Sorry but i&#x27;m staying with CLOS whenever i want to do object-oriented programming without feeling limited.<p>The author is on a pro-Smalltalk crusade (which I find just fine, Smalltalk is a great lang, and in a perfect world, it would be as popular as Javascript is today), but does so at the expense of constantly deriding Clojure, Common Lisp and Racket, which I find silly.
评论 #15400651 未加载
评论 #15423746 未加载
agentultra超过 7 年前
I like Pharo. I was able to build a widget that scraped the front page of HN in an afternoon with it just by following the built-in tutorial and googling.<p>One interesting &quot;killer app&quot; might be the Moose platform [0]. It&#x27;s basically an interactive environment for the analysis of software. Writing a parser is rather straight-forward and turning the AST into a visualization is also quite easy. This sort of feels like how I imagine a good IDE should be.<p>[0] <a href="http:&#x2F;&#x2F;www.moosetechnology.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.moosetechnology.org&#x2F;</a><p><i>update</i> spelling.
评论 #15400761 未加载
tangue超过 7 年前
There&#x27;s a Mooc starting in december by the INRIA ( <i>French Institute for Research in Computer Science and Automation</i> )<p><a href="https:&#x2F;&#x2F;www.fun-mooc.fr&#x2F;courses&#x2F;course-v1:inria+41010+session02&#x2F;about" rel="nofollow">https:&#x2F;&#x2F;www.fun-mooc.fr&#x2F;courses&#x2F;course-v1:inria+41010+sessio...</a>
评论 #15400013 未加载
评论 #15400655 未加载
z3t4超过 7 年前
They need to work on the presentation. How do you get started ? How does the code look like ? etc. Not just &quot;download this program and buy this book&quot;
评论 #15400343 未加载
评论 #15403427 未加载
评论 #15401033 未加载
评论 #15401235 未加载
tempodox超过 7 年前
My beef with Smalltalk is that it&#x27;s far too much a world onto itself for my taste. Java is already a bad enough citizen of Unix but Smalltalk takes it to a new level. If Lisp and Scheme can integrate well into Unix, why can&#x27;t Smalltalk?
评论 #15400339 未加载
评论 #15400021 未加载
评论 #15399910 未加载
评论 #15401149 未加载
评论 #15401264 未加载
评论 #15399867 未加载
评论 #15401393 未加载
t420mom超过 7 年前
My personal experience has been that the live coding aspect makes a huge difference to my development speed. A while ago I was going through Project Euler in less-mainstream languages, just as a warm-up&#x2F;distraction from work. I would do one problem at a time and then go back to work. One day I switched from Object Pascal (with Lazarus) to Pharo. I completed the problem (which I hadn&#x27;t attempted before, so no prior knowledge) so quickly, that I proceeded to complete five problems in the time it usually took me to do one. Because everything was so immediate, it was really easy to maintain a flow state. I had to force myself to stop and get back to work.<p>The object inspector is really nice, also being able to redefine methods in the debugger and continue the current computation is super cool. Beats poring over Java stack traces.<p>It would be nice if there were more open source libraries available, but SmalltalkHub is getting better: <a href="http:&#x2F;&#x2F;smalltalkhub.com&#x2F;list" rel="nofollow">http:&#x2F;&#x2F;smalltalkhub.com&#x2F;list</a>
baldfat超过 7 年前
I start from stupid since I was 8 on Programming Languages. I taught myself Assembly and Pascal before I was a teenager.<p>I learned Racket and Smalltalk to be a better problem solver. I ended up becoming a MUCH better programmer due to these two. Racket stuck and I use it for all my personal projects but Pharo is a great learning tool at the very least.
评论 #15401222 未加载
vanderZwan超过 7 年前
I enjoyed playing around with Pharo a few years back, and often look at what else the people working on it have been thinking of lately.<p>Having said that, the PharoJS website mentioned in the article could use some love, I just get an unstyled webpage[0]. Now, I love avoiding website bloat as much as the next guy, but from the point of view of a web developer who might be interested in exploring what Pharo and Smalltalk in general might have to offer, that seems a bit too minimal.<p>Amber, by comparison, runs a full SmallTalk on the website itself, which is pretty cool[1]. Doesn&#x27;t seem to have maintained momentum beyond 2014 though.<p>[0] <a href="https:&#x2F;&#x2F;pharojs.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pharojs.github.io&#x2F;</a><p>[1] <a href="http:&#x2F;&#x2F;www.amber-lang.net&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;www.amber-lang.net&#x2F;index.html</a>
评论 #15406007 未加载
paulajohnson超过 7 年前
I wouldn&#x27;t take Capers Jones&#x27; estimates of SLOC&#x2F;function point as evidence of anything. In most cases (including these two) this seems to be Jones taking a look at the language Wikipedia page and guessing a number.
评论 #15417134 未加载
评论 #15401015 未加载
ScottBurson超过 7 年前
<i>Smalltalk’s use of live coding is easy and elegant; not even Common Lisp, Forth, nor Java (hot swapping) can lay claim to that.</i><p>Does anyone understand what this is talking about? I may not understand exactly what is meant by &quot;live coding&quot;, but I think I do it in Common Lisp (via SLIME) all the time. How is it better in Smalltalk?
评论 #15405190 未加载
评论 #15405940 未加载
stutonk超过 7 年前
For those wondering what it&#x27;s like to program in Pharo or why there aren&#x27;t a lot of code snippets floating around in Pharo materials: it&#x27;s because the way you program in Pharo somewhat different than most languages. Pharo is an IDE in the true sense, i.e. while it&#x27;s technically possible to open up a workspace (text editor) window and write a new class all on one screen this is not how things are done in practice.<p>Programming in Pharo is usually done either in the class browser or the debugger so that you&#x27;re only ever seeing the code for one method (called a message in Pharo) at a time. Pharo and other Smalltalk variants tout simplicity of syntax but leave off the fairly complicated class hierarchy and message coupling semantics ergo the necessity for an extremely powerful browser. In the browser, messages for each class are further separated into &#x27;protocols&#x27; such as methods for &#x27;accessing&#x27; or &#x27;initialization&#x27; (these are not part of the Smalltalk syntax, just a convenient layer of organization). At each level in the hierarchy, the Pharo code browser gives you a nice template to edit when you want to make a new package, class, or message. The overall effect is that you&#x27;re only ever working with a handful of lines at a time and, indeed, Pharo will warn you if it thinks your message is too complex. Doing things this way actually makes everything quite manageable. One of the nice features of being pure OO is that everything is a pure black box so you just need to know that a class exists and take a peek at its interface to use it effectively.<p>To that end, Pharo actually has an excellent search tool that&#x27;s not present in other Smalltalk variants like Squeak or Cuis. It does some kind of intelligent voodoo and can find anything from definitions to instantiated objects to senders and receivers of a certain message and so on. You can also open up a playground window to experiment with whatever code in the REPL style. But it&#x27;s actually a little bit more robust than a traditional REPL because of the pure OO nature of Smalltalk. The thing you get back from evaluation isn&#x27;t just some text. It&#x27;s an object with all the associated possibility of reflection and manipulation (which can all be done from a UI, not just from evaluating more code).<p>One of the things Pharo does better than almost every other language is debugger integration. Pharo is like LISP in the sense that you can start an application, have it encounter an error (or just pause execution at will), drop into the debugger and change some stuff, reify whichever execution stack frame, then resume the program as if nothing ever happened. This is the essence of the other common Pharo workflow: write some partial code and then fill it in incrementally in the debugger until you have a fully functional and bug-free application. In addition, Pharo has its own robust unit testing system called Sunit that, coupled with the debugger workflow, creates a fantastically ergonomic TDD experience.<p>No matter where you are in the Pharo environment, Smalltalk code gets full treatment (E.G. syntax highlighting, code completion). So what does the syntax look like? Well, it actually has that concatenative elegance of Forth plus a few other constructs. Pretty much everything is a message send. Message sends come in three flavors: unary, binary, and keyword. Constructs like conditionals are also just message sends. In addition, there are first-class lambdas (called blocks in Smalltalk). Here&#x27;s the canonical factorial program:<p>&quot;Factorial function&quot; fac := [ :n | (n = 0) ifTrue: 1 ifFalse: [ n * (fac value: (n - 1)) ] ].<p>where &quot; ... &quot; is a comment, &#x27;:=&#x27; is assignment, &#x27;[ ... ]&#x27; is a block, &#x27;:n&#x27; is the block&#x27;s argument, arithmetic operators are actually binary message sends, things like &#x27;ifTrue:&#x27; are keyword message sends (unary message sends are similar but don&#x27;t have colons or parameters e.g. &#x27;SomeObject new.&#x27;), and the statement is terminated with a period. Apparent recursion is fine because Smalltalk uses late binding. Aside from some syntax for strings and class declaration, that&#x27;s basically it.<p>Pharo also has a lot of other nice features such as keeping a log of code changes in case of program crash or power outage, an integrated package manager&#x2F;version control system, and optional git integration. It&#x27;s all pretty easy to use and overall the system is quite impressive with a high degree of polish and decent performance (comes close to or exceeds node in my experience). However, as others have stated, it&#x27;s a walled garden. All UI interaction happens within the Pharo environment with no option for native. If you want to break out on UNIX, you have write some kind of server and use sockets or the filesystem (which isn&#x27;t a huge handicap in the grand scheme of things). On the other hand, application deployment is a little iffy. There&#x27;s no readily apparent scheme to pare an image down to just what your project uses and then distribute that; users would have to install your package from within their own Pharo environment.
评论 #15405974 未加载
Tepix超过 7 年前
If you want to get into Pharo, there&#x27;s a MOOC by France Université Numérique starting October 16th:<p><a href="http:&#x2F;&#x2F;files.pharo.org&#x2F;mooc&#x2F;" rel="nofollow">http:&#x2F;&#x2F;files.pharo.org&#x2F;mooc&#x2F;</a>
评论 #15417754 未加载
JohnStrange超过 7 年前
Okay, so lot&#x27;s of praise for a language. But I have three questions that aren&#x27;t answered by the article:<p>1.) How fast are programs written in Pharao?<p>2.) Is it possible to write complete and halfway modern looking desktop end-consumer GUI applications in Pharao?<p>3.) How good is it at parallel programming (i.e. multicore support, not just concurrency with green threads)?<p>I&#x27;m always interested in learning a new language, if not just for fun. Currently my new language on the Todo list is Nim. However, I do not want to take a look at a language for which the answer to all of the above questions is &quot;Meh&quot;.
评论 #15399956 未加载
claystu超过 7 年前
How do you get started with GUI programming? I can&#x27;t seem to find anything on this for Pharo6...and barely anything for earlier versions (which I&#x27;m assuming are now obsolete).
评论 #15406050 未加载
Koshkin超过 7 年前
To an inexperienced eye, Smalltalk&#x27;s syntax seems to be suffering from colon &quot;cancer&quot;. (I don&#x27;t get a similar feeling from Lisp, for some reason.)
jmarinez超过 7 年前
*ACM, want to see how bad things are, read this thread....<p>To understand Smalltalk in general one neeeds to understand the impetus; and behind it is Alan Kay. What we do today isn’t really “computing” as envisioned and then created in the 70s. Lots of those terms used back then are used now, but the meaning has been transformed into something entirely different.<p>It’s unfortunate that most of the things we call “state of the art” are bastardized and horrible versions of those from the 60s and 70s. Yet here we are in 2017 and we can’t have the majority of “computer users” create an essay defending his&#x2F;her views on climate change with an actual editable running model upon which a civil discussion could be based on. But hey, we will have an iPhone X, so who cares?<p>Smalltalk is like a gem, a remnant from a magical world that existed and went away - but still possible - if we just took a look way, way back as to where it all originated.<p>For the CS students out there, get your money’s worth and start asking where all this stuff we have now came from and more importantly, why.<p>Here’s a good start:<p>A Personal Computer for Children of All Ages: <a href="https:&#x2F;&#x2F;www.mprove.de&#x2F;diplom&#x2F;gui&#x2F;kay72.html" rel="nofollow">https:&#x2F;&#x2F;www.mprove.de&#x2F;diplom&#x2F;gui&#x2F;kay72.html</a> “The basic idea is to exploit the duality between functions and tables (or processes and memory). English has nouns which refer to &quot;objects&quot;, and verbs which refer to &quot;actors&quot; and &quot;relators&quot;. This is a Newtonian epistemology. Modern physics and philosophy tend towards the idea that both &quot;objects&quot; and &quot;actors&quot; are just different aspects of the notion of process. A process has state (a set of relations having only to do with it) which changes as time (defined as interactions with other objects) passes. Using this view &quot;data&quot; is a process which changes &quot;slowly&quot;, &quot;function&quot; is a process which changes more rapidly. Each process has the logical attributes of a complete &quot;micro&quot; computer: they can have inputs, give back outputs, act as a memory on file system, perform computations, be interrupted, etc. Since a &quot;computer&quot; can simulate all other computers (modulo time and space), having the notion of a process in a language allows useful idea such as arrays, records, recursive procedures, etc., to be added to the the repertoire at any time.”
dmzkrsk超过 7 年前
Any good article describing Smalltalk features for C&#x2F;Python&#x2F;Go&#x2F;JS developer?
keithnz超过 7 年前
Is Pharo open source?
评论 #15404926 未加载
akkartik超过 7 年前
On a tangent: I wonder how everybody who writes for Medium feels about the new Quora-style nag screens.<p>(I can only go on tangents since I saw the nag screen and bounced.)
评论 #15400446 未加载
评论 #15399791 未加载
thedaemon超过 7 年前
I&#x27;m sorry but the 3d image of the light house is horrible. It reminds me of POV-Ray renders from the 90s. Is Medium so poor that they can&#x27;t afford a competent artist?
评论 #15400601 未加载