00:02
<
tsuyoshi >
whenever it sees a capitalized name, it uncapitalizes that and searches for the name + .cmi
00:03
<
tsuyoshi >
er.. not whenever
00:03
<
tsuyoshi >
but whenever it see a capitalized name that is undefined
00:04
<
mtomczak >
Ah! Excellent.
00:04
<
mtomczak >
So the statement "GlDraw.viewport" implicitly references a module named GlDraw...
00:04
<
mtomczak >
... which means if it isn't working, it's because for some bizarre reason, my lablgl directory isn't in the searchspace.
00:04
mnemonic has quit ["leaving"]
00:05
<
mtomczak >
(Oh, I'm sorry. Specifically, GlDraw.viewport attempts to reference 'vieport' in 'glDraw.cmi')
00:12
<
mtomczak >
Ah, that moved it ahead a bit.
00:13
<
mtomczak >
For some reason, specifying in the META file that the 'directory' is "+lablgl" didn't work... that seemed to mean /opt/local/lib/ocaml/lablgl
00:13
<
mtomczak >
Specifying "+site-lib/lablgl" instead worked correctly.
00:15
bluestorm has quit ["Konversation terminated!"]
00:15
<
mtomczak >
Ah, I see. "directory" should be an override if the files aren't relative-path to the META file, it seems.
00:15
<
mtomczak >
Omitting "directory" from the META does the right thing.
00:15
ikaros has quit ["Leaving"]
00:34
<
mtomczak >
Good! Almost there. The only thing I'm stuck on now is some OS X junk... Undefined symbol, ___cxa_pure_virtual
00:34
johnnowak has joined #ocaml
00:34
<
mtomczak >
Google tells me that's crazy ZeroLink garbage. Oh MacOSX, why must you be so wacky? ;)
00:38
<
tsuyoshi >
what is zerolink
00:40
<
mtomczak >
It speeds up the development cycle by playing musical-chairs with your development object file.
00:40
<
mtomczak >
The problem is... it's the default behavior for gcc under OSX. Which means I have to find the switch to turn it OFF :-p
00:41
<
tsuyoshi >
development cycle? you mean it speeds up compilation?
00:41
<
mtomczak >
The documentation says it eliminates the linking step from compilation. I have a very poor understanding of its method.
00:42
<
mtomczak >
Looks like -ccopt "-lstdc++" gets around it.
01:00
<
tsuyoshi >
what's the best way to read an xml file in ocaml?
01:01
<
tsuyoshi >
I've used the expat library before but it's pretty tedious.. there must be a better library
01:06
johnnowak has quit []
01:10
<
tsuyoshi >
oh xml-light seems to do the job
01:22
johnnowak has joined #ocaml
01:32
johnnowak has quit []
01:33
<
tsuyoshi >
only, it won't parse the xml I need to parse
01:40
<
tsuyoshi >
gah.. doesn't work with utf-8
01:45
<
tsuyoshi >
oh maybe this cduce will work
01:53
oscarh has quit [Remote closed the connection]
02:15
johnnowak has joined #ocaml
02:16
mtomczak has quit ["BitchX-1.0c19 -- just do it."]
02:22
dark_light has quit [Remote closed the connection]
02:28
khaladan_ has quit [Success]
02:39
Oatmeat has joined #ocaml
02:40
bzzbzz has joined #ocaml
02:40
<
Oatmeat >
is there a way to specify an output directory for the ocaml compiler? I'm try to avoid having cmi and cmo files clutter up my source tree
03:05
Lovebug has joined #ocaml
03:06
Lovebug has left #ocaml []
03:21
ulfdoz has quit [Read error: 110 (Connection timed out)]
03:23
OatTop has quit [Read error: 110 (Connection timed out)]
03:52
<
gmh33 >
Oatmeat: by the looks of man ocamlopt/ocamlc, that'd be a no
03:54
Smerdyakov has quit ["Leaving"]
04:01
diffbavis has joined #ocaml
04:05
oscarh has joined #ocaml
04:24
pstickne has quit [Read error: 104 (Connection reset by peer)]
04:25
pstickne has joined #ocaml
06:29
johnnowak has quit [Read error: 145 (Connection timed out)]
06:30
johnnowak has joined #ocaml
07:07
diffbavis has quit [Read error: 54 (Connection reset by peer)]
07:39
johnnowak has left #ocaml []
07:41
chi11 has joined #ocaml
07:46
johnnowak has joined #ocaml
07:52
ulfdoz has joined #ocaml
07:58
descender has quit [Read error: 104 (Connection reset by peer)]
07:58
desc has joined #ocaml
07:58
desc is now known as descender
07:59
johnnowak has quit [Read error: 145 (Connection timed out)]
08:01
johnnowak has joined #ocaml
08:13
johnnowak has quit [Read error: 145 (Connection timed out)]
08:16
johnnowak has joined #ocaml
08:19
pstickne has quit ["Leaving"]
08:29
johnnowak has quit [Read error: 145 (Connection timed out)]
08:32
johnnowak has joined #ocaml
08:42
johnnowak has quit [Read error: 145 (Connection timed out)]
08:45
johnnowak has joined #ocaml
08:51
descender has quit [Remote closed the connection]
08:57
johnnowak has quit [Read error: 145 (Connection timed out)]
08:58
johnnowak has joined #ocaml
09:09
johnnowak has quit [Read error: 145 (Connection timed out)]
09:11
johnnowak has joined #ocaml
09:24
johnnowak has quit [Read error: 145 (Connection timed out)]
09:25
love-pingoo has joined #ocaml
09:25
johnnowak has joined #ocaml
09:37
johnnowak has quit [Read error: 145 (Connection timed out)]
09:39
johnnowak has joined #ocaml
09:49
johnnowak has quit [Read error: 145 (Connection timed out)]
09:52
johnnowak has joined #ocaml
10:06
johnnowak has quit [Read error: 145 (Connection timed out)]
10:07
joelr1 has joined #ocaml
10:07
<
joelr1 >
good morning
10:07
johnnowak has joined #ocaml
10:08
<
joelr1 >
folks, how does algokit sound for a product name?
10:20
johnnowak has quit [Read error: 145 (Connection timed out)]
10:21
johnnowak has joined #ocaml
10:30
johnnowak has quit [Read error: 145 (Connection timed out)]
10:32
johnnowak has joined #ocaml
10:32
velco has joined #ocaml
10:44
johnnowak has quit [Read error: 145 (Connection timed out)]
10:47
johnnowak has joined #ocaml
10:59
johnnowak has quit [Read error: 145 (Connection timed out)]
11:00
johnnowak has joined #ocaml
11:03
johnnowak has quit [Client Quit]
11:05
velco has quit [Read error: 110 (Connection timed out)]
11:09
joelr1 has left #ocaml []
12:01
bzzbzz has quit ["leaving"]
12:16
descender has joined #ocaml
12:28
ikaros has joined #ocaml
12:28
ikaros has quit [Read error: 104 (Connection reset by peer)]
12:28
ikaros has joined #ocaml
13:37
bluestorm has joined #ocaml
13:54
joelr1 has joined #ocaml
13:57
joelr1 has quit [Client Quit]
14:04
velco has joined #ocaml
14:33
velco has quit [Read error: 110 (Connection timed out)]
14:40
diffbavis has joined #ocaml
14:53
Smerdyakov has joined #ocaml
15:04
Bee has joined #ocaml
15:05
Bee has left #ocaml []
15:06
Oatly has joined #ocaml
15:12
Aradorn has joined #ocaml
15:16
kral has joined #ocaml
15:17
Aradorn_ has joined #ocaml
15:22
Oatmeat has quit [Read error: 110 (Connection timed out)]
15:26
Aradorn has quit [Read error: 60 (Operation timed out)]
15:40
mnemonic has joined #ocaml
15:44
johnnowak has joined #ocaml
15:51
pango has quit [Remote closed the connection]
15:52
pango has joined #ocaml
16:09
johnnowak has quit []
16:35
love-pingoo has quit ["Leaving"]
16:39
Aradorn_ has quit [Client Quit]
16:39
Aradorn has joined #ocaml
16:45
kral has quit [Remote closed the connection]
17:29
malc_ has joined #ocaml
17:30
er has joined #ocaml
17:31
<
er >
how does one read a file into an integer buffer without having to copy via Pervasives.input?
17:31
<
malc_ >
er: what's an integer buffer?
17:32
<
er >
malc_, an array of integers, or a bigarray maybe
17:32
<
savanni >
Is that related to, say, reading a binary file directly into memory? Because if so, I was about to ask about that.
17:32
<
malc_ >
er: BigarrayX.map_file
17:33
<
er >
savanni, yes, you read a binary file into memory by opening using read_in_bin and then reading using input or input_value...
17:33
<
malc_ >
if your file consists of marshaled values (and judging by reference to input_value it is) then bigarray will be of no help
17:34
<
er >
malc_, thanks.
17:34
<
er >
exactly what i needed
17:35
{MSX} has joined #ocaml
17:38
<
{MSX} >
hi, i've a question: if i have a tuple with n fields, how can i access them?
17:38
<
malc_ >
{MSX}: let (a,b,c,d) = tuple in ...
17:38
<
tsuyoshi >
you don't know the size?
17:39
<
{MSX} >
ok, now how can i get c, for example?
17:39
<
malc_ >
{MSX}: let (_,_,c,_) = tuple in ...
17:39
<
malc_ >
if you want generic selector, then there's no such thing in ocaml (unlike SML)
17:40
<
{MSX} >
ah ok, that's exacly what i was searching
17:40
<
tsuyoshi >
what's a generic selector
17:40
<
malc_ >
something like(pseudo SML): fun getc tup = #c (tup)
17:41
<
tsuyoshi >
how is that different?
17:41
<
malc_ >
erm.. make that #3 (tup)
17:41
<
tsuyoshi >
oh.. that just turns it into an array
17:42
<
tsuyoshi >
no? it's indexed access
17:42
<
{MSX} >
marc: are tuple very used? or it's better to use records ?
17:43
<
malc_ >
{MSX}: for one thing i'm not marc, for another, the question is somewhat vague and contextless
17:44
<
{MSX} >
ah ok, sorry for the name
17:45
<
{MSX} >
well i read the tutorial and it mentions tuples very briefly, so i guessed they was kind of unused
17:45
<
malc_ >
they are not
17:58
Aradorn_ has joined #ocaml
17:58
Aradorn has quit [Read error: 104 (Connection reset by peer)]
18:00
SegFault7 has joined #ocaml
18:01
SegFault7 has quit [Client Quit]
18:03
Aradorn has joined #ocaml
18:03
Aradorn_ has quit [Read error: 104 (Connection reset by peer)]
18:16
diffbavis has quit [Read error: 54 (Connection reset by peer)]
18:31
_JusSx_ has joined #ocaml
18:32
_JusSx_ has quit [Client Quit]
18:35
_JusSx_ has joined #ocaml
18:35
Axioplase has joined #ocaml
18:35
<
Axioplase >
I have to write down some recursive objec,t but I don't succeed in doing it..
18:37
<
Axioplase >
I want to write something like 'let rec x = Foo [x]'
18:37
<
malc_ >
~$ ocaml -rectypes Objective Caml version 3.09.3
18:37
<
malc_ >
# let rec x = `Foo [x];;
18:37
<
malc_ >
val x : [> `Foo of 'a list ] as 'a = ...
18:38
<
malc_ >
but that's shooting yourself in the foot
18:38
<
Axioplase >
hum.. without variant types :)
18:38
<
malc_ >
(..most of the time)
18:38
<
malc_ >
# type t = Foo of t list;;
18:38
<
malc_ >
type t = Foo of t list
18:38
<
malc_ >
# let rec x = Foo [x];;
18:38
<
malc_ >
val x : t =
18:39
<
bluestorm >
# type truc = truc list;;
18:39
<
bluestorm >
type truc = truc list
18:39
<
Axioplase >
hum... in fact, I have this :
18:39
<
bluestorm >
# let rec (x:truc) = [x];;
18:39
<
bluestorm >
val x : truc =
18:39
<
bluestorm >
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
18:39
<
bluestorm >
( -rectypes, of course )
18:40
<
malc_ >
bluestorm: 21:31 < malc_> ~$ ocaml -rectypes was there a point in repeating what i just posted?
18:41
<
bluestorm >
i maybe tought it would be useful to show that a constructor wasn't needed to achieve this
18:41
<
Axioplase >
I need to compile recursive closures... Therefore, I need the closure to be in its own env. here's what I have : µf.\x.e : ERecFun(f,x,e) -> (let clos = tailaux (x::f::l) e in let rec k = [IRecClosure (k@clos)] in k
18:43
<
Axioplase >
I always get those "This kind of expression is not allowed as right-hand side of `let rec'
18:44
<
malc_ >
Axioplase: once again -rectypes
18:44
<
Axioplase >
malc_: I'm sure it can be done without rectypes :/
18:46
Submarine has joined #ocaml
18:46
<
bluestorm >
(i'm a little bit off-topic, but i recently had some fun with the "type truc = truc list" type : for example you can write a nice natural integers library on the top of that, it's very near of the mathematical definition of sets)
18:47
<
Axioplase >
bluestorm: yes. Neumann's integers..
18:47
love-pingoo has joined #ocaml
18:47
<
bluestorm >
altought you could use a different representation
18:48
<
bluestorm >
3 = {{{}}}
18:48
<
bluestorm >
but the neumann's one is more practial even in caml
18:48
<
bluestorm >
and let succ n = n::n is sooo cool :-°
18:49
malc_ has left #ocaml []
18:52
_JusSx__ has joined #ocaml
18:54
jacobian_ has joined #ocaml
18:55
<
jacobian_ >
Is there a way to use ocaml as an embedded scripting language in an ocaml executable?
18:58
<
love-pingoo >
not really but you can dynamically load code
18:58
mtomczak has joined #ocaml
18:59
_JusSx___ has joined #ocaml
19:00
smimou has joined #ocaml
19:04
_JusSx_ has quit [Read error: 110 (Connection timed out)]
19:11
_JusSx__ has quit [Read error: 110 (Connection timed out)]
19:22
pango has quit [Remote closed the connection]
19:25
diffbavis has joined #ocaml
19:27
<
jacobian_ >
how does it do type checking if you dynamically load code?
19:27
<
jacobian_ >
the interface must not have type erasure
19:28
<
jacobian_ >
and you would have to add typing data at the interface
19:28
Submarine has quit [Remote closed the connection]
19:28
_JusSx_ has joined #ocaml
19:29
<
tsuyoshi >
never seen anyone actually use dynamically loaded code in ocaml
19:36
<
er >
what is the length of a native ocaml integer?
19:36
_JusSx__ has joined #ocaml
19:40
_JusSx___ has quit [Read error: 113 (No route to host)]
19:43
<
mtomczak >
er: System-specific.
19:44
<
mtomczak >
That might help.
19:49
_JusSx_ has quit [Read error: 110 (Connection timed out)]
19:59
benny has joined #ocaml
20:13
Aradorn_ has joined #ocaml
20:14
Aradorn has quit [Read error: 104 (Connection reset by peer)]
20:15
benny_ has quit [Read error: 110 (Connection timed out)]
20:16
_JusSx_ has joined #ocaml
20:26
_JusSx___ has joined #ocaml
20:28
_JusSx__ has quit [Read error: 113 (No route to host)]
20:30
pango has joined #ocaml
20:36
slipstream has quit [Read error: 110 (Connection timed out)]
20:38
<
Axioplase >
plus 1 bit for the GC
20:38
_JusSx_ has quit [Read error: 110 (Connection timed out)]
20:42
slipstream has joined #ocaml
20:44
<
er >
mtomczak, thanks for that.
20:44
<
er >
I should have used nativeints in this 3k line implementation rather than ints
20:46
<
bluestorm >
actually it may be possible to change it
20:46
<
bluestorm >
let ( + ) = Nativeint.add
20:46
<
bluestorm >
and so on
20:47
<
er >
that's what i'm doing
20:47
jacobian_ has quit [Remote closed the connection]
20:47
<
er >
btw, how do we differentiate between a binary and unary -?
20:47
<
bluestorm >
one is ~- and the other is -
20:48
<
bluestorm >
but it seems ~- doesn't affect the (-2) behavior
20:49
<
er >
bluestorm, i tried that too
20:50
<
bluestorm >
you may have to come to regular expressions :-°
21:04
Aradorn_ has quit [Client Quit]
21:04
Aradorn has joined #ocaml
21:05
Mr_Awesome has joined #ocaml
21:19
<
Aradorn >
are there any really good published ocaml books?
21:20
<
Aradorn >
i know theres all kinds of web resoruces
21:21
<
bluestorm >
i know a good, out of print french book
21:21
<
bluestorm >
(the original version of "Developping applications with Objective Caml")
21:27
Axioplas1 has joined #ocaml
21:28
love-pingoo has quit ["Connection reset by pear"]
21:28
mtomczak has quit ["IceChat - Keeping PC's cool since 2000"]
21:29
chi11 has quit [Read error: 145 (Connection timed out)]
21:35
Aradorn has quit []
21:41
Axioplase has quit [Read error: 110 (Connection timed out)]
22:01
shawn has quit ["This computer has gone to sleep"]
22:14
shawn has joined #ocaml
22:16
er has quit ["Leaving"]
22:19
shawn has quit ["This computer has gone to sleep"]
22:21
shawn has joined #ocaml
23:02
smimou has quit ["bli"]
23:22
mnemonic has quit ["leaving"]
23:39
_JusSx___ has quit [Client Quit]
23:40
DoctorMach has joined #ocaml