ときどきの雑記帖'

I'd just be the catcher in the rye and all. I know it's crazy, but that's the only thing I'd really like to be. I know it's crazy.

The catcher in the rye
J. D. Salinger

著作権保護期間の70年延長に反対

検索エンジン経由でこられた方へ

このページの内容は日々更新されます。 そのため、検索エンジンに引っかかったものがここに残っているとは限りません。

最新エントリ (何日分あるかは不定)

2014年07月21日

■_

ふと優先席の中国語表記が「博愛席」というのに気がついた。 これ、どの鉄道会社でも同じなんだろうか?

これまでのパターンだと毎年7月に新刊が出てたんだけど5巻の気配がないなあ… 呉越春秋 湖底の城 宮城谷昌光||講談社BOOK倶楽部

■_

■_

2012年だけど、まだTcl/Tk で本が出ていたのにちょっと驚いた Tcl/Tk, 3rd Edition - O'Reilly Media

Tcl/Tk, 3rd Edition - O'Reilly Media

Tcl/Tk, 3rd Edition
A Developer's Guide
By Clif Flynt
Publisher: Elsevier / Morgan Kaufmann
Final Release Date: January 2012
Pages: 816
 
Newly updated with over 150 pages of material on the latest Tcl extensions, Tcl/Tk: A Developer’s Guide
is a unique practical tutorial for professional programmers and beginners alike. Starting with a clear
picture of the basics, Tcl/Tk covers the variety of tools in this "Swiss army knife" of
programming languages, giving you the ability to enhance your programs, extend your application's
capabilities, and become a more effective programmer.

This updated edition covers all of the new features of version 8.6, including object-oriented programming
and the creation of megawidgets, existing data structure implementations, themed widgets and virtual
events. Extensive code snippets and online tutorials in various languages will give you a firm grasp on
how to use the Tcl/Tk libraries and interpreters and, most importantly, on what constitutes an effective
strategy for using Tcl/Tk.


2014年07月20日

■_

「新セーラームーンはリアリティが無い」という暴論。あるいはSEEDとザブングルどっちがリアルか問題 - Togetterまとめ のコメントの 「10数mの人型ロボットの動力源がガソリンで操縦系統はハンドル操作。そんなロボットアニメが現実的なはずがない。」バーチャロンdisってんのか? ザブングルの操縦はほんとーに「ハンドル」(ステアリングホイール) なんだけど、 バーチャロンもそうなんだっけ? ま、ザブングルもメインメカ(のザブングル)以外は良く覚えてないんだけど。

■_

■_

■_

ちょっと面白そうなんで読む Battleship Rangefinders and Geometry | Hacker News Battleship Rangefinders and Geometry | Math Encounters Blog

■_

Civilization の作者とのやりとりが面白かった Gamasutra - The History of Civilization

Gamasutra - The History of Civilization

An Interview With Sid Meier

What was the first computer you ever used?

Sid Meier: Well, that would be in college, I guess. It was an IBM 360 mainframe. We would submit batch
jobs to the mainframe and learn how to do FORTRAN programming. That would have been in the early '70s.

What was the first personal computer you ever used?

Sid: The first personal computer I had was an Atari 800. 16K of memory.

Do you remember the first computer game you ever played?

Sid: An arcade "Pong" game would probably have been the first computer game.

Did you every play anything like Hunt the Wumpus on mainframes back in the day?

Sid: I'm trying to remember. I actually wrote games. I did a "Star Trek" space game, and I believe
a tic‑tac‑toe game. I was fooling around with games even when I was supposed to be doing real work, back in
the early mainframe days.

What was the first computer game you ever created for personal computers?

Sid: When I got my 800, probably the first game I wrote was very similar to Space Invaders. It had little
creatures coming down and you shot them from the bottom of the screen. It was written in assembly language.
I didn't have a disk drive, so I saved it on a cassette tape, and I had to hand‑assemble it in assembly language.

おっさんホイホイなワードがビシバシ出てますねw

2014年07月19日

■_

セルオートマトン面白いな。 Elementary Cellular Automaton -- from Wolfram MathWorld Cellular Automaton -- from Wolfram MathWorld コッドのセル・オートマトン - Wikipedia

■_

2014年07月18日

■_

ややこしい事案は延期されますた。

■_

■_

Bare-metal な環境で動く~というので気になってちょっと読んでみた organix/pijFORTHos

organix/pijFORTHos

Raspberry Pi JonesFORTH O/S

A bare-metal operating system for Raspberry Pi, based on Jonesforth-ARM.

Jonesforth-ARM is an ARM port, by M2IHP'13 class members listed in AUTHORS, of x86 JonesForth.

(略)

What is this ?

pijFORTHos is a bare-metal FORTH interpreter for the Raspberry Pi. It follows the general strategy given
by David Welch's excellent examples. A simple bootloader is built in, supporting XMODEM uploads of new
bare-metal kernel images.

