<flux>
_finally_ someone did that, I imagine many have had the idea :)
<adrien>
\o/
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
q66 has joined #ocaml
thizanne has quit [Ping timeout: 246 seconds]
meiji11 has quit [Read error: Connection reset by peer]
djcoin has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
Yoric has joined #ocaml
osnr has quit [Quit: Leaving.]
Watcher7 is now known as Watcher7|off
jcao219 has quit [Ping timeout: 248 seconds]
Drup has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 246 seconds]
eikke has joined #ocaml
ttamttam1 has joined #ocaml
ggole has quit [Ping timeout: 264 seconds]
toolslive has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
Drup has joined #ocaml
ggole has joined #ocaml
ygrek has joined #ocaml
raichoo has joined #ocaml
<asmanur_>
it looks nice indeed
mika1 has joined #ocaml
<flux>
should make it more easy to write some parts in C, not just binding to libraries
cago has joined #ocaml
<adrien_oww>
that would require getting the ocaml and writing to a file that would then be compiled
<adrien_oww>
(or use tcc)
<adrien_oww>
(actually there's occ too, in ocaml)
<flux>
I mean simple putting a .c-file along your project
<flux>
but without using those caml*-headeres
<flux>
which are very easy to get wrong.
<flux>
of course, this doesn't solve the problem of safely exchanging complicated data structures (or even structs)
<adrien_oww>
well, have a single source to generate both sides rather than risking having them become incoherent
<flux>
for that perhaps you could generate C structs from the ocaml data definitions..
<flux>
and function prototypes
<adrien_oww>
I'll have to actually check ocaml-ctypes but I'd also like a library of converters
<adrien_oww>
which you can reuse
<adrien_oww>
so there's only implementation of time_t -> ocaml
<flux>
from the looks of it, ocaml-ctypes has a bundle of such converters
<flux>
and it supports creating your own converters as well that integrate nicely with the foreign type signatures (it calls them 'views' which incorporate both to and from conversions)
<adrien_oww>
usable independently?
<flux>
probably not
<adrien_oww>
=/
<flux>
but how often do you have use for such conversions..
<adrien_oww>
but that shouldn't be too complicated
<flux>
I mean, the same conversions
<adrien_oww>
well, not often but when you do, it'd be nice to not have to re-write them
<adrien_oww>
I meant conversions for typical Unix or Linux types
<adrien_oww>
for API that cannot be handled by ocaml-ctypes typically
zpe has joined #ocaml
<flux>
well, if you were to have such a library, ocaml-ctypes sounds as good (or better) place as any to have it :)
<flux>
or maybe that's too platform-specific
<flux>
I wonder how many platforms that supports now
<adrien_oww>
I believe something like ocaml-ctypes cannot match all FFI needs
<flux>
that is probably correct
<flux>
but examples of that would probably be helpful, so ocaml-ctypes can be extended :)
<adrien_oww>
well, not so long ago a friend of mine was finding himself limited by the ffi module in lua
darkf_ is now known as darkf
<adrien_oww>
if that module is a limit, I doubt there won't be the same issues with something in ocaml
* companion_cube
not surprised that people talk about ocaml-ctypes
<companion_cube>
looks so cool
<flux>
companion_cube, now only if you had a library you wanted to bind?-)
<flux>
actually an interesting subproject would be to generate that kind of (ocaml) code from header files
<flux>
and see how far that could go
<companion_cube>
well... that may be the case ^^
<flux>
probably just as a tool for doing the first stab and then maintaining manually afterwards
<flux>
using frmaa-c, CIL, or clang..
<companion_cube>
it may simplify binding with things like minisat \o/
zpe has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
ollehar has joined #ocaml
osnr has quit [Ping timeout: 256 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
jbrown has joined #ocaml
Neros has joined #ocaml
Kakadu has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
osnr has quit [Ping timeout: 256 seconds]
gautamc has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
ontologiae has joined #ocaml
toolslive has quit [Ping timeout: 256 seconds]
Yoric has joined #ocaml
mcclurmc has quit [Ping timeout: 248 seconds]
gautamc has joined #ocaml
toolslive has joined #ocaml
tane has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
osnr has quit [Ping timeout: 240 seconds]
ontologiae_ has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
chambart has joined #ocaml
mcclurmc has joined #ocaml
skchrko has joined #ocaml
dsheets has joined #ocaml
tane has quit [Read error: Connection reset by peer]
ollehar1 has joined #ocaml
ttamttam1 has quit [Quit: ttamttam1]
chambart has quit [Ping timeout: 246 seconds]
ollehar has quit [Ping timeout: 264 seconds]
Drup has quit [Ping timeout: 260 seconds]
beckerb has joined #ocaml
_andre has joined #ocaml
darkf has quit [Quit: Leaving]
Drup has joined #ocaml
talzeus has quit [Remote host closed the connection]
foo808_ has joined #ocaml
foo808 has quit [Ping timeout: 276 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
tane has joined #ocaml
osnr has quit [Ping timeout: 264 seconds]
Snark_ has joined #ocaml
troydm has quit [Read error: Operation timed out]
ygrek has quit [Ping timeout: 256 seconds]
talzeus has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Ping timeout: 260 seconds]
<Kakadu>
I've written this http://paste.in.ua/8348/ code with macaque and I was expecting that skill_id's will be unique in my result list
<Kakadu>
mut I failed, they don't
<Kakadu>
but*
<Kakadu>
I have problem with macaque or should re-read SQL manual again?
<Drup>
Kakadu: re-read it ;)
<Drup>
Kakadu: the triple (skill_id, exp, descr) will be unique, not each field.
Drup has quit [Quit: Leaving.]
Drup has joined #ocaml
tane has quit [Quit: Verlassend]
cago has quit [Ping timeout: 260 seconds]
cago has joined #ocaml
karswell has joined #ocaml
mattrepl has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Drup has quit [Ping timeout: 246 seconds]
mattrepl has quit [Client Quit]
osnr has quit [Ping timeout: 264 seconds]
Snark_ has quit [Quit: leaving]
Snark_ has joined #ocaml
contempt has quit [Ping timeout: 256 seconds]
gnuvince has quit [Ping timeout: 260 seconds]
ygrek has joined #ocaml
zpe has quit [Remote host closed the connection]
breakds has joined #ocaml
Drup has joined #ocaml
ollehar has joined #ocaml
smondet has joined #ocaml
cago has left #ocaml []
zpe has joined #ocaml
shinnya has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
raichoo has quit [Quit: leaving]
ollehar1 has quit [Ping timeout: 240 seconds]
cago1 has joined #ocaml
ben_zen has joined #ocaml
talzeus has quit [Remote host closed the connection]
zpe has quit [Read error: Connection reset by peer]
ben_zen has quit [Ping timeout: 245 seconds]
beckerb has quit [Quit: Konversation terminated!]
raichoo has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
chambart has joined #ocaml
zpe has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
osnr has joined #ocaml
osnr has quit [Ping timeout: 252 seconds]
zpe has quit [Read error: Connection reset by peer]
jbrown has quit [Ping timeout: 246 seconds]
cago1 has left #ocaml []
mika1 has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 248 seconds]
jbrown has joined #ocaml
tane has joined #ocaml
ontologiae has joined #ocaml
ontologiae_ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
chambart has quit [Ping timeout: 248 seconds]
zpe has quit [Read error: Connection reset by peer]
raichoo has quit [Ping timeout: 248 seconds]
raichoo has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
mattrepl has joined #ocaml
osnr has quit [Ping timeout: 248 seconds]
gnuvince has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Yoric has joined #ocaml
zpe has joined #ocaml
emmanuelux has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
Watcher7|off is now known as Watcher7
_andre has quit [Read error: Connection reset by peer]
djcoin has quit [Quit: WeeChat 0.4.0]
_andre has joined #ocaml
osnr has quit [Quit: Leaving.]
Drup has quit [Quit: Leaving.]
mort___ has quit [Ping timeout: 276 seconds]
Kakadu has quit []
emmanuelux has quit [Quit: emmanuelux]
troydm has joined #ocaml
oriba has joined #ocaml
emmanuelux has joined #ocaml
skchrko has quit [Quit: Leaving]
troydm has quit [Read error: Operation timed out]
contempt has joined #ocaml
troydm has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
transfinite has joined #ocaml
eni has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
bernardo1pc is now known as bernardofpc
Kakadu has joined #ocaml
toolslive has quit [Quit: Leaving]
<wmeyer``>
hi
<Kakadu>
salut
<wmeyer``>
Kakadu: hi
<Kakadu>
how r u doing?
<wmeyer``>
good, thanks, and you?
* wmeyer``
having a dinner
<Kakadu>
wmeyer``: above the average
walter|r has quit [Read error: Connection reset by peer]
<wmeyer``>
Kakadu: good to hear :-)
* wmeyer``
tired
walter|r has joined #ocaml
<gasche_>
Kakadu: a minor issue with the Macaque code you linked earlier
<wmeyer``>
ctypes rocks
<gasche_>
in OCaml, (method foo = bar) dos not evaluate bar
<gasche_>
so this object declaration will in fact delay extraction of values from the query result row
<gasche_>
to be redone each time the method is called
walter|r has quit [Read error: Connection reset by peer]
walter has joined #ocaml
<Kakadu>
It is better to rewrite it with .... ?
<wmeyer``>
gasche_: but it shouldn't be self # bar ?
<gasche_>
that's maybe not really an efficiency problem (it could be, though) but that's in any case a memory issue, because that means the result row will not be collected before the object itself
<gasche_>
wmeyer``: for any expression (bar)
<gasche_>
Kakadu: well either use simple records
<gasche_>
or use
<gasche_>
let foo_data = obj#!foo in object method foo = foo_data end
<wmeyer``>
wmeyer`: right. Then I got no idea what you are talking about, not looking at the pastebin
<Kakadu>
wmeyer``: are u speaking with yourself? :)
<gasche_>
(should have quoted it when doing my remark, sorry)
<wmeyer``>
Kakadu: not really. I'm just participating in the discussion.
<gasche_>
Kakadu: it's an extremely minor remark but I think abbreviations (are u ...) are best avoided on the net
<gasche_>
(because there is one writer and many readers, so it's better to optimize reading time)
skchrko has joined #ocaml
<Kakadu>
gasche_: I'll think about it
<wmeyer``>
I always praised Macaque approach.
<wmeyer``>
but never used it in my code
ohama has quit [Remote host closed the connection]
<gasche_>
one aspect of Macaque that I dislike is the choice of a specialized comprehension syntax
<gasche_>
we'd be better off with just plain SQL query syntax
<wmeyer``>
so why you didn't implemented this as SQL?
<wmeyer``>
looks good though
<wmeyer``>
it feels more Camlish
<wmeyer``>
and that's just syntax
<gasche_>
I went for the comprehension initially because that was requested by my supervisor(s)
<gasche_>
at the time we thought we'd be able to reuse some of the nice equational reasoning work on comprehension/monads
<gasche_>
in practice it's hard to hide the semantic details of SQL, and it's generally not what the user wants
<wmeyer``>
bare SQL is a very nice DSL
<gasche_>
(besides PostGreSQL is good at optimizing whatever primitive query we throw in a sensible way)
<gasche_>
also having a separate syntax is one more thing for users to learn
<gasche_>
and it makes harder to integrate more SQL features
<gasche_>
(eg. other semantics of JOIN)
<gasche_>
(than the natural inner one)
oriba_ has joined #ocaml
<wmeyer``>
many people fall into the pit of putting another abstraction on top of abstraction, in this case it felt more natural to implement just as OCaml comprehensions. But if you in the begining assumed EDSL using monads then this choice is justified.
<gasche_>
I hinted heavily at macaque-users (or prospective users) that I would accept patches for a different syntax
<gasche_>
and I may/might have found someone ready to work on it a bit
<wmeyer``>
gasche_: you know if my time would grow, I'd consider doing it.
<wmeyer``>
s/grow/grown/g
<gasche_>
:D
<gasche_>
I don't personally work on web stuff much, so it's hard for me to evaluate Macaque as a high-priority project
* adrien
waters wmeyer``'s time so that it grows
<gasche_>
I think ocamlbuild needs our help more right now
oriba has quit [Ping timeout: 245 seconds]
<gasche_>
but maybe
* wmeyer``
is wet.
<asmanur_>
why ? because several people are rewriting it ?
<gasche_>
hm
<gasche_>
I'm aware there are a lot of competitors that may very well be interesting of their own
<gasche_>
my personal reasoning is that because ocamlbuild is the most easily available, people tend to use it, so improving it helps more people
<gasche_>
(and I actually think that ocamlbuild's design is not bad; I wouldn't try to salvage a badly-designed system)
<asmanur_>
not when ocp will distribute their own ocaml env :)
<gasche_>
well then maybe our priorities will shift
<gasche_>
it's not like software is an eternal thing, asmanur_
<gasche_>
right now improving ocamlbuid helps people
<wmeyer``>
gasche_: Fully agree, and love ocamlbuild approach. That's said it does not scale. We have to fight to keep it alive at the moment.
<gasche_>
I would personally appreciate if would-be candidate to OCaml build system highlighted their own design choices more seriously
<gasche_>
but probably it's just me being ignorant
tane has quit [Quit: Verlassend]
<wmeyer``>
there are brand new ones, obuild and Jenga, but they don't solve the same problem.
eikke has quit [Ping timeout: 240 seconds]
<wmeyer``>
it's nice to say ocamlbuild src/foo.native - in vanilla tree and get stuff build. It has highly didactic value for people who don't have time to investigate build systems. (students for instance)
<gasche_>
what I've seen of Jengo feels like NIH to me
<gasche_>
anyway, dinner time
<wmeyer``>
ok
<wmeyer``>
adrien hey!
<wmeyer``>
thanks for the water :-)
ggole has quit []
* wmeyer``
taking a nap.
eni has quit [Ping timeout: 248 seconds]
ontologiae has quit [Ping timeout: 276 seconds]
dsheets has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
weie_ has joined #ocaml
weie has quit [Ping timeout: 270 seconds]
ollehar1 has joined #ocaml
mcclurmc has joined #ocaml
<ollehar1>
anyway to emulate higher order kinds for (phantom) types in ocaml?
<asmanur_>
ollehar1: perhaps first class modules can be helpful
<asmanur_>
for instance you can inject type with a parameter into closed types through modules
<ollehar1>
asmanur_: that might work
zpe has joined #ocaml
<ollehar1>
very interesting
<asmanur_>
what kind of things do you want to do ?
<ollehar1>
emulate the state of a stack in types
<ollehar1>
as a wrapper around ocaml-lua
<ollehar1>
(Lua communicate with C through a stack)
<asmanur_>
hm..yes and what kind of types would you like to write ?
zpe_ has joined #ocaml
<ollehar1>
so some stack operations can operate on tables, some on array-tables
<ollehar1>
some on both
<ollehar1>
right now I have
<ollehar1>
type 's t
<ollehar1>
type empty
<ollehar1>
type 's table
<ollehar1>
type 's index
<ollehar1>
etc
<ollehar1>
to make types like
<ollehar1>
index table t
<ollehar1>
corresponding to stack: -1 => index, -2 => table
zpe_ has quit [Remote host closed the connection]
zpe_ has joined #ocaml
<asmanur_>
hm
zpe has quit [Ping timeout: 248 seconds]
ontologiae has joined #ocaml
zpe_ has quit [Ping timeout: 264 seconds]
ontologiae has quit [Ping timeout: 248 seconds]
<ollehar1>
I guess I could design an iterate interface for tables and array-tables
<ollehar1>
like getnext
<ollehar1>
and provide implementation with functor
cdidd has quit [Read error: Operation timed out]
cdidd has joined #ocaml
ontologiae has joined #ocaml
<ollehar1>
asmanur_: could you explain more what you mean with inject a type with parameter?
<asmanur_>
ollehar1: module type F = sig type 'a t end, type f = (module type F)
<asmanur_>
i'm not sure it is so relevant anyway..
_andre has quit [Quit: leaving]
<ollehar1>
ok, thanks anyway, I'll make a stackoverflow thread about it
ttamttam has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
spanish has joined #ocaml
<spanish>
hi
gnuvince has quit [Ping timeout: 276 seconds]
<spanish>
can somebody tell me how would I go into printing out `algo' here?
<rks_>
(and it seems algo is an int, so use %d instead of %s)
<spanish>
thanks. but I get this error: Error: This expression should not be a function, the expected type is
<spanish>
sorry, I just had the equal sign before 'parse' twice, what it says now is: This expression has type string but an expression was expected of type
<spanish>
int
<spanish>
ok I got it, many thanks
<spanish>
is it possible, though, to get an existing parser using camlp4o, and give it the option -parser Camlp4ParserDebugger. to have the same unmodified code printing debugging information as it parses a file?
<spanish>
or something similar? that would make much easier getting on with this parser
zpe has joined #ocaml
skchrko has quit [Ping timeout: 245 seconds]
skchrko has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
dsheets has joined #ocaml
<Kakadu>
can I explain opam to get files from local directory?
<Kakadu>
git: "path" doesn't work
wmeyer`` has quit [Read error: Connection reset by peer]
wmeyer`` has joined #ocaml
malo has joined #ocaml
Snark_ has quit [Quit: leaving]
gour has joined #ocaml
Snark has quit [Ping timeout: 246 seconds]
<gour>
evening
<gour>
in fsahrp wiki book it is stated: "In many ways, F# is essentially a .Net implementation of OCaml.." is it true and/or still valid?
<gour>
*fsharp
ttamttam has quit [Quit: ttamttam]
<Kakadu>
F# is not a subset of OCaml and vice versa
<gour>
how much they're similar, iow. is porting from one to the other difficult?
<Kakadu>
If many objects are used than you will have problems
<gour>
what if one mainly uses FP stuff?
<Kakadu>
because OCaml's object system is seriosly different from .NET one
<Kakadu>
(in line above you should read 'differ' as 'better')
<Kakadu>
about functional stuff....
<Kakadu>
OCaml uses many exception which are lightweight. So, in .NET you will need to rewrite it using ('a*'b) result= OK of 'a | Error of 'b
<Kakadu>
F# have very promitive module system, no functors
<Kakadu>
primitive*
<Kakadu>
also, features from 3.12.1 like {struct with x = 5} are not supported
<Kakadu>
On the other hand OCaml doesn't have syntax for computational expressions
<companion_cube>
why are there such useful modules in the compiler but not in the stdlib? :/
<wmeyer``>
well, maybe the reason is that it might be that it's better to keep the library simple and basic
<wmeyer``>
I don't know exactly ...
<companion_cube>
the code is already there, and split is a very basic string function -_-
<rgrinberg>
wmeyer``: that goal has definitely been over achieved
<companion_cube>
shall we comment this commit on github? :D
<rgrinberg>
ha ha sure
<rgrinberg>
-1
<rgrinberg>
everyone
<wmeyer``>
rgrinberg: I want to smile, but that's true, it's been achieved, and the developers have better ways of spending time than maintaining stdlib
<companion_cube>
does the stdlib really need that much maintainance?
<rgrinberg>
wmeyer``: like removing part of it that are already written and documented?
<rgrinberg>
companion_cube: whether it does doesn't matter, it sure doesn't get any...
<wmeyer``>
i am not saying it's not documented or robust hehehe, but then stdlib would require even more documention :D
<wmeyer``>
you can submit a bug in Mantis
<wmeyer``>
maybe it would be considered
<rgrinberg>
haha i somehow doubt it would work
<rgrinberg>
maybe xavier doesn't want to make homework for his undergrads too easy ;D
<wmeyer``>
possibly :-)
<companion_cube>
wmeyer``: a bug to signal that string lacks a split function? ^^
<rgrinberg>
haha who is going to dare
<wmeyer``>
maybe that would spawn a discussion on Mantis, where interesting parties would recommend or reject proposal
<rgrinberg>
so much bureaucracy for a string split function
<rgrinberg>
maybe it's customary in France ^^
<companion_cube>
well, let's do it
<wmeyer``>
rks_: in general, I am being amazed by Coq power, at the same time disapointed how hard is to write quickly code I could do in OCaml
ulfdoz has quit [Read error: Operation timed out]
<wmeyer``>
especially code generation versus EDSLs
spanish has quit [Quit: Leaving]
<wmeyer``>
how quickly I could write a code generator in Camlp4, writing menhir grammar etc. vs how much time i need invest to do it with depenent typing. (it's not too bad, given I have a robust type system of Coq for my need)
<rgrinberg>
if xavier reverted |> or @@ then i'd make a ticket fore sure :D
<companion_cube>
I hope it's not too stupid, but I'm going to add a ticket :s
<wmeyer``>
oh, don't be to strict, being conservative here is not nesecracy a bad thing.
<companion_cube>
just to ask why
* adrien
actually needed that split function earlier todayu
<companion_cube>
I have an equivalent in some files...
<companion_cube>
it's just so common to split along ',' or '\n'...
eikke has joined #ocaml
<adrien>
or / or anything
<companion_cube>
also
<companion_cube>
let's get bashed on the bugtracker! :D
<wmeyer``>
to be honest, i meant, that having a formal documentation of the split is already some work
<rgrinberg>
wmeyer``: but it was already there no
<adrien>
well, you can get bashed or you can ask what are the conditions for functions to be migrated from the compiler lib to the stdlib
<rgrinberg>
fabrice wrote the ocamldoc and the mli and evertything
<wmeyer``>
you see, that's the problem, that once the function is introduced, it needs all the details
<wmeyer``>
oh I see!
<companion_cube>
hmm, how to turn it into a question...
smondet has quit [Quit: Bye]
<wmeyer``>
maybe I should not participate in this discussion! :-)
<adrien>
put it on your todo first thing tomorrow morning