Fwd: Clojure as first language

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Clojure as first language

Español (Spanish) mailing list
Hola gente!

Como ven a Smalltalk en la lista de Clojure

Nos leemos!

Angel "Java" Lopez
@ajlopez

---------- Forwarded message ----------
From: blake watson <[hidden email]>
Date: Tue, Mar 1, 2016 at 6:54 PM
Subject: Re: Clojure as first language
To: [hidden email]


>>Would you elaborate on this last comment about Smalltalk?

Smalltalk, as a language, is very simple. Its syntax is, essentially,
"object message" embellished with keyword parameters, like "player attack:
monster with: sword using: slash". The environment, unfortunately, is
cluttered, and its version of Clojure's stack is stacks of DNU (do not
understand) windows. So I used Stephane Ducasse's "Squeak: Learn
Programming With Robots" (currently freely available online) which provides
a sandbox where you can test out the effects of various commands on
"robots". (The "robots" here are much like the "turtle" of yore.)

>>What did you do? What was the outcome relative to expectations?

My kids were around 10 at the time. The oldest is now 20 and a pro
programmer who seems to be able to pick up whatever language is thrown at
him (Javascript, Java, Clojure, Ruby, just in the past six months). The
others pursued more artistic interests, but they were able to grasp the
concepts and not be intimidated.

>> What were some good...aspects of Smalltalk?

The good aspects of Smalltalk are simplicity of syntax, and a lot of
friendly tools. Avdi Grimm has an amusing screencast "In Which I Make You
Hate Ruby In 7 Minutes"[1] which gives a taste. (My understanding of Ruby
is that Mats wrote it to be Smalltalk without the "weird stuff", only later
realizing the value of the "weird stuff".) Besides Robots, there is
Etoys[2] which is programming through drawing pictures and "assembling"
(with literal pieces) code. There's another pedagogical environment, much
like Etoys, called "Scratch" which was written in Smalltalk and then (alas)
rewritten in Java, but a version for Pharo Smalltalk exists ("Phratch"
[3]). Phratch can be used with Mindstorms, though I can't speak to the
quality of it.

Among the "weird" aspects of Smalltalk are those that can be classed as
"good" or "bad" depending on point-of-view. All the great tools, the IDE,
the debugger, the graphical interface exist because Smalltalk is a living,
breathing environment on top of the VM. The IDE is part of the environment;
there will be no emacs vs. vim flamewars because you'll use the built-in
editor. There are no files, per se. When you create a class, you've created
a living thing that responds to messages. When you create an object, that
object lives and persists in your "image". Something like the Flappy Bird
figwheel demonstration in Clojure is de rigueur in Smalltalk. (A modern
take on this is agile visualization[4].)

Everything is an object. This is more of a problem for seasoned programmers
who sometimes have trouble sending messages to numbers. Hence the "for"
loop in Ruby. In Smalltalk, there's no special syntax for it. A number
takes the "to" message with the end parameter, followed by a block of code
to execute.

1 to: 5 do: [ :i | Transcript show: i]

A lot of little things like that, akin to the Lisp parentheses horror that
many people seem to have (or the consistent, but unusual, use of
semi-colons in Pascal) can be off-putting.

>> What were some...bad aspects of Smalltalk?

The worst thing about Smalltalk, in my experience, is that its learning
curve is sort of square-wave shaped. You can grasp, intellectually, the
syntax in literal minutes, and get comfortable with it in a few days. I
assume that ease was what inspired Mats, which is the height of irony,
given the jungle of Ruby syntax. But then it's often a huge leap to grasp
the object library. (Exception being the collection classes, which are a
thing of beauty.) You can build an Etoys app, again, in minutes. But when
you've gone past what Etoys will give you out of the box, you're must then
go into the full environment (and you can't really transition Etoys
projects to regular Smalltalk). Etoys is a novice tool, extending it is a
master's task.

