Recommendations for OpenGL / Scheme combination - opengl

I'd like to try out OpenGL programming in Scheme.
Can anyone give a recommendation for a decent Scheme compiler / OpenGL library combination?
I have no reservations, though it would be nice (but not a requirement) to be able to produce native, executable binaries — primarily on Windows, but also on UNIX and/or Mac OS X.
EDIT: Changed to community wiki, since the question does not have a definite answer I can accept. Thanks for the replies!

PLT Scheme includes OpenGL bindings in 2 forms, one that matches the C API, and one that's more "scheme" like in usage.
Update: PLT Scheme is now known as Racket, which also has OpenGL bindings.

Chicken Scheme has an egg that provides OpenGL bindings. IMHO, it's not well documented; if you are not familiar with OpenGL already, then this library isn't the right place to start learning.

Spark Scheme:
Spark-Scheme is a dialect of Lisp, which gives you...
Interactive, modular software development
Meta-programming facilities
Advanced control flow
Distributed computing
A comprehensive networking API
A modern GUI framework
2D/3D graphics
An SQL database engine and connectivity to third-party databases
A web server and a couple of web application frameworks

Gambit-C Has some "3rd party" Open GL bindings, available in the dumping grounds.

Related

Existing API for NLP in C++?

Is/are there existing C++ NLP API(s) out there? The closest thing I have found is CLucene, a port of Lucene. However, it seems a bit obsolete and the documentation is far from complete.
Ideally, this/these API(s) would permit tokenization, stemming and PoS tagging.
Freeling is written in C++ too, although most people just use their binaries to run the tools: http://devel.cpl.upc.edu/freeling/downloads?order=time&desc=1
Try something like DyNet, it's a generic neural net framework but most of its processes are focusing on NLP because the maintainers are creators of the NLP community.
Or perhaps Marian-NMT, it was designed for sequence-to-sequence model machine translation but potentially many NLP tasks can be structured as a sequence-to-sequence task.
Outdated
Maybe you can try Ellogon http://www.ellogon.org/ , they have GUI support and also C/C++ API for NLP too.
if you remove the restriction on c++ , you get the perfect NLTK (python)
the remaining effort is then interfacing between python and c++.
Apache Lucy would get you part of the way there. It is under active development.
Maybe you can use Weka-C++. It's the very popular Weka library for machine learning and data mining (including NLP) ported from Java to C++.
Weka supports tokenization and stemming, you'll probably need to train a classifier for PoS tagging.
I only used Weka with Java though, so I'm afraid can't give you more details on this version.
There is TurboParser by André Martins at CMU, also has a Python wrapper. There is is an online demo for it.
This project provides free (even for commercial use) state-of-the-art information extraction tools. The current release includes tools for performing named entity extraction and binary relation detection as well as tools for training custom extractors and relation detectors.
MITIE is built on top of dlib, a high-performance machine-learning library, MITIE makes use of several state-of-the-art techniques including the use of distributional word embeddings and Structural Support Vector Machines[3]. MITIE offers several pre-trained models providing varying levels of support for both English and Spanish, trained using a variety of linguistic resources (e.g., CoNLL 2003, ACE, Wikipedia, Freebase, and Gigaword). The core MITIE software is written in C++, but bindings for several other software languages including Python, R, Java, C, and MATLAB allow a user to quickly integrate MITIE into his/her own applications.
https://github.com/mit-nlp/MITIE

Three.js ported to native code?

