From rubyforge at lokorin.org Mon Aug 6 06:05:10 2007
From: rubyforge at lokorin.org (Andreas Launila)
Date: Mon, 06 Aug 2007 12:05:10 +0200
Subject: [gecoder-devel] Website - graphic design
In-Reply-To: <46AF8EDA.3040200@lokorin.org>
References: <468A8EC1.2060109@lokorin.org> <46AF8EDA.3040200@lokorin.org>
Message-ID: <46B6F256.2070300@lokorin.org>
Andreas Launila wrote:
> * The breaking of the header's gray directly to the white seems too
> direct, a small gradiant might make it less distracting.
> * The logo was meant to be a ruby with a constraint/restraint across it,
> I'm not sure how well it comes across though. Better logo suggestions,
> or someone better at creating them would be good.
> * I have trouble balancing relative font sizes and margins to make
> things readable. I'm sure that someone better at it could tweak the
> headers and margins to improve the readability.
> * The summary (might not exist on every page) should perhaps be
> distinguished with something other than font size (it's slightly larger
> than the other text). Perhaps it should be contained in a box or have a
> divider below it.
> * The right column feels too light compared to the left. Something could
> perhaps be done with the navigation links or something could be added to
> it. Perhaps the search box should be below the navigation?
> * Perhaps a non-white background would improve? I.e. the text would be
> on white background but the currently empty space to the right and left
> would have some other color.
Here's a version with a non-white background turning into white:
http://lokorin.org/gecoder/concept2.png
It's hardly noticeble but it reduces the contrast between the header and
the body. I tried other variants too such as sidelines of other colors
and a more direct gray to white gradiant, but they did not work
especially well (mainly because of the open tab).
I have not found a better way to represent the secondary navigation, but
the layout with a search box on top seems better than to have it below
the navigation (mainly because it's small and offsets the attention of
the secondary navigation relative the site title and summary, so that
they do not compete).
I will implement the above and then update it when better designs are found.
--
Andreas Launila
From rubyforge at lokorin.org Tue Aug 7 18:20:56 2007
From: rubyforge at lokorin.org (Andreas Launila)
Date: Wed, 08 Aug 2007 00:20:56 +0200
Subject: [gecoder-devel] The next steps
In-Reply-To: <4663E535.4090601@lokorin.com>
References: <463F8818.8080500@lokorin.com> <465A9DC8.7090702@lokorin.com>
<465B431E.7010503@lokorin.com>
<465D8011.3030702@lokorin.com>
<4661A7DE.9030901@lokorin.com>
<4663E535.4090601@lokorin.com>
Message-ID: <46B8F048.4040604@lokorin.org>
This is a list of possible next steps/ideas. Please add anything you can
think of (and comment on the current ones):
== Implement all/some of the missing constraints
Six groups of Gecode constraints remain[1]. The first hurdle is to find
suitable (readable) syntaxes for them (sequence and convexity should be
rather straight forward, the rest might require some more thought). The
regular constraint will require some additional porting of the related
DFA and REG classes.
== More reification sugar
The current reification sugar only allows expressing that either one or
all of several reifiable constraints must hold. An improvement would be
to also allow the user to specify that n constraints must be satisfied.
== Gecode 2.0
I'm told that Gecode 2.0 might be released somewhere around the middle
of August. Hence it's probably a good idea to start a branch designed to
run against the Gecode trunk sometime before that (or we could wait for
the release and adapt afterwards).
The first step would be to get the specs to pass against 2.0, the second
would be to add support for the various new features.
== Include Gecode in a gem
It might be nice to create an alternative gem distribution where Gecode
is compiled automatically when the Gecode/R gem is installed. It would
perhaps make the installation smoother for a new user who wants to try
out constraint programming with Gecode/R but don't want to go through
the process of installing an additional library first.
The current distribution line would of course remain. So in essence a
Ruby user who has not previously install Gecode would do
gem install gecoder-with-gecode
and someone who already has Gecode installed would do the normal
gem install gecoder
== Add custom branching and propagators
This probably means adding support for templates to Rust or extending
Propagator[2].
== Add shorter ways of describing a model
As suggested during the syntax discussion[3] a DSL wrapper might be a
nice alternative to declaring an entire class.
magic_square = problem do |model|
# ...
end
The above is an example taken from that mail, other variants should be
explored.
One thing to consider with such a wrapper is how one is supposed to
retrieve the assigned variable. A simple solution might be to add a
method to model which defines accessors for specified variables, or have
some sort of argument to #problem.
== Extended sugar
Gecode/R currently has a set of composite constraints which are given a
limited amount of sugar. In essence it allows one to write things such as
int_enum.min.must > int_var
rather than to have to write something like
tmp = int_var(int_enum_range)
int_enum.min.must == tmp
tmp.must > int_var
The idea would be to extend that further so that any constraint which
can be used to constrain equality with a variable of type T is able to
replace a variable of type T when used elsewhere. For example:
(int_enum.min + int_enum.max).must > int_var
would be sugar for
tmp1, tmp2 = int_var_array(2, int_enum_range)
int_enum.min.must == tmp1
int_enum.max.must == tmp2
(tmp1 + tmp2).must > int_var
Would such sugar would have any practical use? A potential problem with
it is that the user would no longer have any idea of how many
propagators a statement is creating (assuming that the user is not
familiar with the implementation).
Technically it should be easy to implement in the case when the partial
constraint is the receiver (by creating and delegating to a temporary
variable when needed). A problem comes when the partial constraint is
not the receiver:
int_var.must == int_enum.min
Handling that in a tidy fashion would probably require altering all
constraints to use a new specific method for binding an expression as a
variable of a specific type (much like #to_int_var_array,
#to_set_var_array, ...). An alternative approach, although probably too
sloppy in comparison, would be to change the partial constraints'
#kind_of? (to pretend to be e.g. an FreeIntVar) and add #bind (returning
the temporary variable).
[1] http://gecoder.rubyforge.org/features.html
[2] http://www.gecode.org/gecode-doc-latest/classGecode_1_1Propagator.html
[3] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/254477
--
Andreas Launila
From rubyforge at lokorin.org Tue Aug 7 18:35:42 2007
From: rubyforge at lokorin.org (Andreas Launila)
Date: Wed, 08 Aug 2007 00:35:42 +0200
Subject: [gecoder-devel] The next steps
In-Reply-To: <46B8F048.4040604@lokorin.org>
References: <463F8818.8080500@lokorin.com>
<465A9DC8.7090702@lokorin.com> <465B431E.7010503@lokorin.com> <465D8011.3030702@lokorin.com> <4661A7DE.9030901@lokorin.com> <4663E535.4090601@lokorin.com>
<46B8F048.4040604@lokorin.org>
Message-ID: <46B8F3BE.1000805@lokorin.org>
Andreas Launila wrote:
> I'm told that Gecode 2.0 might be released somewhere around the middle
> of August.
That should be September, not August.
--
Andreas Launila
From rubyforge at lokorin.org Thu Aug 9 12:37:12 2007
From: rubyforge at lokorin.org (Andreas Launila)
Date: Thu, 09 Aug 2007 18:37:12 +0200
Subject: [gecoder-devel] Website - graphic design
In-Reply-To: <46AF8EDA.3040200@lokorin.org>
References: <468A8EC1.2060109@lokorin.org> <46AF8EDA.3040200@lokorin.org>
Message-ID: <46BB42B8.2010102@lokorin.org>
Andreas Launila wrote:
> Here's something I threw together: http://lokorin.org/gecoder/concept.png
>
The design has now been implemented and uploaded. It has been tested
with Firefox 2.0, Konqueror 3.5 and IE6 (running under wine).
Please alert me if something looks wacky in some browser, for reference
it should look something like this:
http://lokorin.org/gecoder/implemented.png
--
Andreas Launila
From rubyforge at lokorin.org Tue Aug 14 09:25:58 2007
From: rubyforge at lokorin.org (Andreas Launila)
Date: Tue, 14 Aug 2007 15:25:58 +0200
Subject: [gecoder-devel] The next steps
In-Reply-To: <46B8F048.4040604@lokorin.org>
References: <463F8818.8080500@lokorin.com>
<465A9DC8.7090702@lokorin.com> <465B431E.7010503@lokorin.com> <465D8011.3030702@lokorin.com> <4661A7DE.9030901@lokorin.com> <4663E535.4090601@lokorin.com>
<46B8F048.4040604@lokorin.org>
Message-ID: <46C1AD66.8070202@lokorin.org>
Andreas Launila wrote:
> This is a list of possible next steps/ideas. Please add anything you can
> think of (and comment on the current ones):
>
Another one:
Move the Ruby-layer on top of the bindings ("binding_changes.rb") to
C++. I.e. rewrite the C++ Gecode extention to have the behavior that the
Ruby-layer provides (then remove the latter).
--
Andreas Launila
From rubyforge at lokorin.org Wed Aug 15 12:48:15 2007
From: rubyforge at lokorin.org (Andreas Launila)
Date: Wed, 15 Aug 2007 18:48:15 +0200
Subject: [gecoder-devel] The next steps
In-Reply-To: <46B8F048.4040604@lokorin.org>
References: <463F8818.8080500@lokorin.com>
<465A9DC8.7090702@lokorin.com> <465B431E.7010503@lokorin.com> <465D8011.3030702@lokorin.com> <4661A7DE.9030901@lokorin.com> <4663E535.4090601@lokorin.com>
<46B8F048.4040604@lokorin.org>
Message-ID: <46C32E4F.5070907@lokorin.org>
Andreas Launila wrote:
> This is a list of possible next steps/ideas. Please add anything you can
> think of (and comment on the current ones):
>
Here are some more things to do/improve. They resulted from a discussion
with the Gecode developers Guido Tack and Mikael Lagerkvist.
== BAB search
BAB-search is commonly only used to maximize or minimize single
variables. Therefore it would probably make sense to add convenience
methods for that.
solution = model.maximize! money
== Custom search engines
The syntax used for creating custom search engines could be separate
from the modeling syntax. Support for custom search engines is low on
the priority list though.
> == Add custom branching and propagators
>
Custom propagators could be implemented by extending Propagator so that
it contains one array per variable which hold the propagators variables
on the C++ side. One then implements UnaryPropagator etc on the Ruby side.
A desirable thing would be to make it impossible to write a propagator
that crashes Gecode. Propagators in Ruby will be much slower than those
in C++. The primary use will therefore be fast prototyping, checking how
much a propagator prunes. Hence details that only serve to slightly
optimize the propagation can be skipped.
== Set creation
Make set creation support enums of cardinalities.
== Sugar optimization
* The temporary variables created by sugar should not be stored in the
spaces.
* Multiple references to the same sugar expression should use the same
temporary variable (e.g. (x.abs + x.abs).must == 4 should only result in
one temporary variable).
== Windows installer
Making sure that Gecode/R can be easily installed on Windows should be a
fairly high priority.
== Logo
Using Gecode's logo with a ruby was suggested. Apparently the logo is
under Gecode's license, but I'm yet to confirm that. Another question is
whether the colors would fit the current website design.
--
Andreas Launila