ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
ghostpl_ has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
ollehar has joined #ocaml
sean_1 has joined #ocaml
sean_1 has left #ocaml ["Konversation terminated!"]
x1n4u has joined #ocaml
xinau has quit [Ping timeout: 252 seconds]
travisbrady has quit [Quit: travisbrady]
waneck has joined #ocaml
badon has quit [Quit: Leaving]
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
yminsky has joined #ocaml
nullcat has joined #ocaml
n3ss3s has joined #ocaml
badon has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
AltGr has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
myst has quit [Ping timeout: 272 seconds]
MrScout has quit [Ping timeout: 244 seconds]
NaCl has quit [Quit: something isn't working properly here]
NaCl has joined #ocaml
NaCl has joined #ocaml
travisbrady has joined #ocaml
NaCl has left #ocaml [#ocaml]
travisbrady has quit [Quit: travisbrady]
darkf has joined #ocaml
travisbrady has joined #ocaml
travisbrady has quit [Quit: travisbrady]
<tobiasBora> Hello !
ygrek has joined #ocaml
<tobiasBora> I am trying to compile an old code and in it the project doesn't use the usual pervasive module but it had in it some changes
<tobiasBora> Somewhere there is : type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
<tobiasBora> However I have the error :
<tobiasBora> /home/leo/.opam/4.02.0/bin/ocamlc.opt -w Ae -warn-error A -nopervasives -c pervasives.mli
<tobiasBora> File "pervasives.mli", line 335, characters 32-64:
<tobiasBora> Error: Unbound type constructor format6
reem has quit [Remote host closed the connection]
yminsky has quit [Quit: yminsky]
reem has joined #ocaml
<tobiasBora> Do you know how I could solve this error ?
Denommus` has joined #ocaml
yminsky has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<bernardofpc> wasn't format6 removed after the GADT-ification ?
<bernardofpc> (ans= no)
ghostpl_ has quit [Remote host closed the connection]
ptc has joined #ocaml
ptc is now known as Guest56461
claudiuc has quit [Remote host closed the connection]
Guest56461 has quit [Ping timeout: 246 seconds]
ollehar has quit [Quit: ollehar]
Nijikokun has quit [Read error: Connection reset by peer]
ptc_ has joined #ocaml
Denommus` has quit [Ping timeout: 264 seconds]
xiaolin has joined #ocaml
Muzer has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
Denommus` has joined #ocaml
myyst has joined #ocaml
Muzer has joined #ocaml
travisbrady has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
Denommus` has quit [Read error: Connection reset by peer]
Denommus` has joined #ocaml
travisbrady has quit [Quit: travisbrady]
waneck has quit [Ping timeout: 245 seconds]
reem has quit [Remote host closed the connection]
ptc_ has quit [Ping timeout: 245 seconds]
reem has joined #ocaml
waneck has joined #ocaml
yminsky has quit [Quit: yminsky]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghostpl_ has joined #ocaml
reem has quit [Remote host closed the connection]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
jao has quit [Remote host closed the connection]
<Denommus`> how do I install a template on eliom-distillery?
<Denommus`> the tutorial asks for eba.pgocaml, but it doesn't come built-in
Haudegen has joined #ocaml
waneck has quit [Ping timeout: 272 seconds]
ghostpl_ has quit [Ping timeout: 252 seconds]
waneck has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
nullcat has joined #ocaml
rgrinberg has joined #ocaml
waneck has quit [Ping timeout: 264 seconds]
waneck has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
Denommus` has quit [Read error: Connection reset by peer]
reem has quit [Remote host closed the connection]
moei has joined #ocaml
reem has joined #ocaml
Bhavya has joined #ocaml
<n3ss3s> Anyone care to point me to the place in OCaml source where things like List.map are actually implemented? The prototypes seem to be in ocaml/stdlib/list.mli
<n3ss3s> ugh my bad, nvm
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
ghostpl_ has joined #ocaml
ggole has joined #ocaml
ghostpl_ has quit [Ping timeout: 264 seconds]
<n3ss3s> How do I pattern match on a function?
<ggole> You can't really do anything which functions other than call them
<ggole> *with
<n3ss3s> Scala lets you match on a function type, fairly sure OCaml does too
<ggole> I'm not sure how that would work
reem has quit [Remote host closed the connection]
x1n4u has quit [Ping timeout: 264 seconds]
marynate has joined #ocaml
MrScout_ has joined #ocaml
MrScout_ has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 246 seconds]
reem has joined #ocaml
n3ss3s has quit [Ping timeout: 245 seconds]
psy_ has quit [Read error: Connection reset by peer]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
marynate has quit [Quit: Leaving]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
reem has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 255 seconds]
reem has joined #ocaml
rgrinberg has joined #ocaml
MercurialAlchemi has joined #ocaml
bjorkintosh has quit [Ping timeout: 252 seconds]
bjorkintosh has joined #ocaml
reem has quit [Remote host closed the connection]
bjorkintosh has quit [Max SendQ exceeded]
bjorkintosh has joined #ocaml
jave has joined #ocaml
bjorkintosh has quit [Max SendQ exceeded]
bjorkintosh has joined #ocaml
antkong has quit [Quit: antkong]
ghostpl_ has joined #ocaml
xificurC has joined #ocaml
ghostpl_ has quit [Ping timeout: 264 seconds]
reem has joined #ocaml
jave has quit [Ping timeout: 272 seconds]
Simn has joined #ocaml
reem has quit [Remote host closed the connection]
bjorkintosh has quit [Read error: Connection timed out]
bjorkintosh has joined #ocaml
reem has joined #ocaml
jave has joined #ocaml
ygrek has joined #ocaml
arj has joined #ocaml
Antoine59 has quit [Ping timeout: 252 seconds]
Antoine59 has joined #ocaml
reem has quit [Remote host closed the connection]
bjorkintosh has quit [Read error: Connection timed out]
bjorkintosh has joined #ocaml
<whitequark> gasche: ping
jave has quit [Ping timeout: 246 seconds]
jave has joined #ocaml
reem has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jave has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
zpe has joined #ocaml
marynate has joined #ocaml
axiles has quit [Quit: Quitte]
cross has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 256 seconds]
kakadu has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
jave has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
matason has joined #ocaml
reem has quit [Remote host closed the connection]
axiles has joined #ocaml
Fullma has joined #ocaml
larhat has joined #ocaml
jave has quit [Ping timeout: 244 seconds]
mort___ has joined #ocaml
octachron has joined #ocaml
<Leonidas> adrien: you seem to be somehow involved with mingw-w64, can I ask you some questions? I am trying to build llvm on it.
ericwa has quit [Quit: Leaving...]
<whitequark> why would you do that? use MSVC
Submarine has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<Leonidas> whitequark: using cmake?
<Leonidas> that detects my python as 1.4.0 and fails.
<companion_cube> o/
<Leonidas> my experience with cmake has been universally awful
<adrien_znc> Leonidas: unfortunately LLVM people have decide to go the non-free route on Windows
<adrien_znc> cmake is simple
<adrien_znc> for every configuration option
<whitequark> yes, cmake. have you seen http://llvm.org/docs/GettingStartedVS.html ?
<adrien_znc> you need to pass the proper value yourself on command-line
avsm has joined #ocaml
<adrien_znc> whitequark: so, from your point of view too there won't be a non-msvc llvm on windows?
<whitequark> adrien_znc: it will self-host eventually
<Leonidas> adrien_znc: well, I get quite far with cygwin/wodi64 but each toolchain fails. one fails with an error missing machine/endian.h, the other with ::scanf, which only occurs on freebsd.
<Leonidas> (and cygwin apparently)
rgrinberg has quit [Ping timeout: 240 seconds]
<whitequark> actually I think it already self-hosts, but does not interoperate with MSVC quite well enough. mangling issues and such
<whitequark> generally, the aim of LLVM is to be ABI-compatible with MSVC
<adrien_znc> whitequark: using which headers?
<whitequark> LLVM/clang rather
<adrien_znc> GCC's too but it's easier said than done
<whitequark> dunno, I don't care about headers
<adrien_znc> non-free
<adrien_znc> and that means no cross-compilation using llvm
<adrien_znc> anyway
<adrien_znc> I think I can bury the prospect of an full-featured and actually free llvm on windows a bit deeper
<Leonidas> whitequark: will the llvm compiled with msvc work with wodi64-shipped ocaml?
<whitequark> Leonidas: unlikely
<adrien_znc> why not?
<whitequark> hrm
<Leonidas> windows is such a world of pain :-(
<whitequark> adrien_znc: different ABIs, no?
<adrien_znc> it's C ABI
<adrien_znc> that's the less-complicated part
<adrien_znc> vtable, exceptions, SEH: these are annoying
<Leonidas> I need VS 2013 for LLVM?
<adrien_znc> calling conventions, not that much
<whitequark> VS2013, yes
<whitequark> LLVM doesn't use exceptions or SEH
<whitequark> or RTTI
<adrien_znc> I give no guarantee that it'll work btw, I'm just saying that for ocaml it should be fairly safe
<adrien_znc> (and I don't intend to spend time on llvm and even less on something related to msvc)
<whitequark> adrien_znc: hmmm, have you seen https://github.com/tpoechtrager/wclang
<whitequark> it can use mingw headers apparently
<Leonidas> hmm, I got 8, 9, 10, 11 but not 12.
<Leonidas> lets see if I can find that too, somewhere
<adrien_znc> whitequark: yup but look at the date of the last commit
<whitequark> 10 days ago?
<adrien_znc> ah, sorry, had skipped that line :D
<adrien_znc> (did I already mention I find github's interface definitely not convenient?)
<companion_cube> what do you find better actually?
<companion_cube> (don't say the forge :))
<adrien_znc> cgit
<adrien_znc> ok it's cute but information is buried under layout
<companion_cube> most information is pretty quick to reach imho
<adrien_znc> whitequark: I've seen too many people get troubles building clang with mingw-w64 to be eager to do it but typically I don't patch the same way as these people when something goes wrong
<adrien_znc> (iow we have vastly different approaches and implementations)
yomimono has joined #ocaml
<adrien_znc> (iow I find they do bad things)
slash^ has joined #ocaml
<Leonidas> whitequark: 3.6.0 can work with vS2012 according to the gettingstartedvs page.
<whitequark> sure
Haudegen has quit [Ping timeout: 250 seconds]
<Leonidas> CMake Error at CMakeLists.txt:411 (message)
<Leonidas> Unexpected failute executing llvm-build
<whitequark> and?
<Leonidas> and nothing else. just Configuration incomplete, errors occured and paths to logfiles
<whitequark> ok
freling has joined #ocaml
<Leonidas> and the logfiles end with something about missing /Wno-variadic-macros but I am not sure this is related to llvm-build failure
<Leonidas> or rather "invalid numeric argument"
<whitequark> you will have to post the entire error somewhere if you expect to get help
<Leonidas> ok. i have to type everything from pc into smartphone, give me a second :-)
Haudegen has joined #ocaml
<whitequark> no, just paste it as a gist or something
Bhavya has quit [Quit: Quit the channel]
<Leonidas> yep, but i have irc on my phone
<Leonidas> *anonymous
<whitequark> means you don't have a working python
<whitequark> i guess? llvm-build is written in python
<Leonidas> let's reinstall python 2.7, just a second
<Leonidas> i have 2.6 and 2.7 but just in case
<whitequark> yes, that's the case... PYTHON_EXECUTABLE says what it's trying to execute
wagle_ has joined #ocaml
wagle has quit [Ping timeout: 264 seconds]
govg has quit [Quit: leaving]
bjorkintosh has quit [Quit: Leaving]
mort___ has quit [Quit: Leaving.]
<Leonidas> it finds my python (2.7.9), but then it just fails
Leonidas_ has joined #ocaml
mort___ has joined #ocaml
<whitequark> try to execute llvm-build manually
johnelse is now known as johnel_away
johnel_away is now known as johnelse
<Leonidas_> whitequark: it displays nothing, but if I run it C:\Python27\python llvm-build --help then it just displays the help message, as expected
<whitequark> that's very odd
braibant has left #ocaml ["Good Bye"]
braibant has joined #ocaml
paradoja has joined #ocaml
apache2 has joined #ocaml
fedjo_fighter has quit [Ping timeout: 246 seconds]
<Leonidas_> I could try running it manually, but I have no idea what options to pass to it
<Leonidas_> cmake does not show the command that is failing, unfortunately
<whitequark> cmake has an option that does that
<adrien_znc> and always run cmake with -LAH
dsheets has quit [Ping timeout: 264 seconds]
<Leonidas_> My LLVM is in C:/wodi64/home/mka4/llvm-3.6.0.src so it shouldn't be an issue with spaces
<Leonidas_> adrien_znc: how do I specify -LAH in the GUI?
<adrien_znc> no
<adrien_znc> idea
rgrinberg has joined #ocaml
<adrien_znc> good
<adrien_znc> luck
<adrien_znc> :)
<adrien_znc> you have all my sympathy :D
* Leonidas_ wishes back his autotools
<adrien_znc> :D
<whitequark> autotools are horrible
<whitequark> cmake is also horrible, but it makes maintaining large projects slightly less painful
<Leonidas_> sure, but they work. unlike cmake :p
<whitequark> cmake works on linux and osx *shrug*
<Leonidas_> I could try installing a newer cmake, my machine came with 3.0
<whitequark> 3.0 should be fine
<whitequark> ask on #llvm maybe
<Leonidas_> but last time I installed cmake on cygwin, it forgot how to generate for Visual Studio, so I reverted back to the native version
<Leonidas_> ok, thanks
<Leonidas_> whitequark: #llvm on freenode or oftc?
<whitequark> oftc
rgrinberg has quit [Ping timeout: 264 seconds]
avsm has quit [Quit: Leaving.]
ghostpl_ has joined #ocaml
bjorkintosh has joined #ocaml
larhat1 has joined #ocaml
paradoja has quit [Ping timeout: 245 seconds]
larhat has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
axiles has quit [Ping timeout: 255 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
braibant has quit [Ping timeout: 245 seconds]
_andre has joined #ocaml
def` has quit [Remote host closed the connection]
freling has quit [Quit: Leaving.]
def` has joined #ocaml
<Drup> (06:27:33) n3ss3s: Scala lets you match on a function type, fairly sure OCaml does too <--- what does that mean ?
<MasseR> Drup: Scala allows you to do case matches so that it can take different types
<MasseR> x :: String -> dostuff
<MasseR> x :: Int -> dootherstuff
<MasseR> (not real syntax above)
<Drup> ah yes, good old Java Typeof
<Drup> right, nothing specific to functions
<MasseR> Drup: what's sad is that, that actually makes typeof almost usable :)
<rks`> why is that sad
<MasseR> rks`: other than the fact that you can still have almost untyped situation with that?
<MasseR> (disclaimer: I've done barely anything with scala)
axiles has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
yminsky has joined #ocaml
axiles has quit [Ping timeout: 264 seconds]
mridul_seth has joined #ocaml
TheLemonMan has joined #ocaml
`eeks has joined #ocaml
<Leonidas_> whitequark: I've set the three variables for OCaml in CMake up but it says OCaml bindings disabled.
<Leonidas_> is there an option to flip to enable them?
yminsky has quit [Quit: yminsky]
freling has joined #ocaml
<Leonidas_> oh, it is disabled on Win32 deliberately? oh well, I'll uncomment and hope for the best
slash^ has quit [Read error: Connection reset by peer]
oscar_toro has joined #ocaml
paradoja has joined #ocaml
mridul_seth has quit [Remote host closed the connection]
MetalWolf has joined #ocaml
braibant has joined #ocaml
rgrinberg has joined #ocaml
govg has joined #ocaml
BitPuffin has quit [Ping timeout: 250 seconds]
govg has quit [Client Quit]
rgrinberg has quit [Ping timeout: 265 seconds]
braibant has quit [Quit: braibant]
govg has joined #ocaml
mengu has joined #ocaml
badkins has joined #ocaml
sdothum has joined #ocaml
antkong has joined #ocaml
ollehar has joined #ocaml
<Leonidas_> whitequark: when I try to build via MSVC I get this: https://gist.github.com/anonymous/4ef749dfb3a6b05123f3
<Leonidas_> it is failing due to some strange error
antkong has quit [Ping timeout: 240 seconds]
paradoja has quit [Ping timeout: 252 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
<ollehar> An exception cannot contain another exception in its constructor?
ddub has quit [Ping timeout: 256 seconds]
<ggole> ollehar: it can, but there can be printing problems
<ollehar> ok
ddub has joined #ocaml
<ollehar> `exception My_exc of exception`?
<ggole> exn
<ggole> Can I ask why you want to do this?
<ollehar> Not sure I want to
<ollehar> :P
<ggole> Heh
matason has quit [Quit: Leaving...]
<ollehar> Want to throw an exception about what exception happened lower down.
<ggole> Without letting the other one bubble up?
<ggole> I guess that's how you'd do that
<ollehar> Yes
<ollehar> But I see not the wrapped exception won't be printed, so.
axiles has joined #ocaml
<ollehar> see *now
<MercurialAlchemi> you could just wrap it in a Result-like type
<MercurialAlchemi> of course it eats part of the stack trace this way
<ollehar> Yeah, but I'm cowboy programming :)
<ggole> It should print if you export the wrapping exception
<ggole> module M : sig exception Foo of int * exn val f : unit -> unit end = struct exception Foo of int * exn let f () = raise (Foo (1, Not_found)) end
Haudegen has joined #ocaml
<MercurialAlchemi> if you're writing throwaway code anyway you can just rethrow
<ggole> Try that, running M.f () with and without the exported exception
<ollehar> Ugh
magthe has joined #ocaml
<ggole> Yeah, printing is pretty sketchy
<ollehar> Well, thanks for your help.
<ggole> nw
matason has joined #ocaml
<magthe> trying to put a `let d = ref String.Map.empty` in a module gives me a type error: contains type variables that cannot be generalized
<magthe> I'm guessing I can specify the type somehow to make it pass, but how?
<ggole> I'd imagine let d : foo String.Map.t ref = String.Map.empty
<ggole> (Where foo is the element type you want.)
<magthe> ggole: indeed, thanks
sol__ has joined #ocaml
sol__ has left #ocaml [#ocaml]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 272 seconds]
travisbrady has joined #ocaml
Denommus` has joined #ocaml
<xificurC> haven't found a lib for game dev, is there anything in this field in OCaml? I only found some opengl, sdl etc wrappers. Was looking for a simple lib/framework for creating 2d games
<Denommus`> xificurC: I guess there's only sdl wrappers
<Denommus`> xificurC: but you can probably use React on top of it with relative ease
<adrien_znc> generally speaking, ocamlers don't enjoy large frameworks that much
<xificurC> a micro framework is fine as well :)
octachron has quit [Ping timeout: 265 seconds]
<Denommus`> Though React uses discrete time, which probably isn't as good as continuous time for games
<adrien_znc> worth looking at lwt too
<MercurialAlchemi> xificurC: have a look at this: http://cranialburnout.blogspot.dk/
<xificurC> i wanted to have something simple ready for me to try out the language, this doesn't seem like a good option
<MercurialAlchemi> you don't have a legion of games implemented in ocaml, that's for sure
<MercurialAlchemi> that said, you can get going pretty quickly with lambda-term if all you want is ascii graphics
shinnya has joined #ocaml
mridul_seth has joined #ocaml
AltGr has left #ocaml [#ocaml]
<adrien_znc> xificurC: there are many things in ocaml but nothing very simple to build games very quickly
<mridul_seth> So, I am thinking of starting functional programming (haskell or ocaml). What are some good online resources to start with ? :)
arj has quit [Quit: Leaving.]
arj has joined #ocaml
<xificurC> MercurialAlchemi: so what topic/type of program is there that ocamlers built legions of
<MercurialAlchemi> fibonacci functions
<MercurialAlchemi> and factorials
<adrien_znc> hahah
<adrien_znc> actually lots of networking stuff
<MercurialAlchemi> it's used in the financial sector
<adrien_znc> the issue with games is not the language but mostly that large frameworks are C++ and annoying to use from non-C++ languages that are compiled
octachron has joined #ocaml
<MercurialAlchemi> and then in academia
<Leonidas> Verification
<Leonidas> (Frama-C, CompCert, Alt-Ergo)
<magthe> I'm playing around with Cohttp (lwt) and for the current little experiment I'd like to have a bit of state to look at each time my callback is called... is there an idiomatic way of doing that?
<MercurialAlchemi> mridul_seth: try ocaml.org, otherwise real world ocaml is good
<Drup> Not sure to see what you want to do
<xificurC> so what about e.g. command-line applications, gui apps, android crap etc
<mridul_seth> thanks MercurialAlchemi :)
<MercurialAlchemi> magthe: like updating a counter?
<magthe> MercurialAlchemi: yeah, that's a good place to start, then I can grow it later
<MercurialAlchemi> xificurC: CLIs are covered, there are GTK bindings, and I'm not sure about android
<Drup> whitequark did a good amount of things for android
<Drup> so that should be covered too
<MercurialAlchemi> whitequark *is* an android
<Drup> that too.
<xificurC> as far as i can tell this looks like a general purpose language so I expected to see all sorts of programs built with it
axiles has quit [Ping timeout: 245 seconds]
<MercurialAlchemi> it's absolutely a general purpose language
<Drup> xificurC: in theory, yes. In practice, you have to consider who build the language and which crowd it attracted ;)
<MercurialAlchemi> and there are many different kinds of programs
Denommus` has quit [Read error: Connection reset by peer]
<Drup> I mean, python is not special purpose for scientific computing, and yet it's very well known for fabulous libraries in this domain ;)
<MercurialAlchemi> on the other hand, small community, and I'm sure most of the crowd here have Phds or are trying to get one
<ggole> If I had to pick a type of program that OCaml leaned furthest towards, it would be languages/compilers.
<Leonidas> and it has not many games written in it, mustn't be a general purpose language, then.
Denommus` has joined #ocaml
rgrinberg has joined #ocaml
<xificurC> I see
yomimono has quit [Ping timeout: 265 seconds]
<xificurC> too bad, the language looks very attractive on the first glance so far
<companion_cube> I think it was ironic
<MercurialAlchemi> I think it was sarcastic
<Drup> xificurC: are you only interested in gamedev ?
rgrinberg has quit [Ping timeout: 252 seconds]
mort___1 has joined #ocaml
<Leonidas> MercurialAlchemi, companion_cube: I think you are right.
<xificurC> companion_cube: what do you mean, what Leonidas said? I understood that :) What I wrote was a general answer to the comments, not to his post
<Leonidas> xificurC: why is the absence of games an issue to deem the language not attractive?
<xificurC> Drup: no, I hopped a lot of languages by now. I can't settle anywhere, so it sems
<xificurC> seems too
<companion_cube> xificurC: did you take a look at rust?
mort___ has quit [Ping timeout: 256 seconds]
<Leonidas> haxe is implemented in ocaml, games are implemented in haxe, therefore games are written in ocaml, by transitivity
<companion_cube> :D
<xificurC> companion_cube: yes but ocaml looks great :)
<rom1504> the more games made in a language the better the language is obviously :p
<Leonidas> rust is also written in ocaml
<companion_cube> it used to
<rom1504> I think there are many games written in BASIC
<Leonidas> companion_cube: actually, it kinda still is, since it is bootstrapped from earlier rust compilers which were bootstrapped from the earlier rust compiler written in ocaml :)
<xificurC> Leonidas: it wasnt about games per se. It was a comment on the fact that the language is general purpose but the users use it only in some specific field, extensively at least
<Drup> Leonidas: not since a long time.
<Drup> xificurC: it's the same in most languages really
<xificurC> which means some territories might not be as polished as a newb like me would need them to be
<Drup> of course they would not
<Drup> xificurC: but really, that's the same in most language
BitPuffin has joined #ocaml
<Drup> try to do symbolic computation in C
<Leonidas> xificurC: yes, OCaml is common in compilers, but that doesn't preclude other uses.
<xificurC> Drup: I'm looking for the one ring to rule them all :p
<Drup> not gonna happen
axiles has joined #ocaml
<Leonidas> Ruby wasn't used at all, then Rails happened and Ruby is now used on the web everywhere, for better or worse
<Drup> (mostly worse, really)
<MetalWolf> Hi, I am having issues installing gsl in opam on a scientific linux 6 based server. It complains about camlp4 not being installed but it is. I have put the output here: http://pastebin.com/EZaxJFse can anyone please tell me what I'm missing? Opam was installed from the centos 6 repository
<Leonidas> Drup: Depends on what it replaced. Horrible PHP4 messes. Better. Inhibited the raise of solutions like Elm or Opa? Maybe.
<companion_cube> Leonidas: well in this case it's written in lisp
<Leonidas> companion_cube: how so? :-)
<companion_cube> first versions of Caml were interpreted in lisp, afaik
ptc has joined #ocaml
<Leonidas> does the ocaml compiler bootstrap from lisp?
<Leonidas> ah. neat.
ptc is now known as Guest40760
<MercurialAlchemi> Leonidas: afaik, it bootstraps from the latest successfully built compiler
<Drup> xificurC: what kind of application do you usually do ?
freling has quit [Quit: Leaving.]
<xificurC> Drup: you don't want to know :)
freling has joined #ocaml
c74d has quit [Remote host closed the connection]
<xificurC> Drup: most of my working time goes into writing VBA in Excel
<Drup> xificurC: I do :p
<Leonidas> xificurC: so just like Jane Street used to? Interesting
mridul_seth has quit []
<xificurC> Leonidas: oh, so they will hire me? :p
<magthe> so, my naive attempt at adding some state to my Cohttp server was http://lpaste.net/124395, can I call `set_key` in my callback... but that doesn't seem to have the intended effect, I don't see why though
<magthe> clearly I'm going about this wrong, how should I do it?
<xificurC> Leonidas: nevermind, financial sector is really not my fav
<MercurialAlchemi> Leonidas: I wouldn't sleep at night
<Leonidas> xificurC: no, but they moved from Excel to OCaml, if memory serves me right. Maybe something you could emulate :)
c74d has joined #ocaml
<Drup> magthe: that seems fine, but we can't really tell without seeing the actual lwt code :)
<xificurC> Leonidas: highly unlikely, unfortunately
<Leonidas> :-(
<xificurC> Leonidas: I have a low-level job at IBM
<xificurC> the worst thing is once you see a statically and strongly typed language, you can't go back
<xificurC> should have taken the blue pill
<Leonidas> xificurC: well, IBM is big into Java, I heard? :p
<MercurialAlchemi> xificurC: you did, you work at Big Blue
<frawgie> drum roll, please! :P
* adrien_znc rolls drums
<xificurC> Leonidas: more sarcasm? :)
<whitequark> Leonidas: I don't expect the bindings to build on win32
<whitequark> I've never ever tested them
<magthe> Drup: I found the issue... the definition of `all_keys` needs to be a function... so just adding a () to it and it works
<Leonidas> xificurC: nah, just nitpicking, Java is statically and strongly typed :)
<xificurC> Leonidas: my description wasn't exhaustive enough, you're right :)
<xificurC> Leonidas: java has its own issues
<companion_cube> Leonidas: not totally, java also has some dynamic features
<Drup> magthe: oh, right !
<Drup> missed that :p
<Leonidas> whitequark: how much work would it be to get it working? They don't build, but from the current error it looks like its just something with paths.
<Leonidas> or I don't know, really.
<Leonidas> xificurC: no worries, that was tongue in cheek. Java is a terrible statically typed language and one of the reasons these languages get a bad rep.
<xificurC> I hope languages like ocaml, rust, nim will get more traction
<xificurC> types are friends
<MercurialAlchemi> I'll point out in the interest of fairness that it looks less terrible with Java 8, and that with a bit of C#-like sugar, it could mean considerably less typing
<companion_cube> stronger, terser typing
zpe has quit [Remote host closed the connection]
<MercurialAlchemi> (as in, less ceremony)
<ggole> OCaml has its warts in that regard
<xificurC> what I fail to understand is there's so many zero-cost abstractions that yield code with less errors (and often typing), so why didn't they catch up yet? I don't see any real downcost
<magthe> Drup: another issue was find_key... I needed to specify the second argument to `find` otherwise I apparently do `find` on the value of `!rwdata` at the time of definition, i.e. it'll never find anything
<magthe> Drup: I blame haskell!
<frawgie> xificurC: there are not that many big corporations trying to push other companies to buy expensive application servers etc, etc, no real commercial interests to sell it, only to adopt it
<frawgie> xificurC: that's my guess :)
<lpaste> magthe annotated “Stateful module” with “Stateful module (annotation)” at http://lpaste.net/124395#a124399
<MercurialAlchemi> lack of marketing is a big thing
<MercurialAlchemi> that and 20 years of "OOP is good for you"
<frawgie> yep
<whitequark> Leonidas: so what is the error?
<TheLemonMan> duh, is there something like haskell's 'show' ?
ollehar has quit [Ping timeout: 250 seconds]
<Leonidas> TheLemonMan: yes, ppx_deriving, show plugin
<Drup> xificurC: then anti-math mentality among programmer folks doesn't help
<whitequark> oh, that's not so bad
<Leonidas> I think it mainly burns down to "well, it's too different when comping from imperative languages"
<whitequark> though... hm
<whitequark> why did it not run the normal compiler before trying to build docs?
<xificurC> Leonidas: yeah, like, easier
<flux> spreadsheets are actually quite like functional languages (or data flow languages)
<Drup> a good amount of them are genuinely afraid of math and as soon as you introduce math-related vocabulary ("Algebraic data type", please) they flee
<Leonidas> whitequark: doesn't look so bad, yes.
<whitequark> oh, no, it's not ocamldoc
<Leonidas> Drup: ADT should be renamed to pink fluffy unicorn? ;)
<whitequark> it's ocamlc complaining, i think
<xificurC> flux: maybe the functional part. Once you mix in VBA you're in hell :)
<flux> yes :)
<whitequark> try doing whatever needs to be done so that it shows command invocations
slash^ has joined #ocaml
<xificurC> Drup: so that's it? We need new names? OK, no more ADT, it's a, hm, let's say box, that sounds simple enough
<whitequark> Drup: thank incompetent american educators for that
<xificurC> cover up the math :)
<Leonidas> whitequark: hmm, yes, I wonder what magical incantations are required for this.
<Drup> xificurC: well, if you look at recent "successful" functional programming languages with static typing
<Drup> that's exactly what they do
<whitequark> rust calls ADTs ADTs
<whitequark> it is still quite appealing to C++ people
<Drup> in swift, ADT are called Enum with "attached data" (or some bullshit like that)
<Drup> in Scala, it's objects all the way
<Leonidas> calling Enum is I think okayish
<Leonidas> that sounds like it might be useful to a layman, whereas ADT sound useful if you do algebra, maybe?
<TheLemonMan> hey, that ppx_deriving thing should definitely be in the core
<Leonidas> TheLemonMan: yep
<companion_cube> \o/
<companion_cube> Drup: sealed case class :>
<xificurC> rust is backed by mozilla, that is enough to get an audience
<Leonidas> companion_cube: sealed case class is a terrible name
<Leonidas> but I think Scala is really big into terribly named constructs
<Leonidas> companion objects e.g.
<xificurC> then let's go with bunnies and puppies and candies
dav has quit [Ping timeout: 252 seconds]
<TheLemonMan> don't forget about seals
<companion_cube> companion seal object
<xificurC> starting to sound abstract enough
<xificurC> like ArnoldC
<companion_cube> protected companion seal object
<companion_cube> ♥
dav has joined #ocaml
<xificurC> so most of you are from academia?
robink has quit [Quit: No Ping reply in 180 seconds.]
ollehar has joined #ocaml
<Leonidas_> whitequark: Then I increas the detail level I get this https://gist.github.com/anonymous/19d26110a62c45920101 (the relevant part is towards the bottom)
<Leonidas_> *increase
<MercurialAlchemi> xificurC: apparently companion cube has decided he is a seal
<MercurialAlchemi> so he's from the sea
<Leonidas_> sealed_protected_companion_cube_object
robink has joined #ocaml
mort___1 has quit [Quit: Leaving.]
<Leonidas_> looks like this call is failing somehow:
<Leonidas_> C:\wodi64\opt\wodi64\bin\ocamlfind.exe ocamlc -c C:/wodi64/home/mka4/build-cmake/bindings/ocaml/llvm/llvm_ocaml.c -ccopt " /MP -D_VARIADIC_MAX=10 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -wd4146 -wd4180 -wd4244 -wd4258 -wd4267 -wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722
Denommus` has quit [Ping timeout: 244 seconds]
shinnya has quit [Ping timeout: 245 seconds]
yomimono has joined #ocaml
<companion_cube> xificurC: I think a good proportion of people here are from academia, but not all, and it's hard to say whether they're a "majority"
travisbrady_ has joined #ocaml
<Leonidas_> 'x86_64-w64-mingw32-gcc' is not recognized as an internal or external command, operable program or batch file.
arj has quit [Quit: Leaving.]
travisbrady has quit [Ping timeout: 264 seconds]
travisbrady_ is now known as travisbrady
<TheLemonMan> while (|>) is nice are there some equivalents to ($) (which is a flipped |>) and (.) (iirc there should be a function called 'compose' but my searching skills are failing me)
<companion_cube> did anyone ever worked on adding some kind of refinement types to OCaml?
<companion_cube> TheLemonMan: there is (@@) for right-parentheses application
<companion_cube> nothing specific for composition afaik
<companion_cube> s/specific/standard
<TheLemonMan> oh, Core.Fn has 'compose'
<companion_cube> yes, most stdlib extensions/replacements do
paradoja has joined #ocaml
<Leonidas_> where is the C compiler that ocaml uses specified?
<companion_cube> I think that in trunk it's $(CC), but currently it might be gcc
<octachron> TheLemonMan: as a side-note, sometimes function composition does not mix very well with the value restriction
arj has joined #ocaml
<Leonidas_> companion_cube: it is set to x86_64-w64-mingw32-gcc for me, I'd like to know where it gets that from
<companion_cube> no idea, sorry
<Leonidas_> since I need to replace this with 'cl'
<Leonidas_> thanks anyway :-)
<MetalWolf> Hi, I am having issues installing gsl in opam on a scientific linux 6 based server. It complains about camlp4 not being installed but it is. I have put the output here: http://pastebin.com/EZaxJFse can anyone please tell me what I'm missing? Opam was installed from the centos 6 repository
<Leonidas_> hope it is not hardcoded
<companion_cube> MetalWolf: I suggest using `opam switch 4.02.1` rather than the `system` switch
AlexRussia has joined #ocaml
paradoja has quit [Ping timeout: 264 seconds]
<MetalWolf> companion_cube: I'll give that a go... I just went by the dependencies pulled down to install gsl.
<TheLemonMan> octachron, can you elaborate more on this ?
<Drup> whitequark: do you still maintain un-ocp-build versions of ocp-indent/index ?
<TheLemonMan> 'x |> List.rev // inner // List.rev' (with let (//) = compose) gives a pretty nice-to-read effect :)
tane has joined #ocaml
<companion_cube> why not x |> List.rev |> inner |> List.rev? :)
<companion_cube> the first should be List.rev' sorry
<companion_cube> or not.
dav has quit [Ping timeout: 244 seconds]
<octachron> TheLemonMan: Due to the presence of mutability, there is some cases in ocaml where the type of function cannot be generalized
<octachron> TheLemonMan: And one of the corollary is that the type of "let f = compose g h" and "let f x = g @@ h x" can be different
<octachron> TheLemonMan: exemple : let id x = x; let f = (compose id id) : '_a -> '_a whereas (fun x -> id @@ id x ) : 'a -> 'a
AlexRussia has quit [Quit: WeeChat 1.2-dev]
darkf has quit [Quit: Leaving]
MrScout has joined #ocaml
dav has joined #ocaml
<Leonidas_> ok, I can try specifying a compiler manually via ocamlc -cc
<adrien_znc> I believe cmake was started by big pharma to drive the use of antidepressant drugs
mort___ has joined #ocaml
* Leonidas_ checks out the cmake homepage, hoping for a 'order now' link
<TheLemonMan> companion_cube, I'm still exploring the depths of Core and like experimenting :)
arj has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
mengu has quit [Remote host closed the connection]
<Leonidas_> now it fails, because it interprets ocamlc -cc "C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/cl.exe" as -cc "C:/Program
<adrien_znc> \
<ollehar> any way to try out modular implicits yet?
<Leonidas_> adrien_znc: nope, doesn't work either
<Leonidas_> it just complains about "C:\Programs now instead
oscar_toro has quit [Ping timeout: 250 seconds]
mengu has joined #ocaml
oscar_toro has joined #ocaml
<Drup> ollehar: opam switch 4.02.0+modular-implicits
<ollehar> thanks drup!
<lyxia> Leonidas_: Don't you need to escape spaces? C:/Program\ Files\ (x86)/...
seangrove has quit [Ping timeout: 246 seconds]
<adrien_znc> Leonidas_: I meant
<adrien_znc> C:/Program\ Files/...
<adrien_znc> possibly \\ instead of \
<Leonidas_> lyxia: no, that does't work
<Leonidas_> adrien_znc: nope, \\ does not work either
<Leonidas_> its just hilarious to fail with such an easy problem
<MercurialAlchemi> Leonidas_: simple quotes?
nlucaroni has joined #ocaml
<ggole> Maybe you have to do that hilarious ~1 thing
<Leonidas_> MercurialAlchemi: The filename, directory name, or volume label syntax is incorrect.
<Leonidas_> ggole: yes, that would work
<Leonidas_> Windows 7 doesn't seem to display that anywhere anymore
<MercurialAlchemi> terrific
seangrove has joined #ocaml
<Leonidas_> can't figure out which ~ name maps to "Microsoft Visual Studio 11"
<Leonidas_> I have 15 folders starting with Microsoft -.-
mort___ has quit [Quit: Leaving.]
<nlucaroni> i was disapointed to see that i cannot extend an open type by another declared type. type exn += myExns . Is there any way around this that I'm missing?
<nlucaroni> s/another declared type/another declared open type/
<ggole> Use polymorphic variants for that.
axiles has quit [Ping timeout: 240 seconds]
mort___ has joined #ocaml
wagle_ has quit [Remote host closed the connection]
mort___ has quit [Client Quit]
arj has joined #ocaml
curiosity has joined #ocaml
<adrien_znc> 16:54 < Leonidas_> its just hilarious to fail with such an easy problem
<adrien_znc> quoting rules for arguments on Windows are crap
<curiosity> is there some tutorial for jenga?
ghostpl_ has quit [Remote host closed the connection]
<Denommus> hm
<Denommus> do I need to change anything else anywhere to have a static file in my Eliom project?
<Drup> a static file ?
<Denommus> yes, like a CSS
ghostpl_ has joined #ocaml
<Denommus> forget it, I had put it in the wrong directory
<Drup> ah, well, there is a static/ directory
WraithM has quit [Quit: leaving]
<whitequark> Drup: no, and I deleted the repos
TheLemonMan has quit [Quit: leaving]
<Drup> why would you do that ? :O
<whitequark> I was mad at ocp and their crappy build system
<Drup> no, I mean, delete the repos
<whitequark> yes
<Drup> the work could still be useful u_u'
travisbrady has quit [Quit: travisbrady]
<Drup> do you often erase your own work by pure anger ?
<whitequark> if I suffered, everyone else should suffer as well, and become mad at ocp and their crappy build system
wagle has joined #ocaml
<whitequark> so, suffer.
<whitequark> no, not often
<Drup> that's idiotic.
<whitequark> why would you want to use work by someone idiotic, then? :]
travisbrady has joined #ocaml
<Drup> I don't judge the product by the author
<Drup> deleting your repo is unfortunate and very annoying. The justification you are giving is complete utter stupidity.
<Drup> (but I'm pretty sure you are perfectly aware of it)
yomimono has quit [Ping timeout: 244 seconds]
<whitequark> actually, no. no one is entitled at my work. if you don't like it, complain to ocp, /they/ use this broken garbage
<Drup> I already did, multiple time
<whitequark> even if the original reason was dumb, you've just reaffirmed my decision
<Drup> that's not the fucking point
<tane> well..
<Drup> "hurdur, I suffer hence everyone should do too" <- that.
<whitequark> good, now you're angry too! that's how progress is made!
* ggole waits for Drup to create a new build system in retaliation
<Drup> not gonna happen
mengu has quit [Remote host closed the connection]
<Drup> I already stated multiple time I didnt' wanted to get involved in the designing of build systems
magthe has quit [Quit: WeeChat 1.1.1]
jave has joined #ocaml
<BitPuffin> question
<BitPuffin> how hard would it be to implement an "atomic" ref, that uses cpu native instructions for compare exchange tec
slash^ has quit [Read error: Connection reset by peer]
<BitPuffin> etC*
travisbrady has quit [Quit: travisbrady]
slash^ has joined #ocaml
<whitequark> that would be pointless
<whitequark> i mean, you can trivially do so using the C API
<BitPuffin> whitequark: well I'm just thinking it would help share data between threads without having to use mutexes
<ggole> That wouldn't be sufficient, you'd get visibility problems
<BitPuffin> hmm?
<whitequark> lock-free algorithms are generally highly nontrivial to write
<ggole> It's easy to do things like publish a pointer to a memory region before writes to that memory region are visible
<BitPuffin> well I would probably mainly use it to have an atomic mutable reference to immutable data
<ggole> You need barriers, etc to make it all work reliably
<BitPuffin> think herb sutter said that barriers are slightly more than you need hehe
<BitPuffin> anyway, what I basically want is box from racket or atom from clojure
<whitequark> no, you need barriers.
<whitequark> however, if you use atomics with load-acquire and store-release semantic, e.g. the ones from C++11 or C11, you get them
<BitPuffin> yeah that's what I mean
<BitPuffin> atomic from c++ 11
<BitPuffin> any one of them basically
<whitequark> any one?
<BitPuffin> I was just thinking that it should be perfectly possible to make the kind of concurrency primitives from clojure that people rave about in ocaml
<BitPuffin> whitequark: atomic, box, atom
<whitequark> ah
<whitequark> what's the point of having concurrency primitives if you don't have parallelism?
<BitPuffin> whitequark: I thought ocaml had system threads?
<whitequark> yes
<whitequark> it doesn't have parallelism. the runtime uses a global lock to make sure only one thread executes at once
<BitPuffin> do they never execute in parallel?
<BitPuffin> ah
<BitPuffin> :/
<BitPuffin> well, I guess then it would be useful to program with these so that you have code ready for when that restriction is removed
<BitPuffin> ie when the concurrent GC arrives
<BitPuffin> is there a way to disable that lock?
marynate has quit [Quit: Leaving]
<ggole> The runtime isn't designed for that.
<BitPuffin> yeah
<whitequark> concurrent GC is a bad idea
<BitPuffin> that doesn't seem safe
<tane> mh, if i have something like `let a = ref 0` in two threads, and both do `incr a` is there any change of lost-update?
<BitPuffin> whitequark: is it?
<tane> chance*
<nlucaroni> ggole : I wanted to extend exceptions (like my code snippet) with the type. So, I guess it's not possible currently.
<BitPuffin> whitequark: so there are no plans for ocaml to support parallelism anymore?
<ggole> tane: no
<Drup> there are plans
<Drup> see video from the last ocaml workshop, there is one about that
<tane> ggole, so when exactly is the lock released and reaquired by another thread?
<whitequark> BitPuffin: you don't need a fully parallel GC for that
<whitequark> concurrent*'
<whitequark> you can have a third generation that's accessible to all threads
<BitPuffin> whitequark: ah yeah
<BitPuffin> this one? *
<ggole> tane: not by preemption - I don't recall the exact details though
<tane> ok, good enough to know that, thanks :)
Haudegen has quit [Ping timeout: 272 seconds]
freling has quit [Quit: Leaving.]
<Drup> BitPuffin: yes
<ggole> It could be the same "safe points" at which a signal could be delivered, but that's just a guess
<BitPuffin> Drup: yeah guess I'll watch that then later
<BitPuffin> when I'm home from work
<BitPuffin> is it going anywhere?
<mrvn> ggole, tane: Currently signals and thread switching happens on allocation.
<mrvn> "incr a" doesn't allocate so it ends up atomic.
<adrien_znc> but you can have several threads running at once
<whitequark> "waiting on I/O at once"
<mrvn> whitequark: How does data end up in the 3rd generation? Does every box have a creator ID and you check that on every access and move stuff if creator != current?
<mrvn> adrien_znc: only one can run ocaml code
<tane> mrvn, alright, thanks
<adrien_znc> mrvn: ocaml code that allocates
<adrien_znc> I mean
<whitequark> mrvn: I think in a write barrier, yes
<whitequark> caml_modify
<adrien_znc> it shouldn't happen currently but relying on atomicity for incr sounds like a bit of a bad idea
<whitequark> read barriers are not necessary though, since the GC is not fully concurrent
<mrvn> adrien_znc: i would hope incr would stay atomic.
<whitequark> terrible idea
<tane> i guess this is an implementation detail, not a part of any specification?
<mrvn> most cpus have support for that
<whitequark> += is not atomic, anyway
<whitequark> it's slower
<adrien_znc> you have shared mutable data across threads
<adrien_znc> you protect it
<adrien_znc> you don't try to avoid that by relying on current implementation behaviour
<tane> anyway, this was just for example purpose
<adrien_znc> just like you stay polite, eat your vegetables and don't pull your sister's hair
<mrvn> I wonder how little threaded code would continue to work when you switch to concurrent
<whitequark> well, correct one would keep working ;p
<adrien_znc> I'd say most
<mrvn> and how little is correct?
<adrien_znc> at least I'm more worried about changes in the GC behaviour
<adrien_znc> I mean, it's well-known that the best way to kill C bindings is Gc.compact
<reynir> I think a lot of Go code stops working once you set it to run parallel actually
<adrien_znc> I expect that it's mostly C bindings that would get broken by GC changes
Haudegen has joined #ocaml
<mrvn> adrien_znc: not realy. They have to release the global lock for concurrency and play nice with the GC already.
<mrvn> Unless the GC stops being a stop-the-world one.
octachron has quit [Quit: Leaving]
<companion_cube> so, I had an idea today for Ocaml's type system: http://cedeela.fr/~simon/files/refinement_types.html if anyone wants to check how stupid it is
<whitequark> companion_cube: niiice
<whitequark> you could do it with ppx
<companion_cube> I did not say I have the time to do it (now)
<whitequark> oh, needs typechecking extensions
<companion_cube> yes, a bit
<companion_cube> not much though
oscar_toro has quit [Ping timeout: 246 seconds]
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
Leonidas_ has quit [Quit: Page closed]
Submarine has joined #ocaml
Submarine has joined #ocaml
travisbrady has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
dsheets has joined #ocaml
psy_ has quit [Read error: Connection reset by peer]
nlucaroni has left #ocaml [#ocaml]
lordkryss has joined #ocaml
kakadu has quit [Quit: Page closed]
travisbrady has quit [Quit: travisbrady]
ggole has quit []
tani has joined #ocaml
boadie has joined #ocaml
boadie has quit [Remote host closed the connection]
tane has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Remote host closed the connection]
tani is now known as tane
boadie has joined #ocaml
peterbb has joined #ocaml
WraithM has joined #ocaml
AlexRussia has joined #ocaml
boadie has quit [Remote host closed the connection]
contempt has quit [Read error: Connection reset by peer]
contempt has joined #ocaml
govg has quit [Ping timeout: 246 seconds]
govg has joined #ocaml
BitPuffin has quit [Ping timeout: 246 seconds]
ghostpl_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
Guest40760 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexRussia has quit [Ping timeout: 265 seconds]
AlexRussia has joined #ocaml
kakadu has joined #ocaml
ericwa has joined #ocaml
psy_ has joined #ocaml
claudiuc has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
robink has quit [Ping timeout: 245 seconds]
psy_ has quit [Ping timeout: 244 seconds]
WraithM_ has joined #ocaml
WraithM_ has quit [Client Quit]
robink has joined #ocaml
TheLemonMan has joined #ocaml
JuggleTux has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Fullma has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 265 seconds]
ebzzry has quit [Ping timeout: 246 seconds]
antkong has joined #ocaml
Haudegen has joined #ocaml
AnarchosF has joined #ocaml
Fullma has joined #ocaml
shinnya has joined #ocaml
jwatzman|work has joined #ocaml
antkong has quit [Ping timeout: 272 seconds]
ebzzry has joined #ocaml
mengu has joined #ocaml
mengu has joined #ocaml
dlat has joined #ocaml
jabesed has joined #ocaml
dlat has quit [Client Quit]
ptc has joined #ocaml
ptc is now known as Guest16020
matason has quit [Quit: Leaving...]
Submarine has quit [Quit: Leaving]
ghostpl_ has quit [Remote host closed the connection]
<TheLemonMan> hrm, packages installed via opam don't seem to install the manpages
<companion_cube> it's not easy to do, you hve to generate the manpages and a .install file, I think (which is kind of deprecated)
<Drup> .install is not deprecated
`eeks has quit [Quit: Textual IRC Client: www.textualapp.com]
<companion_cube> what's wrong with HLVM already?
<companion_cube> http://www.ffconsultancy.com/ocaml/hlvm/ still looks very cool
matason has joined #ocaml
<adrien> companion_cube: in-memory representation is different
<companion_cube> well, it's a good thing, isn't it?
jleroux has joined #ocaml
<adrien> it was designed for some kind of workloads
<adrien> faster on these
<adrien> slower on others
<adrien> best would have been to mix both
<adrien> but that needs some kind of compatibility
<adrien> and the different memory representation also broke ffi
jleroux has quit [Remote host closed the connection]
<rgrinberg> Drup: \o/ the cohttp branch is alive again!
_andre has quit [Quit: leaving]
arj has quit [Quit: Leaving.]
<TheLemonMan> is there a way to make utop interface more minimalistic ? eg: hide the completions and the huge colored welcome banner
AnarchosF has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<Drup> rgrinberg: apparently it is x)
larhat1 has quit [Quit: Leaving.]
<smondet> Drup: and the extension homogeneisation one? is it alive?
Anarchos_F has joined #ocaml
Anarchos_F is now known as AnarchosF
<Drup> yes
<Drup> I should have merged that
<Drup> I'm trying to finish the js_of_ocaml ppx now
<Drup> (and, you know, work on my phd)
<smondet> (can be useful :) )
<smondet> Thanks!
Haudegen has quit [Ping timeout: 264 seconds]
<bernardofpc> companion_cube: sort cannot be {'a array | p } -> {'a array | p and sorted }
<bernardofpc> (maybe as_sorted can, because that's just the "assert" underlying conversion, but in general f will destroy many properties)
<companion_cube> yes
ghostpl_ has joined #ocaml
<companion_cube> did I write sort? I meant as_sorted
<bernardofpc> no, you did write sa_sorted
<bernardofpc> but I was thinking about propagating information, and besides the "assert" case, I see no other possibility of having { | p} - > {| p and q}
<companion_cube> indeed
struk|work has joined #ocaml
<bernardofpc> otherwise, s/predicated/predicates/ somewhere
<companion_cube> right
<bernardofpc> the disjunction thing about the return value is when the function itself has disjunctions in its implementation, right ?
<bernardofpc> (not about the locations where (f x) is seen on the rest of the program)
<bernardofpc> I mean in <body>
<struk|work> it looks like writing bindings for a C++ lib is tricky, but doable. anyone have experience with this? Best source of info I've seen thus far is this: https://github.com/ocamllabs/ocaml-ctypes/issues/187
<adrien> depends
<adrien> which API and usage do you want to bind?
ghostpl_ has quit [Ping timeout: 245 seconds]
<companion_cube> bernardofpc: yes, it's when you have if/match
<struk|work> adrien: oracle coherence C++ api
<adrien> does it rely on inheritance?
<adrien> (the API itself)
<adrien> or can the API and usage be reduced to a C-like interface?
<struk|work> adrien: my hunch is its ultimately a C interface under the hood, trying to figure that out though. I am very familiar with java API (which uses inheritance), not the C++ one
<struk|work> adrien: lots of "abstract" classes, but maybe I can work around it... http://download.oracle.com/otn_hosted_doc/coherence/352CPP/classes.html
<adrien> if you need to implement interfaces then it's quite annoying
wwilly has joined #ocaml
<adrien> the typical approach is to implement them in C++ but have each member of the interface be a thin wrapper which finds the ocaml function and calls it
<adrien> basically what you cannot do in the bindings is the vtable part
<adrien> ctypes might be able to do it at runtime but libffi isn't perfect
Haudegen has joined #ocaml
<struk|work> adrien: got it. hrm. very frustrating that oracle doesn't have a C api.
<adrien> ctypes/libffi is probably the sanest approach
<adrien> (I don't like having to do everything at runtime but the C++ vtables are runtime things so it's impossible to do it differently)
seangrove has quit [Ping timeout: 250 seconds]
reem has joined #ocaml
matason has quit [Quit: Leaving...]
Guest16020 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<struk|work> adrien: ok thanks for your advice, will study ctypes/libffi as an option
oscar_toro has joined #ocaml
<ollehar> modular implicits reminds me of _Generic in C...
<ollehar> like switch on types.
ptc has joined #ocaml
ptc is now known as Guest43764
<smondet> struk|work: about C++ bindings: alot of work done there: https://github.com/Kakadu/lablqt
matason has joined #ocaml
AnarchosF has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
jabesed has quit [Ping timeout: 265 seconds]
<struk|work> smondet: yeah I studied lablqt back in the day, pretty interesting problems they faced dealing with C++. Not entirely clear how I can leverage their work though.
<adrien> lablqt takes a completely different approach: it doesn't try to bind the large C++ API
mengu has quit [Remote host closed the connection]
boadie has joined #ocaml
<adrien> QML instead
<adrien> night
<struk|work> ngiht
<struk|work> *night
<ollehar> why does
<ollehar> + 1;;
<ollehar> not work for my implicit, but
<ollehar> (+) 1;;
<ollehar> does?
<ollehar> (+) 1 --> string "1"
<ollehar> + 1 --> int 1
<struk|work> ollehar: in the 2nd case, your are invoking the + function in prefix order, eg. let (+) x y = x +y
<struk|work> ollehar: with "+ 1" it is treating the + as a sign indicator
<ollehar> ah
<ollehar> aha
<mrvn> unary +
boadie has quit [Ping timeout: 245 seconds]
<ollehar> that also explains why
<ollehar> + 1.2 --> float 1.2
<ollehar> works
<ollehar> or?
<bernardofpc> yep
<ollehar> yey, concat with (+) finally!
<ollehar> # 1 + 2 ---> string "12"
<ollehar> ;)
SGrondin has joined #ocaml
Guest43764 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n3ss3s has joined #ocaml
<SGrondin> I have a question for the type wizards in here.. https://gist.github.com/SGrondin/051fa77d1db7369790dc
c74d is now known as Guest95461
xificurC has quit [Ping timeout: 256 seconds]
Guest95461 has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
<smondet> SGrondin: maybe with manual coercion? `` (... :> Cohttp_lwt_body.t) `` ?
<SGrondin> Good idea! I'm trying it now
<SGrondin> That worked great!
c74d has joined #ocaml
<SGrondin> Shouldn't the Cohttp library enable something like that on their side, though?
<smondet> SGrondin: you can create `` let body = `String "abc" in ``
<smondet> Cohttp is very "open" / hackable
<SGrondin> yeah, a lot of interfaces are exposed
MercurialAlchemi has quit [Ping timeout: 245 seconds]
<SGrondin> I just find the Body.of_string approach cleaner.
<SGrondin> This is very interesting: https://blogs.janestreet.com/a-and-a/
<smondet> and Cohttp_lwt_body also has a "of_string", right?
<SGrondin> yeah
<SGrondin> I'm being 110% pedantic here. There are plenty of workarounds
antkong has joined #ocaml
Fullma has quit [Quit: Fullma]
<Anarchos> ah i discover the function running an infinite recursive loop, without using the "let-rec" but only a "let" :)
ollehar has quit [Ping timeout: 264 seconds]
matason has quit [Quit: Leaving...]
reem has quit [Remote host closed the connection]
ptc has joined #ocaml
ptc is now known as Guest15823
axiles has joined #ocaml
curiosity has quit [Quit: Leaving]
lordkryss has quit [Quit: Connection closed for inactivity]
reem has joined #ocaml
tane has quit [Quit: Verlassend]
kakadu has quit [Remote host closed the connection]
mengu has joined #ocaml
ollehar has joined #ocaml
n3ss3s has quit [Ping timeout: 256 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
mengu has quit [Ping timeout: 252 seconds]
boadie has joined #ocaml
tristero has joined #ocaml
trystero has quit [Ping timeout: 245 seconds]
wwilly has quit [Quit: This computer has gone to sleep]
boadie has quit [Ping timeout: 246 seconds]
tristero has quit [Client Quit]
TheLemonMan has quit [Quit: leaving]
MrScout has quit [Ping timeout: 256 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ocaml
lordkryss has joined #ocaml
mahem1 has joined #ocaml
seangrove has joined #ocaml
mjw56 has quit []
<rgrinberg> Drup: We should turn that into a PR to give it another fresh review
<mahem1> Hey all, quick question. So I have a function that traverses a binary tree looking for the 'best' answer. So instead of having to pass an int best variable around through all of the stackframes it would be alright to just use a mutable reference, correct?
<rgrinberg> SGrondin: In future versions of Cohttp I'd like the Lwt backedn to include body. So that open Cohttp_lwt will give you Body = Cohttp_lwt_body
<rgrinberg> like the Async backend
<rgrinberg> in the meantime, I just do module Body = Cohttp_lwt_body in my own code
<Drup> rgrinberg: what should we turn into a PR ?
<rgrinberg> the new cohttp branch
Guest15823 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<haesbaert> hmm I'm slightly confused about Unix.write
<haesbaert> it says it repeats the write operation until all writes has been written
<haesbaert> what if I want write to return shortcounts ?
<haesbaert> there is "single_write", but doesn't seem to be what I want