I've been playing with WebGL quite a bit lately and I really dig Three.js. It's really lightweight and just serves as something that makes wrangling most of the GL calls a bit easier, and provides a quick way of creating basic primatives like a sphere.
Now, in native land, it seems that all the frameworks want to be so much more than that. Things like Oolong, UDK, Unity, Cocos, etc. I did a bit of googling, and the closest thing I could find was iSGL3D but I'm not thoroughly convinced it is the right answer.
Is there something more similar to Three.js that is written in native C, C++ or Objective-C that I can't find?
Here is a port of three to C++: https://github.com/jdduke/three_cpp
Core - 75% complete (TODO: Morph targets, shadows, plugin support)
Extras - 5-10% complete (TODO: Pretty much everything)
Examples - 25% complete (TODO: Examples involving morph targets an)
You're asking for a strict graphics engine only, in the same direction as OpenGL (in comparison to DirectX which again wants to be so much more than that). I'd advise Ogre3D for iPhone as the philosophy behind Ogre3d is to be a strict graphics engine.
The other one that comes to mind is recently perused MoSync mobile sdk which offers excellent OpenGL support across a wide range of platforms (albeit limited; to maintain portability).
If you're more interested in loading shaders and having the graphics engine manage the rest, I'd pick Ogre3D for iPhone.
You can always take the initiative (if you have the time of course) to write your own or start off from the ones mentioned here!
Or you can use a JavaScript engine (JSAPI for example) in a C++ editor and then move three.js on top of that. This is great as you'll only update the JSAPI and Three.js without breaking functionalities and your C++/JSThree engine will stay up to date with minimal maintenance.
Just some ideas of course!
Although I would also prefer to see a port of three.js for iOS, recently stumbled up on iSGL3d (http://isgl3d.com/).
This project serves a simple, encapsuled way to build an manipulate an opengl scene graph by code. Otherwise than some creative coding frameworks like cinder, iSGL3d comes in pure Objective C.
Works well for me yet.
You could also give Ejecta a go. They just added WebGL/three.js support.
https://github.com/phoboslab/Ejecta/tree/next
Three_cpp is good, but has stopped updating since 3 years ago. It does not support VS version below 2012.
Ogre is another good choice, which is much similar to the logic of Threejs:)
And the official site provides a very detailed tutorial, making it easy to use!
After some more searching I found a stripped down version of SIO2 called GFX that looks promising.
If you're looking for strictly ease-of-use, I'd highly recommend Panda3D. It's cross-platform (Windows, Unix, Mac), really easy to use, has extensive documentation, and a nice community around it.

Approach to developing an application across many Nokia devices

