sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
<malc_>
Eridius: which version of ocaml do you use?
<Eridius>
3.09.3
<malc_>
just checking.. ability to produce/link against sos in MacOS X was introduced in 3.09
<Eridius>
so then I wonder why it's not working
<malc_>
no idea
* Eridius
wishes ocamlfind offered a standard way to destroot stuff, e.g. with an env var - I'm writing portfiles (packages for MacPorts) for extlib and pcre-ocaml and I'm having to patch the build systems to pass -destdir to ocamlfind install, after calling `ocamlfind printconf destdir' myself
<malc_>
Why not asking the author to implement it? Describing your pains on the channel is hardly of any use.
<Eridius>
perhaps I will. right now I'm just trying to learn OCaml
batdog is now known as batdog|gone
gunark has quit ["Konversation terminated!"]
malc_ has quit ["leaving"]
pango_ has joined #ocaml
Submarine has quit ["Leaving"]
pango has quit [Remote closed the connection]
smimou has quit ["bli"]
MisterC has joined #ocaml
Skal has quit [Connection timed out]
sponge45 has joined #ocaml
danly has quit ["Leaving"]
tolchz has joined #ocaml
<tolchz>
I am wondering why the type of this is so:
<tolchz>
# let imply v = match v with
<tolchz>
(true,x) -> x
<tolchz>
| (false,x) -> true;;
<tolchz>
val imply : bool * bool -> bool = <fun>
<tolchz>
Why bool bool -> bool, and not bool 'a ->bool ?
<tolchz>
ahh, I guess it's because the return values must be the same, since the second case returns a bool, the first must as well
<tolchz>
nevermind...
<Eridius>
in a quick test, it does seem like a match wants to return the same type from all branches
ikaros has quit [Connection timed out]
<tolchz>
I'm reading the O'Reilly book and it had that equivalent to a function that matches on all possible values [(true,true),(true,false),(false,false),(false,true)], didn't understand why they were equivalent at first
Smerdyakov has quit [Read error: 104 (Connection reset by peer)]
ikaros has joined #ocaml
Smerdyakov has joined #ocaml
batdog|gone is now known as batdog
* Eridius
ponders.. malc said 3.09 introduced the ability to dynamic link on os x, but I just did a #require "num" and it told me it cannot load shared library dllnums because dynamic loading not supported on this platform... wtf?
<Eridius>
blah.. I just took a gander at ocaml's configure script. it only checks for powerpc-apple-darwin*, not for i686-apple-darwin*
<Eridius>
any reason for this
<Eridius>
?
<Eridius>
apparently not. fixing it is causing zero problems
tolchz has quit ["using sirc version 2.211+KSIRC/1.3.12"]
Riesz has joined #ocaml
<Riesz>
hi
ChoJin has joined #ocaml
batdog is now known as batdog|gone
postalchris has quit ["Leaving."]
ramkrsna has joined #ocaml
buluca has joined #ocaml
ChoJin has quit ["This computer has gone to sleep"]
david_koontz has joined #ocaml
ramkrsna has quit [Read error: 104 (Connection reset by peer)]
ramkrsna has joined #ocaml
<tsuyoshi>
is x86 darwin out already?
<tsuyoshi>
I didn't know that
<Eridius>
Mac OS X
<Eridius>
not opendarwin
* Eridius
submitted a patch for the MacPorts Portfile of ocaml so it will know about i686-apple-darwin
<Eridius>
but this should be fixed on ocaml's side
<tsuyoshi>
yeah
<tsuyoshi>
osx for x86.. I didn't think that was out already
<tsuyoshi>
what is this opendarwin? I never heard of that
<Eridius>
you do know that apple's entire product line is intel, right?
<tsuyoshi>
I heard something about switching to intel
<Eridius>
oh, opendarwin was an open source effort that lasted 4 years to provide support for darwin-only installations
<tsuyoshi>
but I didn't know they already did that
<Eridius>
oh yeah, they started over a year ago
<Eridius>
and as of august, they announced the last few product lines that switched over
<tsuyoshi>
well.. let me tell you what I think of macs
<tsuyoshi>
I use linux exclusively at home and work
<tsuyoshi>
and I'm in a school computer center now
<tsuyoshi>
I used to use the macs when I came in here, because they were unix etc.
<tsuyoshi>
but I got sick of using their crappy terminal program
<tsuyoshi>
so instead I use windows and putty
<Eridius>
Terminal.app isn't crappy. it has a few flaws, sure, but it's hardly crappy
<Eridius>
what do you find better about PuTTY?
<tsuyoshi>
utf8 support
<Eridius>
erm, Terminal.app has full UTF-8 support
<tsuyoshi>
I can't read my email in the osx terminal
<Eridius>
and has had it since forever
<tsuyoshi>
it screws up japanese characters
<Eridius>
you probably forgot to set LANG so your email program wasn't spitting out UTF-8
<tsuyoshi>
it's using utf8
<tsuyoshi>
lang is set
Smerdyakov has quit ["Leaving"]
<Eridius>
ok, then the preferences for Terminal.app might have been changed by someone else
<tsuyoshi>
nope
<Eridius>
since it defaults to UTF-8 for the window
<tsuyoshi>
ok maybe it's not the utf8 support
<Eridius>
ok, either somebody changed Terminal.app's preferences, or the program wasn't spitting out UTF-8
<tsuyoshi>
but the wide character support
<Eridius>
because Terminal.app has full UTF-8 support
<tsuyoshi>
I set the encoding crap every time I come in here
<tsuyoshi>
I don't expect anyone else to use the same settings as me
<Eridius>
there's an option "Wide glyphs count as 2 columns". perhaps that's what you wanted?
<tsuyoshi>
yeah I tried that
<tsuyoshi>
didn't make any difference
<tsuyoshi>
but anyway
<Eridius>
if you hit ⌘S you can save a .term file which contains all the settings for the terminal, so you can double-click that to restore what you want
<tsuyoshi>
that's just one thing
<tsuyoshi>
there are hundreds of things that annoy me in osx
<Eridius>
well, I don't read japanese so I have no experience with double-wide characters, so I can't really tell you what's wrong there
<Eridius>
and yet.. you can use Windows
<tsuyoshi>
I despise windows too but it's better than osx
<Eridius>
that I find really hard to believe
<tsuyoshi>
me too!
<tsuyoshi>
I don't understand how they could have screwed up unix so much
<Eridius>
they didn't
<Eridius>
why do you claim they screwed it up?
<tsuyoshi>
I don't get pissed off when I use solaris or freebsd
<tsuyoshi>
but osx drives me up the wall
<tsuyoshi>
but anyway, that's just my personal preference
<tsuyoshi>
I was just trying to illustrate that I don't pay attention to what apple does
<Eridius>
heh
<tsuyoshi>
if someone made putty for osx, then I could probably deal with it
<tsuyoshi>
putty is ok
<Eridius>
Terminal.app is an overall very solid terminal emulator
<Eridius>
the biggest complaint by far is the lack of tabs
<Eridius>
and I don't recall PuTTY having tabs
<tsuyoshi>
I have to select utf8 and a decent japanese font every time I run it but oh well.. I'm not in japan so I can't expect good defaults for japanese
<tsuyoshi>
I use screen
<tsuyoshi>
I don't use tabs at all
<Eridius>
well, maybe if you were using a personal computer, you could keep the settings the way you like it. when using a public computer in an english-speaking country it's not going to be set up for japanese
<tsuyoshi>
yeah
<Eridius>
but again, you can save a .term file from Terminal.app and open it later to restore all your settings
<tsuyoshi>
luckily there are a lot of japanese kids at efl school here so they have japanese fonts installed already
<Eridius>
japanese fonts are installed by default
<Eridius>
you have to turn them *off* to not get japanese language support
<Eridius>
on OS X that is... I just realized you may be talking about windows/PuTTY
<tsuyoshi>
yeah
<tsuyoshi>
for all I know they're installed by default on windows too though
sponge45 has quit ["zzzzzzzzzz"]
Roughest has quit [Read error: 104 (Connection reset by peer)]
Roughest has joined #ocaml
ChoJin has joined #ocaml
_velco has joined #ocaml
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
mbishop` has joined #ocaml
mbishop has quit [Nick collision from services.]
mbishop` is now known as mbishop
mbishop` has joined #ocaml
mbishop has quit [Nick collision from services.]
mbishop` is now known as mbishop
love-pingoo has joined #ocaml
velco has joined #ocaml
revision17 has joined #ocaml
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
Submarine has joined #ocaml
ChoJin has quit ["This computer has gone to sleep"]
Submarine has quit ["Leaving"]
gim has quit [Read error: 60 (Operation timed out)]
<flux__>
I think you want to do .. (not (if_odd (n - 1)))
<flux__>
also 'or' can be written as ||
<flux__>
maybe I'm reading it wrong :-)
<scriptdevil>
yeah you are right.. silly me.. if_odd (n-1)
<scriptdevil>
not not if.. but anyway that is a needed change
<love-pingoo>
the use of &&, = and <> makes it not so easy to read, I think if/then/else would have made it simpler
<love-pingoo>
scriptdevil: (since you seem to be a beginner) did you know that if/then/else is an expression and not a statement, so you can use it anywhere ?
<scriptdevil>
i am a beginner...
<scriptdevil>
thanks
<love-pingoo>
scriptdevil: you may also have been an obfuscation lover ;)
<love-pingoo>
if_even n = if n=0 then true else if n=1 then false else if_odd (n-1)
<flux__>
scriptdevil, note that you don't take negative numbers into account
<scriptdevil>
i wanted to try haskell.. but did not find a good book.. uyou know.. it obfuscates.. and those white spaces.. :(
<scriptdevil>
flux__: i dont :P
<love-pingoo>
or: if_even = function 0 -> true | 1 -> false | n -> if_odd (n-1)
<scriptdevil>
u mean && 1 ->false
<scriptdevil>
sorry...
<scriptdevil>
it is right
<love-pingoo>
no that's a |
<love-pingoo>
like in match-with
<scriptdevil>
i havent come across -> yet
<scriptdevil>
thats the problem
<scriptdevil>
now i can understand it
asmanian has joined #ocaml
<love-pingoo>
I think that's the simplest writing.. that'd be almost the same in haskell, too
<scriptdevil>
love-pingoo: thanks
<scriptdevil>
which book should i use??
<scriptdevil>
the oreilly??
<love-pingoo>
no idea (I didn't learn in books)
<scriptdevil>
love-pingoo: :o
<scriptdevil>
what else?
<scriptdevil>
i mean pdfs
<love-pingoo>
there is the oreilly freely available on caml.inria.fr
<scriptdevil>
or html bundle
<love-pingoo>
and there is ocaml-tutorial.(something)
<scriptdevil>
i know.. i meant that
<scriptdevil>
ok
<love-pingoo>
scriptdevil: I learnt in courses, so I don't have a valuable advice
<scriptdevil>
Introduction to the Objective Caml
<scriptdevil>
Programming Language
<scriptdevil>
Jason Hickey
<scriptdevil>
September 4, 2002
<scriptdevil>
how is that
<scriptdevil>
thats a pdf i downloaded ages ago
<love-pingoo>
I don't know it. If you like it, keep reading ;) If you find it too complicated, look somewhere else..
<scriptdevil>
love-pingoo: thanks.. will be a regular here..
<scriptdevil>
bye
<scriptdevil>
:-h
scriptdevil has quit ["Lost terminal"]
<pango>
I don't mind the use of expressions with && and ||s :)
batdog|gone is now known as batdog
stevan_ has joined #ocaml
stevan has quit [Read error: 113 (No route to host)]
<love-pingoo>
pango: I can stand them too, but sometimes it's less readable and I suspected (rightly) that it wasn't complicated on purpose
Eridius has quit [Read error: 131 (Connection reset by peer)]
Eridius has joined #ocaml
love-pingoo has quit ["Leaving"]
asmanian has quit ["Verlassend"]
velco has quit ["Ex-Chat"]
velco has joined #ocaml
Aradorn has joined #ocaml
Smerdyakov has joined #ocaml
Eridius has quit []
Eridius has joined #ocaml
velco has quit ["Ex-Chat"]
david_koontz has quit ["Leaving"]
Eridius has quit []
Eridius has joined #ocaml
danly has joined #ocaml
ChoJin has joined #ocaml
Eridius has quit []
_velco has quit ["I'm outta here ..."]
beschmi has joined #ocaml
ChoJin has quit ["This computer has gone to sleep"]
Eridius has joined #ocaml
smimou has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
love-pingoo has joined #ocaml
bluestorm has joined #ocaml
Riesz_ has joined #ocaml
Riesz has quit [Read error: 54 (Connection reset by peer)]
buluca is now known as nick262267275
love-pingoo has quit ["Connection reset by pear"]
nick262267275 is now known as buluca
love-pingoo has joined #ocaml
gunark has joined #ocaml
postalchris has joined #ocaml
ramkrsna has quit [Remote closed the connection]
dark_light has joined #ocaml
shawn has quit [Read error: 104 (Connection reset by peer)]
Aradorn has quit ["This computer has gone to sleep"]
shawn has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
ramkrsna has joined #ocaml
malc_ has joined #ocaml
Jimmy_ has joined #ocaml
finchely has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
shawn has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
Jimmy_ has quit ["Leaving"]
<pauld>
More questions: can I test the type of an argument? Like (...) if a = Text.t then (etc)
<malc_>
no
<malc_>
if a = None (or other sum type) is valid though.. but pattern match provides more coverage
<pauld>
ok, thanks
<pauld>
is there some principle I should know about that explains why...?
<malc_>
erm.. value can have only one type, which is statically enforced at the compilation stage, after the code is compiled all the type information is lost
<malc_>
it's not a dynamically typed language, unlike say lisp or python. so it does not make much sense
<pauld>
ehmmm... of course. i get confused after using the interpreter that returns the type
Aradorn has joined #ocaml
postalchris has quit ["Leaving."]
bluestorm has quit ["Konversation terminated!"]
beschmi has quit ["Leaving"]
joshcryer has quit [Read error: 104 (Connection reset by peer)]