flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
cdidd has joined #ocaml
iZsh has quit [Quit: ZNC - http://znc.in]
iZsh has joined #ocaml
zpe has quit [Remote host closed the connection]
anderse has quit [Quit: anderse]
nikki93 has quit [Remote host closed the connection]
derek_c has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ulfdoz_ has quit [Read error: Operation timed out]
Eyyub has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
Simn has quit [Quit: Leaving]
ggherdov has quit [Ping timeout: 252 seconds]
strobegen has joined #ocaml
ggherdov has joined #ocaml
yacks has quit [Ping timeout: 272 seconds]
yacks has joined #ocaml
osa1 has quit [Ping timeout: 245 seconds]
tane has quit [Quit: Verlassend]
osa1 has joined #ocaml
mcclurmc has joined #ocaml
gabemc has quit [Quit: gabemc]
mcclurmc has quit [Ping timeout: 252 seconds]
gabemc has joined #ocaml
skchrko has quit [Quit: Leaving]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
Xenasis has quit [Remote host closed the connection]
Eyyub has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 272 seconds]
derek_c has quit [Read error: Operation timed out]
yminsky has quit [Quit: yminsky]
nikki93 has joined #ocaml
csakatoku has joined #ocaml
rs0 has quit [Quit: leaving]
yminsky has joined #ocaml
talzeus has joined #ocaml
rs0 has joined #ocaml
yminsky has quit [Client Quit]
rs0 has quit [Client Quit]
avsm has quit [Quit: Leaving.]
yminsky has joined #ocaml
rs0 has joined #ocaml
yminsky has quit [Quit: yminsky]
zpe has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Eyyub has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
yminsky has joined #ocaml
gabemc has quit [Quit: gabemc]
gabemc has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest26703
Guest26703 has quit [Remote host closed the connection]
rs0 has quit [Quit: leaving]
shinnya has joined #ocaml
yminsky has quit [Quit: yminsky]
Eyyub has quit [Ping timeout: 264 seconds]
Eyyub has joined #ocaml
boogie has joined #ocaml
rs0 has joined #ocaml
gabemc has quit [Quit: gabemc]
boogie has quit [Remote host closed the connection]
zpe has joined #ocaml
boogie has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
rs0 has quit [Remote host closed the connection]
cricri has quit [Remote host closed the connection]
yacks has quit [Remote host closed the connection]
csakatoku has quit [Remote host closed the connection]
derek_c has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
BitPuffin has quit [Ping timeout: 252 seconds]
mj__ has quit [Remote host closed the connection]
platypine has quit [Read error: Connection reset by peer]
platypine has joined #ocaml
joshi has joined #ocaml
platypine has quit [Ping timeout: 245 seconds]
gour has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest93457
gabemc has joined #ocaml
zacts has joined #ocaml
ollehar has joined #ocaml
Guest93457 has quit [Remote host closed the connection]
tesuji has joined #ocaml
csakatoku has joined #ocaml
derek_c has quit [Quit: Lost terminal]
ygrek has joined #ocaml
csakatoku has quit [Ping timeout: 248 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
Drup has quit [Quit: Leaving.]
boogie has quit [Remote host closed the connection]
gabemc has quit [Quit: gabemc]
Kakadu has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
demonimin has quit [Ping timeout: 252 seconds]
Simn has joined #ocaml
CalimeroTeknik has quit [Ping timeout: 272 seconds]
demonimin has joined #ocaml
chambart has joined #ocaml
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
demonimin has quit [Ping timeout: 272 seconds]
NoNNaN has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
aa47f8 has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
zpe has joined #ocaml
testcocoon has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
ulfdoz has joined #ocaml
zpe has joined #ocaml
tulloch has joined #ocaml
CalimeroTeknik has joined #ocaml
wolfnn has joined #ocaml
tulloch has quit [Ping timeout: 246 seconds]
tulloch has joined #ocaml
thomasga has joined #ocaml
klltkr has joined #ocaml
joshi has quit [Ping timeout: 260 seconds]
tulloch has quit [Ping timeout: 246 seconds]
Nahra has quit [Ping timeout: 245 seconds]
BitPuffin has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
thomasga has quit [Quit: Leaving.]
tulloch has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
Nahra has joined #ocaml
kyrylo has joined #ocaml
tulloch has quit [Read error: Operation timed out]
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
chambart has joined #ocaml
rand000 has joined #ocaml
tulloch has joined #ocaml
tane has joined #ocaml
kyrylo has quit [Quit: WeeChat 0.4.2]
<gasche> companion_cube: I've thought more about levenshtein and I have a nicer algorithm to handle cutoff
<gasche> not ready yet (and I won't work on anything before the middle afternoon), but I hope to have something by the evening
tulloch_ has joined #ocaml
tulloch has quit [Ping timeout: 272 seconds]
ulfdoz has quit [Ping timeout: 248 seconds]
kyrylo has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
ulfdoz has joined #ocaml
ulfdoz has quit [Client Quit]
kyrylo has quit [Ping timeout: 246 seconds]
ulfdoz has joined #ocaml
tesuji has quit [Ping timeout: 245 seconds]
chambart has joined #ocaml
<Simn> Hi, we're using Arg.parse_argv and I would like to have some "Did you mean:" message after a levenshtein check. I'm currently doing this by catching Arg.Bad and regexing its message for "unknown option `()`", but that seems a bit silly. Is there a more obvious way of achieving this?
_5kg has quit [Ping timeout: 252 seconds]
_5kg has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 265 seconds]
gustav_ has quit [Ping timeout: 264 seconds]
gustav_ has joined #ocaml
Nahra has quit [Ping timeout: 265 seconds]
tulloch_ has quit [Ping timeout: 248 seconds]
Nahra has joined #ocaml
Nahra has quit [Ping timeout: 240 seconds]
Nahra has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
Nahra has quit [Client Quit]
talzeus has joined #ocaml
t0yv0 has quit [Ping timeout: 250 seconds]
rand000 has quit [Ping timeout: 272 seconds]
rand000 has joined #ocaml
milosn_ is now known as milosn
rand000 has quit [Ping timeout: 246 seconds]
rand000 has joined #ocaml
yminsky has joined #ocaml
darkf has quit [Quit: Leaving]
shinnya has joined #ocaml
tulloch has joined #ocaml
yminsky has quit [Quit: yminsky]
yminsky has joined #ocaml
tulloch has quit [Ping timeout: 272 seconds]
yminsky has quit [Client Quit]
tulloch has joined #ocaml
tulloch has quit [Quit: leaving]
yminsky has joined #ocaml
tulloch has joined #ocaml
yminsky has quit [Client Quit]
tulloch has quit [Client Quit]
<passiveobserver> Hello. What's the best way to call winapi functions from ocaml? Is there ctypes? (like in python), or anything like that? I want to achieve this: http://stackoverflow.com/a/1028417/2420939
tulloch has joined #ocaml
<mrvn> yes
<passiveobserver> mrvn: u're talking to me?
<mrvn> yes
<passiveobserver> I found this: http://ocaml-win32.sourceforge.net/ though couldn't compile it on my machine. Is this the preferred method?
<adrien> actually
<adrien> I'd say: don't try ctypes for that first since there is ocaml-win32 around; however I don't know if it has been used a lot recently
<adrien> passiveobserver: what is your C toolchain?
<adrien> also, does ctypes work on windows? has anyone tried it?
<adrien> also, if it's the only thing you need from the windows API, just call an external program that writes the info you need on stdout; I guess it's a very uncommon operation so it doesn't have to be fast
<passiveobserver> I have latest cygwin with latest ocaml from it and latest gcc (which is 4.7.3) I believe
<adrien> (a powershell script will easily do tht)
<passiveobserver> ocaml ver 4.01.00 in cygwin
<adrien> ok, cygwin has mingw-w64 headers now and they're a lot more comprehensive than the mingw.org one (which were insufficient to build most of ocaml-win32)
<adrien> so it's doable
<gasche> Simn: I would be interested in adding that to Arg.parse* natively
<gasche> that shouldn't be hard to implement, then the question is whether upstream is interested
<rks`> I guess it would make more sense in something like cmdliner
<rks`> s/guess/think/
<passiveobserver> adrien: no, I have a .net program in f# which calls alot of APIs. Want to have runtime-independent binary (no .NET). I don't recall now why I chose ocaml over c++ but I want lower maintability.
<gasche> I can send that to cmdliner as well
<adrien> passiveobserver: you want the name of the local machine? have you tried Unix.gethostname? despite being in the module "Unix", it is available on windows too
<adrien> passiveobserver: you need other APIs?
<passiveobserver> maintainability *
osa1 has quit [Quit: Konversation terminated!]
<passiveobserver> adrien: I guess this is a stumbling block to translate my f# proggy into ocaml.
osa1 has joined #ocaml
<gasche> in any case I'm working on levenshtein again thanks to companion_cube, so sending more patches to take advantage of that is natural
<passiveobserver> I want to have them side by side: if anything happens I try the change in f# and then translate to ocaml for pure runtime-independent binary
<passiveobserver> s/try/test/ *
<passiveobserver> so now I'll just try to make winapi wrappers in c and then call c from ocaml anyway I'm talking too much.
<gasche> passiveobserver: adrien is the definite expert on low-level ocaml-on-windows matters here
<passiveobserver> gasche: eventually I've succeeded to get call ocaml from c example work.
<gasche> you should take advantage of that :]
<gasche> good to hear
<passiveobserver> gasche: it involved running flexlink (?)
<passiveobserver> nvm
<adrien> passiveobserver: as far as I understand, Unix.gethostname will do what you want
<adrien> and it's already available
avsm has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
milosn_ has joined #ocaml
tulloch has quit [Quit: leaving]
tulloch has joined #ocaml
milosn has quit [Ping timeout: 272 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
chrisdotcode has quit [Remote host closed the connection]
testcocoon has joined #ocaml
thomasga has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest167
Guest167 has quit [Remote host closed the connection]
w0rm_x has joined #ocaml
Eyyub has quit [Quit: Lost terminal]
thomasga has quit [Quit: Leaving.]
Drup has joined #ocaml
avsm has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
avsm has quit [Ping timeout: 264 seconds]
gour has quit [Disconnected by services]
gour_ has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
chambart has joined #ocaml
Nahra has joined #ocaml
zpe has joined #ocaml
thomasga has quit [Quit: Leaving.]
dsheets_ has quit [Ping timeout: 245 seconds]
boogie has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 272 seconds]
chambart has quit [Ping timeout: 252 seconds]
chambart has joined #ocaml
boogie has quit [Remote host closed the connection]
<stevespiegel> what is the easiest way to open a module from a local directory and have ocamlc find it when compiling?
<adrien> add "-I ." to the command-line
<stevespiegel> right now im using ocaml find to link with installed packges, but not sure how to link up my own modules
<adrien> depends on the availability of accessing the compiler command-line args directly
<adrien> do you use ocamlfind for your own modules?
<stevespiegel> adrien: I can if that's best practice. just developing my first ocaml module
yezariaely has joined #ocaml
<adrien> it's a good practice yes: it would let you refer to your module like you refer to others
<Drup> and it's far easier to distribute to other people
mcclurmc has joined #ocaml
paolooo has joined #ocaml
baz_ has joined #ocaml
Kakadu has quit []
Drup2 has joined #ocaml
Drup has quit [Read error: Connection reset by peer]
Drup2 is now known as Drup
paolooo has quit [Ping timeout: 250 seconds]
ulfdoz has joined #ocaml
<companion_cube> gasche: cool, but would it work with the linear space version?
<gasche> I think any algorithm can be adapted with the linear space, it only makes the code a bit harder to write
<gasche> hm
<gasche> I mean any variant of the classic dynamic algorithm
<gasche> btw., I noticed when I decided to adapt my code to get the linear variant that to handle swaps, you need three rows instead of two
<companion_cube> that should be fine, albeit a bit more complicated? :/
<gasche> I like the tab.(i mod 2).(j) style better than the explicit blit
<gasche> yes
<companion_cube> why not
gour_ is now known as gour
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
mcclurmc_ has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
yacks has joined #ocaml
passiveobserver has quit [Killed (hobana.freenode.net (Nickname regained by services))]
passiveo- has joined #ocaml
passiveobserver has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
avsm has joined #ocaml
passiveobserver is now known as Guest86873
Guest86873 has quit [Killed (card.freenode.net (Nickname regained by services))]
passiveo- is now known as passiveobserver
[BNC]passiveobse has joined #ocaml
<orbitz> companion_cube: is there a cute way to generate a bunch of strings with a constant length but random content?
nikki93 has joined #ocaml
<orbitz> string_len (int_range ~start:15 ~stop:16) seems like the only way
<Drup> orbitz: generate a fix number of char, implode
mcclurmc has quit [Remote host closed the connection]
<orbitz> Drup: sounds violent
<Drup> why ?
<Drup> oh
<Drup> yeah :D
<Drup> but for once, violence seems like an efficient way to achieve your goal ;)
<orbitz> The little line I gave above seems sufficeint at leat
<orbitz> atleast
tulloch has quit [Ping timeout: 245 seconds]
<orbitz> Drup: Are you a QCheck user?
<Drup> not at all, I had no idea you were taking about QCheck ^^'
<orbitz> Ah
Xenasis has joined #ocaml
avsm has quit [Quit: Leaving.]
gereedy has quit [Ping timeout: 240 seconds]
robink has quit [Ping timeout: 240 seconds]
nikki93 has quit [Remote host closed the connection]
esden has quit [Ping timeout: 240 seconds]
gereedy has joined #ocaml
esden has joined #ocaml
robink has joined #ocaml
<companion_cube> orbitz: string_len (return 5)
<companion_cube> ?
<orbitz> ahh of course
<orbitz> duh
<orbitz> companion_cube: hae you built any integration with ounit in or running your tests from REPL usually?
<companion_cube> I usually run ounit, then qcheck
<orbitz> i mean, what doyou use to run qcheck stuff from the CLI in a makefiel
<orbitz> k
<companion_cube> I compile a test file
<orbitz> companion_cube: and this will bail out on the file properly in the case of errors and all that?
mildfate has joined #ocaml
<companion_cube> I'm not familiar with this expression. Does it mean it should fail as soon as a test fails?
<orbitz> as in teh executable returns none 0 to the comamnd line
<orbitz> so my makefile knows it died
<companion_cube> oh, I see
<orbitz> hrm looks like it doesn't
<companion_cube> hmm, it doesn't, I didn't think of that
<companion_cube> the function returns a boolean, so you can exit (if test_ok then 0 else 1) or something
<orbitz> not sure qcheck does either actually
<orbitz> err ounit i mean
<companion_cube> I was going to ask :)
avsm has joined #ocaml
AltGr has joined #ocaml
psquid has joined #ocaml
AltGr has left #ocaml []
<orbitz> sweet, first bug found
<companion_cube> :)
<companion_cube> what are you testing?
<orbitz> companion_cube: I have a datatype that represents 128bit keys and i'm testing various functions of them, like getting the common prefix between two keys
<companion_cube> ah, I see
milosn_ is now known as milosn
<companion_cube> like, prefix (prefix a b) a == prefix (prefix a b) b?
Xenasis has quit [Remote host closed the connection]
Xenasis has joined #ocaml
<orbitz> what i'm doing right now is I have an key representing that is just a hex string, and i calculate teh prefix of the two hex strings, then I turn those into actual keys and calculate their representation and compare
chambart has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
peterbb has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
<orbitz> Sweet, bug 2 found!
<Anarchos> orbitz what was it ?
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
<orbitz> actually in this case it's not a bug, it's taht the API doesn't guarantee which value gets returend in the case of being equidistant
gabemc has joined #ocaml
<companion_cube> orbitz: pretty cool, eh? :)
<orbitz> companion_cube: yep
<orbitz> companion_cube: we had a workshop on property based testing at work. so trying it out on personal projects too
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
tulloch has joined #ocaml
<companion_cube> orbitz: oh. did they talk about property based testing in ocaml specifically?
mcclurmc has quit [Ping timeout: 245 seconds]
<orbitz> companion_cube: no, Erlang
<companion_cube> wow, you work with erlang
wwilly has joined #ocaml
gabemc has quit [Remote host closed the connection]
<orbitz> companion_cube: i do indeed
<ollehar> hm, a friend of mine is doing his phd in erlang
<ollehar> in uppsala, sweden
<companion_cube> on distributed systems, I presume
<ollehar> parallel datastructures
chambart has joined #ocaml
<ollehar> lock-free something something
<orbitz> parallel or distributed dt's?
<orbitz> I assume he's under Kostis?
<ollehar> kostis the greek?
<orbitz> yes
<orbitz> Kostis is all over the place
<ollehar> yeah, that's him
<ollehar> unless there's a lot of greek professors in the area
<orbitz> hah i dont' think so
nikki93 has joined #ocaml
stevespiegel has left #ocaml []
baz_ has quit [Remote host closed the connection]
<smiler> Woot, more Uppsala people here?
<orbitz> i'm not in uppsala
<orbitz> companion_cube: whee, my first attempt https://github.com/orbitz/ocaml-pastry/blob/master/tests/key_props.ml
chambart has quit [Ping timeout: 252 seconds]
osa1_ has joined #ocaml
<companion_cube> pastry ← is it the DHT algorithm?
osa1 has quit [Read error: Connection reset by peer]
<companion_cube> orbitz: yeah, it looks good
<orbitz> yep
<orbitz> working on an ocaml implementatio
<companion_cube> nice!!
<orbitz> long term project, i go through phases of interset in it
<orbitz> lately i've been commiting a fair amount
<companion_cube> I tried to write an implementation of chord, but I'm not familiar with networking
<orbitz> it's not so bad as long as you realize it can stop working at any time for any reason
<orbitz> i've moved most of the I/O issues pretty far away though. one just needs to provide an I/O module with some operations on it and it is responsible for dealing with the rest
kyrylo has joined #ocaml
<companion_cube> orbitz: what kind of RPC/serialization format do you use for messages?
<orbitz> none yet, but the I/O level will be compeltley plugible at compile-time
Xenasis has quit [Remote host closed the connection]
<companion_cube> oh. I'm quite fond of B-encode ;)
<Drup> in before shameless self-promotion of Bencode by companion_cube :D
<Drup> aah, too late !
<companion_cube> Drup: too late
<companion_cube> :DDD
<companion_cube> yeah, I see
<companion_cube> although it relies mandatorily on core ^^
<orbitz> gotta choose seomthign
<companion_cube> sure
<orbitz> I think Lwt and Async will be implemented in terms of each other soon enough anyways
mildfate has quit [Quit: Leaving.]
<ollehar> smiler: you're from uppsala? or someone else?
yezariaely has quit [Quit: Leaving.]
zpe has joined #ocaml
chambart has joined #ocaml
wormphlegm has joined #ocaml
bholst has quit [Remote host closed the connection]
bholst has joined #ocaml
Xenasis has joined #ocaml
wormphlegm has quit [Quit: leaving]
kyrylo has quit [Quit: WeeChat 0.4.2]
wormphlegm has joined #ocaml
wormphlegm has quit [Client Quit]
wormphlegm has joined #ocaml
yminsky has joined #ocaml
Sim_n has joined #ocaml
aa47f8_ has joined #ocaml
aa47f8 has quit [Read error: Connection reset by peer]
strmpnk has quit [Ping timeout: 252 seconds]
chambart has quit [Ping timeout: 252 seconds]
Simn has quit [Ping timeout: 252 seconds]
PM has quit [Ping timeout: 252 seconds]
peddie has quit [Ping timeout: 252 seconds]
strmpnk has joined #ocaml
PM has joined #ocaml
jyeo has quit [Ping timeout: 252 seconds]
jyeo has joined #ocaml
peddie has joined #ocaml
Sim_n is now known as Simn
tulloch has quit [Ping timeout: 240 seconds]
tulloch has joined #ocaml
yminsky has quit [Quit: yminsky]
gour has quit [Quit: WeeChat 0.4.2]
wwilly has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
yminsky has joined #ocaml
<gasche> companion_cube: http://ocaml.nopaste.dk/p66305
<gasche> I think the code is correct, but as you can guess the index manipulations were surprisingly tricky to get right
<gasche> this should be almost optimal in term of area of the search region considered (better than both our impls)
<gasche> and it the crossing of the diagonal_start and diagonal_end pointers are equivalent to your early exit scenario (which requires to scan the whole line)
<gasche> but the code is too complicated
yminsky has quit [Quit: yminsky]
<gasche> I'll benchmark it another day to make sure that there is not, in fact, a noticeable performance advantage over a simpler cutoff implementation technique (such as the one in my first impl.)
<gasche> (it should be slower in most reasonable cases because of additional bookkeeping)
hnrgrgr has joined #ocaml
darkf has joined #ocaml
<companion_cube> did you run tests?
peterbb has joined #ocaml
<companion_cube> looks complicated...
<gasche> nope, no tests
<gasche> it's just-out-of-the-oven code
<companion_cube> so, what's the idea? :)
<gasche> have a look at the debug output of the given example
<gasche> the idea is to dynamically reduce the area to consider based on where values get out of the cutoff
<gasche> (instead of statically as in my previous impl, or none at all as in yours)
<gasche> but I'm going to bed now :]
yminsky has joined #ocaml
<companion_cube> in my impl it does consider the area delimited by some diagonal
Anarchos has quit [Quit: Vision[0.9.7-H-280704]: i've been blurred!]
<yminsky> gasche: is that an implementation of levenshtein distance?
tane has quit [Quit: Verlassend]
<yminsky> I mention only because there's a very simple one (probably less efficient than yours) in RWO. https://realworldocaml.org/v1/en/html/imperative-programming-1.html#memoization-and-dynamic-programming
<companion_cube> we're discussing an implementation for batteries, and gasche also implemented one for the compiler (typo suggestions)
<mrvn> you probably want to cut off after a distance of 2 or 3 there. should make thinks simpler.
yacks has quit [Ping timeout: 272 seconds]
<companion_cube> yes, that's why gasche needs a cutoff
<companion_cube> but in general you also want to be able to compute the proper distance, evne if it's big
yacks has joined #ocaml
<mrvn> foobar := 5; <<-- Error: did you mean blafasel := 5?. Not that helpfull.
tulloch has quit [Ping timeout: 265 seconds]
tulloch has joined #ocaml
strobegen has quit [Quit: Leaving.]
<companion_cube> :D
<rks`> :D
aa47f8_ has quit [Quit: aa47f8_]
osa1_ has quit [Ping timeout: 272 seconds]
zpe_ has quit [Remote host closed the connection]
kyrylo has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
Xenasis has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 264 seconds]
rand000 has quit [Quit: leaving]
shinnya has joined #ocaml
BitPuffin has quit [Ping timeout: 246 seconds]
Xenasis has joined #ocaml
cesar_ has joined #ocaml
jgross has joined #ocaml
cesar_ is now known as Guest73899
ahill-89 has joined #ocaml
<jgross> How do I printf a Map?I can't seem to call the "fold" function (Map.Make.fold and Map.fold both can't be found, so I can't do
<jgross> let d_doc () (x : doc) : doc = x
<jgross> let d_str () = text
<jgross> let d_map d_k d_v () m : doc =
<jgross> printf "{%a}"
<jgross> d_doc (Map.Make.fold (fun k v acc -> printf "%a, %a -> %a" d_doc acc d_k k d_v v) m (text "")
zpe has joined #ocaml
rs0 has joined #ocaml
<Drup> did you instanciated a map with the make module before ?
<Drup> -d
<jgross> I want to be able to pass any map of any type to this function, that is, I want a function that's polymorphic over maps. Is this possible?
Guest73899 has quit [Remote host closed the connection]
boogie has joined #ocaml
<Drup> not easily
<jgross> I have code that does "module VarsToLattice = Map.Make(String);;" and then, e.g., "let freshState = VarsToLattice.empty". Are you saying that I have to call VarsToLattice#fold?
tobiasBora has quit [Quit: Konversation terminated!]
<Drup> .fold, not #fold
<Drup> but yes
<jgross> "Unbound record field fold"
zpe has quit [Ping timeout: 245 seconds]
<jgross> Oops, I did m.fold rather than VarsToLattice.fold.
<jgross> Thanks!
<Drup> no problem
ahill-89 has quit [Read error: Connection reset by peer]
dsheets_ has joined #ocaml
dsheets_ has quit [Remote host closed the connection]
dsheets_ has joined #ocaml
ahill-89 has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
tulloch has quit [Ping timeout: 272 seconds]
madroach has joined #ocaml
boogie has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml