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

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).

Related

Ironpython questions

I have a few questions that I hope clarity and facts can be fed all of us about this. First, the last release of ironpython had the feature of running on the mobile platform highlighting that on mono/android it runs best and not so much on the other platforms which are IOS and Windows phone. So does this mean one doesn't have to use the SL4A? Can i argue that monodroid hooks into the core of what android is capable of and so might give a more robust access/implementation/rendition of apps on android?
Next, I just want to be sure of this: As with python you can create full fledged desktop applications with ironpython right? Cos everywhere (almost) I see ironpython they refer to it as a scripting tool and how you can script aspects of excel etc which has prompted me ask such a question. some say that the speed of applications written using ironpython is not that great and I was arguing asking for why that opinion is held by those who were speaking and no one could say anything worthwhile.
Lastly, with the movement at novell and xamarin, I have not understood where mono stands in their release schemes. I have a mac and I installed a recent version of mono and when I typed ipy I saw something like mono 1.1.0 or something like that. Does anyone have a clue of what is going on with it.
I fell in love with python from learning ironpython and I think the ironpython concept is just sheer brilliance its a pity microsoft esteemed F# other it.
First off, for future reference, multiple questions should really be, well, multiple questions. :)
On IronPython for Android: it works slightly better than on other platforms (where it doesn't work at all right now) but it's still very, very early code. There are some limitations with what you'll be able to do (mainly, you cannot inherit from Java classes from dynamic code). It's very experimental.
On desktop apps: You can absolutely write full apps in IronPython. There are some samples that show how it can be done. In particular, PyWpfSample and PyGtkSample. Startup times are not great, but the actual runtime should be just fine for most GUI apps.

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.

guidelines for developing a small Mac OSX project

I'm a .NET developer with some questions about a small Mac project coming up.
We are going to be creating a small program for Mac OSX. The software will need to have a simple UI (1 screen) and will need to consume a WCF web service.
Should we code on our Windows boxes or on Mac machines? We have a couple Mac Minis, but we mostly do Windows development.
What IDE/dev environment should we use? (Eclipse, Xcode, etc.)
How does Mac software deployment generally work?
...
No one has mentioned Java/Eclipse. Isn't that an option?
Here are two options:
Write in Objective-C, using Xcode on Macs
Write in C#, using Mono on Windows or on a Mac with SharpDevelop
The advantage of #1 is the resulting app will be much easier to deploy to others, but you might have trouble consuming the WCF service. It depends on what exact interface you are exposing and what the types of the parameters are.
The advantage of #2 is that you can use your C# skills. I don't know the state of WCF in Mono, and the GUI may not look native.
If you go with #1, the main issue will be using Objective-C. Since you are targeting the Mac, make sure you enable the Garbage Collector, or else you will have to also learn memory-management. If you use Xcode 4, it's similar in spirit to Visual Studio, although the details are different. For a simple project, following the tutorials will probably be enough -- I suspect the hard part will be interacting with WCF. To make your life easier, make the interface to the service extremely simple (simple parameter types and returns).
Your question is overly broad. You have two options:
When in Rome...: download Xcode, look at example apps, read Apple's documentation, find some tutorials, and learn Mac app development the usual way.
The Devil You Know...: look into stuff like the Mono project that will let you write a Mac app in C#, so you can use your existing libraries and don't have to learn Objective-C.
Which is better depends on your needs. If you just want to get a small app done and don't have a lot of time/money, I'd go with #2. If you're concerned about quality (compatibility libraries always have their quirks), I'd go with #1. My gut says #2 is better for you.

What language is used when developing apps for multiple platforms?

I just caught one of Google's commercials for Chrome where at the end they mention that it runs on Linux, Mac, and PC. So I started wondering how they are able to develop a program that can run on multiple platforms like that? I have experience with Java, and .Net but only on a windows machine. Java is by design portable, but I wouldn't think Google is using Java for something like Chrome where performance is such a concern.
I understand that each version is going to have some platform specific code, such as for the UI. But there must also be some central code that is reused across each platform. What language is this written in?
Here is an entire article about the development of Chrome. It's mostly written in C++.
Chrome is written in C++, so they will have a significant amount of platform-specific code for each OS. They most likely maintain a separate branch for each OS.
Any reasonably standardized and popular language will do, because the goal is to compile it on all platforms, not create one binary that will work on Windows, MacOSX, Linux, and z/OS. C and C++ are popular choices, because they'll work readily with pretty much anything. Java is a good choice, because it runs on pretty much everything. For applications with low performance requirements, Perl and Python are good.
The important point is to separate out what is platform-dependent from what isn't, since (except in the case of Java or scripting languages) it will probably be necessary to rewrite platform-specific stuff for each platform, and not necessarily in the same language. MacOSX is best programmed in Objective-C, and that's true for no other popular platform.
The programs are supposed to be portable in source level, not binary level. So you only need to compile it for different platforms, not necessary to make one universal binary. In fact, most languages are supported in all modern platforms including UNIX/Windows/Mac, so you can choose from almost all modern lanagues, which C/C++ is prefered by many people. BTW, C++ is the language of Chrome.
Scripting languages like Python/Perl are also good choices. One more thing, Java can be faster than you think - see Eclipse. Even without JNI Technology, Java is still good enough for most applications like JDownloader.
Google had to build different distributions for each OS (ie compiled for each platform as Francis's answer explains) - in fact the Mac OS version only recently became available - the Windows version has been around much longer.
Google Apps are 'thin applications' - the grunt-work is done on their servers.
The Apps are portable in the sense that the front-end is put together using HTML, CSS and Javascript - which are standard (in theory at least) across all browsers.
Google put a lot of effort into building Chrome's Javascript engine to be performant - to ensure any client-side logic is run quickly.

Qt4.5 vs Cocoa for native Mac UI

I've been developing for Windows and *nix platforms for quite some time, and am looking to move into Mac development. I am tossing up between using ObjC/Cocoa and C++/Qt4.5.
The C++/moc semantics make more sense to me, and improving knowledge in Qt seems like a sensible thing to do given that you end up with a skill set that covers more platforms.
Am I likely to handicap my applications by skipping Cocoa?
The sample Qt applications look pretty Mac-native to me, but they are quite simple so potentially don't tell the whole story. Are there other pros to the Xcode way that Qt doesn't have, such as packaging, deployment, etc.?
Here's an easy way to answer it:
If you were developing a Windows app with .NET or MFC, would you handicap your applications by using Qt? If the answer to that is yes, then the situation is likely to be the same on the Mac.
A few negatives I can think of off the top of my head:
Licensing
Qt apps, while good, are not completely a native UI experience and there's things a native UI designer can do in Cocoa which boggle the mind. While I can't be sure that all the same functionality isn't available in Qt, I doubt it.
Qt is always a little behind. If Microsoft or Apple come out with a great new technology, you have to wait for the Qt developers to update Qt.
However, with all that said, only you can determine the business value of using Qt. If you think cross-platform development is going to be a major part of your development, then Qt might be worth it, despite the issues mentioned.
Ask yourself: how many of the best Mac applications that you know of use Qt instead of native Cocoa?
For our robotic systems, we originally wrote our control software in C++ using the cross-platform wxWidgets library (we avoided Qt due to some licensing concerns), because we felt that we had to target Windows, Linux, and Mac platforms for our end users. This is what we shipped for over a year until I started tinkering with Cocoa.
Right away, the thing that most impressed me was how quickly you could develop using Cocoa. Eventually, we decided to drop support for Linux and Windows and rewrite our entire control applications in Cocoa. What had taken us years to put together in C++ required only three months to completely reimplement in Cocoa.
Aside from the "lowest common denominator" interface issues that others have pointed out, the rapid development allowed by Cocoa has become a competitive advantage for our company. Our software has advanced far more quickly since our conversion to Cocoa, and it has allowed us as a new company with one developer to pull even with 10-year-old competitors that have 20-man development teams. This appears to be a common story in the Mac development space, where you see a lot of small teams who are able to create products that compete with those of much larger companies.
As a final note, using Cocoa gives you the ability to stay on top of the new APIs Apple is continually rolling out. We're now working on a new control interface that will make heavy use of Core Animation, something that would be painful to deal with using Qt.
I'm currently developing both with QT (actually PyQT, but it makes no difference to your question) and native Cocoa app. For me it's no brainer, I'd chose Cocoa. It's really worth time to explore Cocoa in general, there are many great concepts within the Cocoa framework, and Objective-C 2.0 as well.
I'd use Qt if you want this to be a crossplatform application.
You can have a look at the QMacCocoaViewContainer class. It acts as some kind of wrapper for generic Cocoa views, so you can also have Cocoa elements which are not officially supported by Qt.
Of course this means learning a little about Cocoa and Objective C and how a Cocoa UI would need to look like. But if you already know Qt well and if it’s not like your application is all and only about the GUI this could be a good way to go.
And don’t forget about the QMacStyle::WidgetSizePolicy or you won’t understand why your tables come out so huge.
Obviously, the best option is to use a cross platform suite that supports native widgets.
With QT4 you can build your base user interface. Then just add native support for your specific target platform.
Sure, Cocoa has a lot of fancy stuff (and you can still use them trough QT4), but let me be clear. I see a lot of fancy Apps on the AppStore, pretty ones, but most of then are just crap, expensive.. what ever. I really missed my Kate text editor, my okular viewer, my krita drawing software... those are just better than the commercial and expensive alternatives and are free. so i just tweak the source code a little bit too have a REAL native and great experience.
What if i have to use a linux app on my main computer with is a mac os x? or windows? or whatever? only?
For example, why on earth i have to buy a expensive ,fancy but far less featured image editor software for my mac like pixelmator when i can use a full featured real image manipulation software like Gimp? YES Gimp is gtk2 based which is a pain on any platform, specially on Mac because is really ugly. Gimp should be ported to QT4. Inkscape should be ported to QT4 too, and it would feel so great.
Is so simple to do.. gosh!
http://doc.qt.nokia.com/4.7-snapshot/demos-macmainwindow.html
Even you can add support for the the new native lion fullscreen feature, unified title and toolbar menus, etc
I , as a user, i really care about efficient, featured, good and cross platform apps, i don't really care about developer's convenience or laziness .
I do a lot of cross-platform development (Mac, Windows, Linux), and for some projects use Qt. It is a fine framework, and provides a rich class library. If you need to deploy on multiple platforms, cannot afford to spend the time/effort on platform-specific front-ends, or the "generic" support for each platform is sufficiently good, then use Qt.
However, Qt inevitably suffers in some ways from the lowest common denominator syndrome, and sometimes does not feel quite native enough. There are also certain features that are either difficult to support, or are simply not provided in the Qt libraries. So if you can afford the time and effort, or your app really demands the attention to detail and fit & finish, then developing separate front-ends may be worth it.
In either case, you ought to be writing your back-end (aka domain) code in a platform-neutral and front-end neutral manner. This way, the front-end is easily replaced, or modified between platforms.
You could always start with a Qt front-end and go for a quick time to market, then develop a native front-end down the line.
In practice, I've noticed that a Qt app on Windows looks most "native", while on Mac there are certain subtle telltale signs that make it look/feel not quite right. And Mac users tend to have much higher expectations when it comes to UI/UX!
Since posting this, i've been learning the Cocoa / Objective-C way, and have been quite impressed. Despite what I initially thought was quite a quirky syntax, Objc appears to be a very effective language for implementing UI code, and the XCode sugar - things like Core Data and bindings - make short work of all of the boring bits.
I spent a while with the QT examples and documentation before digging into cocoa, and tend to agree with what has been said above w.r.t being slightly behind the curve and less 'aqua-ish' - albeit from a fairly trivial inspection. If I absolutely had to be build a cross-platform app i'd probably use QT rather than trying to separate out the UI code, as it seems like it would provide close-enough visuals, but for mac only purposes, Cocoa seems like a definite win.
Thanks all for your responses, they've all been very helpful!
DO NOT use Qt for a Mac app. You will get no hardware acceleration for 2D rendering, and you will not be able to deliver ADA compliance.
Depending on what kind of apps you want to write, another contender is REALbasic now called Xojo.
The move from C++ is pretty easy (I have 15 years C++ experience) and the framework and IDE extremely productive. You have the added bonus of being able to deploy to Linux and Windows with trivial effort. Their framework compiles to native code and uses native widgets so you don't have an emulated look and feel.
The big reason for learning Cocoa and coding in Objective-C is if you want to hone your iPhone skills or are chasing a really fancy user experience. If you wanted to rival the cutting edge of WPF development then I'd recommend Cocoa.