Post Reply 
Top three calculators ?
04-06-2018, 11:59 AM (This post was last modified: 04-06-2018 12:00 PM by Maximilian Hohmann.)
Post: #61
RE: Top three calculators ?
(04-06-2018 10:51 AM)pier4r Wrote:  For me understandable means: if I expose an algorithm to a random person...

I would consider myself a random person in that respect (*), but I have so far failed to understand even a single program written in PPL. I don't know if I really can't uderstand it or if it is because I don't want to... because whenever I see anything like <<DUP ROT ... I instantly feel the urge to zap it away, just the way I would do with commercial breaks on TV or whenever a hip hop song is played on the radio.

(*) I was contracted for over a decade to rewrite/port/extend/adjust/debug legacy software used for making cars and aeroplanes, some of which dated back to the originis of CAD/CAM. Sometimes I had to think hard to understand what the code was supposed to do, but I never had the urge to just stand up and tear my contract and do something else instead.
Find all posts by this user
Quote this message in a reply
04-06-2018, 12:04 PM
Post: #62
RE: Top three calculators ?
Maximilian you assume something I didn't say.

I'm not saying that rpl is better. It is more that even if one has a language that can be readable, one can write hard to read code .

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
04-06-2018, 12:14 PM (This post was last modified: 04-06-2018 12:15 PM by Maximilian Hohmann.)
Post: #63
RE: Top three calculators ?
(04-06-2018 12:04 PM)pier4r Wrote:  It is more that even if one has a language that can be readable, one can write hard to read code .

In my experience it is almost impossible to write unreadable code in a language like FORTRAN. Of course, if you call all your variables VAR001 to VAR999 (real FORTRAN only knows 6 character uppercase designators for variables and functions/subroutines) and your subroutines SUB001 to SUB999 it can be a bit difficult to read... But most programmers don't do that and include the occasional comment. Not so in RPL on a machine like an HP-28C where there is hardly enough memory for the code so that there are ususlly no comments and varaible names are not telling one much either.

NB: I am still looking for a pocket calculator with a FORTRAN compiler... this will instantly become my all-time favorite.
Find all posts by this user
Quote this message in a reply
04-06-2018, 12:31 PM
Post: #64
RE: Top three calculators ?
(04-06-2018 12:14 PM)Maximilian Hohmann Wrote:  In my experience it is almost impossible to write unreadable code in a language like FORTRAN. Of course, if you call all your variables VAR001 to VAR999 (real FORTRAN only knows 6 character uppercase designators for variables and functions/subroutines) and your subroutines SUB001 to SUB999 it can be a bit difficult to read...

Exactly what I meant. And to my surprise, on calculators - maybe because they don't have a querty keyboard or they have a small screen - you get the equivalent of VARA, VARB, VARB, VARC, VARD that is as unreadable as VAR001 VAR002 VAR003 and so on.

But then on computers with a real keyboard one has no excuses. Writing unreadable variables & co is equivalent to write: myb I cld sv a cpl of lttr bcs I am lz.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
04-06-2018, 02:12 PM
Post: #65
RE: Top three calculators ?
Or somewhat worse (depending on the program): Hungarian Notation.
Find all posts by this user
Quote this message in a reply
04-06-2018, 04:20 PM
Post: #66
RE: Top three calculators ?
(04-06-2018 12:31 PM)pier4r Wrote:  myb I cld sv a cpl of lttr bcs I am lz.

Maybe I could save a couple of letters because I am lazy?

See, perfectly legible, it probably took you longer to write it than it to took me to decifer it :-) That's years of experience programming calculators in RPN and RPL :-)
Find all posts by this user
Quote this message in a reply
04-06-2018, 06:25 PM
Post: #67
RE: Top three calculators ?
(04-06-2018 12:14 PM)Maximilian Hohmann Wrote:  In my experience it is almost impossible to write unreadable code in a language like FORTRAN.

This tool will help with that...

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
04-06-2018, 06:52 PM
Post: #68
RE: Top three calculators ?
(04-06-2018 06:25 PM)rprosperi Wrote:  
(04-06-2018 12:14 PM)Maximilian Hohmann Wrote:  In my experience it is almost impossible to write unreadable code in a language like FORTRAN.

This tool will help with that...

You can find the most amazing examples of unreadable code. This is a basic interpreter written in C:

Code:

