[Caml-list] from if...else to pattern matching

2010-10-02 Thread ben kuin
hi I try to transform an if-else clause into pattern matching, I think I've tried a lot of approaches, but apperently I'm doing something fundemently wrong. ~ (** Define behaviors against a constang 'x = c' with if...else and pattern matching. I want to see how to match a value against

Re: [Caml-list] from if...else to pattern matching

2010-10-02 Thread ben kuin
# let t x = match x with a when x=4 - true | _ - false;; ok, I had a similar attempt with let tt x = function a when x=4 - true | _ - false;; but that gave me the following (scary - 'a - ) signature val tt : int - 'a - bool = fun so I stopped thanks anyway

[Caml-list] why is the forward pipe operator (|) so little used?

2010-10-02 Thread ben kuin
hi Reading a few introduction F# articles and presentations I made the observation that the forward pipe operator is widely popular. Its also a language feature that, when it comes up on blogposts or on stackoverflow, its presented as a special F# feature. In the Ocaml world the pipe doesn't

Re: [Caml-list] [ANN] pfff_visual, a fancy code visualizer/navigator for OCaml, and more

2010-09-24 Thread ben kuin
another error: lang_php/analyze/checker' make[1]: Leaving directory `/code/lab/pfff/aryx-pfff-22ece30' make pfff pfff_tags sgrep spatch ppp make[1]: Entering directory `/code/lab/pfff/aryx-pfff-22ece30' make[1]: *** No rule to make target `lang_ml/analyze/lib.cma', needed by

Re: [Caml-list] [ANN] pfff_visual, a fancy code visualizer/navigator for OCaml, and more

2010-09-24 Thread ben kuin
/ocamlgraph -c graph.ml File graph.ml, line 1, characters 0-1: Error: ../external/ocamlgraph/ocamlgraph.cmi is not a compiled interface make[3]: *** [graph.cmo] Error 2 ~~ On Fri, Sep 24, 2010 at 4:09 PM, Yoann Padioleau pada...@wanadoo.fr wrote: On Sep 24, 2010, at 5:42 AM, ben kuin wrote

[Caml-list] what do I need to know to understand camlp4

2010-09-23 Thread ben kuin
hi I'm a Ocaml n00b (without any degree). Therefore I have a faible for everything that makes Ocamls syntax more algol/imperative like [1]. An example would be an extension like 'newref' (http://bitbucket.org/johannes/newref/wiki/Home), which turns: print_int !i into print_int $i

Re: [Caml-list] what do I need to know to understand camlp4

2010-09-23 Thread ben kuin
thanks a lot for this information and the links, this is very helpful On Thu, Sep 23, 2010 at 6:26 PM, Michael Ekstrand mich...@elehack.net wrote: On Thu, 2010-09-23 at 16:56 +0200, ben kuin wrote: Could someone give any idea how I can begin to understand how to write simple camlp4 extensions

Re: [Caml-list] what do I need to know to understand camlp4

2010-09-23 Thread ben kuin
thanks Jake, after browsing through those articles I came to the conclusion that for understanding and using camlp4 the notion of quotations and antiquotations is fundamental. My absolute lack of knowledge in this area might be a reason why I can't figure out how camlp4 works. On Thu, Sep 23,

Re: [Caml-list] what do I need to know to understand camlp4

2010-09-23 Thread ben kuin
If you are new to OCaml, I'm not actually new to OCaml, but although I've read every notable book about OCaml and a lot of good code of other OCaml programs, OCaml is still very foreign and counter-intuitive too me. I know what you're might thinking now: why the hell does he still bother? The

Re: [Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)?

2010-09-21 Thread ben kuin
Donham wrote: On Thu, Sep 16, 2010 at 4:05 AM, ben kuin benk...@gmail.com wrote: Is there a web server interface / adapter for ocaml that abstracts your application from the various web server implementations? There is no OCaml equivalent to rack / wsgi. It would be nice to have something like

[Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)?

2010-09-16 Thread ben kuin
hi Is there a web server interface / adapter for ocaml that abstracts your application from the various web server implementations? What is your prefered way to write a small web app for example a to-do list? thanks ben ___ Caml-list mailing list.

Re: [Caml-list] about OcamIL

2010-05-16 Thread ben kuin
Erik wrote: Jon Harrop wrote: Not really. Windows supports a far wider variety of hardware than Linux and Well, this does sound a little funny considering that Linux is free software and has been ported to almost every odd hardware platform, and how many platforms does Windows run on? I

Re: [Caml-list] about OcamIL

2010-05-15 Thread ben kuin
hi erik, I highly appreciate your blog, so it hurts me a little but - I disagree: The only evidence to support this is the widespead usage of Java and C#, but I think that is a language choice rather than a conscious decision to use a language that runs on a VM. People chose Java and C#

Re: [Caml-list] about OcamIL

2010-05-15 Thread ben kuin
If yes it seems this has not been a big showstopper to Windows apps err what?? On what planet do you live? It must be a nice place :-) COM components ( to encapsulate the abi ) DLL hell ( never heard of that? com registration) STL ( taming the abi) CORBA ( to talk between incompatible

Re: [Caml-list] about OcamIL

2010-05-15 Thread ben kuin
Microsoft was your saviour because Microsoft caused all your problems in the first place. Ok, the topic here is personal and office computing. I mean cubical drones who are not allowed to used right mouse button? Consultants and their 20 MB powerpoints? Middle management assholes with the

Re: [Caml-list] about OcamIL

2010-05-14 Thread ben kuin
So your argument as such says nothing about JVM jon-bot: yes it does, look at those numbers here: ... goswin-bot: no it doesn't because: ... startup time ... hotspot ... server ... jon-bot: moron goswin-bot: liar So far the typical java-shootout pattern. Maybe another approach would be to

Re: [Caml-list] about OcamIL

2010-05-14 Thread ben kuin
at 9:26 AM, ben kuin benk...@gmail.com wrote: realworld. I think it's interesting that on the ms-windows platform .net is used for everything with great success: Compared to that I think the jvm is only succesful when it comes to 'backend services', which often play an important role in big

Re: [Caml-list] about OcamIL

2010-05-14 Thread ben kuin
Isn't this precisely the aim of Jon's hlvm (www.ffconsultancy.com/ocaml/hlvm/)? that's an interesting question, Here are a few thoughts: technical: - in .NET everything is easy (from the surface): you have your source file (hello.cs) you take your compiler (cs.exe) and compile it to a msil

Re: [Caml-list] Re: about OcamIL

2010-05-14 Thread ben kuin
sylv...@le-gall.net wrote: On 14-05-2010, ben kuin benk...@gmail.com wrote: Isn't this precisely the aim of Jon's hlvm (www.ffconsultancy.com/ocaml/hlvm/)? licensing: Hlvm is driven by a company and its landing page is on a companies website and one of its protagonists is smart *and* business

Re: [Caml-list] about OcamIL

2010-05-14 Thread ben kuin
Please. You're not talking about the same thing. Ben talks about the benefits such a vm would have once it would be done, you talk about how hard it would be to do it. Exactly, thanks. I assume it's save to say that most today (business) critical applications have to be written in a vm

Re: [Caml-list] about OcamIL

2010-05-11 Thread ben kuin
A little off topic, but how is Mono/Unix these days? Still leaks memory, you refer to your examinations? (http://flyingfrogblog.blogspot.com/2009/01/mono-22-still-leaks-memory.html?showComment=1233522107493#c7872630239059031867) where you say yes and the mono devs are say no to memory leaking?

Re: [Caml-list] about OcamIL

2010-05-06 Thread ben kuin
for instance abstracting over x11/win32(horrors!) windowing systems first you're an optimist :-) On Wed, May 5, 2010 at 7:13 PM, Eray Ozkural examach...@gmail.com wrote: On Thu, May 6, 2010 at 1:36 AM, ben kuin benk...@gmail.com wrote: I think the main problem is the lack of cross

Re: [Caml-list] about OcamIL

2010-05-06 Thread ben kuin
If this is about biz vs. oss, then it could be a solution to go the path of PyQT: - offer of a GPL version - sell a version that can be used commercially On Thu, May 6, 2010 at 4:40 AM, Alain Frisch alain.fri...@lexifi.com wrote: On 05/05/2010 11:46 PM, ben kuin wrote: thats interesting indeed

[Caml-list] about OcamIL

2010-05-05 Thread ben kuin
hi I'm waiting for the day that microsoft release f# under a official open source license. It has been promised several times, but its still only available under the Microsoft Research Shared Source license agreement and meanwhile I'm not sure if it ever really happens. So I've stumbled over

Re: [Caml-list] about OcamIL

2010-05-05 Thread ben kuin
Or use the real ocaml on a real OS (^_^) my vision is a unix centric clr based vm: - no non-ecma parts - maybe a complete different base class library (like OcamIL) - the target is not to enable windows apps on unix, but the other way around - the vm is crossplattform, the bytecode is compatible

Re: [Caml-list] about OcamIL

2010-05-05 Thread ben kuin
keith, a few thoughts, ... before I've worked with linux I was a windows guy. I remember the day (forgot the context though) when I installed the ocaml package on my dell/windows-xp/laptop (yuk) . Since the workflow on windows is very gui centric, you can't help to get very sensible how a

Re: [Caml-list] about OcamIL

2010-05-05 Thread ben kuin
I think the main problem is the lack of cross platform gui that looks good on windows. LablTk: ok only for simple gui LablGtk:fragile on linux, bad on windows qt: I once tried to create bindings for a newer qt release ( 4.2), I didn't finished it, but I think it would be doable. The big