<thelema>
I'm not that happy with end labels - if you can make a color key, that'd be great
<thelema>
the end labels were the *simplest* thing I could do
<Drakken>
thelema okay, I'll finish the key with manual size args.
sebz has joined #ocaml
<thelema>
Drakken: how will the key be placed?
<Drakken>
thelema args.
sebz has quit [Client Quit]
sebz has joined #ocaml
<wmeyer>
thelema, Drakken out of curiosity is it Archimedes?
<Drakken>
wmeyer yes
<wmeyer>
cool, I've heard about it
<wmeyer>
anyway here is 2:22 AM so I'd better go sleep
<wmeyer>
night
* wmeyer
sleeping
<thelema>
Drakken: hmm, maybe optional argument - can probably detect whether any corner is empty...
<Drakken>
thelema sure, that's fine
<thelema>
probably one of the upper left or lower left will be empty
yroeht has quit [Ping timeout: 240 seconds]
<Drakken>
thelema what do you think of adding an arg for the plot type? Maybe the first arg, ie. "benchplot multi [<infile> [<outfile>]]"
<thelema>
no need - if the first line of the infile is "x-values", it's multi
yroeht has joined #ocaml
lamawithonel has joined #ocaml
<thelema>
(yes, this requires opening the file and trying to read from it, but this will happen faster than anyone will notice. If we decide to take mass input, we may want to revisit this assumption, but benchmarks take longer than plotting, so...
<Drakken>
thelema I wrote my own version of some of your new code. I didn't know you were working on it too.
<thelema>
I just started on it (and finished it) today.
<thelema>
I looked at your repo, and didn't see any activity for 4 days, so figured I should give it a go.
<thelema>
(well, not so finished, but useful)
bobzhang1988 has quit [Read error: Connection reset by peer]
bobzhang1988 has joined #ocaml
<thelema>
one more commit pushed with some final cleanups
sebz has quit [Quit: Computer has gone to sleep.]
<Drakken>
thelema I was working on a file called multiplot.ml in benchplot
<thelema>
hmm, I thought I grabbed the latest version of that to start my code from...
<Drakken>
Yuck. I guess I didn't push any changes for a while.
<thelema>
Are you able to put your features on top of the current benchplot code?
<thelema>
(in the bench repo)
philtor has joined #ocaml
<Drakken>
thelema I just pushed the newest version. The code to read the data basically duplicates yours with a few extra checks, but the title is separate.
<thelema>
I like the and_string
<thelema>
also the nth_color
<thelema>
what is L58-59?
<thelema>
yes, much better error checking
<thelema>
it seems our parsers are slightly different - whether or not "x-value" has a line to itself or is followed immediately by the x-values
<Drakken>
you mean 59-60? that's the color key
<thelema>
does it compile?
<Drakken>
yes.
<Drakken>
I mean it did at one point
<thelema>
it looks like it's missing something...
<Drakken>
why don't we just write "multiplot" on the top line?
<thelema>
ok, we can do that.
<Drakken>
I definitely made a plot from it last week.
<Drakken>
(from a file)
<thelema>
updated format pushed
<thelema>
would you like an example file?
<thelema>
actually, you should be able to generate from listmap as before
<Drakken>
I can generate it.
<thelema>
oops, committed without compiling...
<thelema>
fixed
<thelema>
bedtime for me shortly
<Drakken>
okay, see you tomorrow
<thelema>
type ('a,'b) printer = 'b output -> 'a -> unit -- sad that this can't be a single type variable ('a printer)
emmanuelux has quit [Ping timeout: 240 seconds]
<thelema>
hmm, maybe it should be the other order...
<Drakken>
Is it missing batteries because it's using the oUnit in odb? I just installed batteries in godi.
munga has joined #ocaml
bobzhang1988 has quit [Ping timeout: 276 seconds]
philtor has quit [Ping timeout: 244 seconds]
munga has quit [Ping timeout: 248 seconds]
tnguyen12 has joined #ocaml
sebz_ has joined #ocaml
munga has joined #ocaml
munga has quit [Remote host closed the connection]
sebz_ has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
twittard has joined #ocaml
twittard has quit [Client Quit]
sebz has quit [Quit: Computer has gone to sleep.]
tnguyen12 has quit [Remote host closed the connection]
ikaros has joined #ocaml
sebz has joined #ocaml
philtor has joined #ocaml
sebz has quit [Client Quit]
philtor has quit [Ping timeout: 252 seconds]
Snark has joined #ocaml
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
sebz has quit [Quit: Computer has gone to sleep.]
edwin has joined #ocaml
edwin has quit [Remote host closed the connection]
lamawithonel has quit [Remote host closed the connection]
sebz has joined #ocaml
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
ftrvxmtrx_ has quit [Quit: Leaving]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
cago has joined #ocaml
Kakadu has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
TaXules has joined #ocaml
sebz has joined #ocaml
edwin has joined #ocaml
Cyanure has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
Ptival_ has joined #ocaml
Ptival_ is now known as Ptival
daimrod has joined #ocaml
sebz has joined #ocaml
raichoo has joined #ocaml
probst has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
pr_ has joined #ocaml
wagle_ has joined #ocaml
shachaf_ has joined #ocaml
olasd_ has joined #ocaml
olasd_ has quit [Changing host]
olasd_ has joined #ocaml
pr has quit [*.net *.split]
wagle has quit [*.net *.split]
shachaf has quit [*.net *.split]
rossberg has quit [*.net *.split]
olasd has quit [*.net *.split]
rossberg has joined #ocaml
BiDOrD has quit [Ping timeout: 252 seconds]
_andre has joined #ocaml
shachaf_ is now known as shachaf
olasd_ has quit [Quit: leaving]
olasd has joined #ocaml
olasd has quit [Changing host]
olasd has joined #ocaml
asmanur1 has quit [Ping timeout: 252 seconds]
asmanur1 has joined #ocaml
BiDOrD has joined #ocaml
emmanuelux has joined #ocaml
Kakadu has quit [Ping timeout: 258 seconds]
ankit9 has joined #ocaml
ankit9 has quit [Client Quit]
letrec has joined #ocaml
avsm has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
jamii has joined #ocaml
fraggle_ has joined #ocaml
jamii_ has joined #ocaml
jamii_ has quit [Client Quit]
buriedhead has joined #ocaml
jamii has quit [Ping timeout: 255 seconds]
jamii has joined #ocaml
mcclurmc has quit [Excess Flood]
The_third_man has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
ikaros has joined #ocaml
testcocoon has joined #ocaml
rby has joined #ocaml
rby has quit [Client Quit]
<thelema>
Drakken: the warning about ounit is solvable by deleting one of the two mentioned directories.
The_third_man has joined #ocaml
<thelema>
Drakken: but it's not the main problem. I'll add the threads tag to fix it. (yes, odd fix, but in the 1.x versions of batteries, if you're not using threads, the proper batteries invocation is "open Batteries_uni"
wagle_ is now known as wagle
pr_ is now known as pr
pr has quit [Changing host]
pr has joined #ocaml
<thelema>
Drakken: might be fixed now with my latest push. I'm not certain about oasis' myocamlbuild.ml, so it may not be the right fix.
<Ptival>
bummer: OMLet hangs when indenting a match with 50+ cases :(
<thelema>
Ptival: 50 match cases? a bit low on the factoring, I guess
<thelema>
ah, 180 match case variant. You're approaching the limit of how many variants one can have in a single type...
<thelema>
I wish ocaml could do variant to string in the compiler
<Ptival>
that would be useful for rapid printing
<Ptival>
hopefully I did not write this by hand :)
<thelema>
:)
ikaros has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
<adrien>
thelema: 255 being the limit?
<adrien>
also, polymorphic variants probably don't have this issue (we know they have other however ;-) )
<thelema>
yes, polymorphic variants use a whole word for their tag
<thelema>
I think the limit is less than 255 - No_scan_tag
<thelema>
which is...
<thelema>
251
<thelema>
although maybe less than that - 246 is lazy_tag...
<adrien>
I wonder how it breaks
<Ptival>
so I could do monomorphic polymorphic variants :)
<adrien>
or change ADDC, ADDCx, ADDEx, ADDI, ... into ADD of something, with something = | C | Cx | Ex | I | ...
<adrien>
?
<thelema>
adrien: I'm fairly certain there's a compile error in that case.
lamawithonel has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
fantasticsid has joined #ocaml
<adrien>
hmmm, /usr/share/dict/words should help
lamawithonel has joined #ocaml
<adrien>
hmmm....
<adrien>
a variant with almost 40k elements is taking some time to compile
<adrien>
but 300 didn't fail
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
<adrien>
worked
BiDOrD has quit [Ping timeout: 244 seconds]
ankit9 has quit [Quit: Leaving]
BiDOrD has joined #ocaml
pilki has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
buriedhead has quit [Ping timeout: 260 seconds]
<thelema>
adrien: interesting. I wonder how that works... I thought that variants used the tag for distinguishing amongst themselves
<NaCl>
thelema: what's the difference between Map and Hashtbl?
ikaros has quit [Quit: Ex-Chat]
<thelema>
NaCl: map uses a balanced binary tree, and is functional (you get a new tree when you update)
<thelema>
NaCl: hashtbl uses ... a hash table; array of linked lists, and is mutable (you modify the existing hashtable when you update)
<NaCl>
ah, kk
<NaCl>
do either of those preserver order?
<thelema>
insertion order?
<thelema>
Maps are ordered by key. Hashtables preserve the insertion order of items with identical key
<thelema>
but they both gain their efficiency by choosing the order of values based on the key (compare-based for map, hash-based for hashtbl)
<thelema>
so I'm not quite sure what you want
<NaCl>
As in, I insert values that have 2, 3, 4 as keys. When I iter over the keys, will the keys remain in order 2, 3, 4?
<thelema>
definitely no for hashtbl
<thelema>
if your insertion order matches the order of the compare function in map, then yes, otherwise no.
<thelema>
If you don't have that many entries, you can use an association list `('key * 'value) list`
<thelema>
there's a few functions in List that will help you use this like a map/hashtbl
<thelema>
and you'll have exactly reverse iteration order as insertion order
<thelema>
(you can use List.rev before iterating to get same order)
<NaCl>
kk, thanks
<adrien>
thelema: well, I can see this in the documentation for interfacing C: Like constructed terms, polymorphic variant values are represented either as integers (for polymorphic variants without arguments), or as blocks (for polymorphic variants with an argument).
<thelema>
adrien: oh yeah, the tag is an int for non-argument variants
<thelema>
so only 250-ish variants with arguments
<thelema>
and polymorphics are always int-tagged, iirc
<adrien>
right
<adrien>
Error: Too many non-constant constructors -- maximum is 246 non-constant constructors
<adrien>
and it sounds like if you have 200 constant ones, you can still have 246 non-constant ones (and that would make sense)
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
buriedhead has joined #ocaml
probst has quit [Quit: probst]
ikaros has joined #ocaml
lopex has quit [Remote host closed the connection]
bobry has quit [Read error: Connection reset by peer]
joewilliams has quit [Remote host closed the connection]
upgrayeddd has quit [Read error: Connection reset by peer]
upgrayeddd has joined #ocaml
Drup has joined #ocaml
ttamttam has quit [Remote host closed the connection]
joewilliams has joined #ocaml
bobry has joined #ocaml
lopex has joined #ocaml
buriedhead has quit [Ping timeout: 244 seconds]
letrec has quit [Ping timeout: 252 seconds]
iago has joined #ocaml
<Drakken>
thelema did you say there's a problem with batteries? and if it's related to threads, do you know why that would affect my installation? I don't remember doing anything to enable or disable threads explicitly.
<thelema>
batteries 1.x is wierd regarding what module you open and whether you're compiling with threads
<thelema>
if you compile with threads, "open Batteries" works
<thelema>
if you compile w/o threads, you need "open Batteries_uni"
<thelema>
this is fixed in 2.0beta, which I'm using, where "open Batteries" works everywhere
buriedhead has joined #ocaml
<Drakken>
oh. I can add "_uni" to my copy of the bench source if that helps.
<thelema>
I believe I explicitly enabled threads in the _tags file, this should fix the problem
<thelema>
if it doesn't, just add _uni, and that should fix it
ulfdoz has joined #ocaml
<Drakken>
thelema btw, I take back what I said yesterday about "x-values" vs. "multiplot" in the fle format. Leave|do it however you like.
<Drakken>
f*i*le format
<thelema>
I don't mind having multiplot as first line of multiple format, so I'll leave it like that
Kakadu has joined #ocaml
<Drakken>
oh, you did both. that's even better :)
lopex has quit [Remote host closed the connection]
bobry has quit [Remote host closed the connection]
joewilliams has quit [Remote host closed the connection]
upgrayeddd has quit [Remote host closed the connection]
ftrvxmtrx has joined #ocaml
oriba has joined #ocaml
bobry has joined #ocaml
ftrvxmtrx has quit [Client Quit]
upgrayeddd has joined #ocaml
joewilliams has joined #ocaml
<Drakken>
so thelema, do you mind if I merge my file-reading code from last week, or should I toss it?
buriedhead has quit [Ping timeout: 240 seconds]
lopex has joined #ocaml
lopex_ has joined #ocaml
lopex has quit [Client Quit]
lopex_ is now known as lopex
buriedhead has joined #ocaml
<flux>
hmm, so if I want to write a simple persistent daemon that accepts http requests, my options are to either use netplex, ocsigen or write something of my own?
<thelema>
Drakken: go ahead and merge
pilki has quit [Quit: This computer has gone to sleep]
<thelema>
Drakken: as long as it works
<thelema>
flux: I think those are the best solutions at the moment
<adrien>
flux: there's also ocaml-httpd I think; it's meant to be light
<flux>
adrien, I think that's exactly what I was looking
<adrien>
probably, yes (I thought it was shown in godi but I can't find it now)
<flux>
well, it's on debian as libhttp-ocaml-dev
<flux>
lwt-based port would be nice, though ;)
<Drakken>
thelema I pushed some minor changes
avsm has quit [Quit: Leaving.]
<thelema>
hmm, your pull request is quite dirty - do you know how to submit just the last few commits?
<Kakadu>
Qrntzz: hi! Do have any ideas about what content should be inside input file for out generator? AFAIK, C++ has no partial class and We should generate whole C++ class from this input file. So we should write to this file all properties, signals and slots which will be used in this class.
<adrien>
flux: I'm looking forward to your code ;-)
buriedhead has quit [Quit: Leaving.]
upgrayeddd has quit [Remote host closed the connection]
joewilliams has quit [Remote host closed the connection]
bobry has quit [Remote host closed the connection]
lopex has quit [Remote host closed the connection]
lopex has joined #ocaml
lopex has quit [Remote host closed the connection]
raichoo has joined #ocaml
<flux>
can I safely call lwt stuff from othrea real threads, or are there other mechanisms available for that?
<adrien>
s/to/for/ actually
<adrien>
which kind of stuff?
bobry has joined #ocaml
<flux>
well, I want to have an lwt task doing some periodic work
<flux>
but simultaneously it should listen for messages, such as modify work queue, from the http front
lopex has joined #ocaml
<flux>
the http interface is not an lwt process :)
<flux>
so I want to have a GET request that sends something to my lwt loop, gets something back, and returns that to the user
<flux>
basically, an LWT wraper for the server..
<flux>
I'd hate to do it via pipes
<wmeyer>
thelema: Variants are encoded as Ints or Int block pair
<wmeyer>
I suppose
milosn has quit [Read error: Connection reset by peer]
milosn_ has joined #ocaml
<thelema>
wmeyer: iirc, the block tag is used to distinguish variants w/ arguments
<thelema>
for some reason, I thought it used the tag for variants without, but you're right, they're just ints
<wmeyer>
thelema: I notice that the compiler is resistant to the generated code to some extent, I generated 200K lines of code and it worked fine - indeed there was some problem with native compilation, as it generated 2M lines of assembly code and then labels overflowed, but suddendly it got fixed in SVN :)
<adrien>
I so wish there was a way to print any polymorphic variants
<adrien>
s/s$//
<adrien>
I have code to trace and displaying their name would be perfect
<adrien>
(since I'm using polymorphic variants to send message)
<wmeyer>
Camlp4 is your friend
<wmeyer>
(sort of)
<wmeyer>
you can just generate these names at compile time, along with the matching function
<adrien>
I'd like to put the displaying in a library which is created independently of the polymorphic variants that are used
<wmeyer>
Precisly that's what deriving do
joewilliams has joined #ocaml
<adrien>
couldn't get a working deriving last time I looked
<adrien>
I've thought about doing it in C too tbh =)
<thelema>
Drakken: terrible logic for matching the command line - I'll rewrite after merging.
<adrien>
caml_hash_variant() is not accessible from ocaml code?
<adrien>
(it's the function to hash a string, used for polymorphic variants)
<wmeyer>
but how can you dehash it that's the question
<Drakken>
thelema how do I clean up the pull request?
<thelema>
Drakken: git rebase origin/master (from your HEAD)
<thelema>
Drakken: hmm, maybe with a --flatten
<wmeyer>
adrien: you want to print out the name of the polymorphic variant, so why caml_hash_variant would be useful
<Drakken>
thelema do you still need me to do that?
<thelema>
Drakken: not this time, I'll just merge and rewrite
<adrien>
wmeyer: I provide a number of strings, compute their hash and store the relation; when I encounter a hash, I can get the string back
<thelema>
Drakken: except you closed the pull request...
<wmeyer>
adrien: yes, that sound sensible :)
<wmeyer>
but i would go for Camlp4 anyway in this case
<wmeyer>
sounds*
<adrien>
that would give me the variant names but not the arguments anyway
<wmeyer>
you can recurse to the arguments
<Drakken>
thelema do you need to work on benchplot personally?
<flux>
adrien, I'm thinking Lwt_unix.make_notifications and friends are the part of the puzzle I was missing
<flux>
although it needs a bit work around it..
<thelema>
Drakken: I intend to rewrite the code to determine infile and outfile
fraggle_ has quit [Ping timeout: 245 seconds]
<adrien>
wmeyer: but if there is `Foo of int to display, I won't know that the int is an int (and not a char)
<wmeyer>
adrien: But you know at compile time
<adrien>
does a module like "Dump" handle polymorphic variants
<adrien>
?
roha has joined #ocaml
<wmeyer>
adrien: so you generate print_t
<adrien>
wmeyer: with camlp4, yes =)
<wmeyer>
adrien: which perform the match
<wmeyer>
adrien: you will not get antyhing from the compiler at runtime sadly - the type information is not present - instead they are hints for GC
<adrien>
I think that I could wrap my library, possibly in a functor, and expect a val print : t -> string
<wmeyer>
adrien: yes, but then you are ending up handwriting it :)
<Qrntzz>
Kakadu: hi
_andre has quit [Quit: leaving]
<wmeyer>
adrien: and the point of camlp4 to generate this code for you
<Qrntzz>
Kakadu: I think xml is too verbose for the purpose, would much prefer JSON
<adrien>
wmeyer: I don't really have the choice because there is _one_ location where I could put the printing in the library, and too many locations in the code using the library
<adrien>
but the printing code would come from camlp4, yeah
<Kakadu>
Qrntzz: I know nothing about JSON TT
<wmeyer>
do your type definition as mli
<wmeyer>
and then generate the boilerplate
<wmeyer>
in on module
<wmeyer>
and call this module in two or more places
<adrien>
Kakadu: the syntax is very light
<wmeyer>
you have no dependecies
<adrien>
so it won't be long before you pick it up
<adrien>
and you have yojson to handle it from ocaml too
<wmeyer>
Kakadu: I will join and admit Json is nice, and Yojson is easy
<wmeyer>
Kakadu: Much better than this bloody bloated XML
<adrien>
wmeyer: the reason I want to put it in the library because the library is meant to be something through which all messages go through
<adrien>
it's meant to be the central code for messages
<wmeyer>
adrien: I understand but nothing stops you from separating the conversion to strings from the rest of the world, as the third component
<adrien>
wmeyer: oh, yes, agreed
<wmeyer>
adrien: so you pickle and unpickle messages?
lopexx has joined #ocaml
<adrien>
I'm already using functors too
<Kakadu>
Qrntzz: so we should understand what should be declared in input file
<wmeyer>
adrien: yes, you would need to organise and structure this a bit
<adrien>
wmeyer: pickle?
<wmeyer>
adrien: Yes, Marshal module from Stdlib
<wmeyer>
very useful
<adrien>
ah
fraggle_ has joined #ocaml
<wmeyer>
adrien: You can send your data structure over the network or write to file
<wmeyer>
and unpickle that in target
<adrien>
I wanted to have separate processes but I'm not currently doing that
<wmeyer>
adrien: And all of these because althogh you have no type information, but you do have hints for GC
<adrien>
I'll have to check the impact on performance
<adrien>
but I could
<wmeyer>
Marshal does cope with cyclic data even, and even is able to some extent pickle/unpickle closures
<adrien>
ah, typing/btype.ml, function hash_variant :P
<wmeyer>
In Indigo I use Lwt and Marshal module to send the messages over the network
<wmeyer>
without any custom protocol
<adrien>
wmeyer: I had actually used ocamlnet's RPC for that at first
<adrien>
my messages should be very small and simple too so it wouldn't need anything big
<adrien>
hmm
<wmeyer>
you just: output_val <your_data> channel
<wmeyer>
Marshal is efficient but there are other alternatives, like Json, biniou, adt etc.
upgrayeddd has joined #ocaml
<wmeyer>
sexp
<adrien>
now, if Marshal could be set to not RLE-compress its output...
<wmeyer>
The advantage of Sexp or Json is that you have human readable output
<wmeyer>
the disadvantage is of course bandwitdh
<adrien>
I thought I could use them to print my messages ;-)
<wmeyer>
there is Bin-prot and Biniou as binary equivalents
<wmeyer>
you could indeed :)
Axioplase_ has quit [Ping timeout: 252 seconds]
<adrien>
xz compression will get you something way smaller than marshall
<adrien>
marhsal*
<wmeyer>
you just need to match the output json if you want custom formatter
<Drakken>
thelema what's wrong with the command-line processing?
<thelema>
Drakken: you'll see once I rewrite it.
<wmeyer>
adrien: yes, you can compress and decompress on the way
<wmeyer>
no problem with that
<wmeyer>
use zlib
<wmeyer>
but you pay for that with performance
<Qrntzz>
Kakadu: of course
<Qrntzz>
Kakadu: json is quite simple, actually
Axioplase_ has joined #ocaml
<Qrntzz>
Kakadu: so, why not?
<adrien>
wmeyer: last summer, I managed close to 8MB/s with *xz* on a pentium CPU (current intel's low-end, like celeron in the past) because I had binary data and xz has a delta compression filter
<adrien>
so, depending on what you have, you can get pretty good results
<wmeyer>
SSL is not too slow as well :)
<wmeyer>
ok folks i go to have a rest, otherwise i will not be able to do any ocaml anymore today ...
<flux>
sadly I don't think I'll be accomplish my actual goal for this evening, but perhaps I at least one piece working :)
<adrien>
wtf firefox? ='(
<adrien>
I hate this browser
<adrien>
it actually manages to display your two pages with different fonts, when it's supposed to use only one for everything and when it's supposed to forbid pages to chose their fonts
<flux>
very interesting
<flux>
it does the same for me
<flux>
ahha!
<flux>
the header says for the ml-file: Content-Language: ml
<flux>
thanks, apache..
<flux>
although not sure why that's the effect
<adrien>
well, my firefox is supposed to use the same font absolutely everywhere
<adrien>
flux: I might find your code useful quite soon :p
<flux>
adrien, hopefully it really works, not only in my tests :)
<adrien>
I'll have to add threads to caravel quite soon because I think that when webpages are busy, the whole application is blocked
<adrien>
caravel being my web browser which renders using webkit-gtk
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
ttamttam has left #ocaml []
<zorun>
err, OCaml coders don't all seem to like english :(
<avsm>
https://github.com/avsm/ocaml-cohttpserver actually uses it. I'm still tidying it up for a proper release; needs a few things like proper Lwt cancellation support and Lwt_ssl timeouts
<avsm>
but its intended to be embedded into any Lwt program as a standalone thread, so hopefully that'll be useful to others
<mfp>
avsm: is there any reason for it not to have a static linking exn, or is it just an oversight? (I've got some code I was going to release as LGPL+static exn that could use cohttp :)
<avsm>
mfp: i normally license my code BSD/ISC, but this one was inherited from the original ocaml-http which may have missed it. should rectify that...
<avsm>
(personally i think the lgpl+static license needs to just disappear; its a very confusing mismash)
<Anarchos>
i am looking for the best way to write a lexer.mll file to parse C comment, any idea ?
<adrien>
Anarchos: to parse C and extract comments?
<adrien>
and why comments btw?
sebz has joined #ocaml
Xizor has joined #ocaml
EmmanuelOga has joined #ocaml
<Anarchos>
adrien yes
<Anarchos>
adrien i want to parse C source files within ocaml
<adrien>
unless you strictly want the inside of comments (in which case the "official" ocamlyacc/lex tutorial will be more than enough), you have Frama-C, CIL and maybe a third one, and Yacfe which all handle C
<adrien>
yacfe is different because it parses unpreprocessed sources
<Anarchos>
adrien i just want to discard them :)
<adrien>
and that's what I'm using to generate bindings to gtk/glib libraries
<adrien>
cpp might do the job
<adrien>
also, sed and awk should too
<Anarchos>
adrien i will look to official doc more intensively
sebz has quit [Quit: Computer has gone to sleep.]
<Anarchos>
adrien is a loop to find the next '*/' token smart enough ?
<adrien>
Anarchos: C doesn't support nested comments, so I think this will be good
<adrien>
(but it's been some time I've done parsing)
<Anarchos>
adrien ok thanks
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
EmmanuelOga has quit [Ping timeout: 244 seconds]
milosn has joined #ocaml
dilange888 has joined #ocaml
milosn_ has quit [Ping timeout: 245 seconds]
edwin has quit [Remote host closed the connection]
roha has quit [Quit: Leaving]
raichoo has quit [Quit: leaving]
<Drakken>
thelema I tweaked the filename processing a little.
sebz has joined #ocaml
sebz has quit [Client Quit]
sebz has joined #ocaml
pango is now known as pangoafk
<thelema>
Drakken: let infile = match Sys.argv with [| |] -> ("lm.out", "lm.out.png") | [| i |] -> (i, i^".png") | [|i;o|] -> (i,o) | _ -> failwith usage ...
<thelema>
err, let infile,outfile = ...
<Drakken>
thelema doesn't argv.(0) = the funcname?
<thelema>
oops, need one more _; before each...
<Drakken>
and you had to type "lm.out" twice.
<Drakken>
Go ahead and change it if you want.
<thelema>
at least the if/then solution is much cleaner than the previous solution
sebz has quit [Quit: Computer has gone to sleep.]
<thelema>
I just think it's fun doing pattern matching on the argument list for simple things like this
Xizor has quit []
<Drakken>
I guess matching is better in this case. Notice though that you have to duplicate both the default filename root and the png extension. Not a huge deal by any means, but that's basically why I was trying to do it differently.
Morphous_ has quit [Ping timeout: 255 seconds]
ikaros has quit [Quit: Ex-Chat]
munga has joined #ocaml
Morphous_ has joined #ocaml
pangoafk is now known as pango
emmanuelux has quit [Quit: Ex-Chat]
BiDOrD has quit [Read error: Operation timed out]
pango is now known as pangoafk
BiDOrD has joined #ocaml
munga has quit [Ping timeout: 244 seconds]
letrec has joined #ocaml
munga has joined #ocaml
zorun has quit [Read error: Connection reset by peer]