<vfoley->
I've created a simplified version of a parser that I'm working on. Does anyone see a way of adding parenthesized types to expr_or_type without having to refactor every expr production? https://gist.github.com/gnuvince/9254e2a1d9ad47b8f00f
thomasga has quit [Quit: Leaving.]
<Drup>
the bracked (and the paranthesis you want to add) are supposed to be *before* the type ?
<vfoley->
Drup: the syntax is similar to Go's: []int is an array (or slice) of ints. (int) is the same as int.
<Drup>
and what do you want to add ?
<Drup>
()int ?
<vfoley->
At the moment I can support (3 + 4), but not ([]int)
<Drup>
it seems to be supported by the grammar
<vfoley->
(int) works (it returns an expression, but because int is not a keyword in Go, that's the correct behavior)
<vfoley->
([]int) gives a parse error
<Drup>
ah, right
<Drup>
why did you introduced this "non_expr_type" thing ?
<Drup>
Oh, I see why
<vfoley->
And trying to add parentheses either creates reduce/reduce conflicts or forces me to make the code a lot more complicated (and more frail)
<vfoley->
to avoid conflicts between expr and type_ due to identifiers and parentheses.
HACKING-FACEBOOK has quit [Ping timeout: 256 seconds]
<Drup>
do you really need to be able to be able to put types and expressions at the same positions ?
<Drup>
bis repetita :>
<vfoley->
Unfortunately, yes
<vfoley->
in Go, function calls and conversions share the same syntax
<Drup>
May I give my opinion about the grammar of this language ?
<vfoley->
fib(24) vs int(3.1)
<vfoley->
Sure, but I can't change the language syntax.
<Drup>
well, giving my opinion won't change any thing, I presume
seanmcl has joined #ocaml
<Drup>
It's still retarted.
<vfoley->
I agree
<Drup>
retarded too*
<vfoley->
Gave me a new perspective on language design: different semantics should have different syntax
<Drup>
that, and also "make your grammar fucking non-contextual"
<vfoley->
Yeah
<Drup>
anyway!
<vfoley->
Thing is, Go will be the compiler project of undergrads this winter
<Drup>
You are saying int is not a keyword
<vfoley->
not a keyword
<vfoley->
pre-declared identifier
<Drup>
which means you have literally no way to differenciate a function declaration from a cast at parsing time anyway
<vfoley->
so int(41) could be a fcall or a type conversion
<vfoley->
Exactly
<vfoley->
hence the expr_or_type business
<Drup>
so just embrace the fact that types and expressions are the same thing in the grammar
<Drup>
put them in the same bundle
<Drup>
and tidy up the mess afterward, by pruning the AST.
<vfoley->
yeah, at the moment I have in my AST a different type for expressions and for types
bezirg has quit [Remote host closed the connection]
<Drup>
yeah, just don't do that in what I would call "the parsetree"
<vfoley->
so do something like: type expr = ExprInt of int | ExprId of string | ExprSliceType of expr | ...
<Drup>
the first "job" of the front end, after parsing, is going to be "find out who are types and simplify the parsetree to separate types and expressions"
thizanne has quit [Ping timeout: 240 seconds]
<vfoley->
and later during type checking, generate a typed AST where I have type expr = ExprInt of Int | ExprId of string | ... and ty = TypeId of string | TypeSlice of ty | ...
<Drup>
I wouldn't call that typechecking
<Drup>
but yes
thomasga has joined #ocaml
<vfoley->
If I figure out the types, I may as well generate the typed AST during type checking, no?
pierpa`` has quit [Read error: Connection reset by peer]
pierpa`` has joined #ocaml
<Drup>
well, you don't really figure out the type, you just look up almost syntactically inside each function call
<Drup>
types*
<vfoley->
hmmm
<vfoley->
yeah, I see what you mean
<Drup>
For example "if the """function""" is a splice, It's a cast"
<Drup>
vfoley-: If I understood go enough, you don't have user-defined types, don't you ?
<vfoley->
I'll give it a shot tomorrow
<vfoley->
you do
HACKING-FACEBOOK has joined #ocaml
<vfoley->
I simplified the syntax here
<Drup>
oh ok
<Drup>
and they are in the same namespace as function, I presume ?
<vfoley->
but in the real language, you could have: type myType []something
<Drup>
okay
<vfoley->
yeah, one namespace for everything
<Drup>
so it's going to be very annoying
<Drup>
good luck.
<Drup>
=)
<vfoley->
and order of declarations doesn't matter
<Drup>
ugh
<Drup>
*very* annoying
<vfoley->
I may relax this last requirement
<vfoley->
not fun at all for students to implement
madroach has quit [Ping timeout: 250 seconds]
<Drup>
are you sure you don't want to relax the whole "the same syntax as Go" ? :D
<Drup>
I mean, C-- is cool too :p
<vfoley->
We have already advertised the class :)
<Drup>
ah!
<vfoley->
And some people have registered because we are writing a compiler for a subset of Go
<vfoley->
Although in retrospect, I would've probably suggested something else to the prof
<Drup>
well, they would learn just as much with a subset of C--, but ...
<vfoley->
Rob Pike deceived me! He said we could parse Go without a symbol table!
<vfoley->
the same C-- as is used in Haskell, or something different?
madroach has joined #ocaml
<Drup>
there are as many C-- as there are compilers, I think :D
<Drup>
It boils down to mostly the same everytime, though
<vfoley->
ok
<vfoley->
Anyway, tomorrow I'll try a "dumber" AST
<vfoley->
and hopefully I can convert it to a more precise AST without too much hassle
<vfoley->
really wish I'd looked more into that "don't need a symbol table to parse Go" thing, that would've taken it out of the running straight away
HACKING-FACEBOOK has quit [Ping timeout: 272 seconds]
thomasga has quit [Quit: Leaving.]
bytbox has joined #ocaml
Simn has quit [Quit: Leaving]
AltGr has joined #ocaml
zelines has quit [Ping timeout: 264 seconds]
zelines has joined #ocaml
BitPuffin has quit [Ping timeout: 245 seconds]
manud has quit [Quit: Connection closed for inactivity]
malc_ has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkf has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
nadako has quit [Read error: Connection reset by peer]
seanmcl has joined #ocaml
ousado has quit [Ping timeout: 240 seconds]
seanmcl has quit [Client Quit]
thizanne has joined #ocaml
pyon has quit [Ping timeout: 256 seconds]
bytbox has quit [Remote host closed the connection]
ygrek has joined #ocaml
badkins has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 244 seconds]
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
pyon has joined #ocaml
q66 has quit [Quit: Leaving]
mcclurmc has quit [Remote host closed the connection]
MrScout_ has joined #ocaml
MrScout has quit [Ping timeout: 258 seconds]
seanmcl has joined #ocaml
MrScout_ has quit [Ping timeout: 258 seconds]
boogie has quit [Remote host closed the connection]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
manud__ has joined #ocaml
manud_ has quit [Ping timeout: 244 seconds]
yomimono has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
mcclurmc has joined #ocaml
libertytrader has joined #ocaml
malc_ has quit [Quit: leaving]
psy has quit [Ping timeout: 255 seconds]
psy has joined #ocaml
pyon is now known as pyon-free
psy has quit [Ping timeout: 240 seconds]
natrium1970 has joined #ocaml
psy has joined #ocaml
<natrium1970>
Suppose that I have a variant type “type general = A of int | B of float | C of string”, but I also have a variant “type canonical = A of int | B of float” that represents the information in type “general” but in some standardized form. There doesn’t seem to be an easy way to establish a relationship between the two types, except (maybe) if those nightmarish polymorphic variants are involved. Any suggestions to keep
<natrium1970>
things simple?
aviraldg has joined #ocaml
psy has quit [Ping timeout: 244 seconds]
libertytrader has quit [Quit: Leaving]
<nicoo>
natrium1970: You can't have implicit conversions from one to the other without polymorphic variants.
MrWuffles has quit [Ping timeout: 264 seconds]
<nicoo>
If C of string is meant to represent not-yet-parsed things, you might want to have some string -> canonical function instead
<natrium1970>
It’s not so much that I mind an explicit conversion, except I worry about writing a lot of extra broilerplate code.
<nicoo>
(It's hard to suggest something without nowing more context, though)
<natrium1970>
I was trying to keep it simple, but it’s probably too abstract. Suppose I want to represent a very small subset of algebraic expressions. And let’s say that the parser returns an expression of this type: type expr = Plus of expr * expr | Minus of expr * expr | Times of expr * expr | Var of string | Const of int;;
<natrium1970>
The parser might return an expression like Minus (Var "a", Var "b")
samrat has joined #ocaml
<natrium1970>
But it is convenient to have a canonical form, where the expression is represented as Plus (Var "a", Times (Const (-1), Var "b"))
<natrium1970>
Essentially how Mathematica does it.
bgianf has quit [Remote host closed the connection]
<nicoo>
Ah, I see. I would probably just provide “smart” constructors and have the parser use them instead of building values directly
MrScout has joined #ocaml
<natrium1970>
Could you elaborate a little?
<natrium1970>
In particular, what do you mean by a “smart” constructor?
struktured has quit [Ping timeout: 258 seconds]
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
manud__ has quit [Quit: Be back later ...]
<flux>
natrium1970, maybe you could have type ('a, 'b) base_expr = Plus of 'a * 'a | Times of 'a * 'a | Other of 'b and complex = Minus of complex_expr and complex_expr = Complex of (complex_expr, complex_expr) base_expr and simple_expr = Simple of (simple_expr, unit) base_expr, or maybe that is over-engineering it ;-). but it would one part of code to have 'complex' expressions and then a reduction phase would produce 'simple' expressions
<flux>
he probably meant a function instead of a constructor, so the function would do the mapping
<flux>
polymorphic variants might be a better fit for this kind of simplificiation
ggole has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
MrWuffles has joined #ocaml
MrScout has quit [Ping timeout: 245 seconds]
<nicoo>
flux: I would even say type complex_expr = (complex_expr, complex_expr) base_expr and simple_expr = (simple_expr, unit) base_expr
struktured has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
<nicoo>
natrium1970: I meant that instead of constructing explicitely the value Minus(a, b) in the parser (and same for each constructor), you could have a function call (minus a b), with a function defined for each constructor. If you do it in another module, it separates nicely parsing and “normalization”.
<nicoo>
I have to admit that I like flux's solution too, depending on your needs
<natrium1970>
Okay. I will look at those.
aviraldg has quit [Quit: Leaving]
jao has quit [Ping timeout: 250 seconds]
keen___________8 has quit [Quit: Tiarra 0.1+svn-39209: SIGTERM received; exit]
psy has joined #ocaml
natrium1970 has quit [Quit: natrium1970]
keen_ has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
siddharthv_away is now known as siddharthv
boogie has joined #ocaml
manud__ has joined #ocaml
ggole has quit []
ygrek has quit [Ping timeout: 264 seconds]
<struktured>
I need to write an ocaml program to fill out of my crappy employee self evaluation form
samrat has joined #ocaml
MrWuffles has quit [Ping timeout: 244 seconds]
manud__ has quit [Quit: Be back later ...]
MrWuffles has joined #ocaml
ivan\ has quit [Read error: Connection reset by peer]
ivan\_ has joined #ocaml
ivan\_ is now known as ivan\
aviraldg has joined #ocaml
aviraldg has quit [Max SendQ exceeded]
aviraldg has joined #ocaml
aviraldg has quit [Changing host]
aviraldg has joined #ocaml
chambart has joined #ocaml
shaykha has quit [Ping timeout: 240 seconds]
zelines has quit [Ping timeout: 240 seconds]
<dmbaturin>
struktured: Prolog may be better suited for it.
<struktured>
dmbaturin: touche
<nicoo>
dmbaturin: I think Human Ressources would be more impressed by the use of Malboge :>
<struktured>
if they actually read the damn thing I would say we should be using ocaml somewhere in it
<flux>
nicoo, you could, but you would need -rectypes to compile it
<flux>
hmm, or maybe not
<flux>
you did reduce recursivity a bit
<flux>
nope, won't work
manud__ has joined #ocaml
<nicoo>
flux: Yes, would need rectypes, my bad :(
<nicoo>
THen, I'm not so fond of your solution anymore :P
ygrek has joined #ocaml
bytbox has joined #ocaml
ysz has joined #ocaml
MercurialAlchemi has joined #ocaml
ggole has joined #ocaml
boogie has quit [Remote host closed the connection]
<toolslive>
can oUnit produce the type of xml output that jenkins needs? (JUnit xml format)
lordkryss has joined #ocaml
Simn has joined #ocaml
badon has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
seanmcl has joined #ocaml
_andre has joined #ocaml
ikaros has joined #ocaml
seanmcl has quit [Client Quit]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 265 seconds]
zelines has joined #ocaml
jonludlam has joined #ocaml
dsheets has joined #ocaml
koderok has joined #ocaml
koderok has quit [Client Quit]
badon has joined #ocaml
kandu has quit [Ping timeout: 255 seconds]
darkf_ is now known as darkf
<darkf>
is there any way to take advantage of row polymorphism with pattern matching? let f x = x#foo;; is valid, but let f = function | {foo=x} -> x;; doesn't (the record field foo is unbound)?
<darkf>
i'm not sure if there's a way to say 'record containing fields foo OR bar' in the type system
<flux>
it is not possible to use records in that way
<darkf>
oh, okay
<flux>
you could perhaps somehow use lists of polymorphic variants, but the code involving it would be annoying and probably use polymorphic recursion
eizodo has joined #ocaml
<flux>
(not sure if it's possible)
<darkf>
yeah, i was just thinking i wanted to have a record containing optional fields and if they exist then ...; but it might seem silly.
<flux>
maybe you can write the records for extensibility: type 'a t = { name : string; more : 'a }
<ggole>
You could try objects
<flux>
instead of trying to pattern match objects you could use 'when' clauses in the patterns
<flux>
there was also this campl4 extension for doing pattern matching with objects
<flux>
it's probably not up-to-date though
<darkf>
huh, might be something worth playing with
<_andre>
so i have this packed library that has a Buffer module, and it has a dependency on a library that uses the stdlib Buffer module
pgomes has joined #ocaml
<pgomes>
HI all
<pgomes>
HI all
<darkf>
hi
<_andre>
so i get the "inconsistent assumptions over interface Buffer" error
<_andre>
is there a way around that?
eizodo has quit [Ping timeout: 246 seconds]
<mrvn>
don't have a cyclic dependency
<flux>
the problem here is that during compilation there are two interface called Buffer, right?
<flux>
even if the end result only has one
boogie has quit [Ping timeout: 264 seconds]
<mrvn>
yeah. it likely picks the wrong one creating a cycle.
<flux>
what cycle?
chambart has quit [Ping timeout: 240 seconds]
<flux>
it simply finds _andre's buffer.cmi and the standardlib's buffer.cmo
<flux>
or vice versa.. ?
<mrvn>
flux: Pack.Buffer -> Lib.Foo -> Buffer (resolved to Pack.Buffer)
<flux>
well, Lib.Foo doesn't really depend on code that doesn't even exist when it has been compiled..
<mrvn>
Solution: Don't name your own modules the same as the stdlib.-
<flux>
seems like a workaround, not a solution :)
<flux>
I suppose Lib.Foo also exposes its Buffer-dependency in its interface
<flux>
otherwise it wouldn't be a problem, right?
<mrvn>
I think that the pack has a module named Buffer is conflict enough.
rand000 has joined #ocaml
<mrvn>
MyOWn.Buffer would be OK I think but not just plain Buffer.
<pgomes>
What is a nice application stack to use for web services development in Ocaml ?
<flux>
_andre, btw, at which stage does the error arise?
<mrvn>
there is ocamlnet
zpe has quit [Remote host closed the connection]
<flux>
there is eliom, but I dare claim its learning curve is quite steep
<pgomes>
without anything on top ? meaning nginx and alike ?
<pgomes>
so bare Ocaml and voila ?
<flux>
both ocamlnet and eliom/ocsigen have their own servers
<mrvn>
I'm still looking for a html parser and js interpreter combo good enough to handle pagination and such.
<pgomes>
but I believe it support templating
<pgomes>
ok
<flux>
the two ones mentioned are not the only options
<pgomes>
I can assume that .. :P
<flux>
there are other real alternatives as well, I just cannot recall them offhand :)
<pgomes>
and the deployment is just a (large?) binary that is started as deamon or something ..?
<_andre>
flux: when it's generating the cmi file for a module in my library that uses the Buffer module and the dependency
<pgomes>
I just want to have an idea
arj has quit [Ping timeout: 255 seconds]
manud__ has joined #ocaml
<_andre>
i've just realized that i was wrong about the dependency, i grepped for Buffer in it but only setup.ml and myocamlbuild.ml use it. the library itself doesn't
manud__ has quit [Client Quit]
<_andre>
weird that the "inconsistent assumptions" error happened for it then...
<mrvn>
Have you tried make clean and rebuilding the lib?
<_andre>
yeah
<mrvn>
The error can also mean something was compiled against a different compiler version.
<_andre>
let me reinstall it then
<mrvn>
opam?
<_andre>
yeah
samrat has quit [Quit: Computer has gone to sleep.]
typedlambda has quit [Ping timeout: 250 seconds]
<_andre>
no, same error... i had some leftovers in /usr/local/lib/ocaml from manual installs but that wasn't the problem either
<Drup>
pgomes: what are you trying to do ?
<Drup>
pgomes: on the ocsigen side, the deployement is either a binary with a bunch of cmFOO and dynlinking OR a static binary (but it's a bit more involved to compile). Soon we should have ocsigen-over-mirage, and they you won't even need an OS anymore :]
<Drup>
then*
typedlambda has joined #ocaml
AlexRussia has joined #ocaml
alexey has joined #ocaml
fraggle_ has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
<Drup>
flux: gasche has somewhere a concept of pattern abstraction that is much better than what this pattern package provides :>
<adrien>
but he keeps it to himself while saying "my precious"?
<Drup>
No, he published a blog post about it, then said he was not completely happy with the design
ingsoc has joined #ocaml
<adrien>
diversion tactic
ygrek has quit [Ping timeout: 250 seconds]
arj has joined #ocaml
kandu has joined #ocaml
arj has quit [Ping timeout: 240 seconds]
ChristopheT has joined #ocaml
samrat has joined #ocaml
sheijk has joined #ocaml
arj has joined #ocaml
zelines has quit [Ping timeout: 245 seconds]
choeger_tu has joined #ocaml
choeger_tu has quit [Client Quit]
boogie has joined #ocaml
nojb has joined #ocaml
boogie has quit [Ping timeout: 256 seconds]
axiles has joined #ocaml
<pgomes>
Drup: I wanted to start developing simple web services for a possible customer, and I am searching for a suitable framework/language
choeger_tu has joined #ocaml
<pgomes>
I saw ocaml and liked the beast :P
ysz has joined #ocaml
<pgomes>
So, I am searching around ...
<pgomes>
Asking around to be more precise
<Drup>
ok
Reventlov has quit [Remote host closed the connection]
<pgomes>
Do you have any experience with web stuffin Ocaml ?
<Drup>
I happen to be on the ocsigen team.
<pgomes>
The right one then :P
<Drup>
flux's right about ocsigen's learning curve, though.
<pgomes>
Any good advices on starting with it then ?
<Drup>
not really, just look at the tutorials
<pgomes>
so, no need for nginx; build the binaries and run and voila ? Im trying to convince myself its easy :P
Reventlov has joined #ocaml
<Drup>
the fact that you don't need nginx just move the difficulty somewhere else :D
<pgomes>
but remove dependencies ... which from my point of view is good...
<pgomes>
*removes
<pgomes>
One silly question, is not possible to lunch Ocaml applications my launching the REPL and bootrapping the application ?. Erlang like ?
<pgomes>
I know its slower, but from a development speed point of view maybe its easier ?
<pgomes>
and faster
<Drup>
in general, it's midly possible, in eliom's case, it's not.
<pgomes>
so I need to recompile the stuff everytime ?
zpe has joined #ocaml
<Drup>
consider that as early syntax error detection, it would seem much less of a problem :D
<pgomes>
my point was not for that, was to make the build/test cycle faster ...
<pgomes>
So I was asking
<Drup>
yes, you do.
<pgomes>
thanks
<flux>
also ocaml compiles fast :)
<flux>
though I think eliom does take its time to start up, if I'm remembering my last time correctly..
zpe has quit [Ping timeout: 255 seconds]
nojb has quit [Quit: nojb]
<Drup>
there is a realoding feature in ocsigenserver, but iirc, it's a bit tricky if you start changing the type of things
<pgomes>
kinda hotswap ?
<Drup>
yes, except it doesn't work as well
toolslive has quit [Ping timeout: 272 seconds]
<Drup>
(it basically can't, because of the limitations in OCaml)
<pgomes>
but it misbehaves if for example some type or signature changes?
<Drup>
yes
<pgomes>
its a start though
badon has quit [Ping timeout: 250 seconds]
badon has joined #ocaml
siddharthv is now known as siddharthv_away
jonludlam has quit [Ping timeout: 244 seconds]
jonludlam has joined #ocaml
zpe has joined #ocaml
Thooms has quit [Ping timeout: 250 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
pparkkin has joined #ocaml
<pparkkin>
Hi!
<pparkkin>
Beginner here. What does the warning "this open statement shadows the label" mean? And how do I get rid of it?
<Drup>
it means you did something like "type bla = Foo"
<Drup>
and there is another Foo defined in the module you are opening
<Drup>
hum, actually "label", so it's probably a record and not a sum type
<Drup>
type bla = { foo : ... }
<Drup>
to solve it, two possibility, 1) Use a different name ;) 2) use "open!" with a bang, to silence the warning
<pparkkin>
What I have is a "type vector3 = { x : float; ... }" in one file, and the warning is about the y. But I can't figure out what the other y definition could be. I don't think I'm defining any other y's anywhere else.
<Drup>
what is the open ?
<pparkkin>
What do you mean by that?
<Drup>
which module are you opening.
<Drup>
the warning should be located on a specific open
<pparkkin>
The type definition is in its own module.
<pparkkin>
And that is the open I'm getting it from.
<pparkkin>
The file doesn't have anything else but the vector3 type definition.
<Unhammer>
val of_element : 'a elt -> Dom_html.element Js.t
<Unhammer>
val of_node : 'a elt -> Dom.node Js.t
<Unhammer>
of_node turns something into a node
<Unhammer>
(I understand it's casting something which is assumed to be a node, but still)
<Drup>
hum, what's the issue ?
<Drup>
Oh.
<Drup>
I see
<Drup>
I know the reasoning behind it, so I never noticed how backward it was :D
pparkkin has quit [Ping timeout: 256 seconds]
samuel02 has joined #ocaml
<Unhammer>
also, it feels odd that the same module is used for casting all kinds of things into Dom_html types *except* for of_node, which turns it into a Dom type
davine has joined #ocaml
<Drup>
well, it's more "cast to js_of_ocaml things"
<Drup>
and casting to bare node can be useful, occasionally
<Unhammer>
but ok, "let span_elt = Html5.To_dom.of_element span" is better than my
<Unhammer>
heh I'm not suggesting removing it, I just have the feeling it could be organised better. I'm not sure how, though, since I don't understand the … organisation … catch 22
<Drup>
you have to functor over the tyxml type, one to go out and one go in, that's all.
<Drup>
two*
rossberg has joined #ocaml
nox_ has joined #ocaml
<Drup>
dsheets: do want opam doc, so that we can have a decent documentation for all the tyxml functors :(
<dsheets>
yes... me too
ygrek has joined #ocaml
<dsheets>
it is coming soon... i am currently integrating and debugging
<Drup>
nice !
<Drup>
Important question: how are you going to handle "additional pages" ?
<dsheets>
eh, i guess... it will certainly need more work over the next few months so that most users are generally happy with it
<dsheets>
what do you mean?
someTS has quit [Ping timeout: 265 seconds]
<Drup>
well, if I want additional documents that goes with the documentation, and still can have the nice auto-link features, and all that but are not APIs.
<Drup>
in ocamldoc, you can give -intro, but it's only for one document, and it's only the intro
mearnsh has quit [Ping timeout: 258 seconds]
rossberg has quit [Ping timeout: 258 seconds]
<Drup>
This is the reason of wikidoc (the sort of weird thing we use in ocsigen to convert ocamldoc to wiki creole syntax), it allows us to have the manual and documentation that goes almost well with each other. It's itself plagued with various flaws, though. :/
<dsheets>
Drup, ah, this won't be in the first version but the doc parser is a separate library so a future version will include a tiny xml namespace to help you write doc templates that include portions of docs and refer to interface components from normal pages
<Drup>
ok
<Drup>
is the doc markup parametrized or is it still ocamldoc's thing ?
<dsheets>
parametrized over?
<Drup>
yes
<dsheets>
over what?
<Drup>
I mean, can we change the markup in ocamldoc's comments ?
boogie has joined #ocaml
seanmcl has joined #ocaml
<Drup>
(not to say ocamldoc's one is bad, but it's .. unsatisfying :<
<dsheets>
Ah, again, this is not initially supported but should be easy to separate in practice. The concrete syntax is parsed by a library that creates a well-known AST. There isn't much extensibility in the AST right now but there will be more in the future.
mearnsh has joined #ocaml
<Drup>
ok
<dsheets>
Also, the parser itself could be swapped but this is a bit discouraged because mixed syntaxes can be painful. In my discussions with various people, I think most people would either like to use a common syntax like XML or an ocamldoc-like syntax that is more lispy.
toolslive has quit [Ping timeout: 272 seconds]
<dsheets>
Ideally, we wouldn't fork this syntax too much so tools like merlin can still figure out wtf is going on.
<Drup>
I would rather have markdown or rstxt.
<dsheets>
we plan on doing some opam studies to determine which parts of ocamldoc syntax can be deprecated safely
<Drup>
(and I don't want to write any xml by hand, ever.)
<dsheets>
well, you can certainly have those inside of quotations in doc comments... i don't think we'll prioritize extensions to either of those ad hoc languages so that ocaml docs can be written in them
<Drup>
sure
boogie has quit [Ping timeout: 256 seconds]
<dsheets>
as for xml, it's pretty much the most widely used generic document interchange format in existence so support for interop there is pretty clear
darkf has quit [Quit: Leaving]
<dsheets>
i.e. the html that the new tool produces is well-formed xml
<Drup>
interesting choice, considering the current position of xhtml
rossberg has joined #ocaml
<dsheets>
xhtml rendering is a different matter... there exists a subset html and xml that is valid/well-formed as both
<Drup>
oh, I see
<dsheets>
and the doc strings have markup in them and maybe you want some post-processing or additional metadata in the extracted docs
<dsheets>
the end user shouldn't have to see or deal with any of this, though
<mfp>
Drup: mirage guys =~ conduit & cohttp, we want more people :) (the idea is to solve the GC pressure problem via social... pressure so that https://github.com/savonet/ocaml-ssl/pull/15 moves forward and all those up the chain can benefit ;-)
<Drup>
:D
tane has joined #ocaml
<Drup>
mfp: you are working on mirage now ?
<mfp>
nope
octachron has quit [Quit: Leaving]
<Drup>
ok
amirmc has joined #ocaml
amirmc has quit [Client Quit]
<Drup>
(the "we" was misleading :D)
fraggle-boate has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
lordkryss has quit [Quit: Connection closed for inactivity]
boogie has quit [Remote host closed the connection]
<pyon-free>
The error I get in the REPL is "Error: This expression has type [< `Fresh of 'a | `Solved of expression ] ref but an expression was expected of type variable".
<Drup>
1) you probably don't want it private in the implementation
<Drup>
2) the poly variant is completely pointless here
<Drup>
yes, that's because of the private, just remove it
<pyon-free>
What I want to do is to make the type "variable" abstract from the outside.
<Drup>
you already did that
<Drup>
well, at least, if you constraint the output of the functor by the Poly signature.
<Drup>
POLY*
<pyon-free>
Drup: That has the unfortunate consequence of also making the types "layer" and "context" abstract, which I do not want.
<ggole>
pyon-free: you've got some other errors hiding in there, too
<pyon-free>
ggole: Yeah, I hastily made the switch to polymorphic variants.
<pyon-free>
I originally had an additional type "... and state = Fresh of int * int | Solved of expression and variable = state ref".
<ggole>
Missing `s, a missing rec, and fresh can't be polymorphic (because value restriction)
<Drup>
you should keep that, imho
<Drup>
except if you have really a good case of the subtyping, but inside a ref, that's probably not the case
<pyon-free>
I do not really need subtyping here.
<Drup>
use a normal variant then :)
<pyon-free>
What I need is to hide the reference cell.
<Drup>
no problem with that, that's what type signatures are for
<Drup>
you should see my linear algebra code, with lot's of formula in all their utf8 gloriousness in the comment. :D
yomimono has quit [Ping timeout: 264 seconds]
enquora has quit [Remote host closed the connection]
avsm has joined #ocaml
emery has quit [Remote host closed the connection]
mcclurmc has quit [Ping timeout: 264 seconds]
jbalnit has quit [Quit: Leaving.]
mort___ has quit [Ping timeout: 272 seconds]
bytbox has quit [Remote host closed the connection]
Thooms has quit [Quit: WeeChat 1.0.1]
avsm has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
<whitequark>
companion_cube: that's actually my nice code
<whitequark>
you should see protobuf for my awful code
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
rand000 has quit [Quit: leaving]
cdidd has joined #ocaml
rossberg has quit [Ping timeout: 258 seconds]
rossberg has joined #ocaml
pparkkin has joined #ocaml
avsm has joined #ocaml
pparkkin has quit [Ping timeout: 256 seconds]
dsheets has quit [Ping timeout: 264 seconds]
sheijk has quit [Ping timeout: 255 seconds]
rossberg has quit [Ping timeout: 258 seconds]
larhat has joined #ocaml
samuel02 has quit [Remote host closed the connection]
kakadu has joined #ocaml
rossberg has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
chaptastic has joined #ocaml
vfoley_ has joined #ocaml
vfoley_ has quit [Client Quit]
vfoley has joined #ocaml
mearnsh has quit [Ping timeout: 258 seconds]
rossberg has quit [Ping timeout: 258 seconds]
zwer_p has quit [Ping timeout: 250 seconds]
mearnsh has joined #ocaml
zwer_p has joined #ocaml
rossberg has joined #ocaml
bytbox has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
<Unhammer>
what happens to an Lwt_js_events thread attached to an html element if I remove that element? does it get GC'ed, or do I have to do something?
<Drup>
It should get GC.
<Unhammer>
ok :)
<Unhammer>
there was some tutorial that had someting like "Eliom_client.onunload (fun () -> stop_checking thread)"
<Unhammer>
where stop_checking just cancelled the thread
slash^ has quit [Read error: Connection reset by peer]