samrat has quit [Quit: Computer has gone to sleep.]
mawuli has joined #ocaml
nop0x07bc has quit [Quit: WeeChat 1.0.1]
<whitequark>
.
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
cago has joined #ocaml
ygrek_ has joined #ocaml
MercurialAlchemi has joined #ocaml
nuki has quit [Ping timeout: 272 seconds]
ygrek_ has quit [Remote host closed the connection]
siddharthv is now known as siddharthv_away
nuki has joined #ocaml
marynate has quit [Quit: Leaving]
eikke has joined #ocaml
<whitequark>
does the bytecode compiler optimize out (if false) ?
<whitequark>
oh, well, it doesn't optimize out Sys.win32 and it makes sense
zpe has joined #ocaml
ollehar has joined #ocaml
hhugo has quit [Quit: Leaving.]
jao has quit [Ping timeout: 272 seconds]
nojb has joined #ocaml
ysz_ has joined #ocaml
_obad_ has quit [Ping timeout: 245 seconds]
ollehar has quit [Ping timeout: 245 seconds]
_obad_ has joined #ocaml
ollehar has joined #ocaml
pharpend has quit [Quit: WeeChat 0.4.3]
<nicoo>
whitequark: It better not inline the stuff in Sys :>
pyon has quit [Quit: rcirc on GNU Emacs 24.3.1]
ollehar has quit [Ping timeout: 245 seconds]
<whitequark>
well
<whitequark>
the whole "bytecode is portable" thing is fishy anyway
<whitequark>
like you need a 32-bit ocamlrun to run ocamlc.
<whitequark>
32-bit target ocamlc.
<whitequark>
the reason for which eludes me.
<adrien>
hmmm
<adrien>
hasn't that been fixed
<whitequark>
nope
<flux>
can it be fixed? how about C bindings?
<whitequark>
I have *no idea* why it happens, otherwise I'd have fixed it already
<flux>
well, I suppose there could be proper typedefs and then the C bindings could be compiled both 64- and 32-bit
<flux>
and ocamlrun could always use the 'original' bit size of the bytecode
<whitequark>
flux: that's not really useful
<flux>
or is there another solution?
<whitequark>
I mean, you make it portable across two platforms instead of one.
<flux>
ability to 'cross-compile' 32-bit bytecode and always run it 32-bit?
<whitequark>
no, bytecode is supposed to be portable across bitness.
<flux>
but how about the type 'int'
<flux>
pretty fundamental.
pharpend has joined #ocaml
<whitequark>
hm, at least, if you build it with -compat-32
<flux>
oh, that's nice that it exists
<whitequark>
yeah I guess that is the issue, ocamlc assuming it can represent target int with host int
<flux>
then all you need is that all platforms are able to run 32-bit bytecode as 32-bit
<flux>
ocamlopt programs would be able to make use of 64-bit
<whitequark>
that's already there
<whitequark>
I mean, the problem is that the compiler can't be built with -compat-32
<flux>
why does the compiler need to be built with that?
<whitequark>
if you want to cross-compile to 32-bit platforms on a 64-bit host
<flux>
what does -compat-32 switch then do if not that?
arj has joined #ocaml
<whitequark>
right now in order to cross-compile to 32-bit Android I need a 32-bit ocamlc, which is ... inconvenient ... if I have a 64-bit system
<flux>
I mean there's till the thing that don't you need to compile all standard libraries etc with -compat-32 as well..
<whitequark>
the compiler can't be built with -compat-32.
<flux>
the key thing here for me not understanding this issue is :-) that wouldn't compiling the compiler with -compat-32 just mean that it can be executed in a 32-bit ocaml byte code environment
<flux>
do you mean something else by that?
<flux>
(ie. it would not have effect on the programs it generates)
<whitequark>
see, currently the issue is, ocamlopt generates invalid assembly if you run an ocamlopt built for a 32-bit target on a 64-bit host
<whitequark>
-compat-32, I think, would reduce the size of int to 32 bits, which would mean that it would execute under a 64-bit ocamlrun like it executes under a 32-bit ocamlrun
<whitequark>
it's not that it has any effect on the programs it generates, it's that you can't compile any
<flux>
right, so it would affect the case where you cannot really build a 32-bit cross compiler for a 64-bit host and instead just try to use the 32-bit compiler directly on the 64-bit host
<whitequark>
yes
<flux>
but isn't there some 'emulation' involved, how does it get to fail?
<flux>
I mean I can run various 32-bit binaries on 64-bit platform..
<whitequark>
you need various OS-specific tricks for that.
<flux>
you need them in any case?
<whitequark>
no?
<flux>
well, I mean the OS has them built in for you
<whitequark>
generally, there is no reason for a compiler's build, host and target triples to interact *at all*
<whitequark>
I should be able to target anything from anything.
<flux>
sure, sadly ocamlc/ocamlopt don't really support cross-compiling
<whitequark>
the OS... well, you have to install them explicitly. and you don't have them on all OSes.
<whitequark>
Debian has ia32-libs
<whitequark>
but say openbsd? it doesn't have anything
<flux>
but maybe with the smallest of an effort it would work for this scenario
<flux>
and if you don't have them, you cannot run 32-bit binaries
<whitequark>
sure
<flux>
so the OS sets up the environment
<whitequark>
I'm not going to run a 32-bit ARM binary on my x86 host anyway
<flux>
but in this case ocamlopt somehow uses the 64-bit information during runtime
<whitequark>
or a 32-bit Windows binary.
<flux>
I don't know how 'arch' works with ia32, perhaps there's a special version of it that returns x86
<whitequark>
hm?
<flux>
if not, perhaps ocamlopt uses that kind of runtime data to determine integer size
<whitequark>
ocamlopt doesn't use any kind of runtime data
<whitequark>
it just uses int
zpe has quit [Remote host closed the connection]
<flux>
how can it then fail when merely the platform underneath it is changed to 64-bit and then emulated back to 32-bit?-o
<whitequark>
what? nothing is emulated
<whitequark>
you run it with a 64-bit ocamlrun.
zpe has joined #ocaml
<flux>
so you're running 32-bit ocamlrun with 64-bit ocamlrun?
<whitequark>
...
<whitequark>
ocamlrun is a native binary.
<flux>
I thought you were running 32-bit ocamlopt.opt in a 64-bit environment
<whitequark>
no, I don't have any .opt tools when cross-compiling
<flux>
oops, I meant 'ocamlopt' in the previous sentence
<flux>
so now I finally get it :-)
<flux>
but, if you just compiled a 32-bit ocamlopt on a 32-bit environment, copied the binary to your 64-bit environment and set up the ia32 system, everything should work fine. assuming of course this is possible for you.
<flux>
it's not optimal but a realistic option in many cases
<flux>
(and by ocamlopt I meant ocamlopt.opt for clairty)
<whitequark>
lolwhat? I'm so not going to set up a separate 32-bit environment just to build ocamlopt
<flux>
:-)
<whitequark>
this is complete bullshit and has to be fixed in ocaml.
zpe has quit [Ping timeout: 245 seconds]
kakadu has joined #ocaml
siddharthv_away is now known as siddharthv
octachron has joined #ocaml
ysz_ has quit [Ping timeout: 244 seconds]
ollehar has joined #ocaml
ysz_ has joined #ocaml
ygrek has joined #ocaml
thomasga has joined #ocaml
octachron has quit [Ping timeout: 244 seconds]
<adrien>
whitequark: check the ML archives
<adrien>
I've already raised the issue last year
<adrien>
there's also the "how it can be solved"
<adrien>
and chambart agrees on the approach so you can maybe trap him in doing it :D
<adrien>
summary: first-class modules to be able to chose between the bitnesses
SomeDamnBody has joined #ocaml
lordkryss has joined #ocaml
octachron has joined #ocaml
<whitequark>
so will it be like
<whitequark>
| Const_int of Bitness.int
<whitequark>
and then
* companion_cube
read : | Const_int of Bitterness.int
<whitequark>
bitness.ml: module M = (if target32 then (struct type int = Int32.t end) else (struct type int = Int64.t))
<whitequark>
yes, companion_cube. yes.
<companion_cube>
:D
zpe has joined #ocaml
<flux>
whitequark, that won't work, does it? you need to implement an interface?
<flux>
well, module type
<whitequark>
yeah, I omitted that part
AlexRussia has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
_obad_ has quit [Ping timeout: 255 seconds]
_obad_ has joined #ocaml
Submarine has quit [Remote host closed the connection]
sepp2k has joined #ocaml
ggole has joined #ocaml
pyon has joined #ocaml
ysz has joined #ocaml
ysz_ has quit [Ping timeout: 245 seconds]
_andre has joined #ocaml
dsheets has joined #ocaml
arj has quit [Quit: Leaving.]
ysz has quit [Ping timeout: 272 seconds]
<Unhammer>
to use the new -safe-string option with ocamlbuild, is it simply
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
bytbox has joined #ocaml
hausdorff has joined #ocaml
bytbox has quit [Remote host closed the connection]
hausdorff has quit [Ping timeout: 244 seconds]
tane has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
ikaros has joined #ocaml
arj has quit [Quit: Leaving.]
<ysz>
i want to post-process some product in myocamlbuild.ml
<ysz>
what is right way to do so?
<whitequark>
make a ruke
<whitequark>
*rule
<ysz>
post-processing will not create new file
hhugo has quit [Quit: Leaving.]
divyanshu has joined #ocaml
<whitequark>
well, it should.
<whitequark>
otherwise you can't determine whether you have already post-processed this or not.
<ysz>
hm. like introduce synthetic one?
<whitequark>
yes.
<ysz>
well, its unconditional post-processing
<ysz>
like each time you get this prod do this post-procenssing
<ysz>
yeah, i thought about some synth as well...
<whitequark>
think of it in terms of dependency resolution
<whitequark>
when you say 'ocamlbuild foo', what should ocamlbuild run?
<ysz>
ideally i would hook into the middle of original rule
ontologiae has joined #ocaml
<whitequark>
you can override a rule
<ysz>
i need to combine stubs (static) archive actually
<whitequark>
does .clib not work?
<ysz>
(with some other static library)
<ysz>
.clib?
<whitequark>
yes, .clib, it's a target for building static archives
<ysz>
whitequark, while overriding a rule am i still able to call original first?
<whitequark>
you put your .o's in a file called foo.clib and then you do ocamlbuild foo.a
<ysz>
body of original
<whitequark>
no, you can't call the original one.
<ysz>
that sucks
<ysz>
and its root of my problem :/
<ysz>
im looking for :AROUND method...
<ysz>
you see my foo.clib will be same as my libfoo_stubs.a
<whitequark>
really, just make a synthetic target, it's way simpler
<ysz>
i need to ar x and then re-ar cr libfoo_stubs.a in fact
<ysz>
yeah...
<ysz>
thx whitequark !
<whitequark>
why can't you just link two different .a files to your OCaml .cma/.cmxa?
<ysz>
hm. what im trying to achive is to have self-contained bindings package
<whitequark>
add a -cclib -lyoursecondlibrary when building a .cma/.cmxa
<whitequark>
yes, I gathered
<whitequark>
it will have the same effect, except with no .a repacking
<ysz>
part of issue is that im using oasis to specify sources/deps
<whitequark>
CCLib:
<ysz>
hm... let me try
<ysz>
im not sure it will work... last time i checked it links against it only the dynamic library...
<whitequark>
well, worst case, you'll just have to add some myocamlbuild flags
shinnya has quit [Ping timeout: 265 seconds]
<ysz>
yeah it does not work
SethTIsue has joined #ocaml
<ysz>
it just feeds ar with that *.a
<ysz>
which is not what it should actually do to combine archives
<ysz>
it should go over ar x ... ar cr somehow
<whitequark>
hrm, okay, I don't know how to do it with oasis
<whitequark>
but with ocamlbuild it is easy
<whitequark>
and you definitely should not repack .a's
<ysz>
yeah. let me try this way
<whitequark>
there is no difference between linking one .a (with stubs) or two
<ysz>
hm. im not sure we are on same page
<ysz>
im linking stubs (produces by ocaml tools) against static library (3rd party) of foreign code
<ysz>
trying to link...
<whitequark>
not really, no
<ysz>
yea?
<whitequark>
you're trying to make code that depends on your library link your stubs *and* some 3rd party code
<ysz>
yup. but i want to include that dependecy!
<whitequark>
sure
mcclurmc has joined #ocaml
<ysz>
anyway, let me hack myocamlbuild.ml...
<ysz>
and see...
<whitequark>
so normally, you would have only the stub functions directly included with the OCaml library
<ysz>
oh, what do you mean by that?
<whitequark>
inside the .cma file, there is a field with linker options
<whitequark>
so when ocamlc is linking an executable, it extracts all that options and adds it to the linker command line
<whitequark>
ocamlfind also adds the paths to the packages to the linker search path
<whitequark>
so when you make some stubs, what you're really doing is you're making a .a and embedding instructions for linking that .a (just -lfoo) inside the corresponding .cma
<whitequark>
nothing stops you from putting your .a of 3rd party code next to the stubs in the package and instructing ocamlc to link them in as well
<whitequark>
you can display the said instructions using the ocamlobjinfo tool
<ysz>
hm yeah but this way i will need to distrib my 3rd party *.a, right?
<ysz>
ideally ill incorporate foreign *.a into _stubs.a bc its the right place!
<ysz>
only my bindings (stubs) depend on it!
<whitequark>
you're distributing the _stubs.a already
<ysz>
fair enough..
<whitequark>
just put your 3rd party .a next to it
<ysz>
seems like this will require teaching oasis to install etc 3rd party *.a along the cmxs-etc...
<ysz>
which is too much of tools & infra- hacking for me at this point :)
<whitequark>
oh, yeah, I can give you some pointers on that
<ysz>
would appreciate!
<whitequark>
it's pretty simple, but very hard to figure out
<flux>
nice. last time I did that I ended up extracting the .o-files from the .a-file..
jonludlam has joined #ocaml
WraithM has joined #ocaml
hausdorff has joined #ocaml
eizodo has quit [Quit: Page closed]
hausdorff has quit [Ping timeout: 246 seconds]
morphles has joined #ocaml
adrien has quit [Ping timeout: 250 seconds]
slash^ has joined #ocaml
adrien has joined #ocaml
<whitequark>
O_o
<whitequark>
I found a big obscure chunk of code in Lwt that does some black shell escaping magic
<whitequark>
it's not called from anywhere
araujo has joined #ocaml
araujo has joined #ocaml
araujo has quit [Changing host]
thomasga has quit [Quit: Leaving.]
ollehar has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
<ysz>
whitequark, hm. i got my ... -Wl,-Bstatic -lfoo.a -Wl,-Bdynamic ... into that section of cmxa which propagated to gcc command when linking against that ocaml package to gcc -o bar.native ... -Wl,-Bstatic -lfoo.a ... -lfoo_stubs ... and still seems like too late bc gcc complains that it can't find symbols in that foo_stubs.a files (which are in foo.a actually)
<ysz>
that was the reason why i wanted to combine foo.a + libfoo_stubs.a in first place (in part)
<ysz>
reason being symbols from libfoo_stubs are not found during linking of *.native which depends on package...
<ysz>
which seems to make perfect sense when dealing with static archives (libfoo_stubs.a should have all symbols "resolved" already, no?
<whitequark>
nonononono what the hell are you doing
<ysz>
:)
<whitequark>
you don't need -Bstatic.
<whitequark>
you don't have a .so there at all
<whitequark>
just give it -lfoo, it will find the .a by itself and link it statically
<ysz>
well, i have both libfoo.a & libfoo.so
<whitequark>
oh.
<ysz>
i want specifically link against static version...
<ysz>
thats why...
<whitequark>
can you name it like libfoo_static.a?
<ysz>
well... sure
<ysz>
whats the difference/
<whitequark>
-Bstatic/-Bdynamic is nonportable
<ysz>
i dont care
<ysz>
linux only
<whitequark>
okay. anyway, it should work with -lfoo_static -lfoo_stubs
<whitequark>
if it doesn't, reverse the order of the flags
<ysz>
aha, let me try this last one...
<whitequark>
(I don't remember whether ld traverses them left-to-right or the other way)
<ysz>
oh
<ysz>
i cant! :)
<ysz>
-l*_stubs comes from ocaml...
<ysz>
-lfoo comes from that fancy section...
<ysz>
you see?
<ysz>
no way to force those in any particular order
<ysz>
(to gcc command invokation)
<whitequark>
both of them come from the same place.
<ysz>
pardon.
<ysz>
right.
<whitequark>
OCaml doesn't magically know that it needs to link _stubs, it doesn't even know what _stubs means
<ysz>
yeah.. sorry... i messed things a bit...
<ysz>
it comes from ocamlopt ... -o foo.cmxa
<whitequark>
yup, it's the same with .cmxa
<whitequark>
do ocamlobjinfo foo.cmxa
mcclurmc has joined #ocaml
<ysz>
cool
<ysz>
it works as expected!
<whitequark>
so everything works now?
<ysz>
(reversing the order of -l did the trick)
<ysz>
yeah.
<whitequark>
excellent
<ysz>
now i need to figure out how to feed all to ocamlbuild plugin )
<ysz>
whitequark, many thanks!
morphles has quit [Ping timeout: 246 seconds]
<ysz>
btw, i used your myocamlbuild.ml from lz4 bindgings yesterday when i learned how to write Ocamlbuild plugins :)
<ysz>
nice stuff!
ikaros has quit [Quit: Ex-Chat]
mcclurmc_ has quit [Ping timeout: 272 seconds]
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
yomimono has joined #ocaml
ontologiae has quit [Ping timeout: 255 seconds]
morphles has joined #ocaml
ollehar has joined #ocaml
zpe has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Ping timeout: 255 seconds]
oscar_toro has quit [Ping timeout: 265 seconds]
eikke has quit [Ping timeout: 258 seconds]
ysz has quit [Remote host closed the connection]
bytbox has joined #ocaml
oscar_toro has joined #ocaml
<jpdeplaix>
whitequark: I'm wondering how things like « C->getType() == DestTy » could work with getType() returning a pointer. This comes from LLVM
<jpdeplaix>
I get something like that everywhere in my generated code using LLVMLinker (which uses Constants::getBitCast): « %0 = load i8** bitcast (i8** @Multi.id to i8**) »
<jpdeplaix>
This is clearly wrong but the pattern quoted above is used everywhere in LLVM
emery has joined #ocaml
octachron has quit [Quit: Leaving]
bytbox has quit [Remote host closed the connection]
samrat has joined #ocaml
<emery>
I'm reading a book from ~1996 with examples using caml, can I follow along ok with ocmal or should I try and find a version of caml? I ask because some of the pattern matching doesn't seem to work
Hannibal_Smith has joined #ocaml
<whitequark>
jpdeplaix: uh
<whitequark>
what do you think is wrong?
<whitequark>
comparing pointers?
<smondet>
emery: which book? between camllight and ocaml differences are usually easy to work out
<emery>
"The Functional Approach to Programming"
<emery>
by Cousineau
<smondet>
and what kind of problem do you have?
<smondet>
everything in camllight can be expressed in ocaml (not the other way around) so shouldn't be a problem
vogler has quit [Ping timeout: 260 seconds]
cago has quit [Ping timeout: 265 seconds]
ollehar has quit [Ping timeout: 255 seconds]
hugomg has joined #ocaml
<emery>
let rec fact = fun 0 -> 1 | n -> n*fact(n-1);;
<emery>
Error: Syntax error
<whitequark>
use function instead of fun
<emery>
whitequark, that did it, thanks!
<ggole>
And check for the negative case :E
hausdorff has joined #ocaml
<emery>
that raises another problem, I don't know algebra, but thats out of scope
<whitequark>
jpdeplaix: ok, so, answering the question you didn't ask but might have had in mind
<whitequark>
LLVM uniques types within a single LLVMContext
hausdorff has quit [Ping timeout: 255 seconds]
<whitequark>
so basically, any two i8's will have the same address. so you can compare pointers directly.
<ggole>
If you don't know what to return, consider raising Invalid_argument or something of the kind
<whitequark>
jpdeplaix: I've no idea about your problem with llvm-link though, not enough information
thomasga has joined #ocaml
<def`>
m
<whitequark>
ɯ
<ggole>
E
<whitequark>
∃
<companion_cube>
∀
zpe has joined #ocaml
<whitequark>
A
<companion_cube>
∈
<whitequark>
∋
<ggole>
ə
<ggole>
Oops, did it wrong.
<companion_cube>
neat!
<companion_cube>
λ
hausdorff has joined #ocaml
<ggole>
def`: look at what you did. Look.
<whitequark>
y
<ousado>
|
<whitequark>
—
<Drup>
┬─┬
<whitequark>
┻━┻
ollehar has joined #ocaml
<ggole>
⁅
<Drup>
(It shouldn't be bolded !)
<whitequark>
⁆
<companion_cube>
↺
zz_anildigital is now known as anildigital
zpe has quit [Ping timeout: 244 seconds]
<whitequark>
→
anildigital is now known as adgtl
<whitequark>
↻
<whitequark>
←
<whitequark>
○
<ggole>
●
<ggole>
⌫
<companion_cube>
⚒
<whitequark>
◍
<whitequark>
☭
slash^ has left #ocaml [#ocaml]
slash^ has joined #ocaml
* whitequark
is now FYCaaS: flipping-your-characters-as-a-service
<ggole>
±, please
<ousado>
that's way too enterprisy for #ocaml
<companion_cube>
whitequark: please provide a rest API
<whitequark>
ggole: ±
<whitequark>
er
<whitequark>
ggole: ∓
<ggole>
Not bad. Latency could use some work.
ollehar has quit [Ping timeout: 260 seconds]
<whitequark>
companion_cube: sure, just post a valid HTTP POST with an urlencoded body in PM
<whitequark>
say, q=<character>
<whitequark>
don't forget to add an Accept: application/json header, or I will respond in XML
ollehar has joined #ocaml
<companion_cube>
:D
tac has joined #ocaml
<whitequark>
actually, it probably should be a GET, so that proxies would cache the request
<Drup>
whitequark: === 106 to reinstall | 5 to upgrade ===
<Drup>
I hate you, stop releasing minor versions of ocamlfind.
<whitequark>
lol
<whitequark>
no.
<Drup>
or at least, wait for opam 1.2
<whitequark>
never.
<whitequark>
I already sent another patch to Gerd.
<whitequark>
just to spite you!
<Drup>
ಠ_ಠ
<whitequark>
every time you mention this, I will send *another one*.
* whitequark
emits an evil laugh
<Drup>
well, I won't care after opam 1.2
<whitequark>
you do realize packages need to opt-in, right?
<Drup>
Yes, and sed.
<whitequark>
hah
<whitequark>
(actually the patch I sent will not warrant a minor revision by itself, I patched it in opam)
<whitequark>
(it was some dumb issue with osx's sed)
Nahra has joined #ocaml
<jpdeplaix>
whitequark: it seems that if I'm using a different llcontext it is not anymore the same type :(
<whitequark>
yes
<whitequark>
why do you do that?
VoidTheMonoid has joined #ocaml
<jpdeplaix>
you've said to me that llcontext was about thread safe something
ysz_ has joined #ocaml
<VoidTheMonoid>
Anyone have any parser experience here?
<Drup>
ask away
<Drup>
we have at least an expert ruby parser here, he can sure handle anything. (:D)
ysz has quit [Remote host closed the connection]
<whitequark>
jpdeplaix: yes.
<whitequark>
what exactly are you trying to do?
sepp2k has quit [Quit: Konversation terminated!]
<jpdeplaix>
whitequark: nothing special. It just that I preferred creating a new context every time to avoid problems in the futur
<whitequark>
oh.
<whitequark>
you shouldn't do that.
ollehar has quit [Ping timeout: 244 seconds]
<jpdeplaix>
ok :D
<whitequark>
you should create an llcontext per thread when you do multicore compilation
<whitequark>
however, ocaml can't do multicore anyway, so it is pointless
<jpdeplaix>
right :D
<VoidTheMonoid>
I'm have a large number of audio files. I'm looking to parse their file names, splitting at delimiters, finding the patterns of types string-string-int-char, but there are all sorts of exceptions like ommitied initial vlaues boo_ba_1 boo_ba_1_b, boo_ba_1_c...
<jpdeplaix>
whitequark: thanks for the advice
ollehar has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
<VoidTheMonoid>
The keywords in the strings should match a list of types or form a new pattern
<Drup>
VoidTheMonoid: Sounds like a job for fabulous regex.
<whitequark>
woohoo, a comment in French
<Drup>
where ? :D
<whitequark>
lwt
samrat has joined #ocaml
<VoidTheMonoid>
How would you structure that into an approach to parse the types? Regex has me spooked for a project with some many inconsistent names.
<Drup>
for the <something>, I don't know enough about the problem ...
manizzle has joined #ocaml
<VoidTheMonoid>
I don't know the patterns in advance though and they could vary greatly. Should I use regex to split the delimiters first and then try to figure out the types and generate regex commands automatically?
<Drup>
what do the patterns look like ?
<VoidTheMonoid>
The delimiters can also vary blah_-_moo 2
<VoidTheMonoid>
they can be anything at all. I don't know them in advance
<Drup>
well, if you don't know anything at all, how do you expect to be able to parse them and extract information ?
<Drup>
you need some form of regularity, no magic here
<whitequark>
the $1m question
<Drup>
so hum, figure out the problem and maybe you will find the solution, but start by figuring out the problem :D
<VoidTheMonoid>
I want to first parse the full set of patterns. Then I want to confirm thet the strings are all part of the same sets for a pattern position - otherwise they are different patterns. I'm looking to make a supervised process
<VoidTheMonoid>
so for a pattern char_string_in we have {fast; slow} and {red;green;yellow} as the two sets for string representing two patterns.
cago has joined #ocaml
<Drup>
so, given a set of strings and a set of pattern, you want to find the pattern that fits the strings and then use it to extract the informations ?
<VoidTheMonoid>
yes, and if a value isn't matched in a string it prompts the user as to which set it belongs.
<Drup>
is it performance sensitive ?
<VoidTheMonoid>
I don't think so
<Drup>
die and retry then
hausdorff has quit [Remote host closed the connection]
<Drup>
try the pattern (which is a regex) on everything and if it fits, you're good, if not, try another.
<Drup>
you can do more clever by adding lot's of complexity to it.
<Drup>
but I really don't think it's worth the trouble
bytbox has joined #ocaml
<whitequark>
yay. I removed all pa_optcomp from lwt. took me just ... 14 hours today.
<Drup>
whitequark: I think you can use ppx directly on examples
nicoo has quit [Ping timeout: 246 seconds]
<Drup>
not that much of an issue if examples don't build out of the box on old ocaml versions
<Drup>
(I think)
<whitequark>
that makes sense
<VoidTheMonoid>
sure. hmm. well thinking in terms of regex certainly helps me frame the problem a bit better. One more opportunity to defer leaning parsing :)
cago has quit [Quit: cago]
dsheets has joined #ocaml
nicoo has joined #ocaml
tac has quit [Ping timeout: 246 seconds]
Arsenik has joined #ocaml
oscar_toro has quit [Ping timeout: 265 seconds]
yomimono has joined #ocaml
jwatzman|work has joined #ocaml
hausdorff has joined #ocaml
ysz_ has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 258 seconds]
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
eikke has quit [Quit: leaving]
eikke has joined #ocaml
SethTIsue has quit [Quit: SethTIsue]
eikke has quit [Client Quit]
eikke has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
hausdorff has quit [Remote host closed the connection]
adgtl is now known as zz_adgtl
pyon has quit [Quit: brb switching to new emacs]
pyon has joined #ocaml
sheijk has joined #ocaml
ollehar has joined #ocaml
eikke has quit [Changing host]
eikke has joined #ocaml
_andre has quit [Quit: leaving]
thomasga has quit [Ping timeout: 265 seconds]
VoidTheMonoid has quit [Ping timeout: 246 seconds]
CaptainRant has joined #ocaml
<CaptainRant>
Can't ocaml call C lib functions directly, without wrappers and CAMLfoo ?
<companion_cube>
with ctypes, I think
axiles has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
yomimono has quit [Ping timeout: 258 seconds]
ollehar has quit [Ping timeout: 245 seconds]
zpe has quit [Remote host closed the connection]
<adrien>
errr
<adrien>
it's still there but you don't see them
<adrien>
it's possible for "float" functions however
ggole has quit []
morphles has quit [Ping timeout: 250 seconds]
ontologiae has joined #ocaml
ollehar has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
nuki has quit [Ping timeout: 250 seconds]
ysz_ has joined #ocaml
manud has joined #ocaml
ysz_ has quit [Remote host closed the connection]
sheijk has quit [Quit: n8]
thomasga has quit [Quit: Leaving.]
badon_ has joined #ocaml
thomasga has joined #ocaml
badon has quit [Ping timeout: 246 seconds]
badon_ is now known as badon
ontologiae has joined #ocaml
hhugo has joined #ocaml
hausdorff has joined #ocaml
yomimono has joined #ocaml
jonludlam has quit [Quit: Coyote finally caught me]
manud has quit [Quit: manud]
mcclurmc has quit [Ping timeout: 240 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
c74d has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ocaml
zpe has joined #ocaml
mcclurmc_ has joined #ocaml
c74d has joined #ocaml
mcclurmc has quit [Ping timeout: 246 seconds]
Arsenik has quit [Remote host closed the connection]
CaptainRant has quit [Quit: WeeChat 0.4.3]
hhugo has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 245 seconds]
ontologiae has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ocaml
Submarine has quit [Remote host closed the connection]
parcs has quit [Remote host closed the connection]
mcclurmc_ has quit [Ping timeout: 250 seconds]
parcs has joined #ocaml
manud has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ontologiae has joined #ocaml
peddie has joined #ocaml
Simn has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
omnomnivore is now known as shallow
<jpdeplaix>
whitequark: is it better to call the optimizer at the end, after the linkages or for each llmodules and then for the whole as the first option ?
tane has quit [Quit: Verlassend]
ontologiae has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
chris2 has quit [Ping timeout: 272 seconds]
ontologiae has joined #ocaml
AlexRussia has quit [Ping timeout: 272 seconds]
Submarine has joined #ocaml
q66[lap]_ has joined #ocaml
q66[lap]_ has quit [Changing host]
q66[lap]_ has joined #ocaml
enquora has quit [Quit: enquora]
shinnya has joined #ocaml
AlexRussia has joined #ocaml
Bluddy has quit [Quit: Connection closed for inactivity]
q66[lap] has quit [Ping timeout: 250 seconds]
q66[lap]_ is now known as q66[lap]
chris2 has joined #ocaml
manud has quit [Quit: manud]
Bluddy has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
pyon has quit [Quit: emacs fucked up]
thomasga has joined #ocaml
pyon has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
thomasga has quit [Client Quit]
yomimono has quit [Ping timeout: 245 seconds]
ontologiae has quit [Ping timeout: 265 seconds]
mcclurmc_ has joined #ocaml
jao has quit [Ping timeout: 258 seconds]
mcclurmc has quit [Ping timeout: 258 seconds]
mcclurmc has joined #ocaml
mcclurmc_ has quit [Ping timeout: 250 seconds]
hausdorff has quit [Remote host closed the connection]