以下略

ふむ。

ソースコードもちょっと。

「パラメータスタック」じゃなくて「データスタック」と呼んでるのか
pijFORTHos/jonesforth.s at master · organix/pijFORTHos

       .set JONES_VERSION,47

@ Reserve three special registers:
@ DSP (r13) points to the top of the data stack
@ RSP (r11) points to the top of the return stack
@ FIP (r10) points to the next FORTH word that will be executed
@ Note: r12 is often considered a "scratch" register

DSP .req r13
RSP .req r11
FIP .req r10

@ Define macros to push and pop from the data and return stacks

        .macro PUSHRSP reg
        str \reg, [RSP, #-4]!
        .endm

        .macro POPRSP reg
        ldr \reg, [RSP], #4
        .endm

        .macro PUSHDSP reg
        str \reg, [DSP, #-4]!
        .endm

        .macro POPDSP reg
        ldr \reg, [DSP], #4
        .endm

        .macro PUSH2 reg
        stmdb \reg!, {r0-r1} @ ( -- r1 r0 )
        .endm

        .macro POP2 reg
        ldmia \reg!, {r0-r1} @ ( r1 r0 -- )
        .endm

        .macro PUSH3 reg
        stmdb \reg!, {r0-r2} @ ( -- r2 r1 r0 )
        .endm

        .macro POP3 reg
        ldmia \reg!, {r0-r2} @ ( r2 r1 r0 -- )
        .endm

        .macro PUSH4 reg
        stmdb \reg!, {r0-r3} @ ( -- r3 r2 r1 r0 )
        .endm

        .macro POP4 reg
        ldmia \reg!, {r0-r3} @ ( r3 r2 r1 r0 -- )
        .endm

@ _NEXT is the assembly subroutine that is called
@ at the end of every FORTH word execution.
@ The NEXT macro is defined to simply call _NEXT
        .macro NEXT
        b _NEXT
        .endm

@ jonesforth is the entry point for the FORTH environment
        .text
        .align 2 @ alignment 2^n (2^2 = 4 byte alignment)
        .global jonesforth
jonesforth:
        ldr r0, =var_S0
        str DSP, [r0] @ Save the original stack position in S0
        ldr RSP, =return_stack_top @ Set the initial return stack position
        ldr r0, =data_segment @ Get the initial data segment address
        ldr r1, =var_HERE @ Initialize HERE to point at
        str r0, [r1] @ the beginning of data segment
        ldr FIP, =cold_start @ Make the FIP point to cold_start
        NEXT @ Start the interpreter

@ _DOCOL is the assembly subroutine that is called
@ at the start of every FORTH word execution, which:
@ 0. expects the CFA of a FORTH word in r0
@ 1. saves the old FIP on the return stack
@ 2. makes FIP point to the DFA (first codeword)
@ 3. uses _NEXT to start interpreting the word
_DOCOL:
        PUSHRSP FIP
        add FIP, r0, #4

@ _NEXT is the assembly subroutine that is called
@ at the end of every FORTH word execution, which:
@ 1. finds the CFA of the FORTH word to execute
@ by dereferencing the FIP
@ 2. increments FIP
@ 3. begins executing the routine pointed to
@ by the CFA, with the CFA in r0
_NEXT:
        ldr r0, [FIP], #4
        ldr r1, [r0]
        bx r1

@ cold_start is used to bootstrap the interpreter,
@ the first word executed is QUIT
        .section .rodata
cold_start:
        .int QUIT

やはりこの名前かw>「DOCOL」と「NEXT」 意外に短いコードな気がするけど 8080あたりが(ぴー)なだけか。


過去の雑記帖

  1. 2014年7月(下旬)
  2. 2014年7月(中旬)
  3. 2014年7月(上旬)
  4. 2014年6月(下旬)
  5. 2014年6月(中旬)
  6. 2014年6月(上旬)
  7. 2014年5月(下旬)
  8. 2014年5月(中旬)
  9. 2014年5月(上旬)
  10. 2014年4月(下旬)
  11. 2014年4月(中旬)
  12. 2014年4月(上旬)
  13. 2014年3月(下旬)
  14. 2014年3月(中旬)
  15. 2014年3月(上旬)
  16. 2014年2月(下旬)
  17. 2014年2月(中旬)
  18. 2014年2月(上旬)
  19. 2014年1月(下旬)
  20. 2014年1月(中旬)
  21. 2014年1月(上旬)
  1. 2013年
  2. 2012年
  3. 2011年
  4. 2010年
  5. 2009年
  6. 2008年
  7. 2007年
  8. さらに前
リンクはご自由にどうぞ。

メールの宛先はこちらkbk AT kt DOT rim DOT or DOT jp