Go to advanced search

by ejolson
Tue Jul 16, 2019 7:20 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 481
Views: 18518

Re: Introduction to BBC BASIC

That is a shame. I learned a lot. About all kind of interesting languages I have never looked at before. About algorithms and techniques I had never seen. About the sensitivity of developers to anything that might sound like criticism of their babies. About being humbled by programmers more skillfu...
by ejolson
Tue Jul 16, 2019 7:14 pm
Forum: Off topic discussion
Topic: Help! Weird Problem With Nethack Direction Keys
Replies: 1
Views: 280

Re: Help! Weird Problem With Nethack Direction Keys

So I downloaded and installed nethack-console, The Great Waster of Time, Wrecker of Grades, etc, and am trying to play it using the terminal. But it seems to hate my keyboard. The arrow keys Just Don't Work. Left arrow gets the drop menu, up gets the take-off menu, right gets the drop menu, down ge...
by ejolson
Tue Jul 16, 2019 7:07 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: 258
Views: 5768

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

ejolson, But, but, surely if the input list is assumed to be sorted, we only have to ensure a "stable sort" on those frequency tables to preserve the relative order of the anagrams. As the C++ manual says: "Sorts the elements in the range [first,last) into ascending order, like sort, but stable_sor...
by ejolson
Tue Jul 16, 2019 6:05 pm
Forum: General programming discussion
Topic: Project Digital Apocalypse Not Now
Replies: 742
Views: 28774

Re: Project Digital Apocalypse Not Now

I have no idea what popular fictional characters those might be. Perhaps we can find something. You mean, like if the teletubbies was still popular? I'm looking forward to the new picture. I suspect it will be even more popular than the first. To think, it's all because of the digital apocalypse wh...
by ejolson
Tue Jul 16, 2019 5:45 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: 258
Views: 5768

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

Heater wrote:
Tue Jul 16, 2019 5:37 pm
You should install British English insane:

Code: Select all

$ wc -l /usr/share/dict/british-english-insane
654276 /usr/share/dict/british-english-insane
That does seem to keep with the general spirit of this project.
by ejolson
Tue Jul 16, 2019 5:41 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: 258
Views: 5768

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

I was not thinking of comparing every word in the dictionary to every other word. Rather I was vaguely thinking of: 1) Scan the input words and create a character frequency table for each word. Each of those tables has length of the size of your alphabet. Elements could be just bytes as we probably...
by ejolson
Tue Jul 16, 2019 5:33 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: 258
Views: 5768

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

Maybe I have misunderstood the problem but as far as I can tell there is no need to sort the characters within each word. If you want to know if word A is an anagram of word B then simply count the number of occurrences of each letter of the alphabet in each word. Store these frequencies in an arra...
by ejolson
Tue Jul 16, 2019 4:54 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: 258
Views: 5768

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

Maybe I have misunderstood the problem but as far as I can tell there is no need to sort the characters within each word. If you want to know if word A is an anagram of word B then simply count the number of occurrences of each letter of the alphabet in each word. Store these frequencies in an arra...
by ejolson
Tue Jul 16, 2019 4:29 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: 258
Views: 5768

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

This conversation started when somebody here was giggling because Python did not have pointers and that languages like C and some languages with "BASIC" in their name do. What wrong with being happy? I just heard from the lead developer that FidoBasic will have a better kind of pointer: https://upl...
by ejolson
Tue Jul 16, 2019 3:36 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: 258
Views: 5768

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

Improvements to the run time and ways to make the code clearer (but not longer) would be appreciated. Would it be possible to replace the msortchar() function (which looks very slow) with qsort() ? It would make the code a bit shorter/simpler too. I think you might be right. I initially thought the...
by ejolson
Tue Jul 16, 2019 2:54 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: 258
Views: 5768

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

To understand how your results compare with a real Pi, would you mind running my pichart program available here and reporting the output either here or in that thread? Here are results for my ROCK64 board: Thanks. For purposes of comparison the processor speed of the Raspberry Pi 3B+ is quite simil...
by ejolson
Tue Jul 16, 2019 1:59 pm
Forum: General programming discussion
Topic: Comparing Interpreted Language Speed.
Replies: 54
Views: 1448

Re: Comparing Interpreted Language Speed.

I posted a modified version for Matrix Brandy Basic here . Well, this is fun. Looks like I've found an inconsistency between Matrix Brandy compiled for Raspberry Pi and Matrix Brandy compiled for x86_64. Running that linked code but with an added line 8605 PRINT " *** F0: "; F0 : Raspberry Pi: pi@t...
by ejolson
Tue Jul 16, 2019 6:48 am
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: 258
Views: 5768

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

Further to this, here's an example of something I do that would be very annoying to write in C, but Perl does it quickly and efficiently enough. The problem can be stated as: List the English words (no proper nouns, no possessives) from the system word list that are valid anagrams of other words in...
by ejolson
Tue Jul 16, 2019 3:07 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 481
Views: 18518

Re: Introduction to BBC BASIC

