ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
struktured has joined #ocaml
yomimono has quit [Ping timeout: 246 seconds]
badkins has quit [Ping timeout: 245 seconds]
mabino-pyon has quit [Ping timeout: 245 seconds]
bytbox has joined #ocaml
idem-pyon-tent has joined #ocaml
AltGr has joined #ocaml
ollehar has joined #ocaml
Algebr has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
MrScout has joined #ocaml
ptc has joined #ocaml
MrScout has quit [Remote host closed the connection]
ptc is now known as Guest10955
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
TheCommieDuck has joined #ocaml
yminsky has joined #ocaml
<struktured> every time I do a big opam update my laptop smells like its melting
reem has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
hilquias has quit [Ping timeout: 252 seconds]
reem has joined #ocaml
chambart has quit [Quit: WeeChat 1.0.1]
swgillespie has joined #ocaml
monoprotic has quit [Ping timeout: 246 seconds]
<Algebr> What does type in class type foo = ... mean?
teiresias has quit [Ping timeout: 250 seconds]
antkong has joined #ocaml
teiresias has joined #ocaml
ollehar has quit [Quit: ollehar]
<haesbaert> any one had luck with opam + merlin ?
<haesbaert> I can't make it find the definitions
<tokenrove> haesbaert: do you have a suitable .merlin file with PKG, B, S lines pointing to the things it needs to find?
<haesbaert> I think I do, I added them, and now I get this:
<haesbaert> if: String was supposed to be in /Users/haesbaert/.opam/system/build/async.112.06.00/_build/lib/std.cmt but could not be found
<haesbaert> and the file is there indeed
<tokenrove> i'm only guessing, but i notice that String is indeed not a module within std.ml in async. i wonder why it thinks it should be there.
<haesbaert> ohhh indeed, I didn't pay attention, let me try to add only one S line
<Algebr> haesbaert: there's a merlin-init.sh script on the merlin wiki i think that takes care of most of this
<haesbaert> the funny thing is the S lines should not be necessary anymore according to: https://github.com/the-lambda-church/merlin/issues/235
<haesbaert> Algebr: that's the one I used
Axle has joined #ocaml
antegallya has quit [Ping timeout: 252 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
<Axle> I'm looking at Yojson (http://mjambon.com/yojson.html), and they have a top-level module Yojson, with specific features in submodules like Yojson.Basic. To accomplish this, they use a preprocessor like so: https://github.com/mjambon/yojson/blob/master/yojson.ml.cppo
<Axle> does anyone have an example of a package with one top-level module that doesn't use a preprocessor?
<haesbaert> if: String was supposed to be in /Users/haesbaert/.opam/system/build/core.112.06.02/_build/lib/std.cmt but could not be found
<haesbaert> same :(
<Axle> having trouble searching for this because toplevel has a specific meaning
bytbox has quit [Remote host closed the connection]
badon has quit [Read error: Connection reset by peer]
badon has joined #ocaml
yminsky has quit [Quit: yminsky]
monoprotic has joined #ocaml
yminsky has joined #ocaml
darkf has joined #ocaml
MrScout has joined #ocaml
<Drup> Axle: in your file, put "module M = ...."
<Drup> you can look at react if you want too
<yminsky> I’m trying to figure out how to update an OPAM package, and am running into a problem I can’t figure out.
<yminsky> ### stderr ###
<Drup> Algebr: hum, what's the whole expression ?
<yminsky> # opam: unknown option `-e'
<yminsky> That error pops out when I try to do the install. I am clueless as to where this is coming from.
<Drup> yminsky: try -v and see what commands opam uses ?
<haesbaert> yminsky: are you yaron minsky ?
<yminsky> haesbaert: yes.
shinnya has quit [Ping timeout: 265 seconds]
<haesbaert> cool, read your book today :D, awesome stuff.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yminsky> Thanks!
<yminsky> Drup: I now see an error, but I still don’t know where the “-e” comes from.
<Drup> well, AltGr ? :D
Guest10955 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yminsky> I’m trying to update the old “planets” package in opam, and trying to learn OPAM as I go. (which embarassingly, I basically don’t know.)
<yminsky> Here’s the pastebin of the modified opam file. http://pastebin.com/jtYMuwYQ
<Algebr> sorry Drup, its class type box = object inherit t and then looks like an mli
<Algebr>
<Drup> yminsky: you don't use opam internally at jst ?
<yminsky> Drup: Nope. We have a single big repo into which we put everything. One unified build system to rule them all.
<yminsky> (Jenga is the build system.)
<Drup> yeah, I figured just after asking the question
<yminsky> This is pretty common, FWIW. LexiFi does the same, and I think Citrix used to.
<struktured> yminsky: what steps are you taking to install it exactly? are you pinning the project locally to test, or..?
<yminsky> I tried that.
<yminsky> I also cloned the repo, modified it, and added it as a repo.
<yminsky> I’m getting the same error both ways.
<Drup> and build.sh is ?
<yminsky> Here’s the output, FWIW.
<yminsky> build.sh is my little shell script for calling ocamlbuild to do the actual build.
<Drup> (note, you should make a .install file instead of cp)
<Axle> Drup: I should have been more clear, I'd like an example where the submodules are separate files from the top-level module.
<Drup> Axle: "module Foo = WhateverYouCalledIt"
<yminsky> Oh, I’m a moron, I think. I have another build.sh on the system. I need to make sure I invoke the local one.
<struktured> yminsky: I was about to ask you to show me build.sh
<yminsky> Drup: What’s a .install file?
<Drup> it's a list of file opam will take from the build directory and install somewhere
<yminsky> BTW: changing “build.sh” to “./build.sh” fixed my boneheaded problem. Thanks all!
<struktured> nice
<yminsky> Drup: Where should I put one? And is there an example I should look at?
<Drup> I'm trying to get a nice example in opam repo, but can't find one
<yminsky> i notice that most packages seem to just have “make install” as the install command.
<Drup> yes
<yminsky> But I’m not using make, so that doesn’t seem enormously pointful.
<whitequark> you should put pkgname.install into the root of the build directory
<whitequark> as for format...
<whitequark> yminsky: https://opam.ocaml.org/doc/manual/dev-manual.html#sec25 describes the install files.
<yminsky> Ah, that makes sense, I think.
<yminsky> I’ll give that a shot.
<whitequark> or a more concrete example
<Drup> right, that :)
badkins_ is now known as badkins
<yminsky> That bin line is odd. It’s not actually in the bin directory, I suppose?
vanila has quit [Quit: Leaving]
<whitequark> oh, yeah, it has to do with an opam bug
<yminsky> OK. Thanks all. I think I’m now well on my way.
<AltGr> Hi
<AltGr> [catching up]
yminsky has quit [Quit: yminsky]
swgillespie has joined #ocaml
<AltGr> well it seems everything has been solved already :)
<AltGr> Thanks Drup, whitequark
paolooo has joined #ocaml
badon has quit [Quit: Leaving]
MrScout has quit [Remote host closed the connection]
The_Mad_Pirate has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
MrScout has joined #ocaml
rwmjones has quit [Read error: Network is unreachable]
rwmjones has joined #ocaml
paolooo has quit [Ping timeout: 246 seconds]
The_Mad_Pirate has joined #ocaml
<TheCommieDuck> this is making me bang my head.
<TheCommieDuck> I'm trying to do some kind of foreach(i in list) bindings = do_stuff i bindings
q66 has quit [Quit: Leaving]
MrScout has quit [Remote host closed the connection]
badon has joined #ocaml
<whitequark> List.fold_left?
<TheCommieDuck> errrm
manizzle has quit [Ping timeout: 264 seconds]
<TheCommieDuck> that very well might be it
<TheCommieDuck> fold_left is iterate a list with an accumulator and perform some function on each element, right?
<TheCommieDuck> (I've looked over it so many times yet it won't click)
<TheCommieDuck> yeah, looks it. Thanks :)
TheCommieDuck has quit [Read error: Connection reset by peer]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
psy_ has joined #ocaml
claudiuc has quit [Remote host closed the connection]
psy_ has quit [Ping timeout: 265 seconds]
yminsky has joined #ocaml
mort___ has quit [Ping timeout: 250 seconds]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
jneen is now known as jneen|afk
badon_ is now known as badon
<yminsky> Another question about OPAM. Once I create a dot-install file, what do I do to make the opam package aware of it?
<yminsky> And is the .install file a manifest of what you’ve otherwise told the system to do? Or does OPAM do the copying for you automatically, based on the .install file?
<yminsky> Also, I’d be happy for tips as to where this is all documented. I didn’t quite manage to find this in the HOWTO.
Axle has quit [Quit: Leaving.]
<AltGr> A file foo.install will automatically be used when found at the root of the source for package foo
<yminsky> So, I can just build the project, and do nothing, and the files will be installed accordingly? Lovely.
<yminsky> Am I looking in the wrong place for documentation? I couldn’t find this described anywhere.
<AltGr> On the repository, files put in the package's definition in subdirectory `files/` are copied to the root of the project before anything else, so putting the .install file there works too
<AltGr> Indeed it's not yet very well documented. But it's been around a while and works quite well so we should probably advertise it more now.
<yminsky> And I suppose the point of this is to give a good mechanism for uninstalling later?
<AltGr> You can get rid of the `install` and `remove` fields if you use .install files,yes
<AltGr> (but using both is possible)
<AltGr> #1532 has been fixed since 1.2.1-beta2 by the way ; but you can't really use the new `libexec:` field on the repository just yet, of course.
<yminsky> Well, I just submitted my first opam PR. I feel like I’ve arrived.
<AltGr> The idea was to integrate into build tools, or at least provide ways to ease .install file generation -- that seemed to be the thing to do first before advertising .install files more
<AltGr> Cool ! :)
<destrius> yminsky: writing a book wasn't good enough? ;)
<AltGr> You may also want to check out the stand-alone `opam-installer` command, that handles .install files outside of OPAM
jao has quit [Ping timeout: 264 seconds]
<yminsky> What’s the use case for it?
<yminsky> (destrius: writing a book was good too…)
<destrius> yminsky: your book was really good btw, helped me immensely. thanks!
<AltGr> Providing a Makefile with a `make install` target without specifying the files to install twice
nopf has quit [Ping timeout: 240 seconds]
<yminsky> Ah, makes sense.
<AltGr> yminsky, you may want to try `opam lint` on your package description
<AltGr> or jump to opam-publish (`opam install opam-publish`) that should ease contributing to opam-repo greatly
<yminsky> Hmmm. opam lint gives me weird advice.
<yminsky> - Field 'opam-version' refers to the patch version of opam, should be of the form MAJOR.MINOR
<yminsky> - Field 'opam-version' doesn't match the current version, validation may not be accurate
<yminsky> but my opam-version is this: opam-version: "1.2.0"
<yminsky> which is the version of opam I’m running.
<yminsky> Oh, never mind.
<AltGr> hmm, the second warning may be spurious, I'll check
<yminsky> The second message is weird, but the first one is right on.
<AltGr> we assume we don't change the format between patch versions
<AltGr> thanks ! But is still here in 1.2.1, first warning implies the second
<yminsky> What do these mean:
<yminsky> - Field 'ocaml-version' is deprecated, use 'available' instead
<yminsky> - Missing field 'bug-reports'
<yminsky> - Missing field 'dev-repo'
<yminsky> - Package declares 'depexts', but has no 'post-messages' to help the user out when they are missing
<yminsky> Is there detailed help on the file format somewhere?
<AltGr> Fixed
<yminsky> That’s quick turnaround!
<yminsky> I’m trying to fill in dev-repo, but keep on getting “not a recognized version control URL”.
<AltGr> There is a summary at https://opam.ocaml.org/doc/Packaging.html
<yminsky> Hmm. But that doesn’t give a detailed field-by-field description
<yminsky> for example, I can’t tell what the format of the dev-repo field is supposed to be.
<yminsky> This doesn’t appear to work: https://yminsky@bitbucket.org/yminsky/planets
<yminsky> Still doesn’t say which URL’s are accepted….
<yminsky> (though that’s definitley better.)
<yminsky> I think you guys are just discriminating against hg!
<AltGr> hmm, it seems... it's just less tested because we all use git
<AltGr> (and once you are used to one of the two, switching is painful...)
<AltGr> I'll definitely fix it
<yminsky> Tell me about it.
<AltGr> opam pin add planets https://bitbucket.org/yminsky/planets --kind hg works
<yminsky> That’s good!
<AltGr> but `dev-repo` doesn't have a way to specify an explicit repository kind :/
<yminsky> Though how does that work? Can you pin a random project? Where do you get the opam file? I would have thought pinning would be largely for opam project descriptions, not source repos.
reem has quit [Remote host closed the connection]
<yminsky> I like how it says “dev-repo” and means “github address”. You might want to look at changing your variable names.
badkins has quit [Remote host closed the connection]
manud has quit [Quit: manud]
<yminsky> Anyway, thanks for the advice! That was pretty painless, though I have to admit that without IRC, I’d have had no shot.
<AltGr> Sorry about that! with github we workaround it by suffixing the address with `.git` which makes opam detect it as git; but bitbucket doesn't accept `planets.hg`
<whitequark> yminsky: huh? no, it means just any source control repo. git://git.whitequark.org/foo.git
<whitequark> why not
<AltGr> This'll be valuable in improving the documentation
<yminsky> whitequark: You mean any _git_ source control repo, right? :)
<AltGr> yminsky, no no, it _should_ work
<AltGr> but OPAM has to guess somehow that it's a hg repo
<whitequark> oh, hg doesn't have hg:// urls
<AltGr> if it's git://xxx/yyy.git it's kind of easy
<yminsky> Totally. I understand the problem, and why it’s easier given how the git URL works. I’m just giving you a hard time. Actually, this has been quite lovely.
nopf has joined #ocaml
<yminsky> Thanks for all the help guys. I’m off to bed. I just hope the gods smile upon my PR...
<AltGr> well that's a bug, OPAM would support it but you can't specify it in the metadata :/
<AltGr> > Though how does that work? Can you pin a random project?
<AltGr> yes, you can
<yminsky> If you pin a random project, how does it know what to build?
<AltGr> it'll either pick an opam file from the project, if there is one
<Algebr> Say super class has val mutable children = [], and sub class wants to act on this ivar, do I have to define val mutable children = [] as well in the sub class? I thought I could just act on the ivar directly but no dice
<AltGr> or from the repo if there is a project by this name
<AltGr> or prompt you with an editor to write the opam file (from a template)
<yminsky> Oh, got it. That’s shockingly user friendly.
<AltGr> https://opam.ocaml.org/doc/Packaging.html should explain it all
<yminsky> I’ll try to understand depexts next time around. There’s some depects stuff from whoever packaged 0.1.13 for me, which I left in place but don’t quite grok yet.
<yminsky> Always more to learn...
<yminsky> Anyway, goodnight all.
yminsky has quit [Quit: yminsky]
<AltGr> Good night
<AltGr> Just made it so that you can write hg://https://bitbucket.org/yminsky/planets
<AltGr> ugly but this way at least it's possible
<whitequark> wow that's horrible
<whitequark> please don't
<whitequark> can you do it sth like ["hg", "url://"]?
<whitequark> or "url://" {hg}
<whitequark> so that the field value is a well-formed URL instead of... something
<whitequark> that you can't parse with an URL parser
reem has joined #ocaml
<AltGr> huhu
<AltGr> yeah, no solution without changing file format it seems
<whitequark> yes
<whitequark> i mean, with hg://, you are still changing file format.
<whitequark> not syntactically, but changing
<AltGr> for the user, yes, but not from OPAM's point of view
<AltGr> (since it didn't work at all before)
<AltGr> "url://" {hg} would be the best but is a syntax error to earlier versions
reem has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
johnf has joined #ocaml
<Algebr> Feeling pretty dumb...I have a super class defined as class virtual b0 = object(self) val mutable c = [], and I have another class called b1 which inherits from b0 and finally a third class b2 which inherits from b1. I'm trying to use the instance variables from b0 in b2 but I keep getting Unbound instance variables. I'm guessing then that the lookup is only one level up?
<struktured> Algebr: can you show how you are invoking the instance varS?
<Algebr> struktured: this should be a self contained snippet, http://pastebin.com/hJNPFhQq
reem has joined #ocaml
<struktured> Algebr: compiles for me, with some modifications..
<Algebr> / sigh. not sure if I'm doing something wrong or lambda term is doing some magic.
<struktured> Algebr: well, in your example, your missing the "ends" on each object definition, and I didn't have "t" to inherit from so not sure what the impact of that is
<Algebr> its definitely not the former.
<Algebr> struktured: okay, I figured it out but am not sure why this is why it is, something about I guess binding with ocaml methods. The vbox I was using was defined as class vbox = Other_module.vbox, so I was doing inherit vbox which doesn't work, but doing inherit Other_module.vbox did the trick.
<struktured> interesting, a subtle scoping issue? I imagine "open Other_module" would also work
Algebr has quit [Ping timeout: 245 seconds]
psy_ has joined #ocaml
mcclurmc_ has joined #ocaml
MrScout has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]
MrScout has quit [Remote host closed the connection]
manizzle has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
<flux> oh, I hadn't even noticed you can do class a = b
badkins has joined #ocaml
badkins has quit [Ping timeout: 245 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
reem has quit [Remote host closed the connection]
ontologiae has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
manud has joined #ocaml
manud has quit [Client Quit]
ygrek has joined #ocaml
reem has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 245 seconds]
paolooo has joined #ocaml
antkong has quit [Quit: antkong]
reem has joined #ocaml
swgillespie has joined #ocaml
manizzle has quit [Remote host closed the connection]
Muzer has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
psy_ has quit [Remote host closed the connection]
idem-pyon-tent has quit [Ping timeout: 240 seconds]
idem-pyon-tent has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
Muzer has joined #ocaml
c74d has quit [Remote host closed the connection]
ggole has joined #ocaml
matason has joined #ocaml
idem-pyon-tent is now known as im-pyon-stor
c74d has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
tane has joined #ocaml
matason has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
octachron has joined #ocaml
Kakadu has joined #ocaml
reem has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
reem has joined #ocaml
avsm has joined #ocaml
paolooo has quit [Ping timeout: 246 seconds]
leowzukw has joined #ocaml
captain_furious has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
dav_ has joined #ocaml
keen__________72 has quit [Read error: Connection reset by peer]
dav has quit [Ping timeout: 240 seconds]
keen__________72 has joined #ocaml
matason has joined #ocaml
zpe has joined #ocaml
burgobianco has quit [Remote host closed the connection]
Kakadu has quit [*.net *.split]
struk|work has quit [*.net *.split]
antegallya has joined #ocaml
kapil___ has quit [Quit: Connection closed for inactivity]
dsheets has quit [Ping timeout: 246 seconds]
leowzukw has quit [Remote host closed the connection]
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
octachron has quit [Ping timeout: 252 seconds]
lyxia has joined #ocaml
reem has quit [Remote host closed the connection]
lyxia_ has joined #ocaml
AltGr has left #ocaml [#ocaml]
zpe has quit [Remote host closed the connection]
octachron has joined #ocaml
tane has quit [Quit: Verlassend]
ollehar has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
yomimono has joined #ocaml
mort___ has joined #ocaml
dsheets has joined #ocaml
im-pyon-stor is now known as pyon
Submarine has joined #ocaml
Haudegen has joined #ocaml
lyxia_ has quit [Quit: leaving]
myst|wor1 has quit [Quit: Lost terminal]
antegallya has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
antegallya has joined #ocaml
aubergines has joined #ocaml
mort___ has quit [Quit: Leaving.]
_andre has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
psy_ has quit [Read error: No route to host]
ghostpl_ has joined #ocaml
psy_ has joined #ocaml
antegallya has quit [Ping timeout: 264 seconds]
badon has quit [Read error: Connection reset by peer]
badon has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Client Quit]
Submarine has quit [Remote host closed the connection]
aviraldg has joined #ocaml
aviraldg has quit [Max SendQ exceeded]
paradoja has joined #ocaml
mort___ has joined #ocaml
avsm has quit [Quit: Leaving.]
mort___ has left #ocaml [#ocaml]
myst|work has joined #ocaml
antegallya has joined #ocaml
Jefffrey has joined #ocaml
Algebr has joined #ocaml
<Simn> Is there any way to replicate the C feof behavior on an in_channel? That is, return true only if there has actually been a read attempt after end of file.
<whitequark> I don't think so. but you can wrap the in_channel and catch the exception
<whitequark> then mutate some value inside your wrapper to indicate that EOF is reached
<Simn> Yeah something like that was my backup plan, hmm...
Unhammer has quit [Changing host]
Unhammer has joined #ocaml
ygrek has joined #ocaml
badon has quit [Ping timeout: 244 seconds]
antegallya has quit [Ping timeout: 264 seconds]
badon has joined #ocaml
antegallya has joined #ocaml
antegallya has quit [Ping timeout: 272 seconds]
<Simn> Would it be too simple/bad practice to just wrap it in a tuple with a bool ref?
larhat has joined #ocaml
yminsky has joined #ocaml
<octachron> a tuple works but why not use a record?
<flux> I suppose you might even be able to work with in_channel option ref, or a record doing the same..
<flux> unless you have some other operations you want to perform on an eofed channel
<Simn> I would rather not make assumptions about what users might want to do with that.
zpe_ has joined #ocaml
moei has quit [Quit: Leaving...]
zpe has quit [Ping timeout: 246 seconds]
reem has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
axiles has quit [Ping timeout: 250 seconds]
axiles has joined #ocaml
kapil___ has joined #ocaml
reem has quit [Ping timeout: 256 seconds]
jgjl has joined #ocaml
psy_ has quit [Read error: No route to host]
yminsky has quit [Quit: yminsky]
<Algebr> Can I pattern match something like this? | {(imagine lots of other fields)foo=Bar|| Baz }
<Drup> yes
<Drup> except it's |, not ||
<Algebr> Drup: in browserMain, you have an object with two initializers, how can that be?
<ggole> In general you can replace any pattern with a (possibly parenthesized) sub pattern
Haudegen has joined #ocaml
segmond has quit [Ping timeout: 255 seconds]
<Drup> Algebr: what's the problem with having two initializers ?
<Drup> they are executed in order
<Algebr> I guess I was thinking of the initializer like python's __init__, but that's wrong I see now.
bytbox has joined #ocaml
segmond has joined #ocaml
avsm has joined #ocaml
BitPuffin has joined #ocaml
BitPuffin has quit [Ping timeout: 265 seconds]
avsm has quit [Quit: Leaving.]
segmond has quit [Ping timeout: 245 seconds]
BitPuffin has joined #ocaml
uris77 has joined #ocaml
segmond has joined #ocaml
shinnya has joined #ocaml
tane has joined #ocaml
<tane> good afternoon
<Algebr> Drup: When you have a second, can you take a look at this pastebin? http://pastebin.com/wYb4m1q3 I'm not sure why these events are not going off, surely events should go off from the most specific widget to the most general/outsidemost.
<Drup> it's the other way around
<Drup> I think.
<tane> yes
<tane> [on_event ?switch f] calls [f] each time an event is
<tane> received. If [f] returns [true], the event is not passed to
<tane> other callbacks.
thomasga has joined #ocaml
<tane> exchange false and true in your event handlers, i guess
<tane> Drup, btw, after doing some stuff in haskell i have to take bake my statement about it's readability. Full agreement on your statement now :)
segmond has quit [Ping timeout: 245 seconds]
<tane> back*
govg has joined #ocaml
Denommus has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
<MercurialAlchemi> ah, the pitfalls of using booleans
<Algebr> tane: hmm, tried that, doesn't seem to be correct.
segmond has joined #ocaml
<mbac> when it comes to readability, haskell is like perl for the sophisticated man
* mbac ducks
<MercurialAlchemi> mbac: don't say such things about Perl
<MercurialAlchemi> :)
<Drup> mbac: well, there is one thing to be said about haskell
<Drup> since whitespace is significant, you are garanteed to have some of them in a program
<Drup> you don't have such garantee for Perl :D
<mbac> zing!
ghostpl_ has joined #ocaml
<mbac> excellent, the bait has been taken
<Drup> I would never pass up such a bait, it's too tasty :D
pakchoi2 has joined #ocaml
<tane> Algebr, what seems to be the problem?
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
<Drup> Algebr: I also thing it's from the root widget and goes down, not the other way around
<Drup> but I'm not sure
pakchoi2 has quit [Max SendQ exceeded]
<Drup> think*
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
<MercurialAlchemi> Drup: bah, it's a matter of using . and >>= enough
<Algebr> tane: Problem is that inner most widgets aren't having their events go off. In the paste bin link, I have tried what I think to be every permutation of the return bools
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
<Drup> Algebr: don't guess, returns false everywhere, and see what happens
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
<Drup> if nothing is triggered, check that the right widget can be focused
<Drup> with the method #can_focus
bytbox has quit [Remote host closed the connection]
<Drup> (you can inherit it and change the result, to be sure it returns true)
badkins has joined #ocaml
ghostpl_ has quit [Ping timeout: 252 seconds]
<Drup> (I got bitten by that one too)
<Drup> MercurialAlchemi: any solved problem can be better solved by applying code golf on it.
<MercurialAlchemi> :)
<Algebr> Drup: That was it! yay.
<tane> Algebr, returning true from can_focus?
<Algebr> yep
<Drup> now you can fiddle with event return value :D
<tane> alright
<tane> yeah, the boolean means "event should not be handled any further" :D
pyon is now known as mabino-pyon
<tane> does anyone know of work being done on some html5 compliant parser?
<flux> I only know of one html parser for OCaml: Nethtml
<tane> ok, thanks
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
<tane> flux, yeah, i had a look at this but it seems stuck on html 4.0
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
<Algebr> ignoring the simple solution of just using a list, can ocaml do C style varargs? or is that magic reserved for printf?
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
<Drup> printf doesn't do magic anymore
<Drup> well,
pakchoi2 has joined #ocaml
<Drup> a little bit of it, but not much
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
Denommus` has joined #ocaml
<Drup> Algebr: are you sure you don't want to use a list ? :p
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
<Algebr> lol
ghostpl_ has joined #ocaml
<dmbaturin> Drup: What does printf use instead of magic now?
<Drup> dmbaturin: gadt
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
Denommus has quit [Ping timeout: 245 seconds]
<Drup> the only magic part is detecting that a string is not a string, but a format
<dmbaturin> I still don't understand GADTs. Are there any simple but practical examples to learn from?
<Drup> but really, we could drop that
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
<dmbaturin> Well, not necessarily practical, but with clear motivation.
<Drup> huum
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
darkf has quit [Quit: Leaving]
pakchoi2 has joined #ocaml
<Algebr> wow, hot out the kitchen
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
<dmbaturin> Drup: Thanks, will read now.
pakchoi2 has quit [Max SendQ exceeded]
psy_ has joined #ocaml
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
psy_ has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
psy_ has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ocaml
pakchoi2 has left #ocaml [#ocaml]
Denommus` is now known as Denommus
<freling> I starting a Game Boy emulator in OCaml and I was wondering how to model the CPU. I'm thinking about using an object but I wonder if there is a more "functional" way to do it
<zozozo> freling: as a module ?
<freling> So all the registers, etc, as a record in a module? And then just functions to manipulate the "cpu" record?
<zozozo> for instance
<freling> I'm quite used to C++ and I don't want to fall in the trap of making everything an object
<Drup> A module seems weird
<zozozo> well, here basically, you want something with a current state and transition functions (more or less) from a state to another state, right ?
<Drup> I would just do a record
<Drup> (+ auxiliary functions)
<Drup> you need an object when you want open recursion and/or inheritence
<Drup> you don't need that for your CPU
<freling> Worth a try, I'll go with records
<Drup> you just want one big thing with lot's of mutable fields
<freling> Yeah, I read that in Real World OCaml and I was wondering "if I don't need these features, is an object still suited"
<Drup> (technically, you could do an immutable CPU, but I'm not sure it's worth the bother)
<Drup> (you could do awesome backtracking execution, though :D°
<freling> But a record with mutable fields and aux. functions seems to describe an object
<freling> :D I could, but I'll keep it simple
kapil___ has quit [Quit: Connection closed for inactivity]
<flux> I wouldn't probably try to do a 'functional' (ie. immutable) CPU emulator, unless it provides some tangible benefit (ie: ability to efficiently store CPU snapshots for purposes of rewinding back&forth emulation history)
<Drup> yeah, I agree
<dmbaturin> That can make a conference paper I guess. :)
<Drup> I'm sure some haskeller did it
<ggole> Immutable machine state might be interesting for a path-sensitive debugger
<ggole> Smart fuzzers like AFL work a bit like that (using fork under the hood)
<MercurialAlchemi> wonder what performance would look like
avsm has joined #ocaml
<freling> If you only store n states and reuse old ones, it should be doable
<freling> For a small architecture
<dmbaturin> Most of it is going to be shared anyway, I guess.
<Drup> well, the memory is going to be very inneficient if immutable
<Drup> immutable arrays are not fabulous
<dmbaturin> Ah, yeah, I mean the CPU state. Not sure if it's any good without immutable memory.
shinnya has quit [Ping timeout: 250 seconds]
<MercurialAlchemi> I see there is a persistent array here https://www.lri.fr/~filliatr/ftp/ocaml/ds/parray.ml.html
<MercurialAlchemi> which may not be too terrible in terms of performance
thomasga has quit [Quit: Leaving.]
larhat has quit [Quit: Leaving.]
<Drup> access/modif is not in O(1)
<Drup> so ...
<MercurialAlchemi> access to the latest copy is o(1)
<Drup> right
<MercurialAlchemi> update too
<Drup> oh ?
<Drup> hum, ok
<MercurialAlchemi> you just have to be really sure you want to access an older version :)
octachron has quit [Quit: Leaving]
<MercurialAlchemi> on the other hand, it looks like this would eat all your ram very quickly
raphaelss has joined #ocaml
enquora has joined #ocaml
captain_furious1 has joined #ocaml
captain_furious has quit [Ping timeout: 240 seconds]
zpe_ has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 264 seconds]
ptc has joined #ocaml
ptc is now known as Guest33895
jneen|afk is now known as jneen
Guest33895 has quit [Ping timeout: 272 seconds]
ptc_ has joined #ocaml
leowzukw has joined #ocaml
slash^ has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc_ has quit [Ping timeout: 244 seconds]
ebzzry has quit [Ping timeout: 244 seconds]
ebzzry has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
badkins_ has joined #ocaml
badkins has quit [Ping timeout: 245 seconds]
badkins_ is now known as badkins
mengu has joined #ocaml
matason has quit [Ping timeout: 256 seconds]
mengu has quit []
<tobiasBora> Hello ! In eliom-base-app I can see that the template uses Bcrypt but I can't find it in opam
<tobiasBora> What is the "mother library" ?
slash^ has quit [Read error: Connection reset by peer]
<Drup> safepass, I would guess
<Drup> according to the opam file
MrScout has joined #ocaml
<Algebr> Drup: do you know if there's a way to increase the font size for some strings in lambda term? I'm not seeing anything suggestive in styles related code
<Drup> no, because has a terminal application, you don't have control over that
<Algebr> Oh i didn't know that
<tobiasBora> Drup : great thank you ! How did you find it with opam ? opam search gives me another package.
<ousado> In case you haven't seen this: http://www.tutorialspoint.com/compile_ocaml_online.php
<ousado> provides a powerful (feature complete) linux shell
<ousado> instead of that web-thingy one can use vim
<tobiasBora> Drup: Oh ok ^^ Thank you !
WraithM has joined #ocaml
<Algebr> How can I pass a Unicode U+something so that it shows up correctly in Zedutf8, is there like a "\uU01234"?
<Drup> give the int dirrectly, with UChar.of_int ?
swgillespie has joined #ocaml
bytbox has joined #ocaml
avsm has quit [Quit: Leaving.]
jwatzman|work has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
mort___ has joined #ocaml
leowzukw has quit [Remote host closed the connection]
jgjl has quit [Ping timeout: 264 seconds]
dsheets has quit [Ping timeout: 255 seconds]
ggole has quit []
q66 has joined #ocaml
mort___ has quit [Quit: Leaving.]
tane has quit [Remote host closed the connection]
ptc_ has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
olauzon has joined #ocaml
dsheets has quit [Client Quit]
dsheets has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
malc_ has joined #ocaml
Submarine has joined #ocaml
thomasga has joined #ocaml
Haudegen has joined #ocaml
bytbox has quit [Ping timeout: 246 seconds]
Kakadu has joined #ocaml
paradoja has quit [Ping timeout: 240 seconds]
raphaelss has quit [Quit: leaving]
<Anarchos> i got this one, while compiling merlin through opam : «http://pastebin.com/RmiXvhfG»
<Anarchos> i got this one, while compiling merlin through opam : «http://pastebin.com/RmiXvhfG»
<Anarchos> i got this one, while co mpiling merlin through opam : «http://pastebin.com/RmiXvhfG»
<Anarchos> i got this one, while compiling merlin through opam : http://pastebin.com/RmiXvhfG
<Drup> you do realize you are repeating yourself ?
MercurialAlchemi has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Remote host closed the connection]
<dmbaturin> Drup: I think I sort of understand GADTs after reading that article.
larhat has joined #ocaml
Denommus has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
moei has joined #ocaml
reem has joined #ocaml
bytbox has joined #ocaml
manud has joined #ocaml
manud has quit [Client Quit]
manud has joined #ocaml
BitPuffin has quit [Ping timeout: 240 seconds]
cthuluh has quit [Ping timeout: 255 seconds]
oscar_toro has joined #ocaml
Denommus has joined #ocaml
Submarine has quit [Remote host closed the connection]
Jefffrey has quit [Quit: Leaving...]
mort___ has joined #ocaml
bytbox has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
<Anarchos> Drup i had a typography problem with my french guillemets.
cthuluh has joined #ocaml
ghostpl_ has joined #ocaml
cthuluh has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Remote host closed the connection]
<smondet> Anarchos: if you like to be superpicky, your quotation marks there are french-swiss or spanish; the french-french ones need a small unbreakable space :)
ghostpl_ has joined #ocaml
<Anarchos> smondet which i don't know how to type on my IRC client :)
<dmbaturin> freling: AVR can be a good candidate for a fully persistent simulator. Most of the memory is immutable in very literal sense. :)
<dmbaturin> smondet: Wow, I'm not the only typography freak here! ;)
<dmbaturin> Never got a chance to typeset anything in french though, so I didn't know about french-french quotes.
ontologiae has joined #ocaml
<malc_> dmbaturin: http://xkcd.com/1015/
aubergines has quit [Remote host closed the connection]
cthuluh has joined #ocaml
<Anarchos> dmbaturin neither me :D
<smondet> dmbaturin: Anarchos http://en.wikipedia.org/wiki/Quotation_mark I can't find any combination missing...
<malc_> dmbaturin: 'orror
<def`> Anarchos: that's normal, however the compiler should work; ocamlc --version ?
ontologiae has quit [Ping timeout: 246 seconds]
niculina has joined #ocaml
<niculina> ciao
<niculina> !list
niculina has left #ocaml [#ocaml]
oscar_toro has quit [Ping timeout: 245 seconds]
<Anarchos> dmbaturin thanks for this excerpt. Who is the author ?
<Anarchos> def` 4.03.0+dev7-2015-02-08
avsm has joined #ocaml
<def`> Anarchos: no support for experimental version of ocaml
reem has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
<dmbaturin> Anarchos: Uhm, what excerpt?
ontologiae has joined #ocaml
claudiuc has joined #ocaml
<Algebr> When ocamldebug complains about unbound modules, what ought one to do? ocamlfind doesn't seem to have a wrapper on it yet. I tried -I ~/.opam/packages
<dmbaturin> Anarchos: The page screnshot? I have no idea who's the author and did't even read the text, it just show a "widow"—a line separated from from the rest of the paragraph, which is a serious typesetting defect (almost a mortal sin).
reem has joined #ocaml
BitPuffin has quit [Ping timeout: 245 seconds]
<Algebr> nvm, figured it out using a workaround with ocamlfind
avsm has quit [Quit: Leaving.]
<Anarchos> def` :/
<def`> stick to 4.02.1
bytbox has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
<Anarchos> def` it is a homebrew compiled version of ocaml...
<def`> use opam
struk|work has joined #ocaml
enquora has quit [Quit: enquora]
Haudegen has quit [Ping timeout: 244 seconds]
ontologiae has joined #ocaml
Haudegen has joined #ocaml
<Anarchos> def` or "pkgman install ocaml" on my platform.
MrScout has quit [Remote host closed the connection]
<def`> …
MrScout has joined #ocaml
shinnya has joined #ocaml
MrScout has quit [Remote host closed the connection]
<Drup> dmbaturin: french typography it's much more fun that english'
<def`> :)
<Anarchos> Drup i could never learn the rules of french typo : only exceptions, no global ruling to understand...
<Drup> unbreakable spaces in weird places
<Anarchos> Drup if only the spaces... but those caps/no caps rules....
<Anarchos> Drup don't get me wrong : if well done, those documented are beautiful to read. But i am not skilled enough to do it myself. Sadly computer typesetting killed typography...
<Drup> babel french in latex enforces almost all the right typographic rules
<Drup> and doesn't enforce the silly ones that nobody applies anyway
MrScout has joined #ocaml
<dmbaturin> Computer typesetting didn't kill typography, people who think MS Word is a typesetting package did.
<Drup> :D
<struk|work> just like video killed the radio star
* dmbaturin saw people trying to send .doc's to publishing houses for printing
<Anarchos> dmbaturin taht is not so silly : publishing houses are intended to get manuscripts by post, and typeset them....
* dmbaturin was also hired by those people to typeset it after they got laughed at at the publishing house
<Drup> Anarchos: how many centuries ago ? :D
<Anarchos> Drup before Springer asked for latex submission and for cash....
<Drup> dmbaturin: to be fair, there is an issue with how publishing houses work nowadays
<Drup> I mean, they don't have to do the typesetting anymore
<Drup> but they keep charging the same amount of money
<dmbaturin> Drup: Well, good ones do, especially academic ones.
<Anarchos> anyway time to sleep.
Anarchos has quit [Quit: sleep time.]
<Drup> and they keep typesetting styles that don't make any sense if you suppose digital distribution
<dmbaturin> I can rant about their business model and knowledge monopoly for hours, but the fact remains, their typesetting is still good.
<Drup> like, double column "go fuck your eyes" 9pt
<dmbaturin> I have an idea to start a company specialized in typesetting for digital distribution and call it "@makeatletter publishing". ;)
<Drup> =')
ontologiae has quit [Ping timeout: 244 seconds]
lordkryss has joined #ocaml
WraithM has quit [Quit: leaving]
destrius has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
reem has joined #ocaml
captain_furious1 has quit [Ping timeout: 272 seconds]
cdidd has quit [Ping timeout: 264 seconds]
mort___ has quit [Quit: Leaving.]
larhat has quit [Quit: Leaving.]
Kakadu has quit [Remote host closed the connection]
cdidd has joined #ocaml
uris77 has quit [Quit: leaving]
mabino-pyon has quit [Quit: I'm sorry but... I don't have any interest in three-dimensional girls.]
idem-pyon-tent has joined #ocaml
grb has joined #ocaml
thomasga has quit [Quit: Leaving.]
olauzon has quit [Quit: olauzon]
Denommus has quit [Quit: going home]
Algebr has quit [Ping timeout: 256 seconds]
Algebr has joined #ocaml
antkong has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]