What is **the** way to interconnect two Smalltalk(s)? - smalltalk

If I would like to interconnect two Smalltalks, namely Smalltalk/X with GemStone/S, what approach would you recommend? I would like to have an application in Smalltalk/X with persistent objects in GemStone/S.
Prior to any development I tried to investigate the issue. I have found some open-source implementation done - I like to learn from others mistakes so I don't repeat them.
I have found an implementation for Pharo - gt4gemstone - Glamorous Toolkit for remote work with Gemstone/S.
I have found also from James Foster - Jade which achieves more as it is an
Alternative Development Environment (IDE) for GemStone/S that runs on Microsoft Windows.
Where would you recommend to start? Would it be to read the gt4gemstone or Jade and then come up with similar way to interconnect Smalltalk/X with GemStone/S?

Glad to hear of your interest in GemStone (one of my passions!). The key to interoperability with GemStone is to provide a wrapper for the GemStone C Interface (GCI), a C library used to connect to GemStone. This is the method used by every GemStone client (whether C, Smalltalk, or something else) to communicate with the system.
For a Smalltalk example, see GciLibrary* and GciSession in Jade.
For a couple other recent examples that might be cleaner starting points, see GciForJavaScript, GciForPython.
For an older (ruby) example see gemstone_ruby.
So, I'd suggest that you investigate what Smalltalk/X has for a Foreign Function Interface (FFI), then follow the examples above to connect to GemStone.

Related

It's possible to interact with opencv and screen outside vm window?

