[ Content | Sidebar ]

Archives for 2022

Fishing Boats

March 18th, 2022

Back to Blighty and the weather is glorious! I totally forgot the sky could be this shade of blue. And where better to go than the local beach which festooned with these traditional fishing boats.

Oh how I missed the seagulls

Catchily named “RX142” (RX means “Rye” by the way)

“R4” and various bits of fishing junk

Filed in photos - Comments closed

Chongming Island

March 7th, 2022

Chongming island 崇明岛 is a large island on the north of the Yangtze estuary. And while it’s technically part of Shanghai it’s actually very rural and makes for an interesting day out.

Ferry to Chongming island

Getting there from the city is a bit convoluted. The quickest way is to take subway line 3 to Baoyang Road and take a bus to the ferry terminal of the same name. The ferry takes about 50 minutes and costs 16 RMB. Make sure you get the one to Nanmen 南门 as that’s the most touristy part.

Walking along the Yangtze river

I walked along the bank of the Yangtze river for a little way from the ferry terminal. It was really hazy. Might have been pollution but the air quality report that didn’t seem too bad…

Chongming academy

Next stop was Chongming Academy, an old Confucian school. Nothing spectacular to look at, but there’s some interesting exhibits (in Chinese) in several of the buildings about the history of Chongming island. Apparently it used to be an important centre of cloth production, and now it’s trying to reinvent itself as an ecotourism destination.

After that I took the bus to the wetland park in the north of the island. The bus trip is around an hour, which I wasn’t expecting, but the view along the way was interesting. One thing you’ll notice straight away is almost everyone on the island is old (quite common in rural China). The other noteworthy thing was the number of churches – I counted at least two plus some crosses on walls – which I hardly ever see on the mainland.

Harvested grass in the wetland park

With all the time spent travelling I only had time for two attractions but there’s also some temples and a forest park, so maybe you could make a weekend of it.

Here’s a pro tip: the last boat back to the mainland is at 6pm. If, like me, you miss this it’s also possible to take a long-distance bus back to the mainland via the bridge at the south of the island. The bus leaves from the bus station near the ferry terminal and takes about 1.5 hours to reach a subway station on line 6.

Zhujiajiao and Dianshan Lake

March 5th, 2022

A double day of sightseeing today in Qingpu district, which is in the far west of Shanghai. My first stop was Zhujiajiao ancient town. I didn’t have very high hopes considering the other old towns in the Shanghai suburbs have been over-commercialised and not very interesting, but this one was surprisingly quiet and well preserved. There are a couple of small paid exhibits including a garden, temple, and a craft museum.

Zhujiajiao ancient town

Next I rode all the way to the end of line 17 to try to get to Dianshan lake, Shanghai’s largest lake. I was going to walk there but thought better of it and got on a bus. The place you want to go to is called Xicai 西蔡 and there’s a long path around the lake with great views.

Dianshan lake

Years ago when I used take the train to Suzhou I was always fascinated by this massive skyscraper built seemingly in the middle of the countryside. I saw it again today on the other side of the lake. I still don’t know what it is. Only in China I suppose.

The mysterious tower

Shanghai World Financial Centre

March 1st, 2022

Last week I took a trip up to the 100th floor observation gallery in the Shanghai World Financial Centre the second tallest building in Shanghai. For a time it was also the second tallest building in the world, but it’s a fair way down the rankings now.

It’s the one on the left that looks like a bottle opener

The 100th floor ticket costs 180 which is cheaper, higher, and less crowded than the Oriental Pearl Tower, so triple win. You can save 60 RMB by only going to the 94th floor, but why bother.

The observation deck is pretty empty

The best time to visit is around sunset on a clear day, that way you get both the day and night scenery. The gallery isn’t ideal for taking photos in the day time though because the windows have a lot of glare, and there’s no outside area like the Taipei 101.

Sunset with the ever present haze

Filed in photos - Comments closed

MG: a simple lightweight Emacs clone

February 27th, 2022

For a while now I’ve been searching for a simple lightweight text editor to use when editing configuration files as root and when SSH-ing to remote machine. My normal editor is GNU Emacs with 15+ years of accumulated baggage which makes it pretty slow to start up. I’ve tried the various workarounds like the Emacs daemon and TRAMP but it still feels like a lot of faff compared to just SSH and starting an editor. I’ve also tried nano and vi, but my Emacs muscle memory makes them too annoying to use.

Recently I’ve settled on mg, a venerable Emacs clone that’s maintained as part of the OpenBSD base system and also available on Linux.

It starts up instantly and with the minor configuration tweaks below is pretty ergonomic.

global-set-key "\^z" undo
global-set-key "\^?" delete-backward-char
global-set-key "\^h" delete-backward-char
global-set-key "\e[1;3C" forward-word
global-set-key "\e[1;3D" backward-word
global-set-key "\e[1;5C" forward-word
global-set-key "\e[1;5D" backward-word
 
auto-execute *.c c-mode
auto-execute *.h c-mode
 
make-backup-files 0
set-default-mode indent
set-fill-column 72

Filed in linux - Comments closed

Shanghai City Centre

