log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
- South-West Show 2024 talks (News:4)
- February 2024 News Summary (News:1)
- Next developer fireside chat (News:)
- DDE31d released (News:)
- South-West Show 2024 Report (News:)
- South-West Show 2024 in pictures (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Obscure programming language question
 
  Obscure programming language question
  monkeyson2 (16:07 13/11/2007)
  Phlamethrower (16:11 13/11/2007)
    alban (18:08 9/12/2007)
      glavallin (15:13 25/2/2013)
        MEmerton (09:50 28/2/2013)
  Stoppers (07:51 15/11/2007)
  Loris (14:22 19/11/2007)
  nunfetishist (20:29 20/11/2007)
    VincceH (21:21 20/11/2007)
      nunfetishist (15:49 21/11/2007)
        Loris (10:26 5/12/2007)
 
Phil Mellor Message #105246, posted by monkeyson2 at 16:07, 13/11/2007
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
I'm sure I remember reading about an odd feature of some programming language where you could write:

3 = x;

The constant 3 would be redefined as the current value of x.

Has anyone else heard of this or am I going nuts?
  ^[ Log in to reply ]
 
Jeffrey Lee Message #105248, posted by Phlamethrower at 16:11, 13/11/2007, in reply to message #105246
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
I think FORTH has an odd system like that where you can redefine stuff to be almost anything. But I can't be bothered checking while I'm at work tongue
  ^[ Log in to reply ]
 
Simon Willcocks Message #105274, posted by Stoppers at 07:51, 15/11/2007, in reply to message #105246
Member
Posts: 302
Another possibility would be smalltalk, where everything is an object, even classes. I've never used it, though, so there's a very good chance I'm wrong!
  ^[ Log in to reply ]
 
Tony Haines Message #105325, posted by Loris at 14:22, 19/11/2007, in reply to message #105246
madbanHa ha, me mine, mwahahahaha
Posts: 1025
How would that work?

PI=3 smile


X=2.5
3=X
2=4*3
Y=1+1
PRINT Y {reports 10?)

how would that apply to digits?
2=1
3=1
4=1
5=1
6=1
7=1
...
PRINT 234 {111?}


or how about
1=2
2=3
3=4
4=5
PRINT 1 {5, presumably?)
  ^[ Log in to reply ]
 
Rob Kendrick Message #105354, posted by nunfetishist at 20:29, 20/11/2007, in reply to message #105246
nunfetishist
Today's phish is trout a la creme.

Posts: 522
Some instances of FORTRAN allow you to do this. (Specifically, ones that aren't compiled.)

C, alas, forbids such excitement as #define 4 5
  ^[ Log in to reply ]
 
VinceH Message #105355, posted by VincceH at 21:21, 20/11/2007, in reply to message #105354
VincceH
Lowering the tone since the dawn of time

Posts: 1600
C, alas, forbids such excitement as #define 4 5
Personally, I think what C does isn't forbid such excitement, but forbids such excrement. I can honestly see no sensible use for such things except as a method of obfuscation, and a route to code which is difficult to maintain.
  ^[ Log in to reply ]
 
Rob Kendrick Message #105369, posted by nunfetishist at 15:49, 21/11/2007, in reply to message #105355
nunfetishist
Today's phish is trout a la creme.

Posts: 522
What other purpose might it have? smile
  ^[ Log in to reply ]
 
Tony Haines Message #105568, posted by Loris at 10:26, 5/12/2007, in reply to message #105369
madbanHa ha, me mine, mwahahahaha
Posts: 1025
What other purpose might it have? smile
Make it easier to compute a circumference? wink

Some sort of high-speed exception/interrupt handling?
  ^[ Log in to reply ]
 
alban Message #105608, posted by alban at 18:08, 9/12/2007, in reply to message #105248
Member
Posts: 2
You can certainly do this in WimpForth

: 3 6 ; ( redefine 3 as 6 )

3 2 + . 8 ok

I am not sure why you would want to do this though smile
  ^[ Log in to reply ]
 
Geoff Lavallin Message #121952, posted by glavallin at 15:13, 25/2/2013, in reply to message #105608
Member
Posts: 44
You can certainly do this in WimpForth

: 3 6 ; ( redefine 3 as 6 )

3 2 + . 8 ok

I am not sure why you would want to do this though smile
Looked for Iyonix version (2007) on
http://www.leginda.com but could not find it.
Is there an alternative address?
  ^[ Log in to reply ]
 
Michael Emerton Message #121955, posted by MEmerton at 09:50, 28/2/2013, in reply to message #121952
Member
Posts: 75
I would be very interested in this, as my Dad programmed in Forth for many years from BBC to Archimedies to A7000+

It always seemed an easy language, with odd quirks (if you could get the hang of reverse polish notation: http://en.wikipedia.org/wiki/Reverse_Polish_notation
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Obscure programming language question