Recent blog entries for tampe

18 Aug 2008 »

Not too close please!

Thinking about how the multiple core setup is, I realized I missed something in my internal map how computing is done on my machine, say 2 cores. Many applications have good cache hit rates but it strikes me that when you do scanning work in a stream with a sequence of modifiers you would like to have the stream nodes close to each other in order to reuse cache but not too close in order to muck with each other. For large mungling of data sure there will be a benifit on doing this.

Another thing that struck me was that perhaps working with variable sized objects might not be as stupid as I thought before, especially if your work flow is to mostly construct new lists all the time. Then you could compress your linked list for the special case when the cons cells is physically situated one after another or perhaps just close to each other. Hmm actually you could make your cpu help you in this task to really scan fast through these lists. And perhaps there are algorithm that may still let you link as you like (at the usual performance hit if it is done more often). Think scanning speed of arrays, flexibility of linked lists.

Actually contemplating about scanning and reading in a stream from RAM, doing processing on the cores in a stream like fashion you would like to use the bandwidth of the BUS between ram and cpu as efficiently as possible, can it be wise to implement help in the cpu to compress and decompress data structures?

Bullseye!!!

17 Aug 2008 »

Prototurb that fabulous Code of yours

tree-grep "^my*" code.prt | v-sed s/old/new/ | commit-to -m "Change old to new" code.prt

in tree-grep, ^ means the beginning of a list representing a node in the tree

v-sed = keeps version data, and stores the changes in the default work branch,

commit-to = commits the work-branch

Nothing new to deliver, just having this protoplasmic brain that produces some ectoplastic thoughts eg. just alien ideas to make our thoughts phone home. And you, those spooky cryptic comments i have is nothing to get scare about, it's all about creativity and the fun it represent.

I've not been lazy, but I'm searching for the toolbox and the format of how I would like to do development. It has for the 6 past months actually been a constant flux of creativity and I learned a lot. I hope that I can start to get ready to knit together at least prototypes so that others can share the fun.

Let's recycle the proto stuff, I mention leo,git,python and Lisp in the previous post and prototyped a little about the git,lisp and python association in the beginning, what about leo, the leo maintainer arguments that when developing and fixing a Bug It is nice to collect the bit's that are associated with the Bug and work on it in that environment. Now, you might disslike that method but it does something interesting, it documents very effectively the Bug without doing any comments at all and will probably help the next person fixing the Bugs that the referred bugfix will introduce. I'm not eating this dogfood though but I can imagine it beeing useful so I included it.

The problems with associations of cause is that you don't transmit what you see and it's not exact, but It do let people think for themselves and the intention is of cause to be overrun with better ideas or arguments.

And to be exact all this is free thoughts about what our environment would look like if there was a imposed structure on our files and what that structure might bring and look like

Let's think, some mentioned gnu screen together with git and file systems, cool. I associate gnu screen with a state that you can hook into, work (with/in) that state, and than log out. This interpreted in a datastructure could be that you are working for example with different branches of the datastructure in different screen sessions, e.g. what you do in one screen session should not interfere with what you do in another screen session until you do a merge if that is what you wan't. if you do not merge but quits a GC perhaps needs to kick in and clean the stuff up.

It all boils down, in the end, to one thing, A Smile )

15 Aug 2008 »

Leo Git Python Lisp and the holy file system

Leo - being able to make new views of data from other files - treating data as a tree

Git - Content tracking anno 2008,

Python - Batteries Included

Lisp - Code is a AST

What If the basic data-structure of content was richer in this direction and all our tools needed to comply with that format - What if all our activities ended up being transforms, sources and sinks for this format. What If all containers was built from this format as a building block. I'm just thinking these thoughts and noting XML ...

For example how would present this file in a shell? insert links to other parts? skip markup?

What kind of markup would always have a meaning independent of the application? I would say at least

1. Grouping and sub Groupings e.g. the basic tree representation

2. Version Data For Versioning undo redo stuff as well

3. Linkages Between files So parts of files can be embedded in other files

4. Marks that Just Mark Segments of the file

5. Metadata Tags That Correspond to usual Metadata Of file Systems files and directories.

5. Signal Marks, Sends Signals When Shown

The Task: Find the Batteries that fits this, find your python, find out about how unix would be designed

As an example, a mark is something that you typically would like to associate with a content, you don't consider the character, you consider the (character x markinfo) e.g. you build a natural framework in which the mark flows with the content inside the program. If contents ends up in a window as text the marks sits right next to it, latent or visible in some way. Consider for example a global bookmark manager, you keep bookmarks to different locations in your data. signaling to a specific bookmark should imply that the application containing that data shows a view over it.

Consider a notifier mark, when a marked word is shown, you signal that the mark is shown to an application via a callback that collects this flow of information. Now you could have a tool that associates keywords and give you links to associated material, say that you have a database of 1000 programmers, using different tools and that you have marked all keywords in your 10M lines of code, as people learn new stuff about the code and as they surf the code, the keywords will signal, and you will get patterns of how people track different notions. Just rest on the security issues with this, In the best of worlds this tool could be helpful though.

