dant3 has quit [Remote host closed the connection]
<gasche_>
Drup: you can't go wrong on type safety
<Drup>
But you can go very painfully.
dant3 has joined #ocaml
mcclurmc has joined #ocaml
<gasche_>
Drup: that is progress: painful, but eventually of value
<Drup>
my point is that, sometime, it's just to painful for the gain =)
<companion_cube>
sometimes, also, you really want to bypass the type system :)
<ousado>
example?
<gasche_>
I agree on Drup's point
palomer has joined #ocaml
rossberg has quit [Remote host closed the connection]
<companion_cube>
well, you find some unsafe casts in many ocaml files
<companion_cube>
including the stdlib and batteries
<ggole>
Some of that is just performance hacking, though
csakatoku has quit [Remote host closed the connection]
<ggole>
The type system is able to represent the structure of the computation ok, but not using the dynamic structure the programmer desires (indirections, etc)
csakatoku has joined #ocaml
<ggole>
I don't think that's a problem with type systems
<companion_cube>
ggole: well yes, performance hacking can be a reason
<companion_cube>
sometimes also, you want to use a Univ type
<companion_cube>
just because it's convenient
<companion_cube>
(it stays well typed, but it's quite a hack)
<adrien>
that happens mostly because you're building wheels :)
<Drup>
no, that's only you, companion_cube :D
<companion_cube>
I didn't write the original Univ blog post, so no :p
<companion_cube>
even Mixtbl was initiated by someone else
<Drup>
"I know several OCaml experts keep an eye on this blog, so hopefully any inaccuracies will be corrected in the comments." =')
Simn has quit [Ping timeout: 252 seconds]
csakatoku has quit [Ping timeout: 252 seconds]
Xenasis has joined #ocaml
TDJACR has quit [Ping timeout: 245 seconds]
<ousado>
In my experience it's a matter of time and effort. Stuff that's 'too painful' often can be done right (and thus made painless for the future) by employing metaprogramming.
wolfnn has joined #ocaml
ocp has joined #ocaml
<adrien>
oh
<adrien>
we only need to wait for ocaml-ty :P
<ousado>
or use Fan
nikki93 has joined #ocaml
Xenasis has quit [Read error: Connection reset by peer]
<Drup>
doesn't solve the same issue
<ggole>
What's ocaml-ty? Compile-time functions over types?
<ousado>
I'm not sure which isuue in programming couldn't be solved by writing code
<ousado>
*issue
TDJACR has joined #ocaml
<adrien>
rtti
mreca has joined #ocaml
<ggole>
Hmm :/
<Drup>
ousado: try to inspect ocaml type at runtime with Fan, I'm looking at you while you try =)
<adrien>
Drup: could solve some of the things mentioned by companion_cube
<ggole>
I guess that could be useful
zpe has joined #ocaml
<ousado>
Drup: One doesn't have to
shinnya has joined #ocaml
nikki93 has quit [Ping timeout: 272 seconds]
<ousado>
maybe if you're writing educational tools and want to allow inspecting arbitrary state at runtime, runtime type information is useful
zpe has quit [Ping timeout: 246 seconds]
struktured has quit [Ping timeout: 265 seconds]
WraithM_ has joined #ocaml
zpe has joined #ocaml
Simn has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
Arsenik has quit [Ping timeout: 245 seconds]
dant3 has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 245 seconds]
suicidemaker has quit [Quit: leaving]
milosn has joined #ocaml
maufred has quit [Remote host closed the connection]
nikki93 has joined #ocaml
djcoin has quit [Quit: WeeChat 0.4.1]
travisbrady has quit [Quit: travisbrady]
nikki93 has quit [Ping timeout: 246 seconds]
wwilly has quit [Ping timeout: 246 seconds]
milosn has quit [Ping timeout: 240 seconds]
milosn has joined #ocaml
thomasga has quit [Quit: Leaving.]
cago has left #ocaml []
pango has joined #ocaml
boogie has joined #ocaml
sheijk has quit [Ping timeout: 250 seconds]
ehamberg has left #ocaml []
struktured_ has joined #ocaml
Kakadu has quit [Quit: Page closed]
travisbrady has joined #ocaml
struktured__ has joined #ocaml
ocp has quit [Ping timeout: 240 seconds]
struktured_ has quit [Ping timeout: 245 seconds]
tane has joined #ocaml
osa1 has joined #ocaml
travisbrady has quit [Ping timeout: 240 seconds]
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
boogie has quit [Ping timeout: 246 seconds]
dant3 has joined #ocaml
manizzle has quit [Ping timeout: 265 seconds]
sheijk has joined #ocaml
dant3 has quit [Ping timeout: 245 seconds]
jonludlam has quit [Remote host closed the connection]
dant3 has joined #ocaml
rand000 has quit [Quit: leaving]
travisbrady has joined #ocaml
ski has joined #ocaml
struktured has joined #ocaml
struktured__ has quit [Ping timeout: 265 seconds]
dant3 has quit [Remote host closed the connection]
<mrvn>
error 127 i usualy an exec failure but maybe it isn't ocamlbuild that fails but something it calls
tizoc has joined #ocaml
<thomasga>
beginner: remove setup.data
<beginner>
thomasga: thanks that solved the problem
Arsenik has quit [Remote host closed the connection]
<beginner>
now i get this
<beginner>
ocamlfind: [WARNING] You have installed DLLs but the directory /home/florian/.opam/4.01.0/lib/stublibs is not mentioned in ld.conf
<beginner>
why doesnt opam add the stublibs folder automatically to ld.conf?
WraithM_ has quit [Ping timeout: 265 seconds]
<travisbrady>
Anyone ever seen this error from JS's re2 bindings: "re2/dfa.cc:447: DFA out of memory: prog size 14494 mem 2679810"? Got it while experimenting in utop.
<thomasga>
beginner: it's a just a warning, CAML_LD_LIBRARY path is set properly by opam
robink_ has joined #ocaml
<thomasga>
(which does not change anything outside ~/.opam and hence does not modify your ld.conf)
mcclurmc has quit [Remote host closed the connection]
robink has quit [Ping timeout: 240 seconds]
WraithM_ has joined #ocaml
suicidemaker has quit [Ping timeout: 265 seconds]
snyp has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
WraithM_ has quit [Ping timeout: 265 seconds]
WraithM_ has joined #ocaml
<beginner>
thomasga: but why do i get then this error
<smondet>
Kakadu: if you install in opam's tree, why don't you use `opam pin` for your modified version and then `opam install` ?
<smondet>
(would look simpler to me)
<Kakadu>
hmmm
<Kakadu>
I will do this next time
snyp has quit [Quit: Leaving]
<Kakadu>
I thought that opam can't ping to local path, only version (like apt-pinning)
<whitequark>
it's the other way around
ulfdoz has joined #ocaml
<smondet>
opam can pin local paths, repositories, or versions
ttamttam has quit [Quit: ttamttam]
Kakadu has quit []
zpe has quit [Remote host closed the connection]
ambul has quit [Ping timeout: 240 seconds]
ambul has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
avsm has joined #ocaml
sillyotter has joined #ocaml
tautologico has joined #ocaml
ollehar has quit [Ping timeout: 265 seconds]
dant3 has quit [Remote host closed the connection]
oo1 has joined #ocaml
<oo1>
Bonsoir =)
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 248 seconds]
malvarez has joined #ocaml
Eyyub has joined #ocaml
WraithM_ has quit [Ping timeout: 245 seconds]
<oo1>
Il y a quelqu'un ?
<oo1>
J'aimerai juste, si possible, avoir un retour d'experience sur ocaml
<oo1>
car j'aimerai apprendre un nouveau language de programmation
<oo1>
mais j'ai des doutes
<def-lkb>
=> /join #ocaml-fr pour parler françois
<oo1>
xD
<oo1>
okay sorry
<oo1>
i'm a noob, and i have some doubt
<oo1>
i would like to learn ocaml
<oo1>
(or lisp or sheme.. but i don't know make a choice)
strobegen has quit [Quit: Leaving.]
<oo1>
#join #ocaml-fr
<oo1>
fu :/
<def-lkb>
avec un "/" :)
<oo1>
xD
<oo1>
décidément
<oo1>
thx
<oo1>
++all
oo1 has left #ocaml []
WraithM_ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
mcclurmc has joined #ocaml
oriba has joined #ocaml
<oriba>
in the reference-manual there is a GADT example, which looks strange to me:
<oriba>
let rec eval: type a. a term -> a = function
zpe has joined #ocaml
<oriba>
what does the "type a. a term" mean? Is "a." a certain syntactical issue?
mcclurmc has quit [Ping timeout: 245 seconds]
<mrvn>
oriba: "type a ." creates a polymorphic type variable that you can use in the remainder of the type specs.
<mrvn>
It's sor of like "'a term -> 'a" but as GADT.
<oriba>
and what about the type _ term = in that example? Why is there a _ pattern? Does it has something to do with this polymorphic type? Is that all a new syntax? Don't remember "a." in 3.11 stuff
<mrvn>
oriba: _ is a syntax for when you don't need the name of the type variable.
<mrvn>
it says there is a type variable and I don't care what you call it.
<mrvn>
With GADTs you need the "type a." syntax a lot.
<mrvn>
and you have to annotate types a lot
<oriba>
hmhh
<malvarez>
Yeah, but that syntax is in fact older than GADTs and has a few more uses
<malvarez>
It's true that GADTs are the most common
zpe has quit [Ping timeout: 264 seconds]
<oriba>
It seems that syntax is only introduced informally by example in chapter 7.18.
<oriba>
The a. syntax.... or is it part of a different chgapter, where it is explained in detail?
<malvarez>
it's defined in sections 7.12 (Explicit polymorphic type annotations) and 7.13 (Locally abstract types)
<oriba>
ah, ok... should read that too ;-)
<malvarez>
at first glance it looks unrelate
groovy2shoes has joined #ocaml
<malvarez>
but the syntax 'type t . t' is in fact syntactic sugar
<malvarez>
it's all in sections 12 and 13
<malvarez>
(7.12 and 7.13, that is)
<oriba>
ah, ok.
<oriba>
GADT look very powerful...
<mrvn>
They allow you to make things type save that you couldn't before.
<mrvn>
or only exceedingly ugly.
<mrvn>
Verry usefull for parsing languages and building a type safe AST.
<oriba>
yes, ugly... seems like the save a lot of pattern matches
<oriba>
I will rewrite a command loop of one of my programs with GADTs. I think it will make the code cleaner and saves much lines of code...
<mrvn>
using GADTs for witness types is also fun.
<mrvn>
You can make an universal container where you store data of any type + witness. But it's still type save because you can only extract data with the right witness.
<malvarez>
Yeah, you can basically do typesafe casts
<malvarez>
The classical example is embedding the simply typed lambda-calculus
<mrvn>
Without GADTs you have to user 2 records with polymorphic functions to do the same.
<oriba>
mrvn, what is witness code?
Xenasis has joined #ocaml
<mrvn>
oriba: You can make a type _ witness = ... GADT and then use type a . a witness -> a -> unit
<mrvn>
The witness is a dummy that only ensures the type is correct.
<oriba>
hmhh
<oriba>
aha
<mrvn>
And you can match on the witness and have different code depending on the type
darkf has joined #ocaml
tane has quit [Quit: Verlassend]
avsm has quit [Quit: Leaving.]
travisbrady has joined #ocaml
Xenasis has quit [Remote host closed the connection]
WraithM_ has quit [Ping timeout: 265 seconds]
sillyotter has quit [Quit: Bye]
thomasga has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
palomer has quit [Ping timeout: 250 seconds]
nikki93 has joined #ocaml
travisbrady has quit [Quit: travisbrady]
nikki93_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
ulfdoz has quit [Ping timeout: 248 seconds]
nikki93 has quit [Ping timeout: 264 seconds]
nikki93_ has quit [Remote host closed the connection]
q66_ has joined #ocaml
q66 has quit [Disconnected by services]
q66_ is now known as q66
mcclurmc has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
mcclurmc has quit [Remote host closed the connection]