al-damiri has quit [Quit: Connection closed for inactivity]
Fare has quit [Ping timeout: 276 seconds]
ygrek has quit [Ping timeout: 240 seconds]
kvda has joined #ocaml
MercurialAlchemi has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
Rosslaew has joined #ocaml
tarptaeya has joined #ocaml
mbuf has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kleimkuhler has quit [Quit: kleimkuhler]
ozzymcduff has joined #ocaml
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kalio has quit [Ping timeout: 260 seconds]
kalio has joined #ocaml
ia0 has quit [Ping timeout: 256 seconds]
jaar_ has joined #ocaml
pierpal has joined #ocaml
ozzymcduff has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 265 seconds]
steenuil has joined #ocaml
mbuf has quit [Remote host closed the connection]
mbuf has joined #ocaml
groovy2shoes has quit [Ping timeout: 276 seconds]
groovy2shoes has joined #ocaml
ia0 has joined #ocaml
ozzymcduff has joined #ocaml
dhil has joined #ocaml
Guest92079 has joined #ocaml
jaar_ has quit [Ping timeout: 256 seconds]
dakk has joined #ocaml
Guest92079 is now known as Haudegen
argent_smith has joined #ocaml
Bronsa has joined #ocaml
ziyourenxiang has joined #ocaml
troydm has quit [Ping timeout: 276 seconds]
zolk3ri has joined #ocaml
mfp has joined #ocaml
dhil has quit [Ping timeout: 265 seconds]
Rosslaew_ has joined #ocaml
Rosslaew has quit [Ping timeout: 276 seconds]
jaar_ has joined #ocaml
Rosslaew_ has quit [Remote host closed the connection]
Rosslaew_ has joined #ocaml
kakadu has joined #ocaml
freyr has joined #ocaml
Haudegen has quit [Remote host closed the connection]
freyr has left #ocaml ["ERC (IRC client for Emacs 25.3.1)"]
freyr has joined #ocaml
Rosslaew_ has quit [Remote host closed the connection]
Rosslaew_ has joined #ocaml
<discord3>
<Perry> ELLIOTCABLE: I can't imagine spending a summer's night in Philadelphia without air conditioning. Find another place to stay. Or buy an air conditioner for the week.
Rosslaew__ has joined #ocaml
Rosslaew_ has quit [Ping timeout: 255 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Haudegen has joined #ocaml
dhil has joined #ocaml
<freyr>
Values do not match:
<freyr>
val init : (_[> `Simple ], unit, unit) Storage.Database.query
<freyr>
val init : ([> `Simple ], unit, unit) Storage.Database.query
<freyr>
what does this underscore mean?
<lyxia>
probably something to do with the value restriction
silver has joined #ocaml
Rosslaew__ has quit [Remote host closed the connection]
Rosslaew__ has joined #ocaml
jbrown has joined #ocaml
<discord3>
<Christophe> Could it be some kind of weak polymorphism somhow ?
johnelse1 is now known as johnel_away
johnel_away is now known as johnelse1
mbuf has quit [Quit: Leaving]
<discord3>
<Christophe> So that the polymorphic variant type must contain at least `Simple, andit becomes a closed type once given ? I don't know if that's even possible with polymorphic variants ...
_andre has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<discord3>
<mseri> I think it is value restriction, @freyr for a very detailed overview you can see http://okmij.org/ftp/ML/generalization.html, but it essentially boils down to the fact that you can have real let bound polymorphism only if the values you use do not include side effects (such as refs or certain function applications). I had never seen it with polymorphic variants but I believe the same thing is going on
<freyr>
That's quite strange, I've never met value restriction beyound partial application cases
<freyr>
Could it be due to GADT?
<discord3>
<mseri> There is no mutable ref involved?
<discord3>
<mseri> Maybe? I am no expert, but I think to remember that there is some relation between relaxed value restriction and variance of the type
<freyr>
It's just something like: type _ query = Exec : r -> [>`Simple] query | Trans : [`Simple] query list -> [`Trans] query
<lyxia>
freyr: what's the definition of init
<freyr>
in that case `let init = Exec r`
<freyr>
But it couldn't affect query parameter, could it?
<lyxia>
I'm not sure what's going on either then
<discord3>
<mseri> If you put string there for r it seems to be fine
<discord3>
<mseri> No I have a repro
<discord3>
<mseri> It is value restrictio
spew has joined #ocaml
<discord3>
<mseri> let r = "FooBar" type _ query = Exec : string -> [>Simple] query | Trans : [Simple] query list -> [`Trans] query let init = Exec r
<discord3>
<mseri> This is fine
<discord3>
<mseri> however
<discord3>
<mseri> let r = ref "FooBar" type _ query = Exec : string -> [>`Simple] query | Trans : [`Simple] query list -> [`Trans] query let init = Exec !r ;;
<discord3>
<mseri> This gives val init : _[>Simple ] query = Exec "FooBar"`
<Drup>
that's because your IRC client is badly configured and doesn't decode UTF8
<discord3>
<silver> I bet there are a lot of "badly configured" irc clients out there
<discord3>
<silver> and it does decode utf8
<flux[m]>
I think it decodes it fine, it's the terminal font that is to blame
<discord3>
<silver> font probably not supporting emojis
<flux[m]>
my terminal shows it fine
<flux[m]>
I think I'm using default Ubuntu Monospace in my terminal and I dare say among the Linux users that's probably a common choice :)
Rosslaew_ has joined #ocaml
Rosslaew__ has quit [Ping timeout: 240 seconds]
Rosslaew_ has quit [Remote host closed the connection]
Rosslaew_ has joined #ocaml
stargrass1 has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
<discord3>
<Perry> Many programs can use "fallback fonts", but I suppose terminal programs usually don't because they want to be careful about monospacing.
<discord3>
<mars0i> Multicore arrival: I was recent was recently told "around the end of the year" here on discord. Can't remember who said it atm, but seemed to be based on more than wishful thinking.
MercurialAlchemi has quit [Ping timeout: 245 seconds]
<discord3>
<Perry> Did they say which year? 😃
<discord3>
<mars0i> this one
<discord3>
<Perry> I was joking.
<discord3>
<mars0i> yeahok
<discord3>
<mars0i> ok
<discord3>
<mars0i> I was surprised but pleased.
<discord3>
<mars0i> There's a beta or alpha that one can try out.
<discord3>
<Perry> BTW, Drup, I was thinking I might try to get sedlex up to "modern" PPX library methods, if only as a way for me to finally learn them. I won't have time for a while, but do you think that's at least harmless?
<discord3>
<mars0i> I suppose f it was beta there would have been announcements, so alpha or pre-alpha.
stargrass1 has quit [Quit: Leaving]
pzp has joined #ocaml
dakk has quit [Quit: Leaving]
dhil has quit [Ping timeout: 256 seconds]
<Drup>
Perry: well, you can try
<discord3>
<Perry> Drup: I might indeed fail. 😃
<discord3>
<Perry> I'm feeling a bit bold lately, I think my OCaml knowledge has been improving a bit. That said, my next month or so is likely to be too busy for it.
Rosslaew_ has quit [Ping timeout: 276 seconds]
<discord3>
<Perry> I suspect with another year of working in the language I may get to mediocre, though. I'm feeling good about that.
steenuil has quit [Remote host closed the connection]
jao has quit [Ping timeout: 260 seconds]
steenuil has joined #ocaml
tilpner has left #ocaml ["WeeChat 2.1"]
pierpal has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ozzymcduff has joined #ocaml
malina has joined #ocaml
steenuil has quit [Remote host closed the connection]
malina has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freyr has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ozzymcduff has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
roygbiv has joined #ocaml
shinnya has joined #ocaml
ygrek has joined #ocaml
kleimkuhler has joined #ocaml
pzp has quit [Quit: Connection closed for inactivity]
btbytes has joined #ocaml
dhil has joined #ocaml
pierpal has quit [Quit: Poof]
FreeBirdLjj has joined #ocaml
pierpal has joined #ocaml
cryptocat1094 has joined #ocaml
Haudegen has quit [Remote host closed the connection]
reynir has quit [Ping timeout: 240 seconds]
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 268 seconds]
kleimkuhler has quit [Quit: kleimkuhler]
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
btbytes has joined #ocaml
fredcy is now known as fredcy[m]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
reynir has joined #ocaml
neiluj has joined #ocaml
jaar_ has quit [Ping timeout: 240 seconds]
<neiluj>
Hello ! Does ocaml have static attributes, variables shared by all instances of a class ?
<neiluj>
I'm looking at a tutorial but I don't find any mention of this
<kit_ty_kate>
neiluj: is there a reason you are using objects ?
<neiluj>
kit_ty_kate: well I'm just learning about them, I know ocaml is geared towards functional programming though
<neiluj>
I had a java course about classes and know it has static attributes
<kit_ty_kate>
otherwise yes if I understand what you are asking for, it the default behaviour
<kit_ty_kate>
class test = object val x = 1 end
<kit_ty_kate>
it's*
<neiluj>
but it's not mutable then, right ?
<kit_ty_kate>
neiluj: just so you know they are almost never used. They only have a few use-cases
<kit_ty_kate>
neiluj: class test = object val mutable x = 1 end
<kit_ty_kate>
yes it's not mutable by default
<neiluj>
ok, that's nice
<neiluj>
kit_ty_kate: the only use I saw was to give a kind of unique ID to each attribute
jao has joined #ocaml
<neiluj>
are there any others ?
al-damiri has joined #ocaml
<thizanne>
I don't think that's what neiluj want kit_ty_kate
<octachron>
kit_ty_kate, instance variable are not shared by class instances so I would not say that there are the same has static member
<neiluj>
yes, static attributes are mutable
<neiluj>
at least, that was what I saw in java
<octachron>
neiluj, note that a lecture on classes in Java is a (very) bad introduction to the use of classes in OCaml
<octachron>
in almost all instance where classes are used in Java, the corresponding idiomatic OCaml code will be module based
<octachron>
with this introduction, is to possible to share data within all class instances, e.g. "class c = let x = ref 0 in object method get = incr x; !x end"
<neiluj>
octachron: so this has the behaviour of a static attribute, right ? When you mean that java is a bad intro to classes in ocaml you mean it's because it forces to use classes, to organize code ?
<neiluj>
while ocaml organize code with modules
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
btbytes has joined #ocaml
<neiluj>
well what I really meant by static attribute was class variable. I'd like to access them without instanciating the class
<octachron>
neiluj, indeed, using classes in OCaml to implement modularity is unnecessary
<neiluj>
and I'm interest if they are class methods too
<octachron>
and class variables or static methods is just a form of namespacing that is better implemented with modules
<companion_cube>
the equivalent in OCaml to a lot of things from java is: just use functions
<neiluj>
companion_cube: well it's useful to have objects sometimes
<neiluj>
octachron: ok, is it possible to access x in your example, then ? Without instanciating.
<neiluj>
like "c.x"
<neiluj>
but it would be done with modules in ocaml
<companion_cube>
objects, yes; static stuff is just functions
<octachron>
neiluj, no, you cannot access "x" without instantiation.
<neiluj>
all right, so there are no class methods/attribute like in java
<neiluj>
we have to instanciate to access them
<neiluj>
thank you octachron and companion_cube ! It's clearer
<ELLIOTTCABLE>
so errrm why are the “irc” and default rooms separate on the Discord
<companion_cube>
that's a pretty good question
<ELLIOTTCABLE>
if there's gonna be a bridge, the whole point is to *not* separate the community, right?
<companion_cube>
tell that to Bluddy[m], I guess :p
<ELLIOTTCABLE>
… there's a Matrix bridge, too!?
<ELLIOTTCABLE>
man is this really necessary 🤣
<ELLIOTTCABLE>
maybe I
<ELLIOTTCABLE>
am just crotchety and old.
<companion_cube>
:D
<discord3>
<Perry> The rooms will probably be joined once the freenet people allow multiple connections from the bridge bot.
<companion_cube>
freenode* :p
<companion_cube>
but how is it related?
<discord3>
<Perry> Apparently because the UI currently sucks and the bridge is considered experimental.
<discord3>
<Perry> Ask Bluddy. Last time I did his reasons seemed decent, but it's been too long and my memory has faded.
<companion_cube>
this is poised to be a situation where the "experimental" bridge stays like this forever
FreeBirdLjj has quit [Remote host closed the connection]
<discord3>
<Bluddy> Indeed, my reasoning was that we don't want to join the rooms while the quality on the IRC end is so low due to the bot's limitations.
<companion_cube>
still better than fragmenting
<companion_cube>
imho
<discord3>
<Perry> it's not very fragmented at the moment.
<ELLIOTTCABLE>
yeah, it didn't look like #General got much use over #IRC
<discord3>
<Perry> depends on the day. both are rarely active at the same time.
<ELLIOTTCABLE>
thing is he's right. I'm in another matrix-bridged room and it's baaaaaaaaad (#tridactyl)
<ELLIOTTCABLE>
they're always wondering aloud whether I've stopped talking, or the 'irc is broken again'
<ELLIOTTCABLE>
anyway it's left me very wary of places where IRC is a second-class citizen, treated as an optional client, or similar -_-
pierpal has quit [Quit: Poof]
neiluj has quit [Ping timeout: 260 seconds]
pierpal has joined #ocaml
Bronsa has quit [Ping timeout: 240 seconds]
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
btbytes has joined #ocaml
btbytes has quit [Client Quit]
moolc has joined #ocaml
btbytes has joined #ocaml
<companion_cube>
it is so fragmented that I feel like I must (reluctantly) go on discord too -_-
<discord3>
<Bluddy> even if we join #irc with #general, IRC will still miss out on some of the discussions that happen in other channels, such as #random, or project-specific ones
<companion_cube>
as long as #general is the place where normal OCaml-related discussion is supposed to happen…
<companion_cube>
project-related stuff happens in too many places anyway
<companion_cube>
on discord I muted most channels, so…
<discord3>
<zeebo> for me (and maybe others), i'm not going to join irc, so you get to choose between fragmentation and having less people involved regardless of the bridge status
dhil has quit [Ping timeout: 255 seconds]
hannes has quit [Remote host closed the connection]
neiluj has joined #ocaml
<reynir>
companion_cube: I haven't used the discord much, but I feel you're not missing out on much tbh
FreeBirdLjj has joined #ocaml
roygbiv has quit [Quit: ™]
<discord3>
<Christophe> I have joined IRC to see the list of connected people since you cannot see offline messages. Once we can see all connected people on IRC I shall quit :)
neiluj has quit [Ping timeout: 268 seconds]
neiluj has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
ozzymcduff has joined #ocaml
<discord3>
<Bluddy> There's no way to do that @Christophe: discord doesn't allow to create fake users
cow-orker has joined #ocaml
<discord3>
<Christophe> We could probably have a command for the bot no?
<reynir>
like /lusers?
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ratsch has joined #ocaml
ratsch has quit [Client Quit]
ratschance has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
vadeen has joined #ocaml
donnie has joined #ocaml
larhat has joined #ocaml
fwx has joined #ocaml
Fare has quit [Ping timeout: 256 seconds]
jnavila has joined #ocaml
moolc has quit [Quit: ERC (IRC client for Emacs 27.0.50)]