TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Real World OCaml

183 pointsby anandabitsover 11 years ago

12 comments

sreanover 11 years ago
For the early adopters and experimenters amongst you, you might like Felix <a href="http://felix-lang.org/share/src/web/tutorial.fdoc" rel="nofollow">http:&#x2F;&#x2F;felix-lang.org&#x2F;share&#x2F;src&#x2F;web&#x2F;tutorial.fdoc</a><p>It is a whole program optimized, strongly typed, polymorphic, ML like language that can interact effortlessly with C and C++ code and has coroutines baked in. Its own demo webserver is based on coroutines. It uses a mix of lazy and eager evaluation for performance and compiles down to C++. Execution speed is comparable to C++, mostly better. Its grammar is programmable in the sense that it is loaded as a library.<p>With inaccuracies in analogies assumed, Felix is to C++ what F# is to C# or to some extent Scala is to Java.<p>It is also mostly a one man effort but with a feverish pace of development so it comes with its associated advantages and disadvantages.<p>Tooling info is here <a href="http://felix-lang.org/share/src/web/tools.fdoc" rel="nofollow">http:&#x2F;&#x2F;felix-lang.org&#x2F;share&#x2F;src&#x2F;web&#x2F;tools.fdoc</a><p>The author likes to call it a <i>scripting</i> language but it really is a fullfledged statically compiled language with a single push button build-and-execute command. <a href="http://felix-lang.org/" rel="nofollow">http:&#x2F;&#x2F;felix-lang.org&#x2F;</a> The &quot;fastest&quot; claim is a bit playful and tongue in cheek, but it is indeed quite fast and not hard to beat or meet C with.
评论 #6714369 未加载
评论 #6713522 未加载
评论 #6714024 未加载
评论 #6715435 未加载
评论 #6712712 未加载
brokenparserover 11 years ago
Debian describes OCaml as follows:<p>Objective Caml (OCaml) is an implementation of the ML language, based on the Caml Light dialect extended with a complete class-based object system and a powerful module system in the style of Standard ML.<p>OCaml comprises two compilers. One generates bytecode which is then interpreted by a C program. This compiler runs quickly, generates compact code with moderate memory requirements, and is portable to essentially any 32 or 64 bit Unix platform. Performance of generated programs is quite good for a bytecoded implementation: almost twice as fast as Caml Light 0.7. This compiler can be used either as a standalone, batch-oriented compiler that produces standalone programs, or as an interactive, toplevel-based system.<p>The other compiler generates high-performance native code for a number of processors. Compilation takes longer and generates bigger code, but the generated programs deliver excellent performance, while retaining the moderate memory requirements of the bytecode compiler. It is not available on all arches though.
评论 #6711713 未加载
ori_bover 11 years ago
Ocaml: Love the language, but I don&#x27;t think I&#x27;ve seen a worse standard library. I don&#x27;t mean that it&#x27;s sparse -- I don&#x27;t mind that so much. I mean that it&#x27;s really just badly designed. For example, global, mutable variables in a functional language? Really?<p>Thankfully, Jane Street and the Batteries Included projects are supplementing it, but I&#x27;m still of the opinion that the standard library should be torn out and replaced with something nice.
评论 #6712753 未加载
评论 #6712853 未加载
cjuover 11 years ago
Here is a description of OCaml usage at Jane Street : <a href="https://queue.acm.org/detail.cfm?id=2038036" rel="nofollow">https:&#x2F;&#x2F;queue.acm.org&#x2F;detail.cfm?id=2038036</a><p>ocaml.org have a list of users: <a href="http://ocaml.org/companies.html" rel="nofollow">http:&#x2F;&#x2F;ocaml.org&#x2F;companies.html</a><p>Some &quot;big&quot; companies in the list: Facebook, Citrix, Dassault Système.
评论 #6712173 未加载
评论 #6712580 未加载
评论 #6716142 未加载
avsmover 11 years ago
For anyone curious to hear more and is at QCon SF today, I&#x27;ll be speaking about a new library operating system we&#x27;ve been building in OCaml for the past few years. The slot is in a couple of hours at 1030 PST.<p>qcon link: <a href="http://qconsf.com/presentation/my-other-internet-mirage" rel="nofollow">http:&#x2F;&#x2F;qconsf.com&#x2F;presentation&#x2F;my-other-internet-mirage</a> my slides: <a href="http://decks.openmirage.org/qcon13/" rel="nofollow">http:&#x2F;&#x2F;decks.openmirage.org&#x2F;qcon13&#x2F;</a>
bsg75over 11 years ago
Where is OCaml&#x27;s place in the current world?<p>I find it interesting as it seems to generate little &quot;buzz&quot;, but has two new books this year, and is a pre-cursor to another functional language that itself seems to be gaining traction, and is yet produced my Microsoft: F#<p>My observational &#x2F; untested impression is OCaml seems to be more practical, and maybe a little easier to transition to for someone like me who uses mostly Python and Go, and a lot of bash&#x2F;awk&#x2F;sed&#x2F;grep.
评论 #6711973 未加载
评论 #6712202 未加载
评论 #6712257 未加载
评论 #6711939 未加载
评论 #6712428 未加载
评论 #6711900 未加载
评论 #6712117 未加载
pjmlpover 11 years ago
Also interesting read,<p>&quot;Unix system programming in OCaml&quot;, <a href="http://ocamlunix.forge.ocamlcore.org/" rel="nofollow">http:&#x2F;&#x2F;ocamlunix.forge.ocamlcore.org&#x2F;</a>
评论 #6714559 未加载
ralphcover 11 years ago
In my progression of Haskell-OCaml-Common Lisp-Clojure-Scala, I remember OCaml having odd edge cases, modules of functors or some such that didn&#x27;t really help me in solving real world problems (this was 2007-2008 so my memory could be off). I&#x27;m currently a fan of Scala, which has all the functional and Algebraic Data Type goodness I remember from OCaml but is more &quot;practical&quot;, more companies and projects are using it, plus I work in the JVM ecosystem. Any reason to go to OCaml now instead of Scala?
评论 #6712602 未加载
评论 #6712465 未加载
评论 #6712477 未加载
weavieover 11 years ago
This is a really good presentation on OCaml by one of the authors of this book.<p><a href="http://youtu.be/hKcOkWzj0_s" rel="nofollow">http:&#x2F;&#x2F;youtu.be&#x2F;hKcOkWzj0_s</a>
评论 #6711904 未加载
评论 #6711762 未加载
jzelinskieover 11 years ago
Crazy coincidence; I just met someone who works at Jane Street on Saturday. My jaw pretty much dropped when he told me what his company does. When I got home and did some research, I was blown away by their dedication. I&#x27;m very happy to see a company realize the value in their language ecosystem and contribute as much back as they have.
cgagover 11 years ago
People asking about Golang may be interested in this article, where someone considering rewriting a large python project choose a new language, where both Golang and OCaml are among the candidates.<p><a href="http://roscidus.com/blog/blog/2013/06/09/choosing-a-python-replacement-for-0install/" rel="nofollow">http:&#x2F;&#x2F;roscidus.com&#x2F;blog&#x2F;blog&#x2F;2013&#x2F;06&#x2F;09&#x2F;choosing-a-python-r...</a>
LukeHoerstenover 11 years ago
In case anyone&#x27;s interested, there&#x27;s also a Real World Haskell book freely available to read online: <a href="http://book.realworldhaskell.org/read/" rel="nofollow">http:&#x2F;&#x2F;book.realworldhaskell.org&#x2F;read&#x2F;</a><p>I&#x27;d be interested to see how they compare.