#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();default:p--;_ o;}}
#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
#define U(y,z)while(p=Q(s,y))*p++=z,*p=' '
#define N for(i=0;i<11*R;i++)m[i]&&
#define I "%d %s\n",i,m[i]
#define X ;break;case
#define _ return
#define R 999
typedef char*A;int*C,E[R],L[R],M[R],P[R],l,i,j;char B[R],F[2];A m[12*R],malloc
(),p,q,x,y,z,s,d,f,fopen();A Q(s,o)A s,o;{for(x=s;*x;x++){for(y=x,z=o;*z&&*y==
*z;y++)z++;if(z>o&&!*z)_ x;}_    0;}main(){m[11*R]="E";while(puts("Ok"),gets(B)
)switch(*B){X'R':C=E;l=1;for(i=0;i<R;P[i++]=0);while(l){while(!(s=m[l]))l++;if
(!Q(s,"\"")){U("<>",'#');U("<=",'$');U(">=",'!');}d=B;while(*F=*s){*s=='"'&&j
++;if(j&1||!Q(" \t",F))*d++=*s;s++;}*d--=j=0;if(B[1]!='=')switch(*B){X'E':l=-1
X'R':B[2]!='M'&&(l=*--C)X'I':B[1]=='N'?gets(p=B),P[*d]=S():(*(q=Q(B,"TH"))=0,p
=B+2,S()&&(p=q+4,l=S()-1))X'P':B[5]=='"'?*d=0,puts(B+6):(p=B+5,printf("%d\n",S
()))X'G':p=B+4,B[2]=='S'&&(*C++=l,p++),l=S()-1 X'F':*(q=Q(B,"TO"))=0;p=B+5;P[i
=B[3]]=S();p=q+2;M[i]=S();L[i]=l X'N':++P[*d]<=M[*d]&&(l=L[*d]);}else p=B+2,P[
*B]=S();l++;}X'L':N printf(I)X'N':N free(m[i]),m[i]=0    X'B':_ 0 t('S',5,"w",N
fprintf(f,I))t('O',4,"r",while(fgets(B,R,f))(*Q(B,"\n")=0,G()))X 0:default:G()
;}_ 0;}G(){l=atoi(B);m[l]&&free(m[l]);(p=Q(B," "))?strcpy(m[l]=malloc(strlen(p
)),p+1):(m[l]=0,0);}O(S,J,'=',==,'#',!=)O(J,K,'<',<,'>',>)O(K,V,'$',<=,'!',>=)
O(V,W,'+',+,'-',-)O(W,Y,'*',*,'/',/)Y(){int o;_*p=='-'?p++,-Y():*p>='0'&&*p<=
'9'?strtol(p,&p,0):*p=='('?p++,o=S(),p++,o:P[*p++];}
Find all posts by this user
Quote this message in a reply
04-06-2018, 08:11 PM
Post: #69
RE: Top three calculators ?
(04-06-2018 06:52 PM)Harald Wrote:  
(04-06-2018 06:25 PM)rprosperi Wrote:  This tool will help with that...

You can find the most amazing examples of unreadable code. This is a basic interpreter written in C:

Code:

