flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
alexyk has joined #ocaml
Asmadeus_ has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
seafood has quit [Connection timed out]
<travisbrady_> does the OCaml concept of Functors match that of Haskell?
Asmadeus has quit [Read error: 104 (Connection reset by peer)]
<kaustuv> travisbrady_: No. They aren't even related. An OCaml functor is a transformation between structures, while the type class Functor describes types that have a map function.
<travisbrady_> kaustuv: ahh, thank you. Yes, Functors in Ocaml sound a lot more like parameterized modules in Erlang
<kaustuv> Except OCaml functors are far more general.
ssamoon has quit [Read error: 113 (No route to host)]
Asmadeus has joined #ocaml
Asmadeus_ has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
smimram has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
ched__ has joined #ocaml
ched_ has quit [Read error: 110 (Connection timed out)]
julm has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
alexyk has joined #ocaml
schme has joined #ocaml
delroth has quit [Read error: 54 (Connection reset by peer)]
delroth has joined #ocaml
komamitsu has joined #ocaml
schme has quit [Read error: 113 (No route to host)]
julm has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
m3ga has joined #ocaml
alexyk has quit []
jeddhaberstro has quit []
alexyk has joined #ocaml
jbjohns has quit ["ChatZilla 0.9.84 [Firefox 3.0.10/2009042316]"]
ikaros_ has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
willb2 has joined #ocaml
willb1 has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
alexyk has quit []
<flux> travisbrady_, there is a white paper by oleg (iirc) that describes how the module system and type classes are mappable to each other, but I'd say without an explicit encoding process they aren't that similar..
alexyk has joined #ocaml
<kaustuv> Oleg's paper just shows how to encode translucent ML-functors using type classes and existential types. For a back and forth translation you'd have to read some of Manuel Chakravarty's papers.
alexyk has quit [Client Quit]
<kaustuv> By the way, Oleg's encoding is not practical for any serious use.
ikaros_ has quit [Read error: 60 (Operation timed out)]
rhar has joined #ocaml
hkBst has joined #ocaml
angerman has joined #ocaml
<travisbrady_> out of curiosity what sort of stuff are most people doing with OCaml? simulation? web? finance? ad serving?
smimram has quit [Read error: 104 (Connection reset by peer)]
<flux> at our place it is used for a serving security cameras. personally, I've used it for a game, for an IRC-bot, for a web-service, and for whatever hacking needs come my way :)
smimou has joined #ocaml
rjack has joined #ocaml
Camarade_Tux has joined #ocaml
mpwd has quit []
_zack has joined #ocaml
angerman has quit []
rhar has quit ["This computer has gone to sleep"]
erikc has quit [Client Quit]
<kaustuv> I use it to write theorem provers
barismetin has joined #ocaml
rhar has joined #ocaml
Yoric[DT] has joined #ocaml
Camarade_Tux_ has joined #ocaml
root__ has joined #ocaml
Camarade_Tux has quit [Nick collision from services.]
root__ is now known as Camarade_Tux
Camarade_Tux_ has quit [Read error: 110 (Connection timed out)]
mpwd has joined #ocaml
rhar has quit ["Leaving"]
<gildor> travisbrady_: last "serious" use of OCaml was to create a very fast sort program
komar_ has joined #ocaml
komar_ has quit [Remote closed the connection]
monadic_kid has joined #ocaml
mpwd_ has joined #ocaml
mpwd__ has joined #ocaml
mpwd_ has quit [Read error: 104 (Connection reset by peer)]
mpwd has quit [Read error: 110 (Connection timed out)]
authentic has quit [Read error: 110 (Connection timed out)]
jeanbon has joined #ocaml
LeCamarade has joined #ocaml
komar_ has joined #ocaml
<kaustuv> Are there any bindings for GMP besides mlgmp and Numerix?
jojopal has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
barismetin has quit [Remote closed the connection]
ulfdoz has joined #ocaml
verte has joined #ocaml
komamitsu has quit []
seafood has joined #ocaml
Alpounet has joined #ocaml
jonasb has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
randart has quit [Remote closed the connection]
komar_ has quit [Remote closed the connection]
komar_ has joined #ocaml
ofaurax has joined #ocaml
jeanbon has quit ["13333333337 T1M3 §§§"]
_andre has joined #ocaml
barismetin has joined #ocaml
Alpounet has quit ["Ex-Chat"]
jamii__ has joined #ocaml
komar_ has quit [Remote closed the connection]
komar_ has joined #ocaml
rjack has quit ["leaving"]
_zack has quit [Read error: 104 (Connection reset by peer)]
komar__ has joined #ocaml
_zack has joined #ocaml
seafood_ has joined #ocaml
komar_ has quit [Read error: 113 (No route to host)]
seafood has quit [Read error: 110 (Connection timed out)]
schme has joined #ocaml
Lomono has joined #ocaml
jojopal has left #ocaml []
komar_ has joined #ocaml
ofaurax has quit ["Leaving"]
julm has quit [Read error: 60 (Operation timed out)]
ikaros_ has joined #ocaml
komar__ has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
Camarade_Tux_ has joined #ocaml
bzzbzz has joined #ocaml
thelema_ has quit ["restart X"]
thelema has joined #ocaml
root__ has joined #ocaml
mpwd has joined #ocaml
LeCamarade is now known as LeCamarade|PO
mpwd__ has quit [Read error: 104 (Connection reset by peer)]
mpwd_ has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
mpwd has quit [Read error: 60 (Operation timed out)]
Camarade_Tux_ has quit [Read error: 110 (Connection timed out)]
_zack has quit ["Leaving."]
mpwd_ has quit [Read error: 110 (Connection timed out)]
bombshelter13_ has joined #ocaml
Snark has quit ["Ex-Chat"]
OChameau has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
oriba has joined #ocaml
mpwd has joined #ocaml
LeCamarade|PO is now known as LeCamarade
komar__ has joined #ocaml
alexyk has joined #ocaml
komar_ has quit [Read error: 110 (Connection timed out)]
ched__ is now known as Ched
Spiwack has joined #ocaml
alexyk has quit []
jonasb has quit [Read error: 113 (No route to host)]
seafood_ has quit []
julm has quit [Read error: 110 (Connection timed out)]
jm has joined #ocaml
rumbleca_ has joined #ocaml
rumbleca has quit [Remote closed the connection]
oriba has quit ["Verlassend"]
kaustuv has left #ocaml []
_zack has joined #ocaml
jeanbon has joined #ocaml
jm is now known as julm
Anna` has joined #ocaml
Spiwack has quit [Read error: 104 (Connection reset by peer)]
Anna` is now known as Spiwack
weihe has joined #ocaml
komar_ has joined #ocaml
weihe has left #ocaml []
itewsh has joined #ocaml
komar__ has quit [Connection timed out]
Yoric[DT] has quit ["Ex-Chat"]
authentic has joined #ocaml
ched_ has joined #ocaml
barismetin has quit [Remote closed the connection]
itewsh has quit [Success]
ched_ has quit [Remote closed the connection]
itewsh has joined #ocaml
jeff_s_ has joined #ocaml
monadic_kid has quit ["Leaving"]
Spiwack has quit ["Leaving"]
Ched has quit [Read error: 110 (Connection timed out)]
<_andre> anyone using json-wheel?
sanooj has left #ocaml []
<_andre> is it possible to extend it to support different ocaml types such as big int?
_zack has quit ["Leaving."]
root__ is now known as Camarade_Tux
alexyk has joined #ocaml
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
vpalle has joined #ocaml
OChameau has quit ["Leaving"]
Snark has joined #ocaml
<mfp> _andre: do you mean json-static? IIRC it could handle arbitrary types, you just needed to define xxx_from_json and json_from_xxx functions
<mfp> as for json-wheel, any type is "supported" in the sense that you can write your own conversion functions since the json_type type is not opaque
<mfp> so you can pick any encoding using Object of (string * json_type) list | Array of json_type list | String of string | etc.
<_andre> i'm not using json-wheel yet, i got this error: "Fatal error: exception Json_type.Json_error("1913969159 is too large for OCaml's type int, sorry")"
<mfp> hmm according to the docs "ints that are too large to be represented with the OCaml int type cause an error. The limit depends whether it is a 32-bit or 64-bit platform (see min_int and max_int)."
<_andre> yeah, just saw that
<_andre> :/
<mfp> yet I can see some support for big_ints in the lexer (to read as String "123..." instead of Int 123)
<mfp> alright let json_of_string ?(allow_comments = false) ?(big_int_mode = false) s =
<_andre> oh!
<_andre> thank you, i missed that
willb2 has quit [Read error: 60 (Operation timed out)]
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
schme has quit [Read error: 60 (Operation timed out)]
Amorphous has quit [Read error: 104 (Connection reset by peer)]
schme has joined #ocaml
Amorphous has joined #ocaml
<flux> is there documentation for the macro camlp4-module that comes with ocaml?
<flux> hmph, but I don't think the module is going to help me with constructing PGOcaml query fragments
<flux> ..but it, or something similar, could, with a little help!
<flux> all it needs is the ## -operator from C :-)
<flux> in general, do such extensions work? manipulate AST a bit, then another modules does something more?
<flux> (and about my original question: Camlp4MacroParser.ml contains it inline)
<mfp> most perform ad-hoc AST transformations, generating code that relies on some runtime support provided by another module, yes
<mfp> many do without the runtime part component, too
<flux> actually, I think the ## -operator idea verbatim could work..
Lomono has quit ["Don't even think about saying Candlejack or else you wi"]
<mfp> flux: it's documented in... camlp4/Camlp4Parsers/Camlp4MacroParser.ml
<flux> mfp, the text inside parenthesis can also be read out aloud ;-)
<mfp> oops
<flux> ..
<mfp> was already going to write that before I read that line
<flux> me here was already hoping you had patched the ##-operator in :-)
<Camarade_Tux> YEAH ! I made a lossless image compression which completely crushes png ! \o/ I know, there must be an error somewhere ;p
<flux> camarade_tux, what is it based on?
<Camarade_Tux> flux, using the coordinate on the hilbert curve ( http://en.wikipedia.org/wiki/Hilbert_curve ) which should group adjacent pixels in memory
<Camarade_Tux> but I coded that quite quickly, I'm even using 31-bit ints :P
schme has quit [Read error: 113 (No route to host)]
<flux> camarade_tux, what do you do with the resulting data? gzip it?
<Camarade_Tux> flux, quite : I xz it (lzma compression : http://tukaani.org/xz/ )
<flux> camarade_tux, what kind of results are you getting?
r0bby_ has joined #ocaml
<Camarade_Tux> 40% of the png (the image is http://omploader.org/vMXFhbA )
r0bby has quit [Client Quit]
<Camarade_Tux> but I didn't expect to come with something correct today, I mostly wanted to know if I were going to spend more time on that during the week :)
r0bby_ has quit [Client Quit]
vpalle has quit [Read error: 110 (Connection timed out)]
<mfp> Camarade_Tux: how does LZMA2 compare to gzip? I assume it's faster or something?
r0bby has joined #ocaml
vpalle has joined #ocaml
<Camarade_Tux> mfp, lzma**2** ?
<mfp> the xz format spec refers to it as an extension of LZMA
<Camarade_Tux> ok, I guess what it is : lzma2 should just be a better file format than lzma, with the same compression (lzma didn't even have a CRC iirc)
<Camarade_Tux> I wrote that before seeing the doc : I'm gonna check it more thoroughly
<mfp> oh, LZMA is what 7-zip uses... so it's at the opposite end of what I thought; better compression, but slower
Associat0r has joined #ocaml
<mfp> "LZMA2 provides the following advantages over LZMA: better compression ratio for incompressible data, by storing blocks of such data in uncompressed form, faster decompression, better multithreading support, by splitting big file to smaller chunks and compressing these chunks in multiple threads."
<Camarade_Tux> it seems xz and lzma2 are basically the same format, although I'm not sure
LeCamarade is now known as LeCamarade|Away
<Camarade_Tux> lzma2 is what is currently the primary algorithm for xz-utils
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
itewsh has quit [SendQ exceeded]
itewsh has joined #ocaml
<Camarade_Tux> bbl :)
Camarade_Tux has quit ["Leaving"]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Client Quit]
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
jonasb has joined #ocaml
Ppjet6_ has joined #ocaml
Ppjet6 has quit [Read error: 113 (No route to host)]
Ched has joined #ocaml
Associat0r has quit []
Lomono has joined #ocaml
alexyk has quit []
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
Ched has quit ["Ex-Chat"]
Ched has joined #ocaml
Snark has quit ["Ex-Chat"]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
alexyk has joined #ocaml
yziquel_ has joined #ocaml
monadic_kid has joined #ocaml
<mrvn> What is a good way to create a bitfield?
yziquel has joined #ocaml
yziquel_ has left #ocaml []
<julm> mrvn: perhaps to use a [string] type if size matters
<mrvn> size matters
itewsh has quit [Connection timed out]
<mrvn> How do I access a bit in a string? converting char to int and the masking the bit seems ugly.
itewsh has joined #ocaml
<mrvn> Too bad BigArray doesn't have an type bool_elt
<hcarty> mrvn: How wide should your bitfield be? You could use an int8_unsigned Bigarray, avoiding any char <-> int casts. Strings may still be faster though.
<mrvn> hcarty: ~320000 bits
<hcarty> mrvn: Is writing some C acceptable? And is that one huge bitfield, or several in one structure?
<mrvn> Bigarray access calls a C stub while strings get inlined by the compiler, or why is string faster?
<mrvn> one huge one
<hcarty> mrvn: A string would likely be faster, unless you drop to C. And in that case I don't know which would be faster.
<_andre> anyone using Http_client.Convenience with basic auth?
jeanb-- has joined #ocaml
jeanbon has quit [Nick collision from services.]
jeanb-- is now known as jeanbon
<julm> <mrvn> How do I access a bit in a string? converting char to int and the masking the bit seems ugly. <- This : http://pastebin.com/dc224c47 could be a starting point
<mrvn> julm: I'm already that far too
_andre has quit ["*stalks*"]
alexyk has quit []
r0bby has quit [Connection reset by peer]
jonasb has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
r0bby has joined #ocaml
Ched has quit [Remote closed the connection]
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
jeanbon has quit [Read error: 110 (Connection timed out)]
komar_ has quit [Read error: 60 (Operation timed out)]
komar_ has joined #ocaml
bombshelter13_ has quit []
itewsh has quit [Remote closed the connection]
itewsh has joined #ocaml
iZZy_ has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
rumbleca_ has quit [Read error: 104 (Connection reset by peer)]
vpalle has quit [Read error: 60 (Operation timed out)]
Camarade_Tux has joined #ocaml
rumbleca has joined #ocaml
m3ga has joined #ocaml
itewsh has quit [Remote closed the connection]
itewsh has joined #ocaml
ikaros_ has quit [Read error: 113 (No route to host)]
<Camarade_Tux> flux, for my image compression, I was actually only using one of three color channels and now I don't beat png anymore, but I'm still writing a full 64bit byte for each color value so there is room for improvement ;p
monadic_kid has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux> corrected that and now, I'm using "only" 15% more space than png (but I use lzma compression instead of gzip, if I use gzip, it's 30% more space)
itewsh has quit [Remote closed the connection]
yziquel has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> 'night
Yoric[DT] has quit ["Ex-Chat"]
seafood has joined #ocaml
ikaros_ has joined #ocaml
iZZy_ has quit [Read error: 110 (Connection timed out)]
ikaros_ is now known as ikaros
jamii has joined #ocaml
jamii__ has quit [Read error: 60 (Operation timed out)]
seafood_ has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
alexyk has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]