Shhh – Busy Thinking

Painted a shed.

Thinking about current step in parser code.

In a non coding mood – nesting with real world things.

Wired up my old keyboard amp to sit under the desk and act as a subwoofer.

Reading a good book so I find myself going to bed early and reading instead of coding this week.

Fixing my bike again now that Kew is only at daycare 3 days a week I have 2 days a week that I can ride into work. 1 Day a week just does not seem worth it. 2 days a week seems to have an attraction.

Listening to Podcasts in which people discuss essentialy what we did with MetaWrap 4 years ago. Luckily we have been through the ‘not as fast’ phase and are now at the ‘making it better’ phase. Some of the examples and counter arguments they discuss are exactly what we went through with the first commercial projects. ðŸ™‚

So YAY! Good to see that we are on the right track still.

Posted in Downtime, Meta-Narrative, My Hardware, Rants | Leave a comment

Cool New Things

http://www.mfeeds.com/  Translates web pages into RSS feeds

http://www.orb.com/ Real-time streaming and transcoding from Media Center PC to portable devices.

http://www.feederreader.com/ Podcast application for Pocket PC

 

Posted in Coolhunting | Leave a comment

The Accelerated Men

Strange to see my old band still has a strange cult following. We are listed first in the “The Gothic Music Handbook” An accident of name I know – but we are chuffed.

And one track that everyone loved was still being played in clubs in Melboune in 2002 – almost 13 years after it was made.

And of all things we are now listed among the seminal Goth bands of Perth by Vince Valentini. Vince, I swear the tiny little font was Jay’s idea. 🙂

A tiny little legend of a band.

I do miss those days.

Posted in Music & Art, Nostalgia for Misspent Youth | 13 Comments

New (Old) 21" Monitor And New Test Cases

I am now dual headed. We will see how it goes. I have the G4 and PC second display on the second monitor. The G4 stays up as long as I don’t move much. (Long Story)

Testing all the basic functions of the parsing table generation before I go any further.

Simple Sequence

“first” “last”

http://www.metawrap.com/tests/dot/test14.png

Simple Option

( “A” | “B” )

http://www.metawrap.com/tests/dot/test15.png

Dump Option

( “A” | “A” )

http://www.metawrap.com/tests/dot/test16.png

Note that because of the algorithm used, we get this obvious reduction for free.

Sequence With Option

“A”  ( “X” | “Y” )  “B”

http://www.metawrap.com/tests/dot/test17.png

Sadly this one is completely wrong….. needs work.

 

 

Posted in My Hardware, Parsing Theory | Leave a comment

Merge At End Of A Lexical Sequence

The million dollar question is…

Should a construction which consists of a simple option like “ABBB” | “CBBB” have a parse table that compresses and merges the last sequence of states into common groups?

http://www.metawrap.com/tests/dot/test12.png

In the same way that the start sequence is merged in “ABCDEZ” | “ABCDEX”  This testcase demonstrates a clear reason for having the terminating state objects.

http://www.metawrap.com/tests/dot/test13.png

How about something like “ABBB” | “CBB”

I must sleep and ponder on the practicality. It would result in a more compressed parse table.. but at what cost?

 

Posted in Parsing Theory, XPath | Leave a comment

I Have Joined Fumbling Hordes Of The Self-Inflicted Legally Deaf

Everyone at Massive has been given an iPod-Mini for Xmas. Now I walk the streets, legally deaf, a peril to those around me I fumble at the traffic buttons waiting for the reassuring vibrations before I fling myself before the silent gliding deadly traffic.

I really like the iPod. My iPod. No. I LOVE my iPod. I like iTunes and within a day of having both tried every hack there is. I understand why you can’t easily transfer music off the iPod – but its a loosing war.

AudioBooks are great. I like that they can have internal bookmarks – nothing worse than trying to find out where you were up to in an 8 hour music file. Audio books are going to go boomtime with this technology.

Podcasting is very interesting. Over the holidays I intent to dive into the podcast scene and listen to everything I can get my hands on.

iPod Feature Wish List

DRM should allow use on two computers. I have a computer at home and at work I want my iPod to sync with both. If I have added a song to my IPod at home, when I get to work it should be added to my iTunes at work and visa versa.

If I am listening to music and I plug my iPod into the computer – I would like the option to automatically continue playing that track from where it was up to. iPod Playing – Dock with PC, PC starts playing.

All play lists should bookmark – there should be a “continue from where you were” function. It should be the default function of the >|| button from the main menu. There should be a global playlist bookmark anbd each playlist should have a bookmark.

 

Posted in Downtime | Leave a comment

Back from holidays….

Back to the big city – should start coding again in a few days…

The WeatherPixie

Posted in Downtime | Leave a comment

Complexity Management And Temporal Pricing

