Guest94228 has quit [Read error: Connection reset by peer]
cesar_ has joined #ocaml
cesar_ is now known as Guest99498
<teknozulu>
(http://pastebin.com/9uStVXuN) So line 30 causes node to be type inference'd to 'a option, which becomes a problem on lines 34 and 36 where it expects the type of node to be treenode instead
<teknozulu>
how do I uhm... get the treenode part of treenode option
manud has joined #ocaml
<dmbaturin>
teknozulu: Try matching with None -> () | Some node' -> ... ?
<whitequark>
ocamljava is an alternative compiler, not a library
<SomeDamnBody>
whitequark, yeah, not easily. But I can write a autoconf m4 macro to mirror the default ocaml one, so that anybody else that wants to be able to swap out desired target can just use it
<SomeDamnBody>
... I know that
<SomeDamnBody>
I'm trying to compile a library that is normally built
<SomeDamnBody>
with the regular ocaml tool chain. I'm trying to replace the ocamls to ocamlc/ocamlopt with ocamljava
<SomeDamnBody>
right now, it's a pain in the ass, because ocamlfind isn't finding ocamljava
<SomeDamnBody>
whitequark, ^
<whitequark>
I'm not sure why are you expecting it to find ocamljava
psy_ has quit [Ping timeout: 255 seconds]
sheijk has joined #ocaml
omqal has quit [Quit: omqal]
<SomeDamnBody>
well, isn't that what it does? it finds the location of where ocaml packages are installed right whitequark ?
<whitequark>
yes
<whitequark>
but ocamljava is not a package
<SomeDamnBody>
it's not a package, but when I installed it through opam I did opam install ocamljava?
<SomeDamnBody>
or opam switch anyway...
<whitequark>
opam and ocamlfind are unrelated
<whitequark>
ocamlfind only works with bytecode/native code toolchain anyway
<SomeDamnBody>
oh ok
<SomeDamnBody>
ah crap...
<SomeDamnBody>
so... I should just rework the autotools configuration to no longer use ocamlfind?
<SomeDamnBody>
just use ocamljava directly?
<whitequark>
I think so.
ygrek has joined #ocaml
<SomeDamnBody>
ah ok
badon_ has joined #ocaml
badon has quit [Ping timeout: 255 seconds]
badon_ is now known as badon
ontologiae has quit [Ping timeout: 258 seconds]
tac_ has quit [Ping timeout: 272 seconds]
NoNNaN has quit [Remote host closed the connection]
psy_ has joined #ocaml
psy_ has quit [Ping timeout: 246 seconds]
psy_ has joined #ocaml
tac_ has joined #ocaml
samrat has joined #ocaml
sheijk has quit [Ping timeout: 272 seconds]
meiji11 has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
araujo has quit [Quit: Leaving]
waneck has quit [Read error: Connection reset by peer]
manud has quit [Quit: manud]
<dmbaturin>
Is there a way to access the DOM from programs compiled with js_of_ocaml?
<whitequark>
sure, it's in the documentation
<dmbaturin>
Cool, then I should actually read the documentation. :)
<tac_>
I think I'm having a brainfart
<tac_>
If I want to filter a list... but I want to also produce a boolean telling me whether anything actually WAS removed
<tac_>
Is it possible to do with just one traversal of the list?
<tac_>
It really should be, but I'm not especially well-versed in tail recursion
<dmbaturin>
tac_: Well, you can use boolean argument and pass it around unchanged I think.
<tac_>
dmbaturin: the problem is reading it back out
<tac_>
If I have my list return a tuple, any recursive call will need to split out the two pieces
<tac_>
and then cons up the result
samrat has quit [Quit: Computer has gone to sleep.]
<dmbaturin>
Hhm, how do you filter the list?
<dmbaturin>
I mean, does the fate of an item depend only on its own value?
<tac_>
It's just going through a list of strings
<tac_>
and doing a compare against a fixed string
<tac_>
if it matches, we throw it away
<tac_>
but in the end, we need to know whether we threw it away or not
teknozulu has joined #ocaml
taion809 has quit [Ping timeout: 244 seconds]
<dmbaturin>
I think it should be possible to actually return a tuple only when the base case is reached.
<dmbaturin>
But let me try to actually write it because I'm not exactly sane right now and I can be talking nonsense.
<tac_>
heh
<tac_>
I'm helping out a friend with a programming languages course, and so I'm going through. The course is in SML, not Ocaml, but I figured, tomaytos tomahtos.
<tac_>
I know how to write this function the "obvious" way
<tac_>
but I got to thinking that it isn't very efficient
Snark has quit [Read error: Connection reset by peer]
Snark has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
oscar_toro has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<kaustuv>
the most reasonable way would be with promised futures, a la AliceML
<dmbaturin>
kaustuv: Have you used AliceML?
<kaustuv>
A bit when I was a grad student, i.e., nearly a decade ago
zpe has quit [Ping timeout: 260 seconds]
<dmbaturin>
Do you think those features are feasible to pull into ocaml?
<kaustuv>
One of the main people reponsible for it (Andreas Rossberg) used to be active on this channel. Don't know if he still hangs around.
<kaustuv>
I don't know if OCaml will ever get futures since it means that all data access is indirect
<kaustuv>
But I don't actually know enough about how they're implemented to be sure of this
cesar_ has joined #ocaml
cesar_ is now known as Guest33992
Guest33992 has quit [Ping timeout: 272 seconds]
larhat has joined #ocaml
octachron has joined #ocaml
meiji11 has quit [Remote host closed the connection]
tane has joined #ocaml
ygrek has joined #ocaml
Simn has joined #ocaml
tac_ has quit [Ping timeout: 260 seconds]
tac_ has joined #ocaml
tane has quit [Quit: Verlassend]
cago has joined #ocaml
tnguyen1 has quit [Remote host closed the connection]
tnguyen has joined #ocaml
tac_ has quit [Quit: Leaving]
dsheets has joined #ocaml
zpe has joined #ocaml
<adrien>
kaustuv: yes, he's still here
tane has joined #ocaml
psy_ has quit [Quit: Leaving]
ysz has joined #ocaml
ysz has quit [Client Quit]
jao has quit [Ping timeout: 240 seconds]
ysz has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
eikke has joined #ocaml
vogler has joined #ocaml
SomeDamnBody has quit [Ping timeout: 250 seconds]
hhugo has joined #ocaml
siddharthv_away is now known as siddharthv
kakadu has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest70361
jonludlam has joined #ocaml
Hannibal_Smith has joined #ocaml
<gasche>
whitequark: if you want your PR#6613 ARM issue to be fixed in 4.02.1 if it needs to, you should move fast
<companion_cube>
o/
Guest70361 has quit [Ping timeout: 245 seconds]
siddharthv is now known as siddharthv_away
demonimin has quit [Ping timeout: 260 seconds]
demonimin has joined #ocaml
fraggle_ has joined #ocaml
NoNNaN has joined #ocaml
oscar_toro has quit [Quit: Leaving.]
tnguyen has quit [Remote host closed the connection]
tnguyen has joined #ocaml
huza has joined #ocaml
tane has quit [Quit: Verlassend]
huza has quit [Quit: WeeChat 0.3.8]
huza has joined #ocaml
huza has quit [Client Quit]
huza has joined #ocaml
huza has quit [Client Quit]
huza has joined #ocaml
huza has quit [Client Quit]
huza has joined #ocaml
huza has quit [Client Quit]
huza has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
bezirg has joined #ocaml
<Unhammer>
I want to call an ocaml library from python – is http://pycaml.sourceforge.net/ viable, or should I make a C wrapper for the ocaml and use python's ctypes?
AltGr has left #ocaml [#ocaml]
<Drup>
"This is built against python 2.x and Ocaml 3.04."
<Drup>
I think that will tell you anything you need to know about Pycaml
kyun has quit [Read error: Connection reset by peer]
huza has quit [Ping timeout: 240 seconds]
jonludlam has quit [Quit: Coyote finally caught me]
jasiek has joined #ocaml
acieroid has joined #ocaml
<Unhammer>
heh ok
siddharthv_away is now known as siddharthv
siddharthv is now known as siddharthv_away
divyanshu has joined #ocaml
jonludlam has joined #ocaml
bezirg has quit [Ping timeout: 245 seconds]
cesar has joined #ocaml
cesar is now known as Guest80836
siddharthv_away is now known as siddharthv
octachron has quit [Ping timeout: 272 seconds]
Guest80836 has quit [Ping timeout: 255 seconds]
_andre has joined #ocaml
lordkryss has joined #ocaml
siddharthv is now known as siddharthv_away
bezirg has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
cago has left #ocaml [#ocaml]
sheijk has joined #ocaml
shinnya has joined #ocaml
eizodo has quit [Ping timeout: 246 seconds]
samrat has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
rand000 has joined #ocaml
tnguyen has quit [Ping timeout: 260 seconds]
tnguyen has joined #ocaml
octachron has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
ygrek has quit [Ping timeout: 250 seconds]
kaustuv has joined #ocaml
rand000 is now known as rand_
sheijk has quit [Ping timeout: 255 seconds]
<rand_>
Hello, does anyone know a way of extending a module by overriding some function that other functions depend upon? I guess the most obvious way is to use an object instead of a module..
<flux>
if there are functions that are designed to be parametrized by an external definition, the module should make use of a module argument
<flux>
ocaml isn't very tolerant of ad-hoc solutions :)
<flux>
in other words, it is not possible to change how an object works internally
<rand_>
it's not?
<flux>
you can only introduce a new module based on the functionality of an old one
<flux>
there is no way to change an existing module
samrat has quit [Quit: Computer has gone to sleep.]
<rand_>
ahh - my plan is actually to extend by defining new modules or inheriting classes..
<rand_>
first class modules, to be able to switch at runtime
<rand_>
but what did you mean by not able to change how an object works internally?
<flux>
I actually meant modules, not sure why I wrote object
<rand_>
ah (:
<flux>
objects have virtual methods
<rand_>
so do you think there maybe would be a practical way to do it with modules if functorizing it?
<flux>
perhaps, but after playing a bit I've decided that should the need for using first class modules arise, I will probably prefer objects/classes.
<rand_>
ok (:
<flux>
but do experiment :)
<rand_>
mm, I will - thanks!
<flux>
and report :)
<flux>
good luck!
thizanne has quit [Ping timeout: 245 seconds]
martintrojer has quit [Ping timeout: 240 seconds]
sheijk has joined #ocaml
<rand_>
flux: yes if I find something new (:
martintrojer has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest94068
_5kg has quit [Ping timeout: 272 seconds]
thizanne has joined #ocaml
eizodo has joined #ocaml
Guest94068 has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 246 seconds]
sheijk has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ocaml
struktured has quit [Ping timeout: 272 seconds]
darkf has quit [Quit: Leaving]
<kaustuv>
I've recently found one situation where the fully open recursion of objects is actually bad
BitPuffin has joined #ocaml
teknozulu has joined #ocaml
taion809_ has joined #ocaml
<rand_>
Oh - when is that?
<whitequark>
gasche: I have some patches for ocaml that are meant to improve cross-compiling
<whitequark>
I've noticed ./configure already sets CAMLRUN in config/Makefile, however the build system itself never uses that value (!)
<whitequark>
instead it uses like three different ways of reaching for ocamlrun in seven different places, most of them already importing config/Makefile
<adrien>
have you checked you haven't broken bootstrap?
eikke has quit [Remote host closed the connection]
<adrien>
whitequark: well, I often believed I had not either
<adrien>
thing is bootstrap is brittle
samrat has joined #ocaml
struktured has quit [Ping timeout: 260 seconds]
badkins has joined #ocaml
Simn has quit [Ping timeout: 260 seconds]
samrat has quit [Ping timeout: 246 seconds]
<whitequark>
argh. network outage. there is also the same thing as CAMLRUN required for CAMLYACC, and make checkstack has to be disabled while cross-compiling. this allows me to build a cross-compiler while supporting m.h s.h and config/Makefile manually
samrat has joined #ocaml
<whitequark>
some more work will be needed until ./configure works properly, but it's nothing outstanding
ygrek has joined #ocaml
Simn has joined #ocaml
hhugo has quit [Remote host closed the connection]
<def`>
it's a dictation exercise where the student is expected to transcribe a text without making mistake
bezirg has quit [Quit: Leaving.]
<def`>
… errors are highlighted in red, correcting _annotations_ are added in green
rand_ has quit [Quit: leaving]
badkins has joined #ocaml
<whitequark>
but how is this related to ppx?..
bezirg has joined #ocaml
bezirg has quit [Client Quit]
<def`>
you express more or what you want in something that looks close to the language, and put a lot of annotations hoping this become correct ocaml after some rewriting
<tane>
Is there any error report on utop on ubuntu 14.04, using opam's 4.02.0 ocaml. Segfaults all over again, resulting from some strange connection to libraries required by Core
<def`>
more or less*
<whitequark>
oh, hehe
<whitequark>
in this sense of "annotations"
<whitequark>
tane: jst just released a new version of Core, with lots of 4.02 fixes in changelog
<whitequark>
try updating
<tane>
oh alright, thanks
<whitequark>
utop itself is very stable on 4.02 in my experience, it's likely to be Core
<tane>
my ocamlinit doesn't load Core though
<whitequark>
what is the condition for segfault?
cesar has joined #ocaml
<tane>
whitequark, just starting it, results in direct segfault
cesar is now known as Guest39053
<tane>
i haven'T research the problem yet
<tane>
if i take a fresh install of 4.02.0 via opam and directly install utop, it works
<tane>
later, when adding new libraries via opam, not necessarily in .ocamlinit, i get errors
shinnya has quit [Ping timeout: 260 seconds]
bezirg has joined #ocaml
<tane>
on my laptop, running the same OS, i get the following error on startup of utop: /....../4.02.0/bin/ocamlrun': munmap_chunk(): invalid pointer: ...
<whitequark>
that's really odd
_twx_ has joined #ocaml
<tane>
i could take a fresh install and consecutively install all requirements of core, and have a look at what exactly causes this
Guest39053 has quit [Ping timeout: 272 seconds]
sheijk has joined #ocaml
bezirg has quit [Client Quit]
tnguyen has joined #ocaml
<tane>
doing that now, i want to have a working ocaml again
zpe has joined #ocaml
pyon has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
bezirg has joined #ocaml
pyon has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
bezirg has quit [Quit: Leaving.]
bezirg has joined #ocaml
zpe has joined #ocaml
bezirg has quit [Ping timeout: 245 seconds]
jcloud has quit [Quit: Connection closed for inactivity]
badkins has quit [Ping timeout: 260 seconds]
pyon has quit [Quit: brb]
pyon has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
<tane>
does utop cache anything?
<tane>
i installed all dependencies of core and core sequentially
<tane>
utop worked, moved my .ocamlinit back, it aborted
<tane>
removed .ocamlinit again, the error remains