Go to advanced search

by jalih
Sun Jul 21, 2019 6:58 am
Forum: General programming discussion
Topic: Project Digital Apocalypse Not Now
Replies: 735
Views: 28417

Re: Project Digital Apocalypse Not Now

ejolson, Given the ridiculously slowness of these languages to actually produce big integer results one wonders why they even bothered adding the feature to the languages. Python, Javascript, Smalltalk for example. I can offer a couple of suggestions... 1) It's cool that ones calculations won't ove...
by jalih
Thu Jul 18, 2019 4:46 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: 210
Views: 4945

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

Has anyone tested the approach described in this post of creating a vector of letter counts rather than sorting? I tried that approach with 8th to generate map keys instead of sorting word alphabets. It ran about the same speed as my original version. I got a little help from the 8th forums and ver...
by jalih
Tue Jul 16, 2019 5:57 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: 210
Views: 4945

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

You should install British English insane: $ 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. Timed my 8th programming language version of anagram program using "/usr/share/dict/british-english...
by jalih
Tue Jul 16, 2019 5:12 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: 210
Views: 4945

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 jalih
Tue Jul 16, 2019 1:06 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: 210
Views: 4945

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

ejolson wrote:
Mon Jul 15, 2019 6:08 pm
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:
by jalih
Mon Jul 15, 2019 6:48 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: 210
Views: 4945

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 jalih
Mon Jul 15, 2019 6:43 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: 210
Views: 4945

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

I have never understood why languages where that's considered fundamentally useful don't have 'forever { ... }' or 'do { ... } forever' constructs built-in, that there's no standard way of specifying such things, programmers being left to their own implementations of the same. PL/I supports: do for...
by jalih
Sun Jul 14, 2019 5: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: 210
Views: 4945

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

2.5seconds 'on your pc' means nothing, other than to you. How does it run on you RaspberryPi (and model of course to compare)? I currently don't own RasperryPI. I got a PINE64 ROCK64 board that I can use for testing, it should give some info about performance. Stay tuned... I just tested on my ROCK...
by jalih
Sun Jul 14, 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: 210
Views: 4945

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

It implements the following example: a traffic light alternates between green and blue, but immediately jumps to red if an alarm button is pressed. After a while, the traffic light switches back to alternating green/blue. I would just use state map with last state and current state combined as map ...
by jalih
Sun Jul 14, 2019 3:48 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: 210
Views: 4945

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

bensimmo wrote:
Sun Jul 14, 2019 3:16 pm
2.5seconds 'on your pc' means nothing, other than to you.

How does it run on you RaspberryPi (and model of course to compare)?
I currently don't own RasperryPI. I got a PINE64 ROCK64 board that I can use for testing, it should give some info about performance. Stay tuned...
by jalih
Sun Jul 14, 2019 2:56 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: 210
Views: 4945

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

I think what Heater means, it should be as easy and straightforward as table lookup! My numeric string validator example works like that. I can post PL/I version, it's probably easier to follow. *PROCESS MARGINS(1,140) LIBS(SINGLE,STATIC); test: procedure options(main); dcl buffer char(255) varying...
by jalih
Sun Jul 14, 2019 2: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: 210
Views: 4945

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

Though you're not doing half the work that my example did: you include proper nouns and possessives and smash everything to lower case: you need to pick out the words that are just lower case alphanumerics your output isn't sorted. I updated my version for 8th programming language to match your spe...
by jalih
Sun Jul 14, 2019 1:06 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: 210
Views: 4945

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

It's a fine FSM but suffers from the same size and complexity as many others I have seen around the net. A simple FSM in C can be just a "while(1)" wrapped around a "switch(state)". Can you give a small example? I think what Heater means, it should be as easy and straightforward as table lookup! My...
by jalih
Sun Jul 14, 2019 9:09 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: 210
Views: 4945

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

Michiel O. wrote:
Sun Jul 14, 2019 8:58 am
This way, the entire output is sorted, from start to end, and on each line, too.
That works! :) I chose to collect all the keys with more than one item and sort the list based on content.

How about execution time now?
by jalih
Sun Jul 14, 2019 8:42 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: 210
Views: 4945

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

