Questions tagged [ocsigen]

The Ocsigen project is a framework for programming web and mobile applications in OCaml.

The Ocsigen project is a framework for programming web and mobile applications in OCaml. It includes

44 questions
2
votes
1 answer

Unimplemented Javascript primitive caml_pure_js_expr

I want to write and compile cubes.ml such that 1) it wraps an OCaml function to make a JS function that can be called in web; 2) the OCaml function and the bytecode can still be tested in a command line under Linux. cubes.ml is as follows: let () = …
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
2
votes
1 answer

Eliom client to client messaging - Eref scope issue

I have been trying to gain a better understanding of the Eliom functionality for communication lately and to do so I tried to build a simple web page that allows users to send messages to each other. The web page works fine if I log in as one user…
2
votes
2 answers

ocsigenserver: main: Reference to undefined global `Https_client'

I have a file called Facebook.ml in my that uses the Https_client module from the Netclient library. I have compiled the file to Facebook.cmo and I can use all functions without any problem in the toplevel and in other code that I compile. However,…
Thomas
  • 347
  • 3
  • 19
2
votes
1 answer

Can't launch ocsigen server due to failure : ("That function cannot be called here because it needs information about the request or the site.")

I want to create a service who generates its HTML according to the parameter given and a map. Given the parameter, the service search in the map for the html, and a function to launch on client side. type sample = (string (* little text *)* …
ChristopheLec
  • 866
  • 5
  • 13
1
vote
1 answer

What does 'unit' mean in such a type definition?

type waiter = { w_wait : unit Lwt.t; w_waker: unit Lwt.u option; mutable w_did_wait : bool } I don't understand why there are "unit" in w_wait and w_waker?
z_axis
  • 8,272
  • 7
  • 41
  • 61
1
vote
0 answers

How do I put files in folders while using Eliom?

I am beginning to develop a website in ocaml using Eliom. As the project grows, I want to be able to split off different segments of the code into different files and then group these files into folders. I figured out how to split off into different…
1
vote
1 answer

How to write a service that either displays HTML or redirects to another page

In web programming, a common pattern for form submission is: If the form is valid, redirect to another page (Post/Redirect/Get). If the form is not valid, redisplay the form (possibly including error messages this time). How do I express this in…
Flux
  • 9,805
  • 5
  • 46
  • 92
1
vote
1 answer

Running `ocsigen` gives linking error: `dllssl_threads_stubs.so` image not found

I'm currently fighting with a strange linker issue from ocsigenserver. It's apparently looking for ocaml-related openssl dynamic libraries. I have both done a brew install openssl (at latest version) and also an opam install openssl. But I still get…
Kristopher Micinski
  • 7,572
  • 3
  • 29
  • 34
1
vote
1 answer

Creating GET/POST services Ocsigen

I am building a app using Ocsigen, this app will not be connected to a database and the goal is to copy the content from the main website to here. (i am using curl to do Get requests) So my problem here is, I am trying to do a "log in" with a user,…
Joao Saraiva
  • 91
  • 2
  • 15
1
vote
1 answer

Create a checkbox with ocsigen | Eliom

I'm trying to create a checkbox outside of a form, just to bind a JS function on it using Lwt_js_events.clicks. I've tried using bool_checkbox_one, but I can't figure out a way to generate the ~name: parameter for that. I found some post here where…
Ulrar
  • 895
  • 8
  • 17
1
vote
1 answer

Unit Tests in the Eliom Framework

I am building a new project using Eliom and having trouble setting up a compilation process for unit tests using OUnit. I have two files: Js_Client_Code.eliom - contains all of the client side code Project.eliom - contains all of the server side…
Thomas
  • 347
  • 3
  • 19
1
vote
1 answer

How to install Eliom

I can't install eliom of the Ocsigen project $ opam install eliom Your request can't be satisfied: - No package matches eliom. $ opam install eliom.5.0.0 Your request can't be satisfied: - No package matches eliom.5.0.0. but surprisingly i can…
hernan
  • 572
  • 4
  • 10
1
vote
1 answer

Calling an external Js lib from Eliom client code

I am trying Eliom right now, to see what I can do with it. I want to call an external javascript library from my eliom client code. The example code I'm trying is the following: [%%client let three_lib = Js.Unsafe.js_expr "THREE" in let scene2…
1
vote
2 answers

js_of_ocaml.ppx not being find

I'm trying to run js_of_eliom, but it seems that it don't have ppx_deriving This is the message i got when i do a make: js_of_eliom -ppx -c -package lwt -package js_of_ocaml.deriving -package js_of_ocaml.ppx simple_pomodoro.eliom Fatal error:…
João Zeni
  • 21
  • 1
  • 3
1
vote
2 answers

eliom 5.0.0 : fail to get it working

I have updated eliom to the latest version (5.0.0) installed via opam, and it fails. I have tried both with 4.02.1 & 4.02.3 compiler, but, it fails to compile basic eliom : eliomdep -client -ppx -package lwt.ppx -package js_of_ocaml.deriving.ppx…
Pierre G.
  • 4,346
  • 1
  • 12
  • 25