Live data from Hacker News

Slang: The subset of Smalltalk that can translate to C or other languages (2019)

wiki.squeak.org

21–25 of 25 posts

Re: Slang: The subset of Smalltalk that can translate to C or other languages (2019)

#21
post #18

Earlier quoted context omitted.

> Participate in the community for a while Well, you see, that's what I'm trying to do here...

Well, this isn't the right place to do it. At least introduce yourself on the squeak-dev or beginners email lists and ask for the ability to edit the swiki there. It would also help to mention your immediate plans. The swiki is extremely old-school and simplistic and has suffered defacement issues in the past. Also, unfortunately, the overall Smalltalk community (at least the open source part) is both too small and a…

My immediate plans are (were) to, you know, edit the wiki.

> I recently opened up an issue of Skeptic Magazine and saw a headline, "Why there something rather than nothing". My first thought was, "Great job, guys." But, it's easy to make a typo, even in a headline. My second thought was, "If this were a wiki, I would correct it."

https://meta.wikimedia.org/wiki/The_wiki_way>

Zero chance that I'm going to jump through hoops to enjoy the privilege of giving away something that is already meant solely to benefit others while expecting to get nothing in return—my only expectation being that it isn't a difficult/hostile experience.

> Resources like the swiki have had little real attention for many many years.

I hope you can appreciate the perverse irony of this remark.

Re: Slang: The subset of Smalltalk that can translate to C or other languages (2019)

#22
post #9

Slang is challenging! I was implementing a plugin for Pharo the other day and it really feels like metaprogramming in C. I have pending in my to-do list making a blog post with a friendly how-to for making a HelloWorldPlugin so more people can play with it.

The main goal for Slang was to be able to use the Smalltalk debugger instead of something like gdb. Since you are essentially writing C but with a Smalltalk syntax the code itself is not any simpler, so it is all about the tools.

Something about that I'm missing. You'd use something like gdb for debugging running C code but the Smalltalk debugger works in the image so which C running code would it be debugging?

Re: Slang: The subset of Smalltalk that can translate to C or other languages (2019)

#23
post #21

Earlier quoted context omitted.

Well, this isn't the right place to do it. At least introduce yourself on the squeak-dev or beginners email lists and ask for the ability to edit the swiki there. It would also help to mention your immediate plans. The swiki is extremely old-school and simplistic and has suffered defacement issues in the past. Also, unfortunately, the overall Smalltalk community (at least the open source part) is both too small and a…

My immediate plans are (were) to, you know, edit the wiki. > I recently opened up an issue of Skeptic Magazine and saw a headline, "Why there something rather than nothing". My first thought was, "Great job, guys." But, it's easy to make a typo, even in a headline. My second thought was, "If this were a wiki, I would correct it." https://meta.wikimedia.org/wiki/The_wiki_way > Zero chance that I'm going to jump throug…

Sure, but the swiki is a tool for the community. What makes you think you should be able to edit it without a fair amount of knowledge and experience that can really only be gained by participation within the community?

If it was possible to give you access to a single page to fix some language or a misspelling that would be one thing. But the authorization on the swiki is far from granular. Once you have access you can change pretty much any page, including the starting page.

Re: Slang: The subset of Smalltalk that can translate to C or other languages (2019)

#24
post #21

Earlier quoted context omitted.

My immediate plans are (were) to, you know, edit the wiki. > I recently opened up an issue of Skeptic Magazine and saw a headline, "Why there something rather than nothing". My first thought was, "Great job, guys." But, it's easy to make a typo, even in a headline. My second thought was, "If this were a wiki, I would correct it." https://meta.wikimedia.org/wiki/The_wiki_way > Zero chance that I'm going to jump throug…

Sure, but the swiki is a tool for the community. What makes you think you should be able to edit it without a fair amount of knowledge and experience that can really only be gained by participation within the community? If it was possible to give you access to a single page to fix some language or a misspelling that would be one thing. But the authorization on the swiki is far from granular. Once you have access you…

Almost like a wiki, even.

Re: Slang: The subset of Smalltalk that can translate to C or other languages (2019)

#25
post #9

Earlier quoted context omitted.

The main goal for Slang was to be able to use the Smalltalk debugger instead of something like gdb. Since you are essentially writing C but with a Smalltalk syntax the code itself is not any simpler, so it is all about the tools.

Something about that I'm missing. You'd use something like gdb for debugging running C code but the Smalltalk debugger works in the image so which C running code would it be debugging?

Slang is Smalltalk-80 written as if it were C: all methods in a single class so they can be translated to C functions, no object allocations and so on.

This means that you can run the code as Smalltalk-80 inside Squeak and use all the tools like the Smalltalk debugger. When you are sure that it is working, you translate it to C and compile it to machine code. Now you would use GDB to debug that but in theory you won't have to as the code should just work.

Note that running the Slang version of the VM inside Smalltalk-80 gives you a fully functioning Smalltalk that is about 600 times slower than the Smalltalk it is inside of. The idea for Squeak was that machines had become so much faster than in the 1970s/1980s that even with this slowdown you could actually use the simulated Smalltalk enough to find all bugs.

On earlier computers such a simulation would be so slow that it would take many minutes for a menu to be drawn on the screen when you pressed a mouse button, for example. You would not get enough done to run into all the bugs. By the late 1990s this was no longer the case.

Post reply on HN