Re: [fonc] Incentives and Metrics for Infrastructure vs. Functionality

2013-01-04 Thread Ondrej Bilka
On Thu, Jan 03, 2013 at 11:33:53AM -0700, Marcus G. Daniels wrote:
 On 1/2/13 1:49 AM, Ondřej Bílka wrote:
 A better example is that you have c code where at several places
 is code for inserting element into sorted array and using that
 array. What should you do. CS course taugth us to use red-black
 tree there. Right? Well not exactly. When one looks how is this
 code used it discovers that first occurence is shortest path
 problem so radix heap is appropriate. Second does not use ordering
 so hash table is more appropriate. Third periodicaly generates
 webpage from sorted data so keeping new data in separate buffer
 and calling sort from generating routine looks best. Finally
 fourth, original contains a comment: /* Used to find closest value
 to given value. Profiling shown this accounted to 13% of time. As
 updates are rare (not changed in previous year) using more
 sophisticated structures than binary search is
 counterproductive.*/
 I imagine a process like this:
 
 First create a generic container type, say a Map, for the array and
 a lookup and traversal routine.
 
 If performance matters, profiling will reveal that certain uses are
 more conspicuous than others.
Profiling will reveal that you spend 5% time in insert and 3% time in 
remove. You spend two weeks optimizing your tree and memory allocator 
for it. 
 
 Inspection of those uses will suggest refinement of the Map to drop
 the traversal and/or lookup routines, and thus diversification of
 the types to an ordered or unordered sets.  Distinguishing between
 integer and more expensive comparisons might motivate introduction
 of Patricia trees (for integer sets).

And thats exactly a problem I am talking about. Person that writes 
structures will not notice that what he writes is not needed and 
introduce much more problems by adding patricia trees etc.
A person who uses that structure will not notice that he can do it more
effectively without these structures because performance details were 
abstracted away.
Note that in my examples each uses some special property that is not 
worth abstracting because its quite narrow use case. 
 
 Maybe I'm losing sight of the question at hand.  I'm just saying
 that going maximally generic at first will motivate appropriate
 specialization of the abstractions.   The opposite approach of
 specialized inline implementations, built from scratch in different
 apps or even different modules of the same app has a higher risk of
 creating frozen accidents.
 
 Marcus
 
 
 
 
 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Current topics

2013-01-04 Thread Eugen Leitl
On Thu, Jan 03, 2013 at 08:27:53PM -0500, Miles Fidelman wrote:

 you might want to google biological computing - you'll start finding  
 things like this:
 http://www.guardian.co.uk/science/blog/2009/jul/24/bacteria-computer  
 (title: Bacteria make computers look like pocket calculators)

Computing with solvated linear biopolymers is really disadvantaged
in relation to moving electrons, photons, plamons, or flipping
spins. You sure have a lot of parallellism, but the linear chain
and viscous drag severely limits the possible rate of sampling.

Fundamentally you could eventually self-assemble a crystal of ~nm^3 sized
cells capable of processing/storing a single bit which would be
a provably optimal classical computer. Such a thing would make 
biology look like infinitesimal beer.

 Think massively parallel/distributed  computation focused on organism  
 level survival and behavior.  If you want to program colonies of nano  
 machines (biological or otherwise), you're going to have to start  
 thinking of something a very different kinds of algorithms, running on  
 something a lot more powerful than a small cpu programmed in c.

Obviously you need to be able to design emergent behaviour on the
edge of chaos, which is resilient/gracefully degrading (it pretty
much has to, due to noise floor and device failure) but also
nondeterministic. 

This is something which humans are really terrible at, so they
need to figure out how to make machines design such machines.

 Start thinking billions of actors, running on highly parallel hardware,  
 and we might start approaching what cells do today.  (FYI, try googling  
 micro-tubules and you'll find some interesting papers on how these  
 sub-cellular structures just might act like associative arrays :-)

You're probably referring to Penrose-Hameroff, which is pretty much
kook science.
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Incentives and Metrics for Infrastructure vs. Functionality

2013-01-04 Thread Ondrej Bilka
On Thu, Jan 03, 2013 at 01:07:55AM +0100, Loup Vaillant-David wrote:
 On Tue, Jan 01, 2013 at 11:18:29PM +0100, Ondřej Bílka wrote:
  On Tue, Jan 01, 2013 at 09:12:07PM +0100, Loup Vaillant-David wrote:
   
 void latin1_to_utf8(std::string  s);
   
  Let me guess. They do it to save cycles caused by allocation of new
  string.
   instead of
   
 std::string utf8_of_latin1(std::string s)
   or
 std::string utf8_of_latin1(const std::string  s)
 
 You may have guessed right.  But then, *they* guessed wrong.
