<aantron>
hcarty: Algebr`: so in OASIS, you just do BuildDepends: thread? that doesn't seem right, its not a package
<aantron>
and i think you do sometimes need _tags with OASIS, like for open(A) and whatnot.. maybe this is one of those cases? or does OASIS have some special field for -thread?
<aantron>
(looking at docs)
<Algebr`>
in BuildDepends: threads
<aantron>
ah cool
<aantron>
yeah
<aantron>
just found its meta file to make sure :)
<aantron>
i guess that means the right way in ocamlbuild is package(threads)
<pierpa>
Algebr: I think it was there already in Caml Light
<aantron>
bwaha. package(threads): missing -thread or -vmthread switch
d0nn1e has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ocaml
<Algebr`>
gotta love it
yunxing_ has quit [Remote host closed the connection]
<Algebr`>
I'm loving cmake
<aantron>
yeah, its nice
<Algebr`>
aantron: are you good with idiomatic C++?
<aantron>
yes
<aantron>
in a C++ sort of way
<aantron>
in C++ you just assume that anyone who says they are good, is really not :p
<Algebr`>
I believe that too already
<Algebr`>
gonna lean on you then
<aantron>
uh oh :p
<Algebr`>
lol
bensu has quit [Remote host closed the connection]
<def`>
what's nice about cmake?
Sorella has joined #ocaml
<Algebr`>
makes it easy to build C/C++ code, cross platform, easy installing of libraries
<Algebr`>
error messages are helpful
seangrove has quit [Ping timeout: 276 seconds]
<def`>
I never really understood the langauge
<def`>
language*
<aantron>
def`: it works, unlike many things in the c++ world. and its not that hard to use
<aantron>
things -> build things
<def`>
I know another language with similar issues :)... Looking at it this way, building has always been painful
<aantron>
hehehe no its not like that
<aantron>
c++ situation is faaaar worse
<def`>
impressive
<aantron>
there are multiple compilers with incompatible command line conventions, no package managers (no ocamlfind), everything is typically installed in some strange combination of system headers and other directories
<aantron>
system directories* dang it
<aantron>
and so on and so forth
<aantron>
the cmake devs keep up with a lot of this crap, and abstract a lot of it away
<aantron>
and it works surprisingly well
<def`>
Ok. I used it a few times, what I really liked was using ccmake
<def`>
to fix at the last minute expectations which broke on whatever platform I was using
<aantron>
ah, didnt try it
<def`>
It's a terminal GUI which shows the configuration inferred for your platform.
FreeBirdLjj has joined #ocaml
<def`>
And allows you to override variables and have a quick edit-config feedback loop.
<def`>
Very useful to target exotic platforms. They probably took into account that automagic cannot work often enough in the real word that failure as to be handled in a friendly way
FreeBirdLjj has quit [Remote host closed the connection]
<def`>
That said, I never grasped the CMake programming language.
hx1 has joined #ocaml
<aantron>
yeah the cmake programming language is some weird stuff
FreeBirdLjj has joined #ocaml
<aantron>
i only ever understood it temporarily :)
<def`>
hehe, copy-paste programming
<Algebr`>
just need to do enough copy paste to get it to build
<aantron>
yeah. it helps that they have excellent docs to paste from :)
<aantron>
i love cmake
<aantron>
i have a build that runs on (estimating) like 7 version each of clang and gcc, with lots of warnings, different versions of the c++ standard, plus something like 5 releases of msvc... and cmake drives all of it
<def`>
msvc & g++ in the same specification, that's a lot
hx1 has quit [Ping timeout: 240 seconds]
<def`>
automake don't need a gcc update to break :)
<aantron>
hehe
groovy2shoes has quit [Remote host closed the connection]
bensu has joined #ocaml
groovy2shoes has joined #ocaml
<Algebr`>
and there's an emacs minor mode, nice create comfort
FreeBirdLjj has quit [Remote host closed the connection]
bensu has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
seangrove has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
bensu has joined #ocaml
hcarty has joined #ocaml
seangrove has quit [Ping timeout: 258 seconds]
Reshi has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
scarygelatin has joined #ocaml
bensu has quit [Remote host closed the connection]
bensu has joined #ocaml
bensu has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
walter|r has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
johnelse has quit [Ping timeout: 272 seconds]
yunxing_ has joined #ocaml
yunxing_ has quit [Client Quit]
johnelse has joined #ocaml
manud has quit [Ping timeout: 244 seconds]
manud has joined #ocaml
pierpa has quit [Ping timeout: 240 seconds]
hcarty has quit [Ping timeout: 246 seconds]
tmtwd has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
marsam has quit [Quit: Quit]
yunxing_ has joined #ocaml
bensu has joined #ocaml
yunxing__ has joined #ocaml
yunxing_ has quit [Ping timeout: 250 seconds]
scarygelatin has quit [Remote host closed the connection]
jonasen has joined #ocaml
MercurialAlchemi has joined #ocaml
AlexDenisov has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<flux>
I just recently used american fuzzy lop with a piece of C++ code and it was pretty great for finding some unhandled cases
jnavila has joined #ocaml
<flux>
I wonder if similar approach could be used with quick-check-like testing of functions as well..
<flux>
basically as I understand it afl tracks the instrumented function on how it branches per the input data and tries to generate input that makes it branch differently
jonasen has joined #ocaml
pyon has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
hx1 has joined #ocaml
hx1 has quit [Ping timeout: 260 seconds]
Pepe__ has joined #ocaml
kandu has joined #ocaml
kandu is now known as Guest70142
Reshi has quit [Ping timeout: 264 seconds]
sheijk_ has joined #ocaml
tmtwd has quit [Ping timeout: 264 seconds]
jrslepak_ has joined #ocaml
_2can_ has joined #ocaml
dariusc93 has joined #ocaml
Ankhers_ has joined #ocaml
martintrojer_ has joined #ocaml
rixed has joined #ocaml
tizoc` has joined #ocaml
cdidd_ has joined #ocaml
msch_ has joined #ocaml
kdas__ has joined #ocaml
cdidd has quit [*.net *.split]
kushal has quit [*.net *.split]
Guest80697 has quit [*.net *.split]
Ankhers has quit [*.net *.split]
Madars has quit [*.net *.split]
martintrojer has quit [*.net *.split]
rixed_ has quit [*.net *.split]
sheijk has quit [*.net *.split]
buddyholly has quit [*.net *.split]
Pepe_ has quit [*.net *.split]
msch has quit [*.net *.split]
jrslepak has quit [*.net *.split]
tizoc has quit [*.net *.split]
_2can has quit [*.net *.split]
darius93 has quit [*.net *.split]
kdas__ has quit [Read error: Connection reset by peer]
msch_ is now known as msch
kushal has joined #ocaml
tmtwd has joined #ocaml
ygrek_ has joined #ocaml
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Simn has joined #ocaml
ygrek has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
mettekou has joined #ocaml
mettekou has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
<tormen_>
Hmmm. I don't get it: What can trigger a Warning 40 "It is not visible in the current scope, and will not be selected if the type becomes unknown." ?
<tormen_>
Can someone help me break my example ? ;) ^^
tmtwd has quit [Ping timeout: 272 seconds]
<flux>
maybe you need to shadow PUT in your current module
toolslive has joined #ocaml
<flux>
and one thing that could affect is what if you have a function like let foo (return_value_from_get_http_method : the_type) = let rest = match return_value.. with .. ?
<flux>
or if it has some other indirect way of determining the type of the match argument. I'm just guessing here, btw ;-)
AlexDenisov has joined #ocaml
<flux>
so back to ;-) thinking about how "afl" could work on ocaml, I guess it'd be quite difficult to instrument an ocaml source code so that it would keep track of the origin of each manipulated piece of data
<flux>
basically it would need a complete rewrite of the program, no?
<def`>
flux: that's what spacetime and ocp-memprof do
<flux>
(even if the transformation was mechanical and not directed by typing)
<tormen_>
:) ... I tried dealing with this bug "guessing" and I actually have a second version of it even more annoying that am currently trying to reconstruct as well. If the reconstrcut fails I will make a copy of my whole project and start simplyfying while "keeping the error" ;)
<def`>
an instrumented runtime which keeps track of data origin
<def`>
(even the full backtrace in spacetime case)
<flux>
def`, hmm.. so if I have match foo with .. it can tell that foo originates from some certain command line argument?
<def`>
runtime & compiler, codegen is affected
<flux>
(or a function argument)
<def`>
flux: it can tell what was the stack when foo was allocated
<def`>
including C bits if libunwind is available
<flux>
that's pretty nifty. are those parts available as source code?
<def`>
I was able to build it with some guidance, but it is a bit hariy
<def`>
hairy*
bensu has quit []
<def`>
It should improve soon
ygrek has quit [Ping timeout: 244 seconds]
<flux>
gotta hand them that the name is great.. :)
A1977494 has joined #ocaml
silver has joined #ocaml
tmtwd has joined #ocaml
<toolslive>
I'm doing a wrapper of a C function, and my C compiler issues a warning from the CAMLparam3 macro I'm using. I think I can ignore this one, no? http://lpaste.net/167397
butts_butts has joined #ocaml
<flux>
toolslive, I think so.. but I might be wary of using too high optimizations, might be they could mess with ocaml gc assumptions..
<flux>
at least the runtime itself can break with "too high" optimizations
<flux>
I wonder if the macro could be rewritten to make that warning go away? or is it useful at times?
<toolslive>
well, it's currently -O2 I don't know the exact semantics of that option on gcc 5.2
<flux>
iirc O2 is ok, O3 maybe not
<toolslive>
yes, I've seen really odd things with -O3 in the past.
<toolslive>
what I think happened is that the compiler is issuing more warnings these days than in the past (when the macro was written)
michipili has joined #ocaml
dexterph has joined #ocaml
cdidd_ is now known as cdidd
tmtwd has quit [Ping timeout: 260 seconds]
nojb has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ewanas has joined #ocaml
Nahra has quit [Ping timeout: 276 seconds]
AlexDenisov has joined #ocaml
<sshine>
flux, I'm pretty sure that's not a proper way to use the word "optimizations" :D
rand__ has joined #ocaml
jwatzman|work has joined #ocaml
<pitastrudl>
in pattern matching, how can you tell the matcher, to do something if the list has only one element? would it be like this? "head::[]"?
<lyxia>
pitastrudl: yes, or [head]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pitastrudl>
ah, ok thanks :)
Madars has joined #ocaml
AlexDenisov has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Nahra has joined #ocaml
larhat has joined #ocaml
toolslive has quit [Ping timeout: 260 seconds]
Reshi has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
yunxing__ has quit [Ping timeout: 276 seconds]
toolslive has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronsen is now known as bottich
A1977494 has quit [Remote host closed the connection]
bottich is now known as bottich_
jnavila has quit [Ping timeout: 260 seconds]
<tormen_>
Aaaarg this drives me crazy. I am stuck. Either I get a warning 40 or a warning 45. My problem: I don't understand why I get either. My bigger problem: I don't know how to resolve the warnings. And I don't want to ignore them, because they seem kind of important ;)1
<tormen_>
What could possibly cause these warnings ?
<tormen_>
1st version: How can my open statement shadow variables I am using in a MATCH expression ??
<regnat[m]>
tormen (IRC): Your first version don't shadow a variable, it shadows the name of the field "code"
<regnat[m]>
Fields of records in OCaml are declared --- by the type declaration --- and must be unique
bottich_ is now known as bronsen
<tormen_>
2nd version: regnat[m] hmm but how is that possible ? I am trying to MATCH a record type here ?
<tormen_>
regnat[m]: "and must be unique" ... okey so I have somewhere in my scope a record with the same field names then ?
jonasen has joined #ocaml
dave24 has joined #ocaml
<tormen_>
and so ocaml is tellig me: In the context of the Variant that I have before the record it is assuming type A, but this is not a solid determination as without the Variant there would be multiple records with these field names ?
<regnat[m]>
The other record you match on ({ ms; code; msg } also has a field "code")
<regnat[m]>
So to disambiguish, you can use the full path to the field
<regnat[m]>
ie Shared.EE_Result.code
<tormen_>
regnat[m]: Hmm. Okey. but it has a field "msg" that the other record does not have... this is not enough ... one COMMON field names between two record types is enough to trigger this warning ?
<tormen_>
s/this is not enough/ this is not enough for ocaml to determine the type of the record ?/
<regnat[m]>
Yes, all field names have to be unique, to ensure the unicity of inferred types
<regnat[m]>
Or if you type "foo.code", the compiler couldn't know which type it is
<tormen_>
regnat[m]: but that seems difficult to achieve in larger projects....
<tormen_>
regnat[m]: Ahhh yes that makes sense now ;)
_2can_ is now known as _2can
<tormen_>
regnat[m]: in any case thaaaaaaaaaaaaaaaanks a lot to helping me over this obviously basic problem !!!!
<regnat[m]>
You just have to keep them in different modules to ensure that you have no clash ;)
<regnat[m]>
You're welcome :)
kushal has quit [Quit: Leaving]
<tormen_>
regnat[m]: can you say if in general I should (a) put { code; result } and { ms; code; msg } in different modules
<tormen_>
or (b) use full field names
michipili has quit [Ping timeout: 276 seconds]
<tormen_>
(for now they are both in the same module (EE_Result))
<tormen_>
... but I guess even with full field names there will be a warning, right ? because EE_Result.code ... can be either or...
<tormen_>
regnat[m]: Hopefully the answer is yes, meaning I am slowly getting it ;)
<regnat[m]>
Oh, I misunderstood something
<tormen_>
... so it would mean as a good practice that I need to wrap records with overlapping field names in separate modules ?
<regnat[m]>
I am not familiar with inlined records in sum types, but it looks like what I said was wrong about them
<tormen_>
sum type = variant for instance ? inlined records = when matching on them ?
<regnat[m]>
(It's a new feature of the language, so I've never used it)
<regnat[m]>
sum type = variants yes
<travula>
let ratio x y = Float.of_int x /. Float.of_int y
<regnat[m]>
inlined records means they only are declared in the scope of the variant
<travula>
i get Unbound module Float
<regnat[m]>
Since ocaml 4.03, you can declare a type as "type t = Foo of { x:int; y:float} | Bar of int"
<regnat[m]>
In this case the record "{ x:int; y:float}" only exists inside a pattern matching, and it apparently don't have to be unique
<tormen_>
regnat[m]: okey :) ... but to be precise I don't use a inline type declaration (I'll extend the paste to reflect that)
<tormen_>
I appologize did not notice that this could be important
SenseAmidMadness has joined #ocaml
<chelfi>
travula: if you are following a tutorial that assumes a particular library (like Real World Ocaml and the Core library), you need to make sure you installed the particular library (for instance with RWO: opam install core) and that the library can be found (for instance using the utop REPL, you would need something like #require "core";;)
<chelfi>
you also need to make sure the module is in scope if it is nested (for instance, again with core, you would add something like open Core.Std;;)
<travula>
chelfi , thanks, I do get the error in the interpretor, but in my emacs file, Float is shown in red and when hovered displays - Unbound module Float
<travula>
chelfi, ^do not
<tormen_>
regnat[m]: okey so for me the inline record could be the solution then, right ? ... which also makes sense, because I only use this record "inline" ...
<chelfi>
travula: I suspect you need to tell your editor which additional library you are using. If you are for instance using merlin, one way to do this would be to add a .merlin file with a statement (like PKG core) that tells it which library you are assuming is available
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<octachron>
regnat[m], tormen_ : field names don't need to be unique since OCaml 4.01
hx1 has joined #ocaml
toolslive has quit [Ping timeout: 260 seconds]
<tormen_>
octachron: ah. thanks :) ... not sure about the exact implications of this phrase yet ... but will grasp that over time ;)
jonasen has joined #ocaml
<SenseAmidMadness>
Hi everyone! Quick question about Sqlexpr: how do I get the syntax extension to handle output columns which are the result of a Sqlite function?
<SenseAmidMadness>
The syntax extension does not regognise the "group_concat (tagname)" as a string...
<SenseAmidMadness>
Is this a known limitation or a bug?
<tormen_>
Hmmm. I have a function call that should be of type "unit". And I get a: Warning 10: this expression should have type unit. ... how can I make the compiler reveal to me the real type of my function call ? ;)
<regnat[m]>
ocaml060 (IRC): Really ? That's cool :) But how does the compile decide which variant to choose then ?
<tormen_>
ah got it: let () = <my-function-call> in () did the trick ;)
<tormen_>
regnat[m]: you meant octachron non ?
<regnat[m]>
that was for octachron, sorry
<octachron>
tormen_: merlin can do that, or by inserting a type annotation works
<tormen_>
octachron: I really have to get a merlin :)) ... type annotations: yes not sure though how to that for a function call ?
<octachron>
regnat[m]: type directed disambiguation, e.g.: type w = {x:float};; type r = {x:int};; let f {x} = x +. 1. ;;
<octachron>
f is then correctly inferred to be of type w -> float;;
<octachron>
sorry, not with declaration in this order, but "let f ({x}:w) = x +. 1.;; works
<mrvn>
don't do that
<regnat[m]>
But if i have "f x = x.x", which one does it choose ?
<tormen_>
mrvn: you mean the implicit ":w" type declaration ?
<octachron>
tormen_: (f x : type_annotation ) works
<mrvn>
having 2 records with the same totaly non descriptive field names
kushal has quit [Ping timeout: 260 seconds]
<octachron>
regnat[m]: it choses the last defined type, with an ambiguity warning
toolslive has joined #ocaml
<regnat[m]>
Oh ok, thx
sdothum has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<travula>
let str_length x = String.length x
FreeBirdLjj has joined #ocaml
<travula>
is a function I have defined in a file tour.ml, I am using emacs as my editor
<def`>
best of both world, find the type annotation using merlin :), C-c C-t on your expression, C-up/C-down to find the right scope, C-w to yank the type
<tormen_>
octachron: ah cool, merci !!
<travula>
how do I invoke this function?
<travula>
one way is evaluate the buffer and from the interpretor , I can invoke this function, but how do I do it from the file itself?
<def`>
let () = print_int (str_length "foo")
kushal has joined #ocaml
tane has joined #ocaml
<mfp>
SenseAmidMadness: sqlexpr should accept any valid sqlite expresion (I'm sure count(xxx) works, for instance). Which error are you getting?
<mfp>
you might need to use @s?{ ... } to indicate the value is nullable
<SenseAmidMadness>
mfp: The error indicates a mismatch in the number of tuple arguments. It's as if the group_concat column did not exist.
<SenseAmidMadness>
This expression has type 'a * 'b * 'c * 'd * 'e * 'f, but an expression was expected of type Entry.id * User.id * string * string * string * string * string
<SenseAmidMadness>
Note the 6 vs 7 arguments
<SenseAmidMadness>
(Note I'm using the current Sqlexpr master)
FreeBirdLjj has quit [Remote host closed the connection]
<mfp>
as a quick sanity check, does it work if you replace @s{group_concat(tagname)} with @s{'foo'} ?
<mfp>
"work" as in "type"
FreeBirdLjj has joined #ocaml
shinnya has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<SenseAmidMadness>
mfp: no. But it does work if I replace @s{group_concat(tagname)} with another text column
<mfp>
that's weird... or I can't think very clearly today
Ankhers_ is now known as Ankhers
<SenseAmidMadness>
mfp: I'm going to try to replicate the problem in a minimal example...
<SenseAmidMadness>
mfp: Interesting: the problem only seems to occur with the PPX syntax. I've tried @s{'foo'] with old Camlp4 syntax and it works!
<mfp>
SenseAmidMadness: looking at the generated ML should help: camlp4o $(opam conf var lib)/estring/estring.cma $(opam conf var lib)/sqlexpr/sqlexpr_syntax.cma example.ml
<mfp>
ah
<mfp>
maybe an issue with the regexp used in the ppx
<SenseAmidMadness>
mfp: I should've said sooner that I was using the PPX syntax, sorry...
cross has quit [Quit: leaving]
<mfp>
I haven't used ppx yet (just glanced over j0sh's code) so I'm not that knowledgeable regarding this... but I do kind of remember a similar bug in the code that parsed the expressions in the PPX extension
cross has joined #ocaml
lyxia has quit [Remote host closed the connection]
lyxia has joined #ocaml
<mfp>
does the whitespace make a difference? group_concat (tagname) vs group_concat(tagname)
<SenseAmidMadness>
mfp: It does actually! It seems to work without whitespace. I'll test it a bit more to be sure...
<mfp>
right, this is the regexp used to parse outputs: Re_pcre.regexp {|@([dlLfsSba])(\?)?\{([\w.%*()]+)\}|}
<mfp>
note the absense of whitespace chars
<mfp>
and also ' which is why 'foo' didn't work either (despite being a valid SQL expression)
<SenseAmidMadness>
...And the absence of single quotes...
<SenseAmidMadness>
Okay, mystery solved. I'll open a bug report, alright?
<mfp>
yes please
malc_ has joined #ocaml
<mfp>
gotta take another look at the ppx branch, see what current state is regarding the 4.03 build, and release -- an issue will help me not forget to tweak the regexp
<Drup>
unfortunatly, pattern match of non-GADT types do not refine type equalities in the branch
<SenseAmidMadness>
@mfp: Yes, it's only lack of time right now that prevents from porting PG'OCaml to PPX. But I also use Sqlexpr for projects where Postgresql is overkill, and I like the syntax...
<zozozo>
Drup: is is because it causes theoretical problems, or rather because it simply wasn't implemented that way ?
<Drup>
zozozo: the fact that pattern matching introduce new type equations in the scope of the branch is quite .. new, and the typechecker was really not made that way originally
<Drup>
poly variants were done before, so they just don't do it
<Drup>
I think there is a mantis ticket about that
<zozozo>
ok
<zozozo>
thanks a lot for the solution !
<Drup>
(and do read the paper I linked :p)
<zozozo>
yeah, I started reading it some time ago
<zozozo>
guesse I'll continue my reading
<Kakadu>
Do you think that with rising of Flambda we have got a more convenient internal representation (than Cmm) to create LLVM backend?
mort___ has joined #ocaml
<octachron>
about the set-theoretical polymorphic variants, I wonder how much computational power it adds to polymorphic variant at the type level
<Drup>
octachron: I don't think it adds that much compared to what we already have in the language
<SenseAmidMadness>
Drup, since you're about: In Tyxml there's the pp function for pretty-printing docs. Is there an Eliom equivalent?
<Drup>
SenseAmidMadness: hum, even in the dev version ?
<SenseAmidMadness>
(I'm talking about Eliom master)
<Drup>
right
<SenseAmidMadness>
I can't seem to find it in the API docs (though there's lots of broken links for the dev version: they're probably not refreshed often)
<Drup>
We changed a bunch of module names :/
<SenseAmidMadness>
Eliom_content.Html.F.Raw.pp also doesn't exist...
<Drup>
SenseAmidMadness: there is the old Eliom_content.Html.Printer
<Drup>
but not the new version
ygrek has quit [Ping timeout: 240 seconds]
BitPuffin has joined #ocaml
<SenseAmidMadness>
I was under the impression that Html.F.Raw was pretty much identical to Tyxml.Html, but that's not exactly the case, right?
<Drup>
hum, I never quite considered it that way, because pp is not part of the core API, it's an optional addition
<Drup>
but you are probably right
<Drup>
printing Eliom_content.Html.elt is quite tricky, since it can also content D, R and C nodes
<Drup>
(F are easy to print, not the others)
<companion_cube>
how is pp not part of the core API ? :/
<Drup>
companion_cube: not all xml trees are printable
<companion_cube>
what good is a XML lib if you can't print?
<companion_cube>
waaaaa
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Drup>
companion_cube: consider reactive xml trees with automatic diff, how do you print that ?
<Drup>
or DOM trees in the browser
<Drup>
or trees with function handlers in the middle
<companion_cube>
I have no idea what you are talking about
FreeBirdLjj has quit [Remote host closed the connection]
<companion_cube>
a tree with a function handler in the middle? but it's not XML anymore?
<Drup>
companion_cube: it's HTML. :|
rgrinberg has joined #ocaml
FreeBirdLjj has joined #ocaml
<SenseAmidMadness>
Anyway, is there an alternate way to pretty-print from Eliom-dev, or should I open a ticket?
<Drup>
SenseAmidMadness: please open a ticket, and use Eliom_content.Html.Printer in the meantime.
<SenseAmidMadness>
Thanks, Drup!
<Drup>
We should at least have Eliom_content.Html.pp, not sure if we will have aliases in F.pp and so on
FreeBirdLjj has quit [Remote host closed the connection]
<companion_cube>
Drup: but in html, the js code is just text, isn't it?
FreeBirdLjj has joined #ocaml
<Drup>
companion_cube: regardless of the norm, in eliom, it's going to be a pointer to a function that has been compiled to javascript through js_of_ocaml
<Drup>
:]
<companion_cube>
oh, you mean you use tyxml's data internally for representing the dom? :/
malc_ has quit [Remote host closed the connection]
<Drup>
no, you are getting it wrong
<Drup>
there is no datastructure in tyxml
mpenet has joined #ocaml
<Drup>
it takes whatever datastructure you give it that fullfils a give module type, and produces an API on top of that
<Drup>
given*
<companion_cube>
and in eliom you instantiate the functor with the dom?
<Drup>
it's .. a tad more complicated than just the dom
<Drup>
in js_of_ocaml.tyxml, it's just the dom
<companion_cube>
all this stuff is crazy, but it's annoying not to have a good printer for me, as a user of tyxml for reasonable things :p
<Drup>
companion_cube: you have a printer when the underlying structure is walkable
<Drup>
so, Tyxml.Html has a printer, since it's a regular Xml datatype
<Drup>
Eliom_content.Html has a printer too, but some part of the tree are going to be a bit weird (with placeholders that are going to be filled on the client, and so on)
<Drup>
(it's still valid html, just not always pretty html)
<theblatte>
yes, but it's best to have one for each .ml as they speed up incremental compilation
<theblatte>
without a .mli any internal change to a .ml will recompile everything that depends on it
<dave24>
but i have a bunch of modules which all have the same signature, can i not just have 1 mli file?
tane has joined #ocaml
t4nk421 has joined #ocaml
<lyxia>
you can use "include" to not repeat the signatures
<dave24>
i can't tell the the compiler which mli to use?
<tormen_>
Drup: thanks. I did put everything I can ... hoping that I did not misunderstood / miss something ... in the bug report (improvement suggestion ;))
<t4nk421>
I use ocamlbuild--which may or may not be relevant here--to create a set of .cm[aiox] and .o files, and a .cmxs file for a FOO package. Later I install all the files (using ocamlfind into an subdir of .opam) and then try to include the FOO package with the -package switch but ocamlbuild complains it doesnt know what to do with the cmxs file...which in one case I don't need and want ignored. Is it not possible to co-mingle cmxs and ot
AllanDaemon has joined #ocaml
larhat has quit [Quit: Leaving.]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jnavila has joined #ocaml
<hcarty>
t4nk421: Maybe a problem in the META file for FOO?
jwatzman|work has quit [Quit: jwatzman|work]
jeffmo has quit [Ping timeout: 244 seconds]
jeffmo_ has joined #ocaml
wiredsister has quit [Remote host closed the connection]
gasche has joined #ocaml
<gasche>
hi
jonasen has joined #ocaml
thaega has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
t4nk421 has quit []
agarwal1975 has joined #ocaml
jnavila has quit [Ping timeout: 276 seconds]
dexterph has quit [Ping timeout: 276 seconds]
<Leonidas>
this Malfunction paper is pretty cool
<Leonidas>
just like every imperative language compiles to JS, functional languages should compile to Lambda :)
dexterph has joined #ocaml
<Leonidas>
"So, I conjecture that OCaml will not miscompile any Malfunction program, or at least that when it does, it will also miscompile a sufficiently contrived OCaml program."
<Drup>
the bug reports exercising this conjecture are going to be quite amusing :D
A1977494 has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
ewanas has quit [Ping timeout: 272 seconds]
AllanDaemon has quit [Ping timeout: 250 seconds]
<hcarty>
gasche: Hello
<hcarty>
rgrinberg: For a streaming msgpack implementation, would it be sufficient to get an array or map as a complete entity? Or would you want to be able to stream each element/mapping piece by piece?
<octachron>
gasche: I was wondering if you ever had the time to take a look at the later part of the polymorphic chapter's draft (for the manual)?
dexterph has quit [Ping timeout: 244 seconds]
AlexDenisov has joined #ocaml
toolslive has quit [Ping timeout: 260 seconds]
<gasche>
octachron: I did not, but maybe this week-end
<gasche>
(didn't get any hacking done last week-end)
<gasche>
sorry about the delay
BitPuffin has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
toolslive has joined #ocaml
yunxing_ has joined #ocaml
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
<octachron>
gasche, which delay? I was just pondering if it would make sense to move to the next chapter to be written soon.
jnavila has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
mort___ has quit [Quit: Leaving.]
dave24 has quit [Quit: leaving]
malc_ has quit [Remote host closed the connection]
mort___ has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
mort___ has quit [Client Quit]
copy` has joined #ocaml
jstolare1 is now known as jstolarek
octachron has quit [Quit: Page closed]
ewanas has joined #ocaml
malc_ has joined #ocaml
<rgrinberg>
hcarty: it would be sufficient for me if I could fold over the array/map as it's being read
<rgrinberg>
All I need really
<hcarty>
rgrinberg: Ok, I'll see if I can get time to work that in before the initial release
<rgrinberg>
hcarty: obviously it's not a must and the library should still be plenty usable without it but it's an important feature I think
<rgrinberg>
for my current use cases, it's definitely not a requirement :)
Kakadu has quit [Quit: Page closed]
|2321 has joined #ocaml
<hcarty>
rgrinberg: Understood, thanks :-)
nicoo has quit [Ping timeout: 244 seconds]
jnavila has joined #ocaml
TheLemonMan has joined #ocaml
nicoo has joined #ocaml
Algebr` has joined #ocaml
<Algebr`>
aantron: around?
<aantron>
Algebr`: yep
<Algebr`>
more C++ questions lol
<aantron>
np :)
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
octachron has joined #ocaml
Kakadu has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 258 seconds]
MercurialAlchemi has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
octachron has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
manizzle has quit [Quit: Leaving]
octachron has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
larhat has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
NJBS has joined #ocaml
yunxing_ has quit [Ping timeout: 244 seconds]
<NJBS>
Can a type have some conditional along with it? For example, how would I define the type of something like all even integers that are positive. Is there anyway to bake the conditional in with the type declaration or would I need to pattern match on integers (or whatever the base type is) after declaring the type?
jnavila has quit [Remote host closed the connection]