SlideShare a Scribd company logo
.

.

What Does R7RS
Change Programming in Scheme?
Kazuhiro Hishinuma (Twitter: @kazh98)
Department of Computer Science, Meiji University
1-1-1 Higashimita, Tama-ku, Kawasaki-shi, Kanagawa, 214-8571 Japan

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. What is the Schemers’ Soul?

Snap out of it, Schemers!

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. What is the Schemers’ Soul?

Snap out of it, Schemers!
Scheme is the simplest,
the smallest, and
the most powerful language!
K. Hishinuma

What Does R7RS Change Programming in Scheme?
. What is the Programmers’ Utopia?

And..., join us,
all lispers and programmers!

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. What is the Programmers’ Utopia?

And..., join us,
all lispers and programmers!
Now, the most ideal language
is going to be born!
K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Congratulation!

1

http://lists.scheme-reports.org/pipermail/
scheme-reports/2013-November/003832.html
K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Congratulation!

R7RS-small draft
ratified by Steering Committee!! 1

1

http://lists.scheme-reports.org/pipermail/
scheme-reports/2013-November/003832.html
K. Hishinuma

What Does R7RS Change Programming in Scheme?
R7RS says ...
.

“Scheme demonstrates that

K. Hishinuma

What Does R7RS Change Programming in Scheme?
R7RS says ...
.

“Scheme demonstrates that
a very small number of rules
for forming expressions,

K. Hishinuma

What Does R7RS Change Programming in Scheme?
R7RS says ...
.

“Scheme demonstrates that
a very small number of rules
for forming expressions, with no restrictions

K. Hishinuma

What Does R7RS Change Programming in Scheme?
R7RS says ...
.

“Scheme demonstrates that
a very small number of rules
for forming expressions, with no restrictions
on how they are composed.”

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. So, today.

Let us think what is
The Genuine Programming
In R7RS Scheme.

K. Hishinuma

What Does R7RS Change Programming in Scheme?
Three Hot Changes1
.

Record-type (cf. pp.27–)
Library System (cf. pp.28–)
Exceptions (cf. pp.54–)

1

from R5 RS
K. Hishinuma

What Does R7RS Change Programming in Scheme?
Three Hot Changes1
.

Record-type (cf. pp.27–)
Library System (cf. pp.28–)
Exceptions (cf. pp.54–)

1

from R5 RS
K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Record-type




(define-record-type name
(cname f1 f2 ...)
pred?
(f1 ref-f1 set-f1 !)
(f2 ref-f2 set-f2 !)
...)




name Name of the record to be defined
pred? Name of the predicatior for this record
f1 , f2 , ... Names of the fields of this record

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. e.g. CONS, CAR, CDR
Existing method:




(define (cons a b)
(lambda (s) (s a b)))
(define (car c)
(c (lambda (a b) a)))
(define (cdr c)
(c (lambda (a b) b)))




(define c (cons ’a ’b))
(car c) ;= ’a
(cdr c) ;= ’b

K. Hishinuma

(pair? c) ;= ?!
(set-car! c ’d)
(car c) ;= ?!

What Does R7RS Change Programming in Scheme?
. e.g. CONS, CAR, CDR
Proposed method:




(define-record-type pair
(cons a b)
pair?
(a car set-car!)
(b cdr set-cdr!))




(define c (cons ’a ’b))
(car c) ;= ’a
(cdr c) ;= ’b

K. Hishinuma

(pair? c) ;= #t
(set-car! c ’d)
(car c) ;= ’d

What Does R7RS Change Programming in Scheme?
. define-record-type give Scheme ...

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. define-record-type give Scheme ...

The seed of
Object-Oriented Programming!

K. Hishinuma

What Does R7RS Change Programming in Scheme?
Three Hot Changes1
.

Record-type (cf. pp.27–)
Library System (cf. pp.28–)
Exceptions (cf. pp.54–)

1

from R5 RS
K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Good news!

Notation for library system
is standardized!!

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. How to load SRFI-1

Gauche (use srfi-1)
Guile (srfi srfi-1)
Racket (require srfi/1)

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. How to load SRFI-1

Gauche (use srfi-1)
Guile (srfi srfi-1)
Racket (require srfi/1)
R7RS (import (srfi 1))

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. How to make a library




(define-library (name ...)
(export ep ...)
(import (scheme base) ...)
(begin
(define (p1 args ...)
...) ...))




name Name of the library
ep ... List of names to be exported

K. Hishinuma

What Does R7RS Change Programming in Scheme?
Three Hot Changes1
.