I often se how people blindly use performance related suggestions. Here 
it was  that passing structure by reference is faster than by value. 
(which is now sometimes false.)
 
 First, the program in which I saw this conversion routine is dead slow
 anyway.  If they really cared about the performance of a few encoding
 conversion, they should have started by unifying string handling to
 begin with (there are 6 string types in the program, all actively
 used, and sometimes converted back and forth).
 
 Second, every time the conversion does actually do anything, the utf8
 string will be longer than the original one, and require a realloc()
 anyway (unless they wrote some very clever code, but the overall
 quality of their monstrosity makes it unlikely).
 
 Finally, I often needed to write this:
 
   std::string temp = compute_text();
   latin1_to_utf8(temp);
   call_function(temp);
 
 Which does not reduce allocations in the slightest, compared to
 
   call_function(utf8_of_latin1(compute_text()));
 
 My version may even be a bit more amenable to optimisation by the
 compiler. (In addition to be more readable, I dare say.)
 
 So, they *may* have made this move because they cared about
 performance.  A more likely explanation though, is that they simply
 thought oh, I need to convert some strings to utf8, and
 transliterated that in C++.  They could have thought oh, I need utf8
 versions of some strings instead, but that would be functional
 thinking.
 
 Loup.
 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Incentives and Metrics for Infrastructure vs. Functionality

2013-01-04 Thread Marcus G. Daniels

On 1/4/13 4:04 AM, Ondrej Bilka wrote:

Profiling will reveal that you spend 5% time in insert and 3% time in
remove. You spend two weeks optimizing your tree and memory allocator
for it.
The call tree, accumulating these costs in different parent contexts, 
when correlated to the fact that (presumably) the containers being acted 
upon are different containers, can suggest a change to a specialized 
container type depending on the access pattern...


Marcus
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Incentives and Metrics for Infrastructure vs. Functionality

2013-01-04 Thread Alan Moore
I have been looking at Datomic/Datalog which abstracts away the container
entirely and focuses simply on entity, attribute, value + time deltas. In
theory, the underlying container(s) could adjust to optimize for typical,
and possibly changing, usage patterns. Worth a look and some consideration
:-)

Alan M.



