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
copycat has joined #ocaml
sh0t has quit [Quit: Leaving]
rgrinberg has joined #ocaml
yomimono has quit [Ping timeout: 276 seconds]
ollehar has quit [Read error: Connection reset by peer]
<paarth> would you say it's evil for a library to return a type defined in one of its dependencies?
ncthom91 has joined #ocaml
<paarth> my original thought was yes, but I don't really like the idea of lots of variant types that are essentially duplicates
ollehar has joined #ocaml
agarwal1975 has quit [Quit: Connection closed for inactivity]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
adrien_znc has quit [Ping timeout: 255 seconds]
adrien_znc has joined #ocaml
keen___ has quit [Read error: Connection reset by peer]
keen___ has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yaewa has joined #ocaml
moei has quit [Ping timeout: 255 seconds]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pkrnj has joined #ocaml
ncthom91 has joined #ocaml
jonludlam has quit [Ping timeout: 255 seconds]
ncthom91 has quit [Client Quit]
struktured has quit [Quit: Konversation terminated!]
BitPuffin|osx has quit [Ping timeout: 264 seconds]
SomeDamnBody has joined #ocaml
<SomeDamnBody> hey, does anybody know how to tell ocamlbuild to compile for profiling?
<Drup> paarth: why would it be evil ?
<paarth> Drup, it would require the other library as well to make sense of things, no?
<Drup> SomeDamnBody: "true: profile"
struk|desk has quit [Ping timeout: 256 seconds]
<Drup> paarth: and why is that an issue ?
<paarth> I think I may be conflating require and with the idea of an import in the toplevel
<paarth> nvm
<Drup> paarth: the library is a dependency, it will be loaded/linked anyway.
<paarth> Let's say I write a library L that relies on package X
<paarth> will the author of another program that relies on L have to include L and X in their build step?
<paarth> even if they don't reference anything from X directly
<Drup> No
<paarth> if I were to force users of my library to work with a type from X, would that force them to include X in their build step?
<Drup> No, it would be already
<paarth> does that mean it would be statically linked into L? or would ocamlfind take care of it?
inf-gropeoid has joined #ocaml
inf-gropeoid has quit [Client Quit]
pkrnj has quit [Quit: Computer has gone to sleep.]
struk|desk has joined #ocaml
struk|desk has quit [Read error: Connection reset by peer]
<Drup> both
struk|desk has joined #ocaml
<paarth> Drup, thanks :). Clearly I need to do some more research
sivoais has quit [Quit: leaving]
sivoais has joined #ocaml
sivoais has quit [Read error: Connection reset by peer]
copycat has left #ocaml [#ocaml]
pkrnj has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
manizzle has quit [Ping timeout: 250 seconds]
kdef has quit [Quit: Leaving]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 258 seconds]
lopex has quit [Quit: Connection closed for inactivity]
inf-gropeoid has joined #ocaml
idegen has quit [Quit: Leaving.]
jao has quit [Ping timeout: 276 seconds]
Muzer has quit [Excess Flood]
darkf has joined #ocaml
swgillespie has joined #ocaml
Muzer has joined #ocaml
The_Mad_Pirate has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
sdothum has quit [Ping timeout: 244 seconds]
matason has joined #ocaml
f[x] has quit [Ping timeout: 272 seconds]
jeffmo has joined #ocaml
The_Mad_Pirate has quit [Quit: Konversation terminated!]
The_Mad_Pirate has joined #ocaml
cmtptr has quit [Ping timeout: 264 seconds]
yaewa has quit [Read error: Connection reset by peer]
nullcat has joined #ocaml
moei has joined #ocaml
c74d has quit [Remote host closed the connection]
c74d has joined #ocaml
cmtptr has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
MercurialAlchemi has joined #ocaml
copycat has joined #ocaml
scitesy has joined #ocaml
mcclurmc_ has quit [Remote host closed the connection]
inf-gropeoid has quit [Quit: fix config]
siddharthv_away is now known as siddharthv
squirtle has joined #ocaml
<squirtle> Is there an online version of utop
<squirtle> ?
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
manizzle has joined #ocaml
hay207 has joined #ocaml
tmtwd has quit [Quit: Leaving]
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 258 seconds]
f[x] has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
zpe has joined #ocaml
A1977494 has joined #ocaml
rgrinberg1 has quit [Ping timeout: 250 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
Simn has joined #ocaml
Cyanure has joined #ocaml
rgrinberg1 has joined #ocaml
jonludlam has joined #ocaml
rgrinberg1 has quit [Ping timeout: 244 seconds]
srenatus has joined #ocaml
A1977494 has quit [Ping timeout: 265 seconds]
The_Mad_Pirate has quit [Excess Flood]
The_Mad_Pirate has joined #ocaml
Haudegen has joined #ocaml
orgasmanur is now known as chiasmanur
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonludlam has quit [Ping timeout: 265 seconds]
jonludlam has joined #ocaml
jonludlam has quit [Ping timeout: 246 seconds]
rishabhjain has joined #ocaml
amnn has joined #ocaml
jgjl has joined #ocaml
<companion_cube> squirtle: iocaml, maybe? https://github.com/andrewray/iocaml
<squirtle> Thanks companion_cube this looks promising
<flux> drup, well, it's going to be great if we get multicore this year as well, even if it's only for bytecode for now
<flux> drup, in particular it's useful for shaking out parallellism-related bugs from libraries and programs :)
<companion_cube> yay
<companion_cube> because bytecode multicore is not very useful per se :)
ggole has joined #ocaml
manizzle has quit [Ping timeout: 246 seconds]
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
<flux> companion_cube, still better than python?-)
<flux> (well, cpython)
<companion_cube> but worse than native singlecore
<adrien_znc> companion_cube: you need more core
<adrien_znc> s
<companion_cube> I agree it's useful for testing ;)
<flux> surely it depends on how many cores you have ;)
<flux> though, I guess there's no real reason to use bytecode ever in OCaml in production..
<companion_cube> linear scaling is a rare thing
<adrien_znc> companion_cube: you need > 32
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
rgrinberg1 has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
rgrinberg1 has quit [Ping timeout: 256 seconds]
jonludlam has joined #ocaml
<srenatus> hi there. just to a stab at compiling opam using msys2 (windows). any hints on what libws2 is? 'make' bombed out with that: Fatal error: Cannot find file "libws2_32"
<squirtle> That means you don't have it installed or installed on a nonstandard path
<squirtle> at least, thats what it should mean
<squirtle> You might also have a 64 bit version installed
<adrien_znc> srenatus: hmmmmmmmmmmmmmmmmmmmmmm
<adrien_znc> and ws2_32 is for networking but since it's windows you need it for pretty much everything
<srenatus> squirtle: but what is it? I cannot find a package for that in msys2; is it something make ext-lib installed?
<srenatus> adrien_znc: oh, thanks.
<adrien_znc> as for libws2_32 that looks a bit surprising
<adrien_znc> what do you do exactly?
<squirtle> oh im sorry. i assumed with make it was linux
<squirtle> ignore me then
<adrien_znc> in mean, all steps you've done so far
<adrien_znc> e
<srenatus> adrien_znc: pacman -Sy make patch; export PATH=/mingw64/bin:$PATH; git clone $opam; cd opam; ./configure; make ext-lib; make
<adrien_znc> issues already
<adrien_znc> you should start with only the ocaml compiler
<adrien_znc> you need flexdll
<adrien_znc> as far as I know it is not in a "just works" stage
<adrien_znc> part of the issue is the msys-style behaviour
<adrien_znc> i.e. heuristics to decide when and how to convert paths and env vars from posix style to windows style
<srenatus> yup, found these heuristics quite irritating already.
<adrien_znc> cygwin is the more common host
<adrien_znc> (and it's not slower)
<srenatus> adrien_znc: ok
<adrien_znc> cygwin32 preferably
<srenatus> adrien_znc: thanks btw ;)
freling has joined #ocaml
<adrien_znc> np :)
fraggle-boate has quit [Ping timeout: 252 seconds]
fraggle-boate has joined #ocaml
f[x] has quit [Ping timeout: 264 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
rishabhjain has quit [Remote host closed the connection]
jonludlam has quit [Ping timeout: 256 seconds]
yomimono has joined #ocaml
yomimono has quit [Ping timeout: 244 seconds]
<srenatus> huh...ocaml planet has a news item from the future, in june 2016 aestetic integration will have joined the foundation
<rom1504> must be asimov's foundation
<srenatus> it does look futuristic, for sure.
Kakadu has joined #ocaml
Haudegen has joined #ocaml
ggole has quit [Ping timeout: 258 seconds]
copycat has quit [Quit: copycat]
Haudegen has quit [Ping timeout: 252 seconds]
lopex has joined #ocaml
freling has quit [Quit: Leaving.]
freling has joined #ocaml
rand000 has joined #ocaml
yomimono has joined #ocaml
jonludlam has joined #ocaml
rishabhjain has joined #ocaml
psy_ has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
Hannibal_Smith has joined #ocaml
rgrinberg1 has joined #ocaml
rgrinberg1 has quit [Ping timeout: 264 seconds]
tmtwd has joined #ocaml
<srenatus> adrien_znc: everything's in the pink with
<srenatus> ...cygwin and opam
sdothum has joined #ocaml
TheLemonMan has joined #ocaml
_andre has joined #ocaml
squirtle is now known as dtscoded
mort___ has joined #ocaml
octachron has joined #ocaml
rishabhjain has quit [Remote host closed the connection]
dsheets has joined #ocaml
rishabhjain has joined #ocaml
mort___ has quit [Ping timeout: 265 seconds]
freling has quit [Quit: Leaving.]
Hannibal_Smith has quit [Quit: Leaving]
matason has quit []
rishabhjain has quit [Remote host closed the connection]
djellemah has joined #ocaml
scitesy has quit [Quit: AtomicIRC: The nuclear option.]
rgrinberg1 has joined #ocaml
kushal has joined #ocaml
rgrinberg1 has quit [Ping timeout: 256 seconds]
siddharthv is now known as siddharthv_away
Hannibal_Smith has joined #ocaml
fraggle-boate has quit [Ping timeout: 258 seconds]
fraggle-boate has joined #ocaml
<adrien_znc> srenatus: in the "pink"?
<srenatus> adrien_znc: nevermind. misusing phrases. I meant to say that everything was find (and pressed enter too early). turns out it actually isn't quite working after all ;)
Haudegen has quit [Ping timeout: 256 seconds]
<adrien_znc> srenatus: tput you can install on cygwin
<srenatus> really? couldn't find it. I'll have another look
<adrien_znc> also, you are building a cygwin version so the output depends on cygwin and is bound to its license
<adrien_znc> that said, the non-cygwin port is a bit difficult to build with opam currently as far as I know
Hannibal_Smith has quit [Quit: Leaving]
<ollehar> can I user ocsigen/eliom with apache or nginx?
<ollehar> or must I use the whole stack including server?
zpe has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
struktured has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 276 seconds]
djellemah has quit [Quit: Leaving]
djellemah has joined #ocaml
SomeDamnBody has quit [Quit: Leaving]
sh0t has joined #ocaml
thomasga has joined #ocaml
Haudegen has joined #ocaml
ggole has joined #ocaml
<zozozo> ollehar: well you can always redirect requests made to nginx to a local ocsigen server running on some port other than 80
<ollehar> zozozo: maybe I'm using a cheaper hosting service and can only use ocsigen as a cgi-script. that's not possible?
<ollehar> maybe that makes sense, btw
<zozozo> that I don't know, sorry
sh0t has quit [Ping timeout: 264 seconds]
idegen has joined #ocaml
<ollehar> I was comparing to e.g. hacklang, which needs the hhvm
<ollehar> I think it uses it as fastcgi, but... :P
<ollehar> with nginx
<yomimono> so I'm trying to install a package in opam (js_of_ocaml) that has a depopt (tyxml). I want to use a third thing that depends on that depopt being installed (js_of_ocaml.tyxml) .
<yomimono> my usual way of attacking this is to install tyxml, then (re)-install js_of_ocaml, but in this case that doesn't result in me getting js_of_ocaml.tyxml
<yomimono> I conclude there must be some more intelligent way of dealing with this?
matason has joined #ocaml
sh0t has joined #ocaml
idegen has quit [Remote host closed the connection]
idegen has joined #ocaml
<yomimono> (oh duh, I can just opam pin the repo for the thing I'm building as they've provided an opam file, sorry for wall o' text)
<thomasga> yomimono: does js_of_ocaml have an option to enable/disable tyxml when calling ./configure?
<yomimono> no ./configure for js_of_ocaml; I dug around in Makefiles and found out it needs reactiveData
<yomimono> (plus other stuff that I wasn't missing)
struktured has quit [Quit: Konversation terminated!]
rgrinberg1 has joined #ocaml
<thomasga> ha yes, that's a bit annoying when these dependencies are hidden in some auto-magic detection scripts
<thomasga> it forces us to read the README (when it exists) :)
rgrinberg1 is now known as rgrinberg
badkins has joined #ocaml
<dsheets> we need the "features" feature of opam...
cml has joined #ocaml
jao has joined #ocaml
Haudegen has quit [Ping timeout: 245 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
sepp2k has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
agarwal1975 has joined #ocaml
psy_ has joined #ocaml
struktured has joined #ocaml
dtscoded has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jeffmo has quit [Read error: Connection reset by peer]
jeffmo_ has joined #ocaml
Haudegen has joined #ocaml
<cml> what would be the default value of an optional argument if it doesn't have initiasation value in the function definition?
<octachron> None
<octachron> as 'a option None: without initialization value the optional argument is passed as an 'a option value
Haudegen has quit [Ping timeout: 252 seconds]
darkf has quit [Quit: Leaving]
mcclurmc has joined #ocaml
<cml> if I want to pass a value v for that argument, do I have to pass it as Some v?
<flux> cml, let foo ?a () = () in foo (); foo ~a:42 (); foo ?a:(Some 42) ();;
<flux> not to mention: let a = 42 in foo ~a () and let a = Some 42 in foo ?a ()
shinnya has joined #ocaml
hay207 has quit [Ping timeout: 265 seconds]
blandflakes_ has joined #ocaml
blandflakes has quit [Disconnected by services]
blandflakes_ is now known as blandflakes
Haudegen has joined #ocaml
<companion_cube> o/ dsheets, how are things going?
<dsheets> companion_cube, ok, how are you?
<companion_cube> fine!
<companion_cube> I just miss good documentation ;)
<dsheets> yes, i am back to work on that
<dsheets> starting last week
<companion_cube> \o/
<companion_cube> what were you working on?
<companion_cube> if it's not a super-secret project
jeffmo_ has quit [Quit: jeffmo_]
<dsheets> companion_cube, github bindings, maintenance, file system test stuff
<flux> and missile guidance systems, but that's the super secret part?
<companion_cube> oh, ok
<dsheets> and before that... docs
<dsheets> i'll be on docs and github services/testing for the next several months, probably
kdef has joined #ocaml
zpe_ has quit [Remote host closed the connection]
Hannibal_Smith has joined #ocaml
slash^ has joined #ocaml
nullcat has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
jeffmo has joined #ocaml
badkins has quit [Read error: Connection reset by peer]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
noplamodo_ has joined #ocaml
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
noplamodo_ has quit [Remote host closed the connection]
noplamodo has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Client Quit]
octachron has quit [Quit: Leaving]
Denommus` has quit [Ping timeout: 255 seconds]
badkins has joined #ocaml
Hannibal_Smith has quit [Ping timeout: 255 seconds]
MrScout has joined #ocaml
tnguyen has quit [Ping timeout: 255 seconds]
nullcat has joined #ocaml
tnguyen has joined #ocaml
jwatzman|work has joined #ocaml
blandflakes has joined #ocaml
tjscanlon has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
Hannibal_Smith has joined #ocaml
Denommus has joined #ocaml
struktured has quit [Ping timeout: 255 seconds]
kushal has quit [Ping timeout: 256 seconds]
dsheets has quit [Ping timeout: 244 seconds]
Gama11 has joined #ocaml
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
kushal has joined #ocaml
struktured has joined #ocaml
jonludlam has quit [Ping timeout: 256 seconds]
rand000 has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
Hannibal_Smith has quit [Quit: Leaving]
Hannibal_Smith has joined #ocaml
sh0t has quit [Ping timeout: 256 seconds]
t4nk648 has joined #ocaml
<struktured> smondet: you mentioned using a js plot lib to plot from ocaml (via js_of_ocaml or something)...what js plot lib were you thinking of?
<companion_cube> https://github.com/djs55/ocaml-c3 this, I suppose
<companion_cube> awww, forgot to ask dsheets if he would think about integrating ocamloscope with his documentation tool
<struktured> ah yes..duh I was looking at that like 5 minutes ago..
<smondet> struktured: at NYU (2011 / 2012) i used HighCharts.js from joo yes, I wouldn't recommend it
<struktured> c3 seems like a decent choice, although I'm sad to walk away from archimedes
<smondet> at ICFP a while a go, we discussed https://forge.ocamlcore.org/projects/archimedes/ → it has a good backend separation, so it would be easy to do WebGL or JS-Canvas one
dsheets has joined #ocaml
<struktured> smondet: that is an interesting idea but c3 has alot of interaction you wouldn't get easily with archimedes abstraction layer at the moment
<struktured> or maybe I'm wrong, would be cool to have a backend like that
srenatus has quit [Quit: Connection closed for inactivity]
<t4nk648> Hey OCamlers. Is there an easy way to define a type like FirstName and a type like LastName that are both strings under the hood but doesn’t let you pass FirstName stuff into a LastName function and vise versa? I know it should be easy but I can't quite figure out the syntax.
<flux> t4nk648, there are two approaches
<flux> t4nk648, one is using a constructor, another is making the types abstract and expose only some operations for them in a submodule
<t4nk648> What are the advantages or either?
tane has joined #ocaml
<flux> well, the latter might result in less repetition and potentially allow more safety, the first is less work to set up
<struktured> smondet: ocaml api review on plotting ? plplot, gnuplot, archimedes, c3, ..
<tjscanlon> Hi everyone, I was thinking of learning OCaml and wondered if it was suitable for desktop applications or creating small games for personal projects. Please feel free to tell me no and to go away :)
<smondet> struktured: good idea! I think that can be interesting to my lab folks too
<flux> the latter allows later on adjusting the structure of the data and then needs you to change fewer places
<struktured> smondet: if it's not enough we can layer on some other stuff
Denommus has quit [Remote host closed the connection]
<flux> tjscanlon, I think it's OK. probably the most mature widget set for OCaml is lablgtk2. if you're a bit more adventurous, you may try kakadu's lablqt bindings. for games you would probably use opengl or the sdl bindings.
<flux> many moons ago I wrote this and it was OK performance-wise: https://modeemi.fi/~flux/goba/
<flux> I wonder if it even compiles anymore..
<t4nk648> flux: I mostly am worried about safety, aka: making sure a SenderCreditCard doesn't get mixed up with a ReceiverCreditCard or somthing like that.
<flux> t4nk648, well, then the abstract types approach is better, it can really enforce that no mixing up can ever occur
<tjscanlon> Awesome, thank you very much!
<flux> t4nk648, but the type constructor way is really lightweight compared to that
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<flux> t4nk648, so: type length = Length of float type width = Width of float
rgrinberg has joined #ocaml
<flux> and then you extract the values with pattern matching. but, you can still fail at using the values you've extracted :)
<theblatte> <self-promotion> heads up: a new static analyzer written in ocaml >> http://fbinfer.com/ </self-promotion>
<flux> maybe you should try both and see what you like ;-)
<companion_cube> theblatte: just seen that on github, nice!
Denommus has joined #ocaml
<companion_cube> what kind of static analysis does it do?
<companion_cube> (and why doesn't it statically analyse OCaml? ;))
nullcat_ has joined #ocaml
<dsheets> t4nk648, there is also private
<flux> well, it already supports two languages, perhaps someone can contribute the OCaml support ;-)
<theblatte> companion_cube: because ocaml doesn't need to ;)
<theblatte> it finds mostly null-pointer dereferences and memory leaks, on C, Objective C, and Java
<companion_cube> well, it could still use some static analysis ^^
<flux> theblatte, so is it already useful?
<theblatte> flux: yup, used inside facebook to analyse the mobile apps
<flux> I work at a company that does a lot of android and ios development
<companion_cube> memory leaks and null pointers? nice
<flux> so I guess I should mention it there
<theblatte> flux: please do :)
<flux> while simultaneously advertising how cool OCaml is for these kinds of problems.. ;-)
<theblatte> yup
<companion_cube> I suppose the equivalent for OCaml would be detecting memory leaks (...) and uncaught exceptions
<flux> as far as I know, I'm litreally the only one writing OCaml in this company with 100+ developers :)
<theblatte> companion_cube: not quite for the exceptions, because null-pointers are more about values
<flux> (..and even I don't do it for work)
<theblatte> ocaml solves the null-pointer problem pretty well already
<flux> theblatte, btw, resource leak detector for OCaml could be handy
<flux> for android as well I imagine
<flux> also leaked exceptions, but I guess Android doesn't need those :)
<companion_cube> theblatte: does it analyse the whole program at once?
<flux> and ios doesn't really use exceptions a lot either
<Drup> theblatte: how does it works ?
<theblatte> companion_cube: no, it's compositional, bottom-up analysis
<theblatte> so procedure by procedure
<flux> I guess OCaml would have its own special set of problems for that kind of analysis (modules, higher order modules, first class modules..)
<companion_cube> sounds nice
<companion_cube> (I might work on static analysis next year, yay)
<theblatte> flux: yes indeed
<theblatte> Infer doesn't understand higher-order for now
<theblatte> ugh, fucking google links
<Drup> Outch, 73 pages
<theblatte> I never know how to bypass them
<flux> go to target, acquire its url :)
<theblatte> Drup: there's a 12 page conference version
<theblatte> flux: not when it's a direct download
<flux> there really should be a browser extension for copying google links..
<companion_cube> wow, abduction
<theblatte> firefox doesn't bother to show the url
<flux> theblatte, then it appears in your download list :)
<flux> (copy download url etc)
<theblatte> Drup: but really I meant it more as a joke ;)
<flux> but yes, annoying
<theblatte> flux: ha!!
<Drup> theblatte: well, that's what I wanted really, the actually theoretic technique.
<theblatte> flux: shit, now it opens the pdf in the javascript firefox thingy instead ;)
<companion_cube> at first glance I'd assume it uses a predicate domain and Hoare pré/post conditions, per function
<theblatte> so still no link
<flux> theblatte, no link at the top bar either?
<theblatte> flux: doh!
<flux> :)
<theblatte> \o/
tjscanlo_ has joined #ocaml
<Drup> companion_cube: I was personally expecting separation logic, to deal with null pointer exceptions :p
tjscanlon has quit [Ping timeout: 272 seconds]
<theblatte> so yeah, separation logic :)
<companion_cube> isn't it part of the predicate domain?
<theblatte> it's a good read though, that long version
<Drup> A bit long, to lazy to do that
<theblatte> (I'm not one of the authors)
<theblatte> print it out, read it at night ;)
<theblatte> companion_cube: it doesn't analyse the whole program at once, that wouldn't scale
<companion_cube> yes, that's why I asked
<theblatte> we use Infer at facebook to analyse multi-million lines of code projects
<theblatte> like the mobile apps
<theblatte> it runs on every patch that is sent to the codebase
<companion_cube> as much as I don't like facebook, they know how to use research
<t4nk648> Thanks flux, that's very helpful
<flux> t4nk648, good :).
<flux> t4nk648, what are you writing? credit cards processor?-)
<Drup> companion_cube: comparing how the various big companies tackle the problem is quite interesting
sh0t has joined #ocaml
rand000 has joined #ocaml
<struktured> smondet: proprietary...but worth mentioning: http://ubietylab.net/ubigraph/
<Drup> struktured: that's not for plots
<Drup> similar to c3, there is http://metricsgraphicsjs.org/
<companion_cube> Drup: interesting in what way? :p
Denommus` has joined #ocaml
<companion_cube> I mean, yeah, google only knows about research in machine learning, they ignore the reste
<companion_cube> -e
<Drup> companion_cube: I was talking more about "how to handle our ridiculously huge code-base"
<companion_cube> ok
Denommus has quit [Ping timeout: 264 seconds]
Denommus` is now known as Denommus
<cml> I have added to files x.ml and x.mli to my project's location. x.mli contains a couple of functions. I have added those files to my Makefile. I get the error: "Files x.cmx and x.cmx define the same module X"
<cml> any idea?
<companion_cube> are you sure you don't have another file x.ml somewhere?
<companion_cube> or compilation leftovers?
<t4nk648> flux, I want to write a simple budget application, nothing too insecure I just like the idea of making my code more correct.
<cml> I searched, no!
<cml> Ah, double definition in Makefile
<cml> thanks, fixed
<companion_cube> :)
<companion_cube> consider using a simpler build system, such as ocamlbuild, if you can
<t4nk648> theblatte. Infer looks really helpful. So you work for facebook?
<theblatte> t4nk648: yes, I'm on the Infer team
<t4nk648> they have plans to add more static checks I assume?
<theblatte> ?
jwatzman|work has quit [Quit: jwatzman|work]
<Drup> thomasga: you really shouldn't have merged that one, it's out of date now ...
<Drup> give ma sec, doing a PR.
jwatzman|work has joined #ocaml
<thomasga> it was green :p
jonludlam has joined #ocaml
<t4nk648> I only looked at it briefly but it looks like it does mostly only null pointer checks, which is really useful. I was thinking that later you may add other things? (I didn't really have anything in particular in mind)
<Drup> it was green because it's one and a half month ago
<Drup> thomasga: also, it compiles, it doesn't mean it works. But you already know that
Haudegen has quit [Ping timeout: 246 seconds]
<theblatte> t4nk648: it also does resource leaks (eg open files not closed) and memory leaks
<Drup> (I strongly disagree with merging packages that are basically broken just because "it's a big software", but you are the one having repo rights :p)
<t4nk648> Cool! I guess most other things would actually be handled by the native compilers.
<theblatte> t4nk648: and other things, see http://fbinfer.com/docs/infer-bug-types.html
<theblatte> yes, we try to go deeper than compilers
<theblatte> but if a bug is important we might add it :)
ggole has quit []
ollehar1 has joined #ocaml
contempt has quit [Ping timeout: 246 seconds]
contempt has joined #ocaml
<apache2> oooooh, did someone say statically detecting unhandled exceptions??? gief!
<thomasga> Drup: I should have asked the question on the PR, I read the discussion too quickly and though the package was at least a bit usable
<Drup> thomasga: well, it is a tiny bit usable, but really, it's quite broken and the package you merged is based on a patched snapshot of the unstable branch
<Drup> apparently zkincaid made a custom patch and didn't contributed it to the main Z3 repository.
<thomasga> that's bad then
<thomasga> I'll revert
<Drup> Yes.
<Drup> (I didn't realized before he had a custom patch ..)
<tjscanlo_> What is the best resource for beginning OCaml? Is it the tutorial section on ocaml.org?
<yomimono> tjscanlo_: subjective, but I had a good experience with https://realworldocaml.org
<tjscanlo_> Thank you!
<thomasga> Drup: done
<Drup> thomasga: the usual policy is "no dev version" right ?
<thomasga> yea
TheLemonMan has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
badkins has quit []
<apache2> tjscanlo_: "ocaml from the very beginning" also provides a gentle introduction to the basic syntax
jwatzman|work has joined #ocaml
<Drup> thomasga: the work flow for opam-release is weird if you don't have a separate fork
ncthom91 has joined #ocaml
tnguyen has quit [Ping timeout: 258 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<tjscanlo_> thanks apache! ill be sure to check it out
Haudegen has joined #ocaml
<thomasga> Drup: yes, thats my workflow :p
<thomasga> I do not plan to release it in opam-repository (at least in its current form)
<thomasga> it's really my release scripts (which might be useful to others as well)
inf-gropeoid has joined #ocaml
<Drup> thomasga: I have similar script for oasis in almost all my projects, yeah
<Drup> not integrated with opam-publish though
<thomasga> could be interesting to integrate all of this
<thomasga> I used to patch the Makefile, I prefer a separate tool now
<Drup> whitequark also has something similar, based on the local opam file
<thomasga> that's a good idea
<thomasga> yea, I saw whitequark scripts, they are based on opam-query
<thomasga> could be a good base too
<Drup> (the oasis one is a bit specific, since it's creating the tag on a orphaned commit in the repository ...)
badkins has joined #ocaml
A1977494 has joined #ocaml
A1977494 has quit [Client Quit]
<tjscanlo_> wow opam is really nice
MrScout_ has joined #ocaml
kushal has quit [Ping timeout: 272 seconds]
kdas_ has joined #ocaml
MrScout has quit [Ping timeout: 256 seconds]
MrScout_ has quit [Ping timeout: 256 seconds]
badkins has quit []
kdas_ has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
rishabhjain has joined #ocaml
lobo has joined #ocaml
Kakadu has quit [Quit: Page closed]
blandflakes has joined #ocaml
<flux> tjscanlo_, don't forget to install aspcud or the cloud version of it :)
inf-gropeoid is now known as arcsinine-pyon
<tjscanlo_> http://cudf-solvers.irill.org/index.html is this the cloud version?
tnguyen has joined #ocaml
<Drup> yes
<flux> it really should be available as an opam package :)
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<tjscanlo_> awesome, thanks!
<flux> or even built-in..
tane has quit [Quit: Verlassend]
rishabhjain has quit []
robink has quit [Ping timeout: 248 seconds]
<cml> is there any ocaml function that gets machine's interface ip address?
<Drup> look at the Unix module
freling has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<flux> I think the you need some package for that, though
<flux> the function you want is getifaddrs
<flux> I have an implementation if you just want it integrate something into your project
<cml> great!
<flux> if not, then it looks like extunix has it
<flux> https://www.modeemi.fi/~flux/software/git/sitemapper.git/ and getifaddrs-c.c and getifaddrs.ml
robink_ has joined #ocaml
<cml> thanks
matason has quit []
slash^ has quit [Read error: Connection reset by peer]
ollehar1 has quit [Ping timeout: 252 seconds]
matason has joined #ocaml
thomasga has quit [Ping timeout: 250 seconds]
robink_ has quit [Ping timeout: 244 seconds]
yomimono has quit [Ping timeout: 258 seconds]
pragm has joined #ocaml
robink_ has joined #ocaml
pragm has left #ocaml [#ocaml]
hay207 has joined #ocaml
swgillespie has joined #ocaml
robink_ is now known as robink
matason has quit []
sh0t has quit [Ping timeout: 256 seconds]
Kakadu has joined #ocaml
hsuh has quit [Ping timeout: 245 seconds]
hsuh has joined #ocaml
MrScout has quit [Remote host closed the connection]
Hetu has joined #ocaml
dtscode is now known as bulbasaur
arcsinine-pyon is now known as pyon-classifier
Submarine has quit [Remote host closed the connection]
wraithm has joined #ocaml
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
tjscanlo_ has quit [Ping timeout: 244 seconds]
tjscanlon has joined #ocaml
tjscanlon has quit [Client Quit]
tjscanlon has joined #ocaml
enquora has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sh0t has joined #ocaml
_andre has quit [Quit: leaving]
<tjscanlon> which text editor has the best plugins for working with ocaml?
<tjscanlon> i know emacs blows vim out of the water for clojure but not so sure about ocaml
<tjscanlon> and want to make sure i'm in the best environment :)
tjscanlon has quit [Read error: Connection reset by peer]
<smondet> tjscanlon: Merlin and `ocp-indent` work with both vim and emacs (and others like sublime i think). Emacs had historically better support for OCaml but it's not the case any more.
tjscanlon has joined #ocaml
<smondet> tjscanlon: Merlin and `ocp-indent` work with both vim and emacs (and others like sublime i think). Emacs had historically better support for OCaml but it's not the case any more.
<tjscanlon> awesome, thank you!
Cyanure has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasga has joined #ocaml
tjscanlon has quit [Read error: No route to host]
tjscanlon has joined #ocaml
tjscanlon has quit [Read error: Connection reset by peer]
freling has quit [Quit: Leaving.]
t4nk648 has quit [Ping timeout: 246 seconds]
MrScout has joined #ocaml
bulbasaur is now known as PaulMaudib
tjscanlon has joined #ocaml
Hetu has quit [Remote host closed the connection]
hay207 has quit [Quit: Leaving]
matason has joined #ocaml
PaulMaudib is now known as dtscode
sh0t has quit [Ping timeout: 258 seconds]
sh0t has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Read error: Connection reset by peer]
mort___1 has joined #ocaml
<tjscanlon> Is the recommended way to run an ocaml file 'ocaml < file.ml'?
<tjscanlon> for testing of course :)
<tjscanlon> Or should I just be compiling and running the binary?
hasket has joined #ocaml
sh0t has quit [Ping timeout: 265 seconds]
<companion_cube> ocaml file.ml works too
ollehar1 has joined #ocaml
<ollehar1> test
<ollehar1> to ask again: possible to run eliom as cgi?
<Drup> No.
jeffmo has quit [Quit: jeffmo]
Gama11 has quit [Read error: Connection reset by peer]
tmtwd has quit [Ping timeout: 265 seconds]
matason has quit []
<dmbaturin> These days everything is run behind a frontend web server it seems/
<dmbaturin> tjscanlon: You can use 'ocaml file.ml' or use '#!/usr/bin/env ocaml' in the file.
<ollehar1> ok thanks
<ollehar1> there will be no separation of ocsigen and eliom?
<ollehar1> I mean, factorization or modularization or what to call it
<Drup> it may happen
<ollehar1> hm ok
<ollehar1> so it's possible?
<Drup> the client stuff is already quite independent from the webserver
<Drup> well, not all of it
<ollehar1> ok
<Drup> dmbaturin: half of eliom's concept don't even make sense if you don't have your own web server to implement them, so ...
<ollehar1> hm hm
<dmbaturin> Drup: I still haven't looked into eliom (although I should). It was a generic "CGI is dead" note.
<Drup> CGI is crap.
<ollehar1> fastcgi too?
<Drup> it always have been, but :php:
<ollehar1> can't afford fastcgi, only use cgi :(
<Drup> (and perl, tbf)
<dmbaturin> Afford?
MercurialAlchemi has quit [Ping timeout: 256 seconds]
<dmbaturin> In terms of total cost of ownership, CGI is quite pricy. :)
<ollehar1> yeah, I should get a virtual server somewhere
<ollehar1> actually, I might afford
<ollehar1> I couldn't afford when I was a student
<dmbaturin> digitalocean.com , for instance. Starting at $5/month.
<ollehar1> heh, purple link in google
<ollehar1> don't remember, though
* dmbaturin is not affiliated with digitalocean, the above note is provided as a top of the head example and may not be appropriate for your needs or appealing
<ollehar1> :)
<ollehar1> well, the commitment feels bigger if you use a complete stack, and just can't plug it in your existent solution
<Drup> you can even find non-virtual servers for $5/month, and you can put pretty much whatever you want on it
<ollehar1> *have to use
<Drup> well, 5€
<ollehar1> really?
<dmbaturin> Drup: Where, and what hardware? ARM boards?
<ollehar1> ps4 boards ^^
<ollehar1> what does eliom do that requires it's own server?
<ollehar1> if not too big question at this hour
shinnya has joined #ocaml
<Drup> ollehar: do you know about eliom at all or not ?
<Drup> dmbaturin: bonus point, you get a fabulous host name (like mine)
<ollehar1> seems cool, that link
<dmbaturin> Drup: poneytelecom.eu ?
<ollehar1> saying I should read more about eliom first? ;)
<Drup> dmbaturin: yes :3
<Drup> ollehar: that would be quicker, yes.
<ollehar1> yeah, if it's online anyway, then...
<dmbaturin> I prefer virtual servers, for multiple reasons (easier RAM expansion, console and remote reset is always available etc.).
<Drup> the flip side is the lack of control over the running environment.
<dmbaturin> If hosters used real grown-up SANs, disk space expansion would also be easier, but most of them store VM data right on hypervisors.
<Drup> (damn noisy roomates)
<dmbaturin> Drup: Why? There are hosters who let you boot it from any ISO (e.g. openitc.co.uk), in other the selection of distros is usually enough for most practical purposes.
<ollehar1> night
ollehar1 has quit [Quit: ollehar1]
<Drup> dmbaturin: most of very cheap virtual env don't offer that
<dmbaturin> Real virtualization is mostly as cheap as containers now anyway. I think openvz will die off soon.
<Drup> (and soon, we will run all our ocaml thingy on mirage and will only need something that holds mirage microkernels :D)
<dmbaturin> In openvz heyday it was definitely true, now even the cheapest hosters are KVM/Xen/VMware.
<dmbaturin> Drup: We'll still need a bigger OS to store the data and, optionally, run the database server. :)
tnguyen has quit [Quit: tnguyen]
lobo has quit [Quit: leaving]
Hannibal_Smith has quit [Quit: Leaving]
Simn has quit [Read error: Connection reset by peer]
<Drup> store everything in irmin :p
<dmbaturin> Sometimes I wonder if it's feasible to write a multitasking ML OS with a system-wise garbage collector like that of lisp machines.
<dmbaturin> * system-wide
mort___ has joined #ocaml
mort___1 has quit [Read error: Connection reset by peer]
<tjscanlon> What is the preferred syntax? [h]@t or h::t where h is the head and t is the tail
ncthom91 has joined #ocaml
<cmtptr> I didn't even know you could do the first one
<zozozo> tjscanlon: i'd say h :: t is the preferred syntax
struktured has quit [Ping timeout: 256 seconds]
<Drup> tjscanlon: It's not equivalent
<Drup> or rather
<dmbaturin> tjscanlon: x :: xs is creating a new constructor, ans it's O(1).
<Drup> [h]@t is really (h::[])@t
<Drup> I'll let you ponder the performance implications.
<cmtptr> will you let me ponder it too?
<Drup> cmtptr: only when you rename yourself to cmtref :D
<cmtptr> oh . . . .
<dmbaturin> cmtptr: No! Drup will mutate your contents!
<cmtptr> gross
<Drup> dmbaturin: he can already mutate, he is a ptr.
<tjscanlon> Thank you!
<Drup> Worse, he can dereference. :<
<dmbaturin> If I have two modules that share some common functions but the difference cannot be functorized, is it fine to move the common part to a third module and include it in both?
<Drup> seems fine to me.
rgrinberg has quit [Ping timeout: 265 seconds]
<dmbaturin> Specifically, the common part is polymorphic, but specific parts are not.
<dmbaturin> If there were no functions unique to specific type/use of the datastructure, I'd make it a functor.
<tjscanlon> So Jane Street's Core.Core_list has tail return 'a list option
<tjscanlon> And some functions are expecting 'a list
<tjscanlon> What is the solution to an issue like that?
<tjscanlon> Would it be using 'get'?
<dmbaturin> match xso with Some xs -> do things with a list | None -> do thing when list is empty
<Drup> tjscanlon: have you been introduced to the fabulous thing that is pattern matching yet ? :p
<tjscanlon> Ahhh, thank you!
<tjscanlon> I have but I did not think to use it.
<dmbaturin> In every ambiguous situation, use pattern matching.
<tjscanlon> Wow, that's very clean
<bitbckt> and angel just got their wings.
<bitbckt> an*
<tjscanlon> Is there a faster way to type something like this? http://pastie.org/private/8u7ukpefnmakz1xuoavs4w I feel like I may repeat it a bit
<Drup> my suggestion was actually to pattern match the list instead of calling tail.
<dmbaturin> tjscanlon: Normally, you don't check if list has tail or not with a separate function, you just match it against patterns you expect.
<tjscanlon> Ahh. I was working on a palindrome function and I believe it tl (maybe it was rev?) that returned the option
<dmbaturin> Such as (x :: xs) for any non-empty list, [] for an empty list, (x :: x' :: xs) for a list with at least two items etc.
<tjscanlon> Let me paste my code for some clarity... http://pastie.org/private/tcp8hgt6jgztmjq0sjmna
<tjscanlon> I could be doing something completely wrong too
<tjscanlon> I originally had ls @ tl (rev lst) and the error was popping up
rand000 has quit [Ping timeout: 272 seconds]
<tjscanlon> Oh! I think Iget what you're saying
<tjscanlon> http://pastie.org/private/y4daoxfmd1gbuobxz7ocw would this be the correct solution?
<Drup> that's not equivalent
<tjscanlon> Hmmm
<Drup> first version, you call rev then tail
<Drup> second, you take the tail then rev
<tjscanlon> oh yea!
<Drup> (otherwise, yes)
<tjscanlon> So I match on rev lst
<tjscanlon> and just remove the rev from the output
<tjscanlon> Awesome
MrScout has quit [Remote host closed the connection]
<tjscanlon> Thanks for putting up with me everyone :)
rgrinberg has joined #ocaml
<Drup> rgrinberg: I'm very disapointed in your lack of bikeshedding
rand000 has joined #ocaml
<tjscanlon> You beat me to my next question :)
thomasga has quit [Quit: Leaving.]
<Drup> dmbaturin: that is more complicated, but not really better ...
<Drup> (List.combine kills everything)
<Drup> List.combine probably even makes it worse.
<tjscanlon> My original is_palindrome looked like this https://bpaste.net/show/5f1172b771e6
<tjscanlon> So I'm rewriting it now to be compatible with Jane Street Core
<Drup> It is not like that ?
<tjscanlon> No, I get the option error
<dmbaturin> Drup: What's wrong with combine, apart from performance?
<rgrinberg> Drup: i'm disappointed in it myself :/
<Drup> dmbaturin: performance.
<Drup> (and it's useless here)
<tjscanlon> 'This expression has type 'a option
<tjscanlon> but an expression was expected of type 'b list'
<Drup> (just pattern match on the couple ...)
<Drup> dmbaturin: basically, the whole thing is really overcomplicated ...
<dmbaturin> Drup: Well, true.
<rgrinberg> Drup: drop your ppx already so i can merge :P
<Drup> rgrinberg: okay
<Drup> rgrinberg: not a single thing to rename
<Drup> I'm very disappointed in all of you :(
<Drup> (done)
<rgrinberg> Drup: i had a bit of a dream last night where i imagined you could make re resumable efficiently (and without too much efforts) using the new effects.
<rgrinberg> Rather than just raising on a match failure
<rgrinberg> you use an effect to allow the matching the resume with a re-filled string
<Drup> Do you even dream of modifying ocaml libraries in your sleep ?
<dmbaturin> tjscanlon: What's your motivation for starting with core?
<Drup> s/even/often/
<tjscanlon> I'm following "Real World OCaml" and it uses core
<Drup> but yes, it looks like an interesting idea
<dmbaturin> Rather than dream of modifying libraries, you can dream of libraries being already modified.
<rgrinberg> Drup: you don't want to hear about the nightmares
<rgrinberg> Drup: this is already possible with delimcc i bet, but it's probably too slow to be useful
<dmbaturin> Speaking of which, I should get some sleep. Even the code I produce suggests it it seems.
walter|r has joined #ocaml
<rgrinberg> I don't see this needing a multishot continuation so effects could work
madroach has quit [Ping timeout: 264 seconds]
<rgrinberg> dmbaturin: good night
madroach has joined #ocaml
<rgrinberg> companion_cube: core_kernel has regained the unix depenedncy
<rgrinberg> long live containers!
<Drup> rgrinberg: is there a reason ?
<rgrinberg> for what?
<Drup> "regaining the unix dependency"
<rgrinberg> nope just pure slopiness
<rgrinberg> and not giving a damn
<rgrinberg> by the powers taht be
<rgrinberg> they're gonna fix it though
<rgrinberg> looks like hhugo will save us again though
rand000 has quit [Quit: leaving]
<rgrinberg> regardless i'm gonna drop core out of opium :/
<Drup> rgrinberg: considering he contributed the async stuff in jsoo, I guess he cares a bit about this kind of crap
kdef has quit [Quit: Leaving]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jwatzman|work has quit [Quit: jwatzman|work]
<rgrinberg> Drup: did you see infer? who is responsible for this :P
<Drup> I saw infer, see backlog
<rgrinberg> backlog?
<rgrinberg> theblatte: cheers!
<theblatte> :)
<theblatte> (also, we're on #infer)
tnguyen has joined #ocaml
<rgrinberg> theblatte: are you guys reusing the frontents in pfff?
<tjscanlon> Hmmm so I can't figure out how to use Core's list length function
<theblatte> rgrinberg: we don't run on php code
<tjscanlon> length [1;2;3;4;];; Error: This variant expression is expected to have type 'a option The constructor :: does not belong to type option
<tjscanlon> length (Some [1;2;3;4;]);; - : int = 1
<theblatte> we do java (with javalib), and C and objc (clang + facebook-clang-plugin)
<rgrinberg> tjscanlon: post your full code
<tjscanlon> That was everything ran in utop
<rgrinberg> theblatte: Ah. so you don't do your own parsing
<tjscanlon> open Core.Core_lst open Core.std and open Core.option are in my ocamlinit
<rgrinberg> tjscanlon: what's the type of length? try # length ;;
<tjscanlon> - : 'a option -> int = <fun>
<rgrinberg> tjscanlon: don't open list or option, only std
<theblatte> rgrinberg: that would be borderline crazy for C/ObjC :)
sivoais has joined #ocaml
<rgrinberg> tjscanlon: that's your problem. length = Option.length for you
<tjscanlon> How do I use methods from Core_list then?
pyon-classifier has quit [Quit: fix config]