Record-type (cf. pp.27–)
Library System (cf. pp.28–)
Exceptions (cf. pp.54–)

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. What’s this?

SRFI-34 is included
in R7RS!

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. with-exception-handler

e.g.





(with-exception-handler
(lambda (e) Handler for Exception e)
(lambda () Procedure which may raise exception))






(error ”This is an error message.”)




K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Other Changes

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Other Changes

Case sensitivity is now the default in
symbols and character names.

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Other Changes

Case sensitivity is now the default in
symbols and character names.
Case-lambda (cf. pp.21–)

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. Other Changes

Case sensitivity is now the default in
symbols and character names.
Case-lambda (cf. pp.21–)
The call-with-current-continuation
procedure now has the synonym call/cc.

K. Hishinuma

What Does R7RS Change Programming in Scheme?
Think in Scheme,
write in Scheme,
and show your Scheme!
Thanks for your listening.

K. Hishinuma

What Does R7RS Change Programming in Scheme?
. References
[1] J. Cowan: R7RS-small draft ratified by Steering Committee.
The public mailing lists on lists.scheme-reports.org, 2013.
http://lists.scheme-reports.org/pipermail/
scheme-reports/2013-November/003832.html
[2] A. Shinn, J. Cowan, and A. Gleckler: Revised7 Report on the
Algorithmic Language Scheme. Steering Committee, Scheme
Working Groups, 2013. http://trac.sacrideo.us/wg/
[3] Y. Kurosaki, and K. Hishinuma: Meiji Scheme Shell improved by
MOL. Meiji Scheme Project, Mathematical Optimization
Laboratory, Meiji University. https://github.com/meshmol/mesh
[4] K. Sasagawa: Normal Scheme. Scheme, 2013.
http://homepage1.nifty.com/~skz/Scheme/normal.html

K. Hishinuma

What Does R7RS Change Programming in Scheme?

More Related Content

ODP
Implementing R7RS on R6RS Scheme
PDF
Virtual Machine for Regular Expressions
PDF
An evaluation of LLVM compiler for SVE with fairly complicated loops
PDF
Arm tools and roadmap for SVE compiler support
PDF
Compilation of COSMO for GPU using LLVM
PDF
Code gpu with cuda - CUDA introduction
PDF
Assembly language part I
PPTX
Dive into ROP - a quick introduction to Return Oriented Programming
Implementing R7RS on R6RS Scheme
Virtual Machine for Regular Expressions
An evaluation of LLVM compiler for SVE with fairly complicated loops
Arm tools and roadmap for SVE compiler support
Compilation of COSMO for GPU using LLVM
Code gpu with cuda - CUDA introduction
Assembly language part I
Dive into ROP - a quick introduction to Return Oriented Programming

What's hot (20)

PPTX
Winter training,Readymade Projects,Buy Projects,Corporate Training
PDF
Debug Line Issues After Relaxation.
PPT
PPTX
An introduction to ROP
PDF
Cray XT Porting, Scaling, and Optimization Best Practices
PDF
FPGAを用いた処理のロボット向けコンポーネントの設計生産性評価
PPTX
Return oriented programming (ROP)
PPTX
November 2014 HUG: Apache Pig 0.14
PDF
ROP 輕鬆談
PPTX
The Next Linux Superpower: eBPF Primer
PDF
Sacándole jugo a git
PPT
OpenMP
PDF
The Practice of Alluxio in Ctrip Bigdata Platform
PDF
Course lecture - An introduction to the Return Oriented Programming
PPTX
Multi-threading your way out
PDF
Garbage Collection
PDF
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
PDF
How it's made: C++ compilers (GCC)
PDF
Getting Started with Raspberry Pi - DCC 2013.1
PPTX
Understanding eBPF in a Hurry!
Winter training,Readymade Projects,Buy Projects,Corporate Training
Debug Line Issues After Relaxation.
An introduction to ROP
Cray XT Porting, Scaling, and Optimization Best Practices
FPGAを用いた処理のロボット向けコンポーネントの設計生産性評価
Return oriented programming (ROP)
November 2014 HUG: Apache Pig 0.14
ROP 輕鬆談
The Next Linux Superpower: eBPF Primer
Sacándole jugo a git
OpenMP
The Practice of Alluxio in Ctrip Bigdata Platform
Course lecture - An introduction to the Return Oriented Programming
Multi-threading your way out
Garbage Collection
自律移動ロボット向けハード・ソフト協調のためのコンポーネント設計支援ツール
How it's made: C++ compilers (GCC)
Getting Started with Raspberry Pi - DCC 2013.1
Understanding eBPF in a Hurry!
Ad

Similar to What Does R7RS Change Programming in Scheme? (20)

PDF
What's new in Apache SystemML - Declarative Machine Learning
PPT
Interm codegen
PDF
SystemML - Declarative Machine Learning
PPT
Introduction to Assembly Language
PPTX
LISP: назад в будущее, Микола Мозговий
PPTX
iii-ii cd nCompiler design UNIT-V-1.pptx
PDF
Fun never stops. introduction to haskell programming language
PPT
r,rstats,r language,r packages
PDF
AllBits presentation - Lower Level SW Security
PPT
Easy R
PDF
Survey of Program Transformation Technologies
PPTX
LISP: Introduction To Lisp
PPTX
LISP: Introduction to lisp
PPTX
07 140430-ipp-languages used in llvm during compilation
PPTX
A brief introduction to lisp language
PPT
R programming
PDF
Assembly language part I
PPT
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
PDF
Declarative Semantics Definition - Term Rewriting
PPTX
ISA.pptx
What's new in Apache SystemML - Declarative Machine Learning
Interm codegen
SystemML - Declarative Machine Learning
Introduction to Assembly Language
LISP: назад в будущее, Микола Мозговий
iii-ii cd nCompiler design UNIT-V-1.pptx
Fun never stops. introduction to haskell programming language
r,rstats,r language,r packages
AllBits presentation - Lower Level SW Security
Easy R
Survey of Program Transformation Technologies
LISP: Introduction To Lisp
LISP: Introduction to lisp
07 140430-ipp-languages used in llvm during compilation
A brief introduction to lisp language
R programming
Assembly language part I
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Declarative Semantics Definition - Term Rewriting
ISA.pptx
Ad

More from Kazuhiro Hishinuma (17)

PDF
Properties of a Convex Set in Linear Space
PDF
大学生活概論
PDF
床下からCommon Lisp
PDF
すべてをRacketに取り込もう! ~Racket FFI と Package システムの使い方~
PDF
不動点×不動点×不動点コンビネータ
PDF
最急降下法で制約つき最適化問題を解いてみた
PDF
再帰でつくる、計算の世界
PDF
Implementation of Counters in ScopedBASIC
PDF
Lisper は競プロを楽しめるか?
PDF
GaucheでCGIプログラミング
PDF
How to Implement a CPU Emulator in Scheme
PDF
明治大の活動2
PPTX
明治大の活動予告
PPTX
The Programming Language Scheme
PPTX
情報と職業プレゼン予告
KEY
#upcamp '12 Hack-a-thon Result
ODP
Scoped BASIC Presentation1
Properties of a Convex Set in Linear Space
大学生活概論
床下からCommon Lisp
すべてをRacketに取り込もう! ~Racket FFI と Package システムの使い方~
不動点×不動点×不動点コンビネータ
最急降下法で制約つき最適化問題を解いてみた
再帰でつくる、計算の世界
Implementation of Counters in ScopedBASIC
Lisper は競プロを楽しめるか?
GaucheでCGIプログラミング
How to Implement a CPU Emulator in Scheme
明治大の活動2
明治大の活動予告
The Programming Language Scheme
情報と職業プレゼン予告
#upcamp '12 Hack-a-thon Result
Scoped BASIC Presentation1

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Cloud computing and distributed systems.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MYSQL Presentation for SQL database connectivity
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Cloud computing and distributed systems.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
Programs and apps: productivity, graphics, security and other tools
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
The AUB Centre for AI in Media Proposal.docx

What Does R7RS Change Programming in Scheme?

  • 1. . . What Does R7RS Change Programming in Scheme? Kazuhiro Hishinuma (Twitter: @kazh98) Department of Computer Science, Meiji University 1-1-1 Higashimita, Tama-ku, Kawasaki-shi, Kanagawa, 214-8571 Japan K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 2. . What is the Schemers’ Soul? Snap out of it, Schemers! K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 3. . What is the Schemers’ Soul? Snap out of it, Schemers! Scheme is the simplest, the smallest, and the most powerful language! K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 4. . What is the Programmers’ Utopia? And..., join us, all lispers and programmers! K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 5. . What is the Programmers’ Utopia? And..., join us, all lispers and programmers! Now, the most ideal language is going to be born! K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 7. . Congratulation! R7RS-small draft ratified by Steering Committee!! 1 1 http://lists.scheme-reports.org/pipermail/ scheme-reports/2013-November/003832.html K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 8. R7RS says ... . “Scheme demonstrates that K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 9. R7RS says ... . “Scheme demonstrates that a very small number of rules for forming expressions, K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 10. R7RS says ... . “Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 11. R7RS says ... . “Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions on how they are composed.” K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 12. . So, today. Let us think what is The Genuine Programming In R7RS Scheme. K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 13. Three Hot Changes1 . Record-type (cf. pp.27–) Library System (cf. pp.28–) Exceptions (cf. pp.54–) 1 from R5 RS K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 14. Three Hot Changes1 . Record-type (cf. pp.27–) Library System (cf. pp.28–) Exceptions (cf. pp.54–) 1 from R5 RS K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 15. . Record-type (define-record-type name (cname f1 f2 ...) pred? (f1 ref-f1 set-f1 !) (f2 ref-f2 set-f2 !) ...) name Name of the record to be defined pred? Name of the predicatior for this record f1 , f2 , ... Names of the fields of this record K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 16. . e.g. CONS, CAR, CDR Existing method: (define (cons a b) (lambda (s) (s a b))) (define (car c) (c (lambda (a b) a))) (define (cdr c) (c (lambda (a b) b))) (define c (cons ’a ’b)) (car c) ;= ’a (cdr c) ;= ’b K. Hishinuma (pair? c) ;= ?! (set-car! c ’d) (car c) ;= ?! What Does R7RS Change Programming in Scheme?
  • 17. . e.g. CONS, CAR, CDR Proposed method: (define-record-type pair (cons a b) pair? (a car set-car!) (b cdr set-cdr!)) (define c (cons ’a ’b)) (car c) ;= ’a (cdr c) ;= ’b K. Hishinuma (pair? c) ;= #t (set-car! c ’d) (car c) ;= ’d What Does R7RS Change Programming in Scheme?
  • 18. . define-record-type give Scheme ... K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 19. . define-record-type give Scheme ... The seed of Object-Oriented Programming! K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 20. Three Hot Changes1 . Record-type (cf. pp.27–) Library System (cf. pp.28–) Exceptions (cf. pp.54–) 1 from R5 RS K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 21. . Good news! Notation for library system is standardized!! K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 22. . How to load SRFI-1 Gauche (use srfi-1) Guile (srfi srfi-1) Racket (require srfi/1) K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 23. . How to load SRFI-1 Gauche (use srfi-1) Guile (srfi srfi-1) Racket (require srfi/1) R7RS (import (srfi 1)) K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 24. . How to make a library (define-library (name ...) (export ep ...) (import (scheme base) ...) (begin (define (p1 args ...) ...) ...)) name Name of the library ep ... List of names to be exported K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 25. Three Hot Changes1 . Record-type (cf. pp.27–) Library System (cf. pp.28–) Exceptions (cf. pp.54–) K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 26. . What’s this? SRFI-34 is included in R7RS! K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 27. . with-exception-handler e.g. (with-exception-handler (lambda (e) Handler for Exception e) (lambda () Procedure which may raise exception)) (error ”This is an error message.”) K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 28. . Other Changes K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 29. . Other Changes Case sensitivity is now the default in symbols and character names. K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 30. . Other Changes Case sensitivity is now the default in symbols and character names. Case-lambda (cf. pp.21–) K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 31. . Other Changes Case sensitivity is now the default in symbols and character names. Case-lambda (cf. pp.21–) The call-with-current-continuation procedure now has the synonym call/cc. K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 32. Think in Scheme, write in Scheme, and show your Scheme! Thanks for your listening. K. Hishinuma What Does R7RS Change Programming in Scheme?
  • 33. . References [1] J. Cowan: R7RS-small draft ratified by Steering Committee. The public mailing lists on lists.scheme-reports.org, 2013. http://lists.scheme-reports.org/pipermail/ scheme-reports/2013-November/003832.html [2] A. Shinn, J. Cowan, and A. Gleckler: Revised7 Report on the Algorithmic Language Scheme. Steering Committee, Scheme Working Groups, 2013. http://trac.sacrideo.us/wg/ [3] Y. Kurosaki, and K. Hishinuma: Meiji Scheme Shell improved by MOL. Meiji Scheme Project, Mathematical Optimization Laboratory, Meiji University. https://github.com/meshmol/mesh [4] K. Sasagawa: Normal Scheme. Scheme, 2013. http://homepage1.nifty.com/~skz/Scheme/normal.html K. Hishinuma What Does R7RS Change Programming in Scheme?