ejolson, Should I be updating the classic_bbc.bas version of fibo in the Fibonacci challenge repository with that all caps fibo you posted here? Does that version run on RISC OS ? It's for Matrix Brandy Basic rather than Richard's BBC Basic, so probably not. I'm still waiting to hear whether it run...
by ejolson
Tue Jul 16, 2019 2:23 am
Forum: General discussion
Topic: Usefull / good programs to have on your Pi
Replies: 22
Views: 980

Re: Usefull / good programs to have on your Pi

My default additional installed programs are: fortune, putty, gparted, units, mplayer, and dclock. What? Fortune without cowsay? How useful is that? I prefer to take my fortunes straight. _______________________________________ / The cowsay program is also useful and \ | good to have on your Pi whe...
by ejolson
Tue Jul 16, 2019 12:26 am
Forum: General programming discussion
Topic: Comparing Interpreted Language Speed.
Replies: 54
Views: 1448

Re: Comparing Interpreted Language Speed.

Wow, thanks for giving that a go. Shame it is being so intransigent. no probs. It's quite a pretty OS when it gets running. Shame it doesn't speak any file formats that the rest of the world uses. The other thing I haven't managed to get it to do is time programs. I suspect it'll need to be somethi...
by ejolson
Mon Jul 15, 2019 10:47 pm
Forum: Networking and servers
Topic: Howto: ethernet gadget on Pi4B USB C
Replies: 4
Views: 244

Re: Howto: ethernet gadget on Pi4B USB C

In case anyone wants to try it, here's how I got a 4B running as a USB ethenet gadget. Firstly, this only works on the USB C port not on the USB 2 or USB 3 ports. Because of this you may have to find another way to get power into the 4B. Requirements: Raspberry Pi 4B (any RAM size) and asociated ca...
by ejolson
Mon Jul 15, 2019 10:34 pm
Forum: Beginners
Topic: SLURM enabled but not starting
Replies: 11
Views: 263

Re: SLURM enabled but not starting

Hi guys, Im building a raspberry pi cluster for a project, and I am currently trying to get slurm working. I can enable it, but when i run "sudo systemctl start slurmd", i get the error message shown in the screen shot. COuld this be something to do with the slurm.conf file not being edited correct...
by ejolson
Mon Jul 15, 2019 10:28 pm
Forum: General discussion
Topic: Usefull / good programs to have on your Pi
Replies: 22
Views: 980

Re: Usefull / good programs to have on your Pi

W. H. Heydt wrote:
Mon Jul 15, 2019 4:25 pm
My default additional installed programs are: fortune, putty, gparted, units, mplayer, and dclock.
What? Fortune without cowsay? How useful is that?
by ejolson
Mon Jul 15, 2019 9:37 pm
Forum: General discussion
Topic: Raspberry pi 4 shows armv7l at lscpu command?
Replies: 9
Views: 269

Re: Raspberry pi 4 shows armv7l at lscpu command?

why does my Raspberry pi 4 shows armv7l at lscpu command? Architecture: armv7l Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Vendor ID: ARM Model: 3 Model name: Cortex-A72 Stepping: r0p3 CPU max MHz: 1500.0000 CPU min MHz: 600....
by ejolson
Mon Jul 15, 2019 9:07 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: 258
Views: 5768

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

To understand how your results compare with a real Pi, would you mind running my pichart program available here and reporting the output either here or in that thread? I currently don't have dev tools installed except 8th. I installed gcc, make and build-essentials. When I tried to build with make,...
by ejolson
Mon Jul 15, 2019 7:15 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 481
Views: 18518

Re: Introduction to BBC BASIC

One obtains a different but still not fully satisfying result with the C program #include <stdio.h> #include <math.h> int main(){ for(double x=1e3;x<=1e32;x*=10){ double y=floor(x); printf("floor(%g)=%f %s\n", x,y,y==x?"equal":"not equal"); } return 0; } wonder if Richard's BBC Basic does the same....
by ejolson
Mon Jul 15, 2019 7:05 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 481
Views: 18518

Re: Introduction to BBC BASIC

DavidS wrote:
Mon Jul 15, 2019 7:04 pm
Same results using either LOG or LN.
Did you try the Matrix Brandy Basic code just posted above?
by ejolson
Mon Jul 15, 2019 6:53 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 481
Views: 18518

Re: Introduction to BBC BASIC

Also note that the use of the INT function requires that the result be stored as an integer at least for a moment in an ARM register. If that means you can't use INT() to truncate a value greater than 2^31 to an integer (despite BASIC 6's 64-bit float variables being able to hold much bigger intege...
by ejolson
Mon Jul 15, 2019 6:38 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 481
Views: 18518

Re: Introduction to BBC BASIC

Also note that the use of the INT function requires that the result be stored as an integer at least for a moment in an ARM register. If that means you can't use INT() to truncate a value greater than 2^31 to an integer (despite BASIC 6's 64-bit float variables being able to hold much bigger intege...

Go to advanced search