*nix EMACS! Anybody home?!Ok someone must use it. I mean, Richard Stallman high guru of open source wrote it, and presumably uses it. But one dark and stormy night I was trying to hack an executable to remove the annoying GPL message Borland insists on sticking in everything — you see how this ties into Stallman? — and I realized that users have got to be scarce on the ground. Or at least in the Linux KDE GUI environment. ... One of the handy commands one can use in the EMACS “hexl-mode” is “C-M-d” which should “insert a byte with a code typed in decimal” — but which instead immediately minimized all my KDE windows. I think there was a whooshing noise maybe. ... Of course you immediately understood “C-M” means control+alt; ... of course. You do see the “M” on your Alt key, don’t you? No? ... Oh you pathetic idiot; you’re probably not using a circa 1956 Concurrent Conundrum time-sharing terminal. ... I mean, what kind of drooling fool are you anyways!? ... So as I googled the web trying to reassure myself “C-M” did mean control+alt, I came across http:// www.csd.uwo.ca/ staff/ magi/ personal/ nak/ emacs.html: Escape-Meta-Alt-Control-Shift?
and then the thoughtful fellow offered some simple procedures for “using EMACS” which appeared to involve deleting it.... ... But getting back to our story, you understand Borland’s considerate attitude towards their GPL message means that it is very difficult to write non-GUI applications with the free Kylix, because very few console tools can deal successfully with a line of pointless noise prefacing conceivably useful information. And while in the end I discovered that I could use “C-M-o” to enter an octal value, and it didn’t minimize all the windows, or start up the octohorn, or anything (I’m too scared to try the hex entry “C-M-x”) — Borland was too smart for me. It just obliterated the first letter of the message, replacing it with a \0, which doesn’t really help much. ... But at least now I know how to enter an octal number in EMACS. That must come in handy someday. ... — Tuesday, April 5, 2005 12:55 pm |
Cadsoft Eagle: The Better Schematic-Capture/PCB Software?Well they’re certainly not the worst! ... Run by kindly Germans over at www.cadsoft.de, they have a free free capacity-limited version which at the very least will introduce those among us ignorant of the magic of schematic-capture to the rudiments of the art. ... Which included me until I did their “TUTORIAL-ENG.PDF”. ... Basically, if you work through it as they advise, you will get a pretty good grasp of what they’re up-to — with a few bumps which I will attempt to obfuscate here, along with general suggestions & ignorance.... So I’m not trying to explain the program; I’m trying to explain some things that stumped me while doing the TUTORIAL-ENG.PDF. (Note that this ancient text refers to the 4.1 version of the software, not the new advanced 5.6. The former is probably still available on their web site.) (And note that they’ve been bought around Friday, September 25, 2009; let us hope for the best — but of course whine of the worst....) What It IsCadsoft’s “Eagle” consists of three Windows programs:
The basic strategy is you add to a schematic specific components including physical configuration as well as interconnections. Complaints on the web suggest it would be nice, on the other hand, to start using a particular CPU, say 40-pin, and then later change to 52-pin PLCC or whatever. But it doesn’t work that way; apparently you have to decide when you place the component on the schematic what kind it is. Which probably fits in with the program’s two-way schematic/PCB feature: used normally, after you create the PCB with a schematic the two are forced to correspond as you make changes, which seems like a wonderful idea to me.... Command LineThere’s a place to type commands at the top of the schematic and PCB program, and it’s best to get over it and assume that you will have to type things in there sometimes; it’s the way it works. ... For instance ... How Do You Undrop? (Answer: “use *”)When you want to place a component in your schematic, you click the “add” icon and a wonderful immense collection of parts in “libraries” appears, from which you may choose your part. You can remove some branches of this vast collection by clicking the “drop” button. But there was no “undrop” button! .... Instead, you can type “use all” (+ enter of course) in the command-line thing. ... Detailed extensive research suggests the “USE *” adds all the libraries in the eagle library path(s) (like the projects path, but mutilate the “library” entry or something). ... At least in version 4.6 or so; this used to say “USE ALL” was the magic mumbo-jumbo, and I must’ve gotten that from somewhere.... Stopping Add: EscAfter you click the add icon and select something to add, you add it by clicking anywhere on the schematic. Then, the program will happily keep adding stuff as long as you keep clicking, which is handy, sometimes. Clicking the STOP icon will stop it I think; or I found just pressing ESC (or maybe ESC, ESC) would. A “Net”is how Cadsoft refers to normal connections between components, for which you click the NET icon, and then draw them with the mouse. The concept here is a schematic consists of components and nets. If you’ve wire-wrapped any — which was my preferred mode of circuit-realization before Cadsoft — you know about wire-wrapping two pins, getting another wire, wire-wrapping another two pins, and eventually stopping with that connection and starting an entirely new series of wire-wrap wires. That is, you hardly want to connect every component in the circuit to every other component! ... This “NET” thing is the equivalent of a short series of wire-wrap wires connecting a few components. Each component and NET in Eagle has a name; any NET that has the same name as another NET will be electrically connected together when Eagle concocts the PCB. You can find-out their names — and change them — by typing “name” (followed by Enter) in the command thing, and then clicking a net. Why Isn’t the Net Name Right?Probably because you
clicked a component instead of the wire aka NET you had in mind.
Magnify some more ( How Come Things Didn’t Get Connected?I didn’t really have this problem (?!), but the tutorial and web chit-chat suggests it has been a challenge now and then. ... I did as advised — (1.) turning on the “pins” layer, so the schematic is strewn with green bubbles wherever a connection is possible, and (2.) making sure the default grid is .1’’ so my drawn Nets had to be in the right places — and I think I missed a single connection. ... In, of course, a very small practice schematic.... Shift Click DeleteI deleted things by clicking the Delete icon and then clicking the offender, but I found sometimes I had to press shift while clicking to delete some things, I have no idea why. The FormYou start the schematic usually I gather by adding a “form” like LETTER_P (“letter”, “portrait”, I guess), which has a cute little official-schematic block there in the corner for info. It comes with some info which you don’t modify, like the file name and the date/time — Eagle modifies that stuff for you. The Alternate Grid: Alt + Clickis used to place unimportant things like text — by pressing Alt while you’re doing the placing. The regular (default .1’’) grid defaults to the correct values to make things work, and should be used to place components, NETs etc. Can’t Change Label Position?: “Smash”!After you place a component, particularly if it’s sideways or upside-down (right-click during placement or something?) the label for the thing may look odd. If you’re tidy, find the “smash” icon, click it, and then click the component, whereupon the label will sort-of detach itself and you can fiddle with it. ... But youve got to find the little crosshairs of the label to move/rotate/etc it; and its invisible! ... I manigified the thing enormously so the label practically filled the screen and then I could see it; after a while I assume you sort-of get used to where its likely to be.... Move a Group of Things: CONTROL + Right-clickThere’s a regular dotted rectangle icon over there like a paint program, but after you’ve selected a bunch of things, you have to use the right-click + control — after clicking the “move” icon of course — to move the stuff. ... For years this text omitted the control part; how could I be so stupid!?!?!??! Printing: Use the Black!When your colored text show-up as black rectangles on your LaserJet, check the “Black” check box in the printer dialog. How Can I Delete a Label?If you type “Label” (+ enter) in the command thingey, and then click a NET, it gets a nice label of the name. If you do that 10 times, you get ten labels. But sometimes I couldn’t delete them! I think the trick was to make sure to click the little “+” sign associated with the label — actually every component and thing in the schematic has such a “handle” — and then I could delete it. As with many problems, zooming-in helped a lot. How Should I Do the “Entering a Schematic” Exercise on Page 35 of Tutorial-eng.PDF?Cadsoft provides the schematic pre-drawn as DEMO1.SCH somewhere in the default installation of the product, but that is really no fun at all. ... I recommend printing-out DEMO1.SCH and the parts list in the PDF, and making an entirely new schematic of your own, recreating the thing by hand. ... Which is of course extremely tedious and annoying — but that’s what we’re here for, isn’t it? This may also be a good idea since for some reason I couldn’t get Eagle to autoroute a board for the supplied DEMO1.SCH with the (freebie) program.... How Come the 5 Volt Regulator Isn’t Connected?After
I got through with this and was so proud, I confirmed a dark suspicion
and found the 5-volt Actually, the supplied DEMO1, DEMO2, and DEMO3 schematics seemed to have the same difficulty, and also the DEMO2 and DEMO3 boards, I think. ... So these clever Germans aren’t that clever!... Which brings me to an associate who did tremendously clever things over the years, apparently with this very software, but I had noticed how the boards I got for debug/test would sometimes leave bits of the power-supply unconnected. ... The 5 volt supply “parts” — the thing you “add” to various spots on the schematic to designate the 5 volt supply — magically connect themselves, and I suspect in some previous version, the 5 volt supply part itself would do that also ... but definitely didn’t here....
... Then I developed paranoid suspicions that my esteemed associate was somehow responsible for the startling (to me) BUS.SCH demonstration file, which of course shows a bus — but of a 12-valve head! ... They’re talking about my life’s work there; how they’d know!?... A Helpful Hint: How to Have Another Project DirectoryIn the main “control panel” eagle window, “Options / Directories / Projects”: you can use a semicolon “;” to separate two or more paths where your projects might go, and then they’ll all show-up in the Eagle control panel window. ... So I can get the supposedly valuable stuff I’m toiling-away at backed-up without backing-up the default project directory in the eagle program project directory structure. And without abandoning the default project directory — with the examples. ... I found this out by installing version 5 of the program, which uses the semicolon so you can have examples and your own private projects area (which you MUST do with Vista) (but the semicolon worked in my version 4). ... Helplessly, Eagle semicolons the helpful Microsoft default “c:\Documents and Settings\Your User Name\Application Data\eagle” (or something) which, of course, you will have to add to your backup explicitly, unless you just happily backup your “Documents and Settings” directory and all thirty-thousand gigabytes of meaningless graphics cute stunts and garbagey dreck that your typical windows program and of course Windows itself and all the c--pware your helpful OEM installs will stick there. (General-purpose Windows hint: NEVER NEVER NEVER NEVER use “Documents and Settings” or ANY Windows-supplied directory, if you can help it. Just make your own; I make a “c:\gregor” directory and numerous others, wherever I want them — but I try to keep them secret from Windows.) ... I had just been railing to the LOL about how I hate software, and giving as an example this very problem with the nevertheless-admirable EagleCad, that I had to do wacko tricks to get my work backed-up, and speculating bitterly that I’d find-out in 17 years “oh you just do <--->” which of course I would never have guessed. ... But then I found it out the next day, by downloading the next version which was forced to accommodate the execrable Vista and incidentally reveal the semicolon trick. ... The software could’ve done the right thing, which would be to have a “tool tip” on the directories thingey there, suggesting the Power of the Semicolon. But Eagle’s only been making this program for 10 years or so, so they haven’t gotten that far. ... So I just spent 10 minutes finding the version 5 eagle directory in “Documents and Settings”. That Chen (?) guy at Micrsoft TechNet Magazine (?) once explained that “Program Files” is called that to prevent hapless MSDOS users — i.e. when Windows was newish — from wandering in there trying to start their programs which, of course, they couldn’t find anywhere else because Windows is so EZ and helpful. ... Do you suppose “Documents and Settings” is the same idea? ... Prevent them from finding their documents? ... And it works.... ... More Eagle Thoughts: The Good, The Ugly ...The Dance of Time has done a few steps, and here I am again trying to figure-out Eagle. ... I realized while doing so I truly hated the thing — perhaps because learning new software is infantalizing; you’re in kindergarten, nothing works. ... Now Eagle is undoubtedly one of the better of the schematic/PCB programs; but that’s like saying Excel is one of the better spreadsheets (and incidentally I also despise spreadsheet software). ... A pilgrim on the web cited Eagle’s ability to run for hours without crashing as an exciting advanced characteristic, which is apparently otherwise unheard-of in the world of schematic/PCB software.... But I would like to grow accustomed to programs that are intuitive; that do what I expect. ... Eagle is not one of those. ... On the other hand, Eagle does not cost $8000 — a typical number someone on the web mentioned for “competitive” products; the actual companies won’t say. ... Except Eagle, which has prices on its website and even in advertisements; and Eagle’s copy-protection is still a relatively benign license # scheme. ... Although they are drifting toward the dark side, and require personal petition to discover upgrade prices.... Al Williams’ Build Your Own Printed Circuit Board ©2004Somewhere above I claim I didn’t have problems connecting things, but I must’ve been so much older then. ... I was just doing an example with 9 connections, and managed to miss two of them! ... This is not the way I want my easy-to-use software to work. ... The example, incidentally, came from the obsolete book Build Your Own Printed Circuit Board by Al Williams, still available for $25 or so at Amazon. It’s mostly about Eagle version 4.1; a CD — remember those! — comes with the book — but it’s still one of the best books of this kind I can remember reading. ... Williams puffs the product, as they all do; but it’s still a really useful guide for a fairly CAD-ignorant (but hardware-knowledgeable) person to the wonders and majesty of schematic capture and PCB routing the Eagle way — easily worth the money. ... Of course it’s the wrong version, and even then there are exciting deviations from even 4.6 operation — but that just makes it more interesting, eh? ... The plan I followed was to use the 4.6 eagle I had (the final version 4 revision) to work with the book, but you could install the one on his CD which might work-out better; remember, all the versions can be used in the limited-but-useful free mode! ... Then I can move on to the current version 5 and learn everything all over again — which is typical, anyway. ... It’s probably the best eagle book out there; a small selection, to be sure.... ... But still, Eagle will not become my buddy; unlike, say, my cuddly Pascal IDE Delphi, for instance. ... I guess one of the secrets of my illustrious do-nothing career has been avoiding ugly software. ... But perhaps I will yet beat Eagle into submission and learn to love the pain.... — the ancient
programmer
|
Hey Kids: Let’s Play With Quotes!!That’d be in Windows XP. ... Try this testquotes.bat in your system: echo echo I am nop.bat %%1 > "c:\Program Files\nop.bat"call "c:\Program Files\nop.bat" call "c:\Program Files\nop.bat" "arg w/ spaces" %comspec% /C "c:\Program Files\nop.bat" "arg w/ spaces" That fourth line doesn’t work in XP; it tries to execute “Program” — and this behavior is actually documented (“cmd /?”)! ... Of course testquotes.bat works as expected in Windows 98 second edition.... But guess what children? It doesn’t work in the XP CreateProcess system call either! Is that cool or what? ... That is CreateProcess("c:\\windows\\system32\\cmd.exe", "c:\\windows\\system32\\cmd.exe /c \"c:\\Program Files\\nop.bat\" \"arg w/ spaces\"", blah blah etc) reports no error — but doesn’t execute the batch file! ... Microsoft says of CreateProcess (at least it did Friday, October 6, 2006 5:58 pm) “to run a batch file, you must start the command interpreter; set lpApplicationName to cmd.exe and set lpCommandLine to the name of the batch file” — which is so wrong I really suspect their hearts weren’t in it (you still have to use “/C” in the arguments to actually make it work).1 But I’m cynically inclined to suspect the Microsofties knew the cmd thing was broken. ... I say that because despite their advice, you can actually — in both Windows 98 and XP — execute the batch file correctly like CreateProcess(NULL, "\"c:\\Program Files\\nop.bat\" \"arg w/ spaces\"", blah blah) i.e., by just setting the lpApplicationName to NULL and not using cmd.exe. ... This is a pretty unusual “accident” so I’m assuming it was intentional — although they probably never got it to work right either, so they don’t admit it. ... Obviously, the simple fix is just to always NULL the first argument — until that reveals some other phase-of-moon contretemps.... Of course it’ll work correctly in Vista.... —
the
sadly disappointed programmer 1. I was rereading this, and momentarily thought that perhaps they meant CreateProcess(“cmd.exe”,“\”\\program files\\nop.bat\“ \”args with spaces\“”, etc ...) — which is what they actually say — but that’s no good either....
|
|