Go to advanced search

by rurwin
Sun Jul 30, 2017 8:49 am
Forum: General discussion
Topic: hdd hat? I think I'm going mad
Replies: 3
Views: 664

Re: hdd hat? I think I'm going mad

A device that connects to the USB would not be described as a "hat". This Google search may be of use: https://www.google.co.uk/search?client=ubuntu&hs=V9l&channel=fs&q=usb+to+sata&oq=usb+to+sata&gs_l=psy-ab.3..0l4.1270377.1272536.0.1273461.11.11.0.0.0.0.144.949.8j3.11.0....0...1.1.64.psy-ab..0.11.9...
by rurwin
Wed Jul 26, 2017 10:18 pm
Forum: General discussion
Topic: STICKY: NEW FORUM SKIN - Comments here please.
Replies: 288
Views: 46215

Re: STICKY: NEW FORUM SKIN - Comments here please.

jamesh wrote:
Wed Jul 26, 2017 9:57 pm
it was somewhat more 'interesting' than just a 'programming error'
Yes; my guess was wide of the mark, and only intended as a suggestion as to the sort of thing it could be. Turns out it was something else.
by rurwin
Wed Jul 26, 2017 4:29 pm
Forum: General discussion
Topic: STICKY: NEW FORUM SKIN - Comments here please.
Replies: 288
Views: 46215

Re: STICKY: NEW FORUM SKIN - Comments here please.

I note that some recent posts in this thread refer to "IP banning" (or some similar word construction). Is there any reason to believe that the banning has anything to do with IP addresses Yes, because it does. Rest assured that we are aware of such issues as dynamic IP addresses. These reports are...
by rurwin
Wed Jul 19, 2017 8:17 am
Forum: HATs and other add-ons
Topic: how to sense 220v input -solved- I hope
Replies: 51
Views: 48580

Re: how to sense 220v input -solved- I hope

I'm stupid with electronics too. Generally, if I build anything with mains, I hide behind the chair the first time I switch it on. The obvious thing to test is the voltage across the LEDs. You'll probably want to attach (and double-check) the probes before turning it on. If the LEDs have failed you ...
by rurwin
Sun Jul 16, 2017 8:23 am
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 18289

Re: How would you ...... in C ? (+ other C discussions)

It was the Microsoft C compiler. And it was many years ago -- probably the version just before it became Visual C.

And it was not a bug. The compiler is allowed to use any translation it likes with the same effect. The expression it doubled had no side effects.
by rurwin
Sat Jul 15, 2017 2:13 pm
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 18289

Re: How would you ...... in C ? (+ other C discussions)

Note that subtracting 65 is an improvement over rurwin's solution. I'm happy enough that I got as close as one instruction to the optimum. It reminds me of the Two Laws of Optimisation: Don't do it. (For experts only) Don't do it now. I've also seen horrible code coming out of a compiler (compiling...
by rurwin
Sat Jul 15, 2017 11:12 am
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 18289

Re: How would you ...... in C ? (+ other C discussions)

A nasty way of doing it would be to build an array of char (0 to 255 or -128 to 127 depending on the system) with each element set to 0 or 1, then use something like if( validchars[ch] == 1 ) printf( "is alpha" ); Sometimes a lookup table is the fastest way to do things. It will only take 256 bytes...
by rurwin
Sat Jul 15, 2017 10:44 am
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 18289

Re: How would you ...... in C ? (+ other C discussions)

Interesting fact: isalpha() is not a valid replacement for that code and might even crash. Certain C libraries (<achem>Microsoft</achem>) throw an exception if they are given a negative argument. If you check the BSD sources you will find a comment to the effect that this might be a good idea. At le...
by rurwin
Mon May 22, 2017 5:00 pm
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 18289

Re: How would you ...... in C ?

PeterO wrote:I like the "state machine" approach. Here's my take on it....
That fails if the first character not to match is the correct first key of the sequence. For example "12123#". That's why mine is complicated with the gotos. Nice compact state machine though.
by rurwin
Mon May 22, 2017 1:57 pm
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 18289

Re: How would you ...... in C ?

