Forums

is Cobra for me or quest for perfect language

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

is Cobra for me or quest for perfect language

Postby gourD » Mon May 27, 2013 11:53 pm

Hello,

tl;dr: I'm looking for the most adequate language to be used for multi-platform desktop app and here are some questions in regard and some feedback about my current findings as well.

Despite all the hype about web/cloud/JS/HTML5/mobile/whatever, I still believe and have need for good old desktop GUI application.

Linux (Debian) is my native platform and although I have not access to Mac OS machine, while Win XP is only present under by vbox, still I'd like to offer my future open-source project to those users.

During my education I had to encounter many mostly imperative languages and did my thesis using Zortech C++ compiler. It was many years ago and then some years back I decided to 'come back' to programming to write something for my own needs.

I belive that in 21st century programmer deserves something better than C(++), so those are languages which I do not want to use trying to avoid fiddling with pointer bugs etc. That's why I'm looking for some statically typed language providing some memory safety, being pleasurable to program in etc.

Few years ago I tried with Haskell - like the language and its syntax, FP makes lot of sense to me, but I realized that it seems one has to read to many academic papers in order to properly use it...I could not say I did grok monads and few potential contributors for my project simply run away in fear considering Haskell's steep learning curve.

I did postpone project being busy with life...and sometime ago, I did resumy my quest for 'perfect'* language.

*: don't worry, I'm well aware there is no such thing in this material world. :mrgreen:

Looking for something similar to Haskell, but more pragmatic, I evaluated D for some time, but after watching the community, I noticed that there is not much interest in GUI apps, and at the current moment there are only GtkD bindings mostly maintained by single person.

Moreover, it looks as D is not memory-safe (yet) as advertised and minor compiler released break the code.

The search has brought me to OCaml as well, which sounds as 'practical Haskell', but considering that I want to write desktop GUI application, I concluded that maybe FP language is not the most appropriate tool considering that almost all GUI libs are OO-ed. (GUI apps are also not OCaml's niche.)

The next on the list was/is Ada which brings some nice features in he 2012 release, actively maintained, bus-factor > 1 community etc.

Moreover, there are Qt bindings available which is big plus.

Let me say that I'm mostly running gtk apps on my Linux Debian desktop and was using Xfce for long time (recently switched to just i3 wm).

However, I never did any gtk programming, heard from many devs how they are displeased with move to gtk3 which breaks API too often and general strategy in regard to the future of gtk+ development. Many do not plan at all to move to gtk3...

Another consideration is that there are practically no devs working on Win & Mac OS ports and gtk apps does not look great, especially on Mac (as I'm told).

For long time I really liked wx since it's practically the only toolkit providing native look on every platform, but realizing how long they are not able to release 3.0 (it looks as only one man is working on it), it seems that using Qt is the best bet for the future - iow. the least bad choice. :roll:

While evaluating Ada, I heard and tried Nimrod - very nice language, with clean syntax, but very small community and only gtk bindings. FFI provides for calling C, but to get Qt bindings is probably not easy, so I was almost settled to use Ada and even placed an order for the Barnes 95 book which got lost on the way to Croatia which made me thinking that maybe I should consider something else.

One option, which looks as last resort, is too simply use Python + PyQt and resolve all potential GUI-related problems and use Cython to improve performance when needed as well as to provide nice higher-level pythonic API for the 3rd aprty C library which we need for some number crunching.

Here, I also tried Nuitka and consider(ed) PyPy.

Then, by reading interesting post I did find about Cobra. 8-) (Yesterday I also inquired about Felix which seems very interesting and powerful, but probably too close to C++. We also quickly dismissed Haxe.) Here is also Rust, actively developed, backed up by Mozilla, but syntax is not thrilling and no GUI bindings (yet).

Now let me say few things which I like very much about Cobra:
[*] very nice & clean syntax and considering I'm going to use Python/Django for web development, there would be less gear-changing if using Cobra :)
[*] active development
[*] nice web site with plenty of documentation
[*] language features with some FP spices
[*] availability of several GUI bindings (qt, gtk, wx), afaict
[*] (probably) decent performance due to compiled language

There are some things which I'd like to see, but probably/hopefully not of topmost priority:
[*] using some DVCS (e.g. git) instead of svn for code repo
[*] larger community
[*] packages available for Linux distros as well as Win/Mac installers
[*] mailing list (possibly subscribed to Gmane) instead of web forum

Disclaimer: let me say that all the above points are not based using of Cobra, but it's just my observation.

Now something about my main concern:

[*] dependancy on .NET/Mono

In listing several languages which I considered so far, I didn't mention some important ones like the those in Lisp-family since too much parens is not my taste and those langs are usually not really meant for GUI apps.

As far as Java is concerned, I really never like the language (starting with its syntax) up to the (false) promises of write-once-run-everywhere along with its GUI-ugliness, so I'm also not so excited about JVM port and do not use any Java app.

C# was considered briefly, but the syntax is also too noisy for me, although I understand it's nice & powerful language.

However, I do fear what might happen in the future with Mono 'cause one never knows with Microsoft when it comes to open-source projects.

After I had some chat with Charles on IRC yesterday, I went to read Mono wikipedia page which has Mono and Microsoft's patents section which few footnoes leading to stuff like:
[*] Microsoft's Empty Promise
[*] Why free software shouldn't depend on Mono or C#
[*] Fedora is concerned about Mono

I fully understand Charles' decision to not re-invent the wheel and take advantage of the whole and mature ecosystem and work on the essential issue - language itself.

If someone would pay me to work on the project using Cobra, I probably wouldn't think twice, but since I plan to invest my precious free time (being family man with kid, struggling with my own business etc.), the last thing which I'd like is to have to rewrite the whole thing in a few years due to some stupid licensing issues. :cry:

The author of Felix when replying to my post wrote nicely: "The desire is not surprising but the ability limited." alluding to the choices of adequate programming language if one wants to avoid C(++).

Now, if I try to summarize everything, there are few possible alternatives to Cobra which raises some questions:

[*] Ada has gtk/qt bindings, bigger community, real company behind the (GNAT) compiler, modern features like contracts, concurrent/parallel programming (taking advantage of multi-core CPUs), so I wonder why to e.g. choose Cobra over it? :?

[*] Nimrod compiles to native C code, has clean syntax, gtk bindings (which seems to be preferrable even with Cobra), (probably) the same/similar size of community and/or number of core devs (btw. is Charles the only core Cobra dev?) so why to choose Cobra over it? :?

[*] PyQt+Cython is mature combination, lot of support, but probably worser performance and/or fiddling with dynamic typing only and associated runtime errors, so considering that Cobra is very close to Python in some aspects, maybe it's easier to decide in this case, but I'll still appreciate any input. ;)