#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();default:p--;_ o;}}
#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
#define U(y,z)while(p=Q(s,y))*p++=z,*p=' '
#define N for(i=0;i<11*R;i++)m[i]&&
#define I "%d %s\n",i,m[i]
#define X ;break;case
#define _ return
#define R 999
typedef char*A;int*C,E[R],L[R],M[R],P[R],l,i,j;char B[R],F[2];A m[12*R],malloc
(),p,q,x,y,z,s,d,f,fopen();A Q(s,o)A s,o;{for(x=s;*x;x++){for(y=x,z=o;*z&&*y==
*z;y++)z++;if(z>o&&!*z)_ x;}_    0;}main(){m[11*R]="E";while(puts("Ok"),gets(B)
)switch(*B){X'R':C=E;l=1;for(i=0;i<R;P[i++]=0);while(l){while(!(s=m[l]))l++;if
(!Q(s,"\"")){U("<>",'#');U("<=",'$');U(">=",'!');}d=B;while(*F=*s){*s=='"'&&j
++;if(j&1||!Q(" \t",F))*d++=*s;s++;}*d--=j=0;if(B[1]!='=')switch(*B){X'E':l=-1
X'R':B[2]!='M'&&(l=*--C)X'I':B[1]=='N'?gets(p=B),P[*d]=S():(*(q=Q(B,"TH"))=0,p
=B+2,S()&&(p=q+4,l=S()-1))X'P':B[5]=='"'?*d=0,puts(B+6):(p=B+5,printf("%d\n",S
()))X'G':p=B+4,B[2]=='S'&&(*C++=l,p++),l=S()-1 X'F':*(q=Q(B,"TO"))=0;p=B+5;P[i
=B[3]]=S();p=q+2;M[i]=S();L[i]=l X'N':++P[*d]<=M[*d]&&(l=L[*d]);}else p=B+2,P[
*B]=S();l++;}X'L':N printf(I)X'N':N free(m[i]),m[i]=0    X'B':_ 0 t('S',5,"w",N
fprintf(f,I))t('O',4,"r",while(fgets(B,R,f))(*Q(B,"\n")=0,G()))X 0:default:G()
;}_ 0;}G(){l=atoi(B);m[l]&&free(m[l]);(p=Q(B," "))?strcpy(m[l]=malloc(strlen(p
)),p+1):(m[l]=0,0);}O(S,J,'=',==,'#',!=)O(J,K,'<',<,'>',>)O(K,V,'$',<=,'!',>=)
O(V,W,'+',+,'-',-)O(W,Y,'*',*,'/',/)Y(){int o;_*p=='-'?p++,-Y():*p>='0'&&*p<=
'9'?strtol(p,&p,0):*p=='('?p++,o=S(),p++,o:P[*p++];}

There used to be a contest in which the winner took a simple algorithm and created the biggest mess out of it (it still had to run and give correct output, of course) I think it was called the Great Obfuscation Award or something like that. The winners' code was amazing to behold!

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
04-06-2018, 08:30 PM
Post: #70
RE: Top three calculators ?
(04-06-2018 06:52 PM)Harald Wrote:  
(04-06-2018 06:25 PM)rprosperi Wrote:  This tool will help with that...

You can find the most amazing examples of unreadable code. This is a basic interpreter written in C:

Code:

#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();default:p--;_ o;}}
#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
#define U(y,z)while(p=Q(s,y))*p++=z,*p=' '
#define N for(i=0;i<11*R;i++)m[i]&&
#define I "%d %s\n",i,m[i]
#define X ;break;case
#define _ return
#define R 999
typedef char*A;int*C,E[R],L[R],M[R],P[R],l,i,j;char B[R],F[2];A m[12*R],malloc
(),p,q,x,y,z,s,d,f,fopen();A Q(s,o)A s,o;{for(x=s;*x;x++){for(y=x,z=o;*z&&*y==
*z;y++)z++;if(z>o&&!*z)_ x;}_    0;}main(){m[11*R]="E";while(puts("Ok"),gets(B)
)switch(*B){X'R':C=E;l=1;for(i=0;i<R;P[i++]=0);while(l){while(!(s=m[l]))l++;if
(!Q(s,"\"")){U("<>",'#');U("<=",'$');U(">=",'!');}d=B;while(*F=*s){*s=='"'&&j
++;if(j&1||!Q(" \t",F))*d++=*s;s++;}*d--=j=0;if(B[1]!='=')switch(*B){X'E':l=-1
X'R':B[2]!='M'&&(l=*--C)X'I':B[1]=='N'?gets(p=B),P[*d]=S():(*(q=Q(B,"TH"))=0,p
=B+2,S()&&(p=q+4,l=S()-1))X'P':B[5]=='"'?*d=0,puts(B+6):(p=B+5,printf("%d\n",S
()))X'G':p=B+4,B[2]=='S'&&(*C++=l,p++),l=S()-1 X'F':*(q=Q(B,"TO"))=0;p=B+5;P[i
=B[3]]=S();p=q+2;M[i]=S();L[i]=l X'N':++P[*d]<=M[*d]&&(l=L[*d]);}else p=B+2,P[
*B]=S();l++;}X'L':N printf(I)X'N':N free(m[i]),m[i]=0    X'B':_ 0 t('S',5,"w",N
fprintf(f,I))t('O',4,"r",while(fgets(B,R,f))(*Q(B,"\n")=0,G()))X 0:default:G()
;}_ 0;}G(){l=atoi(B);m[l]&&free(m[l]);(p=Q(B," "))?strcpy(m[l]=malloc(strlen(p
)),p+1):(m[l]=0,0);}O(S,J,'=',==,'#',!=)O(J,K,'<',<,'>',>)O(K,V,'$',<=,'!',>=)
O(V,W,'+',+,'-',-)O(W,Y,'*',*,'/',/)Y(){int o;_*p=='-'?p++,-Y():*p>='0'&&*p<=
'9'?strtol(p,&p,0):*p=='('?p++,o=S(),p++,o:P[*p++];}