I worked with smalltalk as hobby when Pharo born. A lot of years passed without touching it, and I'm sure a lot of things happened in smalltalk world. Now I have some projects in my mind and my main idea was to develop using python but I'm thinking to retake this enviroment I loved. One of this projects is about using opencv for recognition from a Webcam, recognition of screen changes in other windows, and painting specific things on screen (a board game).
My idea is to develop on Linux and Windows, and release on Windows/Linux/Mac. Right now which ST flavour fits the interaction I need? Right now what's the main difference between Pharo an Squeak?
Thanks.
I'm sure there are more qualified people around to answer this question. I'll try to be as objective as possible, but these are only my opinions others can see it otherwise. I will write only short description for each.
The interaction would have to be done via FFI.
I also don't know every dialect there is. For example, I haven't heard of trufflesqueak before.
To fit your picture windows/linux/mac:
These smalltalk(s) have the VM support you require (in random order): GemStone, Pharo, Squeak, Cuis-Smalltalk
GemStone/S - is a distributed Smalltalk system with a massive, persistent memory. Offers free usage and also has a commercial support. Very nice Smalltalk with many platforms supported. Windows is supported only as client.
Pharo is a open-source implementation which was originally forked from Squeak. Nice environment, which you know, but it needs to cleanup the code. It has very fast development cycle. In my eyes, the newest VMs have stability issues. The description here on SO.
Squeak the original Smalltalk-80 implementation with plenty of legacy code, but the VM is quite stable and lately it works very nice. The description here on SO.
Cuis-Smalltalk is a multiplatform Smalltalk-80 implementation. Cuis shares the OpenSmalltalk Virtual Machine with Squeak, Pharo and Newspeak. I did not see any projects created in Cuis, maybe somebody can correct me.
Other interesting smalltalks:
Dolphin (windows only) - nice smalltalk for Windows. Supports integration with Windows and calling windows code.
Smalltalk/X - for Windows and Linux VM (there is MacOS VM port for Smalltalk/X but it is not public yet, maybe it will appear on Smalltalk/X-jv later on). Developed by eXept mainly by Claus Gettinger. There is an independent branch Smalltalk/X-jv - list of features and the description on SO.
Commercial Smalltalks
You can try these out, but you for commercial use you have to pay license fee.
VAST owned by instantiations - they are working on MacOS support but it is not there yet. Very mature Smalltalk with commercial support.
Cincom's VisualWorks - The development is somewhat lacking lately but still Smalltalk with company behind it.
Pharo Spec (the widget library) has a Gtk3 backend that can be used to develop application in any platform (there are a few targeting windows), and I know there was work done using OpenCV, but you will have more luck asking that in our discord channel (https://discord.gg/QewZMZa) or any of our mailing lists (check links here: https://pharo.org/community).

alternative IDE for squeak/pharo

I've been using smalltalk for a while now and I love the language and the concept. What I just hate is the System browser. This tool doesn't even resemble a modern IDE. How am I supposed to code without tabs, outlines and handy shortcuts? I often find myself implementing a selector and noticing that it would be nice to isolate a piece of code in a separate (private) selector, just for readability shake, but I don't. Because it takes like 5 mouse clicks and I have to navigate away from the selector I am working at, and navigate back to it. Oh wait, I can't! Because it has syntax errors, because I haven't finished it yet! Kills me. And I don't have a 24 inch display to open 3 browsers.
Sorry for a little rant. My question is, is there a real IDE (Eclipse, Net.Beans, VS) for smalltalk? Maybe for some commercial version of smalltalk?
You might want to check out tODE. It's at a very early stage, but it is an attempt to provide a Smalltalk IDE in the web-browser and is a break from the traditional Smalltalk IDE. With that said, I don't think you'd want to start using tODE right away, but you can keep an eye on it as it evolves.
Dale
Pharo is trying to have the Nautilus Browser ready for Pharo
1.4. I suspect there will be a flood of awesome new tools as the system stabilizes over the next few releases.
There's the Glamorous Inspector.
Spoon has been mounted as a WebDAV filesystem, so you can use whatever tool you like. Spoon is not another Smalltalk, but a testbed for revolutionary Smalltalk technology, which can be incorporated into any other Smalltalk (it's currently on top of Squeak)
There is the Tiling Window Manager to help you organize
Since Squeak and Pharo are live, dynamic, open systems powered only by volunteers, anyone sufficiently motivated can create the next generation of tools ;-)
p.s. I feel your pain. The 20-browsers-open thing is a drag. Let's invent the future!
Historically, the real "IDE" is the Smalltalk one, and one could claim that the others are just an adaptation to the limits of traditional textual programming languages (not rethorical, just check out the evolution of typical development environment UIs and how they are adding features that exists in Smalltalk from the very beggining, like the senders and references in VS).
Just a side note: actually more than 2000 open-source projects in the SqueakSource repository were coded without tabs, outlines and shortcuts (I think still in Squeak you can cross reference any text selecting and pressing with Alt-6). I can't tell you how sad I feel when I must to go back to file based developement, still don't understand why most developers love to sweep text, mess with line numbers and page up-down files in directories. The good news for you, is that you have many options:
There is an alternative browser called BobsBrowser (works in Pharo 1.3) which lets you browse
Class hierarchy windows exploring each class
System Category window
Unsaved edits
Recent classes
Recent methods
Method categories for instances and classes
Unsent methods
Driller relating every structural information
etc.
The advantage over the Whisker browser is that the hierarchical lists are attached to a window while in BobsBrowser you can detach them.
It all depends of the different activities you're performing when you're developing. With some experience in Smalltalk you'll find that you prefer some browser for exploratory insights and others for refactorings, etc. BobsBrowser for example is good for knowledge organization or custom navigation of Smalltalk classes and categories, the hierarchies you can see are the organizations from the Smalltalk reflective meta-architecture at any level (classes, senders, implementors), and they are expandable/collapsable (in the classic system browsers you can only expand the system categories and subcategories).
The instance variables were shown historically in the Smalltalk/V flavors, and there is an old goodie (from Squeak 2.7 IIRC) to enable it back again but almost nobody today maintains the classic System Browser in Squeak/Pharo. Adding that feature to OmniBrowser would be more complicated though because is a browser framework (as every serious framework, it took some time to learn it for the first time), although the effort of the Squeak/Pharo community is absolutely incredible, still the Smalltalk community needs more developers.
You have also a commercial Smalltalk which isn't public (downloadable) yet but includes IDE-like features of traditional programming environments
And I don't have a 24 inch display to open 3 browsers.
You could give the Whisker Browser a try. It lays out the methods side-by-side so that you don't have to position all these windows manually.
I played with it a few years ago but I'm not sure what state it's in right now.
I don't know how mature it is, but the Etoile project has an IDE called CodeMonkey for writing Smalltalk applications. It's not specifically for Squeak, and instead uses their own smalltalk implementation, but it may be worth looking into. Unfortunately, it's only available in their SVN repository, so it's a pain to compile and install.

How to use the USB/HID port with objective-c under a Mac environment?

I am having big trouble to communicate through USB, from a Mac to an external HID device. The hardware has been proven fine when running under the Windows XP platform, but I can't find a GOOD exemple of programming the HID with Cocoa / objective-C. Several exemples are available in the Apple center, but they are either poorly documented, or too much complex ( in term of software with mixed objective-C and C, making the file difficult to understand), or not up to date. Well, I must say that I am more an hardware electronic engineer than a software specialist !
So far, I can enumerate the USB port, identify my device using the HID Apple's tools ( I read PID and VID ), but I miserably fail to send a report and/or to read a report back from the external device.
I would certainelly appreciate if one of you has used the new Apple's HID API and can share some know how.
On the other hand, is there any "USB spy" tool operating with the Apple's OSX ?
Thank you so much for your help
Michael
So yes, you're going to have to dive down and write C, not Objective-C, to do your thing.
Luckily, there's an additional Apple resource to make the USB/HID Manager MUCH easier.
See the HID Utilities Sample/Library from Apple
You are not going to find an Objective-c interface for the HID. At least, not anything more than a wrapper. Because of dynamic binding and delayed messaging, Objective-c is poorly suited to programming time dependent task like device drivers or for communicating with same. You're going to have to work in C.
The Apple resources: Accessing Hardware From Applications,the HID Class Device Interface Guide are going to be your best resources. This tech note offers a good overview as well.
The Apple System profiler will scan you USB chain to see what devices are visible to the hardware itself.
Edit01:
Can't believe I forgot about /Developer/Applications/Utilities/IORegistryExplorer. It gives you a detailed breakdown of the entire hardware tree.

Is there any Subtext IDE or equivalent Example-driven Visual Programming Language/Interface published on the Internet?

I'm really excited about this new and experimental language named Subtext. But it's author haven't released nothing about it besides some papers and videos. Should I clone it? There are similar alternatives?
UPDATE I'm looking for an example-driven VPL, not just a VPL.
As Edwards' says in his related work section, the Self programming language is very similar. It shares subtext's emphsis on directness, uniformity, and liveness, but doesn't emphasize a tabular format (Schematic tables).
A lot of of work went into the Solaris version:
http://research.sun.com/self/papers/papers.html
seems there's a Mac & linux version, not sure how mature it is:
http://selflanguage.org/
Here's a video demo'ing Self, where they emphasize directness, uniformity, and liveness:
http://www.smalltalk.org.br/movies/
When you say "any VPL", do you mean none at all, or not a run-of-the-mill one? From the wording of the title question, I'll assume the latter. Here're a couple with some serious programming theory behind them:
Morphic is/was a/the UI piece of Self, and is now ported to Squeak:
http://wiki.squeak.org/squeak/2139
Prograph was a way-cool system, but I don't know of an available version.
A bit further out there is Kahn's Toontalk, based on Pictorial Janus:
http://www.toontalk.com/
I am sure you are aware of VPL On Wikipedia that lists many different VPL languages. You have not supplied information on what you are trying to achieve but another site is Synopsis. This is a commercial product.
From their website:
Synopsis is a completely visual RAD tool for Windows that frees you from having to write textual code and learning unnecesary programming details. With Synopsis you can concentrate on creating software instead of wrestling with mundane and complex low-level development tasks.
The image below shows how this application looks:
(source: codemorphis.com)
Granted my knowledge on this subject is limited and I do follow this to see if something really powerful can be created. I did see a project on CodeProject or CodePlex that was written in C# that allowed VPL but I cant find that URL.
If I ever do find that application I will edit this post!
You haven't provided more information about features you expect from such a VPL environment, but I think that "Tersus" could be interesting thing to look at. There're many VPLs, but mainly they're targeted as educational tools or addition to particular technologies (i.e VPL for Microsoft Robotics Studio) to simplify common tasks programming. The "Tersus" is full blown application development platform. It's open source and free to download for many OSes.
http://www.tersus.com
Coherence — The Director’s Cut
The Coherence home page is up at http://coherence-lang.org. The submitted version of the paper is there, with a new intro and a surprise ending.
Coherence claims to be an experimental programming language, a continuation of Subtext using other means.
Intentional shipped, but they are still kind of alpha, with limited distribution and testing. You can make example driven DSLs, but I don't know if the environment itself works that way.
http://lambda-the-ultimate.org/node/3287
You could look at the work on eve that is happening too:
http://incidentalcomplexity.com/

What software tools did Apple use to make the iTunes Store?

I've enjoyed using the iTunes Store but I'm curious on what it was developed on (PHP & MySQL, Something Custom?).
WebObjects. It comes with XCode these days, but used to cost over $50 000! Not sure about the database backend. I seem to recall reading that it was Oracle, but I don't have a source and may have just accidentally made that up.
Joe Nuxoll former apple employee on the java posse pod cast has mentioned that they use web objects.
#Stephen Darlington is correct, it's WebObjects. The WO code generates pure Java, which is further optimized. The code has been rewritten a couple of times.
Interestingly, Dell's original BYO website was written in WebObjects, the $50,000 version back in 1996.
iTunes store is a mix of a lot of technologies, but the main one is Apple's WebObjects. WebObjects is rock solid java framework including a lot of mature technologies (templating, ORM).
WebObjects is free (correct me if i'm wrong), can be installed virtually on every platform and is not restricted on MacOSX.
WebObjects is mainly developped using eclipse and a plugin called WOLips.
There is a very active community behind this framework and the development tools.
Some links :
The official WebObjects community website
The WebObjects/Wonder/Wolips community wiki
yeah its webObjects, also you can use multiple database sources with WO and you can combine other languages with it such as JS and php
In reality webobjects has been overlooked for some time now, mainly because of its past price and that it has not been well marketed by apple
I think whatever answer you get will be 99% speculation. I would bet that if someone really did work for Apple and did have the facts they wouldn't be allowed to share them.