I apologize for longer post, but I hope it will help some potential Cobra users in the future finding themselves in a similar situation. :oops:

Anyone can shed some light? :idea:
gourD
 
Posts: 40
Location: Hlapičina (Croatia)

Re: is Cobra for me or quest for perfect language

Postby Charles » Tue May 28, 2013 12:18 am

Well that's a lot of stuff to try to shed light on. :D

Contributors

"Hopscc" is a regular Cobra compiler contributor. I process all patches however, so my name goes on the check-in, but you'll see the comment check-in will say something like:

Fixed: blah blah
credit:hopscc

And "nerdzero" is the lead on the MonoDevelop/XamarinStudio IDE support for Cobra.

There are others who provide testing, feedback and occasional patches, via the tickets, forums or direct e-mail. I try to remember to list them in the release notes which you can find on the wiki.

Mono FUD

I feel that the issues around Mono amount to a bunch of FUD. It's open source under the MIT license and the core .NET components are ECMA and ISO standards. I feel like the real problem is karma. Microsoft engaged in FUD in the past and now is getting it back. "Something scary may happen in the future..."

Qt

I notice that Qt is a big decision point for you. If that's the case, you should verify that the .NET/Mono bindings for Qt are up to date and usable. I know nothing current about that project as I don't use Qt myself.

Languages

Regarding all the languages you mentioned, it sounds like you already know what you like and dislike about them.

Linux

You asked for "packages available for Linux distros as well as Win/Mac installers", but the Mac and Linux installers are identical. The releases are source based with an "install-from-workspace" script that handles everything. There is one for Windows and one for Mac/Linux/BSD.

If you meant you want to do "apt-get cobra-language" or similar, that's up to you guys. I'm on the hook for source releases and people want binary releases, someone besides me will have to volunteer for that.

Other Views

Although I've replied here, I encourage others to share any additional thoughts they have on these topics.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: is Cobra for me or quest for perfect language

Postby gourD » Tue May 28, 2013 12:45 am

Charles wrote:Well that's a lot of stuff to try to shed light on. :D

Well, I'm sure, based on your work, that you have strong torchlight. :lol:

Contributors

"Hopscc" is a regular Cobra compiler contributor. I process all patches however, so my name goes on the check-in, but you'll see the comment check-in will say something like:

Fixed: blah blah
credit:hopscc



Heh, that's good point to move to e.g. git. ;)

And "nerdzero" is the lead on the MonoDevelop/XamarinStudio IDE support for Cobra.


