tobiasBora has quit [Quit: Konversation terminated!]
void64 has quit [Ping timeout: 245 seconds]
Drup has quit [Quit: Leaving.]
void64 has joined #ocaml
csakatoku has joined #ocaml
talzeus_ has quit [Read error: Connection reset by peer]
q66 has quit [Quit: Leaving]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
talzeus has joined #ocaml
void64 has quit [Ping timeout: 256 seconds]
walter|r has joined #ocaml
turnersr has joined #ocaml
void64 has joined #ocaml
BiDOrD_ has quit [Ping timeout: 248 seconds]
BiDOrD has joined #ocaml
void64 has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 240 seconds]
void64 has joined #ocaml
whitequa1k is now known as whitequark
breakds has joined #ocaml
turnersr has quit [Quit: Leaving]
arquebus has joined #ocaml
arquebus has quit [Quit: Konversation terminated!]
void64 has quit [Ping timeout: 264 seconds]
darkf has joined #ocaml
void64 has joined #ocaml
justdit has joined #ocaml
yacks has quit [Quit: Leaving]
justdit has quit [Ping timeout: 245 seconds]
void64 has quit [Ping timeout: 246 seconds]
gnuvince- has joined #ocaml
<whitequark>
I just wrote a function with signature
<whitequark>
val merge_fold : f:(string -> 'b -> 'a -> 'a -> ('b * 'a)) -> 'b -> ('a, sorted) t -> ('a, sorted) t -> 'b * ('a, sorted) t
<whitequark>
does that make me a bad person?
justdit has joined #ocaml
gnuvince- has quit [Remote host closed the connection]
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
justdit has quit [Ping timeout: 245 seconds]
ggole has joined #ocaml
Snark has joined #ocaml
zpe has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
ulfdoz has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
Arsenik has joined #ocaml
<darkf>
whitequark: probably
justdit has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
Arsenik has quit [Remote host closed the connection]
zpe has joined #ocaml
djcoin has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
ttamttam has joined #ocaml
thomasga has joined #ocaml
<whitequark>
hmm. how do I convert non-decimal integers from string to big_int?
zpe has joined #ocaml
<ggole>
Manually :/
<whitequark>
:/
<ggole>
I don't think there are radix options for any of that stuff.
<whitequark>
yes, I've searched for them for quite a long time.
<ggole>
What do you want, hex?
<whitequark>
hex and binary
<ggole>
Mmm
<whitequark>
I think I can read, say, a stream of nativeints (or Int64's), because it would be easy to split the source into them, and then convert them with usual means and feed into Big_int.
zpe has quit [Ping timeout: 276 seconds]
mika1 has joined #ocaml
cago has joined #ocaml
<ggole>
Hmm, I'd just do it char at a time
<ggole>
Although that might be a bit slow
<ggole>
Not sure how fast shifts are on big ints
contempt has quit [Read error: Operation timed out]
contempt has joined #ocaml
contempt has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
contempt has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
<companion_cube>
hey wmeyer!
zpe has joined #ocaml
<whitequark>
ggole: I think big ints are represented as lists of words or something like that
<whitequark>
so shifts by 2^n should be very fast
<companion_cube>
most likely arrays
<whitequark>
companion_cube: it's some insane crap in C
<whitequark>
I looked at it and I have no idea how it manages to work
Simn has joined #ocaml
* whitequark
shrugs
<whitequark>
companion_cube: actually no, that was something else. I looked at it again and it's just arrays indeed.
<ggole>
x86 has some facilities for multiword shifts
<ggole>
But they might only apply to shifts by one... can't recall the details atm
<companion_cube>
whitequark: arrays allow fast copies
<ggole>
Oh yeah, rcl
ontologiae_ has joined #ocaml
<whitequark>
so, shift_left_big_int basically blits the underlying nat by several integral words, and then fixes it up by shifting each "digit" (nativeint) by the fractional word and carrying
<whitequark>
so, shifts by one wordsize will be as fast as it's possible.
wwilly has joined #ocaml
<whitequark>
(though I have no idea why did I just dig into that: lexer overhead will completely dominate any bigint conversion facility.)
<wwilly>
bonjour
justdit has quit [Ping timeout: 240 seconds]
<companion_cube>
hello
skchrko has joined #ocaml
void64 has joined #ocaml
<whitequark>
lol, actually you can use internal api Nat.sys_nat_of_string, which allows you to specify base
<whitequark>
it already has all the logic inside, it's just not exported. dumb.
<kerneis>
whitequark: there is a bug report tagged "easy" on mantis for this
<kerneis>
if you send a patch, it will probably be accepted very easily
<whitequark>
kerneis: I'll look into it
mcclurmc has joined #ocaml
mcclurmc1 has joined #ocaml
chris2 has quit [Ping timeout: 240 seconds]
mcclurmc1 has quit [Client Quit]
mcclurmc1 has joined #ocaml
ggole has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 264 seconds]
demonimin has quit [Ping timeout: 243 seconds]
mcclurmc1 is now known as mcclurmc
ggole has joined #ocaml
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
q66 has joined #ocaml
justdit has joined #ocaml
Drup has joined #ocaml
wwilly has quit [Ping timeout: 260 seconds]
csakatok_ has quit [Remote host closed the connection]
introom has joined #ocaml
justdit has quit [Ping timeout: 264 seconds]
wwilly has joined #ocaml
ollehar has joined #ocaml
introom has left #ocaml []
ontologiae has joined #ocaml
ontologiae_ has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
n06rin has joined #ocaml
Drup has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
justdit has joined #ocaml
justdit has quit [Ping timeout: 264 seconds]
wwilly has quit [Remote host closed the connection]
yacks has joined #ocaml
Drup has joined #ocaml
talzeus has quit [Remote host closed the connection]
<ggole>
That's mistyped. The function in VarGroup is supposed to have the same type as the functions in its components, but they don't have the same arity.
<ggole>
If you fix that it compiles fine?
<ggole>
I really don't see either the problem, or the relation to GADTs. Maybe I just have the dumb today.
<pippijn>
this types (but I don't know the contents of those functions)
<hcarty>
Does anyone here have a suggestion for where to stay (or not stay) in Boston for ICFP/OUD?
<ggole>
pippijn: again, badly typed. You've defined a label as a pair of int and function of arity one, and then you're trying to construct labels using functions of different arity.
asmanur has quit [Ping timeout: 276 seconds]
asmanur_ has joined #ocaml
<pippijn>
ggole: did you look at the types.ml I just pasted?
<ggole>
type 'a label = (position -> 'a)
<pippijn>
ok
<ggole>
| VarGroup of 'a label * 'a pattern
<ggole>
(fun pos (a, b) -> "concat got " ^ a ^ " and " ^ b)
<pippijn>
don't look at the variant
<ggole>
How is that the right arity?
<pippijn>
look at the functions in main.ml
<ggole>
So the types.ml isn't ground truth? Subject to change?
<pippijn>
yes
<ggole>
Hmm, ok
saml has joined #ocaml
<pippijn>
ggole: do you understand what I want?
<pippijn>
I don't see how to put it into a single type
<hcarty>
pippijn: You need to install conf-libev (or something similar) to enable libev support
<adrien_oww>
needs a use flag :P
<pippijn>
great.
<pippijn>
the sooner I can get rid of this mess the better
<adrien_oww>
pippijn: source-based package managers are very painful on windows due to the compilation times
<n06rin>
how to declarate if with only then? I mean without else.
<adrien_oww>
pippijn: also, I bet pkgsrc doesn't work well on windows
<adrien_oww>
(first: symlinks)
<ggole>
if foo () then bar ()
<pippijn>
when I have time, I'll make an opam recipe -> debian package thing
<pippijn>
unless someone else does it before me
<ggole>
Follow it with one ; if you want to follow it with more expressions.
<adrien_oww>
(second: does it "work" on windows under msys/cygwin, or actually on windows?)
<pippijn>
adrien_oww: ntfs has symlinks now
<n06rin>
ggole: without double semicolon?
<adrien_oww>
pippijn: unusable
<pippijn>
adrien_oww: and I have no idea
<pippijn>
I don't use windows
<ggole>
Double semicolon is only for toplevel expressions
<ggole>
You may or may not need a single semicolon.
<n06rin>
hmmmm
<adrien_oww>
pippijn: before creating symlinks, you need to know whether you'll point to a file or a directory; which makes symlinks to non-existant targets much much more difficult
<n06rin>
thanks, ggole
<adrien_oww>
pippijn: and you need admin rights
* ggole
nods
<pippijn>
oh
<pippijn>
I didn't know that
<pippijn>
that's bad
<adrien_oww>
pippijn: manageable with combinations of other things but you need some special handling which I doubt pkgsrc provides
<Drup>
adrien_oww: I don't envy your knowledge of windows sordid details.
<pippijn>
did lablgtk ditch gladecc?
<adrien_oww>
(yypkg does now; instead of patching libarchive/bsdtar I delete symlinks in the package at archiving-time and put rules in the post-inst script to create them)
<adrien_oww>
pippijn: hmm?
<adrien_oww>
Drup: thanks for your compassion :P
<pippijn>
ah no
<Drup>
adrien_oww: you're welcome :D
<pippijn>
what do you need for lwt+ssl?
<pippijn>
and react?
<Drup>
lwt ssl and react ? Not sure to understand the question
<adrien_oww>
react is standalone; ssl comes from I don't remember what =)
<pippijn>
it doesn't include deriving.cmxa, only deriving_num.cmxa
ttamttam has quit [Quit: ttamttam]
<pippijn>
I guess batteries includes num
<pippijn>
and then I need to open Deriving_num everywhere
pkrnj has joined #ocaml
<pippijn>
doesn't help
tane has quit [Quit: Verlassend]
<pippijn>
ok, no more deriving for me
n06rin has quit [Quit: Leaving.]
Drup has quit [Ping timeout: 264 seconds]
justdit has joined #ocaml
Arsenik has joined #ocaml
mcstar has joined #ocaml
<mcstar>
can someone offer me a copy of metaocaml? i seem to cant find any mirrors of it, and the i cant download it either from its main site
darkf has quit [Quit: Leaving]
<hcarty>
pippijn: The old Batteries list comprehension extension is available from opam as pa_comprehension IIRC
<pippijn>
oh
<pippijn>
good :)
ontologiae has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
<technomancy>
can you cross-compile native code to OS X from gnu/linux?
<whitequark>
technomancy: there is darwin-gcc.
<whitequark>
I'm afraid you are in a world of pain with it, but it exists and seems to work.
<whitequark>
it is also theoretically possible to combine clang with target=darwin and darwin-binutils for perhaps better results.
<technomancy>
eh no worries; I'll just make the macosecksists compile for themselves =P
<whitequark>
you can distribute bytecode
<whitequark>
I *think* bytecode includes all library dependencies.
<technomancy>
hm... dunno. seems like if I'm going to get them to install the runtime they might as well just go all the way and pull in the whole toolchain
<technomancy>
but I guess installing async via opam can take like fifteen minutes
<technomancy>
I can get an OS X friend to compile too, but I feel weird about signing a binary I didn't produce myself.
Kakadu has joined #ocaml
<pippijn>
I'm going to get so much trouble with GADTs :\
<ggole>
I've never successfully used one yet. (In a real program.)
contempt has quit [Ping timeout: 276 seconds]
contempt has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
justdit has joined #ocaml
contempt has quit [Ping timeout: 245 seconds]
<pippijn>
yeah, this is pain
<pippijn>
I have a pattern -> pattern list function
derek_c has quit [Quit: Lost terminal]
justdit has quit [Read error: Connection reset by peer]
contempt has joined #ocaml
Drup has joined #ocaml
<pippijn>
PatConcat is throwing shit in my face :\
<pippijn>
it's the one with ('a * 'b) at the end
<pippijn>
I need to put ('a * 'b) pattern and 'b pattern in a list together
dnm has joined #ocaml
<ggole>
Hmm, why?
arquebus has joined #ocaml
<pippijn>
the derivative of (p1, p2) is (p1', p2), if p1 is not nullable, and it is (p1', p2)+p2' if p1 *is* nullable
<pippijn>
for example
<ggole>
Hrmm
<pippijn>
the pattern "ab" derived over 'a' will be "b"
<ggole>
Sounds like an excessive amount of fun to figure out.
<pippijn>
or let's say "aab" over 'a' is "ab"
<pippijn>
and "a?ab" over 'a' is "ab|b"
<pippijn>
where | is the choice operator
<pippijn>
if I don't put them into a list together, I need to handle them separately
<pippijn>
but that doesn't work, because in the end, they must be in a list together
<pippijn>
maybe it's not possible..
arquebus has quit [Quit: Konversation terminated!]
<pippijn>
but maybe it doesn't need to be heterogenous
<pippijn>
that's such a pity
<pippijn>
I don't think it works :\
mcclurmc has quit [Quit: Leaving.]
pkrnj has quit [Quit: Computer has gone to sleep.]
Drup has quit [Ping timeout: 256 seconds]
ollehar has quit [Ping timeout: 245 seconds]
pkrnj has joined #ocaml
tobiasBora has joined #ocaml
turnersr has joined #ocaml
ggole has quit []
Drup has joined #ocaml
bkpt has quit [Quit: Leaving]
<companion_cube>
is there a straightforward way to perform DNS lookup in OCaml ?
<Anarchos>
no idea
<asmanur_>
companion_cube: there is a function in Unix, gethostbyname iirc
Kakadu has quit [Ping timeout: 245 seconds]
<companion_cube>
oh
<companion_cube>
asmanur_: thanks
chambart has quit [Ping timeout: 245 seconds]
rwmjones has quit [Ping timeout: 240 seconds]
<adrien>
CONFORMING TO POSIX.1-2001 specifies gethostbyname(), gethostbyaddr(), sethostent(), endhostent(), gethostent(), and h_errno; gethostbyname(), gethost‐ byaddr(), and h_errno are marked obsolescent in that standard. POSIX.1-2008 removes the specifications of gethostbyname(), gethost‐ byaddr(), and h_errno, recommending the use of getaddrinfo(3) and get‐ nameinfo(3) instead.
<adrien>
or, earlier in the manpage:
<adrien>
DESCRIPTION The gethostbyname*() and gethostbyaddr*() functions are obsolete. Applications should use getaddrinfo(3) and getnameinfo(3) instead.
<companion_cube>
well, anyway, there is stuff for this in Unix, that I did not see
rwmjones has joined #ocaml
chambart has joined #ocaml
Simn has quit [Quit: Leaving]
thomasga has quit [Quit: Leaving.]
dnm has quit [Ping timeout: 276 seconds]
mcstar has quit [Quit: mcstar]
turnersr has quit [Ping timeout: 240 seconds]
Anarchos is now known as haiku_ocaml_guy_
haiku_ocaml_guy_ is now known as without_opam
chambart has quit [Read error: Operation timed out]
turnersr has joined #ocaml
without_opam is now known as Anarchos
Snark has quit [Quit: leaving]
_andre has quit [Quit: leaving]
dnm has joined #ocaml
yakov_ has joined #ocaml
zpe has quit [Remote host closed the connection]
yakov_ has quit [Quit: Leaving]
Arsenik has quit [Remote host closed the connection]
rwmjones has quit [Ping timeout: 240 seconds]
Myk267 has quit [Quit: Myk267]
rwmjones has joined #ocaml
djcoin has quit [Quit: WeeChat 0.4.0]
everyonemines has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
ontologiae has joined #ocaml
mcsquiggedy has quit [Ping timeout: 268 seconds]
mcsquiggedy has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
yakov_ has joined #ocaml
void64 has quit [Ping timeout: 240 seconds]
yakov_ has quit [Client Quit]
everyonemines has quit [Quit: Leaving.]
void64 has joined #ocaml
ollehar has joined #ocaml
venk has quit [Ping timeout: 245 seconds]
watermind has joined #ocaml
pkrnj has joined #ocaml
venk has joined #ocaml
Neros has quit [Ping timeout: 246 seconds]
ollehar has quit [Quit: ollehar]
turnersr has quit [Ping timeout: 264 seconds]
gnuvince has quit [Remote host closed the connection]
pkrnj has quit [Quit: Computer has gone to sleep.]
tobiasBora has quit [Quit: Konversation terminated!]