Go to advanced search

by Paeryn
Fri Jul 19, 2019 5:46 am
Forum: Troubleshooting
Topic: rsync - works from terminal but not as cron???
Replies: 15
Views: 179

Re: rsync - works from terminal but not as cron???

rsync -a -e ssh /home/pi/Public/ [email protected].1.1.155:/home/pj/Public 2>&1 >> /home/pi/rsync-backup.log Running this as a Cron (i.e forcing it to run under Scheduler) never even resulted in the formation of rsyc-backup.log?!?!?! The order of redirects that bls said is the wrong way around, stderr was set ...
by Paeryn
Thu Jul 18, 2019 3:18 pm
Forum: Java
Topic: Rasbperry, JVM, Java and Arm Jazelle #HELP#
Replies: 3
Views: 84

Re: Rasbperry, JVM, Java and Arm Jazelle #HELP#

Jazelle is an instruction set included in some ARM processors that executes Java byte codes directly rather than have a Java Virtual Machine interpret or compile Java bytecodes to regular ARM instructions. As far as I can make out Jazelle is obsolete old technology that ARM has dropped from recent ...
by Paeryn
Wed Jul 17, 2019 7:31 pm
Forum: Python
Topic: My program stuck after sometime
Replies: 10
Views: 192

Re: My program stuck after sometime

Looking at your code this line is not correct if rbuff[0]-2 <= temp <= rbuff[0]+2: I assume you want both to be true to execute the if. That line is fine in of itself. In Python, unlike a lot of other languages, a test like a <= b <= c works like it does in maths, it tests both that a is less than ...
by Paeryn
Mon Jul 15, 2019 8:06 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: 4308

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

PeterO wrote:
Mon Jul 15, 2019 7:19 pm
hippy wrote:
Mon Jul 15, 2019 7:17 pm
Most people cannot divide 99 by 2 in their heads.

Give the answer as 45.5
Neither can you !
PeterO
I think hippy was saying that most people give the answer 45.5, not that he thought the answer was 45.5. I take it those "most" people don't work it out as 100÷2 - 0.5, much easier to do.
by Paeryn
Sun Jul 14, 2019 10:27 pm
Forum: OpenGLES
Topic: :? - Im comfused i need som info on PI4 and GL|ES
Replies: 4
Views: 192

Re: :? - Im comfused i need som info on PI4 and GL|ES

The original driver was split in two parts, the driver that did all the work of generating the shader code for the QPUs, setting up the 3D hardware and getting it to run was on the VPU. The Arm driver (what Linux used) did basic validation and caching of some data (so it could avoid the expense of q...
by Paeryn
Sun Jul 14, 2019 1:37 am
Forum: General discussion
Topic: Raspberry remote compiler error
Replies: 8
Views: 173

Re: Raspberry remote compiler error

No idea what raspberry-remote is but with those errors it is badly written. The errors (converting a char to char*) can be made a warning by adding -fpermissive to the g++ compile options (needs editing the Makefile). I'm surprised they haven't used that option as g++ is quite right in saying that c...
by Paeryn
Sat Jul 13, 2019 11:04 pm
Forum: General programming discussion
Topic: Project Digital Apocalypse Not Now
Replies: 729
Views: 27963

Re: Project Digital Apocalypse Not Now

ScriptBasic wrote:
Sat Jul 13, 2019 7:40 pm
There is no other language on the planet with more variations than BASIC. (over 100 and still counting)
What about the ubiquitous "assembly language", that can be very different between versions ;)
by Paeryn
Sat Jul 13, 2019 8:08 pm
Forum: Python
Topic: Subprocessing? Calling and terminating a python script from another python script
Replies: 6
Views: 136

Re: Subprocessing? Calling and terminating a python script from another python script

In your original code, when you were getting the NameError: proc1 not defined , that was happening because at the point in time when the os.kill was trying to be executed, the preceding event which spawns it (and creates the proc1 variable) obviously hasn't happened, otherwise proc1 would have had a...
by Paeryn
Sat Jul 13, 2019 12:12 pm
Forum: General programming discussion
Topic: Project Digital Apocalypse Not Now
Replies: 729
Views: 27963

