<orbitz>
haskell has a very...robust..numeric heiarchy
yacks has quit [Ping timeout: 264 seconds]
<zRecursive>
orbitz: i currently donot understand what you mean
thomasga has joined #ocaml
yacks has joined #ocaml
<flux>
Float in haskell doesn't appear to mean an ieee754 number
<zRecursive>
weird
ontologiae_ has joined #ocaml
<ggole>
Double is ieee754 in Haskell iirc
<ggole>
(Isn't Float just a regular float32 though?)
<flux>
but something interesting happens with them, as that they get those trailing zeroes
<flux>
does Text.Printf.printf do some rounding by itself?
<ggole>
Oh
<ggole>
<zRecursive> printf "%.2f\n" 9.575 ;; => 9.57 however, in haskell it is 9.58 ?!
<ggole>
That's possibly rounding modes
<flux>
literals are fractionals by default, so that should work
<zRecursive>
awesome
<flux>
but the results after ::Float would be explained by that
<ggole>
I would be moderately surprised if OCaml and Haskell chose different fp modes by default, but it is possible
PM has quit [Read error: Operation timed out]
ineol has joined #ocaml
ollehar has joined #ocaml
introom has joined #ocaml
demonimin_ is now known as demonimin
skchrko has joined #ocaml
Neros has joined #ocaml
ollehar has quit [Ping timeout: 268 seconds]
tchell has quit [Ping timeout: 240 seconds]
PM has joined #ocaml
tchell has joined #ocaml
zRecursive has left #ocaml []
skchrko has quit [Remote host closed the connection]
ollehar has joined #ocaml
avsm has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
csakatoku has joined #ocaml
q66 has joined #ocaml
mort___ has joined #ocaml
introom has quit [Ping timeout: 256 seconds]
introom has joined #ocaml
csakatoku has quit [Remote host closed the connection]
introom has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
csakatoku has joined #ocaml
avsm has quit [Quit: Leaving.]
skchrko has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
avsm has joined #ocaml
Drup has joined #ocaml
Drup has quit [Quit: Leaving.]
Drup has joined #ocaml
Drup has quit [Client Quit]
mort___ has quit [Quit: Leaving.]
Drup has joined #ocaml
Drup has quit [Client Quit]
Drup has joined #ocaml
Drup has quit [Client Quit]
Drup has joined #ocaml
<bernardofpc>
I'm not sure that %.2f uses fp-rounding
<bernardofpc>
(rather software rounding, and Haskell has "nearest-even" rounding mode)
<bernardofpc>
oh
<bernardofpc>
9.575 is in fact 9.57499999999999928946, because that's not exact
<adrien_oww>
:-)
<bernardofpc>
damned scrollback
dsheets has joined #ocaml
<bernardofpc>
looks like Excel-level floating point conventions :/
introom has joined #ocaml
zRecursive has joined #ocaml
mort___ has joined #ocaml
introom has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
<whitequark>
ohai pippijn
thomasga has quit [Read error: No route to host]
thomasga has joined #ocaml
<mehdid>
someone knows what is the status of typerex? is it abandoned?
<pippijn>
hi whitequark
<asmanur>
mehdid: they are working on version 2.0, ...depending on what you want from typerex you might want to checkout merlin
<mehdid>
merlin?
<mehdid>
it is just that typerex's homepage is old.html which looks weired
<asmanur>
mehdid: it provides type-at-point & smart completion
<mehdid>
looks nice indeed
<mehdid>
oh and pluggable with tuareg... even nicer!
<flux>
so there's some other merlin that isn't ocaml parser generator?
<mehdid>
asmanur: i'd miss the go-to-definition feature though
rwmjones has quit [Ping timeout: 240 seconds]
<adrien_oww>
nah, you only need to make asmanur work a bit more :P
<asmanur>
actually rks`'s working on it as we speak
<def-lkb>
mehdid: (i'm one of merlin developer, but not the one working on this feature) go-to-definition is being developed, a new release is expected in around a week
<asmanur>
flux: not sure what you mean ?
<mehdid>
def-lkb: using cannot files or compatible with older versions of ocaml? but it is good to know, thanks!
<def-lkb>
using cmt /typedtree
<flux>
merlin is something related to typerex?
<flux>
I'm probably mixing up the names
<flux>
indeed, I mixed it up with menhir
<flux>
gotta check out that merlin :)
zRecursive has left #ocaml []
ulfdoz has quit [Ping timeout: 268 seconds]
cago has quit [Ping timeout: 276 seconds]
rwmjones has joined #ocaml
cago1 has joined #ocaml
yacks has quit [Read error: Operation timed out]
<ggole>
Go to definition would be nice: would it depend on using a particular build system, like typerex does?
<pippijn>
does go to definition work with annot?
<pippijn>
will cannot someday get a properly defined protocol?
<pippijn>
cmt
<pippijn>
so that tools written in other languages can read it?
ttamttam has quit [Quit: ttamttam]
avsm has quit [Quit: Leaving.]
csakatoku has quit [Remote host closed the connection]
<rks`>
ggole: no
<rks`>
you just need to leave the cmts in your build directories
<rks`>
(the ones you list in your .merlin)
<pippijn>
how does the emacs mode read cmts?
<ggole>
Hmm
<rks`>
pippijn: the emacs mode?
<ggole>
So any old build system could be made to emit them: that's good
<pippijn>
typerex, merlin, whatever
<pippijn>
I don't know
<ggole>
Typerex has that problem: if you aren't using their junk, none of their fancy features work
<ggole>
Which is understandable, but it makes typerex significantly less useful
<rks`>
pippijn: merlin use the Cmt_format module, and I believe ocp-index and ocamlspotter do the same
ygrek has quit [Ping timeout: 268 seconds]
<pippijn>
ah
<pippijn>
good
<thomasga>
ggole: not tools from typerex2 (such as ocp-index) use the cmt
<thomasga>
and you can do goto-defintion with ocp-index
<thomasga>
(with some limitations though)
<ggole>
This must have changed since I installed typerex
<ggole>
Well, good
<ggole>
(I'm using emacs tags for the moment)
<thomasga>
well this is not yet part of typerex 2
<thomasga>
but this will be in there at one point
<thomasga>
but you can use ocp-index to have completion, type information and goto-definitions using cmts
<thomasga>
(and cmis)
<ggole>
Ah, sounds useful
<rks`>
since it's advertising time : you can have the same using merlin
<ggole>
I should investigate that
<rks`>
except that merlin is aware of the current buffer
csakatoku has joined #ocaml
<rks`>
even if you haven't compiled it yet
<rks`>
(implying: there's no cmi/cmt associated to the current buffer)
<rks`>
(also, merlin offers a vim plugin)
<ggole>
You mean I actually have a choice of tools?
<ggole>
I think this means I need to move to a more obscure language.
<rks`>
looks like it :)
<def-lkb>
:D
<ggole>
ATS, here I come.
<rks`>
good choice
<def-lkb>
safe choice
<pippijn>
safe as in "will always be obscure"?
<def-lkb>
exactly :)
<thomasga>
to be fair, merlin is also very good; just not the same design philosophy as ocp-index
<mrvn>
Lets develope a language which syntax/semantics/grammar changes depending on the user name
csakatoku has quit [Remote host closed the connection]
yacks has joined #ocaml
avsm has joined #ocaml
frnode has joined #ocaml
frnode has quit [Client Quit]
patronus_ has joined #ocaml
adrien has quit [Ping timeout: 246 seconds]
patronus has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
adrien has joined #ocaml
osa1 has joined #ocaml
travisbrady has joined #ocaml
mfp has quit [Remote host closed the connection]
cago1 has quit [Ping timeout: 240 seconds]
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
cago has joined #ocaml
mfp has joined #ocaml
csakatoku has joined #ocaml
travisbrady has quit [Quit: travisbrady]
mal``` has quit [Ping timeout: 246 seconds]
mal`` has joined #ocaml
cago1 has joined #ocaml
cago has quit [Read error: Operation timed out]
tani has joined #ocaml
tane has quit [Ping timeout: 246 seconds]
ollehar has quit [Quit: ollehar]
travisbrady has joined #ocaml
cago has joined #ocaml
travisbrady has quit [Client Quit]
cago1 has quit [Ping timeout: 276 seconds]
skchrko has quit [Quit: Leaving]
travisbrady has joined #ocaml
cago has left #ocaml []
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
breakds has joined #ocaml
cago1 has joined #ocaml
cago1 has left #ocaml []
tani has quit [Quit: Verlassend]
Simn has quit [Quit: Leaving]
travisbrady has quit [Quit: travisbrady]
hkBst has quit [Quit: Konversation terminated!]
mika1 has quit [Quit: Leaving.]
ohama has quit [Ping timeout: 264 seconds]
shinnya has joined #ocaml
travisbrady has joined #ocaml
csakatoku has quit [Remote host closed the connection]
ohama has joined #ocaml
<mrvn>
POLL: I have one class (Drawable) that handles drawing to the screen and catches events. Some of a widgets methods do need that class to e.g. draw themself. Is it better to give the drawable to the constructor and bind it in every widget or to pass it to every method that needs the drawable on use?
<Drup>
does your Drawable class represent an object that can be draw or a sort of screen on which you can draw ?
<mrvn>
A screen. Something to draw on.
<mrvn>
Something able to draw
<Drup>
I would say the later, so you can decide when you draw on what you are drawing
<Drup>
(and, tbh, I think the name is bad)
<mrvn>
yeah, got a better one?
<mrvn>
Maybe GraphicsContext or I stick with the SDL name of Surface.
<Drup>
surface/buffer is imo better
<ggole>
canvas
<mrvn>
I might want canvas for widgets that you can freely draw unto.
<ggole>
Naming stuff is hard :(
<mrvn>
Or I leave it at App(lication).
<mrvn>
App is the top level class that has the SDL surface, event loop, all the widgets, the currently active (under the mouse) widget stack, the focuse (gets the keyboard) widget and so on.
<mrvn>
So war I didn't want to pass App.t to widgets as that would create a circluare depends.
<mrvn>
s/war/far/
csakatoku has joined #ocaml
<ggole>
Sounds like the GUI part of an application rather than the entire thing
<ggole>
Sigh, I'd love to be able to use ? as part of an ocaml variable name
<ggole>
If only because it would save me from making up different names for the optional and verified-present parts of a thing
<ggole>
Does anybody have a nice convention for that? maybe_foo is nice and clear for an optional value but too verbose.
<adrien>
hmmm, do you have an example of such a code?
<pippijn>
yeah, ? and !
<pippijn>
! for destructive operations
<ggole>
adrien: anywhere you match Some or None where the original option is named, really
<adrien>
why not reuse the same name?
<pippijn>
I usually reuse the name
<ggole>
Hmm :/
<ggole>
That might be confusing for longer code
<pippijn>
but what if you want to use the original option in the match case?
<pippijn>
ggole: make a function for longer code
<adrien>
:p
<mrvn>
I usualy use foo_opt for options
<ggole>
Yeah, if you make a habit of using the same name then it gets confusing when you suddenly don't do that for an essentially unrelated reason (using the original option)
<ggole>
Not terribly confusing, just a bit. But worth avoiding.
<ggole>
Hmm, _opt is better than maybe_
<pippijn>
you can always rename the original with "as"
<mrvn>
and you can give a default value for optional arguments and ignore that they are optional alltogether.
<adrien>
or, reconstruct it
<mrvn>
or bind it to another name
<adrien>
unless you're in a tight loop, it won't matter
<mrvn>
let old = foo_opt in
<ggole>
Yes, binding it to another name is what I was complaining about :)
<ggole>
Of course if the names start to become a problem that's a sign you should split things up
<ggole>
But it would be nice to have a clean and concise convention for options. Anyway, that's my unproductive bitching for the day.
<pippijn>
adrien: how is your work on the ocaml build coming along?
<adrien>
you see the state from 2 weeks ago?
<pippijn>
adrien: how do you do CI?
<adrien>
same state
<pippijn>
ok
<adrien>
CI is done by the inria servers
<pippijn>
ok
<pippijn>
that's nice
<adrien>
I'm probably going to work on it this week-end
<pippijn>
installing ocaml on every build isn't a very nice solution
<adrien>
the inria servers use travis
<pippijn>
adrien: oh?
<adrien>
but afaik it took some time to setup
<adrien>
most probably because it includes 4 windows hosts
<pippijn>
so they have their own travis setup
<adrien>
yup
<pippijn>
nice
<adrien>
yeah, and it's very good for the windows support
<pippijn>
so they are ahead of the actual travis
<pippijn>
because that doesn't have windows hosts, yet
<adrien>
now, for my patches, I need to work on ocamlbuild_no_boot =/
<adrien>
you can't make public windows hosts
<pippijn>
not even windows xp?
<pippijn>
you can download windows xp for free
<pippijn>
from the microsoft website
<adrien>
EULA
<pippijn>
hm
<pippijn>
ok
<adrien>
at best it's an eval version
<pippijn>
I didn't look into it
<pippijn>
adrien: no
<adrien>
which has its own EULA
<adrien>
let me check
<pippijn>
you can get the full windows xp for free
<adrien>
but tbh, windows xp MUST die
<adrien>
it's a crap OS
<adrien>
it's like supporting the 2.2 linux kernel
walter has quit [Quit: This computer has gone to sleep]
<pippijn>
except that like almost all of china uses it
<adrien>
it's old, it's unmaintained, it's last century
<pippijn>
it's this century
<pippijn>
2002 or so
<adrien>
technicaly speaking, 2000 isn't
<adrien>
in any case, it as built last centry
<adrien>
century
<adrien>
ah, 2001/07/24
walter has joined #ocaml
<pippijn>
microsoft should support open source projects wanting to port to windows
<pippijn>
it's only good for them
<pippijn>
if they make it hard to support windows, people are less likely to do it
<adrien>
they do "support"
<adrien>
see coapp
<adrien>
see their node.js port
<adrien>
and so on
<adrien>
one catch (among others): MSVC
<pippijn>
hmm
<pippijn>
express?
<adrien>
no, not related to the specific edition
<pippijn>
express is for free
<adrien>
I meant they help in ports but using msvc
<adrien>
express is crap
<adrien>
moreover, express' EULA is crap squared
<pippijn>
what does it say?
cdidd has quit [Remote host closed the connection]
<adrien>
don't remember the details; basically it limits you in everything
<adrien>
and btw, msvc produces slower code than gcc nowadays
<pippijn>
it has a lot of warnings :)
<adrien>
also, you'll have to link me to that "free" windows xp
cdidd has joined #ocaml
<pippijn>
I can't find it anymore
<pippijn>
apparently it's gone
<pippijn>
ok, never mind then
darkf has quit [Quit: Leaving]
csakatok_ has quit [Remote host closed the connection]
mcclurmc has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 240 seconds]
ontologiae_ has quit [Ping timeout: 264 seconds]
mort___ has quit [Ping timeout: 276 seconds]
ulfdoz has joined #ocaml
Neros has quit [Read error: Connection reset by peer]
osa1 has quit [Ping timeout: 276 seconds]
avsm has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
Drup has quit [Ping timeout: 240 seconds]
pkrnj has joined #ocaml
csakatoku has joined #ocaml
Drup has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
osa1 has joined #ocaml
Neros has joined #ocaml
yacks has quit [Quit: Leaving]
yacks has joined #ocaml
csakatoku has joined #ocaml
zendessert has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
<zendessert>
I saw this function declaration in the OCaml tutorials: val create : ?days:int -> ?months:int -> ?years:int -> unit -> date -- what's the point of the `unit` argument in that declaration?
csakatoku has quit [Ping timeout: 276 seconds]
osa1 has quit [Quit: Konversation terminated!]
<adrien>
lets you call the function with none of the other arguments which are all optional
<adrien>
# let f ?a ?b = ();;
<adrien>
Warning 16: this optional argument cannot be erased.
<adrien>
showing the 'b'
<zendessert>
Ah, thanks adrien.
rwmjones has quit [Ping timeout: 240 seconds]
vpm has quit [Read error: Operation timed out]
ggole has quit []
rwmjones has joined #ocaml
vpm has joined #ocaml
yacks has quit [Quit: Leaving]
walter has quit [Quit: This computer has gone to sleep]
yacks has joined #ocaml
csakatoku has joined #ocaml
ineol has quit [Quit: ineol]
csakatoku has quit [Ping timeout: 240 seconds]
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Client Quit]
dsheets has joined #ocaml
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Excess Flood]
tane has joined #ocaml
metasyntax has quit [Quit: Leaving]
osa1 has joined #ocaml
ohama has quit [Ping timeout: 260 seconds]
ohama has joined #ocaml
smondet has quit [Read error: Connection reset by peer]
<zendessert>
There appears to be some value `smaller` that is used in pattern matching in a default position like: smaller -> smaller. I can't find any docs on it and it has no binding in the top-level. What is it?