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/
Simn has quit [Quit: Leaving]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
travisbrady has joined #ocaml
shinnya has joined #ocaml
q66 has quit [Quit: Leaving]
zpe has joined #ocaml
segmond has quit [Ping timeout: 240 seconds]
ikaros has quit [Quit: Ex-Chat]
boogie has quit [Remote host closed the connection]
segmond has joined #ocaml
<pippijn> does ocamlbuild ignore symlinks?
<pippijn> apparently it does
<pippijn> even though I put explicit "dir": include
rom1504 has quit [Quit: Lost terminal]
jwatzman|work has quit [Quit: jwatzman|work]
ollehar has joined #ocaml
rom1504 has joined #ocaml
tlockney is now known as tlockney_away
shinnya has quit [Ping timeout: 240 seconds]
csakatoku has joined #ocaml
wombat1 has quit [Ping timeout: 265 seconds]
ontologiae has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Read error: Connection reset by peer]
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
manizzle has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
segmond has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
nikki93 has quit [Ping timeout: 240 seconds]
n0v has quit [Ping timeout: 241 seconds]
segmond has joined #ocaml
talzeus has joined #ocaml
n0v has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
travisbrady has quit [Quit: travisbrady]
n0v has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
nikki93 has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
n0v has joined #ocaml
travisbrady has joined #ocaml
ygrek_ has joined #ocaml
segmond has quit [Ping timeout: 240 seconds]
talzeus has joined #ocaml
segmond has joined #ocaml
segmond has quit [Client Quit]
segmond has joined #ocaml
segmond has quit [Client Quit]
segmond has joined #ocaml
michael_lee has joined #ocaml
paolooo has joined #ocaml
xianxu has joined #ocaml
introom has joined #ocaml
travisbrady has quit [Quit: travisbrady]
yacks has joined #ocaml
Tamae has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
xianxu has quit [Ping timeout: 244 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
travisbrady has joined #ocaml
introom has quit [Ping timeout: 264 seconds]
travisbrady has quit [Quit: travisbrady]
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
lostcuaz has joined #ocaml
xianxu has joined #ocaml
xianxu has quit [Ping timeout: 240 seconds]
introom has joined #ocaml
ccasin has quit [Quit: leaving]
ccasin has joined #ocaml
csakatoku has quit [Remote host closed the connection]
travisbrady has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xianxu has joined #ocaml
siddharthv_away is now known as siddharthv
travisbrady has quit [Quit: travisbrady]
introom2 has joined #ocaml
introom has quit [Ping timeout: 240 seconds]
introom2 has quit [Ping timeout: 265 seconds]
yacks has quit [Quit: Leaving]
boogie has joined #ocaml
csakatoku has joined #ocaml
divyanshu has joined #ocaml
yacks has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
introom has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
boogie has quit [Remote host closed the connection]
divyanshu has joined #ocaml
axiles has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
claudiuc has quit [Remote host closed the connection]
tautologico has quit [Quit: Connection closed for inactivity]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 265 seconds]
ulfdoz has joined #ocaml
xianxu has quit [Ping timeout: 252 seconds]
ygrek_ has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
claudiuc has quit [Ping timeout: 265 seconds]
Dongyancai has joined #ocaml
ulfdoz has quit [Ping timeout: 265 seconds]
angerman has joined #ocaml
sw1nn has joined #ocaml
__marius__ has quit [Quit: Connection closed for inactivity]
sw1nn has quit [Ping timeout: 240 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 244 seconds]
csakatoku has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
hyperboreean has joined #ocaml
csakatoku has joined #ocaml
divyanshu has joined #ocaml
Kakadu has joined #ocaml
xianxu has joined #ocaml
divyanshu has quit [Client Quit]
divyanshu has joined #ocaml
nikki93 has joined #ocaml
xianxu has quit [Ping timeout: 240 seconds]
nikki93 has quit [Read error: Operation timed out]
avsm has joined #ocaml
paolooo has quit [Ping timeout: 245 seconds]
michael_lee has quit [Quit: Ex-Chat]
csakatoku has quit [Ping timeout: 265 seconds]
wombat1 has joined #ocaml
csakatoku has joined #ocaml
csakatok_ has joined #ocaml
csakatoku has quit [Read error: Connection reset by peer]
jonludlam has quit [Remote host closed the connection]
eni has joined #ocaml
ontologiae has joined #ocaml
mika2 has joined #ocaml
rand000 has joined #ocaml
wombat1 has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
rwmjones has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
rwmjones has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
r0ly has joined #ocaml
avsm has quit [Quit: Leaving.]
xianxu has joined #ocaml
<gasche> def-lkb: speaking of parsers in a safe state, where is your work with Yann on menhir+errors?
AltGr has joined #ocaml
xianxu has quit [Ping timeout: 240 seconds]
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
<def-lkb> gasche: I split the work in multiple commits to ease integration
<def-lkb> The first pull request can be found here: https://github.com/yurug/unofficial-menhir/pull/1
<def-lkb> Yann is busy at the moment, and there are a lot of features to discuss so it will probably take a long time.
<def-lkb> In particular, I am worried a bit by the API of some features, e.g for querying state or the need of two layers of wrapping/unwrapping for each step which may impede performance
<Simn> Is there a more elegant way of writing a string length split than what I'm doing here? https://gist.github.com/Simn/a82ca9637578cdb1908d
<Simn> I feel like I'm missing something obvious.
<def-lkb> So in short: implementation is working, interface needs some work, which has been split in small steps to ensure slow but steady progression
csakatoku has joined #ocaml
<def-lkb> Simn: you could separate the splitting from printing by, eg, first producing a list
<def-lkb> Simn: also for printing, your code will work as long as you don't make use of characters needing escaping
<Simn> def-lkb, yes, escaping is handled before that already (hence s_escaped).
<Simn> But the List approach indeed sounds nicer.
<def-lkb> ok fine :)
r0ly has left #ocaml []
<Simn> Hmm, but I guess it could still split a \ from its " in some cases. So escaping should be done on the individual parts?
<def-lkb> … yes i think
<Simn> But then the length might change again...
<def-lkb> Conservative approach : use length / 2 by default :P
<Simn> I was actually thinking about just that. :)
<def-lkb> String processing is not really known for being elegant :D
<Simn> Alright, thanks for the reassurance. :)
nikki93 has joined #ocaml
<def-lkb> (FWIW, the %S format specifier does ocaml-style escaping before printing)
avsm has joined #ocaml
mort___ has joined #ocaml
Dongyancai has quit [Ping timeout: 252 seconds]
johnelse_away is now known as johnelse
Dongyancai has joined #ocaml
ikaros has joined #ocaml
csakatoku has quit [Remote host closed the connection]
jonludlam has joined #ocaml
csakatoku has joined #ocaml
Dongyancai has quit [Ping timeout: 265 seconds]
xianxu has joined #ocaml
sw1nn has joined #ocaml
ygrek_ has quit [Ping timeout: 252 seconds]
xianxu has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
eni has quit [Quit: .]
avsm has joined #ocaml
zxqdms has quit [Quit: leaving]
avsm has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
mort___ has quit [Ping timeout: 240 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
divyanshu has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
Dongyancai has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
introom has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
arjunguha has joined #ocaml
xianxu has joined #ocaml
_andre has joined #ocaml
introom has joined #ocaml
xianxu has quit [Ping timeout: 265 seconds]
dsheets has joined #ocaml
rand000 has quit [Ping timeout: 240 seconds]
AltGr has left #ocaml []
csakatoku has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
ggole has joined #ocaml
talzeus has quit [Remote host closed the connection]
divyanshu has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkf has quit [Ping timeout: 244 seconds]
xianxu has joined #ocaml
xianxu has quit [Ping timeout: 240 seconds]
siddharthv is now known as siddharthv_away
yacks has quit [Ping timeout: 252 seconds]
Thooms has joined #ocaml
rand000 has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
sw1nn has quit [Ping timeout: 265 seconds]
knz has joined #ocaml
<knz> hi guys
<Drup> knz: please indent this first math for ml correctly
<Drup> this hurt my eyes
<Drup> match*
<knz> how do you mean?
<knz> I think my example highlights the problem very well :)
<Drup> highlighting a problem by deliberately screwing the indentation that any correct indentation engine would do is not a good way to show an issue
<smondet> the problem being that you don't use a decent text editor?
<Drup> (oh, and you forget to mention that haskell indentation engine are complete crap too)
<knz> smondet: the problem is needing begin+end for something that indent should solve
<knz> but yeah
<Drup> also
<Drup> I would argue that indentation based languages is a matter of taste
<Drup> certainly not a killer feature
<Drup> (I don't like it, for example)
<knz> there's a lot to argue when comparing stuff
<knz> anyway
<knz> I know people who would also argue that ad-hoc polymorphism is a matter of taste
<companion_cube> typeclasses are definitely an asset
<knz> of course all this is a matter of taste, since ocaml is not so bad after all that many people use it
<Drup> knz: well, not the same proportion of people :)
<knz> heh :)
<knz> well, I know a number of c++ and java programmers...
ontologiae has joined #ocaml
<Drup> knz: for show and stuff, you should add the typeclass parametrisation
<knz> why?
<Drup> "show : a -> String" is far too much magic without "Show a =>" before
<knz> ah
<knz> "too much magic" is a good argument
<knz> I'll fix it
yacks has joined #ocaml
avsm has joined #ocaml
pango has quit [Ping timeout: 265 seconds]
avsm has quit [Client Quit]
<def-lkb> ad-hoc polymorphism via typeclasses is strictly more expressive, indentation is really a matter of taste
<Drup> knz: so, I've done exactly this trip 6 month ago
avsm has joined #ocaml
<knz> def-lkb: you seem to equate "more expressive" = "better, would like to use"
<knz> I think that is also a matter of taste
<Drup> so I can tell what exactly bugged me
<Drup> when I did the transition
<knz> please do?
divyanshu has quit [Quit: Computer has gone to sleep.]
<Drup> and those stuff are not express well enough in your post
<Drup> 1) implicit recursivity, this is a big one
divyanshu has joined #ocaml
<companion_cube> typeclasses write some code automatically
<def-lkb> knz: usability of implementation and wether it's useful or not is matter a taste
<bernardofpc> knz: I'd not argue that identing is a killer feature, otherwise ASM & FORTRAN would be better than C
<companion_cube> asm, really?
<def-lkb> knz: but gain in expressivity is objective
<Drup> because you can't really do the usually idiom "let a = foo in let a = f a in ..." when f is a "modifying a little bit" function
<knz> bernardofpc: I know enough people that can argue strongly that mandatory indentation is *the* killer feature that made them migrate away from perl/php to python. So I won't go down this lane today.
<knz> Drup: right
<Drup> 2) the module system is complete crap and the module namespace is not strongly enforced (you can add the module Foo.Bar when Foo.Baz is already in the scope)
<Drup> and also, no local open
<knz> Drup: that's something I was arguing this morning with someone else; my opinion is that what you call "the usual idiom" does not occur that often, or does it?
<knz> about modules, well
<knz> yes it's crap
<bernardofpc> more flexibility on operator and function names -> again, this is not a killer to my taste, this is not like "higher-order functions" or "first-class modules"
<Drup> knz: well, it was an usual idiom for me.
divyanshu has quit [Client Quit]
<Drup> knz: and I think I'm a quite "normal" ocaml programmer
<bernardofpc> a killer is being able to express something you cannot in the other language without too much effort
venk has quit [Ping timeout: 240 seconds]
<bernardofpc> for example, chosing the precedence is indeed a good thing
<knz> ok
<Drup> to be more precise about "not strongly enforce"
<Drup> a package can defined a module Foo and *another package* ca define the module Foo.Bar
<Drup> which is completly alien for an ocaml programmer :D
<knz> hum
<Drup> other that
<knz> it is not too surprising in this era of domain names
<Drup> well, it was for me
<Drup> I would add a "quick guide to ghc extensions"
<knz> I think more and more people are comfortable with the idea that x and x.y may have different responsibilities
<knz> ok
<Drup> because some of them are really useful
<knz> oh?
<bernardofpc> as for the readable type interface, I don'k know Haskell enought, but the .mli serve a different purpose
<knz> Drup: even for the beginner?
<Drup> we are talking about ocaml programmers, not Java ones
<knz> right
<knz> well I already pointed -XGADTs
<knz> which others did you have in mind?
<Drup> the landscape of GHC extensions is a bit wild
<Drup> Deriving Monad, Traversable and Functor
<Drup> talk about the usage of newtypes
<Drup> ( ^ this is really a killer feature)
<Drup> you don't talk about typeclasses all that much
<knz> well
<Drup> you could give the example "how to replace the Map functor by the Ord typeclass"
<Drup> it's a good example of how to do stuff
<knz> ah
<knz> yes you are right; yet I found that the haskell tutorial was already explaining type classes very well
<knz> I am not sure I can do better
<knz> although... maybe an example would not hurt
<knz> otherwise
<Drup> well, when I started haskell
<knz> you mention newtypes
<knz> what's about it?
<jpdeplaix`> knz: I your example for « Functional goodies », (@.) should be (%) instead
<knz> jpdeplaix`: why?
<Drup> I knew what typeclasses where, I knew some example of it
<Drup> but I didn't realize how you could use them to replace ML's functors
<knz> right
<Drup> were*
<Drup> newtype foo = Foo bar deriving ...
<jpdeplaix`> knz: because (%) is more usual. See for example: http://ocaml-batteries-team.github.io/batteries-included/hdoc2/BatPervasives.html
<Drup> this is a very nice haskell feature
<Drup> to enforce non-unification between typealiases
<companion_cube> wouldn't %> be even more useful?
<Drup> to do the same in Ocaml, you need to go though a private type in a new module
xianxu has joined #ocaml
<companion_cube> otoh ocaml has private aliases ;)
<jpdeplaix`> companion_cube: no, it's not the same as the Haskell's (.)
<companion_cube> sure, but reverse composition is nice too
<Drup> companion_cube: sure, but the features are not exactly the same
<def-lkb> (Custom operator precedence introduce a nasty dependency between scope resolution and parsing… With an ML-like module system, it turns into a really bad idea)
<Drup> (I agree with def-lkb on this one)
<Drup> (It's a good idea in haskell, it would be a bad one in ocaml)
<Drup> (and even in haskell, in can turn into a nightmare quite quickly, especially since there is no local open)
<knz> jpdeplaix`: do you know of other places that define (%) in the same way as batteries included?
<knz> I never uses batteries before
<knz> I did not know they were common
<Drup> knz: oh, you didn't mention that haskell identifier were fully utf8 compliant !
<Drup> it's quite important, compared to ocaml
avsm1 has joined #ocaml
<smondet> Drup: utf8 identifiers are like type-classes, cool idea, but in practice, 95% of their use is for making code unreadable :)
<adrien_oww> APL in Haskell \o/
xianxu has quit [Ping timeout: 265 seconds]
<Drup> smondet: I agree, but don't tell that in front of an haskell developer
<Drup> (typeclasses are more useful than uf8 identifier, though :D)
<companion_cube> I think typeclasses are awesome
avsm has quit [Ping timeout: 240 seconds]
* adrien_oww gags companion_cube
<Drup> companion_cube: you never debuged some Haskell code with more than 5 typeclasses in the same expression.
<knz> Drup: I would be seriously worried if an OCaml developer would choose to learn Haskell because of unicode identifiers...
* companion_cube slaps adrien_oww with a giant trout
<Drup> knz: I think you missed the point of why an Ocaml would read your blog post
<knz> I will use my privilege as author to avoid promoting this :)
* adrien_oww defiantly looks at companion_cube
<knz> Drup: care to enlighten me?
<ggole> ಠ_ಠ is a genuinely useful variable name
<companion_cube> let ಠ_ಠ = failwith "wut"
<Drup> knz: I would be interested in a blog post like that while doing the transition to now the *differences* (good or bad) between the too language
<Drup> know*
talzeus has joined #ocaml
<knz> hmm
<Drup> since we are on the subject, I don't think you should try to convince in your post that haskell is fantastic
<Drup> I mean, your audience is already "ocaml people that want to learn haskell"
<knz> Edward Yang's post does not mention that "OCaml does not support utf-8 identifier like Haskell does"
talzeus has quit [Remote host closed the connection]
<jpdeplaix`> knz: didn't find anything in core. So that it seems that only batteries have it.
talzeus has joined #ocaml
<Drup> knz: also, I think it would be nice, for easy discovering purposes, to add code samples here : http://www.haskell.org/haskellwiki/OCaml
<knz> it might, but I have no clue how to edit this wiki
<Drup> hum
<Drup> I reread the post, I don't thing promoting unsafePerformIO is a good idea :)
<Drup> it's the best way to shoot yourself in the head
<Drup> there is a specific package for debuging
<Drup> this is better
<knz> well I mention that one first...
<Drup> oh, right, sorry
<Drup> (still, I wouldn't talk about unsafePerformIO)
<knz> hahaha
<knz> Haskell people do not talk about unsafePerformIO, like OCaml people do not talk about Obj.magic.
<Drup> exactly :D
<Drup> (I was going to do the comparison :)
<knz> :)
<Drup> I don't recall my other issues when I started Haskell, I'll tell you if I remember one
<companion_cube> monad transformers?
demonimin has quit [Ping timeout: 240 seconds]
<Drup> that's not specific to Ocamlers
<Drup> knz: oh, maybe give a little link to the documentation of the State monad, since you need it very fast when you come from the ocaml world
<Drup> except the fact that I think it should be more neutral (it's very biased towards "haskell is fantastic" :p), It's a good initiative and it's useful. I lacked something like that when I started haskell
<Drup> ( companion_cube : but yes, monad transformers are a nightmare )
<Drup> ( lot's of haskelers like them x)
<jpdeplaix`> « since you need it very fast when you come from the ocaml world » Really ? What is your use case ?
<Drup> a unique name generator is the first thing I developed
<Drup> in ocaml, it's just a ref and counting, with some impure stuff
<Drup> basically, most time you use a reference in ocaml, you don't really want an IORef, you want a State
<Drup> (and it's useful anyway)
demonimin has joined #ocaml
* companion_cube likes the visitor pattern
avsm1 has quit [Quit: Leaving.]
avsm has joined #ocaml
csakatoku has joined #ocaml
<knz> Drup: state is important, but I can't find a compelling use for it that I could explain without using the word "monad"
lostcuaz has joined #ocaml
lostcuaz_ has joined #ocaml
xianxu has joined #ocaml
<Drup> ^^
<Drup> I think lot's of reasonably advance ocaml users know what a monad is
<rks`_> naaah Drup
<rks`_> they think they know, like rubyists think they know
<rks`_> but caml users are basically reconverted java coders
<Drup> and talking about haskell without using the M word is slightly misleading :3
<rks`_> they cant possibly understand
<rks`_> you should have read knz article, it's very interesting
<adrien_oww> rks`_: I'm happy you've finally accepted what you really are
<companion_cube> local modules are really nice
lostcuaz has quit [Ping timeout: 264 seconds]
<ggole> It's true: OCaml is Java with variants
<Drup> :D
<Drup> Java even have lambdas know !
<companion_cube> no yet
ulfdoz has joined #ocaml
<Drup> now*
<companion_cube> (unless java 8 was released?)
* companion_cube starting to like more and more the error monad in OCaml
<rks`_> adrien_oww: yes well, thank knz, he opened my eyes
<jpdeplaix`> :D
xianxu has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 240 seconds]
ulfdoz has quit [Ping timeout: 244 seconds]
<gasche> knz: unsafePerformIO is horrible and a disservice to beginners reading your document
avsm has quit [Quit: Leaving.]
<gasche> use Debug.Trace
ygrek has joined #ocaml
<gasche> knz: I second Drup's advice to use State rather than IOrefs to emulate OCaml references
<gasche> the ST monad should also be mentioned for local use of state
<companion_cube> o/ gasche
<gasche> I'm also missing mentions of polymorphic variants (as something that Haskell lacks), lenses (to provide something better than records), and both the upsides (modularity + some nice design patterns such as memoized-through-an-array) and downsides (memory leaks) of lazyness
<gasche> also a discussion of why you generally shouldn't care about tail recursion in Haskell
<gasche> (OCaml programmers will try to use foldl instead of foldr)
<gasche> re. leaks, the document should definitely mention the sheer difficulty of controlling performances of Haskell code
<gasche> ah, and you don't give justice to type classes, I think
<gasche> they're better than just "operator overloading"
<Drup> I agree with that
<Drup> the "encoding the Map functor with the Ord typeclass" example is the one that makes me "click"
<companion_cube> or just for a correct treatment of equality
<ggole> (Also objects: but you can probably just leave those out.)
<gasche> I'd say objects are anecdotal but polymorphic variants are important
<knz> wait wait
<knz> what's the difference between ST and State?
<companion_cube> the underlying implementation
<ggole> Mmm, polymorphic variants do seem to be used considerably more
<knz> ok thanks
<jpdeplaix`> ggole: mmh I don't think so :D
<companion_cube> objects are still a nice thing to have
Thooms has joined #ocaml
adrien_oww has quit [Read error: Operation timed out]
travisbrady has joined #ocaml
<smondet> gasche: I would be curious to know why lenses would be better than records? There was a Lens tutorial/presentation at NYC-Haskell, it makes code uglier than perl
mort___ has joined #ocaml
<companion_cube> I think it's because lens updates/accesses are composable
adrien_oww has joined #ocaml
<companion_cube> if you have deeply nested records/lists you can modify one that is deep
divyanshu has joined #ocaml
<flux> hmm, I haven't looked into lenses, but wouldn't you use them for updating such records, not replace them?
<gasche> I think you want the language to have both lenses and records (just as you want both references and get/set pairs); but if you mention that Haskell doesn't have records, you should point out that Lenses do a good job in absentia, even surpassing them in many respects (as companion_cube says, you can abstract over deep accesses)
<flux> maybe I need to look better :)
<gasche> (I got the order wrong: record:lenses :: references:(get,set); higher-level, less syntactically convenient, potential performance issues, more flexible and composable)
arjunguha has joined #ocaml
adrien_oww has quit [Ping timeout: 240 seconds]
adrien_oww has joined #ocaml
<companion_cube> I think you want both OCaml functors and haskell's typeclasses, also
<gasche> knz: ST has both single references and arrays, and gracefully degrades into IO (so you can take an IO+IORef code and turn it into ST easily, and then improve locality of effects incrementally)
<gasche> State doesn't do arrays very well, and you cannot convert back and forth from IO
<Drup> companion_cube: I do not want to imagine the mess it would be to have both + first class modules and functors
<knz> ok guys
<Drup> you could potentially have typeclasses appearing in your code, that would be a total nightmare.
<ggole> I sometimes wonder what OCaml would look like if array/string elements and mutable fields were integrated with references
<knz> I have added a treatment of type classes and monads
claudiuc_ has quit [Remote host closed the connection]
<ggole> eg, a.(i) += 2 would work
RMacy has joined #ocaml
<ggole> (Noisier, probably, since you'd have to deref all the time.)
<knz> ggole: that's what ArrayRef was intended to solve, iirc
<companion_cube> Drup: I don't like much first-class modules...
<companion_cube> I'd rather have typeclasses
<gasche> the core of type classes is type-directed code inference
<Drup> I'd rather have just implicit, and not full typeclasses
<gasche> this is orthogonal to what we have in OCaml right now
<companion_cube> Drup: that would remove big warts OCaml currently has
<companion_cube> implicits are more dangerous imho, because you give more power to the user
<companion_cube> power that can be used for implicit coercions, etc.
<Drup> huh, no.
<jpdeplaix`> wat ?
<Drup> not more than typeclasses
Enjolras has joined #ocaml
<companion_cube> Drup: scala has implicits, and they are sometimes used for terrible things
<companion_cube> like, implicitely carrying a database connection in a bunch of code
<companion_cube> maybe there are less powerful implicits, though
<knz> Drup: is my treatment of typeclass sufficient do you think?
csakatoku has quit [Ping timeout: 240 seconds]
lostcuaz_ has quit [Quit: Textual IRC Client: www.textualapp.com]
csakatoku has joined #ocaml
<Drup> it's better indeed
zarul has quit [Remote host closed the connection]
xianxu has joined #ocaml
zarul has joined #ocaml
mika2 has quit [Quit: Leaving.]
xianxu has quit [Ping timeout: 244 seconds]
avsm has joined #ocaml
lostcuaz has joined #ocaml
jwatzman|work has joined #ocaml
zpe has joined #ocaml
aurynj has joined #ocaml
xianxu has joined #ocaml
zarul has quit [Ping timeout: 265 seconds]
zarul has joined #ocaml
claudiuc has joined #ocaml
eni has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
lostcuaz has quit [Ping timeout: 252 seconds]
tlockney_away is now known as tlockney
ollehar has joined #ocaml
introom has quit [Ping timeout: 270 seconds]
lostcuaz has joined #ocaml
avsm has quit [Quit: Leaving.]
sw1nn has joined #ocaml
csakatoku has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
csakatoku has joined #ocaml
csakatoku has quit [Write error: Connection reset by peer]
csakatoku has joined #ocaml
Thooms has joined #ocaml
divyanshu has joined #ocaml
xianxu has quit [Quit: Lost terminal]
watermind has joined #ocaml
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
boogie has joined #ocaml
avsm has joined #ocaml
lostcuaz has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
ianh has joined #ocaml
the-gibson has quit [Ping timeout: 264 seconds]
the-gibson has joined #ocaml
the-gibson has quit [Changing host]
the-gibson has joined #ocaml
the-gibson has quit [Read error: Operation timed out]
avsm has quit [Quit: Leaving.]
rz has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
the-gibson has joined #ocaml
Kakadu has quit [Ping timeout: 245 seconds]
nikki93 has quit [Remote host closed the connection]
avsm has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
mort___ has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
lostcuaz has quit [Ping timeout: 269 seconds]
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
pminten has joined #ocaml
rand000 has quit [Ping timeout: 244 seconds]
avsm has quit [Quit: Leaving.]
eni has quit [Quit: Leaving]
cyanure__ has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arjunguha has joined #ocaml
nlucaroni has joined #ocaml
Kakadu has joined #ocaml
yacks has quit [Quit: Leaving]
jonludlam has quit [Remote host closed the connection]
pango has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nikki93 has joined #ocaml
arjunguha has joined #ocaml
pminten has quit [Quit: Leaving]
wombat1 has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rand000 has joined #ocaml
wombat1 has quit [Ping timeout: 252 seconds]
rand000 has quit [Client Quit]
rand000 has joined #ocaml
arj has joined #ocaml
csakatoku has quit [Remote host closed the connection]
arjunguha has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
angerman has quit [Quit: Gone]
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
ollehar1 has quit [Ping timeout: 268 seconds]
avsm has joined #ocaml
Tamae has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
Thooms has quit [Remote host closed the connection]
Thooms has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
claudiuc_ has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
dsheets has quit [Ping timeout: 240 seconds]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
rz has quit [Quit: Ex-Chat]
arjunguha has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
maattdd has joined #ocaml
johnelse is now known as johnelse_away
travisbrady has quit [Quit: travisbrady]
divyanshu has quit [Quit: Computer has gone to sleep.]
ddosia has joined #ocaml
avsm has quit [Quit: Leaving.]
travisbrady has joined #ocaml
lostcuaz has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
wwilly has joined #ocaml
rand000 has quit [Ping timeout: 264 seconds]
ggole has quit []
dsheets has joined #ocaml
zpe has joined #ocaml
Dongyancai has quit [Ping timeout: 244 seconds]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
Dongyancai has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
cdruzac has joined #ocaml
arjunguha has joined #ocaml
Dongyancai has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
Dongyancai has joined #ocaml
_andre has quit [Quit: leaving]
lostcuaz has quit [Client Quit]
lostcuaz has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<cdruzac> what is the most memory efficient way to read a large file line by line?
arjunguha has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
<cdruzac> large ~ 2 GB
lostcuaz has quit [Client Quit]
zpe has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
<ousado> cdruzac: if you read it line by line and keep no (or few) references to previous lines, there should be no issue memory-wise
<cdruzac> ousado: with something like Scanf.fscanf?
angerman has joined #ocaml
happy4crazy has joined #ocaml
<ousado> cdruzac: uhm, I'd rather use the channel stuff
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
wombat1 has joined #ocaml
happy4crazy has quit []
gugees has joined #ocaml
mort___ has joined #ocaml
arjunguha has joined #ocaml
cyanure__ has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
mort___ has quit [Ping timeout: 244 seconds]
nikki93 has joined #ocaml
venk has joined #ocaml
nikki93 has quit [Read error: Connection reset by peer]
nikki93 has joined #ocaml
gugees has quit [Remote host closed the connection]
engil has joined #ocaml
<seliopou> does anybody know if Textutils.Console.Log.Output was moved to some other package when it was deleted form the textutils package?
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zpe has joined #ocaml
maattdd has quit [Ping timeout: 244 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
arjunguha has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
mort___ has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rom1504_ has joined #ocaml
Dongyanc1i has joined #ocaml
<companion_cube> cdruzac: you could use memory-mapped arrays
Sim_n has joined #ocaml
jpdeplaix` is now known as jpdeplaix
flx has joined #ocaml
robink_ has joined #ocaml
flx is now known as Guest16942
arj has quit [Quit: Leaving.]
chris2_ has joined #ocaml
tristan_1 has joined #ocaml
dlat_ has joined #ocaml
kerneis_ has joined #ocaml
companion_square has joined #ocaml
ohama has quit [Disconnected by services]
hnrgrgr_ has joined #ocaml
marky_ has joined #ocaml
ohama has joined #ocaml
johnelse1away has joined #ocaml
mrvn_ has joined #ocaml
knz_ has joined #ocaml
struktured has joined #ocaml
stomp_ has joined #ocaml
rand000 has joined #ocaml
Leonidas_ has joined #ocaml
esden has quit [Ping timeout: 245 seconds]
stomp has quit [Ping timeout: 245 seconds]
rz has joined #ocaml
rwmjones has quit [Ping timeout: 245 seconds]
knz has quit [Ping timeout: 245 seconds]
kerneis has quit [Ping timeout: 245 seconds]
dlat has quit [Ping timeout: 245 seconds]
tristan__ has quit [Ping timeout: 245 seconds]
smiler has quit [Ping timeout: 245 seconds]
def-lkb has quit [Ping timeout: 245 seconds]
flux has quit [Ping timeout: 245 seconds]
inr has quit [Ping timeout: 245 seconds]
Leonidas has quit [Ping timeout: 245 seconds]
marky has quit [Ping timeout: 245 seconds]
hnrgrgr has quit [Ping timeout: 245 seconds]
mrvn has quit [Ping timeout: 245 seconds]
adrien has quit [Ping timeout: 245 seconds]
mdenes1 has quit [Ping timeout: 245 seconds]
fayden has quit [Ping timeout: 245 seconds]
companion_cube has quit [Ping timeout: 245 seconds]
hyPiRion has quit [Ping timeout: 245 seconds]
dsheets has quit [Ping timeout: 245 seconds]
Simn has quit [Ping timeout: 245 seconds]
PM has quit [Ping timeout: 245 seconds]
chris2 has quit [Ping timeout: 245 seconds]
teiresias has quit [Ping timeout: 245 seconds]
bartbes has quit [Ping timeout: 245 seconds]
orbitz has quit [Ping timeout: 245 seconds]
whitequark has quit [Ping timeout: 245 seconds]
robink has quit [Ping timeout: 245 seconds]
johnelse_away has quit [Ping timeout: 245 seconds]
stomp_ is now known as stomp
Guest16942 is now known as flux
ccasin_ has joined #ocaml
orbitz has joined #ocaml
zpe has joined #ocaml
fayden has joined #ocaml
dsheets has joined #ocaml
smiler has joined #ocaml
hyPiRion has joined #ocaml
mdenes1 has joined #ocaml
rwmjones has joined #ocaml
PM has joined #ocaml
inr has joined #ocaml
teiresias has joined #ocaml
teiresias has quit [Changing host]
teiresias has joined #ocaml
def-lkb has joined #ocaml
ccasin_ has quit [*.net *.split]
angerman has quit [*.net *.split]
pango has quit [*.net *.split]
nlucaroni has quit [*.net *.split]
boogie has quit [*.net *.split]
sw1nn has quit [*.net *.split]
RMacy has quit [*.net *.split]
adrien_oww has quit [*.net *.split]
_5kg has quit [*.net *.split]
igitoor has quit [*.net *.split]
so has quit [*.net *.split]
willb2 has quit [*.net *.split]
maufred has quit [*.net *.split]
companion_square is now known as companion_cube
ousado_ has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
maufred has joined #ocaml
whitequark has joined #ocaml
bartbes has joined #ocaml
sw1nn has joined #ocaml
patojo has joined #ocaml
_5kg has joined #ocaml
nikki93 has quit [*.net *.split]
Dongyancai has quit [*.net *.split]
aurynj has quit [*.net *.split]
ccasin has quit [*.net *.split]
segmond has quit [*.net *.split]
n0v has quit [*.net *.split]
rom1504 has quit [*.net *.split]
mbac has quit [*.net *.split]
IbnFirnas_ has quit [*.net *.split]
engil has quit [*.net *.split]
Leonidas_ has quit [*.net *.split]
struktured has quit [*.net *.split]
knz_ has quit [*.net *.split]
mort___ has quit [*.net *.split]
wombat1 has quit [*.net *.split]
wwilly has quit [*.net *.split]
claudiuc_ has quit [*.net *.split]
Thooms has quit [*.net *.split]
rossberg has quit [*.net *.split]
sgnb has quit [*.net *.split]
jzelinskie has quit [*.net *.split]
cdidd has quit [*.net *.split]
WraithM has quit [*.net *.split]
dant3 has quit [*.net *.split]
lopho has quit [*.net *.split]
dinosaure` has quit [*.net *.split]
thorsten` has quit [*.net *.split]
ggherdov_ has quit [*.net *.split]
alex_nx has quit [*.net *.split]
ousado has quit [*.net *.split]
willb2 has joined #ocaml
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
adrien has joined #ocaml
pango has joined #ocaml
igitoor has joined #ocaml
esden has joined #ocaml
Leonidas_ has joined #ocaml
knz_ has joined #ocaml
mort___ has joined #ocaml
wombat1 has joined #ocaml
wwilly has joined #ocaml
claudiuc_ has joined #ocaml
Thooms has joined #ocaml
rossberg has joined #ocaml
sgnb has joined #ocaml
jzelinskie has joined #ocaml
cdidd has joined #ocaml
WraithM has joined #ocaml
dant3 has joined #ocaml
lopho has joined #ocaml
dinosaure` has joined #ocaml
thorsten` has joined #ocaml
ggherdov_ has joined #ocaml
alex_nx has joined #ocaml
so has joined #ocaml
Leonidas_ is now known as Guest33337
ccasin has joined #ocaml
angerman has joined #ocaml
nlucaroni has joined #ocaml
RMacy has joined #ocaml
segmond has joined #ocaml
adrien_oww has joined #ocaml
Tamae has quit [Ping timeout: 240 seconds]
mbac has joined #ocaml
avsm has joined #ocaml
adrien_ has joined #ocaml
Guest33337 is now known as Leonidas
Leonidas has quit [Changing host]
Leonidas has joined #ocaml
axiles has quit [Remote host closed the connection]
adrien has left #ocaml []
lostcuaz has joined #ocaml
angerman has quit [Quit: Gone]
Kakadu has quit [Quit: Konversation terminated!]
chris2_ is now known as chris2
marky_ is now known as marky
marky has quit [Quit: Reconnecting]
marky has joined #ocaml
Sim_n is now known as Simn
mocrunsthecity has joined #ocaml
travisbrady has joined #ocaml
mort___ has quit [Quit: Leaving.]
pyon has joined #ocaml
cdruzac has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
ddosia has quit [Ping timeout: 240 seconds]
nlucaroni has quit [Quit: leaving]
csakatoku has joined #ocaml
RMacy is now known as RMacy|Away
RMacy|Away has quit []
arjunguha has joined #ocaml
csakatoku has quit [Remote host closed the connection]
sw1nn has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
mocrunsthecity has quit [Quit: Leaving...]
nikki93 has joined #ocaml
wwilly has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
struktured has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arjunguha has joined #ocaml
nikki93 has quit [Remote host closed the connection]
jonludlam has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Thooms has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
darkf has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
wombat1 has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Simn has quit [Quit: Leaving]