Re: Project Digital Apocalypse Not Now

It may not be causing the problem but why is the function return value assigned multiple times before the function ends? That should only be done once. That was one of the places I'd flagged for checking, I don't think besSET_RETURNSTRING() (might have the name slightly wrong, can't check at the mo...
by Paeryn
Fri Jul 12, 2019 2:44 pm
Forum: General programming discussion
Topic: Project Digital Apocalypse Not Now
Replies: 729
Views: 27963

Re: Project Digital Apocalypse Not Now

I've done preliminary testing on scriba's memory usage on the fibo programs, it is definitely scriba that is keeping the memory, after 15 iterations gmp had only 3 big allocations (expected) but scriba had at least 68 1 million digit strings allocated. Got to go out now, I'll look into it later.
by Paeryn
Fri Jul 12, 2019 3:10 am
Forum: General programming discussion
Topic: Project Digital Apocalypse Not Now
Replies: 729
Views: 27963

Re: Project Digital Apocalypse Not Now

Reading the gmp doc, I see that if mpz_clear() isn't called on a variable that is being re-used, it will (as far as I understand) leak. So I'm thinking that I should call mpz_clear() at the end of each function in the module, to address this. Before I do that, does this make sense? I won't be able ...
by Paeryn
Thu Jul 11, 2019 8:53 pm
Forum: General programming discussion
Topic: regex question
Replies: 9
Views: 225

Re: regex question

I prefer to use character classes e.g. [:digit:] rather than escapes like \d . I was just wondering why? Is it because it makes scripts more readable? I find \d so much quicker to type when I am searching for something in an editor. I find it easier to read, I rarely need to write regexes so the co...
by Paeryn
Thu Jul 11, 2019 6:01 pm
Forum: Python
Topic: BME280 and pigpio python3.7 extentse Name error
Replies: 4
Views: 139

Re: BME280 and pigpio python3.7 extentse Name error

From the line that gave the error :- File "/usr/local/lib/python3.7/site-packages/pigpio.py", line 3046, in i2c_read_i2c_block_data self.sl, _PI_CMD_I2CRI, handle, reg, 4, extentse)) It looks like the file /usr/local/lib/python3.7/site-packages/pigpio.py is either corrupt or from a version that has ...
by Paeryn
Thu Jul 11, 2019 5:37 pm
Forum: General programming discussion
Topic: regex question
Replies: 9
Views: 225

Re: regex question

Hmm. The forum didn't notify me that another post had appeared in the time of me reading and replying... So this is what I have created for the 68/70 dynamic.6.name=wifi_linkqual dynamic.6.source=iwconfig wlan0 | grep Link dynamic.6.regexp=Link Quality=(\d*\/?\d*) dynamic.6.postprocess= dynamic.6.rr...
by Paeryn
Thu Jul 11, 2019 12:13 pm
Forum: Python
Topic: ValueError: chr() arg not in range(0x110000)
Replies: 8
Views: 265

Re: ValueError: chr() arg not in range(0x110000)

I am getting this error while updating code like you have said. if rbuff[0]-2 <= temp <= rbuff[0]+2: TypeError: unorderable types: int() <= bytes() You haven't written what ghp suggested, you are trying to compare an element of a bytes to a bytes , you need to compare against the first element of t...
by Paeryn
Wed Jul 10, 2019 10:52 am
Forum: Python
Topic: getting horizontal question question mark symbol instead of code in .py file
Replies: 4
Views: 151

Re: getting horizontal question question mark symbol instead of code in .py file

Generally if you see loads of question marks then the editor / viewer is telling you that each one is a non-printable character (especially if each ? is inside a little box, but that depends on the program). This will happen if you try to open, for example, a binary executable rather than a text fil...
by Paeryn
Mon Jul 08, 2019 11:13 pm
Forum: Python
Topic: Using system variables for GPIO output
Replies: 18
Views: 2601

Re: Using system variables for GPIO output

