<orbifx>
but it's telling me it want's a list instead of a functions at that position
<orbifx>
function*
cdidd has joined #ocaml
mfp has joined #ocaml
<ggole>
Did you open Core.Std or something like that?
<ggole>
(I wonder if it would be reasonable for type errors to indicate that shadowing is taking place.)
<orbifx>
no, but I thikn some library did
<orbifx>
ggole: yeah it might
<orbifx>
cause using ListLabels works
<orbifx>
this is why I'm asking if there is an explicit way to select the Std.List
FreeBirdLjj has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
octachron has joined #ocaml
Algebr` has joined #ocaml
<orbifx>
how does one enable ppx derivation for lenses?
fraggle_ has joined #ocaml
<companion_cube>
ppx_fields_conv, I guess
Ravana has joined #ocaml
cryyya has quit [Remote host closed the connection]
<orbifx>
companion_cube: what do you mean?
<orbifx>
I open Lens and then I add [@@deriving lens]
<orbifx>
but it't not producing the values I want
<orbifx>
unles....
<orbifx>
ok, no. I thought it might produce some file which I need to include but it doesn't
zpe has joined #ocaml
shinnya has joined #ocaml
octachron has quit [Ping timeout: 265 seconds]
<companion_cube>
oh, sorry, the lens library has a ppx
<companion_cube>
did you #require "lens.ppx_deriving";;?
slash^ has quit [Remote host closed the connection]
orbifx1 has joined #ocaml
sdothum has joined #ocaml
zpe has quit [Remote host closed the connection]
<orbifx>
companion_cube: no, thought that is only for utop?
orbifx1 has quit [Ping timeout: 240 seconds]
<orbifx>
Am I wrong?
<companion_cube>
in utop yeah
<companion_cube>
for compiling, just be sure to have lens.ppx_deriving as a dependency, I guess
<orbifx>
How do I pass that in ocamlfind?
<orbifx>
I'm using ocamlfind ocamlopt ...
<companion_cube>
hmmmmm
<companion_cube>
-ppx something maybe?
<companion_cube>
(I always use a proper build system)
<orbifx>
tried that but it can't find the correct generator. I imagine it would be -ppx lens?
<companion_cube>
don't know
<orbifx>
thanks anyway companion_cube
<orbifx>
I think I will take a break
<orbifx>
maybe email the author at some point
cantstanya has quit [Remote host closed the connection]
<Algebr`>
its a regular pacakge
<Algebr`>
package
<orbifx>
Algebr`: ?
Algebr` has quit [Remote host closed the connection]
APNG has joined #ocaml
atsampson has quit [Quit: step 1: move PC into new case]
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
orbifx has quit [Ping timeout: 264 seconds]
Student has joined #ocaml
<Student>
Hello
<Student>
Can anyone explain me why this statement is equal to 34? let x = x + y in let y = x * y in x + y + z;;
<Student>
x and z are 7 and y is 2
octachron has joined #ocaml
<zaquest>
Student, let x=7+2=9 in let y=9*2=18 in 9+18+7=34
<Student>
Oh, thank you zaquest ^^
<def`>
let x' = x + y in let y' = x' * y in x' + y' + z;;
<def`>
you can read it this way
<Student>
Yeah, I understand. I'm struggling a bit with the language because I'm used to think it the other way around (as if what's inside should be done first)
<ggole>
Hmm. Extensible variants provide their constructor names.
<Algebr`>
wow did opam based reimplement everything under the sun
<flux>
no, they didn't reimplement a resolver ;-)
<Algebr`>
its massive, they reimplemented literally everything
<flux>
like what?
<Algebr`>
like OpamProcess
<Algebr`>
I'm using opam-lib
<Algebr`>
there's at least 40 modules
<flux>
so what should they use instead of it?
<Algebr`>
they really couldn't have reused other code? There's JSON code as well
agarwal1975 has quit [Quit: agarwal1975]
<ggole>
Having few dependencies is arguably a good trait in a package manager
<ggole>
There's also things like windows compatibility to worry about
<flux>
I guess there's some adversity to using libraries as they would need to copy them into opam, to make installing easy
<Algebr`>
but is all distributed as a binary anyway
<flux>
..and in source form
<Algebr`>
and if there's windows compatibility, then the rest of the eco-system as well
<flux>
and I'm guessing many people choose to use the source distribution. I do :)
<flux>
because that's how it's done. also works on raspberry pi ;).
<Drup>
Algebr`: iirc OpamProcess, that's precisely something that was not readily available outside. There has been several discussion about turning that into an independent lib
<ggole>
There's version issues to think about too
<ggole>
You wouldn't want to use a library that only builds on, say, 4.0 or greater
<Algebr`>
I get the motivation, but like there's a lot in here that could and maybe should be a separate lib
<Algebr`>
like Drup mentions
<flux>
it's not like the development of opam becomes easier by splitting those into separate libraries
<Drup>
Algebr`: yes, unfortunatly, making it an external takes time and make developement more complicated, so it was never done
loxs has joined #ocaml
<flux>
and to be actually useful to other parties the libraries should be documented ;)
<Drup>
flux: well, .mli in opam are documented
<Drup>
so that's ok
<Drup>
(surprising, isn't it ? :p)
<flux>
oh ok, just the one random interface I found on google didn't get those in
<flux>
or is it ocamldoc-compatible documentation?
<loxs>
oasis refuses to build a binary with my application name, instead it's called "main.native". Any idea why and how can I fix it?
<Drup>
loxs: when installing, it will move to the correct name, is that enough for you ?
<Algebr`>
loxs: it builds it that in the local directory
<Drup>
(it's .native because it could also be .byte, for bytecode only compilation)
<loxs>
ah, OK... I guess I'll be fine
<loxs>
another problem. When I add "core" in the dependencies, build fails with this error: ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
<pigoz>
hi! I'm new to ocaml. I'm trying to setup a basic project with core.std, and ppx_expect+ppx_inline_test using ocamlbuild. I am using ppx-driver, after I compile my test with `test.byte inline-test-runner name` only the tests from ppx_inline_test get run (ppx_expect creates no output)
<pigoz>
orbifx: well, I have no idea. The file with the tests compiles fine. But running it doesnt run the expect tests :(
<CuriousErnestBro>
(it may seem so, but this is not a joke)
<pigoz>
first time I am setting this up, so I have no idea if I am doing this correctly
<companion_cube>
CuriousErnestBro: can you program?
<orbifx>
pigoz: not very familiar with core and ocamlbuild so hopefully someone else will pick this up
<CuriousErnestBro>
companion_cube, that's a tough question... Can I code a simple math algo, say first 10 levels of euler project in C++, yes. Am I good in programming? I'm nowhere near you guys
<CuriousErnestBro>
(also know basics of python 3 and R)
<companion_cube>
sounds like you would gain a lot by learning python, then
trystero has joined #ocaml
<CuriousErnestBro>
read: half of the book "think python"
<CuriousErnestBro>
but got bored
<CuriousErnestBro>
you're right I should do something fun with it like learn machinelearning
faster has quit [Ping timeout: 240 seconds]
faster has joined #ocaml
tristero has quit [Ping timeout: 272 seconds]
<orbifx>
hannes: have you used ptime?
<hannes>
orbifx: I do use it, yes.
<orbifx>
hannes: just to clarify, you still get current time from Unix.time right? but you use ptime to convert and print to RFC formats?
<orbifx>
CuriousErnestBro: what is your motivation for this? That would determine your approach to learning.
<CuriousErnestBro>
(that's why I came here. OCaml is used in finance extensively, so figured people here would work in finance)
<orbifx>
hannes: small world, a friend of mine pointed jackline to me a few weeks back
<orbifx>
any plans for OMEMO btw? :P
<hannes>
orbifx: PR welcome ;)
<orbifx>
hannes: all is possible :P
<orbifx>
CuriousErnestBro: there is a connection, but not sure if you should approach it that way
<hannes>
orbifx: I still don't really know whether I like omemo tbh. makes me a bit sceptical that if I loose (access to/keys of) one device, it is flawed. I like the ability in xmpp+otr to encrypt to a specific resource/device
<CuriousErnestBro>
what's your opinion on it?
<hannes>
but as mentioned, if there's a nice omemo library in OCaml, I'm willing to support it
ollehar has quit [Quit: ollehar]
<orbifx>
hannes: is there no revocation method?
<orbifx>
CuriousErnestBro: asking me? opinion on what?
<hannes>
orbifx: i guess there is, but it is up to the receiver to decide which devices can decrypt, not up to the sender AFAIU (sorry, should re-read their spec, but busy with other things)
faster has quit [Ping timeout: 272 seconds]
faster has joined #ocaml
<orbifx>
hannes: no probs, just asking. Would like to swtich to an ocaml based client. Currently using profanity
<CuriousErnestBro>
orbifx, on how to approach quantitative finance
<hannes>
orbifx: i try to be welcome to new people :) try it, report issues, I try to fix them asap :)
<orbifx>
CuriousErnestBro: with quantum steps :P I really don't think you should learn a language so that you can get closer to quantative finance ...
<orbifx>
hannes: cool, will download it after I finish my time work
<CuriousErnestBro>
what should you learn a language for then?
<CuriousErnestBro>
I can't learn a language just for the sake of learning a language. I need a project, I need to make something
<faster>
What about a game?
<CuriousErnestBro>
I'm not that into games to be honest
<hannes>
orbifx: (that being said, it is still alpha or beta software, I use it >1.5 year as my only xmpp client... but i also know that jackline has a bug here and there)
<orbifx>
CuriousErnestBro: fix something in the world :) Find a problem which exists, yours or not, and fix it with OCaml
<CuriousErnestBro>
I should do that :)
ydl has joined #ocaml
octachron has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<orbifx>
if a type is expressed as (foo * bar, 'b), does that not mean I can decompose it with ((_,_),_) ?
<orbifx>
hannes: is the best way to install jackline via opam?
faster has quit [Ping timeout: 260 seconds]
faster has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
johnf has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
phase_ has quit [Ping timeout: 272 seconds]
<orbifx>
laters
orbifx has quit [Quit: WeeChat 1.5]
johnf has quit [Read error: Connection reset by peer]