groovy2shoes has quit [Read error: Connection reset by peer]
ulfdoz_ has joined #ocaml
groovy2shoes has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz_ is now known as ulfdoz
groovy2shoes has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
sebz_ has joined #ocaml
groovy2shoes has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
rgee has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
sebz_ has quit [Quit: Computer has gone to sleep.]
groovy2shoes has quit [Read error: Connection reset by peer]
mlh has quit [Ping timeout: 250 seconds]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
tnguyen has joined #ocaml
tnguyen has quit [Remote host closed the connection]
<hcarty>
adrien: xstrp4 2.0alpha5 is available and on oasis-db/odb. It fixes both the "You can't say file!" issue and error location reporting.
sebz has joined #ocaml
Modius has quit [Read error: Connection reset by peer]
Modius has joined #ocaml
dnolen has quit [Quit: dnolen]
srcerer_ has joined #ocaml
srcerer has quit [Ping timeout: 240 seconds]
ftrvxmtrx has joined #ocaml
george_z0rwell has joined #ocaml
vext01 has quit [Ping timeout: 255 seconds]
vext01 has joined #ocaml
Reaganomicon has quit [Ping timeout: 255 seconds]
mfp has quit [Ping timeout: 255 seconds]
mfp has joined #ocaml
tnguyen has joined #ocaml
ygrek has joined #ocaml
tnguyen 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
<adrien>
hcarty: awesome, thanks!
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
hcarty has quit [Remote host closed the connection]
sebz has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 258 seconds]
edwin has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
lpereira has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
<flux>
is there an extension that allows to construct string literals out of other literals (that have been bound to a compile-time symbol)?
cthuluh has quit [Quit: '']
cthuluh has joined #ocaml
Amorphous has quit [Ping timeout: 260 seconds]
ftrvxmtrx has joined #ocaml
Amorphous has joined #ocaml
Ptival has quit [Quit: Quat]
<adrien>
flux: xstrp4?
<flux>
adrien, I'm thinking if I would be able to use it with PGOCaml, PGSQL(dbh) "SELECT * FROM BAR", where the string literal could be composed from other fragments (but the string needs to be constructed fully at compile time)
<flux>
so does xstrp4 do that?
<adrien>
if I've understood what you want well, yes
Ptival has joined #ocaml
drake01 has joined #ocaml
gasche has joined #ocaml
<gasche>
hi
<flux>
adrien, hm, well if I have for example let a = "hello" let _ = interpolate "hello $a", it converts into String.concat "" [ "hello "; a ], but I'd like to get "hello hello". is there a way to make that happen? or do I need to use include_file?
<flux>
adrien, because pgocaml won't be able to handle PGSQL(dbh) (String.concat ..), it needs to be a string literal
<gasche>
use macaque instead :-'
<flux>
is it as complete as pgocaml?
<adrien>
flux: ah, ok, for typing purposes?
<gasche>
flux, no, but it is compatible with pg'ocaml
<gasche>
in the sense that you can use PG'OCaml by default, and use Macaque to build the queries that need more flexiblity
<flux>
adrien, well, almost. pgocaml takes that string and at compile time checks it against the database.
<flux>
adrien, and based on that it also infers types for its own "interpolation"
<gasche>
but, yes, macaque supports only a subset of the SQL commands/grammar/whatever; patches are welcome, though
<gasche>
(may I ask for more context on the present discussion? Is adrien proposing a camlp4 extension?)
<adrien>
flux: well, you might want to harass hcarty about that ;p
<adrien>
gasche: xstrp4
<flux>
adrien, maybe I will :)
<flux>
or perhaps I could take a look myself..
<flux>
gasche, I guess I could've used macaque then for a part where I build fully dynamic queries with pg'ocaml..
<gasche>
hm
<gasche>
I quite remember (I was bluestorm in another life) having discussed macaque with you, and even implemented one feature or two as a result
<flux>
I didn't know it played nice with pgocaml
<flux>
gasche, I remember trying macaque a long time ago :)
<gasche>
well it basically reuses PG'OCaml for the low-level stuff, database handler and all
<flux>
and I think at that point there were some limitations that affected me
<adrien>
gasche: I see .de in your host, which city are you currently in?
drake01 has quit [Quit: Ex-Chat]
<gasche>
basically Macaque does "composable query representation -> string", and then use its type information to parse the results
<gasche>
adrien: Munich, why?
<flux>
I now have this a few dozens of lines long query generator for a specific purpose, I think I could write it to use macaque instead of generating postgresql (prepared) query strings instead
<gasche>
hm
<gasche>
macaque, in its current state, may not be featureful enough
<adrien>
gasche: Berlin as far as I'm concerned ;-) (desktop summitÃ
<adrien>
)
<gasche>
flux, but I would be interested in seeing that specific example use-case of yours, to have ideas for potential improvements
<gasche>
adrien, which tribe are you belonging to?
<adrien>
gasche: none ;-)
<gasche>
I have a hard time keeping interest in KDE or Gnome development over time
<adrien>
gasche: I wasn't too far away, I was interested into some talks and some will probably prove valuable
<adrien>
gasche: I use openbox, no desktop environment, only window manager, no decorations, nothing
<flux>
gasche, web/web.ml function draw_chart (on line 124) makes use of the query generation interface
<gasche>
well the people are certainly friendly, and there may still be interesting things
<gasche>
eg. the work on Semantic Desktop in collaboration with the global Semantic Web EU funding
<adrien>
now, if it stopped sucking resources ;-)
<flux>
this project is 50% about learning new things, so maybe I should've used macaque as well :)
<gasche>
flux, GADT spotted
<adrien>
flux: for the rewrite ;- )
<flux>
btw, I absolutely love the new Module.(xx) shortcut in ocaml 3.12.0, good thing the pa_do guys invented it :)
<gasche>
flux: indeed it looks like you have reimplemented a subset of Macaque
<gasche>
minus the weird query syntax
<flux>
well, the syntax gets a lot simpler when you have a much more narrow use case
<gasche>
you have a module with a typed abstract interface and dirty untyped internals, which does query generation, and then you parse the result back in a typed form
<gasche>
Macaque does just that, with more crazy object types in the typed interface that are flexible but painful, a syntactic layer to build queries, and parsing the result back use the dynamic type information so there is some Obj.blah going on
<flux>
I actually need to add support for another table soon, but I guess I'll try to extend that module with a new type and see how it goes..
<flux>
I also hope that I don't need to support 'custom joins' in the interface :)
betta_y_omega has quit [Ping timeout: 246 seconds]
betta_y_omega has joined #ocaml
lopex has joined #ocaml
hcarty has joined #ocaml
yezariaely has joined #ocaml
yezariaely has left #ocaml []
<hcarty>
adrien: I hope it works well for you!
<flux>
hcarty, so when is xstrp4 going to have string macro expansion (expanding multiple string fragments into a compile time string literal) for me to use with PGOCaml?-)
<hcarty>
flux: Next week! Assuming that you submit a patch by the middle of the week :-D
<flux>
hcarty, hmph :)
<flux>
I propose syntax: LET ASDF = "42" and INTERPOLATE ("hello" ASDF) :)
<hcarty>
flux: I think that should be possible to build that on top of xstrp4
<flux>
actually the current interpolation syntax would work
<hcarty>
flux: Indeed
<flux>
maybe as a special case if all fragments are special literals, it could avoid the String.concat altogether
<gasche>
but a camlp4 extension cannot know where the fragments are defined
<flux>
gasche, it would know, because they would be defined with special syntax
<gasche>
it can work if the identifiers are illegal
<flux>
ah, right, I was thinking the special syntax would allow to define for example only uppercase symbols
<flux>
I guess that's not yet 100% fool proof though
<flux>
..but does it need to be..
<gasche>
that's the ugly thing with most syntax extensions: you are forced to be ugly
<gasche>
I think you should rather consider using a preprocessor-like extension, such as Martin Jambon's cppo or camlp4's pa_macro
<gasche>
they are meant to rewrite thing at preprocessing-time, unless xstrp4
<flux>
I took a loko at pa_macro, and it doesn't do this
<gasche>
it could possibly be improved
<flux>
I _think_ it has scoped macro values, though, so it might be simpler to modify that
<flux>
I guess that's a non-trivial feature
<gasche>
(I don't mean they have the feature, but I mean that the feature you want fits better in a preprocessor design)
<gasche>
yes, I just checked, pa_macro has local DEFINE .. IN ... , but lacks string concatenation
<gasche>
that could be fixed though
<flux>
I wonder if there is any use case for these except pgo'caml
<flux>
can using such literals increase performance at some points?
<gasche>
well, once you start being dirty, you find dirt everywhere
<gasche>
I'm not sure it is performance-related
<gasche>
I think rwmjones has a slightly similar feature in its bitstring extension, a nifty way to define "patterns variables" that are expanded inside patterns at preprocessing-time
<gasche>
(with complications due to the fact that he wants to be able to define those first-class patterns in separate files)
<flux>
hm, right, it _could_ be used for pattern matching as well
<flux>
isn't let f () = let a = "hello" ^ " world" in a going to be a slower function than let f () = let a = "hello world" in a ?
<gasche>
yeah, but who cares?
<flux>
so in principle, if you build your string out of predefined fragments, it could be faster :-)
<flux>
dunno :)
<gasche>
(it's not only slower, it also allocates)
<gasche>
(string literals are compiled as constant data, instead of allocated at runtime; that's a nice optimization that plays *awfully* badly with mutable strings)
drake01 has joined #ocaml
<hcarty>
flux: A slight diversion - PLplot does install its .mli on my system, next to the .cm? files
<flux>
hcarty, maybe it's the new version then
<hcarty>
flux: Which version had you tested with?
<hcarty>
It's quite possible that it's a more recent addition
<flux>
hcarty, 5.9.5
<flux>
(because that's the one in debian unstable)
<hcarty>
flux: I just grabbed the 5.9.5 source and it looks like the .mli install was missing at that time
<hcarty>
It exists now, so when 5.9.8 (or 5.9.9) ends up in Debian the problem should be fixed
<hcarty>
Along with the problem of the OCaml bindings not being packages
<hcarty>
s/packages/packaged/
<flux>
nice
<flux>
I already have too many packages I needed to install manually on debian, such as ocsigen 2.0rc1 and its deps..
drake01 has quit [Ping timeout: 240 seconds]
drake01 has joined #ocaml
drake01 has quit [Max SendQ exceeded]
drake01 has joined #ocaml
lopex has quit []
rwmjones has quit [Ping timeout: 264 seconds]
betta_y_omega has quit [Ping timeout: 240 seconds]
<hcarty>
Associat0r: I'm about an hour into his talk. He's an interesting developer to follow.
ftrvxmtrx has quit [Read error: Connection reset by peer]
<Associat0r>
hcarty: I still have to watch the beginning
yezariaely has joined #ocaml
ftrvxmtrx has joined #ocaml
Cyanure has joined #ocaml
yezariaely has left #ocaml []
ftrvxmtrx has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
lopex has joined #ocaml
drake01 has joined #ocaml
lpereira has quit [Quit: Leaving.]
sebz has joined #ocaml
vext01_ has joined #ocaml
vext01 has quit [Ping timeout: 250 seconds]
gasche has quit [Ping timeout: 276 seconds]
<adrien>
Associat0r: can't watch it right now, is he saying he likes static typing?
ftrvxmtrx has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
<Associat0r>
adrien: kinda
zorun has joined #ocaml
<Anarchos>
adrien i know since 1995 that caml is cool, i hate working with silly java/j2ee at work
hcarty has quit [Remote host closed the connection]
lopex has quit [Ping timeout: 246 seconds]
Cyanure has quit [Ping timeout: 255 seconds]
lopex has joined #ocaml
Cyanure has joined #ocaml
ankit9 has quit [Quit: Leaving]
Smerdyakov has joined #ocaml
lopex has quit [Ping timeout: 276 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
lopex has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
mnabil has quit [Ping timeout: 240 seconds]
drake01 has quit [Ping timeout: 260 seconds]
drake01 has joined #ocaml
junsuijin has joined #ocaml
drake01 has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 250 seconds]
ftrvxmtrx has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
lamawithonel_ has joined #ocaml
lamawithonel has quit [Ping timeout: 255 seconds]
Associat0r has quit [Quit: Associat0r]
ygrek has joined #ocaml
lamawithonel_ has quit [Ping timeout: 255 seconds]
TaXules has joined #ocaml
Smerdyakov has quit [Quit: Leaving]
sebz has joined #ocaml
lamawithonel_ has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
iratsu has quit [Ping timeout: 255 seconds]
lamawithonel_ has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
lamawithonel_ has quit [Excess Flood]
rothwell has joined #ocaml
<rothwell>
hello. is there a way to pass C compiler flags to ocamlbuild without writing a plugin?
lamawithonel_ has joined #ocaml
lamawithonel_ has quit [Remote host closed the connection]
lamawithonel_ has joined #ocaml
<zorun>
you mean passing flags to ocamlc? yes there is (RTFM)
<zorun>
-cflag or -cflags
<rothwell>
i've rtfms
<rothwell>
i mean passing C compiler flags to whatever ocamlbuild calls to compile C code
<flux>
rothwell, I think ocamlc compiles c code as well, by invoking cc obviously.. so passing -cc <command> Use <command> as the C compiler and linker to ocamlc should do the trick?
<flux>
ocamlbuild -classic-display might be useful for finding out what's actually happening
ftrvxmtrx has quit [Quit: Leaving]
<adrien>
-cflags '-ccopt,-Wall'
<adrien>
maybe
<rothwell>
ah, that last one got it
<adrien>
with -classic-display as flux said, it's a must if you want to see what's going on
<rothwell>
sorry... patience is strained. i've wasted four hours and counting trying to get some ocaml + C code to compile and link
<adrien>
and you can use '-ccopt,-Wl,somethingforthelinker'
<rothwell>
have moved to ocamlbuild in a desperate bid to actually get this done today
<adrien>
rothwell: I haven't tried oasis but I think it might work better
<rothwell>
i agree about classic-display
<adrien>
or, OCamlMakefile
<adrien>
I need to move from that to oasis, but so far it's working
<adrien>
(it's not perfect but it mostly works)
<adrien>
ok, have to go home, bbl
<adrien>
well, home, youth hostel
ygrek has quit [Ping timeout: 250 seconds]
<zorun>
temporary home, then :)
<rothwell>
oh dear... i can pass one flag but not multiple
<rothwell>
i think that's enough for today
pkl_ has joined #ocaml
edwin has quit [Remote host closed the connection]
lamawithonel_ has quit [Remote host closed the connection]
lamawithonel_ has joined #ocaml
iratsu has joined #ocaml
iratsu has quit [Read error: Connection reset by peer]
<flux>
cool, liquidsoap has bindings for opencl
<flux>
no any cool embedded opencl- or ocaml-to-opencl-stuff, though, but looks pretty nice nevertheles :)
pkl_ has quit [Ping timeout: 276 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
pkl_ has joined #ocaml
iratsu has joined #ocaml
pkl_ has quit [Ping timeout: 252 seconds]
pkl__ has joined #ocaml
pkl__ has quit [Ping timeout: 250 seconds]
Cyanure has quit [Remote host closed the connection]