Go to advanced search

by Heater
Mon Jun 25, 2018 10:17 am
Forum: Python
Topic: please explain this code?
Replies: 13
Views: 235

Re: please explain this code?

R-A, In what sense is "time critical" an issue? If I want to sample temperature, weather and solar data, say every minute, from at least 30 sensors +(doing some research) is that considered time sensitive? Depends on your application. If you want to make a first person shooter game you have 16ms per...
by Heater
Sun Jun 24, 2018 11:47 pm
Forum: Other programming languages
Topic: NodeJS: How to send code string (command) to projector from NodeJS?
Replies: 1
Views: 69

Re: NodeJS: How to send code string (command) to projector from NodeJS?

You need to send binary data not strings. The node-serialport documentation says: You can write to the serial port by sending a string or buffer to the write method: port.write('Hi Mom!'); port.write(Buffer.from('Hi Mom!')); From the node.js documentation we find: Prior to the introduction of TypedA...
by Heater
Sun Jun 24, 2018 6:29 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

Tease.

Not at all. Both JS and C have the same problems with IEEE floats. As do many other languages.

As far as I can make out _Decimal64 and such are not even part of the C standard.
by Heater
Sun Jun 24, 2018 6:11 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

paddyg Thanks for the link. That was great. Kind of ironic that a guy named Will Self is expounding on "self" and "will" like that. Having read the works of Daniel Dennett, Douglas Hofstadter and the like since I was a kid I don't find anything new in the current debates about AI. As it stands compu...
by Heater
Sun Jun 24, 2018 5:34 pm
Forum: General programming discussion
Topic: TUTORIAL: The True Nature of a Linux File – And its Timestamps
Replies: 12
Views: 278

Re: TUTORIAL: The True Nature of a Linux File – And its Timestamps

RPi_Mike,
If we fed your first post into a completely neutral semantic and syntactic analyzer, it would conclude that your tone was entirely non-positive from start to finish.
Out if curiousity, do you have such a thing or a link to one? I'd like to try it out.
by Heater
Sun Jun 24, 2018 5:31 pm
Forum: General programming discussion
Topic: TUTORIAL: The True Nature of a Linux File – And its Timestamps
Replies: 12
Views: 278

Re: TUTORIAL: The True Nature of a Linux File – And its Timestamps

OK, whatever it was I wrote has not been received the way I intended. Clearly I did not express myself well enough. It certainly was not intended as a slight of you or your tutorial here.
by Heater
Sun Jun 24, 2018 5:10 pm
Forum: Beginners
Topic: First DIY project for security prevention
Replies: 4
Views: 139

Re: First DIY project for security prevention

I was confused by the idea of "security prevention".

I would rather my security be enabled than prevented.
by Heater
Sun Jun 24, 2018 4:53 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

jahboater, Anything else is ill-formed IMHO You are such a tease :) paddyg, ...into wolfram alpha Nah, that does not work either. Believe in the math, not wolframalpha: https://www.youtube.com/watch?v=5pa1AryylpM&t=2s Just accept it. Computers cannot do maths, or even arithmetic reliably. If you wan...
by Heater
Sun Jun 24, 2018 4:30 pm
Forum: Python
Topic: please explain this code?
Replies: 13
Views: 235

Re: please explain this code?

R-A, So let me try and gather your requirements: ...use a Pi a IoT device... That implies a web server or web client or perhaps some other network connectivity. ..read sensor info.. That implies to me interfacing with devices via serial ports, I2C, SPI, general GPIO bit banging etc. ...and store it ...
by Heater
Sun Jun 24, 2018 4:02 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

jahboater, Yes I'm aware of the limitations of our computers binary representation. For ints and floats. I should not say "fully aware" mind. I seem to find more anomalies every year. For example IEEE floats do not obey the arithmetic law of commutation: a + b + c may not be the same as a + c + b No...
by Heater
Sun Jun 24, 2018 3:30 pm
Forum: General programming discussion
Topic: TUTORIAL: The True Nature of a Linux File – And its Timestamps
Replies: 12
Views: 278

Re: TUTORIAL: The True Nature of a Linux File – And its Timestamps

RPi_Mike, What a gross mischaracterization of my tutorial! And what a flight of historical fantasy! I did not mean to mischaracterize anything. You were talking about: 'keep things at a mostly conceptual level that a large number of people could actually understand – not to provide a "thoroughgoing,...
by Heater
Sun Jun 24, 2018 2:54 pm
Forum: Troubleshooting
Topic: Why Raspberry Pi is affected by USB KIller?
Replies: 6
Views: 166

Re: Why Raspberry Pi is affected by USB KIller?

Perhaps the USB killer goes up to 15001 volts :)
by Heater
Sun Jun 24, 2018 2:45 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

jahboater, Yes. Problem is we are trying to describe the infinite detail of the real number line in the finite space of the computer. But wait, that cannot be. Every schoolboy knows that: 0.3 + 0.3 + 0.3 = 3/10 + 3/10 + 3/10 = (3 + 3 + 3) / 10 = 9 / 10 = 0.9 Every schoolboy has a finite sized brain ...
by Heater
Sun Jun 24, 2018 2:07 pm
Forum: Python
Topic: please explain this code?
Replies: 13
Views: 235

