ChanServ 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 | Logs at http://irclog.whitequark.org/ocaml
Nahra has quit [Remote host closed the connection]
darkf has joined #ocaml
Nahra has joined #ocaml
maattdd has joined #ocaml
tlockney is now known as tlockney_away
S11001001 has quit [Quit: aagh internets]
maattdd has quit [Ping timeout: 260 seconds]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
huza has joined #ocaml
lordkryss has joined #ocaml
WraithM has joined #ocaml
Nahra has quit [Remote host closed the connection]
shinnya has quit [Quit: ZNC - http://znc.in]
Nahra has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest52070
maattdd has joined #ocaml
boogie has quit [Remote host closed the connection]
Guest52070 has quit [Ping timeout: 265 seconds]
maattdd has quit [Ping timeout: 265 seconds]
<Drup> whitequark: why are the iteration functions implemented with this equality test and fail on At_foo matching ?
<Drup> it seems wrong, what am I missing ?
Nahra has quit [Remote host closed the connection]
WraithM has quit [Ping timeout: 265 seconds]
Nahra has joined #ocaml
rgrinberg has joined #ocaml
nicoo_ has joined #ocaml
nicoo has quit [Ping timeout: 240 seconds]
q66 has quit [Quit: Leaving]
WraithM has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
WraithM has quit [Ping timeout: 252 seconds]
tchell has quit [Ping timeout: 264 seconds]
lordkryss has quit [Ping timeout: 245 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
Nahra has quit [Remote host closed the connection]
pyon has joined #ocaml
huza has joined #ocaml
Nahra has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
WraithM has joined #ocaml
Lutin` has joined #ocaml
struktured has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
struktured has quit [Ping timeout: 240 seconds]
struktured has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest40789
esoto has quit [Quit: leaving]
Guest40789 has quit [Ping timeout: 240 seconds]
Nahra has quit [Remote host closed the connection]
<Lutin`> Anyone here handy with profiling Ocaml?
<Drup> Lutin`: what's your question exactly ?
<Lutin`> I know benchmarks tend to be a sensitive subject, but I'm wondering why http://benchmarksgame.alioth.debian.org/u64q/program.php?test=fasta&lang=ocaml&id=6 is 3x as slow as the Haskell version
<Lutin`> Never used Ocaml and I'm wondering if there's anything that just jumps out before I jump in
<Drup> where do you see the haskell version ?
<Lutin`> I'd imagine it's because the Haskell version works directly with foreign pointers, and I assume the same could be done in Ocaml
<Drup> meh, the website seem broken
Nahra has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<Drup> Lutin`: both implementation seem quite involved (especially the haskell one) and I don't have the will to dwell in them now, sorry :)
<Lutin`> No problem
<Lutin`> Figured I'd ask around to see if someone had some insight before I jump in
<Lutin`> Thanks for looking though :)
maattdd has quit [Ping timeout: 276 seconds]
strobegen has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
gasche has quit [Ping timeout: 265 seconds]
gasche has joined #ocaml
claudiuc has quit [Remote host closed the connection]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
rgrinberg has joined #ocaml
divyanshu has joined #ocaml
racycle has joined #ocaml
tlockney_away has quit [Ping timeout: 240 seconds]
* BitPuffin has decided that this is the weekend to finally master ocaml
<BitPuffin> does ocaml let you do something where you can put, say ints in a generic variable?
<BitPuffin> ie parameterize a type with values
<BitPuffin> so I could define a vector type (as in a math vector) that takes a parameter D for dimension
Lutin` has quit [Remote host closed the connection]
<BitPuffin> (peano numbers doesn't count)
Lutin` has joined #ocaml
agarwal1975 has joined #ocaml
<Drup> that would need dependent type, and the answer is no.
<BitPuffin> dependent type?
tlockney_away has joined #ocaml
<BitPuffin> aw, that sucks
<Drup> "parameterize a type with values"
tlockney_away is now known as tlockney
<BitPuffin> yeah you are still not really explaining it
<BitPuffin> well I mean the that the value of a type parameter being something other than a type
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
<Drup> what do you want me to explain ? it's precisely the definition of dependent types, and ocaml doesn't have dependent types :p
<BitPuffin> well okay now you explained it
<BitPuffin> I guess the way you said it was kind of weird
<BitPuffin> well okay
<BitPuffin> maybe there is something else
<Drup> :D
Nahra has quit [Remote host closed the connection]
<BitPuffin> how would you implement an arbitrarily sized math vector?
<BitPuffin> one that isn't resizable
<BitPuffin> like a list would be
<BitPuffin> (array in the background)
<Drup> An array :p
<BitPuffin> well can you make a new type from an array?
<Drup> "type vector = int array" ?
<BitPuffin> looks good enough
<BitPuffin> can I then do `type matrix = vector array`?
<Drup> sure
<Drup> (you don't really need to define them, anyway)
<BitPuffin> neithoer of those webpages loaded haha
<BitPuffin> neithoer? really?
<Drup> well, I linked only one webpage.
<BitPuffin> oh
<BitPuffin> I see
<BitPuffin> lol
<BitPuffin> weird link
<BitPuffin> Drup: should I read that page before reading RWO?
araujo has quit [Quit: Leaving]
<Drup> not really, it's just jokes x)
<BitPuffin> lol
<BitPuffin> :P
Nahra has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<BitPuffin> hahaha
<BitPuffin> liked the one on currying
agarwal1975 has quit [Quit: agarwal1975]
philtor_ has joined #ocaml
yacks has joined #ocaml
<BitPuffin> w00t - : int option = Some 5
<BitPuffin> well guess this will show up somewhere in the book
struktured has joined #ocaml
rgrinberg has joined #ocaml
philtor_ has quit [Ping timeout: 260 seconds]
struktured has quit [Ping timeout: 240 seconds]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Nahra has quit [Remote host closed the connection]
racycle has quit [Quit: ZZZzzz…]
Nahra has joined #ocaml
boogie has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
Submarine has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
boogie has quit [Remote host closed the connection]
tizoc has quit [Client Quit]
tizoc has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest9445
Nahra has quit [Remote host closed the connection]
Guest9445 has quit [Remote host closed the connection]
Nahra has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
<BitPuffin> oooOOOo maybe I could use a phantom type to track if a matrix is orthogonal and therefore be able to optimize the inversion of a matrix to instead call transpose
slash^ has joined #ocaml
<BitPuffin> anyone know the differences between glMLite, lablgl and tgls?
<Drup> tgls is very recent and auto generated and low level
<Drup> lablgl is well integrated with lablgtk
<Drup> glMlite is quite light, standalone, and with a fancy experimental functional interface
<BitPuffin> ah
<BitPuffin> guess I might go for tgls then
<BitPuffin> either that or glMLite
<Drup> not sure you want that
<Drup> when I say low level, I really mean it :)
<BitPuffin> well what's the problem with that? :P
<Drup> try, you will see.
<BitPuffin> yeah i guess I'll try both :)
WraithM has quit [Ping timeout: 260 seconds]
<BitPuffin> but I mean I am used to writing stuff in C etc
<BitPuffin> so it's not like I'll poop my pants for it being low level
<Drup> but the author of tgls is working on a higher level library based on tgls
<BitPuffin> unless low level in ocaml means something extremely annoying
<Drup> but basically tgls is a straigh binding of the openGL api
<BitPuffin> yeah
<Drup> which is horrible.
<BitPuffin> the one I'm used to
<BitPuffin> :P
<BitPuffin> yeah it's not really the best
<BitPuffin> pretty much as stateful as it gets
<BitPuffin> I think as someone who obsesses over making as high performing fancy rendering as possible I'll probably prefer tgls, but that's a guess
<Drup> higher level binding does impend performances.
<BitPuffin> yeah
<Drup> doesn't*
<Drup> =')
yacks has quit [Ping timeout: 240 seconds]
<BitPuffin> ah haha
<BitPuffin> why not?
<Drup> or more exactly, doesn't have to
<BitPuffin> if your argument is "well you'll probably do the same convertion to c-types" then maybe
<BitPuffin> but not necessarily
<BitPuffin> you might be converting back and forth a lot, and instead you could just write the C-type operations with C-type variables
<BitPuffin> or whatever :
<BitPuffin> P
Nahra has quit [Remote host closed the connection]
<Drup> that depends of the design of your library.
<BitPuffin> yup
<Drup> you don't need to do lots of conversion to prevent segfaults, you just need proper type-fu.
<BitPuffin> quite possibly
<BitPuffin> I guess with proper type-fu you could probably have the compiler optimize the conversions for you or something
<BitPuffin> again I'm only learning
<Drup> (not saying the type-fu is easy, just that it doesn't cost performances)
<BitPuffin> :P
<Drup> (and also, you will not learn a lot about ocaml if you jump straight to using something like tlgs, which is basically writing C with an ocaml syntax)
<BitPuffin> sure
<BitPuffin> Well I'm not really starting out writing the GL stuff
<BitPuffin> first of all I'll probably do some web stuff
<BitPuffin> and then some 3d math lib stuff
<BitPuffin> etc
<BitPuffin> so there will be some proper ocomling before doing GL things in ocaml
<BitPuffin> ocaml is fun shit -> because_it_is_not shit :P
Nahra has joined #ocaml
<BitPuffin> although the 3d math lib will probably use a for loop or two, because I reckon it's probably faster than recursion
<Drup> (before going into 3d math lib, look at Gg)
<Drup> (oh well, nvm, it's for learning anyway)
Gertm has left #ocaml ["WeeChat 0.4.3"]
<BitPuffin> I'll take a look
<BitPuffin> Seems like it doesn't support arbitrarily sized vectors and matrices
yacks has joined #ocaml
Simn has joined #ocaml
NoNNaN has quit [Ping timeout: 272 seconds]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
Lutin` has quit [Ping timeout: 245 seconds]
NoNNaN has joined #ocaml
BitPuffin has quit [Ping timeout: 245 seconds]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
lordkryss has joined #ocaml
WraithM has joined #ocaml
rgrinberg1 has quit [Read error: Connection reset by peer]
Nahra has quit [Remote host closed the connection]
WraithM has quit [Quit: leaving]
nicoo_ is now known as nicoo
Submarine has quit [Quit: Leaving]
Nahra has joined #ocaml
WraithM has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
hhugo has joined #ocaml
ski_ has joined #ocaml
pollux_ has joined #ocaml
pollux has quit [*.net *.split]
ski has quit [*.net *.split]
adrien has quit [*.net *.split]
pollux_ is now known as pollux
adrien has joined #ocaml
alpounet has joined #ocaml
ollehar has joined #ocaml
ciphergoth has joined #ocaml
Nahra has quit [Remote host closed the connection]
<ciphergoth> I'm looking at some old OCaml tutorials, and they refer to a mutable, non-UTF8-aware string type. If I were writing an OCaml program today, is this type something I'd still find myself working with or is it largely obsolete in modern OCaml libraries?
<ciphergoth> I found a page for a "Rope" type that is immutable and UTF-8 aware
studybot has quit [Remote host closed the connection]
NoNNaN has quit [Remote host closed the connection]
<adrien> the "string" type is an array of arbitrary bytes (including nulls) and can be used for anything
<mrvn> that type still exists.
NoNNaN has joined #ocaml
<adrien> it's aware of nothing which makes it able to hold everything
studybot has joined #ocaml
<adrien> but there are no pre-defined unicode operations on it
<adrien> there are a few libraries for unicode but I don't know the topic very well
Nahra has joined #ocaml
<ciphergoth> so string literals create these string objects then?
<ciphergoth> are there rope literals?
<def`> no, you use a conversion function to turn string literals to rope
<mrvn> nope, rope is an add on from an external library
<def`> (the langage itself and its standard libraries are quite minimal, most things are provided by external library)
<ciphergoth> In production code, what do you use?
<mrvn> english :)
alpounet has quit [Remote host closed the connection]
Cyanure has joined #ocaml
<ciphergoth> Damn, I was about to learn it too! Hopefully one day this will get sort it out and I can come back to this language. Thanks for your help!
ciphergoth has quit [Quit: Ex-Chat]
<adrien> errr
<def`> :P
<whitequark> Drup: iteration function, hmm
<mrvn> Seriously? Oh no, I need to use an UTF8 module. Lets not learn the language.
<adrien> a slight misunderstanding on what that would entail I guess
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
* mrvn is still going sideways with his kernel.
<mrvn> ups
Kakadu has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
robink has quit [*.net *.split]
lopex has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
alinab has quit [*.net *.split]
olasd has quit [*.net *.split]
ccasin has quit [*.net *.split]
acieroid has quit [*.net *.split]
BiDOrD has quit [*.net *.split]
vbmithr has quit [*.net *.split]
companion_cube has quit [*.net *.split]
so has quit [*.net *.split]
ggherdov has quit [*.net *.split]
cthuluh has quit [*.net *.split]
Ptival has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
alex_nx has quit [*.net *.split]
Armael has quit [*.net *.split]
saarin has quit [*.net *.split]
rs0 has quit [*.net *.split]
WraithM has quit [*.net *.split]
hhugo has quit [*.net *.split]
siddhart1v_away has quit [*.net *.split]
petterw has quit [*.net *.split]
zozozo has quit [*.net *.split]
dant3 has quit [*.net *.split]
penryu has quit [*.net *.split]
nicoo has quit [*.net *.split]
zebr has quit [*.net *.split]
keen________ has quit [*.net *.split]
arj has quit [*.net *.split]
huza has quit [*.net *.split]
Simn has quit [*.net *.split]
nk0_ has quit [*.net *.split]
parcs has quit [*.net *.split]
SHODAN has quit [*.net *.split]
fraggle_ has quit [*.net *.split]
kerneis has quit [*.net *.split]
chris2 has quit [*.net *.split]
johnelse has quit [*.net *.split]
freling has quit [*.net *.split]
ohama has quit [*.net *.split]
squiggnet_ has quit [*.net *.split]
Cyanure has quit [*.net *.split]
dnm_ has quit [*.net *.split]
martintrojer has quit [*.net *.split]
steshaw has quit [*.net *.split]
deavid has quit [*.net *.split]
willb1 has quit [*.net *.split]
asmanur has quit [*.net *.split]
msch has quit [*.net *.split]
jzelinskie has quit [*.net *.split]
strmpnk has quit [*.net *.split]
pyon has quit [*.net *.split]
slash^ has quit [*.net *.split]
ivan\ has quit [*.net *.split]
xaimus has quit [*.net *.split]
nickmeharry has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
xitology_ has quit [*.net *.split]
cdidd has quit [*.net *.split]
jlouis has quit [*.net *.split]
mk270 has quit [*.net *.split]
cantstanya has quit [*.net *.split]
gustav__1 has quit [*.net *.split]
Arthur_Rainbow has quit [*.net *.split]
PM has quit [*.net *.split]
milosn has quit [*.net *.split]
maurer has quit [*.net *.split]
madroach has quit [*.net *.split]
typedlambda has quit [*.net *.split]
ia0 has quit [*.net *.split]
testcocoon has quit [*.net *.split]
troydm has quit [*.net *.split]
Muzer has quit [*.net *.split]
vpm has quit [*.net *.split]
baz_ has quit [*.net *.split]
dinosaure has quit [*.net *.split]
diginux_ has quit [*.net *.split]
flux has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
pippijn has quit [*.net *.split]
SethTisue_______ has quit [*.net *.split]
wormphle1m has quit [*.net *.split]
cow-orke1 has quit [*.net *.split]
Kakadu has quit [*.net *.split]
reynir has quit [*.net *.split]
mehdid has quit [*.net *.split]
thizanne has quit [*.net *.split]
studybot has quit [*.net *.split]
iZsh has quit [*.net *.split]
_2can has quit [*.net *.split]
hto_ has quit [*.net *.split]
Valdo has quit [*.net *.split]
adrien_oww has quit [*.net *.split]
maufred has quit [*.net *.split]
samebchase has quit [*.net *.split]
contempt has quit [*.net *.split]
passiveobserver has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
xenocons has quit [*.net *.split]
tianon has quit [*.net *.split]
engil has quit [*.net *.split]
|jbrown| has quit [*.net *.split]
clog has quit [*.net *.split]
yastero has quit [*.net *.split]
yroeht has quit [*.net *.split]
mfp has quit [*.net *.split]
darkf has quit [*.net *.split]
brendan has quit [*.net *.split]
bbarker has quit [*.net *.split]
jave has quit [*.net *.split]
bartbes has quit [*.net *.split]
cross has quit [*.net *.split]
Snark has quit [*.net *.split]
fds has quit [*.net *.split]
tov_ has quit [*.net *.split]
nitbix has quit [*.net *.split]
smondet has quit [*.net *.split]
gargawel has quit [*.net *.split]
thorsten` has quit [*.net *.split]
osnr has quit [*.net *.split]
ollehar has quit [*.net *.split]
yacks has quit [*.net *.split]
lordkryss has quit [*.net *.split]
strobegen has quit [*.net *.split]
leifw has quit [*.net *.split]
axiles has quit [*.net *.split]
teiresias has quit [*.net *.split]
_tca has quit [*.net *.split]
ousado has quit [*.net *.split]
Averell has quit [*.net *.split]
def` has quit [*.net *.split]
rwmjones_hols has quit [*.net *.split]
hbar has quit [*.net *.split]
esden has quit [*.net *.split]
smiler has quit [*.net *.split]
inr has quit [*.net *.split]
hyPiRion has quit [*.net *.split]
igitoor has quit [*.net *.split]
Mandus has quit [*.net *.split]
Khady has quit [*.net *.split]
jonludlam has quit [*.net *.split]
tizoc has quit [*.net *.split]
Nahra has quit [*.net *.split]
adrien has quit [*.net *.split]
sgray10 has quit [*.net *.split]
ski_ has quit [*.net *.split]
tlockney has quit [*.net *.split]
penglingbo has quit [*.net *.split]
Cypi has quit [*.net *.split]
demonimin has quit [*.net *.split]
tristero has quit [*.net *.split]
Tamae has quit [*.net *.split]
bernardofpc has quit [*.net *.split]
macron has quit [*.net *.split]
shalicke has quit [*.net *.split]
patronus_ has quit [*.net *.split]
rks_ has quit [*.net *.split]
The_third_man has quit [*.net *.split]
marky has quit [*.net *.split]
bacam has quit [*.net *.split]
Drup has quit [*.net *.split]
orbitz has quit [*.net *.split]
aggelos has quit [*.net *.split]
Cyanure has joined #ocaml
parcs has joined #ocaml
WraithM has joined #ocaml
bbarker has joined #ocaml
madroach has joined #ocaml
adrien has joined #ocaml
jave has joined #ocaml
martintrojer has joined #ocaml
studybot has joined #ocaml
ollehar has joined #ocaml
nicoo has joined #ocaml
tizoc has joined #ocaml
nk0_ has joined #ocaml
ski_ has joined #ocaml
zebr has joined #ocaml
Kakadu has joined #ocaml
tlockney has joined #ocaml
dnm_ has joined #ocaml
hhugo has joined #ocaml
hto_ has joined #ocaml
Simn has joined #ocaml
ia0 has joined #ocaml
lordkryss has joined #ocaml
adrien_oww has joined #ocaml
brendan has joined #ocaml
strobegen has joined #ocaml
pyon has joined #ocaml
robink has joined #ocaml
maufred has joined #ocaml
siddhart1v_away has joined #ocaml
arj has joined #ocaml
Nahra has joined #ocaml
penglingbo has joined #ocaml
yacks has joined #ocaml
typedlambda has joined #ocaml
slash^ has joined #ocaml
huza has joined #ocaml
darkf has joined #ocaml
Valdo has joined #ocaml
ivan\ has joined #ocaml
rs0 has joined #ocaml
Asmadeus has joined #ocaml
ggherdov has joined #ocaml
saarin has joined #ocaml
vbmithr has joined #ocaml
alex_nx has joined #ocaml
Ptival has joined #ocaml
emmanueloga has joined #ocaml
xaimus has joined #ocaml
zozozo has joined #ocaml
lopex has joined #ocaml
ccasin has joined #ocaml
johnelse has joined #ocaml
chris2 has joined #ocaml
acieroid has joined #ocaml
kerneis has joined #ocaml
teiresias has joined #ocaml
xitology_ has joined #ocaml
cross has joined #ocaml
petterw has joined #ocaml
alinab has joined #ocaml
Cypi has joined #ocaml
Armael has joined #ocaml
axiles has joined #ocaml
keen________ has joined #ocaml
BiDOrD has joined #ocaml
leifw has joined #ocaml
willb1 has joined #ocaml
passiveobserver has joined #ocaml
fraggle_ has joined #ocaml
bartbes has joined #ocaml
Snark has joined #ocaml
Tamae has joined #ocaml
_tca has joined #ocaml
SHODAN has joined #ocaml
bernardofpc has joined #ocaml
steshaw has joined #ocaml
nickmeharry has joined #ocaml
Averell has joined #ocaml
dant3 has joined #ocaml
freling has joined #ocaml
ohama has joined #ocaml
demonimin has joined #ocaml
cdidd has joined #ocaml
contempt has joined #ocaml
jpdeplaix has joined #ocaml
engil has joined #ocaml
asmanur has joined #ocaml
macron has joined #ocaml
xenocons has joined #ocaml
cantstanya has joined #ocaml
testcocoon has joined #ocaml
tristero has joined #ocaml
shalicke has joined #ocaml
bjorkintosh has joined #ocaml
samebchase has joined #ocaml
tianon has joined #ocaml
companion_cube has joined #ocaml
squiggnet_ has joined #ocaml
ousado has joined #ocaml
jlouis has joined #ocaml
def` has joined #ocaml
hbar has joined #ocaml
mk270 has joined #ocaml
cthuluh has joined #ocaml
clog has joined #ocaml
dinosaure has joined #ocaml
Arthur_Rainbow has joined #ocaml
rwmjones_hols has joined #ocaml
mehdid has joined #ocaml
penryu has joined #ocaml
olasd has joined #ocaml
esden has joined #ocaml
|jbrown| has joined #ocaml
msch has joined #ocaml
flux has joined #ocaml
gustav__1 has joined #ocaml
smiler has joined #ocaml
inr has joined #ocaml
nitbix has joined #ocaml
troydm has joined #ocaml
patronus_ has joined #ocaml
baz_ has joined #ocaml
deavid has joined #ocaml
diginux_ has joined #ocaml
Muzer has joined #ocaml
tov_ has joined #ocaml
hyPiRion has joined #ocaml
jzelinskie has joined #ocaml
marky has joined #ocaml
strmpnk has joined #ocaml
so has joined #ocaml
igitoor has joined #ocaml
vpm has joined #ocaml
SethTisue_______ has joined #ocaml
Mandus has joined #ocaml
rks_ has joined #ocaml
smondet has joined #ocaml
The_third_man has joined #ocaml
yastero has joined #ocaml
reynir has joined #ocaml
Khady has joined #ocaml
gargawel has joined #ocaml
fds has joined #ocaml
pippijn has joined #ocaml
yroeht has joined #ocaml
thizanne has joined #ocaml
_2can has joined #ocaml
hnrgrgr has joined #ocaml
thorsten` has joined #ocaml
iZsh has joined #ocaml
jonludlam has joined #ocaml
PM has joined #ocaml
bacam has joined #ocaml
mfp has joined #ocaml
milosn has joined #ocaml
maurer has joined #ocaml
wormphle1m has joined #ocaml
cow-orke1 has joined #ocaml
osnr has joined #ocaml
sgray10 has joined #ocaml
orbitz has joined #ocaml
Drup has joined #ocaml
aggelos has joined #ocaml
NoNNaN has joined #ocaml
studybot has quit [Remote host closed the connection]
lopex has quit [*.net *.split]
robink has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
olasd has quit [*.net *.split]
alinab has quit [*.net *.split]
ccasin has quit [*.net *.split]
BiDOrD has quit [*.net *.split]
acieroid has quit [*.net *.split]
vbmithr has quit [*.net *.split]
companion_cube has quit [*.net *.split]
so has quit [*.net *.split]
ggherdov has quit [*.net *.split]
cthuluh has quit [*.net *.split]
Ptival has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
alex_nx has quit [*.net *.split]
rs0 has quit [*.net *.split]
Armael has quit [*.net *.split]
saarin has quit [*.net *.split]
robink has joined #ocaml
companion_cube has joined #ocaml
lopex has joined #ocaml
acieroid has joined #ocaml
so has joined #ocaml
olasd has joined #ocaml
Ptival has joined #ocaml
ggherdov has joined #ocaml
emmanueloga has joined #ocaml
cthuluh has joined #ocaml
Armael has joined #ocaml
Asmadeus has joined #ocaml
BiDOrD has joined #ocaml
vbmithr has joined #ocaml
saarin has joined #ocaml
rs0 has joined #ocaml
alinab has joined #ocaml
ccasin has joined #ocaml
alex_nx has joined #ocaml
pollux has quit [*.net *.split]
gasche has quit [*.net *.split]
dw has quit [*.net *.split]
j0sh has quit [*.net *.split]
ddosia has quit [*.net *.split]
johnf has quit [*.net *.split]
mbac has quit [*.net *.split]
seliopou has quit [*.net *.split]
IbnFirnas has quit [*.net *.split]
__marius____ has quit [*.net *.split]
n0v has quit [*.net *.split]
seliopou has joined #ocaml
pollux has joined #ocaml
j0sh has joined #ocaml
mbac has joined #ocaml
ddosia has joined #ocaml
johnf has joined #ocaml
dw has joined #ocaml
gasche has joined #ocaml
<whitequark> granted, lack of unicode support today is a good reason to avoid a language
<adrien> but ocaml supports unicode and I think that was the misunderstanding
<whitequark> rather poorly
<adrien> you never input unicode values directly in your source cod
<adrien> e
<flux> yes, and that's what unicode support means :)
<adrien> which is by far the main use for support of unicode in strng litterals
<flux> how do you take a aubstring of a unicode string?
<whitequark> I don't mean unicode literals
<whitequark> what flux says
<flux> or parse it? or split it by a symbol?
<flux> currently the unicode support in ocaml proper is garbage in, garbege out
<whitequark> just doing *anything* with unicode text is a problem
<mrvn> UTF8.sub str start length
<adrien> well, you want the 20MB of data that comes with unicode support?
<mrvn> only 20? that's efficient
<whitequark> mrvn: oh, hm, camomile. I take what I said back
<flux> I wouldn't actually mind IF the error for database not found would be something else than a cryptic 'Not_found exception'
<whitequark> it should just compile database to ml
<mrvn> well, it wasn't found. :)
<flux> mrvn, it should also tell what the 'it' is :)
<mrvn> Not_found of string?
<flux> how great would it be to have many libraries that would say 'Not_found' when the program starts
<flux> and when you have one file missing, well, good luck finding what it is :)
IbnFirnas has joined #ocaml
n0v has joined #ocaml
__marius____ has joined #ocaml
<flux> especially if you are not the developer of said program.
<flux> (or developer at all)
<mrvn> flux: it should be caught, definetly
<flux> I imagine it's a top-level expression, but it should indeed wrap it at the very least with an assertion, "cannot find /blah/blah/blah"
<flux> in fact I wouldn't mind if the actual error was postboned to the latest point where it is required in a lazy fashion, I mean, you don't need it for all operations.. though I understand some would mind, therefore we now have some less-able unicode libraries ;)
Nahra has quit [Remote host closed the connection]
<flux> does python come with 20-megabyte data blob for dealing with unicode?
Nahra has joined #ocaml
pminten has joined #ocaml
<whitequark> yes
<flux> if ocaml came with one that could optionally be compiled inside the binary, I think few would complain. that's just the price to pay then. and we can always point to python then ;)
<mrvn> does anything in ocaml care if you use utf8 in string?
<whitequark> no
<whitequark> flux: it would be pretty great to have *one* unicode database rather than N scattered all over
<whitequark> one in camomile, one in sedlex, one in ...
<mrvn> whitequark: make a common one
<whitequark> I only have so much time.
<def`> is there a reason why there are N scattered other than different people doing their own? (they might be specialised or incomplete)
eizo has joined #ocaml
<whitequark> there's not really a "standard" one with an usable interface
<def`> that's what I was afraid of :P
<companion_cube> remind me, a database is only useful if you need normalization/capitlization, or this kind of things, right?
<whitequark> yes
<whitequark> regexps, too
<mrvn> sorting?
<whitequark> sorting.
<companion_cube> oh, sorting
<companion_cube> is there a total order on the whole utf8 database?!
<companion_cube> other than the number representing each char?
<mrvn> companion_cube: no. why should alpha and a be ordered?
<companion_cube> well then, how do you perform sorting? :/
<mrvn> by partial order?
<def`> also some characters have multiple encodings, you might need some preprocessing to canonicalize the input.
<def`> by a total order compatible with your partial order?
* companion_cube doesn't know anything about sorting w.r.t. a partial order
<companion_cube> except maybe topological sorting, but what's the point, honestly?
<mrvn> what order should greek alpha and a be in?
maattdd has joined #ocaml
<companion_cube> mrvn: what use is sorting text?
<mrvn> companion_cube: e.g. filenames
<companion_cube> just sort w.r.t. the bytes
<mrvn> that I guess would be the fallback
<companion_cube> it sounds much more reasonable anyway
<flux> rather two comparison operators
<mrvn> companion_cube: locales define a sorting of chracters that might go contrary to the byte values.
<flux> no bhavior deending on existence of a file
<companion_cube> but how does the locale define a sorting if characters are not comparable
<companion_cube> ?
<mrvn> e.g. ß (german sz char) sorts next to s
<companion_cube> unicode started with nice ideas, but is totally insane now
<mrvn> companion_cube: I don't know enough unicode to say how it defines the order between different groups, e.g. greek and arabic letters. But you want a sane sorting at least within one group.
maattdd has quit [Ping timeout: 252 seconds]
<companion_cube> yes, the ordering of integers
<companion_cube> if each group was correctly designed it should work
Nahra has quit [Remote host closed the connection]
<companion_cube> (as it does for ascii)
<mrvn> companion_cube: "o "a "u "s aren't well sorted by the byte values
kakadu_ has joined #ocaml
Nahra has joined #ocaml
Nahra has quit [Remote host closed the connection]
alpounet has joined #ocaml
ygrek has joined #ocaml
Nahra has joined #ocaml
<companion_cube> mrvn: really? I thought the ascii number of a was lower than o's
<mrvn> companion_cube: but "a isn't lower than b
<companion_cube> looks ok to me
<mrvn> should be a "a b c d
<companion_cube> I mean, making " bigger than b isn't especially bad, is it?
<mrvn> "a, a with dots on top
<companion_cube> ah, ä
<companion_cube> well, should ä be bigger than a, or lower, anyway?
<mrvn> lower than b anyway
<companion_cube> what about æ ?
<mrvn> probably somewhere in the middle of the ascii range too
<companion_cube> between a and e?
<companion_cube> this looks to me as an insolvable problem
<mrvn> locales are a mess
<companion_cube> better use an arbitrary, but simple order
WraithM has quit [Ping timeout: 260 seconds]
<companion_cube> (and efficient, too)
<def`> this locale ordering is really relevant for printed information, not for internal processing (like storing in a map)
maattdd has joined #ocaml
<companion_cube> but when do you need an ordering for printed information?
<mrvn> companion_cube: when you print a phone book
<def`> … sorted information are easier to look at. (I assume you don't write a lot of UIs :))
<mrvn> whenever you display lists
<companion_cube> it's the 21th century :D
<companion_cube> yes, ok
<reynir> æ is usually after a..z
<reynir> and before ø
<companion_cube> \o/
<companion_cube> careful when ordering ♀ and ♂
<mrvn> ? and ? :)
<companion_cube> awww
<reynir> companion_cube: I guess you'd order them in the order of the planets, no?
maattdd has quit [Ping timeout: 240 seconds]
<reynir> so I guess ♀ would come before ♂ ;)
<mrvn> companion_cube: a partial order is much nicer there. You could just leave male/female unsorted
<companion_cube> and then you can't sort your phone book
* whitequark sighs
<companion_cube> oh god.
<mrvn> That's why you need 20MB data for unicode
<whitequark> why can't ocaml just bind to ICU?..
<companion_cube> do they have a sound mathematical model of all those things?
<mrvn> whitequark: can't makes no sense. just write some bindings.
<whitequark> mrvn: "just write it yourself" is a very very poor response to "ocaml has shitty unicode support"
<whitequark> (because it can be extended to justify literally anything. "PHP is a very bad language" "just write an ML-like DSL over PHP")
<mrvn> whitequark: i didn't say that
<whitequark> you said literally that earlier and you said essentially the same thing just now.
<mrvn> no.
<companion_cube> so, it's a good thing that ocaml deals with unicode using libs
<whitequark> companion_cube: no.
<companion_cube> because I wouldn't want all this madness in programs that don't process strings
poindontcare has joined #ocaml
<whitequark> it means there are five ways to do the same thing and neither of those is good.
<mrvn> whitequark: have you come up with a better way?
<whitequark> take a look around APIs, I don't recall a single public API that deals with Unicode strings
<whitequark> mrvn: what python does
<mrvn> maybe it's the best anyone knows how to do
<companion_cube> whitequark: you mean in libs that aren't purely unicode?
<whitequark> they have unicode strings and bytearrays and unicodedata in stdlib
ollehar has quit [Ping timeout: 245 seconds]
<mrvn> whitequark: python2 has ascii strings and you need a modifier to make utf8. python3 has the reverse
<whitequark> mrvn: not talking about python2 and python3 doesn't have ascii strings, it has byte arrays
<companion_cube> so maybe the right thing would be for OCaml to provide bytes (yay!) and proper unicode strings
<mrvn> whitequark: ocaml has strings and byte arrays now too :)
<whitequark> companion_cube: I am not aware of a counterargument to "all strings in our language are [in some form of Unicode], if you want something else, transcode"
<companion_cube> but to delegate some ugly things to libraries
<companion_cube> e.g. for comparing those strings
<whitequark> well, it could as well have a *single*, "officially endorsed" library
<whitequark> that everything would use
<whitequark> it's equivalent to having it in stdlib, given opam
<companion_cube> same problem as for the stdlib
<mrvn> whitequark: ocaml doesn't care about encodings at all. everything is a byte array. Use a lib to handle encodings
<whitequark> mrvn: exactly, and that is what's shitty
<mrvn> whitequark: same as in python
<whitequark> mrvn: no
<whitequark> python says "all strings are unicode"
<companion_cube> < whitequark> well, it could as well have a *single*, "officially endorsed" library ← just insert "standard" before "library" and cry
<mrvn> sure it is. utf8 support is in some module. not in the compiler.
<whitequark> mrvn: not the point
<mrvn> and the problem that ocaml has no large standard lib is a common problem, not just utf8.
<whitequark> python doesn't have five different libraries to deal with unicode. ocaml shouldn't either.
<mrvn> whitequark: no it shouldn't. but someone has to write a good lib and get everyone to use it before it becomes standard
<companion_cube> python doesn't have several standard libs either, fwiw
<whitequark> that's also a good thing
<companion_cube> yes
<companion_cube> but the problem of the stdlib has to be solved before (or at the same time) the problem of unicode
<companion_cube> hopefully with a stdlib that natively supports unicode, indeed
<whitequark> I see no problem in having strings in a library separate from a big stdlib
<companion_cube> also: with unicode, you can't use classic string algorithms, can you? because you may have to consider several points, compare them, etc. ?
<mrvn> And you said before the current solutions are all crap. Should we realy standardize on any of them?
<whitequark> forget about "classic string algorithms", they're irrelevant today
<companion_cube> what.
<mrvn> companion_cube: you can use any string algorithms. you just don't have strings with O(1) random access
<companion_cube> so, how do we do string search? :/
<whitequark> if something doesn't work with unicode, it's irrelevant and must die asap
<whitequark> oh
<whitequark> you first normalize it, then use, say, KMP, but with codepoints instead of bytes
<mrvn> companion_cube: you normalize all strings and then ignore the encoding and search byte arrays.
<whitequark> that would work too
<mrvn> The fact that utf8 isn't normalized is the biggest problem.
<companion_cube> mrvn: you can always normalize so that each character can fit into one codepoint?
<whitequark> companion_cube: that depends on encoding
<mrvn> companion_cube: I think you can't even do that
<whitequark> in anything except utf-16, you can
<whitequark> (because only utf-16 has surrogate pairs)
ygrek has quit [Remote host closed the connection]
<mrvn> whitequark: aren't there some char combinations that make up a single glyph that can't be combined into a single utf8 char?
<whitequark> mrvn: that's several characters, combining to form a single grapheme
<whitequark> but they're distinct characters.
<whitequark> forming graphemes out of characters is a whole next circle of hell
<mrvn> But that means you can't split the string just anywhere between codepoints. you might only get half a grapheme.
<whitequark> yes.
<mrvn> That is seriously fucked up imho.
<mrvn> bad enough you can't split bytes
<whitequark> complain to the people having fucked up writing systems
<companion_cube> a whole next circle of hell ← so we agree
<mrvn> yes
<whitequark> I don't think there could be a significantly simpler encoding system than unicode
<companion_cube> combining chars sounds really too complicated
<companion_cube> is it absolutely totally necessary?
<mrvn> utf8.split then has to first decode the utf8 so it knows the codepoint boundaries, then decode the codepoints to get the grapheme boundaries and then it knows how many bytes to take.
<whitequark> companion_cube: yes
<whitequark> some writing systems require them.
<whitequark> mrvn: not really, if you want to, say, split on spaces, you can just split on U+0020
<mrvn> whitequark: why not encode the combined char as a single codepoint? No need to layer two encodings over each other.
<whitequark> mrvn: because in principle the number of combining characters is unbounded
<companion_cube> notes to myself: stay in academia if possible
<mrvn> whitequark: What about a 'add a " over the next char' U+0020, you can't split that before the space.
<mrvn> YOu have to know that u+0020 can't have such a thing first.
<whitequark> mrvn: with the current 2-layer system, you can quickly iterate codepoints and quickly perform normalization (latter is esp important)
<whitequark> mrvn: I think combining characters come after the character they combine with
<whitequark> so you can split *before* space
<whitequark> not *on* space, though...
<mrvn> whitequark: I wouldn't have unnormalized things in the first place. And you can extend the utf8 encoding to arbitrary length
<whitequark> then you can't easily iterate over utf8 codepoints
<whitequark> since it'd require bigints
<mrvn> whitequark: 8 byte are probably enough for anything
<whitequark> no
<whitequark> three combining characters exceed that
<mrvn> whitequark: there are more than 2^56 graphemes?
<whitequark> three combining characters are used in some writing systems
<whitequark> yes. there is an exponential explosion of graphemes when you can combine them.
Nahra has quit [Remote host closed the connection]
<mrvn> whitequark: 3 chars combined. that leaves you 18 bit per char
<whitequark> and we're already beyond that, afaik
<mrvn> whitequark: or first a seclector which "page" you are in and then 3 chars from that page.
<companion_cube> oh joy
<whitequark> ugh no
<mrvn> after all you can't combine a greek alpha with a russian s.
<whitequark> that's not how combining characters work
hhugo has quit [Quit: Leaving.]
<mrvn> the 3 chars you can combine aren't arbitrary.
<whitequark> there are regular and combining characters
<mrvn> meaning you need less bits to encode them than the full range of chars.
<whitequark> thank you but no, conflating bit encoding with semantic meaning is never a good idea
<mrvn> having different bit patterns mean the same thing is worse
<whitequark> also, don't forget about fonts or input methods
<whitequark> having no way of representing combining characters separately means huge problems for them
<whitequark> and then you're back to square 1: you need normalization
<mrvn> fonts is rendering. different thing. and input methods would cache the up to 3 chars internally and then emit the normalized combined char
<companion_cube> oh I forgot: what about chars that reverse the order of reading?
<mrvn> whitequark: My reasoning is that for something as simple as string split you already need to honor bit encoding and semantic meaning of the string. So using two encodings for them just means twice the work.
<whitequark> companion_cube: that's only for the renderer
<whitequark> in memory, everything is LTR
<mrvn> companion_cube: does that matter anywhere but rendering?
<companion_cube> mrvn: well if you sort semantically you should take this into account, don't you?
<companion_cube> because that's how it's printed in the phone book
Nahra has joined #ocaml
<whitequark> not really, you still sort by logically first character
<whitequark> whether it's on left or right
<mrvn> no. right-to-left printed words are sorted right-to-left too. So in the order they appear in memory.
<companion_cube> if you mix both styles?
huza has quit [Ping timeout: 265 seconds]
<mrvn> then you get funny sortings.
<companion_cube> heh.
<mrvn> abc abd <RTL>eba<LTR> abf
<mrvn> eba being abe in memory
<companion_cube> that's how it should work? :)
<companion_cube> oh
<mrvn> That's how I (as programmer) would expect it to sort
<whitequark> companion_cube: well don't mix both styles
strobegen has quit [Quit: Leaving.]
<whitequark> mrvn: talking more about encodings
<mrvn> Similar with chineese names where the christian name comes last (iirc). You still sort them by the family name which makes them look funny when mixed with english names.
<whitequark> think you put the combining characters into the wire encoding
<companion_cube> whitequark: why not, if it's a user-provided input?
<whitequark> mrvn: now, how do you check whether your input is valid? it is very hard
<mrvn> whitequark: in utf8? yes. horrible.
<whitequark> in utf8 it is very simple, you just check whether the encoding is correct
<mrvn> but not every valid utf8 string is a valid thing to print
<whitequark> it is
<whitequark> a font rendering engine will handle any sequence of characters
<whitequark> some of them may look nonsensical, but hey, "fhjksd" also looks nonsensical
<mrvn> then you are ignoring the semantic and print "g" with dots on top.
<whitequark> companion_cube: there's really very little reason to have that input
<whitequark> mrvn: "g" with dots on top may as well be valid
<whitequark> say a math paper
<companion_cube> whitequark: say, for instance, an english dissertation about foreign languages that use reverse order?
<whitequark> unicode doesn't concern itself with *linguistic* meaning of characters
<whitequark> that would be absurd
<mrvn> whitequark: then I see no problem.
<whitequark> companion_cube: you would generally have RTL and LTR paragraphs
<whitequark> because that's what the renderers can display, anyway
<companion_cube> yes, but still you have mixed text
<whitequark> do you sort dissertations by their *full text*?
<mrvn> whitequark: on the other hand do english words make sense in LTR?
<whitequark> does that even make sense?
<whitequark> mrvn: in RTL?
<mrvn> aeh, yes
<companion_cube> whitequark: what if you have someone whose nickname is in english, but name is in arabic?
<mrvn> mmy other ltr
<whitequark> hrm
<companion_cube> her full name would be mixed then
<mrvn> companion_cube: then you write the arabic RTL and the english LTR
<companion_cube> yes
<mrvn> does utf8 have a top-to-bottom code?
<companion_cube> as soon as you allow the text to be reversed by a char, you have to deal with all the problems it allows
<companion_cube> mrvn: aww
<mrvn> and there probably should be a back-to-front code too.
<whitequark> no top-to-bottom, no.
<whitequark> companion_cube: actually, that's not a problem by sorting
<whitequark> because you always sort logically first to logically last, just as you'd read them
<mrvn> the direction to write ion I think is purely a rendering problem.
<mrvn> I wonder though if that shouldn't be a property of the grapheme
<mrvn> Does it ever make sense to print english RTL or arabic LTR?
<whitequark> no clue
<companion_cube> RTL must also be fun for substring searching
<mrvn> companion_cube: why?
<whitequark> mrvn: ahaha, I just discovered that Devanagari requires four combining characters sometimes
<whitequark> and perhaps even more potentially
<companion_cube> find ~sub:"a<RTL>cb<LTR>d" "aaabcd"
<mrvn> companion_cube: no substring found.
<whitequark> companion_cube: RTL/LTR concern *only* rendering
<companion_cube> so they should be ignored by other algorithms?
<companion_cube> find ~sub:"a<RTL>bc<LTR>d" "aaabcd" should succeed?
<mrvn> no
<mrvn> aaabcd does not contain any <RTL> char so it has no substring that matches
<companion_cube> so it's not a rendering-only issue
* companion_cube wonders whether one could have regexes like "<combine>a."
<companion_cube> to match anything that is the combination of a and something
<mrvn> companion_cube: if you search for mixed direction substrings you should only get mixed direction results imho
<mrvn> 'find ~sub:"bc" "aaa<RTL>bc<LTR>d"' or 'find ~sub:"bcd" "aaa<RTL>bc<LTR>de"' would be a more interesting question
<companion_cube> heh.
<mrvn> With the RTL/LTR being a property of the grapheme that problem would go away.
<whitequark> companion_cube: yes, you can
<whitequark> something like "a\p{Combining}"
<companion_cube> \o/
ggole has joined #ocaml
<companion_cube> insanity ensues
alpounet has quit [Remote host closed the connection]
<whitequark> insanity indeed
rand000 has joined #ocaml
ygrek has joined #ocaml
maattdd has joined #ocaml
Nahra has quit [Ping timeout: 240 seconds]
q66 has joined #ocaml
rand000_ has joined #ocaml
rand000 has quit [Read error: Connection reset by peer]
Nahra has joined #ocaml
hhugo has joined #ocaml
WraithM has joined #ocaml
WraithM has quit [Ping timeout: 265 seconds]
Nahra has quit [Ping timeout: 245 seconds]
tane has joined #ocaml
Nahra has joined #ocaml
parcs has left #ocaml ["WeeChat 0.4.3"]
squiggnet_ has quit [Ping timeout: 265 seconds]
maattdd has quit [Ping timeout: 240 seconds]
darkf has quit [Quit: Leaving]
struktured has joined #ocaml
ygrek has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
struktured has quit [Ping timeout: 240 seconds]
Hannibal_Smith has joined #ocaml
struktured has joined #ocaml
agarwal1975 has joined #ocaml
Nahra has joined #ocaml
WraithM has joined #ocaml
huza has joined #ocaml
hhugo has joined #ocaml
pminten has quit [Quit: Leaving]
struktured has quit [Ping timeout: 240 seconds]
<lordkryss> hey, do you know of any functional programming/lamda calculus irc channel?
<companion_cube> you mean like here?
<companion_cube> I don't know of a general functional programming channel, no
<lordkryss> i'll ask here then, i have some problems reducing (λx.x(xy))(λz.zx)
<lordkryss> my course notes solves it in a way, but i'd do in another way, an online solver did in a third way :S
<ggole> That could be because x is free in the second half of the term
<whitequark> x is unbound in the second lambda?
<ggole> And y too
<lordkryss> it's mainly because my teacher use (λx.x(xy)) as a lambda
<lordkryss> while i try to reduce it
<whitequark> y is unique though, but x you'd need to alpha-rename before substitution
<lordkryss> like (λx.x(xy)) --> (xy)
<lordkryss> notes says: (λz.zx)((λz.zx)y) → (λz.zx)(yx) → (yx)x
<mrvn> step one: relabel all variables so you have no duplicates
<ggole> That looks reasonable
<mrvn> aeh, the reason you have fragments is because the message is bigger than the mtu
<mrvn> ewin
<lordkryss> mmm i think my problem is that i thought that \x.x(xy) was (\x.x)(xy)
racycle has joined #ocaml
<ggole> So are you OK with the example after that realisation?
<lordkryss> me?
<ggole> Yeah
<lordkryss> mmm yes kinda, my problem is that i forgot that (\x.[^\)]*) is an expression and not an application
* lordkryss hopes to have written a legal regular expression
alpounet has joined #ocaml
<whitequark> \.[^)]*, although I'd written that as (\x\..+?)
<whitequark> \\x, even
hhugo has quit [Quit: Leaving.]
<lordkryss> heh... i only wrote in regexp one part... i should study them after this exam eheh
alpounet has quit [Ping timeout: 240 seconds]
hhugo has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
<companion_cube> would it be possible, in a future extension, to have more structural types? For instance type 'a t = Nil | Cons of 'a * (unit -> 'a t) could be defined purely by its structure, in several libraries
<companion_cube> and still allow those libraries' types to be compatible
<whitequark> type 'a t = [ `Nil | `Cons of 'a * (unit -> 'a t) ]
<companion_cube> that's what I do currently, but Drup dislikes that because of performances
squiggnet has joined #ocaml
<companion_cube> as long as the constructor order is the same, using non-` constructors should work
<whitequark> type 'a t = Nil | Cons ... = Foo.t
<companion_cube> that requires a common lib
<whitequark> I'm not sure what is your use case
seanmcl has joined #ocaml
<companion_cube> well it would be really nice to have a few iterator types, common to many unrelated libraries
<companion_cube> and without requiring all of them to depend on something common
<whitequark> why not add an iterator library
<whitequark> ?
<companion_cube> so, this is easy with iterators that are structural, less so for the type I've shown above
<companion_cube> whitequark: because it makes one more dependency that will not necessarily be useful
typedlambda has quit [Ping timeout: 252 seconds]
<whitequark> such a dependency is cheap
<companion_cube> what I mean is: libraries should be used for their code, not (if possible) only for the types they declare
<whitequark> do you have non-philosophical objections?
typedlambda has joined #ocaml
<companion_cube> :D
<whitequark> companion_cube: by the way, wanna a companion cube?
<companion_cube> I don't like to write a lib A that depend on another library B only because one or two functions use B.t
<companion_cube> you mean 3d-printed? :D
<whitequark> I mean CNC-machined out of aluminium
<whitequark> or acrylic, or frankly whatever it is you suggest, except stainless steel, that's too hard
<companion_cube> oh god. which dimensions? *_*
<whitequark> or titanium
<whitequark> I think I could manage uranium though, but it'll be really toxic
<companion_cube> and dangerous, indeed
<whitequark> (youcan buy uranium ore on amazon and reducing it is more or less trivial)
<whitequark> not really
<whitequark> it's less radioactive than the granite brick in some decorations in your town
* companion_cube often goes to holidays in a granite-rich region of France
<whitequark> yeah, take a geiger counter with you next time
<companion_cube> I prefer not to know :D
alpounet has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
Submarine has joined #ocaml
ygrek has joined #ocaml
elfring has joined #ocaml
Kakadu has quit [Quit: Page closed]
alpounet has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
strobegen has joined #ocaml
tane has quit [Quit: Verlassend]
strobegen has quit [Client Quit]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
studybot has joined #ocaml
alpounet has joined #ocaml
ygrek has quit [Remote host closed the connection]
strobegen has joined #ocaml
<Drup> whitequark: hum, my question wasn't clear ?
seanmcl has joined #ocaml
<whitequark> Drup: ummm not really
<Drup> yes, I'm talking about that
<whitequark> ok
<whitequark> what's the problem?
<Drup> why the equality test + fail in case of At_end ?
<Drup> instead of just "| At_end _ -> ()" ?
<whitequark> hmmm
<whitequark> say you have a collection [1;2;3;4;5]
<whitequark> and you do iter_range f 5 3
<Drup> except that *_range functions are not exposed
<whitequark> oh
<whitequark> I guess no real reason then
WraithM has quit [Quit: Lost terminal]
<Drup> (and only used in the non _range version)
WraithM has joined #ocaml
Nahra has quit [Remote host closed the connection]
<Drup> ok
<Drup> for patchs, are github pull requests ok or do I send the patch to the mailing list ?
<whitequark> if it concerns only the binding, you can send patches directly to me
<whitequark> because I'll be the one looking at them anyway
<Drup> ok :)
<whitequark> best: send me a GitHub commit URL
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> also https://github.com/Drup/llvm/commit/da69f7b53384f88a64f7e761191d87efbde9e443, but I was going to have multiple formating patches.
<Drup> to wait to have*
<whitequark> how do I attribute you?
WraithM has quit [Quit: Lost terminal]
<Drup> that's a very good question
<Drup> "Gabriel Radanne"
* whitequark looks at Drup's avatar and flinches. he has a phobia of jellyfish. :(
<Drup> ahah :D
<Drup> it's an octopus, not a jellyfish ;)
<whitequark> I know
Nahra has joined #ocaml
<whitequark> it kinda looks like a jellyfish
<whitequark> also, what the hell is up with this... parachute?!
* whitequark is extremely puzzled
<whitequark> r210395
<whitequark> Drup: please do aggregate all formatting patches into one.
<Drup> ok
<Drup> will wait for more formatting patches then
<Drup> (I don't have any more for now)
<Drup> the "parachute" is just a membrane between the tentacles to better catch preys :D
<whitequark> sounds kind of fragile
ollehar has joined #ocaml
WraithM has joined #ocaml
<whitequark> Drup: um. I assumed you at least compile your patches... http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/8342/steps/compile/logs/stdio
<Drup> I remember doing it, yes
<Drup> but I may have forgot to clean appropriately before.
* whitequark sighs
alpounet has quit [Remote host closed the connection]
<Drup> well, that what build bots are for, isn't it ? :)
<Drup> whitequark: actually, no, I just forgot a chunk during add -p :/
<whitequark> Drup: so uh, could you make a second commit for me?
<Drup> yep
<Drup> just re-re-building to make sure
typedlambda has quit [Ping timeout: 252 seconds]
typedlambda has joined #ocaml
divyanshu has joined #ocaml
pyon has quit [Ping timeout: 276 seconds]
Nahra has quit [Ping timeout: 252 seconds]
Submarine has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
* whitequark glares at Drup
Nahra has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<Drup> <insert xkcd about compiling>
<whitequark> I already committed that 1-line missed fix
<Drup> (I can't load firefox, so can't give you the link, sorry, llvm is eating up all my memory while building)
<Drup> fine :)
<whitequark> ... what kind of a machine do you have?
<whitequark> and how can you even live like that
<Drup> a small laptop
watermind has joined #ocaml
<Drup> why do you think I complained about building llvm ?
<whitequark> well, you're building it for more than 20 minutes apparently
<Drup> I usually take a bit more than half an hour
<Drup> (for the whole tree, obviously)
<whitequark> did you configure it with all backends?
<whitequark> --enable-targets=host is more than enough
<Drup> I didn't touch the configuration options
<whitequark> ah I see
<whitequark> I use ./configure --enable-targets=host --enable-bindings=ocaml --enable-debug --enable-assertions
<Drup> will do that, for the next time x)
<whitequark> this takes ~8 min on i7-3517u in my laptop and is useful when debugging segfaults
<whitequark> actually 8 min is x86+arm, this would be more like five
<Drup> (did I mention that it also make my laptop freeze regularly by eating up my 4Go of memory ?)
<Drup> (especially during linking)
* whitequark has 10G and 10G of swap, for exactly that reason
<adrien> don't complain
<adrien> I've been building Qt for windows from linux
<adrien> not only is it constantly broken, it's also awfully long
<adrien> I build the ocaml compiler in 5 minutes on this laptop
<adrien> Qt has taken 5 _hours_ so far and only stopped because of a failure
<whitequark> I used to use Gentoo, libreoffice took over 24 hours
<adrien> still around that long :P
<whitequark> openoffice*
<jpdeplaix> whitequark: I had the same experience with gentoo and openoffice :D
eizo has quit [Ping timeout: 240 seconds]
<adrien> :)
<whitequark> and I heard that LLVM on Raspberry Pi takes over 36
<nicoo> whitequark: Crossbuild
<whitequark> further confirming that there is hardly anything that raspberry pi is useful for
<whitequark> nicoo: why tell me? I'm not the one doing it
<def`> haha
<adrien> am I blind or is there no way to download a patch on https://codereview.qt-project.org/#change,85041 ?
<adrien> I mean
<adrien> no _sane_ way
<nicoo> whitequark: Sorry, misread :3
<adrien> yay! 17MB to download to get 1000 bytes of data
<nicoo> adrien: From Gerrit, you can ask for the URL of the changeset, and cherry-pick it into your local copy
<adrien> thought so
<adrien> so need to get way too much git data when you don't have a local copy
<adrien> that _seriously_ _sucks_
<nicoo> adrien: So yes, if you aren't using git, it blows elderberries
<adrien> it's a large and useless strain on servers (and if you wonder, I had the servers crap on me while getting the patch)
<nicoo> adrien: I've been complaining about that too
<adrien> if I don't have a git checkout you mean :)
<nicoo> clone*
<nicoo> But that's what I meant, yes
<adrien> anyway, shower time; qt won't be done building before at least 2 or 3 days
<nicoo> However, the main place where I use Gerrit is for Exherbo, and you can't actually get the repos without git-cloning them, so that's fine
<Drup> whitequark: I'm trying with your configure options
<Drup> anyway, sorry about the forgotten patch
racycle has quit [Quit: ZZZzzz…]
pyon has joined #ocaml
Nahra has quit [Remote host closed the connection]
kakadu_ has quit [Quit: Konversation terminated!]
kakadu_ has joined #ocaml
maattdd has joined #ocaml
<whitequark> not a big problem
<whitequark> it's just that buildbots are going to be emailing me for *weeks*
<Drup> whitequark: 25 minutes ! new speed record
<whitequark> hell, they sometimes email me when I did *not* introduce an error in a commit
<Drup> almost didn't make crash my computer
<Drup> (almost)
<Drup> whitequark: why would they do that ? ^^'
<whitequark> the blamelist is usually 200 person long
<Drup> oh, so the build bot mail previous authors when something goes wrong ?
Nahra has joined #ocaml
<whitequark> it builds "a range of commits" and then emails everyone in that range
<adrien> it's called QA through harassment
<Drup> adrien : yeah, that pretty much what I was thinking
watermind has quit [Quit: Konversation terminated!]
kakadu_ has quit [Quit: Konversation terminated!]
ontologiae has joined #ocaml
groovy2shoes has joined #ocaml
slash^ has joined #ocaml
<nicoo> Drup, adrien : Actually, it kinda works (for bug that are found automagically)
ontologiae has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 276 seconds]
<adrien> yeah :)
<adrien> and Qt just finished building! \o/
<adrien> 340 minutes
Nahra has quit [Remote host closed the connection]
AdmiralBumbleBee has joined #ocaml
Nahra has joined #ocaml
Cyanure has quit [Remote host closed the connection]
maattdd has quit [Ping timeout: 240 seconds]
Kakadu has joined #ocaml
rgrinberg has joined #ocaml
Submarine has joined #ocaml
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
ollehar has joined #ocaml
Lutin` has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
BitPuffin has quit [Ping timeout: 252 seconds]
BitPuffin has joined #ocaml
tlockney is now known as tlockney_away
divyanshu has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
Nahra has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
schlegel has joined #ocaml
Nahra has joined #ocaml
struktured has joined #ocaml
Lutin` has quit [Disconnected by services]
schlegel is now known as Lutin`
hhugo has quit [Ping timeout: 264 seconds]
strobegen has quit [Quit: Leaving.]
hhugo has joined #ocaml
divyanshu has joined #ocaml
tlockney_away is now known as tlockney
Submarine has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
hhugo1 has joined #ocaml
hhugo has quit [Ping timeout: 252 seconds]
brendan has quit [Ping timeout: 252 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
Nahra has quit [Ping timeout: 240 seconds]
Nahra has joined #ocaml
kclancy has joined #ocaml
<kclancy> Is there a way to define recursive types that are not discriminated union types in OCaml?
<Drup> you can use record too
<lordkryss> ocaml can use = in lists right?
<kclancy> My type t is a tuple in which one of the components is a t list. So the list could be empty for the base case.
<Drup> lordkryss: what do you mean by "in" ?
<lordkryss> list1 = list2
<kclancy> Thanks Drup, I will consider that.
<Drup> lordkryss: yes
<Drup> lordkryss: = is deep equality
<lordkryss> because i just used it, but reading my course notes they use a equal function
<lordkryss> well, not course notes, a correction of an exam
<Drup> kclancy: "type 'a t = 'a t' list and 'a t' = { x : int ; y : 'a t}"
<Drup> you need an extra type to do the recursion, but that's all
<Drup> (doesn't work with tuple, though)
ollehar has quit [Ping timeout: 240 seconds]
<Drup> lordkryss: it's usually preferable to use a specialized equality function for performance reasons, but semantically, = behaves perfectly fine on most structures
<lordkryss> Drup, so you tell me that http://pbrd.co/1pQzl7d it's useless?
<lordkryss> i doubt that function is more optimized than the built in one
<Drup> the link doesn't work for me
<lordkryss> https everywhere?
<Drup> no
<lordkryss> weird, that is usualy the reason that website doesn't work
<Simn> works for me
<Drup> but I have various add/script blocker
<Drup> yeah, that's mostly useless
<Drup> (at least, it *should* be tail rec)
<lordkryss> i don't get why they made it... it's a correction of an old exam made by a teacher it should be "ok"
<Drup> well, it's not bad to learn *why* it works
<Drup> (thanks to && shortcuting)
<Drup> (it would be horrible inefficient otherwise)
<Drup> horribly*
<lordkryss> but in that case, using `ll = lr` is the same right?
<Drup> yes
<lordkryss> ok thanks :) somehow my teachers confuse me sometimes :S
<Simn> Glad to see you're learning OCaml, does that mean you'll be fixing Haxe bugs soon? :)
<lordkryss> i hope so :)
<lordkryss> or maybe i'll be putting more bugs in it :P
<Simn> That's my job.
<lordkryss> actually i may be trying to put that haxelib list feature after i'll be done with uni exams :)
divyanshu has quit [Quit: Computer has gone to sleep.]
Nahra has quit [Remote host closed the connection]
lordkryss has quit [Ping timeout: 245 seconds]
Nahra has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
ggole has quit []
Hannibal_Smith has quit [Quit: Sto andando via]
tlockney is now known as tlockney_away
Tamae has quit [Read error: Connection reset by peer]
Tamae has joined #ocaml
Cyanure has joined #ocaml
axiles has quit [Remote host closed the connection]
hhugo1 has quit [Quit: Leaving.]
demonimin has quit [Remote host closed the connection]
ski_ has quit [Ping timeout: 240 seconds]
kclancy has quit [Quit: Leaving]
groovy2shoes has quit [Quit: It is now safe to turn off your Groovebot.]
ski has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
demonimin has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
everyonemines has joined #ocaml
Submarine has quit [Remote host closed the connection]
seanmcl has joined #ocaml
Nahra has quit [Remote host closed the connection]
Simn has quit [Read error: Connection reset by peer]
seanmcl has quit [Quit: Textual IRC Client: www.textualapp.com]
elfring has quit [Quit: Konversation terminated!]
Nahra has joined #ocaml
ollehar has joined #ocaml
kclancy has joined #ocaml
racycle has joined #ocaml
<kclancy> do I need to make a new module every time I want to use a different type as keys in a map? Or is there an automated way to do this for compound types which are made up of base types.
<Drup> make a new module
<Drup> at least with stdlib's Map
<kclancy> Okay. I guess making new modules isn't that big of a deal.
<Drup> Hashtbl doesn't have this limitation, neither does some variations on Map, like Batteries or Core's ones
ollehar has quit [Ping timeout: 240 seconds]
lordkryss has joined #ocaml
eizo has joined #ocaml
<Drup> for the competent ocamlbuilder: how do I add a dependency of the form "doc/*.svg" ?
<Drup> I didn't find a function for glob expansion (only for glob checking) or to "get all the file with the given extension in the given directory"
ollehar has joined #ocaml
alpounet has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
brendan has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
Nahra has quit [Ping timeout: 276 seconds]
<lordkryss> mmm could anyone help me understading this syntax? `fun y z x -> x [z] y;;`?
<Drup> [x] is the list containg only the x element
<Drup> you should figure the rest out
<Drup> (you can help yourself by looking at the type of this)
<lordkryss> that functions gets 3 elements, and return the same but the second element is wrapped in a list?
<lordkryss> heh, the type confused me more
<Drup> No :)
<Drup> what does the space stand for in ocaml ?
<Drup> what is "a b" ?
<lordkryss> a applied to b?
<Drup> precisely.
araujo has joined #ocaml
<lordkryss> # fun x y -> y [x];;
<lordkryss> - : 'a -> ('a list -> 'b) -> 'b = <fun>
<lordkryss> am not even able to understand this :S
<lordkryss> oh
<lordkryss> fun x y applyes y to [x]?
<Drup> yep
<lordkryss> :D
<lordkryss> it's since math that i don't get so happy to get something ahah
<Drup> (that's precisely why I don't give full solution to this kind of questions :D)
<lordkryss> ocaml/functional programming is becoming so interesting that i'm more interested in passing the exam, but in actually learning it
<whitequark> when you're only interested in passing the exam, it's an admission of failure of your education system...
Cyanure has quit [Remote host closed the connection]
<eizo> [01:05] <lordkryss> fun x y applyes y to [x]? [01:05] <Drup> yep
<eizo> what do you mean by "fun x y applies"?
<lordkryss> fun x y -> (with some old school syntax) y([x])
<lordkryss> it passes [x] as a parameter to y
darkf has joined #ocaml
<eizo> lordkryss: yes, this whole expression is the same as "λxλy. y [x]", it's a function which takes as input some x, as well as some function y, and returns y applied to [x]
maattdd has quit [Quit: WeeChat 0.4.3]
<everyonemines> and it looks like ATS is 2x as fast as ocaml. Huh.
<everyonemines> ATS is like OCaml but with automated bounds checking and stuff, right?
<everyonemines> but harder to use and without libraries from what I'm seeing
<everyonemines> I still don't see why it would be that much faster than OCaml tho
<lordkryss> `let f3 y x = x (y x);;` i'll need some time to write the type of this ahah
<whitequark> less boxing, perhaps. ATS is really a very different language
<everyonemines> val f3 : (('a -> 'b) -> 'a) -> ('a -> 'b) -> 'b
<everyonemines> huh
<lordkryss> how do i start to do that :S
<everyonemines> whitequark: What would you say the main differences are?
<lordkryss> starting saying that x is 'a isn't a good idea :S
struktured has joined #ocaml
<Drup> everyonemines: ATS compilers is very agressive and use lot's of typing information that are not available in ocaml.
<Drup> you mentioned bound checking: in ATS, bound checking is done through typing, at compile time, so no bound checking is needed at runtime
kclancy has quit [Quit: Leaving]
agarwal1975 has quit [Quit: agarwal1975]
<everyonemines> is it comparable to MLton?
<Drup> not really
<everyonemines> at least some simple automatic checking of array bounds would be nice
<everyonemines> not sure why that's so rare, actually :-/
<everyonemines> sure some cases are hard, but off-by-1 errors are still a thing
<everyonemines> at least for me :-(
<Drup> it's not really "some cases" that are very hard, it's very hard in general
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
<everyonemines> now reading research.microsoft.com/pubs/80601/pentagons.pdf
<everyonemines> obviously ATS manages it somehow; how hard is it to apply an existing approach to a new language?
<everyonemines> Drup: or is it a compilation time problem?
struktured has quit [Ping timeout: 240 seconds]
NoNNaN has quit [Remote host closed the connection]
<Drup> well, that's not only a compilation time probably, that's also a problem of verbosity of the type system
NoNNaN has joined #ocaml
<Drup> problem*
<Drup> in ATS you have to prove (in a Coq like language) that the bounds are respected, the invariants correct, etc, etc.
<everyonemines> Oh, so it's extra work for the programmer, not just automatic checking on arrays?
<everyonemines> bah
<Drup> of course it's not only automatic checking, it's undecidable.
<mrvn> Drup: but that then makes it a compile time check, right?
<Drup> mrvn: yes
<mrvn> is is mandatory or only needed to resolve undecidable cases?
<everyonemines> I'm not a big fan of Rust so far though.
<mrvn> s/is/it/
struktured has joined #ocaml
<Drup> mrvn: I think ATS is not very far on the automatic proving question
<Drup> (don't forget it's a purely prototype research language)
<mrvn> there is a nice GADT version of quicksort where the GADT prooves the array boundaries at compile time
<mrvn> (in ocaml)
<Drup> yeah, it's possible to encode that painfully in GADT's
kclancy has joined #ocaml
<kclancy> What does it mean when a module has the declarations "type t = z" and "type z = t"
<kclancy> does that mean that t is determined by type inference?
<mrvn> kclancy: it shadows an existing type (z) but still needs to use that internally too
<kclancy> oh
<kclancy> I think in my case, "type z = t" happens first
<eizo> lordkryss: `let f3 y x = x (y x);;` you can always start by saying x is 'a, then y has to be 'a -> 'b for some 'b, thus (y x) is of type 'b, and now for the exterior application, x has to be of type 'b -> -c for some 'c. but we said x is of type 'a, so 'a = 'b -> 'c, and the whole expression is of type (('b -> 'c) -> 'b) -> ('b -> 'c) -> 'c
<kclancy> I think they are just trying to reference the type t which is already in the type environment without writing "type t = t"
<lordkryss> wait i just finished some lambda reductions i need some rest before taking more
<mrvn> kclancy: isn't type t = t an error?
rand000_ has quit [Quit: leaving]
<kclancy> mrvn: I'm assuming it is
<lordkryss> btw thanks to anyone that helped me today! Drup eizo and others :)
<eizo> np
<eizo> no lambda reduction involved here, just matching the types
<kclancy> mrvn: hence, they are using the z type variable to capture the existing type t
<mrvn> # type t = int module M = struct type t = t end;;
<mrvn> Error: The type abbreviation t is cyclic
<kclancy> yeah
<mrvn> # type t = int module M = struct type z = t type t = z end;;
<mrvn> type t = int
<mrvn> module M : sig type z = t type t = z end
<lordkryss> yeah i know there is no lambda reduction, my brain just needs a rest before changing from it to that ahah
dnm_ has quit [Ping timeout: 252 seconds]
alpounet has quit [Remote host closed the connection]
<Drup> lordkryss: it will come naturally with practice anyway :p
eizo has quit [Ping timeout: 240 seconds]
<Drup> everyonemines: why this opinion on rust ?