Much like Lisp, expert Smalltalkers have absorbed so much about their
beloved tools, they can't always see the problems a beginner will have. The
(rather friendly) community's size is an issue here, though the Pharo[5]
branch is much more aggressive about answering questions and being
responsive to change. The old guard is Squeak[6]. Pharo takes a "fail fast"
approach whereas Squeak is almost like "Smalltalk-80 forevah!". (Those are
extreme characterizations, though.)

Because it's a live environment, it's possible to get stacks of DNU
windows, which can be intimidating, and it's too easy to donk up your image
(some version of ST are better or worse in this regard), though fixing is
pretty simple.

It's not really a career path. Smalltalk has a strong emphasis on pedagogy,
but (creator) Alan Kay's focus is on education =generally=, i.e., using
computers to grasp math, physics, biology, etc. It has the same sort of
fallout as other great tools, in that while you =can= adapt easily to new
languages, you also end up missing the amazing place you came from.

>> And how might this compare to Clojure?

Smalltalk, in some ways, is the anti-Clojure. If Clojure despises state,
Smalltalk is =all= state. The image is, in essence, a big ball of state. It
suffers, then, from Rich Hickey's complected-ness (and how!). But state +
debugger makes for a powerful teaching tool. Smalltalk has some functional
stuff (select, collect, reject, inject, detect—which map roughly to keep,
map, filter, reduce and (some #{...}) and it is genuinely used (not just
lip service) but the philosophy is definitely "objects are responsible for
their own state, and you must trust that", with the footnote that, well, if
you don't trust it, you can change it. The whole system is right there in
your image.

Tougher concepts to grasp, like laziness, transducers, asynchronous
programming are less "up front" in ST than in Clojure. (Actually, ST
doesn't even have built-in laziness or transducers.)

(Side note: I'd love to make a Clojure for the ST VM.)

>>Any links/references?

In addition to the footnotes, you've there's:

Dolphin Smalltalk on Github: https://github.com/dolphinsmalltalk/Dolphin
Lots of free Smalltalk books: http://stephane.ducasse.free.fr/FreeBooks/
Amber is to Smalltalk what ClojureScript is to Clojure:
http://amber-lang.net/
Javascript done Smalltalk style: https://www.lively-kernel.org/
Mini-Squeak in the Browser:
http://bertfreudenberg.github.io/SqueakJS/demo/simple.html

That last is Squeak 2.2 but if you've got a powerful enough machine running
a decent browser, you can run up to Squeak 4.5 in the browser.

Hope this helps!

===Blake===


[1]
http://devblog.avdi.org/2015/05/11/in-which-i-make-you-hate-ruby-in-7-minutes/
[2] http://www.squeakland.org/
[3] http://www.phratch.com/
[4] http://agilevisualization.com/
[5] http://pharo.org/
[6] http://squeak.org/


On Fri, Feb 26, 2016 at 1:09 AM, Terje Dahl <[hidden email]> wrote:

> Blake.
>
> Would you elaborate on this last comment about Smalltalk?
> What did you do?
> What was the outcome relative to expectations?
> What were some good and bad aspects of Smalltalk?
> And how might this compare to Clojure?
> Any links/references?
>
> Terje
>
>
> On Thursday, February 25, 2016 at 9:29:10 PM UTC+1, blake watson wrote:
>
>
>> I've had good luck with Smalltalk.
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [hidden email]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [hidden email]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [hidden email]
Note that posts from new members are moderated - please be patient with
your first post.
To unsubscribe from this group, send email to
[hidden email]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Clojure as first language

Español (Spanish) mailing list
Gracias por compartir.
Citando a un Maestro 'El Smalltalk todavia no se invento'
Ayer le comentaba a Germán lo siguiente.
En un sitio dedicaco a un lenguaje de scripting para Mac que permite
comandar todo el OS X con una clase de "Smalltalk"encontre dos tipos que
pedian gente que usara ese lenguaje para comandar un CRM que corre en todos
los dispositivos Apple.
Y pagaban....

O sea no hay nada mas simple para lograr algo que Smalltalk en alguna de sus
variantes.
Hasta gente común (no eran programadores los que pedian gente) se da cuenta
de eso.

Por qué Smalltalk no "triunfo"?

Siempre he tenido la teoría que Smalltalk no es para cualquiera.

Sostengo que cualquiera al que le guste programar , leyedo n libros de lo
que quiera usar , en un cierto tiempo logrará lo mismo que gente que tiene
20 años en eso.
Llamese C, Java, Javascript (o DB2 PL1 Fortran Cobol, que crease o no se
siguen usando)

En Smalltalk no es asi.

Sostengo que si alguno que ya sabe se sienta a tu lado y te explica la
magia, algunos pocos lo entenderán al toque y otros nunca.
Los pocos se transformarán y no querrán saber nada de otra cosa.

Agradezco acá a Andrés, Mariano y Felix que me convirtieronen un
Smalltalker.

Lamentablemente , no abunda el trabajo para Smalltalk.
Y se da que gente grosa como los amigos de InfOil les cuesta conseguir gente


Edgar
@morplenauta




Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Clojure as first language

Español (Spanish) mailing list

Quoting "'Edgar J. De Cleene' [hidden email] [squeakRos]"  
<[hidden email]>:

> ...
> Por qué Smalltalk no "triunfo"?
>
> Siempre he tenido la teoría que Smalltalk no es para cualquiera.
>
> Sostengo que cualquiera al que le guste programar , leyedo n libros de lo
> que quiera usar , en un cierto tiempo logrará lo mismo que gente que tiene
> 20 años en eso.
> Llamese C, Java, Javascript (o DB2 PL1 Fortran Cobol, que crease o no se
> siguen usando)
>
> En Smalltalk no es asi.
>
> Sostengo que si alguno que ya sabe se sienta a tu lado y te explica la
> magia, algunos pocos lo entenderán al toque y otros nunca.
> Los pocos se transformarán y no querrán saber nada de otra cosa.
> ...
>
>
> Edgar
> @morplenauta

Si. Yo creo lo mismo!

Saludos,
Juan Vuletich

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Clojure as first language

Español (Spanish) mailing list
> Si. Yo creo lo mismo!
>
> Saludos,
> Juan Vuletich

Juan, bueno que andes por aca.
Podriamos hacer debates entre todos , desde lo mas simple a lo mas complejo

Ahora que juego con el AppleTV , el Xcode y Swift.

Cuales serian las ventajas/desventajas de los lenguajes con declaracion de
tipos y los que no


Edgar
@morplenauta



Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Clojure as first language

Español (Spanish) mailing list
In reply to this post by Español (Spanish) mailing list
El 3 de marzo de 2016, 17:11, [hidden email] [squeakRos] < [hidden email] > escribió:

Quoting “'Edgar J. De Cleene' [hidden email] [squeakRos]”
< [hidden email] > :

> ...
> Por qu€ ¢Ã© Smalltalk no “triunfo”?
>
> Siempre he tenido la teor€ ¢Ã­a que Smalltalk no es para cualquiera.
>
> Sostengo que cualquiera al que le guste programar , leyedo n libros de lo
> que quiera usar , en un cierto tiempo lograr€ ¢Ã¡ lo mismo que gente que tiene
> 20 a€ ¢Ã±os en eso.
> Llamese C, Java, Javascript (o DB2 PL1 Fortran Cobol, que crease o no se
> siguen usando)
>
> En Smalltalk no es asi.
>
> Sostengo que si alguno que ya sabe se sienta a tu lado y te explica la
> magia, algunos pocos lo entender€ ¢Ã¡n al toque y otros nunca.
> Los pocos se transformar€ ¢Ã¡n y no querr€ ¢Ã¡n saber nada de otra cosa.
> ...
>
>
> Edgar
> @morplenauta

Si. Yo creo lo mismo!

Saludos,
Juan Vuletich







También pienso igual.




Y me queda ese sabor amargo de casi nunca poder usarlo “en serio”, o cada vez
menos para decirlo más apropiadamente.
Saludos!