adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
noonehere4u22 has joined #ocaml
noonehere4u22 has quit [Remote host closed the connection]
stoner1923 has joined #ocaml
stoner1923 has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
ZirconiumX has quit [Ping timeout: 256 seconds]
inr has quit [Read error: Connection reset by peer]
inr has joined #ocaml
ZirconiumX has joined #ocaml
neatonk has joined #ocaml
francisl has quit [Quit: francisl]
neatonk has quit [Ping timeout: 256 seconds]
francisl has joined #ocaml
Soni has quit [Ping timeout: 256 seconds]
Soni has joined #ocaml
hph^ has joined #ocaml
FreeBirdLjj has joined #ocaml
^MillerBoss has joined #ocaml
^MillerBoss has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
zv_ has quit [Quit: WeeChat 2.0.1]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
aidalgol has joined #ocaml
Fare has joined #ocaml
sophiya has joined #ocaml
sophiya has quit [Remote host closed the connection]
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 256 seconds]
ohama has quit [Ping timeout: 276 seconds]
ohama has joined #ocaml
pierpa has quit [Quit: Page closed]
bodeezl19 has joined #ocaml
bodeezl19 has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 244 seconds]
alphaseg26 has joined #ocaml
alphaseg26 has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Fare has quit [Ping timeout: 240 seconds]
mfp has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 240 seconds]
duoi9 has joined #ocaml
duoi9 has quit [Remote host closed the connection]
francisl has quit [Quit: francisl]
CrunchyChewie7 has joined #ocaml
CrunchyChewie7 has quit [Remote host closed the connection]
wize has quit [Ping timeout: 268 seconds]
cbarrett_ has quit []
cbarrett_ has joined #ocaml
cbarrett_ has quit [Changing host]
cbarrett_ has joined #ocaml
cbarrett_ is now known as cbarrett
cbarrett has quit [Client Quit]
cbarrett has joined #ocaml
noitakomentaja has joined #ocaml
moei has quit [Quit: Leaving...]
mal4 has joined #ocaml
mal4 has quit [Remote host closed the connection]
manas has joined #ocaml
shinnya has joined #ocaml
aidalgol has quit [Remote host closed the connection]
aidalgol has joined #ocaml
manas has quit [Remote host closed the connection]
orbifx has joined #ocaml
inr has quit [Quit: WeeChat 2.1]
manas has joined #ocaml
cjd has joined #ocaml
inr has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
cjd has quit [Client Quit]
ozzymcduff has joined #ocaml
moei has joined #ocaml
ben_ has joined #ocaml
webbyz has joined #ocaml
smondet[m]1 has quit [Remote host closed the connection]
caseypme[m] has quit [Remote host closed the connection]
dl3br[m] has quit [Remote host closed the connection]
ejpcmac has quit [Read error: Connection reset by peer]
Multiocracy[m] has quit [Remote host closed the connection]
isaachodes[m] has quit [Remote host closed the connection]
Orbifx[m] has quit [Remote host closed the connection]
yetanotherion[m] has quit [Remote host closed the connection]
sven[m] has quit [Remote host closed the connection]
spectrumgomas[m] has quit [Read error: Connection reset by peer]
copy[m] has quit [Remote host closed the connection]
flux[m] has quit [Remote host closed the connection]
Haudegen[m] has quit [Read error: Connection reset by peer]
HDurer[m] has quit [Remote host closed the connection]
drsmkl[m] has quit [Remote host closed the connection]
remix2000[m] has quit [Remote host closed the connection]
peddie[m] has quit [Remote host closed the connection]
bglm[m] has quit [Remote host closed the connection]
equalunique[m]1 has quit [Remote host closed the connection]
aspiwack[m] has quit [Read error: Connection reset by peer]
h11[m]1 has quit [Remote host closed the connection]
jimt[m] has quit [Remote host closed the connection]
srenatus[m] has quit [Remote host closed the connection]
rgr[m] has quit [Remote host closed the connection]
theaspiringhacke has quit [Read error: Connection reset by peer]
Bluddy[m] has quit [Read error: Connection reset by peer]
regnat[m] has quit [Remote host closed the connection]
Walter[m] has quit [Read error: Connection reset by peer]
hph^ has quit [Max SendQ exceeded]
webbyz has quit [Remote host closed the connection]
deed0239223 has joined #ocaml
hph^ has joined #ocaml
hph^ has quit [Max SendQ exceeded]
hph^ has joined #ocaml
hph^ has quit [Max SendQ exceeded]
ocabot_ has quit [Ping timeout: 259 seconds]
hph^ has joined #ocaml
hph^ has quit [Max SendQ exceeded]
pierpal has quit [Ping timeout: 260 seconds]
hph^ has joined #ocaml
hph^ has quit [Max SendQ exceeded]
hph^ has joined #ocaml
hph^ has quit [Max SendQ exceeded]
manas has quit [Remote host closed the connection]
manas has joined #ocaml
noitakomentaja has quit [Ping timeout: 250 seconds]
ocabot_ has joined #ocaml
deed0239223 has quit [Remote host closed the connection]
sven[m] has joined #ocaml
remix2000 has quit [Quit: WeeChat 2.2-dev]
manas has quit [Remote host closed the connection]
Haudegen has joined #ocaml
Multiocracy[m] has joined #ocaml
spectrumgomas[m] has joined #ocaml
remix2000[m] has joined #ocaml
smondet[m] has joined #ocaml
rgr[m] has joined #ocaml
aspiwack[m] has joined #ocaml
srenatus[m] has joined #ocaml
jimt[m] has joined #ocaml
drsmkl[m] has joined #ocaml
equalunique[m] has joined #ocaml
HDurer[m] has joined #ocaml
yetanotherion[m] has joined #ocaml
Orbifx[m] has joined #ocaml
ejpcmac has joined #ocaml
bglm[m] has joined #ocaml
peddie[m] has joined #ocaml
Haudegen[m] has joined #ocaml
isaachodes[m] has joined #ocaml
copy[m] has joined #ocaml
Walter[m] has joined #ocaml
h11[m] has joined #ocaml
regnat[m] has joined #ocaml
theaspiringhacke has joined #ocaml
caseypme[m] has joined #ocaml
dl3br[m] has joined #ocaml
Bluddy[m] has joined #ocaml
flux[m] has joined #ocaml
nemesys has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
nemesys has quit [Remote host closed the connection]
jrslepak24 has joined #ocaml
jrslepak24 has quit [Remote host closed the connection]
manas has joined #ocaml
BitPuffin has joined #ocaml
mengu has joined #ocaml
manas has quit [Remote host closed the connection]
manas has joined #ocaml
mengu_ has joined #ocaml
mengu__ has joined #ocaml
mengu has quit [Ping timeout: 255 seconds]
mengu_ has quit [Ping timeout: 265 seconds]
Boohbah10 has joined #ocaml
Boohbah10 has quit [Remote host closed the connection]
ChickeNES has joined #ocaml
verm1n24 has joined #ocaml
verm1n24 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
ChickeNES has quit [Remote host closed the connection]
manas has quit [Remote host closed the connection]
manas has joined #ocaml
manas has quit [Remote host closed the connection]
manas has joined #ocaml
manas has quit [Ping timeout: 268 seconds]
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
mfp has joined #ocaml
iZsh has quit [Quit: ZNC - http://znc.in]
iZsh has joined #ocaml
noitakomentaja has joined #ocaml
ThiefMaster6 has joined #ocaml
WizJin1 has joined #ocaml
ThiefMaster6 has quit [Ping timeout: 260 seconds]
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]
FreeBirdLjj has joined #ocaml
Haudegen has joined #ocaml
mengu has quit [Quit: Leaving...]
ozzymcduff has quit [Quit: Textual IRC Client: www.textualapp.com]
manas has joined #ocaml
manas has quit [Client Quit]
Fare has joined #ocaml
amar has joined #ocaml
amar has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
francisl has quit [Quit: francisl]
zhongfu5 has joined #ocaml
zhongfu5 has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
Guest7911 has joined #ocaml
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.
<discord> <anuragsoni.13> Something like: https://github.com/janestreet/base/blob/master/src/monad_intf.ml ?
<companion_cube> that doesn't seem very adapted to OCaml
<companion_cube> (I mean, how often do you use monads generically‽)
aidalgol has left #ocaml ["User left"]
<Fare> anuragsoni: yes!
<Fare> companion_cube, I use monads all the 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> what boilerplate?
<Fare> Things like map, for instance.
<bartholin> I admire people who use the identity monad to code in a monadic way https://github.com/johnelse/ocaml-irc-client/blob/master/src/unix/irc_client_unix.ml
<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?
<Fare> dromedary?
<bartholin> Is this idiomatic? https://ocaml.janestreet.com/ocaml-core/v0.9/doc/base/Base/Map/Using_comparator/index.html include Map_intf.Accessors3 with type (a, b, c) t := (a, b, c) t with type (a, b, c) tree := (a, b, c) Tree.t
<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.))]