<thelema_>
I have, and am working to figure out the magic regexes
<wmeyer```>
ok
<wmeyer```>
feel free to ask questions
<wmeyer```>
it works pretty well in the end
<thelema_>
in require_rx,
<thelema_>
isn't the grouping wrong for the ? in \\(([^)]*)\\)? i.e. doesn't the ? just apply to the final ), and not the whole parenthesized section?
<wmeyer```>
no, it will apply to the parenthesied section
<wmeyer```>
that's why this is there in a first place
<wmeyer```>
yes, possibly we should have small parsing combinator library in odb
<wmeyer```>
and proper AST for META files
<wmeyer```>
that would be great, but the goal is to make it small, so I just brute forced the problem
<thelema_>
:( I'm trying to keep it minimal. please no parsing combinator library
<wmeyer```>
once i attack the oasis dependency tracking I will add some more packages :-)
<thelema_>
I don't mind the brute force.
<wmeyer```>
it made me smile quite few times when i was testing that
<thelema_>
sometimes it's fun to switch back to ugly, dirty code after writing perfect ivory tower code.
<wmeyer```>
yes, that's why i do odb in the first place :-)
<wmeyer```>
BTW: would you mind if I try to port all the godi packages to odb?
<thelema_>
not at all.
<wmeyer```>
it might take time, they are 170 pkgs
<thelema_>
I hope that they could be put into oasis-db.
<thelema_>
<sarcasm> what, you mean they won't be ready by the release of ocaml 4.00? </sarcasm>
<wmeyer```>
yes, we should really have some policy about "distributed" packages, the problem is of course that some of them are dead but also damn useful
<thelema_>
I think you added the wrong url for deriving-ocsigen to the packages file
<wmeyer```>
that's why it's 4.0...
<wmeyer```>
wrong?
emmanuelux has quit [Remote host closed the connection]
<thelema_>
with a --squash so that the weird module meta doesn't make its way in
<wmeyer```>
ups again my fault haven't rebased - will do next time
<thelema_>
maybe we should print the detected dependencies and the kind of source it's there
<wmeyer```>
that would be good
<wmeyer```>
i could hack it later
<wmeyer```>
it would be actually good if we were consistent with all these messages, i would also favor to hide the build process, if it fails then print everything
<thelema_>
that's not bad, although maybe... hmm, how to show progress
<wmeyer```>
I would like to see that odb is quiet
emmanuelux has joined #ocaml
<wmeyer```>
well we are getting to the terminal, people like candies
<wmeyer```>
normally i use odb in dumb terminal anyway (in Emacs)
<wmeyer```>
but if that was fancy, and little bit less loud with printing logs
<wmeyer```>
the idea would be to have minimal output
<thelema_>
I'm just thinking something like printing a . for every line of output produced (or every 5, if that's too many .'s)
<wmeyer```>
that would work
<wmeyer```>
yes, sounds like a good idea
<thelema_>
hmm, something is wrong - when I do `odb --package core.package`, it says "packages to install: "
<wmeyer```>
damn
<thelema_>
maybe broken before your commit -- testing
<wmeyer```>
it works here
<thelema_>
yup, I broke it myself...
<wmeyer```>
no problem
<wmeyer```>
i was worried that i screwed up with string handling :-)
<thelema_>
hmm, something is weird - going to a version that should work doesn't fix the problem...
<wmeyer```>
did you try with pristine checkout?
<wmeyer```>
it works here, really
<wmeyer```>
either bad code or bad data
<thelema_>
possibly a problem with 4.00
<wmeyer```>
i use 3.1 here
<wmeyer```>
sorry
<wmeyer```>
3.12.1
<thelema_>
which would explain why type_conv didn't compile out of oasis_db
<wmeyer```>
haven't switched to trunk for the production
<wmeyer```>
is it working with 3.12.1?
lamawithonel has quit [Ping timeout: 240 seconds]
<thelema_>
I don't know, I'll have to reinstall it
<wmeyer```>
ok
<wmeyer```>
gtg, see you later
<wmeyer```>
night
<thelema_>
cheers
sepp2k1 has quit [Read error: Connection reset by peer]
<thelema_>
of course... my mistake
Psyclonic has left #ocaml []
lin has quit [Read error: Connection reset by peer]
avenidadebelgica has joined #ocaml
lin has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 245 seconds]
brendan has joined #ocaml
willb has quit [Ping timeout: 248 seconds]
lamawithonel has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
willb has joined #ocaml
sernin has joined #ocaml
phao has joined #ocaml
foocraft_ is now known as foocraft
eni has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
eni has quit [Ping timeout: 260 seconds]
Submarine has quit [Remote host closed the connection]
<adrien>
gah, ocmal 4 is using 64bit stuff inside my 32bit chroot
<adrien>
config/Makefile: BNG_ARCH=amd64
eni has quit [Ping timeout: 245 seconds]
phao has joined #ocaml
<adrien>
3.12.1 and 4.00 beta 2 both fail in the same places
<adrien>
first it detects my chroot ats an amd64, which it isn't
<adrien>
and then I can't find where it's supposed to #define SYS_linux or SYS_linux_elf
<phao>
is that practical ocaml book good?
<mrvn>
adrien: did you set --target in configure?
<mrvn>
adrien: or at least use linux32?
<adrien>
mrvn: no, the chroot is pure 32bit
<mrvn>
but your kernel isn't
<mrvn>
linux32 changes the personality of your kernel to say it is 32bit.
<adrien>
what's "linux32"; I have *no* idea and I've never needed it
<adrien>
and the chroot is *pure* 32bit
<adrien>
it does not know anything about amd64
<adrien>
so it's already inside a 32bit env
<mrvn>
adrien: chroot wherever uname -a
<mrvn>
linux32 is a wrapper around setarch - change reported architecture in new program environment and set personality flags
avsm has joined #ocaml
<adrien>
I wonder if had simply been very lucky and had never built myself anything arch-dependent enough
<adrien>
but I'm really surprised things fails that easily without special care
<mrvn>
adrien: How is a source supposed to find out what architecture you want to build for?
<adrien>
ah, findlib depends on camlp4
<adrien>
mrvn: there's only one that can run prorgeams and it doesn't do cross compilation
<mrvn>
adrien: no. you can run 64bit code in your 32bit chroot too.
<adrien>
true, but any test to actually run a 32bit program would fail
<mrvn>
adrien: so you want to have configure compile a small prog and try to execute it and then check what arch it is? I doubt many sources do that. Most check uname unless you specify --target.
<adrien>
and --target is not available for ocaml
<adrien>
autotools might be slow but properly written autostuff gives early and clear warnings/errors
<mrvn>
anyway, try linux32 chroot somewhere
avsm has quit [Quit: Leaving.]
<adrien>
yup, I'm going to use that, thanks; it's a bit frustrating to have to do that however
eni has joined #ocaml
osa1 has joined #ocaml
avsm has joined #ocaml
eikke has joined #ocaml
<phao>
is that practical ocaml book good?
<avsm>
no
<phao>
avsm, do you know why?
<adrien>
I'm stating to hate markus mottl
<adrien>
ocaml.info now redirects to his bitbucket.org page
<thelema_>
the version stuff really needs support from the server, and will involve some architectural changes
<thelema_>
dumping deps to a graphviz file would be amusing
<wmeyer```>
thelema_: I could do it, we could have odb.ml as core, and use some of the stuff in odb.ml as library
<wmeyer```>
thelema_: or
<thelema_>
one thing that's not on that list is tweaking the dep handling code so that instead of installing each package, and as part of that, making sure that each dep is installed
<wmeyer```>
you want to include it in odb.ml?
<thelema_>
instead, taking the plan of what to do and dep-sorting it so that there's a global plan of what to do
<thelema_>
and then executing that plan in order
<wmeyer```>
sounds like a serious but worthwile change
<thelema_>
The graphviz thing I imagine being done as a separate executable that calls odb --info to get deps
<wmeyer```>
OK, will do the dependency stuff, if you are OK with it?
<thelema_>
I'm okay with having a rewrite of the dep handling
<wmeyer```>
I think it's done in-place now
<thelema_>
make sure you're able to sanely support --force and --force-all
<wmeyer```>
rather then building a list of commands what to do
<wmeyer```>
(commands in form of AST)
<thelema_>
right now, it's just done one install at a time.
<thelema_>
to install foo, first all of its deps must be installed
foocraft has quit [Quit: leaving]
<thelema_>
meaning that if foo depends on bar, and you say "odb install foo bar", odb will start installing foo, realize that it needs bar, install bar, install foo, and then go to install bar agan (because of command line) and (unless forced) give up because bar is installed
<wmeyer```>
BTW: It would be good to work on unstable branch of odb
foocraft has joined #ocaml
<wmeyer```>
because people are constantly fetching our changes, that's good but on other hand risky
<wmeyer```>
means that I know you are carefuly merging
thelema has joined #ocaml
<thelema>
in a perfect world, it would look at the packages to install "foo bar", get their deps, and add unsatisfied deps to the TODO list, until all deps are satisfied from the TODO set
<thelema>
did you get my "perfect workd" message?
<thelema>
*world
<wmeyer```>
yes
<wmeyer```>
now
osa1 has quit [Ping timeout: 260 seconds]
<wmeyer```>
thelema: what I feel is the right thing to do, is to provide AST with deffered stuff that needs to be done, from the dependency graph
<thelema>
so two phases of making plan: 1) satisfy deps, 2) topo-sort by dep order
<wmeyer```>
and then perform some optimisations, throw out stuff that does not need to be install
<wmeyer```>
installed
<thelema>
3) execute sorted list in order
<thelema>
I don't see a reason for the "AST" to be any more than an ordered list of packages to install
thelema_ has quit [Ping timeout: 248 seconds]
<thelema>
as to optimizations, that's easy enough to do while adding - don't add anything that's already installed
<wmeyer```>
ok, will look into that
<thelema>
I see a `string Set.t` being good for the first phase, although dep-sorting the graph might take some code... Maybe just lots of brute force...
<thelema>
use a list, check for membership before prepending
<thelema>
to dep-sort, have a function that checks to see if a dep of the package is in the rest of the list
<thelema>
if so, keep in list, else put in TODO queue
<thelema>
use this function to partition the list repeatedly until everything's dep is out of list.
<thelema>
ok, now I have to go. have fun
<wmeyer```>
sounds good, because currently odb discoveres dependencies during the tour
<wmeyer```>
might take soem time to do it, cheers
benozol has quit [Quit: Konversation terminated!]
phao has joined #ocaml
Xizor has joined #ocaml
TDJACR has quit [Ping timeout: 244 seconds]
munga has quit [Ping timeout: 248 seconds]
TDJACR has joined #ocaml
eikke has joined #ocaml
benozol has joined #ocaml
munga has joined #ocaml
djcoin has joined #ocaml
eikke has quit [Ping timeout: 245 seconds]
munga has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
benozol has quit [Ping timeout: 260 seconds]
thomasga has quit [Client Quit]
thomasga has joined #ocaml
benozol has joined #ocaml
struktured has quit [Quit: No Ping reply in 180 seconds.]
struktured has joined #ocaml
tlockney has joined #ocaml
sepp2k has quit [Remote host closed the connection]
benozol has quit [Ping timeout: 244 seconds]
blinky- has quit [Quit: /quat]
eikke has joined #ocaml
benozol has joined #ocaml
lamawithonel_ has quit []
wmeyer``` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
sepp2k has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
<orbitz>
ssbr__: I bet you can do all that with phantom types
cyphase has quit [Ping timeout: 246 seconds]
<ssbr__>
orbitz: you can apparently do all that with _Java_
<orbitz>
ssbr__: Yeah, not surprised, proabbly ugly in java
<ssbr__>
probably
<orbitz>
The Java version does basically what the Ocaml phantom type version woudl do, except Ocaml lets you express it cleaner
<ssbr__>
well
<ssbr__>
_definitely_. Let's be serious.
eikke has joined #ocaml
eikke has quit [Ping timeout: 244 seconds]
munga has quit [Quit: Ex-Chat]
eni has quit [Ping timeout: 265 seconds]
<mrvn>
"If I call move on a tic-tac-toe board, but the game has finished, I should get a compile-time type-error. In other words, calling move on inappropriate game states (i.e. move doesn't make sense) is disallowed by the types."
<mrvn>
uhoh, that doesn't realy make sense. You don't want to encode the game state into thetype.
<orbitz>
Can I write sig that expressed it includes another module?
<Qrntz>
orbitz, «include module type of»?
Anarchos has joined #ocaml
<mrvn>
ssbr__: He doesn
<mrvn>
't follow hisown rules. YOu can do illegal moves, e.g. a move on a field that is already taken.
<orbitz>
Qrntz: what does that do exactly?
<orbitz>
I want to take Core.Result and some functionality to it in my own module
<Qrntz>
yes, that's what I assumed
<Qrntz>
you put «include Core.Result» in the implementation
<Qrntz>
and «include module type of Core.Result» in the interface
<orbitz>
Qrntz: many thanks
<Qrntz>
you're welcome
Submarine has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 245 seconds]
Xizor has quit []
<pippijn>
mrvn: you do want to encode the game state into the type :)
<pippijn>
mrvn: I do
<mrvn>
pippijn: not the full state, as in which field contains X, O or " ".
<pippijn>
mrvn: I want to encode as much as is cleanly possible into the types
<pippijn>
the more of my runtime semantics is known at compile time, the better
<mrvn>
You could encode it all for tic-tac-toe but anything more complex would make the type system explode.
<pippijn>
so you need to make a way to encode it cleanly
<mrvn>
pippijn: With GADTs you could have a type ('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i) t so that you can only call "move board N" if that is a valid move.
<mrvn>
But I think then you have toubles making an interactive game with that API.
<pippijn>
yes
<mrvn>
The game would already be fully played at compile time.
<pippijn>
you would prove that the game cannot be cheated
<pippijn>
which is a pretty useful property for a game
<mrvn>
I think a better API would be to have a board, a function to get a list of valid moves for that board and a method to apply one of those moves to get a fresh board. Now the trick would be to make the type of a board so that applying a move gives a new type and only a move from the list for a board can be applied to that board.
<orbitz>
Does one need to be careful when combining multiple camlp4 macros?
thomasga has quit [Quit: Leaving.]
<mrvn>
*sigh* Monday already.
<orbitz>
indeed
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
avsm has quit [Quit: Leaving.]
ftrvxmtrx has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
Submarine has quit [Quit: Leaving]
Guest58412 has quit [Quit: Lost terminal]
SanderM has quit [Remote host closed the connection]