secstate 12 years ago

Haha ... funny to read about people scratching their head over Self. I feel like once you've wrapped your head around the Squeak version of Smalltalk, your about 50% of the way towards understanding Self. It's not a language the way we think of it, with CLI tools and syntax and text editors. It is a mutable environment of programmable objects. Sure there's some writing inside of objects to create methods, but you're not gonna find a "try this in the browser" code.

Self is/was http://noflojs.org/ 's grandfather.

http://www.youtube.com/watch?v=NYEKO7JcmLE

I would also argue that Self is to programming languages what Haiku is to OS development. No on is writing a web framework in self, it's more of a toy and a neat artifact of where programming has been and could go in the future.

  • seanmcdirmid 12 years ago

    Smalltalk is still class based. The only strong connection between Self and Squeak is Morphic.

    • secstate 12 years ago

      I stand corrected :)

    • russellallen 12 years ago

      Much of the syntax is similar too:

        (2 + 4) == 5 ifTrue: [ Transcript show: 'Yay!' ] "Squeak"
        (2 + 4) == 5 ifTrue: [ 'Yay!' printLine ] "Self"
      • seanmcdirmid 12 years ago

        C and Java also have a similar syntax.

        Most of the Self people were Smalltalk people before, so you could see Self as being heavily inspired by Smalltalk in its syntax and image-based persistence. However Squeak is still Smalltalk while Self is a full successor language (you could say Morphic was backported from Self back to Smalltalk).

    • tel 12 years ago

      I feel like my personal challenges coming to understand Self are often exaggerated by Morphic. Most of the linguistic notions I gather from reading papers aren't too tough, but I always bounce off when trying to translate that to effects in the Self environment.

      • doublec 12 years ago

        I encounter that too. I started writing Self code in a text editor and loading it in the REPL. Some of the code shipped with Self is like this (The Mango parser code for example).

        Once I was more familiar I started learning the GUI environment. It took me a while to work out how the object transporter worked to export code back to text files but once I got that Self became a lot more friendly to use.

        • tel 12 years ago

          See, I'd love to do that but I don't think the documentation ever bothers to explain it.

      • sebastianconcpt 12 years ago

        A.K.A. UI poorly solved usability challenges.

        In a way, the fundamentals of Self is the future of programming but we need to get designers helping with the UI/UX

        Smalltalk has a similar challenge

  • doublec 12 years ago

    There is actually a basic web server example. It includes a web based object browser. I'm not sure if it's in the 4.5.0 release but it's one of the branches IIRC.

primitivesuave 12 years ago

If this language is looking for greater adoption, its website is doing a big disservice. It is incredibly challenging to find a single code snippet, and the documentation is mediocre at best. The interfaces that are shown in the documentation remind me of the computer system you see DMV employees fumbling around with. I love picking up random languages on a Sunday, but not this one.

  • ape4 12 years ago

    Just follow the link on the site to the Wikipedia article ;)

  • jnazario 12 years ago

    concur (and upvoted). i took a few minutes, peeked around at some other "niche" languages (you know, not exactly mainstream) to see how they fare in this - rust, D, julia, haskell - and compared them to python.org's website. python's is far more like the self site than like those others, it takes several clicks to get to a code snippet.

    so, i concur, but i think it's (sadly) not alone in that shortcoming.

  • russellallen 12 years ago

    Yeah, its a fair cop. The website is old and more about people who already know about Self than people who don't. I'll put fixing it on my todo list.

    • sebastianconcpt 12 years ago

      That's the spirit!

      It would be greatly appreciated

    • primitivesuave 12 years ago

      Thank you for not taking my comment negatively, I completely understand the amount of work that goes into documentation and the other comments on this article helped me understand the usefulness of Self. I've bookmarked the page and will check it out some Sunday in the future.

GeZe 12 years ago

Self was one of the inspirations behind JavaScript, particularly its prototype system.