Re: please explain this code?

pcmanbob, Well it can't be that insane and incomprehensible, you were able to work out what it did and provide a good explanation Thanks. I guess I have spent enough decades fighting with all kind of programming languages that I know what kind of gibberish to expect from programming language designe...
by Heater
Sun Jun 24, 2018 1:30 pm
Forum: Python
Topic: please explain this code?
Replies: 13
Views: 235

Re: please explain this code?

This is saying that the number "i", whatever it is, will become "i" to the power 3, ("**" is the power operator). That is to say i becomes i cubed. Or i becomes i * i * i. Example, if i = 2 it will become 2 * 2 * 2 which is 8. Example, if i = 10 it will become 10 * 10 * 10 which is 1000. Now, the "f...
by Heater
Sun Jun 24, 2018 1:00 pm
Forum: Beginners
Topic: Which language is preferable
Replies: 18
Views: 474

Re: Which language is preferable

The Traveler, C, as far as I'm concerned, has far, far fewer "UB"s than practically any other language I've known... Clearly you have not known many other languages. If you want to know how your C/C++ program will behave not only do you have to know the language standard documents inside out, you al...
by Heater
Sun Jun 24, 2018 12:29 pm
Forum: General programming discussion
Topic: TUTORIAL: The True Nature of a Linux File – And its Timestamps
Replies: 12
Views: 278

Re: TUTORIAL: The True Nature of a Linux File – And its Timestamps

What I find amazing is that there is even a need to explain, in layman's terms, what a "file" or "directory" is on a computer. Computers and their operating systems have had the notion of files and directories etc since forever. The general public has had access to computers since the microprocessor...
by Heater
Sun Jun 24, 2018 12:10 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

jahboater, Just for you I put the rotl() back into both the C and JS versions I posted above (the post is updated). Amazingly JS performance did not suffer very much at all from introducing that function call. However, I also made the state variable array into a JS typed array. Which shaved 7 second...
by Heater
Sun Jun 24, 2018 9:00 am
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

jahboater Just curiosity, what does " )|0 " do in the JS version? A very good question. Well spotted. It's a little bit of, perhaps not so well known, Javascript magic. In Javascript all numbers are 64 bit floating point quantities. IEEE 754 and all that. Which is good because you have a huge real n...
by Heater
Sat Jun 23, 2018 6:47 pm
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

JustAGeek does not seem to be up to my little JS speed challenge, so I thought I do it myself just for giggles. C version: $ time ./junk1 Seed: 938247, 23097423, 52309875, 297340234 Result: -73449 real 0m24.968s user 0m24.453s sys 0m0.453s JS version: $ time node junk1.js Seed: 938247 23097423 52309...
by Heater
Fri Jun 22, 2018 5:25 pm
Forum: General discussion
Topic: Pi Is Too Complicated
Replies: 66
Views: 1893

Re: Pi Is Too Complicated

davidcoton, How to store, index, and present tutorials in a way that respects the metadata, emphasises recent material, acknowledges correctness and usefulness, allows comment and/or amendment, possibly allows grading by peer review, and above all is user friendly to authors and consumers. Sounds li...
by Heater
Fri Jun 22, 2018 5:19 pm
Forum: General discussion
Topic: Pi Is Too Complicated
Replies: 66
Views: 1893

Re: Pi Is Too Complicated

ejolson, Try a web search on "Linus don't break userland." One statement that comes up is Linus Torvalds wrote: We know that people use old binaries for years and years, and that making a new release doesn't mean that you can just throw that out. Interesting. Thanks. I guess what I was thinking of T...
by Heater
Fri Jun 22, 2018 12:26 pm
Forum: Other programming languages
Topic: Problem with PiGPIO in javascript
Replies: 4
Views: 335

Re: Problem with PiGPIO in javascript

I can't help noticing that you have a comma instead of a semicolon at the end of:

Code: Select all

var Gpio = require('pigpio').Gpio,
Although I can see that would make much difference.

Also you don't show us what value1 and value2 are set to before that code runs.
by Heater
Fri Jun 22, 2018 12:05 pm
Forum: Off topic discussion
Topic: Posting a Pi setup to a friend.
Replies: 7
Views: 268

Re: Posting a Pi setup to a friend.

hippy,
I find old VHS tape cases good for posting PCB boards
Wow, where does a kid find VHS tape cases? I don't think I have seen one since last century.
by Heater
Fri Jun 22, 2018 11:43 am
Forum: Other programming languages
Topic: .NET Core - Raspbian or Win10IoT?
Replies: 136
Views: 6467

Re: .NET Core - Raspbian or Win10IoT?

jahboater, Please could you try this C version that hasn't had the state variables made "volatile"! I could not recall if I had done that myself before or not. So I just did it (again): With volatile: $ ./junk Seed: 938247, 23097423, 52309875, 297340234 Result: 28247 $ time ./junk Seed: 938247, 2309...

Go to advanced search