Go to advanced search

by jahboater
Fri Jul 19, 2019 11:51 pm
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 183
Views: 4314

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Then allow for extra optimizations to be applied only to portions of the code that it makes good since to so do with, as specified by the programmer. GCC can do that now. The programmer may specify that a function is either "hot" or "cold". cold The cold attribute on functions is used to inform the...
by jahboater
Fri Jul 19, 2019 9:12 am
Forum: C/C++
Topic: sched: RT throttling activated
Replies: 3
Views: 57

Re: sched: RT throttling activated

Then there is the "vcgencmd" that will show if thermal throttling has happened: $ /opt/vc/bin/vcgencmd get_throttled It will also show if there have been low voltage problems too. There is a bit saying its currently throttled and another sticky bit saying its throttled in the past (since the last b...
by jahboater
Fri Jul 19, 2019 8:33 am
Forum: General discussion
Topic: Best OS for raspberry pi as a everyday desktop?
Replies: 18
Views: 672

Re: Best OS for raspberry pi as a everyday desktop?

Try also

apt-cache search xxxx
by jahboater
Thu Jul 18, 2019 2:40 pm
Forum: General discussion
Topic: Is it possible to survive only on raspberry pi 4b4?
Replies: 15
Views: 513

Re: Is it possible to survive only on raspberry pi 4b4?

My cat sleeps on top of my powerful Intel PC. She likes warmth.

Sadly the Raspberry Pi is too small.
by jahboater
Thu Jul 18, 2019 1:53 pm
Forum: Raspbian
Topic: Shut down multiple raspberry pis via SSH at once
Replies: 6
Views: 132

Re: Shut down multiple raspberry pis via SSH at once

You will need password-less authentication.

ssh-keygen -t rsa
ssh-copy-id [email protected]

Do it once for each Pi, then scp and ssh will not require a password (which is obviously bad news in a batch file!)
by jahboater
Thu Jul 18, 2019 1:46 pm
Forum: Raspbian
Topic: Shut down multiple raspberry pis via SSH at once
Replies: 6
Views: 132

Re: Shut down multiple raspberry pis via SSH at once

Yes, that's what I would do:-

ssh [email protected] 'sudo poweroff'

multiple times in a batch file.
by jahboater
Thu Jul 18, 2019 1:07 pm
Forum: General discussion
Topic: Download Problems
Replies: 6
Views: 182

Re: Download Problems

Milliways wrote:
Thu Jul 18, 2019 1:09 am
Since the Buster release it has proved near impossible to download.
I never had the slightest problem, even on day one.
Downloaded Lite several times and "Full with recommended software" once.
by jahboater
Thu Jul 18, 2019 12:58 pm
Forum: General discussion
Topic: 32bits Linux OS on Raspberry Pi 3 B+
Replies: 9
Views: 258

Re: 32bits Linux OS on Raspberry Pi 3 B+

Thanks for your fast reply, are you sure that its 32bits & I can run my custom apps which I am able to do in CentOS 32bits If you spend some time on this forum, you will see many posts about Raspbian being 32-bits when the modern Pi hardware is 64-bit capable. (because the RPF want to support all P...
by jahboater
Thu Jul 18, 2019 12:40 pm
Forum: Off topic discussion
Topic: 1TB microSD Card is real!
Replies: 16
Views: 433

Re: 1TB microSD Card is real!

hippy wrote:
Thu Jul 18, 2019 12:25 pm
It is mostly media which requires large amounts of storage.
Yes, I have around 240GB of music (mostly flac).
Video takes much more.
by jahboater
Thu Jul 18, 2019 12:23 pm
Forum: General discussion
Topic: 32bits Linux OS on Raspberry Pi 3 B+
Replies: 9
Views: 258

Re: 32bits Linux OS on Raspberry Pi 3 B+

Hello, To All, I need help from expert, I want to install 32bits Linux OS on Raspberry Pi 3 B+ , Actually I have some customize apps which is working only in 32bits Linux OS like CentOS 6.10 32bits , so I want to use those customize apps also in Raspberry Pi 3 B+ & 4 as well, Please if there any wa...
by jahboater
Thu Jul 18, 2019 12:01 pm
Forum: General discussion
Topic: Is it possible to survive only on raspberry pi 4b4?
Replies: 15
Views: 513

Re: Is it possible to survive only on raspberry pi 4b4?

I heard that the SD card may corrupt if pi is directly powered off, so I have already prepared a secondary SD card. Treat the SD card the same way as you would the hard disk or SSD in your desktop PC. It has the same purpose, it is the system disk. Always try to shutdown the Pi cleanly, just as you...
by jahboater
Thu Jul 18, 2019 1:57 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 183
Views: 4314

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Musketeer wrote:
Wed Jul 17, 2019 9:01 pm
Latest C++ ISO has like 1500 pages.
Latest Java like 775.
C++17 is 1602 pages
C18 is 520 pages
by jahboater
Wed Jul 17, 2019 6:57 pm
Forum: General discussion
Topic: Pi 4 Max Size & Fastest Supported MSDCard?
Replies: 12
Views: 391

Re: Pi 4 Max Size & Fastest Supported MSDCard?

Musketeer wrote:
Wed Jul 17, 2019 4:15 pm
Best you can get (highest ) for small files R/W is Samsung Pro+ or Evo+, not Evo Plus!

https://www.jeffgeerling.com/blog/2019/ ... rison-2019
You should be looking at A1 class cards
by jahboater
Wed Jul 17, 2019 1:53 pm
Forum: General discussion
Topic: Pi 4 Max Size & Fastest Supported MSDCard?
Replies: 12
Views: 391

Re: Pi 4 Max Size & Fastest Supported MSDCard?

Sandisk A1 class cards are fast and reasonably priced. https://www.sdcard.org/developers/overview/application/index.html https://www.amazon.co.uk/SanDisk-microSDXC-Memory-Adapter-Performance/dp/B073S9SFK2/ref=sr_1_1?crid=6FYLAZR20RQ0&keywords=sandisk%2Ba1%2B64gb&qid=1563371663&s=gateway&sprefix=sand...
by jahboater
Wed Jul 17, 2019 12:20 pm
Forum: Networking and servers
Topic: Advice requested; Pi 4 NAS - 1, 2 or 4Gb of RAM?
Replies: 17
Views: 849

Re: Advice requested; Pi 4 NAS - 1, 2 or 4Gb of RAM?

pi-anazazi wrote:
Wed Jul 17, 2019 11:09 am
...or simply go directly with an Odroid XU4. Gbit ethernet inside and 2x USB3...
Exactly what the Pi4 has.
And the Pi4 has faster Cortex-A72 CPU's, up to 4GB memory, brilliant support, and doesn't require a noisy fan.
by jahboater
Wed Jul 17, 2019 8:32 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 432
Views: 17385

Re: Introduction to BBC BASIC

The most common use to which I put the INT function is in rounding a number to the nearest integer: nearest_integer = INT(number + 0.5) That only works, with both positive and negative numbers, when INT() truncates towards minus-infinity. Without such a function, rounding to the nearest integer is ...
by jahboater
Tue Jul 16, 2019 7:29 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 432
Views: 17385

Re: Introduction to BBC BASIC

As this is his thread, it's worth noting that Richard's BBC Basic seems to handle the INT function in a reasonable way. Yes it handles out of range errors well, but I do find it strange that it truncates towards minus infinity rather than zero as is the norm. Is there something mathematical I am mi...
by jahboater
Tue Jul 16, 2019 10:43 am
Forum: Advanced users
Topic: Communication between Pis
Replies: 13
Views: 377

Re: Communication between Pis

altanhaligur wrote:
Tue Jul 16, 2019 9:47 am
But how i am going to do this? Which communication protocol should i use? (Maybe TCP?)
TCP would be fine.

I presume you are happy using sockets from your favorite programming language.
That fact that you had to ask which protocol to use, might indicate otherwise.
by jahboater
Tue Jul 16, 2019 8:50 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 183
Views: 4314

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

ejolson wrote:
Tue Jul 16, 2019 6:48 am
Improvements to the run time and ways to make the code clearer (but not longer) would be appreciated.
Would it be possible to replace the msortchar() function (which looks very slow) with qsort() ?
It would make the code a bit shorter/simpler too.
by jahboater
Mon Jul 15, 2019 7:29 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 432
Views: 17385

Re: Introduction to BBC BASIC

I wonder what happens if one moves along exact powers of two. For floor, or more usefully trunc (floor truncates towards negative infinity), I suspect it would work all the way up to 1.8e308 (DBL_MAX). Although precision is lost above 2^53, they remain integers! Incidentally, Javascript stores "int...
by jahboater
Mon Jul 15, 2019 7:11 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 432
Views: 17385

Re: Introduction to BBC BASIC

One obtains a different but still not fully satisfying result with the C program #include <stdio.h> #include <math.h> int main(){ for(double x=1e3;x<=1e32;x*=10){ double y=floor(x); printf("floor(%g)=%f %s\n", x,y,y==x?"equal":"not equal"); } return 0; } wonder if Richard's BBC Basic does the same....
by jahboater
Mon Jul 15, 2019 4:02 pm
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 183
Views: 4314

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Heater wrote:
Mon Jul 15, 2019 3:57 pm
Actually I quite like your endless loop macro. It's simple, direct and obvious. I would be inclined to call it "forever" though.
Yes I like "forever" too, I only called it "repeat" because I was used to that in B - shows my age :(
by jahboater
Mon Jul 15, 2019 3:31 pm
Forum: Python
Topic: How to set python 3.5 as a default language in raspberry pi 3?
Replies: 8
Views: 212

Re: How to set python 3.5 as a default language in raspberry pi 3?

I add a line to ~/.bashrc

alias python=python3

That means any system software that depends on python being python2 will still work.
by jahboater
Mon Jul 15, 2019 3:19 pm
Forum: C/C++
Topic: Threading undefined reference to symbol '[email protected]@GLIBC_2.4
Replies: 5
Views: 187

Re: Threading undefined reference to symbol '[email protected]@GLIBC_2.4

Heater wrote:
Mon Jul 15, 2019 8:17 am
In general it's far easier to simply compile ones code using GCC on the command line on a Raspberry Pi itself.
+1 far far far easier.
by jahboater
Mon Jul 15, 2019 3:15 pm
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 183
Views: 4314

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

I'm don't like the C pre-processor much and excessive use of macros because it's a crude and ugly hack bodge. Fair enough. I just stick this in a common header file and forget about it. /* * C extensions. */ #define repeat for(;;) #define elif else if #define aligned _Alignas(16) #define noreturn _...

Go to advanced search