As another example I personally think that keeping code in mostly AST is good enough for programming and this means that by standardizing the tree format all tools that handles trees in a nice way will be available to your data format, actually you could consider having a live code object in a FUSE like environment and letting different tools and users work on it at the same time. being under a version control you should easily be able to collaborate. Why? Because git is tracking a tree, you could as well flavor it right into the bones of the code being just that, a tree. Actually you have to think more because the idea is that we actually use a DAG, but you could just as well assume that the content in the link belongs to the tree and as if it was immersed directly meaning that changes to the source is recognized as a change in a multitude of containers

Use your imagination what would you append to this?

Good Night!

12 Aug 2008 »

KIFS

As anyone reading this stuff have guessed, I've been hard at work coding furiously to implement quite a few mathematical algorithms in java. Never have been coded in java before and, well to be frank, it was a run against the clock, it had to function quickly (it's a bit ugly). So why did I made it in time?

I new all the algorithm by heart, I just could sit down anywhere and code the stuff out of my brain

I knew when coding the critical path and when I did not do that

KIFS (Keep It Functional Stupid) yes, whenever I was out of critical paths i just kept on filling in new data in the structures and did not try to consider them mutable I. just had one n-day bug and that was because of a muck with a mutable

KISS, I specifically choosed simpler before more optimal and complex algorithm when out of critical paths

UAS (Use Abstractions Stupid), well having a good feeling for the abstractions helps organize these stuff in the selection of the data-structures algorithm and the function decomposition of the problem

I had some great co-workers to ask specific questions

Well, having trained the brain for 30 years and having fun while doing it helps too.

Happy Coding - Cheers

8 Aug 2008 »

Not so fast, ... actually freeze

When reason about programming I find it an interesting task to just search for abstractions. I think it is rewarding. So thinking about looping I just by myself discovered the CPS style of doing continuations. I must confess that I've never bothered to understand these stuff more than reading it, saying aha to a simplistic descriptions and skimming the computer science definitions and not really get it. But playing with it my own way I now see the whole beauty of it. And you know as a byproduct I'm not scared of that Mars Monad anymore ;-).

Observation 1 CPS is the unix of looping actually I think that unix mayby should be redesigned with this stuff in mind

Observation 2 CPS makes difficult things simple

Observation 3 CPS may lead to a functional programming way of doing loops e.g. CPS(imperative loop) = functional

Observation 4 One liners in some appropriate loop DSL could do stuff that would scare young programmers to death if they approached it too close with standard functional constructs (Ask them to make an abstraction that permutes with any permutation a n-way table in optimal ordo and do it in a functional way with only lists)

Observation 5 It could be fast as well, well you could make compilers that compiles these CPS that gives you at least as performant as usual loop frameworks and get good performance if you stay close to them logically.

Observation 6 knowing the CPS by hart means that you could augment CPS, actually you could abstract this augmentation process to give your users something more direct intuitive and easy to work with heck you could abstract the optimizer in this way as well.

And hrm, you don't now what CPS are?, don't worry thats what you typically get when you want to implement the yield generator construct in python not having the yield generator construct in python.

These observations will drive and base the development of code inspections and transformation tools in my clambda project

Not knowing but seeking is the way to enlightenment ... have fun

21 Jul 2008 »

Its Cold and raining ... on the outside ...

My thoughts is shining and no angel tears can wipe my focus away, it's on the screen, it's on my mind and I'm hacking, hacking, hacking a wormhole between universes.

Relaxing a couple of days from the vacation doing some work in the garden and at work, it's now night-time and I've been hacking the last hours on a example of what I've talked about before. I've used dbus as it is pretty standard and pygtk to do a quick demo of it to show how it can work.

It's about piping out info to the shell to grep for stuff perhaps doing a automated selection or some other postprocessing like diffing or word counting. If you are interested check out gui<->shell cat and sellect demo

Actually it is not all that difficult to do and it has been a joy to use pygtk to do this, thanks. Not too many applications is written in pygtk though so my next step is to figure out how to implement this in a abi way on my ubuntu distributions version of gtk. There is possible a ton of cool hacks that can be done in a similar spirit but I'm serious, this might be geeky but it's simple and it can save you many minutes a day if it's adopted and you have the skills

Cheers!

8 Jul 2008 »

When the sun never sets

I have been hard at work, and one of the more exciting projects we have had, needed full attention. One sort of funny experience was at a conference in Kiruna located at the northern part of Sweden a couple of weeks before midsummer. I was constantly keeping one eye on the presenter and the other one on my computer screen, trying to be productive and solve those issues that has to take time and be mangled and digested in the brain. I was surprised that I could get so much out of the conference while doing so much work. After the first nights dinner, I socialized and when people started to go to bed I went straight to the room and hooked up the computer to fix one very interesting bug that I solved during the dinner. The sun was up, and I started hacking. The sun was up when I later looked at the watch, oh shit, 03:00, the bus to the conference took off at 08:00. I quickly went to bed only to discover that the curtains was way too small to keep the sunlight out. Well after a half an hour I managed to sleep only to wake up at 06:30. The sun shined straight onto my face and I could just not fall a sleep again, argh what to do, ... erg Hacking!!.

