Go to advanced search

by bobblestiltskins
Tue Apr 16, 2013 4:19 pm
Forum: Other programming languages
Topic: Perl Modules from CPAN
Replies: 3
Views: 1640

Re: Perl Modules from CPAN

Firstly check whether the module has been packaged for debian e.g. aptitude search lib | grep perl
will give a large list of packages. If the one you want is listed here then install it via aptitude install. If, however, it is not packaged, then as root, do perl -MCPAN -e 'install Name::Of::Module'
by bobblestiltskins
Tue Mar 26, 2013 1:31 pm
Forum: C/C++
Topic: llvm/clang maths libraries
Replies: 14
Views: 3219

Re: llvm/clang maths libraries

I was comparing the relative speeds of programming languages on the Pi.

http://www.raspberrypi.org/phpBB3/viewt ... 31&t=37885
by bobblestiltskins
Thu Mar 21, 2013 12:05 pm
Forum: General programming discussion
Topic: Comparitive speeds of programming languages on the Pi
Replies: 2
Views: 1069

Re: Comparitive speeds of programming languages on the Pi

All linked from http://www.fourtheye.org/projecteulertable.html - I did not post this initially because I did not want to be flamed for posting the solutions to the problems (you are supposed to think through the problems yourself!).
by bobblestiltskins
Thu Mar 21, 2013 11:23 am
Forum: General programming discussion
Topic: Comparitive speeds of programming languages on the Pi
Replies: 2
Views: 1069

Comparitive speeds of programming languages on the Pi

I wrote the first 25 problems from http://projecteuler.net/ in a few different languages (Perl, C, C++, Python, Java, Forth and ARM assembly language) using as natural a style as I could in each language and generally avoiding extensions e.g. boost in C++. I am interested in ARM assembly language, a...
by bobblestiltskins
Thu Mar 21, 2013 10:56 am
Forum: General programming discussion
Topic: Programming C on the Raspberry Pi
Replies: 4
Views: 2235

Re: Programming C on the Raspberry Pi

Is there any reason why you want to cross-compile? You could use an ssh client from your desktop machine and use the native compiler on the pi?

If you install gcc (or clang) via "aptitude install gcc" or "aptitude install clang" then you can compile and run C programs natively.
by bobblestiltskins
Wed Mar 20, 2013 12:23 pm
Forum: C/C++
Topic: llvm/clang maths libraries
Replies: 14
Views: 3219

Re: llvm/clang maths libraries

That helps me. Now I can test the defaults of both compilers. [email protected]:~/src/c$ clang -S sqrttest.c [email protected]:~/src/c$ mv sqrttest.s sqrttest.s.clang [email protected]:~/src/c$ clang -mfpu=vfp -S sqrttest.c [email protected]:~/src/c$ mv sqrttest.s sqrttest.s.clangvfp [email protected]:~/src/c$ gcc -S sqrttest.c [email protected]...
by bobblestiltskins
Tue Mar 19, 2013 5:30 pm
Forum: C/C++
Topic: llvm/clang maths libraries
Replies: 14
Views: 3219

Re: llvm/clang maths libraries

Thank you - that works fine. This information is not given by 'man clang' as far as I can see. Do you have a pointer to where this (and any other useful information about clang) is documented?
by bobblestiltskins
Fri Mar 15, 2013 12:15 pm
Forum: C/C++
Topic: llvm/clang maths libraries
Replies: 14
Views: 3219

Re: llvm/clang maths libraries

Maybe true - I lifted the code from the intarwebs to avoid the "oh..it was my fault" that I usually find after detecting compiler/linker/system anomalies :oops: Changing the code to use %f in the format string does, however, not alter the fact that clang still thinks that the square root of 4 is 4. ...
by bobblestiltskins
Wed Mar 13, 2013 3:02 pm
Forum: Other programming languages
Topic: binutils-gold breaks haskell (ghc)
Replies: 2
Views: 893

binutils-gold breaks haskell (ghc)

I installed binutils-gold because of some problem with clang not being able to link C files. I tried compiling some haskell code with ghc and saw errors in the linker (specifically [email protected]:~/src/project_euler/haskell$ ghc 001.hs [1 of 1] Compiling Main ( 001.hs, 001.o ) Linking 001 ... /usr/bin/l...
by bobblestiltskins
Tue Mar 12, 2013 3:15 pm
Forum: C/C++
Topic: llvm/clang maths libraries
Replies: 14
Views: 3219

llvm/clang maths libraries

Given the following C code ... [email protected]:~/src/c$ cat sqrttest.c #include <math.h> #include <stdio.h> int main(void) { double x = 4.0, result; result = sqrt(x); printf("The square root of %lf is %lf\n", x, result); return 0; } [email protected]:~/src/c$ C code from http://en.kioskea.net/faq/4058-c-languag...
by bobblestiltskins
Wed Jan 23, 2013 11:40 am
Forum: Bare metal, Assembly language
Topic: Learning ARM assembly
Replies: 16
Views: 6403

Re: Learning ARM assembly

I wrote http://www.fourtheye.org/armasm.shtml about ARM assembly on my SheevaPlug - but all the code works on a RPi. I do not know if this helps?

I looked a bit more here http://www.fourtheye.org/armstrong.shtml
by bobblestiltskins
Wed Jan 09, 2013 3:03 pm
Forum: Bare metal, Assembly language
Topic: Debugging Assembly code using GDB
Replies: 10
Views: 5604

Re: Debugging Assembly code using GDB

Thanks ! I was thinking whether I can directly debug on raspbian distro. So I tried this : [email protected] ~/OSonPi/self-tried $ as -g 1_led_on.s [email protected] ~/OSonPi/self-tried $ ls 1_led_on.s 3_function 5_flashing_morse_code template 2_led_blink.s 4_timer_blink a.out test.c [email protected] ~/OSo...
by bobblestiltskins
Wed Jan 09, 2013 2:36 pm
Forum: Bare metal, Assembly language
Topic: Debugging Assembly code using GDB
Replies: 10
Views: 5604

Re: Debugging Assembly code using GDB

Thanks ! I was thinking whether I can directly debug on raspbian distro. So I tried this : [email protected] ~/OSonPi/self-tried $ as -g 1_led_on.s [email protected] ~/OSonPi/self-tried $ ls 1_led_on.s 3_function 5_flashing_morse_code template 2_led_blink.s 4_timer_blink a.out test.c [email protected] ~/OSo...
by bobblestiltskins
Wed Aug 29, 2012 11:31 am
Forum: Bare metal, Assembly language
Topic: ARM assembler tutorial for Raspberry Pi
Replies: 25
Views: 19843

Re: ARM assembler tutorial for Raspberry Pi

I wrote an introduction to assembly language programming on the sheevaplug (which uses an ARM V5TE) at http://www.fourtheye.org/armasm.shtml . All the techniques used and code works on a Raspberry Pi too.

Go to advanced search