This is GordonMcGregor's Typepad Profile.
Join Typepad and start following GordonMcGregor's activity
Join Now!
Already a member? Sign In
GordonMcGregor
Interests: Photography, Verification, Triathlon.
Recent Activity
Image
I've been working through some of the exercises in 'The Pragmatic Programmer' while using it to mentor a colleague. In particular, I spent a bit of time working on the Domain Specific Language section and considering creating little DSLs to... Continue reading
Posted Dec 21, 2012 at five computers
I'm finding sshfs to be excellent for remotely accessing drives over ssh. There's a couple of tweaks to the ssh config file that can make things even better. If you haven't used an ssh config file, it can be used... Continue reading
Posted May 2, 2012 at five computers
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines - R. W. Emerson Looking over the VPI iterator sample code I posted last night from PyHVL, I noticed something. I've defined the... Continue reading
Posted May 2, 2012 at five computers
Hi Chris, Thanks for the comment. Ive looked at MyHDL in the past. It is solving a slightly different problem to PyHVL. Most of my work is with clients who are using SystemVerilog or Verilog and PyHVL plays well in those environments. There is a lot to be said for combining the best features of both of those languages (e.g., coverage, randomization with constraints and temporal assertions arent easily implemented in a generic way in Python)
Writing some documents using Microsoft Word and I wanted to be able to drop in syntax highlighted versions of the source code. Pygmentize will generate RTF format, which is great for pasting in to Word, but you have to get... Continue reading
Posted May 1, 2012 at five computers
I've been using PyHVL for a variety of verification tasks in the past few years. PyHVL is an open source Python integration for Verilog and SystemVerilog simulators. To give a quick taste of what it can do for you, consider... Continue reading
Posted May 1, 2012 at five computers
Installed the latest version of fuse and sshfs, using Homebrew. I had been using FUSE for a while with previous versions of OS X, but haven't had much luck under Lion. Tried again today, using Fuse4x, rather than libFUSE and... Continue reading
Posted Apr 26, 2012 at five computers
Ever find you need to implement a web server or provide some web pages on a local network? Maybe you don't have an Apache server up and running or don't want to go to the trouble of configuring it. I've... Continue reading
Posted Apr 20, 2012 at five computers
I've used Pygments in the past to do syntax highlighting of Python and C code to drop into documentation. I've wanted SystemVerilog support for a while, but the tool didn't support the language. I eventually got frustrated enough by this... Continue reading
Posted Apr 19, 2012 at five computers
I've recently started using FogCreek's FogBugz project hosting for a small personal project. It has a built-in Mercurial source repository, with some enhancements, called Kiln, and good task/ project tracking features. Quite similar to those you find in Trac. Rather... Continue reading
Posted Jan 23, 2011 at five computers
I think the worst [jarring edit] example I can think of was watching Beverly Hills Cop, on BBC TV in the UK, in the mid 80s, where Eddie Murphy was calling everyone a Melon Farmer. Who knew there were so many fruit growers in California?
1 reply
GordonMcGregor is now following The Typepad Team
Mar 15, 2010
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head At a high level, it shows you how busy you've been and when, in a particular terminal session. It looks at your recent command activity over time, and lists the top 10 periods of most activity, giving the time and the number of commands you ran in that minute. The 'history' command output is piped into awk, which collects the second field from the history output ($2). This is the time that the particular command was run at. These timestamps are used as indices to build a histogram of activity, each one increments the array element, indexed by the time, in the associative array, a. (a[$2]++ increments the array element $2 in the array, a, once for each command that was found in the input stream to awk) Once the histogram is built up, the awk command then just prints that to the standard output stream, {print a[i] " " i} prints the number of commands (a[i]) run at time i. The next command (sort -rn) does a reverse numerical sort on the stream of data, using the first field (number of commands) as the element to sort on. This gives the full list of activity and time. The final 'head' command chops off the first 10 elements to give the top 10 list of times when you were actually doing something.
1 reply
Image
I've just recently started trying to learn to play guitar. My early experiences with music would be best described as making a bad noise,on the recorder. Still, I've decided to give it another go. One thing I've found early on... Continue reading
Posted Nov 7, 2009 at five computers
This just seems like someone inventing really extra springy, battery powered horseshoes that give a smoother, faster riding experience, just to compete with those weird, newfangled car things.
Toggle Commented Apr 27, 2009 on more print-on-demand goodness at WWdN: In Exile
1 reply
When a child turns 13, put him in a barrel, nail down the lid, and feed him through a knothole. When he turns 16, plug the knothole. ?
Toggle Commented Oct 24, 2008 on this is for uncle warren at WWdN: In Exile
1 reply
When a child turns 13, put him in a barrel, nail down the lid, and feed him through a knothole. When he turns 16, plug the knothole. ?
Toggle Commented Oct 24, 2008 on this is for uncle warren at WWdN: In Exile
1 reply