Go to advanced search

by jahboater
Mon Jun 24, 2019 10:56 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 279
Views: 12411

Re: Raspberry Pi 4 Thread - general discussion

Optimal SdCard for the Raspberry Pi 4B I am assuming that a Class 10 will be sufficient enough. Just wanted to get everyone else's thoughts on the surface subject. A1 class https://www.sdcard.org/developers/overview/application/index.html https://www.amazon.co.uk/gp/product/B073JYVKNX/ref=ppx_yo_dt...
by jahboater
Mon Jun 24, 2019 7:23 am
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 279
Views: 12411

Re: Raspberry Pi 4 Thread - general discussion

RaTTuS wrote:
Mon Jun 24, 2019 7:18 am
Well done people,
I've ordered one already - will probably get a 4GB later ....when they become available
I have ordered a 4GB model from the PiHut.
by jahboater
Sun Jun 23, 2019 7:04 pm
Forum: Beginners
Topic: Looking for this kind of solution on Raspberry...
Replies: 4
Views: 163

Re: Looking for this kind of solution on Raspberry...

Try something like this:

sudo nmap -sn 192.168.0.0/24
by jahboater
Fri Jun 21, 2019 9:30 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1188
Views: 32255

Re: ScriptBasic

Heater wrote:
Fri Jun 21, 2019 7:41 pm
Let's start with the meaningless error messages and the memory leaks...
How about starting with a formal definition of the ScriptBasic language?

Other successful languages have an ISO or ECMA standard, or at least have exemplary documentation (Python).
by jahboater
Fri Jun 21, 2019 10:41 am
Forum: C/C++
Topic: change data type using C/C++
Replies: 2
Views: 169

Re: change data type using C/C++

Yes,

Perhaps see the "od" command (type "man od" for details).

Or, as you are using C/C++, this may be trivial to code by hand.
That is, as you read in the file, hexify the text and split it into frames
by jahboater
Thu Jun 20, 2019 6:24 pm
Forum: General discussion
Topic: Is my cell phone charger good enough to supply power to my raspberry pi
Replies: 20
Views: 792

Re: Is my cell phone charger good enough to supply power to my raspberry pi

Here is the spec of the "official" Raspberry Pi PSU. Its known to work reliably for all Pi models. https://docs-emea.rs-online.com/webdocs/14ba/0900766b814ba6b1.pdf https://uk.rs-online.com/web/p/products/9098126/?grossPrice=Y&cm_mmc=UK-PLA-DS3A-_-google-_-PLA_UK_EN_Power_Supplies_And_Transformers-_...
by jahboater
Thu Jun 20, 2019 6:02 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using a Pi zero with emmc
Replies: 20
Views: 813

Re: Using a Pi zero with emmc

I think youre right, my emmc is recognised by Windows/Mac but not by RasPi. What am I trying to acheive? To free from unreliable sd card connector by plugging a little emmc module on my RasPi. Moreother, as I understand, emmc are far more reliable in terms of wear resistance/write cycles. I want my...
by jahboater
Wed Jun 19, 2019 7:59 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1188
Views: 32255

Re: ScriptBasic

Below is a simple Minesweeper game written for Silverfrost FTN95: And that's Fortran ? Doesn't look like any Fortran I remember. Like "Modern C++" we also have "Modern Fortran" ........ I would have to guess it is descended from the Ratfor pre-processor; because I can't see anything which otherwise...
by jahboater
Wed Jun 19, 2019 3:57 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1188
Views: 32255

Re: ScriptBasic

"Fortran: 65 years old. BBC BASIC: 38 years" I know. I was restricting myself to languages ScriptBasic, or anyone , is likely to have actually used. Fair enough. However I do think most programmers of our generation will have used Fortran. Long ago it was as popular as C is now. Also Fortran 2018 l...
by jahboater
Wed Jun 19, 2019 3:24 pm
Forum: Advanced users
Topic: Programming using registers with C
Replies: 7
Views: 420

Re: Programming using registers with C

to quote .... "Prime field arithmetic is optimized for the 4th and 6th generation of Intel Core processors (Haswell and Skylake micro-architectures)." Its using BMI2 - a recent bit manipulation instruction set. Probably quite hard to translate that into RISC, even aarch64 (the Pi in 64-bit mode). T...
by jahboater
Wed Jun 19, 2019 8:07 am
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1188
Views: 32255

Re: ScriptBasic

Heater wrote:
Wed Jun 19, 2019 5:11 am
Perhaps timeless, but still a new kid on the block. C is nearly 50 years old, Python 30 years...
Fortran is 65 years old.
by jahboater
Tue Jun 18, 2019 3:41 pm
Forum: Advanced users
Topic: Programming using registers with C
Replies: 7
Views: 420

Re: Programming using registers with C

Hello, I am trying to adapt a C project about Elliptic Curve Diffie-Helmen key exchange, which uses registers, and when I tried to compile it, it says "there's no such registers name" My Q is what are the registers I can use in Raspberry Pi 3 B (BCM2835) to temporarily store processed data instead ...
by jahboater
Mon Jun 17, 2019 9:40 pm
Forum: C/C++
Topic: how to use pthread_kill(pthread_t tid, int sig) by which sig ?
Replies: 22
Views: 643

