flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
WraithM has quit [Ping timeout: 248 seconds]
kyrylo has quit [Ping timeout: 245 seconds]
dr_df0 has quit [Ping timeout: 272 seconds]
nikki93 has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
w0rm_x has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest75975
Guest75975 has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
boogie has joined #ocaml
Simn has quit [Quit: Leaving]
zpe has quit [Ping timeout: 246 seconds]
Xenasis has quit [Remote host closed the connection]
shinnya has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
WraithM has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest91395
zpe has quit [Ping timeout: 246 seconds]
pango has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
mye has quit [Quit: mye]
Xenasis has joined #ocaml
<mostlyfledby> Is it acceptable stile to define functions in the form of let (f : int -> int -> float)\n\tx y = ...
<mostlyfledby> rather than let f (x : int) (y : int) : float = ...?
thomasga has quit [Ping timeout: 246 seconds]
pango has joined #ocaml
<Drup> not with this syntax, no
<Drup> but you can do "let (f : int -> int -> float) = fun x y ->"
<Drup> "let f : int -> int -> float = fun x y ->" even
<mostlyfledby> Ahhh
<mostlyfledby> I like that one even more I must admit
<mostlyfledby> Drup, and that is compiler optimized to be identical?
<Drup> afaik, yes
<Drup> I think one is a sugar for the other
Xenasis has quit [Remote host closed the connection]
<mostlyfledby> Drup, also, does the revised syntax enjoy traction? Because I think I like it more.
<pippijn> I don't like [a::b] as syntax for cons
<mostlyfledby> Why not?
<mostlyfledby> Well, it akes cons more than a normal operator I guess
<mostlyfledby> It is a ehh.. circuminterfix operator
<Drup> mostlyfledby: I never saw the revised syntax used anywhere else than in the mind of the people who wrote it.
<pippijn> it's inconsistent with other syntaxes (haskell, sml) and means a different thing in original syntax
<mostlyfledby> I don't much see the use of required braes around cons as well yeah
<mostlyfledby> But like, dislike how you don't at least have the option to but some kind of braces around match statements which has me putting them before the match keyword currently.
<mostlyfledby> Braces, even when redundant,help catch errors better
<pippijn> putting what before the match keyword?
zpe has joined #ocaml
<mostlyfledby> '('
<mostlyfledby> and ')' after the last pattern -> exp
<pippijn> hm
<pippijn> that's only necessary if other expressions follow it
<pippijn> and there is begin/end
<mostlyfledby> It isn't necessary, but I feel not requiring such things when they aren't ncessary is a mistake because they help catch syntax errors.
<mostlyfledby> Ocaml's syntax errors are very nondescriptive I find because it lacks such redundancies
<Drup> syntax errors are a midl annoyance only when you start
<mostlyfledby> I disagree, everyone makes typos. Such as when an error message ended up 10 lines later because I typed ; instead of ;;
Guest91395 has quit [Remote host closed the connection]
<mostlyfledby> let { ... } is a better system than let ... ;; I feel
<Drup> except that it takes less than 10 secondes to find a typo when you know ocaml
zpe has quit [Ping timeout: 272 seconds]
<mostlyfledby> It apparently didn't because people here were seeking for a good 40 seconds in a 15 line text file.
<mostlyfledby> Imagine when it was a lot longer
<mostlyfledby> You can aruge 'you should just not make mistakes' all the time but if that's the case you might as well do away with the fancy static type system.
<mostlyfledby> High level programming languages exist because people make mistakes, that's a reality.
<Drup> I didn't say "you should not make mistakes", I just said that the position report of syntax errors by the compiler is far enough if you are use to it.
<mostlyfledby> Hmm
<Drup> you can blame the syntax for not being noob-friendly, and I will agree
<mostlyfledby> Well in my experience it has been worse than other languages and the revised syntax seems to be designed to correct that flaw amongst others.
<mostlyfledby> The syntax doesn't lend itself to very descriptive error messages because it doesn't feature a lot of redundancy
<Drup> but puting braces everywhere is just syntactic noise for people who read some code
<mostlyfledby> Hmm, many people argue that requiring explicit braces makes code clearer.
<mostlyfledby> As in, in C using { ... } even if your sequence is one expression long is a common idiom
mcclurmc has joined #ocaml
ygrek has joined #ocaml
<Drup> you can still put ( ) or begin end everywhere in ocaml if you want
<mostlyfledby> You can, but the revised syntax agrees with me that it should be required, not optional in sequences
<mostlyfledby> As in do { ... } in this case, and I agree
<Drup> and nobody uses the revised syntax, which may prove something. :p
<Drup> it's not even in the regular distribution
<mostlyfledby> Old habits are hard to break, people also still use COBOL
wolfnn has quit [Ping timeout: 272 seconds]
NoNNaN has joined #ocaml
WraithM has quit [Ping timeout: 272 seconds]
mcclurmc has quit [Remote host closed the connection]
Neros has quit [Ping timeout: 246 seconds]
mcclurmc has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
nikki93 has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
boogie has quit [Ping timeout: 244 seconds]
strobegen has joined #ocaml
zpe has joined #ocaml
ousado_ has joined #ocaml
ousado has quit [Remote host closed the connection]
buddyholly has quit [Quit: WeeChat 0.4.1]
zpe has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 248 seconds]
cesar has joined #ocaml
cesar is now known as Guest70503
boogie has joined #ocaml
zpe has joined #ocaml
wormphlegm has quit [Read error: Operation timed out]
zpe has quit [Ping timeout: 272 seconds]
darkf has quit [Quit: Leaving]
darkf has joined #ocaml
zpe has joined #ocaml
Guest70503 has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 265 seconds]
Patchou has quit [Ping timeout: 260 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 272 seconds]
wormphlegm has joined #ocaml
wormphlegm has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
nikki93 has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
Simn has joined #ocaml
<mostlyfledby> So a partial application of a function with side effects will alwys not execute the side effect?
<mostlyfledby> Hmm, unless you define it as say function x -> <side-effect> ; function y -> ...?
wormphlegm has joined #ocaml
<flux> mostlyfledby, exactly
<flux> so normal partial application is like evaluating function x -> function y -> .. partially, which clearly does not have side effects
cesar has joined #ocaml
<flux> though, as in ocaml you cannot see the existence of side effects from the type signature, you cannot really tell from the type signature what is going to happen regarding those.. in practice this is not a problem though :)
cesar is now known as Guest20772
<mostlyfledby> Yeah, I just relaized the last part, my only experience with a Hindly-Milner type system before was Haskell so I nver was actually forced to think about this problem.
wormphlegm has quit [Ping timeout: 272 seconds]
Guest20772 has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
shinnya has quit [Ping timeout: 272 seconds]
cdidd has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
gour has joined #ocaml
boogie has quit [Remote host closed the connection]
zpe has joined #ocaml
Fnar has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
Yoric has joined #ocaml
csakatoku has joined #ocaml
wormphlegm has joined #ocaml
wormphlegm has quit [Ping timeout: 272 seconds]
hyperboreean has quit [Ping timeout: 264 seconds]
csakatoku has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
zpe has joined #ocaml
mfp has quit [Ping timeout: 272 seconds]
kkielak has joined #ocaml
<kkielak> hi, does the interface to Hashtbl.create has changed in 4.01.0?
<kkielak> In tutorial on ocaml.org there's information that to create hash you can use: let h = Hashtbl.create 12345;;
<kkielak> but with 4.01.0 it does not work, cos it's complaining on 12345 type not being unit
<adrien> it works for me on 4.02 beta-something
<adrien> hmmm, you're using core?
<kkielak> I've installed ocaml using opam switch
Yoric has quit [Ping timeout: 272 seconds]
<kkielak> and installed also core library
Simn has quit [Ping timeout: 252 seconds]
<adrien> ok so I can't help you since I don't use Core and it's quite like the Hashtbl.create you're using comes from it
<adrien> (but I'm sure there are some people using Core who are up or will soon be)
<kkielak> ok, I got it - I used Open Std.Core invocation in my .ocamlinit after reading realworldocaml.org book
zpe has quit [Ping timeout: 265 seconds]
levi has quit [Ping timeout: 272 seconds]
kyrylo has joined #ocaml
mfp has joined #ocaml
<kkielak> ?
<kkielak> \quit
kkielak has quit [Quit: leaving]
cesar has joined #ocaml
cesar is now known as Guest87629
nikki93 has quit [Remote host closed the connection]
Guest87629 has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
wormphlegm has joined #ocaml
wormphlegm has quit [Ping timeout: 252 seconds]
zpe has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
hyperboreean has joined #ocaml
Simn has joined #ocaml
yacks has quit [Remote host closed the connection]
thomasga has joined #ocaml
zpe has joined #ocaml
nikki93 has quit [Remote host closed the connection]
wolfnn has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
zxqdms has joined #ocaml
w0rm_x has quit [Read error: No route to host]
wormphlegm has joined #ocaml
kyrylo has quit [Ping timeout: 248 seconds]
thomasga has quit [Quit: Leaving.]
wormphlegm has quit [Ping timeout: 272 seconds]
nikki93 has joined #ocaml
zpe has joined #ocaml
thomasga has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
ulfdoz has joined #ocaml
nikki93 has quit [Ping timeout: 272 seconds]
thomasga has quit [Quit: Leaving.]
mort___ has joined #ocaml
mort___ has quit [Quit: Leaving.]
cesar has joined #ocaml
cesar is now known as Guest3541
BitPuffin has joined #ocaml
Guest3541 has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
watermind has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
thomasga has joined #ocaml
wormphlegm has joined #ocaml
Yoric has joined #ocaml
wormphlegm has quit [Ping timeout: 272 seconds]
w0rm_x has joined #ocaml
nikki93 has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
Yoric has joined #ocaml
nikki93 has quit [Ping timeout: 272 seconds]
kkielak has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
thomasga has quit [Ping timeout: 240 seconds]
watermind has quit [Quit: Konversation terminated!]
Neros has joined #ocaml
watermind has joined #ocaml
Kakadu has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
Yoric has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
wormphlegm has joined #ocaml
wormphlegm has quit [Ping timeout: 248 seconds]
w0rm_x has left #ocaml []
darkf has quit [Quit: Leaving]
cesar has joined #ocaml
cesar is now known as Guest80248
zpe has joined #ocaml
Guest80248 has quit [Ping timeout: 264 seconds]
yminsky has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
yminsky has quit [Ping timeout: 264 seconds]
shinnya has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
Drup has quit [Quit: Tatayoyo]
Drup has joined #ocaml
wormphlegm has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
kkielak has quit [Ping timeout: 245 seconds]
mye has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
ggole has joined #ocaml
ygrek has joined #ocaml
zpe has joined #ocaml
yminsky has joined #ocaml
yminsky has quit [Client Quit]
ontologiae has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
yminsky has joined #ocaml
yminsky has quit [Client Quit]
talzeus__ has quit [Remote host closed the connection]
talzeus has joined #ocaml
jbrown has quit [Remote host closed the connection]
zpe has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Quit: Leaving.]
mye has quit [Quit: mye]
mye has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
NoNNaN has quit [Ping timeout: 240 seconds]
NoNNaN has joined #ocaml
gour has quit [Disconnected by services]
gour_ has joined #ocaml
Kakadu has quit []
Neros has quit [Quit: No Ping reply in 180 seconds.]
mort___ has joined #ocaml
ulfdoz has quit [Ping timeout: 246 seconds]
baz_ has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
ocp has joined #ocaml
zpe has joined #ocaml
Neros has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
gnuvince has quit [Ping timeout: 240 seconds]
<gasche> I just saw a nice syntactic idea in This Week Rust
mort___ has quit [Quit: Leaving.]
<gasche> the idea is to use .. instead of _ for a wildcard pattern ignoring multiple values
<gasche> that would be applicable to ML and, I think, an improvement over | Nil -> 0 | Cons _ -> 1
<gasche> (you'd have to write Cons .. -> instead as Cons has multiple parameters)
zpe has quit [Ping timeout: 272 seconds]
<ggole> So you could write Foo (x, ...) instead of Foo (x, _, _, _, _, _)?
<gasche> yes, I think so
<ggole> Seems nice
Arsenik has joined #ocaml
<gasche> with records you can already write Foo {x; _} for this purpose
<ggole> Occasionally I've been annoyed by being obliged to add an entirely unhelpful _
<gasche> (or Foo {x} but there is a warning against incomplete matches without universal pattern)
<gasche> you'd write {x; ..}
<ygrek> seems rather contrived
<ygrek> Foo (...,x,...) makes no sense
<ygrek> so usecase is very very limited
<gasche> my point is only that the fact that _ is abused to match several parameters has been an occasional cause of confusion
<gasche> explicitly using .. instead is a nice idea
<ygrek> if you have the tuple with N fields then you are screwed for some values of N and compiler shouldn't ease this paing
<ygrek> * pain
<gasche> I'm not suggesting an actual change to the OCaml language, because the benefits probably aren't worth adding new syntax
<ygrek> yep
<ggole> I think the real fix for that particular case is named arguments for constructors, tbh
<gasche> agreed
zpe has joined #ocaml
<ggole> Matching can be extended ad nauseum, really - I think its probably good to be a bit conservative about what goes in lest you end up with a large pile of junk
<ggole> At once time I really wanted matching to handle subsequences of arrays, so that you could write something like match a at index with [|..., Foo x, Bar y, ...|] and have it do the right thing, checking the length and everything
<ggole> ...that would have improved exactly one piece of code I've written. Really not worth it.
gour_ is now known as gour
<gour> rust does not look bad, it even has actively developed wxrust, but syntax is really noisy...
<gour> otoh, i believe, unicode support is in the language itself, right?
<gour> will ocaml become unicode-ready without 3rd party lib in the future?
ulfdoz has joined #ocaml
<gasche> ML is in a difficult place regarding pattern-matching
<gasche> Go's "switch" is essentially complete as far as switching statements can be improved; you need to get 'fallthrough' right, possibly add a 'when' guard, and voilà, you have a switch you'll never extend again
<ggole> Pattern is too useful not to want to extend it. :/
<gasche> on the other hand, if you implement patterns as first-class ('a -> 'b option) values, you've got something very expressive (but a bit slow) that can be extended ad nauseum, as you say, with regexps, etc.; this is what some pattern-matching syntaxes for, say, Lisp, do
<ggole> *Pattern matching
<gour> do you, guys, just watching rust over the fence or getting your fingers wet as well?
<gasche> in ML we have a compiler-friendly view of patterns as stuff whose semantics is very restricted and can be compiled efficiently
<gasche> the syntax is remarkably efficient at hiding the control-flow semantics under a nice declarative layer
<gasche> yet we cannot extended this declarative look too much, lest we lose all control of pattern compilation
<gasche> gour: just over the fence; no time to do more
<nicoo> gasche: Doesn't using -ppx allows extending pattern-matching ?
<gasche> not in a modular way
<nicoo> True
<gour> gasche: are you busy with just ocaml or have to use other langs?
<gasche> I *read* a lot of other stuff, but I mostly write OCaml these days
<gasche> I consider myself part of the Haskell community, but from a much more distant position
<gasche> if I decided to get involved with Rust, I think I would try to help them specify something about their type system
<ggole> I poked at rust a while back and concluded it wasn't ready - the compiler crashed on me a bit too much
<gasche> (hopefully better than "the state we end up in after fixing last week's new flaw")
<gasche> unfortunately, the reason why the already competent Rust people haven't done that yet is that it is a massive amount of work
<gour> i agree...however, rust seems to develop rapidly and trying to become practical language
<ggole> It's easier to move forward quickly when you don't have to care about backwards compat
<gour> gasche: i beleive you don't have need to write gui stuff in haskell :-)
cesar has joined #ocaml
cesar is now known as Guest23390
Guest23390 has quit [Ping timeout: 246 seconds]
Nevor has joined #ocaml
mcclurmc has joined #ocaml
Yoric has joined #ocaml
osa1 has quit [Ping timeout: 248 seconds]
thomasga has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<gour> it's interesting that original rust compiler was written in ocaml...just wonder what did he/they miss to design a new lang
mcclurmc has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 272 seconds]
osa1 has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
ivan\ has quit [Ping timeout: 265 seconds]
ivan\ has joined #ocaml
<whitequark> gour: precise control over memory and concurrency, I guess
<whitequark> since substantial improvements in rust over ocaml would be the region and task system
<whitequark> there's also other niceties common in systems languages, such as unsafe blocks / integrated C FFI / various low-level attributes for entities, but it's fairly minor
<gour> that's pitty...it's not bad to have mozilla's backing
<whitequark> it also has typeclasses (yay!)
<whitequark> yeah... and unlike some other mozilla projects *cough*firefoxos*cough*, it's really nice from a technical pov
<gour> a bit noisy syntax (for my taste)
* whitequark nods
<whitequark> I find the type syntax most annoying
caligula has joined #ocaml
<whitequark> fn as_mut_buf<U>(self, f: &fn(*mut T, uint) -> U) -> U;
<whitequark> looks too much like line noise sometimes :/
<ggole> Cyclone was like that too
<ggole> I suspect you end up having to be pretty explicit about things if you want low level control and memory safety
<whitequark> Cyclone got rid of most of the noise with default effects and regions
<whitequark> seems like it's the case in rust too
mcclurmc has quit [Remote host closed the connection]
<whitequark> I guess you'll get used to it pretty quickly.
<gour> cyclone is still alive?
mcclurmc has joined #ocaml
thorsten` has quit [Ping timeout: 245 seconds]
<whitequark> I don't think so
zpe has joined #ocaml
<ggole> extern unsigned long strtoul(const char ?`r n, const char ?`r*`r2 endptr, int base);
<ggole> :/ Guess it's livable.
<ggole> I wouldn't want to have to explain it to the average Joe that barely comprehends pointers.
<gour> lol
<whitequark> rust seems to be developed as a replacement for C++
<whitequark> C++11/14 with shared_ptr and unique_ptr definitely converged to a very similar storage model
yacks has joined #ocaml
<ggole> Without being sound though
<whitequark> ggole: try explaining SFINAE to an average Jpe :p
<whitequark> *Joe
kkielak has joined #ocaml
<ggole> Djikstra has this lovely polemic about languages manufacturing problems for people
<ggole> Which I'm put in mind of whenever I look at a Boost header.
<gour> "Object-oriented programming is an exceptionally bad idea which could only have originated in California." :-)
<whitequark> arguably C++ isn't object-oriented
<mrvn> at least the template part
<gour> well, it sells so
<whitequark> or Java for that matter
<whitequark> and smalltalk-style OO is much much nicer
<ggole> Kay would certainly agree with you
<whitequark> OCaml more or less has it, with its structural typing for objects
<whitequark> and I believe Rust does too
<NoNNaN> if you think you know OO, check this: http://public.enst-bretagne.fr/~beugnard/papiers/lb-sem.shtml
<NoNNaN> the result: "We observe the various interpretations of overriding and overloading in object oriented languages. With the description of an intend, represented as the following UML diagram, we have "naively" implemented in 15 different languages the same piece of code... and obtenained 11 different results.UML class diagram of the experiement"
<mrvn> whitequark: what does duck typing have to with c++ being OO?
zpe has quit [Ping timeout: 246 seconds]
jonludlam has joined #ocaml
<ggole> I don't even know what OO is. I've never heard a crisp definition.
<whitequark> ggole: what about kay's one?
<ggole> Kay was talking about something other than what people mean when they say "OO" these days, I think
<whitequark> this depends on whom do you talk to. ruby's model is practically the same as smalltalk's one
<kkielak> hi, does some use merlin for code browsing inside vim? i'm looking for help
<whitequark> (there are differences in how they treat metaclasses, but I think they're not significant)
<mrvn> whitequark: if you consider int as an optimitzed version of an object then c++ fits Kays description except for main().
<ggole> "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late binding of all things."
<mrvn> ggole: why late binding?
<ggole> Those are Kay's words.
<whitequark> to allow for very flexible metaprogramming, I would guess
<whitequark> (and maybe other things)
<mrvn> I agree you need some late binding but I don't see why you can't also have static binding.
<ggole> You can, but presumably this is not "OO".
<whitequark> mrvn: is there any system with static binding which allows live code replacement?
<whitequark> a la erlang.
<ggole> And this kind of basic disagreement is part of why OO is such a weak term.
<mrvn> whitequark: If you have code replacement then you can also replace static bindings,
<rks`> kkielak: if you don't manage to get help here, don't hesitate to mail the authors of merlin, they will answer
<ggole> Various IDEs allow something like that, within some restrictions
<whitequark> I find that a very interesting point: it's really easy to replace parts of a running system when it's dynamically typed and I've seen this applied in numerous useful ways, but I haven't seen much practical, convenient implementations of that in systems with static typing
<mrvn> OO is more a state of mind than a programming language anyway.
<rks`> (i'm one of them but i don't have time to answer right now)
<mrvn> whitequark: I don't know of any compiled language that allows live core replacement natually
<ggole> VC lets you use edit-and-continue to modify a definition in a running C++ program, for instance
<whitequark> mrvn: not necessarily compiled, let's look at everything statically typed
<flux> ggole, but I understand it isn't rock solid?
<rks`> also, have a look at the wiki on github kkielak , it might already have the answers you're looking for
<ggole> Sure, and there are some limitations
<ggole> There was also a thesis by some Haskell people on "live" update of Haskell code
<mrvn> whitequark: statically typed is yet another thing. Why are you jumping from one to the other?
<ggole> Including partially automatic translation of typed data
<ggole> (So you can change types and keep running, where possible.)
<kkielak> rks`: thanks
<whitequark> mrvn: it was a separate thought about live updates
<whitequark> maybe I wasn't clear
<ggole> I don't like live update during development, though
<ggole> It's too easy to get into a position where you have no understanding of what definitions are stale or not.
<mrvn> whitequark: I gues it would be ok to loosen the type of a function. The new type must be unifyable with the old.
<whitequark> ggole: I presume you would want to build a system around live updates and make it your main development mode
<ggole> That's possible: Lisp (and Smalltalk, I guess) people have being doing things that way for ages
<ggole> The language has a bunch of stuff to aid that model, in fact
<whitequark> also erlang uses that for zero-downtime software updates. sure, but those are all dynamically typed
<ggole> Right
<whitequark> (in erlang, code replacement occurs at tail calls in looping processes)
<ggole> Lisp allows type declarations, but they aren't really a static thing
<mrvn> whitequark: strict sttic types would severly limit what you could update without violating type safety to the point of it being useless.
<mrvn> whitequark: and I would wager that if you made a mistake in the code and need to change the type then it already wouldn't compile in the first place usualy.
<ousado> which somewhat implies the uselessness of the whole approach
<flux> lots of changes are additive
<whitequark> mrvn: so my point is, existing systems with live updates demonstrate that it's possible to build a useful system which is dynamically correct
<whitequark> but existing static type systems prevent live updates from being possible
<ggole> Not "compiling" is less of a problem in a dynamic language
<mrvn> whitequark: do they change the type or just the code?
<whitequark> so is it possible to make a better type system which would allow for that?
nze has joined #ocaml
<whitequark> mrvn: (they) who?
<mrvn> whitequark: the systems that demostrate that live updates work
<mrvn> whitequark: and do they guaranty that it works?
<ggole> I believe that's the Haskell work I was thinking of
<whitequark> good question, I guess it depends on point of view: if you added a method to class A, did the type of an object of class A change?
<whitequark> and guarantee, no, there are no guarantees
<mrvn> yes and no. that just extends the api/abi and is ok.
<mrvn> I was thinking of chaning void foo(int) to void foo(double). that will fail.
<whitequark> but similarly to how, if you wrote invalid code in such a system and it fails dynamically, a hypothetical statically typed system could fail at compile-time.
<ggole> That's considered a disadvantage by the dynamic people, btw
<ggole> They like that you can fire the system up and look at bits of it while some is still broken.
<mrvn> failing at compile time due to errors? yeah, big disadvantage
<mrvn> you can always assert false the parts not ready
<mrvn> statically typed sytems are less for try&error programming
<whitequark> ggole: interesting point, but think of this: if you can add parts of the system live, then you can load code for a hypothetical static system in small chunks and always have some state you can examine, too
<mrvn> whitequark: which works as long as the types are unifyable.
<nicoo> ggole: You can to so with statically typed languages: just complete your interfaces with stubs calling failwith
<ggole> A nice trick with dynamic systems is that you can do that and fill in (or more likely, fix) the implementation without closing and restarting
<mrvn> nicoo: assuming all your code is otherwise correct.
<ggole> I do that in emacs all the time
<ggole> I occasionally do it for other people's code, too: which is not possible with the assert false method.
<ggole> An interesting question is how many of these situations would be prevented by static typing... it isn't zero, but I also don't think it is every one.
Yoric has quit [Ping timeout: 272 seconds]
cesar has joined #ocaml
zpe has joined #ocaml
cesar is now known as Guest50855
nikki93 has joined #ocaml
Guest50855 has quit [Ping timeout: 272 seconds]
<companion_cube> orbitz: what do you lack with qcheck, more precisely? :)
<whitequark> ggole: I'm thinking that most problems would be caused by the fact that you only want to infer types locally
<whitequark> and so in a lot of cases changing one type may have a ripple effect on the whole codebase
mye has quit [Quit: mye]
zpe has quit [Ping timeout: 245 seconds]
demonimin has quit [Ping timeout: 245 seconds]
boogie has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
<nicoo> mrvn: Sure, but the same holds for “dynamically” typed languages
<mrvn> or accounting. increment count[size] on alloc and decrement on free and see which size rises
<mrvn> ups
kkielak has quit [Ping timeout: 240 seconds]
<mrvn> nicoo: sure. except there you get runtime errors.
boogie has quit [Remote host closed the connection]
<mrvn> nicoo: and maybe the new type never collides with the old type.
<nicoo> mrvn: Why are you talking about types colliding ?
<mrvn> nicoo: echan
<gasche> I think types should be able to clarify all our programming activities
<gasche> including live code update and exploratory programming
<whitequark> ^ that.
<whitequark> the question is how :)
<gasche> it's hard so mainstream systems have mostly avoided those questions so far
<gasche> well
<gasche> there was tangentially related work at ICFP'12
kkielak has joined #ocaml
<nicoo> gasche: Do you have a link to the papers ?
<gasche> "An Error-Tolerant Type System for Variational Lambda Calculus."
<nicoo> Danke
mcclurmc has quit [Remote host closed the connection]
<gasche> the idea is that the authors were working on type-checking code using cpp-style #ifdef
<gasche> a problem they observed with their first system is that you often have various options that are correlated
<nicoo> Yup
<gasche> if you have a part of code conditional on the variable FOO, and some other with BAR, it may be the case that, implicitly, they are meant to be both set and unset at the same time, and the code produced by the preprocessor makes no sense when FOO is defined but not BAR
<gasche> so they modified their type system to be more relisilent to failure in some configurations, and still provide useful information in the non-failing cases
<gasche> I'm more interested in the failure-resilience part than the preprocessor ("variational") part, so I think that would deserve a dedicated brand of work
<gasche> but it was still nice to hear about it
<gasche> I'm far from familiar with the field so there may be more pertinent / recent publications to quote
jbrown has joined #ocaml
<nicoo> 'kay :)
<nicoo> Thanks
tulloch has joined #ocaml
Tamae has joined #ocaml
zpe has joined #ocaml
tane has joined #ocaml
thomasga has quit [Quit: Leaving.]
watermind has joined #ocaml
<watermind> so... I had to reinstall my system but kept my home dir
<watermind> which means I now have a new version of ocaml
<watermind> what am I supposed to do with opam now?
<watermind> is it safe to do an opam update and expect it to see I have a new ocaml version and recompile everything?
<watermind> is there a way to tell it, hey I have a new ocaml version
<watermind> or should I just keep working as usual
<watermind> or what...
mcclurmc has joined #ocaml
<mrvn> didn't opam install ocaml in your home?
<watermind> mrvn: I installed ocaml from using my distro rpms
<watermind> mrvn: both then and now
zpe has quit [Ping timeout: 246 seconds]
<mrvn> you should notice quickyl enough if there is a version mismatch.
osa1 has quit [Quit: Konversation terminated!]
<watermind> well I do :) frama-c for instance doesn't start
<kkielak> watermind: if you use opam it overrides the rpm versions by adding path to $HOME/.opam/bin dir at the beginning of your PATH
<watermind> same for why3
mcclurmc has quit [Remote host closed the connection]
<watermind> kkielak: actually I _think_ I had to do it by hand... but yes
<watermind> kkielak: that's not what I mean though
jonludlam has quit [Ping timeout: 264 seconds]
<kkielak> watermind: you can choose the version of ocaml by issing opam switch ....
<watermind> all programs I have installed with opam were compiled for my previous system and using an older ocaml version
<watermind> kkielak: I see
<watermind> I'll try that then
nikki93 has quit [Remote host closed the connection]
<kkielak> watermind: i've started using opam yesterday too :)
<watermind> I really like it
<kkielak> watermind: i had some problems with setting up merlin for vim - still it does not search for definitions in the whole project
<kkielak> watermind: only in curently opened file
<kkielak> watermind: go and check great new book about ocmal: http://realworldocaml.org
<watermind> kkielak: i've been reading it :)
<watermind> I stopped at first class functors after skimming through it
mcclurmc has joined #ocaml
<kkielak> watermind: especially the section on installing tools, there's installation guide with opam
<watermind> hmm got to look at it again
<kkielak> watermind: i dont know about you, but i'm new to ocaml and it was surprising for me, that suggested Core modules change i.e. types of Hashtbl
ggole has quit []
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
ollehar1 has quit [Client Quit]
zpe has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
<kkielak> Still looking for anybody using vim with merlin for ocaml - anyone? ;-)
<ddosia> kkielak: j am in the way of integrating it =)
<ddosia> kkielak: what is the problem?
zpe has quit [Ping timeout: 240 seconds]
* gour is strongly considering ocaml & vim, but not ready (yet)
<kkielak> ddosia: i cant make merlin to look for definitions (when issuing :Locate command from vim) in the whole project
<kkielak> ddosia: it only looks at curently open file
baz_ has quit [Remote host closed the connection]
<ddosia> same for me
thorsten` has joined #ocaml
<ddosia> kkielak: have you make a .merlin file?
<kkielak> ddosia: maybe the magic is in .merlin file?
<kkielak> ddosia: :)
<ddosia> :D
<kkielak> ddosia: not yet, only plain merlin setup for vim, have you?
<ddosia> not yet, I dont have a project, I am just learning ocaml
<ddosia> so I planned to wait until I put more code then just helloworld.ml
<kkielak> ddosia: look at mldonkey - very good ocaml example project (quite big, but very good)
mcclurmc has quit [Remote host closed the connection]
<kkielak> ddosia: do you know Unix system programming in Ocaml: http://ocamlunix.forge.ocamlcore.org/
<ddosia> on, I am reading Real World Ocaml
watermind has quit [Ping timeout: 252 seconds]
<ddosia> but thanks for tips
breakds has joined #ocaml
Xenasis has joined #ocaml
tulloch has quit [Quit: Lost terminal]
tulloch has joined #ocaml
<ddosia> kkielak: Is syntax error highlighting works for you?
<kkielak> ddosia: yes. maybe you need to turn it on via ':syntax on' in your .vimrc file
<kkielak> ddosia: here's my .vimrc file: http://pastebin.com/sXcrQW1g
<ddosia> kkielak: so you use syntastic for that?
<kkielak> ddosia: i've added syntastic recently, but even before syntax highlighting worked for me
<ddosia> syntax highlighting is working well, but error highlighting is not
<ddosia> And I have several problems with syntastic: first it could not find modules, like this: open Core.Std;; (* Unbound module Core here *)
<kkielak> ddosia: i'm afraid i can't help
zpe has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest69855
thomasga has joined #ocaml
Guest69855 has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
nikki93 has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
ocp has quit [Quit: Leaving.]
osa1 has joined #ocaml
mchqwerty has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
<orbitz> companion_cube: does it do the thing where it tries to find the minimal testcae?
WraithM has joined #ocaml
Yoric has joined #ocaml
mchqwerty has quit [Quit: Odcházím]
jonludlam has joined #ocaml
Simn has quit [Quit: Leaving]
<companion_cube> orbitz: among the test cases that failed, it can print only the smallest (provided it can measure the size)
zpe has joined #ocaml
wolfnn has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
kkielak has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Ping timeout: 272 seconds]
<gasche> test case reduction is a hard and interesting problem
<gasche> I never looked at how quickcheck does it
darkf has joined #ocaml
pkrnj has joined #ocaml
watermind has joined #ocaml
<companion_cube> neither did I
tobiasBora has joined #ocaml
zpe has joined #ocaml
gour has quit [Quit: WeeChat 0.4.2]
zpe has quit [Ping timeout: 245 seconds]
watermind has quit [Ping timeout: 246 seconds]
BitPuffin has quit [Ping timeout: 264 seconds]
mcclurmc has joined #ocaml
thomasga has quit [Quit: Leaving.]
cesar has joined #ocaml
zpe has joined #ocaml
cesar is now known as Guest17913
watermind has joined #ocaml
Guest17913 has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 245 seconds]
strobegen has quit [Quit: Leaving.]
tane has quit [Quit: Verlassend]
Arsenik has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
nze has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 272 seconds]
ahill-89 has joined #ocaml
mcclurmc has joined #ocaml
jonludlam has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
zpe has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
zpe has quit [Ping timeout: 245 seconds]
tobiasBora has quit [Quit: Konversation terminated!]
ollehar1 has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
tulloch has quit [Ping timeout: 252 seconds]
tulloch has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest27452
zpe has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
The_third_man has quit [Read error: Operation timed out]
NaCl has quit [Read error: Operation timed out]
jzelinskie has quit [Read error: Operation timed out]
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has joined #ocaml
The_third_man has joined #ocaml
Guest27452 has quit [Ping timeout: 272 seconds]
jzelinskie has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
talzeus has joined #ocaml
mcclurmc has joined #ocaml