Notatypewriter's Blog

Umm… what?

Archive for the ‘Nerding out’ Category

An algorithm for doing closure in LR(1)

leave a comment »

At least, it’s one that is simple enough for me to remember. The ones typically presented in lectures and books were confusing to me.

Mine seems to work on examples from lecture, in books, and on Wikipedia.

Define closure( item=[A→β•Bδ,a] ), where:

  • A is a non-terminal
  • β is a sentence of terminals and non-terminals
  • • is the position in the string being parsed
  • B is a non-terminal
  • δ is a sentence of terminals and non-terminals
  • , is the lookahead position
  • a is the lookahead terminal

If the item does not match this pattern, then closure returns empty.

Else, for each production B→γ and each terminal b in FIRST(δ), do closure( [B→•γ, b] ).

From Wikipedia:

FIRST(A) is the set of terminals which can appear as the first element of any chain of rules matching non-terminal A.

Read the rest of this entry »

Advertisements

Written by notatypewriter

2012 September 22 at 3:37 pm

Posted in Nerding out

Tagged with ,

Installing Sun Java, Eclipse, and Android SDK on Ubuntu 10.04

leave a comment »

Ever since Ubuntu (and Debian) removed Sun Java from their repos, the official instructions have been out of date. (Additionally, Debian’s and Ubuntu’s wikis about installing Sun Java have become out of date.) Google knows about this since I’ve seen the issue brought up on their mailing lists, but they’ve never updated the documentation. It is yet another reason why I feel Google does not care so much about third party developers, but c’est la vie.

Additionally, the Google release cycle moves much faster than Debian’s. Ubuntu also has trouble keeping large packages like Eclipse up to date, so it’s not always certain that the version of Eclipse available in your package manager will be the version by the ADT Plugin. For example, the version of Eclipse in Natty (11.04) was 3.5, which was originally released in 2009. Google still advises developers to use Ubuntu Lucid 10.04 even with all these outdated packages. (Anyways, Linux package management doesn’t fit with today’s model of desktop computing.)

Read the rest of this entry »

Written by notatypewriter

2012 April 15 at 11:49 am

Posted in Nerding out

Tagged with , , , ,

Windows 7 ISO download links

leave a comment »

Written by notatypewriter

2012 January 29 at 8:17 pm

Posted in Nerding out

Tagged with ,

Getting Ultimate Boot CD (FreeDOS) to boot on an Asus E35M1-I

leave a comment »

Written by notatypewriter

2012 January 28 at 5:48 pm

Thoughts on the ASUS G74SX

leave a comment »

I got a chance to play with an ASUS G74SX from Newegg. What a big honking computer. It’s covered by some kind of matte black rubberized coating similar to what you’d find on a Thinkpad. It’s also pretty powerful and the internals are decently laid out.

Software-wise, there’s not too much crapware on it. It took only a few minutes to uninstall. I had an Ubuntu 10.04 live CD that’s I tried on it. Things seemed to work without any glaring issues.

Anyways, here are some pics of the exterior, the hard drive and RAM area, and the pre-installed crapware that the computer came with.

Leave a comment if you have any questions about the machine.

Written by notatypewriter

2011 December 24 at 3:52 am

Teaching Java Fail

leave a comment »

I tried to help somebody who had never programmed before with his Java homework. It opened my eyes to what seems to be Java’s failings as a first language for non-programmers.

Ithink the problem is that the best way to introduce programming seems to be little script-y things and then build up to packages and classes. Java does not really enable that. Here are some examples.

Read the rest of this entry »

Written by notatypewriter

2011 November 16 at 11:57 pm

Posted in Nerding out

Tagged with , ,

%d bloggers like this: