Go to advanced search

by jahboater
Sat Nov 14, 2020 6:52 pm
Forum: Beginners
Topic: cd is not supported use full path. And access denied
Replies: 6
Views: 258

Re: cd is not supported use full path. And access denied

GlowInTheDark wrote:
Sat Nov 14, 2020 5:21 pm
I 've been had by computers since 1980
FTFY
Perhaps the OP meant the Intel 8080 ....
by jahboater
Sat Nov 14, 2020 6:33 pm
Forum: Troubleshooting
Topic: Overclock doesn't work on RPi4
Replies: 12
Views: 431

Re: Overclock doesn't work on RPi4

Could you post your config.txt ?
by jahboater
Sat Nov 14, 2020 6:29 pm
Forum: Raspberry Pi 400
Topic: The Raspberry Pi 400 thread!
Replies: 904
Views: 39807

Re: 23 fun Raspberry Pi 400 facts

andrum99 wrote:
Sat Nov 14, 2020 5:54 pm
The Pi 4B 8GB uses the C0 stepping of the BCM2711 as well.
How do I verify that please ?

"lscpu" shows the same stepping for my Pi4 8GB as it does for my Pi4 2GB
by jahboater
Sat Nov 14, 2020 4:49 pm
Forum: Troubleshooting
Topic: Overclock doesn't work on RPi4
Replies: 12
Views: 431

Re: Overclock doesn't work on RPi4

Are you aware that the OS adjusts the speed of the processor to suit the load ? At idle it will run at a low frequency to save power, and you will not see the overclock. This is one of my Pi4's. As you can see, for about 30 seconds or so, a heavy CPU load caused the clock frequency to increase up to...
by jahboater
Sat Nov 14, 2020 11:25 am
Forum: Python
Topic: Whats the best way to install 3.8?
Replies: 19
Views: 980

Re: Whats the best way to install 3.8?

fruitoftheloom wrote:
Sat Nov 14, 2020 10:58 am
https://manjaro.org/downloads/arm/raspb ... pi-4-xfce/

Manjaro being based on ARCH always have latest packages:

https://archlinuxarm.org/packages/aarch64/python
That's true of course, but installing an entire new OS to get a later version of Python seems a little extreme :)
by jahboater
Sat Nov 14, 2020 11:16 am
Forum: Beginners
Topic: Source Code question (noob)
Replies: 7
Views: 412

Re: Source Code question (noob)

Is there any limitations with using source code builds on a rpi other than it not running well due to the low powered hardware If anything, a program built from source should run faster. For example, programs distributed with the 32-bit Raspberry Pi OS are compiled for the ARMv6 - to support the ol...
by jahboater
Sat Nov 14, 2020 10:50 am
Forum: Off topic discussion
Topic: Access Raspbian disk from WIndows
Replies: 31
Views: 1551

Re: Access Raspbian disk from WIndows

Once I have pulled all that together, I'll set it up and check if it works, and then store it in a safe place. When I run into a disk problem with my main R-Pi 4, I can simply slip it's sd card into the reader and repair the error... and stay away from Windows! :D You do not need a second Pi! But y...
by jahboater
Sat Nov 14, 2020 10:06 am
Forum: Beginners
Topic: Source Code question (noob)
Replies: 7
Views: 412

Re: Source Code question (noob)

There is the standard mantra:

./configure && make && sudo make install

The && means "only start the next step if the previous step succeeded".
by jahboater
Sat Nov 14, 2020 9:00 am
Forum: Python
Topic: Whats the best way to install 3.8?
Replies: 19
Views: 980

Re: Whats the best way to install 3.8?

The latest stable release is 3.9 at the time of writing. Download the source from here: https://www.python.org/downloads/source/ To install a source release is easy: tar xf Python-3.9.0.tar.xz cd Python-3.9.0 ./configure --enable-optimizations make sudo make install Run "python3" to check you have t...
by jahboater
Sat Nov 14, 2020 5:57 am
Forum: Advanced users
Topic: Different stress tests producing different results?
Replies: 3
Views: 249

Re: Different stress tests producing different results?

The Sysbench had my CPU max at about 60C for my overclock (2GHz) while stress-ng had it doing above 80C and throttling. Why are the two tests giving such different results, and which one should I use to decide if I have a good overclock? Different instruction mixes will heat up the CPU by differing...
by jahboater
Fri Nov 13, 2020 8:53 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

Heater wrote:
Fri Nov 13, 2020 8:44 pm
My new code will likely use stdbool.h. But my new code may well be calling out to old code with it's own idea of "bool".
Perhaps I should have said "code in a new project".
by jahboater
Fri Nov 13, 2020 8:29 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

