Alpounet changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html
tmaeda has quit [Read error: 60 (Operation timed out)]
jonafan_ has joined #ocaml
tmaeda has joined #ocaml
jonafan has quit [Read error: 60 (Operation timed out)]
<Alpounet> who develops ocamlbob ?
<Alpounet> I mean the names sound familiar but I can't put a pseudonym on them
<palomer> anyone wanna help me test my library:P
<Alpounet> palomer, haha
* palomer eyes Alpounet
<Alpounet> come oooon
<palomer> it'll go smoother this time, promise!
<Alpounet> heh
<Alpounet> how much time is it likely to need ?
<palomer> not much at all
* Camarade_Tux points at someone with a nickname starting with an A
<palomer> svn checkout http://oset.googlecode.com/svn/trunk/ oset-read-only
<Alpounet> Camarade_Tux, for testing palomer's library or for ocamlbob ?
<Alpounet> palomer, done
<Camarade_Tux> ocamlbob
<palomer> cd seditable && make install
<Alpounet> caligula_, acatout ?
jonafan has joined #ocaml
<Alpounet> Camarade_Tux*
<Camarade_Tux> nope
<Alpounet> Camarade_Tux, who ?
<palomer> then cd .. && make install
<Camarade_Tux> Alpounet: hint: hover your mouse cursor over the names on https://forge.ocamlcore.org/projects/ocamlbob/ :D
<Alpounet> palomer, type-conv is missing here, I'm installing it.
<palomer> actually, just type make install_sdl && make install
<palomer> sudo apt-get install libpcre-ocaml-dev libtype-conv-camlp4-dev libxml-light-ocaml-dev libsdl1.2-dev libsdl-ttf2.0-dev ocaml-findlib omake libsexplib-camlp4-dev libextlib-ocaml-dev camlp4-extra
<Alpounet> palomer, I'm running on Arch
<Alpounet> Camarade_Tux, I was sure you were Adrien
<Alpounet> haha
<Camarade_Tux> Alpounet: Asmadeus wrote it some months ago and I asked him for the source earlier today^W^Wyesterday and told him he could as well create a project on the forge ;-)
<Alpounet> nice idea
ccasin has quit [Read error: 60 (Operation timed out)]
<Camarade_Tux> it's in a very non-portable state :-)
<Alpounet> is it gonna replace mlbot ?
<Camarade_Tux> wasn't meant for #ocaml, afaik it's used for some random tasks on another
<Camarade_Tux> channel
<Alpounet> ok
<Camarade_Tux> bah, how can I imagine I'm going to make concurrent programs if I can't even manage the concurrency in my fingers when I type? ><
<Alpounet> palomer, make install_sdl is ok
<palomer> what about make install?
<Alpounet> and make install actually runs make install in seditable/
<Camarade_Tux> I have to say I'm pretty tired, my memory may be a bit off
<palomer> yeah, realized that:P
<Alpounet> ocamlfind install seditable META pa_seditable.cmo
<Alpounet> ocamlfind: Package seditable is already installed
<Alpounet> - (file /usr/lib/ocaml/site-lib/seditable/META already exists)
<Alpounet> make[1]: *** [install] Error 2
<Alpounet> make[1]: Leaving directory `/home/alp/ocaml/oset-read-only/seditable'
<Alpounet> make: *** [install] Error 2
<Camarade_Tux> "ocamlfind remove seditable"? (or is it uninstall?)
<Alpounet> no no
<Alpounet> no need
<Alpounet> I actually have to get it installed
<Alpounet> but it double-installs it
<Alpounet> palomer, well, it's okay now.
<Camarade_Tux> oh, I see
<palomer> go into getting-started/code/1-calculator
<palomer> try and compile it
<Alpounet> package 'oset' not found
<Alpounet> huh
<palomer> ocamlfind install oset META oset.cmxa oset.a oset.cma DejaVuSans.ttf *cmi <-- make didn't run this line?
<Alpounet> oh, no actually it stopped @ the seditable error
nagnatron has quit ["Lost terminal"]
<palomer> ahh, woops
<palomer> im tired
<palomer> didn't see that error
<Alpounet> :p
<palomer> do make reinstall
<Alpounet> yep
stan__ has quit [Connection timed out]
<palomer> does it work?
<Alpounet> Camlp4: Uncaught exception: DynLoader.Error ("/usr/lib/ocaml/pcre-ocaml/pcre.cma", "error loading shared library: dllpcre_stubs.so: dllpcre_stubs.so: cannot open shared object file: No such file or directory")
<Alpounet> interesting.
<palomer> oh, you're missing pcre
<Alpounet> no
<Alpounet> it's installed
<Alpounet> I just installed it
<Alpounet> :/
<palomer> oh, that's weird
<Asmadeus> Camarade_Tux: made an initial commit for ocamlbob, btw. I'll eventually clean the mess of hard coded path and write a set of common bot functions if you're too lazy to do that.. but not now ;p
<Camarade_Tux> Asmadeus: we'll see who do that, right now I only want to get my RPC working before I go to bed
<Camarade_Tux> it's been a long time I put anything on svn :P
<Camarade_Tux> \o/
<palomer> cd #svn
jonafan_ has quit [Connection timed out]
jonafan_ has joined #ocaml
<palomer> well, oset 0.2 is finally out (if anyone is interested)
<Camarade_Tux> tomorrow, need sleep right now :P
<julm> Alpounet: have you the right path in ocaml/ld.conf ?
<julm> gn Camarade_Tux
<Alpounet> julm, I only have :
<Alpounet> /usr/lib/ocaml/stublibs
<Alpounet> /usr/lib/ocaml
<Alpounet> /usr/lib/ocaml/site-lib/zip
<julm> and where is dllpcre_stubs.so ?
<Alpounet> /usr/lib/ocaml/pcre-ocaml/dllpcre_stubs.so
<Alpounet> ok, I'll just add pcre-ocaml/
<julm> hope it will be enough :/
<Alpounet> Camlp4: Uncaught exception: DynLoader.Error ("/usr/lib/ocaml/site-lib/seditable/pa_seditable.cmo", "interface mismatch on Pcre")
<Alpounet> I added seditable/ in ld.conf, too, in case ...
<julm> perhaps rebuilding seditable with your new pcre could fix that
<Alpounet> julm, doesn't work o_O
<julm> bleh :/
<julm> could you specify to seditable where to find pcre ?
<Alpounet> o_O
<Alpounet> dunno
<julm> ./configure --help ?
<Camarade_Tux> --<tab>
<julm> palomer: ^
* Camarade_Tux se cache, mais zsh ftw! :-)
<julm> those frenchies -_-
<Camarade_Tux> :P
<Camarade_Tux> commit messages hurt so much when you're tired :P
jonafan has quit [Read error: 110 (Connection timed out)]
<julm> mv Camarade_Tux /dev/bed
joewilliams has quit ["Leaving..."]
joewilliams has joined #ocaml
<Camarade_Tux> yup, commit done and pushed :-)
<Alpounet> palomer, sorry but gotta work on my own library, so I'll give a try to fixing that issue in the upcoming days.
<Camarade_Tux> btw, just ./me.sh && ./manager.native (also, it does view#load_uri ("http://" ^ address_bar#text), so if you load new pages, do not prepend "http://")
jonafan has joined #ocaml
jonafan_ has quit [Read error: 60 (Operation timed out)]
<palomer> hello
<palomer> sorry, was away
<palomer> there's no configure script
<palomer> camlp4 uses findlib to get pcre
<palomer> in seditable/OMakefile there's a OCAMLPACKS[] = ... pcre
_unK has quit [Remote closed the connection]
<palomer> I use pcre to check if regular expressions are well formed
<palomer> I could remove that check...
<palomer> seems pretty pointless considering that the source is checked anyways
<palomer> ok, checked removed
jonafan_ has joined #ocaml
TaXules has quit [Read error: 60 (Operation timed out)]
ikaros has quit ["Leave the magic to Houdini"]
Deformative has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
joewilliams has quit [Remote closed the connection]
Associat0r has quit []
efarrar has quit [Read error: 113 (No route to host)]
TaXules has joined #ocaml
bluestorm has quit [Read error: 113 (No route to host)]
valross has quit [Read error: 54 (Connection reset by peer)]
jeddhaberstro has joined #ocaml
struktured has joined #ocaml
Modius__ has joined #ocaml
Modius_ has quit [Read error: 110 (Connection timed out)]
valross has joined #ocaml
jeddhaberstro has quit [Client Quit]
mattam has joined #ocaml
caligula__ has joined #ocaml
Jan_Flanders has quit ["Chatzilla 0.9.75.1 [SeaMonkey 1.1.18/2009082513]"]
caligula_ has quit [Read error: 60 (Operation timed out)]
sporkmonger has joined #ocaml
CcSsNET has joined #ocaml
spicey has quit ["Leaving"]
sporkmonger has quit []
ccasin has joined #ocaml
joewilliams has joined #ocaml
ccasin has quit ["Leaving"]
valross has quit [Remote closed the connection]
Skolem has joined #ocaml
valross has joined #ocaml
joewilliams has quit [Remote closed the connection]
eldragon has left #ocaml []
valross has quit ["Ex-Chat"]
kaustuv has joined #ocaml
<kaustuv> Is there a way to marshal/unmarshal to/from a bigarray?
<kaustuv> Never mind. It seems fairly simple to rewire the marshalling code to write into a suitable bigarray.
kaustuv has quit ["ERC Version 5.3 (IRC client for Emacs)"]
tmaeda is now known as tmaedaZ
demitar has joined #ocaml
ygrek has joined #ocaml
fx_ has joined #ocaml
_zack has joined #ocaml
lloyd has joined #ocaml
ttamttam has quit ["Leaving."]
bluestorm has joined #ocaml
Associat0r has joined #ocaml
Alpounet has quit ["``Do what you think you can't do.'' -- E. Roosevelt"]
munga has joined #ocaml
lloyd is now known as lloydmoore
lloydmoore has quit ["gotta run"]
binaryten has joined #ocaml
qumak has joined #ocaml
<qumak> hi, i'm having trouble getting libraries i installed to work within emacs with tuareg mode
<qumak> when i #load "csv/csv.cma" (after loading extLib which it will complain about if not), when i try to run one of the commands, for instance Csv.load;; it tells me Unbound value Csv.load
<qumak> i think it must have loaded the csv.cma since it did not give an error with the load command
<qumak> but then it seems as if the commands from that lib are not present
<qumak> is there something obvious that i am missing?
<flux> qumak, #directory "csv";;
<flux> qumak, the interpreter must be able to find the .cmi-files also
<qumak> oh ok
<flux> qumak, however, you might prefer findlib. #use "topfind";; #require "csv";;
<flux> (atleast if the csv-package is installed system-wide)
<qumak> ok, so will that also load dependencies?
<flux> yes
<flux> #list will list installed packages
<qumak> oh it keeps getting better :)
<flux> and you can use the ocamlfind program for accessing the db from command line
<qumak> perfect
<qumak> it works like a charm!
<flux> happy hacking :)
<qumak> thank you
<qumak> much happier now, i wasted 4 hours trying to figure that out
<qumak> haha
<qumak> which was frustrating cause i knew it'd be something simple
jonafan has joined #ocaml
Alpounet has joined #ocaml
tmaedaZ has quit [Read error: 60 (Operation timed out)]
ygrek has quit [Remote closed the connection]
kaustuv has joined #ocaml
jonafan_ has quit [Read error: 110 (Connection timed out)]
Pimm has joined #ocaml
Pimm has quit [Remote closed the connection]
Pimm has joined #ocaml
tmaedaZ has joined #ocaml
_zack has quit ["Leaving."]
tmaedaZ is now known as tmaeda
munga_ has joined #ocaml
munga has quit [Read error: 113 (No route to host)]
_andre has joined #ocaml
Submarine has joined #ocaml
ski_ has joined #ocaml
qumak has quit ["Leaving"]
jonafan_ has joined #ocaml
<flux> bah, it's frustrating to write in a badly documented C interface lacking interfaces, when the feed back are either my asserts or segmentation faults from the library
<flux> and to add to the insult, I'm going threaded :)
<CcSsNET> threaded is nice
<CcSsNET> add opencl also
Submarine has quit ["Leaving"]
<flux> threading is not nice when it's not clear when you're supposed to be holding locks and when not..
<CcSsNET> assume ur holding a lock if something is being processed
<CcSsNET> idk sounds good
jonafan has quit [Read error: 110 (Connection timed out)]
munga_ has quit [Read error: 60 (Operation timed out)]
tmaeda is now known as tmaedaZ
<flux> ccssnet, how about situations when you don't know if a function you are calling requires a lock to be released, because it may require interacting with a background thread?
stan__ has joined #ocaml
munga_ has joined #ocaml
Oejet has joined #ocaml
ikaros has joined #ocaml
|Jedai| has joined #ocaml
<CcSsNET> i think thats a dark art
Jedai has quit [Read error: 110 (Connection timed out)]
<Alpounet> palomer, got your lib tested yet ?
<Camarade_Tux> kaustuv: nice one ;-)
demitar has quit [farmer.freenode.net irc.freenode.net]
acatout_ has quit [farmer.freenode.net irc.freenode.net]
jimmyb2187 has quit [farmer.freenode.net irc.freenode.net]
Amorphous has quit [farmer.freenode.net irc.freenode.net]
Dodek has quit [farmer.freenode.net irc.freenode.net]
maskd has quit [farmer.freenode.net irc.freenode.net]
noj has quit [farmer.freenode.net irc.freenode.net]
tonyIII has quit [farmer.freenode.net irc.freenode.net]
tonyIII has joined #ocaml
maskd has joined #ocaml
Dodek has joined #ocaml
noj has joined #ocaml
acatout_ has joined #ocaml
jimmyb2187 has joined #ocaml
Amorphous has joined #ocaml
demitar has joined #ocaml
<orbitz> CcSsNET: locks are teh devils work
_zack has joined #ocaml
CcSsNET has quit [Client Quit]
bluestorm has quit [Read error: 113 (No route to host)]
ksson has joined #ocaml
_unK has joined #ocaml
tmaedaZ is now known as tmaeda
ikaros has quit ["Leave the magic to Houdini"]
ikaros has joined #ocaml
ikaros has quit [Client Quit]
bluestorm has joined #ocaml
CcSsNET has joined #ocaml
stan__ has quit [Client Quit]
munga_ has quit [Read error: 113 (No route to host)]
bluestorm has quit [Read error: 60 (Operation timed out)]
<palomer> Alpounet, not yet
<palomer> im off to kentucky until the 29th, at which point testing will resume
<palomer> cya guys!
palomer has quit ["Leaving"]
Modius_ has joined #ocaml
fx_ has quit [Read error: 110 (Connection timed out)]
Modius__ has quit [Read error: 60 (Operation timed out)]
Pusdesris has joined #ocaml
Pusdesris has quit [Remote closed the connection]
Deformative has quit [Read error: 110 (Connection timed out)]
Modius_ has quit [Read error: 104 (Connection reset by peer)]
Modius_ has joined #ocaml
eldragon has joined #ocaml
Alpounet has quit ["``Do what you think you can't do.'' -- E. Roosevelt"]
joewilliams has joined #ocaml
Oejet has left #ocaml []
<Camarade_Tux> rwmjones: re the beginner-list: maybe the warning: "implicit declaration of function 'caml_enter_blocking_section'" (took me some time to see that)
* Camarade_Tux not here anymore
ygrek has joined #ocaml
<thelema> df
_zack has quit ["Leaving."]
jimmyb2187 has left #ocaml []
kaustuv has quit ["ERC Version 5.3 (IRC client for Emacs)"]
Pimm has quit [Read error: 60 (Operation timed out)]
<thelema> I'm surprised - core doesn't seem to have a bitset
det has quit [Read error: 104 (Connection reset by peer)]
det has joined #ocaml
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
jimmyb2187 has joined #ocaml
binaryten has quit [Read error: 60 (Operation timed out)]
ikaros has joined #ocaml
joewilliams has quit [Read error: 60 (Operation timed out)]
<thelema> This is very odd - I'm using findlib to load camlp4 into the toplevel
<thelema> It's definitely loading camlp4o.cma, but I get revised types being printed:
<thelema> # type a = int list;;
<thelema> type a = list int
<thelema> It only happens when I load aaa's syntax extensions, so it's not just findlib's fault
joewilliams has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
_andre has quit ["Lost terminal"]
<mfp> thelema: it happens when it loads pa_estring.cmo & pa_estring_top.cmo
<mfp> (i.e. #camlp4o;; #require "estring";; suffices to trigger it)
Associat0r has quit [Read error: 104 (Connection reset by peer)]
<thelema> is it because estring is compiled using revised syntax somehow?
<thelema> s/using/for/
<mfp> reduced to pa_estring_top.cmo
<mfp> thelema: seems to be a side effect of it reloading Camlp4Top.cmo
<mfp> it doesn't refer to the revised syntax AFAICS
<thelema> I tried to look too, but I don't see where the revised syntax is coming in either.
Associat0r has joined #ocaml
<mfp> is there any more efficient way to implement thread-local storage than a synchronized hashtbl indexed by Thread.id (Thread.self ())?
<thelema> ?? Isn't thread local storage as easy as defining local variables?
<flux> mfp, maybe using pthread's support for it from C?
<thelema> what you're describing seems like a good way to share state between threads
<flux> thread-local storage is not the same as local variables
<flux> it's like global variables, but they are thread-specific
<thelema> I don't see the difference - if it's global, all threads see it. If it's thread specific, onlt that thred sees it.
<thelema> These ideas don't seem to lead to something when I put them together.
<mfp> I'm trying to implement a logging sys for Lwt (+ POSIX threads) w/o having to add an explicit logger param everywhere
<flux> let's say you want ultra-efficient database connection spooling (yes, it sounds stupid..)
<flux> if you have thread-specific storage, you can just use the same connection for the same thread always, because no other thread will use the same connection at the same time
<flux> and you can do this without acquiring any locks etc
<thelema> is it that the value starts global, but when a thread modifies it, it becomes local?
<flux> because the object is already assigned to that _thread_
<mfp> no
<mfp> it's a value globally visible throughout the program
<mfp> but with a diff value on each thread
<mfp> code scope <> thread scope
<thelema> ok, each thread has their own copy of this value. How is this more than a local variable?
<mfp> you don't have to pass the local variable around
<mfp> consider my use case, logging/profiling
* thelema doesn't see any passing
<mfp> say I have val time : string -> ('a -> 'b) -> 'a
<thelema> ok
<mfp> and I want to do time "foo" (fun () -> time "bar" ((+) 1) 1) ()
<mfp> which should generate something like foo: xx ms of which: bar yy ms
<mfp> or more simply, foo: xx ms foo:bar: yy ms
<thelema> do you mean : string -> ('a -> 'b) -> 'a -> 'b?
<mfp> oops yes
<mfp> if this were single-threaded, I could do labels := label :: !labels on entry
<flux> hey, that have me an idea: let's say you want to implement Str, but thread-safe :-)
<flux> s/have/gave/
<mfp> then labels := List.tl !labels on exit
<thelema> mfp: I'm following you
<mfp> and I can use !labels to generate the foo:bar: yy ms line
Alpounet has joined #ocaml
<thelema> but you want a thread-local copy of that string list.
<thelema> even though there's only one scope for it.
<mfp> yes, if I have multiple threads I can't use a global for all threads
<mfp> I want a global var, tied to the current thread
<thelema> ok, that makes sense.
<thelema> I wouldn't quite describe it that way, but ok. You want a... thread global variable.
<thelema> hmm, yes, this is hard to describe.
<thelema> eh, you want a bunch of variables, one for each thread, and you want this code to pick the right one.
<mfp> yup
<thelema> a hashtable indexed by thread id would definitely do that.
<thelema> But there's gotta be a better way.
<mfp> to add further complexity, I want this to work with Lwt threads too :)
<thelema> Each thread could make its own local variable and use that as a parameter to the function.
<thelema> using currying, you could avoid having to pass this around as much
<mfp> I think I can make it work if I override Lwt.bind
<flux> mfp, wouldn't it be better to implement that in Lwt, or possibly use some of its extension mechanisms (I don't know Lwt, so I'm just guessing)
<thelema> err, partial application
<mfp> thelema: but then I have to pass the var to functions called inside the thread, recursively
<flux> mfp, use... MONADS!
<mfp> i.e., I want some sort of dynamic scoping
<flux> mfp, and.. MONAD TRANSFORMERS!
<flux> tadah!
<flux> christmas is saved!
<mfp> flux: Lwt also uses POSIX threads (Lwt_preemptive.detach)
<flux> mfp, you can use monads inside posix threads too :-)
<mfp> I have some val log : ... -> unit which I can use both inside the Lwt monad and in regular code
<flux> but yeah, it doesn't get rid of the lock
<flux> what's your goal? high-performance? optimal gc behavior?
<mfp> I can't use the Lwt inside a thread inside the Lwt monad
<mfp> it's not reentrant
<mfp> just convenient logging :)
<flux> well, you already suggested the map from thread id to 'a..
<thelema> val time : string list ref -> string -> ('a -> 'b) -> 'a -> 'b
<mfp> yeah, just looking for something better
<flux> thelema, let's say you already have function let f : int -> int
<flux> thelema, and you want to get that kind of information from it..
<mfp> thelema: then I have to pass the string list ref around
<thelema> let time = time (ref []) in (* now have a thread local list)
<flux> thelema, so you will need to modify the interface. possibly used by many other functions already.
<mfp> then I have to pass time around, no diff :)
<thelema> time can be global in your thread
<thelema> just like the original time was global.
<mfp> back to thread-local storage then
<mfp> you need a diff global time function per thread
<thelema> ah, I see. The scoping is more complex than I'm giving credit.
<mfp> this is exactly the same pb as with dynamic scoping
<thelema> You can't create your local time function in the thread because you don't really have most of your code inside the thread's scope.
<mfp> you don't want to rewrite all the inner functions to accept an extra param
<mfp> right, it's not all inside a huge Thread.create ( ... )
<thelema> Just do the hashtable thing - it's probably not as slow as you might think.
<mfp> yes
<mfp> as for Lwt hmm let (>>=) x f = let id = new_id () in save_context id; x >>= (fun y -> restore_context id; f y)
<mfp> where save_context/restore_context save/load a global var in/from a hashtbl indexed by thread id + id
<mfp> 1 hashtbl write + 1 lookup per bind might be too much :/
<flux> ..not to mention locking?
<flux> mfp, but realistically, don't you do >>= mostly when you have the potential to block?
<mfp> yes
<mfp> most likely ok then
ski_ has quit ["Lost terminal"]
<mfp> as for locking, there's only 1 lwt thread active at a time so there's no contention apart from Lwt_preemptive.detach launch/end
<mfp> sounds like this would work
<thelema> working on release announcement of aaa-batteries 0.9.1 @ http://etherpad.com/1dfSHM164p
<mfp> for the batteries ML, right?
<mfp> I think Batteries devels should be the 1st target
<thelema> ok. first announcement today to batteries mailing list.
<thelema> maybe this weekend to caml-list?
<mfp> would thus emphasize that it's much easier to develop for/against
<mfp> that there's no doc generator from hell, building takes <10s, same for docs :)
<flux> building takes <10s? that's awesome! :-)
<mfp> thelema: sounds good if we can get a few devels to install/try it before
<mfp> just to make sure there are no brown paper bag bugs
lloydmoore has joined #ocaml
<thelema> My announcement here was planned to do that, but I like the idea of bringing in the batteries devs first.
<mfp> flux: it's only ~44KLoc after all
<thelema> mfp: I wonder what % of that is comments
<mfp> it's nearly 50-50 ml:mli
<mfp> so close to 50%
<thelema> and we need a lot more .mli - the docs can definitely be beefed up.
<mfp> just to make sure we're not lying, omake -j 4 cold cache real 8.969s user 12.3s sys 3.28s on my dual core AMD64
<thelema> is doc generation still fast? I think I saw a big slowdown when I put batteries.ml in.
<mfp> omake doc 10.7s :/
<thelema> n/m, it can't make a difference, as there's no batteries.mli
<Alpounet> <thelema> ok. first announcement today to batteries mailing list <<< tell me so that I'll go read it
<thelema> hmm, thunderbird won't wrap my text at 72 characters for me...
<thelema> aha, found the plugin
<thelema> Email sent to batteries list. Let's see if this causes christmas cheer
lagenar has joined #ocaml
lagenar has left #ocaml []
alp_ has joined #ocaml
Alpounet has quit [Read error: 104 (Connection reset by peer)]
aklt has joined #ocaml
valross has joined #ocaml
Pepe_ has quit [No route to host]
Pepe_ has joined #ocaml
Pepe__ has joined #ocaml
Pepe_ has quit [Read error: 54 (Connection reset by peer)]
palomer has joined #ocaml
<thelema> could someone help me with a better name for this function: http://codepad.org/4yU4bvyh
<thelema> It's kind of a list n-way cross-product
<palomer> so the type is 'a list list -> 'a list list?
<thelema> yes
<thelema> palomer: I thought you were in KY
<palomer> flight got canceled
<thelema> doh
<palomer> going tomorrow
<palomer> have to wake up at 4am!
<thelema> bleh
<palomer> oh, I see, so if you run this function on [[1,2,3],[4,5,6]] it returns [[1,4],[2,5],[3,6]] ?
<thelema> more than that.
<thelema> 14 15 16 24 25 26 34 35 36
<palomer> I would call it cross
<palomer> or cross_product
<thelema> cross product is usually a 2-way operator - 'a list -> 'b list -> ('a, 'b) list
<palomer> not in my math classes
<palomer> unless you're thinking of the cross product of two vectors
<thelema> well, 'a set -> 'b set -> ('a, 'b) set
<thelema> I'm thinking the set cross product
<palomer> yeah, it's n-ary
<palomer> which is why you can write R^n
<palomer> (which is R x R x ... x R
<palomer> or the functions from R to {1,...,n}
<thelema> that's not an n-ary operator, that's n-1 2-ary operators
<palomer> you can even take the cross product of an infinite number of sets
<thelema> and isn't it functions from {1..n} to R?
ygrek has quit [Remote closed the connection]
<palomer> oh, you're right
* thelema hasn't forgotten his topology
<palomer> The Cartesian product can be generalized to the n-ary Cartesian product over n sets X1, ..., Xn:
<thelema> ah, I see the difference.
<palomer> yeah, call it cartesian product
<thelema> Yes, it is really one n-ary operator with a funny syntax
<palomer> cross product is for vectors
<thelema> ah, my mistake
<thelema> apparently I didn't remember it all right.
<palomer> but the symbol "x" can be read as crass
<palomer> cross
<palomer> we'd say "A cross B" for A x B
<thelema> yes, they use the same symbol, but have different names
<palomer> even when A and B are sets
<thelema> but for sets, it's not the cross product, it's the cartesian product
<palomer> yeah
<palomer> actually, I'm not even sure A x B is read "A cross B"
* palomer wonders where alpounet's pcre error comes from
<palomer> brb
jimmyb2187 has left #ocaml []
<palomer> back
lloydmoore has quit ["taking a nap"]
Pimm has joined #ocaml
morse has joined #ocaml
Pimm has quit [Read error: 60 (Operation timed out)]
Pimm has joined #ocaml
tmaeda has quit [Read error: 60 (Operation timed out)]
valross has quit ["Ex-Chat"]