February 2025 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Archives
Meta
sublime – build feature
https://addyosmani.com/blog/custom-sublime-text-build-systems-for-popular-tools-and-languages/
Posted in General
Comments Off on sublime – build feature
Lua Crib Sheet
https://www.capgo.com/Resources/SoftwareDev/LuaShortRef51.pdf
Posted in General
Comments Off on Lua Crib Sheet
how to compare binary & decimal floating point
Aside:
The decimal32, decimal64, and decimal128 forms are provided as efficient, formats used for storing numbers of up to 7, 16 or 34 decimal digits respectively, in 4, 8, or 16 bytes. These formats are similar to, and are used in the same manner as, the C float and double data types.
Posted in General
Comments Off on how to compare binary & decimal floating point
CSS Selectors (W3C)
Begin forwarded message:
From: Ian Brackenbury <ian@brackenbury.nz>Subject: CSS Selectors (W3C)Date: 10 December 2012 2:35:53 PM NZDTTo: Ian Brackenbury <ian@brackenbury.nz>The following table summarizes CSS 2.1 selector syntax:
Pattern Meaning Described in section * Matches any element. Universal selector E Matches any E element (i.e., an element of type E). Type selectors E F Matches any F element that is a descendant of an E element. Descendant selectors E > F Matches any F element that is a child of an element E. Child selectors E:first-child Matches element E when E is the first child of its parent. The :first-child pseudo-class E:link
E:visitedMatches element E if E is the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited). The link pseudo-classes E:active
E:hover
E:focusMatches E during certain user actions. The dynamic pseudo-classes E:lang(c) Matches element of type E if it is in (human) language c (the document language specifies how language is determined). The :lang() pseudo-class E + F Matches any F element immediately preceded by a sibling element E. Adjacent selectors E[foo] Matches any E element with the “foo” attribute set (whatever the value). Attribute selectors E[foo=”warning”] Matches any E element whose “foo” attribute value is exactly equal to “warning”. Attribute selectors E[foo~=”warning”] Matches any E element whose “foo” attribute value is a list of space-separated values, one of which is exactly equal to “warning”. Attribute selectors E[lang|=”en”] Matches any E element whose “lang” attribute has a hyphen-separated list of values beginning (from the left) with “en”. Attribute selectors DIV.warning Language specific. (In HTML, the same as DIV[class~=”warning”].) Class selectors E#myid Matches any E element with ID equal to “myid”. ID selectors
Posted in General
Comments Off on CSS Selectors (W3C)
Gopher and Archie
Begin forwarded message:
From: Ian Brackenbury <ian@brackenbury.nz>Subject: Gopher and ArchieDate: 8 December 2012 11:14:17 AM NZDTTo: Karamu Farm Journal <ian@carefreecomputing.org>https://en.wikipedia.org/wiki/Gopher_(protocol)https://en.wikipedia.org/wiki/Archie_search_engineArchie, Gopher, Veronica and Jughead are three standard “finding” tools on the Internet. The Archie database is made up of the file directories from hundreds of systems. When you search this database on the basis of a file’s name, Archie can tell you which directory paths on which systems hold a copy of the file you want.To use Archie, you must Telnet to an Archie server. You can do that by keying in a command such astelnet://archie.internic.net to get to the Archie server at that address and log on by keying in archie when prompted to do so. Once you do your Archie search, you must then go get the file using FTP, the Internet File Transfer Protocol.A Gopher is a menu system that simplifies locating and using Internet resources. Each Gopher menu at each Gopher site is unique. Gopher menus usually include the other familiar features of the Internet. You can use a Gopher to Telnet to a location or to FTP a file or to do just about anything else–as long as that option is listed on the Gopher menu.Gopher software makes it possible for the system administrator at any Internet site to prepare a customized menu of files, features and Internet resources. When you use the Gopher, all you have to do is select the item you want from the menu.The Veronica database is a collection of menus from most Gopher sites. When you do a Veronica search, you are searching menu items. In the course of the search, Veronica builds an on-the-spot menu consisting of just those items that match your request. When the search is finished, Veronica will present you with a customized Gopher menu.Veronica will not only present you with a list of Gopher menu items, it will also act like a Gopher. The Veronica database of all Gopher menu items is called Gopherspace. Thus, if you used Veronica to search Gopherspace for the word supreme, you would most likely come up with a Gopher-style menu listing the places to get U.S. Supreme Court decisions. At this point, you could simply choose an item, and Veronica would automatically take you there.Jughead is available at some Gopher sites and uses the menu items on a single Gopher menu as its database.
Your can access Gopher by using a Web browser. The URL for a Gopher resource starts with gopher://. For example, the URL for the Gopher server called AskERIC is gopher://ericir.syr.edu.To learn more, go to:
SEARCHING GOPHER WITH VERONICA
- If you are at the gopher.micro.umn.edu site, choose Other Gopher and Information Servers > Search Titles in Gopher Space Using Veronica.
- If you are in Yahoo: Computers and Internet/Internet/Gopher, choose Searching > Veronica > Veronica (einet.net). This will lead you to EINet’s search engine where you will deselect Web Sources and select Gopher Titles, deselectall text within and select title text only.
Web Author: Jennifer Lagier, Copyright: Hartnell College
Posted in General Comments Off on Gopher and ArchieLua coding gems
https://www.lua.org/gems/Posted in General Comments Off on Lua coding gemsre links to Arduino IDE alternatives
https://www.drdobbs.com/embedded-systems/shiny-object-syndrome/240144165Shiny Object SyndromeI was going to talk more about lwos this time, but a shiny object appeared and so I want to say just one more thing regarding the Arduino build process.
December 11, 2012
URL:https://www.drdobbs.com/embedded-systems/shiny-object-syndrome/240144165I was supposed to talk more about lwos last time, but I got distracted talking about the Arudino and how I both like and dislike it at the same time. I was going to talk more about lwos this time, but a shiny object appeared and so I want to say just one more thing regarding the Arduino build process.
I know it isn’t for everyone, but I still am just as satisfied with my favorite editor (emacs, and yes, I do know vi, I just prefer emacs) and a command line. Not to knock Eclipse, but it is sort of like a Swiss army knife with 125 blades. It does everything, weights 10kg, and there are always a few blades in it that you are totally sure what they do. Powerful, but not always convenient.
On the other hand, if Eclipse could manage the build process then why couldn’t I with a makefile? I have learned when I have an idea like that not to rush into developing it right away. A quick search on Google often finds someone has beat me to the punch, and this was no exception. Even if you don’t care about using the command line, most tools will manage an external Makefile for you and, besides, reading it can explain a lot about the Arduinio build process.
Here is the page I found and it apparently is a modified version of another Makefile. I picked up the modified version since it handles libraries. However, that file is at version 0.3 and the original file is at 0.4 (a quick diff looks like some autodetection for Leonardo-style boards and a few extra compiler options).
The file needs a few variables you can set up in your .profile, .bashrc, or just in a script you source to your shell. Here’s my source script:
#remember to . source this file export ARDUINODIR=~/Embedded/Arduino/arduino-1.0.2 export BOARD=atmega328 export SERIALDEV=/dev/ttyUSB0Of course, you need to adjust this as you see fit. The first variable is the path to your Arduino install. The second is the board type (you can do a
make boards
command to find the right entry or dump the boards.txt file in your Arduino installation if you don’t want to fire up the IDE. The makefile will guess your serial port, but I set the final variable to tell it where to look anyway.The build worked perfectly (of course, I already had the prerequisite avr-gcc and avrdude installed). The default
make
command builds your program and the upload target sends it to the actual hardware.Since many programs use the serial port for debugging, the makefile has a target for “monitor” that starts the GNU Screen utility on your selected serial port.
Screen
actually lets you set the baud rate as an argument, but the makefile doesn’t do that and I frequently run at different baud rates for one reason or another. I was tempted to replacescreen
withbyobu
(if you usescreen
, look upbyobu
and try it). However, I really wanted to just launch a normal terminal so I decided to change the monitor section to usepicocom
and allow a selection of a baud rate. You can either specify theARDUINO_MONITOR_SPEED
variable in your environment or the makefile will prompt you for the speed from a short list of common baud rates. I cleaned up a few items related to guessing the baud rate as well.You can download the entire file online but here’s the main part I changed:
# screen $(SERIALDEV) # Assume the environment set a baud rate # if not, do a select. Either way # wind up with the baudrate in BAUDTEMP and # kick off picocom with no hardware handshaking @BAUDTEMP=$$ARDUINO_MONITOR_SPEED ; test ! -z "$(ARDUINO_MONITOR_SPEED)" || { echo Select baudrate: ; select BAUD in 300 1200 9600 19200 57600 115200 ; do ARDUINO_MONITOR_SPEED=$$BAUD ; BAUDTEMP=$$BAUD ; break ; done; } ; picocom -b $$BAUDTEMP -fn $(SERIALDEV)The only tricky part is using
$$
in the makefile to ensure the script sees a variable reference and not the expansion of that variable bymake
(which happens before you select the baud rate). If you aren’t familiar withpicocom
(you have to install it, of course) use Control+A Control+Q to exit. If you are used to the Arduino monitor resetting your board when it connects (which is true with some hardware variants), be aware thatpicocom
probably won’t do that. I prefer to control the reset myself, anyway.In addition to a makefile, I found a few other interesting links. First, there is a large list of alternatives to the Arduino IDE. The list includes information on using Atmel Studio, the command line, Visual Studio, and KDevelop. In addition, there are articles about using Minbloq (think Android App Inventor or >>>) or AVR-Ada. So there are options.
If Eclipse is too heavy for you, you don’t like the command line, but the stock IDE is too simplistic, you might consider MariaMole (which is, apparently, a Brazilian dessert). Oh yeah, be sure you are running Windows for this one, although other versions are in the works.
In the cross-platform camp, I’m not sure how practical it is, but there is a totally online IDE for Arduino. You do have to install a plugin, but the website can compile and upload your sketches. It wasn’t clear to me how to use libraries, but I didn’t spend much time on it either.
Another interesting but only mildly-related link I found was something I’ve often thought would be fun to write: an Arduino simulator. Sadly, also a Windows program but it does seem to run under Wine.
Ok I’m done with my Arduino rants for awhile. More on lwos next time. I promise. Assuming I don’t see another shiny object.
Posted in General Comments Off on re links to Arduino IDE alternativesSameFringeProblem (showing off coroutines) in several languages
https://c2.com/cgi/wiki?SameFringeProblemPosted in General Comments Off on SameFringeProblem (showing off coroutines) in several languagesLearning C on Mac using Xcode
https://masters-of-the-void.comPosted in General Comments Off on Learning C on Mac using Xcode