Go to advanced search

by jahboater
Sun Dec 11, 2016 8:46 pm
Forum: General programming discussion
Topic: Making readable modifyable code.
Replies: 309
Views: 63595

Re: Making readable modifyable code.

Interesting discussion. I will wager that a modern JS engine is faster than any Smalltalk :) I wouldn't consider that a safe bet in either direction. Here is the collatz conjecture code from an old thread, tidied up a bit. The algorithm is trivial so it should be simple to translate into either lang...
by jahboater
Sat Dec 10, 2016 7:01 pm
Forum: General discussion
Topic: ssh [email protected] -p 22 not working
Replies: 4
Views: 1829

Re: ssh [email protected] -p 22 not working

This is a fresh install of RASPBIAN JESSIE LITE into a new SD card. When I try to SSH with login pi and password raspberry i got a denied. With putty same thing. I don't have HDMI monitor to connect and check. This release of Raspbian has changed - ssh is not enabled by default. From the release no...
by jahboater
Fri Dec 09, 2016 7:08 pm
Forum: Troubleshooting
Topic: a angry rant
Replies: 12
Views: 2221

Re: a angry rant

TrangleC wrote: As long as there are no media players comparable to VLC Player
I use VLC Player all time - on Linux ...
by jahboater
Fri Dec 09, 2016 6:54 pm
Forum: Troubleshooting
Topic: Using Raspberry Pi 2 B+ as desktop - unbearably slow
Replies: 11
Views: 2314

Re: Using Raspberry Pi 2 B+ as desktop - unbearably slow

I forgot to mention the 3B has on-board WiFi and bluetooth!
by jahboater
Fri Dec 09, 2016 6:16 pm
Forum: Troubleshooting
Topic: Using Raspberry Pi 2 B+ as desktop - unbearably slow
Replies: 11
Views: 2314

Re: Using Raspberry Pi 2 B+ as desktop - unbearably slow

rpihelp150 wrote:raspberry pi B+ v1.2
From memory, that's a single core armv6 at 700Mhz, 0.5GB ram!
Get a Pi3, its a quad core armv8 at 1.2GHz, 1.0GB ram - the CPU is the Cortex-a53 which is a current model.
Its much much faster.
by jahboater
Thu Dec 08, 2016 1:39 pm
Forum: Troubleshooting
Topic: SSH Connection Refused after Flashing SD Card
Replies: 5
Views: 10018

Re: SSH Connection Refused after Flashing SD Card

I am not able to access my Raspberry Pi 2 via SSH after fresh new install of Raspbian Jessie Lite install (Version "November 2016", Release date = 2016-11-25). You should always read the release notes! In this case:, the first line says ... 2016-11-25: * SSH disabled by default; can be enabled by c...
by jahboater
Wed Dec 07, 2016 4:09 pm
Forum: General discussion
Topic: Cooling - Raspberry Pi 3
Replies: 3
Views: 995

Re: Cooling - Raspberry Pi 3

You can check the temperature with: vcgencmd measure_temp Anything less than around 80C is fine, after that it will progressively throttle back its speed to stay cool, and you will lose performance. You will not reach 80C unless you have quite a heavy workload, or are over clocking it. Obviously goo...
by jahboater
Wed Dec 07, 2016 11:12 am
Forum: Beginners
Topic: Help working with Raspberry pi
Replies: 9
Views: 1425

Re: Help working with Raspberry pi

You can use scp to copy files - probably winscp on windows. Quicker than FTP as its usage is similar to the copy command: scp myfile [email protected]: scp myfile [email protected]:/tmp scp [email protected]:hello.c . The password prompt may be avoided by distributing authorisation keys to each pi which is also much more secure ...
by jahboater
Tue Dec 06, 2016 8:54 pm
Forum: C/C++
Topic: Do you need to search for something in a string
Replies: 7
Views: 1326

Re: Do you need to search for something in a string

Well, when i use the command register, i can enforce the use of a given register. That's usually a bad idea for performance, the GCC register allocator is extremely complex (it took twenty years to write), when you force the use of a particular register for something you leave less for the rest of ...
by jahboater
Tue Dec 06, 2016 8:12 pm
Forum: General discussion
Topic: Simple Digital Clock Program?
Replies: 8
Views: 6582

Re: Simple Digital Clock Program?

I use one of these for a digital clock. https://thepihut.com/products/zeroseg https://cdn.shopify.com/s/files/1/0176/3274/files/ZeroSeg_User_Guide_1.1.pdf I used a Pi3 because it has Wifi even though the Pi3 itself is grossly over-powered for the purpose. As a clock goes, it is unusual in that I can...
by jahboater
Tue Dec 06, 2016 8:03 pm
Forum: General discussion
Topic: Simple Digital Clock Program?
Replies: 8
Views: 6582

Re: Simple Digital Clock Program?

Sounds like it may be problem with the browser and not the network.
by jahboater
Tue Dec 06, 2016 7:37 pm
Forum: General discussion
Topic: Simple Digital Clock Program?
Replies: 8
Views: 6582

Re: Simple Digital Clock Program?

I'm used to programming in other languages What other languages ? The Pi supports many many programming languages and you never know, ask here and you might find its available. The common languages such as C/C++, python etc are included within Raspbian as standard. If the language you want is so ob...
by jahboater
Tue Dec 06, 2016 4:47 pm
Forum: General discussion
Topic: Raspberry Pi3 shows benchmark results for TWO times less
Replies: 12
Views: 7001

Re: Raspberry Pi3 shows benchmark results for TWO times less

Perhaps just quickly try a fresh install of Raspbian Lite on an old card.

I see you have cpufrequtils installed, hope that's not interfering with anything.
by jahboater
Tue Dec 06, 2016 4:40 pm
Forum: General discussion
Topic: Raspberry Pi3 shows benchmark results for TWO times less
Replies: 12
Views: 7001

Re: Raspberry Pi3 shows benchmark results for TWO times less

Can you send your model info please ? Its the same as yours .... [email protected]:~ $ cat /sys/firmware/devicetree/base/model Raspberry Pi 3 Model B Rev 1.2 [email protected]:~ $ and like every one elses, it runs sysbench in 120 seconds at stock speed: Maximum prime number checked in CPU test: 20000 Tes...
by jahboater
Tue Dec 06, 2016 2:47 pm
Forum: General discussion
Topic: Raspberry Pi3 shows benchmark results for TWO times less
Replies: 12
Views: 7001

Re: Raspberry Pi3 shows benchmark results for TWO times less

Or this to give the Pi's name:

Code: Select all

cat /sys/firmware/devicetree/base/model
by jahboater
Tue Dec 06, 2016 12:29 pm
Forum: Java
Topic: Write to file faster
Replies: 6
Views: 2100

Re: Write to file faster

sync will flush everything system wide and could take some time.
For the single file, in C you would open the file with O_SYNC, or call fsync() or fdatasync(). I don't know what the equivalent is in Java.

Also look at the "commit=" option for ext4 (see the entry for / in /etc/fstab).
by jahboater
Tue Dec 06, 2016 9:24 am
Forum: General discussion
Topic: Raspberry Pi3 shows benchmark results for TWO times less
Replies: 12
Views: 7001

Re: Raspberry Pi3 shows benchmark results for TWO times less

Sysbench cpu is explicitly a 64-bit benchmark so I am not sure if its useful on the Pi running Raspbian. I would expect this to take about 7 - 8 seconds on a Pi3 with a 64-bit OS. That may be quick enough to avoid throttling. Test execution summary: total time: 5.5439s total number of events: 10000 ...
by jahboater
Sun Dec 04, 2016 7:24 pm
Forum: C/C++
Topic: Do you need to search for something in a string
Replies: 7
Views: 1326

Re: Do you need to search for something in a string

Re the unused argument to StrLen32: Instead of this: uint32_t StrLen32(uint32_t *ui_pntr) { register uint32_t ui_cntr asm("r0"); ui_pntr = ui_pntr; // This is a hack to circumvent the "unused variable" warning. // The optimizer will remove it. The correct way to do it is simply to use the argument d...
by jahboater
Sun Dec 04, 2016 9:53 am
Forum: Advanced users
Topic: RAM disk?
Replies: 4
Views: 2249

Re: RAM disk?

In /etc/fstab:

Code: Select all

tmpfs /tmp  tmpfs defaults,noatime 0 0
tmpfs /var/log  tmpfs defaults,noatime,size=50m 0 0
Note that tmpfs (not ramfs) only uses enough memory actually needed for the files plus a very small fixed overhead.
by jahboater
Sat Dec 03, 2016 10:22 am
Forum: Beginners
Topic: Necessitiy of Heat Sink
Replies: 8
Views: 4464

Re: Necessitiy of Heat Sink

Put "raspberry pi heatsink" into google, there are many available.
And they are cheap. Make sure the thermal tape is effective (the blue 3M tape seems to work).
by jahboater
Sat Dec 03, 2016 9:34 am
Forum: C/C++
Topic: Where to report c compiler bug?
Replies: 12
Views: 2005

Re: Where to report c compiler bug?

Thanks for this explanation - appreciate it. I was just surprised that my C code did not work on Raspoberry PI. This is from a polygon scan converter I've used for 20 years without any problem on SGI, PC, OSX, iOS and Android. You could try clang/LLVM (sudo apt install clang) for interest. But as o...
by jahboater
Fri Dec 02, 2016 4:54 pm
Forum: C/C++
Topic: Where to report c compiler bug?
Replies: 12
Views: 2005

Re: Where to report c compiler bug?

And this is too horrible to discuss:

Code: Select all

span->next = (poly *)20;
;)
by jahboater
Fri Dec 02, 2016 4:52 pm
Forum: C/C++
Topic: Where to report c compiler bug?
Replies: 12
Views: 2005

Re: Where to report c compiler bug?

You should aim for a clean compile before publishing your code and pointing the finger at the compiler ! Yes, and more, you should have a full understanding of what counts as undefined behaviour, the "as if" rule, and so on. A long time ago I filed a bug because, in something like "if( n == 5 || n ...
by jahboater
Fri Dec 02, 2016 9:45 am
Forum: Beginners
Topic: Gotcha - formatting thumbs
Replies: 11
Views: 1930

Re: Gotcha - formatting thumbs

jahboater mentioned the use of dmesg, of which I have never heard. Trying it on Linux Mint, I get a message like [ 422.355800] EXT4-fs: mounted filesystem with ordered data mode. . This would not have told me much. I use mint and get this at the end of the mesg output - did you only look at the las...
by jahboater
Thu Dec 01, 2016 9:30 pm
Forum: General programming discussion
Topic: Making readable modifyable code.
Replies: 309
Views: 63595

Re: Making readable modifyable code.

Heater wrote:Strangely enough I have used such punch cards in various places. Never on an actual IBM machine.
Ditto, but I did use an IBM 029 card punch, don't know if that counts.
Heater wrote:That is why I like to call them Hollerith Cards. After the inventor. Pre IBM days.
I remember hollerith constants in Fortran!

Go to advanced search