<Ringo48>
in that code, can anybody explain why the block I labeled "BLOCK ONE" doesn't compile, but the code in "BLOCK TWO" works?
<Ringo48>
The error message I get is "Error: This expression has type GPack.box but an expression was expected of type < pack : GObj.widget -> unit; .. > Types for method pack are incompatible"
<flux>
myst, the pattern matching continues, covering the expression !s
<flux>
oh, right
<flux>
that's what you intended
<flux>
well add "assert false" before "with"
<flux>
because the type of a while loop is unit
<flux>
(actually I'm not sure if you intended it or not)
<flux>
you can fix it wither with parens or the assert :)
<flux>
(I wouldn't mind if the return type of 'while true' was 'a like it is for 'assert false')
<myst>
erm... it's like 'close_in f; !s' is in ->?
<flux>
yes
<myst>
thanks
f[x] has quit [Read error: 145 (Connection timed out)]
Submarine has joined #ocaml
ertai_ has joined #ocaml
fremo has quit [Remote closed the connection]
TaXules has quit [Remote closed the connection]
aij has quit [Remote closed the connection]
TaXules has joined #ocaml
aij has joined #ocaml
fremo has joined #ocaml
fremo is now known as Guest32581
ertai has quit [Read error: 104 (Connection reset by peer)]
Alpounet has joined #ocaml
thrasibule has joined #ocaml
derdon has joined #ocaml
verte has joined #ocaml
thrasibule has quit [Read error: 145 (Connection timed out)]
Yoric[DT] has joined #ocaml
caligula__ has joined #ocaml
Alpounet has quit [Remote closed the connection]
caligula_ has quit [Read error: 110 (Connection timed out)]
Guest32581 is now known as fremo
Alpounet has joined #ocaml
<myst>
is "let (|>) f g = g f" an idiom? I mean to see function composition as a pipe? Usually it's seen as f(g(x)) = f o g, i.e. in natural order, not g |> f (reversed order).
<myst>
But if it is an estabilished idiom in OCaml code...
<Alpounet>
it is not an idiom
<Alpounet>
it just makes code clearer for most OCaml programmers
<Alpounet>
that's why it is included, e.g, in Batteries
<flux>
'most'?
<flux>
I think the idea was anyway picked from F#
<flux>
but I don't mind it, it's can produce clear code
<Alpounet>
flux, not for you ?
<flux>
alpounet, I'm thinking most ocaml developers have never seen the operator..
<Alpounet>
well
<Alpounet>
for those who have seen it, of course
<flux>
anyway, didn't batteries do some precedency hacking for that (?) operator?
<myst>
idiom is standard way of doing non-standard things, so if for most of OCaml programmes "string" |> print_endline is more readable then print_endline $ "string" then possibly I should get used to it...
<flux>
myst, I doubt that's a common use case for that operator. I would expect more than one element in the 'pipeline' for one.
<myst>
as for me: print_int $ List.fold_left (+) 0 $ produce_list is more readable atm
<Alpounet>
a slide for David Teller about Batteries shows an example about that
<myst>
because it looks like function composition
<myst>
f o g o h
<Alpounet>
flux, I don't remember for the precedency hacking, so ... maybe.
<myst>
btw, is there a list of characters allowable for let (<chars>)?
<myst>
or it's try-it case?
<flux>
myst, well, you can find the allowed operator characters from the manual, it has a bnf-like chapter
Alpounet has quit [Remote closed the connection]
<myst>
ah, really
<myst>
thanks
Alpounet has joined #ocaml
f[x] has joined #ocaml
kaustuv_` has joined #ocaml
tmaeda is now known as tmaedaZ
kaustuv_ has quit [Read error: 110 (Connection timed out)]
derdon has quit []
f[x] has quit [Read error: 145 (Connection timed out)]
ikaros has joined #ocaml
ikaros has quit [Client Quit]
ikaros has joined #ocaml
ttamttam has quit ["Leaving."]
ttamttam has joined #ocaml
ttamttam has quit ["Leaving."]
tomaw has quit [Connection timed out]
Submarine has quit [Read error: 113 (No route to host)]
tomaw has joined #ocaml
<thelema_>
For many operations, |> is the natural order rather than () because with nested (), you have to read from right to left.
<thelema_>
input |> process |> process |> outputf vs. outputf (process (process (input)))
thelema_ is now known as thelema
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
_andre has joined #ocaml
kaustuv_` is now known as kaustuv
<kaustuv>
I'm trying to get ocaml 3.11.1 working in Windows 7, but flexlink keeps aborting with "Access is denied". Has anyone successfully gotten it to work in Windows 7?
helgim_ has joined #ocaml
helgim_ has left #ocaml []
albacker has joined #ocaml
derdon has joined #ocaml
<thelema>
kaustuv: I'm getting the feeling that less and less people actually use ocaml/win because of f#
<flux>
maybe more would use it, if the darn thing worked properly?-)
tmaedaZ is now known as tmaeda
verte has quit ["~~~ Crash in JIT!"]
<thelema>
flux: otoh, with few using it, few bug reports get filed and fixed, so it stays broken
<Camarade_Tux>
kaustuv: with cygwin?
Snark has joined #ocaml
<kaustuv>
Camarade_Tux: yes, with cygwin, which I need to install anyway because of Isabelle
<Camarade_Tux>
kaustuv: I had that too iirc, the problem is actually with the permissions, try chmod on the cygwin side and widen the permissions with windows' explorer
<myst>
I use OCaml on Windows. But in bytecode mode only, since I am not going to install VS200x.
<myst>
devs should look at GHC guys, they're shipping gcc with GHC, so everything works out of the box. This is f*cking Windows btw.
<Camarade_Tux>
I should do something like that, I've started it but haven't had time to do everything
<Camarade_Tux>
s/like/much better than/ =)
komar_ has quit [Read error: 110 (Connection timed out)]
andre has joined #ocaml
f[x] has joined #ocaml
_zack has joined #ocaml
_andre has quit [Read error: 110 (Connection timed out)]
<Alpounet>
<thelema> kaustuv: I'm getting the feeling that less and less people actually use ocaml/win because of f# <<< or because of win
<orbitz>
Win for the win!
<thelema>
ocaml *could* work just fine on windows. there's some things that'd need to be imported/reinvented, but it could be complete on windows.
<thelema>
It's not because no-one able to do the work is interested in that.
_Jedai_ has joined #ocaml
|Jedai| has quit [Read error: 60 (Operation timed out)]
<Alpounet>
hmm
komar_ has joined #ocaml
jimmyb2187 has left #ocaml []
ttamttam has joined #ocaml
jimmyb2187 has joined #ocaml
ttamttam has quit [Client Quit]
<orbitz>
most things *could* work just fine on windows
<gildor>
but who will be interested in OCaml working on Windows ?
<kaustuv>
Camarade_Tux: thanks for the suggestion. I will try it out in a few minutes once Linux finishes installing in the other partition.
<kaustuv>
gildor: MSR-INRIA is very interested in getting dependable OCaml support on Windows. Problem is finding funding for a fulltime Windows developer
<thelema>
kaustuv: why is the solution hiring someone? This is an open source project, no?
f[x] has quit [Read error: 145 (Connection timed out)]
<kaustuv>
thelema: Yes, but projet Gallium has no people to spare getting Windows support
<kaustuv>
And no one in the community has volunteered their time
<kaustuv>
Camarade_Tux: OK, now what should I be chmoding?
thelema_ has joined #ocaml
<Yoric[DT]>
Note: if you want to use OCaml, feel free to send your resume at mlstate :)
<Yoric[DT]>
s/at/to/
<orbitz>
is mlstate a company?
<Yoric[DT]>
Yep.
<Yoric[DT]>
mlstate.com
* orbitz
throws resuem at mlstate
* Yoric[DT]
ducks.
tmaeda is now known as tmaedaZ
thelema has quit [Read error: 110 (Connection timed out)]
<orbitz>
a programming sysadmin, that'll be teh day!
* orbitz
needs to learn LaTeX
tmaedaZ is now known as tmaeda
<Yoric[DT]>
Actually, we're looking for a programming sysadmin, too :)
ikaros has quit [Read error: 110 (Connection timed out)]
<gildor>
kaustuv: if someone distribute an OCaml on Windows env, would MSR-INRIA still be interested ?
<gildor>
kaustuv: is MSR-INRIA directed by J.J Levy ?
<kaustuv>
gildor: yes to both
<gildor>
kaustuv: when I say "if someone distribute", I mean commercialy speaking
<gildor>
kaustuv: the answer won't engage your responsability, just to know what is worth
willb has joined #ocaml
<kaustuv>
gildor: I am only a postdoc, so I cannot answer that in any official way.
<Camarade_Tux>
kaustuv: just flexlink.exe
<gildor>
don't ask you to, just to know what the feeling at MSR-INRIA, answer we privately if you want
<gildor>
answer me
<gildor>
s/we/me/
<Camarade_Tux>
kaustuv: cygwin set weird perms and since you added flexlink.exe by hand, it didn't have those, just make sure flexlink.exe perms are consistent with others
<Camarade_Tux>
s/set/sets/
<kaustuv>
Camarade_Tux: Hmm, I seem to be able to execute it fine. What should I make it consistent with?
<Camarade_Tux>
kaustuv: when do you get the error already?
<kaustuv>
I get it when trying to link hello world using: flexlink -chain cygwin -exe -o hw.exe hw.o
willb has quit [Remote closed the connection]
<kaustuv>
Camarade_Tux: I tried flexlink with every combination of permissions I can think of, including full access, and it gives the same error always
<Camarade_Tux>
I'm almost sure the problem is with permissions since I had that issue too but I also think I just wipped any restriction at once
<kaustuv>
Well, I can live with statically linked native code for now, which already works. Thanks for your help.
julm has quit [Remote closed the connection]
julm has joined #ocaml
<Camarade_Tux>
btw, my cygwin install is about 500MB but I don't think many people get something that small
<albacker>
gotta read the documentation for scanf tomorrow.. i just 'tried to figure out' how it should work.
<flux>
you need to do the while loop something like: try while true do my_list := Scanf.. :: !my_list done; assert false with End_of_file -> List.rev !my_list
<albacker>
assert??
<flux>
well
<flux>
it's one way
<flux>
I actually didn't notice the end of the clip, so maybe you didn't think of doing it that way at all
<flux>
I thought you'd first construct a list
<flux>
(from input)
<flux>
actually your idea can be modified to suit this better
<flux>
so it'd be something like:
<albacker>
what i do is make a ref to [] and pass it as argument and modify it at the other side( the other func )
<flux>
while (try Scanf.. (fun a b -> my_list := (a, b)::!my_list); true with End_of_file -> false) do () done
<flux>
I think it's a lot cleaner if you just called the my_func and then did the assignment in the earlier place
<flux>
btw, you must place my_func before you call it
<albacker>
its not even good written, just smth very fast.. to tell you my idea.
smimou has quit ["bli"]
<albacker>
sorry for wasting your time and thanks for the help.
<albacker>
tomorrow i'll give a deeper look to scanf, and also i'll try to figure out how the try/do/assert you used there works.
<albacker>
thanks for the help.
onigiri has joined #ocaml
julm has quit [Remote closed the connection]
julm has joined #ocaml
albacker has quit ["__"]
myst has joined #ocaml
myst has quit [Client Quit]
myst has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
myst has quit []
myst has joined #ocaml
betehess has joined #ocaml
betehess has quit ["Ex-Chat"]
<Camarade_Tux>
hmmm, with ocamlfind, I need to install .h files along with the .cma, how should the META file look like?
<Camarade_Tux>
currently I have "archive(byte) = lib.cma"
<Camarade_Tux>
oh crap, it's not the place I should do that ><
<Camarade_Tux>
a few minutes ago I was wondering whether I would code a bit and go to bed or go to bed and code a bit on tomorrow, think I got the answer :P
onigiri has quit []
Ched has quit [Read error: 113 (No route to host)]
maskd has quit [pratchett.freenode.net irc.freenode.net]