Posts

Showing posts with the label 9front

Plan 9: Dynamic HTML

Image
  Render Dynamic HTML using plot and qjs. Render a simple website   Font zoom   E-Book Reader eBook is a collection of HTML files in a ZIP archive. Follow same steps for Comic Book reader which are collection of JPG/PNG images in a ZIP/RAR archive. For columns, pure HTML solution involves column-count CSS property. However, this works only for designed screen sizes. For non-standard sizes, the first column might span multiple pages before continuing in the second column. Hence, the page mode manages the split without relying on the column-count.   Keymap t                          Table of Content -/=                     Font zoom 1,2,3                  Column s                         Toggle scroll/page mode  ...

Plan 9: Tiled Map

Image
  Use plot(1) to display tiled maps. The zoom factor decides the grid dimension. osm.js: Download tile images from OpenStreetMaps using hget. Cache the images. Convert the PNG image into Plan 9 format using png. Display the images using plot. Plot script   ra 0 0 200 200 m 0 100 im /file :Note - must end the script with a newline     Plot tries to center the drawing. Hence the origin is at the bottom with a slight offset from the left. However, image uses origin at the top left.     Interactive Plotting and Maps Use plot command in server mode (-s option). plot -s a.plt  mount /srv/plot /mnt/plot echo li 0 0 100 100 > /mnt/plot/ctl echo erase > /mnt/plot/ctl Usage as an interactive map.   OSM API Tiles https://tile.openstreetmap.org/zoom/x/y.png   The World map at zoom 0 https://tile.openstreetmap.org/0/0/0.png     Geocoding (Name to geographical co-ordinates) https://nominatim.openstreetmap.org/search?q=hebba...

Plan 9: Intel Wireless 3165

Intel Wireless 3165 internal PCI card works with Plan 9. You'll need firmware blob /lib/firmware/ iwlwifi-7265D-29 .ucode from Linux as /lib/firmware/ iwlwifi-7265D-29  in Plan 9. Detect hardware on Linux  lspci -nn 02:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [ 8086:3165 ] (rev 81)      # slot_info=0000:02:00.0 # vendor_id=8086 # device_code=3165   Detect firmware on Linux  sudo dmesg | grep -i iwlwifi | grep -i firmware [    6.062085] iwlwifi 0000:02:00.0: loaded firmware version 29.f2390aa8.0 7265D-29.ucode op_mode iwlmvm Apply the following patch to etheriwl.c and rebuild kernel (cd  /sys/src/9/pc64 && mk install). The kernel should be copied to /n/9fat (9fat partition - use 9fs 9fat ) . @@ -4509,6 +4512,10 @@ iwlpci(void)              family = 9000;              fwname = "iwm-9260-34";           ...

Plan 9 Remote File Access from Emacs

Image
  Plan 9 Operating System uses 9p protocol for file access. This is an Elisp implementation of the protocol. Plan 9 ( 9front distribution) is running in QEMU with NAT networking. Local port 12564 is forwarded to 9fs service port 564 in the virtual machine.   Code https://gitlab.com/atamariya/emacs/-/blob/dev/lisp/net/plan9.el   Troubleshooting Plan 9 connection Ensure you are booting with  -a tcp!*!564  parameters. (Tip: You can add these to your /n/9fat/plan9.ini) Ensure you have configured the network interface   ip/ipconfig   Ensure you have an IP address  cat /net/ndb  Ensure you are running cpu+auth server  cpurc  (Optional) Start graphics mode  screenrc   (Optional) Start window manager  rio   (Optional) List open connections  netstat    (Optional) Monitor network traffic  snoopy   (Optional) Debug authentication  auth/debug  (Optional)...