<rgrinberg>
but i'm not sure how it would work with pinning
<rgrinberg>
or a local opam file at least
<struktured>
rgrinberg: have you tried it yet?
<rgrinberg>
struktured: which command would i use?
chouser has quit [Ping timeout: 265 seconds]
<struktured>
rgrinberg: what about opam pin --no-action project-name project-folder && opam install --deps-only project-name ?
<struktured>
sorry forgot the add, but u get the idea..
<rgrinberg>
struktured: i think that could work
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
chouser has joined #ocaml
AlexRussia has joined #ocaml
jao has quit [Ping timeout: 264 seconds]
jbalint has quit [Ping timeout: 256 seconds]
jbalint has joined #ocaml
zwer_g has joined #ocaml
<struktured>
rgrinberg: core and lwt? interesting combo
<rgrinberg>
struktured: it was async before :P
<struktured>
rgrinberg: I had a feeling there was a change, given your blog history
zwer has quit [Ping timeout: 250 seconds]
<rgrinberg>
haha
<struktured>
rgrinberg: opium looks cool though, maybe I'll finally not be afraid to do front end dev again
chouser has quit [Quit: Leaving.]
<rgrinberg>
funny you say that, opium does nothing to help there
<struktured>
well that resty api you go going on is a start
<struktured>
*go/got
<rgrinberg>
i'm really interested in purescript to solve my frontend woes
<struktured>
there's just too many choices. It's nuts. I will probably go an ocaml solution though
<rgrinberg>
js_of_ocaml is also nice but the runtime is kinda big
<rgrinberg>
that doesn't always matter of course
<struktured>
I can live with that
<rgrinberg>
also, when I work with JS i prefer not to silo myself from the JS world. AFAIK purescript's FFI is much better (both ways)
<rgrinberg>
but yeah, otherwise OCaml is natural
<struktured>
I'm aiming to silo as much as possible :). I don't know js_of_ocaml too well, but I'd like to see some sort of semi-automated js library -> ocaml binding generator
<struktured>
the syntax seems pretty legit but the javascript injection looks a little ugly with the all the slashes and quoting etc
<rgrinberg>
needs more {xxx| … |xxx} :D
lopex has quit [Quit: Connection closed for inactivity]
sdegutis has left #ocaml ["Leaving..."]
rgrinberg has quit [Quit: Leaving.]
dmiles has joined #ocaml
rgrinberg has joined #ocaml
dmiles_afk has quit [Ping timeout: 272 seconds]
<rgrinberg>
struktured: add an opam file to goji as well for pinning
<rgrinberg>
:D
<struktured>
hmm, I thought you were going down the purescript route?
<rgrinberg>
well i have a bunch of maintenance projects in JS
<rgrinberg>
for those i'll try to gradually convert to purescript
nullcat has joined #ocaml
<rgrinberg>
if i'm doing something from scratch then it's ocaml all the way :D
<struktured>
got it, well sorry I'm not ambitious to make an opam file for goji but maybe I will if I actually star tusing it for something. I might try wrapping a js plot lib and/or tree view that way, for instance
<nullcat>
whitequark hi, I don't really understand the usage of ppx_metaquot. Is it something like when you want to add a new thing in the parsetree but you don't want to write the AST manually, you can use the ppx_metaquot and write in concrete syntax. ppx_metaquot will turn it into an AST? is it like a macro in a macro?
<nullcat>
and i guess a simple example is this one?:http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/branches/extension_points/experimental/frisch/metaquot_test.ml?diff_format=l&view=markup&pathrev=13579
<nullcat>
are there any other simple examples?
chouser has joined #ocaml
<struktured>
geez I can literally smell my cpu burning from doing an opam upgrade
ygrek has quit [Ping timeout: 240 seconds]
<nullcat>
i can finish a marathon before `opam upgrade' finishes
BitPuffin has joined #ocaml
tnguyen has joined #ocaml
BitPuffin has quit [Ping timeout: 245 seconds]
<nullcat>
rgrinberg do u know how to use ppx_metaquot?
<rgrinberg>
nullcat: sorry, i don't
<nullcat>
ok. i'll just wait whitequark to wake up
bugabinga has quit [Ping timeout: 244 seconds]
bugabinga has joined #ocaml
<struktured>
nullcat: what are you thinking of doing with it?
<struktured>
nullcat: full discretion, I know little just curious
<nullcat>
I have a research project that I want to use ppx and I am just trying to do it from the very beginning. I feel like ppx_metaquot can solve my problem, partially.
<nullcat>
but still not sure how to use it
<nullcat>
just very very simple. if i have a function "let f x = x" in the file. If I do "let f[%test] x = x", I would like the ppx to derive a new function "let p () -> print_endline "f"", just a new function that can print the name of the function...
<struktured>
nullcat: you only care about the function name, not the args or anything?
<nullcat>
yes
<nullcat>
just starting from some simple stuff
<struktured>
with args, it would rock for log based debugging
<nullcat>
yeah that's the next step
<nullcat>
I will appreciate if someone can guide me
<struktured>
ppx_deriving_show really reminds of me all this, but its used after type definitions, typically, not let expressions
<nullcat>
yes
<nullcat>
whitequark's code gives me some idea
<nullcat>
basically...
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<nullcat>
oh i guess i kind of know how to use it now...
<nullcat>
it's really cool.
ygrek has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
Simn has joined #ocaml
chinglish has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
swgillespie has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
chinglish has quit [Ping timeout: 245 seconds]
chinglish has joined #ocaml
larhat has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 256 seconds]
govg has joined #ocaml
ygrek has joined #ocaml
<struktured>
nullcat: where did you get that build script template from?
<nullcat>
i wrote it...
tel has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Quit: Leaving.]
<struktured>
nullcat: are you importing anything in the test file? whenever I use ppx, I always need to import something for it to compile properly
<struktured>
nullcat: never mind, I don't import to derive show explicitly..
moei has quit [Quit: Leaving...]
chouser has quit [Quit: Leaving.]
<nullcat>
would u like to help me with my problem...
moei has joined #ocaml
<struktured>
eh I'm going to bed soon sorry, but maybe later if you are still stuck. I imagine whitequark will solve that build issue in < 30 seconds though
larhat has quit [Quit: Leaving.]
matason has joined #ocaml
dsheets_ has joined #ocaml
waneck has quit [Ping timeout: 245 seconds]
<whitequark>
who's pinging me
jonludlam has quit [Quit: Coyote finally caught me]
<nullcat>
me!
<nullcat>
thank god you show up finally
<nullcat>
I am trying to write some ppx stuff with ppx_metaquot in the ppx_tools
<nullcat>
also, what i really want to here is generating a function that can print the name of the first function, really easy stuff
<nullcat>
i guess you can understand what i wrote in ppx_component.ml
<whitequark>
sure
<nullcat>
the thing is that when i try rewriter, it will fall in infinite loop. I believe there is something going on I totally missed and it will be good if i can figure it out. after that, I can try the way you suggest
<nullcat>
'ocamlfind ppx_tools/rewriter ./ppx_component.native test_ppx_component.ml' just gives me 'let f
<nullcat>
((((((((((((((((((((((((((..........'
<whitequark>
so, first, a few notes
<nullcat>
yes
<whitequark>
1) use structure_item instead of structure
<whitequark>
to avoid iterating the list yourself
<whitequark>
a structure is just a structure item list
<whitequark>
2) a structure does not consist of expressions but structure items
<whitequark>
in your case toplevel let and expression let are different
<nullcat>
yes
<whitequark>
you call it "expr".
<nullcat>
yeah sorry i should change it to some other name
<nullcat>
you mean i should write a structure_item mapper, right?
<whitequark>
yes
Tekk_ has quit [Remote host closed the connection]
<dmbaturin>
If I need to handle something in the middle of the list and at the end of the list in a slightly different way, is "if xs = []" in the "x :: xs" case the best way to do it, or there are better ideas?
<whitequark>
nullcat: ah, the structure item suggestion won't actually work here
<whitequark>
since you append an item
<dmbaturin>
That is, if I don't want to duplicate most of the code in the "x :: []" case.
<dmbaturin>
nullcat: Well, that's the question. Separate [x] may be too much duplication, while "if xs = []" doesn't feel aesthetically right.
<nullcat>
dmbaturin what do you mean by 'too much duplication'?
<companion_cube>
nullcat: what are you writing?
<nullcat>
i am just trying to write a simple ppx extension which uses ppx_metaquot to do the following thing
<nullcat>
if a function is written as "let f[%getvb] x = x + 1", i want to generate a function that can print its name, which in this case, is "f".
oscar_toro has joined #ocaml
<nullcat>
but for now, things compile. but when I do ocamlfind ppx_tools/rewriter just try to verify if i get it correctly, rewriter falls into infinite loop and blows up
<companion_cube>
would you give the name of f to f itself?
<companion_cube>
or generate a separate function?
ghostpl has joined #ocaml
<nullcat>
generate a seperate function
<nullcat>
which is like, "let print_name () = print_endline "f"
<nullcat>
but the problem is that the rewriter falls into infinite loop
<dmbaturin>
nullcat: E.g. if I want to search for or replace a subsequence I'll need to account for the case when the end of a subsequence is also the end of the list. Maybe I can structure if in a different way or use a nested function though.
<companion_cube>
I guess you have to remove the syntax extension, but I never wrote a bare ppx
<companion_cube>
only plugins to ppx_deriving
<companion_cube>
dmbaturin: pattern matching is almost always the answer on list
<companion_cube>
s
<nullcat>
but for function i don't want to generate the function that can print its name, i want a way to distinguish them
<whitequark>
i already told you how to fix that error
<nullcat>
[%%getvb let f x = x + 1]?
<whitequark>
... no
<whitequark>
those two are equivalent
<nullcat>
then i guess i missed what you said...
<whitequark>
08:46 < whitequark> so, the issue is that you're trying to transform let f x = [%getvb x + 1]
<whitequark>
08:46 < whitequark> let f[%getvb] x = x + 1 is equivalent to [%%getvb let f x = x + 1]
<whitequark>
your ppx rewriter would transform code of form let f x = [%getvb x + 1]
<nullcat>
let me see
destrius has quit [Quit: Leaving.]
larhat has joined #ocaml
<nullcat>
no i changed it. still does not work...
<nullcat>
and i don't understand it will only work on 'let f x = [%getvb x + 1]. I first write 'let f[%getvb] x = x + 1' and dumped its ast. I write my ppx code to manipuate the ast to get something like i dumped
<whitequark>
sigh
<whitequark>
right.
<whitequark>
pattern (test.ml[1,0+5]..[1,0+13])
<whitequark>
Ppat_extension "getvb"
<whitequark>
[]
<whitequark>
missed this. your code is right
<nullcat>
i've been working on this for a whole night. i really want to figure it out even though i have sleep at 3am
<nullcat>
have to*
<whitequark>
ok, i finally know what's wrong with it
<whitequark>
you need to remove the extension node between feeding the AST back to compiler
<whitequark>
(or the typechecker will complain)
<nullcat>
remove that [%getvb] thing from the ast?
<whitequark>
alternatively you could use an attribute instead of extension nodes, those get ignored by the compiler
<companion_cube>
why not use [@@foo] rather than [%foo] then?
<whitequark>
yeah
<nullcat>
omg
<nullcat>
i really wish i learnt that before...
<nullcat>
omfg...
<nullcat>
thank you guys!
<nullcat>
so, to wrap this up. extension node should be removed from the ast. attribute note does not have to be removed b/c it can be ignore in the following step
<companion_cube>
otoh, extensions that modify code (e.g. lwt.ppx) tend to use extension nodes, because it doesn't make sense to compile without preprocessing
<whitequark>
in ppx_deriving, you just don't have extension nodes in the right place
<whitequark>
ie type t = {}[@@x]
<whitequark>
there is no [%%%]
<whitequark>
[@@@] ~ [%%]
<companion_cube>
so let%lwt x = foo doesn't make sense without preprocessing
<nullcat>
but this does not pass syntax check when i want to dump the ast "let f[%%getvb] x = x + 1"
<whitequark>
you can't use [%% like that
<whitequark>
it's a floating extension node
<whitequark>
it's a structure item by itself
<nullcat>
ok so now 'let f x = x + 1 [%%getvb]' works now
<nullcat>
but [%%getvb] as you said is a strucuture now
<nullcat>
now i have to patter matching like x :: y :: _ ->
chinglish has quit [Ping timeout: 246 seconds]
<nullcat>
y is the [%%getvb] and x is the 'let f = ...'
<Drup>
It's less than 10Ko, you can't really do smaller than that
<adrien_znc>
h, I thought it was closer to 70K
<Drup>
hello world is 8ko
paradoja has left #ocaml ["Killed buffer"]
darth_lumbergh has joined #ocaml
<Drup>
(and less than 5ko after closure)
darth_lumbergh has quit [Client Quit]
vanila has joined #ocaml
chinglish has quit [Ping timeout: 264 seconds]
enitiz has quit [Ping timeout: 255 seconds]
ghostpl has quit [Remote host closed the connection]
jabesed has joined #ocaml
chinglish has joined #ocaml
badkins has joined #ocaml
ghostpl has joined #ocaml
dario_ has joined #ocaml
AlexRussia has joined #ocaml
darth_lumbergh has joined #ocaml
darth_lumbergh has quit [Client Quit]
enitiz has joined #ocaml
darth_lumbergh has joined #ocaml
paradoja has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
ggole has joined #ocaml
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 252 seconds]
destrius has joined #ocaml
ygrek has joined #ocaml
ptc has joined #ocaml
ptc is now known as Guest28309
axiles has joined #ocaml
Guest28309 has quit [Client Quit]
leowzukw has quit [Ping timeout: 246 seconds]
tobiasBora has quit [Ping timeout: 252 seconds]
enitiz has quit [Ping timeout: 245 seconds]
ghostpl has quit [Remote host closed the connection]
ghostpl has joined #ocaml
ghostpl has quit [Remote host closed the connection]
Sim_n is now known as Simn
leowzukw has joined #ocaml
tobiasBora has joined #ocaml
darkf has quit [Quit: Leaving]
uris77 has joined #ocaml
enitiz has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
jgjl has joined #ocaml
bytbox has joined #ocaml
kapil__ has quit [Quit: Connection closed for inactivity]
tane has joined #ocaml
ollehar has joined #ocaml
ptc_ has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
bytbox has quit [Remote host closed the connection]
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
rossberg has quit [Remote host closed the connection]
tel has joined #ocaml
Algebr has joined #ocaml
enitiz has quit [Ping timeout: 245 seconds]
<Algebr>
I keep getting an issue with ocsigen not being able to find dllsll_threads_stubs. I have tried with leaving opam in $HOME, and now have moved it to /usr/lib/opam. I know where dllsll_stubs.so is, it does exist. Kind of stumped atm.
paradoja has left #ocaml ["Killed buffer"]
ghostpl has joined #ocaml
rossberg has joined #ocaml
enitiz has joined #ocaml
ghostpl has quit [Remote host closed the connection]
jgjl has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
enitiz has quit [Ping timeout: 245 seconds]
<Drup>
Algebr: is it on os X or arch (or both ?)
ygrek has joined #ocaml
<Algebr>
I haven't tried on OS X, just on Arch
<Drup>
ok
destrius has quit [Quit: Leaving.]
ghostpl has joined #ocaml
avsm has quit [Client Quit]
<Drup>
I don't really know, sorry. I don't think it's directly related to ocsigen (maybe lwt) so try there
<Algebr>
Drup: Where would ocsigenserver expect to find .sos?
<Drup>
ocsigen just uses ocamlfind
mort___ has quit [Ping timeout: 245 seconds]
ghostpl has joined #ocaml
skinkitten has joined #ocaml
ghostpl has quit [Remote host closed the connection]
ghostpl has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl has quit [Read error: Connection reset by peer]
bytbox has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<Algebr>
Drup: But when ocsigenserver craps out, where was it expecting to find dllsll_threads_stubs.so? What can I feed to ocamlfind to simulate what would need dllssl_threads_stubs?
tani has quit [Read error: Connection reset by peer]
swgillespie has joined #ocaml
<dsheets_>
Algebr, is it in ~/.opam/YOUR_SWITCH/lib/stublibs?
<Algebr>
I do have this .so
<Algebr>
right now I'm trying to cp it to various places that I think ocsigen would like, at least to get something working.
enitiz has joined #ocaml
paddymahoney has joined #ocaml
paddymahoney has quit [Max SendQ exceeded]
bytbox has quit [Remote host closed the connection]
<dsheets_>
Algebr, you're sure it's in the stublibs for your current opam switch and you've updated your env with "eval `opam config env`"?
ggole has quit []
tane has joined #ocaml
<Algebr>
yep, and did it again just now for good measure
leowzukw has quit [Quit: Lost terminal]
yomimono has quit [Ping timeout: 265 seconds]
<dsheets_>
Algebr, and cat `ocamlfind printconf ldconf` points to the stublibs dir?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jwatzman|work has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<lambdahands>
Hey all, I'm using Core.Std for a list of lists transformation, and coming from Clojure I'm missing the `mapv` function. Is this implementation okay? And if so, would it be worth sending off a pull request? :) https://gist.github.com/lambdahands/603f16297bd171c05002
<nicoo>
lambdahands: What is mapv supposed to do ?
<lambdahands>
It takes a list of lists and runs a function over a list containing the nth element of all lists. So: `mapv [[1;2;3]; [1;2;3]] ~f:(List.fold ~f:(+)) = [2;4;6]
<lambdahands>
nicoo ^
<lambdahands>
nicoo: Here's the Clojure doc: http://clojuredocs.org/clojure.core/mapv - it's overloaded to accept variable length args, but I'm not sure if there's an equivalent technique in OCaml.
<dch>
then `opam pin add -y re2 . -k git` in my source repo
dsheets has joined #ocaml
bytbox has quit [Remote host closed the connection]
travisbrady has joined #ocaml
JuggleTux has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
travisbrady has quit [Client Quit]
Thooms has quit [Ping timeout: 245 seconds]
travisbrady has joined #ocaml
nullcat has joined #ocaml
<Drup>
dch: and what is the problem ? ^^'
<dch>
Drup: atm its my understanding on opam pin, but its improving :-)
<dch>
just hunting down more gcc-isms
travisbrady has quit [Client Quit]
Remyzorg has quit [Quit: WeeChat 1.0.1]
<dch>
if I `export CXX=clang++` then re2 compiles (can’t say it passes tests yet but 1 step at a time).
<dch>
but I have no more g++ left in the repo, so maybe this is an implicit gmake rule or something
* dch
talks out loud
travisbrady has joined #ocaml
cateches has joined #ocaml
Thooms has joined #ocaml
* MercurialAlchemi
dances the oasis/ocamlbuild danse
<Drup>
MercurialAlchemi: having fun ? :D
<nicoo>
dch: AFAIK, even GNU make honours ${CXX}
* nicoo
dances with MercurialAlchemi
<MercurialAlchemi>
after much fumbling, myocamlbuild.ml works
<MercurialAlchemi>
many chickens were sacrified to the gods of build systems
<Drup>
:D
<MercurialAlchemi>
it's also a good illustration of the power of type systems
travisbrady has quit [Quit: travisbrady]
ghostpl has joined #ocaml
<cateches>
is cohttp the recommended http library for apps that just need to have an http server built in but aren't primarily webapps? or is ocsigen more recommended
<MercurialAlchemi>
for instance, when you use strings to write "ocamlep" instead of "ocamldep" and problems happen
<cateches>
ocsigen seems beefier, but minsky seems to speak cohttp's praises
<nullcat>
anyone wants to answer my ppx question again...?
<MercurialAlchemi>
then you wish you were working in a language with a strong type system
<nullcat>
whitequark sorry but are you still here?
<companion_cube>
MercurialAlchemi: we should make assemblage work
matason has quit [Ping timeout: 264 seconds]
<nullcat>
companion_cube do you have sometime?
<MercurialAlchemi>
companion_cube: doesn't it use ocamlbuild under the covers?
travisbrady has joined #ocaml
hilquias` has joined #ocaml
tenki has joined #ocaml
<dch>
nicoo: yes this is not a fix for the underlying issue in re2 though, which is hardcoded calls somewhere.
<companion_cube>
MercurialAlchemi: no, it should compile to a Makefile, I think
<companion_cube>
nullcat: what's your question?
<companion_cube>
(can't promise I will be able to answer)
<Drup>
cateches: well, ocsigen will replace most of it's internal core to cohttp soon
<rgrinberg>
cateches: that depends on your app. and yeah what Drup said
<nullcat>
but when you do 'make test', nothing happened. I am expecting a string "a" will be printed out
<cateches>
rgrinberg `ab -n 10000 -c 100 "http://localhost"` would hang up after about ~4-5k and the server would just die
travisbrady has quit [Quit: travisbrady]
<dch>
nicoo: I can tell you more about that probably.. TL;DR don’t use it if you need feature stability across releases. we (couchdb) recommend stun, haproxy etc instead.
<rgrinberg>
cateches: on linx right?
<nullcat>
oh i see.
<nullcat>
i fixed it
<cateches>
os x
matason has joined #ocaml
<companion_cube>
nullcat: you need to call the function
<cateches>
rgrinberg: os x
<rgrinberg>
cateches: Async/Lwt are very inefficient on OSX since they use select
<companion_cube>
here it looks like you just define a function p()
<nullcat>
hold on, let me update my file
<rgrinberg>
cateches: it's not a problem with cohttp but rather async which needs kqueue support (or be built on top of something like libuv)
<Drup>
nullcat: start by using ppx_rewriter to check if the code outputed is correct
<Drup>
(or the argument -dsource to the compiler)
<cateches>
rgrinberg: so I can at least build working code on my MBP and trust that perfomance will be better when I'm not deploying to a cluster of MBPs ;)
<Drup>
for ppx_rewriter, the CLI is "ocamlfind ppx_tools/rewriter ..."
<rgrinberg>
cateches: something like that :P
<rgrinberg>
cateches: but if you make any serious benchmarks please report to mirage/ocaml-cohttp
<rgrinberg>
we'd happy to work on improving performance
<nicoo>
dch: I'm not even an Erlang user. I'm trying to figure out why ejabberd's SSL options suck, and they are all inherited from OTP
<nullcat>
Drup, thx. but my problem is not with that i guess. https://github.com/marklrh/ppx_playground/blob/master/ppx_vb.ml#L24. "p" now should print "id", which is the name of the function. I guess there is something I don't know how to do. When I do 'make test', compiler will warn me "id" is unbound
<cateches>
okay, I don't need super beefy performance for a PoC, but I'll give feedback if I deploy anything and it sucks. I'm a big fan of github issues
<MercurialAlchemi>
rgrinberg: it's not meant to be a front-end server, is it?
<rgrinberg>
MercurialAlchemi: what is?
<MercurialAlchemi>
rgrinberg: cohttp
<nicoo>
But don't worry, CouchDB sucks too :þ
<nullcat>
i guess i just simply insert a code that wants to print "id", but "id" is not really defined.
<dch>
nicoo: we’re a friendly bunch over on #erlang feel free to ask there. or bug @old_sound on twitter too
<nicoo>
'k :)
<rgrinberg>
MercurialAlchemi: depends where you run it. On mirage it mostly definitely is. On Linux i'd put nginx in front of it like most sane people
<rgrinberg>
Drup: finally found your comment :D
<MercurialAlchemi>
rgrinberg: isn't it susceptible to be dossed on mirage as well? or does it handle something like slowloris gracefully?
<rgrinberg>
my impression of being large was looking at the ocsigen samples
<rgrinberg>
like the realtime wiki
<rgrinberg>
MercurialAlchemi: i believe there's no slowloris protection now. Mostly because it's something we'd like to test before claiming we're safe against it
<Drup>
did you compare to a similar sized application ?
<Drup>
(also, I remember you asking, and I told you I was pretty sure it wasn't minimized)
<MercurialAlchemi>
rgrinberg: right
bytbox has joined #ocaml
tenki has quit [Quit: Page closed]
<Drup>
nullcat: you need to antiquote before calling some ocaml
<Drup>
currently, you will just output "id" literally
<Drup>
do [%e id ]
<nullcat>
this is the metaquot stuff in ppx_tools, right?
<nullcat>
i saw that in the his comment, [%p], [%e] ...
<rgrinberg>
Drup: i should reconsider it then :O. My use case is slowly getting existing JS apps out of the maintenance nightmare
<rgrinberg>
which means reusing what's still there. ember/jquery etc.
<Drup>
yeah, I understand, it's not really js_of_ocaml's strongest point since you will need to interop almost seamlesly with js. FFI with js is not big (it's much tinner than OCaml <-> C) but it's still bigger than ther other languages you considered (purescript, fay, elm)
<nullcat>
can you explain it further? the [%e...] [%t ...] ... stuff?
<Drup>
nullcat: are you familiar with the concept of quotation/antiquotation ?
<nullcat>
not really
<nullcat>
sorry... is there anything I can read and learn from?
<rgrinberg>
nullcat: learn lisp :D
<rgrinberg>
umm, hongbo zhang's blog talked about this stuff a little
<Drup>
list is not really big on that, since everything is uniform
<Drup>
nullcat: basically, you have quotations let's mark them [%str ...]
samuelrivas_ has quit [Ping timeout: 245 seconds]
yomimono has quit [Ping timeout: 264 seconds]
<Drup>
inside the quotation is another language, here we have "ocaml's ast", it's not real ocaml, it's just syntactically similar
tane has quit [Quit: Verlassend]
<Drup>
and sometimes, while inside an ocaml ast, you need to introduce something external (like your id) from the host language
<Drup>
it's called "antiquotation" because you break out of the quotation
<Drup>
normal_ocaml [%str some ocaml ast [%e normal ocaml again ] ocaml ast ]
<Drup>
in case of ppx_metaquot, you have 3 different antiquotations based on which ast you want
<Drup>
(expressions, patterns, types)
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Drup>
I killed him :(
* adrien
sends Drup to jail
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
matason has quit [Ping timeout: 250 seconds]
uris77_ has joined #ocaml
uris77 has quit [Ping timeout: 250 seconds]
ayepot has joined #ocaml
Guest54826 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matason has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
jabesed has joined #ocaml
nullcat has joined #ocaml
matason has quit [Ping timeout: 250 seconds]
<nullcat>
Drup no you did not. The class just ended and I have to move out and find another place
ptc has joined #ocaml
<nullcat>
i see what u meant. I used LISP before but did not use too much macro.
ptc is now known as Guest74945
jwatzman|work has quit [Quit: jwatzman|work]
bytbox has quit [Remote host closed the connection]
hilquias` has quit [Ping timeout: 240 seconds]
ingsoc has quit [Read error: Connection reset by peer]
travisbrady has joined #ocaml
jonludlam has joined #ocaml
uris77_ has quit [Quit: leaving]
MercurialAlchemi has quit [Ping timeout: 245 seconds]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
<nullcat>
Drup: also it seems that [%e id] does not work. I guess it should be [%p id].
<nullcat>
Drup: but there are some other problems...
<Drup>
it should be [%e id]
<Drup>
[%p ] is for patterns
tel has joined #ocaml
<tel>
I often hear that people avoid the object system. Why is that?
<mrvn>
the error messages can be strange
shinnya has joined #ocaml
<Drup>
tel: you can do things differently most of the time
<tel>
so it's more that it doesn't add significant power?
<Drup>
it's a bit of a 2nd citizen, as it didn't received as much love as the rest of the language (in particular, it's quite slow)
<mrvn>
it adds inheritance
<Drup>
tel: it adds stuff, just that you don't need it all the time :)
<mrvn>
if records had row types then you probably wouldn't need objects at all
<tel>
mrvn: that makes a lot of sense... I often desire row types in Haskell
<mrvn>
The cost of objects is that you have dynamic dispatch of methods. The extra indirection costs time.
<mrvn>
which also means no inlining afaik
<seliopou>
i'm getting some... "interesting" behavior while trying to pin a package
<tel>
mrvn: that's good to know
<Drup>
tel: note that it could be improved
<Drup>
nobody dedicated time to do it, that's all
nullcat_ has joined #ocaml
<seliopou>
i'm creating a replacement for the current aws package, so when I do `opam pin add aws .` locally, it's still trying to install the the package from opam rather than the local one
<tel>
Drup: the performance or the semantics?
<Drup>
the performance
<Drup>
seliopou: opam version ?
<seliopou>
1.2.1
<nullcat_>
Drup: when I use [%e id] and try to build my preprocessor, the compiler says "File "ppx_vb.ml", line 25, characters 61-63:
<nullcat_>
Error: This expression has type string but an expression was expected of type
<nullcat_>
Parsetree.expression"
<tel>
yeah, there are good tricks for dyn dispatch optimization, but I can easily see why nobody would care enough
<mrvn>
Drup: I think the main slowdown is the dynamic dispatch and you can't change that without changing the semantic or a whole lot of inlining
<Drup>
tel: the semantic could also be improved though
nullcat has quit [Ping timeout: 264 seconds]
badkins has quit [Read error: Connection reset by peer]
<tel>
mrvn: the "whole lot of inlining" is kind of what I think of dyn dispatch optimization in general
<Drup>
nullcat_: that's because you need to build a string node
<tel>
Drup: like how?
jao has quit [Ping timeout: 252 seconds]
<nullcat_>
oh i see
<Drup>
nullcat_: stry "Ast_convenience.str"
<Drup>
try*
bytbox has joined #ocaml
<nullcat_>
ok there are so much good stuff idk
<Drup>
tel: the hability to inherit (you could also say "extend") an object
<Drup>
currently, you can only inherit a class
<tel>
Can I view information about a type in a repl?
ghostpl has quit [Remote host closed the connection]
<tel>
In particular, I find myself often missing GHCi's :i
<tel>
:info, :kind, etc
<whitequark>
#show_type ty
<tel>
oh, that apparently isn't available in utop?
<Drup>
tel: just type the name of the identifier
<Drup>
or use #show, but just the name is fine
<tel>
Drup: maybe I have an old version, #show doesn't exist and typing the type name alone reports "Error: Unbound value list"
<Drup>
you have ocaml 4.02.1 ?
<rgrinberg>
tel: we have merlin in OCaml as well. which beats the pants off what's in haskell land :P
cateches has quit [Quit: Page closed]
<Drup>
(and ocp-browser n__n)
<tel>
Drup: yep, but utop 1.15
<Drup>
(which doesn't beats hoogle, but is still damn convenient)
<tel>
rgrinberg: I'm still figuring out how to use merlin :)
<Drup>
tel: update, I guess.
Thooms has quit [Quit: WeeChat 1.0.1]
<tel>
what's ocp-browser?
<Drup>
tel: install ocp-indent and lambda-term
<rgrinberg>
ocp-browser is more of an acquired taste imo :D
<def`>
:)
badkins has joined #ocaml
<tel>
I'm realizing suddenly that Nix's OCaml packages are a little behind across the board. Ah well, a project for another day
Kakadu has quit []
mort___ has quit [Quit: Leaving.]
<Drup>
rgrinberg: what does that mean ? ^^'
<Drup>
tel: don't ask yourself and use opam
mort___ has joined #ocaml
ghostpl has joined #ocaml
maufred has quit [Ping timeout: 265 seconds]
struktured has joined #ocaml
<tel>
Drup: Ha, I'll think about it. Mutable package databases seem dangerous to me nowadays.
badon has quit [Quit: Leaving]
ghostpl has quit [Remote host closed the connection]
<tel>
Anyway, thanks for your help everyone. I'm off for now--cheers!
tel has quit [Quit: Using Circe, the loveliest of all IRC clients]
mort___ has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
nullcat_ has quit [Read error: Connection reset by peer]
ghostpl has joined #ocaml
Guest74945 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
maufred has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
ptc has joined #ocaml
ptc is now known as Guest67190
<seliopou>
figured it out, opam file wasn't checked into the git repo