Go to advanced search

by jahboater
Mon Oct 14, 2019 6:00 pm
Forum: General discussion
Topic: 64 bit os?
Replies: 3
Views: 95

Re: 64 bit os?

I read a few articles that the Pi 4 can have an os with a 64bit system, but when I attempt to download java 64 bit, the pi does not work with it, can someone please help me out on where I can get said 64bit os? I have a raspberry pi 4 with 4GB of ram Gentoo 64 is well regarded ... https://www.raspb...
by jahboater
Sun Oct 13, 2019 4:29 pm
Forum: Other programming languages
Topic: programming with c#
Replies: 17
Views: 551

Re: programming with c#

scruss wrote:
Sun Oct 13, 2019 4:05 pm
jahboater wrote:
Sat Oct 12, 2019 11:49 pm
You will find C++ much more familiar!
Not if you've only used C#, as the OP stated.
He also mentioned Python as an alternative.
I think C++ is closer in style to C# than Python is.
by jahboater
Sun Oct 13, 2019 10:03 am
Forum: Beginners
Topic: Increase size of existing swap file
Replies: 10
Views: 45207

Re: Increase size of existing swap file

I since found you can do that in one step:

Code: Select all

sudo /etc/init.d/dphys-swapfile restart
by jahboater
Sun Oct 13, 2019 10:00 am
Forum: C/C++
Topic: Where can I begin learning C/C++?
Replies: 36
Views: 1324

Re: Where can I begin learning C/C++?

I have the feeling what the C++ world needs now is books and tutorials to present modern C++ to beginners, leaving out tons of historical baggage that no longer recommended and is only confusing. There are plenty of books on C++, but I have found none that cover the entire language, probably becaus...
by jahboater
Sat Oct 12, 2019 11:49 pm
Forum: Other programming languages
Topic: programming with c#
Replies: 17
Views: 551

Re: programming with c#

est3 wrote:
Sat Oct 12, 2019 11:31 pm
right now i try to working with python and because of it i asked about python, but it's hard to me, i'm not know the language, so in the while i try to find way to devlop on c#.
You will find C++ much more familiar!
by jahboater
Fri Oct 11, 2019 9:44 am
Forum: Other programming languages
Topic: programming with c#
Replies: 17
Views: 551

Re: programming with c#

Did you know that C++ is included as standard with Raspian?
There's no need to use Python or install mono etc.
C++ will be very very fast and has great support for the GPIO.
by jahboater
Thu Oct 10, 2019 10:29 pm
Forum: General programming discussion
Topic: Programming languages support
Replies: 37
Views: 1165

Re: Programming languages support

Well there you go, either that is a zero or very short time out, in which case you are thrashing around needlessly wasting performance and generating heat. You should actually try using it .... then it would become clear. You may set a zero timeout - which is a simple poll. You may set an interval....
by jahboater
Thu Oct 10, 2019 5:01 pm
Forum: General programming discussion
Topic: Programming languages support
Replies: 37
Views: 1165

Re: Programming languages support

Using select() is not massively complex, but certainly more so than using fs from node.js. Yes, very likely. I have not used node.js, so I cannot comment (JS did not exist when I was doing this sort of thing for a living ...). Especially when dealing with many files and other I/O at the same time. ...
by jahboater
Thu Oct 10, 2019 12:28 pm
Forum: General programming discussion
Topic: Programming languages support
Replies: 37
Views: 1165

Re: Programming languages support

/* Watch stdin (fd 0) to see when it has input. */ FD_ZERO(&rfds); FD_SET(0, &rfds); /* Wait up to five seconds. */ tv.tv_sec = 5; tv.tv_usec = 0; retval = select(1, &rfds, NULL, NULL, &tv); Seems simple enough to me. The same code works for thousands of devices or sockets. Much easier and safer th...
by jahboater
Thu Oct 10, 2019 11:59 am
Forum: General programming discussion
Topic: Programming languages support
Replies: 37
Views: 1165

Re: Programming languages support

Heater wrote:
Thu Oct 10, 2019 11:44 am
Using threads is not necessarily difficult but it's a complexity one would rather not deal with.
On Linux (Raspbian) or UNIX, select() makes that sort of thing fairly easy - without using threads.

Code: Select all

man 2 select
It is actually a system call.
by jahboater
Tue Oct 08, 2019 12:09 am
Forum: General discussion
Topic: which rpi should I get?
Replies: 25
Views: 681

Re: which rpi should I get?

I had an rpi2, it wasn't stable at all, I had to replug it's power supply at least twice a day, I thought that maybe with the advancement of the kernel it will be stable The Pi2 was/is very stable just like all Pi's. I don't recall any unplanned reboots with any of mine. Perhaps you had an inadequa...
by jahboater
Mon Oct 07, 2019 9:13 am
Forum: General discussion
Topic: WiFi Range in open air
Replies: 7
Views: 308

