00:08
cpst_ has joined #ocaml
00:14
cpst has quit [Read error: 110 (Connection timed out)]
00:34
leo037 has quit ["Leaving"]
02:01
G_ has joined #ocaml
02:07
G has quit [Connection timed out]
02:12
G has joined #ocaml
02:31
G_ has quit [Connection timed out]
02:49
seafoodX has joined #ocaml
02:49
G_ has joined #ocaml
03:05
seafoodX has quit [Remote closed the connection]
03:06
seafoodX has joined #ocaml
03:06
G has quit [Connection timed out]
03:23
cpst_ is now known as cpst
03:27
G has joined #ocaml
03:34
G__ has joined #ocaml
03:36
G has quit [Nick collision from services.]
03:36
G_ has quit [Nick collision from services.]
03:37
G__ is now known as G
04:04
joshcryer has joined #ocaml
04:11
Smerdyakov has quit ["Leaving"]
04:38
piggybox_ has joined #ocaml
04:54
piggybox has quit [Read error: 110 (Connection timed out)]
05:31
bluestorm has joined #ocaml
06:04
schme has quit [Remote closed the connection]
06:30
G_ has joined #ocaml
06:49
G has quit [Read error: 110 (Connection timed out)]
07:08
screwt8 has joined #ocaml
07:09
Mr_Awesome has joined #ocaml
07:10
shans has joined #ocaml
07:11
<
shans >
can anyone help me with functors and modules?
07:11
<
shans >
I have a stream sorting implementation in a functor, which accepts a module that represents elements in the input stream
07:12
<
shans >
but I want to refer to the elements in the stream by their raw types, not by the module's abstract type
07:12
<
shans >
is that possible?
07:20
<
flux >
I'm not exactly sure what you mean. the stream sorter cannot use interfaces that haven't been declared before it?
07:21
<
shans >
more concretely then, I have something like:
07:21
<
shans >
module type INPUT =
07:22
<
shans >
sig type a end;;
07:22
<
flux >
hey, someone on the channel talked about how ocamlc -i compiled also, well guess what I found from 3.07 change logs: 'The "-i" option no longer generates compiled files, it only prints the inferred types.'
07:22
<
shans >
module StreamSort : functor (I : Input) -> sig I.a Stream.t -> (I.a Stream.t) list end;;
07:23
<
shans >
so the StreamSort module is a functor that needs an INPUT typed module for instantiation
07:23
<
shans >
then, I want to create a specific instance of my StreamSort module, so I go
07:23
<
flux >
well, you probably want to declare some operations for it too, in INPUT
07:23
<
shans >
I've got some, I'm just leaving them out for brevity :)
07:24
<
shans >
module PacketInput : INPUT = struct type a = packet end;;
07:24
<
shans >
module PacketSort = StreamSort (PacketInput);;
07:24
<
flux >
how about dropping that : INPUT -part there?
07:24
<
shans >
so I just go module PacketInput = struct type a = packet end;;?
07:25
<
flux >
I think it makes the 'real type' disappear from module PacketInput
07:25
<
shans >
hey, that works, thanks heaps!
07:25
<
flux >
happy to help
07:26
<
flux >
(referring to my earlier comment: it was |lupin|, but he's not here)
07:29
piggybox__ has joined #ocaml
07:46
piggybox_ has quit [Read error: 110 (Connection timed out)]
07:46
l_a_m has joined #ocaml
08:38
G_ is now known as G
08:50
ednarofi has quit [Read error: 104 (Connection reset by peer)]
08:54
ednarofi has joined #ocaml
09:08
Mr_Awesome has quit ["time to impregnate a moth"]
09:14
Mr_Awesome has joined #ocaml
09:39
Mr_Awesome has quit ["time to impregnate a moth"]
10:38
ednarofi_ has joined #ocaml
10:39
ednarofi has quit [Read error: 104 (Connection reset by peer)]
10:58
ednarofi_ has quit [Read error: 110 (Connection timed out)]
11:05
ednarofi has joined #ocaml
11:15
ednarofi has quit [Read error: 104 (Connection reset by peer)]
11:21
tty56_ has joined #ocaml
11:29
tty56__ has joined #ocaml
11:30
authentic has joined #ocaml
11:37
ednarofi has joined #ocaml
11:37
tty56 has quit [Read error: 110 (Connection timed out)]
11:41
tty56_ has quit [Read error: 110 (Connection timed out)]
11:42
mr_Hugo has joined #ocaml
12:00
ednarofi has quit [Read error: 110 (Connection timed out)]
12:03
piggybox__ has quit [Read error: 104 (Connection reset by peer)]
12:14
ednarofi has joined #ocaml
12:26
ednarofi has quit [Read error: 104 (Connection reset by peer)]
12:30
ednarofi has joined #ocaml
12:37
authentic has quit ["Lost terminal"]
12:38
authentic has joined #ocaml
12:50
^authentic has joined #ocaml
12:52
authentic has quit ["Lost terminal"]
12:54
^authentic is now known as authentic
13:15
romanoffi has quit [Read error: 110 (Connection timed out)]
13:25
cpst has quit [Read error: 110 (Connection timed out)]
13:27
joshcryer has quit [No route to host]
13:30
<
arcatan >
I'm having a problem with OCamlSDL
13:30
<
arcatan >
Sdlmouse.get_state seems not to work, it always returns the same coordinates
13:32
<
flux >
arcatan, perhaps you need to pump events also
13:33
<
flux >
arcatan, or perhaps start the event pumping thread (there was an option for that, right?)
13:36
<
arcatan >
oh, you're right, event pumping helps. I don't know about the thread stuff, I'll investigate. thank you.
13:58
piggybox has joined #ocaml
14:07
Demitar has quit [Connection reset by peer]
14:11
slipstream has quit [Read error: 104 (Connection reset by peer)]
14:16
slipstream has joined #ocaml
14:19
seafoodX has quit []
14:20
Demitar has joined #ocaml
14:31
authentic has quit ["Lost terminal"]
14:31
authentic has joined #ocaml
14:32
screwt8 has quit [Remote closed the connection]
14:33
TFK has quit [Read error: 110 (Connection timed out)]
14:35
seafoodX has joined #ocaml
14:35
TFK has joined #ocaml
14:38
screwt8 has joined #ocaml
14:51
authentic has quit [Read error: 113 (No route to host)]
15:09
pango has quit [Remote closed the connection]
15:23
twobitsprite has joined #ocaml
15:23
<
twobitsprite >
is there a collection type which can hold objects of different types besides tuple?
15:25
<
tsuyoshi >
a record
15:25
<
twobitsprite >
I need something dynamic
15:26
<
tsuyoshi >
types determined during runtime?
15:26
<
tsuyoshi >
ocaml doesn't really do that
15:26
<
twobitsprite >
yeah...
15:26
<
tsuyoshi >
it's sort of missing the point of the language entirely
15:26
<
twobitsprite >
right
15:26
<
tsuyoshi >
but variants kind of do that
15:26
<
twobitsprite >
maybe I'm approaching this wrong, so I'll just explain what I'm trying to do
15:27
<
twobitsprite >
I'm working on a simple in-memory table library, i.e. with basic database features like select and group-by, etc...
15:27
<
twobitsprite >
the table itself is easy, it's an 'a list, where 'a is some tuple type, each record being a tuple
15:28
<
twobitsprite >
indexing is the hard part... I need to keep a list of hashtables, but each one might be a different type
15:29
<
tsuyoshi >
then you want a.. what is it called, a union type
15:29
<
tsuyoshi >
type field = String of string | Int of int | Char of char
15:29
<
tsuyoshi >
and then the database record would be
15:30
<
tsuyoshi >
type record = field array
15:30
<
bluestorm >
sum type ?
15:30
<
tsuyoshi >
type table = record list
15:30
<
tsuyoshi >
yeah sum
15:31
<
twobitsprite >
jand then an index would be: type index = (field, record) Hashtbl.t
15:31
<
twobitsprite >
cool, thanks
15:32
pango has joined #ocaml
15:33
<
twobitsprite >
I was hoping to be able to have a polymorphic table type, though... using the sum type restricts myself to those few things
15:35
seafoodX has quit []
15:38
_blackdog has joined #ocaml
15:38
_blackdog has left #ocaml []
15:39
<
bluestorm >
twobitsprite:
15:39
<
bluestorm >
how would you use the tables in that list ?
15:57
ednarofi has quit ["leaving"]
15:57
ednarofi has joined #ocaml
16:28
slipstream-- has joined #ocaml
16:34
slipstream has quit [Read error: 104 (Connection reset by peer)]
16:47
Smerdyakov has joined #ocaml
16:49
tty56 has joined #ocaml
16:54
slipstream-- has quit ["leaving"]
16:54
slipstream has joined #ocaml
16:58
hugo_ has joined #ocaml
16:59
hugo_ is now known as mr_H
17:02
tty56__ has quit [Read error: 110 (Connection timed out)]
17:15
mr_Hugo has quit [Read error: 110 (Connection timed out)]
17:19
ednarofi has quit [Read error: 110 (Connection timed out)]
17:27
ednarofi has joined #ocaml
17:59
_blackdog has joined #ocaml
18:21
cpst has joined #ocaml
18:24
_JusSx_ has joined #ocaml
18:30
_blackdog has left #ocaml []
19:10
TFKv2 has joined #ocaml
19:22
TFK has quit [Nick collision from services.]
19:22
TFKv2 is now known as TFK
19:45
malc_ has joined #ocaml
20:03
Mr_Awesome has joined #ocaml
20:04
Mr_Awesome has quit [Killed by ballard.freenode.net (Nick collision)]
20:06
Mr_Awesome_ has joined #ocaml
20:07
Mr_Awesome_ is now known as Mr_
20:07
Mr_ is now known as Mr_Awesome
20:31
TFKv2 has joined #ocaml
20:39
TFK has quit [Nick collision from services.]
20:39
TFKv2 is now known as TFK
20:45
malc_ has quit ["leaving"]
20:59
Mr_Awesome has quit ["aunt jemima is the devil!"]
21:08
Mr_Awesome has joined #ocaml
21:39
_JusSx_ has quit ["leaving"]
21:40
piggybox has quit [Read error: 110 (Connection timed out)]
21:49
ednarofi has quit [Read error: 110 (Connection timed out)]
21:50
ednarofi has joined #ocaml
21:50
Mr_Awesome has quit ["aunt jemima is the devil!"]
22:17
joshcryer has joined #ocaml
22:19
<
bluestorm >
let raise exn = let rec f x = f x in f (print_endline (Printexc.to_string exn))
22:19
<
bluestorm >
(someone just said me "you couldn't code raise using non-magic pure OCaml")
22:42
<
Smerdyakov >
And I don't think you just did.
22:42
<
Smerdyakov >
You don't allow for catching of exn.
22:43
<
bluestorm >
good point
22:44
<
bluestorm >
so, that was "exit", without the at_exit management :-°
22:46
G_ has joined #ocaml
22:58
G has quit [Connection timed out]
23:05
drewism has joined #ocaml
23:07
slipstream-- has joined #ocaml
23:20
slipstream has quit [Read error: 113 (No route to host)]
23:22
schme has joined #ocaml
23:24
Submarine has joined #ocaml
23:34
Mr_Awesome has joined #ocaml
23:40
ednarofi_ has joined #ocaml
23:44
ednarofi has quit [Read error: 110 (Connection timed out)]
23:45
drewism has quit []
23:53
bluestorm has quit [Read error: 113 (No route to host)]