adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
FreeBirdLjj has joined #ocaml
<companion_cube> %a@.
<companion_cube> indeed
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
sleepydog has quit [Quit: Leaving]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pigeonv has quit [Ping timeout: 244 seconds]
jao has quit [Ping timeout: 272 seconds]
pigeonv has joined #ocaml
FreeBirdLjj has joined #ocaml
olle has quit [Ping timeout: 260 seconds]
jao has joined #ocaml
kvda has joined #ocaml
olle has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 272 seconds]
Haudegen has quit [Ping timeout: 260 seconds]
<HyperMonkey> how do I open only the stuff needed to get sexp support from core_kernel?
<HyperMonkey> when I open Core_kernel it overrides too much stuff and I don't want to program in that style
<companion_cube> idk
<HyperMonkey> I figured out that I can open it in the submodule where my sexpable types are defined and then it doesn't pollute the whole file
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot> <Anurag> You can use sexplib0 if all you need is sexp related stuff.
lix has joined #ocaml
pigeonv has quit [Ping timeout: 260 seconds]
<HyperMonkey> interesting. well, right now it ain't broken ..
<d_bot> <Anurag> https://github.com/janestreet/sexplib0 -> this is the library. Doesn't have any dependencies apart from ocaml and dune. This is what's used by ppx_sexp_conv
mfp has quit [Ping timeout: 256 seconds]
zebrag has joined #ocaml
inkbottle has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
dborisog_ has joined #ocaml
jao has quit [Ping timeout: 264 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
<dborisog_> dborisog:
<dborisog_> labor[m]: My issue with JS generation in Ocsigen was indeed related to scripts, thank you again for suggesting it.
dborisog_ has quit [Quit: Leaving]
dborisog has joined #ocaml
FreeBirdLjj has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
zebrag has quit [Client Quit]
_whitelogger has joined #ocaml
mbuf has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<labor[m]> dborisog_: :)
niklasl has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
amiloradovsky has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
leah2 has quit [Ping timeout: 260 seconds]
mfp has joined #ocaml
leah2 has joined #ocaml
gareppa has joined #ocaml
FreeBirdLjj has joined #ocaml
pigeonv has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
gareppa has quit [Quit: Leaving]
pigeonv has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
pigeonv has joined #ocaml
FreeBirdLjj has joined #ocaml
<olle> dborisog: so someone is actually using ocsigen?
robmyers has quit [Ping timeout: 260 seconds]
<pigeonv> people at BeSport use it ;)
terrorjack has quit [Ping timeout: 260 seconds]
terrorjack has joined #ocaml
ridcully_ is now known as ridcully
<dborisog> olle: BeSport is the only production use I know of. To me Ocsigen seems a part of French investment into a holistic ICT infrastructure, more about national competences than an industrial need. As for me, I'm on my first pet project, trying an appealing idea of a trhough-tier use of the same conceptually rich datatypes.
<olle> dborisog: the lack of websocket killed it for me
<olle> otherwise I'd give it a go
robmyers has joined #ocaml
<dborisog> olle: have you looked at https://ocsigen.org/js_of_ocaml/3.1.0/api/WebSockets ?
<olle> dborisog: i need server support
<dborisog> olle: Ocsigen-start uses NPM, I know little about it
X-Scale` has joined #ocaml
X-Scale has quit [Ping timeout: 272 seconds]
X-Scale` is now known as X-Scale
<olle> dborisog: I need OCaml server support xD
<olle> or, not need, but I want OCaml native websocket server
<olle> Did it before, have the code
<olle> dunno have easy/hard it would be to integrate it into ocsigen
<olle> but, found 0 about it in the manual, so.
<olle> right now I'm using an 8 year old OCaml lib
<olle> the latest websocket opam lib seems to not support non-ssl connections (at least i got header errors when trying locally)
<dborisog> olle: the only hints popping in my mind are bout Basic template and server-side services only
<dborisog> using an external library to work with websockets
<olle> hm
jao has joined #ocaml
<dborisog> you create and register a service, and it handles content you cook separately
sz0 has joined #ocaml
<olle> dborisog: service is an ocsigen concept_
<olle> ?
<olle> i didn't read so much of the manual, only bits
waleee-cl has joined #ocaml
<dborisog> olle: service is one of Ocsigen's key concepts. An instruction for basic template is here http://ocsigen.org/eliom/6.6/manual/workflow-distillery, and Ocsigen-start is a great example for a more comprehensive stuff
FreeBirdLjj has quit [Remote host closed the connection]
zebrag has joined #ocaml
pigeonv has quit [Ping timeout: 260 seconds]
Leonidas has quit [Ping timeout: 252 seconds]
<Khady> flux1: you can use menhir with sedlex
<dborisog> olle: have a look at server/client/shared injections of Ocsigen Eliom, maybe, with this concept js_of_ocaml's websocket might be treated as a server-side websocket
<olle> dborisog: ok
<olle> not sure it's worth the complexity, but i'll have a look
<olle> might be worth it if it means i don't have to write any manual js, and can do type-safe html
<flux1> Khady: I think I don't have nice tokens to give it, the tokenization depends on the context
<flux1> my current sedlex-based parser/lexer didn't come out very pretty :( but I think it works and is robust
<flux1> capture support in sedlex would have made it a lot better I think
<flux1> is there some thing that would automatically 'open install' dependencies of a dune project?
pigeonv has joined #ocaml
pigeonv has quit [Ping timeout: 260 seconds]
pigeonv has joined #ocaml
amiloradovsky has joined #ocaml
<olle> dborisog: is ocisgen modular, can i include parts of it?
pigeonv has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
<dborisog> dborisog: in my very limited experience and incomplete understanding, ocsigen is sort of modular. they have ocsigenserver as the server, eliom as web-framework, tyxml as html/svg generator, js_of_ocaml as js generator. these are the modules, however, they are closely related -- tyxml is used in eliom, I doubt eliom could run by any webserver rather than ocsigenserver, and front-line scripting is js_of_ocaml-driven
<dborisog> olle:
<olle> ok
<olle> thanks
<dborisog> for example, for my pet project I used TyXML to create a few SVG diagrams, this would work in non-eliom framework, but in non-eliom framework I would be much more inclined to use an existing JS library as while loosing in type-safity it would greatly save time.
<olle> hm
<dborisog> If I'm not mistaken, in (one) their web-programming example they used cohttp https://opam.ocaml.org/packages/cohttp/
X-Scale has quit [Ping timeout: 264 seconds]
X-Scale` has joined #ocaml
X-Scale` is now known as X-Scale
mbuf has quit [Quit: Leaving]
pigeonv has joined #ocaml
zebrag has quit [Ping timeout: 240 seconds]
zebrag has joined #ocaml
dborisog has quit [Ping timeout: 240 seconds]
<olle> what's cohttp?
pigeonv has quit [Ping timeout: 272 seconds]
<olle> cow http?
* olle mooo
<olle> also, pattern matching does not scale :(
<zozozo> olle: how so ?
<olle> there's no easy way to split it
<zozozo> I don't really understand what you mean
<olle> doesn't matter
<olle> the important thing is to complain
<zozozo> XD
pigeonv has joined #ocaml
<flux1> olle: you can split extensible types and polymorphic variants
<flux1> having written a bit of rust and then back a bit OCaml, I've come into conclusion that modular implicits would be very nice to have
<flux1> I mean isn't it quite similar to traits. And it's so nice to be able to just have an object and be able to print it. Even if just for debugging, and debug-printing is something Rust seems to provide out-of-the-box.
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<HyperMonkey> flux1: deriving sexp mostly does allow you to print interesting classes of data structures
<flux1> yes, but let's say one wanted to have oUnit2 pretty-print mismatching values.. how much work would one need to do to make that happen?
Haudegen has joined #ocaml
<flux1> and if oUnit2 were to implement such a facility, it would be useful only with oUnit2
<flux1> I did consider just using sexp deriving and then implementing my own assert* functions.. but..
<flux1> of course, those wrappers would not work for just any type. they would need to be functorized.
<flux1> hmm, I do wonder how this would be used to express the need for a value to "implementing multiple traits": https://github.com/ocaml/ocaml/pull/9187
<flux1> I like the Store/Read example
<olle> oh god i should really write a js of ocaml tutorial when i've learned a little
pigeonv has quit [Ping timeout: 272 seconds]
<olle> print_string in js_of_ocaml goes to console log?
<olle> what about console error and trace?
<olle> i can just define an external object, right?
pigeonv has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
pigeonv has quit [Ping timeout: 272 seconds]
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
pigeonv has joined #ocaml
Haudegen has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
<olle> solved
<olle> Firebug module
webshinra has quit [Remote host closed the connection]
<HyperMonkey> I've tried js_of_ocaml recently .. I didn't write a large program in it or anything but it's pretty nifty
webshinra has joined #ocaml
<olle> HyperMonkey: it has pros and cons
<olle> i will give type-safe websocket communication a go and see if it works
<olle> might write a blog post about it ^^
<olle> we need MOAR OCaml blog posts!!
Leonidas has joined #ocaml
<olle> Does anyone know what the `##` operator does in js of ocaml?
andreas303 has quit [Ping timeout: 240 seconds]
<olle> oh, it's even `##.` for properties
<olle> i wonder why that's needed, even
andreas303 has joined #ocaml
<waleee-cl> the examples here (https://ocsigen.org/js_of_ocaml/3.6.0/manual/ppx) seems pretty bonkers if you don't use it
<olle> did anyone try esy and combining reasonml with ocaml packages?
<olle> waleee-cl: bonkers?
<waleee-cl> well, more verbose at least
objmagic has joined #ocaml
<olle> waleee-cl: than regular syntax? yes
<olle> ocaml object syntax is already weird, now they add ##. too? xD
<olle> [@bs.val] external alert : string => unit = "alert";
<olle> in reason
<olle> but
<olle> alert : Js.js_string Js.t -> unit Js.meth
<olle> in js of ocaml
<olle> :d
<olle> types like: Js.js_string Js.t Js.opt Js.meth
<olle> js_string t opt meth
<olle> quite heavy
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<olle> "meth" should be "method"...
<olle> or just "m"
<olle> bikeshedding...
<waleee-cl> I'm guessing you haven't come across the languages that use 'anal' as short for analytics?
<olle> hehe i have not xD
<waleee-cl> granted the one I have seen only use it for llvm-backend code
<waleee-cl> "merge_anal_dump" instead of "merge_analytics_dump" wouldn't fly in less hidden places
<olle> true
<olle> what if a middle-manager sees it?
<olle> imagine if js_of_ocaml api docs actully had examples in them...
<olle> oh joy
vicfred has quit [Quit: Leaving]
vicfred has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
kvda has joined #ocaml
<olle> amazingly, i got the small websocket test to run...
<olle> the error messages are pretty absurd when casting form and to Js.string and ocaml string
<olle> absurd = very very long
pigeonv has quit [Ping timeout: 246 seconds]
amiloradovsky has quit [Ping timeout: 260 seconds]
cantstanya has quit [Ping timeout: 240 seconds]
cantstanya has joined #ocaml