Re: WiFi Range in open air

The later models have a better antenna by the way.
by jahboater
Sat Oct 05, 2019 4:07 am
Forum: Beginners
Topic: how to open .bashrc file
Replies: 3
Views: 112

Re: how to open .bashrc file

As above, any editor will do.
Try ...

Code: Select all

nano ~/.bashrc
by jahboater
Fri Oct 04, 2019 5:18 pm
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

Sal55, My first exposure to programming was at college in the mid-70s on a machine with a 36-bit word size Honeywell mainframe by any chance? I used B on one of those (yes 36 bit "words" only). C promotes smaller types to "int" before arithmetic. Int is whatever size is naturally best for the machin...
by jahboater
Fri Oct 04, 2019 2:02 am
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

I find it a bit paradoxical though. One might expect that those with such experience would be acutely aware of their fallibility and propensity for error. That they would be very welcoming of all the help they can get ensuring things are correct. Exactly. That's why we use tools like valgrind, or t...
by jahboater
Fri Oct 04, 2019 1:50 am
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

Actually, I'm not even sure the ARM architecture directly supports arithmetic operations on values of arbitrary width (I think operands can be loaded or stored at any width). Yes. ARM can only do arithmetic on full 32-bit registers or in 64-bit mode, 64-bit registers also. You can load and store 8,...
by jahboater
Thu Oct 03, 2019 8:34 pm
Forum: Bare metal, Assembly language
Topic: What can i really make in ARM Assembly
Replies: 10
Views: 449

Re: What can i really make in ARM Assembly

GCC calls AS after running the preprocessor (on a .S file, not a .s file), so the assembly of code not affected by the preprocessor will be identical with either method; there is no bloat by using GCC instead of AS directly. I just tried it for fun (see above), about 5.2k extra for crt0 and the stu...
by jahboater
Thu Oct 03, 2019 8:13 pm
Forum: Bare metal, Assembly language
Topic: What can i really make in ARM Assembly
Replies: 10
Views: 449

Re: What can i really make in ARM Assembly

If you use GCC then you get all the C start up stuff included (and a different entry point "main" instead of "_start"), and a dependency on libc. If you use "as", then whats in the executable is just your code. Doesn't matter much unless your are trying for a really minimal executable! And the C pre...
by jahboater
Thu Oct 03, 2019 5:19 pm
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

Too many high-end C compilers rely on undefined behaviour for them to be able to do their optimisations. What happens is this: Undefined behavior cannot happen in a correct C program. Therefore if a compiler can detect the UB, its free to delete the code. This is commonly seen with badly designed a...
by jahboater
Thu Oct 03, 2019 4:32 pm
Forum: Bare metal, Assembly language
Topic: What can i really make in ARM Assembly
Replies: 10
Views: 449

Re: What can i really make in ARM Assembly

That is indeed true.Whilst it has been quite some time since I needed to do any assembler programming, its still important to have some knowledge in order to do debugging at a fairly low level. I agree with this. This book should get you started: https://www.amazon.com/ARM-A32-Assembly-Language-32-...
by jahboater
Thu Oct 03, 2019 3:27 pm
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

I thought all unsigned arithmetic was defined. The problem is if int is larger than 16 bits then the code snippet isn't unsigned arithmetic, it's conversion to int, followed by signed arithmetic, followed by conversion back to uint16_t . OK, if the original operand fits in a signed int then that's ...
by jahboater
Thu Oct 03, 2019 3:01 pm
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

Sal55, (ETA: this still leaves the print-format problem unresolved, especially calling printf-family functions from another language. What format code to use for your genuine (ie. not bolted-on to int or long) int32 and int64 types?) You also have the problem of 64-bit literals. In 64-bit modes the ...
by jahboater
Thu Oct 03, 2019 2:52 pm
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

plugwash, Unfortunately the C99 typedefs don't fully solve the problem because of C's boneheaded promotion and overflow rules, consider for example. I thought that was to accommodate processors which cannot do arithmetic on types smaller than int - like the Pi's ARM CPU's. The Pi can load a byte or ...
by jahboater
Thu Oct 03, 2019 2:40 pm
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

Sal55, The common memory model for 64-bits is LP64 - that is L ongs and P ointers are 64-bits. For 32-bit mode, the memory model should be ILP32 that is I ntegers, L ongs and P ointers are all 32-bits. Windows uses LLP64 which is L ong L ong and P ointers are 64-bits Long remains 32-bits the same as...
by jahboater
Thu Oct 03, 2019 2:10 pm
Forum: Other programming languages
Topic: The Rust debate.
Replies: 151
Views: 3761

Re: The Rust debate.

POSIX implementations mandate 8 bits. Yes, that's what I thought. And its near 40 years since I used a machine without 8 bit bytes. :) I am sure Peter O has some working computers in his museum with some other sizes :) On a related note, I believe there are no longer any known computers where the i...

Go to advanced search