Go to advanced search

by jahboater
Fri Apr 29, 2016 9:28 am
Forum: C/C++
Topic: GCC 6.1 Released
Replies: 14
Views: 6816

Re: GCC 6.1 Released

Out of interest, was it throttling back? I found adding a heatsink gained half an hour or so because it ran at 1200Mhz all the time (well all the time I happened to be watching anyway). Possibly, I didn't check, I just left it to run to completion. It does have a heat-sink installed (Pimoroni HAT c...
by jahboater
Fri Apr 29, 2016 9:11 am
Forum: C/C++
Topic: GCC 6.1 Released
Replies: 14
Views: 6816

Re: GCC 6.1 Released

ejolson wrote:Does libcilkrts now build by default as it does on Intel, or does one still need to patch the codebase for ARM?
I don't know. I just tried compiling something with "-lcilkrts" and it failed with "/usr/bin/ld: cannot find -lcilkrts".
by jahboater
Thu Apr 28, 2016 4:20 pm
Forum: C/C++
Topic: GCC 6.1 Released
Replies: 14
Views: 6816

Re: GCC 6.1 Released

Out of interest, was it throttling back?
I found adding a heatsink gained half an hour or so because it ran at 1200Mhz all the time (well all the time I happened to be watching anyway).
by jahboater
Thu Apr 28, 2016 7:22 am
Forum: C/C++
Topic: GCC 6.1 Released
Replies: 14
Views: 6816

GCC 6.1 Released

GCC 6.1 is now available if anyone is interested in the latest version. https://gcc.gnu.org/ It runs fine on the Pi. This means the default compiler on Jessie is now two major versions out of date (4.9). To build:- tar xf gcc-6.1.0.tar.bz2 cd gcc-6.1.0 contrib/download_prerequisites mkdir obj cd obj...
by jahboater
Tue Apr 26, 2016 10:39 pm
Forum: Off topic discussion
Topic: 2038 bug(s)
Replies: 13
Views: 3585

Re: 2038 bug(s)

Even if one moves to 64-bit there will still be a problem in the future. A long time off admittedly. But it's that 'too far away to worry about' and 'this code won't be running then anyway', which gets us into a mess in the first place. I agree; 64-bit data is the fix, for now. But it's not the per...
by jahboater
Tue Apr 26, 2016 4:18 pm
Forum: C/C++
Topic: Minimalistic C-Development
Replies: 13
Views: 1984

Re: Minimalistic C-Development

Don't you need the C compiler? You'll need to write your own standard library and system's calls library and the systems calls themselves. Not to mention you'll need to build the actual bare metal booting scheme from the ground up. The OP was only wanting to write his own GUI (!!). As Joan said, Ra...
by jahboater
Tue Apr 26, 2016 11:10 am
Forum: C/C++
Topic: adjust terminal window position & size opened by C program
Replies: 17
Views: 4030

Re: adjust terminal window position & size opened by C progr

davenull wrote: (I would love to start it by the filemanager like I'm used to by the Windows Explorer, but that Linux filemanger is not capable of starting programs which require sudo :evil: )
sudo chown root myprog
sudo chmod u+s myprog

Then "myprog" will run with effective user id root, no sudo required.
by jahboater
Tue Apr 26, 2016 8:02 am
Forum: C/C++
Topic: any advantage for compiling by -std=c++11 ?
Replies: 13
Views: 2227

Re: any advantage for compiling by -std=c++11 ?

void *func() { return 0; } struct foo { int a; }; typedef long foo; int main() { int old = 0; int new = 1; int *err = func(); struct foo bar; foo humbug; bar.a = 4; foo = 5; printf("Hello\n"); return 0; } That has four different errors that C++ will fail on. 1) new is a keyword in C++ so can't be u...
by jahboater
Tue Apr 26, 2016 7:48 am
Forum: C/C++
Topic: any advantage for compiling by -std=c++11 ?
Replies: 13
Views: 2227

Re: any advantage for compiling by -std=c++11 ?

Almost all extensions to ANSI-C starting with C99 and then C11 are incompatible with C++. In addition to the already mentioned semantics involving pointer aliasing, the implementation of stack-allocated variable length arrays, complex numbers and declarations of counter variables in for loops are a...
by jahboater
Mon Apr 25, 2016 9:54 pm
Forum: C/C++
Topic: any advantage for compiling by -std=c++11 ?
Replies: 13
Views: 2227

Re: any advantage for compiling by -std=c++11 ?

The "restrict" keyword in C is not understood by C++.
Obviously C++ keywords should be avoided.
Not sure what else there is?
by jahboater
Mon Apr 25, 2016 12:29 pm
Forum: Advanced users
Topic: L1 L2 Cache size in Raspberry Pi3
Replies: 4
Views: 9555

Re: L1 L2 Cache size in Raspberry Pi3

I wonder if that's 16KB instruction plus 16KB data which would agree with tested value.
by jahboater
Mon Apr 25, 2016 7:33 am
Forum: Beginners
Topic: Unplugged my Pi while it was running. Any risks?
Replies: 23
Views: 23892

Re: Unplugged my Pi while it was running. Any risks?

There is a handy command called "sync". It doesn't stop the final write of the date/time, nor any wear levelling on the SD card, but it does flush the disk cache. It will normally be done anyway when you unmount a disk or cleanly shutdown, and every 30 seconds or so to limit the loss of data in the ...
by jahboater
Sun Apr 24, 2016 2:41 pm
Forum: General discussion
Topic: Coding PI : Which programming language to use
Replies: 37
Views: 7164

