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/
<malvarez> Rc43: you need to run the program until after your function is executed
<malvarez> After that you can rewind and do 'break function'
cdidd has joined #ocaml
<Rc43> malvarez, ok, it's clear now
<Rc43> malvarez, but maybe here is a way for performing some command right after run?
<Rc43> malvarez, gdb can it, for ocamldebig I see only "source" command, but it should be typed manually
mfp_ has quit [*.net *.split]
<malvarez> Rc43: I'm not an expert, but I think it would be very hard to do that with OCaml
<malvarez> Functors make it hard, I think
rz has joined #ocaml
mfp_ has joined #ocaml
Xenasis has quit [Remote host closed the connection]
manud-afk is now known as manud
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
ygrek_ has joined #ocaml
csakatoku has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
rainbyte has quit [Quit: Leaving]
yminsky has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
zpe has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
talzeus has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 248 seconds]
ygrek_ has quit [Ping timeout: 272 seconds]
malvarez has quit [Read error: Connection reset by peer]
Patchou has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
Tamae has joined #ocaml
ygrek_ has joined #ocaml
amiller has quit [Ping timeout: 252 seconds]
amiller_ has joined #ocaml
talzeus has joined #ocaml
maurer_ is now known as maurer
testcocoon has quit [Ping timeout: 264 seconds]
manizzle has quit [Read error: Operation timed out]
boogie has quit [Remote host closed the connection]
testcocoon has joined #ocaml
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 248 seconds]
strobegen has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Armael has quit [Ping timeout: 272 seconds]
Armael has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
sheijk has quit [Quit: .]
yminsky has quit [Ping timeout: 250 seconds]
nikki93 has joined #ocaml
manizzle has joined #ocaml
watermind has quit [Ping timeout: 245 seconds]
nikki93 has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
Arzaga has joined #ocaml
hyperboreean has quit [Ping timeout: 245 seconds]
cesar_ has joined #ocaml
ygrek_ has quit [Ping timeout: 246 seconds]
n0v has quit [Ping timeout: 272 seconds]
cesar_ is now known as Guest91719
dant3 has joined #ocaml
n0v has joined #ocaml
Guest91719 has quit [Remote host closed the connection]
snyp has joined #ocaml
boogie has joined #ocaml
ygrek has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
watermind has joined #ocaml
nikki93 has joined #ocaml
amiller_ is now known as amiller
amiller has quit [Changing host]
amiller has joined #ocaml
nikki93 has quit [Remote host closed the connection]
watermind has quit [Quit: Konversation terminated!]
csakatok_ has quit [Remote host closed the connection]
watermind has joined #ocaml
nikki93 has joined #ocaml
csakatoku has joined #ocaml
mk270 has left #ocaml []
csakatoku has quit [Ping timeout: 240 seconds]
snyp has quit [Quit: leaving]
dant3 has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
Arzaga has joined #ocaml
watermind has quit [Ping timeout: 246 seconds]
csakatoku has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
nikki93 has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
jao has quit [Ping timeout: 246 seconds]
nikki93 has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
sgnb has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
ggole has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest12852
Guest12852 has quit [Remote host closed the connection]
vpm` has quit [Quit: co'o]
vpm has joined #ocaml
sgnb has joined #ocaml
dant3 has joined #ocaml
ulfdoz has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest42183
zpe has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ulfdoz has quit [Read error: Operation timed out]
zpe has quit [Ping timeout: 272 seconds]
ulfdoz has joined #ocaml
zarul has quit [Ping timeout: 246 seconds]
whitequark has quit [Ping timeout: 246 seconds]
whitequark has joined #ocaml
Guest42183 has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
ttamttam has joined #ocaml
WraithM has quit [Ping timeout: 248 seconds]
nikki93 has joined #ocaml
ygrek has joined #ocaml
zpe has joined #ocaml
Neros has joined #ocaml
ulfdoz_ has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
ulfdoz has quit [Ping timeout: 272 seconds]
ulfdoz_ is now known as ulfdoz
Arzaga has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 260 seconds]
csakatoku has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
strobegen1 has joined #ocaml
strobegen has quit [Ping timeout: 260 seconds]
csakatoku has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
csakatoku has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
csakatoku has quit [Ping timeout: 260 seconds]
cdidd has quit [Remote host closed the connection]
csakatoku has joined #ocaml
cdidd has joined #ocaml
nikki93 has joined #ocaml
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
n0v has quit [Ping timeout: 272 seconds]
eikke has joined #ocaml
n0v has joined #ocaml
hyperboreean has joined #ocaml
jonludlam has joined #ocaml
dant3 has quit [Remote host closed the connection]
jonludlam has quit [Ping timeout: 248 seconds]
thomasga has joined #ocaml
Simn has joined #ocaml
dant3 has joined #ocaml
AltGr has joined #ocaml
jonludlam has joined #ocaml
zpe has joined #ocaml
thomasga has quit [Quit: Leaving.]
AltGr has left #ocaml []
kyrylo has joined #ocaml
mika1 has joined #ocaml
Kakadu has joined #ocaml
AltGr has joined #ocaml
sgnb has quit [Ping timeout: 260 seconds]
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
ttamttam has quit [Ping timeout: 260 seconds]
Pantoufle has quit [Quit: leaving]
rand000 has joined #ocaml
tovarish has joined #ocaml
tovarish has left #ocaml []
avsm has joined #ocaml
BitPuffin has joined #ocaml
WraithM has joined #ocaml
ttamttam has joined #ocaml
rand000 has quit [Ping timeout: 272 seconds]
amirmc has joined #ocaml
avsm has quit [Quit: Leaving.]
rand000 has joined #ocaml
Rc43 has quit [Quit: Page closed]
zarul has joined #ocaml
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
ttamttam has quit [Quit: ttamttam]
wolfnn has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
ygrek has quit [Ping timeout: 272 seconds]
talzeus has quit [Remote host closed the connection]
rand000 has quit [Remote host closed the connection]
avsm has joined #ocaml
rand000 has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
rossberg has quit [Ping timeout: 240 seconds]
skchrko has quit [Ping timeout: 240 seconds]
zenspider has quit [Ping timeout: 240 seconds]
lopex has quit [Ping timeout: 240 seconds]
zenspider_ has joined #ocaml
rossberg has joined #ocaml
skchrko has joined #ocaml
lopex has joined #ocaml
ggherdov has quit [Ping timeout: 240 seconds]
csakatoku has quit [Ping timeout: 272 seconds]
dant3 has quit [Remote host closed the connection]
ggherdov has joined #ocaml
rand000 has quit [Ping timeout: 272 seconds]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
dant3 has joined #ocaml
nikki93 has quit [Ping timeout: 260 seconds]
dsheets has quit [Ping timeout: 245 seconds]
Rc43 has joined #ocaml
ggole has quit [Ping timeout: 248 seconds]
watermind has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
Rc43_ has joined #ocaml
Rc43 has quit [Ping timeout: 250 seconds]
ggole has joined #ocaml
nikki93 has joined #ocaml
amirmc has quit [Quit: Leaving.]
dsheets has joined #ocaml
nikki93 has quit [Ping timeout: 248 seconds]
talzeus_ has joined #ocaml
snyp has joined #ocaml
talzeus__ has joined #ocaml
rand000 has joined #ocaml
talzeus_ has quit [Ping timeout: 248 seconds]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
pminten has joined #ocaml
rand000 has quit [Ping timeout: 272 seconds]
dant3 has quit [Remote host closed the connection]
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
dant3 has joined #ocaml
rand000 has joined #ocaml
sepp2k has joined #ocaml
nikki93 has joined #ocaml
thomasga has joined #ocaml
snyp has quit [Quit: leaving]
thomasga has quit [Ping timeout: 246 seconds]
nikki93 has quit [Ping timeout: 246 seconds]
eikke has quit [Ping timeout: 246 seconds]
ocp has joined #ocaml
thomasga has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Ping timeout: 248 seconds]
talzeus__ has quit [Read error: Connection reset by peer]
peterbb has joined #ocaml
talzeus_ has joined #ocaml
kyrylo_ has joined #ocaml
gustav___ has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
kyrylo has quit [Ping timeout: 246 seconds]
adrien has quit [Ping timeout: 246 seconds]
_habnabit has quit [Ping timeout: 246 seconds]
gustav___ has joined #ocaml
adrien has joined #ocaml
fds has quit [Ping timeout: 246 seconds]
Asmadeus_ has joined #ocaml
avsm has quit [Ping timeout: 246 seconds]
avsm has joined #ocaml
talzeus_ has quit [Remote host closed the connection]
pedagand_ has quit [Ping timeout: 246 seconds]
pedagand has joined #ocaml
Asmadeus has quit [Ping timeout: 246 seconds]
fds has joined #ocaml
_habnabit has joined #ocaml
ocp has quit [Ping timeout: 260 seconds]
ocp has joined #ocaml
kyrylo_ is now known as kyrylo
kyrylo has quit [Ping timeout: 272 seconds]
mcclurmc has joined #ocaml
rand000 has quit [Ping timeout: 246 seconds]
Asmadeus_ is now known as Asmadeus
ontologiae has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
WraithM_ has joined #ocaml
metasyntax has joined #ocaml
dant3 has quit [Remote host closed the connection]
Neros has quit [Ping timeout: 272 seconds]
dant3 has joined #ocaml
mariusae has quit [Remote host closed the connection]
dant3 has quit [Ping timeout: 246 seconds]
ontologiae has quit [Read error: Operation timed out]
rand000 has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest95794
thomasga1 has quit [Quit: Leaving.]
kyrylo has joined #ocaml
ocp has quit [Ping timeout: 245 seconds]
Guest95794 has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 260 seconds]
rand000 has joined #ocaml
root_empire has joined #ocaml
michael_lee has quit [Ping timeout: 252 seconds]
shinnya has joined #ocaml
ygrek has joined #ocaml
boom583 has joined #ocaml
rand000 has quit [Ping timeout: 246 seconds]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
Arzaga has joined #ocaml
<boom583> Why should I use OCaml?
sgnb has joined #ocaml
<boom583> intead of c++
mcclurmc has quit [Remote host closed the connection]
<boom583> but ocaml looks like chinese to me
<boom583> is it worth the learning curve?
<Drup> yes, it is.
<boom583> Drup: can you elaborate?
<Drup> can you elaborate your question ? It's far too general for a precise answer
<boom583> Drup: in what field do you use ocaml?
<Drup> there is tons of article on why ocaml (and functionnal programming in general is good/interesting/better, so I'm not going to repeat those (because I would do it very badly ;))
snyp has joined #ocaml
<boom583> ok
<Drup> but if you have specific question, I can try to answer
<boom583> Ok, for one, I have a hard time wrapping my head around functional programming. seems to use a diff part of the brain
<boom583> is it hard to get used to?
<Drup> you have to accept the fact that your previous programming knowledge will not be super useful for some time =)
<boom583> Drup: what does ocaml allow you to do that other langs can't?
<companion_cube> I'd say it's safe and expressive
<Drup> ocaml has the advantage that you can do it in a progressive maner, since you can still use imperatif paradigme
<boom583> Ok, but why would you say, in comparison, that C++ is *not* safe, expressive?
<boom583> and why can't C++ do progressive manner?
<boom583> (relative to Ocaml)
<boom583> <-- don't know what "imperative" is yet
<Drup> imperative is what you are used to already =)
<Drup> sequence, for loops, all that stuff
<Drup> boom583: a simple stupid example : there is no segfault in ocaml
<Drup> the type system prevent them at compile time
<boom583> hmok
<Drup> there is far more than that, obviously, but that's a simple example of the "safety" part
<smondet> boom583: You can also see it that way: C++ let's you do anything without checking whereas the OCaml compiler will make sure to catch as much mistakes as (automatically) possible. Since the human brain is essentially a mistake making machine, with OCaml you will be more productive by catching and fixing your errors earlier.
<boom583> smondet: but c++ is also a statically typed lang, so what do you mean?
<boom583> what other mistakes does ocaml catch? (other than segfaults)
<smondet> Or, you can look at the experience: most software is written in c++/python or that kind shit, and software does not work, it's a disaster
<smondet> OCaml lets you express much more safety properties in the types, and the type inference algorithm is basically trying to prove theorems on those types.
pminten has quit [Remote host closed the connection]
<smondet> C++ "static" typing is a joke, too easy/tempting to work around
<boom583> hm ok
<smondet> and it is not even consistent with itself
mika1 has quit [Quit: Leaving.]
<Drup> boom583: it's a bit complicated to explain it if you never actually touched those stuff, so I would advice to try it
<Drup> boom583: you will learn stuff on the way on programming as a whole anyway
<boom583> yeah
<Kakadu> boom583: For example, you can have C++ enums in OCaml with optional variables attached to some enum members, and compiler can check if you have tested all possible cases in you `switch` statement (in OCaml it is`match` statement)
<Drup> so it will be fruitful
<boom583> Kakadu: cool
<boom583> But the programming in OCaml stays Object-Oriented right? You make objects for your various things, as in C++?
<Drup> boom583: no.
<Kakadu> boom583: Type system has features what do not exactly exist in C++ type system, that's why we don't need objects in most cases
<smondet> "objects": you can, and many beginners try it that way, it's not wrong by itself, OCaml's object system is 20 years ahead of Java/Scala, but in practice most Ocamlers drop objects
<boom583> interesting. So if you want to represent a "Person", with "name" and "address", what do you do in OCaml?
<Drup> boom583: a record
thomasga has joined #ocaml
<Drup> boom583: which is a sort of struct
<Kakadu> boom583: or a pair
<boom583> but what replaces methods? just regular functions?
<boom583> person1.eat()
<smondet> the core ML typing + GADTS + polymorphic variants + modules is more 'functional' and fit better most problems
Arzaga has quit [Quit: Computer has gone to sleep.]
<Drup> boom583: there is an object system in ocaml, but it's completly different from usual object systems and it's not the core part of ocaml
<boom583> strange
<Drup> boom583: and, tbh, as a beginner, you should ignore it
<smondet> Person.eat person1 (actually in C++, person1.eat(args) is "compiled" to eat(person1, args) :) )
<Drup> it's an advance feature use for specific purposes
<boom583> hmm, ok. in other langs, beginners start with OO
Neros has joined #ocaml
<companion_cube> smondet: not necessarily, you can't if it's dynamically dispatched
<Drup> boom583: not all other langs, some of them =)
<companion_cube> (ie virtual)
Kakadu has quit [Quit: Page closed]
<smondet> companion_cube: yes if you need a for dynamic dispatch, then you can put the function in the record, or use objects, or define 'person' with a variant, etc.
snyp_ has joined #ocaml
<companion_cube> yes
zpe has quit [Remote host closed the connection]
<boom583> So, when did you guys break into Ocaml?
<boom583> OCaml
<companion_cube> a few years ago, in a lab :)
snyp is now known as Guest15622
snyp_ has quit [Client Quit]
Guest15622 has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
snyp_ has joined #ocaml
snyp_ has quit [Client Quit]
snyp_ has joined #ocaml
snyp_ has quit [Client Quit]
<Drup> during my studies :p
<smondet> my 'introduction to (functional) programming class' was using caml-light (hiuh! more than 10 damn years ago :-/) then I used mostly only ocaml since 2006 (starting my phd)
<boom583> cool
<Drup> smondet: don't worry, 4 years ago, it was still this damn caml-light
snyp_ has joined #ocaml
<strobegen1> boom583: I guess at first you would like to learn what it is the functional programming paradigm in general - and after will choose language for your needs - it's many languages here that has FP in some ways (not always with type system like Ocaml has & some of it's doesn't has OO complitly) - Ocaml, F#, Scala, Scheme, Clojure, Erlang, Haskell etc. but all of those has many advantage and disadvantages
<boom583> which is the most popular now?
<Drup> difficult to answer
<companion_cube> depends on the application domain, I think
<boom583> ok
<companion_cube> (e.g. erlang is mostly used in telecoms)
<smondet> F# & Scala are used in industries that have big legacy stuff running on .Net or the JVM
peterbb has quit [Ping timeout: 248 seconds]
<Drup> And Clojure is from the Scheme family but runs on the JVM
<strobegen1> Clojure - is close to better alternative for python&ruby domains - and according to count of #clojure users it's surprising popular
<boom583> heh
<boom583> so why did jane street pick ocaml instead of the others
<boom583> haskell say
<smondet> I've also noticed that microsoft-biased C++/C# programmers tend to associate language and IDE tightly so F# will sound easier to them because of visual studio.
<companion_cube> boom583: maybe to retain more control on the execution of their programs
<jpdeplaix> boom583: for performances
<boom583> companion_cube: how so?
<companion_cube> well, haskell is lazy and has lazy IO, which can be quite tricky
<boom583> yes i've heard ocaml can get c++ speeds
<companion_cube> in ocaml, how and when the code is executed, is relatively easy to predict given the source code
<smondet> and also janestreet values code readability *a lot*, and haskellers tend to like unreadable code (they use type-classes to indroduce tons crazy operators)
<Drup> smondet: crazy operators and type-classes are only colloquially related :p
<Drup> hum
<smondet> (you can check out that video: https://ocaml.janestreet.com/?q=node/82 )
<Drup> wrong word
<strobegen1> boom583: F# currently also can be used for mobile app&game programming with Xamarian tools and Unity3d
dant3 has joined #ocaml
<Drup> and F# droped one of the best feature of ocaml =')
<whitequark> companion_cube: erlang is used in webapp sphere quite a bit
rand000 has joined #ocaml
Neros_ has joined #ocaml
dant3 has quit [Remote host closed the connection]
snyp_ has quit [Quit: leaving]
<Rc43_> Is there application function in ocaml? Like "$" in haskell.
dant3 has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
<whitequark> Rc43_: let ($) f x = f x;;
<whitequark> (although I'm not sure why would one use it)
<Drup> whitequark: the associativity is wrong
<Rc43_> whitequark, less brackets
<Drup> Rc43_: @@, in the last version
<Rc43_> Drup, good, thanks
<Drup> Rc43_: and the pipe operator : |>
strobegen1 has quit [Quit: Leaving.]
<Drup> the one we don't have is the compose . operator
strobegen has joined #ocaml
<Rc43_> Drup, I thought pipe is compose operator...
<Rc43_> What is pipe then?
<Drup> x |> f === f x
<Rc43_> Drup, ah, reversed @@
ygrek has quit [Ping timeout: 248 seconds]
<jpdeplaix> 17:34:11 Drup | and F# droped one of the best feature of ocaml =') // Which one ?
<Drup> yes, with the right associativity, so you can chain them
<Drup> jpdeplaix: functors.
<Drup> jpdeplaix: and a good amount of signature module stuff
ocp has joined #ocaml
rand000 has quit [Ping timeout: 260 seconds]
<adrien_oww> polymorphic variants too
<smondet> and as far as i understood, in F# the .Net compatibility allows some 'NullPointerBitesYourAss' exceptions to pass through
<adrien_oww> yes
<boom583> have you read this? http://www.amazon.com/gp/product/0957671105
<boom583> OCaml from the very beginning
thomasga1 has joined #ocaml
<boom583> yes
<boom583> found it there
boogie has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
<Drup> personnaly, I learned with this one > http://caml.inria.fr/pub/docs/oreilly-book/html/index.html. "Real world ocaml" is very recent.
root_empire has quit [Quit: Ex-Chat]
<boom583> cool
<Drup> I don't really like some choice in real world ocaml, but it's well explained.
<strobegen> http://caml.inria.fr/pub/docs/manual-ocaml/ also is great as introduction, but if you got some concepts earlier
<smondet> 'OCaml from the very beginning' got well reviewed by people around here, but I did not read it
ontologiae has joined #ocaml
<boom583> ok
<boom583> thanks
<smondet> I went through a beta-version of 'Real World OCaml', like Drup say, a lot for choices are taken there, but some explanations are very good
<smondet> (especially about ocaml internals, c bindings, etc)
ttamttam has joined #ocaml
<avsm> That's the thing about the real world. You gotta make choices :)
<companion_cube> it's a bit too JaneStreet flavored imho, but that's fine
<Drup> avsm: it doesn't justify the fact that you don't specify explicitely when you are using syntax extensions
<boom583> Do these books explain well not just the HOW but also the WHYs? That is, why functional programming instead of OO programming? Why OCaml?!
<companion_cube> boom583: functional programming is at least as old as OO
Kakadu has joined #ocaml
<adrien> avsm: don't take it badly however; it's mostly that it turns out that some people get confused when they don't have these syntax extensions or auto-opens
<companion_cube> and besides, many arguments why exist
<Drup> avsm: that's not "real world" at all, on the contrary. Those syntax extensions just confuse beginners when they are not available anymore.
<adrien> I don't think I would have foreseen that
<companion_cube> for instance, safer, more modular...
<avsm> hang on, we do point out when we use syntax extensions in most cases
<avsm> some may have been lost in the editing shuffle, but I'm happy to fix those in a future rev
osa1 has quit [Read error: Operation timed out]
<avsm> And the extensions we use are really essential for beginners, Drup. OCaml is close to unusable without type_conv, for instance
<Drup> is it ? I never used it and I don't mind :|
sepp2k has quit [Quit: Konversation terminated!]
* avsm shrugs
<avsm> every single large ocaml codebase I've worked on has used type_conv quite a bit
<adrien> I agree that for some tasks it can be quite annoying to not have something like it
manizzle has quit [Ping timeout: 272 seconds]
<avsm> as I said, we made a choice to just write about what we use day-to-day, not to explain every last possibility
zpe has joined #ocaml
<companion_cube> I'm not sure Coq uses type_conv
<avsm> i yanked an entire chapter on Lwt as it was too confusing to explain how it fits along Core
<companion_cube> (nor ocamlc, of course)
<Drup> avsm: we have seen lot's of beginners here completely confused because they are trying to use some core example and they can't make it work in their repl, too, but that's not really your fault :/
<Kakadu> Does xcp-xapi uses type-conv?
<avsm> indeed, many people fail to read the utop instructions
yastero has joined #ocaml
<avsm> it does, along with several other extensions like module_conv for RPC support
<avsm> no worries, I've almost got js_of_ocaml + Core working. problem solved shortly via online REPLs
<companion_cube> most of the OCaml code I read/write does not use type_conv, but well, I don't have much serialization to do ^^
<avsm> i did a hunt through opam+docker to get a rough idea how popular each p4 extension was
hnrgrgr_ is now known as hnrgrgr
<boom583> companion_cube: interesting. wasn't really aware of that...
ontologiae has quit [Ping timeout: 260 seconds]
<boom583> for some reasons, i've only ever come across OO
<boom583> imperative and OO. that's the only thing i got to know
<Drup> boom583: don't worry, you are not the only one.
<boom583> strange
ollehar has joined #ocaml
ocp has quit [Ping timeout: 260 seconds]
<jpdeplaix> « OCaml is close to unusable without type_conv, for instance »
* jpdeplaix suffocate
shinnya has quit [Ping timeout: 260 seconds]
<Drup> jpdeplaix: yeah, I didn't want to unleash a troll fest, but ... :/
<jpdeplaix> Drup: the metal band ? :D
<avsm> you don't think that generic printers are useful?
<Drup> avsm: oh, it is
<avsm> or deriving-ocsigen, take your pick
<jpdeplaix> but we can live pretty well without it
<Drup> avsm: I just think that this sentence is a incredibly huge overstatement.
<companion_cube> jpdeplaix: :D
<avsm> Not really. Standards for serialization are important on large codebases.
<companion_cube> not all code bases need to serialize many things
<companion_cube> (even big ones, see Coq)
<avsm> Noone really wants to depend on camlp4, but it has provided us with a decade of experimenting with syntax extensions, and type_conv hit a sweet spot of performance vs complexity that has survived pretty well
<avsm> sure, but even a compiler really benefits.
<avsm> i.e. for debugging something
<companion_cube> oh, for printing
<companion_cube> I find that combining printing functions by hand is quite doable
<companion_cube> serialization is harder
<avsm> Pretty much every syntax extension in Core and Xapi were added after careful thought about all the alternatives being worse
<avsm> some (e.g. pa_pipebang) have now been fixed upstream and aren't needed any more
<Drup> avsm: You can accuse me not to work on large codebase, it would be true. But no, I don't really huge polymorphic printer.
<Drup> use*
peterbb has joined #ocaml
<avsm> then don't add 'with sexp' to your code. Quite easy
<rks`> avsm: i'm curious about your "stats" regarding the use of syntax extension in opam packages
patojo has joined #ocaml
<Drup> avsm: that's not the issue I pointed on the beginning of this conversation.
<rks`> thank you!
<companion_cube> wow, a script on github
boogie has quit [Read error: Connection reset by peer]
<companion_cube> I'm envious of how meticulous you are :D
<avsm> it's just a swap service for my limited brain ;-)
<jpdeplaix> I agree its useful for serialization (deriving-ocsigen is used almost exclusively for this purpose) and maybe for debugging (but I never used it), but otherwise I don't see (for now) any use-cases for this
<companion_cube> the code is nice
<avsm> jpdeplaix: fieldlib and variantslib to manipulate them as firstclass values
<avsm> orm for sql generators (opam install orm)
<avsm> dyntype for web forms
<avsm> it's generally just a handy extension to have around
<boom583> Do you agree with this answer? http://stackoverflow.com/a/2079678
<boom583> Namely: If you have a fixed set of things (or things that rarely change), go for functional?
<boom583> i.e., functional programming instead of OO programming
<bernardofpc> boom583: what languages do you already know (say have written longer-than-one-screenfull programs)
<boom583> C, C++, PHP, JavaScript
<boom583> all imperative/OO langs
<boom583> trying to decide whether to break into func
<bernardofpc> what are you doing right now ?
<Drup> boom583: the answer is an interesting point of view, not sure it's completly true
<bernardofpc> (like, college sutdent, etc, etc)
<boom583> just a hobby dev (main work not related)
<bernardofpc> I see
<boom583> In C++, you can easily create new things by subclassing. what's so hard about that? Does that answer mean a whole new class hierarchy?
<boom583> as opposed to just subclasses
<bernardofpc> well, I can say that learning func prog may take you some time
<bernardofpc> but it can give you new ways of tackling (programming) problems
<strobegen> boom583: few FP concepts in JS http://dailyjs.com/2012/09/14/functional-programming/
<bernardofpc> I'd say that most problems out there can be solved with C++ / Python / OCaml / ...
<bernardofpc> it does not really matter for feasibility
<jpdeplaix> avsm: yes those (IMHO) are very specific codes, and ocaml is pretty usable without it.
<bernardofpc> but having learnt another way of doing things might get you there faster
<bernardofpc> (so by no means "forget" imperative constructs : if it's appropriate, and clear, go for it)
<bernardofpc> and the same argument goes the other way around : knowing functional "ways" will get you more flexibility
mcclurmc has quit [Remote host closed the connection]
<boom583> ok
<bernardofpc> and afterwards, it's up to you to choose the best "way" in each problem
<companion_cube> exactly
<boom583> i will grab that "ocaml from the very beginning" and read it
<boom583> see what i make of it
tane has joined #ocaml
<boom583> i'm thinking years into future and if ocaml will make my life easier (easier than c++), that's great
<boom583> who knows
<boom583> c++ templates are somewhat painful. not sure if ocaml adds something there
mcclurmc has joined #ocaml
<companion_cube> the first thing you might appreciate is the time needed to compile ;)
<Drup> it does =)
<Drup> rules of thumbs about ocaml : 1) Functors are awesome.
<bernardofpc> boom583: from my point of view, OCaml reduces the amount of objects you're going to create : most things can be written otherwise
<boom583> ok
<bernardofpc> so templates also reduce (especially because of polymorphism, as far as I could see)
<bernardofpc> (other people here can give you *tons* more info, though)
<strobegen> boom583: The Functional Template Library in C++ https://github.com/beark/ftl
<strobegen> - may be it will help learn FP in some ways
<Drup> looking at it, I think it would confuse him more than anything else x)
<companion_cube> is there patterm matching inside named arguments ?
ontologiae has joined #ocaml
dant3 has quit [Remote host closed the connection]
<boom583> Drup: yeah i think so too lol
<boom583> i'll just look into ocaml
<strobegen> Drup: yes it can confusing, but when I heard about FP languages at first time I don't understand that FP is not related to specific languages/compilers, and I guess this scary examples in already know language can help to select that is pure concepts is
<ggole> companion_cube: yep
<ggole> let test ~foo:(a, b) = a
<companion_cube> yes, I found, thanks
<companion_cube> weird that I never used that before
<ggole> It's pretty marginal, really...
<companion_cube> I just used it for deconstructing tuples, the same way
<ggole> Bit strange that ~foo:int and ~(foo:int) mean different things though
<companion_cube> right
<companion_cube> one is a type annotation and the other, a pattern match...
<ggole> And you can do let test ~foo:int:int = int O_o
<ggole> Bit of a corner case there, I suppose
thomasga1 has quit [Quit: Leaving.]
<companion_cube> :D
<companion_cube> well, it's nice being able to name variables "int" sometimes
ontologiae has quit [Ping timeout: 246 seconds]
<ggole> That's fine, it's more the two colons
boom583 has quit [Quit: boom583]
Xenasis has joined #ocaml
Xenasis has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Neros_ has quit [Ping timeout: 248 seconds]
osa1 has joined #ocaml
dant3 has joined #ocaml
thomasga has joined #ocaml
zpe has quit [Remote host closed the connection]
nikki93 has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
AltGr has left #ocaml []
manizzle has joined #ocaml
thomasga has quit [Ping timeout: 246 seconds]
avsm has quit [Ping timeout: 245 seconds]
rand000 has joined #ocaml
rand000 has quit [Client Quit]
rand000 has joined #ocaml
Neros has joined #ocaml
dsheets has quit [Read error: Operation timed out]
ollehar1 has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
thomasga has joined #ocaml
mcclurmc has joined #ocaml
thomasga has quit [Client Quit]
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
peterbb has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
ttamttam has quit [Quit: ttamttam]
ggole has quit []
mcclurmc has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
dsheets has joined #ocaml
zpe has joined #ocaml
skchrko has quit [Quit: Leaving]
mcclurmc has joined #ocaml
nikki93 has quit [Remote host closed the connection]
tane has quit [Quit: Verlassend]
nikki93 has joined #ocaml
avsm has joined #ocaml
pkrnj has joined #ocaml
nikki93 has quit []
Kakadu has quit []
malvarez has joined #ocaml
peterbb has joined #ocaml
hellome has quit [Read error: Connection reset by peer]
Rc43_ has quit [*.net *.split]
hellome has joined #ocaml
dant3 has quit [Remote host closed the connection]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
ulfdoz has quit [Ping timeout: 245 seconds]
manud_ has joined #ocaml
manud has quit [Read error: Connection reset by peer]
manud_ is now known as manud
ollehar has quit [Ping timeout: 272 seconds]
hellome has quit [Remote host closed the connection]
hellome has joined #ocaml
pango has quit [Ping timeout: 272 seconds]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
ulfdoz has joined #ocaml
pango has joined #ocaml
nikki93 has joined #ocaml
hellome has quit [Remote host closed the connection]
hellome has joined #ocaml
ollehar has joined #ocaml
<malvarez> Is there any OCaml language extension that would allow me to write lisp-style macros?
<malvarez> If not, would it be possible to write such a beast?
<companion_cube> camlp4 allows to write syntax extensions
<companion_cube> but it probably isn't as powerful as lisp macros
<companion_cube> (nor as convenient)
<patojo> malvarez: Look into camlp4 or metaocaml
<malvarez> patojo: never touched metaocaml, but I always found camlp4 to be too cumbersome for some things
<malvarez> I'll check MetaOCaml out, though, thanks
hellome has quit [Remote host closed the connection]
<smondet> malvarez: even more experimental: http://thinkinginmeta.com/Fan/
<malvarez> smondet: Fan looks very interesting, thanks a lot!
<smondet> also some crazy idea: using lisp or scheme as a prepropessor whose stage-0 would be ocaml with scheme syntax: http://pauillac.inria.fr/~ddr/camlp5/doc/htmlc/scheme.html
<malvarez> Oh, wow, that's not crazy at all! That makes a lot of sense!
<smondet> (not sure lexing would be completely compatible)
<Drup> malvarez : yeah ... no, not realy T__T
Simn has quit [Quit: Leaving]
<malvarez> Well, I love Lisp syntax...
<malvarez> YMMV
<companion_cube> there is a whitespace ocaml, too!
<companion_cube> I mean indentation-based ocaml
<adrien> twt...
<malvarez> Now the only thing we need is an OCaml dialect with Prolog syntax.
<companion_cube> :]
ocp has joined #ocaml
Arsenik has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
ontologiae has quit [Quit: WeeChat 0.4.0]
patojo has quit [Remote host closed the connection]
<nicoo> companion_cube: I know what you are thinking
<nicoo> Bad idea.
<companion_cube> I didn't say anything.
mcclurmc has quit [Remote host closed the connection]
<nicoo> You don't need to. I know what make the square cogs of your mind turn.
<adrien> nicoo: he cannot make one: he only *re*invents stuff
<adrien> if it hasn't been done before, he won't do it again
Arsenik has quit [Quit: Quitte]
<nicoo> s/again/yet/
<adrien> suddenly it's very tempting to create such a project in 5 years and watch him reinvent it :P
<companion_cube> :)
<companion_cube> well, I do have a datalog engine...
<companion_cube> it can deal with a kind of prolog
darkf has joined #ocaml
<nicoo> companion_cube: I was thinking about your datalog engine, yes
<nicoo> adrien: Exactly my thoughts.
<nicoo> companion_cube: Ever heard of CompCert?
* nicoo <~nicoo@unaffiliated/nicoo> has left #ocaml (Flee, fled, fled)
<companion_cube> CompCert does prolog too?
<adrien> :D
<nicoo> xD
<companion_cube> well, for 5 minutes I've been thinking of making an awk-like language
<companion_cube> but anyway
mcclurmc has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
boogie has joined #ocaml
strobegen has quit [Quit: Leaving.]
ocp has quit [Read error: Connection reset by peer]
ocp has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
ocp has quit [Ping timeout: 245 seconds]
ulfdoz has quit [Ping timeout: 246 seconds]
rand000 has quit [Quit: leaving]
Xenasis has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
dsheets has joined #ocaml
nikki93 has quit [Remote host closed the connection]
manud is now known as manu-afk
kyrylo has quit [Ping timeout: 248 seconds]
nikki93 has joined #ocaml
zpe has joined #ocaml
pango has quit [Read error: Operation timed out]
zpe has quit [Ping timeout: 252 seconds]
pango has joined #ocaml
BitPuffin has quit [Quit: WeeChat 0.4.2]
frxx has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml