News for hackers. Stuff that matters.

mjbrownie

I've been reading Finnegans Wake and not making much sense of it so I wrote a data pipeline to scour the web for interpretation books / guides (which I also can't be bothered actually reading) and coupled it with an prompt to image pipeline. It's now a readable albeit silly picture book to go along with an audio book... I call it finnegans slop.
nice. had no idea about that connnotation :) ... goes with black swan event as a saying that's ill fitting for these parts (in southern Australia all we have are black swans).
I work with a shorebird expert who has been tracking migrations (Latham snipe whose range extends from Russia/Northern Japan to Southern Australia).

I think an early technique of tracking their migration before gps/chip/batteries were small enough was a primitive light sensor + data logger that would log day/night hours on the bird as it flew from island to island and the light data was enough to roughly estimate lattitute (and often enough to infer a location/date.

The data looked great in this form. It wasn't hourglass but with jagged edges and shifts. You could easily see which months the bird stayed in a single place for several days etc. clever stuff.

Re:I figured out how to get GitHub Copilot to run in the terminal on Thursday September 15, 2022 @03:54AM (#32848627)
I'm using a slightly different method. Vimwiki diary and a code block runner (runs in another tmux window)... so it's doubling as a (markdown/html) documentation generator of all my work.

I'm actually enjoying it as it's providing a lot of context on the time and notes/discussion on every command I run. Also good for history searches as regular cli history ultimately relies on your own memory.

Still it feels like you need to already have paid your dues... (I'm 20+ years in...) .

I've recently started working in this space. Loads of applications in research, Ag tech and environmental science and it's mostly using this tech stack (as well as GeoServer.) Definitely a nice change from my typical ecommerce/saas work. Working with some long term geo/surveyor types and they seem happy with the open source offerings.
Re:Vim Modes Transition Diagram on Tuesday May 25, 2021 @02:18AM (#27273379)
The best way to stop doing it accidentally is to start doing it deliberately, then the muscle memory will catch up.
Re:Pg8000 – Pure-Python PostgreSQL driver on Friday May 14, 2021 @05:05AM (#27152289)
I just managed to get it working on an ipads iVim python environment which is pretty crippled (no compiler etc).
Re:Why are there so many Canadians in India? on Monday May 03, 2021 @12:09AM (#27021528)
perhaps... "Never ascribe to stupidity that which can be explained by laziness"
The Unexploded ordinance teams (UXO) do an amazing job. I was there backpacking in 2004 on a bus and was stopped in a traffic jam on a remote mountain side, loads of army looking people about. I had no idea what was going on and the locals couldn't explain... then a huge blast went off up the hill. What was striking was 1. how close the thing was to a village, 2. How dense the jungle was around the area for these things to hide and 3. How normal this process seemed to the locals looking at their reactions.
yeah depends on your site structure.. you could always stop the logging (or log to a different file) but return a human 404 with links to legit routes etc. the main thing is to remove the noise so you can focus on the more targeted probing.
I usually set up nginx to "default ignore" and only respond to specific paths which I can name... works for api only domains at any rate. just use an explicit subfolder like /api/ ... cuts down on the noise.

    location / {
            return 444;
            access_log off;
    }

    location /a/ {
       ...
    }
Thats fine. The main thing is not to confuse technique with repertoire.. like a musical instrument, putting time in to mastering scales and finger technique will get you a lot of finesse in tackling musical pieces but it's the quality of your repertoire (in this context the algorithms/languages/higher problem solving knowledge) is what will be what gets you the money. Still a practising a few scales every now and then...
Re:Guide to Python Debugging on Tuesday June 02, 2020 @04:05AM (#23388795)
I recommend repr in all log messages too. For a work Django project we have common BaseModel repr(obj) expression that can be easily converted (using regexes in loki and promtail) into a clickable admin link.

So within loki (or any similar log tools) all logger.info(repr(object)) is a link straight to the admin. Worth the set up time.

Re:Tmux for Mere Mortals on Tuesday April 28, 2020 @04:03AM (#23004711)
A typical scrollback cut and paste workflow for me is via this <ctrl-b>P mapping. I'm lazy I just grab everything.

   bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
then it's all in a file you can work with in an editor of your choice
Re:Tmux for Mere Mortals on Tuesday April 28, 2020 @02:29AM (#23004077)
Portability and accessibility do work in tmux's favour which a tiling window manager (I was on ion3 for ages) cant emulate. I probably have a weird development style but with tmux/ssh and the same session I can..

* Work from my desktop

* move to my laptop on the couch

* nick off to a cafe (well perhaps not atm) on an ipad.

* keep tabs on long running processes on my phone and termux.

all with a consistent interface. I think it's worth getting a working knowledge up.

Re:A Quick and Easy Guide to Tmux (2015) on Tuesday October 29, 2019 @08:43PM (#21393601)
one of my favorite tmux patterns is "kill it if its running and run it again somewhere else" which uses send keys in a bash script. I'm always knocking up scripts like this

    #!/bin/bash

    TMUX_SESSION=test
    TMUX_WINDOW=QUICK_TEST
    # your custom command you want run
    COMMAND=~/bin/quick_test  
    ARGS=$*

    tmux kill-window -t $TMUX_SESSION:$TMUX_WINDOW
    tmux new-window -t $TMUX_SESSION -n $TMUX_WINDOW
    tmux send-keys -t $TMUX_SESSION:$TMUX_WINDOW"$COMMAND $ARGS" C-m
run the script in the terminal/ide you're working/editing. it blinks away on another screen (or another machine entirely eg. raspberry pi monitor in the kitchen) without disrupting your main task.
Re:Tmux Tutorial on Tuesday September 24, 2019 @02:38AM (#21057170)
ctrl+b, pageup is enough to start scroll back so you can skip [
Re:Tmux Tutorial on Tuesday September 24, 2019 @01:38AM (#21056878)
I use tmux in conjunction with tmuxp and highly recommend the pairing (or alternately use tmuxinator). a bash shortcut I use every day to attach/create/restore dozens of sessions is.

  pc:bt2$ cat ~/bin/t
  #!/bin/bash
  if [[ $# == 0 ]]; then
      echo tmux list-sessions
      echo
      tmux list-sessions
      echo
      echo tmuxp sessions
      echo
      ls ~/.tmuxp

  else
      tmuxp load $1 || tmux attach -t $1 || tmux new-session -s $1
  fi
usage "t session_name"
Re:Your live coding demo is boring me (2015) on Friday January 25, 2019 @08:23PM (#19004098)
heres a weekend script I wrote as a prank. it just remaps your a-z keys and reads in from a renamed version of a file.

https://github.com/mjbrownie/hackertyper.vim

Re:150 days of living and coding in a van on Tuesday October 10, 2017 @11:39AM (#15442687)
Ah sorry I mixed up with Duet in the gp
Re:150 days of living and coding in a van on Tuesday October 10, 2017 @11:08AM (#15442414)
If you're using the tablet for terminal stuff (log tailing etc), I've found just sshing into your laptop from the tablet using juice ssh or similar to be more stable as well as your laptop graphics card doesn't need to be rendering two screens
Re:150 days of living and coding in a van on Tuesday October 10, 2017 @11:02AM (#15442356)
Well tmux gives you back some scrollback (when you remember the key combination). I was doing linux sysadmin style work on remote cellular networks so mosh was great for the occasional dropouts. Also tmux gives you an extra layer of persistence and window organisation.
Re:150 days of living and coding in a van on Tuesday October 10, 2017 @10:47AM (#15442223)
No public blog unfortunately...

It was a lucky mix of timing and life circumstance. Single, late twenties had just finished most heavy development work in 2010 and the sytems were running smoothely, a good bossfriend who knew I was hard to replace and I had a sister to catch up with on the other side of the country.

Re:150 days of living and coding in a van on Tuesday October 10, 2017 @10:23AM (#15441981)
I drove around Australia whilst still maintaining several django projects for a web hosting company back in 2011. Started with an old 15 inch Dell and a Samsung Galaxy tab but got a 11 inch Mac Air later.

Great fun! You really learn to optimise your setup around current draw and avoiding overheat :) My biggest lessons were combining mosh and tmux It'd be more of a struggle as a front end developer.

Cool. I also wrote a vim plugin to do stuff like cycling between keywords. There is already a gitrebase filetype to hook it to as well.

https://github.com/mjbrownie/swapit

Re:An Orangutan Learns to Fish on Thursday September 18, 2014 @04:53AM (#8334297)
I've had the good fortune of visiting Camp Leakey with primatologist Leif Cocks of the orangutan project (http://orangutan.org.au) and they are every bit as intelligent and mischievous as described.

An important side note to this article is that (despite this observed fishing behavior) Orangutans swim, in his words, "like bricks". This leads to a lot of sub speciation either side of river systems and sadly makes migration difficult in what scraps are left of their habitat.

There is a significant degree of sexual dimorphism within the orangutan species (130 kilo+ adult males compared to around 35 kilo females)- far greater than humans. That any comparison to human behavior cannot be implied. Just take it as it is.

If it makes you feel better, wild female orangutan mothers are capable of teaching their children over 180 food sources during a nurturing period lasting over 10 years. Impressive stuff.