adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
nullcatxxx_ has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
jabesed has joined #ocaml
al-damiri has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
miggsd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nomicflux has joined #ocaml
sh0t has quit [Remote host closed the connection]
jabesed has quit [Quit: Konversation terminated!]
spion has quit [Ping timeout: 245 seconds]
spion has joined #ocaml
<keep_learning> Hi everyone.
<keep_learning> but getting unbounded module error when evaluating the buffer using C-c C-b.
<keep_learning> I would like to use Ocaml for development in interactive mode, but most of the time I am stuck with unbounded module. I am wondering if you can suggest me some project manager for running Ocaml projects in interactive mode.
ryanartecona has quit [Quit: ryanartecona]
miggsd has joined #ocaml
jimt has quit [Ping timeout: 240 seconds]
<_y> keep_learning, i am not an emacs user, but ocaml people nowadays use a plugin called https://github.com/ocaml/merlin
<_y> not sure if it applies to that “interactive mode” (i assume this is an emacs thing)
<keep_learning> _y: I am using merlin, but my issue is I am not able to use batteries.
jimt has joined #ocaml
<_y> for merlin, libraries are to be specified in .merlin or loaded explicitly
<_y> hm but now i think, i doubt even more it is relevant for what you are doing, that is evaluating things, so nevermind
<keep_learning> _y: Thank you. I am wondering if using Oasis would make life easier for interactive development https://ocaml.org/learn/tutorials/compiling_ocaml_projects.html
struk|desk has quit [Ping timeout: 240 seconds]
<keep_learning> I am trying to convert Haskell code into Ocaml https://gist.github.com/mukeshtiwari/c3e508ec39b391013158cb60bb37607a
<keep_learning> I am stuck with "(A,3)" : string to (A, 3) : cand * int
<keep_learning> I am wondering about doing pattern matching on string, but is there any other way to do this.
miggsd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
miggsd has joined #ocaml
miggsd has quit [Client Quit]
foo30303 has quit [Ping timeout: 268 seconds]
tizoc has quit [Read error: Connection reset by peer]
foo30303 has joined #ocaml
miggsd has joined #ocaml
cbot has quit [Quit: Leaving]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tizoc has joined #ocaml
nomicflux has quit [Quit: nomicflux]
moei has quit [Quit: Leaving...]
al-damiri has quit [Quit: Connection closed for inactivity]
jack5638 has quit [Ping timeout: 260 seconds]
jack5638 has joined #ocaml
arquebus has joined #ocaml
arquebus has left #ocaml [#ocaml]
MercurialAlchemi has joined #ocaml
<keep_learning> Hi everyone
<keep_learning> Could some one please have a look at balfun in Haskell and Ocaml code.
<keep_learning> I am getting error in Ocaml code Fatal error: exception Match_failure("main.ml", 22, 14)
miggsd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryanartecona has joined #ocaml
<dinosaure> keep_learning: if I look the haskell code, the good translation is "let f = function A -> b1 | B -> b2 | C -> b3 | D -> b4 in f"
moei has joined #ocaml
<dinosaure> when you write "let f A = b1", you make a function to take an argument and try to destruct this argument in only one case (the A case). It's why OCaml said "the pattern matching is not exhaustive", because you miss B, C, and D.
<dinosaure> then you remake a __new__ function f (which replaces the old function "let f A = b1") and take an argument and only destruct with the B case
<dinosaure> and again, ocaml said, the pattern is not exhaustive
<dinosaure> so, yes, ocaml is not like haskell with a lazy construction ...
<keep_learning> dinosaure: Thank you.
zv has joined #ocaml
<keep_learning> I am trying to file process_input "example-votes.txt";;
<keep_learning> and I want to change ["(A,3)"; "(B,1)"; "(C,2)"; "(D,4)"] of type string list to [(A,3);(B,1);(C,2);(D,4)] (cand*int) list
<keep_learning> Any idea how to to do this ?
MercurialAlchemi has quit [Ping timeout: 240 seconds]
nullcatxxx_ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
cantstanya has joined #ocaml
MercurialAlchemi has joined #ocaml
xaimus has quit [Remote host closed the connection]
spew has quit [Quit: foobar]
<dinosaure> keep_learning: you have different ways to "deserialize" your input. You can handle this by the hand (and create your deserialization, Scanf can be a solution) or use a serialization/deserialization library (like sexp or yojson with ppx_deriving). The advantage of the last solution is that the serialization/deserialization is generated automatically (like in haskell when you use 'deriving Show') but the
<dinosaure> disadvantage is you are contraint to use the 'format" of this library (for sexp, it's s-expression, for yojson, is JSON)
<dinosaure> the disadvantage of the first solution is when you extand your 'cand' type, you need to modify your deserialization
ryanartecona has quit [Quit: ryanartecona]
<dinosaure> then, lot of documentation already exists about sexp and ppx_deriving_yojson
<dinosaure> may be the problem will be the compilation with ppx but it depends of what you use (ocamlbuild, jbuilder, make ...)
chobytes has joined #ocaml
<keep_learning> dinosaure: I have written lexer and parser for my file https://github.com/mukeshtiwari/formalized-voting/tree/master/SchulzeCounting/ocamlcode
<keep_learning> now I am getting between the following two productions:
<keep_learning> loption(separated_nonempty_list(NEWLINE,stmtline)) ->
<keep_learning> loption(separated_nonempty_list(SEMI,stmtone)) ->
<keep_learning> Warning: one reduce/reduce conflict was arbitrarily resolved.
xaimus has joined #ocaml
richi235 has joined #ocaml
<dinosaure> keep_learning: sorry but I don't have a time to look deeply what is going on :(
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
octachron has joined #ocaml
<octachron> keep_learning, your two productions conflicts on the empty word
<keep_learning> octachron: Thank you. I changed it and now it looks fine.
<keep_learning> Now I am looking for library function that reads the file and return all the content as string to invoke the lexer
<octachron> keep_learning, "Lexing.from_channel" does not work in your use case?
<keep_learning> octachron: Thank you.
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
Simn has joined #ocaml
richi235 has quit [Ping timeout: 268 seconds]
richi235 has joined #ocaml
mfp has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reynir1 has joined #ocaml
reynir1 has quit [Client Quit]
reynir has joined #ocaml
jabesed has joined #ocaml
reynir has quit [Client Quit]
reynir has joined #ocaml
freyr has joined #ocaml
<keep_learning> Hi everyone
<keep_learning> and let me know what is wrong with my thinking.
<keep_learning> So from prog, I am invoking separated_nonempty_list (NEWLINE, stmtone) EOF {ds};
<keep_learning> and stmtone is separated_nonempty_list (SEMI, stmt) {vs};
<keep_learning> and each stmt is LPAREN; s = CAND; COMMA; n = INT; RPAREN {(s, n)}
<keep_learning> I am getting Fatal error: exception Parser.Error
<keep_learning> Any hint would be great.
tane has joined #ocaml
chobytes has quit [Quit: sleep compy ZZZZzzzz]
freyr has quit [Quit: Lost terminal]
richi235 has quit [Ping timeout: 245 seconds]
richi235 has joined #ocaml
<octachron> keep_learning, "menhir --interpret" can be quite useful to check that your grammar is behaving as expected
<def`> keep_learning: you have newline followed by eof
<def`> which is invalid according to your grammar
<def`> (printing the tokens could help)
TheLemonMan has joined #ocaml
_whitelogger has joined #ocaml
<orbifx[m]> is Unison content addressable?
mengu has joined #ocaml
<orbitz> Hah, I realize I'm using 3 string modules in 1 module of code. String, StringLabels, and CCString.
<orbitz> I should probably do something about that.
<companion_cube> sorry for being a bit late for containers 1.2 :s
<orbitz> haha
<companion_cube> (in which string will most likely be included into CCString)
<orbitz> I geuss 1.2 will bring me down to 2 modules, CCString and CCStringLabels
<companion_cube> hmpf
<companion_cube> I don't have the labels version :/
<orbitz> What's annoying is teh stdlib has forgotten to include some functions in *Labels. IIRC, Bytes.blit is not in *Labels
<orbitz> companion_cube: :(
<orbitz> Basically I cannot use .sub or .blit without *Labels, too many parameters all wiht the same type
<companion_cube> too much work for little benefit :/
<companion_cube> really?
<companion_cube> I learnt that a wile ago
<companion_cube> while*
<orbitz> I can never remember which order the params are in
<companion_cube> also, merlin gives access to the doc
<orbitz> yeah but that doesn't help very much for code review
<companion_cube> :/
<orbitz> I'm one of those people, though, that thinks non-labeled parameters should be the special case.
<companion_cube> yes, but I cna't change that much the design of containers (nor of the stdlib)
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
rossberg has quit [Ping timeout: 240 seconds]
<mrvn> In python unlabeled arguments are used for labeled ones automatically. So you only need to use labels if you want arguments out of order.
<mrvn> But I guess that is incompatible with partial application and optional args.
mengu has quit [Quit: Leaving...]
rossberg has joined #ocaml
<Drup> that's also the case in OCaml
andreas__ has joined #ocaml
jabesed has quit [Ping timeout: 255 seconds]
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
rwmjones has quit [Read error: Connection reset by peer]
nomicflux has quit [Quit: nomicflux]
rwmjones has joined #ocaml
<Cheery> there's a thing that has bothered my mind after reading the mlsub a bit.
<Cheery> what does a good ML code look like?
<mrvn> beautiful
<Drup> I'm still not sure what's the beauty criterion for code is :p
<mrvn> that is one of the "I know it when I see it" questions.
<Drup> Cheery: also, as far as ML goes, there are several coding styles
<Drup> Cheery: is the mlsub code not nice ?
<Cheery> I think it violates a principle: how fast can you grok what's going on by reading the code.
<Cheery> I have gathered kind of language-independent ideas about this one.
<Drup> how so ?
<mrvn> what code are we talking about anyway?
<Cheery> mrvn: I was looking at this yesterday: https://github.com/stedolan/mlsub
<Drup> (tbf, mlsub is a prototype implementation of state-of-the-art research in type system, so ...)
<mrvn> just going by the amount of code I'm sure there is something bad in there. No way to not compromise sometimes. :)
<Cheery> one thing is that I'm not familiar with all the idioms and ideas of ML.
<octachron> Cheery, I am quite sceptical of language-independent ideas on code beauty
<Cheery> but I'm familiar with python and have noticed there's quite some things that matter a lot to other's ability to figure out what's going on.
<Cheery> or to your ability when you've done with it and return back to it after forgotten how it went.
<mrvn> python is a completly different idea than ml
<Cheery> one thing is that I pack quite lot into single files these days and order them such that the stuff above uses the stuff below.
<Drup> Well, you see, I find that particular idiom (present in many languages) absolutely horrible :p
<Cheery> so you get the top down idea of what's going on as you read from the start
<octachron> this kind of "langauge-independent" criteria is often abstracted from a specific taxon of programming languages in isolation of all other existing programming languages
<Drup> So, I'm tempted to say you are just used to the pythonic way, and OCaml code is not like python code
<Cheery> that could be.. but consider all the options through and you do yourself a favor.
<mrvn> Cheery: like "a = b if c"? I hate those backward control flows in perl and python.
<Cheery> mrvn: unfortunately that doesn't exist in python.. I also find the python's x if c else y annoying though.
<Cheery> but the kind of single line conditional guards such as expr if condition are nice.
<mrvn> Cheery: what's wrong with "if condition: expr"?
<thizanne> it's not an expression
spew has joined #ocaml
<Drup> thizanne: that's a language problem
<mrvn> right, pythons stupid separation of statement and expression.
<Cheery> oh it's an expression if you just look at it the right way. But the problem is that it's not linear.
<Cheery> the simplest program to read and reason abouet is a linear flow that starts and then goes through without loops or anything.
<thizanne> Drup: but that's « what's wrong » with if condition: expr and prevents you from using this order when you're in python
<Drup> thizanne: sure, but the question was really "why is "expr if condition" better
<Cheery> and the way how you've structured the if in that case matters, because it changes the layout of the code.
<Cheery> if the expr becomes long enough, then the traditional if is better.
<Drup> Cheery: you would like avionics code
tane has quit [Quit: Leaving]
<Cheery> one important thing about this is that your ability to handle things depend on what you've learned.
<Drup> (I feel that you also probably don't consult types when you read the code)
<Drup> (which is logical, if you have mostly wrote python)
<Drup> (you can get a quite good approximation of what a function will do just by the type)
<Cheery> and I do think that things that are unreadable to someone because he doesn't know some concept, should just learn the concepts. It's quite logical thing to do with say.. differential equations and vector arithmetic.
<Cheery> Drup: actually it's quite weird.
<Cheery> Drup: types sometimes tell surprising things.
<Cheery> but yeah. I usually read the code if I need to figure out what it does.
<Cheery> the problem I've had with trying to understand the mlsub source is that it does lot of jumps from place to another.
<Cheery> I've not entirely understood which parts are coming from the system and from the language because I'm not familiar with the language.
<Drup> that's a bit of a general thing with typecheckers
<Drup> typecheckers are basically a big nest of mutually recursive relations, there is no real way around that
<Cheery> Then there are places where the important ideas kind of vanish into the description and I got no clear idea of where it goes. Had to run a debugger to figure it out and it's still not clear what the code does.
<Drup> (additionally, we do like to use abstraction a lot in the OCaml community, so yeah, if you ignore signatures and always follow definitions, you don't get any benefits from carefully packaged modules)
<thizanne> Cheery: maybe you should just learn the concepts ;)
<Cheery> thizanne: I've triead to find the manual point where they are described.
<Cheery> it would help. :)
richi235 has quit [Ping timeout: 260 seconds]
<Cheery> for example that is one hell to figure out what it's doing specifically. I finally figured out that it just throws the state transitions into the another.
<Drup> that's ... not so complicated
<Drup> if you know what <- is, of course
<Cheery> one problem is that I was expecting it to remain as a deterministic finite state machine
<Cheery> when it at that point turns into nondeterministic because there will be more than one of each edge.
<Cheery> Drup: but it's still got a surprise in there.
<Cheery> Drup: ask yourself, why does it take the polarity in?
<Cheery> I suppose the join it referst to is this: https://github.com/stedolan/mlsub/blob/master/types.ml#L199
<Drup> no idea, I don't know the theory behind it :p
<Drup> reading that kind of code without knowing the theory is completely pointless
<Cheery> why?
<Drup> because it's a typechecker ....
<Cheery> what does it mean when you add two type definitions like that behind a colon?
<Cheery> Drup: it does not describe that way of constructing types..
<Drup> it does
richi235 has joined #ocaml
<Cheery> I finally found the manual and it appears to say that it's a type constructor
<Cheery> so something like list(int), a parametric type.
<octachron> Cheery, beware that "List<Int>" is written "int list" in MLs
<mrvn> not to be confused with List(Int)
<Cheery> that explains why it goes into that group of functions https://github.com/stedolan/mlsub/blob/master/types.ml#L16
jabesed has joined #ocaml
<Cheery> it has something in the thesis written about this.
<Cheery> the type components specifically
sh0t has joined #ocaml
<Cheery> "We define two operations te and ue on sets of head constructors. Both of
<Cheery> these are simply set union, with the invariant of at most one record type
<Cheery> maintained by reducing"
<Cheery> okay. so the both operations are union
<Cheery> but they do intersection/union on type heads that are available on both.
<Cheery> checked the notation. Yeah. when negative, take union. when positive, intersect.
NaCl has joined #ocaml
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has left #ocaml [#ocaml]
<Cheery> consistent with the polarity of types.
jabesed has quit [Ping timeout: 260 seconds]
<Cheery> Drup: that work is quite brilliant.
<Cheery> the transform it makes, makes it easier to understand.
<Cheery> but you got to convert the types back because they become hard to read in type automaton.
<Cheery> the work leaves me wondering what the unification algorithm would be in a type automaton.
richi235 has quit [Ping timeout: 252 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
richi235 has joined #ocaml
<Cheery> seems cool. I've already written the NFA -> DFA step.
solidsalvia has joined #ocaml
rom1504 has joined #ocaml
ryanartecona has joined #ocaml
<mrvn> Cheery: I would think that unification would build the intersection of states in the NFA
al-damiri has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
jnavila has joined #ocaml
copy` has joined #ocaml
MercurialAlchemi has joined #ocaml
freechips has joined #ocaml
shinnya has joined #ocaml
spew has quit [Ping timeout: 252 seconds]
richi235 has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
foo30303 has quit [Ping timeout: 258 seconds]
foo30303 has joined #ocaml
foo30303 has quit [Client Quit]
spew has joined #ocaml
srcerer_ has joined #ocaml
<companion_cube> containers 1.2 on its way!
freechips has quit [Quit: WeeChat 1.7]
mcfiredr1ll has joined #ocaml
gallais_ has joined #ocaml
m4farrel_ has joined #ocaml
k1000_ has joined #ocaml
<reynir> \o/
jnavila has quit [*.net *.split]
hashpuppy has quit [*.net *.split]
srcerer has quit [*.net *.split]
gallais has quit [*.net *.split]
k1000 has quit [*.net *.split]
igitoor has quit [*.net *.split]
gjaldon__ has quit [*.net *.split]
twold has quit [*.net *.split]
mehdib has quit [*.net *.split]
m4farrel has quit [*.net *.split]
mcfiredrill has quit [*.net *.split]
hashpuppy has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
maarhart has joined #ocaml
twold has joined #ocaml
maarhart has quit [Client Quit]
gjaldon__ has joined #ocaml
nullcatxxx_ has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
eh_eff has joined #ocaml
jao has joined #ocaml
MercurialAlchemi has joined #ocaml
spew has joined #ocaml
ryanartecona has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
igitoor has joined #ocaml
mehdib has joined #ocaml
jao has joined #ocaml
igitoor has quit [Changing host]
igitoor has joined #ocaml
AlexDenisov has joined #ocaml
<orbifx[m]> :) companion_cube
leah2 has quit [Quit: trotz alledem!]
leah2 has joined #ocaml
tobiasBora has quit [Ping timeout: 245 seconds]
Fistine has quit [Ping timeout: 260 seconds]
_y has quit [Ping timeout: 260 seconds]
tobiasBora has joined #ocaml
nomicflux has joined #ocaml
_y has joined #ocaml
Fistine has joined #ocaml
octachron has quit [Quit: Leaving]
nomicflux has quit [Ping timeout: 260 seconds]
madroach has joined #ocaml
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al-damiri has quit [Quit: Connection closed for inactivity]
mengu has joined #ocaml
alphor has quit [Quit: Bye!]
eh_eff has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
richi235 has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
richi235 has quit [Ping timeout: 276 seconds]
richi235 has joined #ocaml
larhat has joined #ocaml
kakadu has joined #ocaml
kakadu has quit [Client Quit]
nullcatxxx_ has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larhat has quit [Quit: Leaving.]
|jbrown| has quit [Ping timeout: 240 seconds]
eh_eff has joined #ocaml
richi235 has quit [Ping timeout: 276 seconds]
SpiceGuid has joined #ocaml
SpiceGuid has quit [Client Quit]
nullcatxxx_ has joined #ocaml
|jbrown| has joined #ocaml
richi235 has joined #ocaml
solidsalvia has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ocaml
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
AlexDenisov has joined #ocaml
miggsd has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larhat has joined #ocaml
al-damiri has joined #ocaml
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
miggsd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larhat has quit [Quit: Leaving.]
mengu has quit [Quit: Leaving...]
Simn has quit [Quit: Leaving]
ryanartecona has quit [Quit: ryanartecona]
<orbifx[m]> is there a way to put all fields of a record in the scope?
<copy`> orbifx[m]: I don't you can without opening the module
<orbifx[m]> how would opening the module help?
<copy`> Then the record fields are in scope (if the record is defined in the module)
Muzer has quit [Ping timeout: 260 seconds]
<mrvn> orbifx[m]: record.{ ... }?
<mrvn> M.( ... ) exists too
<orbifx[m]> So records behave like modules if used like record.{ .. } ?
<orbifx[m]> I was aware of the M.( .. ) expression.
AlexDenisov has joined #ocaml
tobiasBora has quit [Ping timeout: 246 seconds]
<madroach> You can do M.{ }, too. It is usually recommended to put each record type in a separate module.
Fistine has quit [Ping timeout: 276 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<orbifx[m]> Yes, bit would that let me do something like: record.{ print_string name }
tobiasBora has joined #ocaml
<orbifx[m]> where name is a field of record
mfp has quit [Ping timeout: 268 seconds]
Fistine has joined #ocaml
<orbifx[m]> that's what I mean by putting the field name in the scope; I wish to eliminate repetition of the using identifiers on a record's value.
<Drup> orbifx[m]: if I understand what you want, it's just deconstruction: let { foo ; bar } = r in ...
sz0 has joined #ocaml
<orbifx[m]> ow, cool, yeah that would work Drup
<Drup> ("putting fields in scope" is an extremly misleading way to phrase that)
<orbifx[m]> All that came to mind.. how would you put it?
<Drup> well, deconstructing :)
<orbifx[m]> Also can that deconstruction be partial (only take some of the fields) ?
<Drup> yes
<Drup> just omit fields
<orbifx[m]> never though of it as deconstructing. Takes some time to realise what is special and what isn't ^^
<orbifx[m]> that helps though, thanks :D
<Drup> the thing is that "putting fields in scope" usually refer to the fields as function operating on a type, not as the values that are the field of a specific record
<Drup> (hence all the answers about modules ...)
jmiven has quit [Quit: WeeChat 1.7.1]
jmiven has joined #ocaml
Muzer has joined #ocaml
<orbifx[m]> "fields as function operating on type" ?
<Drup> ".foo"
sh0t has quit [Remote host closed the connection]
average has quit [Quit: leaving]
<orbifx[m]> I though identifiers were not functions?
<orbifx[m]> Which brings to something else I need validation. I've been presuming that record identifiers are lost after compilation, which is why they can't be stored as values. Is that correct?
<Drup> yes
<orbifx[m]> Is the ultimate cost of doing `v.foo` the same as `let foo v = v.foo in foo v` ?
<orbifx[m]> or does one incur a function call, where as the other doesn't?
<Drup> it's pretty much the same
<copy`> It does incur a function call, which will likely be inlined
<Drup> huh, no.
<Drup> there are no functions
<orbifx[m]> any final takers? :P
average has joined #ocaml
<orbifx[m]> Anyway, thanks Drup :)
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has joined #ocaml
infinity0 has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
infinity0 has quit [Remote host closed the connection]