<everyonemines>
Is there a way to do imperative "if" statement programming in ocaml? eg, if a=b then (let c = 1) else (let c=2)
<everyonemines>
something like a python if statement?
mnabil has quit [Ping timeout: 246 seconds]
<everyonemines>
I think what I want to do is create a function with side effects, and call that.
<everyonemines>
er no, I want to filter the array I'm mapping to instead of using an if statement
<everyonemines>
I wanted to map something with an if statement to an array, but I guess I need to loop over the array with a while loop and delete elements.
<everyonemines>
...or I could install Batteries
<everyonemines>
and use the filter function
mnabil has joined #ocaml
<everyonemines>
...and batteries won't compile, so now I'm installing godi
<everyonemines>
...and failure
<everyonemines>
...now installing wget
mnabil has quit [Remote host closed the connection]
vivanov has joined #ocaml
Associat0r has quit [Quit: Associat0r]
lopex has quit []
<orbitz>
can exceptions be polymorphic?
<orbitz>
makes sense, no good way to typecheck that
EM03 has quit [Read error: Connection reset by peer]
eelte has joined #ocaml
sepp2k has quit [Quit: Leaving.]
coucou747 has quit [Ping timeout: 258 seconds]
joewilliams is now known as joewilliams_away
Associat0r has joined #ocaml
arubin has quit [Quit: arubin]
Transformer has joined #ocaml
tomprince has joined #ocaml
Transformer has left #ocaml []
wuj has joined #ocaml
wuj has quit [Ping timeout: 276 seconds]
<philtor>
I'm trying to build the ocaml-zmq (ZeroMQ bindings)
<philtor>
I get this:
<philtor>
ocamlfind: Package `uint.uint64' not found
<philtor>
Where does one find this package?
<philtor>
(and how is it installed - I don't see it in godi)
ymasory has quit [Quit: Leaving]
dnolen has quit [Quit: dnolen]
philtor has quit [Read error: Operation timed out]
<pdhborges>
use ! to acess the contents of the cell
<robinnn>
ok thx
<robinnn>
pro
<Yoric>
thelema: indeed
<thelema>
Yoric: then I'm definitely not moderator.
<thelema>
Yoric: but I will.
hto has joined #ocaml
philtor has joined #ocaml
<hcarty>
thelema: It would be nice to have a functor-based BatMapSet/BatMultiMap in Batteries
<hcarty>
I've found that the polymorphic Map and Set modules in Batteries have caused me more trouble than they have saved typing.
Yoric has quit [Read error: Connection reset by peer]
pdhborges has quit [Quit: Leaving.]
Yoric has joined #ocaml
Oejet has joined #ocaml
sku has joined #ocaml
<thelema>
hcarty: oops, did I miss that what was posted wasn't polymorphic?
<thelema>
yup, "written in functorized style and is not polymorphic at all"
<flux>
I wonder if there could be generic interface for all linear containers and for all associative containers, and all containers should implement it/a superset of it
<flux>
I mean, of course there could be, but if that interface could be expressed with a signature..
<thelema>
flux: of course.
<flux>
I guess there would need to be four variants: functional/imperative, linear/associative
<flux>
..but maybe there are more issues I'm not seeing
<flux>
also would maps and multimaps have the same interface..
<thelema>
no, they'd have different interfaces, as lookup on multimaps returns a set
<thelema>
while insertion is a single value
<flux>
should the creation/mutation be a separate interface from lookup perhaps?
<flux>
perhaps that would be too fine separation
<flux>
at least there should be a non-signature idea of what a data structure library should provide
<flux>
or perhaps a basic interface, and then there could even be functors for the convenience functions
<flux>
like iter can be expressed in terms of fold, fold and find could perhaps be expressed in terms of fold_until etc..
<thelema>
don't get too magical in your interfaces
<flux>
:)
<thelema>
simple, performant implementations of iter don't have to be implemented through 2 levels of functors.
jderque has joined #ocaml
zubeen has joined #ocaml
<flux>
but sometimes perhaps a functor-generated function is better than no function at all
<flux>
it might be a good way to bootstrap your new data structure as well
eikke has quit [Read error: Operation timed out]
hto has quit [Ping timeout: 240 seconds]
el-out_y has joined #ocaml
<el-out_y>
hi
<thelema>
hi
<flux>
thelema, btw, it'd be sooo nice if we had defunctorizer in working order :)
joewilliz is now known as joewilliams
joewilliams has quit [Changing host]
joewilliams has joined #ocaml
<thelema>
flux: very. I could get behind using levels of functors if I could just have it generate code for me.
<el-out_y>
I have some problems for compile my code... someone can help me?
<thelema>
el-out_y: pastebin the code with the error
<el-out_y>
I want to create a module in a other file, but i don't know how to link
<hcarty>
thelema: The macro component of pa-do provides something of a defunctorizer, but I'm not sure if it would do much to help here.
<kaustuv>
How can I fix this kind of error?
<kaustuv>
Error: This expression has type [ `MARK ]
<kaustuv>
but an expression was expected of type [ `ELIDE | `MARK ]
<kaustuv>
The first variant type does not allow tag(s) `ELIDE
ocp has quit [Ping timeout: 252 seconds]
<thelema>
kaustuv: ( `MARK :> [`ELIDE | `MARK] )
<thelema>
if you have a name for [`Elide | `Mark], use that after the :>
<kaustuv>
Right, just figured out that an explicit coercion was needed.
* kaustuv
needs more coffee
<thelema>
answer spring to mind quickly after asking IRC
<thelema>
*answers
<thelema>
Often removing type annotations helps with this, as the > and < usually work in the intended way, and once explicit types without them get mixed in, things get a lot more annoying
<kaustuv>
Thanks though
<kaustuv>
Did you merge bluestorm's splay code, by the way?
<kaustuv>
I send a mail to the list saying that I was fine with it, but it's stuck in moderation
thelema_ has joined #ocaml
jamii has quit [Ping timeout: 240 seconds]
thelema has quit [Ping timeout: 240 seconds]
el-out_y has left #ocaml []
el-out_y has joined #ocaml
el-out_y has left #ocaml []
kaustuv is now known as kaustuv_afk
Eiael has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
andreas has quit [Ping timeout: 240 seconds]
enthymeme has joined #ocaml
<hcarty>
thelema_: Out of curiosity - where did the name of the "tap" function come from?
<hcarty>
I don't have much to say beyond the comment in the documentation for now, but if I come up with something I will add it.
jamii has quit [Ping timeout: 260 seconds]
joelr has joined #ocaml
<joelr>
good day
<joelr>
gildor: is it possible to incorporate the output from pg_config --includedir-server into _oasis?
Yoric has quit [Quit: Yoric]
<joelr>
I'm trying to use oasis to build a c shared library but, perhaps, this is better done outside of oasis
<adrien>
joelr:
<adrien>
bah
<joelr>
yes?
<adrien>
joelr: does it also have pkg-config support btw?
<joelr>
what does?
<adrien>
postgresql
<adrien>
pg_config is pretty much like pkg-config it seems
<joelr>
not sure
<joelr>
why?
<joelr>
how does it help?
<adrien>
because it's more widespread and generic, but anyway, pkg-config support is oasis won't be available before 0.3.0
<joelr>
ok
<adrien>
but you can change some file after configure, I need to look it up
robinnn has quit [Quit: Lost terminal]
<adrien>
"if you want to feed anything that should live inside oasis, just add it to setup.data (or setup.log depending if you do it at configure or build)
<adrien>
e.g. echo 'pkg_pcre_cflags="-I/usr/include/pcre"' >> setup.data
<adrien>
"
NaCl has quit [Ping timeout: 240 seconds]
NaCl has joined #ocaml
Yoric has joined #ocaml
redfire has joined #ocaml
<joelr>
adrien: thanks
jamii has joined #ocaml
enthymeme has quit [Quit: brb, library]
<redfire>
hi
<redfire>
I have a question about something I don't understand