00:00
joewilliams is now known as joewilliams_away
00:01
lopex has joined #ocaml
00:01
joewilliams_away is now known as joewilliams
00:04
oriba has joined #ocaml
00:04
<
oriba >
hey I tried to use mktime in Unix module
00:04
<
oriba >
I did the same stuff in C
00:04
<
oriba >
that seems to have a bug
00:05
<
oriba >
there is a one hour diff problem
00:05
<
oriba >
I say hour = 0 when feeding in, and get hour=23 (and one day too early), then
00:05
<
oriba >
i sthere a known C-bug, which OCaml compensates?
00:06
<
oriba >
workaround?
00:06
joewilliams is now known as joewilliams_away
00:06
philtor has quit [Ping timeout: 258 seconds]
00:07
avsm has quit [Quit: Leaving.]
00:08
joewilliams_away is now known as joewilliams
00:12
pdhborges has joined #ocaml
00:13
olauzon has quit [Quit: olauzon]
00:31
Modius has joined #ocaml
00:37
oriba has quit [Quit: oriba]
00:38
<
thelema_ >
drat, just missed him
00:52
pdhborges has quit [Quit: Leaving.]
01:03
ymasory has joined #ocaml
01:36
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
01:56
mfp has quit [Ping timeout: 240 seconds]
02:03
emmanuelux has quit [Remote host closed the connection]
02:09
mfp has joined #ocaml
02:17
Transformer has joined #ocaml
02:20
Transformer has quit [Excess Flood]
02:28
dnolen has quit [Quit: dnolen]
02:31
vivanov has joined #ocaml
03:02
<
vivanov >
what module to use to work with time? i only know jane streets time module
03:04
dnolen has joined #ocaml
03:30
<
mlh >
thelema_: what were you going to suggest?
03:30
<
mlh >
my wild-assed guess would be timezone issues
03:45
ankit9 has joined #ocaml
03:53
philtor has joined #ocaml
04:03
joewilliams is now known as joewilliams_away
04:08
vivanov has quit [Read error: Connection reset by peer]
04:09
vivanov has joined #ocaml
04:14
vivanov has quit [Read error: Connection reset by peer]
04:14
vivanov has joined #ocaml
04:24
lamawithonel has joined #ocaml
04:25
ulfdoz has joined #ocaml
04:25
eye-scuzzy has quit [Ping timeout: 260 seconds]
04:39
vivanov has quit [Ping timeout: 258 seconds]
04:45
vivanov has joined #ocaml
04:49
eye-scuzzy has joined #ocaml
04:55
ymasory has quit [Quit: Leaving]
05:14
vivanov has quit [Quit: Lost terminal]
05:17
vivanov has joined #ocaml
05:18
kushou has joined #ocaml
05:22
<
kushou >
the code at the bttom is a test I did, working, that proves the two regex aren't in conflict
05:23
jderque has joined #ocaml
05:24
<
kushou >
what am I doing wrong ? (ask for more details)
05:29
<
kushou >
(btw, the test at the bottom is on the string that raises Invalid_argument with the main program, and it works, I am completely lost)
05:34
<
sgnb >
kushou: the explanation of Invalid_argument is likely to be the same as group_beginning/group_end
05:36
<
kushou >
yes, but I count 3 matching parenthesis, am I wrong ?
05:36
<
sgnb >
and foo () works for me, btw
05:37
<
kushou >
yes, it works for me too, the error occurs in parse_syllable
05:37
<
kushou >
(on the same string)
05:38
ulfdoz has quit [Ping timeout: 260 seconds]
05:41
vivanov has quit [Read error: Connection reset by peer]
05:43
ankit9 has quit [Quit: Leaving]
05:50
dnolen has quit [Quit: dnolen]
06:11
vivanov has joined #ocaml
06:29
ankit9 has joined #ocaml
06:32
Yoric has joined #ocaml
06:42
thomasga has joined #ocaml
06:59
ftrvxmtrx has quit [Quit: Leaving]
07:03
Yoric has quit [Quit: Leaving.]
07:09
ikaros has joined #ocaml
07:10
ocp has joined #ocaml
07:11
ikaros has quit [Client Quit]
07:13
Tobu has joined #ocaml
07:19
Tobu has quit [Ping timeout: 260 seconds]
07:23
philtor has quit [Ping timeout: 246 seconds]
07:25
pdhborges has joined #ocaml
07:26
ankit9 has quit [Quit: Leaving]
07:26
ankit9 has joined #ocaml
07:32
jknick has joined #ocaml
07:45
edwin has joined #ocaml
07:46
Reaganomicon has quit [Read error: Connection reset by peer]
07:51
jknick has quit [Remote host closed the connection]
07:58
Yoric has joined #ocaml
07:58
larhat has joined #ocaml
08:02
Yoric has quit [Ping timeout: 260 seconds]
08:03
Yoric has joined #ocaml
08:08
Yoric has quit [Ping timeout: 244 seconds]
08:08
Yoric has joined #ocaml
08:09
snf has quit [Ping timeout: 240 seconds]
08:10
snf has joined #ocaml
08:10
snf has quit [Changing host]
08:10
snf has joined #ocaml
08:25
impy has quit [Quit: impy]
08:29
pdhborges has quit [Quit: Leaving.]
08:30
jderque has quit [Quit: leaving]
08:31
joelr has joined #ocaml
08:32
<
joelr >
how do you force a value out of the lwt monad?
08:35
<
joelr >
larhat: i think that's what i want, yes
08:36
<
joelr >
larhat: i think that function does not exist
08:36
<
joelr >
# Lwt.return;;
08:36
<
joelr >
- : 'a -> 'a Lwt.t = <fun>
08:36
<
joelr >
# Lwt.run;;
08:36
<
joelr >
Error: Unbound value Lwt.run
08:37
<
joelr >
Lwt_unix perhaps?
08:37
<
larhat >
oh, yes Lwt_unix or Lwt_main
08:38
mnabil has joined #ocaml
08:40
<
joelr >
how is type +'a t different from type 'a t?
08:41
<
flux >
it indicates that the type is covariant
08:46
ftrvxmtrx has joined #ocaml
08:50
<
joelr >
flux: what does it mean for a type to be a covariant?
08:51
<
rproust >
you can put a slighty different type instead, as long as one is a subtype of the other
08:51
<
rproust >
covariant and contravariant are dual
08:51
<
flux >
yes. it works with immutable datastructures.
08:51
<
rproust >
in one case, you can use a subtype, in the other you can use a supertype
08:52
<
rproust >
it's also usefull for phantom typing…
08:52
<
joelr >
rproust: can you express contravariance with ocaml?
08:52
<
joelr >
rproust: how is it useful with phantom typing? i thought you used [> ... ] and [< ... ] with phantom typing
08:53
<
rproust >
it's the same
08:53
<
rproust >
[> smthg ] means that you can use a super type of smthg
08:53
<
joelr >
so this expresses the same thing then
08:53
<
rproust >
[< smthg] means you can use a subtype
08:54
<
joelr >
so that's covariance then, right?
08:55
<
rproust >
# let f = function `A x -> `AA x | `B y -> `BB y ;;
08:55
<
rproust >
val f : [< `A of 'a | `B of 'b ] -> [> `AA of 'a | `BB of 'b ] = <fun>
08:56
<
rproust >
you can use a anyvalue which type is a subtype of [ `A of 'a | `B of 'b ] as argument
08:56
<
rproust >
and you can use the result in anywhere a supertype of [ `AA of 'a | `BB of 'b ] is excpected
08:57
<
rproust >
subtyping works on polymorphic variants and objects… (maybe other things I forgot)
09:37
Enjolras has left #ocaml []
09:42
jderque has joined #ocaml
09:55
pdhborges has joined #ocaml
09:59
Yoric1 has joined #ocaml
10:00
oriba has joined #ocaml
10:02
Yoric has quit [Ping timeout: 276 seconds]
10:03
pdhborges has quit [Ping timeout: 260 seconds]
10:08
pdhborges has joined #ocaml
10:22
pdhborges has left #ocaml []
10:27
lopex has joined #ocaml
10:48
ftrvxmtrx has quit [Ping timeout: 248 seconds]
10:59
<
hcarty >
vivanov: There is the Calendar module
11:00
<
hcarty >
vivanov: It has very nice time and date handling
11:00
chegibari has joined #ocaml
11:01
<
chegibari >
Is there any way to get more information about the cause of a "X and Y make inconsistent assumptions over interface Z"?
11:01
<
chegibari >
where X and Y are .cmo files
11:02
<
hcarty >
chegibari: It usually (always?) happens when something hasn't been recompiled properly
11:02
<
hcarty >
chegibari: So Z may have been updated and compiled, but X and/or Y have not been recompiled against the new Z
11:03
<
chegibari >
mmhh.. I'm just testing the build system and ALL the sources are untouched few days now and Makefile builds them just fine
11:04
<
chegibari >
maybe it's getting files from different places
11:04
<
chegibari >
hcarty, thanks
11:06
lamawithonel has quit [Remote host closed the connection]
11:07
ankit9 is now known as ankit9|away
11:09
jamii has joined #ocaml
11:18
<
zorun >
oops, sorry
11:21
_andre has joined #ocaml
11:23
ftrvxmtrx has joined #ocaml
11:27
<
vivanov >
hcarty: great -- thx -- ill try that :)
11:29
<
chegibari >
hcarty, my build system was not copying a handwritten .mli file to the working directory
11:30
<
chegibari >
hcarty, as a consequence, a default .mli file was being generated
11:30
<
chegibari >
hcarty, and that caused the mismatch
11:30
<
chegibari >
not that this is very interesting but...
11:31
<
hcarty >
chegibari: I'm glad you found the issue!
11:56
oriba has left #ocaml []
12:01
edwin has quit [Remote host closed the connection]
12:03
pdhborges has joined #ocaml
12:04
Yoric1 is now known as Yoric
12:20
hcarty has quit [Remote host closed the connection]
12:21
dnolen has joined #ocaml
12:32
hcarty has joined #ocaml
12:42
edwin has joined #ocaml
12:48
jamii has quit [Read error: Connection reset by peer]
12:54
emmanuelux has joined #ocaml
12:57
dnolen has quit [Quit: dnolen]
13:18
bohanlon has joined #ocaml
13:27
ankit9|away has quit [Quit: Leaving]
13:42
<
chegibari >
What exactly the directories specified with -I are used for by ocamlc?
13:43
thomasga has quit [Ping timeout: 240 seconds]
13:45
thomasga has joined #ocaml
13:46
<
chegibari >
f[x], right. I was using mostly "Developing applications with Objective Caml". I forgot there was a reference manual!
13:47
<
f[x] >
manual is quite easy reading
13:48
<
chegibari >
the ocamlc man page doesn't report as much information as the reference manual
14:02
avsm has joined #ocaml
14:06
joelr_ has joined #ocaml
14:06
joelr_ has quit [Client Quit]
14:09
joelr has quit [Ping timeout: 246 seconds]
14:21
ankit9 has joined #ocaml
14:32
<
chegibari >
does the "-a" flag for libraries comes from "assembly" (like CLR assemblies) or from something else?
14:32
<
thelema_ >
chegibari: archive, I think
14:33
<
thelema_ >
just as .a
14:46
emmanuelux has quit [Ping timeout: 255 seconds]
14:49
eye-scuzzy has quit [Quit: leaving]
15:01
ocp has quit [Quit: Leaving.]
15:07
ymasory has joined #ocaml
15:09
<
thelema_ >
is the ocaml planet widely read?
15:09
thelema_ is now known as thelema
15:11
notk0 has joined #ocaml
15:12
notk0 has left #ocaml []
15:17
* thelema
wonders if he broke oasis-db
15:22
larhat has quit [Quit: Leaving.]
15:26
<
chegibari >
Never heard of before
15:31
ymasory has quit [Quit: Leaving]
15:33
philtor has joined #ocaml
15:35
eye-scuzzy has joined #ocaml
15:40
<
gildor >
thelema: what was your last action ?
15:41
<
thelema >
uploading batteries 2.0beta
15:41
<
thelema >
and then confirming the upload
15:42
<
gildor >
humm, let restart and see what happens
15:45
<
gildor >
removing batteries 2.0beta solve the problem
15:47
<
thelema >
hmm, it could be the filename collision - I uploaded "batteries-2.0beta.tar.gz" twice, once the _oasis file said it was v1.3.0, the next (when it failed) the _oasis file said 2.0beta
15:50
<
thelema >
gildor: shall I try to upload batteries-2.0beta again?
15:51
<
gildor >
if you were not able to confirm your upload, it shouldn't have cause any problem
15:51
joewilliams_away is now known as joewilliams
15:51
<
thelema >
oasis-db locked up after I chose the 'confirm upload' and before anything else happened
16:01
pdhborges has left #ocaml []
16:02
enthymeme has joined #ocaml
16:03
lopex has joined #ocaml
16:04
ymasory has joined #ocaml
16:05
<
gildor >
thelema: humm, maybe a problem with links
16:05
<
gildor >
you have a couple of symlinks and maybe there is a bug in fileutils about that
16:05
<
thelema >
in what I'm uploading?
16:06
<
thelema >
I didn't realize they had changed since 1.3.0
16:06
<
gildor >
e.g doc/html/batteries/batteries_large.png -> ../../batteries_large.png
16:07
<
thelema >
actually, I'm very susprised about this, as the first "v2.0beta" I uploaded had everything that's in the current version except... some minor changes to makefile/myocamlbuild, _oasis and build/mkconf.ml
16:08
<
gildor >
doesn't seem to be the case
16:08
<
gildor >
thelema: the first tarball (who end up in 1.3.0 directory) has a 0 size
16:08
<
thelema >
really... hmm
16:09
<
gildor >
thelema: I need to investigate your tarball
16:12
boscop_ has joined #ocaml
16:12
<
gildor >
thelema: I had the same problem on my localhost
16:12
<
gildor >
thelema: the problem is linked to the tarball itself
16:13
<
thelema >
extracting that tarball fails?
16:13
<
gildor >
thelema: no it stops working when I confirm the upload
16:14
boscop has quit [Ping timeout: 246 seconds]
16:14
<
thelema >
ok. The tarball is generated by "make release" which uses "git archive" to build the tarball
16:15
<
gildor >
thelema: it seems related to viewing the page
16:15
<
gildor >
(maybe a bug linked to deps solving)
16:15
<
thelema >
one change I made was to add a Library section to batteries' _oasis
16:15
<
thelema >
so that other packages could depend on batteries
16:16
<
thelema >
just this:
16:16
<
thelema >
Library "batteries" Path: src/
16:16
<
thelema >
(with a \n\t before Path)
16:16
<
gildor >
thelema: I'll just have a quick look now, this is a top priority bug to solve, but I would like to finish my work on fileutils before
16:21
<
gildor >
thelema: no obvious error, I'll need to track it tonight
16:25
ymasory has quit [Read error: Connection reset by peer]
16:26
lamawithonel has joined #ocaml
16:29
sepp2k has joined #ocaml
16:30
Yoric has quit [Quit: Leaving.]
16:33
sepp2k has quit [Ping timeout: 255 seconds]
16:38
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
16:38
avsm has quit [Quit: Leaving.]
16:39
ftrvxmtrx has joined #ocaml
16:41
ftrvxmtrx has quit [Client Quit]
16:46
ymasory has joined #ocaml
16:49
sepp2k has joined #ocaml
17:00
tildedave has quit [Ping timeout: 240 seconds]
17:04
Tobu has joined #ocaml
17:08
mnabil has quit [Read error: Connection reset by peer]
17:09
ikaros has joined #ocaml
17:11
ymasory has quit [Quit: Leaving]
17:12
ymasory has joined #ocaml
17:13
tildedave has joined #ocaml
17:16
davez0r has joined #ocaml
17:16
davez0r is now known as tildedave_
17:18
boscop_ is now known as boscop
17:19
tildedave has quit [Ping timeout: 255 seconds]
17:20
tildedave_ is now known as tildedave
17:21
Tobu has quit [Ping timeout: 260 seconds]
17:34
Yoric has joined #ocaml
17:34
avsm has joined #ocaml
17:37
ftrvxmtrx has joined #ocaml
17:43
philtor has quit [Ping timeout: 248 seconds]
18:15
nicolas_ has joined #ocaml
18:16
<
nicolas_ >
do you know if it's possible to create "global function" ?
18:16
<
thelema >
everything in ocaml is in some module or another - it's a side effect of auto-modulizing each file
18:17
<
nicolas_ >
I've two functions which needs the other, and if i write the first one before, there's an error compile
18:17
<
nicolas_ >
and the same if i write the second one before
18:17
<
nicolas_ >
how could i fix it ?
18:17
<
thelema >
ah, let rec odd = ... even ... and even = ... odd ...
18:18
<
nicolas_ >
i look at it and i come back
18:18
<
thelema >
the key is "rec" and "and"
18:18
philtor has joined #ocaml
18:19
<
nicolas_ >
i don't find anything on google
18:19
<
nicolas_ >
let's say my two functions are A & B
18:20
<
nicolas_ >
how would it be ?
18:20
<
rwmjones >
lack of unsigned 64 bit ints driving me nuts ...
18:20
<
thelema >
let rec A = <definition of A, using B> and B = <definition of B, using A>
18:21
<
nicolas_ >
great, thanks ;)
18:21
<
nicolas_ >
i forgot it, thanks :)
18:21
<
thelema >
rwmjones: really? writing crypto?
18:22
<
thelema >
let rec sort lst = ... and insert elt lst = ...
18:25
vivanov has quit [Ping timeout: 258 seconds]
18:25
vivanov has joined #ocaml
18:25
<
nicolas_ >
it works perfectly
18:25
<
nicolas_ >
thanks :)
18:25
<
thelema >
nicolas_: n/p
18:28
mnabil has joined #ocaml
18:29
yezariaely has joined #ocaml
18:30
chegibari has quit [Ping timeout: 255 seconds]
18:32
Yoric has quit [Quit: Leaving.]
18:33
<
rwmjones >
thelema: writing stuff to delve into Linux kernels
18:33
<
rwmjones >
64 bit pointers and that
18:33
<
rwmjones >
they're all ffffffff81xxxxxx
18:33
<
thelema >
rwmjones: Int64.t?
18:33
ulfdoz has joined #ocaml
18:33
<
rwmjones >
sure, but the real problem comes with address comparison
18:34
<
rwmjones >
like, ffffffff81xxxxxx < 0 => true
18:34
<
thelema >
You just need an output function.... and comparison function that do unsigned compares
18:34
<
rwmjones >
don't worry, I've written an unsigned address compare function (in C!) now
18:35
yezariaely has left #ocaml []
18:37
vivanov has quit [Ping timeout: 260 seconds]
18:39
vivanov has joined #ocaml
18:39
<
rwmjones >
I was looking at
18:39
<
rwmjones >
I wonder which is better
18:40
<
rwmjones >
_andre: I take it that the github one is yours?
18:41
<
_andre >
i merged some of jeffrey's library features in mine, so he deprecated his
18:41
<
rwmjones >
_andre: are you aware of "noalloc"?
18:42
<
rwmjones >
if any of your functions genuinely don't allocate, then using noalloc is much faster
18:42
<
rwmjones >
C functions, I mean
18:42
<
_andre >
interesting
18:42
<
rwmjones >
however you have to be careful because a lot of things allocate, eg. throwing exceptions
18:42
<
_andre >
i'll review the code and add it if appropriate
18:46
Yoric has joined #ocaml
19:07
nicolas_ has quit [Quit: Quitte]
19:14
<
zsparks >
In smlnj, there's a function use : string -> unit that takes a file, compiles it, and adds the bindings from it (usually used from the repl)
19:14
<
zsparks >
Is there a similar thing in ocaml?
19:14
<
zsparks >
I tried typing "ocaml foo.ml", which seems to compile it and then not go to the repl...
19:16
oriba has joined #ocaml
19:16
<
zsparks >
(or, to rephrase: I have a file, I want to tinker with it in the repl. how do I do this?)
19:17
vivanov has quit [Read error: Connection reset by peer]
19:19
pdhborges has joined #ocaml
19:20
_andre has quit [Quit: Lost terminal]
19:23
_andre has joined #ocaml
19:24
ygrek has joined #ocaml
19:32
emmanuelux has joined #ocaml
19:33
olauzon has joined #ocaml
19:34
rfg has joined #ocaml
19:42
pdhborges has quit [Quit: Leaving.]
19:52
<
rwmjones >
zsparks: use "foo.ml"
19:52
<
rwmjones >
ie. "use" is the command
19:53
<
zsparks >
rwmjones: # use "mergesort.ml" ;;
19:53
<
zsparks >
Error: Unbound value use
19:53
<
rwmjones >
that's an ocaml toplevel command
19:53
<
rwmjones >
oh sorry
19:53
<
rwmjones >
#use "foo.ml"
19:53
<
rwmjones >
or it might be #load, I always forget the difference
19:54
_andre has quit [Quit: Lost terminal]
19:55
_andre has joined #ocaml
19:56
oriba_ has joined #ocaml
19:58
oriba has quit [Ping timeout: 246 seconds]
20:05
oriba_ is now known as oriba
20:06
jderque has quit [Quit: leaving]
20:07
avsm has quit [Quit: Leaving.]
20:08
_andre has left #ocaml []
20:13
ygrek has quit [Ping timeout: 246 seconds]
20:21
olauzon_ has joined #ocaml
20:21
olauzon_ has quit [Client Quit]
20:22
mnabil has quit [Ping timeout: 260 seconds]
20:23
olauzon has quit [Ping timeout: 246 seconds]
20:35
mnabil has joined #ocaml
20:43
ymasory has quit [Quit: Leaving]
20:47
ulfdoz has quit [Ping timeout: 240 seconds]
20:55
mattrepl has joined #ocaml
20:55
det has joined #ocaml
20:56
det has quit [Client Quit]
20:57
det has joined #ocaml
21:02
avsm has joined #ocaml
21:09
ikaros has quit [Quit: Ex-Chat]
21:17
Tobu has joined #ocaml
21:19
mnabil has quit [Remote host closed the connection]
21:22
edwin has quit [Remote host closed the connection]
21:23
Tianon has quit [Ping timeout: 255 seconds]
21:24
Tianon has joined #ocaml
21:24
Tianon has quit [Changing host]
21:24
Tianon has joined #ocaml
21:27
philtor has quit [Ping timeout: 264 seconds]
21:28
det has left #ocaml []
21:28
philtor has joined #ocaml
21:42
Tobu has quit [Ping timeout: 264 seconds]
21:52
willb has quit [Ping timeout: 240 seconds]
21:52
boscop_ has joined #ocaml
21:54
boscop has quit [Ping timeout: 250 seconds]
21:54
Tobu has joined #ocaml
21:56
<
hcarty >
rwmjones: #use for .ml, #load for .cmo or .cma
21:56
pdhborges has joined #ocaml
21:56
pdhborges has left #ocaml []
22:05
Tobu has quit [Ping timeout: 260 seconds]
22:13
bohanlon has quit [Quit: Off to Boston]
22:15
Yoric has quit [Quit: Leaving.]
22:16
emmanuelux has quit [Read error: Connection reset by peer]
22:17
emmanuelux has joined #ocaml
22:18
sepp2k has quit [Quit: Leaving.]
22:22
impy has joined #ocaml
22:27
philtor has quit [Ping timeout: 255 seconds]
22:27
avsm has quit [Quit: Leaving.]
22:29
mattrepl has quit [Quit: mattrepl]
22:31
dnolen has joined #ocaml
22:32
philtor has joined #ocaml
22:48
pdhborges has joined #ocaml
22:49
joewilliams is now known as joewilliams_away
23:02
rfg has quit [Quit: rfg]
23:06
thomasga has quit [Quit: Leaving.]
23:08
Amorphous has quit [Ping timeout: 276 seconds]
23:13
pdhborges has quit [Quit: Leaving.]
23:23
Amorphous has joined #ocaml
23:37
oriba has left #ocaml []
23:39
fourier has joined #ocaml
23:40
emmanuelux has quit [Remote host closed the connection]