As some of you will recall I recently sent out a request for parties interested in consulting on a project using OCAML being pursued the consultancy I work...
Hi, I have these definitions: type field = PInt of int | PFloat of float | PString of string;; type optionalfield = Some of field | None;; type anyfield =...
John Goerzen
jgoerzen@...
Mar 1, 2004 11:08 pm
1664
... I think you're making this much more complicated than is necessary. Either that, or I'm not understanding. What I think you want is: type rec = { id: int;...
... [snip] ... Either one is possible :-) What I didn't show in my messages are the functions I have that work on objects of type field, optionalfield, and...
John Goerzen
jgoerzen@...
Mar 1, 2004 11:50 pm
1666
... It sounds like you're asking for a contradiction. On the one hand, you want to be constrain each record member to a single type (int, float or string)....
... Yurk, rec is a reserved word, don't use it as a type name... ... You are making a big ... : in the declaration type rec = { foo : bar } bar is a type. PInt...
... The "plural" of None is [] !!! So you can skip the 'a option construct if you want. You can set a record as usual for the required fields, plus a field for...
... [ snip ] ... I forgot to reply to this... Yes, Debian is nice. You might notice that within the past week, I've packaged up and uploaded about 5 OCaml...
John Goerzen
jgoerzen@...
Mar 3, 2004 3:04 pm
1670
... It's pointless to insist on the packaging format of a single distribution. The physical module distribution of a language must be platform independent. ...
Hello I'm new to lex and yacc with Ocaml and I have a problem According to the Ocaml documentation I have written the Lex and the Yacc files. In the yacc...
Le mercredi 03 mars, à 17h04 +0100, ... Hello Thomas, The description of your problem seems a bit vague to me, but as a first guess, I'd say that there is...
I do not know whether this is related to your problem, but FYI, in the token definition (I mean a line like "%token <foo> bar"), type (foo in the example)...
Yamagata Yoriyuki
yoriyuki@...
Mar 4, 2004 2:08 pm
1674
Hello, I am the author of OfflineIMAP[1], a multithreaded bidirectional IMAP synchronization program written in Python. I am thinking it would be interesting...
John Goerzen
jgoerzen@...
Mar 4, 2004 10:51 pm
1675
i don't know of anything particularly for network streams. when you say you're having problems wrapping your head around what's needed it sounds like you're...
andrew cooke
andrew@...
Mar 5, 2004 12:10 am
1676
... Exactly. Thank you very much for the very informative post. I am not well-versed on parser theory. Not too long ago, in Python, I used YaPPS2 (Yet...
John Goerzen
jgoerzen@...
Mar 5, 2004 3:51 am
1677
... taking the "if" example, any difficulty wouldn't come from whether "if" is a keyword or, say, a variable. that's what yacc is there to do - decide which...
andrew cooke
andrew@...
Mar 5, 2004 10:21 am
1678
Hello, when Perl ist faster than OCaml, did I stupid things, or should I better use Pcre instead of Str? Are there any comaprisions between the performance of...
oliver@...
Mar 5, 2004 7:00 pm
1679
Hi, I used the ocamlprof for looking for unnecessary calls or optimizing my code in respect to probability of calls (when they depend on data I analyze). This...
oliver@...
Mar 5, 2004 8:01 pm
1680
OK, I'm starting to play around with lex/yacc. I've got a situation here where I have identified strings with the lexer. In the parser, at certain times, I...
John Goerzen
jgoerzen@...
Mar 5, 2004 10:44 pm
1681
... Hash: SHA1 ... Hello, I'm also learning how to use ocamllex/yacc at the moment (great tools BTW) and I find the following documentation very usefull : ...
From: "roparzhhemon" <roparzhhemon@...> Subject: "ocaml_beginners"::[] Half_way polymorphism with CAML Date: Mon, 08 Mar 2004 12:34:35 -0000 ... ...
Yamagata Yoriyuki
yoriyuki@...
Mar 8, 2004 1:03 pm
1685
Hi, I've started reading up on the OCaml streams system, and I must say it looks impressive and powerful. However, one of the things missing is regular...
John Goerzen
jgoerzen@...
Mar 9, 2004 4:13 am
1686
... No, these are the real limitations. The best way to get regular expression matching and substitution in Ocaml is though the port of PCRE that you can find...
... You can use ocamllex to make a stream of tokens that match regular expressions. The ocamllex program is described in the OCaml reference manual, the...
... Well, it's not plain regexps that I want -- I want a parser system that can use them. ... [ snip ] The immediate problem facing me is that there is no way...
John Goerzen
jgoerzen@...
Mar 9, 2004 2:19 pm
1689
Hi, I have very recently started to learn o'caml, and have what I think is a simple question. I may be thinking about things in a procedural/oo way so any...
... But it's not fine for it to be a list--as you would undoubtedly discover for yourself eventually. The problem, of course, is that a list can contain...
... OK, I'm not sure what I think you want is really what you want, but if it is, the most straightforward way to do this is probably with an association list...