You are not logged in.

#1 2009-11-29 15:21:12

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

I am looking for a programming language that...

Hi.
I learned C++ for years, from books and lately in College. I also fiddled a bit with assembly.
You see, I always went down the ladder towards the hardware, and now I find it quite hard to write anything useful.

I want to learn another programming language for little tools and programs which doesn't need the degree of control C++ gives me in the cost of development complication.

About a year ago, after doing some research, I found Ruby. I thought it to be somewhat the opposite to C++. Easy to program, not compiled, slow. Actually it really is what I thought but I don't like it very much. There is nothing wrong with the syntax and the speed is not THAT awful, but in order to use ruby programs I need Ruby to be installed. This is a big letdown.

If I sum the characteristics of the language I am looking for it would be something like:
1) Relatively easy to write. More importantly, I want to avoid rewriting general code and manage memory.
2) Compiled language. I don't want my produced program to require any runtime environment or an interpreter.
3) The programs should be fast enough. It doesn't have to be real time, but I don't want to wait a second or so for each little tool I run.

Any suggestions are appreciated.
Thanks!

Offline

#2 2009-11-29 16:07:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: I am looking for a programming language that...

How 'bout shell scripting? It's not compiled but there's a sh in every Unix / Linux box.

Offline

#3 2009-11-29 16:11:32

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: I am looking for a programming language that...

Perhaps D? I haven't tried it, but it's compiled and higher-level than C++.

Offline

#4 2009-11-29 16:17:53

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: I am looking for a programming language that...

Haskell is also compiled and is high level.


This silver ladybug at line 28...

Offline

#5 2009-11-29 16:35:55

deej
Member
Registered: 2008-02-08
Posts: 395

Re: I am looking for a programming language that...

How about Euphoria ?

http://www.rapideuphoria.com/

Euphoria is a simple, flexible, and easy-to-learn programming language. It lets you quickly and easily develop programs for Windows, DOS, Linux and FreeBSD. Euphoria was first released in 1993. Since then Rapid Deployment Software has been steadily improving it with the help of a growing number of enthusiastic users. Although Euphoria provides subscript checking, uninitialized variable checking and numerous other run-time checks, it is extremely fast. People use it to develop Windows GUI programs, high-speed DOS games, and Linux/FreeBSD X Windows programs. It is also very useful for CGI (Web-based) programming

I used to use it myself, a few years ago now, along with Linoleum:

http://anywherebb.com/bb/layout/html/frameset.html

L.in.oleum is an unstructured, untyped, procedural programming language. And more specifically, it's a form of cross-platform assembly language. It is oriented to the developement of general-purpose applications, especially when 100% portability, execution speed and module compactness is requested. This language has an almost 1:1 source-to-CPU instruction ratio, allows direct access to five general-purpose registers (performing basic operations from a theoretical 2 up to a pratical of even 10 times faster than memory-held variables), and if used well, is averagely twice as fast as C in pure computational power. Those who are familiar with Java, could imagine L.in.oleum to be based on similar concepts of hardware abstraction, but from a low-level standpoint. Other important highlights concern the inner coherence, clarity and simplicity of its syntax. The (admittedly cryptic) acronym stands for Low-level INterfaced OverLanguage for Extremely Universal Machine-coding, but nevermind it and just friendly call it Lino, like many do...

Two interesting ones for you...

Deej

Offline

#6 2009-11-29 17:06:11

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: I am looking for a programming language that...

You could look at Go (http://golang.org/).  It is still new, but has some really smart people behind it, and the community is growing.  I really like using it so far.

Offline

#7 2009-11-29 18:44:19

dalingrin
Member
Registered: 2009-03-18
Posts: 128

Re: I am looking for a programming language that...

Keep in mind that while other high level compiled languages may be more simple than C/C++, you won't have the library support that you would have otherwise. I suppose it depends on what you want to do.

Offline

#8 2009-11-29 18:50:55

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: I am looking for a programming language that...

Python + Freeze. (Although most people will have Python installed anyway.) Be aware that this will basically link the python runtime statically. (See the comments on the linked page for more info.)

Python is said to be faster than Ruby and in practice it has been fast enough for me. I like it because it makes solving problems easy and I always found a module for what I wanted to do.

Offline

#9 2009-11-29 18:58:59

ijanos
Member
From: Budapest, Hungary
Registered: 2008-03-30
Posts: 443

Re: I am looking for a programming language that...

Your deamands really narrow down things: Haskell, D and the fresh new Go. There are some exotic languages out there too, but I doubt that they have big enough (and usable) standard library and/or bindings. Also, what exactly do you want? Which platform you target? On windows for example, .NET is there out of the box, you could target that even from linux with mono. Do you want portable binary or portable source code? Haskell compiles into machine code, but the compiler is a beast, so from a perspective its lighter to code in python even if it requires the runtime which is already installed on most unix(-like) box.

Define the job a bit more clearly and find the right tool for it. There is no universally-great-for-everything language out there.

Offline

#10 2009-11-30 09:21:52

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: I am looking for a programming language that...

Perl, what can't you do in perl? Well a lot ... but! You can to pretty much do everything your heart desires, from a one liner to a complex OO application.

Offline

#11 2009-11-30 09:46:03

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: I am looking for a programming language that...

fumbles wrote:

Perl, what can't you do in perl? Well a lot ... but! You can to pretty much do everything your heart desires, from a one liner to a complex OO application.

Except that it's not compiled, requires an interpreter on each target platform, and is not fast in comparison to a compiled language (unless you're coding modules in C)... in short, it doesn't meet most of the OP's requirements.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#12 2009-11-30 10:00:32

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: I am looking for a programming language that...

