Go to advanced search

by dr_d_gee
Fri Apr 19, 2013 12:14 pm
Forum: Beginners
Topic: USB Hard Drive Permissions
Replies: 48
Views: 89795

Re: USB Hard Drive Permissions

Just to say you can use an editor like Leafpad with sudo, using (e.g.)

Code: Select all

sudo leafpad filename.ext
by dr_d_gee
Thu Apr 18, 2013 12:34 pm
Forum: RISCOS
Topic: RISC OS; Pros and Cons
Replies: 145
Views: 30784

Re: RISC OS; Pros and Cons

One would expect an identical set up to behave, how shall it put it, identically - but clearly it doesn't (or I've missed something). To fully list devices attached and OS version might help "eliminate" possible causes from our enquiries (if there's anything you use that I don't or visa versa that ...
by dr_d_gee
Wed Apr 17, 2013 6:00 pm
Forum: RISCOS
Topic: RISC OS; Pros and Cons
Replies: 145
Views: 30784

Re: RISC OS; Pros and Cons

There's something a bit "variable" about all of this. I can run RISC OS (at stock speed I may add) using the keyboard that comes with the Maplin "RaspberryPi" kit (and a 512MB Pi) with no issue *except* when I connect it to the supplied Hub rather than the Pi Odd. I have the exact same setup as you...
by dr_d_gee
Mon Apr 15, 2013 1:46 pm
Forum: RISCOS
Topic: Trying to get an algorithm to run faster on RISC than wheezy
Replies: 71
Views: 11678

Re: Trying to get an algorithm to run faster on RISC than wh

Just to clarify, the gcc results are *with* the count enabled. So the unoptimised code is slower than Norcroft/RISC Os while the optimised code is faster (almost double the speed).
by dr_d_gee
Mon Apr 15, 2013 1:22 pm
Forum: General discussion
Topic: Python IDE
Replies: 17
Views: 56068

Re: Python IDE

Not sure that this will work on a Raspberry Pi--in any rate in Raspbian: it requires PyQt and Python 2.7, but the only version of PyQt available in the repos is for Python 3. As it will need the Qt libraries loaded, it may well be *slower* than Geany.
by dr_d_gee
Sun Apr 14, 2013 2:30 pm
Forum: RISCOS
Topic: Trying to get an algorithm to run faster on RISC than wheezy
Replies: 71
Views: 11678

Re: Trying to get an algorithm to run faster on RISC than wh

When adding the count feature in on the other platforms open to me, the results are: Norcroft 193cs (was 160 without count) On Raspbian: gcc - unoptimised - 253cs gcc - optimised (-O2) - 100cs I don't know where to find (or if there is) an optimisation setting for Norcroft, but these figures convinc...
by dr_d_gee
Sun Apr 14, 2013 11:14 am
Forum: RISCOS
Topic: Trying to get an algorithm to run faster on RISC than wheezy
Replies: 71
Views: 11678

Re: Trying to get an algorithm to run faster on RISC than wh

Yes, I've been wondering about optimisation in this particular case. I think there may be an issue in that the function/procedure does nothing other than call itself recursively. A "clever" optimiser might spot this and optimise all the calls away. I think I'll try counting the number of recursive c...
by dr_d_gee
Fri Apr 12, 2013 1:46 pm
Forum: RISCOS
Topic: Trying to get an algorithm to run faster on RISC than wheezy
Replies: 71
Views: 11678

Re: Trying to get an algorithm to run faster on RISC than wh

My figures weren't with optimisation turned on. If I ask VC++ to optimise for speed, the time comes down to 0.36 cs! A bigger difference than you would expect optimisation to make. There's a lesson there, I'm sure... FWIW, the I5 is clocked at 2.67GHz. It is surprising though what a difference assem...
by dr_d_gee
Fri Apr 12, 2013 1:15 pm
Forum: General programming discussion
Topic: installing codeblocks for fortran into rpi
Replies: 3
Views: 1749

Re: installing codeblocks for fortran into rpi

Assuming it is source rather than a binary distribution you have, the usual approach is: ./configure make sudo make install Just bear in mind that Code::Blocks doesn't "compile" anything, it's an IDE; gcc does the compiling--there is a Fortran add-on for it; you will need that to be able to do anyth...
by dr_d_gee
Thu Apr 11, 2013 3:37 pm
Forum: RISCOS
Topic: Trying to get an algorithm to run faster on RISC than wheezy
Replies: 71
Views: 11678

Re: Trying to get an algorithm to run faster on RISC than wh

My figures (512MB Raspberry Pi): Lua 3460 cs Basic 10446 cs (no difference whether run in task window or not) Norcroft C 160 cs As Norcroft C doesn't come with <sys/timeb.h> I used the SWI OS_ReadMonotonicTime to do the timing instead. Just for comparison, some PC-based figures (Core I5 first gen, W...
by dr_d_gee
Wed Apr 10, 2013 1:00 pm
Forum: RISCOS
Topic: Trying to get an algorithm to run faster on RISC than wheezy
Replies: 71
Views: 11678

Re: Trying to get an algorithm to run faster on RISC than wh

It uses square brackets:

Code: Select all

[code] and 
[/code]

not angle brackets.
by dr_d_gee
Mon Apr 08, 2013 1:46 pm
Forum: Gaming
Topic: PCSX ReARMed Issue!
Replies: 26
Views: 22880

Re: PCSX ReARMed Issue!

Worth pointing out that the -I flag (capital I) to the compiler can be used to add an additional directory for include files, similarly -L can be used to add additional library directories for the linker.
by dr_d_gee
Mon Apr 08, 2013 1:41 pm
Forum: C/C++
Topic: g++ help
Replies: 7
Views: 2519

Re: g++ help

No, chmod won't let you remove the ./ on the front. You might use it to make (say) a Python script executable, but the result of a g++ compilation is already executable. The issue is that, on Windows, the current directory is always in the path; on a UNIX-based system it isn't. It's intended as a se...
by dr_d_gee
Mon Apr 08, 2013 1:35 pm
Forum: Beginners
Topic: Pygame installation
Replies: 7
Views: 2242

Re: Pygame installation

You need:

Code: Select all

import os
too--this was probably in the original article (if not it should have been).
by dr_d_gee
Sun Apr 07, 2013 2:46 pm
Forum: C/C++
Topic: g++ help
Replies: 7
Views: 2519

Re: g++ help

How did you try to execute it? You need to type:

Code: Select all

./HelloWorld
because the current directory isn't in the path on UNIX systems, but I can't see any other reason why it wouldn't work (and if you hadn't typed the "./" at the beginning you should have got an error message).
by dr_d_gee
Tue Apr 02, 2013 3:50 pm
Forum: Other programming languages
Topic: Android?
Replies: 7
Views: 1334

Re: Android?

Most books on Android assume you know Java. If you don't, then you will probably need to learn Java first. Another option is 'Basic 4 Android', a Windows-based VB-like environment for creating Android apps, but it is a commercial product: http://www.basic4ppc.com/
by dr_d_gee
Mon Apr 01, 2013 1:27 pm
Forum: C/C++
Topic: Boost C++ libraries for Raspberry Pi
Replies: 15
Views: 43129

Re: Boost C++ libraries for Raspberry Pi

You should leave the libraries where the installer puts them. Normally this will be in /usr/lib, so I'm assuming that it wan't in that directory. Where *was* the library file (.so) placed (originally) by the installer, that the system couldn't find? Unless I've missed something, you never said.
by dr_d_gee
Mon Mar 25, 2013 12:46 pm
Forum: Beginners
Topic: Icon for Synaptic
Replies: 2
Views: 607

Re: Icon for Synaptic

If Synaptic appears in the menu there will already be a .desktop file in /usr/share/applications. This may well have an icon--I'd be surprised if there wasn't one to start with somewhere. Also some icons appear in /usr/share/pixmaps as .xpm files.
by dr_d_gee
Tue Mar 19, 2013 2:07 pm
Forum: RISCOS
Topic: RISC OS included in OS types reviewed in Linux Format
Replies: 35
Views: 7593

Re: RISC OS included in OS types reviewed in Linux Format

Only minor quibble I'd have would be over their comments on OS "Freedom" where RISC OS 6 is mentioned for some reason and I believe people unfamiliar with RISC OS versioning might get confused. I think this is what has happened to the Linux Format staff too--after all forks in 'commercial' software...
by dr_d_gee
Tue Mar 19, 2013 2:01 pm
Forum: RISCOS
Topic: Interrupt servicing via BASIC ?
Replies: 21
Views: 5543

Re: Interrupt servicing via BASIC ?

Is there any reason why gcc still doesn't appear in the package lists in !PackMan on the Pi--it's obvious from comments elsewhere that people have used it successfully?
by dr_d_gee
Sat Mar 16, 2013 12:50 pm
Forum: Python
Topic: wxpython installation in raspbian
Replies: 11
Views: 21426

Re: wxpython installation in raspbian

There are a number of errors in the code you posted—don't know whether they are in the original.

The indentation is incorrect.
In the import statement, the 'P' in wxPython needs to be a capital letter.
You have wx,frame (comma) which should probably be wx.Frame (full stop, capital 'F').
by dr_d_gee
Fri Mar 15, 2013 2:21 pm
Forum: Python
Topic: wxpython installation in raspbian
Replies: 11
Views: 21426

Re: wxpython installation in raspbian

Normally it's:

Code: Select all

from wxPython.wx import *
See: http://www.wxpython.org/onlinedocs.php
by dr_d_gee
Fri Mar 15, 2013 2:17 pm
Forum: C/C++
Topic: Good C++ IDE for Debian/RPi?
Replies: 32
Views: 16185

Re: Good C++ IDE for Debian/RPi?

If you can only access the GPIO pins as root, but want to run a project under your own username, you will need to investigate what in UNIX and Linux circles is known as 'suid' ("set user ID"). Briefly speaking, it is possible for a program to be set so that it runs as a user other than its owner. I'...
by dr_d_gee
Fri Mar 15, 2013 2:14 pm
Forum: C/C++
Topic: Audible Beep using C++
Replies: 5
Views: 2664

Re: Audible Beep using C++

How about:

Code: Select all

cout << '\a' << endl;
Outputting '\a' ("alert") should give you the beep sound--will probably only work with console applications however.
by dr_d_gee
Thu Mar 14, 2013 1:27 pm
Forum: C/C++
Topic: Good C++ IDE for Debian/RPi?
Replies: 32
Views: 16185

Re: Good C++ IDE for Debian/RPi?

I am using CodeBlocks as my IDE. When I try the 'blink' example and run it from the IDE, I get 'Unable to open /dev/mem: Permission denied' error. So I try to find and run the blink executable in a Terminal window but it cant be found. I even copied the executable to the /home/pi directory and ran ...

Go to advanced search