I tried MonoDevelop once when it got D plugin, but I'm sure I'll settle on Sublime Text editor.

There are others who provide testing, feedback and occasional patches, via the tickets, forums or direct e-mail. I try to remember to list them in the release notes which you can find on the wiki.


OK, bus-factor >= 1, let's hope it will improve.

I feel that the issues around Mono amount to a bunch of FUD. It's open source under the MIT license and the core .NET components are ECMA and ISO standards.


Now I'm looking on Mono site and see there is Mono available for Mac OS X, Linux and Windows. Otoh, Cobra site lists reqs as:

Requirements: Microsoft .NET 2.0+ on Windows, or Novell Mono 2.6+ on any other platform (Mac OS X, Linux, BSD, Solaris, etc.)


so I wonder is it possible, in general, to use Mono on Windows and/or why is Cobra requiring .NET?

In case something 'scary would happen', people would hopefully just switch to Mono, even on Win OS?

I feel like the real problem is karma. Microsoft engaged in FUD in the past and now is getting it back. "Something scary may happen in the future..."


Karma is certainly the cause of all problems. :lol: Still, I wonder what is the profit for Microsoft of having .NET for non-Windows OS-es?

I notice that Qt is a big decision point for you. If that's the case, you should verify that the .NET/Mono bindings for Qt are up to date and usable.


Well, it simply looks as the best GUI toolkit for multi-platform project. I'll check the status of Qt bindings.

What is with wxnet & Cobra?

I know nothing current about that project as I don't use Qt myself.


Which platform(s) do you use and/or develop on?

You asked for "packages available for Linux distros as well as Win/Mac installers", but the Mac and Linux installers are identical. The releases are source based with an "install-from-workspace" script that handles everything. There is one for Windows and one for Mac/Linux/BSD.


OK.

When we speak about installers, there is one thing I forgot to ask about: what is the situation for build system for Cobra?

Is there something capable of building the whole project along with 3rd party C lib and its bindings, as well as building user docs based on reST/Sphinx?

If you meant you want to do "apt-get cobra-language" or similar, that's up to you guys. I'm on the hook for source releases and people want binary releases, someone besides me will have to volunteer for that.


OK, that's fair-enough, although ability to do 'apt-get cobra language' helps promoting the language. ;)
gourD
 
Posts: 40
Location: Hlapičina (Croatia)

Re: is Cobra for me or quest for perfect language

Postby Charles » Tue May 28, 2013 12:59 am

I tried MonoDevelop once when it got D plugin, but I'm sure I'll settle on Sublime Text editor.


Re: Cobra, you might change your mind when you realize that Xamarin Studio is going to give you breakpoints and autocompletion. I have no doubt that Sublime is a sweet editor, but those IDE features are major productivity boosters.

Yes, you can use Mono on Windows, but I never bother since I already have .NET and it's the same classes.

My understanding is that the "something scary" regarding Mono is that Mono gets its plug pulled. Microsoft is not going to pull the plug on its own .NET. If push came to shove, we would add another back-end to Cobra like C, Objective-C or JVM.

Still, I wonder what is the profit for Microsoft of having .NET for non-Windows OS-es?


Well there's no expense or revenue for Microsoft. Other people created Mono. Mostly what MS can get out of it is deflecting criticisms from the Java community that .NET only runs on Windows.

What is with wxnet & Cobra?


I only use GTK, so I don't know.

Which platform(s) do you use and/or develop on?


For Cobra, for me, it's about 90% on Mac, 9% on Windows and 1% on Linux. This server is a Linux box, but I don't develop on it.

hopscc is on Windows.

nerdzero is mostly on Linux, but also tests the IDE support on Windows.

Re: build system, you would use one of the following:
* xbuild/msbuild
* NAnt
* Makefile
* Your own script

Re: docs, we have a doc generator, but no well defined doc syntax at this time.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: is Cobra for me or quest for perfect language

Postby gourD » Tue May 28, 2013 1:15 am

Charles wrote:Re: Cobra, you might change your mind when you realize that Xamarin Studio is going to give you breakpoints and autocompletion. I have no doubt that Sublime is a sweet editor, but those IDE features are major productivity boosters.


I spent my time with Emacs (and felt pain in my wrist) and Vim, but now I like ST for not having to fiddle with so many config files and it looks quite good for Python/Django.

My understanding is that the "something scary" regarding Mono is that Mono gets its plug pulled. If push came to shove, we would add another back-end to Cobra like C, Objective-C or JVM.


I'm happy seeing you're quite optimistic in regard. :D

I only use GTK, so I don't know...For Cobra, for me, it's about 90% on Mac


Interesting...does GTK look good-enough for you as Mac user?