.

Last edited by fumbles (2020-09-26 11:30:42)

Offline

#13 2009-11-30 10:13:03

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: I am looking for a programming language that...

@fumbles
I am not familiar with any freely available Perl compilers that generate independent executables. Can you give an example?

As for the incompatibility of speed and automatic memory management, I think it depends on the compiler. As pointed out previously, Haskell seems to have both and benchmarks agree.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#14 2009-11-30 10:28:53

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: I am looking for a programming language that...

.

Last edited by fumbles (2020-09-26 11:31:26)

Offline

#15 2009-11-30 12:02:17

ijanos
Member
From: Budapest, Hungary
Registered: 2008-03-30
Posts: 443

Re: I am looking for a programming language that...

Indeed, Haskell (and functional programing in general) is hard to pick up with imprative background.

Offline

#16 2009-11-30 13:34:19

&#32 Greg
Member
Registered: 2009-02-08
Posts: 80

Re: I am looking for a programming language that...

Learning to think functionally is worth it.

Offline

#17 2009-11-30 21:29:38

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: I am looking for a programming language that...

I waited for enough opinions and now the time to reply comes.

I will tell you the program that comes to my mind as an immediate need for such a language. I tried to write a custom mail server for my friend in C++ with winsock2 (It's for Windows server 2008). I'm in the middle of it and most of it goes well. The problems start when I have to know how much memory to allocate for buffers I send to various external functions to fill, and when I have to decide which multithreading library suits me best, and when I realize that a thread per connection is a bad idea and I have to reprogram some of my code tongue
In general it is possible to use C++ but it takes too much time.

Now to your suggestions:

@karol (shell scripting)
I will need it for windows too and its definitely not fast enough.

@Barrucadu (D)
You are right. *perhaps* wink I've read quite much about the language but I can't learn every language I think may fit before I choose. It is in the "perhaps" list though.

@lolilolicon (Haskell)
I found the language to be very interesting. More about Haskell in a minute.

@deej (Euphoria and Linoleum)
These languages were a surprise. I've never heard of either one of them. Linoleum is very interesting in it's concept but as I see it doesn't fit the need right now. It's too low level. Euphoria's site looks like the early days of geocities big_smile It is interesting, and I'll remember it, but correct me if I'm wrong, it's not *that* widely used and this raises some doubts. Does it have enough libraries that support it? Does it have enough development force behind it? I don't say it's not good, but I will take me more time to get used to it's existence tongue
Thank you!

@tom5760 (Go)
This language was my first candidate when I start looking for a language. It has it's drawbacks though. It's speed is, currently, even slower than Haskell's in part of the tests and the library support is still lacking. I am still not sure about the complexity of using it.

@dalingrin (not many libraries as in C++)
It's ok, one library per task is sometimes better than 20 per task. My need are not too great right now.

@wuischke (compiled Python)
Sorry, Python is not fast enough, and embedding an interpreter in my programs is out of the questions. If i make 20 small command line tools for a Pythonless environment, I don't want 20 copies of the interpreter.

@ijanos (Haskell, D, Go, .NET)
Your answer seems more wide than the others. Thanks. All your three offers seem good to me. I would probably go with one of these.
Why do you say .NET is compiled? It's sort of compiled, yes, and it is fast enough usually, but it need the .NET runtime. As far as I know the compilation produces some middle-way code, rather than native code, and I don't want to target a specific platform and depend on a runtime environment.
I don't care about the "lightweightness" of the development environment, just the produced product interests me.
And for you I defined the job more clearly above, a mail server for example.

@fumbles (perl)
Sorry, perl needs an interpreter, I doubt it's fast enough, and people say it's syntax is somewhat cryptic. I think I'll try Python before perl. Thanks anyway.



Right now I started reading "Learn you a Haskell" and "Real World Haskell" and I started to love the functional idea.

Thank you all for your suggestions and I would be happy to hear more of your opinions if you want to share them.

Offline

#18 2009-12-05 00:19:37

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: I am looking for a programming language that...

Why not learn Lisp?

Offline

#19 2009-12-05 00:30:20

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: I am looking for a programming language that...

i'll +1 haskell.  i've been reading learn you a haskell for the past three days, it's very interesting.  i've been using xmonad for a while so i've seen it before but there are alot of 'a ha' moments as i go through that tutorial.  the idea of lazy evaulation, using recursion rather than loops,and the quickSort example alone is worth the read.  good luck in whatever you decide.

Offline

#20 2009-12-05 10:22:21

shock
Member
Registered: 2009-12-05
Posts: 25

Re: I am looking for a programming language that...

I started with python and it is very good language in my opinion. Currently started with this tutorial. Yet to learn a lot.

Offline

#21 2009-12-09 07:46:27

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: I am looking for a programming language that...

Could use Lua, it may need an interpreter, but there is the option to compile it.


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#22 2009-12-09 20:57:14

Kitty
Member
From: The Burning Desert
Registered: 2008-01-11
Posts: 88

Re: I am looking for a programming language that...

I just had to google "learn you a haskell" after reading this thread. Thought it was a typo, but was worth the search. But I've found http://www.cs.utah.edu/~hal/docs/daume02yaht.pdf to be a better introduction and has worked better for me.


/etc/rc.d/ is where daemons reside. Beware.

Offline

Board footer

Powered by FluxBB