adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
cbot_ has quit [Ping timeout: 264 seconds]
infinity0 has quit [Ping timeout: 256 seconds]
infinity0 has joined #ocaml
Zimsky645 has joined #ocaml
Zimsky645 has quit [Client Quit]
failproofshark has quit [Ping timeout: 246 seconds]
orbifx has quit [Ping timeout: 240 seconds]
spew has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
isd has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
cobreadmonster has joined #ocaml
jeffmo has quit [Quit: Connection closed for inactivity]
zolk3ri has quit [Remote host closed the connection]
cbot_ has joined #ocaml
dtornabene has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
jimmyrcom has quit [Ping timeout: 260 seconds]
jimmyrcom has joined #ocaml
jimmyrcom has quit [Ping timeout: 246 seconds]
mbuf has joined #ocaml
jimmyrcom has joined #ocaml
gentauro has quit [Ping timeout: 264 seconds]
<_xvilka_> hi! If I have a C structure with a member like "anotherstructuretype *ptr;" where ptr is in fact dynamic array [], how I can convert it to the usual OCaml list? Using Ctypes
<companion_cube> OCaml lists really are not like arrays
gentauro has joined #ocaml
<companion_cube> so afaik there is no direct conversion
<companion_cube> you might want to expose a function for getting the length (as an int)
<companion_cube> and a function for accessing elements in the range [0,…len-1]
<_xvilka_> companion_cube: well, I don't really care about the order, so converting to the usual list is perfectly fine
<companion_cube> no but I mean, there is not direct conversion, the array style is the easiest
<companion_cube> then on OCaml side you can build whatever you want (list, array, whatever) using the C functions
<companion_cube> anyway, gn
<_xvilka_> gn
<_xvilka_> (I have no control on the C side of the code, so can't expose anything but to use just the pointer)
<companion_cube> my point exactly, start from that
<_xvilka_> for now I just ignore those "metas" and other fields
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
cobreadmonster has quit [Quit: Connection closed for inactivity]
cbot_ has quit [Quit: Leaving]
dtornabene has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 268 seconds]
MercurialAlchemi has joined #ocaml
ygrek has joined #ocaml
SGautam has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
Haudegen has joined #ocaml
l1x has quit [Ping timeout: 256 seconds]
strmpnk has quit [Ping timeout: 256 seconds]
terrorjack has quit [Ping timeout: 256 seconds]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
l1x has joined #ocaml
strmpnk has joined #ocaml
terrorjack has joined #ocaml
jimmyrcom has quit [Ping timeout: 256 seconds]
nahra has joined #ocaml
Enjolras has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
kakadu has joined #ocaml
<_xvilka_> is it possible to publish OCaml package without using opam-publish?
<_xvilka_> Can I just send a PR to opam-repository manually?
Enjolras has joined #ocaml
tarptaeya has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
zpe_ has quit [Remote host closed the connection]
jimmyrcom has joined #ocaml
Bronsa has quit [Read error: Connection reset by peer]
mk9 has quit [Quit: mk9]
<octachron> yes
zpe has joined #ocaml
<_xvilka_> ok, good
malc_ has joined #ocaml
nahra has quit [Remote host closed the connection]
mk9 has joined #ocaml
mfp has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
ziyourenxiang has joined #ocaml
argent_smith1 has joined #ocaml
zpe has quit [Remote host closed the connection]
argent_smith has quit [Ping timeout: 245 seconds]
<flux[m]> that means that ocaml and opam packages are now easier to take into use in windows?
mk9 has quit [Quit: mk9]
argent_smith has joined #ocaml
mk9 has joined #ocaml
argent_smith1 has quit [Ping timeout: 260 seconds]
mk9 has quit [Quit: mk9]
kakadu_ has joined #ocaml
kakadu_ has quit [Read error: Connection reset by peer]
kakadu has quit [Ping timeout: 240 seconds]
kakadu_ has joined #ocaml
kakadu has joined #ocaml
gtrak has joined #ocaml
shinnya has joined #ocaml
kakadu_ has quit [Ping timeout: 240 seconds]
malc_ has quit [Remote host closed the connection]
AltGr has joined #ocaml
zolk3ri has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
mbuf has quit [Quit: Leaving]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
haesbaer1 has quit [Remote host closed the connection]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
jimmyrcom has quit [Ping timeout: 246 seconds]
mk9 has joined #ocaml
Haudegen has joined #ocaml
spew has joined #ocaml
unyu has quit [Quit: The end of the world is nigh. Bring as much popcorn as you can!]
andreas_ has joined #ocaml
mk9 has quit [Ping timeout: 256 seconds]
mk9 has joined #ocaml
spew has quit [Read error: Connection reset by peer]
shinnya has quit [Quit: ZNC - http://znc.in]
_andre has joined #ocaml
shinnya has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
spew has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
pierpa has quit [Ping timeout: 260 seconds]
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
gtrak has quit [Ping timeout: 276 seconds]
zpe has joined #ocaml
gtrak has joined #ocaml
al-damiri has joined #ocaml
sh0t has joined #ocaml
mk9 has quit [Quit: mk9]
tarptaeya has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
mk9 has joined #ocaml
jeffmo has joined #ocaml
tarptaeya has joined #ocaml
jao has joined #ocaml
zlsyx has joined #ocaml
hdon_ has joined #ocaml
zolk3ri has quit [Ping timeout: 256 seconds]
andreas_ has quit [Quit: Connection closed for inactivity]
<hdon_> hi all :) i'm learning some functional languages and i wanted to ask some questions about the paradigm in general, and specifically how i/o tends to be modeled. i have some familiarity with oz/mozart where variables can be resolved asynchronously. i'd sort of imagined that in some functional languages, i/o would be done this way: maybe a queue that is not fully determined represents input and output streams,
<hdon_> or more generally, all input and all output, thus making the program's evaluation in real time a purely functional mapping between an ordered collection of input and output events. how far off the mark am i? :)
<hdon_> s/asynchronously/asynchronously and gradually
zolk3ri has joined #ocaml
<def`> While there is no mechanism built into the language (as in Oz), some libraries offer that kind of abstraction and it is quite popular in OCaml to do that way.
<def`> For instance, `'a Lwt.t` represents such a value: an 'a that might not be determined yet.
<def`> The two main libraries for that are Async and Lwt, with the Async_io and Lwt_io modules to deal with i/o.
<hdon_> thanks def` :) without support from the language and runtime, how can a function know to be re-evaluated once a value transitions to fully-determined value?
<def`> The function doesn't know, but it is wrapped in some abstract data that carries everything that is needed to know.
<def`> function is the basic abstraction for computation, and libraries build upon that. The notion of monad capture the minimal interface to make that well-behaved...
<def`> It is a bit abstract when said that way, but looking at these libraries will help.
FreeBirdLjj has quit [Ping timeout: 252 seconds]
<def`> (however the code is a bit out of date, the library changed a lot and the chapter hasn't been updated, though people are working on that)
* hdon_ clicks
pistachio2 has quit [Quit: WeeChat 1.9]
mk9 has quit [Quit: mk9]
hdon_ has quit [Ping timeout: 240 seconds]
mk9 has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
zlsyx has quit [Read error: Connection reset by peer]
jao has quit [Ping timeout: 246 seconds]
mk9 has quit [Quit: mk9]
cbot has joined #ocaml
silver has joined #ocaml
silver has quit [Remote host closed the connection]
hdon_ has joined #ocaml
silver has joined #ocaml
<hdon_> thanks def` :)
<companion_cube> I'd kill for implicits right now
hdon_ has quit [Changing host]
hdon_ has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
Bronsa has joined #ocaml
failproofshark has joined #ocaml
hdon_ has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 240 seconds]
butterthebuddha has quit [Max SendQ exceeded]
butterthebuddha has joined #ocaml
Haudegen has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 256 seconds]
gtrak has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
hdon_ has joined #ocaml
AltGr has left #ocaml [#ocaml]
gtrak has quit [Ping timeout: 246 seconds]
gtrak has joined #ocaml
tane has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
butterthebuddha has quit [Max SendQ exceeded]
butterthebuddha has joined #ocaml
Haudegen has joined #ocaml
unyu has joined #ocaml
mk9 has joined #ocaml
kakadu has joined #ocaml
jao has joined #ocaml
kolko has joined #ocaml
kolko has quit [Ping timeout: 256 seconds]
<hannes> in opam, is there a way to show all transitive dependencies for a given package? bonus point for only runtime-dependencies
<kit_ty_kate> hannes: runtime is complicated but otherwise « opam list --recursive » is probably what you looking for
<hannes> kit_ty_kate: thanks, so far "opam info -f depends tcpip" gives me a list, but that's both runtime and buildtime, and also doesn't include the transitive deps
<hannes> "opam list --recursive" doesn't do what i'd like it to do (opam 1.2.2 here)
Bronsa` has joined #ocaml
slash^ has joined #ocaml
magicbit has joined #ocaml
gtrak has quit [Ping timeout: 240 seconds]
<kit_ty_kate> hannes: sorry I didn't give you the full command: opam list --recursive --resolve=tcpip
<kit_ty_kate> this works with opam1
gtrak has joined #ocaml
zlsyx has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<magicbit> When writing OCaml I very often find myself using the @@ application operator, even chaining several of them. Is there a general guideline or consensus as to whether its use is a good practice? Is limiting the amount of parens its only use?
<companion_cube> it's designed to limit the number of ( ), yes
<magicbit> Okay, and on its use with `ignore', I’ve sometimes seen `ignore @@ …', `… |> ignore' and `ignore (…)'. Is one of them more idiomatic or is it just a matter of taste?
letoh_ has joined #ocaml
letoh has quit [Ping timeout: 265 seconds]
letoh_ is now known as letoh
isd has joined #ocaml
zpe has quit [Remote host closed the connection]
<companion_cube> same thing, I think
<magicbit> Okay, thanks!
tarptaeya has quit [Quit: Byeeeeeee!]
m4lvin has joined #ocaml
<m4lvin> Hello, complete ocaml noob here ;-) Can someone tell me what "name.syntax" package dependencies should do?
<companion_cube> it's old camlp4 stuff, for extending the syntax
<m4lvin> my problem is>: ocamlfind: Package `cstruct.syntax' not found
<companion_cube> nowadays you should probably look for "name.ppx"
<m4lvin> ah
<companion_cube> although for cstruct I'm not sure what the current state of things is
<m4lvin> I expected this to be old, I want to compile something with 4.02.3 and core.113.00.00
<companion_cube> that's orthogonal :-)
<m4lvin> ah, ok
<m4lvin> but I use cstruct 2.3.1, does that already have ppx?
<companion_cube> I don't know
<companion_cube> look for ppx_cstruct
<m4lvin> ah, looks like it has it and then I can compile a bit further
<m4lvin> but I guess to actually use this ppx I would also have to adjust the code?
<m4lvin> because now I get syntax errors later
<m4lvin> The thing I am fighting with is https://github.com/frenetic-lang/netkat-automata btw
<m4lvin> to be sure: the versions of ocaml and core do not determine which version of cstruct I use?
<companion_cube> not particularly, no
<companion_cube> but you'll indeed have to update the code to use [%%cstruct …] instead of the old syntax extension
<m4lvin> ok, I will first try older cstruct versions then
<companion_cube> right
<companion_cube> I mean, yeah, you can try to use old versions and build as-is
<companion_cube> but if the project is maintained, it really should move to ppx
<m4lvin> it's not ;-)
<Drup> but there is a ppx_cstruct
<companion_cube> ^^
<m4lvin> or rather, it has been merged into a bigger project that i have even less of an idea to use ;-)
<companion_cube> erf
zpe has joined #ocaml
hdon_ has quit [Quit: leaving]
<m4lvin> aha! "For Camlp4 support, please use a version of Cstruct that is <=1.9.0"
dtornabene has joined #ocaml
<dh_work> ah, @@ is like $ in haskell? neat, didn't know that was there
<companion_cube> |> and @@ are really convenient
<dh_work> also, I like foo |> ignore
<dh_work> hadn't thought of that, but it's a lot clearer than ignore(foo)
orbifx has joined #ocaml
tane has quit [Quit: Leaving]
mk9 has quit [Quit: mk9]
jnavila has joined #ocaml
spew has quit []
zlsyx has quit [Quit: Leaving...]
ygrek has joined #ocaml
Haudegen has quit [Remote host closed the connection]
spew has joined #ocaml
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
bartholin has quit [Ping timeout: 256 seconds]
ygrek has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
_andre has quit [Quit: leaving]
jnavila has quit [Remote host closed the connection]
dtornabene has quit [Remote host closed the connection]
dtornabene has joined #ocaml
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
argent_smith has quit [Quit: Leaving.]
dtornabene has quit [Quit: Leaving]
dtornabene has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
dtornabene has quit [Quit: Leaving]
dtornabene has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
Bronsa has quit [Ping timeout: 240 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
zolk3ri has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
jimmyrcom has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]