Go to advanced search

by jalih
Tue Oct 08, 2019 5:09 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Liberation through Computer Literacy

Lenovo laptop [email protected]:~/sbrt/examples$ time ./fibo_fdi.py 4784969 > fibo_py.out real 0m11.388s user 0m11.374s sys 0m0.012s [email protected]:~/sbrt/examples$ ls -l fibo_py.out -rw-r--r-- 1 ubuntu ubuntu 1000001 Oct 8 01:10 fibo_py.out [email protected]:~/sbrt/examples$ Raspberry Pi 4B 4GB [email protected]:~/...
by jalih
Wed Sep 18, 2019 9:06 am
Forum: General programming discussion
Topic: Local App vs Web App
Replies: 20
Views: 1032

Re: Local App vs Web App

Heater wrote:
Wed Sep 18, 2019 8:36 am
When you use Electron you are not creating a web application. You are creating a desktop application that happens to use a rendering engine and other technologies used in the Chrome web browser together with node.js.
There are some security considerations when using Electron...
by jalih
Mon Sep 09, 2019 6:38 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Liberation through Computer Literacy

Since the goal of this thread is liberation through computer literacy, exploring a wide variety of programming languages is essential. Since programming languages are people too, it is important to remember that having equal abilities is not a prerequisite for equal respect. Yeah, why fight when yo...
by jalih
Tue Aug 06, 2019 12:38 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

rpdom wrote:
Tue Aug 06, 2019 10:58 am
ejolson wrote:
Tue Aug 06, 2019 8:48 am
Do you think the insane British anagram challenge could be done very easily in COBOL?
Not easily, but it could be done.
Simply use keyed data set instead of dictionary?
by jalih
Sat Aug 03, 2019 7:44 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

Heater, To me Rust seems like unnecessary complex language (and yes, I program in PL/I :D ). What features do you like about it the most? There is a comparison of V and other programming languages including Rust available here . There is simple example that fetches top Hacker News stories concurrent...
by jalih
Thu Aug 01, 2019 4:31 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

This shows that formatting is now correct, but all the two-letter anagrams are still missing. Without those two-letter words it's not clear the resulting anagram list is enough insane to prevent the deep-learning convolutional neural networks from taking over the world. What it shows is that I forg...
by jalih
Wed Jul 31, 2019 3:39 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

I modified my 8th anagram challenge program a little bit and got some speed improvement: \ Find anagrams in a word list: m:new constant anamap [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
by jalih
Tue Jul 30, 2019 3:40 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

It appears I'm not up to easily changing to code. Would you be able to post revised programs? This fixes the output: \ Find anagrams in a word list: m:new constant anamap [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
by jalih
Mon Jul 29, 2019 8:52 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

Getting more rusty... Once again I find regular output functions provided are slow, iostream in the case of C++, print! and println! in the case of rust. Swapping those prints for raw writing of bytes to stdio makes the Rust anagram finder solution the same speed and the C++. As closely as I can ti...
by jalih
Sun Jul 28, 2019 7:07 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

I modified 8th anagram program and replaced key sorting with prime hash resulting a nice speed boost Does the new 8-th code use big number arithmetic or integer arithmetic modulo 2^64 to compute the hash? 8th promotes number to big-int and to big-float if needed. I can just do the math and format r...
by jalih
Sun Jul 28, 2019 5:50 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

I modified 8th anagram program and replaced key sorting with prime hash resulting a nice speed boost: \ Find anagrams in a word list: m:new constant anamap [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101] constant primes : prime-hash \ s -- s 1 sw...
by jalih
Mon Jul 22, 2019 6:15 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

Here is a 8th version of the anagram challenge program using heap to sort keys: m:new var, anamap a:new var, anakeys ' n:cmp h:new constant strheap : s:sort \ s -- s s:len >r strheap swap ' h:push s:each! "" swap ( h:pop rot swap s:+ swap ) r> times drop ; : process-words \ word -- /^[a-z]+$/ r:matc...
by jalih
Mon Jul 22, 2019 10:05 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

Re: Project Digital Apocalypse Not Now

ejolson wrote:
Sun Jul 21, 2019 7:33 pm
I'm presently working on a version in classic line-numbered Basic that organizes all the anagrams into a heap data structure.
I got a version of s:sort word used to sort keys in my 8th program that uses heap from Ron Aaron (8th developer).
by jalih
Sun Jul 21, 2019 10:07 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: 303
Views: 11822

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

With edit/compile/test cycles easily taking 15 minutes you quickly learn to plan out your code rather than "designing at the keyboard" which seems to be popular these days. I must respectfully disagree with this. I have worked on big codebases which indeed took over 10 minutes to compile, When I wa...
by jalih
Sun Jul 21, 2019 9:57 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: 303
Views: 11822

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

static_assert( __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__, "The byte order must be little endian (use -mlittle-endian)" ); But can C do this: dcl little fixed bin(32) unsigned bigendian; dcl big fixed bin(32) unsigned littleendian; little, big = 255; put skip list("little endian:", unspec(little)); ...
by jalih
Sun Jul 21, 2019 6:58 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1206
Views: 58972

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: 303
Views: 11822

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: 303
Views: 11822

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: 303
Views: 11822

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: 303
Views: 11822

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: 303
Views: 11822

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: 303
Views: 11822

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: 303
Views: 11822

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: 303
Views: 11822

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: 303
Views: 11822

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...

Go to advanced search