cbot has quit [Read error: Connection reset by peer]
cbot has joined #ocaml
mnemem has quit [Read error: Connection reset by peer]
mnemem has joined #ocaml
Algebr` has quit [Ping timeout: 260 seconds]
iZsh has quit [Ping timeout: 240 seconds]
iZsh has joined #ocaml
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 252 seconds]
pierpa has quit [Quit: Page closed]
jbrown has quit [Ping timeout: 240 seconds]
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
lgd has quit [Ping timeout: 255 seconds]
enterprisey has quit [Ping timeout: 240 seconds]
enterprisey has joined #ocaml
lgd has joined #ocaml
zozozo has quit [Ping timeout: 246 seconds]
richi235 has quit [Ping timeout: 240 seconds]
richi235 has joined #ocaml
cbot_ has quit [Read error: Connection reset by peer]
cbot_ has joined #ocaml
snahor has joined #ocaml
xuanrui has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
Algebr` has joined #ocaml
samrat has joined #ocaml
kerrhau has quit [Ping timeout: 240 seconds]
lgd has quit [Remote host closed the connection]
lgd_ has joined #ocaml
nicooo has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
Algebr` has quit [Ping timeout: 252 seconds]
frefity has quit [Ping timeout: 258 seconds]
MercurialAlchemi has joined #ocaml
mbuf has joined #ocaml
cbot_ has quit [Quit: Leaving]
Algebr` has joined #ocaml
infinity0_ has joined #ocaml
infinity0 is now known as Guest76440
infinity0 has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ is now known as infinity0
Guest76440 has quit [Killed (sinisalo.freenode.net (Nickname regained by services))]
Algebr` has quit [Ping timeout: 264 seconds]
presiden has quit [Remote host closed the connection]
bombastus has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 248 seconds]
enterprisey has quit [Ping timeout: 260 seconds]
dhil has joined #ocaml
govg_ has joined #ocaml
govg has quit [Ping timeout: 255 seconds]
enterprisey has joined #ocaml
mnemem has quit [Ping timeout: 258 seconds]
ziyourenxiang has joined #ocaml
frefity has joined #ocaml
grr12314 has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
fraya has joined #ocaml
freyr has joined #ocaml
argent_smith has joined #ocaml
<grr12314>
yo
mnemem has joined #ocaml
<grr12314>
why is the tryocaml thing not printing the things you tell it to print?
<freyr>
grr12314: it prints in js console
<grr12314>
ah lol thats odd
<grr12314>
but better than nothing, ok
<grr12314>
why are there different types of "unit" results?
<grr12314>
i.e. just print_int 42 gives me unit=unknown constructor
<grr12314>
but List.iter print_int [ 1; 2; 3; 4 ] gives unit = ()
<freyr>
that's nothing but js_of_ocaml toplevel actually, so this behaviour is expected
AltGr has joined #ocaml
<freyr>
Well, I'm not sure, but it seems like some jsoo stuff to, since print_int 42; print_newline ();; returns (). jsoo does not print til endline
<grr12314>
there can't be a zero-argument function? you have to fake it with take one empty tuple?
<reynir>
grr12314: that's a bit odd, it should be () in both cases
<reynir>
I assume it's a bug in Try OCaml
<grr12314>
when the tryocaml tutorial says "the compiler will warn if..." it doesn't actually seem to warn anything :/
<grr12314>
i.e. lesson 4 step 5
<grr12314>
i.e. lesson 4 step 6*
<reynir>
grr12314: it seems to send the warning to the javascript console -.-
<flux>
grr12314, correct, a function by definiton takes an argument
mnemem has quit [Ping timeout: 240 seconds]
grr12314 has quit [Ping timeout: 260 seconds]
mnemem has joined #ocaml
nicooo has quit [Ping timeout: 248 seconds]
nicooo has joined #ocaml
rossberg has quit [Ping timeout: 264 seconds]
enterprisey has quit [Read error: Connection reset by peer]
rossberg has joined #ocaml
fraya_ has joined #ocaml
<orbifx[m]>
Does Caml (instead of OCaml) offer any benefits for those not wanting to use the object layer?
mfp has joined #ocaml
<flux>
yes. OCaml is much more advanced in most all parts. except currying constructors.
<freyr>
caml is dead. The only thing I miss from caml is constructors being proper functions
shinnya has joined #ocaml
<freyr>
map Some is much more convenient than map (fun x -> Some x)
<freyr>
btw you can benefit from objects even without descending into OOP. You can think of objects as of polymorphic records
<flux>
objects are quite nice & cool in ocaml. but they are an advanced concept, whereas in some other languages they are the first concept.
<flux>
and they haven't received as much love as some other faetures in ocaml :(
<orbifx[m]>
I would have liked constructors as functions too. Has it been sacrificed to cater objects? I get that objects can be good without object orientation and it's not all bad.
<freyr>
afaik some core developers just considered such constructors useless :( no sacrifices
<flux>
not useless but not worth the code complexity
<flux>
I don't think it has anything to do with objects
<flux>
if someone(tm) makes a decent patch solving the problem that arise and has little impact on maintainability, perhaps it would be considered.
mk9 has joined #ocaml
mk9 has quit [Client Quit]
fraya_ has quit [Quit: Leaving]
jonasen has joined #ocaml
snahor has quit [Ping timeout: 248 seconds]
fraya has quit [Quit: Leaving]
fraya has joined #ocaml
kakadu_ has joined #ocaml
dhil has joined #ocaml
TheLemonMan has joined #ocaml
clog has quit [Ping timeout: 260 seconds]
clog has joined #ocaml
lgd__ has joined #ocaml
lgd_ has quit [Ping timeout: 255 seconds]
mnemem has quit [Ping timeout: 248 seconds]
dejanr has quit [Ping timeout: 246 seconds]
dejanr has joined #ocaml
<orbifx[m]>
Thanks :)
johnelse has quit [Ping timeout: 246 seconds]
johnelse has joined #ocaml
johnelse has quit [Read error: Connection reset by peer]
<Denommus>
the author explained me why he's not using structs instead of named parameters, and the explanation makes sense, so I'm thinking whether I can abstract that in some other way
mbuf has quit [Quit: Leaving]
mk9 has joined #ocaml
<def`>
Denommus: hmm. It is still not clear.
<def`>
Can you write a pastebin/gist with an ideal syntax that expresses what you want?
<Denommus>
def`: it's the last Reason snippet in that issue. But instead of using `let make_ (props: C.props)`, I want `props` to be a collection of named parameters somehow
<Denommus>
I bet it's not possible, but it's worth a shot
<def`>
type 'a props = ?opt1:t -> ?opt2:u -> 'a
<reynir>
def`: I think what they mean is a functor F that given e.g. A might return something sig val make : a:int -> int end and given B return e.g. sig val make : b:int -> int end, etc
<Denommus>
def`: but that would be a function
shinnya has quit [Ping timeout: 248 seconds]
<Denommus>
so the final signature, in your example, would be make_ : (?opt1:t -> ?opt2:u -> 'a) -> whatever
<def`>
no
<def`>
the final signature would be make_ : ?opt1:t -> ?opt2:y -> whatever
<def`>
because : val make_ : my_type C.props
<def`>
You make C.props a type function that happens the named paramters.
<def`>
type 'a props = 'a -- the identity, no parameters added.
<def`>
type 'a props = 'a C2.props C1.props -- composition, add the paramters of C2 to the parameters of C1, etc
<def`>
appends*, not happens. Sorry I am tired >_<
<def`>
(the question then might be "how to implement make_?", you need to add a function in C that lifts the named parameters in a state)
<def`>
(that's not clear, let me write an example)
<Denommus>
def`: I can see what you're proposing, but that would effectively make C more complex than just writing the module as the first snippet
<Denommus>
LENSES
<Denommus>
the solution is lenses!
<def`>
Denommus: I don't think my solution is much more complex
aciniglio has joined #ocaml
<Denommus>
def`: can you show how FooComponent would look like in your proposal?
<def`>
it is a bit more verbose, but just because it separates some concerns that where conflated (the fact that parameters passed to the make function are not the same as the final state, and that some arbitrary computation might turn the former into the later)
sh0t has joined #ocaml
ocaml411 has joined #ocaml
shiyaz has joined #ocaml
<Denommus>
def`: I see it now. Indeed it's not much complex, but in any case it doesn't save the user from much apparent duplication
mk9 has quit [Quit: mk9]
<Denommus>
it will just replace the need of a make by the need of a lift
<ocaml411>
Can anyone clarify (beyond the instructions on the Ocsigen web site) how to use the <authbasic> tag in Ocsigen conf.in file? Where exactly does it belong. What "actions" is it supposed to surround or precede?
<def`>
Denommus: well, you can provide a default lift that just passes an existing state
<Denommus>
def`: I thought of a new solution that involves a change in ReasonReact: ReasonML supports a syntax for replacing fields in a struct like the following: {...structName, field1: value1, field2: value2}
<def`>
(though I agree that it doesn't save much, but at the same time it makes the whole system more composable, ... it depends on the final use indeed)
<Denommus>
def`: so a component could, instead, provide a defaultValue for the props, and the JSX <Foo prop1=value1 /> would transform into Foo.make {...Foo.default, prop1: value1}
<Denommus>
(etc)
snahor has joined #ocaml
ygrek_ has joined #ocaml
Algebr` has joined #ocaml
xuanrui has quit [Ping timeout: 240 seconds]
Algebr` has quit [Ping timeout: 246 seconds]
xuanrui has joined #ocaml
andreas__ has quit [Quit: Connection closed for inactivity]
mbuf has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
al-damiri has joined #ocaml
Associat0r has quit [Ping timeout: 240 seconds]
mk9 has quit [Ping timeout: 248 seconds]
sepp2k has quit [Quit: Leaving.]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
silver has joined #ocaml
freyr has quit [Remote host closed the connection]