To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10270
10269  |  10271
Subject: 
Re: What mailing list for Peeroml ?
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 20 Sep 2005 05:48:36 GMT
Viewed: 
2491 times
  
Hi again,


People e-mail me questions about Peeroml.

Considering i don't send the program and it can't be downloaded anywhere,
politeness invites me to answer these questions here (as people privately asking
are certainly reading this forum).


Is this a program that essentially lets you build in ldraw and then
tells you whether you can build it with your own collection?


Yes it does, but not essentially.
It has a multi-layer architecture.

Layer 0, validity operations:

* as you can define your own inventory by exhaustively listing all bricks, some
automatic checks are silently applied that detect any inconsistency in your
definition (such as a negative brick quantity or a brick multiple-inventoried)
* these checks are also applied to built-in inventories, so no inventory, even
the Peeron ones, escape the iron fist of the consistency check

Layer 1, the inventory algebra, provides basic operations on inventories:

* math operations (union, intersection, substraction, difference, inclusion,
scaling, division)
* sometimes not all the validity checks are applied for the sake of efficiency
* a rather exhaustive family of inventory comparators (equality, inequality,
discriminate 2 inventories according which one best covers a 3rd one)
* other basic operations (loading from a LDraw file, defining an inventory by
extension, paint an inventory in a single color, remove a single part, remove
mold variants)
* of course, by default, all inventories are color sensitive

Layer 2, provides inventory hierarchies:

* models as inventories tagged with informations (name, theme, date, size,
homepage, number of minifigs)
* grouping operations (catalogs as model lists, modules as catalog repositories)
* operations on catalogs (merging catalogs, filtering a catalog, compare 2
catalogs)
* catalog iterators (apply one opeation to all models in a catalog)
* catalog consistency checks are also silently applied, but in a systematic
manner without exception
* predefined usefull catalogs (ripped-off from Peeron.com), tagged with adequate
information, currently:

- 13 Space themes (Classic Space, Blacktron I, Futuron, Space Police I, M-Tron,
Blacktron II, Space Police II, Ice Planet 2002, Spyrius, Unitron, Exploriens,
Roboforce, Insectoids)

- 10 Castle themes (Classic Castle, Forestmen, Black Knights, Black Falcons,
Crusaders, Wolfpack, Dragon Masters, Dark Forest, Royal Knights, Fright Knights)

- 5 Aquazone themes (Aquanauts, Aquasharks, Aquaraiders, Hydronauts, Stingrays)

- 18 Classic Star Wars sets

- 21 Accessory sets

- Some MOCs by me and by Tony Hafner (thank you Tony)

And more was being added when Dan Boger asked me to stop here.


Layer 3, provides a filtering algebra, as the number of models increases the
amount of ouput information also increases (sometimes exponentially) and has to
be reduced by filtering:

* inventory filters (filter by name, theme, date size, homepage, size, number of
minifigs), for name, theme and homepage you can use several wildcards, for date
and size you can give minimum, maximum, a specific value, an interval or several
intervals
* more inventory filters (number of specific parts, colors, bricks)
* filter combinators (conjunction, alternative, negation)

Of course you are in an interactive programming loop, so you can always add
anything yourself at anytime from layer 0 up to layer 4 and above it.


Layer 4, is the end-user layer, if you are an OCaml beginner you will use this
layer functionality, it has only 3 functions:

* Peeroml.alternate

That's the function "Build MOCS using My Parts" at Peeron.com
Except my function does the divison, it tells you the quotient if greater than
0, so you know what MOCs you can build but also how many.

* Peeroml.collect

Given an inventory (or an LDraw file) it computes the best assortment of
official sets you need to build it. It gives you the small inventory of missing
parts you have to purchase individually plus the inventory of overbudget parts.

You are not starting from scratch, you have a lego collection.
So usually you want to apply (LDraw file minus "My Parts") as an argument so
that the function only treats the parts you are really missing.

One other thing i have not mentionned: the inventory operations are generic and
does not only apply to brick lists but to anything. The Peeroml.collect primary
result is a set assortment, that is an inventory of sets (give me 1x "Cosmic
Fleet Voyager" + 2x "Space Shuttle" + 1x "Sonar Transmitting Cruiser" + ...). An
inventory of sets is an inventory and as such can undergo further inventory
operations (although things quickly become too abstract for most people).


* Peeroml.distribute

Much like "Build MOCS using My Parts" except it returns a MOC matrix rather than
a MOC list.
Instead of "you can build that" result:

either moc-A
or moc-B
or moc-C
or ...

You get "you can build that" result :

either moc-A1 + moc-A2 + .. + moc-An
or     moc-B1 + moc-B2 + .. + moc-Bn
or     moc-C1 + moc-C2 + .. + moc-Cn
or     ...

The function leverages your lego collection by outputing scene candidates rather
than just MOC candidates.

Note the size of the output is potentially exponential, thus you are have to use
filters to set a consistent lego theme in the matrix rows, thus you minimize the
noise and maximize the info.


i have a lot of models that I have done in ldraw but not posted
the .ldr files. Are you interested in any of these?


I am interested in all of these that cross-cut the database.
If you have an Harry Potter MOC i will be interested when the official Harry
Potter theme will be included. The functions can return meaningfull results only
if they have meaningfull input data.
Also .ldr files that contain mostly official LDraw parts are better.
If you also have alternate models thats a huge plus.


Are other builders going to be in on this as well?

I love .ldr files, send me more.
Otherwise same answer as above.
Any contribution is welcomed (each new builder will have its own module) but the
ones that do not sufficiently cross-cut the database will be not be included.
Also if you have less than 3 or 4 meaningfull contributions i will not create a
specific module, but i will still add them in a "misc" module or as .ldr only.

Note that there is no "bad" contribution, if a contribution does not qualify
that simply means the Peeroml database is incomplete or you use too many
unofficial parts (the LDraw library is incomplete).


Of course this a biased technical description, not a user review, i don't say
Peeroml is useful or pleasant to use, that's a subjective opinion and the real
thing could be a disappointment, whatever the apparent offered possibilities.


Thanks for reading,

damien

web page: http://perso.wanadoo.fr/alphablock/



Message is in Reply To:
  What mailing list for Peeroml ?
 
Hi lego fans, I have finished the package and documentation for Peeroml, a scripting tool and programming framework for lego inventories. Its scripting language is OCaml (URL) Of course questions about Peeroml are off-topic on existing OCaml mailing (...) (19 years ago, 17-Sep-05, to lugnet.cad.dev, lugnet.inv)

7 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR