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> o
nullcat has joined #ocaml
keen___________3 has quit [Read error: Connection reset by peer]
keen___________3 has joined #ocaml
darryn has joined #ocaml
<darryn> How do i determine when a function/arg/code is finished when there is no ";" or "()" like in c++ or lisp?
<Drup> struktured: a good amount of laptop only have an intel "video" card to decode video and that's all
<struktured> that's true, but alot have amd / nvidia chipsets too. the heavier to carry ones usually :)
<struktured> darryn: by structural induction ? seriously though, you can follow the code from start to finish and verify the ast is a valid expression/type/etc.
<dmbaturin> darryn: When the next token is "let", "module", or "open" ("or "class"/"object"), previous code part is finished.
<darryn> ah, thank you.
<struktured> darryn: in practice, you can also just look at the module signatures to see how many args they take
<struktured> darryn: or better, use merline and TypeOf
<struktured> *merlin
<darryn> First functional programming language, a lot to take in.
<struktured> darryn: there are semicolons too (basically means the last thing must return the unit type and the next thing is new expression), as well as begin/end constructs
<darryn> Are those needed or just for personal use?
<dmbaturin> The semicolon is statement separator, not terminator. let () = print "foo"; would be an error.
<darryn> hm
zpe has joined #ocaml
<dmbaturin> Well, not error per se, but it will capture whatever comes next. In other words, "foo x; bar y" is pretty much equivalent to let () = foo x in bar y
<darryn> so another let would seperate them?
<struktured> dmbaturin: funny I was about to say that, tried it in utop, the first assumes foo is 'a -> 'b, not 'a -> unit, but the essence of your point is still valid
<darryn> but let foo = let bar bar = x;; is one expression
<darryn> is this because let is the first expression of the var foo?
<struktured> your expression doesn't seem syntaicallyl valid. you're missing an "in" or two
zpe has quit [Ping timeout: 256 seconds]
<dmbaturin> The point I wanted to make: don't end sequences of expressions with semicolons. :)
<struktured> which is liberating, to me
<darryn> so in order to have a (let foo = let bar = x) we would have to have another expression to finish? Like (let foo = let bar = x in x + 1 ;;)?
<dmbaturin> Also, ";;" is never necessary in source files, and is usually considered a bad style (in the REPL it's necessary to make it accept and compile the chunk of code you entered).
BitPuffin|osx has quit [Remote host closed the connection]
<dmbaturin> The general form is <binding> ::= let <pattern> = <expression> in <expression|binding>
<struktured> darryn: this would compile: "let foo x = let bar y = y+1 in bar x"
<dmbaturin> "let foo = 9 in foo + 1", "let f x y = x * y", "let f x y = let g x = x + 1 in y (g x)" would be valid.
idegen has quit [Quit: Leaving.]
ygrek has joined #ocaml
<darryn> struktured: I don't know why, but I am having trouble wrapping my brain around that code. When I pass foo 5, i don't know what happens...
<darryn> sad, I know
<dmbaturin> Pass to where?
<darryn> So let foo x = let bar y = y+1 in bar x
<darryn> when I do: foo 5
<dmbaturin> "(let ([f (lambda (x y) (* x y))]) (f 2 3))" => "let f x y = x * y in f 2 3"
<def`> struktured: and you said that it's possible to have gpu's in the cloud?
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<struktured> darryn: it's ok, it's very pointless code. it binds a function called foo to a var x, inside the function we bind another function called bar with a var y, we then evaluate bar with x inside of the function definition, returning x+1 effectively.
<dmbaturin> ...except top-level let (not inside let ... in) can also work like (define name expr)
<dmbaturin> (Can't write common lisp off the top of my mind, I prefer the uncommon one :)
<darryn> Okay, I am understanding it now, don't know how, but I am haha.
leafac has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
<darryn> why does let foo x = let bar y = y+1 in bar x*3;; foo 5;; return 18? we have 5*3=15, then 15+1=16. Unless my arithmetic is terrible, what's going on?
<struktured> darryn: associativity is tricking you.
<struktured> it's really (bar x) * 3
<dmbaturin> (bar x) * 3
<darryn> So it passes y+1 first..
shinnya has quit [Ping timeout: 265 seconds]
<darryn> I'll just keep reading heh
<dmbaturin> darryn: If this helps, here's a complete toy program: https://github.com/dmbaturin/nyancode/
<darryn> Thank you!
mcc has joined #ocaml
<mcc> Hey, I am looking at companion cube CCArray
<mcc> i'm looking for something that compares two arrays
<mcc> CCArray contains: val compare : 'a ord -> 'a t ord
<mcc> What should I expect this to mean?
<Drup> type 'a ord = 'a -> 'a -> int
<darryn> dmbaturin: of all programs lol
<mcc> oh
<mcc> ohhh
<mcc> Am I correct that "let compare = CCArray.compare (-)" is gonna create a comparator for two arrays of ints?
<Drup> don't use (-) as a comparison function.
<Drup> (but yes)
<struktured> Drup: is it considered bad practice to rebind bulitin operators such as "&&" or "||" (assumed it's defined within an "Infix" submodule) ?
<Drup> I don't know, but I do it :D
<dmbaturin> Sometimes I wonder why built-in compare doesn't return values of type Eq | Gt | Lt
<mcc> Drup: Okay. Why not?
<mcc> Oh, wait. Pervasives.compare is better
<Drup> mcc: it's broken on max int
<darryn> I feel like I'll need someone to hold my hand through this entire book
<mcc> drup: oh D:
<mcc> actually, that doesn't matter if these are technically unicode characters.
<struktured> Drup: good enough for me. I don't intend to seriously abuse it, but I have a DSL which could really benefit from it
<Drup> mcc: CCInt.compare will do just fine.
<dmbaturin> darryn: Which book?
<Drup> dmbaturin: legacy.
<darryn> dmbaturin: Real World Ocaml
<dmbaturin> darryn: You may want to look into "OCaml from the very beginning".
<darryn> dmbaturin: is that an easier book? Real World Ocaml is just nice because it is free.
jabesed has quit [Ping timeout: 265 seconds]
<struktured> Drup: cool! I like that. for math like this it makes me particularly happy
<dmbaturin> Yes, I think it's more beginner-friendly (and even though it's not free, it's cheap).
<darryn> Alright, ill go buy it.
<darryn> Is it worth buying both?
<dmbaturin> mcc: The convention for compare a b is to return -1 for b > a, 0 for b = a, and 1 for a > b
<Drup> struktured: I used it quite a bit, it's very efficient.
<Drup> (the only thing I'm not sold on is the ! operator)
<struktured> Drup: what is? the algorithm or the syntax bindings?
<dmbaturin> darryn: Both as in "from the very beginning" and "more OCaml"?
<Drup> struktured: syntax
<Drup> algorithm is "just" z3. :p
<struktured> Drup: ok cool, well I am adding a small probability calculus to one of my libs, so I might overload a few operators, within reason
<struktured> *overload/rebind
<Drup> struktured: in the case of z3overlay, I rebind a lot of things :D
<darryn> No, I meant RWO and OFVB
<darryn> I'll get more ocaml if the first is nice
<dmbaturin> darryn: Well, if you want to support RWO authors, why not.
<struktured> Drup: also I think its good practice to get provide an old module with original operators, do you do that?
<Drup> see above.
<darryn> Which I do, Ocaml seems to be gaining more traction here lately.
<Drup> struktured: oh, you mean, the not rebind operator ?
<dmbaturin> OFVB is available as a DRM-free PDF, apart from the print version. This is what I bought.
<Drup> No, I don't do that because no one is there right mind would use T for something else than T.( ... )
<Drup> in*
<Drup> their*
<darryn> I preffer print, much easier to go through
<darryn> when I am programming
<struktured> Drup: I wonder if that should be done with some of oml's matrix operations.
<struktured> matrix rebinding get's you very close to a typed matlab in utop
<Drup> struktured: well yeah, did you looked at the example ?
<struktured> onthe README.md itself?
<Drup> writing smt terms become really easy with that, and it's easier to read too
<Drup> yes
<dmbaturin> I never buy dead tree editions when a DRM-free digital version is available (not as much to save trees as to not worry about shipping and other problems of physical objects).
<darryn> "dead tree editions" lmao
<struktured> Drup: I see "int x", is that how the operators handle different types? through a variant?
<darryn> Who here works with OCaml for their job?
<Drup> struktured: it's not through a variant, but yeah
<struktured> darryn: starting to, I have done about 80% ocaml for past two weeks
<nullcat> still a student..
<yomimono> as of recently, my job is ocaml
<struktured> Drup: got it. cool. that's neat
BitPuffin|osx has joined #ocaml
<darryn> It seems like there is a demand for good Ocaml developers.
<struktured> darryn: in NYC area you can probably get a job as one, if you really want
<tokenrove> speaking of which, if anyone is looking for freelance ocaml work, i recently had to turn some down for various reasons and could recommend you to the client.
<nullcat> yomimono: first time see you here
<yomimono> :) I lurk here sometimes
<darryn> Well, I want to move out of this state/country, so if I found a job in France, I wouldn't complain.
<darryn> Not that I am even close to being good enough
<yomimono> i'm not very good and yet somehow money is arriving
<yomimono> there is hope :)
<darryn> I haven't had a job in my study field yet, just retail and factory work. Hopefully graduating will change that.
<yomimono> it won't hurt, that's for sure. prospects improved for me drastically after finishing my degree
<darryn> How can I work in my field and continue college?
<dmbaturin> tokenrove: What's the job about?
<darryn> brb
<tokenrove> dmbaturin: it involves audio processing and is a substantial amount of work. that's about all i can say publically. msg me if you are interested.
<dmbaturin> Ah. Well, I know pretty much noting about audio processing.
tinhead has joined #ocaml
cdidd_ has joined #ocaml
mcc has quit [Quit: This computer has gone to sleep]
c74d has quit [Remote host closed the connection]
cdidd has quit [Ping timeout: 245 seconds]
c74d has joined #ocaml
tinhead has quit [Remote host closed the connection]
badon has quit [Quit: Leaving]
tinhead has joined #ocaml
tinhead has joined #ocaml
yomimono has quit [Quit: Leaving]
leafac has quit [Quit: Leaving.]
leafac has joined #ocaml
tinhead has quit [Remote host closed the connection]
leafac has quit [Client Quit]
rgrinberg has quit [Ping timeout: 245 seconds]
darkf has joined #ocaml
agarwal1975 has quit [Quit: Connection closed for inactivity]
tinhead has joined #ocaml
rgrinberg has joined #ocaml
ethycol has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
tinhead has quit [Remote host closed the connection]
idegen has joined #ocaml
<dmbaturin> Why ocamlnet opam package builds without TLS by default? What's the easiest way to change it?
darryn has quit [Read error: Connection reset by peer]
tinhead has joined #ocaml
<hnrgrgr> dmbaturin: because the package 'conf-gnutls' is only a optional dependency in the ocamlnet package
tinhead has quit [Changing host]
tinhead has joined #ocaml
<hnrgrgr> "opam install conf-gnutls" should recompile ocamlnet with TLS.
<dmbaturin> hnrgrgr: Thanks!
tinhead has quit [Remote host closed the connection]
badon has joined #ocaml
darryn has joined #ocaml
idegen has quit [Quit: Leaving.]
tmtwd has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
<darryn> how can you pm on irc?
<rgrinberg> darryn: /query <username>
zpe has quit [Ping timeout: 245 seconds]
Algebr has joined #ocaml
<Algebr> what benefits does ocp-build have over a makefile?
<rgrinberg> Algebr: it makes you look more like a haxxor
<rgrinberg> and its microscopically faster
<Algebr> I'd like to at least read the manual but the link online goes to a 404
<Algebr> so I guess I will gander at the src.
<rgrinberg> Algebr: ocp-build is dead, how come you want to use it?
<Algebr> I didn't know it was dead. I just saw it for the first time and was curious but I guess you just saved me a lot of time.
<Algebr> what are the current active projects for building?...oasis?
<rgrinberg> Algebr: they pulled the source from github too so I don't think you'd find it
<Algebr> while, opam archive
<Algebr> why*
<rgrinberg> oasis is the most popular. but there's probably like 5 other choices that are common
<Algebr> but is oasis the one with the most effort, direction?
<rgrinberg> people kept making bug reports and contributors, i think it ended up annoying the maintainer. no idea though
gabemc has joined #ocaml
<rgrinberg> Algebr: hard to say. they're all pretty stagnant
<rgrinberg> assemblage is the new hope
<rgrinberg> although it's not usable yet
<Algebr> I think I'm just going to keep using makefiles and forget about this whole area for a couple years.
<rgrinberg> Algebr: good idea :) OCamlMakefile causes very little headaches
<dmbaturin> What's assemblage?
<rgrinberg> it helps to know the basics with oasis though if you're contributing to other people's code though
<Algebr> rgrinberg: yea, that kind of annoys me. that I have to spend time on this tool that I don't care for..
<dmbaturin> rgrinberg: Hhm, support for camlp4 but not PPX?
<rgrinberg> Algebr: the rest of us hate it and use it, so we're even worse off
darryn has quit [Read error: Connection reset by peer]
mlamari has quit [Ping timeout: 264 seconds]
<rgrinberg> Anybody have a favorite way of including snippets for documentation in their project?
<rgrinberg> my requirements are that the snippets compile and they're embedded in the markdown
psy__ has quit [Remote host closed the connection]
BitPuffin|osx has quit [Ping timeout: 258 seconds]
darryn has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mlamari has joined #ocaml
Algebr has quit [Ping timeout: 252 seconds]
darryn has quit [Read error: Connection reset by peer]
tmtwd has joined #ocaml
zpe has joined #ocaml
psy_ has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
gabemc has quit [Ping timeout: 255 seconds]
clog has quit [Ping timeout: 258 seconds]
mcc has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
c74d has quit [Read error: Connection reset by peer]
<mcc> So... I am looking at uutf.mli... it contains the line: type encoding = [ `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ]
<mcc> yet when I say Uutf.UTF_8, it says: Unbound constructor Uutf.UTF_8
<mcc> is the ` MAGIC?
MercurialAlchemi has joined #ocaml
c74d has joined #ocaml
<mcc> figured it out
mcc has quit [Quit: This computer has gone to sleep]
<rgrinberg> mcc: ` is indeed magic :P
yomimono has joined #ocaml
octachron has joined #ocaml
ggVGc has quit [Ping timeout: 256 seconds]
ggVGc has joined #ocaml
nullcat has joined #ocaml
martintrojer has quit [Read error: Connection reset by peer]
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
yomimono has quit [Ping timeout: 265 seconds]
Gama11 has joined #ocaml
jeffmo has quit [Quit: jeffmo]
oscar_toro has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
freling has joined #ocaml
clog has joined #ocaml
oscar_toro has joined #ocaml
maufred has quit [Ping timeout: 244 seconds]
maufred has joined #ocaml
AltGr has joined #ocaml
zpe has joined #ocaml
maufred has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
maufred has joined #ocaml
c74d has quit [Remote host closed the connection]
c74d3 has joined #ocaml
jgjl has joined #ocaml
yomimono has joined #ocaml
<companion_cube> https://www.reddit.com/r/ocaml/comments/37i7mq/pearls_of_algebraic_effects/crnncme <-- interesting case from someone who thinks effects are too dangerous
cml__ has joined #ocaml
amnn has joined #ocaml
hrmpf has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ollehar has joined #ocaml
jonludlam has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
ingsoc has joined #ocaml
jgjl has joined #ocaml
Intensity has quit [Remote host closed the connection]
dsheets has joined #ocaml
freling has quit [Quit: Leaving.]
milosn has quit [Quit: leaving]
siddharthv_away is now known as siddharthv
AltGr has left #ocaml [#ocaml]
tmtwd has quit [Ping timeout: 256 seconds]
tmtwd has joined #ocaml
oscar_toro has quit [Ping timeout: 258 seconds]
jabesed has joined #ocaml
mort___ has joined #ocaml
Kakadu has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
TheLemonMan has joined #ocaml
leafac has joined #ocaml
psy_ has quit [Ping timeout: 250 seconds]
s1n4 has quit [Ping timeout: 250 seconds]
s1n4 has joined #ocaml
psy_ has joined #ocaml
tmtwd has quit [Ping timeout: 258 seconds]
mcclurmc_ has joined #ocaml
ollehar1 has joined #ocaml
Wandering_Glitch has joined #ocaml
siddharthv is now known as siddharthv_away
ohama has quit [Disconnected by services]
ohama has joined #ocaml
ollehar has quit [Ping timeout: 258 seconds]
WanderingGlitch has quit [Ping timeout: 258 seconds]
mcclurmc has quit [Ping timeout: 258 seconds]
luzie has quit [Ping timeout: 258 seconds]
thomasga has joined #ocaml
Guest6849 has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
avsm has joined #ocaml
rgrinberg has joined #ocaml
sdothum has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
leafac has quit [Quit: Leaving.]
jonludlam has joined #ocaml
leafac has joined #ocaml
_andre has joined #ocaml
leafac has quit [Quit: Leaving.]
oscar_toro has joined #ocaml
<apache2> mcclurmc_: ` is a polymorphic variant (rather than a normal sum type)
psy_ has quit [Ping timeout: 246 seconds]
hrmpf has quit [Quit: Page closed]
leafac has joined #ocaml
leafac has quit [Quit: Leaving.]
<tobiasBora> Hello !
<companion_cube> o/
rgrinberg has joined #ocaml
<tobiasBora> Just to finish the conversation of yesterday, what is Graphics built on ? Is it a C binding or full Ocaml ?
<Drup> C binding
<pippijn> you'd have to write an X protocol implementation in ocaml
<pippijn> that's probably neither fun nor rewarding
Guest6849 has quit [Ping timeout: 245 seconds]
<adrien_znc> ocaml-xcb
rgrinberg has quit [Ping timeout: 258 seconds]
<adrien_znc> but considering how much Graphics is used
<octachron> and probably not the right timing with wayland lurking on the horizon.
Guest6849 has joined #ocaml
Guest6849 has quit [Read error: Connection reset by peer]
badkins has joined #ocaml
<tobiasBora> Drup: Thanks ! Out of curiosity, you may have the name of the original C program ?
<Drup> xavier leroy did a mini C library just for it
<tobiasBora> In SDL ?
<Drup> I don't think it uses sdl
<Drup> just X11
<Drup> I used it for my C teaching, it's a convenient and simple library.
<Drup> (if a bit limited)
kushal has joined #ocaml
<tobiasBora> pippijn: octachron : I see. But I think I don't have the level to write this kind of library...
<tobiasBora> Drup: And if it uses only X11 why can't he just do it in Ocaml ?
<Drup> because recoding the X protocol is completely pointless at this point
<tobiasBora> Hum yes of course
<Drup> (and it was even more pointless 15 years ago)
seanmcl has joined #ocaml
tmtwd has joined #ocaml
<orbitz> Is it possibel to include a module in a .mli if the interfaces are going to match?
<Drup> in a .mli, you include a signature, not a module, but yes, you can include
kushal has quit [Ping timeout: 252 seconds]
octachron has quit [Ping timeout: 256 seconds]
Tamae has joined #ocaml
<orbitz> Drup: thanks
luzie has joined #ocaml
mort___ has quit [Ping timeout: 256 seconds]
<apache2> wayland may be more interesting to have bindings to
mort___ has joined #ocaml
jonludlam has quit [Remote host closed the connection]
octachron has joined #ocaml
<Drup> :hype:
rgrinberg has joined #ocaml
jonludlam has joined #ocaml
zpe_ has joined #ocaml
kushal has joined #ocaml
zpe has quit [Ping timeout: 276 seconds]
mort___ has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 276 seconds]
octachron has quit [Ping timeout: 264 seconds]
idegen has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
arj has quit [Quit: Leaving.]
octachron has joined #ocaml
<hnrgrgr> companion_cube: pretty quick to notice, are you monitoring the OCamlPro github account ?
<companion_cube> yes, there's a handy feature on github to do that ;)
<adrien_znc> he's a stalker
* companion_cube stalks adrien_znc
* adrien_znc wants his privacy!
octachron has quit [Ping timeout: 252 seconds]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
octachron has joined #ocaml
octachron has quit [Client Quit]
milosn has joined #ocaml
lordkryss has joined #ocaml
avsm has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
jgjl has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rgrinberg has quit [Ping timeout: 272 seconds]
BitPuffin|osx has joined #ocaml
A1977494 has joined #ocaml
freling has joined #ocaml
sdothum has joined #ocaml
mort___1 has joined #ocaml
sdothum has quit [Client Quit]
blandflakes has joined #ocaml
sdothum has joined #ocaml
kushal has quit [Ping timeout: 272 seconds]
jabesed has quit [Ping timeout: 265 seconds]
seanmcl has quit [Ping timeout: 264 seconds]
seanmcl has joined #ocaml
Wandering_Glitch has quit [Changing host]
Wandering_Glitch has joined #ocaml
Wandering_Glitch is now known as WanderingGlitch
darkf has quit [Quit: Leaving]
agarwal1975 has joined #ocaml
* nicoo stalks companion_cube and send him to the Zone
<companion_cube> oh nooooooooo
fraggle-boate__ is now known as fraggle-boate
jabesed has joined #ocaml
rgrinberg has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 250 seconds]
mort___ has joined #ocaml
mort___1 has quit [Ping timeout: 256 seconds]
leafac has joined #ocaml
jgjl has joined #ocaml
leafac has quit [Client Quit]
A1977494 has quit [Quit: Leaving.]
kushal has joined #ocaml
seanmcl has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ocaml
sdothum has quit [Remote host closed the connection]
jonludlam has quit [Ping timeout: 272 seconds]
BitPuffin|osx has quit [Ping timeout: 240 seconds]
sdothum has joined #ocaml
BitPuffin|osx has joined #ocaml
sdothum has quit [Client Quit]
slash^ has joined #ocaml
leafac has joined #ocaml
sdothum has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has joined #ocaml
rgrinberg has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Denommus has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has joined #ocaml
mort___ has quit [Quit: Leaving.]
kdef has joined #ocaml
Reventlov has quit [Quit: leaving]
badkins has quit [Read error: Connection reset by peer]
Reventlov has joined #ocaml
jabesed has quit [Quit: Konversation terminated!]
jabesed has joined #ocaml
psy has joined #ocaml
nullcat_ has joined #ocaml
<struktured> apparently putting opam binary instead .opam breaks some packages..back to outside of it...
<struktured> *instead/insie
<struktured> *inside
rgrinberg has quit [Ping timeout: 256 seconds]
psy has quit [Disconnected by services]
psy_ has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Max SendQ exceeded]
divyanshu has joined #ocaml
swgillespie has joined #ocaml
jabesed has quit [Ping timeout: 265 seconds]
Hannibal_Smith has joined #ocaml
jabesed has joined #ocaml
swgillespie has quit [Client Quit]
rgrinberg has joined #ocaml
swgillespie has joined #ocaml
jabesed has quit [Ping timeout: 244 seconds]
zpe_ has quit [Remote host closed the connection]
swgillespie has quit [Max SendQ exceeded]
shinnya has joined #ocaml
swgillespie has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
freling has quit [Quit: Leaving.]
jeffmo has joined #ocaml
jwatzman|work has joined #ocaml
jabesed has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrScout has joined #ocaml
badkins has joined #ocaml
j0sh has joined #ocaml
hay207 has joined #ocaml
j0sh has quit [Client Quit]
gabemc has joined #ocaml
freling has joined #ocaml
j0sh has joined #ocaml
hay207 has quit [Client Quit]
haythammed_ has joined #ocaml
haythammed_ has quit [Read error: Connection reset by peer]
hay207 has joined #ocaml
tane has joined #ocaml
jita has joined #ocaml
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
freling has quit [Quit: Leaving.]
MrScout has quit [Read error: Connection reset by peer]
gabemc has quit [Ping timeout: 276 seconds]
MrScout has joined #ocaml
freling has joined #ocaml
ygrek has joined #ocaml
zpe has joined #ocaml
ollehar has joined #ocaml
ggole has joined #ocaml
<jita> what the syntax differences between f# and ocaml? Is it easy to pick one and later translate the code to another ?
milosn has quit [Quit: Lost terminal]
milosn has joined #ocaml
tmtwd has quit [Ping timeout: 272 seconds]
robink has quit [Ping timeout: 255 seconds]
tinhead has joined #ocaml
dsheets has quit [Ping timeout: 272 seconds]
<apache2> for one, the modules are different
tinhead has quit [Remote host closed the connection]
<smondet> jita: AFAIR there is even some code that cross-compiles between both languages but it uses a very restricted subset of both: the CamlPDF library
<tane> jita, F#'s parsing rules are a little different as white space is a bit more significant. the object system has been valued higher due to the underlying platform. there's no functor system
<jita> Coming from python background in Unix platform, which should I start learning? Which syntax will be easier for me ? THanks
<tane> syntax is not that difficult and different
<tane> if you want to do development for the unix platform i'd recommend ocaml
<tane> mono is just not as performant and the toolchain for ocaml development is much better
robink_ has joined #ocaml
<tane> at least on *nix
<tane> another plus: ocaml has a nice community (i do not have any experience with the F#, so that's more of an absolute than relative statement) :)
<jita> right thanks. What would be best way to start ocaml learning ?
<tane> you already have experience with python, any more functional oriented language as well?
<rgrinberg> Drup: you should recruit harrop for the assemblage team
<jita> tane: no
<Drup> rgrinberg: ಠ_ಠ
<tane> jita, https://realworldocaml.org/v1/en/html/index.html this is a good book, its using a 3rd party standard library overlay, but it should teach the basics nevertheless. as it's free i'd at least keep it bookmarkd. there are lighter tutorials on ocaml.org
<jita> tane: thanks
<rgrinberg> jita: this is also a great resource https://ocaml.github.io/ocamlunix/
<rgrinberg> I agree about starting with RWO though
<jita> rgrinberg: thanks
<tane> rgrinberg, yep, someone should make a pullrequest, changing the string to buffer types where necessary though :)
<dmbaturin> F# has no module system in usual ML sense AFAIR.
<reynir> if unix includes solaris then I dunno what you should choose...
<jita> actually i use mac
<rgrinberg> the bad reviews for RWO on amazon are cringeworthy http://www.amazon.com/Real-World-OCaml-Functional-programming/dp/144932391X/ref=sr_1_1
<dmbaturin> jita: Also, the syntax is (mostly) simple and straightforward. It's semantics behind that syntax that can be confusing.
<jita> dmbaturin: is it simpler than haskell ?
<rgrinberg> ocaml is simpler than haskell for writing real world programs
<rgrinberg> that's for sure
<dmbaturin> I think it is.
jeffmo has quit [Quit: jeffmo]
<dmbaturin> jita: Even though there are imperative features and object system, it's not what most people would use by default (while in python almost everything is mutable by default and the OO system is the only way to introduce user-defined types).
<jita> ok
<dmbaturin> It's not really a social convention to avoid them, in the presence of alternatives (algebraic types and pattern matching and the module system) they are simply not the best way to express ideas.
<jita> ok thanks for the information
robink_ is now known as robink
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tinhead has joined #ocaml
<dmbaturin> The default encapsulation mechanism is abstract types (there's a type in the module implementation, but module interface doesn't expose its real definition and clients only know it as Mymodule.mytype, so they can pass a value around but can't do anything to it, other than by using functions from the module itself).
zpe has quit [Remote host closed the connection]
tinhead has quit [Remote host closed the connection]
Algebr has joined #ocaml
jwatzman|work has quit [Read error: Connection reset by peer]
seanmcl has joined #ocaml
jwatzman|work has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
kushal has quit [Ping timeout: 256 seconds]
MrScout has joined #ocaml
kushal has joined #ocaml
postulonce is now known as catapulpe
nullcat has joined #ocaml
tinhead_ has joined #ocaml
cml__ has quit [Ping timeout: 246 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullcat has quit [Remote host closed the connection]
nullcat has joined #ocaml
seanmcl has joined #ocaml
kdef has quit [Quit: Leaving]
tinhead_ has quit []
tinhead has joined #ocaml
nullcat has quit [Ping timeout: 246 seconds]
tinhead has quit [Remote host closed the connection]
tinhead has joined #ocaml
tinhead has joined #ocaml
obadz has quit [Ping timeout: 245 seconds]
nullcat_ has joined #ocaml
obadz has joined #ocaml
freling has quit [Quit: Leaving.]
freling has joined #ocaml
nullcat has joined #ocaml
nullcat_ has quit [Read error: Connection reset by peer]
kdef has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
struk|work has quit [Ping timeout: 246 seconds]
amnn_ has joined #ocaml
amnn has quit [Ping timeout: 265 seconds]
Cyanure has joined #ocaml
nullcat has quit [Ping timeout: 265 seconds]
freling has quit [Quit: Leaving.]
blandflakes has quit [Ping timeout: 256 seconds]
Kakadu has quit [Quit: Page closed]
freling has joined #ocaml
idegen has quit [Quit: Leaving.]
idegen has joined #ocaml
blandflakes has joined #ocaml
rwmjones has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
tinhead has quit [Remote host closed the connection]
rwmjones has joined #ocaml
freling has quit [Client Quit]
freling has joined #ocaml
jeffmo has joined #ocaml
<jita> how to enable tab completion in repl in terminal ?
<Drup> in utop ?
<Drup> alt down
<jita> Drup: i am not using utop, should i use it ?
<Drup> yes
<jita> right thanks
slash^ has quit [Read error: Connection reset by peer]
tmtwd has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
thomasga has quit [Quit: Leaving.]
jita_ has joined #ocaml
jita has quit [Ping timeout: 246 seconds]
jgjl has joined #ocaml
thomasga has joined #ocaml
nicoo has quit [Ping timeout: 272 seconds]
mrknife has left #ocaml ["Bye!"]
Submarine has joined #ocaml
Submarine has joined #ocaml
TheLemonMan has joined #ocaml
jgjl has quit [Ping timeout: 255 seconds]
manizzle has joined #ocaml
Kakadu has joined #ocaml
dsheets has joined #ocaml
nicoo has joined #ocaml
tinhead has joined #ocaml
<orbitz> Hello, I have a foo.ml where is just: include Some_functor.Make(M) and the .mli is the manually expanded version of that. Howver I'm hitting a problem in another module where the type checker doesn't realize that Foo and Some_functor.Make(M) are the same thing. What am I missing?
nicoo has quit [Quit: WeeChat 1.1.1]
<smondet> orbitz: sounds like one or more `... with type .. = ..` are missing, difficult to tell without the code
<orbitz> smondet: where would the with type go? The application in foo.ml?
hay207 has quit [Ping timeout: 240 seconds]
<smondet> orbitz: or the other one, I'm not sure :-/
<orbitz> hehe
<orbitz> I think it is acase of that aswell...i'm just not sure where
<orbitz> The problem being I have Some_functor.Make(M).t and Foo.t and compiler says they are not the same thing
nicoo has joined #ocaml
<Drup> show the code
<smondet> orbitz: how are you exporting Foo.t in the mli?
<Drup> it's impossible to debug like that.
tinhead has quit [Remote host closed the connection]
<orbitz> Drup: Right now thre is too much code, I was hoping it was an obvious thing
nullcat has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
ggole has quit [Read error: Connection reset by peer]
amnn_ has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
amnn has joined #ocaml
tinhead has joined #ocaml
<orbitz> smondet: hrm, I think you're right that I'm not exposing enough type information
<orbitz> Will play with it more tomorrow, night!
<Drup> orbitz: it is probably rather obvious, if you know where to look
_andre has quit [Quit: leaving]
badkins has quit []
<nullcat> ha that reddit thread..
<Drup> nullcat: it was not a brilliant idea :D
<nullcat> well, i tried to ask in a gentle way
<nullcat> and by no means i'd like to encourage any personal attacks
<nullcat> maybe i should change my wording a little bit to make it more gentle? =_=
<nullcat> but yeah, i don't like that guy either...
<Algebr> what are you talking about
rgrinberg has quit [Quit: WeeChat 1.1.1]
octachron has joined #ocaml
rgrinberg has joined #ocaml
<nullcat> (* i'm the OP and it seems i asked a stupid question *)
<adrien> first time you met jdh30?
<nullcat> " Calling this "slow" would be a misunderstanding of the difficulty of the work involved, I think." by gasche
<nullcat> no, met him several times on ocaml subreddit
<adrien> ='(
<nullcat> well, i only read on reddit
<adrien> and I don't think it was a stupid question and gasche was trying to be nice to all parties involved I think
<adrien> at least that'd explain why that sentence is so weird
<Algebr> this guy is always selling F#
<Drup> Algebr: badly
<Drup> (it's not very hard to sell F# well)
<jita_> He says he is not involved in F# commercially anymore https://www.reddit.com/r/fsharp/comments/373j5v/net_universal_apps_and_f/crl18wn
leafac has quit [Quit: Leaving.]
leafac has joined #ocaml
<Algebr> anyone here with work experience in f#? I'm considering a position using it
<rgrinberg> the f# promotion is fine. even some of harrop's points are good. E.g. the comment about QPL
<rgrinberg> he's stuck in the past though
<jita_> rgrinberg: stuck in the past?
<nullcat> jdh30: -100 comment karma
<Drup> rgrinberg: the issue with harrop was never about the point he makes, but about how he makes them
<nullcat> first time see -100 karma
<nullcat> negative 100......
<rgrinberg> at least we are bigger than r/fsharp and that's all that matters
<Drup> :D
<nullcat> at least we have mascot
<Drup> aren't those dromedary ?
<nullcat> ...
<rgrinberg> Drup: f#'s build tools are so awful too. the language is very much in the spirit of ocaml :D
<nullcat> it's still camel...
<Drup> NO :<
<nullcat> i feel like Drup has tremendous amount of knowledge about animal
<Drup> nullcat: only for didactic purposes: https://github.com/Drup/furl#quick-look
<nullcat> .....
<Drup> (I obviously needed documentation to write this, wikispecies was very helpful)
<nullcat> lol...
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
wraithm has joined #ocaml
tinhead has quit [Remote host closed the connection]
<rgrinberg> so btw, how come opam doesn't work on windows?
<rgrinberg> i think if opam gets ported to windows, the haxe guys might start using it :P
<nullcat> btw Drup, i always want to know what this repo is. https://github.com/Drup/No./blob/master/data.ml
<Algebr> why oh why does ocamlnet have a dependency on lablgtk
tinhead has joined #ocaml
<tokenrove> Algebr: i prefer ocaml, but f# is quite decent compared with other things in the .net ecosystem. i worked for a while with a company with a large c# codebase where f# was a great way to bring in a more elegant language while refactoring. (plus, the units-of-measure support was handy)
<Algebr> tokenrove: thanks, appreciate the insight
tinhead has quit [Remote host closed the connection]
tinhead has joined #ocaml
<rgrinberg> i've used f# as well. I have a slight preference towards ocaml language wise but i can't stand the f# ecosystem
<rgrinberg> i think that they're complimentary though. you can use f# in a lot of places where it's impossible/too hard to use ocaml
<rgrinberg> cross platform mobile with xamarin, windows, games with monogame, unity, etc.
<jita_> Is it possible to do this more elegantly? http://dpaste.com/120Z0N7
<jita_> like in python i can do this "-".join(languages.split(',')
tinhead has quit [Remote host closed the connection]
<jita_> is there something similar?
<rgrinberg> langs |> String.split ~on:',' |> String.concat ~sep:'-'
<rgrinberg> ?
<rgrinberg> ocaml isn't that great for golfing though
<jita_> rgrinberg: cool thanks
octachron has quit [Quit: Leaving]
<jita_> rgrinberg: golfing?
obadz has quit [Ping timeout: 264 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seanmcl has quit [Remote host closed the connection]
<jita_> rgrinberg: but there is lot less noise as compared to Java/c#
seanmcl has joined #ocaml
<rgrinberg> jita_: it's true. but in general i find python code to be slightly shorter
<rgrinberg> although the number of tokens in a program is usually not something i optimize for
<jita_> rgrinberg: do you program in python too ?
<rgrinberg> jita_: yes
<jita_> rgrinberg: in which use cases do you prefer ocaml over python and vice versa ?
<Algebr> (I also program in both. I prefer it for anything serious/stable...python is way better for feeling out data though.)
tinhead has joined #ocaml
<rgrinberg> jita_: if i'm making a 1-20 line script i prefer python. or whenever i need some really convenient python lib
tinhead has quit [Remote host closed the connection]
obadz has joined #ocaml
<jita_> Interesting, would you guys use ocaml over python for a web application ?
nullcat_ has joined #ocaml
<Algebr> I wouldn't.
<rgrinberg> jita_: ocaml is the better language. period. but python has more libs and more people know it
<Algebr> flask makes things just stupid easy to say no to.
ousado has joined #ocaml
ygrek has joined #ocaml
<jita_> yeah
<rgrinberg> i do have a flask inspired lib for ocaml as well https://github.com/rgrinberg/opium
<rgrinberg> although obviously flask is more complete and mature
<jita_> ok
<rgrinberg> generally, if i'm staring a project i expect to maintain i will always try to pick ocaml
<rgrinberg> python makes maintenance a nightmare
<jita_> right
<MercurialAlchemi> well, it depends on the size of the codebase
kushal has quit [Ping timeout: 272 seconds]
<MercurialAlchemi> but it's certainly a lot easier to write code which works as expected in OCaml than in Python
<MercurialAlchemi> on the other hand, the library problem can be harder to work around with, depending on what you're working on
tinhead has joined #ocaml
tinhead has joined #ocaml
leafac has quit [Quit: Leaving.]
<jita_> ok thanks for the information
<jita_> which other languages you guys like besides python and ocaml?
<rgrinberg> f#, haskell, rust :P
<Algebr> i like swift
Anarchos1 has joined #ocaml
<rgrinberg> swift is a good language. but i don't want to use proprietary languages
<Denommus> my biggest issue with F# is that they don't have ML modules, and don't have anything to replace them. So it becomes hard to make code less repetitive
<jita_> rgrinberg: rust is not a general purpose language right? Would you use it where you would use ocaml/python ?
<Leonidas> I didn't like swift that much when I tried it
<Denommus> jita_: Rust is a general purpose language
<rgrinberg> jita_: rust it too level for most tasks that i do. i really like rust's macros though
<rgrinberg> s/level/low level/
<Leonidas> pattern matching wasn't an expression, that scared me off
<Denommus> jita_: it's just somewhat harder to do most applications on it because it provides safety through a lot of constraints. It's really designed for systems
<Denommus> Leonidas: ewww
tinhead has quit [Remote host closed the connection]
<Leonidas> maybe that was fixed or maybe I misunderstood something, don't know. I haven't had any use for it, so I just skipped it
tinhead has joined #ocaml
<Denommus> it's harder for me to get excited for an application language other than Haskell and OCaml, really
<Denommus> s/harder/hard/
<MercurialAlchemi> Rust looks superficially like ML languages but it is really geared toward low-level work
<Denommus> and I used to be a hardcore Lisper
<MercurialAlchemi> Idris looks interesting
<Denommus> MercurialAlchemi: ah, indeed, I forgot about Idris
<Leonidas> Denommus: Typed Clojure! :-)
<Leonidas> Edwin Brady of Idris is a hilarious guy
tinhead has quit [Remote host closed the connection]
<Denommus> Leonidas: isn't Typed Clojure optionally typed? I don't like optional types
<Denommus> there's Typed Racket, but its type system is too rudimentary to be productive
<Drup> rgrinberg: unity support for F# will be very welcome too
<Leonidas> Denommus: I think Typed Clojure is rather similar to Typed Racket
tinhead has joined #ocaml
<Denommus> I just found out about (@@). I feel stupid
<Leonidas> @@ is great, I use it all the time
<Leonidas> and the remaining time I use |>
<rgrinberg> i kind of wish it was never introduced :/ everyone is overusing it
<Leonidas> 'bcause it's awesome :-)
Submarine has quit [Remote host closed the connection]
<Leonidas> it breaks in some cases, which sucks
tinhead has quit [Remote host closed the connection]
<Leonidas> but it leads to pretty nice syntax when your code uses continuations.
<rgrinberg> @@ fun k -> :P
<Denommus> what I miss is (.) from Haskell
<Drup> % in batteries
<Denommus> cool
<Denommus> though it's probably not as useful as in Haskell because of the value restriction, right? :P
tinhead has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Drup> yes
Cyanure has quit [Remote host closed the connection]
<Drup> and because it wouldn't work with labels, and because ocaml don't tend to abuse combinators like flip, uncurry, curry, ...
<Drup> and because point free just sucks, really. :D
NhanH has quit [Ping timeout: 276 seconds]
<Leonidas> yes, I don't miss (.) that much
<Denommus> there are some functions in which I find it easier to reason about the point free version, but it's really not cool to overuse it
NhanH has joined #ocaml
sdothum has joined #ocaml
<Leonidas> rgrinberg: exactly. Thats rather nice, when your nested continuations don't end ))))))))))) in classic lisp style :-)
<Denommus> (I'm beginning to want to give up on NetwireOCaml because it's mostly point-free functions for reactive signals)
<Drup> when I was learning programming, we did a bit of lisp
<Drup> our teacher was very happy than, in the specific lisp dialect we were using, you could add as many parens as you want at the end
<Denommus> I like Lisp, but it's very overhyped by its followers
Simn has joined #ocaml
<Denommus> Drup: the tooling should help you with the parens, to be honest. If the editor doesn't allow you to edit your code as a tree, it's not a good editor for Lisp
<Drup> like "(f (g x))))))" was valid
<Drup> Denommus: that's beside the point, I'm just talking about the teacher
<dmbaturin> Drup: Which lisp dialect was it?
<Leonidas> Drup: that looks like it'll bite you in the future
<Denommus> Drup: right
<Drup> dmbaturin: I don't remember, and I don't really want
<Denommus> it can't be worse than newLISP
<Denommus> but that's becoming too off-topic XD
freling has quit [Quit: Leaving.]
<Denommus> hm, can I print unit with printf?
Algebr has quit [Remote host closed the connection]
<dmbaturin> I think not.
<Denommus> ok
<dmbaturin> I think even ppx_deriving show doesn't have built-in printer for unit, for some reason.
badon has quit [Quit: Leaving]
<dmbaturin> string_of_unit is not hard to define though. :)
<Denommus> coffee break
ollehar has quit [Ping timeout: 256 seconds]
Alain has joined #ocaml
badon has joined #ocaml
tinhead has quit [Remote host closed the connection]
ousado has quit [Changing host]
ousado has joined #ocaml
tinhead has joined #ocaml
jonludlam has joined #ocaml
hbar has quit [Ping timeout: 246 seconds]
jita_ has quit []
inf-gropeoid has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
tane has quit [Quit: Verlassend]
tmtwd has quit [Ping timeout: 252 seconds]
tinhead has quit [Remote host closed the connection]
<nullcat_> Drup: do u know if js_of_ocaml.compiler can create symbol table?
darnuria has left #ocaml ["WeeChat 1.2-dev"]
<Drup> what for ?
<nullcat_> create a symbol table for parsed javascript ast
<Drup> ah
<nullcat_> something like JavaScript.program -> symbolTable
<Drup> I don't know
<Drup> I don't know jsoo's internals, only the API
<nullcat_> i am looking at the source code but it seems there is no such thing
<nullcat_> yeah.. api documentation does not document things in /compiler
<nullcat_> iirc
Gama11 has quit [Read error: Connection reset by peer]
<Drup> just ask on the mailing list/bug tracker
<Drup> hhugo or jerome will answer quickly
<nullcat_> is github issues ok?
<Drup> or the mailing list, whichever you prefer
blech_ has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat_ has joined #ocaml
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
yomimono has joined #ocaml
wraithm has quit [Quit: leaving]
jpdeplaix has quit [Ping timeout: 256 seconds]
jpdeplaix has joined #ocaml
MrScout has quit [Ping timeout: 256 seconds]
seliopou has quit [Ping timeout: 256 seconds]
ingsoc has quit [Quit: Leaving.]
seliopou has joined #ocaml
JuggleTux has joined #ocaml
Simn has quit [Quit: Leaving]
ollehar has joined #ocaml
leafac has joined #ocaml
thomasga has quit [Quit: Leaving.]
tinhead has joined #ocaml
tinhead has quit [Changing host]
tinhead has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amnn has joined #ocaml
<j0sh> is there a way to curry (or partially apply) a function that has labelled/optional arguments?
Alain has quit [Ping timeout: 246 seconds]
<j0sh> for example, this does not seem to be do-able: let log_debug = Lwt_log.debug_f ~section
<Drup> how is it not possible ?
jonh has left #ocaml ["WeeChat 0.4.2"]
<Drup> (it should work just fine)
<nullcat_> let f ~x ~y = x - y;; let g = f ~y:3
<nullcat_> labeling argument helps you to do currying
<j0sh> not sure, the compiler is complaining here
<Drup> what is the complain ?
<nullcat_> fun s -> Lwt_log.debug_f ~section:s;;
<nullcat_> this works
<j0sh> hmm i guess it doesnt work with punning
tinhead has quit [Remote host closed the connection]
Kakadu has quit [Remote host closed the connection]
<j0sh> (pasted the error message in the gist, as it's rather long)
<smondet> j0sh: your gist works for me in utop
<j0sh> smondet: weird, maybe something else is affecting it. i'll try a minimal case
Hannibal_Smith has quit [Quit: Leaving]
<Drup> j0sh: you have lwt.syntax.log enabled
<j0sh> Drup: i have lwt.ppx, but not lwt.syntax, i'll try that
struktured has quit [Ping timeout: 256 seconds]
<j0sh> that gist worked on a 2-line .ml file so i guess something else here is affecting it
<j0sh> oh well, i'll figure it out
struk|desk2 has quit [Ping timeout: 265 seconds]
ollehar has quit [Quit: ollehar]
<Drup> huuum, lwt.ppx should not enable log by defualt
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Drup> oh shit, it is enabled by default O_O
<Drup> wtf why did I let that passed
<j0sh> Drup: yep it looks like adding lwt.ppx is (somehow?) the culprit
struk|desk2 has joined #ocaml
struk|desk2 has quit [Read error: Connection reset by peer]
struk|desk2 has joined #ocaml
<Drup> j0sh: see bottom of the documentation about lwt.ppx
<j0sh> Drup: ah now i see
<j0sh> Drup: where does the -no-log option get passed? during build time for lwt, or for the calling application?
<Drup> build time
<Drup> and it's passed to the ppx
<j0sh> hm i guess that's a bit tricky to do from an opam install
psy_ has quit [Read error: No route to host]
<j0sh> (short of maintaining a local build of lwt)
<Drup> build time of *your* application
struk|desk2 has quit [Ping timeout: 265 seconds]
<j0sh> ah
<j0sh> ...where exactly? 'ocamlfind ocamlopt -no-log ...' doesnt work
struk|desk2 has joined #ocaml
struk|desk2 has joined #ocaml
<Drup> -ppxopt lwt.ppx,-no-log
<j0sh> that did the trick, thanks
jonludlam has quit [Ping timeout: 256 seconds]
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
darryn has joined #ocaml
tmtwd has joined #ocaml
agarwal1975 has quit [Quit: Connection closed for inactivity]
mcclurmc has joined #ocaml
tinhead has joined #ocaml
tinhead has quit [Remote host closed the connection]
sc30317 has joined #ocaml
<sc30317> hey all; How do I compile ocaml code?
<sc30317> I know if I go into a prompt
<sc30317> and type
mcclurmc_ has quit [Ping timeout: 265 seconds]
<sc30317> # #use "sde3.caml";;
<sc30317> I return a value
<sc30317> but I want to make that an executable?
<zozozo> sc30317: first you should put all your code into a .ml file
<dmbaturin> sc30317: ocamlopt -o myprogram myprogram.ml
tinhead has joined #ocaml
<sc30317> zozozo, is there a difference between a .caml and a .ml file?
<dmbaturin> Tools expect .ml
<zozozo> i have never seen a .caml file before
<sc30317> yeah
<sc30317> that's it
<sc30317> thanks guys :)
tinhead has quit [Remote host closed the connection]
<dmbaturin> You should install findlib, then you can easily link packages. ocamlfind ocamlopt -package unix -linkpgs -o myprog myprog.ml
<dmbaturin> * -linkpkg
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
mfp has quit [Ping timeout: 246 seconds]
Ray____ has joined #ocaml
tinhead has joined #ocaml
tinhead has joined #ocaml
mfp has joined #ocaml