julm_ has quit [Read error: 54 (Connection reset by peer)]
slash_ has quit [Read error: 110 (Connection timed out)]
slash_ has joined #ocaml
julm__ has quit ["leaving"]
ikaros has quit ["Leave the magic to Houdini"]
verte has joined #ocaml
verte is now known as verte-work
jzmer has joined #ocaml
slash_ has quit [Client Quit]
ski_ has joined #ocaml
Nutssh has joined #ocaml
onigiri has quit []
komar_ has quit [Remote closed the connection]
komar_ has joined #ocaml
jeddhaberstro has joined #ocaml
Nutssh has quit [Read error: 60 (Operation timed out)]
jzmer has quit ["Leaving"]
jeddhaberstro has quit [Client Quit]
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
<BigJ>
hey anyone around?
<orbitz>
hi
ulfdoz has joined #ocaml
sporkmonger has joined #ocaml
sporkmonger has quit [Remote closed the connection]
sporkmonger has joined #ocaml
kaustuv_` has joined #ocaml
tvn2009 has quit ["Leaving"]
kaustuv_ has quit [Read error: 145 (Connection timed out)]
<BigJ>
can anyone tell me the error in my code
<BigJ>
let i = 1 in
<BigJ>
let f = 2.3 and
<BigJ>
let a = (float_of_int i) +. f
<BigJ>
;;
julm has joined #ocaml
<orbitz>
BigJ: if you have 'and' you don't need let
<orbitz>
and you are missing an 'in'
<BigJ>
k let me try that again
ulfdoz has quit [Read error: 110 (Connection timed out)]
<orbitz>
what are you tryign to accomplish?
<BigJ>
define i to be 1 and f to be 2.5 and then do float_of_int on i, add the 2 floats then store the result in a variable and print it
<orbitz>
let a = let i = 1 and f = 2.3 in float i +. f in Printf.printf "%d\n" a
<BigJ>
a calls itself?
<orbitz>
where?
<BigJ>
sorry nm
<orbitz>
or let i = 1 and f = 2.3 in let a = float i +. f in ...
<BigJ>
i get confused between using in let or and
<BigJ>
i'm not sure the difference
<orbitz>
let this = that and bongo = mango
<orbitz>
lets you define 2 variables in 1 let
<BigJ>
can you define more than 2
<orbitz>
sure, more and's
<BigJ>
why do you need a seperate in let for a?
<orbitz>
because you can't refrence values you bind in an and
<orbitz>
they don't exist yet
<orbitz>
let x = y and z = x + 1 in z
<orbitz>
x doesn't exist yet, so you have to do another let
<BigJ>
ahh because z is part of the function x?
<orbitz>
there is no function x there
<BigJ>
variable declaration
<orbitz>
z references x, z is not part of x
<BigJ>
it is inside the same scope
<orbitz>
x is in z's scope, not the other way around
<BigJ>
i just find it really confusing about how local variables work because I am used to writing a "method" or function and defining a variable inside that scope
<BigJ>
in say C or java
<orbitz>
C or Java have no real comparison I believe
<BigJ>
ya that's the hard part nothing to really compare it to
<orbitz>
it's not that complex of an idea though. let a = b and c = d in a + c
<orbitz>
a and c do not exist until the 'in'
<orbitz>
so c cannot reference a before it exists
ttamttam has joined #ocaml
<orbitz>
so let a = b and c = a + d in a + c wouldn't work, a doesn't exist when c is being bound
<BigJ>
k I'll have to think it over and do some more reading. thanks for the info
sporkmonger has quit []
<ski_>
BigJ : also consider
<ski_>
let a = a + b and b = a * b in ..a..b..
<ski_>
or
<ski_>
let a = b and b = a in ..a..b..
<ski_>
(both those assume you already have an `a' and a `b' in scope)
ski_ has quit ["Lost terminal"]
ski_ has joined #ocaml
f[x] has joined #ocaml
yurug has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090115, built on: 2009/03/07 02:39:30 UTC http://www.kvirc.net/"]
Alpounet has joined #ocaml
verte-work has quit ["~~~ Crash in JIT!"]
clank has joined #ocaml
<clank>
Is it possible to make records that share parameters? for example, I can't seem to create a point2d after defining point3d: type point2d = {x:float; y:float} type point3d = {x:float; y:float;z:float} ;;
<clank>
share parameter names, i mean
<Alpounet>
even if you annotate which type you want explicitly ?
<clank>
sorry, how do I do that? (I'm very new)
julm_ has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
<Alpounet>
let o = { x = 1.0, y = 2.0, z = 3.0 } : point3d
<flux>
module Point2D = struct type t = {x : float .. } end
<flux>
also, with objects that is possible
<clank>
let a ={x = 3.0; y=4.0}:point2d;; gives me syntax error
<Alpounet>
yeah
<Alpounet>
it's wrong
<flux>
the syntax would be ({ .. } :point2d), but it won't work anyway
<Alpounet>
confused
<tab>
clank: it's not possible with structure
<flux>
there's a patch that would actually allow that, but it's for 3.00 and I suppose we'll never see in the mainline ocaml
<Alpounet>
too much C++ kills C++, pissed of writing C++ all day long.
<clank>
okay; I suppose something like this calls for objects/inheritance anyways
<tab>
clank: what about just writing them differently and have a function that convert them to 3d/2d ?
<flux>
clank, if you're dealing with lots of points, it may be more efficient to go with records
<Alpounet>
I'd more likely manipulate them via make_point, translate, rotate, etc functions
<clank>
tab: I'm just trying to get a grip on the typing system, i'm not actually writing a real program yet :-P
<Alpounet>
exactly because of the record fields name collisions problems
<clank>
is name collision between type variants a problem as well?
<Alpounet>
actually
<clank>
like type t1 = A|B type t2 = A|C;;
<flux>
yes
<flux>
one alternative in that situation is to use polymorphic variants
<Alpounet>
if you write let foo = A
<Alpounet>
how can the compiler decide which A you're dealing with
<flux>
(but that's an advanced topic with its own problems, mainly with compiler error messages)
<clank>
Alpounet: it seems to use the most recently defined type...
<Alpounet>
in the toplevel
<Alpounet>
right ?
<clank>
ya
<flux>
in any case, for a short demo, this works: type t1 = [ `A | `B ] type t2 = [ `A | `C ] let f () = `A
<Alpounet>
IIRC, the compiler would raise an error.
<flux>
in general I simply avoid using name constructor names
<flux>
it can actually help the readability too, to prefix constructors with a short related tag, especially if you have other concepts that need to use similarly named constructors
<Alpounet>
and anyway, A, B, C and so on are bad names :-)
_zack has joined #ocaml
verte has joined #ocaml
Yoric[DT] has joined #ocaml
Yoric[DT] has quit [Read error: 145 (Connection timed out)]
ikaros has joined #ocaml
<rwmjones>
anyone got a readable intro to functional reactive programming of GUIs, pref. one that includes real code and doesn't spend pages talking about "signals" ?
Nutssh has joined #ocaml
Nutssh has quit [Client Quit]
ikaros has quit ["Leave the magic to Houdini"]
mishok13 has quit [pratchett.freenode.net irc.freenode.net]
_zack has quit ["Leaving."]
_zack has joined #ocaml
ikaros has joined #ocaml
julm has joined #ocaml
mishok13 has joined #ocaml
julm_ has quit [Read error: 145 (Connection timed out)]
<rwmjones>
gildor:
<rwmjones>
$ host mirror.ocamlcore.org
<rwmjones>
;; connection timed out; no servers could be reached
<gildor>
rwmjones: ovh problem
<gildor>
rwmjones: seems to be back online
<gildor>
rwmjones: it also cuts my kimsufi connection
<gildor>
exactly at the same time
<rwmjones>
thanks
tmaeda is now known as tmaedaZ
<gildor>
all: OVH (datacenter for ocamlcore.org) seems to have some network problems, don't know how long it will last
ertai has quit [Read error: 60 (Operation timed out)]
ertai has joined #ocaml
albacker has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
_andre has joined #ocaml
bzzbzz has quit [Remote closed the connection]
bzzbzz has joined #ocaml
Yoric[DT] has joined #ocaml
komar_ has quit [Read error: 110 (Connection timed out)]
verte_ has joined #ocaml
<rwmjones>
cduce is driving me mad
<gildor>
rwmjones: what is the problem
<gildor>
?
<rwmjones>
gildor, I'm trying to get that perl code translated into cduce -- see caml-list
<rwmjones>
into ocamlduce rather
<kaustuv_`>
rwmjones: what happens if you just Obj.magic it to whatever type you need?
<kaustuv_`>
(Don't tell anyone I suggested this.)
verte has quit [Read error: 110 (Connection timed out)]
<rwmjones>
it'll almost certainly crash
<kaustuv_`>
so it's not a phantom type issue then?
<kaustuv_>
what is the difference between using match ... with and giving something that looks like a type and omitting match ... with?
<kaustuv_>
rwmjones: look at the example on page 7 of ftp://ftp.di.ens.fr/pub/users/castagna/padl05.ps.gz that uses transform ... with instead of match ... with
<kaustuv_>
OCamlDuce actually has more of a set system than a type system
<Yoric[DT]>
Well, it's a type system with union, intersection and sets.
<Yoric[DT]>
s/sets/singleton sets/
<orbitz>
would one actually use ocamlduce in the real world? sticking to an ocaml dist just for XML processing seems horrifying
<Yoric[DT]>
But without functions.
<Yoric[DT]>
(i.e. no functions in these sets)
<_zack>
rwmjones: gotcha, Gerd has an xpath evaluator on top of xpath, too bad concrete syntax is still missing
<kaustuv_>
It seems that unless I want to go mad with x-type expressions, I have to re-ify the schema of the XML document as XML types.
<BigJ2>
thelema: how do I import Printf to the interpreter?
derdon has joined #ocaml
<orbitz>
the REPL? it's already accessable
<rwmjones>
is orbitz a bot?
<Yoric[DT]>
Not that I know of.
<thelema>
rwmjones: orbitz just has less lag than you. and doesn't sleep.
<orbitz>
crap, thelema's onto me
<thelema>
:)
<orbitz>
I have a confession to make
<orbitz>
i'ma ctually...
<orbitz>
from the future!
* thelema
is from the past
<orbitz>
In this future, Ocaml is the only language anyone writes code in.
<thelema>
orbitz: no billandtedding the channel.
<orbitz>
thelema: i'm here to collect you
* thelema
hopes ocaml of the future is much better than ocaml now.
* Yoric[DT]
hopes in the future, everyone writes code in OPA but the few people who don't write code in OPA write code in a much improved OCaml.
<orbitz>
haah
<Yoric[DT]>
Just to make everyone happy :)
<orbitz>
Yoric[DT]: anything we can see on OPA? (OPA is your project right?)
<Yoric[DT]>
Not quite yet / Yes.
<orbitz>
Yoric[DT]: but i'm from the future, so clearly I've alrady seen OPA. no harm in showing me :)
<Yoric[DT]>
:)
derdon has quit []
<Yoric[DT]>
Just know that it's shaping up nicely, I'm happy with what we're doing but the code still needs much cleanup and testing before we can release 1.0 .
<kaustuv_>
What is OPA?
<kaustuv_>
(besides an ingredient in some form of chemical weapon...)
sporkmonger has quit []
kaustuv_ is now known as kaustuv
<hcarty>
kaustuv: A language Yoric[DT] is working on at his new place of employment
<kaustuv>
hcarty: I inferred as much, but I am curious what it is. MLState's web-site does not explain much about exactly what they do.
<hyperboreean>
hey guys where can I find some networking code written in OCaml?
<orbitz>
ocamlnet project
<hyperboreean>
ok, so that is the library that is used for networking in OCaml?
<orbitz>
it is a library
<kaustuv>
'Networking' can mean lots of different things. Do you want low level socket API stuff, high level protocols, or do you want CGI/specialized web servers?
<hyperboreean>
kaustuv: basic stuff for now, I think socket level will do
<hyperboreean>
ocaml has support in the Unix module for that, right?
<kaustuv>
Yes
<hyperboreean>
ok
<hyperboreean>
thanks
<hyperboreean>
so, some tiny examples of how to do it are available somewhere?
komar_ has quit ["WeeChat 0.2.6.3-ohshi"]
<hcarty>
kaustuv: It sounds like the language is similar to OCaml, but with a more advanced type system.
<Camarade_Tux>
mldonkey/unison for some definition of "tiny examples" :D
<hcarty>
kaustuv: I'm not a CS person, so I don't know the details of what would make up a "more advanced type system" :-)
komar_ has joined #ocaml
<kaustuv>
hcarty: I think the 'P' in the acronym and Yoric's background suggests that it might be more than just a type system. Possibly involves process/pi-calculus in some way
<Yoric[DT]>
Well, the P in the calculus is completely unrelated.
<Yoric[DT]>
But, yes, my background suggests well :)
<Yoric[DT]>
It's a programming language designed for web programming.
<Yoric[DT]>
The core is functional + concurrent.
* Camarade_Tux
wonders where Smerdyakov is :P
<Yoric[DT]>
:)
<kaustuv>
Were you present for Adam's DEFUN demo/tutorial/advertisement?
<Yoric[DT]>
Yep.
<Yoric[DT]>
We even went for dinner afterwards with Adam and a few others :)
<Yoric[DT]>
(and yes, we're both aware that we have common objectives for our respective languages)
ttamttam has quit ["Leaving."]
<Yoric[DT]>
Anyway, no more details until we have a release.
<Yoric[DT]>
Which should be soonish.
<Yoric[DT]>
On these words, by everyone.
<Yoric[DT]>
On these words, bye everyone.
Yoric[DT] has quit ["Ex-Chat"]
onigiri has joined #ocaml
smimou has joined #ocaml
ski_ has quit ["Lost terminal"]
Snark has joined #ocaml
<BigJ2>
what is wrong with this statement?
<BigJ2>
let direction (x,y) =
<BigJ2>
let b = print_string ("hello") ;;
<Camarade_Tux>
the construct is "let X = ... in"
<Camarade_Tux>
let b = ...;; would be useless, you're getting the result of print_string, storing it but you would never be able to doa nything with that
<BigJ2>
I am trying to create a function float * float -> string. so for the float * float part it has to be a tuple?
<Camarade_Tux>
you could have float -> float -> string
<BigJ2>
yes but that is different to float * float -> string is it not?
<Camarade_Tux>
let direction x y = Printf.printf "%s ; %s\n" x y
<Camarade_Tux>
BigJ2: it is
<BigJ2>
the first one is a pair and the second one is 2 seperate expressions?
<Camarade_Tux>
BigJ2: why do you need x and y ? why not just one value?
<hcarty>
BigJ2: print_stringis string -> unit, so you are not returning a string here even if you get rid of the inner "let .. ="
* Camarade_Tux
will just pretend he used sprintf instead of printf :D
<BigJ2>
because I am creating a program that takes a "x" and "y" co-ordinate
<hcarty>
Camarade_Tux: :-)
<BigJ2>
the requirement is that the function be in the form float * float -> string
<Camarade_Tux>
tuple then
<hcarty>
Homework?
Alpounet has joined #ocaml
<BigJ2>
i am just confused because when I plugged let direction (x,y) = print_string "hello" it returned unit
<BigJ2>
unit();
<BigJ2>
into the interpreter that is
<hcarty>
Right
<Camarade_Tux>
it's as hcarty told you: print_string writes to the terminal, it doesn't return a string
<BigJ2>
ahh i see
<Camarade_Tux>
you would use one of : (^), String.concat, Printf.sprintf
<hcarty>
BigJ2: For issues like this, try typing each part individually in to the toplevel to see the types
<hcarty>
BigJ2: That can be a huge help in tracking down type issues
<BigJ2>
ya that's how I managed to figure out how to use a tuple
ikaros has joined #ocaml
_zack has quit ["Leaving."]
onigiri has quit []
gim has quit ["moving..."]
BigJ2 has quit []
bzzbzz has quit [Remote closed the connection]
Amorphous has quit [Read error: 110 (Connection timed out)]
ttamttam has joined #ocaml
<albacker>
my_list.(i) is same as (List.nth my_list i) ?
Amorphous has joined #ocaml
<thelema>
lists don't have direct acces syntax
<albacker>
well List.nth does give me the n-th element of my_list doesn't it ?
<albacker>
what do you mean by direct access syntax? like arrays do?
<thelema>
yes
<Alpounet>
but my_list.(i) is invalid
<Alpounet>
it only works on arrays
<albacker>
oh :/
* albacker
facepalms
<Alpounet>
it has no sense for lists, since elements aren't contiguous in memory
<mfp>
Alpounet: works on whatever Array.get happens to manipulate (see above)
<Alpounet>
heh
<Alpounet>
yeah
<Alpounet>
but it wasn't the point I was talkin' about :-p
<albacker>
ok a stupid question.. what's wrong here
<albacker>
let rev my_list =
<albacker>
let list2 = ref [] in
<albacker>
for i=0 to (List.length my_list) do
<albacker>
list2 := (List.nth my_list i) :: list2
<albacker>
done;
<albacker>
in rev [1;2;3;4];;
<albacker>
i wrote it to reverse this list.
<albacker>
i'm just exercising.. i could have done this recursively but i want to see the loop version first.
<thelema>
your rev returns a list ref
<albacker>
true
gim has joined #ocaml
<albacker>
if i change list2 with !list2 it still doesnt work
<albacker>
exception, failure nth :/
<albacker>
first time i encounter smth like this..
ulfdoz has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
<Alpounet>
rev returns unit, I think
maskd has quit [pratchett.freenode.net irc.freenode.net]
noj has quit [pratchett.freenode.net irc.freenode.net]
mfp has quit [pratchett.freenode.net irc.freenode.net]
patronus has quit [pratchett.freenode.net irc.freenode.net]
bacam has quit [pratchett.freenode.net irc.freenode.net]
ozzloy has quit [pratchett.freenode.net irc.freenode.net]
churchill has quit [pratchett.freenode.net irc.freenode.net]
Mr_Awesome has quit [pratchett.freenode.net irc.freenode.net]
<thelema>
0 to length - 1
<thelema>
albacker: your loop goes one too long
<albacker>
yep, thankyou
<Alpounet>
you should put a "!list2" after "done;"
Asmadeus_ has joined #ocaml
<albacker>
yes :)
Camarade1Tux has joined #ocaml
<albacker>
ok recursive one now..
<albacker>
rec. should ead less memory then the loop-one i think since we're dealing with lists?
Asmadeus has quit [Read error: 104 (Connection reset by peer)]
<albacker>
doing List.nth we should go til the i-eme element of the list, and that in a loop.. thats too much for big lists.. right?
Camarade_Tux has quit [Read error: 113 (No route to host)]
maskd has joined #ocaml
<hcarty>
albacker: Perhaps not less memory, but less time.
<thelema>
yes, it's a lot of work scanning to the last element of a list
Yoric[DT] has joined #ocaml
noj has joined #ocaml
mfp has joined #ocaml
patronus has joined #ocaml
Mr_Awesome has joined #ocaml
bacam has joined #ocaml
churchill has joined #ocaml
ozzloy has joined #ocaml
ofaurax has joined #ocaml
ztfw has joined #ocaml
BigJ2 has joined #ocaml
<BigJ2>
how would I do multiple if statements?
<BigJ2>
let direction (x,y) =
<BigJ2>
let a = "direction (" ^ (string_of_float x) ^ "," ^ (string_of_float y) ^ ")" in
<BigJ2>
if x = 0.0 && y = 0.0 then print_string (a ^ " = no direction\n") else() in
<BigJ2>
if x = 0.0 && y < 0.0 then print_string (a ^ " = south \n") else () ;;
<orbitz>
but the enxt if int he else
<orbitz>
which is all an else if is
<orbitz>
i woul write that with a function though
<BigJ2>
put the next if in the else?
<orbitz>
let direction = function (x, y) when x = 0.0 && y = 0.0 -> Pritnf ...
<orbitz>
BigJ2: that is what you wan to do right?
<orbitz>
btw, comparing floats for equality is almost always a bad idea
<BigJ2>
i would be better to use pattern matching?
<orbitz>
i would
<BigJ2>
ya I plan to, i just don't know how to implement it
<orbitz>
hrm in ooking at yoru code again, I wouldn't use function like i did, since youw ant teh 'a' there. let direction v = let a = Pritnf.sprintf .... in match v with (x, y) when .... -> ... | (x, y) when ... -> ...
<thelema>
let dir = function (0., y) when y > 0. -> "north" | (0.,y) -> "south" | (x,0.) when x > 0. -> "east" | (x,0.) -> "west" | _ -> "not a cardinal direction"
<BigJ2>
thelema why do you have function (0., y) instead of function (x,y)
<thelema>
what direction is 2,3?
<BigJ2>
north east
<thelema>
okay, add [ | (x,y) when x > 0 && y > 0 -> "northeast" ]
<orbitz>
thelema: ohh, how about doing each x and y speratly and composing!
<thelema>
match (sign x, sign y) with ...
<orbitz>
BigJ2: let x = 0.0 and y = 0.1 in match (x, y) with (0., y) -> "mmmbop" | _ -> "fail" what happens?
<BigJ2>
i suppose it should print north
<orbitz>
what should?
<orbitz>
my example has no "north" in it
f[x] has quit [Read error: 60 (Operation timed out)]
<BigJ2>
orbitz: are u asking me what would be returned by your expression?
<orbitz>
yes
<BigJ2>
"mmmbop"
<orbitz>
do you see why thelema had (0., y) isntead of (x , y)?
<BigJ2>
so that it only handles the y co-ordinates?
<Alpounet>
it matches the x with 0.
<Alpounet>
match (x, y) with (0., y) means that to enter the (0., y) case, (x,y) must be of the form (0., y), that is x must be equal to 0.
<Alpounet>
(for y, we don't care)
<BigJ2>
so whenever it matches x to 0 it then just checks the y value?
<orbitz>
in the sepcific example Alpounet just gave it does nto check y at all
<orbitz>
BigJ2: can you describe pattern matching to me? (don't worry about how correct you are, just want to see how you understand it then we can correct any place you misunderstand)
<Alpounet>
actually
<Alpounet>
it'd be clearer to put another letter instead of y
<Alpounet>
match (x, y) with (0., idontcareaboutthisvalue)
<orbitz>
_ !
<Alpounet>
(yeah, let's go slowly IMO)
<orbitz>
i think a different examle all together might be helpful to BigJ2 to understand pattern matching
tylermac has joined #ocaml
<BigJ2>
so you are putting the x value to match to 0 and then providing the conditions for when it is either greater or less than zero it is either east or west?
<hcarty>
I would like to request testers for the latest PLplot Subversion revision, now with Super OCaml Gtk+ Powers (tm)
Mr_Awesome has quit [Read error: 104 (Connection reset by peer)]
Mr_Awesome has joined #ocaml
<Alpounet>
hcarty, what's new ?
<hcarty>
The requirements are: CMake 2.6.0 or later, OCaml 3.x (tested with 3.10.x and 3.11.x, should work with earlier) and lablgtk2 + Cairo-OCaml if you want the GUI goodness.
<hcarty>
Alpounet: The new bits are a more OCaml-like and high-level set of plotting interfaces and the ability to provide your own Cairo surface to plot on, and with that embed plots in lablgtk apps.
<Alpounet>
hcarty, you just want people to check if things compile & run well ?
<hcarty>
Alpounet: Yes, if you have time.
<Alpounet>
let me install the missing stuffs and I'll do that.
<Alpounet>
damn, cairo-ocaml isn't packaged on my distro :(
<hcarty>
Ah, that happens if you close the window rather than pressing enter or right-clicking on the plot.
<Alpounet>
heh
<Alpounet>
but you (& others, I guess ?) did a very good job
<hcarty>
The "closing the xcairo window crashes the plot/application" is a bug that is on the TODO list... I'm not very familiar with the internals of X.
<Alpounet>
I'm taking a look at the examples' OCaml code
<hcarty>
Thanks. PLplot has been around for a while, at least 1992. I provided the OCaml portion (bindings, examples, etc) and have contributed other pieces to the core of the library.
<hcarty>
The examples are not the most idiomatic OCaml. They are converted directly from the C examples, so they have a very C-like flavor.
<Alpounet>
yeah
<Alpounet>
anyway
<hcarty>
xplot01.ml and xgtk_interface.ml should be a bit better
<Alpounet>
it provides the given features directly in OCaml
<hcarty>
And it plays nicely with the toplevel, which is handy.
<Alpounet>
indeed !
<hcarty>
Thank you again for the testing. I'm happy to hear that it works somewhere other than on my system :-)
<Alpounet>
we should now ask the guy who worked on the OCaml profiling tool to take plplot-ocaml as its main plotting library :D
<hcarty>
I may do that, though I don't know if they'd want to add the dependency :-)
<Alpounet>
they'll have to make a choice
<hcarty>
At some point when I'm feeling adventurous I'll try to add a GODI package for PLplot.
<Alpounet>
nice plots or little dependencies :-p
<Alpounet>
wow, good luck
<hcarty>
Yes, the GODI package will likely not be for a while:-)
<Alpounet>
it'd be worth a GODI packaging sprint just for it
<hcarty>
All the OCaml prerequisites are there in GODI now, thankfully.
<Alpounet>
but again, awesome work !
Snark has quit ["Ex-Chat"]
<hcarty>
Thank you! I think I'll post it to the list soon for a general request for testing and comments on the API.
_andre has quit ["leaving"]
tylermac has left #ocaml []
<Alpounet>
yep
<Alpounet>
is there any tutorial somewhere ? or "just" the documentation ?
<hcarty>
Just the documentation and examples for now.
<hcarty>
I have the start of a simple tutorial in the documentation
<Alpounet>
ok good
<Alpounet>
people may like that
<Alpounet>
just a little introductory material
<hcarty>
Yes, I want to the latest documentation and the ocamldoc reference online before I post to the list.
<derdon>
what is the best way to "unpack" a list or array? I can do ``let (a,b,c) = foo;;`` if foo is a tuple, but that's neither possible with lists nor with arrays
komar_ has quit ["WeeChat 0.2.6.3-ohshi"]
<hcarty>
derdon: You'll get a warning, but you can do the same thing - "let [a;b;c] = some_list"
<hcarty>
or "let [|a;b;c|] = some_array"
<hcarty>
derdon: It's an unsafe match though because you don't account for differently-sized arrays or lists.
<hcarty>
derdon: So the compiler will warn about it.
<Alpounet>
derdon, consider the whole array, indepently of its size
<hcarty>
derdon: "let (a, b, c) = match l with | [a;b;c] -> (a, b, c) | _ -> failwith "Bad array!""
ofaurax has quit ["Leaving"]
<hcarty>
^^^^ that should be "Bad list!" I suppose.
<Alpounet>
or, if you're really really sure the list will have a size of 3, and that the program hasn't any sense if not, then do like hcarty tells you
<Alpounet>
but Array.iter, Array.map & friends are ... your friends :)
<derdon>
I just use an assertion to make sure that the array has a length of 3 ... (not very good, I know)
<Alpounet>
okay, then hcarty's way is fine
<hcarty>
Alpounet: Out of curiosity - are running a 32 or 64bit kernel?
<Alpounet>
32
<Alpounet>
I used to run a Debian 64... heh
<hcarty>
Ok, thanks
<hcarty>
:-)
<hcarty>
I'm on 64bit. I wouldn't expect any trouble from that, but it's nice to know that there really isn't any.
<hcarty>
Alpounet: (not that you have to read it! Just in case you have an interest in the library beyond testing :-))
kaustuv has quit [Read error: 110 (Connection timed out)]
derdon has quit []
<Alpounet>
hcarty, this is a bit late for tonight, but I should play a bit with it. It could be fun actually, for my articles/college reports/etc
<Alpounet>
thanks !
<Alpounet>
bookmarked :)
<hcarty>
Alpounet: You're quite welcome, and thank you as well. You got mention in the commit message with the spelling error fixes :-)
<Alpounet>
heh, thanks ;)
<hcarty>
Alpounet: http://plplot.sf.net is the one to track long-term. I'm hoping to find a way to include the ocamldoc-generated documentation in the general PLplot documentation build process.
<Alpounet>
myst, or use a function like : let flip f x y = f y x ;; then currying <= x becomes : flip (<=) x
<Alpounet>
hcarty, good luck, doesn't look like an easy task !
* Alpounet
really misses mlbot
<hcarty>
Alpounet: Indeed - who was working on that?
<Alpounet>
me
<hcarty>
I remember rwmjones had xavierbot
<hcarty>
Alpounet: Ah, of course :-)
<hcarty>
My apologies!
<myst>
Alpounet, thanks for the tip.
<Alpounet>
but mlbot's code and binaries died altogether with my HD
<hcarty>
Oh no - that's quite unfortunate.
<Alpounet>
and I admit I'm kinda reluctant to put my nose again in these OCaml compiler modules (something like 25 were needed, IIRC, when building mlbot, and given in a precise order...)
<Alpounet>
bringing xavierbot back looks easier :-p
<Alpounet>
anyway, it's late here, gotta go.
<hcarty>
Good night
<hcarty>
Thanks again for the testing
<Alpounet>
Good night and cheers hcarty
Alpounet has quit ["Leaving"]
jeddhaberstro has quit [Read error: 60 (Operation timed out)]
ztfw` has joined #ocaml
jeddhaberstro has joined #ocaml
ztfw has quit [Connection timed out]
thrasibule has joined #ocaml
BigJ2_ has joined #ocaml
BigJ2 has quit [Read error: 104 (Connection reset by peer)]
BigJ2_ is now known as BigJ2
slash_ has quit [Client Quit]
BigJ2_ has joined #ocaml
BigJ2 has quit [Read error: 104 (Connection reset by peer)]
BigJ2_ is now known as BigJ2
<BigJ2>
orbitz: are you still around?
<hcarty>
BigJ2: Someone else may be able to help if you have a question
BigJ2_ has joined #ocaml
BigJ2 has quit [Read error: 104 (Connection reset by peer)]
BigJ2_ is now known as BigJ2
<BigJ2>
hcarty: I think I figured out pattern matching but I can't figure out how to print the return value I am guessing I need to store it in a variable?