First off, greetings everyone and thank you for your interest in my question.
I'm currently working at a mobile startup. Our product is a communication app for Android, iOS and BlackBerry devices and we're looking to expand onto some Nokia platforms.
I don't know a lot about Symbian details as I've never actually programmed in the platform before but this is all of the information I was able to gather.
The platforms to support are Symbian S60, Symbian^3 / Symbian "Anna", Maemo + Meego.
In order to accomplish this, there's several tools at our disposal but we're not sure which ones to use.
Nokia Qt appears to be unsupported on Symbian S40 devices (we seem to be stuck with J2ME) and Symbian S60 devices pre-3rd Edition Feature Pack 1
On Symbian's C++ we can't rely on C++'s STL. This means that we can either create two versions of the same software or create our own STL that's compatible with Symbian (I'd like to avoid that).
Approach
Among the team the consensus seems to be to split this into two logical chunks:
Core business logic + libraries in C++
Device specific UI branches using Qt or native UI tools
With all this information in mind, I ask:
What is the general approach for this problem? Is there any considerable flaws with the one mentioned, namely incompatibility or inconsistencies with Qt on older platforms?
What pitfalls should we avoid to ensure compatibility and performance of the app across all Nokia devices listed?
Is there a way to get around Symbian's C++ limitation of the STL? Can we bundle the Qt sources somehow?
Suggestions and other approaches are welcome. Thank you for all your feedback.
You should consider that Symbian is a dying platform, so I would not invest huge development effort into a Symbian application. And even more so I would not use Symbian C++. Qt is a promising platform but Nokia/Microsoft announced that there will be no Qt port for Windows phone (which might be interesting for you).
Maybe you should support Nokia devices only by Java ME because Symbian has big market share but the most devices are not smartphones where you can run a Qt app.
Your approach sounds very idealized, but I am not sure if you can use the C++ libraries you mentioned for the business logic from Java ME. Is that possible?
There are STL implementations that are possible to use on Symbian.
I was once part of a team hat used a C++ core (with STL) on Symbian devices ranging from S60v1 to S60v5 as well as UIQ, S80 and S90. The same core was also used on windows mobile.
We used STLPort for the STL implementation, but I have been unable to find that specific version again. I do believe there are other Symbian STL implementations out there.
On the other hand S60 device have a very competent J2ME runtime, so if you have to develop a J2ME app for S40 devices you might as well use it on S60 as well.
I am not more experiences as you but according to me Qt is good for Application development.Write code once to target multiple platforms
Qt allows you to write advanced applications and UIs once, and deploy them across desktop and embedded operating systems without rewriting the source code saving time and development cost.
Thanks

Real life use for Qt (outside of Nokia)

Is Qt an interesting platform for business apps development, outside of Nokia phones ?
Why ? Strong points ?
Thanks
I like Qt because:
Very well-designed framework, e.g. signal-slot, model-view, graphics view/scene/item/proxy, painter/paint device/paint engine..., too many to be listed here!
Excellent documentation!
Cross platform language/API, as well as tools like UI designer, creator, and so on.
Rich features, e.g. graphics framework, network library, database engine, and so on.
Active community, and active development.
There should be more. If you have ever used it, you'll find it's easy to build your framework upon Qt.
I didn't have any complain to Qt. If I have to say at least one disadvantage here, "convention". You must adopt the convention of Qt, e.g. You have to use moc to make the meta object of your objects, and it's easier for developers to use Qt's vector, list, auto_ptr than STL, tr1. But I never found any issue caused by that. On the contrary, it works very well.
In my opinion, Qt is the state-of-the-art C++ framework in this modern world!
P.S. There are a lot of commercial applications built on Qt. You can find it under Qt's official website. But I'd like add one more here: Perforce, one of the top commercial source code management tools, built its client tool on Qt for Windows/Linux/Mac.
yes it is .. just look at kde apps :)
or see more applications made by qt
and it has alot of bindings in many languages
Documentation
cross-Platform IDE
further reading
may be this is not so related to the question ... but my first deal with qt was just great starting from their well organized Documentation to their great widgets
the GraphicsView is just ammazing ! :)
It's about the only current/modern C++ gui library on Windows.
MFC is so old you have to write comments in Latin
WTL would be nice if they had finished it before abandoning it.
Winforms/WPF + managed C++/CLR - all the fun of several incompatible new technologies at once.
Bad points:
To fit on lots of platforms they have invented their own solutions to things that are now in the STL/Boost
The signal/slot mechanism - tricky to debug and silently fails (with no error) with simple typos.
Although everything is possible it's sometimes a lot of effort to do simple things (they do love MVC) compared to Winforms.
Qt is simple
Qt is powerful
Qt is NATIVELY-CROSS-PLATFORM
Qt is REALLY-CROSS-PLATFORM
Qt is comprehensive (but the Media side of it still needs to grow)
Qt doesn't require Garbage Collection, but it embeds a GREAT model of memory management that makes you forget about memory deallocation
Qt is solid
Qt is modern
Qt proposes some new paradigm of programming that are really good (Signals-Slots)
Qt runs a lot of VERY successful software: (Skype, Google Earth...)
Are those points strong enough?
Maybe you have heard about Google Earth which happens to be programmed in Qt too.
That aside, I like Qt for my in-house development because it
is very well supported and documented,
allows me to write simple and decent-looking apps that are
works cross-platform for Windows and Linux with little effort, and
contains nice to have components for database access, regexps, guis, xml, ...
I also use the Qwt widgets for easy real-time plotting on top of Qt.
I really dont understand whats the point in underestimating tools/frameworks which makes things easy for programmers. Qt is too good for GUI development, I would say its much better than any current existing crossplatform app development suite.
So many advantages, I have been using it for more than three years now for a product to be deployed in Linux/Win environments. The app is thread intensive and initially we had a tough time using pthreads and its conterpart for windows. Then we switched to Qt(and QThreads eventually) and things were a breeze...
Backed by active development, a highly helpful and supportive community along with excellent documentation, training, certification programs, videos, forums... its easy, fast and effective to develop in Qt. You should see the video which they create a web browser in just five mins!
Its really 'cross platform', and it doesnt have a software wrapper(like Java does) to enable this which makes it faster. Cmon, we all know java apps have buttons which takes a second to respond to even a simple 'click'.
I hope Qt will someday do a take on Java. :D
after all, 350000 developers cant be wrong when they chose Qt.
Pixar uses Qt (or at least, used, as of 2005) internally for certain parts of their tool suite (called "Marionette" in the marketing) collectively called Menv, ("men-vee" for Modelling ENVironment)---at least for their lighting sub-tool Lumos.

