As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I see that Ruby is a big success when it comes to web programming. However, for desktop applictions and scripts, I do not see it being heavily used. In fact, in most of the Linux distros, it does not come installed by default. Most applications are coded in Python and some are in Perl. What advantages can Ruby offer over Python when it comes to desktop applications and scrips? If i am writing one Linux application, say a music player, how Ruby blocks and metaprogramming techniques can help?
Edit:
I see that some have opted for close this question because it can escalate into a Language war, perhaps. Fear not, I am a day-time Python programmer. I am trying to reconcile these seemingly incompatible observations. It is fact that most Linux distros do not come with a ruby installed. It is also a fact that most Linux apps are coded in Python. And it is also a fact that Ruby has more advanced meta-programming features than Python, which can make development easier. I am wondering why Ruby is not used as much in Linux application development, which has been a playground for scripting languages.
Python has become popular on the Linux side because many distributions have built their various front-end tools using it so it's guaranteed to be available.
Ruby does have Qt bindings that might be what you're looking for and it's possible to write wrappers for any C or C++ library you need to interface with.
In the end it all comes down to finding a suitable example to learn from. You may find that there are far more Python examples to refer to and this may affect your decision.
Both languages are equally capable on the whole and the default distributions are similar in terms of performance. Python's new PyPy compiler is faster if you don't mind sticking to Python 2.7, and there's also Rubinius which is an effort to boost Ruby's performance.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am curious about this. I must learn Prolog for my course, but the applications that I seen mostly are written using C++, C# or Java. Applications written by Prolog, to me is very very rare application.
So, I wonder how Prolog is used and implement the real-world application?
SWI-Prolog website is served from... SWI-prolog, using just a small subset of the libraries available.
Well, it's not a commercial application, but it's rather real world.
Much effort was required to make the runtime able to perform 24x7 service (mainly garbage collection) and required performance scalability (among other multithreading).
Several libraries were developed driven by real world applications needs.
I once asked my supervisor a similar question, when he is giving us a Prological lecture.
And he told me that people do not really use prolog to implement a whole huge system. Instead, people write the main part with other language(which is more sane and trivial), and link it to a "decision procedure" or something written in Prolog.
Not sure about other Prolog implementation, we were using BProlog and it provides C/Java interface.
Microsoft Windows NT Networking Installation and Configuration applet
One of the notorious and in a way notable examples is Microsoft Windows NT OS network interface configuration code that involved a Small Prolog interpreter built in. Here is a link to the story written by David Hovel for Dr. Dobbs. (The often cited Microsoft Research link seems to be gone.)
Expert systems
Once Prolog was considered as THE language for a class of software systems called Expert Systems. These were interactive knowledge management systems often with a relational database backend.
Beyond Prolog
In general rule-based programming, resolution and different automated reasoning systems are widely used beyond Prolog.
According to the Tiobe Software Index, Prolog is currently #36: between Haskell and FoxPro:
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
What's it used for?
I first heard of it with respect to Japan's (now defunct) "Fifth Generation" project:
http://en.wikipedia.org/wiki/Fifth_generation_computer
Frankly, I'm not really aware of anybody using Prolog for any serious commercial development.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I would like to learn some scripting to help automate some common tasks. Is ruby a good language to learn for this and what gems will be useful?
I would like to make scripts similar to this bash script
http://nikhgupta.com/code/initialize-gitolite-bash-script/
Which automates setting up a new gitolite repo.
Would you just learn bash, sed grep etc?
Sounds like a job for Ruby and Rake! Check this out.
In my opinion, Python and Ruby are the best languages out there, when it comes to automating tasks in *NIX systems. Being a Windows buff, I'd stick to PowerShell..
For Linux/Unix administration good shell scripting skills is essential. For more advanced automation, it is also good to know python, perl, or ruby. It really doesn't matter which you choose. Once you have become proficient with one, you will find that picking up the others to be an easy task.
Personally, ruby's package management system (gems) has always turned be off from using it from a scripting platform. Others hold different opinions and like it.
Pick one and dive in.
Some years ago I would have recommended to use PERL for things like that.
In my opinion it's always a good idea to have some base knowledge of shell scripting but if you really want to do something "bigger" use a script language (like Python, Ruby or Perl).
In meantime I see no reason to not use ruby for things like that. I really enjoy this language and you can do everything (?) that you could do in PERL in ruby as well (and you will have a real OO language at hand).
CPAN on the other hand is a quite nice argument to use PERL. Ruby gems are similar but I don't think there are that many gems as CPAN-modules available. But please compare by yourself (http://rubygems.org/).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What publicly available open source Ruby applications (not frameworks) exist apart from web applications?
This question is similar to Ruby off the rails , except that's about anecdotes of what Ruby applications they've created, which aren't necessarily publicly available.
These applications should be non-trivial: ideally multiple committers, with well-designed code to handle the complexity of their task.
One example would be the Metasploit Project.
Background: Asking in response to Framework for non-web Ruby project, where I realised that I haven't seen any examples of Ruby applications that aren't one-person projects.
Take a look at Chef. This Ruby project is becoming the de-facto tool for managing cloud architectures.
Have you seen hackety hack? Non-trivial, but you will find plenty of interesting ideas in the source code if you're adventurous. Being written by _why, it's pretty fanciful.
There are a number of Mac OS X applications written in Ruby-Cocoa (LimeChat is an example; I think Colloquy used to be, though its website implies that that may have changed).
As far as not seeing Ruby projects by more than one person...huh? True, most open-source Ruby development these days seems to be in the Rails world, but within that community there are lots of huge projects with many developers.
You might ask this question on the Ruby mailing list; you'll almost certainly get more good answers.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Where can I find resources related to the design and development of text-based user interfaces (e.g. interfaces exported via serial port from embedded devices to VT100 terminals)? I am interested in any material available - best practices, style guides, frameworks, etc.
Note that I am asking about resources related to the design and development of 'TUIs' rather than command-line interfaces (the thrust of Text User Interface Design Reference?). Wikipedia differentiates TUIs from CLIs (and GUIs) as follows:
TUIs are different from command-line
interfaces in that, like GUIs, they
use the entire screen area and do not
necessarily provide line-by-line
output. However, TUIs only use text
and symbols available on a typical
text terminal, while GUIs typically
use high-resolution graphics modes.
I don't have any experience with VT100 and that kind of stuff, but I know that Turbo Vision is still around and kicking on quite a few platforms, DOS and Linux included. And back in its day, it was used to write some of the better TUI applications (Borland C++ and Borland Pascal DOS IDEs come to mind), and I've seen it used in LOB applications back then quite often as well.
Screenshot:
(source: sourceforge.net)
Perhaps take a look at ncurses? It's a GNU library specifically designed for writing terminal-based UIs.
For best practices and style guides, the IBM Common User Access (CUA) defines a "text subset" that should be helpful especially if your users are used to GUIs. Details are in Chapter 3 of:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/F29BDG00/CCONTENTS
Additional CUA guidelines and standards are in:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/F29AL000/CCONTENTS?DT=19921204095534
http://petesqbsite.com/sections/express/issue21/tuiseriespart1.htm
http://en.wikipedia.org/wiki/Text-based_user_interface
Hope it helps... I still make programs in TUI (www.harbour-project.org)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've recently began using dTrace and have noticed just how awesome it is. Its the perfect tool for profiling without placing the burden on programmers to set up hundreds of probes in their applications.
I've found some nice one liner and sample scripts here and there, but I was wondering about what scripts, tools and links others might want to share.
BTW Anybody tried Chimes?
Here are some links I've found useful
A Powerpoint presentation about dTrace:
http://www.nbl.fi/~nbl97/solaris/dtrace/dtt_present.pdf
200+ useful scripts:
http://www.brendangregg.com/
I attended Theo Schlossnagle's Full Stack Introspection Crash Course talk at OSCON this year. In that presentation he gives several examples of using the D-Trace language and at the above link there are some additional utilities.
It's worth noting that because of the differences in Apple's and Sun's implementations, dtrace scripts from Solaris may not (likely won't) work on Leopard, and vice-versa. I'm not sure about FreeBSD's version.
The main problem is a different set of probes made available by the OS. Sometimes the probes will be provided under a different name. Sometimes they'll be more or less specific from one OS to another. Just a gotcha in case you come across a script that, for some reason, won't work.
Unfortunately dTrace is only implemented in/for Solaris OS. People from sun are recommend me to port all my php applications to Solaris, and "dtrace" them. After optimizing to again port them on my previous OS.