lapinou changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Public logs at http://tunes.org/~nef/logs/ocaml/
Zerker has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<oafo> hell
<oafo> oo
oafo has quit [Quit: Page closed]
ontologiae has quit [Ping timeout: 252 seconds]
<tautologico> hi
thomasga has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 252 seconds]
Rota has joined #ocaml
thomasga has quit [Ping timeout: 255 seconds]
<whitequark> companion_cube, not sure if you're doing it wrong or too right
zpe has quit [Remote host closed the connection]
<whitequark> oh well! someone will think I'm talking to myself. I have to cut it
jwatzman|work has quit [Quit: jwatzman|work]
Zerker has quit [Remote host closed the connection]
darkf has joined #ocaml
ski has joined #ocaml
kig has joined #ocaml
dapz has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
marr has quit []
dsheets has quit [Ping timeout: 245 seconds]
kig has quit [Quit: kig]
racycle_ has quit [Quit: ZZZzzz…]
srcerer_ has joined #ocaml
clan has quit [Quit: clan]
q66 has quit [Quit: Leaving]
srcerer has quit [Ping timeout: 252 seconds]
ygrek_ has joined #ocaml
msch has quit [Ping timeout: 252 seconds]
msch has joined #ocaml
msch is now known as Guest84839
thomasga has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasga has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
divyanshu has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
boogie has quit [Remote host closed the connection]
dapz has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
lopex has quit [Ping timeout: 252 seconds]
lopex has joined #ocaml
clan has joined #ocaml
alinab has joined #ocaml
struktured has joined #ocaml
ygrek_ has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xenocons> is there a sumBy over lists
<xenocons> i suppose fold can be used
parcs has joined #ocaml
studybot_ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
racycle__ has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
racycle__ has quit [Read error: Connection reset by peer]
racycle__ has joined #ocaml
malo has quit [Quit: Leaving]
tnguyen has quit [Ping timeout: 252 seconds]
studybot has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
thomasga has joined #ocaml
racycle__ has quit [Ping timeout: 255 seconds]
thomasga has quit [Ping timeout: 255 seconds]
divyanshu has quit [Ping timeout: 240 seconds]
tlockney_away is now known as tlockney
divyanshu has joined #ocaml
zpe has joined #ocaml
racycle__ has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ivan\ has joined #ocaml
f[x] has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
mcclurmc has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
mcclurmc has joined #ocaml
f[x] has quit [Ping timeout: 264 seconds]
nikki93 has quit [Remote host closed the connection]
<xenocons> is there a way to make the toplevel report the type signature given? it only seems to print the type signature expected (errors)
axiles has joined #ocaml
<whitequark> just e.g. "val x = 1" should work
<whitequark> er, "let x = 1"
<whitequark> that prints "val x : int = 1"
venk has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<xenocons> yes but thats when you bind it
<xenocons> i.e. if i get an error when #load "blah.ml"
<xenocons> and it tells me: File "parser.ml", line 287, characters 2-11:
<xenocons> Error: This function has type ('a -> unit) -> 'a list -> unit It is applied to too many arguments; maybe you forgot a `;'.
<xenocons> how can i make it spit out what my input data has the signature of without manually doing it
nikki93 has joined #ocaml
<xenocons> itd be nice if it said 'function had type 'a -> string -> string but was supplied type 'a -> int -> int' or something
<xenocons> bloody hate this 'in' keyword
<whitequark> well, it told you the function signature
<xenocons> yes, but it didnt tell me the input (incorrect) type signature
<whitequark> try running the file through ocp-indent, that helps to spot the missing `in'
<xenocons> ah, ty, will do
kig has joined #ocaml
struktured has quit [Ping timeout: 252 seconds]
vpm has quit [Ping timeout: 252 seconds]
<tautologico> of course any discussion about the relative merits of programming languages wouldn't be complete without at least one rabid fanboy
<xenocons> tautologico: reading lambda the ultimate again?
<xenocons> whitequark: ocp-indent found the bug, nice
<tautologico> no, reddit
<xenocons> even worse
<xenocons> peanut gallery
<tautologico> the subreddits tend to be fine
<tautologico> technical ones at least
<tautologico> most of the time
<xenocons> r/programming sucks though
<tautologico> yeah, big ones usually do
<xenocons> im a language snob though so i guess im a bit critical
<xenocons> r/compsci can be interesting
racycle__ has quit [Quit: ZZZzzz…]
<xenocons> for some reason i have some plugin in vim that is compiling ocaml in the background and pulling errors into vim
<xenocons> semi neat, but it doesnt seem to be very complete
vpm has joined #ocaml
nikki93 has quit [Remote host closed the connection]
<whitequark> merlin?
divyanshu has joined #ocaml
<xenocons> hmm
<xenocons> i think it might be coming from OmniSharp :S
<xenocons> definetly ocaml errors though
<xenocons> (or F# maybe)
<xenocons> but its complaining about lack of 'in', which is not a F# compiler error
<whitequark> likely merlin.
<xenocons> i see
<xenocons> http://codepad.org/fpskhzTk im still missing an 'in' from here somewhere
Rota has quit [Ping timeout: 252 seconds]
<xenocons> ah, maybe its the trailing ;
<xenocons> yes thats what it was
<xenocons> ocp-indent does tell me this too if you look closely, the block below what i pasted was indented
<xenocons> can anyone think of a way to destrucure bind a map? let a,b,c,d = [1;2;3;4] |> List.map (List.nth xs)
<xenocons> figuring it isnt possible
<xenocons> oh wait, you can
<whitequark> match x with [a;b;c;d] -> ... | _ -> ...
<xenocons> let [a;b;c;d] = [1;2;3;4] |> List.map (List.nth xs);; ?
struktured has joined #ocaml
<whitequark> that would result in a warning though
<whitequark> bad style
<xenocons> yeh
<xenocons> agreed, will go with match
<xenocons> need error handling anyway
tlockney is now known as tlockney_away
mcclurmc has quit [Remote host closed the connection]
cesar_ has joined #ocaml
cesar_ is now known as Guest48731
<xenocons> whitequark: is there a way to bind a value within a pattern identifier?
<xenocons> like match x with [a;b;c] as xs -> f xs | ...
<xenocons> (not sure if 'as' is part of ocmal)
<xenocons> ocaml*
<xenocons> oh, it seems it is
struktured has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
<xenocons> perfect
Guest48731 has quit [Ping timeout: 276 seconds]
<adrien> xenocons: as for sumBy, "List.fold_left (+) 0 list" should do it
<xenocons> adrien: yeah, i ended up doing just that
zpe has quit [Ping timeout: 265 seconds]
steshaw has joined #ocaml
<adrien> :)
venk has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
skchrko has joined #ocaml
kig has quit [Quit: kig]
philtor has quit [Remote host closed the connection]
steshaw has quit [Quit: Leaving.]
claudiuc has quit [Remote host closed the connection]
cesar_ has joined #ocaml
cesar_ is now known as Guest83472
ygrek_ has quit [Ping timeout: 265 seconds]
steshaw has joined #ocaml
Guest83472 has quit [Remote host closed the connection]
gustav_ has quit [Ping timeout: 255 seconds]
<xenocons> ok, it seems for expression where you got arity of input correct, yet types wrong, ocaml will tell you input vs expected type signatures, nice
<xenocons> but if you get arity wrong it just tells you what type you didnt provide?
Simn has joined #ocaml
<adrien> it's probably because you did partial application
<adrien> let x : int = (+) 1;;
<adrien> Error: This expression has type int -> int but an expression was expected of type int
<adrien> well, maybe that wasn't a good example :P
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
gustav_ has joined #ocaml
tane has joined #ocaml
claudiuc has joined #ocaml
ygrek_ has joined #ocaml
nikki93 has joined #ocaml
berenger has joined #ocaml
<berenger> hello
<berenger> Here is the OPAM complaint of the day:
<berenger> # ocamlfind: Package `lwt.unix' not found
<berenger>
<berenger> so, my OPAM refuses to install lambda-term.1.6
<berenger> :(
<berenger> so, no utop
<berenger> :((
<berenger> opam v1.1.1
<berenger> Anyone knows in which package is lwt.unix hidding itself?
<berenger> Or was, maybe ...
clan has quit [Quit: clan]
dapz has joined #ocaml
berenger has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
kig has joined #ocaml
AltGr has joined #ocaml
asmanur has joined #ocaml
ontologiae has joined #ocaml
ggole has joined #ocaml
clan has joined #ocaml
Guest84839 is now known as msch
zpe has joined #ocaml
steshaw has quit [Quit: Leaving.]
marr123 has joined #ocaml
ikaros has joined #ocaml
asmanur has quit [Quit: quit]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
asmanur has joined #ocaml
dapz has joined #ocaml
marr123 is now known as marr
AltGr has left #ocaml []
Kakadu has joined #ocaml
claudiuc_ has joined #ocaml
tautologico has quit [Quit: Connection closed for inactivity]
maattdd has joined #ocaml
claudiuc has quit [Ping timeout: 240 seconds]
kig has quit [Quit: kig]
jao has quit [Ping timeout: 264 seconds]
eizo has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ocp has joined #ocaml
zpe has quit [Remote host closed the connection]
araujo has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
mort___ has joined #ocaml
jonludlam has joined #ocaml
jonludlam has quit [Remote host closed the connection]
jonludlam has joined #ocaml
thomasga has joined #ocaml
nikki93 has quit [Remote host closed the connection]
<jpdeplaix> whitequark: Is there a way to replace this call and pipe to a proper library call with the ocaml binding ? https://github.com/jpdeplaix/cervoise/blob/master/src/main.ml#L43
<whitequark> jpdeplaix: oh, absolutely
<whitequark> Llvm_target.Target.emit_to_file
<xenocons> any interesting transpilable languages ocaml->llvm->?
mk270_ is now known as mk270
<xenocons> also whats the ocaml llvm runtime like in comparison?
<jpdeplaix> whitequark: thanks ! :)
<jpdeplaix> whitequark: and for linking, is it the same module ?
<whitequark> jpdeplaix: Llvm_linker if you want to link bitcode
<whitequark> if you want to link object files, nope, you have to shell out
<whitequark> LLVM currently does not have a working linker.
<whitequark> and probably will not have in near future, at least not on platforms you care about
<jpdeplaix> thanks !
<xenocons> http://cedeela.fr/quickcheck-for-ocaml.html , cool, didn't know about Module.(some expression)
<xenocons> (parens included)
ygrek_ has quit [Ping timeout: 264 seconds]
<companion_cube> that's a cool feature indeed
thomasga has quit [Quit: Leaving.]
dsheets has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
ollehar has quit [Ping timeout: 252 seconds]
steshaw has joined #ocaml
thomasga has joined #ocaml
struktured has joined #ocaml
maattdd has joined #ocaml
<NoNNaN> whitequark: how the the threading / memory allocation interop works between llvm and ocaml? llvm run it's on thread when I start using with create_module llcontext ?
oriba has joined #ocaml
Thooms has joined #ocaml
AltGr has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
studybot has quit [Remote host closed the connection]
Thooms has quit [Quit: WeeChat 0.3.8]
rand000 has joined #ocaml
lostcuaz has joined #ocaml
rand000 has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
oafa has joined #ocaml
<oafa> hello.
<oafa> in http://www.reddit.com/r/ocaml/comments/23qjle/why_did_you_choose_ocaml/ch0frge the poster claims that ocaml's type inference is better than haskell's which is surprising to me. can anybody explain in what ways is ocaml's type inference better?
cesar_ has joined #ocaml
cesar_ is now known as Guest47535
<Axman6> I don't know about OCaml, but there are definitely times where you need to add type signatures in Haskell. "show . read" would be one example
<adrien_oww> as long as you don't use objects or maybe polymorphic variants, you don't have to write type annotations
<adrien_oww> except in very very very very very very very very very specific cases
<adrien_oww> I don't think I've annotated a function for months now
<oafa> Axman6: ocaml doesn't have that problem because it doesn't have type classes
<Axman6> right
<oafa> and ocaml has the "value restriction" which haskell doesn't have
<def-lkb> I disagree that "type inference is better".
<adrien_oww> as for the windows support, I think it's fine
<xenocons> downside is you have functions that are non generic
<xenocons> int_of_string as opposed to toInt
ygrek_ has joined #ocaml
<Axman6> yeah, that was one of the first things that struck me when I started looking at OCaml
<oafa> btw is it possible to provide type signatures to top-level bindings inside an .ml file?
<def-lkb> let bla : <sig> = expr ?
<xenocons> i prefer it than having to wrestle with type system
<oafa> cool, what about for a top-level function?
darkf has quit [Quit: Leaving]
<oafa> e.g. for let f x y = ...
thomasga has quit [Quit: Leaving.]
<oafa> do i have to do let f : int -> int -> int = function x y -> ... ?
<Axman6> yeah I immediately missed having type signatures on all my functions too
<Armael> let f (x: int) (y: int): int = ...
<Armael> (for example)
<oafa> cool
<xenocons> or you can do let f x y : int -> int -> int = ... etc right?
<Axman6> what is the "value restriction" btw?
<Armael> xenocons: not if you want f (and not "f x y") to have type int -> int -> int
<xenocons> ah right
<xenocons> f : (int -> int) -> int !
<xenocons> typing can be as verbose as you want in ocaml i guess
<xenocons> like any ML
<oafa> Axman6: the value restrictions says when a binding can be polymorphic
Rota has joined #ocaml
<oafa> it exists to prevent people from writing type-unsafe code via let-bound refs
<oafa> like how in haskell one can write unsafeCoerce with the binding "let x = unsafePerformIO (newIORef Nothing)"
<ggole> Ascription is not quite as strong as module signatures, unfortunately
<ggole> eg let f (x: 'a) = x + 1 type checks, giving f : int -> int
<def-lkb> let f (type a) (x : a) = x + 1
<ggole> Right.
<pippijn> JavaScript must be enabled in your browser to display the table of contents.
<pippijn> that's a fancy ToC
<oafa> web programmers these days.. ;)
kig has joined #ocaml
<Drup> I also disagree with "ocaml type inference is better"
<Drup> actually, Haskell's one is probably better
<Drup> it's just that ocaml type system people (aka, Guarigue) takes extreme care to have a mostly complete inference
<Drup> which is not the case for haskell's fancy feature, who breaks completeness with great joy
<Drup> the only counter example being GADTs
<connarks> Drup: context?
<Drup> connarks: discussions 15 minutes ago on this channel :)
<connarks> thanks
<oafa> Drup: hmm good point. does ocaml have language extensions?
<Drup> not that much
<pippijn> I experimented with literate programming and having the .mli and .ml file in the same file
<pippijn> but failed, thus far
<Drup> having tried haskell, I must say I don't like this "annotate all your functions" discipline. It's just cumbersome
<def-lkb> but here "extension" doesn't share the same meaning as with GHC
<connarks> « Nothing as good as cabal » wtf
<Drup> def-lkb: that's not really languages extensions in the haskell meaning :p
<oafa> interesting :)
<def-lkb> s/good/crappy
<Drup> cabal as a build system is good
<Drup> cabal as a package manager is the most terrible thing ever
<ggole> By "complete" you mean inferred types are principal?
Rota has quit [Ping timeout: 276 seconds]
<Drup> ggole: I always get mixed up with those, sorry. I mean that the inference algorithme can figure out everything.
<ggole> Mmm, right.
<Drup> (which is definitely not the case in presence of type classes or GADTs, for example)
<Armael> there is a junior job concerning haskell-like type annotations of functions, iirc
<Armael> (ok, unrelated)
studybot has joined #ocaml
studybot has quit [Remote host closed the connection]
studybot has joined #ocaml
Kakadu has quit [Ping timeout: 240 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
thomasga has joined #ocaml
oafa has quit [Quit: Page closed]
dapz has joined #ocaml
dapz has quit [Ping timeout: 240 seconds]
steshaw has quit [Quit: Leaving.]
Guest47535 has quit [Remote host closed the connection]
jonludlam has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
thomasga has quit [Quit: Leaving.]
cesar_ has joined #ocaml
cesar_ is now known as Guest77133
shinnya has joined #ocaml
jonludlam has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
ollehar has joined #ocaml
lostcuaz has joined #ocaml
thomasga has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ocp has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
araujo has joined #ocaml
araujo has quit [Changing host]
araujo has joined #ocaml
kig has quit [Quit: kig]
philtor has joined #ocaml
jonludlam has quit [Ping timeout: 240 seconds]
mcclurmc has joined #ocaml
mort___ has quit [Quit: Leaving.]
Guest77133 has quit [Remote host closed the connection]
Snark has quit [Ping timeout: 240 seconds]
kig has joined #ocaml
jonludlam has joined #ocaml
Thooms has joined #ocaml
paolooo has joined #ocaml
oriba_ has joined #ocaml
rand000 has joined #ocaml
oriba has quit [Read error: Operation timed out]
ygrek_ has quit [Ping timeout: 252 seconds]
paolooo has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: Leaving.]
racycle has joined #ocaml
rgrinberg has joined #ocaml
paolooo has joined #ocaml
rgrinberg1 has joined #ocaml
rgrinberg1 has quit [Client Quit]
rgrinberg has quit [Ping timeout: 264 seconds]
pminten has joined #ocaml
tlockney_away is now known as tlockney
jwatzman|work has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
lostcuaz has joined #ocaml
rgrinberg has joined #ocaml
ygrek_ has joined #ocaml
zpe has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 264 seconds]
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
maattdd has quit [Ping timeout: 265 seconds]
eizo has quit [Ping timeout: 240 seconds]
<parcs> hi
pminten has quit [Quit: Leaving]
martintrojer has quit [Remote host closed the connection]
tianon has quit [Quit: brb]
tane has quit [Quit: Verlassend]
tianon has joined #ocaml
martintrojer has joined #ocaml
paolooo has quit [Ping timeout: 240 seconds]
jonludlam has quit [Ping timeout: 240 seconds]
srcerer_ is now known as srcerer
Rota has joined #ocaml
WraithM has quit [Ping timeout: 265 seconds]
thomasga has quit [Ping timeout: 265 seconds]
lpw25 has joined #ocaml
tlockney is now known as tlockney_away
ikaros has quit [Quit: Ex-Chat]
maattdd has joined #ocaml
eizo has joined #ocaml
tlockney_away is now known as tlockney
Hannibal_Smith has quit [Quit: Sto andando via]
Kakadu has joined #ocaml
maattdd has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 252 seconds]
clan has quit [Quit: clan]
jwatzman|work has quit [Quit: jwatzman|work]
connarks has quit [Quit: leaving]
ontologiae has joined #ocaml
maattdd has joined #ocaml
claudiuc_ has quit [Read error: Connection reset by peer]
claudiuc_ has joined #ocaml
ygrek_ has quit [Ping timeout: 252 seconds]
dsheets has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
nikki93 has joined #ocaml
clan has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
WraithM has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
AltGr has left #ocaml []
jwatzman|work has joined #ocaml
nikki93 has quit [Ping timeout: 265 seconds]
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
dsheets has joined #ocaml
nikki93 has joined #ocaml
eizo has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
maattdd has joined #ocaml
esden has quit [Ping timeout: 246 seconds]
leifw has quit [Ping timeout: 246 seconds]
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
leifw has joined #ocaml
oriba_ has quit [Quit: Verlassend]
igitoor_ has joined #ocaml
nikki93 has quit [Remote host closed the connection]
igitoor has quit [Ping timeout: 246 seconds]
PM has quit [Ping timeout: 246 seconds]
PM has joined #ocaml
averell has quit [Ping timeout: 246 seconds]
strmpnk has quit [Ping timeout: 246 seconds]
averell has joined #ocaml
esden has joined #ocaml
strmpnk has joined #ocaml
igitoor_ has quit [Changing host]
igitoor_ has joined #ocaml
igitoor_ is now known as igitoor
averell has quit [Max SendQ exceeded]
averell has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
eizo has joined #ocaml
thomasga has joined #ocaml
maattdd has joined #ocaml
castorks has joined #ocaml
beurks has quit [Remote host closed the connection]
racycle has quit [Quit: ZZZzzz…]
racycle has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
wwilly has joined #ocaml
<wwilly> bonsoir
<companion_cube> o/
tane is now known as HomerSimpsoy
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
axiles has quit [Remote host closed the connection]
averell is now known as Averell
Averell has quit [Disconnected by services]
claudiuc_ has quit [Remote host closed the connection]
averell_ has joined #ocaml
claudiuc has joined #ocaml
zpe has joined #ocaml
claudiuc has quit [Ping timeout: 252 seconds]
clan has quit [Quit: clan]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 252 seconds]
waneck has quit [Remote host closed the connection]
ollehar has joined #ocaml
clan has joined #ocaml
waneck has joined #ocaml
averell_ has quit [Quit: .]
averell has joined #ocaml
averell is now known as Averell
Anarchos has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
<berke_durak> anyone using tuareg with evil?
ikaros has joined #ocaml
<whitequark> tuareg with, er, what?
<berke_durak> evil.. a vi mode for emacs
<Drup> that's like a steak mode for nutela ? Mix two completely different (but each of them nice) thing and hope for a greater combination ?
<berke_durak> well there is no good ocaml mode for vim
<Drup> (the two comparison are taken on purpose, to illustrate my belief about the combination :D)
<smondet> i used to use Evil with Tuareg
<berke_durak> smondet: and what happened?
<smondet> now I'm back in Vim with merlin + ocp-indent
<smondet> both are better than tuareg
<berke_durak> hmm... I'll have to look into that. is there something for displaying the type annotations?
<berke_durak> I found the C-c C-t to be enormously helpful
<smondet> merlin does a lot of things, and among them, yes, it displays the type of values
<Drup> merlin does that
<Drup> better
<smondet> even with partially compiled files
<berke_durak> sounds great... let me try
<berke_durak> oh last thing.. does it support lwt constructs?
oriba has joined #ocaml
nikki93 has joined #ocaml
<berke_durak> the merlin wiki says it supports lwt as well
<Drup> yes, you just need to add "EXT lwt" in your .merlin
<companion_cube> what's the difference between EXT and PKG ?
<Drup> EXT is for merlin's extensions
<Drup> aka, hardcoded stuff
claudiuc has joined #ocaml
<companion_cube> ah I see
<companion_cube> it's for the syntax extension
eizo has quit [Ping timeout: 240 seconds]
<berke_durak> jesus christ it's great
ollehar has quit [Ping timeout: 252 seconds]
<berke_durak> *switches back to vim*
clan has quit [Quit: clan]
ollehar has joined #ocaml
<berke_durak> can I put a .merlin in ~/.merlin ?
<berke_durak> or does it have to be per-project?
cesar_ has joined #ocaml
steshaw has joined #ocaml
cesar_ is now known as Guest9152
<Drup> I think it has to be per project
<Drup> and anyway, it's nicer per project, because you can commit it so that other contributors have it too
<berke_durak> it says it climbs the directory tree until it finds a .merlin; so I should be able to put one in ~/
<Drup> indeed, it should be possible
<berke_durak> so merlin doesn't do indentation, right? I need ocp-indent for that
<Drup> yes
nikki93 has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 252 seconds]
rand000 has quit [Quit: leaving]
clan has joined #ocaml
HomerSimpsoy has quit [Quit: Verlassend]
Submarine has quit [Quit: Leaving]
Anarchos has quit [Quit: Page closed]
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
kig has quit [Quit: kig]
dsheets has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
oriba has quit [Quit: Verlassend]
dsheets has joined #ocaml
nikki93 has joined #ocaml
Guest9152 has quit [Remote host closed the connection]
steshaw has quit [Quit: Leaving.]
steshaw has joined #ocaml
shinnya has joined #ocaml
zpe has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
nikki93 has quit [Remote host closed the connection]
cdidd has quit [Ping timeout: 252 seconds]
nlucaroni has joined #ocaml
kig has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
oafo has joined #ocaml
<oafo> hello
nikki93 has joined #ocaml
<oafo> does ocaml have an unsigned int type?
<companion_cube> no it doesn't
<oafo> that is unfortunate :(
<smondet> there was a library implementing it
<def-lkb> berke_durak: yes you can
maattdd has quit [Ping timeout: 255 seconds]
zpe has joined #ocaml
<def-lkb> you can also put a "REC" line in a .merlin to continue climbing the directory tree
jonludlam has joined #ocaml
thomasga has joined #ocaml
tautologico has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
steshaw has quit [Quit: Leaving.]
ollehar has joined #ocaml
steshaw has joined #ocaml
nikki93 has quit [Remote host closed the connection]
maattdd has joined #ocaml
BiDOrD has quit [Read error: Connection reset by peer]
BiDOrD has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
thomasga has quit [Quit: Leaving.]
cdidd has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
BiDOrD has quit [Remote host closed the connection]
BiDOrD has joined #ocaml
ggole has quit []
thomasga has joined #ocaml
clan has quit [Quit: clan]
Simn has quit [Quit: Leaving]
<berke_durak> def-lkb: sorry, what did you mean by "yes you can"? that I can put .merlin in ~/.merlin?
clan has joined #ocaml
Rota has quit [Ping timeout: 264 seconds]
thomasga has quit [Quit: Leaving.]
clan has quit [Client Quit]
clan has joined #ocaml
<jpdeplaix> whitequark: do you have an example for Llvm_target ?
ollehar has quit [Ping timeout: 252 seconds]
<jpdeplaix> I don't understand the notion of triple and target :/
<whitequark> a target is a module in LLVM that represents a certain codegenerator, in essence. X86, X86-64 or ARM
ollehar has joined #ocaml
<whitequark> a triple is a string that describes a certain platform which the target would support
thomasga has joined #ocaml
thomasga has quit [Client Quit]
<whitequark> e.g. x86_64-linux-gnueabi or x86_64-mswin32-whatever
<whitequark> essentially, triple defines an ABI and target selects an architecture
steshaw_ has joined #ocaml
<jpdeplaix> mmh ok. So the the current platform is represented with an empty string ?
skchrko has quit [Ping timeout: 240 seconds]
<whitequark> um, no.
<whitequark> you have to detect it yourself.
<jpdeplaix> :(
<jpdeplaix> There is nothing in the library that can do that ?
<whitequark> lemme check
<whitequark> Llvm_target.Target.default_triple ()
<whitequark> there's also .by_triple, so you could use that
<jpdeplaix> mmmh no, already tried. It raises an exception saying that: « Unable to find target for this triple (no targets are registered) »
<whitequark> yes, you need to link in the target. -package llvm_X86 and let () = Llvm_X86.initialize ()
<whitequark> you need to do that for every target you may care about
<jpdeplaix> But how does llc
<jpdeplaix> ?
<whitequark> it's essentially the same idea as behind OCaml's dynlink
<def-lkb> berke_durak: yes, in ~/.merlin
<whitequark> llc? llc does LLVMInitializeAllTargets();, I guess.
<whitequark> well, the C++ equivalent
<whitequark> the bindings don't invoke LLVMInitializeAllTargets, because that would cause them all to be linked in
<whitequark> and as a result you'd have 30+ second link times and 600+MB executables
<whitequark> (in debug mode)
<whitequark> that's almost exclusively compressed DWARF debug info, if you're curious. WebKit's debug info is over 8GB (!)
ruzu has quit [Read error: Connection reset by peer]
<whitequark> it's actually not possible at all to link WebKit with a 32-bit linker, it simply does not have enough address space for all of the symbols.
ruzu has joined #ocaml
WraithM has quit [Ping timeout: 252 seconds]
WraithM has joined #ocaml
skchrko has joined #ocaml
<jpdeplaix> mmmh the former solution based on pipe and llc wasn't a bad idea after all :/
<whitequark> hm?
<whitequark> how so?
<whitequark> if you really do want all targets, just build LLVM with --enable-shared, and perhaps use --disable-shared once when releasing
<jpdeplaix> It doesn't seems to have an equivalent of LLVMInitializeAllTargets and it seems too complex
<whitequark> too complex? llc uses the exact same interface, and frankly, using a well-defined stable interface is way better than concatenating goddamn text to make options for llc
<whitequark> LLVMInitializeAllTargets I will agree, but do you actually need that?
<jpdeplaix> why I would allow to compile only for X86 for example ?
<whitequark> because LLVM does not inherently enable you to generate portable code.
<NoNNaN> whitequark: what is the current status of language interop between llvm and ocaml? I mean thread creation, memory allocation, locking, gc? what happens when I initialize the llvm with create_module who owns the memory?
<whitequark> jpdeplaix: you *will* need to generate different code for linux/windows, x86/arm, etc, etc, etc.
<whitequark> invariably, it doesn't make sense to just allow the user to select any triple they want; the generated code will not, in general, work.
<whitequark> LLVM is not a portability layer. it doesn't really try to hide the target from you; rather, it amplifies the similarities
<NoNNaN> PNaCL try to target this, but I haven't read from them recenty
<whitequark> that's for browsers
Thooms has quit [Ping timeout: 264 seconds]
mfp has quit [Read error: Connection reset by peer]
<whitequark> NoNNaN: LLVM is not a language, so there is no language interop
<whitequark> if you mean the library, then I have set the finalizers for LLVM objects properly
mfp has joined #ocaml
<whitequark> (but you still have to finalize the module yourself, because you can store interior pointers into it anywhere)
<NoNNaN> whitequark: i mean the llvm implementation (c++) - ocaml interop
<whitequark> if you pass a memory buffer, it is consumed by LLVM
<whitequark> iirc, the pointer in the OCaml wrapper is zeroed, so any further attempt to access it will result in segfault
Rota has joined #ocaml
<jpdeplaix> whitequark: it's a compatibility layer for my needs…
<whitequark> jpdeplaix: there is a chance you're mistaken
maattdd has quit [Ping timeout: 255 seconds]
<whitequark> LLVM is not intended or designed to work as a portability layer. I find it unlikely you could use it as one.
jao has quit [Ping timeout: 265 seconds]
<jpdeplaix> If so, I'll just give up using LLVM for cervoise.
<jpdeplaix> good night
* whitequark shrugs
<whitequark> LLVM is a C optimizer and code generator at heart. any problem that can be reduced to that suits it well, and vice versa
zpe has quit [Remote host closed the connection]
<whitequark> as much as that would be desirable, it's not a magical sauce that can be sprinkled all over your compiler to make it fast and native :p
oafo has quit [Quit: Page closed]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ollehar has quit [Ping timeout: 252 seconds]
clan has quit [Quit: clan]
ollehar has joined #ocaml
jonludlam has quit [Ping timeout: 240 seconds]
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
clan has joined #ocaml
<tautologico> :)
_obad_ has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
darkf has joined #ocaml
ontologiae has quit [Ping timeout: 276 seconds]
rgrinberg1 has quit [Quit: Leaving.]
petterw has quit [Ping timeout: 255 seconds]