<zRecursive>
find /usr/local/lib/ocaml/ -name 'topfind*' => /usr/local/lib/ocaml/site-lib/findlib/topfind.cmi \n/usr/local/lib/ocaml/site-lib/findlib/topfind.mli however, OCaml version 4.03.0+dev3-2014-08-29 reports "Cannot find file topfind"
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
rand000 has quit [Quit: leaving]
malo has quit [Remote host closed the connection]
travisbrady has quit [Quit: travisbrady]
claudiuc has quit [Remote host closed the connection]
badkins has quit []
huza has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
manizzle has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Quit: Leaving.]
travisbrady has joined #ocaml
rgrinberg has joined #ocaml
gabemc has joined #ocaml
travisbrady has quit [Quit: travisbrady]
strmpnk_ is now known as strmpnk
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
thomasga has quit [Quit: Leaving.]
yacks has quit [Ping timeout: 240 seconds]
taion809 has quit [Remote host closed the connection]
yacks has joined #ocaml
shinnya has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
yacks has quit [Ping timeout: 250 seconds]
yacks has joined #ocaml
msaegesser has quit [Ping timeout: 272 seconds]
samrat has joined #ocaml
samrat has quit [Ping timeout: 244 seconds]
samrat has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
gabemc has quit [Ping timeout: 250 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
WraithM has joined #ocaml
cantstanya has joined #ocaml
axiles has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
siddharthv_away is now known as siddharthv
erikwr has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
cespinoza has quit [Ping timeout: 272 seconds]
cespinoza has joined #ocaml
sepp2k has joined #ocaml
teknozulu has joined #ocaml
<teknozulu>
Hello. I have a recursive function where one parameter keeps track of the number of recursions, and another one that acts as an accumulator. Being a noob I'm butchering the syntax though, problems arise on line 8 of http://pastebin.com/mRwUBvX1
<teknozulu>
(I'm trying to say if n was not 0, sum += gen_e(.., n-1)
<flux>
| n -> sum -> sum.. ?
<flux>
you cannot mutate sum, if that's what your goal is
<flux>
isn't | n -> sum +. gen.. sufficient
<flux>
if sum were a reference, you could be able to assign it with :=, but that would change your code somewhat
<teknozulu>
oh,, n -> sun +. gen.. actually makes sense.
hhugo has joined #ocaml
<teknozulu>
it compiles, now I just need to figure out why it'll value e at infinity :D
<teknozulu>
well, e-1
<zRecursive>
The /usr/local/bin/ocaml can use topfind, but ~/ocaml/bin/ocaml reports "Cannot find file topfind", why ?
<teknozulu>
interesting, passing 31 for n will return 1.718... and the values up to that are converging as you'd expect, but passing 32 makes it return infinity
<teknozulu>
is this due to an attempt to describe some unavailable precision?
msch has quit [Ping timeout: 260 seconds]
lopex has quit [Ping timeout: 272 seconds]
<flux>
zrecursive, maybe you haven't installed ocamlfind to ~/ocaml
<flux>
zrecursive, your local ~/ocaml probably doesn't find it from there.. not to mention it also probably won't work unless the installed ocaml versions are the same.
<flux>
it is not actually looking for ocamlfind the binary but the ocaml library binaries that were installed alongside it
<teknozulu>
yeah 64bit
<zRecursive>
~/ocaml/bin/ocaml is from Git
<flux>
zrecursive, so did you install ocamlfind after installing that git ocaml?
<flux>
teknozulu, well, then it's not at least factorial that's overflowing yet
<zRecursive>
no, i want it to share the one already on system
<flux>
zrecursive, it's not really going to happen. I don't think your 3.12 (just a guess) ocaml library binaries are going to work with 4.03
<zRecursive>
The system is 4.01
bcg has quit [Ping timeout: 250 seconds]
<flux>
you could try ocaml -I ..the directory where findlib is..
<zRecursive>
you mean "/usr/local/lib/ocaml/site-lib/findlib/" is NOT no path
<zRecursive>
of ~/ocaml/bin/ocaml
<flux>
what does btw your ~/.ocamlinit say about findlib?
<zRecursive>
Just #use "topfind";;
<flux>
well, you could stick the absolute path of the topfind script there
<zRecursive>
it should work, but why does the system installed ocaml works ?
<flux>
because it knows about the toplevel path
<flux>
your ~/ocaml does not
ygrek has quit [Ping timeout: 240 seconds]
<flux>
it does not know where the system ocaml along side the associated stuff is installed
<zRecursive>
can it be manually configured ?
<flux>
perhaps with some comand line switches
<flux>
such as -I
<zRecursive>
`~/ocaml/bin/ocaml -I /usr/local/lib/ocaml/site-lib/findlib/` still reports "Cannot find file topfind."
<flux>
looks like there is no switch to do it, then
<flux>
if you want to do it, perhaps you can symlink findlib to your ~/ocaml tree
<flux>
(regardless, I expect trouble in the actual libraries you are going to use through the findlib installation, though I haven't tried with your particular combination)
<zRecursive>
The system installed ocaml works great. I just want to test the newest ocaml by myself
<zRecursive>
it seems the Git version cannot use the old findlib
<flux>
probably under the toplevel directory of site-lib
<zRecursive>
there is /usr/local/lib/ocaml/topfind
<flux>
that's the one
<flux>
well, maybe :-)
<flux>
it should have some ocaml code for loading topfind libraries
<zRecursive>
i see now
oscar_toro has quit [Ping timeout: 272 seconds]
<zRecursive>
Error: /usr/local/lib/ocaml/site-lib/findlib/topfind.cmi is not a compiled interface for this version of OCaml. It seems to be for an older version of OCaml. so why NOT bind findlib into ocaml source ?
<flux>
because the ocaml compiler team doesn't wish to increase their burden of maintained code
<flux>
it is quite simple to maintain your own ~/ocaml installation with opam nowadays, though
<adrien>
you can get that error with any library
<flux>
you can even install ocamlfind with it
<adrien>
so you'd have to bundle each and every library with the compiler :)
<zRecursive>
but it is annoying to compile findlib for each ocaml version. BTW, can i tell opam to use ~/ocaml not /usr/local/bin/ocaml ?
<flux>
well, the easiest is to probably nuke ~/ocaml and use /usr/local/bin/ocaml to kickstart opam installation
<flux>
you can then install a new ocaml version with opam itself
<flux>
after that it doesn't need the system ocaml
<zRecursive>
i see, but i want to keep ~/ocaml which is built from git
<flux>
opam supports git-built ocaml with version 4.03.0+trunk
<flux>
I think at least that's what it is..
<zRecursive>
oh
<flux>
opam switch 4.03.0+trunk would then install that version after opam is installed
<flux>
and opam install whatever after that for joyous experience in installing modules :)
<zRecursive>
opam is great! In fact, i just want to trace the source code of ocaml ...
<flux>
hmm, I wonder if opam supports out-of-the-box compiling ocaml with debug symbols
<flux>
if not, keep your ~/ocaml :-)
<zRecursive>
and remove system installed ocaml
Hannibal_Smith has joined #ocaml
ygrek has joined #ocaml
manizzle has joined #ocaml
oscar_toro has joined #ocaml
manizzle has quit [Ping timeout: 272 seconds]
zRecursive has quit [Remote host closed the connection]
<ebzzry>
is patoline the usually suggested typesetting system in ocaml, or is there something else?
cago has joined #ocaml
<tane>
ebzzry, what do you want to do?
eikke__ has joined #ocaml
nicoo has quit [Ping timeout: 264 seconds]
ollehar has quit [Ping timeout: 272 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
_obad_ has quit [Ping timeout: 272 seconds]
nicoo has joined #ocaml
cago has quit [Ping timeout: 258 seconds]
<ebzzry>
I'm looking for an OCaml-based typesetting system.
<ebzzry>
One written in OCaml.
Kakadu has joined #ocaml
cago has joined #ocaml
kaustuv has joined #ocaml
<flux>
I'm not certain if the market on those things is very large ;-)
<braibant>
ebzzry: there is something called Patoline
<braibant>
which is a bunch of typesetting algorithms written in ocaml
thomasga has joined #ocaml
Submarine has quit [Ping timeout: 260 seconds]
_obad_ has joined #ocaml
<adrien_oww>
patoline \o/
<flux>
braibant, that's how the discussion started ;-)
tani has joined #ocaml
Simn has joined #ocaml
gabemc has joined #ocaml
Submarine has joined #ocaml
tane has quit [Ping timeout: 272 seconds]
ontologiae_ has joined #ocaml
<ygrek>
dbuenzli/luigi on github may also do something with typesetting
shinnya has joined #ocaml
<braibant>
flux: my bad :)
<flux>
braibant, you get points for effort :-)
octachron has joined #ocaml
bezirg has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
Thooms has joined #ocaml
avsm has joined #ocaml
cespinoza has quit [Ping timeout: 272 seconds]
oscar_toro has quit [Ping timeout: 260 seconds]
cespinoza has joined #ocaml
dsheets has joined #ocaml
eizodo has joined #ocaml
jonludlam has joined #ocaml
jwatzman|work has joined #ocaml
hhugo has joined #ocaml
cago has quit [Ping timeout: 272 seconds]
BitPuffin has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
cago has joined #ocaml
gabemc has quit [Ping timeout: 240 seconds]
<ebzzry>
So, patoline then. :-)
<ebzzry>
I'll try it out. :-)
Thooms has quit [Ping timeout: 272 seconds]
<Drup>
ebzzry: Patoline is "What I should write my next article in" and that I never take time to use, because I know latex pretty well already. :p
tani has quit [Remote host closed the connection]
eikke__ has quit [Ping timeout: 245 seconds]
acieroid has quit [Ping timeout: 260 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
<nicoo>
Drup: So true :D
oscar_toro has joined #ocaml
cago has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
<flux>
next time when you try to make a nice table in latex, give patoline a try?-)
<flux>
(disclaimer: I haven't used patoline)
<Drup>
bah, tables ? :p
Submarine has quit [Remote host closed the connection]
acieroid has joined #ocaml
mort___ has joined #ocaml
avsm has quit [Quit: Leaving.]
<nicoo>
flux: Tables are easy : I write them in org-mode and it compiles to LaTeX tables :)
<Drup>
the markup part of latex is not the nicest ever, but it's far from being bad, and it's not really the big issue with latex
<Drup>
the issue is the "programming language"
<Drup>
(and non-compositionality of macros, hence of packages)
<whitequark>
Drup: have you seen how verbatim works?
<Drup>
yes, sadly
<whitequark>
it live-patches the lexer state machine of tex in order to recognize \end{verbatim}, then patches it back
<whitequark>
oh
<Drup>
even better
<Drup>
[fragile] slides with multiple overlays in a beamer
<Drup>
it creates a new document, dump the content of the slide, expanded using the overlays, render that to a pdf and inject it back
* whitequark
has first looked at the source of verbatim when he was in high school (there was a latex course)
<Drup>
You had a latex course in highschool ? O_o
<whitequark>
it was ... terrifying, and I had no idea how the hell it managed to work, before I learned about compilers a few years later
<whitequark>
yes
<whitequark>
general typesetting and also that chemistry thing
<Drup>
is that the usual curriculum in russia ?
<whitequark>
no, it was a personal initiative of one of the teachers
<whitequark>
however for example C++ is
<whitequark>
:}
<Drup>
I'm not sure what to think about that =__=
<Drup>
ok, let's try to solve this ppx install issue
thomasga has quit [Quit: Leaving.]
_andre has joined #ocaml
<Drup>
the ppx branch still install correctly
BitPuffin has quit [Ping timeout: 272 seconds]
mort___ has quit [Ping timeout: 245 seconds]
eikke__ has joined #ocaml
<Drup>
whitequark: can't reproduce
<Drup>
ppx_lwt is always installed in "~/.opam/4.02.0/bin/ppx_lwt"
cago has joined #ocaml
yacks has quit [Ping timeout: 260 seconds]
Nahra has quit [Ping timeout: 260 seconds]
huza has joined #ocaml
bjorkintosh has quit [Ping timeout: 240 seconds]
ddosia has joined #ocaml
bcg has joined #ocaml
octachron has quit [Remote host closed the connection]
bcg has quit [Client Quit]
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
ygrek has quit [Ping timeout: 245 seconds]
_0xAX has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
Submarine has joined #ocaml
BitPuffin has joined #ocaml
yacks has joined #ocaml
waneck_ has joined #ocaml
samrat has joined #ocaml
samrat has quit [Client Quit]
__w_a_n_e_c_k__ has quit [Ping timeout: 250 seconds]
rand000 has joined #ocaml
CaptainRant has joined #ocaml
<CaptainRant>
Does ocaml has the sha2 family in its standard library ?
<CaptainRant>
have*
siddharthv is now known as siddharthv_away
oscar_toro has quit [Ping timeout: 246 seconds]
Thooms has joined #ocaml
travisbrady has joined #ocaml
SethTIsue has joined #ocaml
cago has quit [Quit: cago]
CaptainRant has quit [Quit: WeeChat 0.4.3]
<whitequark>
Drup: hmmm, weird
travisbrady has quit [Quit: travisbrady]
thomasga has joined #ocaml
Arsenik has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
BitPuffin has quit [Ping timeout: 240 seconds]
NoNNaN has joined #ocaml
BitPuffin has joined #ocaml
badkins has joined #ocaml
Thooms has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
<ebzzry>
Drup: :-)
Thooms has joined #ocaml
ygrek has joined #ocaml
charpi has joined #ocaml
charpi has quit [Remote host closed the connection]
travisbrady has joined #ocaml
eikke__ has quit [Ping timeout: 272 seconds]
bjorkintosh has joined #ocaml
thomasga has quit [Quit: Leaving.]
ollehar has quit [Ping timeout: 258 seconds]
eikke__ has joined #ocaml
mort___ has joined #ocaml
darkf has quit [Quit: Leaving]
ontologiae_ has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
msaegesser has joined #ocaml
cespinoza has quit [Ping timeout: 260 seconds]
cespinoza has joined #ocaml
mort___ has quit [Quit: Leaving.]
mbac has quit [Ping timeout: 258 seconds]
samrat has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Remote host closed the connection]
mort___ has joined #ocaml
samrat has quit [Client Quit]
samrat has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
_0xAX has quit [Remote host closed the connection]
waneck_ has quit [Read error: Connection reset by peer]
waneck_ has joined #ocaml
winterfury has joined #ocaml
cago has joined #ocaml
Arsenik has quit [Ping timeout: 245 seconds]
lumikuuro has quit [Ping timeout: 245 seconds]
junsong has joined #ocaml
<junsong>
Hi there, I just switched to ocaml 4.02. It fixed some bugs like not be able to install ocaml-build, ocp-indent. The problem now is the utop.
<junsong>
it always gives me the error: Fatal error: exception Invalid_argument("Zed_utf8.singleton")
<junsong>
any thoughts?
thomasga has quit [Quit: Leaving.]
oriba has joined #ocaml
<nlucaroni>
at startup? could it be something in your .ocamlinit file?
mbac has joined #ocaml
<junsong>
right. at startup
<junsong>
it seems the key code is messed up
<junsong>
when I press A, it shows x
<junsong>
.ocamlinit is clean
<nlucaroni>
interesting.
samrat has quit [Quit: Computer has gone to sleep.]
<nlucaroni>
captainRant : check cryptokit
junsong_ has joined #ocaml
Arsenik has joined #ocaml
<junsong_>
anyway, I issued a bug to utop. Let's see what's going on. I just switched to ocaml 4.02.0, everything in the environment is not touched yet.
tane has joined #ocaml
junsong has quit [Ping timeout: 246 seconds]
morphles has joined #ocaml
<gasche>
companion_cube: your jenkins instance generates wrong reports about Batteries, because it doesn't use ocamlfind=1.5.3
<gasche>
could you upgrade the ocamlfind version on the server?
<gasche>
( re. sha2: Cryptokit has sha-256 bindings )
junsong_ has quit [Quit: Page closed]
bezirg has quit [Ping timeout: 258 seconds]
mort___ has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
thomasga has joined #ocaml
philtom has joined #ocaml
cago has left #ocaml [#ocaml]
avsm has quit [Quit: Leaving.]
philtom has quit [Ping timeout: 260 seconds]
oriba has quit [Quit: oriba]
avsm has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
morphles has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
rand000 has quit [Ping timeout: 260 seconds]
eikke__ has quit [Ping timeout: 245 seconds]
pminten has joined #ocaml
eizodo has quit [Quit: Page closed]
braibant has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
rand000 has joined #ocaml
samrat has joined #ocaml
Arsenik has quit [Remote host closed the connection]
j0sh has quit [Remote host closed the connection]
sad0ur_ has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: Leaving.]
samrat has quit [Quit: Computer has gone to sleep.]
burgobianco has quit [Remote host closed the connection]
zpe_ has quit [Remote host closed the connection]
burgobianco has joined #ocaml
<nlucaroni>
Any way to convert a string to a format with the new GADT backend? I am seeing format_of_string_fmtty would be part of the answer.
ygrek has joined #ocaml
<whitequark>
nlucaroni: it's the same as before
<whitequark>
there's some kind of scanf specifier you can use to convert a string to a format, given that you know the type of the format
<nlucaroni>
it was an unsafe operation (at least how it was done in this project prior), via "%identity"/Obj.magic.
<nlucaroni>
i see.
<whitequark>
ah
<nlucaroni>
the type is just unit, so that should work.
tane has quit [Read error: Connection reset by peer]
<whitequark>
why do you need printf for that?..
<nlucaroni>
Format not Printf.
tane has joined #ocaml
<whitequark>
I mean, sure. wouldn't Format.pp_print_string work just as well?
<whitequark>
since you don't have any arguments
<nlucaroni>
are there any arguments related to the pretty-printing boxes?
avsm has quit [Quit: Leaving.]
<whitequark>
hm
<whitequark>
right, you need format for that
<whitequark>
so, Scanf.bscanf "%{%}" should work for that
thomasga has quit [Quit: Leaving.]
<nlucaroni>
hmm, yes. I see that description now in the docs.
thomasga has joined #ocaml
yomimono has joined #ocaml
oscar_toro has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
Thooms has quit [Quit: WeeChat 0.4.3]
<nlucaroni>
I'll play with this. thanks. I never really dealt with the scanf module in all these years.
zpe has joined #ocaml
<Drup>
it was probably a good decision :D
cespinoza has quit [Ping timeout: 272 seconds]
travisbrady has quit [Quit: travisbrady]
<adrien>
yeah, it's usually easier to just read whole lines and do the rest with Str
<Drup>
Or not Str, because anything is better than Str x)
travisbrady has joined #ocaml
cespinoza has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
Arsenik has joined #ocaml
cespinoza has quit [Ping timeout: 246 seconds]
Kakadu has joined #ocaml
<adrien>
:P
avsm has joined #ocaml
waneck_ has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
__w_a_n_e_c_k__ has quit [Ping timeout: 272 seconds]
__w_a_n_e_c_k__ has joined #ocaml
waneck_ has quit [Ping timeout: 245 seconds]
waneck_ has joined #ocaml
__w_a_n_e_c_k__ has quit [Ping timeout: 272 seconds]
sh1ken has joined #ocaml
erikwr has joined #ocaml
WraithM has quit [Quit: Lost terminal]
j0sh has joined #ocaml
thorsten` has quit [Ping timeout: 240 seconds]
teknozulu has joined #ocaml
SethTIsue has quit [Quit: SethTisue]
SethTIsue_ is now known as SethTIsue
waneck_ has quit [Read error: Connection reset by peer]
waneck_ has joined #ocaml
rgrinberg has joined #ocaml
oriba_ has joined #ocaml
__w_a_n_e_c_k__ has joined #ocaml
oriba has quit [Ping timeout: 250 seconds]
rand000 has quit [Ping timeout: 272 seconds]
waneck_ has quit [Ping timeout: 258 seconds]
rand000 has joined #ocaml
travisbrady has quit [Quit: travisbrady]
morphles has joined #ocaml
travisbrady has joined #ocaml
cespinoza has joined #ocaml
thorsten` has joined #ocaml
ollehar has joined #ocaml
Anarchos has joined #ocaml
pgomes has joined #ocaml
pgomes has quit [Client Quit]
badkins has quit []
vpm has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
badkins has joined #ocaml
teknozulu has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 245 seconds]
oriba_ is now known as oriba
WraithM has joined #ocaml
wwilly has joined #ocaml
thomasga has quit [Quit: Leaving.]
<whitequark>
Drup: okay, so, could you take a stab at base-no-ppx?
sheijk has joined #ocaml
<whitequark>
it's just adding ( "base-no-ppx" | "ppx_tools" ) to opam and adding base-no-ppx.base as a virtual package to the repository with restriction to < 4.02.0
<whitequark>
I have this prototyped, but since on my machine lwt doesn't install from a pin...
yomimono has joined #ocaml
<Drup>
I have no idea how to implement this thing, I would rather solve the fact that you can't install lwt
<whitequark>
I just told you :}
<whitequark>
okay, we can do it that way too
<wwilly>
hi
hsuh has quit [Ping timeout: 245 seconds]
<wwilly>
with opam, can we specify some includes folder during installation of a package?
<whitequark>
there is OCAMLPARAM
<whitequark>
unless you mean C includes
<wwilly>
the problem is that when i want to install why, conf-gmp.1 failed, it not found gmp.h
hsuh has joined #ocaml
<wwilly>
but installed by macports (under osx environment=
<Drup>
whitequark: so, when you install last git lwt with opam, is -enable-ppx in the configure command ? And you have nothing in .opam/4.02.0/bin ?
<whitequark>
Drup: the installation fails
<Drup>
oh
<Drup>
with what error message ?
<whitequark>
it can't ocamlfind install ppx/ppx_lwt
<whitequark>
(there is indeed no such file)
<whitequark>
oh, not quite
<whitequark>
"# ocamlfind: ppx/ppx_lwt_ex: No such file or directory
<Drup>
but ... ocamlfind is not the one installing the binnary
<Drup>
are you sure you don't have a modified version or something ?
<Drup>
the binary is installed by oasis only
<whitequark>
ok, so, I did git clean -dxf and it worked
<whitequark>
yay git clean -dxf
<Drup>
:|
<Drup>
x)
<whitequark>
setup-dev.exe was screwing it up, apparently
<Kakadu>
wwilly: very likely you need to adjust pkg-config search driectories
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
thomasga has joined #ocaml
<adrien>
kakadu: gmp isn't handled through pkg-config
<adrien>
actually gmp's build system is so bad that it's already incredible it even builds
WraithM has quit [Quit: Lost terminal]
WraithM has joined #ocaml
<Kakadu>
TT
<sheijk>
is anyone else having trouble with tuareg and extension points/annotations? it's currently indenting them with like 15 additional spaces for me
<sheijk>
couldn't find anything about such issues on the net, though. so is it just breaking for me? or has everyone else switched to ocp-indent integration already?
<Kakadu>
wwilly: There are examples of pkg-config files for GMP. You can put them on disk and solve problem temporarily
_habnabit has left #ocaml [#ocaml]
morphles has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<wwilly>
should i add something to opam after have writing the gmp.pc file?
Kakadu has quit [Quit: Konversation terminated!]
rgrinberg has quit [Client Quit]
yacks has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
pgomes has joined #ocaml
rgrinberg has joined #ocaml
thomasga has joined #ocaml
<whitequark>
Drup: ok it worked
<Denommus>
I wish there was a better tutorial for React.
malo has joined #ocaml
wwilly has quit [Quit: Leaving]
<Denommus>
I want to make a game with it, but I don't even know how to fit it in a loop
pgomes has quit [Quit: Leaving]
ollehar has quit [Quit: ollehar]
boogie has joined #ocaml
<adrien>
I'm not sure it's the best approach for games
<Denommus>
adrien: neither do I, but I want to try anyway
<Denommus>
adrien: what is a game if not a function of time and events?
<adrien>
over-engineering most probably
<adrien>
what is universe if not that too?
<Denommus>
adrien: uh... that's the point
<whitequark>
React sounds pretty nice for games
<adrien>
what is tea if not a function of time and events (how cold it gets, how much of it gets spilled on the floor, ...)
<Denommus>
adrien: FRP was *made* for interactive systems like GUIs and games
<Denommus>
adrien: why do you think it doesn't work for that?
<adrien>
I don't think it won't work
<companion_cube>
it might be slow though
<adrien>
I believe it's over-engineering for most games
<Denommus>
adrien: why do you think it's not a good approach?
<adrien>
it adds complexity and as companion_cube pointed out, it's probably going to be a performance bottleneck
<whitequark>
adrien: by this logic, you should use C
<adrien>
I don't think it brings anything for game behaviours
<def`>
hmmm, I played a bit with frp and 'games', my conclusion so far is that it is well suited to describing all 'non-cyclic' things (if I don't have a fix point in frp graph, things were easy)
Arsenik has quit [Ping timeout: 272 seconds]
<Denommus>
adrien: particularly, I think it's the *only* alternative for doing interactive systems in Rust (as soon as it has not broken unboxed closures, at least)
<adrien>
whitequark: I run everything on a brainfuck machine actually
<Denommus>
adrien: since you can only hold a single mutable reference to a value
<Denommus>
companion_cube: yeah, I was trying to implement it. But closures still have lots of bugs to be fixed, so I'm trying my hand on OCaml in the meantime
<adrien>
def`: but was it really better with it or only very slightly?
<companion_cube>
even functional programming in rust doesn't look that easy rigtht now
<Denommus>
adrien: there are papers covering efficiency for FRP
<Denommus>
companion_cube: of course, because closures are still broken
<whitequark>
you do bump into React if you need to pump lots of events very quickly, but there are plenty of games which don't need that
<companion_cube>
you'd need a good GC too
<Denommus>
companion_cube: why would you need GC?
<adrien>
Denommus: imho, unless you have a fairly complex game behaviour, you won't get much from it
<companion_cube>
well, because functional programming generates a lot of garbage ?
<companion_cube>
maybe RC<> is enough though
<adrien>
and if it turns out your logic doesn't fit exactly, you'll have to redo lots of things
<adrien>
need to go to bed, tons of work on tomorrow
<def`>
adrien: it was good, i think better but it's very subjective, placeboneffect etc, and I was just toying, Inhave no idea whether it's scale or not
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
<adrien>
def`: that's my concern too
<whitequark>
companion_cube: Rc is kind of an antipattern in Rust most of the time
<Denommus>
companion_cube: uh, they generate garbage if you don't have static checks for preventing garbage
<whitequark>
unless you have loops
<whitequark>
reference loops, I mean
<Denommus>
companion_cube: when you create a unboxed closure, it will have a contravariant lifetime in reation to the captured values. So it won't have garbage
<companion_cube>
Denommus: weeeeell, List.map does generate garbage (the old list) if you don't use it anymore
<companion_cube>
I'm not talking about closures, but about values
<companion_cube>
Map.add will generate garbage too, and so on
<Denommus>
companion_cube: Rust handles all that with lifetime tracking during compile-time. There's no need for garbage collection
<companion_cube>
only if you modify stuff in place
<companion_cube>
which is precisely not functional programming
oriba has quit [Quit: oriba]
<whitequark>
companion_cube: huh? you don't have to modify stuff in place.
<Denommus>
companion_cube: no. Linear types
<companion_cube>
ok, so what would List.map's signature be?
<companion_cube>
I mean, you can program in rust without using much Rc<> (or even not at all)
<companion_cube>
but that's not close to usual "functional programming"
<Denommus>
companion_cube: 1st: you would work with iterators instead of producing new lists directly. 2nd: you would track the ownership of each produced value statically
<def`>
there is a linear and a non-linear variant of List.map :p ?
axiles has quit [Remote host closed the connection]
<Denommus>
companion_cube: you don't need garbage collection for map. This is so true that there is already map for Rust that doesn't modify in-place and doesn't need GC
zpe has quit [Remote host closed the connection]
<companion_cube>
maybe List.map is too simple. How you would do the equivalent of Set.add?
<companion_cube>
(Set as a balanced tree, etc. Both the new and the old values being alive)
<ggole>
Or List.append
<ggole>
(Since the tail might be shared.)
<companion_cube>
also, yes
<companion_cube>
and of course, no tail call elimination is guaranteed
<ggole>
Or really anything involving values pointed at from more than one place in the heap
<Denommus>
sorry, my connection dropped
<companion_cube>
so, List.append or Set.add? :p
_andre has quit [Quit: leaving]
<ousado>
does Rust do region inference like MLKit?
<Denommus>
wait, I'm having a problem with my fonts
<Denommus>
companion_cube: ggole: for add and append I'd probably pass the list by move, not by reference
<companion_cube>
ahhh but that's not functional programming
<companion_cube>
what if I need both the old list and the new one?
<companion_cube>
and what about AVLs?
<Denommus>
if I need both lists, I do a Arc<T> or Rc<T> :P
<Denommus>
then pass one of them by move :P
<ggole>
So you can't use the same function for both cases?
<Denommus>
ggole: of course you can
<companion_cube>
so, youend up with lots of Rc<T> ;)
<companion_cube>
(or Arc<T>)
hhugo has quit [Quit: Leaving.]
<Denommus>
ggole: something like let foo = Arc::new(vec![1i]); let bar = vec![2i]; let baz = append(*(foo.clone()), bar);
<companion_cube>
vectors now? what about lists?
<ggole>
clone is a deep copy?
<Denommus>
companion_cube: you usually don't need multiple ownership. When you do, it exists
<companion_cube>
Denommus: I'm really excited about rust, but I don't think it's going to be a proper functional language
<Denommus>
ggole: no. Arc's clone creates a new reference to the same place
<companion_cube>
unless everything is immutable and uses Rc<T> (or Gc<T>)
<Denommus>
companion_cube: I'm using vector as example. It would be the same thing with a list
<Denommus>
companion_cube: but there isn't a convenient syntax for lists, IIRC
<companion_cube>
because there aren't any lists, currently, I think
<companion_cube>
let alone immutable lists
<companion_cube>
and trees used in a functional way *require* sharing
<Denommus>
companion_cube: of course there's a list. DList
<companion_cube>
doubly linked?
<Denommus>
companion_cube: yes
<companion_cube>
not functional, again ;)
<nlucaroni>
so not shared.
<whitequark>
companion_cube: hmm good points
<Denommus>
companion_cube: uh, a singly-linked list is a special case of doubly-linked
<companion_cube>
doubly linked do not exist in functional languages
<companion_cube>
whereas singly linked can be used in an immutable fashion
<Denommus>
companion_cube: of course, because you don't have explicit pointers or references
<Denommus>
companion_cube: it's not because it can't be used in functional programming
<companion_cube>
no, it's because you can't update them without mutation
<Denommus>
companion_cube: you also can use a doubly-linked list in an immutable fashion
<ggole>
Links in both ways is pretty problematic without mutation
<ggole>
You can't really tie the knot easily
<companion_cube>
Denommus: please show me how in ocaml
hhugo has joined #ocaml
<ggole>
You can do it "statically" with let rec, but that doesn't cover any of the interesting use cases.
<Denommus>
companion_cube: oh, no, wait, you're right
<whitequark>
ggole: doesn't let rec just hide mutation?
<Denommus>
companion_cube: when consing in a doubly-linked list, I'd have to mutate the head
<companion_cube>
Denommus: yes, you'd have to mutate the first and last elements
<companion_cube>
(in a circular list)
<ggole>
whitequark: something like that
<companion_cube>
or the first one in a non-circular list, right
<Denommus>
companion_cube: anyway, doing a singly-linked list in Rust is trivial
<companion_cube>
I don't doubt it
<ggole>
(Although you don't need it for this particular case, I think.)
<whitequark>
gasche: what are the places I need to document -ppx at? just manpages?
thomasga has quit [Ping timeout: 260 seconds]
<Denommus>
ousado: ... ever?
<companion_cube>
for proper functional programming you'd rather do enum List<T> { Nil, Cons(T, Rc<List<T>>) }
<ousado>
Denommus: no
<companion_cube>
so you can share suffixes
<whitequark>
gasche: I see the description for -pp in manpages and OCaml manual is identical, but I don't quite understand how the latter is generated (and from where)
<Denommus>
anyway, too off-topic
<Denommus>
but FRP in Rust is possible, yes. There was at least one implementation of FRP in C++ without resorting to a GC, so Rust should also be possible
<companion_cube>
it's probably possible, but probably painful too ;)
badkins_ has joined #ocaml
badkins_ has quit [Remote host closed the connection]
badkins_ has joined #ocaml
<Denommus>
companion_cube: it won't be painful with proper closures. Rust's closures are better than C++'s closures, but they are still too full of bugs and internal compiler errors
troydm has joined #ocaml
badkins has quit [Ping timeout: 272 seconds]
travisbrady has quit [Quit: travisbrady]
SethTIsue has quit [Quit: SethTIsue]
badkins_ has quit []
badkins has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
WraithM has quit [Ping timeout: 245 seconds]
hhugo has quit [Quit: Leaving.]
eikke__ has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
averell has quit [Remote host closed the connection]
hhugo has joined #ocaml
averell has joined #ocaml
rgrinberg has joined #ocaml
zpe has joined #ocaml
shinnya has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
<nlucaroni>
had a second between work and made the changes you recommended, whitequark, and things type-check.
<companion_cube>
whitequark: would you be interested in a small, alternative S-expr library?
jao has quit [Ping timeout: 272 seconds]
dsheets has quit [Ping timeout: 245 seconds]
Submarine has quit [Quit: Leaving]
tane has quit [Quit: Verlassend]
<nlucaroni>
hmm, getting input_value:bad object when running some byte-code through ocamldebug. I had assumed i had forgotten to run eval `opam ...` . but recompiled a few times in a new terminal.
SethTIsue has joined #ocaml
SethTIsue has quit [Client Quit]
avsm has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
teknozulu has joined #ocaml
teknozulu has quit [Client Quit]
CaptainRant has joined #ocaml
<CaptainRant>
Is there anything else that ocaml catches at compiletime, besides type errors and NULL ?