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
8
votes
2 answers

Does Lwt mean "Light Weight Thread"?

I have been testing ocsigen which uses Lwt. I guess Lwt means "Light Weight Thread",right? If so, how can we call it "light weight" ? It seems Lwt is using OS's thread which is NOT light (compared with Erlang and Haskell). Please shed a light on…
z_axis
  • 8,272
  • 7
  • 41
  • 61
7
votes
1 answer

When is double coercion useful?

I stumbled upon the following compilation message in OCaml: This simple coercion was not fully general. Consider using a double coercion. It happened in a fairly complicated source code, but here is a MNWE: open Eliom_content.Html.D let f_link s…
Fabian Pijcke
  • 2,920
  • 25
  • 29
5
votes
1 answer

Are there any ocsigen book available?

Now we have used ocsigen successfully to host an old python cgi application. However, we need to study ocsigen in detail to decide whether or not using OCaml language to develop new web application. Any suggestion is appreciated!
z_axis
  • 8,272
  • 7
  • 41
  • 61
4
votes
1 answer

Can ocsigen be run in toplevel?

I used to run YAWS in erlang's REPL by just running yaws -i. When yaws is running, I can continue to use erlang's REPL. Then I want to know whether or not it is possible to run ocsigen in OCaml's toplevel? Of course, it is not a practical use of…
z_axis
  • 8,272
  • 7
  • 41
  • 61
4
votes
4 answers

Why can't Ocsigen run my python file?

The configure file test.conf is as below: *:8000 /home/zaxis/tmp/log/ /home/zaxis/tmp/data zaxis wheel utf-8 ......
z_axis
  • 8,272
  • 7
  • 41
  • 61
4
votes
1 answer

ocsigenserver.opt fails on startup with Unix.ECONNREFUSED

My ocsigen server has been working fine for a while, but just as I'm about to show it off to someone, it spews this on startup and then exits with failure: ocsigenserver.opt: ocsipersist:dbm: Cannot connect to Ocsidbm. Will continue without…
unhammer
  • 4,306
  • 2
  • 39
  • 52
4
votes
1 answer

How to make something lwt supported?

I am trying to understand the term lwt supported. So assume I have a piece of code which connect a database and write some data: Db.write conn data. It has nothing to do with lwt yet and each write will cost 10 sec. Now, I would like to use lwt.…
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
3
votes
1 answer

ocsigenserver: You are not allowed to use port 80

When I run make run.byte I get this error ocsigenserver: ocsigen:main: Fatal - You are not allowed to use port 80.. I've tried sudo make run.byte but sudo doesn't know about opam or ocsigenserver. I've tried to play with wwwuser in the…
bruce_ricard
  • 743
  • 1
  • 7
  • 15
3
votes
1 answer

Ocsigen/Eliom: How to remove unnecessary JavaScript?

I'm taking my first steps in web programming with the Ocsigen framework. I can build simple apps, but I've noticed that Ocsigen generates loads of unnecessary JavaScript code. Even the Hello world example, which has no interactive components at all,…
Isabelle Newbie
  • 9,258
  • 1
  • 20
  • 32
3
votes
2 answers

Eliom error: {client{}}

I am running into an error that I do not know how to resolve. I have the following code (from the Eliom Graffiti tutorial) which I am trying to test with make test.byte. open Eliom_content.Html5.D module My_app = Eliom_registration.App (struct …
Thomas
  • 347
  • 3
  • 19
3
votes
1 answer

OCaml websocket "Invalid UTF8 data"

I am trying to build a loop with Lwt that will push a frame to a Websocket, wait for the response, print it to the screen, wait 60 seconds and then repeat the process again. I have been able to get something that compiles but I do not have it 100%…
Thomas
  • 347
  • 3
  • 19
3
votes
2 answers

What's the canonical way to serve JSON using Ocsigen?

The Ocsigen/Eliom tutorial starts with an example of an application that serves up "Hello, world!" as HTML: open Eliom_content.Html5.D let main_service = Eliom_registration.Html5.register_service ~path:["graff"] …
Fixnum
  • 1,842
  • 1
  • 13
  • 25
3
votes
1 answer

Failed compiling ocaml-websocket

Trying to build ocaml-websocket, it fails with: File "lib/websocket.ml", line 202, characters 29-42: Error: The function applied to this argument has type ?buffer_size:int -> (Lwt_io.input_channel * Lwt_io.output_channel)…
Igor Liner
  • 97
  • 1
  • 5
2
votes
1 answer

Why cannot i visit my ocsigen site?

%yaourt -Qi ocaml-ocsigenserver name   : ocaml-ocsigenserver version  : 2.0.2-1 URL : http://ocsigen.org/ %cat ocsigen.conf.qachina ... 8000 /media/E/RnD/ocaml/test/log/
z_axis
  • 8,272
  • 7
  • 41
  • 61
2
votes
1 answer

How to arrange source files in Ocsigen project

I have created a simple Ocsigen project from basic template. Everything was fine until I decided I'd like to put all my source files in src directory and create more subdirectiories inside it too, so that my source code is partitioned into modules…
Sventimir
  • 1,996
  • 3
  • 14
  • 25
1
2 3