Re: how to use pthread_kill(pthread_t tid, int sig) by which sig ?

Yes, I had a bad feeling it would do that.
You probably should try a different signal (such as SIGTERM), catch it in the thread, and get the thread to terminate itself.
by jahboater
Sun Jun 16, 2019 10:12 pm
Forum: General discussion
Topic: raspberry pi 3B underclock
Replies: 15
Views: 652

Re: raspberry pi 3B underclock

The pi is in a box. Time to let it out! This is my Pi3B+. The first program run starting at 23:05:01 was one core flat out. As you can see the temp barely rises. The second job starting at 23:05:41 was a deliberate pathological stress test that uses NEON on all four cores. Given time the temp will ...
by jahboater
Sun Jun 16, 2019 6:24 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1188
Views: 32255

Re: ScriptBasic

You will always need root privs to install things on Linux? I hope so anyway. No you don't. I have a lot of compilers, interpreters and other tools and programs installed on this machine that never go near any privileged directories. Node.js, clang/LLVM, GCC, Scala, Verilog, most of the languages i...
by jahboater
Sun Jun 16, 2019 5:58 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1188
Views: 32255

Re: ScriptBasic

Heater wrote:
Sun Jun 16, 2019 5:09 pm
I normally install .deb files with dpkg -i

A install that works from the gitlab repo and does not require root privs is what we need.
You will always need root privs to install things on Linux?

I hope so anyway.
by jahboater
Sun Jun 16, 2019 5:52 pm
Forum: Beginners
Topic: setting up a RP headless from a ubuntu laptop
Replies: 3
Views: 179

Re: setting up a RP headless from a ubuntu laptop

The simplest solution for image writing is to use the Etcher software ( https://www.balena.io/etcher/ ), which will extract, write and verify the image in one operation. Ubuntu could also use the dd or cp commands, but you'll need to extract the image first, and there's no verification. You can ver...
by jahboater
Sun Jun 16, 2019 5:33 pm
Forum: General discussion
Topic: raspberry pi 3B underclock
Replies: 15
Views: 652

Re: raspberry pi 3B underclock

My issue is that it: - uses more power than asked - produces more heat than asked The heat is easily dealt with:- https://www.kintaro.co/products/kintaro-custom-heatsink For power consumption, arm_freq=800 or something should also reduce the core voltage. For example, Pi Zero's come with a factory ...
by jahboater
Sun Jun 16, 2019 3:51 pm
Forum: General discussion
Topic: raspberry pi 3B underclock
Replies: 15
Views: 652

Re: raspberry pi 3B underclock

Its not an answer, but can I suggest getting a Pi3B+ (with the plus) ? This revision of the Pi3 has extensive changes to improve the thermal management. There is a heat spreader on the SoC chip and the PCB ground plane itself is designed to conduct away heat from the SoC. In addition, changes to the...
by jahboater
Sun Jun 16, 2019 3:41 pm
Forum: Off topic discussion
Topic: how heavy is raspbian ?
Replies: 30
Views: 1783

Re: how heavy is raspbian ?

For each instruction count the set bits with __builtin_popcount() or use Brian Kernighan’s algorithm.
Set bits have more electrons in the memory cells.

On the Pi,
a particular add insn opcode is 0x030080E0 (6 set bits)
and sub is 0x034054E0 (9 set bits)
so subtract is heavier than add.
:)
by jahboater
Sat Jun 15, 2019 11:11 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 601
Views: 18054

Re: A Final Fibonacci Challenge

DougieLawson wrote:
Sat Jun 15, 2019 10:45 pm
I didn't look at whether I could get to 128-bit integers with GMP (that's for another day).
GMP is arbitrary precision.
You can, for example, compute the million digit fibo(4784969) simply with:

mpz_fib_ui( res, 4784969 );

which executes in 38 milliseconds on my 7 year old Intel PC.
by jahboater
Sat Jun 15, 2019 11:04 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 601
Views: 18054

Re: A Final Fibonacci Challenge

I reckon fib(92) is about the limit in a 64-bit long long integer. I found a really quick Javascript page at http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibCalcX.html (which, probably, does more maths than EJolson was looking for). This is even simpler (and includes an overflow che...
by jahboater
Sat Jun 15, 2019 10:59 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 601
Views: 18054

Re: A Final Fibonacci Challenge

ScriptBasic wrote:
Sat Jun 15, 2019 10:30 pm
What other popular languages use GMP for BIGINT support?
do an apt-cache search gmp
Lots of noise, but I can see perl, ocam, php, ada, python (gmpy), gambas?, possibly free pascal,
and obviously C and C++, since GMP is written in C, for C.
by jahboater
Fri Jun 14, 2019 9:20 am
Forum: C/C++
Topic: how to use pthread_kill(pthread_t tid, int sig) by which sig ?
Replies: 22
Views: 643

Re: how to use pthread_kill(pthread_t tid, int sig) by which sig ?

I don't know how to create an experimental setup which simulates such an event, tbh How are you going to test it? Perhaps just change the pthread_kill() call to be unconditional, or based on something external that you can control, like the presence of a file. Use your imagination. The great thing ...

Go to advanced search