HNHacker News
TopNewBestAskShowJobs

silasdb

340 karma · joined August 1, 2019

silas.net.br
submissionscomments
silasdb··on Working from home on the //c+
I have a DEC 440 and a HP 700/96 terminal and I love and use both. I can do almost anything using them (I still can read most of the web using one of the several text-based web browsers as well), but the main problem for me is using multi-byte encodings, mainly UTF-8.

I though about writing a terminal application that would stand between the physical terminal and /dev/tty* to translate a UTF-8 multi-byte character to a predefined ASCII character. It would be confusing, but still less confusing than the mess I get today when I try to see information code d in UTF-8.

iconv is not a good choice because, AFAIK, there are hundreds of code points impossible to be translate to character sets that have 256 possible values.

Any tips?

silasdb··on The Bourne Shell Source Code
The whole program trusts definitions in mac.h [1] like:

    #define IF if(
    #define THEN ){
    #define ELSE } else {
    #define ELIF } else if (
    #define FI ;}

    #define BEGIN {
    #define END }
    #define SWITCH switch(
    #define IN ){
    #define ENDSW }
    #define FOR for(
    #define WHILE while(
    ...
Isn't it nowadays considered bad practice? After taking a glance at the code, I see there might be some advantages like not forgetting to add missing {}. Is there any other explanation on why they created a dialect on the top of C using the preprocessor?

[1] https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh...

EDIT: fix English

silasdb··on Who Says Tcl Rules?
They started as quick-and-dirty apps because I didn't find anything that suited my needs so I decided to write my own. They are still quick-and-dirty (and ugly) but I intend to publish them next months after I clean the code up. Maybe I show them in "Show HN" :-)

I still need to discover how I overcome some Androwish limitations. Tk is great but the integration with the system (like copy-n-paste) is still something I need to discover how to deal with.

silasdb··on Who Says Tcl Rules?
Tcl cross-platform feature is astonishing. With Androwish [1] it steps even further.

I have a bunch of private tools for personal organization (time tracker, todo list, notepad-like app) that I've written in Tcl. Over the years, I used Android smartphones more and more and I just wanted all those small apps for Android too, but never had time to learn mobile development.

With Androwish I can just run them in my Android almost unmodified! And I can also make use of Android features like notifications. I sync the files between devices with Syncthing [2] or another tool and, voilà! I can use the same apps in both Android and Unix!

[1] http://androwish.org/

[2] https://syncthing.net/

EDIT: syntax

silasdb··on DuckDuckGo Traffic
I've been using DDG for a bit more than one year in all my devices. At the beginning, DDG results in any non-English language was not very good, but it got improved a lot recently! I still use !g bang command if I don't find something, but it is nice to see that DDG gets better and better over time :-)
silasdb··on The Joys of Unix Keyboards
You can also use xmodmap [1].

My xmodmap file has things like:

  ! Make Caps Lock be Escape and Scroll Lock be Caps Lock
  remove Lock = Caps_Lock
  keysym Caps_Lock = Escape
  remove Lock = Scroll_Lock
  keysym Scroll_Lock = Caps_Lock
  add Lock = Caps_Lock
After reading this post, I also reverted backspace and bar/backslash:

  keysym BackSpace = backslash bar
  keysym backslash = BackSpace
[1] https://wiki.archlinux.org/index.php/Xmodmap

EDIT: xmodmap link

silasdb··on Pedestrian routing that offers pleasant alternatives to the shortest route
That is what I do when I ride my bike to work. I ride a path I optimized from the shortest route to the safest and most pleasant (and still short enough). Good to see OSM can help us with that. I wish more people used and supported OSM instead of Google Maps.
silasdb··on Why It’s So Hard to Change People’s Commuting Behavior
I don't know how it works in other parts of the world, but where I live (Brazil) people afford cars to avoid bad quality public transportation (packed and expensive buses and trains). Not to say alternative modes have zero incentive from both government and companies. But I also see another reason: having a car gives you status. Many of my colleagues live very near from work (20, 15 or even 10 minutes walking) but they insist going to work using their cars because they don't see someone on their position could be seen arriving by foot or sharing public transportation with ordinary workers...
silasdb··on The One Notebook Habit (2018)
The Neo smartpen [1] looks great. They claim it can automatically saves a digital version of what you write down. The downside it that it only works with their notebooks.

[1] https://www.neosmartpen.com/en/

silasdb··on The One Notebook Habit (2018)
Another quote says "if you want to know how well you know something, try teaching it to someone else". As a occasional programmer and math teacher, I usually gets astonished on how much I learn when teaching "basic" stuff for students. The learning/teaching process is amazing! Now, going back to what we were talking about, writing for me is essentially teaching myself a thing I thought I knew.

EDIT: fix English

silasdb··on Gurgel Itaipu (1975) and Tesla Cybertruck (2019)
Another comparison: 43 yo brazilian Gurgel Formigão vs Tesla Cybertruck (text in Portuguese):

https://quatrorodas.abril.com.br/noticias/formigao-picape-br...

silasdb··on RISC-V OS Using Rust: Memory Management Unit
There are recently some guides about how to build an operating system in Rust. Rust is innovative and great, but also brings complex new ideas. Can it slow down learning and implementing because the developer have to dedicate too much time to the language itself?
silasdb··on Tcl: Everything Is a String
Although I love Tcl and find it very powerful, it is not as powerful and flexible as Lisp languages. It doesn't have nested procs, closures, lambdas (although one can [eval] or use [apply]) and other functional stuff.
silasdb··on People Simply Empty Out (1986)
I prefer to think that he writes down what work turns people into: empty bodies.
silasdb··on People Simply Empty Out (1986)
Bukowski, coming from the working class (like Jack London and others), has a real view about what work is indeed. He is not an outsider like many writers or artists. If you have a chance, read a short story written by him, Kid Stardust on the Porterhouse. I bet must of us already felt that way.
silasdb··on Ask HN: How to Self-Learn Programming?
Have a deadline, say, 3 months. Choose one language (no framework). Have one project (a bookstore system, for example).

Read official documentation/tutorials as you develop.

You may not like the language. You may not like the project. But finish the job with the tools you chose.

← PreviousPage 2 of 2