What is the best approach to use openGL in the web?

I wrote a program in C++/OpenGL (using Dev-C++ compiler) for my calculus 2 class. The teacher liked the program and he requested me to somehow put it online so that instead of downloading the .exe I can just run it on the web browser. Kinda like java applets run on the browser.
The question is:
How if possible, can I display a C++/OpenGL program in a web browser?
I am thinking of moving to JOGL which is a java interpretation of OpenGL but I rather stay in C++ since I am more familiar with it.
Also is there any other better and easier 3D web base API that I can consider?
There is a lot activity recently with WebGL. It is a binding for Javascript to native OpenGL ES 2.0 implementations, designed as an extension of the canvas HTML5 element.
It is supported by the nightly builds of Firefox, Safari, Chrome and Opera.
Have a look at these tutorials, based on the well known NeHe OpenGL tutorials.
Several projects based on WebGL are emerging, most notably Scenegraphs APIs.
From Indie teams: SceneJS, GLGE, SpiderGL.
From Google: the team behind O3D plugin is trying to implement a pure WebGL backend (source) for the project, so that no plugin will be necessary.
From W3C/Web3D: There is an ongoing discussion to include X3D as part of any HTML5 DOM tree, much like SVG in HTML4. The X3DOM project was born last year to support this idea. Now it is using WebGL as its render backend, and is version 1.0 since March 2010.
I'm almost sure that WebGL is the way to go in the near future. Mozilla/Google/Apple/Opera are promoting it, and if the technology works and there is sufficient customer/developer demand, maybe Microsoft will implement it on IE (let's hope that there will be no "WebDX"!).
AFAIK, there's only 3 options:
Java. it includes the whole OpenGL stack.
Google's Native Client (NaCL), essentially it's a plugin that let's you run executable x86 code. Just compile it and call it from HTML. Highly experimental, and nobody will have it already installed. Not sure if it gives you access to OpenGL libraries.
Canvas:3D. Another very experimental project. This is an accelerated 3D API accessible from JavaScript. AFAICT, it's only on experimental builds of Firefox.
I'd go for Java, if at all.
OTOH, if it's mostly vectorial works (without lots of textures and illumination/shadows), you might make it work on SVG simply by projecting your vectors from 3D to 2D. In that case, you can achieve cross-browser compatibility using SVGWeb, it's a simple JavaScript library that allows you to transparently use either the browser's native SVG support or a Flash-based SVG renderer.
Do you really have the time to rewrite it? I thought students were meant to be too busy for non-essential assignment work.
But if you really want to do it, perhaps a preview of it running as a flash movie is the easiest way. Then it's just a matter of doing that and you could provide a download link to the real application if people are interested.
Outside of Java, in-browser OpenGL is really in its infancy. Google's launched a really cool API and plugin for it though. It's called O3D:
http://code.google.com/apis/o3d/
Article about the overall initiative:
http://www.macworld.com/article/142079/2009/08/webgl.html
It's not OpenGL, but the Web3D Consortium's X3D specification may be of interest.
Another solution is to use Emscripten (a source-to-source compiler).
Emscripten supports C/C++ and OpenGL and will translate the source into html/JavaScript.
To use Emscripten you will need to use SDL as a platform abstraction layer (for getting an OpenGL context as well as loading images).
Emscripten is currently being used in Unreal Engine and will also be used in the Unity 5 engine.
Read more about the project here:
https://github.com/kripken/emscripten
Two approaches:
Switch to Java. However, your application will suffer from a loss of performance as a trade off for portability. But since Java is everywhere, this approach ensures that your code can be executed in most browsers.
Use ActiveX, which allows you to run native binary code for Microsoft Windows. This is not recommended in production because activeX is well known as a potential security hole, but since your lecturer is the one viewing it, security doesn't seem to be a big deal. This is applicable for Microsoft platform (Windows+IE) only.