Go to advanced search

by Paeryn
Wed Aug 21, 2019 1:32 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Liberation through Computer Literacy

The "need" is down to how it's implemented, it just uses sorted lists, it doesn't search for matching hashes rather it relies on sorting them all which puts all matching hashes next to each other. Using a proper tree to store and search the list of anagrams would be better (like Kira did in C) but I...
by Paeryn
Wed Aug 21, 2019 10:30 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Liberation through Computer Literacy

Hmm.. I see... But, but, the input data is already sorted, it's a dictionary after all, so there is no need to do any sorting to get the anagrams out (except for sorting letters in words perhaps). To group entries together it needs the lists sorted by the ordered letters, this list is no longer in ...
by Paeryn
Wed Aug 21, 2019 7:44 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Liberation through Computer Literacy

Heater wrote:
Wed Aug 21, 2019 5:06 am
How on Earth can juggling 650,000 words, only 6.6M bytes, manage to consume 2 giga bytes?!
The sort function is a merge sort, it generates a huge number of temporary lists. Sorting lists is expensive when you have such long lists.
by Paeryn
Tue Aug 20, 2019 7:52 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

Sorry for taking so long getting the Haskell version of the anagrams done, I've not been too well and got fed up trying to write an efficient version so I've done it by sorting the letters of each word and using that directly to sort the list of words and group identical entries. I've not run it on ...
by Paeryn
Tue Aug 13, 2019 10:16 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

$ sudo rm cat Alas, poor Kira, I knew her not. ... Please remind Fido that, even if cat cannot be retrieved from a backup, the judges' role involves implementing the rules. It would be very unsatisfying for one of the judges to win the challenge with an entry scoring null points . Thankfully cats a...
by Paeryn
Sun Aug 11, 2019 11:22 pm
Forum: C/C++
Topic: How Do I Loop This?
Replies: 8
Views: 2896

Re: How Do I Loop This?

Then it's stuck in the do while loop. You did use double equals sign in the test? Find out what datatype m_dialogState and DialogUXState::THINKING are and check syntax for comparing them. My C is very rusty! I suppose my entire suggestion is useless unless the two values can magically change within...
by Paeryn
Sun Aug 11, 2019 7:30 pm
Forum: General discussion
Topic: Steam on Buster, is it possible?
Replies: 17
Views: 1283

Re: Steam on Buster, is it possible?

fruitoftheloom wrote:
Sun Aug 11, 2019 5:33 pm
Paeryn wrote:
Sun Aug 11, 2019 4:47 pm
...

Yep all stated in previous responses :shock:
These fora used to always warn when other replies had been posted before submitting but lately it's not always done so, there hadn't been any replies when I started my reply. :?
by Paeryn
Sun Aug 11, 2019 4:47 pm
Forum: General discussion
Topic: Steam on Buster, is it possible?
Replies: 17
Views: 1283

Re: Steam on Buster, is it possible?

