Are there any recipes for wrapping a large C++ class that uses callbacks?
I would like to implement the callbacks in OCaml for obvious reasons.
Thanks, Joel
---
http://twitter.com/wagerlabs
___
Caml-list mailing list. Subscription management:
Does anyone have bindings for ZeroMQ?
Thanks, Joel
---
http://twitter.com/wagerlabs
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list:
What if the quotation is not valid OCaml syntax, e.g. C#, and a Camlp4 parser
for it exists?
How would I tie it all together to parse the quotation, plug in antiquotations
and end up with the custom AST that my parser outputs?
Thanks, Joel
Sent from my iPad
On Jul 26, 2010, at 16:13,
On Jul 25, 2010, at 2:52 PM, Dario Teixeira wrote:
Are we talking about surviving a mere
Slashdot effect (not as scary nowadays as it once was),
This as I'm looking to provide paid conversion of trading strategies from one
trading language to another.
See an example conversion of
How does Ocsigen handle database operations?
I assume they need to be asynchronous because of lightweight threads (Lwt).
Please feel free to point me to the manual but I think an answer in this thread
would benefit future Google searches.
---
http://twitter.com/wagerlabs
How do you build scalable web apps with OCaml?
Do you use Apache with mod_caml? Naked Ocsigen?
Do you put Ocsigen behind Nginx?
Thanks in advance, Joel
---
http://twitter.com/wagerlabs
___
Caml-list mailing list. Subscription management:
How do I fix this?
Thanks, Joel
---
Mac OSX 10.6
./build/fastworld.sh
...
+ boot/ocamlyacc -v otherlibs/labltk/compiler/parser.mly
3 shift/reduce conflicts.
+ ./ocamlopt.opt -nostdlib -c -g -warn-error A -I otherlibs/dynlink/nat -I
stdlib -o otherlibs/dynlink/nat/dynlink.cmx
I have a translator from a Pascal-like trading language written in OCaml and I
need the output to run as a DLL embedded in a trading platform.
I'm thinking of generating bytecode and have the user pass the path to the
bytecode file to the DLL during initialization.
I don't want to load
On Jan 9, 2010, at 2:02 PM, Daniel Bünzli wrote:
http://portal.acm.org/citation.cfm?id=1411308
How can I access this paper without an ACM subscription?
Thanks, Joel
---
http://wagerlabs.com
___
Caml-list mailing list. Subscription
Just wanted to say that the svn trunk still has this issue when using
build/fastworld.sh
http://groups.google.com/group/fa.caml/browse_thread/thread/fe167069116a27a1/77cc1e7c2bdf613e?lnk=gstq=%22_unix_initgroups%22pli=1
This patch fixes it and the build finishes
diff --git
You cannot embed OCaml and use it as an editor extension language unless
1) your editor is open source, or
2) you are a member of the consortium and pay 2K EUR/year
Is that correct?
Thanks, Joel
---
http://wagerlabs.com
___
Caml-list
Does anybody have example code that shows how to generate OCaml bindings at
runtime with LLVM?
My goal is to compile an AST into code that uses OCaml functions within the
same binary that's doing the compiling.
I don't think it can be done with OCaml since it requires a standalone
assembler,
Does anyone have an API for Amazon EC2, S3 or SimpleDB?
I need to write an app to push content to hundreds of thousands
of users, connected to a bunch of servers. Think liveblogging.
You push a button and your post needs to be in front of eager
readers within a couple of seconds.
The
Is the ARM backend (ocamlopt) usable and actively maintained?
Thanks, Joel
---
Mac hacker with a performance bent
http://linkedin.com/in/joelreymont
___
Caml-list mailing list. Subscription management:
./ocamlopt.opt -nostdlib unix.cmxa -g -I stdlib -I otherlibs/unix
ocamlbuild/ocamlbuild_executor.cmx ocamlbuild/ocamlbuild_pack.cmx
ocamlbuild/ocamlbuild_unix_plugin.cmx ocamlbuild/ocamlbuild.cmx -o
ocamlbuild/ocamlbuild.native
Undefined symbols:
_unix_setgroups, referenced from:
Suppose I have a camlp4 parser for C#.
I want to include bits of C# in my code and end up with the AST.
I want to have holes in the above AST to plug in values.
I understand that antiquotations take car of filling the holes in the
AST,
any tips on implementing this, though?
Thanks,
Camlp4: Uncaught exception: DynLoader.Error (/usr/local/lib/ocaml/
site-lib/ocsigen/xhtmlsyntax.cma, interface mismatch on
Camlp4_import)
What does this mean and how do I fix it?
Thanks, Joel
---
Mac hacker with a performance bent
http://linkedin.com/in/joelreymont
On Apr 15, 2009, at 11:54 AM, Jérémie Dimino wrote:
This may happen if you compiled ocsigen with a different ocaml version
than the one you are using now. Recompiling and reinstalling ocsigen
should fix this error.
Fixed that. What about this?
---
Error: Files
On Mar 30, 2009, at 7:41 AM, Grünewald Michaël wrote:
Did you have Gtk+ working natively in OSX?
I do but I built from source after downloading the GTK+/OSX frameworks
and using ./configure --with-quartz
I also had to place the following two (identical) files in /opt/local/
On Mar 30, 2009, at 3:08 PM, Kuba Ober wrote:
I'm running native gimp and other tools, and it all just works, so
I don't
really see why you'd even need the x11 gtk.
Does Glade work as well?
Have you tried using Glade-built GUIs with OCaml?
Thanks, Joel
---
http://tinyco.de
Has anyone used ocaml and gtk+ to build non-cygwin app for windows?
These would be gtk+ apps that don't require the x server.
What toolchain did you use?
Thanks, Joel
---
http://linkedin.com/in/joelreymont
___
Caml-list mailing list.
Are there OCaml bindings for QT?
Would OCaml + QT be a good option for a Windows app?
I don't want to go with F# and do want to keep development on the Mac.
Thanks, Joel
---
http://linkedin.com/in/joelreymont
___
Caml-list mailing list.
I have a feeling that I have seen this before but I don't remember how
to fix it.
Any suggestions?
Thanks, Joel
---
ocamlfind ocamlmktop -thread -package
lwt.ssl,lwt.extra,netstring,netsys,ssl,pcre,unix,threads,findlib -I ../
baselib -I ../http -I ../xmlp4 -I ../server -I
What about this error with Cygwin towards the end of bootstrap_stage2?
Thanks, Joel
---
cp ld.conf /usr/local/godi/build/godi/godi-ocaml/work/stage/lib/ocaml/
std-lib/ld
.conf
cp libcamlrun_shared.so /usr/local/godi/build/godi/godi-ocaml/work/
stage/lib/oca
How do I fix this?
Thanks, Joel
---
+ ocamlfind ocamlopt -package 'extlib, dynlink, camlp4.lib' -linkpkg -
g src/easy_ast.cmx src/easy_lexer.cmx src/token.cmx src/static1.cmx
src/easy_parser.cmx src/easy_symtab.cmx src/easy_typer.cmx src/
ninja_ast.cmx src/ninja_morpher.cmx
Does anyone have a recipe for packaging OCaml code as a DLL or shared
library?
I need to be able to expose a few entry points that correspond to
OCaml functions.
Thanks, Joel
---
http://tinyco.de
Mac, C++, OCaml
___
Caml-list mailing
I have two rules designed to parse these statements
buy 100 shares next bar at market
buy 100 shares # assumes next bar at market
sell 100 shares next bar 20 stop
...
The rules are the same, except Higher and Lower get swapped when
combined with Stop and Limit.
Since either buyMethod or
On Mar 12, 2009, at 9:13 AM, blue storm wrote:
You should reverse your rules (starting with the
higher-precendence construnction instead of the atomic values), and
possibly split some of your level into different levels (eg. and
+) for finer-grained precedence.
I have it reversed then as I
Any suggestions on how to resolve this?
ocamlfind installs into /usr/local/lib/site-lib and there's a site-lib/
camlp4 directory with META in it.
Thanks, Joel
---
ocamlfind ocamlc -package 'oUnit, extlib, camlp4' -linkpkg -g src/
easy_ast.cmo src/easy_code.cmo src/easy_lexer.cmo
On Mar 11, 2009, at 1:33 PM, Matthieu Wipliez wrote:
I'm not familiar with ocamlfind, but for Camlp4 you need this:
-I +camlp4 camlp4lib.cma
I was under the impression that ocamlfind -packages takes care of
adding the camlp4 bits.
Does this solve the problem?
Not really but thanks
Is it just me or there's a fresh uptake of OCaml among bright people?
I used to have to wait a long time (hours?) to get my questions
answered and now I get them answered in just a few minutes. And I'm
not talking simple questions since I don't consider camlp4 anywhere
simple. Woot!
I
I would like my expression rule to parse 1 + 2 points as Plus (1,
Points 2).
I currently have the following, with Points right-associative and at
the bottom, but it doesn't work. Is this something that Camlp4 can
handle?
Thanks, Joel
expr:
[ ...
| LEFTA
[ e1 = expr; Or;
I'm trying to properly set up the precedence in my expression camlp4
rule.
It's not working properly, though.
(* wrong!!! has higher prec than and*)
# parse_with_rule expr 1 2 and 3 4;;
- : Easy_ast.expr = Cond (Int 1, GT, And (Int 2, Cond (Int 3, GT, Int
4)))
(* right! mul is higher
In the following bit of camlp4 grammar
inputDeclarations:
[
[ Input; :;
l = LIST1 inputDeclaration SEP , - l
]
];
Is it always necessary to write [ x = inputDeclaration - x ] instead
of just inputDeclaration?
I'm trying to debug the type of each rule and I'm often
On Mar 8, 2009, at 1:08 AM, Matthieu Wipliez wrote:
actionDelay: [ [ delay; expression -
Asthelper.failwith (convert_loc _loc)
RVC-CAL does not permit the use of delay. ] ];
Which of the following tokens does delay get checked against?
I'm assuming that camlp4 has to
On Mar 8, 2009, at 2:45 AM, Jon Harrop wrote:
The OCaml Forge has kindly accepted to host the HLVM project:
http://hlvm.forge.ocamlcore.org
Am I the only one who VASTLY prefers the clean, uncluttered and easy
to use GitHub interface to the *Forge one?
---
http://tinyco.de
Mac, C++,
I would prefer to use the #2 approach but I'm using a custom lexer
built by ocamllex.
Where would I plug in String.lowercase con = ... in Matthieu's lexer,
for example?
Thanks, Joel
On Mar 8, 2009, at 9:37 AM, Daniel de Rauglaudre wrote:
2/ Use the field tok_match of the
On Mar 8, 2009, at 10:35 AM, Joel Reymont wrote:
The filter module nested in the token module seems like a good
candidate. What functions of the lexer or filter are accessed when a
string keyword (e.g. delay) is found in the camlp4 grammar?
The filter portion of the token module looks
On Mar 8, 2009, at 11:45 AM, Matthieu Wipliez wrote:
In this case, here is a possible solution, you have your hash table
associate a lowercase version of the token with what you'd like to
use in the grammar:
buytocover = BuyToCover
sellshort = SellShort
...
I'm doing this already but I
On Mar 8, 2009, at 1:33 PM, Matthieu Wipliez wrote:
So to sum up: when you declare a rule with a token MyToken, the
grammar is configured to recognize a MyToken keyword.
The issue here is that it must be lower case in the camlp4 rules, i.e.
mytoken.
What if I want to have MyToken
On Mar 8, 2009, at 2:09 PM, Matthieu Wipliez wrote:
using a single rule, say
buy : [ [ buyOrSell; ... ] ]
Yes, I want camel-case above.
and at lexing time do
if String.lowercase s = buyorsell then
IDENT buy_or_sell
else
IDENT s
And this is the part that I object to. I have
On Mar 8, 2009, at 3:07 PM, Matthieu Wipliez wrote:
I believe there is a (partially acceptable) solution, if you are
willing to accept having all your keywords in lower-case in the
grammar (not in the lexer), ie you match against buyorsell,
sellshort etc.
Nope, I want camel case! :D I
On Mar 8, 2009, at 3:32 PM, Matthieu Wipliez wrote:
I'd say duplicate Static, and redefine using. Seems like the
simplest solution to me, certainly not the cleanest though (but is
there an alternative?).
Now we are talking!
This is Static.ml:
module Make (Lexer : Sig.Lexer)
:
On Mar 8, 2009, at 3:32 PM, Matthieu Wipliez wrote:
I'd say duplicate Static, and redefine using. Seems like the
simplest solution to me, certainly not the cleanest though (but is
there an alternative?).
I don't think this will work elegantly.
Static first makes a Structure (is make the
On Mar 8, 2009, at 3:55 PM, Matthieu Wipliez wrote:
Well I just duplicated Static to Static1 (and added
Camlp4.Struct.Grammar where necessary) and replaced:
module Structure = Camlp4.Struct.Grammar.Structure.Make Lexer;
by:
Something like this you mean? I must be doing something wrong as
On Mar 8, 2009, at 5:04 PM, Matthieu Wipliez wrote:
In the parser, did you replace
module Gram = Camlp4.Struct.Grammar.Static.Make(Lexer)
by
module Gram = Static1.Make(Lexer)
I forgot to fix match_keyword. Works otherwise, thanks!
Now, why is match_keyword supplied with the original
Assuming a simple Camlp4 parser that uses a ocamllex lexer wrapped in
a stream,
let rec parse_primary = parser
| [ 'INT n ] - Int n
| [ 'FLOAT n ] - Float n
| [ 'STRING n ] - Str n
| [ 'TRUE ] - Bool true
| [ 'FALSE ] - Bool false
| [ ] - raise (Stream.Error unknown token when
Where can I read up on the syntax of the following in a camlp4
stream parser?
| [' INT n ] - Int n
For example, where are [ ... ] described and why is the ' needed
in between?
To be more precise, I'm using camlp4 to parse a language into a non-
OCaml AST.
I'm trying to figure out the
On Mar 7, 2009, at 11:21 PM, Matthieu Wipliez wrote:
why are you using stream parsers instead of Camlp4 grammars ?
Because I don't know any better? I'm just starting out, really.
I have a parser that I wrote using ocamlyacc and menhir. I finally
when with dypgen and didn't touch the code
Jon,
On Mar 7, 2009, at 11:52 PM, Jon Harrop wrote:
The [ .. ] denote a stream when matching over one using the
parser keyword
and the tick ' denotes a kind of literal to identify a single token
in the
stream. So:
| [ 'Kwd if; p=parse_expr; 'Kwd then; t=parse_expr;
'Kwd else;
On Mar 8, 2009, at 12:20 AM, Matthieu Wipliez wrote:
Joel asked me the parser so I gave it to him, but maybe it can be of
use for others, so here it is.
While we are on this subject... How do you troubleshoot camlp4 rules?
With a stream parser you can invoke individual functions since
On Mar 6, 2009, at 8:17 AM, Nicolas Pouillard wrote:
I recall that moving from one build procedure to another requires
a full clean (make clean ; ./build/distclean.sh).
./build/distclean ./configure ... ./build/fastworld.sh
SANITIZE: a total of 749 files that should probably not be in
On Mar 5, 2009, at 4:08 PM, Andres Varon wrote:
I don't think that it compiles the way it is now. It seems to me
that there was a version merge error and asmcomp/amd64/emit.mlp has
repeated definitions of emit_call and emit_jump.
Here's the offending part of asmcomp/amd64/emit.mlp.
The
I was able to build a 64-bit OCaml after adjusting asmcomp/amd64/
emit.mlp and using the regular build process, e.g.
make world
make bootstrap
make opt
make opt.opt
The Camlp4 build issue is still there with fastworld.sh.
Thanks, Joel
---
http://tinyco.de
Mac, C++, OCaml
make clean build/distclean.sh configure ... build/fastworld.sh
builds without an issue, again once emit.mlp is fixed.
On Mar 6, 2009, at 2:22 PM, nicolas.pouillard wrote:
+ boot/ocamlyacc -v ocamldoc/odoc_text_parser.mly
5 shift/reduce conflicts.
+ ./ocamlc.opt -nostdlib -c -g -w Ale
I would like to compile trading systems written in a pascal-like
programming language to OCaml AST at runtime, convert it to machine
code and use it from the same running
OCaml program (natdynlink?).
Is it possible to do this without having gcc installed?
The code I'm generating will need
Does it actually work?
./configure -cc gcc -m64
./build/fastworld.sh
...
boot/ocamlrun ./ocamlopt -nostdlib -c -nopervasives -I stdlib -o
stdlib/pervasives.cmx stdlib/pervasives.ml
/var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasmce9dc3.s:
602:junk `...@plt' after expression
...
I looked at the Camlp4 filter wiki [1] but still can't figure this out.
+ ocamlfind ocamlc -package 'oUnit, dyp, extlib' -c -I +camlp4 -g -w a
-pp 'camlp4of -I src -filter map' -I src -o src/easy_type_check.cmo
src/easy_type_check.ml
File src/easy_type_check.ml, line 45, characters 10-15:
On Mar 5, 2009, at 3:55 PM, Sylvain Le Gall wrote:
Why not using the LLVM OCaml binding? It is directly shipped with
LLVM.
So you can write the entire generator in OCaml...
I would love to use LLVM. My concern is the overhead of calling from
LLVM into OCaml, though. The code I'll be
On Mar 5, 2009, at 4:08 PM, Andres Varon wrote:
I don't think that it compiles the way it is now. It seems to me
that there was a version merge error and asmcomp/amd64/emit.mlp has
repeated definitions of emit_call and emit_jump.
I wonder if the OCaml team will move to git at some point
Ashish,
I'm not getting the previous error anymore and my issue is the same as
yours now.
Reason?
SANITIZE: a total of 749 files that should probably not be in your
source
tree has been found. A script shell file _build/sanitize.sh is
being
created. Check this script and run it to
On Mar 5, 2009, at 6:58 PM, Yoann Padioleau wrote:
Joel Reymont joe...@gmail.com writes:
ocaml seems to require me to individually #load cmo-s, including
dependencies.
I'm sorry for the noise.
The cma was missing the required cmos.
Foot in mouth!
---
http://tinyco.de
Mac, C++, OCaml
Can I do without gcc if I want to embed the OCaml compiler into a
commercial Windows app?
Do I need to become part of the OCaml consortium to do this?
Ideally, I would like to generate OCaml code at runtime and compile it
into something that can be loaded by a runtime of some sort.
This must be a simple issue but I can't figure it out.
I built ocaml from source using 'make world.opt'.
I'm using ocamlbuild as my build system.
cat build.sh
#!/bin/sh
ocamlbuild -classic-display $*
./build.sh src/test.byte
/usr/local/bin/ocamlopt.opt -I /usr/local/lib/ocaml/ocamlbuild
Fixed by building with build/fastworld.sh
--
wagerlabs.com
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list:
Suppose I want to build a server that runs on top of ocamlnet and
handles 10k+ connections.
ocamlnet seems to use select exclusively.
Any suggestions on how to add kernel poll? Is this possible even?
Thanks, Joel
--
wagerlabs.com
___
On Sep 11, 2008, at 4:32 PM, Markus Mottl wrote:
Use bigstrings as buffers and
perform I/O outside of the OCaml-lock if releasing it (depends on
I/O-size) is more efficient.
Are you suggesting using multiple OS threads within a single process?
When exactly do you release the lock and how do
67 matches
Mail list logo