osdclang on mobile devices

15
OSDcLang for mobile devices

Upload: jonathan-oxer

Post on 19-May-2015

1.812 views

Category:

Technology


1 download

DESCRIPTION

OSDcLang is a joke language I created (read: stole blatantly from BF) for an early OSDC, and it's become something of a meme with talks about it at every conference since. In this lightning talk I demonstrated the use of OSDcLang to communicate with the engine management system of my car.

TRANSCRIPT

Page 1: OSDcLang On Mobile Devices

OSDcLangfor mobile

devices

Page 2: OSDcLang On Mobile Devices

BeginnersLanguages

Page 3: OSDcLang On Mobile Devices

Low level,stack based?

Page 4: OSDcLang On Mobile Devices

Functional,loosely typed?

Page 5: OSDcLang On Mobile Devices

Object oriented,strictly typed?

Page 6: OSDcLang On Mobile Devices

Yes!

Page 7: OSDcLang On Mobile Devices

OSDcLangSimple syntax

Expressive

Page 8: OSDcLang On Mobile Devices

3 Syntax ElementsOSDc.OSDc?OSDc!

Page 9: OSDcLang On Mobile Devices

8 Commands * OSDc. OSDc? Move the Memory Pointer to the next array cell.

* OSDc? OSDc. Move the Memory Pointer to the previous array cell.

* OSDc. OSDc. Increment the array cell pointed at by the Memory Pointer.

* OSDc! OSDc! Decrement the array cell pointed at by the Memory Pointer.

* OSDc. OSDc! Read a character from STDIN and put its ASCII value into the cell at the Memory Pointer.

* OSDc! OSDc. Print the character with ASCII value of the cell pointed at by the Memory Pointer.

* OSDc! OSDc? Move to the command following the matching OSDc? OSDc! if the value in the cell pointed at by the Memory Pointer is zero. Note that OSDc! OSDc? and OSDc? OSDc! commands nest like pairs of parentheses, and matching pairs are defined in the same way as for parentheses.

* OSDc? OSDc! Move to the command following the matching OSDc! OSDc? if the value in the cell pointed at by the Memory Pointer is non-zero.

Page 10: OSDcLang On Mobile Devices

OSDcLang is Turing complete

Trivially isomorphic to BrainF**k

Page 11: OSDcLang On Mobile Devices

OSDc. OSDc? == >OSDc? OSDc. == <OSDc. OSDc. == +OSDc! OSDc! == ­OSDc. OSDc! == ,OSDc! OSDc. == .OSDc! OSDc? == [OSDc? OSDc! == ]

Page 12: OSDcLang On Mobile Devices

     > == OSDc. OSDc?< == OSDc? OSDc.+ == OSDc. OSDc.­ == OSDc! OSDc!, == OSDc. OSDc!. == OSDc! OSDc.[ == OSDc! OSDc?] == OSDc? OSDc!

Page 13: OSDcLang On Mobile Devices

So what does it look like?Very simple! Print “A”:

OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc.  OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc. OSDc.OSDc. OSDc.OSDc! OSDc.

Page 14: OSDcLang On Mobile Devices
Page 15: OSDcLang On Mobile Devices

OSDcLangNow on mobile, err, devices!