WizJin1 has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
ziyourenxiang has joined #ocaml
manas has joined #ocaml
liori13 has joined #ocaml
liori13 has quit [Remote host closed the connection]
<Leonidas>
what does voice imply?
erkin has joined #ocaml
<discord>
<Christophe> When a channel in muted, only the people who have voice can talk. It's a good way to silence the bots, or the human idiots. But then you shouldn't orget to give the voice to people 😃
mengu__ has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
erkin has quit [Remote host closed the connection]
ziyourenxiang has quit [Quit: Leaving]
aciniglio has joined #ocaml
cryptocat1094 has joined #ocaml
noitakomentaja has quit [Ping timeout: 250 seconds]
Guest5365 has joined #ocaml
Guest5365 has quit [Remote host closed the connection]
Haudegen has quit [Remote host closed the connection]
caltelt has quit [Ping timeout: 240 seconds]
noitakomentaja has joined #ocaml
francisl has joined #ocaml
Denommus has joined #ocaml
Fare has joined #ocaml
noitakomentaja has quit [Ping timeout: 250 seconds]
Venusaur18 has joined #ocaml
Venusaur18 has quit [Remote host closed the connection]
neatonk has joined #ocaml
spew has joined #ocaml
sjohnson29 has joined #ocaml
Fare has quit [Ping timeout: 272 seconds]
manas has quit [Remote host closed the connection]
jao has joined #ocaml
sjohnson29 has quit [Remote host closed the connection]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
jbrown has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
Guest7911 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
milky12 has joined #ocaml
milky12 has quit [Remote host closed the connection]
neatonk has quit [Ping timeout: 260 seconds]
noitakomentaja has joined #ocaml
ced1172 has joined #ocaml
ced1172 has quit [Remote host closed the connection]
francisl has joined #ocaml
wize has joined #ocaml
_Freechicks_ has joined #ocaml
Freechicks has quit [Ping timeout: 256 seconds]
Jesin has quit [Remote host closed the connection]
neatonk has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Fare has quit [Ping timeout: 240 seconds]
u0_a183 has joined #ocaml
Jesin has joined #ocaml
Turner9222 has joined #ocaml
Turner9222 has quit [Remote host closed the connection]
Fare has joined #ocaml
bartholin has joined #ocaml
cryptocat1094 has quit [Ping timeout: 260 seconds]
cryptocat1094 has joined #ocaml
Fare has quit [Ping timeout: 240 seconds]
neatonk has quit [Ping timeout: 272 seconds]
<dreamer>
hi all, I'm trying to upgrade my ocaml to latest using `opam switch 4.07.0` and then reinstall my packages, but I get a `Sorry, no solution found: there seems to be a problem with your request.` any idea what I'm doing wrong?
<dreamer>
or rather: what is the recommended way to make sure my environment is using latest ocaml and has everything compiled?
<dmbaturin>
Using an external solver?
neatonk has joined #ocaml
<dmbaturin>
I upgraded to 4.07 just fine not long ago.
<dreamer>
what is the best method to do this?
u0_a183 has quit [Quit: WeeChat 2.2]
<dmbaturin>
To be fair I used it as an opportunity to clean up my setup a bit and installed what I actually needed right then, so I haven't tried the usual opam switch export.
<dreamer>
ok, well I could just start from scratch. I'm only using it for liquidsoap and I'm trying to install from current master repos
<dreamer>
thing is the ocaml from debian is a 'tad' old and I need a slightly newer version ;)
<dreamer>
hmm, seems ocaml-duppy doesn't want to compile with this version
* dreamer
diner first then try another ocaml ..
cobreadmonster has joined #ocaml
<dmbaturin>
dreamer: I have a thing that has to be a debian package, which is built using an ocaml setup made entirely with opam without a single debian package, precisely for that reason.
<dmbaturin>
Jessie repos have 4.01!
<dmbaturin>
I wonder if anyone ever uses them at all.
FreeBirdLjj has quit [Remote host closed the connection]
Haudegen has quit [Remote host closed the connection]
cryptocat1094 has quit [Quit: WeeChat 2.2]
cryptocat1094 has joined #ocaml
orbifx has joined #ocaml
Fare has joined #ocaml
francisl has quit [Quit: francisl]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Fare has quit [Ping timeout: 272 seconds]
<discord>
<Perry> Probably to bootstrap opam?
wize has quit [Ping timeout: 240 seconds]
<discord>
<Perry> What does stretch have?
<discord>
<anuragsoni.13> I believe stretch has 4.02
<discord>
<anuragsoni.13> I haven't seen too many linux distributions package anything newer than ocaml 4.05 (fedora and arch are the two that I know)
<discord>
<anuragsoni.13> note that i'm referring to packages in the official repositories of a distribution.
<discord>
<Perry> I still have 4.05 packaged for MacPorts because I didn't want to deal with updating everything that could be broken by safe-strings at once. I'm planning on updating to 4.07 relatively soon though.
silenc3r has joined #ocaml
francisl has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
noitakomentaja has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
Freechicks has joined #ocaml
_Freechicks_ has quit [Ping timeout: 240 seconds]
<silenc3r>
How can I set environment variables on compiler switch? `opam config set VAR VALUE` doesn't seem to do the trick - bash doesn't recognize any vars set that way
<discord>
<Perry> why would it? bash has no cognizance of what a program it runs does.
<discord>
<Perry> that command sets opam configuration stuff, not bash stuff.
<discord>
<Perry> what are you trying to do? I presume it is different from running eval $(opam config env)
<silenc3r>
I'm running exactly that command, but I would like to add some switch specific variables
orbifx has quit [Ping timeout: 260 seconds]
<silenc3r>
My application reads env variables on startup and I would like to automatically set them on compiler switch and not have to run `MYAPP_CONFIG_FILE=/path/to/config myapp` every time when I do manual testing
madprops23 has joined #ocaml
madprops23 has quit [Remote host closed the connection]
Fare has joined #ocaml
<Fare>
Is there a good library of monadic modules in OCaml ?
<Fare>
Maybe from JaneStreet ?
<companion_cube>
what kind of "monadic modules" are you thinking of?
<companion_cube>
(if it's just having return and bind, most stdlibs have these in many of their modules)
<Fare>
Something like that: module type MonadBaseS = sig type 'a t ; val return : 'a -> 'a t ; val bind : 'a t -> ('a -> 'b t) -> 'b t ; end
<Fare>
and then a module Monad (M : MonadBaseS) = struct ...(plenty of helpers, etc.)... end
<Fare>
And also a module MonadInfix (M : Monad) = struct (>>=) = bind ... end
<Fare>
so basically, infrastructure so you I don't have to reinvent the wheel every time.
<companion_cube>
(to me it sounds quite non-idiomatic, but if it's your style)
<Fare>
uh, if you use either Lwt or Async, you're using monads.
Menche8 has joined #ocaml
<companion_cube>
yes, but never in a generic way
<Fare>
Also if you're writing code that straightforwardly interacts with code extracted from Coq the obvious way.
<companion_cube>
so there is no "reinvent the wheel"
<companion_cube>
like, I wrote my own backtracking+state monad, instead of stacking existing stuff together
<companion_cube>
because in OCaml it's barely more work, and it's also faster
<Fare>
No sure what you mean by "never in a generic way". At some point, I'm tired of boilerplate and I want all the helpers to be automatically deduced for me from the definition.
<companion_cube>
if you define map via bind+return, ughhhh
<companion_cube>
bartholin: that's because of the abstraction over several IO monads :/
<companion_cube>
the faster we get effects, the earlier we can get rid of that
jao has joined #ocaml
<Fare>
I find myself constantly defining N levels of functionality for every module type, so I can deduce ones from the others. Sigh.
Menche8 has quit [Ping timeout: 260 seconds]
<companion_cube>
are you interface coq-extracted code with lwt or something like that? :o
<Fare>
For instance my PersistableS depends on DigestibleS which depends on MarshalableS which can be deduced from a PreMarshalableS that has the bare minimum marshaling functionality.
<companion_cube>
but yeah, I still maintain that typically, when I use monads, it's worth it writing a bunch of functions to make it fast and clean
<companion_cube>
ok well that doesn't sound idiomatic
<Fare>
What's idiomatic?
<companion_cube>
not using 4 layers of monads?
<Fare>
I don't know what's "idiomatic", but I fear the "ma" might then be sometimes extra.
* bartholin
looks at the Core library
<companion_cube>
"idiomatic" means it follows the normal style for that language, sorry. A bit like "pythonic" for python specifically
<companion_cube>
the opposite of "writing fortran is every language"…
<Fare>
What's the proper adjective? camlidic? humpty?
<Drup>
Let's just say it's a style that is used mostly in the core ecosystem, and not really anywhere else
<Drup>
in the jst ecosystem*
<discord>
<rgrinberg> I think belt uses this trick too lol
<discord>
<rgrinberg> But seriously it's a good trick.
<silenc3r>
I've found answer to my own question: You can set per-switch env variables in `_opam/.opam-switch/switch-config` via `setenv` variable. I think it works only with OPAM 2.0 though.
<bartholin>
I am a bit dazzled by this overcomplicated composition of includes and functors
francisl has quit [Quit: francisl]
<companion_cube>
bartholin: well people have been complaining about Core's doc ;-)
<Fare>
rgrinberg: don't you have a monad transformer library?
<Fare>
rgrinberg: I'm trying to decide whether or not to adopt wholesale the janestreet ecosystem.
francisl has joined #ocaml
<Fare>
and if not, what are the alternatives for a whole bunch of things, from Monads to Async/Lwt to whatever.
cods has joined #ocaml
<companion_cube>
people typically use lwt for IO
<companion_cube>
apart from that, use whatever stdlib extension you prefer, and use monads with parcimony
pierpal has quit [Read error: Connection reset by peer]
shinnya has joined #ocaml
neatonk has quit [Ping timeout: 260 seconds]
kakadu_ has joined #ocaml
jnavila has joined #ocaml
alekz26 has joined #ocaml
tokomak has joined #ocaml
Fleet19 has joined #ocaml
alekz26 has quit [Remote host closed the connection]
Fleet19 has quit [Remote host closed the connection]
pierpa has joined #ocaml
neatonk has joined #ocaml
jao has quit [Ping timeout: 272 seconds]
orbifx has joined #ocaml
cryptocat10941 has joined #ocaml
cryptocat10941 has quit [Client Quit]
silenc3r has quit [Quit: Leaving]
cryptocat10941 has joined #ocaml
cryptocat1094 has quit [Disconnected by services]
cryptocat10941 is now known as cryptocat1094
cobreadmonster has quit [Quit: Connection closed for inactivity]
francisl has quit [Quit: francisl]
Freechicks has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
francisl has joined #ocaml
neatonk1 has joined #ocaml
neatonk has quit [Ping timeout: 240 seconds]
Freechicks has joined #ocaml
cryptocat1094 has quit [Quit: WeeChat 2.2]
<Fare>
I see lots of people putting infix operators in a submodule called "Infix", but that doesn't play well at all with extending the set of operators in a refined module.
<Fare>
more generally, any module inside a module type is problematic.
<Fare>
what are best practices?
<octachron>
Fare, you just need to use (destructive) substitution on the inner submodule
orbifx has quit [Ping timeout: 244 seconds]
aciniglio has quit [Ping timeout: 240 seconds]
neatonk1 has quit [Quit: neatonk1]
wize has joined #ocaml
neatonk has joined #ocaml
francisl has quit [Quit: francisl]
SebastianFlyte23 has joined #ocaml
Jesin has quit [Remote host closed the connection]
Jesin has joined #ocaml
aidalgol has joined #ocaml
SebastianFlyte23 has quit [Ping timeout: 272 seconds]
<Fare>
octachron: module Foo := ... ?
<Fare>
Thanks!
orbifx has joined #ocaml
orbifx has quit [Client Quit]
TReK7 has joined #ocaml
TReK7 has quit [Remote host closed the connection]
kakadu_ has quit [Remote host closed the connection]
neatonk has quit [Ping timeout: 240 seconds]
<discord>
<Fox> hi
<discord>
<Fox> can I ask for help here?
BitPuffin has quit [Ping timeout: 260 seconds]
<companion_cube>
sure, don't ask to ask
<pierpa>
no, absolutely not! :)
<discord>
<Fox> thanks
<companion_cube>
pierpa: careful, sarcasm is easily lost on the net :p
<discord>
<Fox> mean, mean pierpa!
<discord>
<Fox> 😃
<pierpa>
ok. don't believe what I wrote above :)
<discord>
<Fox> I am trying to model a tree of files that exist on a git repo, into a db table, so that I can present it to the user as a tree layout, through the db contents (not through walking the git repo tree).. any insights on how to model the files and folders tree?
<discord>
<Fox> the rationale is to avoid storing the files themselves on the db, and instead only the content hash as well as the tree layout info
mengu has joined #ocaml
<discord>
<Fox> I got a bit lost between how the file layout is represented in git (file object and tree objects) and on how to model that to get the info into table(s) model for the db
<companion_cube>
so you could have a table of (filename,hash) and a table (filename,filename) for the parent/child relation?
<companion_cube>
there are libraries to manipulate git repositories, btw, Fox
<discord>
<Fox> right, and the one used here is nodegit
<discord>
<Fox> but I'm still wrapping my head around git internals and ocaml
<discord>
<Fox> for example, here's what I have:
<discord>
<Fox> type fileTreeItem = | Directory of fileTree | File of string
<companion_cube>
that looks good, sure
<discord>
<Fox> now type fileEntry = { id : string ... and co }
Denommus has quit [Remote host closed the connection]
<discord>
<Fox> from here on, I wonder how to represent this with several entities
<discord>
<Fox> imagine each entity having its repo and its file layout on the db
<companion_cube>
"entity"?
<discord>
<Fox> like a node or so
<discord>
<Fox> in a db table you'd have entity1, entity2...etc
<discord>
<Fox> and each of them has a repo
<discord>
<Fox> and I want to model the file tree of each repo, that belongs to each entity
<discord>
<Fox> am I expressing things okay? or?
<companion_cube>
I don't know what to say except that, well, SQL tables are good for representing this
<discord>
<Fox> right, but the schema/ocaml types model is what I'm after
<companion_cube>
if it's on the DB, it's not going to really be in OCaml types
<companion_cube>
I mean, what matters is the DB schema
<discord>
<Fox> I'm dealing with the git repos and the db using ocaml (bucklescript)
<companion_cube>
by "db" you mean something like sqlite, right?
<discord>
<Fox> with nodegit I can access the repo objects, and I can also alter the db, but the question is, how to represent the idea above into a combination of types, in order to send the file tree info (to the db)
<discord>
<Fox> right
<companion_cube>
then you probably don't need intermediate types? I mean I'd try to insert stuff into the DB directly as I process it
<companion_cube>
in a few tables (for mapping filenames to content hashes, and dirnames to set of children)
<discord>
<Fox> yes, after dealing with git (like adding a file or a folder with files), I'd update the file layout on the db
<discord>
<Fox> but how do I map this properly?
<discord>
<Fox> aha, can you please elaborate?
<discord>
<Fox> I imagine having a table to hold entity => root folder id of the git repo
<companion_cube>
create table file_content (text filename, text sha1); // 1-to-1
<companion_cube>
create table dir_children (text dirname, text child_name); // 1-to-n
<companion_cube>
something like that for the git tree
<companion_cube>
I mean, it's really not my turf, but it's more a DB question than a OCaml question ^^'
<discord>
<Fox> hmmm
<discord>
<Fox> you really have a point that it's more of a db question, but as I got to face it from the ocaml side (which I'm still green on btw) I couldn't model the thing 😃
his has joined #ocaml
<companion_cube>
what's your usual language?
<discord>
<Fox> the c family
<companion_cube>
oh, interesting. Well OCaml provides records which are really similar to C structs, right?
<discord>
<Fox> I'm new to the whole fp paradigm
<companion_cube>
so DB rows could be represented by records, even if it's just temporary
his has quit [Remote host closed the connection]
zolk3ri has quit [Quit: Lost terminal]
mfp has quit [Quit: Leaving]
<Fare>
are there polymorphic records with an extensible number of rows just like there are polymorphic variants with an extensible number of constructors?
<Drup>
Fare: Sure, we call them objects
<Fare>
but objects have a lot more gunk to them.
<Drup>
True, although you can ignore most of it for many purposes
nug700 has joined #ocaml
bartholin has quit [Remote host closed the connection]
nug700 has quit [Remote host closed the connection]
pierpa has quit [Quit: Page closed]
Guest9970 has joined #ocaml
Guest9970 has quit [Killed (Sigyn (Spam is off topic on freenode.))]