gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released
Amorphous has joined #ocaml
slash_ has quit [Quit: Lost terminal]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
segmond has quit [Ping timeout: 260 seconds]
sshc has quit [Quit: leaving]
elehack has quit [Quit: Goodbye...]
travisbrady has quit [Quit: travisbrady]
mfp has quit [Ping timeout: 245 seconds]
mfp has joined #ocaml
derdon has quit [Ping timeout: 240 seconds]
_unK has quit [Remote host closed the connection]
<thelema>
wow, colorful
Hodapp has left #ocaml []
<thelema>
but no show type at point...
jeddhaberstro has quit [Quit: jeddhaberstro]
enthymeme has joined #ocaml
neorab has joined #ocaml
<thelema>
ah, it auto-detects the needed modules nd enables when they're there. if only it hadn't eaten my .emacs.d/ dir
sshc has joined #ocaml
sshc_ has joined #ocaml
sshc has quit [Ping timeout: 245 seconds]
valross has joined #ocaml
sshc_ has quit [Ping timeout: 260 seconds]
thrasibule has joined #ocaml
thrasibule has quit [Ping timeout: 276 seconds]
pad has quit [Remote host closed the connection]
sshc has joined #ocaml
sshc has quit [Read error: Connection reset by peer]
sshc has joined #ocaml
sshc has quit [Remote host closed the connection]
sshc has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
ulfdoz has joined #ocaml
ttamttam has joined #ocaml
Shoggoth has joined #ocaml
ttamttam has quit [Quit: Leaving.]
schmx has quit [Ping timeout: 265 seconds]
schmx has joined #ocaml
ygrek_ has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
M| has quit [Ping timeout: 252 seconds]
Submarine has joined #ocaml
M| has joined #ocaml
ttamttam has joined #ocaml
oc13 has joined #ocaml
spearalot has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Submarine has quit [Quit: Leaving]
M| has quit [Ping timeout: 260 seconds]
M| has joined #ocaml
f[x] has joined #ocaml
munga has joined #ocaml
f[x] has quit [Ping timeout: 240 seconds]
f[x] has joined #ocaml
ftrvxmtrx has joined #ocaml
valross has quit [Quit: Ex-Chat]
f[x] has quit [Remote host closed the connection]
M| has quit [Read error: Operation timed out]
ygrek_ has quit [Ping timeout: 245 seconds]
munga_ has joined #ocaml
ygrek_ has joined #ocaml
Guest60603 has left #ocaml []
jcaose-60603 has joined #ocaml
f[x] has joined #ocaml
myu2 has joined #ocaml
myu2 has quit [Remote host closed the connection]
myu2 has joined #ocaml
myu2 has quit [Remote host closed the connection]
myu2 has joined #ocaml
M| has joined #ocaml
ikaros has joined #ocaml
Yoric has joined #ocaml
ygrek_ has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
myu2_ has joined #ocaml
myu2 has quit [Ping timeout: 240 seconds]
munga_ has quit [Ping timeout: 252 seconds]
munga has quit [Ping timeout: 264 seconds]
Associat0r has joined #ocaml
avsm has joined #ocaml
Associat0r has quit [Quit: Associat0r]
albacker has joined #ocaml
myu2_ has quit [Remote host closed the connection]
myu2 has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
oc13 has quit [Quit: oc13]
derdon has joined #ocaml
ftrvxmtrx has quit [Read error: Connection reset by peer]
Associat0r has joined #ocaml
myu2 has quit [Remote host closed the connection]
thrasibule has joined #ocaml
ftrvxmtrx has joined #ocaml
thrasibule has quit [Ping timeout: 258 seconds]
myu2 has joined #ocaml
segmond has joined #ocaml
joewilliams_away is now known as joewilliams
bzzbzz has joined #ocaml
<albacker>
I'd like to use the functions found in /usr/local/lib/ocaml/3.10.2/netclient/http_client.mli but i don't see what should i `#require` or `open` in the toplevel? should i do open Http_client?
<orbitz>
yes
<albacker>
but it says Unbound module Http_client
<orbitz>
you probably need to add it to your search path some how
<orbitz>
do you have a cmo or cmx?
<orbitz>
or cma
<albacker>
http_client_mt.cmx
<albacker>
it's found in the same directory as the mli file.
<albacker>
once i'm on that directory it works, otherwise it doesn't.
<mehdid>
yeah... but can you use any of its symbols?
<albacker>
no
<mehdid>
:)
<albacker>
Unbound value http_get
<mehdid>
you still have to load to cma (or cmo) to be able to access its symbols
spearalot has joined #ocaml
<albacker>
i don't really understand how ocaml manages all its libraries :/ .
<mehdid>
the standard library path is taken into account by default (/usr/local/lib/ocaml/3.10.2/)
<mehdid>
if you have something outside (or even in a subdir), then you have to include it (-I$path)
<mehdid>
that's to help to find what's needed
<mehdid>
then, you have to tell which cmo (or cma) are you going to use
<mehdid>
that's all
<mehdid>
findlib helps to do that and manages dependencies. Its verbose mode shows the invoked command, which helps if you want to see what's doing behind the scenes.
<gildor>
albacker:
<gildor>
#use "topfind";;
<gildor>
#require "netclient";;
<gildor>
open Http_client;;
<mehdid>
that's quite a black-magic for a beginner :)
<albacker>
gildor, ok thankyou :)
<gildor>
mehdid: you always begin by black magic
<gildor>
then you understand
<mehdid>
:)
<albacker>
gildor, /usr/local/lib/ocaml/3.10.2/netclient/netclient.cma: loaded , this is the only .cma from that directory. I still can't use http_get for example.
<gildor>
mehdid: can I pay you a visit next Thursday to get back my switches?
<mehdid>
yes, sure
<gildor>
when ?
myu2 has quit [Remote host closed the connection]
<mehdid>
as you like
<mehdid>
gildor: just let me know when :)
avsm has quit [Quit: Leaving.]
ftrvxmtrx has quit [Quit: Leaving]
myu2 has joined #ocaml
myu2 has quit [Remote host closed the connection]
prince has joined #ocaml
schmx has quit [Ping timeout: 265 seconds]
schmx has joined #ocaml
schmx has quit [Changing host]
schmx has joined #ocaml
th5 has joined #ocaml
spearalot has quit [Quit: -arividerchi]
<hcarty>
mrvn: Have you reported the a bug on Mantis related to your recent mailing list thread?
<hcarty>
mrvn: I've run in to what seems to be the same bug. I can't offer any further suggestions, but I would like to track its progress if it's been reporte.
<hcarty>
reported that is
<mrvn>
hcarty: not yet. Still hoping someone might offer a suggestion why it actualy complains
avsm has joined #ocaml
ccasin has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
wvd has joined #ocaml
<wvd>
Are there any preferred recommendations when learning OCaml, and what are the best books?
myu2 has joined #ocaml
<derdon>
wvd: the official tutorial, ocaml-tutorial.org, and the o'reilly book
<wvd>
but would it be preffered to first learn a functional language such as Haskell?
<derdon>
maybe we should put these links to the topic of this channel
<derdon>
wvd: it doesn't matter
<wvd>
Since I don't have any experience in functional languages so far.
<albacker>
thelema, i'll have to find its hex value :)
<albacker>
adrien, thanks
<thelema>
then no problem. you won't find hex values for characters, though - only bytes
<adrien>
albacker: where is your input from? web? yourself? what kind of control do you have over it?
<albacker>
adrien, myself probably. but as i see i'll have to change the editors charset also, no?
<thelema>
if you want accented characters to come out as a single byte, then yes
sepp2k has quit [Remote host closed the connection]
<adrien>
ok, and considering murphy law, you better not assert anything about the encoding, camomile sounds here imho
<adrien>
albacker: what do you plan to do after? I mean, why do you need the value?
<albacker>
adrien, its just a script i wrote some times ago. i just figured out it doesn't work as it should for accented characters (it's a pastebin tool)
boscop_ has quit [Read error: Connection reset by peer]
_unK has quit [Remote host closed the connection]
ttamttam has quit [Quit: Leaving.]
sdschulze has joined #ocaml
boscop has joined #ocaml
<adrien>
albacker: well, you need to handle the case where chars are stored on more than one byte anyway or you'll be bitten sooner or later (apparently sooner), and you probably don't need camomile
<adrien>
but I'm pretty tired right now so I can't even read your code :-)
* adrien
fells dead on the floor
<albacker>
hehe, it's ok you don't have to read my code. anyways it's not that elegant..
<albacker>
any hint on how to handle that case?
<albacker>
this is the line that reads characters from the file : let cur = input_char inch in
<thelema>
ah, you just want to hex encode anything that needs hex-encoding?
<adrien>
albacker: so, what you need is change the encoding before sending it?
<thelema>
%XX
<adrien>
thelema put it better than me ;p
<albacker>
thelema, well yes, but that brought more questions..
<thelema>
you're hex-encoding everything but \r and \n?
<thelema>
err, \t
<albacker>
yes
<albacker>
i couldn't see how to hex encode those.
<thelema>
let asciivalue = Char.code ch in
sdschulze has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<albacker>
in fact at first i only placed %20 for ' ' and that was it, but later saw that i needed to do the same about '?' and '&' because the tended to fuck up the URL, so i thought.. i'll just hex everything so i won't have to think a lot :P
<thelema>
there's a specific list of chars that are recommended to hex encode - in the URL RFC, IIRC
sdschulze has joined #ocaml
sdschulze has quit [Remote host closed the connection]
sdschulz` has quit [Remote host closed the connection]
<albacker>
thelema, if you see in the gethex function at the end i have :
<albacker>
with
<albacker>
Not_found -> string_of_char ch
<albacker>
so normally if the char is not there i'll just send a string containing that char. but in my case it wasn't working.
<thelema>
you must hex-encode anything outside printable us-ascii: The octets 80-FF hexadecimal are not used in US-ASCII, and the octets 00-1F and 7F hexadecimal represent control characters; these must be encoded.
<thelema>
your gethex is still wrong, as it only encodes what's in the string, and if you need to url-encode this data, you should do it correctly, and url-encode all control characters (including utf8)
<thelema>
but it looks like the problem is now that pastebin doesn't expect UTF8 (or recognize it)
<thelema>
I dunno what pastebin is expecting, or if you can set some flag in curl to tell pastebin that your data is UTF8
<albacker>
yeah, maybe.. i'll see that. if i copy/paste the char inside the file in pastebin it will show correctly.
<thelema>
because there's a ton of conversions going on - when you paste, and when you submit
<thelema>
bah, even the source for pastebin is gpl, the download link doesn't go anywhere
segmond has quit [Ping timeout: 248 seconds]
museun has joined #ocaml
<albacker>
what i thought doing was create a table like this http://www.asciitable.com/ , compare every char to chars of the table than once i find the char i was searching for convert it, but still im not sure if i can compare chars since not always the files will be in latin.
avsm has quit [Quit: Leaving.]
<albacker>
there's a val set_encoding : t -> curlEncoding -> unit
joewilliams is now known as joewilliams_away
<albacker>
but i don't think it's this one.
<albacker>
i'll start writing everything in latex mode now. even accented characters \'e etc. :P
<thelema>
albacker: the set_encoding might work. - try it.
<albacker>
type curlEncoding =
<albacker>
| CURL_ENCODING_NONE
<albacker>
| CURL_ENCODING_DEFLATE
travisbrady has joined #ocaml
<thelema>
nope, nevermind
myu2 has quit [Remote host closed the connection]
ttamttam has joined #ocaml
Yoric has quit [Quit: Yoric]
ztfw has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ikaros has joined #ocaml
ulfdoz has joined #ocaml
ygrek has joined #ocaml
willb has joined #ocaml
ttamttam has quit [Quit: Leaving.]
iratsu has quit [Ping timeout: 240 seconds]
iratsu has joined #ocaml
Submarine_ has joined #ocaml
wvd has quit [Ping timeout: 260 seconds]
oriba has quit [Quit: Verlassend]
ztfw has joined #ocaml
enthymeme has joined #ocaml
_unK has joined #ocaml
ftrvxmtrx has joined #ocaml
joewilliams_away is now known as joewilliams
Submarine_ has quit [Ping timeout: 240 seconds]
ztfw has quit [Remote host closed the connection]
Submarine_ has joined #ocaml
Submarine_ has quit [Ping timeout: 276 seconds]
ulfdoz has quit [Ping timeout: 258 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
ygrek has quit [Ping timeout: 245 seconds]
fschwidom has joined #ocaml
ccasin has quit [Quit: Leaving]
pad has joined #ocaml
brendan has quit [Ping timeout: 258 seconds]
fraggle_ has quit [Remote host closed the connection]
derdon has quit [Ping timeout: 240 seconds]
somnium has quit [Remote host closed the connection]
brendan has joined #ocaml
brendan has quit [Read error: Operation timed out]
albacker has quit [Quit: .]
brendan has joined #ocaml
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 276 seconds]
myu2 has joined #ocaml
iratsu has quit [Ping timeout: 248 seconds]
oriba has joined #ocaml
oriba has quit [Client Quit]
myu2 has quit [Remote host closed the connection]
thrasibule has joined #ocaml
rudi_s has quit [Quit: leaving]
rudi_s has joined #ocaml
boscop has quit []
thrasibule has quit [Ping timeout: 252 seconds]
kg4qxk has quit [Quit: So long, and thanks for all the fish!]