badkins has quit [Remote host closed the connection]
WraithM has quit [Ping timeout: 272 seconds]
<gabemc>
Exact same error.
<Drup>
(you made make clean before building again, did you ?)
<gabemc>
Oh yeah.
<gabemc>
I know because the ocamlbuild version location changed.
<Drup>
right
<Drup>
so, I can't reproduce, either you didn't put the complete test case in your github repo, or :magic:
<gabemc>
I have uploaded my latest -- absolutely all of it -- I'm just a beginner in OCaml, really.
<Drup>
okay, *now* I have an error.
<Drup>
the previous version was working fine.
englishm is now known as englishm_away
<Drup>
gabemc: you forgot "as <foo> after the cenum constructs
<Drup>
it's needed, apparently
<Drup>
line 21 and 26
<Drup>
(it was not in the repository when I fetched before :p)
<gabemc>
Right well, the reason I didn't catch that was because I'm still getting the same error even after I add the 'as' constraints. The parse error doesn't go away.
<Drup>
hum, strange.
<Drup>
It compiles fine if put "as <something>" after
<gabemc>
What version of opam are you using?
<Drup>
1.2
<Drup>
shouldn't change anything, though
<Drup>
I doubt it's an opam problem
<Drup>
Oh.
<Drup>
I think I know
<Drup>
gabemc: what's your oasis version ?
rgrinberg has quit [Quit: Leaving.]
<Drup>
add in you _tags file, somewhere outside the oasis section "true : syntax(camlp4o)"
<gabemc>
OASIS v0.4.4
msaegesser has joined #ocaml
<Drup>
does it works ?
q66 has quit [Quit: Leaving]
<gabemc>
Same error.
<Drup>
pastebin me, I want to see the command line used
<Drup>
I suppose it's some sort of weird interaction between syntax and pack, just replace "true" by <lib/*.ml{,i}>
<gabemc>
Ah! At last!
<gabemc>
Thanks so very, very much.
_tca has quit [Changing host]
_tca has joined #ocaml
_tca has joined #ocaml
<Drup>
I still don't understand why it didn't work out of the box :|
<gabemc>
I gotta say, this OCaml toolchain needs some serious TLC.
<Drup>
Sorry for the slightly "stumbling in the dark" approach, as I couldn't reproduce :/
<Drup>
and yeah, oasis (+ ocamlbuild) are nice when they work well, but not at all when they fail.
<Drup>
gabemc: hope this is not going to prevent you to do some more mirage hacking :p
<gabemc>
No. It's just all part of the process. Somebody should probably start thinking about how to put almost all of oasis into opam so that, like Haskell, I only have to worry about one configuration file.
<Drup>
yes, people are working on things like that
<Drup>
there are one project in particular that is cooking in this direction
<Drup>
is*
ygrek has quit [Ping timeout: 246 seconds]
Alysson67 has quit [Remote host closed the connection]
gabemc has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
englishm is now known as englishm_away
Alene_Kiehn79 has joined #ocaml
ontologiae_ has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Quit: Leaving.]
mout has joined #ocaml
<mout>
Hi
<mout>
I haven't used OCaml in a while and I'm getting an error message I can't figure out.
claudiuc has joined #ocaml
<mout>
# type person = {Name : string; Age : int};; Error: Syntax error
<Drup>
fields names start by a non capital letter
<mout>
Thanks !
<mout>
I had copied the example from the inria website, though, so I'm kind of curious
<mout>
Looking at the URL, I realise it is the old site
<Drup>
"Created in December 1995." :]
<mout>
Exactly. Thank you for your help!
rgrinberg has joined #ocaml
malo has quit [Remote host closed the connection]
mrvn has joined #ocaml
mout has quit [Ping timeout: 246 seconds]
manizzle has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: Leaving.]
englishm_away is now known as englishm
shinnya has joined #ocaml
englishm is now known as englishm_away
englishm_away is now known as englishm
Alene_Kiehn79 has quit [Remote host closed the connection]
Anita_Farrell94 has joined #ocaml
manizzle has joined #ocaml
rgrinberg has joined #ocaml
samrat has joined #ocaml
segmond has joined #ocaml
bytbox has quit [Remote host closed the connection]
Anita_Farrell94 has quit [Remote host closed the connection]
Alford_Cummings has joined #ocaml
Intensity has quit [Ping timeout: 246 seconds]
Intensity has joined #ocaml
gabemc has joined #ocaml
Alford_Cummings has quit [K-Lined]
taion809 has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
siddharthv_away is now known as siddharthv
MercurialAlchemi has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
fold has joined #ocaml
axiles has joined #ocaml
samrat has joined #ocaml
philtom has joined #ocaml
gabemc has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
philtom has quit [Ping timeout: 258 seconds]
ygrek has quit [Ping timeout: 245 seconds]
zRecursive has joined #ocaml
teknozulu has joined #ocaml
<teknozulu>
I've declared a local variable using the rec keyword, and I'd like to return its value, but !result;; is giving a syntax error. (I'm just starting out, so if "We don't take kindly to such imperative practices" is the answer, I would appreciate pointers on a better approach)
<dmbaturin>
I should re-read the page now when I got some sleep too.
thomasga has quit [Quit: Leaving.]
dsheets has joined #ocaml
avsm has joined #ocaml
<madroach>
hi, I am struggeling with opam. When installing something (e.g. type_conv) it always says "ocamlfind: Package type_conv is already installed"
dubst3pp4 has joined #ocaml
<madroach>
Because it is using my system /usr/local/bin/ocamlfind, which in turn looks at /etc/findlib.conf, which in turn says destdir="/usr/local/lib/ocaml".
<Drup>
there is a simple solution, that will also solve other problems: don't use the system switch
<madroach>
where type_conv is in fact already installed.
<madroach>
uh
<adrien_oww>
man findlib.conf
<adrien_oww>
G
<Drup>
no adrien.
<madroach>
I solved it by setting OCAMLFIND_CONF. Another fix would be to set .opam/system/bin in front of PATH, rather than the end.
<Drup>
madroach: "opam switch 4.02.0"
<madroach>
I'm porting to OpenBSD and want to use my patched system OCaml.
<dmbaturin>
Do I really need Library section in _oasis for modules that are only used internally?
<madroach>
How is the system switch supposed to work? Use only the system compiler? System libs, too? system binaries (ocamlfind?) ?
<Drup>
madroach: Can't help with the openbsd side, but using the system switch usually cause issues because system packages interfer with opam's
<avsm>
madroach: it only uses the system compiler — findlib is found from the ~/.opam/system installation area
<Drup>
dmbaturin: No, but it's cleaner and easier to maintain/modify
<avsm>
madroach: should work fine and ignore any system-installed libraries
<Drup>
avsm: "should"
<avsm>
…
<avsm>
any concrete bugs or is that speculation/
<avsm>
I use it like this all the time
<Drup>
well, you have good control over your system, probably better than most beginners :)
<avsm>
and we'd like to fix cases where it doesn't
<madroach>
avsm: I'm chrisz@ by the way
<avsm>
madroach: i guessed :-)
<dmbaturin>
Drup: I'm having a problem with META and DevFiles with it. If I specify FindLibName and FindLibParent, ./configure produces ocamlfind warnings, ocamlfind: Package `lexer' not found
<Drup>
avsm: typical issue is the ocaml fragmentation under debian-like systems
<avsm>
madroach: i'm going to take a look at the state of opam on openbsd later this week; just got my ppc up to fix the PIE issue
<Drup>
or the weird pathing of some stuff under fedora
<avsm>
madroach: but for now, must cycle to work
avsm has quit [Quit: Leaving.]
<madroach>
ok
ontologiae_ has joined #ocaml
thomasga has joined #ocaml
<dmbaturin>
...and if I don't. "oasis setup" produces an error immediately, The file 'src/META' generated for the library 'lexer' is already used for the library 'parser'. You can make one a child of the other to solve this (field `FindlibParent:`).
<Drup>
I guess you put different libraries in the same directory ?
<dmbaturin>
Well, I did. Hhm, how am I supposed to structure the dirs then?
<dmbaturin>
I have grammar.ml -> [lexer.mll, parser.mly] -> cfgen.ml
mrvn has quit [Ping timeout: 246 seconds]
<dmbaturin>
Nothing but the binary compiled from cfgen.ml is useful on its own.
kaustuv has joined #ocaml
Hannibal_Smith has joined #ocaml
shinnya has quit [Ping timeout: 272 seconds]
dsheets has quit [Ping timeout: 258 seconds]
gabemc has joined #ocaml
dsheets has joined #ocaml
dubst3pp4 has quit [Quit: Ĝis la revido!]
thomasga has quit [Quit: Leaving.]
yacks has quit [Ping timeout: 245 seconds]
ggole has quit [Read error: Connection reset by peer]
<gasche>
it seems to me that (1) on 64bits arch most calls pass arguments in register, so there is no popping to do there
<gasche>
(2) popping would be one arithmetic operation on the stack
<whitequark>
as I see, the crux of the argument is that with C calling convention, the code generator can reuse the common prefix of arguments for several consecutive function calls
<gasche>
if the arguments are identical?
<whitequark>
yes.
<whitequark>
it's a very minor problem, compared to others.
<whitequark>
people tend to give it way too much attention.
<gasche>
that doesn't look like something that happens very often in practice, but maybe in numerical computation
<companion_cube>
dmbaturin: I'm think rust is more "modern" than Ada, and in particular it has some strong functional influences
<whitequark>
gasche: sure
<whitequark>
you should've pinged me back in August
<gasche>
I guess I was too busy myself
<gasche>
I don't want anything to do with -ppx right now (too much on my plate), and I have no idea why I was assigned the bug :)
SethTIsue has joined #ocaml
<gasche>
something minimal and helpful to include in the manual would be perfect
<whitequark>
gasche: ok, can you send me a mail? I'll hopefully do it this week
<whitequark>
or just assign me in mantis
bezirg has quit [Ping timeout: 260 seconds]
msaegesser has quit [Ping timeout: 245 seconds]
fold has quit [Ping timeout: 258 seconds]
thomasga has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
<gasche>
whitequark: do you have a mantis username?
<gasche>
hm, it looks like only a subset of users can be assigned
<whitequark>
gasche: whitequark
<whitequark>
hmm
<gasche>
also
<gasche>
I saw in some IRC logs that you were hoping for some toplevel-ppx features to make their way into 4.02.1
<gasche>
I'm not sure which one (I don't follow the -ppx work closely), but I rather doubt it: for now 4.02.1 is announced as bugfix-only, no-new-features release
BitPuffin has joined #ocaml
<gasche>
in any case, I don't think your wish is tracked anywhere; if you strongly think it should go in 4.02.1, you need to make a mantis issue
eikke__ has joined #ocaml
<whitequark>
gasche: it's being discussed with Alain (and others) right now on email
<whitequark>
I will make a mantis issue as well
<kaustuv>
are AST extension nodes expanded before or after type-checking?
typedlambda has quit [Ping timeout: 250 seconds]
<whitequark>
before
<kaustuv>
ah, dang
<whitequark>
typechecker extensions would be ... hard
yacks has quit [Read error: Connection reset by peer]
typedlambda has joined #ocaml
<gasche>
the problem with typechecker extensions is that the typedtree format is complex and unspecified
<whitequark>
s/typetree format/everything about typechecker/
<gasche>
Alain did a lot of work to clean and document the AST format
<gasche>
doing the same at the typedtree level would be a lot more work
badkins has joined #ocaml
<gasche>
the "right" way to do it would probably be to design a typed intermediate representation, and that is two consecutive research internships
<def`>
what would be a typechecker extension?
<whitequark>
def`: implicits :D
<def`>
whitequark: :D, extension as in "fork" then
<whitequark>
well, in principle, you could design the compiler in a way that allows plugging implicits in
<gasche>
def`: Fabrice actually had a "type template" patch floating around
<def`>
I mean, is it reasonable to expects like ppx like extensions acting on types ?
<whitequark>
but it's such a huge amount of work that it's probably unreasonable
<gasche>
def`: I think it is
<def`>
whitequark: architecture astro(cosmo)nauts might come with those :)
<def`>
gasche: yes, but then targetting this hypothetic IR ?
<gasche>
well
<gasche>
you can produce back AST and re-type-check it
<gasche>
(that's how Benoît implemented formats)
<def`>
it's only "type sugars", not really more expressive system
<gasche>
the use-cases I have in mind are of the form "I want to do this but I need type information rather than just the AST", yes
<gasche>
that would not let you change the type system so much
<def`>
yeah.
<gasche>
but that's also the way extension points are designed
<def`>
Hmm, something like open types could be implemented with an extension + one "axiom"/Obj.magic in a library
<npnth>
I'm using emacs, and I'm trying to set up one of the various modes. Is there one of the following? 1) a caml-mode-hooks (or something of that sort), or 2) a way to tell tuareg-mode to not do anything related to font-faces?
<acieroid>
npnth: caml-mode-hook exists for caml-mode, and tuareg-mode-hook for tuareg
tac_ has joined #ocaml
<npnth>
acieroid: sounds like I have an emacs issue then, since I'm not able to turn on auto-complete from caml-mode-hook, but I am locally. That's OT though, so thank you.
thomasga has joined #ocaml
npnth has left #ocaml [#ocaml]
jlouis has joined #ocaml
jlouis has quit [Client Quit]
jlouis has joined #ocaml
Thooms has quit [Ping timeout: 258 seconds]
oscar_toro has quit [Ping timeout: 272 seconds]
slash^ has joined #ocaml
rand000 has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
tty57 has joined #ocaml
Thooms has joined #ocaml
oscar_toro has joined #ocaml
Hannibal_Smith has joined #ocaml
<ebzzry>
does the ocaml manual exist in a single-html form?
morphles has joined #ocaml
IbnFirnas has joined #ocaml
ygrek has joined #ocaml
Thooms has quit [Ping timeout: 272 seconds]
yomimono has quit [Ping timeout: 258 seconds]
<adrien_oww>
yes
<adrien_oww>
ocaml-refman-4.02.html
<adrien_oww>
or something like that
rand000 has joined #ocaml
eikke__ has quit [Ping timeout: 260 seconds]
eikke__ has joined #ocaml
<ebzzry>
adrien_oww: let me check.
<ebzzry>
adrien_oww: thanks
<adrien>
:)
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
WraithM has joined #ocaml
sepp2k has quit [Quit: Konversation terminated!]
mrvn has joined #ocaml
Pepe_ has joined #ocaml
keen__ has joined #ocaml
<Pepe_>
hi there
keen_ has quit [Ping timeout: 260 seconds]
tane has joined #ocaml
SethTIsue has quit [Quit: SethTisue]
rgrinberg has joined #ocaml
<Pepe_>
I'm trying to use the calendar package with ocamlbuild, and I can't get it to compile my files
<braibant>
I have a fairly simple loop that populate a pool of process. The code works under linux and utterly fails under windows. I get Bad file descriptor (waitpid) errors and other strange stuff.
bytbox has quit [Remote host closed the connection]
manizzle has joined #ocaml
rand000 has quit [Ping timeout: 250 seconds]
rand000 has joined #ocaml
NoNNaN has joined #ocaml
Kakadu has quit [Quit: Page closed]
bytbox has joined #ocaml
manizzle has quit [Ping timeout: 244 seconds]
Anarchos has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
dsheets_ has quit [Ping timeout: 272 seconds]
bytbox has quit [Remote host closed the connection]
BitPuffin has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
claudiuc has quit [Remote host closed the connection]
cespinoza has joined #ocaml
zpe has quit [Remote host closed the connection]
Thooms has joined #ocaml
martintrojer has quit [Ping timeout: 240 seconds]
martintrojer has joined #ocaml
manizzle has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
claudiuc has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
t4nk890 has joined #ocaml
rgrinberg has joined #ocaml
pgomes has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
t4nk890 has quit [Ping timeout: 246 seconds]
ggole has joined #ocaml
rand000 has quit [Ping timeout: 246 seconds]
samrat has quit [Ping timeout: 272 seconds]
rand000 has joined #ocaml
bytbox has joined #ocaml
bezirg has joined #ocaml
slash^ has left #ocaml [#ocaml]
slash^ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
ousado has quit [Quit: --]
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
thomasga has joined #ocaml
thomasga1 has joined #ocaml
bytbox has quit [Remote host closed the connection]
rgrinberg has quit [Quit: Leaving.]
gabemc has joined #ocaml
<Drup>
indeed
thomasga has quit [Ping timeout: 272 seconds]
mort___ has joined #ocaml
strmpnk is now known as strmpnk_
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<whitequark>
Drup: the install hook stopped working
<whitequark>
try pinning lwt.
<Drup>
err, I'm too exhausted for that right now
gabemc has quit [Ping timeout: 272 seconds]
gabemc has joined #ocaml
morphles has quit [Ping timeout: 250 seconds]
seangrove has joined #ocaml
<whitequark>
okay
nlucaroni has joined #ocaml
axiles has quit [Remote host closed the connection]
hhugo has joined #ocaml
__w_a_n_e_c_k__ has joined #ocaml
travisbrady has joined #ocaml
gabemc has quit [Ping timeout: 258 seconds]
waneck has quit [Ping timeout: 272 seconds]
rgrinberg has joined #ocaml
j0sh_ is now known as j0sh
hhugo has quit [Quit: Leaving.]
zpe has joined #ocaml
yomimono has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
hhugo has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
mort___ has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
mort___ has joined #ocaml
bcg has joined #ocaml
eikke__ has quit [Ping timeout: 272 seconds]
eikke__ has joined #ocaml
shinnya has joined #ocaml
oriba has joined #ocaml
sheijk has joined #ocaml
araujo has joined #ocaml
cespinoza has quit [Ping timeout: 272 seconds]
mort___ has quit [Quit: Leaving.]
ontologiae_ has joined #ocaml
cespinoza has joined #ocaml
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
SethTIsue has quit [Quit: SethTisue]
MercurialAlchemi has quit [Ping timeout: 272 seconds]
bezirg has quit [Ping timeout: 272 seconds]
bcg has quit [Quit: leaving]
oriba has quit [Quit: oriba]
pgomes has quit [Quit: Leaving]
yomimono has quit [Ping timeout: 258 seconds]
hhugo has quit [Quit: Leaving.]
pyon has quit [Quit: My time here is ogre.]
gabemc has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Verlassend]
ggole has quit [Ping timeout: 260 seconds]
<gabemc>
Looking for some advise on how to parse variable length data from a network packet, using a cstruct. In particular, I have an NTP packet prefixed with 2 IP addresses, which could be IPv4 or IPv6, depending on the larger context. Other than having an inner parse function parameterized over the IP type, I was hoping to use the module system to my advantage.
WraithM has quit [Quit: Lost terminal]
<gabemc>
Any ideas how I might paramaterize my packet structure based upon the IP type effectively, keeping in mind that the parse function will have to rely on the ipaddr implementation for reading and writing those IP addresses to the underlying buffer to go over the wire?
<companion_cube>
you can either go the functor way (parametrize over a sig type ip end, for instance) or the polymorphic way (type 'a packet, where 'a will be ipv4 or ipv6)
thomasga1 has quit [Quit: Leaving.]
<gabemc>
I'm particularly thinking of the 'val to_buffer : Buffer.t -> t -> unit' that exists in both the IP4 and IP6 modules in ipaddr. They don't share a common parent signature, so would the functor work in that case?
thomasga has joined #ocaml
badkins has quit [Remote host closed the connection]
eikke__ has quit [Ping timeout: 272 seconds]
msaegesser has quit [Ping timeout: 260 seconds]
<companion_cube>
can't you just add this val in the functor's parameter?
bcg has joined #ocaml
badkins has joined #ocaml
ollehar has quit [Remote host closed the connection]
<companion_cube>
"let open ... in ..." is for expressions
<companion_cube>
within a module you can just "open Foo"
<tobiasBora>
Uhm ok thank you !
<gabemc>
companion_cube: I'm really just coming up to speed on functor syntax. I had thought that the parameter to the functor had to be another signature type in order to use the signature functions for that type.
<companion_cube>
module DoSomething(IP : sig type ip val print : Buffer.t -> ip -> unit end) = struct ...... end
<gabemc>
huh.
<companion_cube>
that would be a functor over some module IP that contains a type and a print function
<gabemc>
Can I generalize a parent signature function for both IP4 and IP6 and parameterize the functor that way, and the module constructor from the functor would establish a "homomorphic equality" between the new signature and the 2 implementation types?
<companion_cube>
gabemc: if you write a signature that both IP4 and IP6 match, then it will be ok
<companion_cube>
there is no "parent signature"
<companion_cube>
modules match signatures in a purely structural fashion
<bitbckt>
when all you have is a subtype of hammer...
<gabemc>
Ok, thanks. That was my impression. My verbiage is obviously a little off. I'll give that a shot. Thanks so much.
<tobiasBora>
companion_cube: Oh of course I'm stupid. Thank you !
<companion_cube>
gabemc: simple example is Map.OrderedType / Map.Make
<companion_cube>
Map.Make requires a signature (Map.OrderedType), and for instance you can call Map.Make(String) without String knowing about Map
Sim_n is now known as Simn
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
taion809 has quit [Ping timeout: 245 seconds]
bytbox has joined #ocaml
Thooms has quit [Quit: WeeChat 0.4.3]
travisbrady has joined #ocaml
taion809 has joined #ocaml
<gabemc>
Hey, random question: my syntax highlighting in VIM doesn't actually grey out any of my OCaml comments. Anybody else every have that problem or know a workaround?
travisbrady has quit [Quit: travisbrady]
Nahra has quit [Remote host closed the connection]
travisbrady has joined #ocaml
Nahra has joined #ocaml
yacks has quit [Ping timeout: 244 seconds]
yacks has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<smondet>
gabemc: what is the filetype detected by Vim? (works fine for me)
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
<gabemc>
smondet: What's the command in vim to find that out?! :P
<smondet>
:set ft ?
travisbrady has quit [Quit: travisbrady]
<gabemc>
Oh, yeah.
<smondet>
it should reply filetype=ocaml
<gabemc>
It says 'filetype = ocaml'. That's not it.
darkf has joined #ocaml
NoNNaN has quit [Remote host closed the connection]