<Bluddy[m]>
rgrinberg: can flambda inline returned options from lookups?
johnelse has joined #ocaml
pootler has joined #ocaml
ygrek_ has quit [Ping timeout: 272 seconds]
sgronblo has joined #ocaml
<sgronblo>
Does opam have some kind of cabalfile, package.json type thing?
<sgronblo>
Is it Oasis?
pootler has quit [Ping timeout: 272 seconds]
<sgronblo>
Or the "opam" file?
<Khady>
the opam file is supposed to describe the package sgronblo
<sgronblo>
What's the difference between an ocaml package and an oasis project?
<sgronblo>
I tried running opam pin add my-hello-world . -n but it did not open an editor like the opam manual says it would
Madars has joined #ocaml
<Khady>
oasis describes how to build a project
<sgronblo>
And no opam file was created either
<sgronblo>
First it said my project was path-pinned and then it said it was unpinned
<Khady>
I don't understand why pin would open an editor
Algebr``` has joined #ocaml
<Khady>
what part of the manual says that?
<sgronblo>
"At this stage, OPAM will be looking for metadata for the package <project>, on its repository and in the source directory. Not finding any, it will open an editor with a pre-filled template for your package's opam file."
<sgronblo>
Is it because I was trying to set it up in an empty directory?
<sgronblo>
The new user experience is confusing
Algebr``` has quit [Ping timeout: 244 seconds]
pierpa`` has quit [Ping timeout: 276 seconds]
<sgronblo>
What is the author to referring to with this "ocamlbuild is a tool that helps build OCaml programs, many people have strong opinions on it"? Does he mean people think ocamlbuild sucks?
<Khady>
There is something wrong with the manual indeed
<sgronblo>
"Be aware that oasis is really finicky and its error messages are useless" <- That's reassuring...
<Khady>
haha those tutorials must really be cleaned up
<sgronblo>
What I still don't get is how do I specify what dependencies my project needs.
<Khady>
as a package or to build it?
<sgronblo>
Like I am interested in trying to use Lwt. Shouldn't I put down in some file that my project relies on Lwt at version x.y.z so that if I clone the repository at some later point I can just run a single command and have all the dependencies get installed automatically?
<Khady>
yes, so you do that in the opam file
<Khady>
there is a depends field
<Khady>
which is a list of other opam packages
<sgronblo>
How can I generate the opam file? Doing the pin command in the guide didn't work for some reason.
<sgronblo>
Ok, that leads to question #2 do I have to add dependencies both to .merlin and to opam then?
<Khady>
I don't know if there is a tool to generate an empty one. I usually write it by hand
<Khady>
yes, merlin is not able (yet?) to use the opam file to know what packages it should look for
<sgronblo>
so at this point, people do it by hand?
<sgronblo>
Right, but I've never seen a package manager so far that wasn't able to auto-generate a dummy package file for a new project...
<Khady>
_tags is related to ocamlbuild. You use it to customize the build of your project
<sgronblo>
so many tools
<Khady>
to enable some warnings for example
<Khady>
yes, many layers :(
<sgronblo>
I guess many OCaml veterans have already worked through this but as a new user used to more modern and polished ecosystems this feels quite rough
<sgronblo>
I think the reason no opam file was generated was because my project got unpinned, which might have been because I tried to pin a projet for an empty directory?
Orion3k has quit [Quit: Leaving]
Orion3k has joined #ocaml
Orion3k has quit [Remote host closed the connection]
Orion3k has joined #ocaml
<sgronblo>
So what files are required to pin a project directory?
<Khady>
I never tried to pin an empty directory, can't help much for that sorry. I always pin directories that already have an opam file
al-damiri has quit [Quit: Connection closed for inactivity]
<sgronblo>
I guess I'll just skip this question for now... So then there's competition between ocamlbuild, oasis and omake for building? Any others?
brunoro has joined #ocaml
<Khady>
sgronblo: ocamlbuild is the "default" tool for building. Oasis is a wrapper around other building tools (including ocamlbuild). Oasis is a bit more high level and may be easier to use
jeffmo has joined #ocaml
nicholasf has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
jeffmo has quit [Read error: Connection reset by peer]
<sgronblo>
Yeah I'm trying out ocamlbuild right now
jeffmo has joined #ocaml
<sgronblo>
So ocamlfind's job is to take a list of package names and outpout a more verbose version of them that is acceptable as linking parameters?
pootler has joined #ocaml
<sgronblo>
And I would assume it also goes and looks up the transitive depdendencies of the other libraries?
<sgronblo>
Oh, so ocamlfind will also run the compiler for me?
<sgronblo>
Ok, this doesn't seem too bad now
pootler has quit [Ping timeout: 244 seconds]
copy` has quit [Quit: Connection closed for inactivity]
Algebr``` has joined #ocaml
<sgronblo>
I am now getting errors like "Error: No implementations provided for the following modules: Lwt_main referenced from main.cmx" when trying to compile with ocamlbuild
wolfcore has quit [Ping timeout: 244 seconds]
<sgronblo>
I'm running ocamlbuild -use-ocamlfind -pkgs 'lwt' main.native and I have done opam install lwt before.
Algebr``` has quit [Ping timeout: 244 seconds]
tmtwd has quit [Ping timeout: 272 seconds]
wolfcore has joined #ocaml
<sgronblo>
No one alive here any more?
eh_eff_ has joined #ocaml
<sgronblo>
oooh, Lwt_main and Lwt_io were in lwt.unix...
FreeBirdLjj has quit [Remote host closed the connection]
tmtwd has joined #ocaml
eh_eff_ has quit [Ping timeout: 276 seconds]
kakadu has joined #ocaml
<sgronblo>
Trying to sort out how this whole Ocsigen thing works but it seems kinda messy
<sgronblo>
So Ocsigen_server is like some kinda Apache?
<sgronblo>
And then you are supposed to compile Eliom modules and load them for serving through Ocsigen_server by specifying them in a config. And eliom has all kinds of dependencies like sqlite?
<struk|desk>
ocisgen is bit like LAMP, if you want to force the apache analogy. but I don't really use it for anything.
<kakadu>
you specify dependencies in config file too, AFAIR
brunoro has joined #ocaml
MercurialAlchemi has joined #ocaml
AlexDenisov has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
jeffmo has quit [Quit: jeffmo]
pootler has joined #ocaml
<sgronblo>
Is there something that is simpler? Like on the level of node.js http module if you happen to be familiar with that?
<Khady>
i'd say opium or webmachine, depending on what you want to do
brunoro has quit [Ping timeout: 276 seconds]
struk|desk has joined #ocaml
eh_eff_ has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
pootler has joined #ocaml
nicholasf has quit [Remote host closed the connection]
pootler has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
nicholasf has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
<sgronblo>
Khady: Thanks, those sound promising too
<Khady>
cohttp is very low level
<sgronblo>
Ah so they are both built on cohttp
Algebr``` has joined #ocaml
nicholasf has quit [Read error: Connection reset by peer]
tmtwd has quit [Ping timeout: 264 seconds]
Algebr``` has quit [Ping timeout: 244 seconds]
j_king has quit [Ping timeout: 240 seconds]
alexst has joined #ocaml
Simn has joined #ocaml
alexst has quit [Ping timeout: 272 seconds]
rbocquet has quit [Ping timeout: 252 seconds]
tmtwd has joined #ocaml
alfredo has joined #ocaml
eh_eff_ has joined #ocaml
Algebr``` has joined #ocaml
FreeBirdLjj has joined #ocaml
eh_eff_ has quit [Ping timeout: 244 seconds]
brunoro has joined #ocaml
eh_eff_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
nicholasf has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
eh_eff_ has quit [Ping timeout: 272 seconds]
Algebr``` has quit [Ping timeout: 244 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pootler has joined #ocaml
FreeBirdLjj has joined #ocaml
pootler has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 264 seconds]
Algebr``` has joined #ocaml
Algebr``` has quit [Ping timeout: 276 seconds]
nicholasf has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
brunoro has joined #ocaml
FreeBirdLjj has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
Algebr``` has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
pootler has joined #ocaml
kakadu has quit [Remote host closed the connection]
pootler has quit [Ping timeout: 244 seconds]
pootler has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alexst has joined #ocaml
AlexDenisov has joined #ocaml
alexst has quit [Ping timeout: 240 seconds]
brunoro has joined #ocaml
timclassic has quit [Remote host closed the connection]
barkmadley[m] has quit [Remote host closed the connection]
M-ErkkiSeppl has quit [Remote host closed the connection]
lpw25[m] has quit [Remote host closed the connection]
M-jimt has quit [Write error: Connection reset by peer]
Bluddy[m] has quit [Write error: Broken pipe]
M-martinklepsch has quit [Write error: Connection reset by peer]
M-pesterhazy has quit [Write error: Broken pipe]
M-Illandan has quit [Write error: Connection reset by peer]
regnat[m] has quit [Write error: Broken pipe]
srenatus[m] has quit [Write error: Connection reset by peer]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brunoro has quit [Ping timeout: 272 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
lpw25[m] has joined #ocaml
AlexDenisov has quit [Client Quit]
<Algebr```>
any point of making something like: module M () = struct ... end
mfp_ has joined #ocaml
<lyxia>
I'm sure there is.
<lyxia>
I just can't think of any upfront.
<rightfold>
no special casing needed in code generation
<Algebr```>
what do you mean by special casing
AlexDenisov has joined #ocaml
<rightfold>
a code generator that generates functors doesn't have to treat specially the case where there are no parameters, because () is allowed
<rightfold>
so that may be one place where nilary functors turn up
<Armael>
side effets at the toplevel of the produced module?
<Armael>
module M () = struct let x = print_endline "foo" end;;
<Armael>
module N = M ();;
brunoro has joined #ocaml
<flux>
algebr```, module M () : sig type t val make : t end = struct type t = () let make = () end
<Algebr```>
is it still the case in 4.03.0 that regular variants are limited to 255?
<flux>
algebr```, if you make two instances of that, the type t is incompatible between the instances
<Algebr```>
I don't think poly variants are limited with that right
<Algebr```>
flux: ah!
<flux>
algebr```, I don't think the representation for variants has been changed, so yes..
jstolarek has joined #ocaml
<Algebr```>
damnit
<flux>
hmm
<flux>
interestingly I have a variant that has 422 constructors
<flux>
so did this kind of limit exist at some point? surely the compiler should complain?
<flux>
I'm on 4.03.0
brunoro has quit [Ping timeout: 240 seconds]
jwatzman|work has joined #ocaml
jstolarek has quit [Remote host closed the connection]
ocabot has joined #ocaml
al-damiri has joined #ocaml
nariyal has joined #ocaml
<Algebr```>
flux: interesting...
lpw25[m] has quit [K-Lined]
<nariyal>
I'm trying to build https://github.com/mirage/ocaml-cow; it has an `opam` file with all the dependencies listed. Is it possible to run a command and automatically get the deps installed?
<reynir>
infinity0: what timezone are you in? Maybe I can help after work (evening UTC+2)
<infinity0>
oh yeah, me too UTC+2
<reynir>
(I don't have experience with debian packaging; not sure how much I can help)
<infinity0>
there is a good chance it will "just work" but if there's errors then i will need to ask people questions
<Algebr```>
UTC+2 is central europe?
<infinity0>
cool, i'll have a crack at it this evening. yes central europe
<flux>
zozozo, I guess such a functionality would need some low-level interface to collect input data into a hash table etc..
<companion_cube>
we use olinq for the group_by itself, it does the hashtbl part
<zozozo>
yeah, I was thinking about that too, but well, semms a little bit too much trouble for the use I'd get, so I'll stick to React.signals for now
<infinity0>
companion_cube: also is there somewhere describing the soundness issue, i thought modular implicits was basically just syntax sugar
lpw25[m] has joined #ocaml
<infinity0>
lpw25[m]: oh hey
<companion_cube>
they do change inference, so I'm not sure it's trivial to show that principality of types is preserved
<companion_cube>
also, that implciits are resolved consistently
<infinity0>
what is "change inference" or "principality of types"
<companion_cube>
it changes type inference (obviously)
<companion_cube>
and principality of types is the property that, for a large subset of the type system, inference finds the (unique) most general type of a value, iff the value is well typed
<infinity0>
oh right ok i read that as "they do 'change inference'"
<infinity0>
i see
brunoro has joined #ocaml
shinnya has joined #ocaml
<Algebr```>
I'm using a functor and I want the returned module to have a signature that's not just what's the functor's result but also everything in the struct that was passed to the functor
<Algebr```>
so like at a minimum of a certain signature but also more functions dependent on module is created by the functor
<Algebr```>
trying to use the module system to module some oop code
<Algebr```>
so I'm getting like the base class interface but now all the other methods exposed specific to the created class (ie returned module from the functor)
<infinity0>
module S2 (M: S) = struct include S (*extra stuff*) end -- is that what you mean
<Algebr```>
yea but the created module only gets exposed functions which are the signature of the Make functor
<Algebr```>
oh wait, maybe include will do it?
brunoro has quit [Ping timeout: 276 seconds]
<infinity0>
if you want to restrict the signature of the created-module then you need to define another module type, and have module S2 (M: S) : type = struct etc, i think
<reynir>
shouldn't it be !something := blah to set factoid? ;)
_andre_ has joined #ocaml
AlexRussia has quit [Ping timeout: 276 seconds]
_andre has quit [Ping timeout: 244 seconds]
freusque has quit [Quit: WeeChat 1.4]
pierpa has joined #ocaml
<gasche``>
Kakadu: how long would the students work on these topics?
<gasche``>
is that like "one night of hacking" or more like "a semester project"?
<gasche``>
I have a list of OCaml-related projects that I should update
<gasche``>
but it's more like a few months of part-time work than a hacking session
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<kakadu>
semester project
<gasche``>
( my project list is at http://gallium.inria.fr/~scherer/description_projets_ocaml.html ; I forgot it was french, but it will be amusing exercise for the chan (technical language can oten be roughly understood), and I could translate it as I update it )
<gasche``>
(I had more ideas since but I forgot some of them)
<gasche``>
(I plan to maintain a list of OCaml-related projects on the long term)
<Drup>
(pretty sure I cut that out of cumulus, one way or another)
pierpa has joined #ocaml
<gasche``>
Kakadu: would you comment more on why you didn't find it interesting?
<Armael>
Drup: this should probably go in the manual
<gasche``>
I'm interested because I was part of the talk selection committee this year, so knowing what people would like to see is helpful
<Drup>
Armael: yeah ...
<gasche``>
(if you prefer to send me an email about it it's also fine)
pierpa` has joined #ocaml
<gasche``>
Armael: send a pull request!
<Bluddy[m]>
gasche``: If I had to guess, looking at the subject list, I'd say it felt like there was some filler this year. The 'main talk' from my perspective was Leo's during HOPE
<gasche``>
were you at HOPE?
<Drup>
gasche``: as someone who looked at the talk selection, and being mildly involved in the ocaml community, a lot of it was terribly unsurprising/already seen. I haven't yet see the actual talks
<Bluddy[m]>
no but it's already up
<Drup>
(the HOPE talk was very good indeed)
<Bluddy[m]>
on youtube
<gasche``>
hm
<Bluddy[m]>
KC's reagents talk should be interesting too, but I've already seen a previous version
<gasche``>
I'm not sure it would be a good idea to fill the OCaml Workshop with manyears-of-work research projects either
<Bluddy[m]>
fair enough
<gasche``>
(I mean it's good to have some of it, but we can have other stuff too)
<Bluddy[m]>
I do want to see those videos
<gasche``>
I'm interested in more feedback from people in the chan
<gasche``>
but also, did you consider sending a talk proposal yourself?
<Drup>
gasche``: I have the opposite opinion: there were too many of those long projects that we know about since quite a while. But that's maybe because I'm too involved with the various people in question ...
<Drup>
I'll see when they go online anyway
<gasche``>
Drup: which projects specifically do you have in mind?
<companion_cube>
I swear, I'll never use raw ocamlbuild again -_-
<flux>
companion_cube, solvu?
<gasche``>
flux: have you tried solvuu yet?
<flux>
nope
<flux>
but I installed it. does it count?
<gasche``>
:p
<companion_cube>
oasis, for now
<gasche``>
hadn't had time to look at it in details yet
<flux>
but I currently have one ocamlbuild project that fails to recompile a certain file after a .cmi changes
<flux>
and I don't really know how to fix it
<Drup>
companion_cube: I have to write ocamlbuild rules right now, I don't like it either :(
<flux>
and my myocamlbuild.ml is growing larger and larger :)
jabesed has quit [Read error: No route to host]
<flux>
in make I could just say that this test/foo.cm{o,x} depends on src/bar.cmi, but if I try that too hard it ends up trying to actually putting the .cmi file to the compile command line, and that of course fails..
<flux>
maybe solvu would let me start from scratch ;)
AlexDenisov has joined #ocaml
<reynir>
What's solvu?
<flux>
solvu-build actually is the actual name. it's a new way to use ocamlbuild.
<flux>
solvuU-build
<Bluddy[m]>
does janestreet core have a function composition operator?
<reynir>
Thanks
veggie_ has joined #ocaml
<Drup>
gasche``: btw, do you have personal highlights for icfp in general ? I looked at some of the paper, but nothing in details yet
<companion_cube>
oh god, even oasis doesn't properly enforce include paths
<flux>
bluddy[m], apparently there is Fn.compose, but unless it's changed since 2013, there's no operator
<flux>
personally I've used @.
<Bluddy[m]>
I saw |- somewhere and I've grown used to it
<Bluddy[m]>
btw are there supposed to be problems composing functions with optional arguments?
annoymouse has joined #ocaml
<Bluddy[m]>
let (|-) f g x = f (g x)
<Bluddy[m]>
let foo ?x y = y
<Bluddy[m]>
let bar x = x
<Bluddy[m]>
let foobar = foo |- bar
<Drup>
companion_cube: "enforce include path" ?
<Bluddy[m]>
Error: This expression has type ?x:'a -> 'b -> 'b but an expression was expected of type 'c -> 'd
<companion_cube>
Drup: that a library only has access to some include paths
<companion_cube>
so that it HAS to use the libraries in BuildDepends instead of trying to use the modules directly
<companion_cube>
(which leads to errors like "oh, Foo.Bar and Bar are not the same")
<gasche``>
Drup: I haven't had the time to look at the preprints yet
<gasche``>
but I liked Eric Seidel's talk on error messages
<theblatte>
Bluddy[m]: isn't that Pervasives.(@@)?
<gasche``>
(it's on a subset of OCaml they use for teaching and I suspect it could be scaled to the full language within a reasonable amount of work)
<gasche``>
Dan Licata's keynote was excellent in terms of pedagogy (homotopy type theory explained to kids)
<Bluddy[m]>
gasche``: no, this is to compose functions without giving them input. Similar to haskell's .
pyon has quit [Ping timeout: 244 seconds]
<Bluddy[m]>
gasche``: and it seems to break when composing functions with optional args, which means they aren't transparent !?
<theblatte>
ah, right
<Bluddy[m]>
haskell's (.)
<theblatte>
also, I'm not gasche`` ;)
<ggole>
Bluddy[m]: you can 'erase' the optional/labelled arguments by eta-expanding
<ggole>
Which is clumsy but workable
<gasche``>
Drup: the CakeML and Cogent stuff is interesting
<Bluddy[m]>
theblatte: sorry, misread
<gasche``>
(Yong Kiam Tan and Liam O'Connor were the respective presenters)
octachron has quit [Ping timeout: 240 seconds]
<gasche``>
the HopJS presentation was good, given the limited time, but I guess you already know about the work
<gasche``>
"Unifiers as Equivalences" is excellent work (again!) by Jesper Cockx
<Drup>
indeed :)
<gasche``>
"Constructive Galois Connections" was also very well delivered as a talk
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pyon has joined #ocaml
<gasche``>
I disliked the work on disjoint intersection types
<gasche``>
but I missed more sessions than last year due to student volunteer stuff, because the organization was harder this year
<gasche``>
("Indexed Codata Types" is more interesting work on copatterns from the Beluga team)
octachron has joined #ocaml
alexst has joined #ocaml
AlexDenisov has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_andre has joined #ocaml
brunoro has joined #ocaml
_andre_ has quit [Ping timeout: 244 seconds]
brunoro has quit [Ping timeout: 264 seconds]
AlexDenisov has joined #ocaml
_2can_ is now known as _2can
<companion_cube>
Drup: is an error related to "weak" fatal for jsoo?
<zozozo>
companion_cube: actually, weak is used in react, which is heavily used in our code
_andre has quit [Ping timeout: 276 seconds]
_andre has joined #ocaml
octachron has quit [Quit: Page closed]
<zozozo>
Drup: any idea on how to add a "+weak.js" argument to the js_of_ocaml call done by oasis ?
<Drup>
zozozo: there is a tag
<Drup>
(ocamlbuld tag)
<Drup>
see the documentation of the ocamlbuild plugin
<zozozo>
Drup: well, what should be in the myocamlbuild.ml is documented, not what to put in the _oasis file
<Drup>
as for the weak tag ... I don't remember
<zozozo>
all right, so, doing a bit of trickery in the _tags file, I managed to do it, however, now I have "lwt_unix_system_byte_order not implemented", :p
<theblatte>
in general it's better to ask your question directly, as IRC is asynchronous :)
<imad__>
I write my ocaml programs with the core library and i want to use Js_of_ocaml to generate js files to run in the browser. But i have an unbound Open Core.Std Error.
<theblatte>
you need to include core somehow probably
<theblatte>
-package core?
<imad__>
i will do that right now.
imad__ has quit [Quit: Page closed]
brunoro has quit [Ping timeout: 244 seconds]
imad_ has joined #ocaml
<gasche``>
zozozo: "when I have the time" sounds like a cop-out to me
<gasche``>
unless you're on an urgent deadline for something closely bounded in time, I'm not sure there are good reasons to send an email to say "hey I did that, could we talk about it and compare it with your stuff?"
<gasche``>
(to *not* send an email, obviously)
<zozozo>
you're .. right, so now I just have to find his email address
<imad_>
There are some missing primitives Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime. You can prevent the generation of dummy implementations with the commandline option '--disable genprim' Missing primitives provided by +bin_prot.js: bin_prot_blit_buf_float_array_stub bin_prot_blit_buf_string_stub bin_prot_blit_float_array_buf_stub bin_prot_blit_string_buf_stub Missing primiti
<imad_>
-----------------------------------
<imad_>
Can any one help ?
<Algebr```>
core doesn't work yet
<Algebr```>
I think core_kernel might
<Algebr```>
or might not
<Armael>
is it an error or a warning?
<Algebr```>
and you don't need to use camlp4 anymore
<Armael>
intuitively if you don't use these primitives in your program it should be fine, right?
<imad_>
it doesn't say if it is an error or a worning
<Algebr```>
its an error
<flux>
but really if you don't use those c functions.. then shouldn't it work?
<imad_>
So i can not generate js files from ocaml programms using core library ??
<Armael>
the message seems to say that these functions will be replaced by a dummy implementation
<Drup>
Armael: don't give bad advices
<Armael>
which should be fine if you don't use them...
<Armael>
?
<Drup>
imad_: use core_kernel instead of core, core doesn't work
<Drup>
(with js_of_ocaml)
<flux>
how about to the actual point: does the resulting .js work?-)
<flux>
if it doesn't, well, then perhaps it doesn't :)
<Armael>
are these functions used everywhere in core?
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
<Algebr```>
flux: it will blow up, it says, raise Failure exception
<flux>
so the jury is back in: no, core doesn't work :)
<Algebr```>
imad_: I answered your question + core_kernel will also make huge .js files.
<Armael>
Drup: also I don't think I was giving any advice?
<imad_>
flux : i don't undertand you, how can i use core_kerne??
<infinity0>
reynir: yo i'm here, was a bit busy with other stuff earlier
<Drup>
Armael: users should not let those warning in their js_of_ocaml programs. It's bad advice to ignore the warning.
<reynir>
infinity0: o/
<Drup>
imad_: use the "core_kernel" package and open Core_kernel.
<Drup>
(instead of core)
<flux>
it seems to me though that the reason it does Failure isn't because of those missing primitives?
<flux>
or does Core require "bin prot" to just start?-o
<Armael>
mm k
<reynir>
oh, so many architectures
<imad_>
flux : when i don't use the core library, i have no problem. Core library is very cool to work with
orbifx-m has joined #ocaml
veggie_ has joined #ocaml
orbifx-m2 has quit [Ping timeout: 276 seconds]
orbifx-m2 has joined #ocaml
brunoro has joined #ocaml
orbifx-m has quit [Ping timeout: 272 seconds]
brunoro has quit [Ping timeout: 272 seconds]
orbifx has joined #ocaml
orbifx1 has joined #ocaml
Geekingfrog has left #ocaml ["Leaving"]
tg has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
<sgronblo>
So if I am using ocamlfind with something like opium I can just say -pkgs 'opium' and it should understand to pull in all the lwt-related dependencies, right?
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<imad_>
Gabriel Radanne : mon fichier affichage.ml :
<companion_cube>
sgronblo: I think so; but use a proper build system unless you have a very good reason not to do so
orbifx1 has quit [Quit: WeeChat 1.5]
<imad_>
open Core_kernel.Std;; print_string "Hello world\n" ;;
eh_eff_ has quit [Ping timeout: 240 seconds]
<imad_>
Gabriel Radanne : mon fichier affichage.ml : open Core_kernel.Std;; print_string "Hello world\n" ;;
<imad_>
The program 'ocamlfind' is currently not installed. You can install it by typing: apt-get install ocaml-findlib
brunoro has joined #ocaml
<companion_cube>
well then, install ocamlfind
<Drup>
imad_: 1) I use a nick, use it too. Using my real name doesn't encourage me to answer you faster 2) This is an english speaking channel.
<flux>
(in particular as irc clients highlight nicks, but don't highlight names unless specifically configured)
pierpa` is now known as pierpa
tg has joined #ocaml
<imad_>
ok i will speak in english
brunoro has quit [Ping timeout: 276 seconds]
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 244 seconds]
<imad_>
There are some missing primitives Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime. You can prevent the generation of dummy implementations with the commandline option '--disable genprim' Missing primitives provided by +bin_prot.js: bin_prot_blit_buf_string_stub bin_prot_blit_string_buf_stub Missing primitives provided by +core_kernel.js: caml_hash_double caml_hash_string c
<imad_>
i have the saame problem :
<companion_cube>
does it work?
<companion_cube>
(and anyway we told you to use core_kernel instead of Core, if you're compiling to javascript)
<imad_>
no it doesn't. I don't have the message 'Hello world' in the console.
<Drup>
The error message provides the answer: add +bin_prot.js +core_kernel.js to js_of_ocaml's command line, and it should work
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
obadz has joined #ocaml
<imad_>
It worded. Thinks man. I found this :
<imad_>
Core_kernel is the system-independent part of Core. It is aimed for cases when the full Core is not available, such as in Javascript
veggie_ has quit [Ping timeout: 240 seconds]
<imad_>
What it means system-independent part of Core?
<companion_cube>
it doesn't depend on Unix
<companion_cube>
(being in a unix-like environment)
<companion_cube>
(e.g. javascript is not in a unix environement)
veggie_ has joined #ocaml
<imad_>
So not all of the functions provided by the core library are also provides by core_kernel ?
<companion_cube>
exactly
kakadu has quit [Remote host closed the connection]
eh_eff_ has joined #ocaml
orbifx-m has joined #ocaml
eh_eff_ has quit [Ping timeout: 240 seconds]
octachron has joined #ocaml
orbifx-m2 has quit [Ping timeout: 264 seconds]
eh_eff_ has joined #ocaml
<imad_>
sorry i have this question about ocaml in general : why it is efficient ? Can we compare it's efficiency with java or c++ ?
<companion_cube>
should be explained somewhere on ocaml.org I think
teiresias has quit [Remote host closed the connection]
<imad_>
for what do you use ocaml ?
eh_eff_ has quit [Ping timeout: 244 seconds]
<Algebr```>
coding, generally
<infinity0>
hurd-i386 4.02.3-7Installed72d 21h 20mironforgeocaml:sourceold | all (1)
<imad_>
So as general purpose programming language ?
imad has joined #ocaml
<imad>
why ocaml is efficient ? Can we compare it's efficiency with java or c++ ?
teiresias has joined #ocaml
<flux>
certainly, people have done it, though "fair" comparisons may be more difficult
<flux>
the ocaml compiler just generates decent quality assembler, it doesn't do complicated things at runtime, it has a well-performing garbage collector, particularly good at providing high allocation rates
AlexDenisov has joined #ocaml
<gasche>
as a language, it's also much more convenient to use than Java
<flux>
recently the ocaml compiler has learned a few more tricks and we can start to call it a proper optimizing compiler.. sacrificing the blazing-fast compiling times at the same time, thogh.
<gasche>
(but then the library support may Java or C++ a better choice)
octachron has quit [Quit: Page closed]
octachron has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
<rightfold>
flux: you typically don't mind less but reasonably fast compile times in release builds
<imad>
I'am reading the introduction of the book real world ocaml. It' said that : " Among this worthy set of languages, OCaml stands apart because it manages to provide a great deal of power while remaining highly pragmatic.
silver has quit [Read error: Connection reset by peer]
ee_ks has quit [Ping timeout: 272 seconds]
<Bluddy[m]>
imad: OCaml is relatively efficient, and it's simple semantics compared to, say, haskell, suggest that it could be optimized to be one of the faster languages in the functional space. Being functional means you get much better scalability and maintainability than many other languages. If I want a quick and dirty single-file script, I'll use python or ruby. If I want blazing speed, I'll reach for C++. For most other things, I
<Bluddy[m]>
like using OCaml.
silver has joined #ocaml
silver has quit [Client Quit]
veggie_ has quit [Read error: Connection reset by peer]
veggie_ has joined #ocaml
sh0t has quit [Remote host closed the connection]
alexst has quit [Ping timeout: 244 seconds]
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
fraggle-boate has quit [Ping timeout: 244 seconds]
<rightfold>
If I want blazing speed I'll reach for ATS. Best of both worlds :)
<obadz>
Bluddy[m]: not entirely clear that it would be easy to make ocaml faster than haskell. Purity gives you a lot of guarantees that are useful when optimizing…
<pierpa>
If I want blazing speed and the only alternative is C++ I'll switch to gardening.
<Bluddy[m]>
pierpa: you've also got Rust
<pierpa>
:)
<Bluddy[m]>
obadz: purity gives you some guarantees... not sure they're enough to make up for laziness
<Bluddy[m]>
obadz: also purity makes you choose inadequate data structures
<rightfold>
ST
<obadz>
Bluddy[m]: purity enables you to ignore laziness if you want to (but not non-strictness)
<rightfold>
No, you need totality too
<Bluddy[m]>
rightfold: ST is a pain. Sure, you'll use it if you have to, but your first choice is always slower data structures.
alexst has joined #ocaml
<Bluddy[m]>
I'm not putting down the amazing optimizations haskell has achieved. To take a lazy language to where they have is a marvel.
<Bluddy[m]>
And its huge success means that there are even more people pushing for optimizations.
<Bluddy[m]>
Haskell also gives up all notion of scheduling control, and OCaml is holding on to that very strongly, even in the multicore model -- for better or worse.
<Bluddy[m]>
I'm interested to see what comes out of that.
<Bluddy[m]>
But also, optimization-wise, we're just scratching the surface
orbifx-m has joined #ocaml
brunoro has joined #ocaml
octachron has quit [Quit: Leaving]
orbifx-m2 has quit [Ping timeout: 276 seconds]
brunoro has quit [Ping timeout: 244 seconds]
ygrek_ has quit [Ping timeout: 244 seconds]
sdothum has joined #ocaml
jeffmo has quit [Quit: jeffmo]
al-damiri has quit [Quit: Connection closed for inactivity]
sdothum- has joined #ocaml
<orbifx>
would you use something like:
<orbifx>
let sub c = match c with ' ' -> '_' | '/' -> '-' | c -> c in
<orbifx>
String.map sub t ^ ".ymd"
<orbifx>
or opt for regular expressions?
<gasche>
it depends if the names were chosen by the user or your scripts
<gasche>
in the former case, you have to be a bit more defensive against, for example, the various spaces that may be used
<orbifx>
gasche: user, and I want defensive obviously