It's not a case of 32 or 64 bit, Raspbian is 32 bit anyway. It's a case of Steam requiring an x86 processor i.e. Intel/AMD, the RPi has an ARM processor, totally incompatible (unless you use an x86 emulator but that won't be fast). As far as I know Steam itself isn't available for ARM, they do have ...
by Paeryn
Sat Aug 10, 2019 3:14 pm
Forum: OpenGLES
Topic: RPi 4 OpenGL ES 3.0 ShaderToy to download (100+ examples)
Replies: 49
Views: 8734

Re: RPi 4 OpenGL ES 3.0 ShaderToy to download (100+ examples)

What gave you the impression that the VC4 didn't have shaders? In Tim's Readme it says only works on Pi4's. It looks like mesa is smart enough to figure that out and use the VC4 driver. Dug out the VC4 manual, not much on shaders, need the VC6 manual, not that it will make much sense. Think I need ...
by Paeryn
Sat Aug 10, 2019 12:38 pm
Forum: Beginners
Topic: Trouble Auto starting Program
Replies: 6
Views: 377

Re: Trouble Auto starting Program

Ah, well that explains that. But then why are there two versions in my file system? I saw that the -pi version is the most recent so what is the point of both? Raspbian normally uses a modified LXDE setup which it calls LXDE-pi, LXDE will be the default debian setup. One of the config files sets wh...
by Paeryn
Sat Aug 10, 2019 12:45 am
Forum: AIY Projects
Topic: Alexa Device SDK unary operator expected error
Replies: 2
Views: 1230

Re: Alexa Device SDK unary operator expected error

Everything seemed to be fine in that it let me rebuilt the sample app but when I tried to re-run the setup.sh to input my credentials again (as detailed in the link), the set-up runs and asks me to agree to the terms by pressing enter. When I do this though it stops with the following error: setup....
by Paeryn
Fri Aug 09, 2019 10:53 pm
Forum: Beginners
Topic: Trouble Auto starting Program
Replies: 6
Views: 377

Re: Trouble Auto starting Program

- I needed to put it the correct place: ~/.config/lxsession/LXDE/autostart I was using these autostart files and they did not work at all: /etc/xdg/lxsession/LXDE/autostart /etc/xdg/lxsession/LXDE-pi/autostart Just for your information: for LXDE the system config files in /etc are used only if the ...
by Paeryn
Fri Aug 09, 2019 2:09 pm
Forum: OpenGLES
Topic: RPi 4 OpenGL ES 3.0 ShaderToy to download (100+ examples)
Replies: 49
Views: 8734

Re: RPi 4 OpenGL ES 3.0 ShaderToy to download (100+ examples)

Simple enough a Zero can do it, which means OpenGLES 2.0. But I did not think the VC4 had shaders. So when Tim's shadertoy worked on a Pi3B+ I got confused. OpenGLES1's vertex and fragment stages are fixed-function only, OpenGL ES2's vertex and fragment stages are shader only. When running ES1 code...
by Paeryn
Fri Aug 09, 2019 1:58 am
Forum: General discussion
Topic: Why are all CPU cores running by default on RPi3 (4) cold reset?
Replies: 1
Views: 212

Re: Why are all CPU cores running by default on RPi3 (4) cold reset?

From rust-embedded tutorials I understand, that upon boot all cores of the CPU are running and execute the same boot code. I tried to search for details about this, but found not much. From the ARM Cortex-A72 MPCore Processor Technical Reference Manual I understand, that different types of reset ca...
by Paeryn
Wed Aug 07, 2019 9:30 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

Not bad for the Rust/WASM version, my Galaxy S9 runs it in 1189 milliseconds. I must get around to fixing my Haskell version.
by Paeryn
Wed Aug 07, 2019 2:35 am
Forum: Graphics, sound and multimedia
Topic: Gtk-WARNING **: cannot open display: :0.0 Maximum number of clients reached
Replies: 6
Views: 893

Re: Gtk-WARNING **: cannot open display: :0.0 Maximum number of clients reached

Looking at it, Xserver's maxclients defaults to 256. You can set it to 64, 128, 256, 512, 1024 or 2048 by creating a file in the directory /usr/share/X11/xorg.conf.d/ and call it 99-serverflags.conf You need to be root to create a file in there so in a terminal type (I use vim as my editor but feel ...
by Paeryn
Tue Aug 06, 2019 8:22 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

Well, if your language does not allow you to read via an uninitialized pointer, if it does not allow the creation of null pointers, if it does not allow you to point at the wrong thing, if it does not allow you to share pointers for write operations, then there is no need for pointer checking at ru...
by Paeryn
Tue Aug 06, 2019 2:19 pm
Forum: Graphics, sound and multimedia
Topic: Gtk-WARNING **: cannot open display: :0.0 Maximum number of clients reached
Replies: 6
Views: 893

Re: Gtk-WARNING **: cannot open display: :0.0 Maximum number of clients reached

The error looks to be originating from the X library/server rather the GTK itself, GTK is just relaying it back to you.

It sounds like X might be running out of resources, it could happen if a program is constantly allocating resources and not freeing them.
by Paeryn
Tue Aug 06, 2019 1:47 am
Forum: Python
Topic: Main Window Disappears When I Use A "while" Command
Replies: 11
Views: 389

Re: Main Window Disappears When I Use A "while" Command

Hmmm, the main window didn't opened and I've got a bunch of errors. I received an error " Fatal Python error: Cannot recover from stack overflow. " I tried the following code, def TestLoop(self): try: # Do things print("TESTING QTIMER") finally: QTimer.singleShot(500, TestLoop(self)) It ran for a f...
by Paeryn
Mon Aug 05, 2019 5:04 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

Sorry I mis-interpreted your meaning, this hot weather is getting to me. I agree with the niggle about requiring the final line to not have semi-colon when returning a value. I'm used to having the last thing in a function being the return value from functional languages so not having a return keywo...
by Paeryn
Mon Aug 05, 2019 2:06 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

Boo. Rust is a terrible language, worst I ever seen, never using rust again. Stamps foot. Why? Because after all I said about how great it was for not accepting things like "+=" it turns out that it actually does. That would be bad enough alone but it gets worse. Rust has a tool called "clippy" whi...
by Paeryn
Fri Aug 02, 2019 6:13 pm
Forum: Python
Topic: accessing a fifo file
Replies: 6
Views: 427

Re: accessing a fifo file

You can check to see if there is any data to be read from a fifo with an ioctl(FIONREAD), you need to use something like an array.array to store the result in. import array import time import fcntl import termios bytesLeft = array.array('l', [0]) f = open('test.fifo', 'r') while True: fcntl.ioctl(f,...
by Paeryn
Fri Aug 02, 2019 3:33 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

When the Koding Kitty looked at the zombie's code he arched his back, his fur stood on end (quite an impressive look for a long haired cat) and he hissed (paraphrased to make it kid-friendly) "Get Fido to safety, there be some strong voodoo magic going on there!". Kira's been helping me with the Has...
by Paeryn
Fri Aug 02, 2019 1:48 am
Forum: Python
Topic: Nothing is happening
Replies: 3
Views: 249

Re: Nothing is happening

def checkColission(self, Paddle1, Paddle2): col = pygame.sprite.collide_rect(Paddle1, Paddle2) if col == True: self.speedx *= -1 Doesn't sprite.collide_rect() just detect collisions between the two sprites' rects? What you are testing is if the two paddles collide with each other rather than if the...
by Paeryn
Thu Aug 01, 2019 1:29 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 86167

Re: Project Digital Apocalypse Not Now

I wonder what happened to Haskell, Smalltalk and the Scheme interpreters. Would it be possible to complete the insane British anagram challenge using Scratch? I've been considering writing a version in Haskell, I'll see what I can come up with. Haskell is usually a compiled language rather than int...

Go to advanced search