Does'nt compile..

Esben
15C CE, 28s, 35s, 49G+, 50G, Prime G2 HW D, SwissMicros DM32, DM42, DM42n, WP43 Pilot
Elektronika MK-52 & MK-61
Find all posts by this user
Quote this message in a reply
04-06-2018, 09:51 PM (This post was last modified: 04-06-2018 10:29 PM by rprosperi.)
Post: #71
RE: Top three calculators ?
(04-06-2018 08:30 PM)DA74254 Wrote:  [quote='Harald' pid='94772' dateline='1523040771']

You can find the most amazing examples of unreadable code. This is a basic interpreter written in C:

[Code]
#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();defaultTongue--;_ o;}}
#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
...

Does'nt compile..

I suspect it was written as a joke; look at the name of the top define and it's arguments... "Obfuscated C...." which was the beginning of the name of the contest Tom was referring to.

Unexpectedly, the code for these contests taught a lot about using subtle and under-appreciated aspects of C (or Fortran, etc.).

If someone were to propose an "Obfuscated RPL Program Contest" I wonder if casual readers could even recognize what the goal was by just looking at the programs?

edit: typo

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
04-06-2018, 10:15 PM
Post: #72
RE: Top three calculators ?
(04-06-2018 09:51 PM)rprosperi Wrote:  
(04-06-2018 08:30 PM)DA74254 Wrote:  [quote='Harald' pid='94772' dateline='1523040771']

You can find the most amazing examples of unreadable code. This is a basic interpreter written in C:

[Code]
#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();defaultTongue--;_ o;}}
#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
...

Does'nt compile..

I suspect it was written as a joke; look at the name of the top define and it's arguments... "Obfuscated C...." which was the beginning of the name of the contest Tom was referring to.

Unexpectedly, the code for these contents taught a lot about using subtle and under-appreciated aspects of C (or Fortran, etc.).

If someone were to propose an "Obfuscated RPL Program Contest" I wonder if casual readers could even recognize what the goal was by just looking at the programs?

It should compile. You probably need some more info. There is a make file provide as well. Have a look here and search for dds.

Cheers,
Harald
Find all posts by this user
Quote this message in a reply
04-07-2018, 04:48 AM (This post was last modified: 11-20-2018 08:43 AM by brickviking.)
Post: #73
RE: Top three calculators ?
Typical. I leave the site for four days to write a script (in bash, no less) and what do I come back to? A quiz asking about the three most used calculators on my desk, which then meanders off into discussions about the Obfuscated C Contest, RPL-dislike, and Casios of all things. Yeesh.

Back on topic, my top three (@) calculators based on usage:
Quote:1=) HP50G: almost daily usage.
1=) Casio fx-82MS: almost daily usage for really quick calculations. (*)
3) fx-9750gII (upgraded to 9860's OS): previously fortnightly usage, but seeing far less use recently.
(*) funnily enough, the 82TL is literally sitting right underneath it, but that sees less use than the MS.

(@) Just to complete my 'collection',
4) fx-9750g+: predecessor of the 9750gII so it gets no usage (especially considering I accidentally erased its memory).
5) a very distant fifth, the Canon F804P: gets even less usage than the 9750g+.

Now for my meanderings.
My TL had an interesting life. I bought it a while ago, used it heavily until I got the fx-82MS, then handed the TL off to a friend for his Polytechnic studies. I used the MS for a while, the friend finished his studies, so I asked if he was still using the TL. He said no, and handed it back to me. Sigh. Now I have two 82-class calculators.

After that, it (the TL) got "solar"ised, i.e. I found a tiny little four-panel solar cell, sellotaped it to the top of the case, and ran some wires down into the battery slot through two cuts I made, making it into a 85TL with an AA battery. I'll never run out of battery power again, even considering these calculators are excellent on battery life already.