So to all you managers, If you have something that has to be done quickly before the vacations in the summer, send all of your staff to some nice resort close to the appropriate pole and make sure the curtains are small.

Anyway vacation is on and I got some spare time and then I think and play the keyboard

What strikes me is how clumsy we are using computers (I mean humans in general not hackers) It seems like a lot of people, spend time on manually looking through long lists in listboxes to figure out something. How many people in that immensely long email list are from company B. How many is from that department. I want to select all people from company C and email them specifically.

I experience these issues myself when constructing meshes for CFD. I have tons of faces and I have bothered to name them all. Then I would like to select a subset of the faces and when going to the listbox ... it is not sorted argh!!

What to do. Well I've been playing with pygtk and dbus to make a mock up. I can now send the data in the list (TreeView) to the shell, the shell can grep the subset and then pipe it back to a selection or do a wc for example. It's a hack but If all toolkits had this functionality we would see hackers showing off using these techniques and I believe that we would get ton's of input how to improve the actuall gui's. It would be a simple thing to actually hack a sellect home key, just bind a key to

gcat.py | grep "Sweden|Sverige" | gsel.py

It's late and I'm off to real vacation. Glad sommar and sleep well

13 Jun 2008 »

Oh no, I got that white thing wrapped around my keyboard

Here is one idea. If you have a comparted set of data, make it reachable as plain text

This idea is brilliant so fresh and untouched, divine in it's simplicity, make the productivity in the word jump like a happy kangaroo. Hmm, dollars, patents me profit...

... Where did I put that patent application ... find ./MyDocs --name "*atent*.tex" ... staring stupidly ... Ah shit, I'm just a young looser not knowing history.

One of the most basic feature that every application writer should add is to make it possible to parse that data with a tool set like the unix tool set. If I come to a graphical user interface and get some kind of a list-view of some data I should be able to select that view, push C-A-T and get a shell situated in a directory, in that directory I would have file(s) representing the data in the view and then be able to do whatever I imagine to do with that. implement this and you would liberate my keybord from the mental institution of ... well figure it out

Why textual representation in a shell? Well It solves 99.9 of the use cases quick enough and all the application writer has to do is ... well just recompile with gnome 2.40 or whatever that might get such a feature. That would be enough for me.

No you are wrong, you say, you should use a xml, relational databases objects spreadsheet, ...

BLOAT, the use case is not to write new applications, the use case is to do quick hacks. I do not want to count 47 rows by visual inspection of a lists I want to hack that figure in 3s.

Why the hell has not gnome,kde whatever realized this fact? I'm I stupid? Oh well, anyone here knowing how this can be realized, I can help.

Anyway I'm off relaxing, cheers

1 May 2008 (updated 1 May 2008 at 13:14 UTC) »

The power of the brain is not all about parallel execution, it's about parallel lookup

One of the mysteries of today (for me) is that we don't have parallelized memory lookups. The idea is for a threads to send a request for N memory units dereferenced at memory location Addr + 0 ... Addr + N - 1. Please increase bandwidth, don't bother so much about latancy and caches. And when we are at it, a memory unit could contain data or a reference - use that!

For example, one application that's dear to me is CFD simulations, and there inside of it I guess you need to be able to do a multiplication of a sparse matrix with a vector very quickly. The idea is to do the execution of all the scalar products by simply doing just what I describe, ask for the dereferenced memory from memory region. The system batches these request, sends it to the memory unit, which distribute them and fetches them in parallel. Just store the memory locations randomly to make sure parallel paths will be taken. To simulate very large neural networks this system can be very effective as well.

For example if an execution unit can execute 5 Gflop per second we would need 50GBytes/s of bandwidth so by increasing current bandwidth with a quite small factor and attach a parallel hypothetical memory unit we could (it looks) match the theoretical flops of todays cpu:s for any sparse matrix multiplication or similar algorithm. And hey, add a bunch of redundant small simple cores and don't be so fixated about saturate these you will be able to surly saturate the bandwidth with no extra cost due to the fact that many simple independent cores with a smaller cache is cheaper that larger ones and larger cache.

The programmer would have a simpler memory model due to the fact that we do not need to be so fixated in storing everything at a certain location close to each other. And the cost of dereferencing goes down if you can do stuff in parallel.

I just see to much potential with this idea and have not seen it tried. Maybe there is a hitch but I do not see that Any Ideas?

If you invented such a memory we would use big hash-tables much more then we use today. think about that. Shortly if this were possible a lot of cool ideas would scale to large systems without an exponential increase in the complexity of the underlying software.

I don't care, I just have fun, If this means dollars for you, cool - cheers.

21 Apr 2008 (updated 21 Apr 2008 at 18:36 UTC) »

Poking around with time

I wish I could spend time commenting people cause it helps the community but time is limited and my own crap is just mainly crap because of time.

I'm a technical nerd a mathematical nerd, and a nerd of life, please continue, it's fun

I've been timing things in Lisp and the Qi ontop of lisp, reading the source-code of Qi to get a feeling of performance for these systems. That's all, have to spend time with my daughter now, cheers. </b>

55 older entries...

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!