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
<tokenrove> thanks.
reem has quit [Remote host closed the connection]
mort___ has joined #ocaml
Submarine has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
myst|work has quit [Ping timeout: 240 seconds]
myst|work has joined #ocaml
badon has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
robink has quit [Ping timeout: 245 seconds]
reem has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
robink has joined #ocaml
madroach has joined #ocaml
reem has quit [Remote host closed the connection]
yaewa has joined #ocaml
moei has quit [Ping timeout: 272 seconds]
reem has joined #ocaml
yomimono has quit [Ping timeout: 255 seconds]
reem has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
jao has quit [Ping timeout: 264 seconds]
monod has quit [Quit: Sto andando via]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
MooseAndCaml has joined #ocaml
mengu__ has quit [Remote host closed the connection]
sdegutis has joined #ocaml
<sdegutis> What do you especially like about OCaml compared to other languages?
<dmbaturin> There are no other languages that have exactly two capital letters in their name.
<sdegutis> dmbaturin: ClojureScript does
<sdegutis> dmbaturin: also JavaScript
<dmbaturin> But they aren't consecutive.
<sdegutis> dmbaturin: also TypeScript
<sdegutis> dmbaturin: you didn't specify consecutive
<sdegutis> dmbaturin: anyway srsly tho
<sdegutis> I think I can see the appeal to using OCaml to write a command line utility, or maybe a very small X program.
<sdegutis> But I'm having trouble seeing what it aims to solve and who it's competing with and how it's better.
struktured has quit [Ping timeout: 256 seconds]
<dmbaturin> The best way to find out what it's good for is to look what people are writing in it I guess.
lordkryss has quit [Quit: Connection closed for inactivity]
pyon-k is now known as dis-pyon-tinuous
ghostpl_ has quit [Remote host closed the connection]
reem has joined #ocaml
darkf has joined #ocaml
mengu has joined #ocaml
<dmbaturin> The module system point is probably not emhpasized enough, and (built-in) string support may look bleak compared to say python, but it still gives the right feel I think.
reem has quit [Remote host closed the connection]
reem has joined #ocaml
mengu has quit [Ping timeout: 264 seconds]
<sdegutis> dmbaturin: thanks very much
<Drup> you keep asking this question over and over =)
<Drup> you should start to have an idea now, shouldn't you ? Now that you wrote small stuff in it
<sdegutis> Drup: I did?
<Drup> it was my impression
<sdegutis> Drup: nevar
<sdegutis> Drup: well, in my head, sure
<Drup> if you didn't while talking all this time on the channel, I don't know what you are doing ^^'
<sdegutis> Drup: I'd like to think I'm at the point in my career where I can research a language and read code in it without having to write it and still know the pros/cons of that language etc.
<sdegutis> or whatever
<Drup> If I may, apparently you aren't, since you are still asking question. If you were to write something in it in a small week, you would have your answers already.
<Drup> Really just write something ... :p
<sdegutis> Drup: I'm more interested in subjective opinions, they're much more valuable.
<sdegutis> Drup: they form a much fuller picture about something and how it's used
<Drup> sure, that's why you should forge your own
<dmbaturin> There's a fable I read somewhere, about a figure carved from rock salt that saw the ocean the first time and was wondering what is it. The ocean told it to walk into it and find out, and when the salt man walked into it dissolved in it, it said "now I understand, the ocean is me".
<dmbaturin> Or something like that. Read: try the damn language in real life finally. ;)
<Drup> ^
<sdegutis> Drup: so far my opinion is "I would use OCaml instead of C/C++ if I had any reason to use those" but also "I kind of want to find a use for OCaml kind of"
<Drup> just write something
<Drup> for the sake of doing it
<sdegutis> Got any ideas on what I could write in an hour?
<sdegutis> Maybe a small Lisp.
<Drup> I mean, someone on the chanel did a cat clone
<dmbaturin> Also, >I'd like to think I'm at the point in my career where I can research a language without having to write it and still know the pros/cons; Unless you have really strong understanding of programming language theory, I would refrain from statements like that. ;)
<Drup> it's great, now with a cat in OCaml, it's perfectly fine :D
<dmbaturin> I think I could say the same a couple of years ago.
<sdegutis> ok i wrote let () = print_string "foo"
<Drup> (especially when you start encounting languages that are really outside the classic paradigms)
<dmbaturin> (Now I have vague understanding of how wrong I would be if I said that :)
<Drup> (yeah sure, you can judge C-like languages very fast if you have used 2 of them ...)
<sdegutis> Well, here's my understanding so far.
<sdegutis> Even JavaScript can be awesome, the main three downsides of this specific language being (1) the caveats you have to avoid, like 'this', (2) the verbosity, and (3) dynamic typing.
<sdegutis> Static typing is super helpful for rapid development since it short circuits the error-catching cycle. Destructuring (pattern matching) can help a ton to cut down on verboseness.
<sdegutis> But overall, any language with first-class functions can be used just like OCaml can. The main benefit of OCaml is speed and static typing.
<sdegutis> And all the special features of OCaml are basically there to make sure you still get the awesomeness while keeping static typing.
<sdegutis> Sound right?
<dmbaturin> The point when I got how wrong I was was when I learned that properties of type system such as soundness can be and are being proved.
<ousado> not actually, no
<sdegutis> ?
<Drup> sdegutis: you forgot a good amount of things
<Drup> and type systems usually show really their worth at medium to large scale. In particular when refactoring
<dmbaturin> This was also what turned me to PLT.
<sdegutis> Drup: I would /love/ a static type system at work, where we use Clojure and catch most of our bugs with a horrid test suite
<sdegutis> Drup: so yes I agree
<sdegutis> Drup: what did I forget btw?
<sdegutis> ousado: oh?
<Drup> the module system is a big thing you forgot
<ousado> you didn't say a word about ADTs
<dmbaturin> Also, note that pattern matching not only removes verboseness. It also catches missed cases automatically (the check is not complete, but apparently sound).
<ousado> which, fankly, makes me think you're missing the point more or less completely
<sdegutis> ousado: ADTs are super useful for glue-code, like Either or Result etc
<ousado> *frankly
<sdegutis> ousado: I imagine they're also useful for extremely large code that's relatively isolated from external formats
<dmbaturin> Or for internal representations of external formats. Look at XML parsers.
<dmbaturin> Or finite sets of e.g. states.
<ousado> I don't know what to answer.. I'd recommend to start 1) reading 2) using ocaml
<Drup> dmbaturin: the check is not complete ?
<dmbaturin> Drup: Well, there are cases that it fails to recognize as exhaustive. Complete as in Goedel.
swgillespie has quit [Ping timeout: 272 seconds]
<Drup> are you sure ? it seems to me it is for OCaml
<ousado> dmbaturin: you're talking about guards?
<Drup> oh, I see where you are going
<Drup> yes, you are right
MooseAndCaml has quit [Ping timeout: 246 seconds]
<dmbaturin> ousado: Yes, but I think I did hit a case when I got a warning for non-guarded patterns. I'll withdraw my statement about non-guarded patterns until I reproduce it though. :)
<Drup> if you do nested matches, the ocaml typechecker will not propagate the information properly and affirm that matches are incomplete when they aren't
<dmbaturin> In any case, soundsness is more important than completeness.
<Drup> indeed
reem has quit [Remote host closed the connection]
BitPuffin has quit [Ping timeout: 245 seconds]
reem has joined #ocaml
travisbrady has joined #ocaml
andlarry has joined #ocaml
<andlarry> I'm going through the Real World OCaml Guided Tour (https://realworldocaml.org/v1/en/html/a-guided-tour.html#options)
<andlarry> and am getting the following error when trying to define the log_entry function:
<andlarry> "Error: This expression has type zone:Core.Zone.t -> bytes but an expression was expected of type bytes"
<andlarry> I assume this is related to the recent change toward immutable strings (I'm using OCaml 4.02.1) but am super new to OCaml and don't know how I would work around it.
<andlarry> Here's the function definition, so you don't have to go to the site
<andlarry> let log_entry maybe_time message =
<andlarry> let time =
<andlarry> match maybe_time with
<andlarry> | Some x -> x
<andlarry> | None -> Time.now ()
<andlarry> in
<andlarry> Time.to_sec_string time ^ " -- " ^ message
<dmbaturin> http://bpaste.net supports ocaml syntax.
<andlarry> ty
<dmbaturin> The error looks like you forgot an argument somewhere.
<andlarry> maybe_time and message are both used in the function def
<andlarry> I just copy and pasted from the book
<andlarry> I donno if this message was throttled, but I assume this is related to the recent change toward immutable strings (I'm using OCaml 4.02.1)
<dmbaturin> What line is causing the error?
cufisz has quit [Ping timeout: 244 seconds]
cufisz has joined #ocaml
<andlarry> I assume it's this line:
<andlarry> Time.to_sec_string time ^ " -- " ^ message
<andlarry> I just entered the definition into utop
jbrown has joined #ocaml
<andlarry> Real World OCaml uses Jane Street's Core.Std, if that helps
rgrinberg has joined #ocaml
<Drup> andlarry: no, that's not the issue
yaewa has quit [Read error: Connection reset by peer]
<Drup> apparently, the function in question now takes an extra argument, ~zone
moei has joined #ocaml
<andlarry> ahh, interesting
<dmbaturin> Do avsm and yminsky still accept pull requests against RWO? :)
<Drup> I guess
cufisz has quit [Read error: Connection reset by peer]
travisbrady has quit [Quit: travisbrady]
struktured has joined #ocaml
ned- has joined #ocaml
<sdegutis> fwiw I have used Swift a good deal, which shares many of OCaml's more excellent features
ned has quit [Ping timeout: 252 seconds]
<Drup> it shares the basic features, not the most excellent ones :p
<dmbaturin> My impression was that it also tries to hide them as deep as possible.
<sdegutis> Drup: it has ADTs and higher-kinded types etc
<Drup> no HKT in OCaml
<ousado> sdegutis: what's your idea of higher kinded types?
<ousado> switch not being an expression in swift says it all
<sdegutis> ousado: no idea
<sdegutis> Drup: swift has ADTs
<Drup> ADTs is really the most basic thing any language should have :)
<Drup> (and it pains me greatly each time I see and fancy shiny new language without them)
<Drup> a*
<dmbaturin> What is the usual way to say that the last delimiter is optional, in yacc/menhir grammar specifications?
reem has quit [Remote host closed the connection]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<Drup> dmbaturin: there is a combinator in menhir for that
<dmbaturin> Drup: Maybe I missed it, going to have a look.
<andlarry> ok, I finally got it. @Drup, thanks for the hint, I changed the last line to
<andlarry> Time.to_sec_string ~zone:Core.Zone.local (time) ^ " -- " ^ message
<andlarry> It took me a long time to realize to_sec_string returned a function
struk|desk has joined #ocaml
badkins has quit []
struktured has quit [Ping timeout: 265 seconds]
<dmbaturin> andlarry: Well, that's why I said a missed argument is the most likely cause. It said the type is "Whatever.t -> bytes" where bytes was expected.
reem has joined #ocaml
<andlarry> thanks, yeah I didn't understand. All the OCaml I've been exposed to is up to the "Options" section of the first chapter of real world ocaml.
<andlarry> I finally found a usage in the unit tests that helped me understand
<sdegutis> Drup: it is nice when True/False are defined as an ADT
<sdegutis> Drup: granted, some people have complained about that, because somehow boolean lacks context that a more complex type could have provided
<sdegutis> or something
<sdegutis> I remember hearing this from #haskell, that's all.
<andlarry> because
<andlarry> Time.to_sec_string ~zone:Core.Zone.local Time.now() ^ " -- " ^ "foo" ;;
<andlarry> gave an odd error
<andlarry> anyway, thanks for the help
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
sdegutis has quit [Quit: Leaving...]
<dmbaturin> andlarry: Also, typing a function name in the repl gives you its type.
<dmbaturin> utop # List.nth ;;
<dmbaturin> - : 'a list -> int -> 'a = <fun>
<dmbaturin> Arrow types also appear in signatures, as in "('a -> bool) -> 'a list -> bool" for List.exists, so for higher-order functions you also know what kind of function it expects.
testcocoon has quit [Ping timeout: 246 seconds]
<dmbaturin> So once you are used to ocaml types, this error ceases to be odd. :)
<andlarry> nice, thanks
<andlarry> I created a pull request with the fix, let's see if it gets merged
reem has quit [Remote host closed the connection]
testcocoon has joined #ocaml
reem has joined #ocaml
Algebr has quit [Ping timeout: 245 seconds]
reem has quit [Remote host closed the connection]
hilquias has joined #ocaml
reem has joined #ocaml
ggole has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
Intensity has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
swgillespie has joined #ocaml
antkong_ has joined #ocaml
andlarry has quit [Ping timeout: 246 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
huza has joined #ocaml
reem has joined #ocaml
diethyl has quit [Ping timeout: 264 seconds]
sivoais has quit [Ping timeout: 265 seconds]
reem has quit [Remote host closed the connection]
swgillespie has joined #ocaml
antkong_ has quit [Ping timeout: 246 seconds]
diethyl has joined #ocaml
reem has joined #ocaml
sivoais has joined #ocaml
reem has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reem has joined #ocaml
<rgrinberg> mfp: ping
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
swgillespie has joined #ocaml
reem has quit [Remote host closed the connection]
<rgrinberg> mfp: I see you've done some good work here https://github.com/savonet/ocaml-ssl/pull/15
reem has joined #ocaml
pakchoi21 has joined #ocaml
nullcat_ has joined #ocaml
pakchoi2 has quit [Ping timeout: 245 seconds]
dav has quit [Ping timeout: 250 seconds]
pakchoi21 has left #ocaml [#ocaml]
dav has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
ivan\ has joined #ocaml
reem has quit [Remote host closed the connection]
Guest67128 has joined #ocaml
Guest67128 has quit [Remote host closed the connection]
apple_ has joined #ocaml
reem has joined #ocaml
apple_ has quit [Client Quit]
_pakchoi_ops has joined #ocaml
Kakadu has joined #ocaml
AlexRussia has quit [Ping timeout: 264 seconds]
reem has quit [Remote host closed the connection]
willy_ has joined #ocaml
AlexRussia has joined #ocaml
reem has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Simn has joined #ocaml
thorsten` has quit [Ping timeout: 246 seconds]
segmond has quit [Ping timeout: 252 seconds]
huza has quit [Quit: WeeChat 0.3.8]
AlexRussia has quit [Ping timeout: 245 seconds]
mort___ has joined #ocaml
segmond has joined #ocaml
mort___ has quit [Quit: Leaving.]
slash^ has joined #ocaml
mort___ has joined #ocaml
hilquias has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
thorsten` has joined #ocaml
mort___ has quit [Quit: Leaving.]
Ansnum has joined #ocaml
reem has quit [Remote host closed the connection]
Submarine has joined #ocaml
Submarine has joined #ocaml
tnguyen has joined #ocaml
tnguyen has quit [Client Quit]
Ansnum has quit [Quit: Ansnum]
Guest90013 has joined #ocaml
reem has joined #ocaml
tane has joined #ocaml
Guest90013 has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
AlexRussia has joined #ocaml
reem has quit [Remote host closed the connection]
oscar_toro has quit [Ping timeout: 245 seconds]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
ygrek has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: Leaving.]
oscar_toro has joined #ocaml
Ansnum has joined #ocaml
ebzzry has quit [Read error: Connection reset by peer]
willy_ has quit [Quit: Leaving]
_pakchoi_ops has quit [Read error: Connection reset by peer]
antkong has joined #ocaml
_pakchoi_ops has joined #ocaml
laughing-octo-sh has joined #ocaml
antkong has quit [Ping timeout: 255 seconds]
yomimono has joined #ocaml
segmond has quit [Ping timeout: 252 seconds]
yomimono has quit [Ping timeout: 240 seconds]
segmond has joined #ocaml
yomimono has joined #ocaml
mort___ has joined #ocaml
antkong has joined #ocaml
ygrek has joined #ocaml
<destrius> do backtraces not work in utop, or am i doing something wrong? whenever i call Exn.backtrace(), i get something about stack.ml, called from unknown location.
Haudegen has quit [Ping timeout: 256 seconds]
mort___ has quit [Quit: Leaving.]
MercurialAlchemi has joined #ocaml
Haudegen has joined #ocaml
antkong has quit [Quit: antkong]
monod has joined #ocaml
lordkryss has joined #ocaml
<ggole> They don't work, unless something changed recently
larhat has joined #ocaml
dav has quit [Ping timeout: 256 seconds]
dav has joined #ocaml
rks` has quit [Quit: Lost terminal]
trefis has joined #ocaml
<destrius> ok thanks
reem has joined #ocaml
trefis is now known as rks`
reem has quit [Ping timeout: 245 seconds]
Anarchos has joined #ocaml
monod has quit [Quit: Sto andando via]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Anarchos has joined #ocaml
dav_ has joined #ocaml
dav has quit [Ping timeout: 252 seconds]
seliopou has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 246 seconds]
dav_ has quit [Ping timeout: 255 seconds]
dav has joined #ocaml
vbmithr has quit [Ping timeout: 245 seconds]
seliopou has joined #ocaml
vbmithr has joined #ocaml
ned- has quit [Ping timeout: 244 seconds]
rossberg has quit [Ping timeout: 265 seconds]
ebzzry has joined #ocaml
rossberg has joined #ocaml
Nahra has joined #ocaml
dbp has quit [Ping timeout: 255 seconds]
<whitequark> destrius: I actually wrote a patch to add backtraces to toplevel
Haudegen has quit [Ping timeout: 250 seconds]
dav_ has joined #ocaml
dav has quit [Ping timeout: 246 seconds]
dbp has joined #ocaml
Haudegen has joined #ocaml
Guest90013 has joined #ocaml
vanila has joined #ocaml
ebzzry has quit [Remote host closed the connection]
<def`> whitequark: ah cool! I was surprised nobody did that before
dbp has quit [Ping timeout: 256 seconds]
Ansnum has quit [Quit: Ansnum]
* ggole looks forward to 4.03
ebzzry has joined #ocaml
Guest90013 has quit [Quit: ERC (IRC client for Emacs 25.0.50.1)]
Guest90013 has joined #ocaml
Guest90013 has quit [Remote host closed the connection]
Algebr has joined #ocaml
dis-pyon-tinuous has quit [Quit: I'm sorry but... I don't have any interest in three-dimensional girls.]
BitPuffin has joined #ocaml
pyon has joined #ocaml
<destrius> whitequark: awesome! i was contemplating hacking something out, but quickly realised my knowledge of ocaml is too basic to actually do so
hilquias has joined #ocaml
struktured has joined #ocaml
awegawgweag has joined #ocaml
darkf has quit [Quit: Leaving]
mort___ has joined #ocaml
awegawgweag has quit [Ping timeout: 246 seconds]
mort___ has quit [Quit: Leaving.]
dbp has joined #ocaml
Ansnum has joined #ocaml
monoprotic is now known as rudi34
rudi34 is now known as monoprotic
_pakchoi_ops has quit [Ping timeout: 256 seconds]
Ansnum has quit [Client Quit]
Ansnum has joined #ocaml
psy has joined #ocaml
<whitequark> def`: well they did! I based my patch off someone's patch for 3.11
<whitequark> though there's nothing left of it
Haudegen has quit [Ping timeout: 265 seconds]
ned- has joined #ocaml
Haudegen has joined #ocaml
Algebr has quit [Ping timeout: 272 seconds]
dav_ is now known as dav
jbrown has quit [Remote host closed the connection]
Algebr has joined #ocaml
mort___ has joined #ocaml
dbp has quit [Ping timeout: 255 seconds]
awegwaegaweg has joined #ocaml
matason has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Anarchos has joined #ocaml
hilquias` has joined #ocaml
hilquias has quit [Ping timeout: 246 seconds]
carm has joined #ocaml
struk|desk has quit [Ping timeout: 265 seconds]
struktured has quit [Ping timeout: 265 seconds]
carm has quit [Read error: Connection reset by peer]
carm has joined #ocaml
awegwaegaweg has quit [Ping timeout: 246 seconds]
Submarine_ has joined #ocaml
matason has quit [Ping timeout: 256 seconds]
bytbox has quit [Remote host closed the connection]
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
dav_ has joined #ocaml
Haudegen has joined #ocaml
dav has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 265 seconds]
<Drup> whitequark: did you found a solution for deriving and phantom types ?
<whitequark> what was the issue?
<Drup> well, you have a type with a type parameter but the deriver should not take a parameter
<Drup> [%deriving.show 'a foo] will not work, will it ?
<whitequark> [%deriving.show: _ foo]
<Drup> oh, that works ?
<whitequark> yes
<Drup> ok, nevermind then :D
<Drup> (I don't see documentation for it, though)
dbp has joined #ocaml
Submarine_ has quit [Remote host closed the connection]
Submarine has quit [Remote host closed the connection]
BitPuffin has quit [Ping timeout: 244 seconds]
bytbox has joined #ocaml
mort___ has quit [Quit: Leaving.]
yomimono has quit [Ping timeout: 256 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
rgrinberg has joined #ocaml
MrScout has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
BitPuffin has joined #ocaml
A1977494 has joined #ocaml
AlexRussia has joined #ocaml
Anarchos has quit [Quit: reboot haiku...]
<Drup> rgrinberg: how is the ocsigenserver investigation going ?
matason has joined #ocaml
<dmbaturin> In a multiway tree, I want to be able to insert before or after specific child (the order is important in some cases). Is it a good idea to make type 'a position = None | Before of 'a | After of 'a and pass it as an argument to insert?
<dmbaturin> s/None/Dont_care/
<Drup> it's not a bad idea, but if you have O(n) find, it's quite terribad
<dmbaturin> It bothers me too.
<dmbaturin> The only good thing is that order doesn't always matter and in most cases I can just cons.
<dmbaturin> The other good thing is that I hardly can make it worse than it is now. In the current version that tree is mapped to a _directory tree_ and node lookups are directory lookups. I'm not kidding.
<mbac> so, you're re-arranging deck chairs on the titanic worrying about this
<dmbaturin> mbac: No, I'm rewriting that thing from scratch.
<mbac> oh
<dmbaturin> Right now it's a mix of C++ and perl, and instead of using in-memory datastructures it stores internal data as a directory tree with values in files.
<Drup> (did you wrote this thing ? :D)
<dmbaturin> The original one? No, it was written before I even started with that project.
<mbac> this sounds awesome
<ggole> Erect a monument when you are done
<rgrinberg> So there's no way to enable menhir in _oasis? https://twitter.com/stevevinoski/status/572085180036476931
<rgrinberg> Drup: had to take a break - day job.
<dmbaturin> ggole: A bronze caml eating leaves of a multiway tree? :)
<Drup> rgrinberg: I'm affraid no
<Drup> only _tags though
<Drup> and it's a single simple line
<Drup> rgrinberg: understandable :p
<dmbaturin> mbac: I'd have abandoned the project, but there is no real replacement for it, and I'm using it myself. :)
A1977494 has quit [Ping timeout: 246 seconds]
mort___ has joined #ocaml
<rgrinberg> Drup: next on my list is getting cohttp 1.0 out the door
<Drup> wow, 1.0 :D
A1977494 has joined #ocaml
<adrien> you're going to lose all your hip points if you call something "stable"
<rgrinberg> adrien: when will x compilation be ready? :D
<adrien> see, it'll be never completely ready otherwise this place will be way too crowded with new and 'uncool' people
<Drup> why ?
<adrien> uncool people like things that work; only cool people like to play with new stuff
<Drup> So js programmers are very cool ? :D
A19774941 has joined #ocaml
<adrien> they attempt to be but they have the safety net of the javascript engine of the browser
A1977494 has quit [Ping timeout: 264 seconds]
<rgrinberg> Drup: if you know the liquidsoap guys, ping 'em https://github.com/savonet/ocaml-ssl/pull/15
<Drup> hum, I don't =')
<Drup> (they don't even use lwt anymore *sulk*)
<whitequark> why not?
<rgrinberg> i don't think they ever used Lwt :O
<Drup> No ? I'm confusing with someone else maybe
<Drup> someone switched from lwt to async
<rgrinberg> openflow maybe?
<rgrinberg> liquidsoap doesn't use lwt/async/core/batteries
<rgrinberg> no containers either :D
<Drup> hum, maybe.
<Drup> ah yes, frenetic
<Drup> it was them
* Drup confused frenetic and savonet.
bytbox has quit [Remote host closed the connection]
WraithM has joined #ocaml
ggole has quit []
<Drup> I'm surprised nobody wrote an audio player in ocaml, with all the stuff liquidsoap did
<rgrinberg> Drup: you mean with a decent UI?
<Drup> or a decent CLI
<adrien> I had started
<adrien> a long time ago :D
<rgrinberg> Drup: oh god, i think you mean something like ocp-browser
<dmbaturin> When I was about to write an audio player (when KDE3 died and took amarok3 to the grave with it), I didn't know of ocaml.
<Drup> rgrinberg: well, not necesseraly, either :D
<adrien> maybe I should try again with EFLs this time
<Drup> I mean, in my head, the most painful things is to have all the libraries to read all the audio formats
travisbrady has joined #ocaml
<adrien> libao bindings
<Drup> but we have that ! remains only the interesting parts
<adrien> mmm
<adrien> sndfile
<adrien> Drup: or you use Qt/EFL and use their audio stuff
<adrien> you'll want a proper way to do gapless however
travisbrady has quit [Client Quit]
<Drup> rgrinberg: you don't like ocp-browser ? ^^'
<rgrinberg> Drup: i've grown to find it handy sometimes
manud has joined #ocaml
martintrojer has quit [Ping timeout: 246 seconds]
freling has joined #ocaml
freling has quit [Client Quit]
Haudegen has quit [Ping timeout: 256 seconds]
<Drup> Why the hell didn't I figure this out before :|
Haudegen has joined #ocaml
<Drup> so, for people who want to use ocp-browser with eliom, you can by doing this :
<Drup> ocp-browser --no-opamlib -I `ocamlfind query -separator , -r eliom.client`
<Drup> (and eliom.server, to browser the server)
ghostpl_ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
bjorkintosh has quit [Ping timeout: 244 seconds]
martintrojer has joined #ocaml
<companion_cube> rgrinberg: o/
dav__ has joined #ocaml
reem has joined #ocaml
dav_ has quit [Ping timeout: 255 seconds]
psy has quit [Read error: Connection reset by peer]
manud has quit [Quit: manud]
psy has joined #ocaml
manud has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<haesbaert> given tuples t1 = (1,2,3), t2 = (5,6,7), how to I get a tuple which is the sum of the positional arguments: (6,8,10) ?
<haesbaert> as in, what is the more common idiom for that ?
<Drup> let f (a1,b1,c1) (a2,b2,c2) = (a1+a2,b1+b2,c1+c2)
<Drup> (alternatively, BatTuple.Tuple3.mapn (+)
<haesbaert> that will do, I was thinking if there was a tuple map
<haesbaert> no need, that should do
yomimono has joined #ocaml
The_Mad_Pirate has quit [Quit: Konversation terminated!]
larhat has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
matason has quit [Ping timeout: 264 seconds]
Jefffrey has joined #ocaml
tnguyen has joined #ocaml
swgillespie has joined #ocaml
rgrinberg has joined #ocaml
vivien_ has joined #ocaml
reem has quit [Remote host closed the connection]
<vivien_> Hello, my problem is I want to compile some ocaml code with wine. I have no problem running "ocamlc -c foo.ml -o foo.cmo" but I wanted to use the OASIS build system, which doesn't work properly on Wine : it adds single quotes everywhere, and the file names are not recognized. What should I do ?
waneck_ has joined #ocaml
tnguyen has quit [Quit: tnguyen]
<nicoo> dmbaturin: What does the thing you are replacing *do* ?
<nicoo> adrien: You should try rust, the whole ecosystem is still fairly hip and cool
<adrien> they're readying 1.0
<adrien> that won't last
<Algebr> is ; a camp4o extension or actually part of the ocaml spec?
<Drup> why would ";" be a camlp4o thing o_o
<dmbaturin> vivien_: On wine? Why would you run it on wine?
Anarchos has joined #ocaml
waneck has quit [Ping timeout: 252 seconds]
reem has joined #ocaml
<dmbaturin> Or you are compiling windows binaries on UNIX with windows version of the compiler running on wine?
<vivien_> It seemed simplier to compile for windows via wine ocamlc.exe
<vivien_> yes
waneck has joined #ocaml
waneck_ has quit [Read error: No route to host]
<Drup> I doubt it is :D
tane has quit [Quit: Verlassend]
<dmbaturin> nicoo: The complete project is a linux distro for routers. It maintains a single system config from which configs for quagga, iptables etc. are generated by a bunch of scripts. So the user gets a CLI like those of juniper etc. and the rest is seemless for them. The thing in question handles config change requests and runs those scripts when user commits changes.
<Algebr> Drup: because camlp always gives annoying preprocessor messages when I forget or add a ; accidentally.
<vivien_> So, what should I do to compile something for Windows ?
<Drup> pray adrien.
<nicoo> dmbaturin: Sounds like pfSense, but without the web UI and the XML+PHP init
matason has joined #ocaml
<vivien_> Thank you.
vivien_ has quit [Quit: Konversation terminated!]
<adrien> Drup: well, the current stuff on windows works
<Drup> adrien; not the cross compilation
<dmbaturin> nicoo: Unlike in pfSense, you can make multiple changes in different places and commit at once, or compare config revisions, or rollback to previous revisions. But the internals are quite awful.
<adrien> Drup: but you can still get your stuff built without too much hassle
<Drup> if you say so :p
<dmbaturin> Does OASIS work on windows with cygwin?
<Drup> yes
<adrien> (and without too)
ghostpl_ has quit [Read error: Connection reset by peer]
<haesbaert> can I make a funtction with a single optional argument ?
ghostpl__ has joined #ocaml
<haesbaert> I seem to be failing
<dmbaturin> I think you can't.
<adrien> # let f ?a = ();;
<adrien> Warning 16: this optional argument cannot be erased.
<Drup> haesbaert: add a unit argument
<adrien> as the warning says :)
<Drup> (at the end)
<haesbaert> how do I do that ?
testcocoon has quit [Quit: Coyote finally caught me]
<haesbaert> OHHHH
<haesbaert> got it :D
TheCommieDuck has joined #ocaml
* haesbaert just found out optional arguments can't be the last one also
<nicoo> dmbaturin: Don't worry, pfSense's internals are probably worse.
* nicoo isn't exactly fond of pfSense
* haesbaert hacks pf for a living
<nicoo> haesbaert: Oh, you work on PF ? :)
<haesbaert> sadly yes
yminsky has joined #ocaml
testcocoon has joined #ocaml
<dmbaturin> nicoo: Well, I know. It's not an excuse for us not to improve it though. :)
<nicoo> darnuria: Yup. The UI looks good, though
<nicoo> haesbaert: Why “sadly” ?
<haesbaert> I think the code is bad
<dmbaturin> One of the problems is that only config read API can be exposed in a sane way, but config writes rely on shell hacks. Another problem is that commit is not fully atomic.
<haesbaert> the great thing about pf is the syntax
laughing-octo-sh has quit [Ping timeout: 245 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
<nicoo> haesbaert: Yes
<haesbaert> but to be fair, pf pays the price of other badly structured subsystems, especially the routing table
<haesbaert> (in openbsd)
bytbox has joined #ocaml
Jefffrey has quit [Remote host closed the connection]
Kakadu has quit [Remote host closed the connection]
<haesbaert> how do I figure out which exceptions open_in can raise ?
<haesbaert> documentation doesn't say any, but obviously a file not found is one of them
<haesbaert> for instance: wc: internal error, uncaught exception: Sys_error("/tmp/dkjsaldasdsadas: No such file or directory")
<haesbaert> how do I catch that with the error messag e?
<adrien> actually the doc says:
<adrien> === Input/output Note: all input/output functions can raise Sys_error
<adrien> when the system calls they invoke fail. ===
<adrien> but it's not easy to see it at all
<haesbaert> arghh, sorry, I just read the open_in and failed to look at the rest
<adrien> I wasn't aware this was there until today
<haesbaert> how can I catch the error of Sys_error ?
<haesbaert> the message I mean
<haesbaert> with Sys_Error as e ?
<adrien> try ... with Sys_error s -> print_endline s
<adrien> it's like usual pattern-matching
<adrien> (it is pattern-matching)
A19774941 has left #ocaml [#ocaml]
<haesbaert> awesome, works as intended
<haesbaert> thanks :D
Ansnum has quit [Quit: Ansnum]
<haesbaert> with Sys_error e ->
<haesbaert> eprintf "%s: %s" Sys.executable_name e; (0, 0, 0)
<haesbaert> this feels wrong, is there a shorter idiom ?
<haesbaert> like err(3),warn(3) and so on
The_Mad_Pirate has joined #ocaml
<adrien> there aren't that many things in the stdlib on purpose
<adrien> you might want to take a look at lwt
<adrien> it does a lot of things that might match what you need
<adrien> good night
<haesbaert> will do, thanks
antkong has joined #ocaml
yminsky has quit [Quit: yminsky]
shinnya has joined #ocaml
<Algebr> adrien: What is that purpose?
matason has quit [Ping timeout: 245 seconds]
oriba has joined #ocaml
matason has joined #ocaml
jbrown has joined #ocaml
matason has quit [Ping timeout: 256 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ghostpl__ has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 245 seconds]
antkong has quit [Quit: antkong]
bjorkintosh has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
pyon is now known as pyon-ted-type
inr_ has joined #ocaml
SHODAN has quit [Read error: Connection reset by peer]
inr has quit [Ping timeout: 252 seconds]
SHODAN has joined #ocaml
petrus has joined #ocaml
Jefffrey has joined #ocaml
rgrinberg has joined #ocaml
petrus has quit [Quit: WeeChat 1.1.1]
ontologiae_ has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 250 seconds]
WraithM has quit [Quit: leaving]