On Fri, Jan 4, 2013 at 7:48 AM, Marcus G. Daniels mar...@snoutfarm.comwrote:

 On 1/4/13 4:04 AM, Ondrej Bilka wrote:

 Profiling will reveal that you spend 5% time in insert and 3% time in
 remove. You spend two weeks optimizing your tree and memory allocator
 for it.

 The call tree, accumulating these costs in different parent contexts, when
 correlated to the fact that (presumably) the containers being acted upon
 are different containers, can suggest a change to a specialized container
 type depending on the access pattern...


 Marcus
 __**_
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/**listinfo/fonchttp://vpri.org/mailman/listinfo/fonc




-- 
*Whatever you can do, or dream you can do, begin it. Boldness has genius,
power, and magic in it. Begin it now.* - *Goethe*
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Final STEP progress report?

2013-01-04 Thread Mathnerd314

On 11/7/2012 4:37 PM, Kim Rose wrote:

Hello,

For those of you interested and waiting -- the NSF (National Science Foundation) funding 
for the 5-year STEPS project has now finished (we stretched that funding to 
last for 6 years).  The final report on this work will be published and available on our 
website by the end of this calendar year.
It's four days past the end of the calendar year, and I don't see a 
final report: http://www.vpri.org/html/writings.php


Am I looking in the wrong place? Or will it be a few more days until 
it's published?


-- Mathnerd314
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Final STEP progress report?

2013-01-04 Thread Alan Kay
It turns out that the due date is actually a due interval that starts Jan 
1st and extends for a few months ... so we are working on putting the report 
together amongst other activities ...

Cheers,

Alan




 From: Mathnerd314 mathnerd314@gmail.com
To: Fundamentals of New Computing fonc@vpri.org 
Sent: Friday, January 4, 2013 8:43 AM
Subject: Re: [fonc] Final STEP progress report?
 
On 11/7/2012 4:37 PM, Kim Rose wrote:
 Hello,
 
 For those of you interested and waiting -- the NSF (National Science 
 Foundation) funding for the 5-year STEPS project has now finished (we 
 stretched that funding to last for 6 years).  The final report on this work 
 will be published and available on our website by the end of this calendar 
 year.
It's four days past the end of the calendar year, and I don't see a final 
report: http://www.vpri.org/html/writings.php

Am I looking in the wrong place? Or will it be a few more days until it's 
published?

-- Mathnerd314
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Final STEP progress report?

2013-01-04 Thread Dale Schumacher
Kind of like music starts at 9pm :-)

We're all anxious to see the results of your work.  Thanks (in
advance) for sharing it.

On Fri, Jan 4, 2013 at 10:51 AM, Alan Kay alan.n...@yahoo.com wrote:
 It turns out that the due date is actually a due interval that starts
 Jan 1st and extends for a few months ... so we are working on putting the
 report together amongst other activities ...

 Cheers,

 Alan

 
 From: Mathnerd314 mathnerd314@gmail.com
 To: Fundamentals of New Computing fonc@vpri.org
 Sent: Friday, January 4, 2013 8:43 AM
 Subject: Re: [fonc] Final STEP progress report?

 On 11/7/2012 4:37 PM, Kim Rose wrote:
 Hello,

 For those of you interested and waiting -- the NSF (National Science
 Foundation) funding for the 5-year STEPS project has now finished (we
 stretched that funding to last for 6 years).  The final report on this work
 will be published and available on our website by the end of this calendar
 year.
 It's four days past the end of the calendar year, and I don't see a final
 report: http://www.vpri.org/html/writings.php

 Am I looking in the wrong place? Or will it be a few more days until it's
 published?

 -- Mathnerd314
 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc



 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Final STEP progress report?

2013-01-04 Thread Alan Kay
Sliding deadlines very often allow other pursuits to creep in ...

Cheers,

Alan




 From: Dale Schumacher dale.schumac...@gmail.com
To: Alan Kay alan.n...@yahoo.com; Fundamentals of New Computing 
fonc@vpri.org 
Sent: Friday, January 4, 2013 8:59 AM
Subject: Re: [fonc] Final STEP progress report?
 
Kind of like music starts at 9pm :-)

We're all anxious to see the results of your work.  Thanks (in
advance) for sharing it.

On Fri, Jan 4, 2013 at 10:51 AM, Alan Kay alan.n...@yahoo.com wrote:
 It turns out that the due date is actually a due interval that starts
 Jan 1st and extends for a few months ... so we are working on putting the
 report together amongst other activities ...

 Cheers,

 Alan

 
 From: Mathnerd314 mathnerd314@gmail.com
 To: Fundamentals of New Computing fonc@vpri.org
 Sent: Friday, January 4, 2013 8:43 AM
 Subject: Re: [fonc] Final STEP progress report?

 On 11/7/2012 4:37 PM, Kim Rose wrote:
 Hello,

 For those of you interested and waiting -- the NSF (National Science
 Foundation) funding for the 5-year STEPS project has now finished (we
 stretched that funding to last for 6 years).  The final report on this work
 will be published and available on our website by the end of this calendar
 year.
 It's four days past the end of the calendar year, and I don't see a final
 report: http://www.vpri.org/html/writings.php

 Am I looking in the wrong place? Or will it be a few more days until it's
 published?

 -- Mathnerd314
 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc



 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc



___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Final STEP progress report?

2013-01-04 Thread Carl Gundel
So, now that the NSF project is finished, does this mean that you are now
unbounded by it and can take your research in some new direction that you
didn't envision when you started, or are you going to continue exactly on
the same path?

 

-Carl Gundel

 

From: fonc-boun...@vpri.org [mailto:fonc-boun...@vpri.org] On Behalf Of Alan
Kay
Sent: Friday, January 04, 2013 11:51 AM
To: Fundamentals of New Computing
Subject: Re: [fonc] Final STEP progress report?

 

It turns out that the due date is actually a due interval that starts
Jan 1st and extends for a few months ... so we are working on putting the
report together amongst other activities ...

 

Cheers,

 

Alan

 


  _  


From: Mathnerd314 mathnerd314@gmail.com
To: Fundamentals of New Computing fonc@vpri.org 
Sent: Friday, January 4, 2013 8:43 AM
Subject: Re: [fonc] Final STEP progress report?


On 11/7/2012 4:37 PM, Kim Rose wrote:
 Hello,
 
 For those of you interested and waiting -- the NSF (National Science
Foundation) funding for the 5-year STEPS project has now finished (we
stretched that funding to last for 6 years).  The final report on this work
will be published and available on our website by the end of this calendar
year.
It's four days past the end of the calendar year, and I don't see a final
report: http://www.vpri.org/html/writings.php

Am I looking in the wrong place? Or will it be a few more days until it's
published?

-- Mathnerd314
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc



___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc