Cool Things – (Rescued)

[Rescued from the old blog – Thanks to Damien]

New ZIP.

http://www.7-zip.org/faq.html

The Future Of Databases

http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=299

Canvas element lets you do high-end drawing (transparencies etc) with HTML/JS – supported in new versions of Firefox and latest version of Safari. Unfortunately unlikely to be supported by IE.

http://developer-test.mozilla.org/docs/Drawing_Graphics_with_Canvas >>

Nasty exploit in D-Link ASDL Routers

http://groups-beta.google.com/group/infosec-discuss/browse_frm/thread/4a739196592484a2/36f424c63d8d6122?tvc=1&q=dsl+504t+firmware&hl=en#36f424c63d8d6122

Demo of ASP.NET 2.0

http://www.microsoft.com/seminar/shared/asp/view.asp?url=/seminar/en/20050510_Intro/manifest.xml&rate=2%20

https://blog.metawrap.com/blog/PermaLink.aspx?guid=fd0fd0c6-08fb-4635-b6bf-082afc4c4b21  |  Comments

Old Kate Bush Demos in MP3

http://www.dongrays.com/kate-bush/mp3/

The rule for static variables at block scope (as opposed to static variables with global scope) is that they are initialized the first time execution reaches their declaration.

http://blogs.msdn.com/oldnewthing/archive/2004/3/8.aspx

Hyper-Threading, as currently implemented on Intel Pentium Extreme Edition, Pentium 4, Mobile Pentium 4, and Xeon processors, suffers from a serious security flaw. This flaw permits local information disclosure, including allowing an unprivileged user to steal an RSA private key being used on the same machine. Administrators of multi-user systems are strongly advised to take action to disable Hyper-Threading immediately; single-user systems (i.e., desktop computers) are not affected.

http://www.daemonology.net/hyperthreading-considered-harmful/

http://tor.eff.org/

http://www.participatoryculture.org/

http://indy.tv/

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

Some Cool New Things

Getting ready to recover all by blog posts in the next few days. Made lots of progress in MetaWrap in the apache mod area.

JS/UIX 0.43 – The JavaScript virtual OS and terminal application for the web.

http://www.masswerk.at/jsuix/

Social Command Line

http://www.yubnub.org/

Posted in Downtime, Things To Do | Leave a comment

Disaster – HD Death!

ARgghhhh!!!!!

This little blog site was non-essential – so I didn’t really every back it up.

So I have just lot 5 months worth of posts…

Lets hope that Google cache or archive.org has most of them 🙂

Posted in Downtime | Leave a comment

Came So Far For Beauty

CameSofarForBeauty.jpg

Second Row – Left of center 🙂

Went to this last night. Was great fun. Highlights – Nick Cave bounded onto stage, only to croon uncomfortably while straining against his short mic lead like some wild animal exploring the limits of a new cage. He attempted to baptise those of us in the first and second rows with sweat and saliva – but the bindings held. The pre-song banter of the Handsome Family was hilarious, Jarvis Cocker oozed something nasty, very rock and roll – but I loved it and who wouldn’t want the McGarrigle sisters in their family as mysterious black-sheep aunties?

I left with a crush on Julie Christiansen despite the allure of Beth Orton, but the real surprise of the night was Antony. This guy was channeling the look of Robert Smith, the mannerisms of Joe Cocker and the voice of Carlo Broschi. It was like watching someone continuously on the verge of a nervous breakdown, someone falling down but never hitting the ground, levitating nervously with a holy grace. He really did steal the show.

Vocals were not always clear, Too many of them didn’t know the words and made embarrassing mistakes reading from lyric sheets, but as Mr Cohen says “There is a crack in everything, That’s how the light gets in”.

Posted in Downtime | 1 Comment

Oh Lordy…

Hey old friend – remember this?

;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;Û
;Û  Source file for 'ICE BREAKER' OFFICIAL RELEASE Version 1.2.
;Û  MAAS Modem Battle Language Interpreter By DrMiaow
;Û  This Script By Morpheus Black - Adapted from AUSPAC PAD Scanner by DrMiaow
;Û
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;Û
;Û  Please feel free to distribute and USE this produkt. Any Bug reports
;Û  should be directed to morpheus@newrose!elitenet or (|| for C programmers)
;Û  morpheus@maas!elitenet . You can usualy catch me on EliteNet Australia
;Û  or at Zero-City.
;Û
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;Û
;Û  Greets to : Count Zero, J-Nova, Ripmax, Chandra, Infinity, Philo
;Û              Rabbi, Jag, and Shaka
;Û
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;Û
;Û  Copyright (c) 1988 The Acceleration Corporation, Inc. All rights reserved.
;Û  Redistribution and use in source and binary forms are permitted provided
;Û  that the above copyright notice and this paragraph are duplicated in all
;Û  such forms and that any documentation, advertising materials, and other
;Û  materials related to such distribution and use acknowledge that the
;Û  software was developed by the Acceleration Corporation. The name of
;Û  either the author or the Acceleration Corporation may not be used to
;Û  justify or promote hacks derived from this software.
;Û  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
;Û  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
;Û  MERCHANTIBILITY AND FITNESS FOR A PARTICULARLY LEGAL PURPOSE. SO THERE!
;Û
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;Û
;Û  ID:  Carrier Seeker: Chinese Red Army Genetic version. Milspec Rated.
;Û  VE:  IB (Ice Breaker) V1.2a Acceleration Corporation Produkt #8902
;Û  AU:  (c) 1989 Morpheus Black of The Acceleration Corporation
;Û
;Û  This program produces the following files
;Û
;Û  HITS.LOG    : All numbers the had a modem at the end.
;Û  SYSTEMS.LOG : All numbers that looked like a computer.
;Û  TOTAL.LOG   : The complete sign on screen of all hits.
;Û  ERROR.LOG   : If an error occours then it will end up being reported here.
;Û
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ


#WILD ! 10			; Define a wild card
#WILD * 3478906215		; Define a wild card
#WILD @ 706915342		; Define a wild card
#WILD ^ 7392514068

#SCAN atdt008-03*-@*^\r       	; Define our SCAN string with wild cards...
				; This will scan the 008-040-???'s and
				; 008-041-???'s randomly with max spread


;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;Û Init Modem - Set baud rate, and mode;
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

start:
	INIT 1 2400 8N1                 ; Init fossil driver COM1 to 2400 8N1
	BUFFER KILL			; Empty the fossil buffer

	CLRSCR				; Clear the screen and do a blurb
	PRINT "\n\r"
	PRINT "     ÜÜ#####²±²±²±ÜÜ\n\r"
	PRINT "   ÜÛ#######²±²±²±²±ÛÜ    ID: Chinese Red Army Genetic Scanner\n\r"
	PRINT "  ÞÛ########²±²±²±²±²ÛÝ   VE: I.C.E Breaker V1.0 \n\r"
	PRINT "  ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ     : (c) Acceleration Corporation 1991 \n\r"
	PRINT "  ÞÛÛÛÛÛÛ MK 13 ÛÛÛÛÛÛÝ   AU: Morpheus Black 1991\n\r"
	PRINT "   ßÛß   ß°±²²ÛßÄÅÄßÛß   \n\r"
	PRINT "   ÜÛ  #  ÜÛ ÛÜ $³$ ÛÜ    GR: Count Zero, J-Nova, Ripmax \n\r"
	PRINT "   ÛÛÛÜÜÜÛÛ   ÛÛÜÜÜÛÛÛ      : Chandra, Infinity, Philo\n\r"
	PRINT "   ßÛÛßÛ±ÛݶÜÇÞÛ±ÛßÛÛß      : Rabbi, Jag, and Shaka\\n\r"
	PRINT "       ²±°ß²²²ß²±°           \n\r"
	PRINT "       ²±°ÞÙ Àݲ±°           'Hey Poor you don't have to poor\n\r"
	PRINT "       ²±°     ²±°            anymore... Jesus is here.'\n\r"
	PRINT "        ³       ³                                  -Front 242\n\r"
	PRINT "        ³       ³             "
	PRINT " Sequence is now underway \n\r"


	IF ( CHAT "\P002ATZ\r\n\P001 OK\r\n" )
		 (
			GOTO main
		 )
	ELSE
	   (
		IF ( GOT "ERROR" )
	      		(
		  	PRINT "\aERROR Check your INIT procedure.\n\r"
			)
		ELSE
		IF ( GOT "RING" )
	        (
	PRINT "Your phone is ringing. Oh no... the FED's have traced you!\n\r"
		)
		ELSE
	        (LOG ERROR.LOG "\TModem Failure at PORT \C SPEED \B MODE \M\n\r"
	        )
	   )
	END

;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;Û
;Û The main loop - The heart of the program
;Û
;ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

main:
	BAUD 2400			; Set baud rate to 2400
	MODE 8N1			; Set mode to 8N1
	BUFFER KILL			; Delete the modem buffer
	PUT \D				; Put DTR High

	SCAN				; Send our #SCAN string

	PAUSE 15			; Wait 15 seconds for any modem to
					; answer and connect

	PUT \r\n                        ; Force modem to reply
	PAUSE 1				; Wait 1 second for the modem to reply
	BUFFER FLUSH			; Suck it up so GOT can look at it


	; Now we interpret the response from the modem and see what
	; baude rate we are running at, change to it etc.... *YAWN*..

	IF ( GOT NO\sCARRIER ) THEN ( )
	ELSE
	IF ( GOT "CONNECT 2400" ) THEN ( BAUD 2400  GOSUB identify_system )
	ELSE
	IF ( GOT CONNECT\s1200 ) THEN ( BAUD 1200  GOSUB identify_system )
	ELSE
	IF ( GOT CONNECT\s600 ) THEN ( BAUD 600  GOSUB identify_system )
	ELSE
	IF ( GOT CONNECT ) THEN ( BAUD 300  GOSUB identify_system )
        ELSE
	(
		LOG REPORT.TXT "\n\r\T '\S' produced a strange result\n\r"
		LOG REPORT.TXT "++++++++++++++++++++++++++++++++++++++++++\n\r"
		BUFFER DUMP REPORT.TXT
		LOG REPORT.TXT "++++++++++++++++++++++++++++++++++++++++++\n\r"
	)

        GOTO main                 ; Try again.


; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
; ÛÛ
; ÛÛ  Routine to identify type of system we have encountered.......
; ÛÛ  Scan for all popular systems and institutions.
; ÛÛ
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

identify_system:
	GOOD				; Increment the 'hits' variable

	LOG HITS.LOG "\T '\S' \B \M\n\r"
	LOG SYSTEMS.LOG "\n\r\T '\S' COM\C:\B:\M\n\r"

	; Now we switch modes to see what we get in both

        MODE 8N1
	GOSUB shake
	MODE 7E1
	GOSUB shake

	GOSUB identify

	LOG SYSTEMS.LOG "\n\r"


	BUFFER FLUSH                       	; Get all available data
	BUFFER DUMP TOTAL.LOG             	; Send the buffer to file
						; TOTAL.LOG


        GOSUB hangup

	RETURN


; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
; ÛÛ
; ÛÛ  Routine 'shake' a response out of the system.
; ÛÛ
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

shake:

	PUT @%&@\n\r ; Send 'NOISE' *GRIN* and a crlf
	PAUSE 2

	PUT $%@*!\n\r ; Send 'NOISE' again...
	PAUSE 2

	RETURN

; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
; ÛÛ
; ÛÛ  Routine pick out signiture strings of particular operating systems
; ÛÛ
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

identify:

	; SCAN for KEYWORDS
	IF ( GOT UNIX )      ( LOG SYSTEMS.LOG "UNIX\n\r" )
	IF ( GOT Unix )      ( LOG SYSTEMS.LOG "UNIX\n\r" )
	IF ( GOT unix )      ( LOG SYSTEMS.LOG "UNIX\n\r" )
	IF ( GOT nix )       ( LOG SYSTEMS.LOG "*nix\n\r" )
	IF ( GOT System\sV ) ( LOG SYSTEMS.LOG "*NIX SYS V\n\r" )
	IF ( GOT system\sV ) ( LOG SYSTEMS.LOG "*NIX SYS V\n\r" )
	IF ( GOT BSD )       ( LOG SYSTEMS.LOG "*NIX BSD\n\r" )
	IF ( GOT ERR! )      ( LOG SYSTEMS.LOG "PRIMEOS\n\r" )
	IF ( GOT AUSTPAC )   ( LOG SYSTEMS.LOG "AUSTPAC Dial in\n\r" )
	IF ( GOT ustpac )    ( LOG SYSTEMS.LOG "UNIX\n\r" )
        IF ( GOT PAD ) ( LOG SYSTEMS.LOG "A Packet Assembler Dissasembler\n\r" )
	IF ( GOT NET )       ( LOG SYSTEMS.LOG "A Network\n\r" )
	IF ( GOT CICS )      ( LOG SYSTEMS.LOG "IBM CICS\n\r" )
	IF ( GOT .com )      ( LOG SYSTEMS.LOG "Commercial domain Unix\n\r" )
	IF ( GOT .mil )      ( LOG SYSTEMS.LOG "Military domain Unix\n\r" )
	IF ( GOT .edu )      ( LOG SYSTEMS.LOG "Education domain Unix\n\r" )
	IF ( GOT pdp )       ( LOG SYSTEMS.LOG "PDP11 Minicomputer\n\r" )
	IF ( GOT 486 )       ( LOG SYSTEMS.LOG "ix486 PC?\n\r" )
	IF ( GOT 386 )       ( LOG SYSTEMS.LOG "ix386 PC?\n\r" )
	IF ( GOT Bank )      ( LOG SYSTEMS.LOG "A Bank\n\r" )
	IF ( GOT bank )      ( LOG SYSTEMS.LOG "A Bank\n\r" )
	IF ( GOT login )     ( LOG SYSTEMS.LOG "A login prompt\n\r" )
	IF ( GOT Login )     ( LOG SYSTEMS.LOG "A Login prompt\n\r" )
	IF ( GOT ID )        ( LOG SYSTEMS.LOG "An ID prompt\n\r" )
	IF ( GOT USER )      ( LOG SYSTEMS.LOG "A USER prompt\n\r" )
	IF ( GOT user )      ( LOG SYSTEMS.LOG "A user prompt\n\r" )
	IF ( GOT # )         ( LOG SYSTEMS.LOG "A modem password prompt\n\r" )
	IF ( GOT VT100 )     ( LOG SYSTEMS.LOG "VT100 Terminal type\n\r" )

	RETURN


; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
; ÛÛ
; ÛÛ  Routine to hang up MODEM:
; ÛÛ  If by any chance the modem fails to hang up an alarm will sound
; ÛÛ  to wake you up.
; ÛÛ
; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ

hangup:

	BUFFER KILL                   		; Empty the buffer
	PUT \d                            	; Hang up DTR LOW
	PAUSE 1                            	; Wait for NO CARRIER
	BUFFER FLUSH


	IF ( GOT NO\sCARRIER ) THEN
  	(
		; do nothing
  	)
  	ELSE
  	(
		PUT \D\P001\d+++\rATH\n	; Alternative HANG UP
		IF ( GOT NO\sCARRIER )
		(
			; do nothing
		)
		ELSE
		(
			black_ice:
			PRINT "\a\a\a\*** WAKE UP I'M STUCK ONLINE ***\n\r"
			GOTO black_ice
		)
	)

	BUFFER KILL
RETURN

Posted in Nostalgia for Misspent Youth, Rants | 2 Comments

Bushism, Blog And Google Video

“And I think the world would be better off if we did leave ….. if we didn’t … if we left, the world would be worse. The world is better off with us not leaving. It’s a mistake to pull out.”

George W BushSeptember 20, 2004

New blog version – I can edit and not publish to XML – so you can all miss out on my intermediate musings 🙂

Google has released their video service that indexes the closed caption and takes thumbnails of the videos as they play. Shame they didn’t fix the obvious gotchas with indexing closed caption. How many times in a subtitled film have you seen the text [Music]?

http://video.google.com/videosearch?q=Music

Its PooBah’s all the way to the bottom…

video_google_music_tiny.png

 

Posted in Coolhunting, Meta-Narrative | 4 Comments

Subtextual – Very Cool Language Demo

http://subtextual.org/demo1.html

Looks a lot like RIDE – execution model is copy based – very much like the original old BSCAL /MetaWrap VM. They even have the factorial demo. I’m very impressd with it – it looks much nicer than anything I have made so far in this area.

Something to aspire to.

[UPDATE]

For anyone who is interested – I have uploaded the original (rewitten) BSCAL interpreter compiler into http://metawrap.com/cgi-bin/viewcvs.cgi/metawrap/vm/BSCAL/ . A garbage collecting non strict lazy functional language from 1986.

 

Posted in Coolhunting, MetaWrap Server, Rants | Leave a comment

Nanotech

Speaking of old bands – one of my old bad techno songs has been released on http://www.openpodcast.org as The Rhinoceros Song – OpenPodcast.org #759 aka “Mastitis” – people used to just call it “The Rhinoceros Song” so it just kind of stuck 🙂

The Vogon stood up. “No, well you’re completely wrong,” he said, “I just write poetry music to throw my mean callous heartless exterior into sharp relief. …

Been staring at the parser code out of the corner of eye for the last week. I have a fair idea of what needs to be done. I need a pattern that can keep track of the last state of all MwW3ParserLexerStates as they thread through all the MwW3ParserLexerStateGroups – the trick being that the last State in all State theads within a set of optional lexemes needs to be remembered so that the subsequent lexemes of approprate logical precedence can add their first State as an option into each of them and converge/reduce onto a Group for that lexeme.

Makes perfect sense to me at least .. I’m in the process of checking that each of these steps is feasible.

Posted in Nostalgia for Misspent Youth, Parsing Theory | 2 Comments

Interesting XML Layout Engine

http://yeslogic.com/

Posted in Coolhunting, Things To Do | 1 Comment

More Parsing Terminology or "Teminator e"

formal grammar is an abstract structure that describes a formal language precisely: i.e., a set of rules that mathematically delineates a (usually infinite) set of finite-length strings over a (usually finite) alphabet.

formal language is a set of finite-length character strings drawn from some finite alphabet.

A context-free grammar (CFG) is a formal grammar in which every production rule is of the form

V ? w

where V is a non-terminal symbol and w is a string consisting of terminals and/or non-terminals. The term “context-free” comes from the fact that the non-terminal V can always be replaced by w, regardless of in what context it occurs.

A formal language is context-free if there is a context-free grammar that generates it.

terminals belong to the set of strings of the alphabet of the language. They do not get replaced during the derivation of a sentence.

non-terminals or variables or syntactic-categories are replaced during the derivation. They represent arbitrary strings.

As the parser accepts a sequence of tokens, it determines, based on this information, when the grammar’s respective rules are complete and verifies the syntactic correctness of the token sequence. The end result of the process is a derivation which represents the token sequence organized following the rules of the grammar.

A derivation of a string is a sequence of steps where nonterminals are expanded so that the string results.

  S ->
  "if" E "then" S "else" S ->
  "if" "2" "=" "2" "then" S "else" S ->
  "if" "2" "=" "2" "then" "print" E "else" S ->
  "if" "2" "=" "2" "then" "print" "2" "=" "2" "else" S ->
  "if" "2" "=" "2" "then" "print" "2" "=" "2" "else" "print" E ->
  "if" "2" "=" "2" "then" "print" "2" "=" "2" "else" "print" "2" "=" "2"

A leftmost derivation is one where every step expands the leftmost nonterminal. A rightmost derivation expands the rightmost nonterminal.

A derivation need not be rightmost or leftmost. Many derivations can result in the same syntax tree.

A derivation starting from the start symbol gives a member of the language (after all variables have been eliminated)

Every context gree language has a start symbol.

The start symbol represents all valid sentences in the language

The head (of a production) a single variable for context free langiuages in a similar notation for non-context-free languages, the head may contain more than one symbol. The body (of the production) a sequence of symbols, variables as well as terminals are allowed.

To infer that a sentence is in the language

Recursive Inference:

From body to head – Start from terminals and work up the tree to the start symbol

Derivation:

From head to body – Start from the start symbol and apply productions until you get the sentence

Regular Languages are a subset of Context Free Languages All regular languages are also context free

Definition of  a Context Free Grammar

G = {V,T,P,S}

V = Finite set of variables

nT = Finite set of terminals
 

nP = Set of productions
S = Start symbol

For language

L = { 0n1n | n >= 1}

S -> 0 X 1

X -> e

X -> 0 X 1

The grammar is

G = ( {S,X} , {0,1} , {(S,0X1),(X,e),(X,0X1)},S )

The ancient Indian linguist Panini described Sanskrit using a context-free grammar. Recently, it has been suggested that a class of Tamil poetry called Venpa is governed by a context-free grammar.

Posted in Parsing Theory, XPath | Leave a comment