wagle has quit [Remote host closed the connection]
jyc__ is now known as jyc_
<wiml>
ah thanks jyc that has more info than the page I'd found
<wiml>
I still can't get it to invoke findlib to link a package, though. I specify "package(batteries)" but it says "the tag "package(batteries)" is not used in any flag or dependency declaration, so it will have no effect; it may be a typo."
<wiml>
I'm usig 4.02.3; is packages() newer than that?
<wiml>
If I specify -pkgs on the ocamlbuild command line it does the right thing, I just can't seem to specify that via tags file.
<wiml>
Enjolras_ : oho! I'd expected that not to be necessary since "-pkgs foo" does ocamlfind-like behavior already, but apparently that's not enough. Specifying -use-ocamlfind makes the package tags work.
<wiml>
... So, is there a way to specify -use-ocamlfind from the tags file :)
<Enjolras_>
not that i know. I don't understand why it's not the default with a -no-ocamlfind flag but...
<Enjolras_>
usually, i make a build.sh or a makefile which calls ocamlbuild with the options i need
<Enjolras_>
or more usually, i use oasis
<wiml>
I'm new, oasis still intimidates me :)
<wiml>
The github page says they're thinking of making -use-ocamlfind the default in the future
<wiml>
Well, only having to remember one flag is good enough for my small projects.
<Enjolras_>
you can make a very simple makefile with a single default target which calls ocamlbuild -use-ocamlfind target.native
<Enjolras_>
it's handy you can just type "make"
MercurialAlchemi has joined #ocaml
<wiml>
Yeah ... it's just that I can ALMOST make ocamlbuild encapsulate all the build flags like a makefile would, and I want to push it the rest of the way :)
<wiml>
I guess a myocamlbuild.ml might be able to fill in the last gap, but a makefile would be easier
wagle has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
shinnya has quit [Ping timeout: 250 seconds]
Algebr has joined #ocaml
mistermetaphor has joined #ocaml
lewis1711 has left #ocaml ["Ex-Chat"]
wiml has left #ocaml ["Leaving"]
copy` has quit [Quit: Connection closed for inactivity]
slash^ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has joined #ocaml
samg_ has joined #ocaml
A1977494 has joined #ocaml
<samg_>
Hi, all. I get an error when I try to write a Subst module because it conflicts with a module in compiler-libs. I don't use compiler-libs directly -- is the only way to avoid this kind of conflict to rename my module? I depend on ppx_let and core_kernel. 4.03.0+flambda. oasis/opam. Thanks!
mistermetaphor has quit [Remote host closed the connection]
redpoppies has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
A1977494 has quit [Quit: Leaving.]
octachron has joined #ocaml
shinnya has joined #ocaml
struk|work has quit [K-Lined]
leyyin has joined #ocaml
pyon has quit [Quit: Ihnen, Herr Lasker, habe ich nur drei Worte zu sagen: Nyan und Pasu~.]
pyon has joined #ocaml
FreeBird_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
<flux>
samg_, I imagine the easiest solution is really renaming your module..
<flux>
if you depend on the module indirectly, ocamlfind adds its modules to the search path
<Algebr>
presumably ppx does
<samg_>
flux: yeah, I ended up renaming it to Substitute :)
redpoppies has quit [Quit: redpoppies]
redpoppies has joined #ocaml
dsheets has joined #ocaml
rand__ has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
amnn has joined #ocaml
mfp has quit [Ping timeout: 250 seconds]
mfp has joined #ocaml
octachron has quit [Read error: Connection reset by peer]
<flux>
you cannot use ocsigen as a fcgi service under nginx
<Drup>
ah, right
<Drup>
no, but I don't understand why that would even be a good idea anyway
<Drup>
revproxy is made for that
<flux>
well, setting up an ocamlnet scgi service in apache is this line: SCGIMount /murmelo 130.230.72.140:4242 :-)
<flux>
no url rewriting silliness either
<flux>
as all parties involved know what is going on
ygrek has joined #ocaml
<orbifx1>
flux: would equeue have something to do with parallelising fcgi handling?
<flux>
orbifx1, I think if ocamlnet nowadays doesn't directly do parallel scgi processing, it should be relatively easy to implement in Linux with multiple processes listening on the same server socket
<flux>
at least if they don't need to share state
<flux>
even then you could have multiple threads doing the same thing
<flux>
..not sure if that's save with ocamlnet though
<orbifx1>
so I might need fcgiwrapper to do spawning
<orbifx1>
eww it has classes :P
<flux>
classes are great!
mistermetaphor has joined #ocaml
<flux>
let opt_arg cgi s = try Some (cgi#argument s)#value with Not_found -> None <- neat!
<flux>
Printf.ksprintf cgi#out_channel#output_string s in o "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\r"; o "<response status=\"ok\"></response>"
<flux>
(oops, a bit messed up fragment)
<orbifx1>
I think they were a fad.. a bad phase :P
<flux>
I guess you have not yet reached the fourth phase.
<flux>
it goes like this: 1) what are objects, I don't get what's the use.. 2) COOL! I'll use these for everything! 3) wtf was I thinking, functions are teh shit 4) objects and classes are tools along with the rest
<Drup>
:D
<Drup>
flux: a lot of people go directly for 3 and never reach 4
jhaberku has joined #ocaml
<orbifx1>
haha
<orbifx1>
Coming from C++
<orbifx1>
I don't doubt the got uses
<orbifx1>
But I think there's got to be better ways
<orbifx1>
flux: any tutorials/guides on ocamlnet's fcgi?
mistermetaphor has quit [Remote host closed the connection]
<flux>
featuring 58-line inlined SQL query
<flux>
oh actually no, it was two queries half the size of that, almost completely the same though
<orbifx1>
AAAhh my eyes :P
<orbifx1>
j/k
dario1 has joined #ocaml
struk|desk has quit [Quit: Konversation terminated!]
<dario1>
I have a basic question about the Format module. Suppose I have "type t = Alpha | Beta | Gamma", whose to_string and of_string functions are obvious.
<dario1>
Now I want to also define a function of signature "Format.formatter -> t -> unit".
<orbifx1>
flux, Drup: this is what I want to make https://passwordless.net/ , just because I don't want node.js on my server
<flux>
orbifx1, a noble goal :)
<orbifx1>
Any name proposals? Other than passwordless
<flux>
dario1, so the question is?
<flux>
orbifx1, asswordless. one shorter!
<orbifx1>
lol
unbalancedparen has joined #ocaml
<orbifx1>
passwordless' ? :P
<flux>
passwordmless to ensure confusion.
<dario1>
flux: Just what should the function actually do?
<orbifx1>
dario1: look for existing code which does it.
<dario1>
orbitfx1: Simon Cruanes tutorial uses the CCFormat module, but I want a pure Stdlib solution.
<flux>
dario1, I guess let format fmt t = Format.pp_print_text fmt (to_string t)
<flux>
at least it satisfies the types (right?) so it must be correct :)
<dario1>
flux: why not use Format.pp_print_string, which has the same sig?
<flux>
because I found that function first :)
<flux>
I haven't really used Format all that much
<flux>
pp_print_string is probably better
<dario1>
Format may be the most frustrating module in the Stdlib, due to clear introductory documentation.
<flux>
(though I might have gone just with Format.fprintf fmt "%s" (to_string t) just to void specialized functions)
<dario1>
s/clear/lack of clear/
<Drup>
dario1: using CCFormat is just easier, but the stdlib is enough
<Drup>
if you look at the implementation of CCFormat, it's just a bunch of very simple combinators
unbalancedparen has quit [Ping timeout: 258 seconds]
<dario1>
I've taken a closer look at Simon Cruane's tutorial, but it's not exactly what I was looking for.
<dario1>
It presupposes that the reader already knows why they should care about the Format module.
<Drup>
composition, efficiency compared to string manipulation, pretty printing
<Drup>
(in the order of which I care about it)
profan has joined #ocaml
<flux>
dario1, first issue with that particular site: none of the tokens work for me, also the second token went to my spam folder :)
<flux>
finally the third one worked
<dario1>
Anyway, going back to my original problem, what's the kosher way to define a function "print: Format.formatter -> t -> unit" for "type t = Alpha | Beta | Gamma"?
<dario1>
(I've already got 3 different answers)
<dario1>
(Not a good sign)
<flux>
I don't think this is a problem you need to ponder for a long time, just choose one solution you feel is appropriate and go with that :)
<Drup>
dario1: pp_print_string
<Drup>
%s is equivalent to pp_print_string
<Drup>
(pp_print_text is doing more work, as specified in the documentation ...)
<dario1>
Thanks, Drup!
mistermetaphor has joined #ocaml
<dario1>
And I'm still hoping someone who groks Format will write a good tutorial that starts at the beginning...
mistermetaphor has quit [Remote host closed the connection]
<Drup>
well, I was kinda considering the matter closed after companion_cube's tutorials, but apparently it isn't
<Drup>
It would probably help if you could tell us how his tutorial is unsatisfying
<dario1>
A couple of points:
<dario1>
1) Mention the existence of CCFormat and Fmt, but do not actually use them at first.
sh0t has joined #ocaml
<dario1>
2) Motivation, motivation, motivation. Format has been in the stdlib since forever, but it seems that only recently have people started caring about it. Why should newcomers care about Format?
<dario1>
3) Avoid complex examples at first. Start with a dummy example such as "type t = Foo | Bar"
<orbifx1>
flux: your code helps a lot, thanks
<dario1>
4) Don't even mention boxes at first.
<dario1>
5) Get the opinion of a total newbie. A tutorial written by an expert will often have lots of assumed knowledge that a newbie may not have.
<Drup>
well, we are doing 5 right now :D
<dario1>
6) Don't rely on the stdlib documentation to fill in gaps. Simon's tutorial introduces boxes by referring readers to the INRIA documentation, which is atrocious.
<dario1>
Drup: i never said "a couple" meant exactly two... ;-)
<dario1>
Anyway, change of subject: there's no official release of Ocsigenserver/Eliom that works with Tyxml 4.0.0, right?
<dario1>
(Just from looking at the constraints on the OPAM packages)
<Drup>
dario1: not yet
struk|desk has joined #ocaml
<dario1>
I've fully migrated Lambdoc to Tyxml 4.0.0, but only later realised that some of the examples use Eliom...
<dario1>
(Not an urgent problem, anyway)
<dario1>
The Lambdoc library is also no longer dependent on Batteries.
copy` has joined #ocaml
dsheets has quit [Remote host closed the connection]
<Drup>
companion_cube: look like we should make an extended/revised format tutorial :p
<dario1>
Drup: I hope my criticisms didn't come off as ungrateful, because the Format tutorial is useful...
<dario1>
It's just that there's still room for improvement...
jonasen has joined #ocaml
<jstolarek>
what is "ocamlfind" ? SHould it be a part of standard ocaml installation?
dhil has quit [Ping timeout: 250 seconds]
dsheets has joined #ocaml
unbalancedparen has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
<flux>
well, it's not part of the ocaml compiler
<flux>
it is however a part of a common standard ocaml installation
<flux>
along with opam
<flux>
(you can use opam to install ocamlfind)
Nahra has quit [Remote host closed the connection]
<orbifx1>
flux: are fcgi errors reported as scgi in exceptions? I get this: "Netcgi_scgi: Incorrect length of netstring header")
<Algebr>
hannes: are you around?
dario1 has quit [Quit: Konversation terminated!]
<orbifx1>
flux: never mind got it
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bba has joined #ocaml
Nahra has joined #ocaml
rand__ has joined #ocaml
amnn has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Bahman has quit [Ping timeout: 264 seconds]
orbifx1 has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 260 seconds]
rand__ has quit [Remote host closed the connection]
slash^ has quit [Remote host closed the connection]
dsheets has joined #ocaml
slash^ has joined #ocaml
octachron has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]