Domain: inria.fr
Stories and comments across the archive that link to inria.fr.
Comments · 395
-
Re:Imperative and functional lanuages
Actually O'Caml is a functionnal AND imperative AND OO language. It's also very optimized (during byte-code interpretation and native code execution). See The Great Computer Language Shootout. I hope that those guys at Microsoft are working hard to reach this level of performance
... -
competition paradigmI personally think this is a better programming competition paradigm than TopCoder.
in case people will probably not bother to click, it goes something like this:
you have three days to do the programming task (72 hours), and you submit it via email. you can use whatever language you want, etc etc. here is an official quote:
Programming should be about correctness and elegance, not about writing something in a hurry. Correctness is more and more important, for example in life-support systems and drive-by-wire automobiles, where there is no room for error.
the cool thing is thisThere is no room for error in this contest either. The first thing the judges will do is test the programs and eliminate any entry that does not give correct results on all tests. Besides, the task will be simple enough that 3 days will be enough time to write, debug, and do some tweaking on your program, and get a normal amount of sleep. It was already the case for the previous years, and we see no reason to change.
[for the 1st place] Finally, the contest judges agree to state at least once during the presentation of the awards that the winning team's programming language is "the programming tool of choice for discriminating hackers."
anyway... the money isn't as good, but I like it much better. btw the winner for the 2001 one used haskell, and second place used Dylan, ha! eat my (shorts), Arthur. =)[for 2nd place] The contest judges agree to state at least once during the presentation of the awards that the winning team's programming language is "a fine programming tool for many applications."
[for special judges prize] The contest judges agree to state at least once during the presentation of the awards that the winning team is comprised of a group of "extremely cool hackers."
-
pay at INRIA
Somebody from INRIA (a computer science institute) told me that their accounting services run an old COBOL program to process the pay. The engineers who wrote the code are now retired...
-
why UML?
I agree with the safer programming languages (such as Java or OCaml). I agree with the better tools. I agree with dynamic checks, stack guards and whatever. Let's add for good measure static analysis.
But why UML? UML is a modeling language. What the above solutions are trying to catch are implementation issues.
If you're trying to catch issues at the design level, you need much more than a modeling language in which to write vague descriptions. You need tools that can show that your implementation corresponds to the design. You need tools that are capable of dealing with issues such as interlocking threads. -
Re:fork?
Forking is not allowed.
No, it just isn't available on Windows. -
Re:Wow!Man, what I'd give to only have 28 pieces of spam thrown my way each day. Here's how many pieces of putrid canned ham have been spewed my way in the past few days:
23 February: 1095 spams, 7,821,318 bytes
24 February: 1320 spams, 6,581,776 bytes
25 February: 1700 spams, 6,875,706 bytes
26 February: 1598 spams, 7,910,568 bytes
27 February: 2659 spams, 13,183,247 bytes
28 February: 1436 spams, 6,280,790 bytes
1 March: 1492 spams, 6,917,835 bytes
2 March: 1274 spams, 5,805,475 bytes
3 March: 1488 spams, 6,196,761 bytes
4 March: 1626 spams, 9,023,298 bytes
Thank Ghu for tools like procmail, tmda, and spamoracle.
-
Remember
SciLab,
the healthy open source alternative. (tm)
Might not have all the features but looks pretty decent. -
Re:Secret .NET language leaked
F# Exists!
It appears to be similar to Caml. -
why not FPL?Why everyone compare Java to Python? Why Many other languages are basically ignored? I wonder if Sun considered Lisp, Scheme, Haskell, OCaml and Mozart.
Lisp has one of the best object-oriented paradigm implementation, Meta-Object Protocol among languages with both scripting and bytecompiling capabilities.
Scheme has been proved as a good language for GUI and configuration: GIMP, Sawfish, TeXmacs.
OCaml has all the power as Lips, just in syntax conviniect for many Java/C-poisoned brains to read faster. No wonder there are many real-world applications on it.
Haskell... I just love how it demonstrates that OOP is not everything (and even not enough)
:)Sun works for telecom industry - why not consider Erlang?
And don't ignore Mozart - it's multi-paradigm pradigm might be just what we all will thing as the best in 3-5 years.
The list is not complete, of course. And it's inspired by Functional Programming.
My main point here is: each of above languages, would it be in hands of Sun marketed instead of Java (with all that money invested to), would have quality of implementation much better than Java.
In fact, I am impressed how such poorly designed language as Java succeed so far on the market. It wouldn't without so much money behind. And without so many classes written by Sun to compensate the poor design of the core language itself.
Would Sun invest so much efforts and money to FP language then the result would be much better. Because quality is why FP matters.
-
Re:The downfall of debian
I'd almost welcome a BSA audit - it'd be fun to yell "IN YOUR FACE!!!" every time they get snippety.
I'm not sure BSA audits are legal, BSA is a private company who has no right to even look at my screen, at least in france.
See this article (in french, sorry) for example. -
Experimental Languages
A lot of small experimental languages target the JVM. That way they get all kinds bytecode tools for free.
One example I got to work with a few years ago is Nice. A nice (no pun intended) combination of functional programming and java. -
Re:Keep the list going
OCAML OS - A great little OS that has lots of features and actually runs fast, but got banned by a bunch of parents' groups hwo decided it promotes smoking.
No, that's JoCaml OS.
-
Re:Thou shalt use objective-C
Or perhaps Objective CAML. I don't know as much about it as I'd like, but looks very interesting. Supports both functional and imperative programming, objects, etc. You can run code interactively, compile machine independant bytecode, or for speed, architecture specific binaries.
And check out it's position on this performance shootout.
-
Time travel debugging
The Ocaml debugger (see the Caml site) has the ability to travel back in time.
Also, type inference of the Ocaml language find a lot of bugs at compile time.
I believe that higher level programming languages will lower the need of debuggers.
At last, as other comments show, many programs (e.g. servers, CGIs,
....) are difficult to debug with a debugger. -
Try the Free alternativeGNU/Octave is a free (libre) Matlab clone. There's also Scilab, which has a Matlab-like syntax. Finally, Maxima is now GPLed so you can explore that as well.
Scilab is mostly free, but still not free-enough to be included on Debian (it is packaged under non-free on a Debian system). See this thread for details.
-
Re:Huh?
If you're trying to churn out useful software and not do research and want to learn ML, you may prefer Objective Caml to SML.
I really *hate* type inference, as it makes debugging a pain, and SML/NJ, the SML I learned on, has absolutely atrocious error reporting.
On the up side, it's quite an eye opener if you've never used a language with really strong typing. -
Re:This is news to me.
Or use OCAML (if you want objects) or some other ML variant if you're not an OOP fanatic (Yes I know OOP is cool, but when you have polymorphism and a sane module system there aren't too many remaining benefits)
-
Re:Functional languages
-
sure: plenty
For interactive symbolic manipulation, Maxima is an excellent open-source alternative. For numerical applications, Numerical Python and its associated packages beat both Matlab and Mathematica in my opinion. For 3D visualization, you can get VTK, which also has Python bindings.
Maxima is also used occasionally as a rapid prototyping language, but it's proprietary and it has a lot of rough edges. You are probably better off using one of a number of open languages with similar features, like Scheme, OCAML, SML, Prolog, or Haskell.
Don't forget about C++, however. In many ways, C++ nowadays allows you to write numerical code more naturally than any of these other languages (yes, better than Matlab and Mathematica), it has by far the best libraries available for it, and it gives you excellent performance. And you can even do symbolic mathematics in C++, with the right libraries (though it's not interactive, of course). -
Re:So what about existing code?
OCaml integrates with existing C code. There are many libraries released that are simply OCaml wrappers around existing C libraries.
OCaml is *not* faster than C. It would be hard to be faster than C, since it's basically glorified assembly language.
Depending on how well you code your C++, OCaml might or might not be faster than C++.
My point is that Ocaml is *much* easier to write correct, safe code in, and you don't have to sacrifice much speed or memory. Even if you are man enough to handle your pointers, you will appreciate being able to focus on the problem you are solving rather than having to juggle a lot of overhead.
Now how many Ocaml coders are there out there? Five thousand? Actually that number is probably generous.
I don't know the number, but I would guess that you're in the right ball park. So your argument is: Not enough people are using a language so I shouldn't use it. Well, then we're stuck with the crap that we have then, because we'll never be able to change.
The ocaml community is growing quickly. People that give it a try get addicted. I'm advocating the language because I really enjoy working with it, and I would like to see it have a chance out there in the real world.
ocaml library growing every day
When coders run out of answers, they often resort to blanket claims of utopia delivered by a mysterious and obscure language.
It's just one direction that the original article was taking. One of his suggestions was "Ruby" which probably doesn't have a much larger programmer base in this country than ocaml does. High level languages don't have to be interpreted scripting languages.
It may be that there are other research languages out there that will be an even better choice for the next evolution of a general purpose language. OCaml certainly isn't the only choice.
The point is that programming languages are getting much cooler. With legacy code we're stuck with what we have, but when we're planning the future, let's keep an open mind.
-
Re:Any Free Alternative?
-
Re:What about templates?
There most definitely are Lisp implementations (both Common Lisp and Scheme) that compile to machine code. Two examples are CMUCL and Bigloo. It seems clear from some benchmarks that they easily outperform the likes of Perl, Python, and Java. Note that the previous link won't work if you just click on it, but if you copy it, then put it in the location bar of a new window, it will. It seems the author of the page doesn't much like Slashdot.
You're absolutely right about the power of being able to generate source at runtime and evaluate (run) it. That's one of the things I like about Python as well. In fact, I don't think any language can be considered high-level if it doesn't have that. Guess where this concept originated? In the early implementation (around 1960) of Lisp, a function called "eval" was invented to be the definition of the Lisp interpreter. The details are in "The implementation of LISP".
The nice thing about the compiled lisps is that you also have the compiler available at runtime, which means that you can generate source code dynamically, then compile it. You are no longer bound by the traditional code/compile/run cycle.
I don't know of compilers/interpreters that can make such high level decisions about when to bind and evaluate, but I believe that Lisp allows a lot more flexibility in that area than C-like languages. Also, it looks like Self might offer something in that area. Another class of languages I have yet to explore, but may be far superior on these issues is that of pure functional languages, especially the lazily evaluated ones. I plan to learn one of the ML's eventually, like OCaml.
Unfortunately, as you pointed out, the best tools can't always be used because of external requirements like programmer or user familiarity. In fact, that's the main reason I haven't really gotten into using Lisp yet: I'm comfortable with languages I already know. But, I'm determined to try new things, especially when there's evidence that there are better tools available. -
Re:which functional language to learn?
SML is the language on which OCaml is based. OCaml is really just SML with different (read: worse) syntax, some small differences, and then OO support.
From the Caml Faq
The main reason is historical: Caml was invented before SML.
The Caml language is issued from the original ML language, invented by Robin Milner in 1978, and developped jointly at INRIA from 1981. The first Caml compiler was written in 1984, and distributed from 1985. Standard ML was not yet invented, and Caml's syntax was similar to the syntax of ML V6.2, whose compiler was used to compile the first Caml compiler. When the syntax of Standard ML has been defined, Caml kept its own syntax, for several reasons. The first reason is questionable and subjective: we thought that SML's syntax was not a major improvement of the original ML syntax (hence of Caml's one). The second, more fundamental, reason is that we thought the language not to be mature enough at that time to be completely defined and fixed by a standard; we are still doing some progress on the understanding of some features of ML, and these progress may imply some important modifications of the language (let's cite the type checking of imperative features or the semantics and type checking of modules). In addition, we wanted to be free to add some new constructs (and indeed we did it, e.g. ``for''loops, ``try with'' and ``match with'', character constants, access to vectors and strings, ``mutable'' annotations for records, ``when'' clauses in pattern matching). This relative freedom with respect to the syntax allows the emergence of new variants of Caml: for instance the Caml Light and Objective Caml systems have their own extensions to the core syntax of Caml.
Hence Caml has its own syntax.
More interestingly caml has a pre-processor(camlp4)which allows to write in various other syntaxes. E.g. there is a Standard ML syntax, as well as a lisp-ish syntax.
SML will probably be easier to start off on, is better supported and better documented.
They both have nice documentation. They are so similiar I doubt it makes a lot of difference. The nicest new programmer ocaml documentation is The Oreilly Book Developing Applications with Objective Caml. With the exception of Ocaml's object oriented features, most ocaml documentation can be used w/ SML, and vise versa.
Lisp's defmacro system will open your eyes to a whole new world. It is the most powerful macro system you'll ever use. You can perform arbitrary transformations to your code. You'll never think the same way again once you've gotten the hang of defmacro.
For whatever its worth, camlp4 gives you a nice macro system too. I don't know how it compares w/ common lisps, but it does give you static checking of your macros and let you work at the abstract syntax tree level.
-
Re:which functional language to learn?
SML is the language on which OCaml is based. OCaml is really just SML with different (read: worse) syntax, some small differences, and then OO support.
From the Caml Faq
The main reason is historical: Caml was invented before SML.
The Caml language is issued from the original ML language, invented by Robin Milner in 1978, and developped jointly at INRIA from 1981. The first Caml compiler was written in 1984, and distributed from 1985. Standard ML was not yet invented, and Caml's syntax was similar to the syntax of ML V6.2, whose compiler was used to compile the first Caml compiler. When the syntax of Standard ML has been defined, Caml kept its own syntax, for several reasons. The first reason is questionable and subjective: we thought that SML's syntax was not a major improvement of the original ML syntax (hence of Caml's one). The second, more fundamental, reason is that we thought the language not to be mature enough at that time to be completely defined and fixed by a standard; we are still doing some progress on the understanding of some features of ML, and these progress may imply some important modifications of the language (let's cite the type checking of imperative features or the semantics and type checking of modules). In addition, we wanted to be free to add some new constructs (and indeed we did it, e.g. ``for''loops, ``try with'' and ``match with'', character constants, access to vectors and strings, ``mutable'' annotations for records, ``when'' clauses in pattern matching). This relative freedom with respect to the syntax allows the emergence of new variants of Caml: for instance the Caml Light and Objective Caml systems have their own extensions to the core syntax of Caml.
Hence Caml has its own syntax.
More interestingly caml has a pre-processor(camlp4)which allows to write in various other syntaxes. E.g. there is a Standard ML syntax, as well as a lisp-ish syntax.
SML will probably be easier to start off on, is better supported and better documented.
They both have nice documentation. They are so similiar I doubt it makes a lot of difference. The nicest new programmer ocaml documentation is The Oreilly Book Developing Applications with Objective Caml. With the exception of Ocaml's object oriented features, most ocaml documentation can be used w/ SML, and vise versa.
Lisp's defmacro system will open your eyes to a whole new world. It is the most powerful macro system you'll ever use. You can perform arbitrary transformations to your code. You'll never think the same way again once you've gotten the hang of defmacro.
For whatever its worth, camlp4 gives you a nice macro system too. I don't know how it compares w/ common lisps, but it does give you static checking of your macros and let you work at the abstract syntax tree level.
-
Re:which functional language to learn?
SML is the language on which OCaml is based. OCaml is really just SML with different (read: worse) syntax, some small differences, and then OO support.
From the Caml Faq
The main reason is historical: Caml was invented before SML.
The Caml language is issued from the original ML language, invented by Robin Milner in 1978, and developped jointly at INRIA from 1981. The first Caml compiler was written in 1984, and distributed from 1985. Standard ML was not yet invented, and Caml's syntax was similar to the syntax of ML V6.2, whose compiler was used to compile the first Caml compiler. When the syntax of Standard ML has been defined, Caml kept its own syntax, for several reasons. The first reason is questionable and subjective: we thought that SML's syntax was not a major improvement of the original ML syntax (hence of Caml's one). The second, more fundamental, reason is that we thought the language not to be mature enough at that time to be completely defined and fixed by a standard; we are still doing some progress on the understanding of some features of ML, and these progress may imply some important modifications of the language (let's cite the type checking of imperative features or the semantics and type checking of modules). In addition, we wanted to be free to add some new constructs (and indeed we did it, e.g. ``for''loops, ``try with'' and ``match with'', character constants, access to vectors and strings, ``mutable'' annotations for records, ``when'' clauses in pattern matching). This relative freedom with respect to the syntax allows the emergence of new variants of Caml: for instance the Caml Light and Objective Caml systems have their own extensions to the core syntax of Caml.
Hence Caml has its own syntax.
More interestingly caml has a pre-processor(camlp4)which allows to write in various other syntaxes. E.g. there is a Standard ML syntax, as well as a lisp-ish syntax.
SML will probably be easier to start off on, is better supported and better documented.
They both have nice documentation. They are so similiar I doubt it makes a lot of difference. The nicest new programmer ocaml documentation is The Oreilly Book Developing Applications with Objective Caml. With the exception of Ocaml's object oriented features, most ocaml documentation can be used w/ SML, and vise versa.
Lisp's defmacro system will open your eyes to a whole new world. It is the most powerful macro system you'll ever use. You can perform arbitrary transformations to your code. You'll never think the same way again once you've gotten the hang of defmacro.
For whatever its worth, camlp4 gives you a nice macro system too. I don't know how it compares w/ common lisps, but it does give you static checking of your macros and let you work at the abstract syntax tree level.
-
Re:methodology differs, and it mattersThis one has a lot of links: ocaml.org. There are some shorter papers that are good introductions.
O'Reilly has a book available on-line, Developing Applications with O'Caml.
-
Re:I don't want a new keyboard!
Sometimes in Windows, you need to use all three keys though.
-
Not sure if these fit, but...
ZMatrix -> A pretty cool looking matrix screensaver / desktop enhancement.
ffdshow -> An oss decoder for MPEG-4 movies, much better than divx.com's offering IMHO.
ScummVM -> Play the Lucasarts classics on Windows 2000/XP.
Scilab -> A open-source tool similar to MatLab.
Other great ones already mentioned are VirtualDub, Mozilla, VNC and OpenOffice.
[]s Badaro
-
Re:Certicom SecureMemo?
I'm no expert, but my guess would be that the "drag your stylus about" part was almost certainly just random number generation, and the crypto just, well, plain crypto...
Elliptic Curves refer to a set of mathematics... Here's a FAQ!
-
Re:whatever
(the numbering is mine, not the original poster's)
I'll be happy when they finally make the characters move around more realistically (i.e. 1) not having the same dumb expression on their face, 2) other realistic human-like movements, 3) not allowing other objects and characters to be able to penetrate walls, etc.).
So have at it. Let's break it down by points what you would need to do:
- This is easily fixed -- modify the texture for the model. Since Q1 supports skins, I'm sure you can find a skin that doesn't have a dumb expression. Oh, wait, you mean you want dynamic facial expressions? Been done in other games already. (hey, what do you expect? Quake1 is something like 7 years old!)
- Setup a motion capture rig, capture the movements of a person going through the various actions of the Q1 marine, and create new model animations. Plug the model back into Quake. Done. Alternatively, modify the Quake model loading/rendering code to support skeletal animation and inverse kinematics (or whatever, eh?), "ragdoll" physics, etc.
- The source code is available, and there are research papers out there on continuous collision detection (here, for example). Combine the two! Or if that's too performance-intensive, I'm sure you can come up with a better collision detection algorithm than what Q1 currently uses.
As for "etc", well, there are literally hundreds of things you could do to advance the state of the Quake code. Add a better particle engine. Revamp the models with more polys. Rearchitect the engine so it doesn't bog down so much when there are a lot of polys on-screen. Id kindly released the source code, so you could do these things if you want. -
Re:Literate programming caveats
The Image Understanding Environment, a big computer Vision Library, used a literate programming method based on LaTeX. Despite almost all computer vision researchers being familiar with Latex for paper writing
,etc. this LP approach was rejected by users as too cumbersome. This is at least one of the reasons why the IUE is now considered as an interesting but dead experiment.Many of the libraries that went on to replace the IUE (e.g. VXL used heavily documented source in the doxygen style. This has proved much more friendly. I would suggest that one of the reasons is that a linear way of thinking about of code is insufficient for big libraries. Wrapping up the linear style in tree (as in leo) doesn't help either. People want to navigate straight to their documentation - which is what doxygen and a search engine provide.
-
Try O'Caml
Try O'Caml (caml.inria.fr); it's a modern language that's compiled very efficiently (independent benchmarks) and is suitable for heavy crunching. O'Caml has lots of features that you won't find in many languages, like algebraic data types, higher order functions, etc., but is intended for real general purpose programming. Most importantly, it's type-safe (statically) so you probably won't spend as much time tracking down bugs unrelated to the problem at hand. (That has certainly been my experience with SML, a language from the same family.)
-
Java needs parametric polymorphismIn Java, all objects are optional. They can be null. The compiler doesn't help you keep track of which ones may be null and which ones are never null, so either you have to assert that each pointer is non-null as you follow it, or your code is vulnerable to getting NullPointerException's (henceforth NPE's) at any time. The assert only helps things a little: instead of failing with a stack trace that says a NPE happened somewhere in your method (it won't tell you where if it's compiled code!), your assert can put a string in the thrown exception to tell you the line where the NPE happened.
There is a much better way. Objective CAML and other ML-like languages have parametric polymorphism. Objects by default are never optional. If you want an optional object of type Foo, then you declare it as Foo option. 'a option is a polymorphic data type. The type parameter name is 'a. The type value of the type parameter is Foo in this example.
This way, the compiler can enforce that the non-optional objects are always present.
Parametric polymorphism buys you a lot more, of course, but the NPE's are the most irritating thing about Java I'm aware of.
Unlike most other programming languages with parametric polymorphism, Objective CAML also supports object-oriented programming.
-
What Is Broken with the Article
The fact is that it is not Java that is broken, but the common perception of what is actually needed, and this very o'reilly article shows that clearly. It is not possible to "fix" a language just by removing bad API and generalizing its ad-hoc constructs. It is mind which needs fixing.
One might say Java is secure. It is secure in terms of JVM, but it is broken in terms of typing, and it is funny to see this skipped in the article. For example, collections are not type-safe.
One might think Java is reliable. Yes, its object model forces people not just to implement things, but also to someway "declare" what they are going to do. But "enterprise programming techniques" are mostly about overcoming this, for they use "reflection", which is about overcoming type restrictions.
Java has born templates. As somebody already noticed, templates are means to secure job, for nobody else will be able to figure out what's the hell is going on in your code. It's a joke, but the actual reason why templates are bad is that that they are a hack: Java is not expressive enough to let people develop abstract algorithms.
People are used to OO modelling. That's good by itself, but the common practices are harsh. Everybody knows that virtually any UML guy is capable of producing tons of completely incomprehensible diagrams, incomprehensible save to him. By programming, we build a computer model of the problem we solve. Since people generally dislike abstractions, it is considered more useful to have the world totally modelled than to have as much abstractions as possible found. So, just to add two integers, objects are created, and messages are passed. Nobody even tries now to teach programmers think abstract.
Let me make a conclusion. It is not because Java is good by itself that it has gained so much, and not because it is convenient lots of people are forced into it. It is because it is really a sort of agreable common ground (And it is better than VB anyway :-)) There is not reason to neither fix or drop anything in it; just push for better implementation and more standards. But if you feel like looking for something true and ethernal, try objective caml, and implement a java bytecode compiler for it. -
It's not a "major" language, but for OCaml...
Though it's not (yet =) one of the "major" languages, but it's pretty awesome. Here are some things I've learned and resources I've discovered.
What is OCaml? In a sentence, "fast modern type-inferring functional programming language." But not only does it support the functional programming paradigm, but also imperative and object-oriented models. (These can be mixed in a single program.) OCaml is type-safe and garbage collected. (But even though it's garbage collected, it runs at speeds comparable to C and C++.)
Why use OCaml? Here are some good reasons:
- It's fast! It scores very high (second only to C) on Doug Bagley's computer language shootout
- Very compact code
- Interoperates very easily with C
- Was used by at least one of the top 3 entries in each ICFP Programming Contest between 1998 and 2001. Won 1st prize in 2000 and 1999.
- It's a functional programming language - you can use functions as arguments to other functions.
- It's garbage collected - you don't have to worry about cleaning up memory and can focus on the problem to solve.
- OCaml includes libraries for complex data structures, graphics, regular expressions and string processing, and more.
- Compiles to native code or bytecode.
What kind of things have been implemented in OCaml? Check out the Caml Hump.
OCaml was developed in France, so the "bible" of the language (O'Reilly's Développement d'applications avec Objective Caml - the camel book) is written in French, but a translation of the work by volunteers has been created. Check out Developing Applications with Objective Caml.
The language's official page at INRIA in France.
Yay OCaml!
-
It's not a "major" language, but for OCaml...
Though it's not (yet =) one of the "major" languages, but it's pretty awesome. Here are some things I've learned and resources I've discovered.
What is OCaml? In a sentence, "fast modern type-inferring functional programming language." But not only does it support the functional programming paradigm, but also imperative and object-oriented models. (These can be mixed in a single program.) OCaml is type-safe and garbage collected. (But even though it's garbage collected, it runs at speeds comparable to C and C++.)
Why use OCaml? Here are some good reasons:
- It's fast! It scores very high (second only to C) on Doug Bagley's computer language shootout
- Very compact code
- Interoperates very easily with C
- Was used by at least one of the top 3 entries in each ICFP Programming Contest between 1998 and 2001. Won 1st prize in 2000 and 1999.
- It's a functional programming language - you can use functions as arguments to other functions.
- It's garbage collected - you don't have to worry about cleaning up memory and can focus on the problem to solve.
- OCaml includes libraries for complex data structures, graphics, regular expressions and string processing, and more.
- Compiles to native code or bytecode.
What kind of things have been implemented in OCaml? Check out the Caml Hump.
OCaml was developed in France, so the "bible" of the language (O'Reilly's Développement d'applications avec Objective Caml - the camel book) is written in French, but a translation of the work by volunteers has been created. Check out Developing Applications with Objective Caml.
The language's official page at INRIA in France.
Yay OCaml!
-
It's not a "major" language, but for OCaml...
Though it's not (yet =) one of the "major" languages, but it's pretty awesome. Here are some things I've learned and resources I've discovered.
What is OCaml? In a sentence, "fast modern type-inferring functional programming language." But not only does it support the functional programming paradigm, but also imperative and object-oriented models. (These can be mixed in a single program.) OCaml is type-safe and garbage collected. (But even though it's garbage collected, it runs at speeds comparable to C and C++.)
Why use OCaml? Here are some good reasons:
- It's fast! It scores very high (second only to C) on Doug Bagley's computer language shootout
- Very compact code
- Interoperates very easily with C
- Was used by at least one of the top 3 entries in each ICFP Programming Contest between 1998 and 2001. Won 1st prize in 2000 and 1999.
- It's a functional programming language - you can use functions as arguments to other functions.
- It's garbage collected - you don't have to worry about cleaning up memory and can focus on the problem to solve.
- OCaml includes libraries for complex data structures, graphics, regular expressions and string processing, and more.
- Compiles to native code or bytecode.
What kind of things have been implemented in OCaml? Check out the Caml Hump.
OCaml was developed in France, so the "bible" of the language (O'Reilly's Développement d'applications avec Objective Caml - the camel book) is written in French, but a translation of the work by volunteers has been created. Check out Developing Applications with Objective Caml.
The language's official page at INRIA in France.
Yay OCaml!
-
Re:Benchmark bullshit and no knowledge of WindowsThe author incorrectly assets that Linux threads are scheduled by the CPU - he is using the pthreads library, which is userland threading.
Uh?
Last time I checked, "pthread" is just an API, and on Linux you have at least two implementations of that:
- linuxthreads (kernel-based, uses the clone() system call, definively scheduled by the kernel), which is the one shipped with GNU libc (the one normally used, and the one used by the author of the article, btw).
- GNU Pth (completely userland).
IBM is also working to implement a M:N threading implementation with a pthread API, partially kernel-based and partially in userland.
-
How to deal with parsingThere is a vast literature on parsing, and a lot of (mostly useless) parsing theory is a large part of the cursus in many CS departments. Check CiteSeer to get a glimpse of how much literature there is.
The best tools to build parsers and manipulate parsed syntax trees are functional languages, such as OCaml (with its streams parsers, camlp4, ocamllex/ocamlyacc, etc.), or SML, Haskell, etc.
Of course, if you were a LISPer, you'd know that although you have lots of well-known tools to build new parsers, such as Meta or Zebu, the best thing to do about a parser is not to write it, but rather to reuse the builtin extensible universal parser, READ, and its extensible universal unparser, WRITE.
If you spend most of your time writing parsers, you're not just using the wrong tools, you're also using the wrong approach.
Just my
.2 mg of e-gold worth... -
Functional Programming Book
For a good grounding in theory based functional programming, but using a real langugage, use ML.
Specifically, try out ML For The Working Programmer by Paulson, and download yourself an ML compiler.
-
Re:distributed shared memory
what about Mach? their DSM is called XMM (eXtended Memory Management)
not commercial maybe but certainly kernel-level and application-transparent AND there's a huge amount of research from OSF and others on it.
it was used on MPPs such as the Intel Paragon to do DSM
http://pauillac.inria.fr/~lang/hotlist/free/licenc e/fsf96/mklinux.html#270
-
Re:Um, who cares?
> Looks like you found yourself a new project
;)
Actually, it's something I've wanted to work on for a while. I was going to write it in and for Squeak- one of the last tools I need before I can dump primitive systems like Mac OS X and Unix/X11. Like I said, Scribe can do this, to an extent. I don't know if there's a way to refer to cells within a table though, but it could definitely be added without pulling teeth.
Yeah, read-only, no prob. But there are times when I'll just use Word because I have to pass it around. Sucks, but what can you do?
Never used LyX. TeXShop or Emacs was always good enough for me, for what I do, which is pretty simple, mostly tables, \em \bf- very little math.
I'll wish for a thought-to-MIDI converter while we're at it! :P -
Re:Ignorance...
Well nothing to see there...
Not much here either.
Then there is this
And this
Helped Develop RTP? Wow. I didn't know you streamed video and audio through kazaa.
Tell me Oracle of civil rights why dont you back your posts up with facts? Oh wait. I forgot. They are fake.
So let me take a guess, you post something retarded, log in with your karma whoring account, and then mod it up. Then mod down all the posts that call you out and then post some AC bullshit and make it look like someone believes you. Smooth scheme you got going, and I still salute your trolling skill.
-
Re:"Polyglot" did that 10 years ago!
-
Use OCamlScince you mention it yourself, why not really use OCaml. The "speed hit" isn't too big compared with other languages, and optimizing "nasty algorithms over hairy data structures" will definitly work better than in C.
Of course, it has a portable IO lib - just because the corresponding module for more low level stuff is called "Unix" doesn't mean that it isn't available on Windows as well, with some restrictions.
-
Re:Python and X11
Well, if we're going to get into it...
There also:
Sawfish which is written using rep, which is a lisp-dialect similar to elisp.
GWM, another lisp-based WM, dialect is called "WOOL" (Window Object Oriented Language). Interesting and old.
GwML, a WM written in O'Caml. You even get an emacs clone scriptable and written in O'Caml as part of the package!
Tkwm doesn't look maintained, for creating WMs (not just desktops, mind you) in Tcl/Tk.
There are straight-up X11 bindings for other languages, which could also be used for creating window managers, with the same method of doing so in C. Ruby and Squeak Smalltalk has them for sure.
A lot of people scoff at the idea of doing this, but frankly, I can't imagine how and why people deal with static, inconsistent environments. Having your parts of your system written in a dynamic language that you can grok means that you can make the changes to your enviornment when you want to. May seem stupid to a lot of computer users and self-proclaimed hax0rs, but for me, that is what makes a computer personal. Same reason people like emacs, I suppose. -
Re:Here's an idea for a contest
[...] for a program that #DEFINED a bunch of english words as chunks of C that did the same thing the english words did, and then wrote a short *compilable* program in totally readable pseudocode...
You might also enjoy a different style: California codin'. -
Fixed pointActually, floating point is quite fast on a PPC. As people already pointed out, for matrix-like computation, PPC has a special instruction that does one multiplication and one addition in one cycle. If this is to slow, on a G4 you can use altivec.
If you really want not to use floating point calculation, then rational numbers are not the way to go. Instead you should use fixed point numbers. Old 68K based macintoshes (without FPUs) relied on those for fast calculation - in fact as far as I remember, the original Quickdraw toolbox relied of fixed point number for geometric calculations (arcs, slopes, etc.).
Basically, the idea is to use integers divided by a fixed number, so that the binary number has a fixed point. For instance if you have 32 bits numbers, you assume they are divided by 65536. This means that you have 16 bits before the point, and 16 bits after. This way for additions and substractions, you can use integer operations, calculation can also use the zero and sign flags of the processor. For mulitplication and division, you need to fiddle the integer system a bit (by multiplying or dividing by 2^16), but this could be done using shift operations, which are quite fast.
The rational structure you propose is not good because a simple addition requires many assembly level operations. For instance to calculate 6/5 + 2/3, you need to do the following calculation:
- Find the greatest common dividers of 5 and 3 (this is quite an expensive calculation)
- If none is found, multiply 3 by 5.
- Multiply 6 by 3 and 2 by 5.
- Add the result
Rational numbers are good if you want absolute precision, but for they are not very fast - because there is no support for such a format in current processor instruction sets.As for OS X using a vector format, this is, of course the case. Quarty relies on the PDF abstractions and it does support anti-aliasing, and sub-pixel positioning (I don't know for screen scaling). But having a vector format is not sufficient Quickdraw was also vector based, but used an integer coordinate system. This meant that lines, rectangles and arcs had to have their extremities on round coordinates of the Quickdraw grid - the result was not always very satisfactory.
-
a powerful language is secureWhat makes a powerful language :
- A strong type system (well typed programs can't crash).
- Scalability
- Efficiency
- Modularity
- Abstraction
The most important feature being the type system. A strong type system really helps the developpers (despite what students are thinking). And with type inference, you don't even have to bother giving writing the types...
I think that OCaml a language made at the INRIA is one of the easier language to use. It's functional, with higher-order functions, strongly typed (with polymorphism), and have a good system of modules.
It's a language of the ML family (like SML), that's available for nearly all platforms of development. It can compile to byte-code or native code, and behaves well in programming contests and benchmarks !!!
The code is efficient, and easy to write. That's definitely a good choice. On the drawbacks side, I must admit that there are not much library and API written for the language (comparing to perl)... -
a powerful language is secureWhat makes a powerful language :
- A strong type system (well typed programs can't crash).
- Scalability
- Efficiency
- Modularity
- Abstraction
The most important feature being the type system. A strong type system really helps the developpers (despite what students are thinking). And with type inference, you don't even have to bother giving writing the types...
I think that OCaml a language made at the INRIA is one of the easier language to use. It's functional, with higher-order functions, strongly typed (with polymorphism), and have a good system of modules.
It's a language of the ML family (like SML), that's available for nearly all platforms of development. It can compile to byte-code or native code, and behaves well in programming contests and benchmarks !!!
The code is efficient, and easy to write. That's definitely a good choice. On the drawbacks side, I must admit that there are not much library and API written for the language (comparing to perl)...