http://en.wikipedia.org/wiki/Self_(programming_language)

  • flarg 12 years ago

    I spent some time with Self in the late 90s (at college of course!) and it was impressive on several counts: first, it's JIT compiler allowed Smalltalk to run faster when implemented in Self than without - the same JIT technique was later re-used in Java Hotspots [1]; second, the programming environment was a multi-user environment called Kansas that allowed a whole classroom of students to develop "prototypes" in the same environment (Kansas [2] [3])

    [1] http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Self_(p...

    [2] http://web.media.mit.edu/~lieber/Lieberary/Softviz/CACM-Debu...

    [3] http://bluishcoder.co.nz/2013/09/16/multiple-users-in-a-self...

  • masklinn 12 years ago

    Except for the part where what Self calls prototype has no equivalent in javascript (constructors are close to Self's `copy` message, but not quite the same) and what javascript calls prototype Self calls mixin (or traits, depending whether they've got ancestors up to the lobby themselves). And a Self object can have multiple mixins and add or remove them at runtime.

    • Pacabel 12 years ago

      The "JavaScript is like Self" fallacy is just another variant of the "JavaScript is like Scheme" fallacy. It sounds great to the person claiming it, and to an unsuspecting audience. But on closer inspection, the similarities between the two languages are minimal at best.

  • protomyth 12 years ago

    Newtonscript was also a descendent. Although I like Objective-C, I do miss Newtonscript and the soup. Prototype-based programming often had a nicer feel than [edit]class[/edit] systems.

    http://newtonscript.org - look at the "SELF and the Origins of NewtonScript" down the page

burntsushi 12 years ago

I've never heard of Self. So I wanted to find more about it. I had to click on several links to find some example of the language. I found this.[1]

    In the graphical representation of the object, we can distinguish
    method slots from data slots, and constant slots from assignable
    slots, by the icon in the button at the right hand of the slot.

Huh? Maybe I should go find a description of the language.[2]

    Self is an object-oriented programming language and associated
    programming environment. It is close in spirit and semantics to
    Smalltalk

Oh! Okay. Now I get it. But that's only because I'm vaguely familiar with Smalltalk.

(My intention of this comment is to save others some time trying to discover some basic facts about Self.)

[1] - http://selflanguage.org/_static/tutorial/Language/ObjectsAnd...

[2] - http://selflanguage.org/_static/tutorial/General/WhatIsSelf....

pstack 12 years ago

I guess I'm the only dummy who wasn't thinking of the actual Self language and thought I was going to be reading about a programming language that wrote programs by itself.

Yeah. I'll show myself to the seat in the corner. Sheesh.

  • szatkus 12 years ago

    You're not alone...

mortyseinfeld 12 years ago

IIRC, some of the techniques used in the Self VM eventually made it into the JVM.

Ahh yes, the relevant LtU thread. http://lambda-the-ultimate.org/node/1185#comment-12831

  • seanmcdirmid 12 years ago

    They transferred via Sun's acquisition of the Strongtalk team (that also got them Gilad Bracha). Strongtalk was also one of the first hybrid typed languages (like Dart and Typescript).

    Much of the innovation in dynamic language run-times today also uses ideas from Self. Most of the Self people are working at Google today in various high positions.

  • alayne 12 years ago

    I always wonder if the Self people felt bad about their VM efforts going into Java. Java has really been one of the least inventive and progressive languages.

    • seanmcdirmid 12 years ago

      I doubt they would feel sad about their technology being adopted by a mainstream language used by millions of developers vs. a research experimental language that many outside of research haven't even heard of before.

      • payload 12 years ago

        wasnt smalltalk once a mainstream language? in ancient times, late 80s?

        • seanmcdirmid 12 years ago

          The number of programmers back then was much less than now, but even then I don't think Smalltalk was a top 10 language. I guess it depends on how you define mainstream, Smalltalk has/had its niches, some of which are still active. But there is nothing wrong with using research languages like self (which was never mainstream) to explore and develop new tech that can be applied to mainstream languages.

    • bhrgunatha 12 years ago

      Presumably some of that effort is responsible for the JVM begin chosen to host other languages.

    • cageface 12 years ago

      Java brought garbage collection into the mainstream. That alone is enough to consider it progressive.

      • bromagosa 12 years ago

        Any big company with that kind of money and connections can bring pretty much anything into the mainstream, not a big merit IMHO...

    • mhd 12 years ago

      I've always wondered that about Guy Steele. Must've been an awfully well-paid job.