User talk:IanOsgood

From Rosetta Code
Revision as of 18:57, 27 November 2007 by MikeMol (talk | contribs) (→‎Forth: Neat.! And...er...about the JavaScript version? :-))

Your user page looks corrupted to me. Can you see it/edit it fine? --Short Circuit 00:13, 13 October 2007 (MDT)

N/m. Fixed the problem; The page cache got corrupted somehow. --Short Circuit 01:30, 13 October 2007 (MDT)
Thought I'd fixed it, anyway. I can make changes to this talk page, but I can't see them. Not sure what's going on yet. --Short Circuit 01:32, 13 October 2007 (MDT)
No idea: it all looks good to me. --IanOsgood 09:53, 13 October 2007 (MDT)

By the way, have you seen Help:Similar Sites? --Short Circuit 01:30, 13 October 2007 (MDT)

Yeah, it is already linked from my page, and I've added a few more links to it. :) --IanOsgood 09:53, 13 October 2007 (MDT)

User spam

The reason you're seeing user spam is because, in order to present captchas to all anonymous editors without also presenting captchas to all logged-in editors, I needed to remove the captchas for all logged-in users. What you're seeing are bots that have, up until now, been blocked by the URL captcha trigger. Since the logged-in users no longer get captchas when they post URLs, logged-in bots are posting their linkspam. When the username looks random like that, it's probably autogenerated; Don't feel bad about blocking for six months or more. And please set the option for automatically blocking subsequent login IPs. --Short Circuit 21:35, 17 October 2007 (MDT)

Yes, that option is checked by default. --IanOsgood 23:16, 17 October 2007 (MDT)
Great. The nice thing is, the more times the bots try to log in using a banned account, the more bad IPs get blocked. (I'm fairly sure most of the bad IPs are from Tor nodes.) --Short Circuit 23:20, 17 October 2007 (MDT)

Forth

Would you be interested in writing a Forth implementation of RCBF? Mwn3d is working on a Java version. I'm hoping someone writes a version in Lisp or Haskell. --Short Circuit 20:11, 26 November 2007 (MST)

There are already plenty of brainfuck interpreters in the world. If I were to do one, I'd do it in JavaScript so folks could run in their browser. I've already done this for a number of other obscure languages.
If I did do BF for Forth, I would use meta-compilation, directly compiling BF into one big Forth definition. --IanOsgood 10:32, 27 November 2007 (MST)
OK, that was easier than I thought. --IanOsgood 11:46, 27 November 2007 (MST)
\ brainfuck compiler

1024 constant size
: init  ( -- p *p ) here size erase  here 0 ;
: right ( p *p -- p+1 *p ) over c!  1+  dup c@ ;
: left  ( p *p -- p-1 *p ) over c!  1-  dup c@ ;		\ range check?

: compile-bf-char ( c -- )
  case
  [char] [ of postpone begin
              postpone dup
              postpone while  endof
  [char] ] of postpone repeat endof
  [char] + of postpone 1+     endof
  [char] - of postpone 1-     endof
  [char] > of postpone right  endof
  [char] < of postpone left   endof
  [char] , of postpone key    endof
  [char] . of postpone dup
              postpone emit   endof
    \ ignore all other characters
  endcase ;

: :bf" ( name bfcode" -- )
  :
  [char] " parse    \ "
  postpone init
  bounds do i c@ compile-bf-char loop
  postpone 2drop
  postpone ;
;

Testing in GNU Forth:

:bf" test [,->+<.]"
see test
: test  
  init 
  BEGIN  dup 
  WHILE  key 1- right 1+ left dup emit 
  REPEAT 
  2drop ;
That's pretty cool. Mind if it's copied over to RCBF (Forth)? I'd still be interested in that Javascript version; Having on-site or at least in-browser environments for languages is something I've been looking into. --Short Circuit 11:57, 27 November 2007 (MST)