<pierpa>
lot of simple introductory articles about func prog there
struk|desk|away is now known as struk|desk
<Reshi>
Hi, I am just beginning OCaml, should the comments for functions be placed in the .mli file or .ml file or both?
<Algebr`>
you can put them in either, (** *) will be come doc strings
<Algebr`>
pierpa: I should have included CPS style in the last OCaml meetup, will do it for next.
<pierpa>
Reshi, I'd put comments useful for clients in the mlis and comments useful for mantainers in the mls
<Reshi>
pierpa: Even for the same function? So if a function `foo' appears in the interface and implementation, I should comment it in both files but differently if I can?
<Algebr`>
you don't have to, but can
<pierpa>
exactly :)
A1977494 has joined #ocaml
<Reshi>
pierpa, Algebr` Thanks! :D
ril has joined #ocaml
raxello has quit [Remote host closed the connection]
A1977494 has quit [Ping timeout: 244 seconds]
A1977494 has joined #ocaml
noddy has joined #ocaml
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 250 seconds]
A1977494 has joined #ocaml
A19774941 has quit [Ping timeout: 248 seconds]
gpietro_ has quit [Ping timeout: 250 seconds]
cross has quit [Ping timeout: 260 seconds]
Drup has quit [Ping timeout: 260 seconds]
tobast has quit [Ping timeout: 260 seconds]
Drup has joined #ocaml
tobast has joined #ocaml
cross has joined #ocaml
struk|desk is now known as struk|desk|away
struk|desk|away is now known as struk|desk
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 268 seconds]
mistermetaphor has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
mistermetaphor has quit [Ping timeout: 260 seconds]
nicholasf has joined #ocaml
tennix has quit [Ping timeout: 276 seconds]
A1977494 has joined #ocaml
A19774941 has quit [Ping timeout: 244 seconds]
Haudegen has joined #ocaml
aantron has quit [Ping timeout: 260 seconds]
grandy has joined #ocaml
noddy has quit [Ping timeout: 248 seconds]
<grandy>
i'm new to ocaml, and planning to use the bitstring library on a small side project, if anyone here is familiar with it and feels like answering a few very early questions I have, I'd much appreciated it ...
struk|desk is now known as struk|desk|away
atsampson has quit [Ping timeout: 246 seconds]
ril is now known as ril[away]
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 244 seconds]
nicholasf has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
A1977494 has joined #ocaml
A19774941 has quit [Ping timeout: 244 seconds]
ril[away] is now known as ril
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Reshi has quit [Ping timeout: 248 seconds]
A1977494 has quit [Ping timeout: 246 seconds]
A1977494 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
mistermetaphor has joined #ocaml
A1977494 has quit [Ping timeout: 264 seconds]
nicholasf has joined #ocaml
A1977494 has joined #ocaml
mistermetaphor has quit [Ping timeout: 244 seconds]
kushal has quit [Ping timeout: 260 seconds]
A1977494 has quit [Ping timeout: 260 seconds]
A19774941 has joined #ocaml
<Algebr`>
grandy: the source repo should have some example and rjones has some blog posts about it
<Algebr`>
grandy: there's also cstruct which should overlap in some functioanlity
<grandy>
ahh, thanks much
<Algebr`>
be aware the bitstring uses a camlp4 syntax extension, aka its using some stuff that isn't part of the ocaml grammar proper
johnelse has quit [Ping timeout: 260 seconds]
A1977494 has joined #ocaml
johnelse has joined #ocaml
A19774941 has quit [Ping timeout: 252 seconds]
Reshi has joined #ocaml
A1977494 has quit [Ping timeout: 244 seconds]
kushal has joined #ocaml
struktured has joined #ocaml
pierpa has quit [Ping timeout: 268 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
struktured has quit [Ping timeout: 248 seconds]
adelbertc has joined #ocaml
A1977494 has joined #ocaml
atsampson has joined #ocaml
A1977494 has quit [Ping timeout: 250 seconds]
yunxing has joined #ocaml
<grandy>
ahh ok
mistermetaphor has joined #ocaml
atsampson has quit [Ping timeout: 264 seconds]
atsampson has joined #ocaml
rwmjones has quit [Ping timeout: 244 seconds]
tristero has quit [Read error: Connection reset by peer]
struk|desk|away is now known as struk|desk
Vintila has joined #ocaml
rwmjones has joined #ocaml
ichernetsky has quit [Remote host closed the connection]
atsampson has quit [Ping timeout: 264 seconds]
struk|desk has quit [Remote host closed the connection]
dsheets has joined #ocaml
struk|desk has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Vintila has quit [Ping timeout: 268 seconds]
Algebr` has quit [Ping timeout: 250 seconds]
foocraft has joined #ocaml
atsampson has joined #ocaml
A1977494 has joined #ocaml
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 260 seconds]
A1977494 has joined #ocaml
tennix has joined #ocaml
A19774941 has quit [Ping timeout: 276 seconds]
slash^ has joined #ocaml
Reshi has quit [Ping timeout: 252 seconds]
nicholasf has quit [Remote host closed the connection]
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
Simn has joined #ocaml
A19774941 has quit [Ping timeout: 260 seconds]
nicholasf has quit [Ping timeout: 260 seconds]
mistermetaphor has quit [Remote host closed the connection]
tennix has quit [Quit: WeeChat 1.4]
A1977494 has joined #ocaml
Reshi has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
nicholasf has joined #ocaml
mort___ has joined #ocaml
kolko has joined #ocaml
inr has quit [Remote host closed the connection]
inr has joined #ocaml
struk|desk is now known as struk|desk|away
MercurialAlchemi has joined #ocaml
yunxing has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
mort___ has quit [Client Quit]
foocraft has quit [Ping timeout: 260 seconds]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
ggole has joined #ocaml
yegods has quit [Remote host closed the connection]
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 248 seconds]
ggole_ has joined #ocaml
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
ggole has quit [Ping timeout: 264 seconds]
tane has joined #ocaml
A1977494 has joined #ocaml
A19774941 has quit [Ping timeout: 244 seconds]
mistermetaphor has joined #ocaml
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 244 seconds]
ggole__ has joined #ocaml
mistermetaphor has quit [Ping timeout: 252 seconds]
foocraft has joined #ocaml
ggole_ has quit [Ping timeout: 248 seconds]
ggole_ has joined #ocaml
matason has joined #ocaml
ggole__ has quit [Ping timeout: 260 seconds]
Reshi has quit [Ping timeout: 248 seconds]
matason has quit [Ping timeout: 276 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
darkf_ has joined #ocaml
Reshi has joined #ocaml
darkf has quit [Ping timeout: 268 seconds]
silver has joined #ocaml
ggole__ has joined #ocaml
darkf_ is now known as darkf
ggole_ has quit [Ping timeout: 240 seconds]
ril has joined #ocaml
pyon has quit [Quit: Reality is multidimensional. In fact, two-dimensional, to be more precise.]
<adrien>
yup, if you want the configure part, you need stuff that gets written into setup.data and they're both oasis stuff
<adrien>
but oasis inject the whole code in myocamlbuild.ml so you should be able to access that
adelbertc has quit [Quit: Connection closed for inactivity]
<thomasga>
ha great, seems to work
<def`>
Maelan: what do you mean by doesn't like?
<thomasga>
adrien: thx a lot!
<adrien>
:)
nicholasf has quit [Remote host closed the connection]
darkf has quit [Read error: Connection reset by peer]
t4nk610 has joined #ocaml
darkf has joined #ocaml
<Maelan>
def`, i mean Syntastic keeps saying « unbound module Ctypes »
dsheets has joined #ocaml
teiresias has quit [Quit: gone]
Kakadu has joined #ocaml
yegods has joined #ocaml
noddy has quit [Ping timeout: 276 seconds]
Vintila has joined #ocaml
yegods has quit [Remote host closed the connection]
<def`>
Maelan: something is wrong in your setup maybe, try putting that in .merlin
matason has quit [Ping timeout: 246 seconds]
<flux>
what if.. there would be a directive like "import _tags" for .merlin, and if .merlin does not exist, just default to that?-o
<def`>
because it is a pain to parse?
<flux>
could ocamlbuild itself be used for that part?
<companion_cube>
I'd rather have ocamlbuild make a .merlin file
<def`>
yes
<def`>
if you factor out the library from ocamlbuild, I integrate it to merlin
<flux>
well, .merlin is less expressive than _tags, but I guess that would be easier to integrate
noddy has joined #ocaml
<companion_cube>
it really should be the job of ocamlbuild (or other build systems)
<companion_cube>
merlin does one job, and does it very well, but it should not have to understand _tags, omake, jenga files, etc.
mysiticity has joined #ocaml
Reshi has quit [Ping timeout: 252 seconds]
mistermetaphor has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
<Maelan>
waaat
<Maelan>
i have « module C = Ctypes » in my source file
<Maelan>
which gives « unbound module Ctypes »
<Maelan>
if i write « CTypes » instead, i do net get an error on that line
<flux>
you mean Ctypes vs CTypes?
<Maelan>
but i still have errors whenever i use C, e·g· « Unbound type constructor C.typ »
<Maelan>
yes flux
<flux>
(Ctypes is the correct one)
mistermetaphor has quit [Ping timeout: 276 seconds]
<Maelan>
and if i use the C.(…) syntax, i get a brand new error message: « This module is not a structure; it has type (module CTypes) »
<Maelan>
i never saw that one ^^
bacam has quit [Quit: reboot]
bacam has joined #ocaml
<Maelan>
i know Ctypes is the correct one, but i have no idea what is happening there
<Maelan>
CTypes seems unknown from utop
<flux>
did you try restarting merlin?-)
dwillems has joined #ocaml
mysiticity has quit [Ping timeout: 244 seconds]
<Maelan>
yes, it changes nothing
<Maelan>
and « PKG ctypes ctypes.foreign » in .merlin has no apparent effect neither
<dwillems>
Hi everyone. Do you think it's better (in terms of visibility, tools, integration with other softwares, etc) to publish a library on forge.ocaml.org or github ? I observed there are some libraries on forge which are not on github, no opam repository, etc. Is there another reason than 'no time' ?
<Maelan>
okay, solved it
<Maelan>
apparently, naming the file ctypes.ml was not such a good idea
<Maelan>
but still, i don’t see exactly why, and the error messages are nonsensical
<thomasga>
dwillems: ocaml forge was there before Github, so usually old projects are there (and some of them moved to Github later)
<thomasga>
for you code to be visible, I'd recommend putting it on Github though.
<thomasga>
s/you/your
<Maelan>
and there is still this odd behaviour when changing the case of Ctypes to any of C[tT][yY][pP][eE][sS]
dsheets has quit [Remote host closed the connection]
<thomasga>
anyway to inject some tags when other tags are set with ocamlbuild?
<thomasga>
(instead of injecting a command, like `flag` does?)
dsheets has joined #ocaml
raxello_ has joined #ocaml
darkf has quit [Quit: Leaving]
noddy has quit [Ping timeout: 268 seconds]
butts_butts has quit [Ping timeout: 268 seconds]
yegods has joined #ocaml
shinnya has joined #ocaml
<thomasga>
to answer my own question: I can use `T` to inject tags in the command
<raxello_>
I managed to get tests running using oasis, but also weird that I need to create artificial `classifierlib` to test code from my executable ...
FreeBirdLjj has joined #ocaml
<flux>
raxello_, I suppose when you build it goes into directory _build?
yegods has quit [Remote host closed the connection]
<flux>
raxello_, if this is the case, stick B _build into your .merlin
<raxello_>
@flux yes
<raxello_>
aha! I got it by adding `_build/src`
thomasga has joined #ocaml
<raxello_>
@flux thank you! So merlin depends on the built artefact not on the source right ?
dwillems has quit [Ping timeout: 246 seconds]
<flux>
raxello_, yes
<flux>
raxello_, well I think it works ok within a single file without those, but to find stuff from other files it needs it
<raxello_>
cool, understood. I am spoiled by python. Thank you
<raxello_>
@Leonidas no it doesn't have merlin, but test runners auto-discover tests for me and depend on source not on build products =)
dsheets has quit [Remote host closed the connection]
<Leonidas>
ah, yep, that's true.
jgjl has joined #ocaml
<flux>
I don't know much about oasis, but I think that to deal with dependencies the best, making a library of the src first and then using that in your tests would be the way to go (as you seem to be doing)
<raxello_>
understood. what do you use to build your projects ? Manually crafted makefile + ocamlbuild ?
<Leonidas>
ocamlbuild and sometimes oasis
<flux>
basically just ocamlbuild, sometimes a a Makefile that does ocamlbuild mybinary.natiev
<Leonidas>
flux: I concur.
<thomasga>
does anyone understand how tag resolution work in ocambuild?
<Leonidas>
flux: the disadvantage is that you can't test non-public parts but OTOH, it might not be a good idea to start with to test internals
<flux>
though Makefile isn't that bad if you make use of OCamlMakefile
<thomasga>
I managed to inject `package(foo)` flags, but then they don't seem to be resolved properly
<thomasga>
(ie. I see them appearing in the _log files, but then the next command-line doesn't use them)
BitPuffin|osx has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
dsheets has joined #ocaml
<flux>
it is quite annoying to use gdb on ocaml c bindings when none of the macros work..
<orbitz_>
Is Assemblage dead?
<flux>
hmm, it was alive at some point? I thought it was some jane street internal stuff.
TheLemonMan has joined #ocaml
nicholasf has joined #ocaml
<orbitz_>
Aseemblage seems to be more OcamlLabs-ish, I think
pierpa has joined #ocaml
<orbitz_>
thomasga and dbunzli are primary authors, I think.
orbitz_ has quit [Quit: Reconnecting]
<thomasga>
not dead, just unfortunately not on top of the TODO list
orbitz has joined #ocaml
<thomasga>
daniel is still working on that on the side, I don't
<orbitz>
Whoops
<orbitz>
thomasga: how come? Did the need for it lessen because of another tool?
raxello_ has quit [Remote host closed the connection]
nicholasf has quit [Ping timeout: 248 seconds]
<thomasga>
Unfortunately not (the state of the OCaml build system is still very far from ideal, but still sufficient workarounds exist to carry on). Just other things to worry about nowadays..
dsheets has quit [Remote host closed the connection]
<butts_butts>
I installed the websocket package using opam (opam install websocket), and am now using Oasis to create a makefile in the project where I want to use websocket.
<thomasga>
systemS
<butts_butts>
I added websocket as a BuildDepends
<butts_butts>
But on running ocaml setup.ml -configure, ocamlfind says it can't find websocket.
<butts_butts>
I guess I'm making some small mistake... but what? ocamlfind list does not show websocket in the list.
foocraft has quit [Remote host closed the connection]
yegods has quit [Ping timeout: 276 seconds]
<butts_butts>
Ah, this seems to have fixed it: Conan 2015 07 09 The Hunger Games Mockingjay Part 2 720p HDTV x264-CROOKS
<butts_butts>
Fooks.
<butts_butts>
VM to Win copying fail.
butts_butts has quit [Remote host closed the connection]
<mrvn>
no spoilers, haven't watched it yet
yegods has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
yegods has quit [Read error: Connection reset by peer]
yegods has joined #ocaml
_ohCamel has joined #ocaml
<_ohCamel>
What is the library of Clock.time () that I need to include? It is considered as unbound by my code
thomasga has quit [Quit: Leaving.]
Algebr` has joined #ocaml
mistermetaphor has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
dwillems has joined #ocaml
<dwillems>
thomasga: Is there an organization on github to put project initially on forge.ocaml ? Or it's owners who needs to do it ?
<flux>
funny how there are at least four modules in opam that from their description seem to be doing almost the same thing: posix-clock ptime oclock mtime
<_ohCamel>
ya
<flux>
at least mtime does something different and comes with js support as well
mort___ has quit [Client Quit]
mistermetaphor has quit [Ping timeout: 252 seconds]
<_ohCamel>
by the way, still need to add it to the dependencies of another library, as I would like to modify it
<_ohCamel>
It has two opam libararies: -unix and -xen
<_ohCamel>
where is the right place to add, is it in .oasis?
noddy has joined #ocaml
Vintila has quit [Ping timeout: 264 seconds]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
copy` has joined #ocaml
Algebr` has quit [Ping timeout: 248 seconds]
noddy has quit [Ping timeout: 276 seconds]
_ohCamel has quit [Ping timeout: 250 seconds]
matason has joined #ocaml
atsampson has quit [Ping timeout: 246 seconds]
Sorella has joined #ocaml
t4nk610 has quit [Ping timeout: 250 seconds]
nicoo has quit [Ping timeout: 260 seconds]
t4nk981 has joined #ocaml
pyon has joined #ocaml
nicoo has joined #ocaml
atsampson has joined #ocaml
struk|desk|away is now known as struk|desk
natimic has quit [Ping timeout: 260 seconds]
picolino has quit [Ping timeout: 276 seconds]
matason has quit [Ping timeout: 276 seconds]
dwillems has quit [Ping timeout: 244 seconds]
dsheets has quit [Remote host closed the connection]
dwchandler has joined #ocaml
struk|desk is now known as struk|desk|away
<t4nk981>
What functions should I use in Module List to make a readable function for the product of polynomials
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
nicholasf has joined #ocaml
dhil has joined #ocaml
hydan has quit [Remote host closed the connection]
hydan has joined #ocaml
dsheets has joined #ocaml
sh0t has joined #ocaml
matason has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
Algebr` has joined #ocaml
struktured has joined #ocaml
tane has quit [Quit: Verlassend]
tane has joined #ocaml
struk|desk is now known as struk|desk|away
nicholasf has quit [Remote host closed the connection]
t4nk981 has quit [Quit: Page closed]
dario1 has joined #ocaml
<dario1>
Summoning Drup... Summoning Drup...
<adrien>
best way I've found was to complain about CSS
ggole has quit []
<companion_cube>
nah, say "I wrote a new web framework"
<adrien>
"because ocsigen was too complicated"
<Algebr`>
meanies.
<dario1>
Perhaps you guys can help me out. Consider the new API for the Tyxml's Html5 module (what will be version 4.0): http://ocsigen.org/tyxml/dev/api/Html5
<dario1>
The page lists a small example using the Format module...
<dario1>
...which doesn't seem to typecheck.
<dario1>
Am I missing something? (I'm very reluctant to touch the Format module until someone writes a proper tutorial for it)
<flux>
I guess it would be feasible to make ocamlc support c++ just as it support c, but I wonder if such an enhancement would be approved upstream :)
<companion_cube>
it is much harder to support C++, isn't it? non standard ABI, templates, objects, manglibng...
<flux>
I don't think there's a lot to support if that approach works
<flux>
that is: rename the c++ files to .c, tell compiler they are actually c++, link in stdc++
<flux>
maybe the last step would be better if it used the c++ compiler for linking
<companion_cube>
ah, just for compiling, assuming the c++ files contain some "extern C" ?
<flux>
well, depends what they do, but yes for the case of exposing c++ symbols to ocaml
sh0t has quit [Ping timeout: 268 seconds]
<flux>
is there a way to ask the ocaml compiler the switches to use for compiling c files?
<flux>
I feel that would be a bit more elegant than faking c++ as c
mort___ has quit [Quit: Leaving.]
<companion_cube>
no idea
<flux>
that approach might also work with rust..
<companion_cube>
oh yeah
A19774941 has quit [Quit: Leaving.]
matason has quit [Ping timeout: 244 seconds]
<flux>
I guess it's not polite to require users of C-bindings to need to link in stdc++ though :)
<flux>
but I feel it would be quite nicer to deal with value wrappers with the assistance of (ie.) templates..
hydan has quit [Remote host closed the connection]
hydan has joined #ocaml
sh0t has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
nicholasf has joined #ocaml
sh0t has quit [Ping timeout: 248 seconds]
yegods has quit []
<flux>
the most complicated part of the support for c++ would the to choose which extensions to suppotr.. :)
<flux>
.cpp, .cxx, .cc, .C, that covers everything, right?
<flux>
oh and how could I have forgotten .c++
t4nk268 has joined #ocaml
dwillems has quit [Ping timeout: 240 seconds]
picolino has quit [Ping timeout: 244 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
phrst has quit [Ping timeout: 248 seconds]
phrst has joined #ocaml
phrst has quit [Ping timeout: 246 seconds]
phrst has joined #ocaml
cg has joined #ocaml
<cg>
is it generally better style to avoid using the "function" keyword, and instead just use "match"? seems to me that "function" reduces readability/clarity since it allows us to omit a parameter name. e.g. `let f foo = match foo with ...` vs. `let f = function ...`
<Drup>
cg: what if you don't care about the name ?
<cg>
Drup: I guess normally you wouldn't, except the name often provides some extra context, like type info for example
<Drup>
when the function is very generic, you don't
<ollehar>
I will have a deeper look at the code I took code from. thanks! and good night.
<pierpa>
I don't know if the lessons are available without enrolling, and don't know if you can enroll now, though... :(
<pierpa>
'night
ollehar has quit [Quit: ollehar]
Cypi has quit [Ping timeout: 244 seconds]
<aggelos_>
hmm
<aggelos_>
is there some program that keeps shuffling some Result.t and Lwt.t to look at for best practices?
ollehar has joined #ocaml
Cypi has joined #ocaml
darkf has joined #ocaml
nore has joined #ocaml
<ollehar>
uh, can ocaml dump its ast easily? (without dumpast opam package)
dsheets has joined #ocaml
<pierpa>
ollehar, try ocamlc -help
Simn has quit [Quit: Leaving]
dsheets has quit [Ping timeout: 250 seconds]
nore is now known as athelio
athelio is now known as nore
<ollehar>
pierpa: thanks
<pierpa>
yw
<sspi>
I had a question related to Irmin - how easy would it be to use your own types for a store? I've tried to look for examples but most seem to use Irmin.Contents.String.
d0nn1e has quit [Ping timeout: 268 seconds]
nicholasf has joined #ocaml
d0nn1e has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
<ollehar>
pierpa: statements actually form a tree
<ollehar>
but not at lambda level
<ollehar>
but as parse tree.
<ollehar>
have to sleep be
<ollehar>
bye
ollehar has quit [Quit: ollehar]
<pierpa>
ok, but this shouldn't make any difference wrt how you proceed to type programs
<pierpa>
oops. gone.
yunxing has quit [Remote host closed the connection]