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
<rgrinberg> shouldn't be a problem
<rgrinberg> Algebr: how are you running this program? In the top level?
<rgrinberg> From what I can tell, you should be using Lwt.catch rather than try/catch
<rgrinberg> common gotcha with lwt
<Algebr> I tried it without try/catch and still not working correctly. I used top level and compiled. It basically hits the .call and exits immediately.
yminsky has quit [Quit: yminsky]
<rgrinberg> Algebr: can you give me an example invocation?
<rgrinberg> of your fetch function
tel has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tel has joined #ocaml
<Algebr> rgrinberg: side question, is there a way for me to give a Request.t and have cohttp do that request rather than having to go through Client related module?
<rgrinberg> what do you mean "do that request"
<Algebr> I made a Request.t and some function in cohttp processes that request
<Algebr> make&
<rgrinberg> Isn't that exactly what the client module does?
<rgrinberg> or do you mean in a repl sort of way?
<Algebr> no, I don't see a function that takes a Request.t and gives back (Response.t * Body.t)
<rgrinberg> oh ok, we'll have something similar soon enough
<rgrinberg> Algebr: paste this into your top level
<rgrinberg> Cohttp_lwt_unix.Client.call `GET (Uri.of_string "http://www.reddit.com") >|= snd >>= Cohttp_lwt_body.to_string >|= Lwt_io.printl;;
<rgrinberg> does that work?
<Algebr> No, I need to add custom headers, like that github issue has as well.
<rgrinberg> so just add them, into call ~headers
<rgrinberg> one reason your code might appear not to work is because th body is empty
<rgrinberg> perhaps because you were returned a redirect
joncfoo has quit [Ping timeout: 245 seconds]
<Algebr> no, I tried putting print_endlines in the fun (resp, body)-> function and none of them were printed.
swgillespie has joined #ocaml
<rgrinberg> Algebr: please paste a version of your program that I can compile and execute
avsm has quit [Quit: Leaving.]
swgillespie has quit [Write error: Connection reset by peer]
swgillespie has joined #ocaml
<Algebr> rgrinberg: http://pastebin.com/8DD38hyU
boogie has quit [Remote host closed the connection]
swgillespie has quit [Client Quit]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
<Algebr> I know that using opam pin lets me use a local version of a package, but how can I rebuild that package with -g on? Do I need to fiddle with each pacakge's makefile or is there a higher level thing via opam/
swgillespie has joined #ocaml
<seangrove> So I'm running `ocamlfind ocamlc -I src/ -package core,threads -thread src/json.ml` => File "src/json.ml", line 1: Error: Error while linking src/json.cmo: Reference to undefined global `Core'
swgillespie has quit [Client Quit]
<seangrove> src/json.ml is just https://www.refheap.com/98780
<seangrove> (from the RWO on Menjir)
<seangrove> Menhir*
ZenosDance has quit [Ping timeout: 265 seconds]
<Algebr> seangrove: you probably need to add to ocamlc -linkpkg
boogie has joined #ocaml
<seangrove> Algebr: Yup, looks like that was it
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
badkins has quit [Remote host closed the connection]
swgillespie has joined #ocaml
reem_ has joined #ocaml
reem has quit [Read error: Connection reset by peer]
rwmjones has quit [Read error: Network is unreachable]
swgillespie has quit [Client Quit]
rwmjones has joined #ocaml
pii4 has quit [Ping timeout: 245 seconds]
rwmjones has quit [Read error: Network is unreachable]
<rgrinberg> Algebr: change the last line to fetch () |> Lwt_main.run
rwmjones has joined #ocaml
yminsky has joined #ocaml
ghostpl_ has joined #ocaml
yminsky_ has joined #ocaml
AlexRussia has quit [Ping timeout: 246 seconds]
swgillespie has joined #ocaml
<Algebr> rgrinberg: yay, that worked, at least getting me somewhere now.
<Algebr> rgrinberg: will more headers be added by call even though I provided headers?
<rgrinberg> Algebr: unfortunately, yes
<rgrinberg> we're looking to mend that situation in the issue I've linked above
swgillespie has quit [Client Quit]
<Algebr> grr..
AlexRussia has joined #ocaml
<rgrinberg> You should express your concern in that issue btw to speed up fixing it
<rgrinberg> it's really simple to fix, nobody's requested it until recently
ghostpl_ has quit [Ping timeout: 245 seconds]
swgillespie has joined #ocaml
ChristopheT has quit [Ping timeout: 246 seconds]
cesar_ has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
swgillespie has quit [Ping timeout: 245 seconds]
cesar_ is now known as Guest55246
tianon has joined #ocaml
swgillespie has joined #ocaml
yminsky_ has quit [Quit: yminsky_]
swgillespie has quit [Client Quit]
ZenosDance has joined #ocaml
reem_ is now known as reem
shum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Guest55246 has quit [Remote host closed the connection]
swgillespie has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kdef has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 246 seconds]
myst has quit [Read error: Connection reset by peer]
swgillespie has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
marynate has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
darkf has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest57237
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
kdef has joined #ocaml
swgillespie has quit [Read error: Connection reset by peer]
Guest57237 has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
oriba_ has quit [Quit: Verlassend]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
badkins has joined #ocaml
badkins has quit [Ping timeout: 256 seconds]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 265 seconds]
idegen has quit [Ping timeout: 246 seconds]
dant3 has joined #ocaml
waneck has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 245 seconds]
<seangrove> Running `ocamlfind ocamlc -package js_of_ocaml -package omd -package menhirlib -package core -only-show` => `ocamlfind: Error from package `threads': Missing -thread or -vmthread switch` - I'm ultimately trying to get this to compile/run with js_of_ocaml, but I think if I add -thread to fix the error, then it won't run
<seangrove> Why is it trying to compile the threads package in?
siddharthv_away is now known as siddharthv
<seangrove> Looks like it's the core package that's (possibly?) pulling in the threads package
<seangrove> Also looks like I'll have to remove Core from my code entirely, since it's not compatible with js_of_ocaml
marynate has quit [Ping timeout: 246 seconds]
tianon has quit [Read error: Connection reset by peer]
marynate has joined #ocaml
tianon has joined #ocaml
marynate has quit [Ping timeout: 252 seconds]
marynate has joined #ocaml
boogie has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest80353
virtualeyes has joined #ocaml
kdef has quit [Quit: Leaving]
Guest80353 has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Ping timeout: 244 seconds]
girrig has left #ocaml ["Leaving"]
rgrinberg has joined #ocaml
ggole has joined #ocaml
monoprotic is now known as BOERING
rgrinberg has quit [Ping timeout: 264 seconds]
Algebr has joined #ocaml
rgrinberg has joined #ocaml
tel has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 264 seconds]
claudiuc has quit [Remote host closed the connection]
virtualeyes is now known as nullremains
tel has joined #ocaml
claudiuc has joined #ocaml
ghostpl_ has joined #ocaml
tel has quit [Remote host closed the connection]
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
psy_ has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Ping timeout: 264 seconds]
BOERING is now known as monoprotic
ggole has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
reem has quit [Remote host closed the connection]
ggole has quit [Ping timeout: 252 seconds]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
ggole has joined #ocaml
claudiuc has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
boogie has quit [Remote host closed the connection]
pobivan has joined #ocaml
bjorkintosh has joined #ocaml
reem has joined #ocaml
Bhavya has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest56102
Guest56102 has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
reem has quit [Remote host closed the connection]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
antkong has quit [Quit: antkong]
antkong has joined #ocaml
antkong has quit [Client Quit]
ghostpl_ has joined #ocaml
reem has joined #ocaml
Bhavya has quit [Quit: Quit the channel]
ghostpl_ has quit [Ping timeout: 265 seconds]
Bhavya has joined #ocaml
reem has quit [Remote host closed the connection]
avsm has joined #ocaml
reem has joined #ocaml
ZenosDance has quit [Ping timeout: 265 seconds]
oscar_toro has quit [Ping timeout: 256 seconds]
robink has quit [Ping timeout: 244 seconds]
reem has quit [Remote host closed the connection]
robink has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
avsm has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
reem has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
dinosaure2 is now known as dinosaure
reem has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 264 seconds]
oscar_toro has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
reem has joined #ocaml
dant3 has quit [Ping timeout: 256 seconds]
ollehar1 has joined #ocaml
ollehar1 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
reem has quit [Remote host closed the connection]
siddharthv is now known as siddharthv_away
reem has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest66316
antkong has joined #ocaml
Guest66316 has quit [Ping timeout: 265 seconds]
ghostpl_ has joined #ocaml
antkong has quit [Ping timeout: 252 seconds]
dsheets has quit [Ping timeout: 265 seconds]
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
AltGr has joined #ocaml
axiles has quit [Quit: Quitte]
<Leonidas> AltGr: oops, sorry for the duplicate PR.
avsm has joined #ocaml
<AltGr> NP, thank you for submitting anyway :)
freling has joined #ocaml
NhanH has joined #ocaml
dav has joined #ocaml
Simn has joined #ocaml
sivoais has quit [Ping timeout: 264 seconds]
pyon is now known as pyon-ography
ghostpl_ has joined #ocaml
sivoais has joined #ocaml
sivoais has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
tianon has quit [Read error: Connection reset by peer]
sivoais has joined #ocaml
tianon has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
matason has joined #ocaml
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
xificurC has joined #ocaml
<xificurC> I remember someone asking if JS will move sexplib to ppx
matason has quit [Ping timeout: 272 seconds]
dav has quit [Ping timeout: 265 seconds]
ollehar1 has joined #ocaml
rgrinberg has joined #ocaml
larhat has joined #ocaml
matason has joined #ocaml
yomimono has quit [Ping timeout: 252 seconds]
tianon has quit [Read error: Connection reset by peer]
rgrinberg has quit [Ping timeout: 264 seconds]
fedjo has quit [Ping timeout: 246 seconds]
tianon has joined #ocaml
cr7_ has joined #ocaml
fedjo has joined #ocaml
cr7_ has quit [Quit: Page closed]
kakadu has joined #ocaml
ollehar1 has quit [Remote host closed the connection]
sivoais has quit [Remote host closed the connection]
sivoais has joined #ocaml
welterde has quit [Ping timeout: 265 seconds]
<xificurC> reddit links to this article http://queue.acm.org/detail.cfm?id=2038036 and I fail to understand why people still refer to lisp as functional. Is OCaml a functional language? It is multi-paradigm, and so is the lisp language family
cesar_ has joined #ocaml
* xificurC rants
cesar_ is now known as Guest95207
marynate has quit [Ping timeout: 255 seconds]
Guest95207 has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
<MercurialAlchemi> xificurC: what is a "functional language"? there is no agreed-upon definition
johnelse is now known as johnel_away
johnel_away is now known as johnelse
badkins has joined #ocaml
dsheets has joined #ocaml
avsm has joined #ocaml
badkins has quit [Ping timeout: 255 seconds]
yomimono has joined #ocaml
mort___ has joined #ocaml
welterde has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
reem has quit [Remote host closed the connection]
fedjo has quit [Ping timeout: 246 seconds]
oscar_toro has quit [Ping timeout: 272 seconds]
fedjo has joined #ocaml
<Leonidas> lisp is, among others, functional. also, depends on which lisp you look at, since there are at least 3 popular flavors
<Leonidas> xificurC: --^
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
AltGr has left #ocaml [#ocaml]
Haudegen has joined #ocaml
<q66> there are languages that are functional, and then there are languages that are dysfunctional (such as javascript)
* q66 ducks
claudiuc has quit [Ping timeout: 265 seconds]
sdothum has joined #ocaml
<xificurC> true there is no clear definition. I like to think this way though - if you do many side effects, your language of choice is probably not functional
<xificurC> CL and Emacs Lisp both use setf and friends extensively. Clojure is probably closest to being functional
<ggole> Scheme?
<companion_cube> yes, functional is more a style than a language feature
<companion_cube> althoug, some languages make it easier (or much harder) to use functional style
<xificurC> yes, scheme/racket too
<q66> should be called "expression based" rather than functional
<ggole> Clojure is an interesting case: it doesn't even guarantee TCO, but it contains many persistent data structures
<q66> and functional isn't really about avoiding side effects, that's pure functional
<companion_cube> it has special syntax to guarantee tce
<ggole> I guess the TCO thing is an implementation wrinkle that they would support if it wasn't for the JVM's baggage
<companion_cube> TCE*
<companion_cube> yes
<ggole> And doesn't 'recur' only work on the current definition?
<xificurC> yes recur is only for current definition as far as I remember
<xificurC> then there was trampoline, never understood that tbh
<q66> well, it DOES pretty much translate to a goto
<q66> so it's not like it COULD act outside of current definition
<q66> if you don't have builtin TCO in your VM you're gonna have a bad time implementing it otherwise
<companion_cube> I prefer the term TCE (tail call elimination), btw
<xificurC> still, I say - 1) don't call Lisp a *language*, it's a family of languages; 2) don't say it's functional unless you explain what you mean or back it up with some information
<companion_cube> it's not an optimization but a change in semantic
<q66> TCO is the name, TCE is the process
<q66> but whatever
<q66> use whatever you want
<q66> as long as it's understood
<xificurC> I remember what #python told me on TCO - "rewriting your recursive function to a while loop is TCO"
<q66> lol
<companion_cube> TCO is a bad name, that's my point
<companion_cube> because it's really not an optimization: having it changes the semantic of the language
<ggole> It doesn't matter as much as the volume of argument about it suggests it does, tbh
<q66> precise naming is hardly ever a thing
<ggole> Look at the ocaml stdlib
<Cypi> Do you say "Dead Code Optimization"? :-°
<q66> for example "dynamic typing" is a bad name too :P
ghostpl_ has quit [Remote host closed the connection]
<companion_cube> ggole: it matters a lot
<companion_cube> I mean, having it guaranteed by the language matters a lot
<q66> that depends
pii4 has joined #ocaml
<q66> it matters a lot in SOME languages
<companion_cube> in some languages (e.g., scheme) TCE is the only way you can loop
<companion_cube> yes
fedjo has quit [Ping timeout: 246 seconds]
<ousado> if you have a strong preference it matters a lot in all languages
ghostpl_ has joined #ocaml
<q66> e.g. in C having guaranteed tail call elimination would kinda suck
<xificurC> that reminds me of an interesting (at least for me) and complicated question - how many lines of code does the ocaml compiler (or toolchain) have?
<q66> because it fucks with debug info
<q66> makes the stack trace fairly unreadable sometimes
<ousado> that's exactly the python argument against TCE
<xificurC> I don't care for a precise number, just if its in 10k's, 100k's, M's, ...
larhat has quit [Quit: Leaving.]
<q66> in a high level language i still prefer having guaranteed tail call elimination
<ousado> xificurC: git clone + sloccount?
<q66> for example in Lua it is guaranteed
fedjo has joined #ocaml
<q66> and I kinda like it
<q66> (even though the language is fairly imperative)
<ousado> mutual tail calls?
<ousado> or just self-recursive tail calls?
larhat has joined #ocaml
<ggole> lua guarantees TCE entirely, I belive
<q66> yes
<ggole> So you can do CPS style things if you like
<ggole> No need for the call to be known
<companion_cube> in OCaml, TCE is crucial
<xificurC> ocaml still on svn, interesting
rgrinberg has joined #ocaml
_andre has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
<xificurC> for those interested in lines of code + languages used
<xificurC> (for ocaml's github repo)
<xificurC> when I asked the same question in #racket they said they are well into couple millions
th0br0 has joined #ocaml
<ggole> Racket contains a fair amount of stuff as well as the language (IDE, libraries, etc)
<th0br0> Hey, a quick question: is there something like Scala's or Clojure's symbols in OCaml?
lordkryss has joined #ocaml
<kakadu> th0br0: Never heard about something like this in OCaml
<kakadu> http://daily-scala.blogspot.ru/2010/01/symbols.html is somebody there is curious
cesar_ has joined #ocaml
<xificurC> ggole: true
cesar_ is now known as Guest49139
<th0br0> Kakadu: mmh, too bad. Guess I'll just have to do something similar on my own then.
Guest49139 has quit [Ping timeout: 256 seconds]
<yminsky> You can always create a new symbol using an open variant.
<yminsky> type symbol = ..
<yminsky> type symbol += Foobar
<yminsky> And of course you can then put arguments on them if you want:
<yminsky> type symbol += Symbol_with_int of int
<kakadu> I think Scala's symbols are a little bit about other topic :)
ollehar has quit [Quit: ollehar]
ollehar has joined #ocaml
ollehar has quit [Remote host closed the connection]
<yminsky> What's the functional difference? I guess symbols have direct useful functionality like hashing and comparison. Not sure if that could be readily added to an open type....
thomasga has quit [Quit: Leaving.]
<ggole> Lisp symbols have (sometimes mutable, depending on the Lisp) fields
<ggole> In CL or emacs lisp they're more like canonical records than just a static string
<ggole> OCaml doesn't really have anything like that built in, although of course you can program one.
<yminsky> That's quite different. Are they like that in scheme too?
<ggole> Less so in scheme.
<ggole> You can still get the name as a string, but that's about it.
<yminsky> Yeah, this is now of a library idiom than a language feature
<yminsky> (Now -> more)
<ggole> Well, symbols are part and parcel of s-expressions. This is something built deeply enough into lisps that I'm not sure that they should be understood as a library.
<ggole> Although in OCaml that isn't really a concern.
thomasga has joined #ocaml
freling has quit [Quit: Leaving.]
ollehar has joined #ocaml
ousado has quit [Ping timeout: 255 seconds]
avsm has quit [Quit: Leaving.]
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
myyst has joined #ocaml
ptc has joined #ocaml
<ggole> In or-patterns, does the first take precedence?
<ousado> ggole: what do you mean?
ptc has quit [Read error: Connection reset by peer]
tianon has quit [Read error: Connection reset by peer]
ptc has joined #ocaml
tianon has joined #ocaml
thomasga has quit [Quit: Leaving.]
<ggole> Is it 'first applicable match'
<ggole> Which is the only sane thing, really, so I'll just assume it is
ptc has quit [Ping timeout: 245 seconds]
badkins has joined #ocaml
rgrinberg has joined #ocaml
badkins_ has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
badkins has quit [Ping timeout: 272 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<xificurC> anyone uses ocaml on windows? Wondering if I should use the cygwin port or ocpwin for win
<adrien_znc> or the binaries from caml.inria.fr
<adrien_znc> the cygwin port makes executables that run on cygwin
<xificurC> there's 3 cygwin options listed in the installation page of the ocaml docs
<xificurC> I guess this is another option again
idegen has joined #ocaml
axiles has joined #ocaml
<ousado> I'm trying to find an easy way to install ocaml+opam from time to time
<ousado> so far I didn't have luck
<ousado> the ocpwin install is sufficient to compile haxe + dependencies, however (which is why I'm interested in ocaml on windows at all)
cesar_ has joined #ocaml
sivoais has quit [Ping timeout: 250 seconds]
cesar_ is now known as Guest84721
sivoais has joined #ocaml
<xificurC> how does haxe compare to ocaml?
Guest84721 has quit [Ping timeout: 256 seconds]
struktured has quit [Ping timeout: 256 seconds]
<ousado> it's somewhat inspired by ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<ousado> looks like ecmascript, good type system, has better built-in metaprogramming support (easy access to the typed AST), but also a number of weak spots, partially due to target platform limitations
<ousado> it's not easy to describe, it's very versatile and powerful in many ways
<ousado> I'd suggest to take a look
<xificurC> ousado: target platform? I see it compiles to all kinds of sources
<ousado> yes
<ousado> implementing certain cross-target features doesn't get simpler when JS and PHP are on the list of your supported languages
<xificurC> why target php, isn't js enough?
<ousado> not if you want to target php :)
<ousado> and there are people who do, apparently
<ousado> simple examples are e.g. supporting unsigned integers, or 64 bit integers
<ousado> sometimes the overhead is prohibitive. But haxe tries to give access to all features of a respective target language
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
flixr has joined #ocaml
kaustuv has joined #ocaml
<flixr> Hi guy
<flixr> Hi guys
<flixr> I'm currently trying to replace our old Makefile based build system with ocamlbuild, which works great except that I'm wondering how I can choose a different extension than .byte (e.g. .out as is the default with ocamlc)
<kaustuv> I asked this during the weekend at an odd time so let me try again: anyone know why this error happens? http://pastebin.com/hBuwTQpS
<kaustuv> flixr: try .native instead of .byte
<flixr> I tried to specify -lflag "-o foo.out", but it still adds the "-o foo.byte" at the end and I get it with .byte again
<flixr> but I don't want native code, I just want to specify the extension...
<adrien_znc> flixr: you cannot do that easily
<kaustuv> mv foo.byte foo.out
<adrien_znc> several options
<adrien_znc> by hand ^
freling has joined #ocaml
<adrien_znc> or tell it to not create the symlink and make it yourself (look inside _build)
<flixr> hm... that is a shame
<adrien_znc> or myocamlbuild.ml to add a small rule to get the right name
<flixr> yeah, though about just creating the symlinks myself....
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
rgrinberg has joined #ocaml
AlexRussia has quit [Quit: WeeChat 1.2-dev]
AlexRussia has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
badkins_ is now known as badkins
dsheets has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
AlexRussia has joined #ocaml
darkf has quit [Quit: Leaving]
shinnya has joined #ocaml
<cmtptr> this might sound like a stupid question, but is ocaml bytecode portable?
thomasga has quit [Quit: Leaving.]
tianon has quit [Read error: Connection reset by peer]
<Drup> as portable as the C primitives it uses
tianon has joined #ocaml
<Drup> (and you need an ocamlrun, obviously)
<cmtptr> by that, do you mean the ABI? or do you just mean "as long as the target's ocamlrun was compiled with it, it's fine?"
<ggole> bytecode is the same across machines
<Drup> the later
<ggole> But the format can change between ocaml (major?) versions
<Drup> I mean that you need an ocamlrun for your architecture
thomasga has joined #ocaml
<cmtptr> right
<cmtptr> thanks
dsheets has joined #ocaml
monoprotic is now known as daftykins
daftykins is now known as monoprotic
dsheets has quit [Read error: Connection reset by peer]
thomasga1 has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
thomasga has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
fraggle_ has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
<xificurC> is there an idiom on what to put in an unreachable match clause?
ptc has joined #ocaml
<adrien_znc> "assert false" :D
<adrien_znc> or leave it unmatched, it'll raise an exception with location data
<adrien_znc> (or maybe GADTs would help
<adrien_znc> )
thomasga has joined #ocaml
Algebr has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest2026
axiles has quit [Quit: Quitte]
<Algebr> When creating a functor, apparently the functor keyword isn't necessary?
Guest2026 has quit [Ping timeout: 256 seconds]
ptc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<companion_cube> Algebr: yes. module Foo(B : BAR) : FOO with type bar = B.t
ptc has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<Algebr> What is the use of that with type syntax?
<companion_cube> what do you mean? this is a type declaration
<companion_cube> the implementation would be module Foo(B : BAR) = struct .... end
<companion_cube> or module Foo(B : BAR) : S with type bar = B.t = struct ... end
<reynir> it's for type equalities IIRC
ptc has quit [Read error: Connection reset by peer]
<companion_cube> oh, «that "with type" syntax», right, sorry
<Algebr> yea
<Algebr> So as soon as a module takes an argument, then it counts as a functor?
<companion_cube> yes, it's to constrain types in module signatures
<companion_cube> yes, that is the definition of a functor
BitPuffin has quit [Ping timeout: 255 seconds]
ptc has joined #ocaml
BitPuffin has joined #ocaml
sepp2k has joined #ocaml
uris77 has joined #ocaml
<ggole> module Foo (B:Bar) ... is sugar for module Foo = functor (B:Bar) -> ... in the same way that let f x = ... is sugar for let f = fun x -> ...
<xificurC> what should I put in my _tags file to get what I get from ocamlbuild -use-ocamlfind -pkgs lwt.unix,lwt.ppx . So far I got <main.mli?>:
<whitequark> true: package(lwt.unix lwt.ppx)
<reynir> do you still have to specify -use-ocamlfind?
<whitequark> yes
<xificurC> whitequark: thanks. And if I want the packages only for specific files? If I'm compiling main.ml to native, should I add a rule for main.ml or main.native
tianon has quit [Read error: Connection reset by peer]
<whitequark> both
<whitequark> once for compiling, once for linking
rgrinberg has joined #ocaml
tianon has joined #ocaml
<xificurC> whitequark: thank you very much
rgrinberg has quit [Ping timeout: 265 seconds]
badkins has quit [Read error: Connection reset by peer]
vfoley- has joined #ocaml
<vfoley-> Is it possible to define a module in a .mli file? E.g. module IntSet = Set.Make(struct type t = int let compare a b = a - b end)
<ggole> No
<ggole> You can only give the type
<ggole> Same as for other values, really
<vfoley-> Is it possible then to give the module type?
<vfoley-> oh wait, that wouldn't work
<vfoley-> hmmm
<Leonidas> of course, mli files contain module signatures
<ggole> Yes: usually you will want to use with type
<ggole> module T : Set.S with type elt = int
<ggole> And in the .ml, module T = Set.Make (Int)
milosn has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
milosn has joined #ocaml
freling has quit [Quit: Leaving.]
`eeks has joined #ocaml
freling has joined #ocaml
pyon-ography is now known as temporary-pyon
MrScout has joined #ocaml
th0br0 has quit [Quit: leaving]
avsm has joined #ocaml
ptc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flixr> another question regarding ocamlbuild: if I create my own ocamlfind package for my internal lib and link it via "package(mylib)" in _tags, will my target be correctly rebuilt if mylib changes?
JuggleTux has joined #ocaml
<Drup> no
<Drup> but that's not how you do internal libraries anyway
<Drup> package(foo) is for external libraries only
<flixr> hm... ok
<flixr> well, it is not completely an internal lib (it is also used by some external progs), but most internal ones need it
<flixr> so it made sense to make it available as ocamlfind package...
<Drup> sure
<Drup> you can export multiple ocamlfind package with one codebase
<flixr> sure, we already do that...
<Drup> you can also make multiple small packages and each install it with ocamlfind/opam and manage it like that
<Drup> (then, you will have the whole recompilation stuff)
<flixr> but we also use the already built package internally for some other progs as well, so you would recommend to not do that?
<Drup> I would say: do multiple small libraries
<Drup> and use opam to manage everything
<Drup> (at least, that's my opinion without knowing what you are actually doing :p)
jwatzman|work has joined #ocaml
<flixr> ahm... that I don't understand now... I thought you don't get automatic recompilation if you use package(mylib) and mylib changes?
<Drup> not with ocamlfind
<Drup> but opam will do it for you
<flixr> ah, ok...
<Drup> if package A depends of package B
<Drup> A is recompiled when you recompile B
<Drup> of course, the level of granularity is not the same
olauzon has joined #ocaml
<flixr> that is not an option then... since I need recompilation of my programs when the lib changes. But I can't put these progs into opam
<adrien_znc> you can have private repos I think
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<Drup> managing with opam ≠ putting in the main opam repository
<flixr> that is not the issue... it's all open anyway.
<flixr> but thanks a lot for explaining!
<Drup> hum, no it's not
<Drup> you can put access restriction on your opam repository, and it will work fine
badkins has joined #ocaml
<flixr> that is not the issue... there are a lot of small binaries that live in a user tree (are also not in PATH), have lots of external dependencies and you might have multiple versions/trees simultaneously
hannes` has joined #ocaml
vfoley- has quit [Read error: Connection reset by peer]
hannes has quit [Ping timeout: 256 seconds]
itPuffinB has joined #ocaml
axiles has joined #ocaml
ptc has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
itPuffinB is now known as BitPuffin
hannes` is now known as hannes
cesar_ has joined #ocaml
cesar_ is now known as Guest46989
Guest46989 has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Remote host closed the connection]
tianon has quit [Read error: Connection reset by peer]
ollehar1 has joined #ocaml
tianon has joined #ocaml
itPuffinB has joined #ocaml
rks` is now known as trefis
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Client Quit]
temporary-pyon is now known as let-mut-pyon
BitPuffin has quit [Ping timeout: 256 seconds]
itPuffinB is now known as BitPuffin
Lasher` has joined #ocaml
uris77 has quit [Ping timeout: 265 seconds]
govg has joined #ocaml
slash^ has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
Anarchos has joined #ocaml
yomimono has quit [Ping timeout: 255 seconds]
ptc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kakadu has quit [Quit: Page closed]
dhil has joined #ocaml
badkins has quit []
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
mort___ has quit [Ping timeout: 265 seconds]
ptc has joined #ocaml
sepp2k_ has joined #ocaml
sepp2k has quit [Ping timeout: 264 seconds]
larhat has quit [Quit: Leaving.]
<cojy_> yminsky: btw that person yesterday got the proper answer in #mirage, avsm is working on an ssl proxy in mirage
ghostpl_ has joined #ocaml
Algebr has quit [Remote host closed the connection]
BitPuffin has quit [Ping timeout: 244 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
Bhavya has quit [Quit: Quit the channel]
JuggleTux has quit [Quit: leaving]
dsheets has quit [Ping timeout: 246 seconds]
JuggleTux has joined #ocaml
JuggleTux has left #ocaml [#ocaml]
JuggleTux has joined #ocaml
Haudegen has joined #ocaml
magthe has joined #ocaml
cesar_ has joined #ocaml
ptc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cesar_ is now known as Guest3542
oscar_toro has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
Guest3542 has quit [Ping timeout: 265 seconds]
ptc has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
AlexRussia has quit [Ping timeout: 264 seconds]
kakadu has joined #ocaml
Ptival has quit [*.net *.split]
_5kg has quit [*.net *.split]
mattrepl has quit [*.net *.split]
siddharthv_away has quit [*.net *.split]
osheeta has quit [*.net *.split]
thorsten` has quit [*.net *.split]
haesbaert has quit [*.net *.split]
vbmithr has quit [*.net *.split]
osheeta has joined #ocaml
mfp has quit [*.net *.split]
mlen has quit [*.net *.split]
bernardofpc has quit [*.net *.split]
so has quit [*.net *.split]
haesbaert has joined #ocaml
vbmithr has joined #ocaml
Ptival has joined #ocaml
siddharthv_away has joined #ocaml
bernardofpc has joined #ocaml
mattrepl has joined #ocaml
mfp has joined #ocaml
thorsten` has joined #ocaml
mlen has joined #ocaml
_5kg has joined #ocaml
dsheets has joined #ocaml
Submarine has joined #ocaml
magthe has quit [Ping timeout: 265 seconds]
Denommus has joined #ocaml
magthe has joined #ocaml
freling has quit [Quit: Leaving.]
mort___ has joined #ocaml
cthuluh has quit [Ping timeout: 250 seconds]
cthuluh has joined #ocaml
MattZen has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
<MattZen> HI folks. I'm having some trouble. I want to create a function "apply" which takes a signature like apply (fun x -> x * 2) 'mylist' .. I've created a compose function, like so "let compose f g = function x -> f ( g x ) and I use compose in my latter function :
<MattZen> let rec apply f ls = match ls with [] -> [] | hd :: tl -> compose f hd :: apply f tl
tianon has joined #ocaml
<MattZen> but for some reason it won't let me do what I want to do
<MattZen> I would like f to be any anonymous function I enter and apply it to each element if this is possible. Hope I'm not far off in thought.
tianon has quit [Client Quit]
<ggole> Hmm, why not just apply f to hd? You don't need compose for that.
<ggole> (By the way, this function is usually called 'map'.)
Haudegen has quit [Ping timeout: 250 seconds]
<cmtptr> it also already exists as List.map
<MattZen> map exactly. that's what I'd lke to do but implement
<MattZen> as an exercise to see how it works
<ggole> Well, you're pretty close
<MattZen> hmm think I got it
<MattZen> you're right, absolutely not necessary to have compose
rwmjones has quit [Read error: Network is unreachable]
<MattZen> thanks mate.
<MattZen> Pfft me just trying to make it more complicated than it needs to be :p
rwmjones has joined #ocaml
<cmtptr> isn't that what makes you a computer programmer?
<def`> :)
Haudegen has joined #ocaml
avsm has joined #ocaml
reem has joined #ocaml
claudiuc has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
so has joined #ocaml
paradoja has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
myyst is now known as myst
ericwa has joined #ocaml
AlexRussia has joined #ocaml
yomimono has joined #ocaml
nullremains has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
ericwa has quit [Read error: No route to host]
AlexRussia has joined #ocaml
AlexRussia has quit [Ping timeout: 272 seconds]
matason has quit [Ping timeout: 244 seconds]
reem has quit [Read error: Connection reset by peer]
ggole has quit []
leowzukw has joined #ocaml
reem has joined #ocaml
Algebr has joined #ocaml
<Algebr> Drup: is there something nicer to kill ocsigenserver other than just kill -9?
ptc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flux> ..plain kill won't do?-o
<smondet> Algebr: ocsigenserver can listen on a named pipe, to receive commands
<smondet> one of these commands can be "die-peacefully"
<smondet> it's actually "shutdown": http://ocsigen.org/ocsigenserver/manual/config#h5o-23
MattZen has quit [Ping timeout: 246 seconds]
<Algebr> nice, thanks smondet. (We met in person at the last meetup)
antkong has joined #ocaml
Submarine has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
ghostpl_ has quit [Remote host closed the connection]
`eeks has quit [Quit: Textual IRC Client: www.textualapp.com]
jonludlam has joined #ocaml
rgrinberg has joined #ocaml
matason has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest83644
antkong has quit [Ping timeout: 245 seconds]
Guest83644 has quit [Ping timeout: 245 seconds]
antkong has joined #ocaml
AlexRussia has joined #ocaml
_andre has quit [Quit: leaving]
antkong has quit [Quit: antkong]
jwatzman|work has quit [Quit: jwatzman|work]
let-mut-pyon is now known as transient-pyon
lordkryss has quit [Quit: Connection closed for inactivity]
<smondet> Algebr: oh cool, you're the one working with Ashish?
reem has quit [Remote host closed the connection]
ptc has joined #ocaml
<Algebr> ya
Haudegen has quit [Ping timeout: 256 seconds]
<smondet> Cool! It's fun to match user names with real people :)
Nahra has joined #ocaml
<Drup> oh, what are you working on Algebr ?
<Algebr> I just finished my mom's website in ocsigen, lilyslp.nyc, and now making an amazon web services client.
<Drup> nice :D
<Drup> Can I see the mom's website ? :D
<Algebr> Drup: yea, I gave the link
magthe has quit [Quit: WeeChat 1.1.1]
ericwa has joined #ocaml
<Leonidas> the .nyc TLD is actually a domain
<Leonidas> took me a second.
<Leonidas> nowadays everything can be a tld. ocisgen.drup
<Algebr> heh, yea, its a real top level domain.
<smondet> Opam question: when something works with `aspcud` but doesn't with the internal solver, is it possible use the result of aspcud is some way to force version numbers once and for all in a file or so, and then don't one does need `aspcud` for "deployment" ?
Haudegen has joined #ocaml
<Drup> Algebr: Arg, I though it was a different website, like in "apple, pears and oranges", not a precision :>
<Algebr> Drup: what do you mean?
<Drup> don't worry, it's only a grammatical ambiguity ! :D
<smondet> Opam question: when something works with `aspcud` but doesn't with the internal solver, is it possible to use the result of aspcud is some way to force version numbers once and for all in a file or so, so that then one does not need `aspcud` for "deployment" ? (sorry, fixing syntax)
<Leonidas> smondet: maybe opam switch import/export?
<Leonidas> haven't tried without aspcud
<smondet> Leonidas: but isn't `opam swith import` goign to solve dependencies anyway?
<Drup> import/export should work, yes
<Drup> I think it checks
<Drup> but the version numbers are hardcoded
<Drup> (in the export)
<Drup> so it should pick the said version
<smondet> true, it makes it much easier for the internal solver
<Drup> yeah, the internal solver checks fine
<Drup> it optimizes very badly
<Algebr> smondet: ha, I see the ambiguity now.
<Drup> smondet: thanks, I was looking for a "technical" description :D
rgrinberg has quit [Ping timeout: 255 seconds]
<Algebr> I liked working with ocsigen, the standlone native server is nice too. The amount of stuff it knows at compile time is freaky
TheLemonMan has joined #ocaml
freling has joined #ocaml
freling has quit [Client Quit]
<Drup> the fact that I can't find a good meme-y picture to go with "Eliom knows all your types" is slightly infuriating.
enquora has joined #ocaml
ptc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jwatzman|work has joined #ocaml
paradoja has quit [Remote host closed the connection]
reem has joined #ocaml
<Algebr> Stupid question, only one process can be associated with a port correct?
<whitequark> no
<whitequark> you can create a socket, accept connections on it, then fork
<whitequark> you can create a socket then send its fd elsewhere
<whitequark> s/accept connections/bind it to a port/
<adrien> but only one can listen on a given port at a time
<adrien> (actually that's not exact but it's the 80% of the time approx)
<Algebr> then what's the order of which process gets the message first, assuming there are two processes both listening on a port
<adrien> ERRORS
<adrien> EADDRINUSE
<adrien> Another socket is already listening on the same port.
<Algebr> but when you fork, won't the child be using the "same" socket?...
<adrien> I guess you get crap if you mix uses from both processes
<adrien> but....
<adrien> what's the actual question?
<Algebr> original question was if two different processes can listen on the same port. according the whitequark, the answer is yes.
<adrien> but they use the same file descriptor
<adrien> (might be a different number but both are poiting to the same kernel resource)
WraithM has joined #ocaml
<adrien> what are you trying to achieve?
<Algebr> I was wondering if I could run two different web servers both on port 80
<adrien> you can, but you probably don't want
<adrien> (unless they're bound to different IPs)
sepp2k_ has quit [Quit: Konversation terminated!]
transient-pyon is now known as pyon-ography
Algebr has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
WraithM has quit [Quit: leaving]
TheLemonMan has quit [Quit: leaving]
xificurC has quit [Quit: WeeChat 1.1.1]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
tianon has joined #ocaml
rgrinberg has joined #ocaml
<ollehar1> Order of arguments in List module is weird
<companion_cube> a bit, yes
<companion_cube> if it really bothers you, you can use ListLabels
<ollehar1> ok, will check it out
rgrinberg has quit [Ping timeout: 256 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest40479
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
raphaelss has joined #ocaml
Guest40479 has quit [Ping timeout: 256 seconds]
maufred has quit [Ping timeout: 256 seconds]
Simn has quit [Quit: Leaving]
matason has quit [Quit: matason]
reem has quit [Remote host closed the connection]
destrius has quit [Remote host closed the connection]
flixr has left #ocaml ["Ex-Chat"]
maufred has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
keen_________ has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
keen_________ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
kakadu has quit [Remote host closed the connection]
swgillespie has joined #ocaml
enquora has quit [Quit: enquora]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
dhil has quit [Quit: Leaving]
w0rp has quit [Ping timeout: 265 seconds]
w0rp has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
olauzon has quit [Quit: olauzon]
xificurC has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
ollehar1 has quit [Quit: ollehar1]
xificurC has quit [Ping timeout: 246 seconds]
ghostpl_ has joined #ocaml
jwatzman|work has joined #ocaml
oriba has joined #ocaml