kakadu has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
al-damiri has quit [Quit: Connection closed for inactivity]
Myk267 has joined #ocaml
gandulio has joined #ocaml
Ayey_ has joined #ocaml
<gandulio>
Hello! I'm trying to set up a CI repo that provides pre-built binaries of merlin and a few other utilities, but I'm having trouble determining how to specify the output directory for building for opam. I'm extremely new to all this. Is it better to specify the output directory via the makefile or somewhere else?
<maurer>
rightfold: I have, but the way you do it is that you expose a C library and then bind to rust from there
<maurer>
rightfold: Take a look at BinaryAnalysisPlatform/bap (github base ocaml project), maurer/libbap (ad-hoc C bindings), BinaryAnalysisPlatform/bap-bindings (code-generation-based C bindings), and maurer/bap-rust (rust bindings via bap-bindings)
<maurer>
if you want to see an example of it being done
silver has quit [Read error: Connection reset by peer]
sepp2k has quit [Ping timeout: 240 seconds]
trapz has quit [Quit: trapz]
ndas has joined #ocaml
<ndas>
hi! i'm very new to ocaml and opam and I have an installation question
<ndas>
when I install opam it places the .opam directory inside my home directory, $HOME. Is there a way to specify the placement of the .opam directory to some other alternative base directory?
kamog has quit [Remote host closed the connection]
fraggle_ has quit [Ping timeout: 264 seconds]
fraggle_ has joined #ocaml
FreeBirdLjj has joined #ocaml
trapz has quit [Quit: trapz]
Myk267 has quit [Quit: Leaving]
trapz has joined #ocaml
jao has quit [Remote host closed the connection]
wu_ng has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
jao has joined #ocaml
Myk267 has joined #ocaml
ode has joined #ocaml
ode has left #ocaml [#ocaml]
mengu has quit [Remote host closed the connection]
Myk267 has quit [Quit: Leaving]
Myk267 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<ndas>
looks like the --root option to the opam init command allows me to specify an alternative location for ~/.opam
trapz has quit [Quit: trapz]
ndas has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
sz0 has joined #ocaml
MercurialAlchemi has joined #ocaml
nomicflux has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
nomicflux has quit [Quit: nomicflux]
FreeBirdLjj has joined #ocaml
fraggle_ has quit [Ping timeout: 264 seconds]
bungoman has quit [Ping timeout: 246 seconds]
bungoman has joined #ocaml
Simn has joined #ocaml
jabroney has quit [Quit: Leaving.]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Mercuria1Alchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
larhat has quit [Quit: Leaving.]
spew has quit [Quit: foobar]
ygrek_ has joined #ocaml
FreeBird_ has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
Ayey_ has joined #ocaml
wu_ng has quit [Ping timeout: 246 seconds]
wu_ng has joined #ocaml
alfredo has joined #ocaml
tane has joined #ocaml
orbifx has joined #ocaml
argent_smith has joined #ocaml
ygrek_ has joined #ocaml
ygrek_ has quit [Ping timeout: 246 seconds]
orbifx has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
gtristan has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
freusque has joined #ocaml
maattdd_ has joined #ocaml
nicooo has joined #ocaml
nicoo has quit [Ping timeout: 260 seconds]
maattdd has quit [Ping timeout: 240 seconds]
sz0 has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<rightfold>
maurer: thanks, I was thinking of that, I want to call a native ocaml library from a rust program
<rightfold>
Google, being unable to comprehend basic English in 2017, interprets "call OCaml from C" as "call C from OCaml", so it's difficult to find stuff
<flux>
I wish functional languages found a common tone for interop. it should be easier :)
ygrek_ has joined #ocaml
<rightfold>
PureScript has a very easy FFI
<rightfold>
It'd be cool to translate PureScript to BuckleScript's backend to get optimizations
johnelse_ has joined #ocaml
johnelse has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
gtristan has quit [Ping timeout: 264 seconds]
zv has quit [Ping timeout: 260 seconds]
johnelse_ is now known as johnelse
FreeBirdLjj has joined #ocaml
<mrvn>
rightfold: it interprets it as Set("call", "OCaml", "from", "C")
<rightfold>
:p
<mrvn>
What annoys me is that google no longer honors "text with spaces"
<mrvn>
It can look up urls for text, with and spaces all it wants but please then filter for "text with spaces" and discard the others.
<flux>
a few years ago I noticed that I need to use a lot more double quoting than I used to
<flux>
I guess I could try bing!
<mrvn>
flux: the problem with interop is the Gc and their different data representations
maattdd has joined #ocaml
<flux>
mrvn, exactly this. someone(tm) should solve it!
<mrvn>
most of rust doesn't use a gc anyway
<flux>
yes, with rust it should be possible. maybe more difficult with ie. haskell.
<mrvn>
and isn't the rest reference counting?
<flux>
even nice c++-ocaml-interop should be possible with some code generation.. though maybe kakadu has opinions on that.. :)
<mrvn>
flux: I've had some success joining ocaml and QT5 (C++) memory management. Luckily Qt has hooks one can hook into to make that work.
<def`>
mrvn: interesting, are these hooks documented somewhere?
<mrvn>
So even Qt classes created in c++ can be shared with ocaml.
<mrvn>
def`: the destroyed signal.
maattdd_ has quit [Ping timeout: 268 seconds]
zv has joined #ocaml
<def`>
thanks
<rightfold>
If I use OCaml code as a statically linked native library from C, do I have to include the bytecode interpreter?
<mrvn>
you don't and you can't.
<flux>
I should really try out kakadu's work, but it's just too easy to use Qt from C++.. in particular if you want to do some exotic stuff later like cross compile to windows or android.
<rightfold>
mrvn: ok
<mrvn>
flux: iirc kakadu did work on QML support. I hate that. I don't want to have to use 3 languages in my project.
<flux>
qml rocks.. ;)
<mrvn>
flux: write me a qml_of_ocaml
gtristan has joined #ocaml
<def`>
mrvn: if you are already using C++, is it really such a pain to add qml?
<adrien>
flux: cross-compilation to windows isn't an issue nowadays I think :P
<adrien>
android, I don't know
<adrien>
(maybe I'll know soon since Android is one of the reasons I've built a new machine)
<mrvn>
def`: 1) yes, 2) I'm not using c++ other than in the bindings itself.
FreeBirdLjj has quit [Remote host closed the connection]
<mrvn>
def`: With kakadu QML support the user has to write parts in qml, parts in c++ and parts he can write in ocaml
<def`>
I see
FreeBirdLjj has joined #ocaml
tane has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 240 seconds]
silver has joined #ocaml
trapz has joined #ocaml
jabroney has joined #ocaml
freyr has joined #ocaml
<freyr>
Is it possible to use a vanilla version of Batteries with js_of_ocaml?
<Drup>
Yeah, but you need to load the additional runtime functions in weak.js
<Drup>
containers works better with jsoo, I would advise that instead
AlfredEN1uman has quit [Ping timeout: 258 seconds]
<freyr>
Yeah, they are really good indeed, however batteries looks more reliable. So all I need to do is just add +weak.js, right?
<Drup>
you need at least that
<Drup>
you might need other stuff, not sure
<Drup>
(containers *really* work a lot better with jsoo, batteries will bloat your js file and has other things that are a bit nasty in js)
<freyr>
Ok, I'll give it a try. Afaik base should also be jsoo friendly, right? Has anybody tried it?
<Drup>
it should, but I haven't tried
octachron has joined #ocaml
trapz has quit [Remote host closed the connection]
hovind has joined #ocaml
mengu has joined #ocaml
ode has joined #ocaml
jnavila has joined #ocaml
<ode>
Hi, What regex do I need to remove left and right parenthesis from a string? "[()]" works in Python but not OCaml.
sz0 has quit [Quit: Connection closed for inactivity]
jnavila has quit [Read error: Connection reset by peer]
al-damiri has joined #ocaml
<freyr>
ode: what about String.filter (function '(' | ')' -> false | _ -> true) ?
<ode>
Thanks, that works.
ode has quit [Quit: Leaving]
jabroney has quit [Quit: Leaving.]
kakadu has joined #ocaml
ygrek_ has quit [Ping timeout: 256 seconds]
jnavila has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
_andre has joined #ocaml
jnavila has quit [Read error: Connection reset by peer]
wu_ng has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
nomicflux has joined #ocaml
hellofunk has joined #ocaml
nomicflux has quit [Quit: nomicflux]
AlexDenisov has joined #ocaml
\h has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
gtristan has quit [Ping timeout: 264 seconds]
ygrek_ has joined #ocaml
arquebus has joined #ocaml
mrgrieves has joined #ocaml
\h has joined #ocaml
freehck has quit [Ping timeout: 260 seconds]
hellofunk has quit [Ping timeout: 268 seconds]
rawra has joined #ocaml
Ayey_ has quit [Ping timeout: 240 seconds]
orbifx-m has joined #ocaml
<orbifx-m>
would using the bind operator cause application operator cause any issues with tail recursion? the value applied is computed
yomimono has joined #ocaml
<octachron>
orbifx-m, you can use "(f[@tailrec]) x" to check if a call is tail recursive
<octachron>
*[@tailcall]
freehck has joined #ocaml
snowcrshd has joined #ocaml
<orbifx-m>
is that standard?
jnavila has joined #ocaml
<octachron>
orbifx-m, it is a built-in attrbitute since 4.03
orbifx-m has quit [Read error: Connection reset by peer]
Soni has joined #ocaml
<toolslive>
@freehck: nice! we're currently at 4.03.0 and 4.04.0 optional in development (still have some issues with spacetime :( )
yomimono has quit [Ping timeout: 246 seconds]
wtetzner has joined #ocaml
marsam has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
ryanartecona has joined #ocaml
mengu has quit [Ping timeout: 268 seconds]
* reynir
has OCaml version 3.11.2 at work
vtomole has joined #ocaml
vtomole has quit [Quit: Page closed]
zpe has quit [Remote host closed the connection]
vtomole has joined #ocaml
<freehck>
rgrinberg: no, fairly speaking the main problem was with ocamlnet3. His author has dropped it because ha had brand new version 4. And old ocamlnet didn't want to build with new ocaml.
<rgrinberg>
freehck: I see. Out of curiosity, why do use ocamlnet?
ygrek_ has quit [Ping timeout: 240 seconds]
<freehck>
rgrinberg: Because it was used by my predecessor. Is something wrong with ocamlnet?
<rgrinberg>
it's pretty huge, so people mostly use a subset of it. Was just curious which subset you're using
<rgrinberg>
I think there are better standalone versions of many of the sub libraries it provides though
Ayey_ has joined #ocaml
<freehck>
rgrinberg: yes, it can be splitted into different parts, but nobody wants to do it.
<freehck>
rgrinberg: we're using equeue-ssl, http-client, shell and event systems from ocamlnet.
<rgrinberg>
how come you couldn't upgrade it to ocamlnet4 btw?
<apache3>
I'm trying to do 'let open X in' inside a function inside a module that takes a module X as a parameter ("is a functor"?)
<freehck>
rgrinberg: it was because of equeue-ssl mostly. My predecessor used implemented his own class for ssl-connections using class type declarations from there.
<freehck>
s/used//
Ayey_ has quit [Ping timeout: 256 seconds]
<apache3>
like: module A = functor (X: sig val constant end) -> struct let foo () = let open X in X.constant end
<apache3>
or well, just "in constant"
<apache3>
ocaml complains: "This module is not a structure; it has type sig ............"
ryanartecona has quit [Ping timeout: 240 seconds]
<smondet[m]>
apache3: ` sig val constant end` is missing a type for `constant`
ryanartecona has joined #ocaml
<smondet[m]>
apache3: this works for me module A = functor (X: sig val constant : int end) -> struct let foo () = let open X in constant end;;
<apache3>
it was an example
<apache3>
I can't get it to work with X.( () ) either
yomimono has joined #ocaml
<freehck>
apache3: this snippet says me "Syntax error" on end in "struct val constant end".
<freehck>
ocaml 4.04
<freehck>
apache3: I think you must specify type of constant.
<freehck>
module A = functor (X: sig val constant : int end) -> struct let foo () = let open X in constant end;;
<freehck>
Ah, haven't read smondet[m] :)
<apache3>
you are right
jao has joined #ocaml
<apache3>
sorry, more correct snippet:
<apache3>
module type X = functor (T: sig val constant : int end) -> sig end;;
<apache3>
module A = functor (X: X) -> struct let foo () = let open X in T.constant end;;
<apache3>
Error: This module is not a structure; it has type X
<apache3>
there is some functor syntax I'm not getting riht
<freehck>
how can you open a functor? :)
<apache3>
I'd like A to take an "instantiated" functor rather than a functor
<apache3>
and then it sohuld probably be
<octachron>
apache3, here the error is telling you that X is a functor, and cannot be opened without being applied first
<freehck>
You must make a module with this functor to open it. "let open X(something) in"
<apache3>
module type X = functor (T: sig val constant : int end) -> sig module T : sig val constant : int end end;;
<apache3>
ahh right, thanks
<apache3>
can I make my module A take an applied functor rather than a functor?
silver has quit [Read error: Connection reset by peer]
freusque has joined #ocaml
<mrvn>
there is more than one notty
mengu has quit [Ping timeout: 240 seconds]
rpip has quit [Remote host closed the connection]
<mrvn>
notty does too little (no subwindows, no scrolling that I see), lambda-term way too much. :(
snowcrshd has joined #ocaml
<zozozo>
mrvn: i was thinking about making a library on top of notty one day of our interests you
<zozozo>
Arg.. damn phone, *if it interests you
Simn has quit [Ping timeout: 256 seconds]
<mrvn>
Maybe I will just make some ocaml classes on top of libcurses-ocaml
<mrvn>
and use exceptions for error handling
Xadnem has joined #ocaml
spew has joined #ocaml
<Drup>
libcurses is complete crap
<Drup>
don't use it
<Drup>
if you are going to reimplement half of what lambda-term already does, at least do it on top of notty, it will have a good chance of not crashing all the time.
hellofunk has joined #ocaml
<mrvn>
does curses crashor the ocaml bindings?
<Drup>
curses
<Drup>
it doesn't handle resizing well, it's terrible at utf8 and color, the API is stuck in the middle ages
<Drup>
(in short: it's an old C library)
<mrvn>
yes, the API realy sucks- But I haven't seen it crash yet
Simn has joined #ocaml
hellofunk has quit [Ping timeout: 258 seconds]
<mrvn>
args, liblambda-term-ocaml has no -doc package with the examples.
rawra has quit [Quit: Connection closed for inactivity]
al-damiri has quit [Quit: Connection closed for inactivity]
snowcrshd has quit [Ping timeout: 264 seconds]
snowcrshd_ has joined #ocaml
kolko_ has joined #ocaml
kolko has quit [Ping timeout: 258 seconds]
TheLemonMan has joined #ocaml
kolko_ has quit [Ping timeout: 268 seconds]
marsam has quit [Remote host closed the connection]
romildo has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<romildo>
How can I use ppa_deriving.show to automatically generate a show function for the type of tokens declared withing a ocamlyacc grammar?
<romildo>
s/withing a/withing an
<romildo>
s/withing a/within an
jabroney has quit [Quit: Leaving.]
<rgrinberg>
romildo: ppx_import and then [@@deriving show]?
<romildo>
rgrinberg, I am beginning to learn and use ppx syntax extensions. I am starting with show. I will search about ppx_import, as I do not read about it yet. Thanks.
vtomole has joined #ocaml
<rgrinberg>
NP. ppx_import is usually the standard solutions for generating derivers for types you haven't defined.
marsam has joined #ocaml
marsam has quit [Remote host closed the connection]
vtomole has quit [Quit: Page closed]
gtristan has joined #ocaml
<romildo>
rgrinberg, my solution: in the ocamllex specification I added:
<romildo>
I should be enough, I think.
<romildo>
end
<romildo>
type token = [%import: Parser.token] [@@deriving show]
<romildo>
module P = struct
<romildo>
s/I/it
marsam has joined #ocaml
al-damiri has joined #ocaml
snowcrshd_ has quit [Ping timeout: 264 seconds]
<rgrinberg>
Sounds about right
orbifx has joined #ocaml
<romildo>
I can write let show_token_list = [%derive.show: Lexer.P.token list] to derive a function to show a list of tokens. How would I derive a formatter for a list of tokens?
<romildo>
let pp_token_list = [%derive.pp: Lexer.P.token list] does not work: Cannot locate deriver pp
tobast1 has quit [Read error: Connection reset by peer]
hellofunk has joined #ocaml
hellofunk has quit [Ping timeout: 260 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
jao has quit [Remote host closed the connection]
jao has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Ayey_ has joined #ocaml
Ayey_ has quit [Ping timeout: 240 seconds]
romildo has quit [Quit: Leaving]
gtristan has quit [Ping timeout: 246 seconds]
silver has joined #ocaml
Simn has quit [Quit: Leaving]
zpe has quit [Ping timeout: 264 seconds]
jao has quit [Ping timeout: 260 seconds]
Myk267 has left #ocaml ["Leaving"]
jao has joined #ocaml
_andre has quit [Quit: leaving]
kakadu has joined #ocaml
orbifx has quit [Ping timeout: 260 seconds]
pilne has joined #ocaml
Ayey_ has joined #ocaml
romildo has joined #ocaml
Ayey_ has quit [Ping timeout: 240 seconds]
hellofunk has joined #ocaml
spew has quit [Quit: foobar]
hellofunk has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
Xadnem has quit [Quit: leaving]
argent_smith has quit [Quit: Leaving.]
hovind has quit [Ping timeout: 240 seconds]
jao has quit [Remote host closed the connection]
octachron has quit [Quit: Leaving]
jao has joined #ocaml
Ayey_ has joined #ocaml
sh0t has quit [Remote host closed the connection]
Ayey_ has quit [Ping timeout: 240 seconds]
romildo has quit [Remote host closed the connection]
silver has quit [Ping timeout: 240 seconds]
nicooo is now known as nicoo
silver has joined #ocaml
marsam has quit [Remote host closed the connection]
pyx has joined #ocaml
pyx has quit [Client Quit]
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
kakadu has quit [Remote host closed the connection]