jbrown has quit [Remote host closed the connection]
pango_ has joined #ocaml
pango has quit [Ping timeout: 264 seconds]
Snark has joined #ocaml
ben_zen has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
<gour>
what is the rationale for using ' (quote) for naming type variables in comparison with e.g. haskell where it is not required?
walter has joined #ocaml
walter has quit [Quit: This computer has gone to sleep]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
bondar has quit [Ping timeout: 264 seconds]
<adrien>
morning
mal`` has quit [Ping timeout: 264 seconds]
caligula_ has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
caligula has quit [Read error: Connection reset by peer]
tov has quit [Ping timeout: 268 seconds]
mal`` has joined #ocaml
tov has joined #ocaml
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
<adrien>
was going to answer jdh on opengl bindings not being up-to-date but I deleted my email
<adrien>
had the occasion to remember the main issue with him
<adrien>
he'll talk about how something would improve the state of ocaml so much, he manages to lay out plans
<adrien>
and
<adrien>
you stop hearing about him after that
chrisdotcode_ has joined #ocaml
chrisdotcode has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
<gour>
adrien: in order to have some 'gui-backup', what are your plans in regard to gtk3 branch and/or some post 2.16.0 release?
bondar has joined #ocaml
bondar has quit [Max SendQ exceeded]
<adrien>
well, "2.16" for lablgtk is a bad name
<adrien>
it's always difficult to version your bindings
<adrien>
you can consider it 2.24 actually
<adrien>
as for gtk3, I need to look into it
<adrien>
(gtk2 is safe for many years though)
<gour>
so, gtk2 is done ;)
bondar has joined #ocaml
bondar has quit [Max SendQ exceeded]
<adrien>
if some api is missing, it's added upon request
<adrien>
otherwise that leads to bitrot
<gour>
what tool would you use today to provide ocaml bindings for C?
<gour>
*C lib
<adrien>
depends
<gour>
RWO book speaks about ctypes
<gour>
of course, besides C wrapper, i want thick bindings
<adrien>
I worked on "cowboy", a tool to help the process
<gour>
ahh, right, now i remember about cowboy...excuse me for asking again :-(
<adrien>
it reads C headers, give a light AST for them and from that you can have several output stages
<adrien>
and so far I've written one for glib-based libs
<gour>
cute
<adrien>
that said, it works best when the API is sane and regular
<adrien>
e.g. for glib-based libs, the first argument is always the "objecct"
<adrien>
lots of conventions
ulfdoz has joined #ocaml
<gour>
i see...i'm not sure it's the case with the lib i need, although i know they use return value for diagnsotics and last argument is char* err for error message
<gour>
btw, i find ocaml much more compact than (verbose ada) and very clean...
ocp has joined #ocaml
<adrien>
cowboy is interesting for larger libs; if you have 20 or 30 functions and a couple data structures, it won't pay off
<adrien>
well, unless these move quickly and you need to update often
Simn has joined #ocaml
<adrien>
and I haven't practiced ada much but iirc it's fairly verbose; ocaml aims at providing many of the same things but while being much lighter to write in
<gour>
no, releases are not so often and API is very stable
<gour>
how is it that 'warm fuzzy things' are not mentioned so often in ocaml?
<adrien>
which ones do you mean?
<gour>
monads :-)
<adrien>
probably because we don't abuse them
<gour>
lol
ggole has joined #ocaml
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
adu has quit [Quit: adu]
weie has joined #ocaml
<gour>
in comparison with F#, i also prefer ocaml's community, open-source-dness and not depending on NET/Mono
Yoric has joined #ocaml
talzeus has joined #ocaml
talzeus__ has quit [Read error: Connection reset by peer]
Yoric has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
boogie has quit [Remote host closed the connection]
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
ulfdoz has quit [Quit: deprecated]
cdidd has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
cdidd has joined #ocaml
hcarty has quit [Read error: Operation timed out]
davekong has quit [Ping timeout: 276 seconds]
hcarty has joined #ocaml
davekong has joined #ocaml
ocp has quit [Quit: Leaving.]
boogie has joined #ocaml
boogie has quit [Ping timeout: 256 seconds]
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
chrisdotcode_ has quit [Ping timeout: 260 seconds]
talzeus has quit [Remote host closed the connection]
<adrien>
wmeyer: you wrote "camp4o" without the 'l' (I just did exact same typo :P )
<pippijn>
hi
Albe has joined #ocaml
<Albe>
hi
<Albe>
can i ask you some questions?
<Albe>
about caml
<def-lkb>
Yes, this is the right place.
<def-lkb>
Just ask, don't ask to ask :)
<adrien>
wmeyer: blah, found an issue in my patches: you can't get the same effect as make install DESTDIR=... anymore when installing camlp4 and ocamlbuild
<Albe>
I need to write a CAML prog ( not OCAML) that given three 3-letter words serch if the letters are present in the given words and in that case it will return true otherwise false. The program must use the deterministic automata. Do you have any idea? thanks
<adrien>
wmeyer: there's a simple solution and then there's replacing build/partial-install.sh with a makefile :)
<Albe>
sorry for bad english
<Albe>
i have made this
<Albe>
let string_check c1 c2 string = (index_char string c1)>0 && (index_char string c2)>0;; let rec progCaml a b s_list = match s_list with [] -> false | x::xs -> try (string_check a b x) with Not_found -> progCaml a b xs;;
<Albe>
but I am not able to implement the automata
<adrien>
how so?
<adrien>
what is the issue?
<adrien>
wmeyer: also, what do we do about build/install.sh? shall it disappear?
q66 has joined #ocaml
<pippijn>
ggole: I find myself using postfix-or the most
<pippijn>
ggole: in perl
<pippijn>
ggole: also, exit if $should_exit;
<adrien>
is Edwin Török on the channel?
Yoric has quit [Read error: Operation timed out]
<rwmjones>
ocamlbuild is truly the most on-crack build system ever invented
<whitequark>
is it?
<rwmjones>
how are you supposed to add the -g option to ocamlopt?
<rwmjones>
yes it is
<adrien>
tag "debug"?
<whitequark>
^
<rwmjones>
ok maybe boost jam is worse
<rwmjones>
where do I put 'tag "debug"' in this huge file?
<adrien>
oasis-generated?
<rwmjones>
no idea, how would I know?
<rwmjones>
this is ocaml bisect 1.3
<adrien>
I see two issues with ocamlbuild: it tries to do too much automatically, and development stopped in the middle
<Kakadu>
gour: hi!
<rwmjones>
(3) it's impenetrable, especially to people who don't know ocaml, even to those who do
<adrien>
rwmjones: is there an "_oasis" file? setup.ml? does "head _tags" mention oasis?
<rwmjones>
no, there is no _oasis file
<adrien>
for (3), plugin*s* would help
<adrien>
well, setup.ml?
<adrien>
ok, no
<adrien>
_tags for bisect is 36 lines, including 20 lines of comments...
<gour>
what will repalce oasis? ocp-build?
<adrien>
anyway
<gour>
Kakadu: hiya
<adrien>
something like:
<adrien>
<src/**>: debug
<adrien>
should do it
<Kakadu>
gour: have yo found dev packages for Qt5?
<Kakadu>
you*
<rwmjones>
adrien: no, no setup.ml here
<rwmjones>
ok, so I put that in _tags?
<rwmjones>
that worked, thanks adrien++
<adrien>
yeah, that should do it
<adrien>
:)
ulfdoz has quit [Read error: Operation timed out]
<gour>
Kakadu: did install some extra Qt5-related pkgs, but Qt5Qml is still not found :-(
<Kakadu>
I think that Qt5 dev packages are not present in sid
<Kakadu>
I have testing in ubuntu 13.04 and it's OK there
<Kakadu>
If your machine is good enought probably it will be faster to spend 5 minutes to recompile Qt5
hcarty has quit [Read error: Operation timed out]
<adrien>
(5? :D )
<Kakadu>
Somebody from IRC have tried
hcarty has joined #ocaml
<Kakadu>
If use 8 cores we can fit 5 minutes:)
* adrien
wants the same machine ='(
* Kakadu
too
morolin has quit [Ping timeout: 260 seconds]
<gour>
Kakadu: i've linux mint & ubuntu installed on my netbook as guest OS-es running under vbox on pc-bsd...i''ll check it there...however, atm, netbook is compiling vbox :-)
morolin has joined #ocaml
<Kakadu>
I can't recommend Virtualbox
<Kakadu>
I have not succeeded to enable OpenGL there
<gour>
hmm
<Kakadu>
so QtQuick are not work on my ubuntu VBox
<gour>
i see
ollehar has joined #ocaml
rwmjones has quit [Ping timeout: 264 seconds]
<pippijn>
gour: a friend of mine works at jolla
<gour>
you'll get some nice phone soon?
<pippijn>
maybe :)
<Albe>
.
rwmjones has joined #ocaml
yacks has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
yacks has joined #ocaml
<gour>
i'm rm-ing qt5 from my system, will try to install from the src later, now eating...
<wmeyer>
adrien: Just go ahead and remove it if you feel it's the right decision. Myself no strong opinion, but I'm wondering why it's not part of makefiles. Eventually we want to get rid of all the ocamlbuild scripts too.
<wmeyer>
adrien: should I apply: 0001-build-replace-build-mk-config-myocamlbuild_config-.s-2.patch?
<adrien>
wmeyer: ok, I'll check a bit but it's mostly that I'm letting it bitrot a bit for now; I'll try to have a pass at cleaning the build/ directory after the cross-compilation is done
<adrien>
wmeyer: that's where I found an issue :D
<adrien>
give me a few minutes to clean things up and I'll send an updated version
<wmeyer>
I admire your efforts, if you fancy to spend time on it, then I have long standing beer debt :)
<wmeyer>
adrien: OK, thanks
<adrien>
well, I've spend enough time on the build system to starting knowing it so it shouldn't take me too long to make a quick pass
<wmeyer>
adrien: OK :)
Neros has joined #ocaml
<wmeyer>
adrien: do you want me to apply: 0001-build-replace-build-mk-config-myocamlbuild_config-.s-2.patch ? I'll try to do it now.
Kakadu has quit [Ping timeout: 264 seconds]
<adrien>
wmeyer: I'm readying the new version
<wmeyer>
ok thank you
<adrien>
wmeyer: have you looked at the latest tarball or at the patch before that?
<adrien>
the tarball has a bunch of other patches, including simple fixes
<adrien>
(4 first patches)
<wmeyer>
not yet, I think I committd everything before that
<adrien>
ok, don't use 0001-build-replace-build-mk-config-myocamlbuild_config-.s-2.patch or 0001-build-replace-build-mk-config-myocamlbuild_config-.s.modified.patch
<adrien>
I'm going to upload a new tarball since there are merge conflicts in a couple files
<tobiasBora>
I'd like to compute fractals with Ocaml so I need to have a great precision during the computation. Is there a way to increase the precision of floats ?
<ggole>
No.
<ggole>
They are 'double precision' already. If you need more precision, you'll need to use an arbitrary precision library.
<adrien>
tobiasBora: no but you can look at the "Num" module (ocamlfind "nums" package)
<adrien>
it's going to be slower though
<adrien>
and I'm wondering whether you really need the high precision; a common approach is to not render more than you can display and only go into more details as you zoom in
<tobiasBora>
Thank you. I don't mind if it's slower because I wan't to create a beautifull picture and if the picture takes 10mn to display it doesn't matter. What's the difference between Num and changing double precision ?
ulfdoz has quit [Ping timeout: 264 seconds]
<adrien>
Num is arbitrary-precision
<adrien>
meaning it can be *lots* of bits
<adrien>
when you ask it 1/2, it doesn't compute but it keeps it in memory as "1 divided by 2"
<tobiasBora>
And we have the final value at the end ?
<pippijn>
Big_int would benefit from uniqueness typing
<wmeyer>
adrien: thanks, but still not able to commit :(
<wmeyer>
(sent an email already)
<wmeyer>
but I will review them now
<tobiasBora>
And does a complex number arbitrary precision library exists ?
<Albe>
I need to write a CAML prog ( not OCAML) that given three 3-letter words serch if the letters are present in the given words and in that case it will return true otherwise false. The program must use the deterministic automata.
<wmeyer>
pippijn: yes
<wmeyer>
now I am able to work on this
<pippijn>
remake rebuilds treematch on every file change
<wmeyer>
actually I will start using merlin now :-)
<wmeyer>
today will be recovering configuration day
<rks`>
about time wmeyer :)
Drup has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
dsheets has joined #ocaml
n06rin has joined #ocaml
Albe has quit [Ping timeout: 250 seconds]
<n06rin>
you know some frameworks or libraries for gamedeveloping on ocaml?
<Kakadu>
lightning
<wmeyer>
rks`: :-)
<n06rin>
file README
<n06rin>
ha ha ha
<n06rin>
you serious?
<adrien>
?
<Kakadu>
yep
<pippijn>
recovering configuration takes a few minutes here
<pippijn>
moving to a new machine or restoring an old one
<pippijn>
recovering the rest of the files takes an hour or 2 (large backups)
<pippijn>
wmeyer: you need better backup processes
<Kakadu>
> What is the state of Qt bindings for OCaml these days?
<Kakadu>
I'm curious what should I answer
<pippijn>
I'm curious, too
<pippijn>
but you're the only one who can decide it
<adrien>
well
<adrien>
which features are missing?
<Kakadu>
users
<adrien>
haha
<Kakadu>
)
<adrien>
you shouldn't write an email to the caml-list but put that in the documentation and point the caml-list to it
<adrien>
so: what is there, what is missing, what is coming soon, how stable is it
<adrien>
do you have screenshots of applications you've made using it?
gour has quit [Disconnected by services]
gour_ has joined #ocaml
<wmeyer>
pippijn: right, the failures don't happen that often ...
<wmeyer>
well, that's what I do, when the file is changed only first line appears
<wmeyer>
do/doing appear/apparing
<pippijn>
hm
<pippijn>
oh, I know
<pippijn>
obuild is not in your path
<pippijn>
I'll fix it
<wmeyer>
ok
<pippijn>
wmeyer: why did you get the message twice?
<wmeyer>
I will add it to the path
<wmeyer>
no idea
<wmeyer>
nope
<wmeyer>
the same
Kakadu has joined #ocaml
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
<pippijn>
wmeyer: so running remake does not give you any output with "*** omake" in it?
<wmeyer>
the good news is that the initial build worked without a hitch
<wmeyer>
no
<pippijn>
but running "obuild" does?
<rks`>
one question for you : why are you using omake ?
<adrien>
gildor: hi, around? I'm trying to get the archives of the developer list for lablgtk but I can't find which credentials I have; everything I've tried has failed (my nick on it is "camarade_tux")
<pippijn>
rks`: I'm too lazy to answer it for the 15th time
<rks`>
ok pippijn, let me rephrase
<rks`>
why are you using omake and not jenga? :)
* pippijn
checks jenga
<pippijn>
never heard of it
<pippijn>
oh, I did hear of it
<wmeyer>
pippijn: obuild is working but nit remake
<pippijn>
the monadic thing?
wmeyer has left #ocaml []
<rks`>
I wouldn't describe it at the monadic thing, more as « the thing janestreet decided to implement because omake was too slow for them »
wmeyer has joined #ocaml
<pippijn>
omake is slow
<pippijn>
that's why I have remake
<wmeyer>
what remake does?
<pippijn>
apparently nothing for you
<rks`>
:D
<wmeyer>
that's good, I enjoy blazingly fast build
<pippijn>
wmeyer: can you send me a strace output of it?
<wmeyer>
too bad that the binaries are unchanged
<wmeyer>
yes.
<adrien>
gildor: found; I was assuming the password was the same as the forge one
<pippijn>
rks`: I might look into it
<adrien>
(aaaaannnndddddd there was nothing to see in the archives)
<pippijn>
rks`: but now I already have the whole omake infrastructure
<pippijn>
wmeyer: btw, pull in obuild
<rks`>
pippijn: well, you could write an alternative omakeroot
<rks`>
which would output something that jenga could easily understand
<pippijn>
yes
<rks`>
from all your omakefiles
talzeus has joined #ocaml
<pippijn>
that's actually planned
<rks`>
but I understand it's a pain
<pippijn>
but it's not so easy
<rks`>
oh, good for you
<rks`>
yeah
<pippijn>
omake has a bug that keeps me from using its OO features
<pippijn>
which is really sad
<pippijn>
because those features would make everything a lot cleaner
<pippijn>
and that would make "generate $otherbuildsystem scripts" easy, too
<pippijn>
wmeyer: are you *sure* you don't see that when running remake?
<adrien>
pippijn: if you're going to do a ssycall anyway and the kernel is going to check the file exist anyway
<adrien>
yeah, execve without stat should be faster
<adrien>
that said, you could cache results
<adrien>
otoh I don't think it's what takes time
<pippijn>
no, you can't
<pippijn>
unless you also invalidate that cache when PATH changes
<pippijn>
and then I don't think it's worth it
<pippijn>
besides
<pippijn>
adrien: the old process is dead after a successful execve
<pippijn>
where is the cache?
<adrien>
I meant, cache it from yhour application
<pippijn>
if you're going to do a lot of fork+exec, yes
<pippijn>
anyway
<pippijn>
now I do want -tt
<pippijn>
because it was interrupted
<pippijn>
[pid 22191] kill(22192, SIGINT) = 0
<pippijn>
wmeyer: 16:38 < pippijn> wmeyer: so running remake does not give you any output with "*** omake" in it?
<pippijn>
wmeyer: first of all, are you sure about this?
<pippijn>
wmeyer: and second: can you run "strace -tt -f -o log remake"?
demonimin has quit [Ping timeout: 245 seconds]
demonimin has joined #ocaml
asmanur has quit [Ping timeout: 264 seconds]
asmanur has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
Oejet has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
xavierm02 has joined #ocaml
<xavierm02>
Hey. I recall seing something about a function that would somehow get typed by its first call and if you then wanted to call it on something with another type, you got an error. And to prevent that, you had to kind of "force" polymorphism. But I can't recall more than that and couldn't make it happen by trying a few weird functions. Does it ring a bell for anyone here?
<mrvn>
happens
<mrvn>
let f = let a = ref [] in function x -> a := x :: !a;;
<mrvn>
val f : '_a -> unit = <fun>
<mrvn>
but maybe that isn't what you ment. Because you can't make this polymorphic at all.
Yoric has joined #ocaml
<mrvn>
You also can loose polymorphism when you have "let foo = Foo.foo" instead of "let foo x = Foo.foo x".
<ggole>
let map_id = List.map (function x -> x)
<ggole>
And the fix is to eta expand: let map_id xs = List.map (function x -> x) xs
<mrvn>
I can't think of an example offhand but sometimes you also have a perfectly polymorphic function but by using it in the same module ocaml decides you didn't want it polymorphi and inferes a specific type.
<xavierm02>
Thank you for answering. :) I'm not sure I got it though. It's a module thing? I can't get one example without a module?
<mrvn>
The first one, the ref, works without module
<ggole>
I gave you an example.
<ggole>
Which is from the manual, no less!
<xavierm02>
it's in the manual?
<xavierm02>
I couldn't find it >_<
<mrvn>
xavierm02: If you reimplement List.map then I think it would still break even though its in the same module.
<whitequark>
what's the best way of doing it? labelled arguments all the way down?
<adrien>
erk
<adrien>
does it have default values?
<whitequark>
I think so, but not the mutators for them
<whitequark>
so, once created, forever created.
<adrien>
then yeah, maybe labels and optional arguments
zpe has quit [Remote host closed the connection]
<whitequark>
yeah... thanks
<whitequark>
16 arguments. probably the worst API I've ever seen
<adrien>
don't worry
<adrien>
it'll change by next version :D
<whitequark>
it's been pretty stable actually; it's pinned to DWARF more or less
<ggole>
Wow. Reminds me of the Windows API.
<whitequark>
the alternative is assembling debug metadata by hand, and trust me, it's much worse.
<mrvn>
shouldn't some of those be in a struct?
<mrvn>
Like File + LineNo would be a location
<whitequark>
mrvn: dunno. what it does is assembles metadata, think "type metadata = String of string | Integer of int | Metadata of metadata list"
<whitequark>
so it's a pretty thin wrapper
<mrvn>
LLVMValueRef is basically just a pointer, right?
<whitequark>
yes, it's an opaque pointer.
<whitequark>
`metadata' appears externally as LLVMValueRef's.
Drup has quit [Ping timeout: 256 seconds]
<mrvn>
Hey, C pointer have types. Lets not use that and make them all the same so we don't detect errors.
<whitequark>
mrvn: I don't think C type system can represent inheritance
dkg has joined #ocaml
<mrvn>
no. but you can still have different pointer types.
<whitequark>
there are different pointer types... for example there's LLVMTypeRef and others
<whitequark>
but all the hierarchy of values has to be flattened into one type, I guess.
<mrvn>
LLVMValueRef Ty. I bet that should be a LLVMTypeRef.
<whitequark>
nope, it's a reference to (DWARF) metadata describing the type, not the actual type itself.
<mrvn>
the LLVMDwarfRef
<mrvn>
+n
ygrek has quit [Ping timeout: 246 seconds]
<whitequark>
then you would limit yourself to only being able to feed metadata emitted by DIBuilder back into it
Kelet has quit [Read error: Connection reset by peer]
Kelet has joined #ocaml
<whitequark>
which is surely not what I want, if I develop a compiler for a new language which is by definition not covered by default (read: geared to C/C++) metadata classes.
<mrvn>
yeah, that would totaly prefent passing the LLVMValueRef Fn as dwarf info :)
zpe has joined #ocaml
<whitequark>
it's slightly funny actually. OCaml type system combined with checks in LLVM makes interacting with it rather safe
<whitequark>
however if you use FFI from Ruby, it'll just segfault if it doesn't like anything
<whitequark>
and C types won't help you if you do FFI
zpe has quit [Remote host closed the connection]
<dkg>
hi, i have some ocaml that has what i think is a "string" object, and i want to test if it is a single-byte string where the byte is the null byte. how can i test that?
<whitequark>
str = "\x00"
<dkg>
whitequark: thanks!
<wmeyer>
ping pippijn
Drup has joined #ocaml
tobiasBora has quit [Read error: Connection reset by peer]
Kelet has quit [Quit: Leaving]
Kelet has joined #ocaml
Kelet has quit [Client Quit]
Kelet has joined #ocaml
ihm1 has joined #ocaml
Kelet has quit [Read error: Connection reset by peer]
Kelet has joined #ocaml
ihm1 has quit [Quit: ihm1]
Yoric has joined #ocaml
skchrko has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
ihm1 has joined #ocaml
<wmeyer>
pippijn: I am building treematch with ocamlbuild
ulfdoz has quit [Read error: Operation timed out]
boogie has quit [Remote host closed the connection]
<pippijn>
wmeyer: ok, treematch alone is fine to build with ocamlbuild, omake is mainly useful for me when I have 30 projects with interdependencies 5 of which I develop simultaneously
zpe has joined #ocaml
Yoric has joined #ocaml
<pippijn>
wmeyer: still, I would like remake to work
rwmjones has joined #ocaml
zpe has quit [Ping timeout: 258 seconds]
<palomer>
I'm trying to get a backtrace, but I'm getting this error: (Program not linked with -g, cannot print stack backtrace)