I've tried the python script on my pi 3 and looks good at first sight. But somewhere theres a glitch, I've tried to generate some cpu load to gain some heat with "stress" sudo stress -- cpu 4 when the cpu goes over 40c it changes the color as expected, then when it refreshes it switches for some se...
by Paeryn
Mon Jul 08, 2019 6:02 pm
Forum: Python
Topic: ValueError: chr() arg not in range(0x110000)
Replies: 8
Views: 265

Re: ValueError: chr() arg not in range(0x110000)

ord() will return the unicode code point of the character passed in. In your if statement you have the following chr(ord(rbuff)+1) the problem is, if rbuff contains the very last unicode character then ord(rbuff) will return 0x10ffff, which you proceed to add 1 to and try to convert that back into a...
by Paeryn
Mon Jul 08, 2019 1:51 am
Forum: Off topic discussion
Topic: RIP 32 BIT
Replies: 223
Views: 7064

Re: RIP 32 BIT

DavidS has his work cut out to better that I think. Unfortunately I do not think so. Looking at the code that GCC Produces, and the missed opertunities for optimization (just using RBIT in place of all those shifted ORR ops would potentially save a huge number of cycles. I am actually kind of dissa...
by Paeryn
Sun Jul 07, 2019 5:17 am
Forum: General programming discussion
Topic: GUI Editor Code Challenge
Replies: 174
Views: 3422

Re: GUI Editor Code Challenge

ScriptBasic wrote:
Sat Jul 06, 2019 10:51 pm
Must Have:

Interface with the Open, SaveAs and Font select predefined dialogs
That could be a sticking point, where are these three "predefined dialogs" implemented, how do you interface with them and why do they have to be used over any other implementation?
by Paeryn
Sat Jul 06, 2019 3:42 pm
Forum: General programming discussion
Topic: Project Digital Apocalypse Not Now
Replies: 729
Views: 27963

Re: A Final Fibonacci Challenge

The challenge is to create a desktop simple editor. This is NOT a web browser challenge. IUP is one of many GUI toolkits to choose from. An editor of what? I think you need more specifications than just simple otherwise would this qualify (not tested, written on my phone whilst on a bus) #!/usr/bin...
by Paeryn
Fri Jul 05, 2019 1:54 am
Forum: OpenGLES
Topic: Thread from Pi4 discussion
Replies: 80
Views: 4498

Re: Thread from Pi4 discussion

This is another memory copy and the texture format in RPi3/VC4 is weird. I reverse engineered it so I was able to write a putpixel function which puts a pixel diectly in the texture memory. It looks like this (Pascal/asm): // remark: I decided to use 2048x2048 32bit texture as 8192x2048 8-bit textu...
by Paeryn
Fri Jul 05, 2019 1:03 am
Forum: General discussion
Topic: Python 2.7 PIL IamgeTK
Replies: 5
Views: 127

Re: Python 2.7 PIL IamgeTK

Hi, I got many problems importing package python-pil.imagetk I saw that the files are the following: /usr/lib/python2.7/dist-packages/PIL/ImageTk.py /usr/lib/python2.7/dist-packages/PIL/_imagingtk.i386-linux-gnu.so /usr/share/doc/python-pil.imagetk/changelog.Debian.gz /usr/share/doc/python-pil.imag...
by Paeryn
Thu Jul 04, 2019 12:41 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 709
Views: 62026

Re: Raspberry Pi 4 Thread - general discussion

mikerr wrote:
Thu Jul 04, 2019 8:46 am
What info does the qr barcode on the bottom show ?

I was hoping it was the serial number like on tinkerboard, but it doesn't seem to be:

Image
Possibly an internal batch code so the factory can determine when it was made / assembled.
by Paeryn
Wed Jul 03, 2019 4:04 pm
Forum: General discussion
Topic: USB Type C of Pi 4 model B
Replies: 25
Views: 1437

Re: USB Type C of Pi 4 model B

As the USB-C connector is for power and the SoC's USB 2.0 port only then I'd say only the 2x GND, 2x Vbus, CC, D+ & D- on each side are connected for a total of 7x2 = 14 pins, though a plug should only have D+ & D- connected on one side which would make 12. As long as you have those connections you ...

Go to advanced search