Re: Coding PI : Which programming language to use

I call that stupid programming. def fibo2(n): farr = [1,1] for i in range(0,n-1): farr.append(farr[i]+farr[i+1]) return farr[n-1] In C, static int fibo2( const int n ) { int farr[n]; farr[0] = farr[1] = 1; for( int i = 0; i < n - 1; ++i ) farr[i+2] = farr[i] + farr[i+1]; return farr[n-1]; } But to ...
by jahboater
Sun Apr 24, 2016 1:55 pm
Forum: Python
Topic: How to install Python 3 on jessie?
Replies: 5
Views: 69453

Re: How to install Python 3 on jessie?

On Raspbian Lite:

Code: Select all

sudo apt-get install python3
Installs Python 3.4
by jahboater
Sun Apr 24, 2016 1:14 pm
Forum: General discussion
Topic: Coding PI : Which programming language to use
Replies: 37
Views: 7164

Re: Coding PI : Which programming language to use

Speed may not be the only thing that matters: C = 15 lines of code JS = 10 lines of code Python = 6 lines of code Perl = 14 lines of code PHP = 14 lines of code Python wins! But the OP is asking about Speed! Assuming that an algorithm can be implemented using C, Python and Linux/BASH, which program...
by jahboater
Sun Apr 24, 2016 9:20 am
Forum: General discussion
Topic: Coding PI : Which programming language to use
Replies: 37
Views: 7164

Re: Coding PI : Which programming language to use

Heater wrote:Unless you happen to want to do arithmetic on 200 digit numbers perhaps.
You can do that in C too with the GNU libraries GMP or MPFR or MPC (for complex).
by jahboater
Sun Apr 24, 2016 7:30 am
Forum: General discussion
Topic: Coding PI : Which programming language to use
Replies: 37
Views: 7164

Re: Coding PI : Which programming language to use

I want to capture the ADC converted data from ADS1115 in continuous mode at 860 SPS. If the program takes considerable amount of time for execution, then I might not be able to collect proper data. So I wanted to know which programming language is best suited for such application. Thanks & Regards,...
by jahboater
Sat Apr 23, 2016 10:57 pm
Forum: C/C++
Topic: is it possible to compile a newer gcc/ g++ on the pi itselve
Replies: 10
Views: 2626

Re: is it possible to compile a newer gcc/ g++ on the pi its

thx. just want to make sure as there's no document confirms a53 should use --with-fpu=crypto-neon-fp-armv8 and. I compiled 2 nbench for test and apparently --with-fpu=neon-vfpv4 seems to yield higher score. I cant explain the higher score. but I found that -mfpu=neon-fp-armv8 gave a better fit to t...
by jahboater
Sat Apr 23, 2016 7:04 pm
Forum: Troubleshooting
Topic: SSH question
Replies: 4
Views: 824

Re: SSH question

I am using a RPi3 and have it connected to my Macbook. I am attempting to SSH into it and have created the keys on my computer however when I use the SSH pi@192.168.2.2 it asks for a password. My question is what password is it looking for? If you have created the keys then you can use ssh-copy-id ...
by jahboater
Sat Apr 23, 2016 6:19 pm
Forum: C/C++
Topic: is it possible to compile a newer gcc/ g++ on the pi itselve
Replies: 10
Views: 2626

Re: is it possible to compile a newer gcc/ g++ on the pi its

lilunxm12 wrote:shouldn't we use --with-fpu=crypto-neon-fp-armv8 for pi3?
Yes. But its just a default.
by jahboater
Fri Apr 22, 2016 11:27 am
Forum: C/C++
Topic: Cross compiling a simple program that uses an installed lib
Replies: 7
Views: 13980

Re: Cross compiling a simple program that uses an installed

is there a special reason why you want to cross-compile and not just compile on the Pi itself, plugging a keyboard, a mouse, and a HDMI-Monitor (or a DVI Monitor plus a HDMI Adapter) ? Yes! Have you tried a Pi3? Its pretty fast, and capable of building almost anything (such as the Linux kernel or G...
by jahboater
Fri Apr 22, 2016 10:05 am
Forum: Troubleshooting
Topic: Float value inaccuracies - how to trace?
Replies: 3
Views: 710

Re: Float value inaccuracies - how to trace?

I don't know how your floats are being stored, but x86 machines may use 80-bits precision (64 bit significand), the ARM/VFP/NEON will only be 64-bits (53-bit significand).
by jahboater
Fri Apr 22, 2016 9:59 am
Forum: Troubleshooting
Topic: RPI3, NOOBS OK, Raspian NOK
Replies: 3
Views: 627

Re: RPI3, NOOBS OK, Raspian NOK

That's good news.

The .img file overwrites everything, there is never any need to partition or format the card first.
by jahboater
Fri Apr 22, 2016 9:43 am
Forum: General discussion
Topic: Raspberry pi 3, its limitations
Replies: 9
Views: 5784

Re: Raspberry pi 3, its limitations

They are all free, so why don't you get a couple of SD cards and try them?
8GB cards suffice and are very cheap.
by jahboater
Fri Apr 22, 2016 9:38 am
Forum: Beginners
Topic: Why does Kali seem faster/better than Rasbian to me?
Replies: 3
Views: 905

Re: Why does Kali seem faster/better than Rasbian to me?

Use this to measure boot time:-

Code: Select all

systemd-analyze
Add the argument "blame" to get more details.
Are both your SD cards identical?

Raspbian is stable as a rock for me.
Can you give an example of something that crashes?

Go to advanced search