Re: build system, you would use one of the following:
* xbuild/msbuild
* NAnt


Thank you. Will take a look at some of the above two.

Re: docs, we have a doc generator, but no well defined doc syntax at this time.


Doc generator in the sense of generating API or for end user manuals as well?

Any plan in regard for the future?
gourD
 
Posts: 40
Location: Hlapičina (Croatia)

Re: is Cobra for me or quest for perfect language

Postby Charles » Tue May 28, 2013 1:26 am

My understanding is that the "something scary" regarding Mono is that Mono gets its plug pulled. If push came to shove, we would add another back-end to Cobra like C, Objective-C or JVM.


I'm happy seeing you're quite optimistic in regard. :D


I don't know if you're aware of this, but we already have the JVM back-end passing some of the test cases. Mostly done by hopscc. The current difficulty imo is the many differences between .NET and JVM. While some are easy to smooth out, others are not.

Interesting...does GTK look good-enough for you as Mac user?


Not out of the box, not really. But for personal projects, I don't mind. Like I said, Xamarin Studio does look nice, but there is some extra work needed to make it look "Mac friendly".

Re: docs, we have a doc generator, but no well defined doc syntax at this time.


Doc generator in the sense of generating API or for end user manuals as well?

Any plan in regard for the future?

I meant in the API sense.

Yes, we'll eventually have a formal syntax for docs. It won't be XML like C#. It will probably look like either Java or Python. But I can't say we have a timeline for it.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: is Cobra for me or quest for perfect language

Postby gourD » Tue May 28, 2013 1:42 am

Charles wrote:I don't know if you're aware of this, but we already have the JVM back-end passing some of the test cases.


Yes, I'm aware of it, but not sure whether it would bring something to me GUI-wise? I'm afraid it won't.

Not out of the box, not really. But for personal projects, I don't mind. Like I said, Xamarin Studio does look nice, but there is some extra work needed to make it look "Mac friendly".


Thank you. If it is 'doable', that's good. GTK is any case lighter toolkit, although my previous concerns about remain.

Yes, we'll eventually have a formal syntax for docs. It won't be XML like C#. It will probably look like either Java or Python. But I can't say we have a timeline for it.


Nice news. ;)
gourD
 
Posts: 40
Location: Hlapičina (Croatia)

Re: is Cobra for me or quest for perfect language

Postby gourD » Tue May 28, 2013 1:44 am

Charles wrote:Re: Cobra, you might change your mind when you realize that Xamarin Studio is going to give you breakpoints and autocompletion.


But Xamarin Studio is not available for Linux, right? And MonoDevelop is another project/app?
gourD
 
Posts: 40
Location: Hlapičina (Croatia)

Re: is Cobra for me or quest for perfect language

Postby nerdzero » Tue May 28, 2013 2:54 am

Hi gourD! Welcome to the forums.
gourD wrote:But Xamarin Studio is not available for Linux, right? And MonoDevelop is another project/app?

I haven't read through this entire thread yet, but on this bit, I can say that you can think of it like MonoDevelop is to Xamarin Studio as Chromium is to Google Chrome. It's not officially like that but ends up being that way in practice (one is used as the open source basis for the other).

I believe packages for MonoDevelop 4.0.5 just hit the unstable repos for Debian not that long ago.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: is Cobra for me or quest for perfect language

Postby gourD » Tue May 28, 2013 3:33 am

nerdzero wrote:Hi gourD! Welcome to the forums.


Thank you. 8-)

gourD wrote:But Xamarin Studio is not available for Linux, right? And MonoDevelop is another project/app?

I haven't read through this entire thread yet, but on this bit, I can say that you can think of it like MonoDevelop is to Xamarin Studio as Chromium is to Google Chrome. It's not officially like that but ends up being that way in practice (one is used as the open source basis for the other).


After posted to the forums, as it usually happens, I've found out that it's now more or less the same project where XStudio just have some add-ons for commercial users.

Of course, I stumbled upon some rants as well comparing Mono/Qt with Xamarin/Digia due to making linux users as 2nd class citizens. :lol:

I believe packages for MonoDevelop 4.0.5 just hit the unstable repos for Debian not that long ago.


Yep, installed Mono/MonoDevelop on my Debian box along with Cobra add-on and built my 1st Cobra 'program'. Looks awesome!! 8-)

I noticed that monodoc is still the old one?

Otoh, add-on for Sublime Text does not work - iow. no syntax highlighting at all. :?

Nowe have to explore about build systems (mostly xbuild) and some tool for helping binding C libs...
gourD
 
Posts: 40
Location: Hlapičina (Croatia)

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 33 guests