Until you are writing modern C and use "bool" because you cannot stand the aesthetics of "_Bool" but find yourself calling old code with it's own idea of what "bool" might mean. No. That's the whole point of the optional header file. Don't add the #include if you have an existing definition of bool...
by jahboater
Fri Nov 13, 2020 8:15 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

As such, everyone of those 51 C compilers could actually implement a different language. Looks like C, compiles the same source, but may well behave very differently than the C you are using. The ISO standards have been around for long time now, and respectable modern compilers support them. How a ...
by jahboater
Fri Nov 13, 2020 8:05 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

In my opinion, this popularity and diversity would not have been possible if C did not include a simple preprocessor that allowed developers to adapt existing code to a new system while retaining compatibility with the environment in which it originally ran. I think macro processors (for example wh...
by jahboater
Thu Nov 12, 2020 7:14 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

I think that is a classic example of what I hate to see in C. A bunch of compiler specific noise. Exactly!! Precisely. The macro removed all that and made the actual code both readable and portable. So I can write plain "unused int num" You may hide all the nasty compiler specific stuff in a header...
by jahboater
Thu Nov 12, 2020 7:01 pm
Forum: General discussion
Topic: To Buy or Not To Buy
Replies: 26
Views: 838

Re: To Buy or Not To Buy

Any Pi you buy that will handle the tasks you have in mind for it will *continue* to handle those tasks no matter what some future Pi is capable of. Just because a better Pi comes along doesn't mean the Pi you already have degrades. That's the rational argument. Suppose you buy a Pi3 for use as a g...
by jahboater
Thu Nov 12, 2020 6:46 pm
Forum: General discussion
Topic: To Buy or Not To Buy
Replies: 26
Views: 838

Re: To Buy or Not To Buy

Speaking as someone who got caught out by the launch of the B+ (bought a 1B a day or two before it) I look at it this way: the one you bought still does eveything it did yesterday, if it was the right tool for the job that hasn't changed. New models of lots of stuff arrive, if you're always waiting...
by jahboater
Thu Nov 12, 2020 6:32 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

To my mind C does not have a macro facility. It has a rude and crude text substitution mechanism. Does that really count as "macros"? Do you mean like C does not have strings? Yet I'm guessing more text processing code has been written in C over the decades than in all other languages put together ...
by jahboater
Thu Nov 12, 2020 12:54 am
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

I'm not sure whether this is a bug or not, Since it is undefined behavior, anything may happen - it might crash, produce the wrong answer, produce the right answer, do nothing at all, etc. I think both compilers are correct. GCC does this: .LC0: .ascii "v[1000] = %d\012\000" .align 2 .global main ....
by jahboater
Wed Nov 11, 2020 11:33 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

./range.go:6:3: invalid array index 1000 (out of bounds for 6-element array) make: *** [Makefile:2: range] Error 2 I found the error message to be nice and descriptive. Yes indeed. I eventually managed to get C to complain. In this code: int v[6]; v[1000] = 1; // asm( "" ::: "memory" ); printf("v[1...
by jahboater
Wed Nov 11, 2020 6:22 pm
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

In general it will behave as if the function returned whatever value was in register R0 at the point of return. I think that's exactly what does happen - not sure about the phrase "as if". Whatever happens to be in R0 (ARM32), X0 (Aarch64), RAX (x86_64) is the return value. Inlined functions are a ...
by jahboater
Wed Nov 11, 2020 1:58 pm
Forum: C/C++
Topic: Memory Protection Settings (sys/mman.h)
Replies: 10
Views: 443

Re: Memory Protection Settings (sys/mman.h)

I've not heard of such an error, what is the exact error message gcc is giving you and can you provide a small example program that exhibits this error (including your compile command)? My suspicion is that this is a C++ language problem. There is no such documented error return from either function.
by jahboater
Wed Nov 11, 2020 11:49 am
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

Paeryn wrote:
Wed Nov 11, 2020 11:35 am
The only thing you can count on is that you can't count on it being a meaningful value.
Fortunately GCC complains about that:

error: control reaches end of non-void function [-Werror=return-type]
by jahboater
Wed Nov 11, 2020 8:21 am
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

ejolson wrote:
Wed Nov 11, 2020 6:51 am
Okay, having experimented with gcc version 9.3 a little bit, it would appear
  • Without -Wall
  • All such functions return 0 by default.
Just to be clear, that's only if they are called "main".

What about normal optimization levels ? -O3 say.
by jahboater
Wed Nov 11, 2020 6:36 am
Forum: Other projects
Topic: A Birthday Present for Fido
Replies: 381
Views: 15525

Re: A Birthday Present for Fido

Special casing the function called main seems odd. What happens if you have a function called static int main() in another file? Does it also return zero by default? Looks like it does for -O0 only (may be a bug), other optimization levels elide the static one. It complains about main() being stati...

Go to advanced search