Saw a great talk (by Mark Pesce at XmediaLab ) on the future of digital media distribution. He talked about what we like to call “network optomisation” when pitching this kind of distribution medium to clients, AKA “peer to peer” (p2p) networking with Pareto efficiency eg”Bittorrent” – nothing new there.  (Note: peer to peer – corporates really hate that term.. never use it.. they switch off … remember piracy is evil 🙂

 

What was new was the linkage he made with social networking as a filter/EPG for the resulting “infinite choice” that results from file download/streaming being the dominant media distribution form when combined with an arms race between DRM and crackers. 

 

I find industry events like this pretty much like “Slashdot the Cabaret Show” where a bunch of people essentially catch up on an the expurgated version of what happened during the year and discuss emerging trends. It was good to be surprised by an original idea, and not just one.. If I can, I will be going to the next Xmedia lab – it was well worth it.

 

I made a low quality CAM of Mark’s talk (Seemed appropriate given the subject matter 🙂 )  –  90% audible and you have to really listen hard – par for the course for most cams. My GF (made the comment that it might be a bit scary if your social network turns into a kind of cool Amway.) and I listened to it again when I got home.. I wonder if Mark will mind if I torrent it? 🙂 

 

Mark has previously discussed this topic – slashdot link

 

Its inspired me to add some related (and unrelated) thoughts and comments to this idea.

 

I feel that everything on social networks (Orkut, Friendster, etc) was pretty much there if you combine Usenet with an address book, the differences now are that…

 

  1.  People now seem more trusting of the internet and donÂ’t seem to have an issue with giving away personal information to a perceived closed community. Orkut is Usenet for extroverts. Perhaps people started with file-sharing, which at first to some people seems a little creepy, and that led them into being more trusting of SNs. Either way. Many of the early people on Orkut seemed to have blogs. Extroversion again. Many blog sites have an ability to link to friends. IM systems have the same. Another stepping stone. I think the bloggers had a hand in enabling SN’s to reach critical mass.
  2.  Computing power and storage is now available to run a global, multi – dimensional address book and make it seem almost invisible. Which is pretty much what Orkut does. The technology on Orkut is similar to social mapping software used by police to track down criminal gangs via social links

 Another example of something that has emerged because of the decreased cost of computing power and storage is Video Time-shifting (Tivo, MSE, WorldBox etc..) which is now really gathering momentum in the mainstream because of the increase in computing power and storage with decreasing costs per unit. This is the biggest marketing mistake of the century.. Its being marketed as PVR or HDR or even “DVD recorders”… Thats just sounds like a nerdy VCR – the bit thats really new and exiting and life changing is Timeshifting… thats what it should be marketed as…

 

What Mark said about the social network as filter really falls under the shadow of “Personal Complexity Management”. Taken to an extreme, once we as consumers have enough software smarts behind our purchasing decisions, an opposing arms race will be set up in the area of distribution.

 

Imagine if bread was sold the same way that petrol is now. The price of petrol goes up and down according to the time of day. During rush-hours, holidays and special events it is higher. If we have a sufficient level of software smarts filtering our purchasing decisions it may be percieved as reasonable for distributors to respond by switching over to a kind of temporal pricing model, even for the necessities of life. The poor may find it easier to live in another time zone adjacent to the middle class and rich. eg. Get up 2 hours later to get 50c off a loaf of bread. The argument would be compelling. It would be possible to drop the average price, gouge during the temporal hot spots and be cheap during the cold spots. It could even be real-time and adaptive like the stock market is today. Collusion between shops would be a matter of ensuring that one shop does not have the majority of bargains.

 

I’m not saying that it will get to the point where people will have to shop at certain times to afford a loaf of bread, it will be very subtle and will all seem very reasonable. But if you don’t have networked software to help you find the bargains, you will be paying slightly more.  Average prices will go down, profits will go up. The consumer will be exposed to the every day price fluctuations that the supermarket chain(s?) mostly shield us from, but only because they are slow moving. The shields will go down.

 

The price may change by the time you get to the checkout.. so keep that PDA online 🙂

 

[UPDATE]

 

The required change in distribution model ie, making all your money in the first month before your DRM is broken has been how the games industry has been operating for the last 20 years. 0-Day warez crackz etc. We will see a merging of the two models, or in the future all digital entertainment will be games.

 

[FURTHER UPDATES]

 

Check out this scenario from John Battelle’s Searchblog.

 

And an article on PVR. Looks like the message is starting to sing in.

 


 

 

Posted in Downtime, Rants | Leave a comment

Semaphore vs Monitor

Trying to decide what kind of counting syncronisation object I should use for my buffer polling expansion to the CNI (see two posts down).In my travels I found a lively and mostly misguided debate of monitors vs semaphores so decided to investigate further.

When people talk of a monitor, what they are referring to is a design pattern that works best using a simple condition variable. The monitor pattern is an example of object wide course locking. The monitor pattern provides strict access control to an objects members and methods.

A monitor is not a new technology but is a transition in a way of programming syncronisation. Think of a syncronisation Aspect and you are mentally on your way there.  A monitor is semantic leap of the scale of C struct to C++  class  or from heap based memory management to garbage collection.

Some languages have made monitor a compiler primitive such the that compiler can enforce the pattern implementation.

It is easily proven that semaphores and monitors are equally powerful:  each can be used to implement the other.

You use monitors in applications, not in operating systems.

 Semaphores

  • a semaphore is a special counter
    • with an initial value C
    • two operations, P and V, for changing that value
    • P waits until #P – #V <= C
    • V signals the counter, and a waiting process, if any
  • Effective for tracking multiple interchangeable resources
  • generally assumed fair:
    • processes complete P operations in the same order they start them
  • low-level:
    • easy to forget a P or a V
  • scattered:
    • if you want to change how processes synchronize access to a data structure, you have to find all the places in the code where they touch that structure, which is difficult and error-prone (aliasing!).

Monitors

  • monitors were an attempt to address the weaknesses of semaphores  (low-level and scattered)
  • several parallel programming languages have incorporated monitors as their fundamental synchronization mechanism
  • a monitor is a shared object (abstraction) with operations, internal state, and a number of condition queues.
    • only one operation of a given monitor may be active at a time, i.e. no need to remember to release things – occurs on procedure exit
    • a process that calls a busy monitor is delayed until the monitor is free
    • like objects, but with strict scoping
      • monitor variables always private (not visible outside monitor procedures)
      • monitor procedures may only access monitor variables and parameters
    • condition variables within monitor
      • var x : condition
      • x.wait operation ALWAYS waits until another process performs x.signal
      • x.signal wakes up a process (usually first to wait) IFF some process is waiting — otherwise has NO EFFECT whatsoever, i.e. signal <> V.
  • on behalf of its calling process, any operation may suspend itself by waiting on a condition (and thereby releasing control of the monitor).

Example of Semaphores vs. Monitors

Consider the bounded buffer with semaphores:  Here’s the same thing with monitors:
shared buf : array [1..N] of data
 

    shared front, rear : integer := 1

    shared empty, full : sem := N, 0

    procedure deposit (m : data)
        P (empty)

        buf[rear] := m
        rear := rear mod N + 1

        V (full)
 

    procedure fetch : data
        P (full)

        m : data := buf[front]
        front := front mod N + 1
        V (empty)
        return m

monitor BB
     export deposit, fetch
     buf : array [1..N] of data
     front, rear : integer := 1
     slots : integer := 0
     emptied, filled : condition

     procedure deposit (m : data)
         if slots = N
             wait (emptied)
         buf[rear] := m
         rear := rear mod N + 1
         slots := slots + 1
         signal (filled)

     procedure fetch : data
         if slots = 0
             wait (filled)
         m : data := buf[front]
         front := front mod N + 1
         slots := slots - 1
         signal (emptied)
         return m

 

 

Semaphores Condition Variables
Can be used anywhere in a program, but should not be used in a monitor Can be used in monitors. Can be used anywhere but almost always requires combination with mutex or another syncronisation primitive, so they are difficult to use and don’t make as much sense outside of the monitor pattern. If you disagree with me and have a counter case, first as the question ‘is my counter case an example of the monitor pattern’ – I suspect you will find the answer is yes.
Wait() does not always block the caller (i.e., when the semaphore counter is greater than zero). Wait() always blocks the caller.
Signal() either releases a blocked thread, if there is one, or increases the semaphore counter. Signal() either releases a blocked thread, if there is one, or the signal is lost as if it never happens.
If Signal() releases a blocked thread, the caller and the released thread both continue. If Signal() releases a blocked thread, the caller yields the monitor (Hoare type) or continues (Mesa Type). Only one of the caller or the released thread can continue, but not both.

 

Posted in C#, Rants | 2 Comments

Parsers Progress

http://www.metawrap.com/tests/dot/test9.png

Minimal testcase for simplest production I could think of – with an at that un unhandled visitor type. (now implemented of course). The wonderful thing about applying such a complicated visitor pattern to this type of problem is that even though the first type is hard and laborious, the rest seem to quickly drop into place.

space => ‘ ‘

My misssion tonight – get rid of that superflouous end group before the terminator.

But this

space => ‘_’ ‘ ‘

http://www.metawrap.com/tests/dot/test10.png

is of course just plain wrong.

This is better.

http://www.metawrap.com/tests/dot/test11.png

But we are left with the problem, How do we know that we are the last character of the lexeme and the last lexeme of a production with no further substitutions – and thus a potential terminator e. This is non trivial to compute at every symbol. It may be better to gather all these dangling groups as part of garbage collect and make them all point to a single terminator group. I will investigate both paths and see what works best. But now for some sleep.

 

Posted in Parsing Theory, XPath | Leave a comment