FreeBirdLjj has quit [Remote host closed the connection]
<aggelos_>
def`: hmm ok
<aggelos_>
def`: doesn't sound too encouraging, tbh
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dsheets has quit [Remote host closed the connection]
sdothum has joined #ocaml
<companion_cube>
o/ pippijn
<companion_cube>
gasche doesn't come here often, probably because he tries to work :p
dsheets has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dsheets has quit [Remote host closed the connection]
AltGr has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
copy` has joined #ocaml
troydm has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
sepp2k has joined #ocaml
<Leonidas>
companion_cube: I guess once Reason adopts an interator, that's what we'll be using in OCaml land
<companion_cube>
if it's Core's iterator, there's little chance batteries or containers adopts it
<Leonidas>
kinda like JSC pushed the error monad into the distribution
<companion_cube>
unless its definition is migrated into the stdlib
<Leonidas>
yes, exactly what I think would happen
<zozozo>
companion_cube: what's Core's iterator ?
<pippijn>
companion_cube: work? preposterous!
<pippijn>
nothing is more important than idling and chatting on IRC
<companion_cube>
zozozo: Core.Sequence, look at the definition
<Drup>
Leonidas: jsc didn't push the error monad into the distribution, it was already adopted by all the standard library *and* bunzli ...
<companion_cube>
in several isomorphic definitions, yeah
<companion_cube>
which is not the case for iterators
<companion_cube>
:/
<Drup>
yes
<Leonidas>
didn't the JSC definition "win out" at the end?
<Drup>
No
<Drup>
everyone had the same ...
<companion_cube>
well, batteries' definition was not used, indeed
<companion_cube>
but they were all isomoprhic, it was just a matter of naming the constructors
<Drup>
and Ok/Error was more common than Ok/Bad, iirc
<companion_cube>
yeah
<companion_cube>
`Ok | `Error, also
<dario2>
Hey Drup! In Eliom6, Eliom_registration.Html.register_post_coservice et al are gone. Are they all subsumed by Eliom_registration.Html.create/register?
<Leonidas>
companion_cube: so sequence expressions are basically like Haskells List Comprehensions?
<companion_cube>
in F#? yeah, seems so
<companion_cube>
it's cool but not indispensable, thanks to |>
<dario2>
The change to structural/physical equality operators is just a disaster waiting to happen.
<pippijn>
somehow I rarely find myself using list comprehensions in haskell
<pippijn>
much more in python actually
<Drup>
dario2: I totally agree
<Drup>
I have been saying that since I saw it
<Leonidas>
pippijn: I kinda prefer them in Haskell because they nest better. in python the way they nest is kinda weird
<pippijn>
that's true, but I still don't use them as much in haskell
<Drup>
pippijn: probably because you don't need them
<companion_cube>
I wish there was a syntax with the bare minimum of changes compared to the standard syntax
<pippijn>
Drup: indeed
<Drup>
companion_cube: the revised syntax :3
<companion_cube>
no
<companion_cube>
I said the minimal amount of changes
<Drup>
</troll>
<companion_cube>
not their crazy list notation
<companion_cube>
and afaik, the revised syntax doesn't handle recent aspects of the language like labels or GADTs... does it?
<Drup>
I doubt it does
<dario2>
Moral of the story: if you want to change a language's syntax, it's not enough for the new one to be marginally better than the old.
<dario2>
Does someone actually use the revised syntax?
<companion_cube>
I'm not sure the revised syntax is "better" than the vanilla one
<dario2>
I never really got into the revised syntax.
FreeBird_ has joined #ocaml
<dario2>
My point about changes pertained to Reason: it may be better in some aspects, but that's not enough to convince me to switch.
<Drup>
dario2: you are not the target
<dario2>
Besides, I actually like OCaml's good old syntax
<dario2>
Drup: Yeah, I realise that.
<Drup>
but regardless of changes in syntax
<Drup>
the (in)equality operator changes are ... really not a good idea
<dario2>
Drup: Yeah, that change was just a brain fart of the Reason team.
<dario2>
Why, oh why?!
<Drup>
dario2: to copy javascript's operators
<dario2>
Yes, but it's not like Javascript is a paragon of virtue when it comes to the equality operators...
FreeBirdLjj has quit [Ping timeout: 276 seconds]
<dario2>
In fact it may be the most messed up language out there in that regard...
FreeBird_ has quit [Remote host closed the connection]
<Drup>
that's not the point, it's to copy the syntax
<Drup>
but anyway, it's a bad idea to mess with symbol tables
<Drup>
it's just asking for disasters
<dario2>
And it makes Reason code harder to read for OCaml folks and vice-versa.
<zozozo>
there's an obvious solution: do not use equality in programs, ever, :p
<companion_cube>
heh
<companion_cube>
it's not that far from what I do, actually
<zozozo>
^^
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pierpa has joined #ocaml
sgnb has joined #ocaml
<tautologico>
ocaml programmers are not the target demographic for reason :)
rgrinberg has joined #ocaml
Denommus has joined #ocaml
sh0t has joined #ocaml
Tatsh has left #ocaml ["Do whatever you like"]
<dario2>
Are there any hard facts regarding Reason's uptake? I can see only three questions tagged "reason" on StackOverflow, for instance.
<flux>
if anything, they should have chosen := for the assingment operator ;)
sh0t has quit [Remote host closed the connection]
Ravana has quit [Quit: Goodbye for now!]
jonasen has joined #ocaml
Ravana has joined #ocaml
sh0t has joined #ocaml
<dario2>
flux: Pascal FTW!
<flux>
yeah!
<flux>
also didn't vhdl have that. probably modula3 as well. ada?
<dario2>
IIRC, the Modula* languages were designed by Niklaus Wirth, the guy also behind Pascal.
<dario2>
Therefore, not surprising that the assignment operator would be the same.
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
unbalancedparen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
dario2 has quit [Quit: Konversation terminated!]
<sh0t>
guys how do I start the gnome audio applet on another window manager?
<sh0t>
what's the command for it?
<sh0t>
i installed indicator-sound but i cannot run it
wiredsister has joined #ocaml
wiredsister has quit [Client Quit]
wiredsister has joined #ocaml
wiredsister has quit [Client Quit]
wiredsister has joined #ocaml
<flux>
might be you're in the wrong channel.. :)
<orbifx>
this channel is explicit for camel rearing
two_wheels has joined #ocaml
struk|work has joined #ocaml
kushal has joined #ocaml
kolko has quit [Ping timeout: 276 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
connorjacobsen has joined #ocaml
ril has joined #ocaml
cross has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
dexterph has quit [Ping timeout: 276 seconds]
<struk|work>
hello ocamlers..happy monday :)
<companion_cube>
hi struk|work
Kakadu has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 240 seconds]
ril is now known as ril[away]
xitrium has joined #ocaml
buddyholly has quit [Ping timeout: 246 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sh0t>
hi guys can some one tell me why the first version doesn't do what I want? while the second does? what i don't undersatnd is why do i need a when clause in that pattern match
xitrium has quit [Remote host closed the connection]
dsheets has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
dsheets has joined #ocaml
buddyholly has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
<def`>
sh0t: you woud like pattern matching to also compute equality
connorjacobsen has quit [Ping timeout: 240 seconds]
<def`>
in OCaml, pattern matching will only bind value to fresh names, so you are just shadowing x
Denommus has quit [Ping timeout: 264 seconds]
<sh0t>
oh def` ok thanks
<sh0t>
so pattern mathcing a) doesn't compute equality and b= pattern matching only binds fresh names.
<def`>
yes
<def`>
(one justification is that there is not a single valid notion of equality, it would be a bit arbitrary to stick to a specific one)
AltGr has left #ocaml [#ocaml]
slash^ has joined #ocaml
AltGr has joined #ocaml
<sh0t>
yes def` I understand. Is this 'issue' of equality related to the fact that we functions are values as well? If we had only "simple" values then equality would be easier to define?
<def`>
sh0t: it is a bit deeper.
<def`>
If you consider syntactic equality (values made from the same constructor are equals)
<def`>
then yes it is easy to define, but you have to stick to pure values.
<sh0t>
that would make C(4) = C(5)
<def`>
And recursively*
<sh0t>
for C a constructor
<sh0t>
?
<sh0t>
ah ok
<def`>
C x = C y iff x = y
<sh0t>
sorry if this is a stupid question but integers in ocaml are implemented with constructors?
<def`>
No they are not
<sh0t>
ok
<def`>
But they could.
<sh0t>
why isn't this kind of structural equality a good choice?
<def`>
The problem is if you consider mutations.
<def`>
Are values that were equal but could change still equal?
<sh0t>
i see
<def`>
And values that can have a coarser grained notion of equality (not algebraic ones)
<def`>
E.g an abstract set
<def`>
You can consider two sets to be equal if they have the exact same representation, but if you represent them with, e.g. binary search tree, you can have multiple balancing that represents the same set.
<def`>
So the definition of equality depends on what you are looking at :).
<sh0t>
i see intuition would tell me that i shoudl consider equal to set only if the have the same elements...but i see how representation might be important
<sh0t>
*two
<sh0t>
sets
ncthom91 has joined #ocaml
<sh0t>
ok def` thanks
<def`>
You are welcome :)
<def`>
(And then you can generalize to other features: lazy values, infinite values, functions, more complex features of the type system, ...)
circ-user-vkmXT has joined #ocaml
sgnb has quit [Remote host closed the connection]
al-damiri has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jonasen has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
dsheets has quit []
shinnya has joined #ocaml
orbifx has quit [Ping timeout: 260 seconds]
orbifx-m2 has joined #ocaml
xitrium has joined #ocaml
orbifx-m has quit [Ping timeout: 250 seconds]
tane has quit [Quit: Verlassend]
connorjacobsen has joined #ocaml
orbifx-m2 has quit [Read error: Connection reset by peer]
sh0t has quit [Remote host closed the connection]
tane has joined #ocaml
rgrinberg has joined #ocaml
sh0t has joined #ocaml
connorjacobsen has quit [Ping timeout: 244 seconds]
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
<pitastrudl>
could anyone show me a piece of ocaml code and how it's nice to do comments so it looks nice
<pitastrudl>
i feel like im not really commenting it very good
<pitastrudl>
becuase the comments look like they mix in with the code too much
<pitastrudl>
¯\(°_o)/¯
orbifx-m has joined #ocaml
Algebr has joined #ocaml
orbifx-m has quit [Ping timeout: 246 seconds]
connorjacobsen has joined #ocaml
tane has quit [Ping timeout: 264 seconds]
seangrove has joined #ocaml
orbifx-m has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
maurer has joined #ocaml
<maurer>
So, I'm trying to upgrade a library I'm using, and the new one depends on ppx_jane
<maurer>
ppx_jane uses js_build_tools, which overrides the default oasis install behavior to use opam-install
<maurer>
However, opam-install does not function correctly on my machine (and has not for years)
<maurer>
Any ideas on what I should do to try to get packages using js_build_tools to install the old way?
tane has joined #ocaml
<Drup>
pitastrudl: I'm not sure I understand your question
kolko has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
<pitastrudl>
Drup: comments in the code, best practices on how to format them, etc
<pitastrudl>
if there are any hints or tips, ill take them
<companion_cube>
hmm, just write the comment above the piece of code to comment? same indentation level
sternenseemann has quit [Quit: Changing server]
<pitastrudl>
yeah
Kakadu has quit [Quit: Page closed]
<def`>
actually, I often find me in the same situation as pitastrudl: I feel OCaml comments are good for disabling pieces of code, not putting textual information
<pitastrudl>
i feel like they blend too much with the code
<companion_cube>
what would work better for you?
<pitastrudl>
or maybe i just need a better color highlighting syntax
<pitastrudl>
using eclipse atm
<Algebr>
spacegray theme and solarized-dark are pretty good themes in emacs
<def`>
for me syntax highlighting helps a bit, single line comment would be better
<def`>
and a few other (OCaml and related, though I think they are teaching Haskell this year)
<pitastrudl>
i see
<pitastrudl>
def`: also im using an object becuase afaik, it's an object oriented assigment
<pitastrudl>
at the start we had to define a type and what type of tree it is and then we did it with defining a class
<def`>
argh, ok
connorjacobsen has quit [Remote host closed the connection]
buddyholly has quit [Ping timeout: 244 seconds]
tane has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
<cr4ven>
Hi guys: Any idea why merlin (embedded in vim) would give the error "Failed to load some packages: 'ounit'" when I open a .ml file? I have 'PKG ounit' in my .merlin file, which is why it is trying to load it. This works fine on my OS X install, but I get the error on Linux. Same version of merlin (2.3.1), same version of ounit (2.0.0).
<companion_cube>
it's oUnit, iirc
<cr4ven>
er ... nvm, just tried 'PKG oUnit' and it works.
<cr4ven>
yup
<companion_cube>
so tricky
<reynir>
heh
<cr4ven>
I wonder why it doesn't fail on OS X. Presumably something to do with its agnosticism towards cases in directory names ...
<cr4ven>
Computers are hard :P
<wiredsister>
not case sensitive maybe
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
TheLemonMan has joined #ocaml
TheLemonMan has quit [Client Quit]
TheLemonMan has joined #ocaml
tane has joined #ocaml
connorjacobsen has joined #ocaml
TheLemonMan has quit [Client Quit]
buddyholly has joined #ocaml
TheLemonMan has joined #ocaml
MercurialAlchemi has joined #ocaml
ncthom91 has joined #ocaml
scarygelatin has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
buddyholly has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
scarygelatin has quit [Quit: Leaving]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
<pitastrudl>
atlest in ocaml you dont have to specify single/multi comments, and just go to a newline when you want a multiline one
<pitastrudl>
so atlest that's one good trait of the comment system it has
<Drup>
pitastrudl: and you can nest comments
<pitastrudl>
or well, atlest that's what the IDE i have has
<pitastrudl>
nest comments?
<pitastrudl>
what
buddyholly has joined #ocaml
<pitastrudl>
(* comment (*2nd comemnd*)*) ?
<Drup>
yes
<pitastrudl>
what good is that for
<Drup>
if you have a piece of code with comments, you can comment it, and it's fine
<Drup>
(it's not the case in C
<Drup>
)
<pitastrudl>
hm
<pitastrudl>
im not sure if i understand
<pitastrudl>
(its late and i've been doing ocaml all day x_x)
<def`>
if you comment code containing other comments
<def`>
it works in OCaml and fails in C
<pitastrudl>
oh ok
<pitastrudl>
nice
<Algebr>
caml all the time
<def`>
I am not convinced that's an advantage, but why not...
<pitastrudl>
¯\_(ツ)_/¯
tane has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
marsam has joined #ocaml
ygrek_ has joined #ocaml
orbifx has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tane has quit [Ping timeout: 260 seconds]
rand__ has quit [Quit: leaving]
tane has joined #ocaml
seangrove has joined #ocaml
tane has quit [Quit: Verlassend]
rgrinberg has quit [Ping timeout: 244 seconds]
kushal has quit [Quit: Leaving]
EnergeticLube is now known as cat5e
ocaml885 has joined #ocaml
<ocaml885>
I want to write a functor that accepts a module to avoid copy pasting lots of code but I have a snag: ppx_deriving_yojson accepts [@key 'somekeystring'] and it appears at compile time it must be a hard-coded string. I need to have one common struct but one field needs to have a different key as I functorize. Is this possible? Workarounds?