Categories: ,
Posted by: bjb

I compiled a rust hello world program and compared with a c hello world program.

$ cat hello-1.rs
fn main() {
    println!("Hello World!");
}
$ cat hello-1.c
#include <stdio.h>

int main() {
    printf("Hello World!");
}
$ 

The results:

$ ls -la hello-1 a.out-1
-rwxrwx--- 1 bjb bjb   16608 Jul 18 13:34 a.out-1
-rwxrwx--- 1 bjb bjb 6965408 Jul 18 13:34 hello-1
$ ldd a.out-1 hello-1
a.out-1:
        linux-vdso.so.1 (0x00007ffd825c7000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2b11bc5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2b11dce000)
hello-1:
        linux-vdso.so.1 (0x00007ffcd7d7d000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7531eed000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7531ee3000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7531ec2000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7531ea8000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7531ce7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7531f69000)
$ 

Hmm.

The second thing is that when I tried to build something, it complained that my rust compiler is too old. Ok — so look for the way to get a new rust. They want you to download a file sight unseen into a shell interpreter.

https://www.rust-lang.org/tools/install

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

A bit scary. My first preference would be to package it in a distro packaging system. (That was how I installed the older rust.) Second would be a plain old tarball.

Well, maybe I’ll look at it further some other day. I will need to audit the 600+ lines of shell script … lucky me.

More upcoming adventures … instead of makefiles — they use “crates” and “cargo” instead of Makefiles and maybe shared libraries. But, I’m not that far ahead yet.

UPDATE: they do offer tarballs — phew. https://forge.rust-lang.org/infra/other-installation-methods.html

Categories: ,
Posted by: bjb

I wanted a way to view time-series data — There’s always gnuplot but I wanted to learn grafana since it is becoming an in-demand skill. But how to view my logs in grafana? Grafana doesn’t natively read csv files (I have managed to convert the relevant info in my logs to csv). After a little surveying, I found a way to get some csv files into it — via influxdb. Grafana has a built-in “data source” for influxdb. If I could just get my csv data into influxdb, I’d be set.

Here are my notes.

Influxdb is a time-series database. It is not an SQL database and it does not correspond one-to-one with SQL database concepts. However … I do know a little about SQL databases. So …

 continue reading
Categories:
Posted by: bjb

This blog looks interesting. I will be reading more of it, but I started with this article:

http://tutorials.jenkov.com/software-as-career/dont-be-a-herdie.html

Categories: , ,
Posted by: bjb

You know those web sites that wait two seconds after you visit, then shade the whole page and put up some question — usually “sign up here for all this great content!” — before you’ve decided if the content is any good? Or ones that ask you to do a survey on how well they’ve satisifed your needs, before they’ve satisifed your needs?

They always make me think of a two-year old yanking on Mummy’s sleeve, saying Mummy? Mummy?? Mummy! Mummy!! MUMMY!!! — No manners at all, no consideration for what I want to do with my time, no consideration for whether this is an appropriate time to ask for a favour. Ugh.

 continue reading
Categories: , , ,
Posted by: bjb

Netdev 0x13 will be held in Prague this year, just before the IETF meeting.

Netdev is March 20-22; IETF 104 is March 23-29.

Categories:
Posted by: bjb

I’ve seen this message before: “This system is locked, you’ll be redirected to the unlock dialog in a few seconds.”

This morning that message did not clear up after several minutes (including time to walk to the kitchen and get a glass of water). Finally, I had to open a text terminal, run links, visit my favourite search engine duckduckgo.com, and look up how to fix it. Thank goodness for shell tools and the ability to use them.

The answer is[0]: on the terminal,

loginctl list-sessions
loginctl unlock-session <sessionid>

Works like charm, immediately opened the session.

[0] Answer found at askubuntu. Thank you askubuntu for a useful question and answer that solved my problem in minutes. And for a page that was legible in links, the text-based browser.

Categories:
Posted by: bjb

I need to get a new phone … My last phone failed. It has the Snapdragon 808/810 chipset and suffered a progressively worsening boot loop.

What I really want in a phone is:

  • a battery that is removeable
  • dual active sim
  • works on Freedom‘s network
  • DOESN’T use a snapdragon 808/810 chipset
  • can run lineageOS (or CopperheadOS)
  • fits in most pockets; preferably operable with one hand
 continue reading
Posted by: bjb

My boss mentioned that there is another “distro” of android out there, besides lineageOS, called “CopperheadOS“.

Sure looks interesting.

Categories:
Posted by: bjb

Here is an xmlstarlet command line to get a node attribute and the child node contents for nodes that contain a certain child node.

 continue reading
Categories:
Posted by: bjb

Another Debian birthday, another Debian birthday cake. Happy 25th birthday, Debian.

undecorated, molded chocolate cake (Debian logo imprinted into cake) same cake with icing sugar sifted over the top, to make the chocolate cake look white Chocolate zucchini cake, decorated with Debian swirl

It is still the chocolate-zucchini cake, but with cherry pie filling this time.

 continue reading