The HP 50G has been used each time I want to do a list of calculations, and currently contains my yearly grocery totals (and programs to process them) and some tutorial programs, a HP-41 emulator (thanks Chris, I'll get some cash to you for an upgrade later) and a calculator for digits of pi. It might not be as quick as a sped-up 9750gII, but it beats it hands down for customisability.

The 9750gII got an upgrade a while ago, so it behaves just like a 9860gII without a backlight. It also contains a grocery program I haven't yet RPL-ised, and a nice set of unit conversions and other useful functions I hardly ever use because it's generally outperformed by the 50G.

EDITS (July 2018): Solar cell got munted, finally, so I simply discarded it and went back to the normal 82TL behaviour. Swapped the TL out for the MS for occasional use, as a command history can be useful sometimes. (Nov 2018) Added all my other calculators, because I did use them at some time… Smile

(Post 195)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
04-08-2018, 12:55 AM (This post was last modified: 04-08-2018 01:15 PM by Archilog.)
Post: #74
RE: Top three calculators ?
And now, something completely different:

1. HP-15C LE

2. HP-41CX

3. Something completely different: some app on phone... or Psion.
Find all posts by this user
Quote this message in a reply
04-09-2018, 06:48 AM
Post: #75
RE: Top three calculators ?
Daily number crunching:
HP 16C next to 11C for everyday work, and a 41CV for heavier stuff.
Find all posts by this user
Quote this message in a reply
04-09-2018, 07:23 PM
Post: #76
RE: Top three calculators ?
(04-02-2018 04:07 PM)Michael de Estrada Wrote:  Omissis
1) DM42 - At the risk of being attacked for using a potentially illegal product, Omissis

Sorry Michael i have been away from this site for a while....I lost something?
Find all posts by this user
Quote this message in a reply
04-09-2018, 07:51 PM (This post was last modified: 04-09-2018 08:12 PM by Thomas Okken.)
Post: #77
RE: Top three calculators ?
(04-09-2018 07:23 PM)aurelio Wrote:  
(04-02-2018 04:07 PM)Michael de Estrada Wrote:  Omissis
1) DM42 - At the risk of being attacked for using a potentially illegal product, Omissis

Sorry Michael i have been away from this site for a while....I lost something?

Long and sometimes heated discussions about how DM42 isn't GPL-compliant.
I'd recommend starting with this thread: https://forum.swissmicros.com/viewtopic.php?f=15&t=1866

Back on topic:

My calculating needs are taken care of by Free42, and when that's not sufficient, I reach for the big guns of Wolfram Alpha or Mathematica. Or I write programs in C or Java.

On the rare occasions I do still reach for a physical calculator, I use my HP-42S the most, followed by my HP-67 and HP-25.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-09-2018, 09:39 PM
Post: #78
RE: Top three calculators ?
1st. Free42 on a €33 mobile phone (Blackview A7) with various retina-level skins, since they include gorgeous detail. Frequency of use: daily, mainly the solver.

2nd. HP50g + SolveSys library = the engineer's delight when you face a system of non-linear equations. Frequency of use: twice weekly.

3rd. HP48sx. Seldom; I have no need to use it, but it is just for the fun of it. It helps me remember the good ol' times.

Saludos Saluti Cordialement Cumprimentos MfG BR + + + + +
Luigi Vampa +
Free42 '<3' I + +
Find all posts by this user
Quote this message in a reply
04-09-2018, 09:57 PM
Post: #79
RE: Top three calculators ?
1. HP50G emulator on my PC with EMU48
2. physical HP50G
3. Emu50G app on my Ipod Touch

Jean-Charles
Find all posts by this user
Quote this message in a reply
04-10-2018, 06:35 PM
Post: #80
RE: Top three calculators ?
(04-09-2018 07:51 PM)Thomas Okken Wrote:  
(04-09-2018 07:23 PM)aurelio Wrote:  Sorry Michael i have been away from this site for a while....I lost something?

Long and sometimes heated discussions about how DM42 isn't GPL-compliant.
I'd recommend starting with this thread: https://forum.swissmicros.com/viewtopic.php?f=15&t=1866

Back on topic:

My calculating needs are taken care of by Free42, and when that's not sufficient, I reach for the big guns of Wolfram Alpha or Mathematica. Or I write programs in C or Java.

On the rare occasions I do still reach for a physical calculator, I use my HP-42S the most, followed by my HP-67 and HP-25.

Thank-you Thomas Smile
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 7 Guest(s)