void loop() { typedef enum { Start, Got1, Got12, Got123} States; static States state = Start; States FailState; bool printit = true; char keypressed = myKeypad.getKey(); if (keypressed != NO_KEY) { if (keypressed == '1') FailState = Got1; else FailState = Start; switch (state) { case Start: if (key...
by rurwin
Fri Apr 21, 2017 8:55 am
Forum: Astro Pi
Topic: Shock resistance of the Raspberry Pi
Replies: 3
Views: 1540

Re: Shock resistance of the Raspberry Pi

I don't see any reason why not. 20g is rather small. If you were getting transients of 100g or more then I would have more concern. The one issue you might have is the plugs and sockets momentarily disconnecting or becoming stressed from repeated flexing. So I would tie down all the cables so that t...
by rurwin
Sun Mar 26, 2017 4:45 pm
Forum: HATs and other add-ons
Topic: 5" touchscreen calibration troubles.
Replies: 6
Views: 1692

Re: 5" touchscreen calibration troubles.

First Law of System Programming: Never check for an error condition that you don't know how to handle. Or in this case, don't bother reporting an error so deep in the pre-boot phase that nobody will ever see it. It might even only have the serial console available. Variable size strings are always a...
by rurwin
Sun Mar 26, 2017 3:52 pm
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions - grumpy man ramblings

Since I've proved:
  1. I can do snark with the best of them.
  2. I can't bear to do it even to someone I know doesn't mind.
It's time to end this madness.

0
by rurwin
Sun Mar 26, 2017 3:27 pm
Forum: HATs and other add-ons
Topic: 5" touchscreen calibration troubles.
Replies: 6
Views: 1692

Re: 5" touchscreen calibration troubles.

RTFM
https://www.raspberrypi.org/documentati ... ce-tree.md

(Snarky enough? And yes, the answer is there... somewhere. ;))

Hint 2: Hint 1

Hint 3: Section 3.2
by rurwin
Thu Mar 23, 2017 8:23 am
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions - grumpy man ramblings

Forum Incompetency Theorem: When a question is asked on a public forum, the supplied answers will split as follows 10% will report having the same problem but offer no help. 10% will report having an entirely different problem. 20% will answer a different question. 15% will answer incorrectly. 5% w...
by rurwin
Tue Mar 14, 2017 11:39 am
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

This special thread gets to live in General discussion and Off topic discussion at the same time. :) It showed that way for me for a while, now I only see it in Off-Topic (had to go looking for it so I could keep complaining and trying to sidetrack everything). It's still there on page two. Secrets...
by rurwin
Mon Mar 13, 2017 4:16 pm
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

It used to be the case that for any half-way complex application, you could depend on the user being willing to put a few hours into learning how to use it. Not so much, now. There are several reasons for that. They are not paying huge amounts of money for every copy, there are many competing produc...
by rurwin
Mon Mar 13, 2017 10:29 am
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

So vi is the editor that has the greatest economy of finger movement so long as you remap the keys? I was an emacs man through and through but the last straw came in 2014 when they deleted the cookie recipes. jEdit all the way now. Key-only editors do have one disadvantage. A colleague once told me ...
by rurwin
Mon Mar 13, 2017 7:25 am
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

Gavinmc42 wrote:Never could figure out why 101 keys, I only have 10 fingers.
Have you ever tried the Micro Writer? It might be extinct now but I am told it was great to use once you learned it.



4
by rurwin
Mon Mar 13, 2017 12:30 am
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

Shift-AltGr+/u, you say?



Not on Linux (Ubuntu LTS) it's not.

@łe¶ŧ←↓→øþ
æßðđŋħł
«»¢“”nµ,·

Ah. AltGr+m

Trust Linux to be sensible and put mu under m. And I assume it's Microsoft that puts it under u because appearances are everything, right?


5
by rurwin
Sun Mar 12, 2017 12:44 pm
Forum: Troubleshooting
Topic: octoprint printing slow
Replies: 4
Views: 3115

Re: octoprint printing slow

I have a Pi3B talking to a SeeMeCNC Orion Delta. It works fine. So it is not the fault of the hardware. Can you take the Pi out of the loop and use a laptop with the same cable? That would show whether it was the printer or USB cable that was at fault. If that prints fast then we would have to think...
by rurwin
Sun Mar 12, 2017 12:28 pm
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

Or just do a random Google and copy it from another website.

Or bring up a word-processor or a character map app.

Or say "fiddle it"; life's too short and no SI prefix is abbreviated "u".


6
by rurwin
Sun Mar 12, 2017 10:30 am
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

If it is a white unicorn and is now pink then it has red shifted. Better get out of it's way it's moving fast. No need to worry; it's moving away from you. To my mind, the gun counts as an observer, let alone the cat or even the mouse. And anyone who has ever had a cat in a closed box (that it does...
by rurwin
Sat Mar 11, 2017 6:42 pm
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

So how do you know the speed measuring device has taken its readings from the same part of the vehicle? The avg car length at 2.1metres is + or - 30mph's during the 0.3 second time period used to emit 3 laser pulses in order to calculate a speed reading. It uses doppler, not radar. All parts of the...
by rurwin
Sat Mar 11, 2017 1:54 pm
Forum: Off topic discussion
Topic: Snarky non-responses to questions - grumpy man ramblings
Replies: 252
Views: 31699

Re: Snarky non-responses to questions

If Johnny is not going directly towards the observer ie cop on the side of the road. Will it be exactly 325nm the cop sees? Can he then work out what speed Johnny is going? The only velocity that matters is that component that is radial to the cop. You can work it out with sines and cosines and Pyt...

Go to advanced search