I did the same, in Python3, using /usr/share/dict/words (2.5M file, 1 second runtime): We used the same method but you don't seem to sort results alphabetically by using first word of the anagrams. Or did I miss it? It was one requirement of the original challenge and adds quite a lot more code for...
by jalih
Sun Jul 14, 2019 7:04 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: 210
Views: 4945

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

There are no data or data structure pointers in Python but it is possible to have function pointers which come in handy. That allowed me to create a quite elegant Finite State Machine design with Python. Where FSM needs to use pointers? Below is a simple state machine based validator for strings co...
by jalih
Sun Jul 14, 2019 6:46 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: 210
Views: 4945

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

I think I would just mmap the dictionary and keep scanning that ? No need to allocate any memory. You're going to have to do a heck of a lot of scanning to find where the lines start and stop, and then run a regex on each one to see if it matches the definition of a word or not. I think that could ...
by jalih
Sat Jul 13, 2019 12:12 pm
Forum: General programming discussion
Topic: GUI Editor Code Challenge
Replies: 174
Views: 3507

Re: GUI Editor Code Challenge

@ ScriptBasic : Have you considered offering other similar Desktop Application coding challenges? That is the simple things (A simple Doodle/Paing program, Calculator, Alarm Clock, Simple games [MineSweeper, Tetris, Columbs, etc], etc). Here is a simple Tetris clone written in 8th programming langu...
by jalih
Fri Jul 12, 2019 7:46 pm
Forum: General programming discussion
Topic: GUI Editor Code Challenge
Replies: 174
Views: 3507

Re: GUI Editor Code Challenge

As we see here, even a simple GUI editor challenge is too much work for anyone to want to bother with. Problem with a simple GUI editor challenge is that, it is not a very addictive task. I started writing a simple editor in 8th programming language. You need to define a GUI using JSON format and w...
by jalih
Wed Jul 03, 2019 7:54 pm
Forum: Other programming languages
Topic: Searching for BASIC
Replies: 126
Views: 4376

Re: Searching for BASIC

To this day I have never actually seen an Archimedes for real, despite lusting for one back in the day, when I could not afford it :( I should probably send you one, just so you could play Tom Coopers DinoSaw... ;) I should still have piles of Acorn Archimedes and RiscPC stuff along with my heavily...
by jalih
Wed Jul 03, 2019 6:40 pm
Forum: Other programming languages
Topic: Searching for BASIC
Replies: 126
Views: 4376

Re: Searching for BASIC

Where do the 1sub and 2sub and 3sub variables come from? (total(trunc((1sub-1) /3) * 27 + mod(1sub-1, 3) * 3 + (2sub-1) * 9 + 3sub)); It's called iSUB defining, manual says: "A iSUB variable is a reference, in the subscript list for the base array, to the dimension of the defined array." A little e...
by jalih
Wed Jul 03, 2019 4:50 pm
Forum: Other programming languages
Topic: Searching for BASIC
Replies: 126
Views: 4376

Re: Searching for BASIC

I suspect these people claiming that xxx language can do everything C can do, have not kept up with recent C standards. And I suspect C++ with its five types of pointer is way ahead of all of them! How would you write something like following in C supporting recent standards? dcl (i, k) fixed bin(3...
by jalih
Wed Jul 03, 2019 3:24 pm
Forum: Other programming languages
Topic: Searching for BASIC
Replies: 126
Views: 4376

Re: Searching for BASIC

Anyone who finds * and & difficult to understand will not get far in programming. I can understand it but still think it's horrible syntax. I think PL/I syntax is much nicer to read. PL/I can do everything that C can do with it's pointers but accesing data where pointer points to via based variable...
by jalih
Wed Jul 03, 2019 3:00 pm
Forum: Other programming languages
Topic: SB-GFX
Replies: 26
Views: 822

Re: SB-GFX

Just for fun... I wrote your Fern example in 8th programming language: I got some tips for improving the code on 8th forums. I had totally missed addition of the "constant" word after version 19 of the 8th. It greatly improves readability of the code. Here is a little modified version of the Fern p...
by jalih
Sun Jun 30, 2019 3:49 pm
Forum: Other programming languages
Topic: SB-GFX
Replies: 26
Views: 822

Re: SB-GFX

ScriptBasic wrote:
Sun Jun 30, 2019 9:47 am
I'm curios what the effort would be to upgrade to SDL 2.x?
Very small or almost no effort.

Go to advanced search