flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
benwbooth has quit [Ping timeout: 240 seconds]
benwbooth has joined #ocaml
demonimin has joined #ocaml
sh0t has quit [Remote host closed the connection]
yunxing__ has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
hoywer has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 272 seconds]
hoywer has quit [Quit: Leaving]
douglasc_ has joined #ocaml
douglascorrea has quit [Ping timeout: 260 seconds]
StacklessCheetah has joined #ocaml
<StacklessCheetah> hi, just wanted to ask, is ocaml a language with gil?
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<tautologico> gil?
<StacklessCheetah> global interpreter lock :)
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
douglasc_ has quit [Ping timeout: 276 seconds]
<StacklessCheetah> anyboody?
<zRecursive> StacklessCheetah: first heard of it
<zRecursive> in ocaml
<StacklessCheetah> yeah i looked online a little bit, but i couldn't find anything conclusive so i'm thinking that it's been removed
<StacklessCheetah> found a discussion yc https://news.ycombinator.com/item?id=9582980 so i guess so
<StacklessCheetah> thanks :)
StacklessCheetah has quit [Quit: leaving]
<copy`> Uhm
<copy`> It has been rescheduled to 4.04
* zRecursive buidinig npam under msys2 now. so far so good !
Algebr` has joined #ocaml
<zRecursive> `./opam.exe update` => Fatal error:\n # opam-version 2.0~alpha (ce8605e0572335beb7f9ae04713c9cc8048cf707)\n # os win32\n c:\Z\RnD\opam\src\opam.exe: "create_process" failed on /bin/sh: No such file or directory
ril is now known as ril[away]
manud has joined #ocaml
ril[away] is now known as ril
ril is now known as ril[away]
ril[away] is now known as ril
pierpa has quit [Ping timeout: 244 seconds]
zRecursive has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 272 seconds]
zRecursive has joined #ocaml
seangrove has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
yunxing_ has quit [Client Quit]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
kyo91 has joined #ocaml
ril has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
xcaptain has joined #ocaml
pyon has quit [Quit: Ihnen, Herr Lasker, habe ich nur drei Worte zu sagen: Nyan und Pasu~.]
seangrove has quit [Ping timeout: 240 seconds]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
seangrove has joined #ocaml
dsheets has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
yunxing_ has joined #ocaml
yunxing_ has quit [Client Quit]
dsheets has quit [Ping timeout: 250 seconds]
seangrove has quit [Ping timeout: 276 seconds]
|meta has quit [Quit: Connection closed for inactivity]
connorjacobsen has joined #ocaml
kolko has quit [Ping timeout: 260 seconds]
connorjacobsen has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
rgrinberg has joined #ocaml
kyo91 has quit [Ping timeout: 250 seconds]
tmtwd has quit [Ping timeout: 240 seconds]
walter|r has quit [Remote host closed the connection]
sgnb` has joined #ocaml
walter|r has joined #ocaml
walter|r has quit [Remote host closed the connection]
sgnb has quit [Ping timeout: 240 seconds]
yunxing_ has joined #ocaml
Denommus has quit [Quit: going to sleep]
kyo91 has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
pyon has joined #ocaml
xcaptain has quit [Ping timeout: 272 seconds]
zRecursive has quit [Ping timeout: 272 seconds]
yunxing_ has quit [Ping timeout: 250 seconds]
kyo91 has quit [Ping timeout: 272 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ril is now known as ril[away]
ril[away] is now known as ril
kdas__ has joined #ocaml
FreeBird_ has joined #ocaml
smondet has quit [Ping timeout: 260 seconds]
smondet has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
walter|r has joined #ocaml
kdas__ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
walter|r has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
manud has quit [Quit: manud]
zRecursive has joined #ocaml
ygrek has joined #ocaml
shinnya has joined #ocaml
kushal has quit [Ping timeout: 252 seconds]
ril is now known as ril[away]
ril[away] is now known as ril
ril is now known as ril[away]
Simn has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
Algebr` has quit [Ping timeout: 258 seconds]
mcc has quit [Quit: Connection closed for inactivity]
ril[away] is now known as ril
walter|r has joined #ocaml
jonasen has joined #ocaml
redpoppies has joined #ocaml
ril is now known as ril[away]
tobiasBora has quit [Ping timeout: 250 seconds]
walter|r has quit [Ping timeout: 244 seconds]
_y has quit [Ping timeout: 276 seconds]
ril[away] is now known as ril
_y has joined #ocaml
tobiasBora has joined #ocaml
MercurialAlchemi has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
algoriddle has quit [Quit: Connection closed for inactivity]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
zRecursive has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 244 seconds]
zRecursive has joined #ocaml
A1977494 has joined #ocaml
dhil has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 252 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jonasen has joined #ocaml
darkf has quit [Quit: Leaving]
dakk has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dexterph has joined #ocaml
dakk has joined #ocaml
ygrek has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dsheets has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dsheets has quit [Remote host closed the connection]
christoph_debian has quit [Ping timeout: 252 seconds]
christoph_debian has joined #ocaml
<steve_gh> Hi. I'm still trying to get my head around some of the subtleties of typing and pattern matching.
<steve_gh> I could define a function : let f (x,y) = x *. y - that's fine
<steve_gh> I could define a type with a constructor: type foo = Foo of float * float
<steve_gh> but then I can't work out how to use a pattern match on f if it takes a foo argument: So f ((x,y):foo) = x *.y has a type mismatch
<steve_gh> I could use pattern matching to deconstruct the foo tuple into it's elements - but this seems clunky:
<steve_gh> let f z = match z with
<steve_gh> | Foo (x,y) -> x *.y
<steve_gh> | _ -> 0.0
<steve_gh> Is there a more elegant solution ?
<_y> it’s how sum types are supposed to be used
bba has joined #ocaml
<_y> ( (x,y) : foo ) can’t work because (x,y) is a tuple (of type float*float), while foo is defined by a type constructor Foo (which appear to take two float arguments)
<_y> you have to write « Foo (x,y) » to construct a value of type foo
<srax> you can still write let f = function Foo (x,y) -> x *. y
<_y> yeah, the _ pattern is useless here since you already covered all cases
dsheets has joined #ocaml
<srax> this seems to be the closest thing to what you whant that is possible : let f (Foo (x,y)) = x *. y;;
<steve_gh> Thanks - I'd forgotten the intrinsic pattern matching of function
<steve_gh> When it compiles, will the fact that there is only one element in the pattern match mean that there is no run-time penalty
<_y> also note that the syntax is misleading here: in « type foo = Foo of float * float », the constructor Foo does not take one tuple argument of type float*float, but two arguments, both of type float
<steve_gh> _y : yep - that is what I want :-)
<_y> it makes a difference, e·g· « match v with Foo tuple -> tuple » won’t compile
<_y> write « type foo = Foo of (float * float) » if you want one tuple
<flux> hmm so this wasn't covered: let foo (Foo (x, y)) = x *. y
<flux> if you have more than one constructor though it will make a warning
<flux> but sometimes it can be nice if you have a lot of similar but semantically different types
<Leonidas> What does type 'a witness = .. mean?
<Leonidas> I mean the .. part, specifically.
dakk has quit [Ping timeout: 276 seconds]
jonasen has joined #ocaml
<flux> open type I guess
<flux> wish stuff got moved from "extensions" to language spec proper :)
<flux> but I guess that's such a new feature
redpoppies has quit [Ping timeout: 260 seconds]
<flux> never used them.. :)
larhat has joined #ocaml
<flux> but I think there are use cases for it. for example: a super-eager lisp-fan comes and shows this elegant non-compile-time-checked approach to something (say extensible multiple dispatch). at that point you can use this feature to demonstrate how ocaml can do it as well!
<flux> ..but there are better uses :). before open types they needed to be done either with exceptions or Obj.magic.
<steve_gh> flux: this is even neater :-)
dakk has joined #ocaml
<flux> reading the page forward, didn't know (** gets converted into a node as well. pretty nifty!
<flux> so it's reasonable to make a ppx-based documentation generator
<flux> ..is anyone working on that?-)
jwatzman|work has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zRecursive has quit [Remote host closed the connection]
jonasen has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jonasen has joined #ocaml
<spion> The OCaml GC seems to be behaving magically well here: https://github.com/spion/hashtable-latencies and I was wondering if anyone knows whether I'm somehow hitting a best-case or is it really that good with keeping pauses very small.
larhat has quit [Quit: Leaving.]
Kakadu has joined #ocaml
<companion_cube> if it's 4.03, I think there have been improvements to the GC latency in this release
<Drup> it's very good :p
amnn has joined #ocaml
<Drup> it doesn't look like a particularly best case
<Drup> (best case is lot's of short lived objects, your objects are not really short lived)
<Drup> (you should use a ref instead of your custom counter type)
<flux> oh so very little non-svg pictures :)
tautologico has quit [Quit: Connection closed for inactivity]
<mrvn> Worrying about GC latencies goes right out the window as soon as you add threads.
<flux> it'll be interesting to see the same graph with ocaml-multicore
<flux> actually I imagine it might even perform well :-o
<flux> at least for a micro-benchmark ;)
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<def`> 4.03 added incremental scan of arrays
<def`> (of objects actually). reason is targetting 4.02, so latency might be better with 4.03
<flux> spion, I notice how you don't mention the ocaml version used for the benchmark ;)
<flux> oh, well that narrows it down :)
jwatzman|work has quit [Quit: jwatzman|work]
<flux> incremental scan of arrays of objects? what kind of objects? object end objects?
<def`> no, increment scan of any object (that is heap blocks)
<def`> previously the granularity was the heap block, now scan can stop in the middle of a block if I remember well
<mrvn> how big an block do you have to have for that to matter?
<def`> an array with a few thousand cells?
silver has joined #ocaml
dsheets has quit [Remote host closed the connection]
<flux> but I suppose nobody can give any kind of guarantees how long ocaml gc takes?
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mrvn> flux: you could. But could you garanty how often it runs?
<flux> let's say I have a game, is there some way of guaranteeing that gc will never take more than 0.5 frames
Orion3k has quit [Ping timeout: 260 seconds]
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dsheets has joined #ocaml
<def`> flux: it depend on your allocation pattern
<flux> by having a certain allocation pattern, running gc manually on every/every nth frame, etc
<mrvn> flux: call it between frames and tune it so it never runs within a frame.
<def`> if you are constantly allocating gigabytes of memory, the GC cannot do magic
sepp2k has joined #ocaml
<def`> flux: yes, there is a primitive to tell the GC "you can run for now more than X ms now"
<def`> no more*
<def`> this should help smoothing the latency distribution
<flux> I remember adjusting gc of an ocaml-written 60 fps clock app (on pentium 2) by increasing the minor heap, it was essential for that particular workload
<flux> the workload was: allocate, draw, discard, rinse, repeat
<mrvn> flux: With a game you don't want low latency. you want to finish a full sweep every frame.
<def`> yes, if you know the size of your short lived set, you can tune the minor heap toward this specific value
Sorella has quit [Quit: Connection closed for inactivity]
<flux> maybe not a full sweep if the job can be interrupted and spread to multiple frames
<flux> Gc.major/minor should have a parameter indicating how long they are permitted to run, using CPU performance counters.. :)
<mrvn> flux: each frame will allocate the same temp stuff over and over. best to get it discarded.
<mrvn> flux: minor sweep, not major.
<flux> alternative solution: when you need to do a major collection, fork off a subprocess that does it
<flux> then the subprocess continues processing the same data as the parent process to catch up
<mrvn> flux: that would lock too much
<flux> at the end you swap processes!
<flux> I don't see any locking barring some in-kernel mm stuff
<mrvn> flux: the GC has to stop the other thread while it accesses some data
<def`> flux: ahem, I expect the impact on cache and vmm to be much worse than GC cost :P
<flux> mrvn, where did I say "thread"?
<mrvn> flux: or use mproptect to catch the other thread writing to memory it is processing.
<mrvn> flux: subprocess
<flux> twas not a serious suggestion.. :)
<def`> mrvn: this implied COW
<flux> an actual problem would be doing the work twice for a short period
<flux> but I guess it wouldn't matter because everyone has a core to spare :)
<def`> memory is not shared, it is a separate address space.. otherwise the second process will be stuck waiting for GC :P
<mrvn> then do it smart. fork a new process per frame and when it's done have it return the frame and die.
<mrvn> no GC needed at all
<def`> sounds like a game engine in PHP
<flux> basically that's what a c++ app with custom memory allocator could do, except without processe
<flux> s
Orion3k has joined #ocaml
<flux> linux can easily fork 60 fps :)
<def`> :D
<mrvn> I wonder if ocaml would benefit from having more heaps. E.g. create a new heap for the frame renderer and discard it at the end without having to scan the whole major heap.
<Drup> def`: or an Ur/Web runtime
<flux> bonus: have n processes in at any given time, increasing frame latency by n-1 but making use of n cores!
<mrvn> flux: you can keep a pool of system processes and just restart the ocaml GC each time you need one.
<def`> mrvn: that's just having one more generation, the trick is you now have to track inter generational references
<def`> you need some kind of generalized remembered set and barriers
<mrvn> def`: bit more complex write barrier.
octachron has joined #ocaml
<def`> flux: i you know your average allocation per frame (which you can actually measure)
<def`> just call Gc.major_slice n after each frame
sdothum has joined #ocaml
<flux> hmm, that sounds pretty nifty
<flux> I could just keep a couting average of that value and Gc.major_slice (n * 110%)
<flux> ?
<def`> something like that yes
M-martinklepsch has quit [Ping timeout: 272 seconds]
<def`> the remaining thing likely to skew distribution will be compaction
<flux> is Gc.stat sufficient for figuring out n?
<def`> yes, the major_words field
<mrvn> def`: what if that doesn't change?
<flux> spion, you should benchmark this.. :-)
<def`> (somewhat ironically, Gc.stat allocates :D)
<def`> mrvn: check if it is = 0 and don't call major_slice in this case :)
yomimono has joined #ocaml
jwatzman|work has joined #ocaml
M-martinklepsch has joined #ocaml
yomimono has quit [Ping timeout: 258 seconds]
copy` has joined #ocaml
beginner_ has joined #ocaml
<beginner_> is it possible to have autompletion for command line arguments using the Arg module?
FreeBirdLjj has quit [Remote host closed the connection]
<mrvn> there are shells that can use cmd --help for autocompletion
FreeBirdLjj has joined #ocaml
<flux> is there some special support for cmdliner?
<flux> cmdliner could probably provide some kick-ass zsh autocompletion script..
yomimono has joined #ocaml
<flux> well, maybe with some additional support in the interface
<beginner_> is there some example from some open source project_
<beginner_> ?
<flux> I would look into zsh or bash documentation on how to do it, and then some scripts that come with them..
<flux> it is not going to be an ocaml-based solution :)
larhat has joined #ocaml
jonasen has joined #ocaml
bba has joined #ocaml
<companion_cube> I think some shells also autocomplete makefiles and configure scripts, somehow
bba has quit [Client Quit]
<flux> well, basically they have a script per file name, the script can do all kinds of magic
<flux> for example scp con complete remote host file names
dsheets has quit [Remote host closed the connection]
<companion_cube> oh, so you mean the script for configure will run ./configure --help and parse it, for instance?
<companion_cube> that's neat
bba has joined #ocaml
connorjacobsen has joined #ocaml
<Drup> companion_cube: yes, zsh does that
amnn has quit [Ping timeout: 244 seconds]
<companion_cube> nice
<Drup> (it can even do completion of directories accross scp, but it's a bit slow :p)
<companion_cube> I use this, indeed
<companion_cube> well, sftp > scp, but anyway
amnn has joined #ocaml
dhil has quit [Quit: Quit]
connorjacobsen has quit [Ping timeout: 258 seconds]
<mrvn> it does it for rsync too
steve_gh has quit [Ping timeout: 250 seconds]
<flux> sadly it doesn't do it for regular ssh commands :)
<mrvn> flux: log in and run tab completion on the other side?
<flux> exactly
<flux> I mean, it doesn't do that for me
<mrvn> how would it now that the other side even has a shell?
<flux> I could tell it, or it could try it
<mrvn> try would be dangerous. tell you could.
<mrvn> then you need an option "--run-completion-only <cmd> [<arg> ...]
<flux> nah, difficult to imagine a system so haphazardously configured that simply trying a shell connection would be dangerous..
<flux> ssh nuke-launch-facility <tab tab>
<mrvn> flux: yep.
<mrvn> flux: ssh poweroff.host
<companion_cube> ping poweroff.host
<mrvn> telnet host poweroff
<flux> arping poweroff.host
<flux> "powers down everything whenever any direct or broadcast traffic is deteced"
<flux> could be used as a very serious security-by-obscurity feature :)
dsheets has joined #ocaml
redpoppies has joined #ocaml
dsheets has quit [Ping timeout: 252 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bba has quit [Quit: Textual IRC Client: www.textualapp.com]
dsheets has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amnn has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
jonasen has joined #ocaml
yomimono has quit [Ping timeout: 244 seconds]
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<spion> flux: its 4.02.3 (Reason is apparently not compatible with 4.03 yet)
<spion> sorry, had to go afk for a while
<Drup> just dump the ocaml version and compile it with 4.03
<spion> yup, tried that too, didn't notice a major difference.
jonasen has joined #ocaml
<spion> tbh i didn't understand what "you should benchmark this" referred to :)
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michipili has joined #ocaml
michipili has quit [Client Quit]
johnelse has quit [Remote host closed the connection]
AltGr has joined #ocaml
johnelse has joined #ocaml
jonasen has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
unbalancedparen has joined #ocaml
<rwmjones> there's not a way to split st_dev into major/minor?
<mrvn> and what would be the point? The concept is obsolete.
struktured has joined #ocaml
<rwmjones> huh?
<mrvn> other than the legacy major/minor numbers they are simply allocated on demand for anything that needs one. Knowing the major tells you nothing about the device.
<rwmjones> it lets me look the device up in /sys/dev/block
dsheets has quit [Remote host closed the connection]
<rwmjones> never mind, I'm writing bindings for makedev, major and minor
<mrvn> why not use /sys/class/block/?
<rwmjones> because I only have st_rdev
<rwmjones> anyway, answer is the bindings are missing, and I'm writing them
rgrinberg has joined #ocaml
dsheets has joined #ocaml
larhat has quit [Quit: Leaving.]
struktured has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
jonasen has joined #ocaml
jonasen has quit [Client Quit]
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<zozozo> when usnig Lwt to spawn processes (using Lwt_process.with_process_full) with a timeout, in the case when the timeout is actually triggered, it is'nt possible to read stdout and stderr for the process (because they have already been closed), do you know of a way to have a timeout for a process, while still being able to read what was written on stdout/stdeer by the process before it hit the timeout ?
|meta has joined #ocaml
redpoppies has quit [Ping timeout: 244 seconds]
hannes has quit [Read error: Connection reset by peer]
hannes has joined #ocaml
jonasen has joined #ocaml
sh0t has joined #ocaml
Enjolras_ has quit [Quit: Lost terminal]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonasen has joined #ocaml
yunxing_ has joined #ocaml
sh0t has quit [Ping timeout: 272 seconds]
<pyon> I understand object types more or less well, but class types less so. When is a class type a subtype of another?
fedjo has quit [Quit: Leaving.]
wolfcore has quit [Ping timeout: 276 seconds]
<pyon> Also, is there some way to package classes as first-class values? (Similar to packaged modules.)
fedjo has joined #ocaml
ygrek has joined #ocaml
<Drup> pyon: there is no real subtyping on classes.
<pyon> Ah.
<Drup> Morally, a class is just a function that returns an object.
mistermetaphor has joined #ocaml
Denommus has joined #ocaml
wolfcore has joined #ocaml
<pyon> Do class types contain information about which methods are virtual?
<Drup> they do
Orion3k has quit [Ping timeout: 240 seconds]
Orion3k has joined #ocaml
<Denommus> hi
<reynir> hi
<Denommus> can I dump an entire state of a MySQL instance?
<Denommus> with users, passwords, and everything?
<pyon> Drup: Makes sense. So, basically, two classes have the same class type if they take the same arguments (at object construction time) and methods (considering only their type signature and virtual status), right? Otherwise, they are simply different, even if they happen to create objects of related types, right?
<Drup> pretty much
<pyon> It would be nice if classes could be passed around as first-class values. That way, a function could take a class as argument, and produce another class, possibly inheriting the first one.
<Drup> You would like to change which class you inherit dynamically ?
<pyon> At the module level, this can already be done, right?
<pyon> Drup: Yep, as long as it has compatible object type.
<pyon> Errr, class type.
<reynir> Denommus: wrong channel I think :)
<Drup> You can always do it with first class modules ...
sh0t has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Denommus> pyon: Java can pass classes around, but I think it can't return them
ocaml060 has joined #ocaml
<Denommus> pyon: I mean, you don't have a way to metaprogram a class in Java
<Denommus> pyon: only use already existing ones
<Denommus> pyon: Ruby does that, but... dynamic typing, you know
<pyon> Denommus: A few days ago, I found a paper that describes how to do first-class classes with type safety.
<pyon> It uses a language construct called “phunctor”, which is a function from classes to classes, just like functors are functions from modules to modules. The key feature is that a phunctor's result can inherit its argument.
<dsheets> I think OCaml can do this with functors + classes?
<pyon> Yeah, but it's cumbersome.
<Denommus> I think classes are mostly redundant with modules
l1x has quit [Ping timeout: 264 seconds]
<Denommus> what is a class if not a poor man's first-class module?
<pyon> Classes can have virtual methods, unlike modules.
dexterph has quit [Ping timeout: 272 seconds]
<Denommus> pyon: you mean you can't include another module and then ignore some declarations?
<Denommus> pyon: or override them?
l1x has joined #ocaml
<ocaml060> Anyone know how to get a line from stdin while suppressing the echo of the characters back to stdout?
<Drup> pyon: well, functors fill the use case
<pyon> Ah.
<Drup> (put all the virtual stuff in a module argument)
slash^ has joined #ocaml
jonasen has joined #ocaml
thibm has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
devol_ has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
walter|r has joined #ocaml
walter|r has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<flux> ocaml060, you need to use Unix.tcsetattr
yunxing_ has quit [Remote host closed the connection]
yunxing_ has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yunxing_ has quit [Ping timeout: 250 seconds]
<seliopou> companion_cube: in lwt-pipe, what sort of blocking behavior do you anticipate `close` having the future? Right now it's just returning Lwt.return_unit
kushal has joined #ocaml
jonasen has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dsheets has quit [Remote host closed the connection]
amnn has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malc_ has joined #ocaml
<companion_cube> seliopou: I'm not sure, but it might require closing subpipes (e.g. in map)
<companion_cube> those could flush+close their input, for instance
<Denommus> can I dump the state of my MySQL instance through phpmyadmin?
<Denommus> with users, passwords, and everything?
<Denommus> Drup: ah, yes, there's also that
thibm has left #ocaml ["WeeChat 1.5"]
dakk has quit [Ping timeout: 244 seconds]
<Denommus> pyon: my monad example in OCaml shows that. Either (>>=) or join is virtual
<Denommus> pyon: DefaultBind is a functor that takes a virtual join and provides a bind implementation. DefaultJoin is the opposite
benwbooth has quit [Quit: Textual IRC Client: www.textualapp.com]
Sorella has joined #ocaml
benwbooth has joined #ocaml
jonasen has joined #ocaml
octachron has quit [Quit: Page closed]
orbifx-m2 has joined #ocaml
orbifx-m3 has joined #ocaml
thibm has joined #ocaml
orbifx-m has quit [Ping timeout: 276 seconds]
orbifx-m2 has quit [Ping timeout: 252 seconds]
<ocaml060> flux: I'll give it a try. Many thanks.
redpoppies has joined #ocaml
<Denommus> it's the second time I ask something about MySQL in #ocaml and I didn't notice
<Denommus> sorry, guys
AltGr has left #ocaml [#ocaml]
<reynir> Denommus: heh, I tried to tell you :)
connorjacobsen has joined #ocaml
dsheets has joined #ocaml
yunxing_ has joined #ocaml
redpoppies has quit [Ping timeout: 244 seconds]
thibm has left #ocaml ["WeeChat 1.5"]
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
pierpa has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
amnn has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
dsheets has quit [Remote host closed the connection]
Reventlov has quit [Quit: leaving]
Reventlov has joined #ocaml
Reventlov is now known as Guest49106
sh0t has quit [Read error: Connection reset by peer]
gpietro_ has joined #ocaml
gpietro_ has quit [Client Quit]
ryryryry has joined #ocaml
dsheets has joined #ocaml
octachron has joined #ocaml
Guest49106 is now known as Reventlov
Reventlov has quit [Changing host]
Reventlov has joined #ocaml
dsheets has quit [Remote host closed the connection]
rgrinberg has quit [Read error: Connection reset by peer]
<Denommus> reynir: I was too worried about what I'm trying to do XD
bba has joined #ocaml
bba has quit [Client Quit]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
ocaml060 has quit []
dsheets has joined #ocaml
Kakadu has quit [Quit: Page closed]
dsheets has quit [Ping timeout: 264 seconds]
yunxing_ has quit [Remote host closed the connection]
unbalancedparen has quit [Quit: WeeChat 1.5]
<struk|work> https://github.com/michipili/mixture why does this require bsd make?
rgrinberg has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<malc_> struk|work: at least https://github.com/michipili/mixture/blob/master/Makefile.inc has bsd make specific constructs (f.e.: .if), but perhaps your question was more meta... i.e. why bsd make why not portable or gnu...
dexterph has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benwbooth has quit [Ping timeout: 252 seconds]
jonasen has joined #ocaml
benwbooth has joined #ocaml
unbalancedparen has joined #ocaml
benwbooth has quit [Ping timeout: 244 seconds]
darkf has joined #ocaml
ril has joined #ocaml
benwbooth has joined #ocaml
shinnya has joined #ocaml
ryryryry has left #ocaml [#ocaml]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
seangrove has joined #ocaml
dakk has joined #ocaml
Orion3k has quit [Quit: Leaving]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
<struk|work> yeah, I can't even find the right apt-get package to build the thing
seangrov` has joined #ocaml
seangrov` has quit [Remote host closed the connection]
seangrove has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<struk|work> also, was trying to weigh in how this stuff relates to ppx
<struk|work> I feel like ppx makes the mixin approach a bit less necessary
connorjacobsen has quit [Ping timeout: 260 seconds]
Orion3k has joined #ocaml
yunxing_ has joined #ocaml
<malc_> struk|work: pmake?
benwbooth has quit [Ping timeout: 246 seconds]
benwbooth has joined #ocaml
jhaberkucharsky has joined #ocaml
jhaberkucharsky has left #ocaml [#ocaml]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
manizzle has joined #ocaml
connorjacobsen has joined #ocaml
dakk has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
<struk|work> malc_: that helped, now I got an error because my unix group name apparently doesn't fit into bsd standards (maybe because it has "^" in it)
dakk has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
pkrnj has joined #ocaml
dexterph has quit [Ping timeout: 276 seconds]
Anarchos has joined #ocaml
dakk has quit [Ping timeout: 260 seconds]
rand__ has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
struk|work has quit [Quit: Page closed]
tautologico has joined #ocaml
Denommus has quit [Ping timeout: 260 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
connorjacobsen has quit [Remote host closed the connection]
yunxing_ has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
dsheets has quit [Remote host closed the connection]
RossJH has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
walter|r has joined #ocaml
<tautologico> any bindings for libui? https://github.com/andlabs/libui
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
<Algebr> whoa that's an awesome lib
<Algebr> tautologico: don't think so but good change to learn ctypes or the C FFI?
<Algebr> chance
dakk has joined #ocaml
<tautologico> yeah, I thought it was interesting to get a GUI
<Algebr> well we already have lablgtk and the osx bindings are native as well
<tautologico> os x bindings in gtk?
<Algebr> they play nicely with lwt as well, so doing bindings to this lib would be....an undertaking
<Algebr> yea
<Algebr> and the GUI is native too!
<tautologico> that's good
<Algebr> although for OSX I tend to just use objective-c for the GUI and OCaml for the logic.
<tautologico> in my experience installing GTK on OSX is kind of a pain though
<Algebr> it is, but the opam install, when it fails, gives good instructions
dxtr has joined #ocaml
Simn has quit [Quit: Leaving]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
A19774941 has joined #ocaml
<tautologico> speaking of bindings... there's the beginnings of a lib to use OpenCL in OCaml, but it is abandoned and without license
<tautologico> in theory I should ask the repo owners to add a license and only then fork the project
A1977494 has quit [Ping timeout: 240 seconds]
<mrvn> in practice you might just start fresh
<Algebr> agreed, start fresh and learn from the mistakes/beginnings of the other repo
<tautologico> thought about it, but it's boring work... I'd rather have these bindings already done for me:)
connorjacobsen has quit [Ping timeout: 260 seconds]
<Algebr> lol
yunxing_ has joined #ocaml
dakk has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 244 seconds]
walter|r has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
sepp2k has joined #ocaml
rand__ has quit [Quit: leaving]
dakk has joined #ocaml
RossJH has quit [Quit: Textual IRC Client: www.textualapp.com]
dsheets has joined #ocaml
sepp2k has quit [Quit: Leaving.]
dsheets has quit [Read error: Connection timed out]
dsheets has joined #ocaml
walter|r has joined #ocaml
connorjacobsen has quit []
dsheets has quit [Remote host closed the connection]
seangrove has joined #ocaml
malc_ has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
octachron has quit [Quit: Leaving]
ril has joined #ocaml
A19774941 has quit [Quit: Leaving.]
walter|r has quit [Remote host closed the connection]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
<struk|desk> tautologico: so libui is a Qt lite in C basically? interesting
<tautologico> struk|desk: yeah, something like it
<struk|desk> tautologico: have you used it in the past? what was your experience like with/it ?
<tautologico> haven't used it yet, it's quite new... but the people I know who have used it so far like it
<tautologico> there are already bindings to some languages
<struk|desk> seems like an interesting choice for mobile devices, if it works well on tablets/phones
saruta has quit [Ping timeout: 244 seconds]
connorjacobsen has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
sh0t has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amnn has joined #ocaml
amnn has quit [Client Quit]
saruta has joined #ocaml
silver has quit [Quit: rakede]
zRecursive has joined #ocaml
connorjacobsen has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml