Return
Styles:
Pseud0ch
,
Terminal
,
Valhalla
,
NES
,
Geocities
,
Blue Moon
.
Entire thread
Design Patterns
1
Name:
Anonymous
2011-04-21 16:07
Fuck em!
41
Name:
Anonymous
2011-04-22 23:24
>>39
Infix ops also require changes in lexer, so a+b would be treated as "a + b"
42
Name:
Anonymous
2011-04-22 23:58
>>41
If you're going that far, you may as well write your own reader.
43
Name:
Anonymous
2011-04-23 0:34
>>42
CL's reader supports reader macros.
44
Name:
Anonymous
2011-04-23 0:36
>>43
If all you're going to do is call your own reader in the reader macro, why not just use own reader?
45
Name:
Anonymous
2011-04-23 0:52
>>44
But I want to just discern `+` as a separate symbol!
46
Name:
!89o8tyI8Nk
2011-04-23 1:17
|NIGGER HUT|
47
Name:
Anonymous
2011-04-23 6:04
>>40
(define-syntax-rule (define-counter identifier-that-will-be-bound-to-the-counter)
(begin
(define-for-syntax count-variable-that-will-be-incremented-at-each-\`\`call\'\'-of-the-counter 0)
(define-syntax (identifier-that-will-be-bound-to-the-counter original-syntax-object)
(syntax-case original-syntax-object ()
((identifier-that-will-be-bound-to-the-counter new-value-for-the-counter)
(integer? (syntax->datum (syntax new-value-for-the-counter)))
(datum->syntax original-syntax-object (begin0 count-variable-that-will-be-incremented-at-each-\`\`call\'\'-of-the-counter (set! count-variable-that-will-be-incremented-at-each-\`\`call\'\'-of-the-counter (syntax->datum (syntax new-value-for-the-counter))))))
(rest-case-that-will-be-valid-only-if-it-is-called-as-an-identifier
(identifier? (syntax rest-case-that-will-be-valid-only-if-it-is-called-as-an-identifier))
(datum->syntax original-syntax-object (begin0 count-variable-that-will-be-incremented-at-each-\`\`call\'\'-of-the-counter (set! count-variable-that-will-be-incremented-at-each-\`\`call\'\'-of-the-counter (+ count-variable-that-will-be-incremented-at-each-\`\`call\'\'-of-the-counter 1)))))))))
Happy now?
Newer Posts
Don't change these.
Name:
Email:
Entire Thread
Thread List