Skal has quit [Read error: 110 (Connection timed out)]
<flux__>
there was this some lex/yacc-replacement for ocaml (replacing ocaml's ocamllex (maybe) and ocamlyacc) with more advanced features, does anyone happen to remember a pointer to it?
<flux__>
(when I figured I needed to find for lr(1) ocaml, things begun to pop up ;))
<flux__>
s/find/search/
<flux__>
hmm.. reverse polish notation is something that is difficult to express with ocaml's yacc, right?
backstab has joined #ocaml
backstab has left #ocaml []
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
descender has quit [Read error: 110 (Connection timed out)]
descender has joined #ocaml
<flux__>
let's say I have a background thread that calls a provided notification function whenever it retrieves communication
<flux__>
and the provided callback function uses Event.sync (Event.send.. ) to send back messages to me
<flux__>
at some point I decide that I want to discard all the remaining messages and terminate
<flux__>
how should I go about doing that?
<flux__>
the background thread may be blocked on my Event.sync when I make that decision.. ok, so I could maybe rewrite that as Event.select [Event.send ..; Event.receive abort_info]..
<flux__>
hmm.. infact if I just assume there is only one thread doing the job, that combined with updating a mutable variable that says not to send any further messages could work
<flux__>
hey, thanks you guys :)
<flux__>
well, I got it working, but it's very complex :/
<flux__>
and theoretically it can still lock up
<flux__>
there should be a Event.wait_condition or something
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
_fab has joined #ocaml
<flux__>
maybe Event just isn't so convenient when used with asynchronous events.. I can't think of a way to get rid of that lockup.
khaladan has quit [" bye."]
vodka-goo has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Schmurtz has quit [Read error: 110 (Connection timed out)]
_fab has quit [Read error: 104 (Connection reset by peer)]
_fab has joined #ocaml
m3ga has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
Schmurtz has joined #ocaml
rillig has joined #ocaml
malc_ has joined #ocaml
<flux__>
I actually finally solved that by making the decision to exit in the asynchronous notification function.. but I'm not sure if I'm pleased with this solution :)
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
zigong has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Smerdyakov has joined #ocaml
vezenchio has joined #ocaml
Yorick has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
zigong has quit [Read error: 110 (Connection timed out)]
batdog has joined #ocaml
zigong has joined #ocaml
batdog is now known as batdog|gone
vodka-goo has quit ["Leaving"]
Snark has joined #ocaml
batdog|gone is now known as batdog
batdog is now known as batdog|gone
__DL__ has joined #ocaml
zigong has quit ["using sirc version 2.211+KSIRC/1.3.12"]
batdog|gone is now known as batdog
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
_JusSx_ has joined #ocaml
MisterC has quit [Remote closed the connection]
Revision17 has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
zigong has joined #ocaml
zigong has left #ocaml []
smimou has joined #ocaml
Revision17 has quit [Remote closed the connection]
khaladan has joined #ocaml
rillig_ has joined #ocaml
vodka-goo has joined #ocaml
rillig has quit [Read error: 110 (Connection timed out)]
desp has joined #ocaml
<desp>
hello
<desp>
does anyone here have some experience with using OpenGL in OCaml?
<malc_>
yes
<desp>
malc_: I'm trying to display a textured quad, and I can't get the texture to show up
<desp>
all I get is a colored quad, if I specify a color, or a white quad.
<malc_>
what it has to do with OCaml?
<malc_>
anyhow have you enabled texturing?
<desp>
well, I'm using the OCaml lablGL bindings
<malc_>
your question is about opengl. not ocaml or lablgl
<flux__>
I think there was a book on opengl available online
<desp>
yes, I have enabled texturing.
<desp>
and I followed a NeHe tutorial on texturing, as well
Yorick has quit ["nu fåre va nog"]
<desp>
I'm fairly certain the problem is with the way I load the texture
<desp>
this way the loading works fine, and the image is displayed correctly using GlPix.draw
batdog has quit [Read error: 110 (Connection timed out)]
<malc_>
i'd recommend creating a string of length 4 and putting the bytes there, then pushing it with sets_string
<desp>
one thing -- GlPix.draw seems to disregard any alpha values
<malc_>
enable alpha
<desp>
do you mean Gl.enable `alpha_test ?
<malc_>
something like that
totolapino has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
<desp>
ah, a blend function.
<desp>
okay. thanks for your help!
<malc_>
np
__DL__ has quit ["Bye Bye"]
_JusSx_ has quit ["leaving"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
desp has quit []
Thas has joined #ocaml
<Thas>
Good morning..
* Thas
has a question
<Thas>
Is it possible to define a structure that contains a function which returns instances of that same structure type, in ocaml?
<smimou>
23:46 is rather late for me... :)
<zmdkrbou>
rhooo smimou :)
<zmdkrbou>
Thas: yep
<Thas>
zmdkrbou : How? I can't figure it out?
<zmdkrbou>
what do you mean by "structure" ? a record ?
<smimou>
smth like type t = Test of (unit -> t)
<smimou>
?
<Thas>
A record, yes.
<zmdkrbou>
type t = { f : int -> t }
<dylan>
type pants = { this: int; more_pants: (int -> pants) } let rec mystic_pants i = { this = i; more_pants = mystic_pants } ?
<Thas>
I see.
<Thas>
Thanks, I'm not sure why I didn't see it before. That's rather obvious once it's pointed out.
<totolapino>
Hi, this is an error that I don't understand :
<totolapino>
This expression has type float array * int * int but is here used with type [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] :
<totolapino>
array * int * int is one of the different choices, so where's my error ?
<zmdkrbou>
you have to use a constructor
<zmdkrbou>
if you wrote (my_array,my_int1,my_int2), write `A (my_array,my_int1,my_int2)