araujo has quit ["Programs must be written for people to read, and only incidentally for machines to execute"]
Herrchen has joined #ocaml
Herrchen has quit [Client Quit]
Herrchen has joined #ocaml
Snark has joined #ocaml
vincenz has joined #ocaml
<Snark>
slt
_fab has joined #ocaml
Submarine has joined #ocaml
mlh_ has quit ["who are you people and what are you doing in my computer!?"]
pango has quit [Remote closed the connection]
Saulzar has joined #ocaml
pango has joined #ocaml
haakonn has joined #ocaml
<haakonn>
when matching a list, can i deconstruct it into (all its members except the last one, last member)?
<pango>
no
<_fab>
haakonn: not with a single pattern
<haakonn>
i see, oh well
<pango>
lists aren't symetric
<haakonn>
symmetric as in how?
<mflux_>
haakonn, you could consider List.rev'ing the list before the match, if that's of any use..
<haakonn>
mflux_: heh, not a bad idea
<pango>
haakonn: as in, access to the first elements is different from the access to the last
<haakonn>
pango: true
Demitar has quit [brown.freenode.net irc.freenode.net]
Banana has quit [brown.freenode.net irc.freenode.net]
mellum has quit [brown.freenode.net irc.freenode.net]
Submarine has quit [brown.freenode.net irc.freenode.net]
_fab has quit [brown.freenode.net irc.freenode.net]
whee has quit [brown.freenode.net irc.freenode.net]
det has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
cmeme has joined #ocaml
batdog|gone has quit [brown.freenode.net irc.freenode.net]
Saulzar has quit [brown.freenode.net irc.freenode.net]
pango has quit [brown.freenode.net irc.freenode.net]
noj has quit [brown.freenode.net irc.freenode.net]
mauke has quit [brown.freenode.net irc.freenode.net]
haakonn has quit [brown.freenode.net irc.freenode.net]
johs has quit [brown.freenode.net irc.freenode.net]
sieni has quit [brown.freenode.net irc.freenode.net]
calvin_ has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
Hipo has quit [brown.freenode.net irc.freenode.net]
shrimpx has quit [brown.freenode.net irc.freenode.net]
_shawn has quit [brown.freenode.net irc.freenode.net]
mflux_ has quit [brown.freenode.net irc.freenode.net]
joo_ has quit [brown.freenode.net irc.freenode.net]
haakonn has joined #ocaml
_shawn has joined #ocaml
mauke has joined #ocaml
sieni has joined #ocaml
johs has joined #ocaml
calvin_ has joined #ocaml
shrimpx has joined #ocaml
Hadaka has joined #ocaml
mflux_ has joined #ocaml
Hipo has joined #ocaml
joo_ has joined #ocaml
pango has joined #ocaml
noj has joined #ocaml
batdog|gone has joined #ocaml
Saulzar has joined #ocaml
Banana has joined #ocaml
<pango>
putting a name on "anything but the last n elements of a list" means constructing that list, so I'd bet no solution will be more efficient than using List.rev
calvin__ has joined #ocaml
sieni has quit [brown.freenode.net irc.freenode.net]
haakonn has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
calvin_ has quit [brown.freenode.net irc.freenode.net]
mauke has quit [brown.freenode.net irc.freenode.net]
johs has quit [brown.freenode.net irc.freenode.net]
Hipo has quit [brown.freenode.net irc.freenode.net]
shrimpx has quit [brown.freenode.net irc.freenode.net]
shrimpx_ has joined #ocaml
haakonn has joined #ocaml
Hipo has joined #ocaml
sieni has joined #ocaml
johs has joined #ocaml
mauke has joined #ocaml
mellum has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
det has joined #ocaml
Demitar has joined #ocaml
_fab has joined #ocaml
Submarine has joined #ocaml
<Saulzar>
Hmm, what is the story with using multiple files/modules which may depend on another module? I've got it so omake uses a scanner rule to order them with ocamldep .. but not sure how to (excuse C++ term) "include" the signature ...
vodka-goo has joined #ocaml
<Snark>
no need to include the signature I think
<Snark>
to use type 'foo' defined in module 'Bar'
<Snark>
either use Bar.foo
<Snark>
or open Bar at the beginning of the file, then just use foo
<Saulzar>
I'm using Bar.foo - but it can't find it as it's trying to compile that file independantly of the file with the Bar module..
<Saulzar>
Hmm, but ocamlc seems to produce the .cmi by itself
<pango>
.mli are optional, if you don't create a .mli, everything declared at toplevel is visible
<Saulzar>
Well I have a module called phrase - it compiles that first, outputs phrase.cmo and phrase.cmi - then tries to compile phraselist and it won't find module 'Phrase'
<Saulzar>
Which is declared at the top level of phrase.ml
<Saulzar>
Hmm, actually it says it cannot find a constructor for a type inside that module, is that different?
<Saulzar>
Though it is qualified as 'Phrase.t'
<Saulzar>
Hmm, but if I explicitly 'open Phrase;;' it seems to work
<pango>
if you don't want to link, use ocamlc -c
<pango>
ocamlc -c phrase.ml
<pango>
ocaml -c phraselist.ml
<pango>
ocamlc phrase.cmo phraselist.cmo
<pango>
(s/ocaml/ocamlc/)
<pango>
or even ocamlc -o myproject phrase.cmo phraselist.cmo
<Saulzar>
Yeah, that's what I'm doing - I've got an omake file
<pango>
then it's not purely a problem of separate compilation...
<pango>
some identifier(s) must lack Phrase. prefix
<pango>
(that's my guess, at least)
<Saulzar>
The error it gives is "Unbound type constructor Phrase.t"
<mflux_>
hmm.. something like 't' cannot be a constructor?
<mflux_>
or maybe I'm just reading too much to the error message
<Saulzar>
Sure? It seems to work otherwise
<mflux_>
maybe you can reproduce a minimal testcase for the problem
<mflux_>
what I was thinking is that constructors begin with Capitals
<Saulzar>
I have this in one file -> "module Phrase = struct type t = string list" and in the other "module PhraseList = struct type abcd = Phrase.t"
<mflux_>
those are the contents of the file?
<Saulzar>
Where it gives the error on "type abcd = Phrase.t"
<pango>
Saulzar: separate compilation implicitly declares a module
<pango>
Saulzar: by using 'module' within Phrase.ml, you're declaring a Phrase.Phrase module
<Saulzar>
Ohh..
<Saulzar>
That makes sense now :)
<Saulzar>
Thanks a lot!!
whee has joined #ocaml
_fab has quit [brown.freenode.net irc.freenode.net]
Demitar has quit [brown.freenode.net irc.freenode.net]
det has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
mauke has quit [brown.freenode.net irc.freenode.net]
Saulzar has quit [brown.freenode.net irc.freenode.net]
batdog|gone has quit [brown.freenode.net irc.freenode.net]
pango has quit [brown.freenode.net irc.freenode.net]
noj has quit [brown.freenode.net irc.freenode.net]
mflux_ has quit [brown.freenode.net irc.freenode.net]
_shawn has quit [brown.freenode.net irc.freenode.net]
joo_ has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
johs has quit [brown.freenode.net irc.freenode.net]
Hipo has quit [brown.freenode.net irc.freenode.net]
shrimpx_ has quit [brown.freenode.net irc.freenode.net]
Herrchen has quit [brown.freenode.net irc.freenode.net]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
mattam has quit [brown.freenode.net irc.freenode.net]
cognominal has quit [brown.freenode.net irc.freenode.net]
erg has quit [brown.freenode.net irc.freenode.net]
haakonn has quit [brown.freenode.net irc.freenode.net]
calvin__ has quit [brown.freenode.net irc.freenode.net]
Banana has quit [brown.freenode.net irc.freenode.net]
rossberg has quit [brown.freenode.net irc.freenode.net]
rossberg has joined #ocaml
erg has joined #ocaml
cognominal has joined #ocaml
mattam has joined #ocaml
ulfdoz has joined #ocaml
Herrchen has joined #ocaml
cmeme has joined #ocaml
_shawn has joined #ocaml
mflux_ has joined #ocaml
joo_ has joined #ocaml
pango has joined #ocaml
noj has joined #ocaml
batdog|gone has joined #ocaml
Saulzar has joined #ocaml
Banana has joined #ocaml
calvin__ has joined #ocaml
shrimpx_ has joined #ocaml
haakonn has joined #ocaml
Hipo has joined #ocaml
johs has joined #ocaml
mauke has joined #ocaml
Hadaka has joined #ocaml
det has joined #ocaml
Demitar has joined #ocaml
_fab has joined #ocaml
Saulzar has quit [brown.freenode.net irc.freenode.net]
Saulzar has joined #ocaml
mrvn has joined #ocaml
Godeke has joined #ocaml
mrvn_ has joined #ocaml
MisterC has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
_fab has quit [Read error: 131 (Connection reset by peer)]
_fab has joined #ocaml
_skal has joined #ocaml
MisterC has quit ["Client exiting"]
_JusSx_ has joined #ocaml
batdog|gone is now known as batdog
_skal has quit [Remote closed the connection]
MisterC has joined #ocaml
vezenchio has joined #ocaml
wren42 has joined #ocaml
<wren42>
Does anyone know the mechanism OCaml uses to "break" in Windows? In linux it uses signals, but Windows doesn't HAVE signals ;)
<Snark>
no idea
<Snark>
read the sources? ;-)
<wren42>
Snark: I will if I can't find anyone who knows the answer ;)
<wren42>
Snark: It's often much faster to just ask ^.^
<mellum>
Huh? Windows doesn't have signals? It's part of the C standard...
<wren42>
mellum: It's part of GNU, but I dunno about the C standard... but Windows certainly doesn't have signals.
<wren42>
mellum: It certainly ought to ;) But I'm biased.
mfurr has joined #ocaml
<pango>
if it doesn't, it must be emulated by cygwin/mingw/...
<wren42>
pango: It doesn't require either of those to be around, though I guess it could be compiled in.
<mellum>
I am certain that signal handling is part of the C standard. Not Posix, GNU, or anything, just plain C.
<Snark>
not sure at all
<Snark>
there are weird things in win32
<pango>
"Windows on the other hand supports only a small set of signals that is restricted to exception events only. Consequently, converting UNIX code to Win32 requires the use of new techniques replacing the use of some UNIX signals."
<pango>
no way to reliably provide an URL in that frame jungle..
_JusSx__ has joined #ocaml
_JusSx_ has quit [Read error: 110 (Connection timed out)]
vodka-goo has joined #ocaml
gim has quit ["bbs"]
wren42 has left #ocaml []
araujo has joined #ocaml
vodka-goo has quit [Remote closed the connection]
gim has joined #ocaml
Submarine has quit ["Leaving"]
_JusSx_ has joined #ocaml
Submarine has joined #ocaml
_fab has quit [Read error: 104 (Connection reset by peer)]
mrvn_ has quit [Read error: 145 (Connection timed out)]
_JusSx__ has quit [Read error: 110 (Connection timed out)]
wren42 has joined #ocaml
wren42 has left #ocaml []
_fab has joined #ocaml
wren42 has joined #ocaml
wren42 has quit [Client Quit]
mrsolo has joined #ocaml
demitar_ has joined #ocaml
mrvn has joined #ocaml
Demitar has quit [Read error: 145 (Connection timed out)]
vodka-goo has joined #ocaml
monochrom has joined #ocaml
cmeme has quit [Connection reset by peer]
cmeme has joined #ocaml
pango has quit ["Leaving"]
Submarine has quit ["Leaving"]
pango has joined #ocaml
sond_ has joined #ocaml
Frederick has joined #ocaml
<Frederick>
can anyone here help me with using mapstring fucntion in ml?
Msandin has joined #ocaml
haakonn has quit [Read error: 113 (No route to host)]
Snark has quit ["Leaving"]
Msandin has left #ocaml []
sieni has quit [Read error: 110 (Connection timed out)]
_fab has quit [Read error: 113 (No route to host)]
<ulfdoz>
bye
<Frederick>
can you please help me with ml?
<pango>
Frederick: still on your mapstring function ?
<Frederick>
pango yup, but now im trying a different approach but with no sicces
<Frederick>
*succes
sond_ has quit [Read error: 110 (Connection timed out)]
<pango>
mmmh... didn't know about that textio lib...
<Frederick>
pango textIO.openin is opening my file,
<Frederick>
in fact i have 2 text files 1 with a text the other with a dictionary I need to check and replace words on the text based on the dictionary in order to do I I need to remove things like , and . from the original stream because witout it house. is diferente from house
<pango>
you don't need to "remove" them explicitly. Just have a lexical parser stop at first non-alphanumeric character found
<Frederick>
but how can I evaluate the hole text this way?
<pango>
do you need to "evaluate to whole text" ? You didn't say precisely what you were doing (what kind of dictionary, what kind of replacements,...)
<pango>
if you replace words without changing their order, you don't need to know the whole text at once