February 25th, 2022

Not much here, just a photo, but it’s somewhat remarkable since I almost never come to the city centre since I moved here.

Probably the best thing you can do here is ride the yellow and white ferry. Zig-zag across on the different lines. It’s quite fun.

Filed in photos - Comments closed

Major new NVC version 1.6.0

January 25th, 2022

Recently I’ve been doing a lot of work on my VHDL simulator and I’ve just released the first new major version in over a year and a half.

Download: nvc-1.6.0.tar.gz

This release is signed with my PGP key ID 74319F1A: nvc-1.6.0.tar.gz.sig

This release contains many improvements and bug fixes detailed below, but the highlights are much improved language support, especially for configurations and some VHDL-2008 features, as well as better debugging support.

  • Name resolution and overload resolution has been completely rewritten which should fix a number of long-standing issues.
  • The elaboration phase was largely written which fixes a number of long-standing issues and significantly improves elaboration speed.
  • VHDL-2008 IEEE standard libraries are now built and installed in addition to the VHDL-1993 libraries.
  • The VHDL-1993 standard libraries are now derived from the Apache 2.0 licensed sources from VHDL-2019.
  • There is now a project website at https://www.nickg.me.uk/nvc/. Please link to this in preference to the GitHub project page.
  • Compiled VHDL code now includes DWARF debug information which is used for runtime stack trace if libdw or libdwarf is installed.
  • Added support for VHDL-2008 reduction operators, match operators, and condition conversion.
  • Added support for VHDL-2008 element resolution.
  • Variable assignment now supports aggregate targets.
  • The --relax=impure option allows pure functions to call impure functions.
  • Added support for VHDL-2008 “all” sensitised processes.
  • Added support for ports and generics in block statements.
  • Added support for the ’BASE attribute.
  • Type name now allowed in element association choice (#407).
  • Implement textio READ procedure for REAL.
  • LLVM 6.0 or later is now required to build.
  • Added support for MINIMUM, MAXIMUM, and TO_STRING predefined operators in VHDL-2008.
  • VCD files are now generated from FST data in a similar manner to fst2vcd(1). This should improve compatibility with other tools.
  • Added support for ’LAST_ACTIVE attribute (#423).
  • Added support for ’DRIVING and ’DRIVING_VALUE attributes.
  • Added a new option --ieee-warnings=off to disable warning messages from the standard IEEE packages.
  • Support for configurations has been significantly improved (#372).
  • Added support for VHDL-2008 delimited comments.
  • Added support for guard expressions on blocks.
  • Added support for guarded signals.
  • Added support for HREAD, HWRITE, and other TEXTIO additions in VHDL-2008.
  • Code generation now happens in parallel when LLVM is built with multi-threading enabled.
  • Link time optimisation (LTO) is now enabled for release builds where supported.
  • The default assertion failure message for certain simple scalar comparisons now shows the values of the left and right hand sides.
  • Added support for VHDL-2008 conditional variable assignment statements.
  • Added support for VHDL-2008 extended bit string literals.
  • Non-globally-static actuals allowed in port maps in VHDL-2008 mode.
  • Added support for VHDL-2008 sequential conditional signal assignment statements.
  • Added basic support for package generics and package instantiation.
  • Nested arrays can now be included in the waveform dump but only if the --dump-arrays option is passed. This is disabled my default due the significant performance and memory overhead.
  • Added support for record types in waveform dump (#216).
  • Added support for foreign subprograms using the VHPIDIRECT protocol.
  • Library build is now reproducible when running make -j.
  • Fix a constant folding crash with nested records.
  • Fixed a crash when a record aggregate contains an “others” association and the fields have array types with different lengths.
  • Fixed a stack overflow when a subprogram with unconstrained array arguments is called repeatedly in a loop (#414).
  • Fixed intermittent crash when evaluating nested constant records (#425).
  • Fixed missing import libraries on Windows (#424).
  • Standard libraries are now installed under $prefix/lib/nvc/ instead of $prefix/share/nvc.
  • New configure option --disable-vital disables building the VITAL packages whose license status is unclear.
  • Support for the LXT wave output format, which was deprecated in version 1.5, has been removed. Use the default FST format instead.
  • The fetch-ieee.sh script which did nothing since the last release has been removed.
  • The --codegen command, which has been deprecated since 1.3, was removed.
  • The --profile option now prints internal simulation statistics instead of the top processes by CPU time.

Filed in vhdl - Comments closed

New xcowsay release 1.6

January 22nd, 2022

A new year, a new version of Xcowsay! Just a few minor changes this time:

  • Fix portability issues with signed vs unsigned chars in the config file parser (thanks to Charlène Wendling).
  • The -t option now allows fractional time values (e.g. -t 0.5 to display for half a second).
  • Set window type hint to notification to avoid shadows and other decorations (thanks to Markus Demleitner).
  • Add support for right-to-left text (thanks to @ilevi-code).

Download: xcowsay-1.6.tar.gz

This release is signed with my PGP key ID 74319F1A: xcowsay-1.6.tar.gz.sig

Filed in xcowsay - Comments closed