<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
<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 ?
<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)]
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