Draft 23 (10-Dec-2002)

Total Page:16

File Type:pdf, Size:1020Kb

Draft 23 (10-Dec-2002) 1 Creating lightweight cross-platform Applications Viktor Pavlu 12-Dec-2002 2 3 I. REBOL LANGUAGE TUTORIAL................................................................................................................. 5 WHAT IS REBOL?.............................................................................................................................................. 6 CARL SASSENRATH ABOUT REBOL ...................................................................................................................7 VERSIONS............................................................................................................................................................ 8 RUNNING YOUR FIRST PROGRAM.............................................................................................................. 9 SETUP .................................................................................................................................................................9 GET THE USER GUIDE .........................................................................................................................................9 TRY THIS.............................................................................................................................................................9 REBOL BASICS................................................................................................................................................. 11 VALUES ............................................................................................................................................................11 Datatypes ....................................................................................................................................................11 WORDS .............................................................................................................................................................12 Types of Words............................................................................................................................................12 Unsetting a Word ........................................................................................................................................14 Protecting a Word .......................................................................................................................................15 BLOCKS ............................................................................................................................................................15 CONCLUSION ....................................................................................................................................................16 CONTROL STRUCTURES .............................................................................................................................. 17 WHAT IS TRUE?.................................................................................................................................................18 SIMPLE MATH ................................................................................................................................................. 19 Mathematical Words ...................................................................................................................................19 Comparison Functions ................................................................................................................................20 STRINGS............................................................................................................................................................. 20 SPECIAL CHARACTERS......................................................................................................................................20 EXERCISE PROGRAMS I ............................................................................................................................... 21 USEFUL FUNCTIONS..........................................................................................................................................21 WORKING WITH REBOL .............................................................................................................................. 22 INTERPRETER STARTUP.....................................................................................................................................22 INFORMATION PASSED TO SCRIPT .....................................................................................................................23 SERIES! .............................................................................................................................................................. 23 CREATING SERIES .............................................................................................................................................24 RETRIEVING ELEMENTS ....................................................................................................................................24 MODIFYING ELEMENTS.....................................................................................................................................25 TRAVERSING SERIES .........................................................................................................................................26 OTHER SERIES! FUNCTIONS ..............................................................................................................................27 FUNCTION! ....................................................................................................................................................... 28 INTERFACE SPECIFICATION BLOCK ...................................................................................................................28 Restricting Types.........................................................................................................................................29 Adding Documentation................................................................................................................................29 Refinements .................................................................................................................................................30 INTERACTION WITH THE OUTSIDE.....................................................................................................................31 Literal Arguments........................................................................................................................................31 Get Arguments.............................................................................................................................................31 Scope...........................................................................................................................................................32 Returning Values.........................................................................................................................................32 Function Attributes......................................................................................................................................33 ERRORS ............................................................................................................................................................33 Error Object................................................................................................................................................33 Generating Errors.......................................................................................................................................33 4 EXERCISE PROGRAMS II.............................................................................................................................. 34 TINY REFERENCE........................................................................................................................................... 35 Console I/O .................................................................................................................................................35 Files & Directories......................................................................................................................................35 Help & Debug .............................................................................................................................................35 Evaluation ...................................................................................................................................................35 Loops...........................................................................................................................................................35 Stopping evaluation.....................................................................................................................................35 Series...........................................................................................................................................................35 Strings .........................................................................................................................................................36 Misc.............................................................................................................................................................36 II. SELECTED REBOL CHAPTERS .............................................................................................................
Recommended publications
  • Design and Implementation of an Optionally-Typed Functional Programming Language
    Design and Implementation of an Optionally-Typed Functional Programming Language Shaobai Li Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report No. UCB/EECS-2017-215 http://www2.eecs.berkeley.edu/Pubs/TechRpts/2017/EECS-2017-215.html December 14, 2017 Copyright © 2017, by the author(s). All rights reserved. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission. Design and Implementation of an Optionally-Typed Functional Programming Language by Patrick S. Li A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Engineering { Electrical Engineering and Computer Sciences in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Koushik Sen, Chair Adjunct Professor Jonathan Bachrach Professor George Necula Professor Sara McMains Fall 2017 Design and Implementation of an Optionally-Typed Functional Programming Language Copyright 2017 by Patrick S. Li 1 Abstract Design and Implementation of an Optionally-Typed Functional Programming Language by Patrick S. Li Doctor of Philosophy in Engineering { Electrical Engineering and Computer Sciences University of California, Berkeley Professor Koushik Sen, Chair This thesis describes the motivation, design, and implementation of L.B. Stanza, an optionally- typed functional programming language aimed at helping programmers tackle the complexity of architecting large programs and increasing their productivity across the entire software development life cycle.
    [Show full text]
  • Introducing Myself…
    IntroducingIntroducing myselfmyself …… Nenad aka "DocKimbel" Rakocevic, Programming for 25 years: C/C++, *Basic, ASM, REBOL, web client -side languages, … Founder of a software company in Paris: Softinnov Author of several libraries for REBOL: MySQL, PostgresQL, LDAP native drivers UniServe: asynchronous, event -driven network engine Cheyenne Web Server: full -featured web application server CureCode: very fast web -based bug tracker (Mantis -like) Various others tools, game, demos … Was a happy Amiga user and registered BeOS developer WhyWhy amam II usingusing REBOLREBOL forfor 1111 years?years? Great scripting language Great prototyping tool Simple cross -platform graphic engine (View) Symbolic & Meta -programming Code / Data duality DSL -oriented Great designer behind: Carl Sassenrath WhyWhy II don'tdon't wantwant toto useuse REBOLREBOL anymore?anymore? Closed source Slow ( benchmark ) No multithreading support Mostly glue language, not general -purpose enough Not (easily) embeddable in third -party apps Can't run on popular VM (JVM, CLR) Sometimes designed for " Bob the artist ", rather than "John the programmer " WhatWhat isis thethe statestate ofof REBOLREBOL world?world? (1/2)(1/2) How REBOL began 14 years ago … WhatWhat isis thethe statestate ofof REBOLREBOL world?world? (2/2)(2/2) …and where it is today WhatWhat toto dodo then?then? Give up and pick up another language? Build an alternative? I chose the 2 nd option! MyMy answeranswer is:is: RReded !! Red[uced] REBOL dialect Fully open source (MIT/BSD) Statically compiled
    [Show full text]
  • Hi Quality Version Available on AMIGALAND.COMYOUR BONUS SECOND CD! Packed with Games, Anims, ^ 3D Models and M Ore
    ' A G A EXPERIENCE Hi Quality Version Available on AMIGALAND.COMYOUR BONUS SECOND CD! Packed with games, anims, ^ 3D models and m ore... P L U S n @ AMIGA • J U T D J t 'jJUhD'j'jSxni D W This commercial CD is packed with AGA games, 9771363006008 ^ demos, pictures, utilities, 3D models, music, animations and more 9 771363 006008 Please make checks to COSOFT or O (01702) 300441 n 300441 order by credit card / switch & delta Most titles are despatched same day. ^ ^ - 5 217 - 219 Hamstel Rd - Southend-on-Sea, ESSEX, SS2 4LB Vat is INCLUDED on all titles, e&oe q . ^ er [email protected] Give us your email for monthly feb Page: Hnp://www.pdsoft m updated catalogue reports. Office & Retail Outlet open Monday to Saturday 9:30 to 7pm - Tel (01702) 306060 & 306061 - Fax (01702) 300115 Please add 1.00 per title for UK P&P & 2.00 for oversea's Airmail - Order via email & get the most upto date prices. Check our Web pages (updated every day) for special ofers and new releases. Special offers running every day. JUNGLE STRIKE SPECIAL FEATURE (1 4 .ff CAPTIAL PUNISHMENT Only (24.99 688 ATTACK SUPER SIOMARKS LEGENDS LURE OF THE SUB (12 DATA DISK (S B * f 17.BB T.TRESS (12 SABRE TEAM PLAYER ON MANAGER 2 OOYSSEY 1199 RUGBY SYNDICATE ( 12.M EURO KICKOFF 3 Hi Quality Version Available on AMIGALAND.COMC7.BB INTER OFFICE UPNtl BLACK CRYPT M r ( I f f * Me (11.00 INTER SPREAD WORLD CUP M r ( 9 99 Inc SOCCER CM2 - (3.99 A ll - (3 99 IN TER WORD K240 (7.U M r u n w CHESS SYSTEM SCREEHBAT 4 Give us a ring if you do not see what you want ACTIVE STEREO Some titles are limited and will go out of stock quickly.
    [Show full text]
  • UC Berkeley UC Berkeley Electronic Theses and Dissertations
    UC Berkeley UC Berkeley Electronic Theses and Dissertations Title Design and Implementation of an Optionally-Typed Functional Programming Language Permalink https://escholarship.org/uc/item/99k5w2m0 Author Li, Patrick Shaobai Publication Date 2017 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California Design and Implementation of an Optionally-Typed Functional Programming Language by Patrick S. Li A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Engineering { Electrical Engineering and Computer Sciences in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Koushik Sen, Chair Adjunct Professor Jonathan Bachrach Professor George Necula Professor Sara McMains Fall 2017 Design and Implementation of an Optionally-Typed Functional Programming Language Copyright 2017 by Patrick S. Li 1 Abstract Design and Implementation of an Optionally-Typed Functional Programming Language by Patrick S. Li Doctor of Philosophy in Engineering { Electrical Engineering and Computer Sciences University of California, Berkeley Professor Koushik Sen, Chair This thesis describes the motivation, design, and implementation of L.B. Stanza, an optionally- typed functional programming language aimed at helping programmers tackle the complexity of architecting large programs and increasing their productivity across the entire software development life cycle. Its design objectives arose out of our own frustrations with writing software, and we built Stanza to be a practical general-purpose language that resolves the problems we encounter in our daily work. Stanza was designed to write programs of appreciable complexity; where development time is spent primarily on managing this complexity; and where better tools for managing complexity can significantly improve programmer productivity.
    [Show full text]
  • Computer Programming 1
    Computer programming 1 Computer Programming Copyright © Milo Except where noted, all text is copyright Milo. Unless otherwise specified, all materials in this book are owned by the original copyright holder. PDF version of October 2007 This PDF is version 0 from 14 October 2007. The intent of this free downloadable college text book is to attempt to directly help poor and middle class students with the high cost of college text books by providing a high quality free alternative that can be used in the classroom for a subject that most college students are required to take. This free downloadable book is based on and includes materials from http://www.OSdata.com . Materials from OSdata.com have already been used in more than 300 colleges and universities around the world and have been quoted in studies and policy decisions by the U.S. Navy and the government of the Federal Republic of Germany. This is still a work in progress. Feedback and constructive criticism appreciated (especially feedback from professors who might want to use the finished book). While this book is still being written, professors are free to use specific chapters (or portions of chapters) as class handouts to supplement existing for-profit text books. This same policy will continue to apply after the book is completed, but this policy offers usefulness for many classes right now today even though the book is still incomplete. Poor students should not feel bad about using this book for free. You are exactly who this book is intended to help. You may optionally do volunteer work for the charitable organization of your choice (not political or religious activity — actual work for a charitable organization helping the poor, the elderly, the sick, the disabled, or the environment, etc.).
    [Show full text]
  • Hi Quality Version Available on AMIGALAND.COM
    977136059601410 3|qB||BAB OS|B UO|S10fl qs|p -uojiipa 03 jjuaBes/w au jnoA >|sv tlAIOU-QO °N A A <tt Hi Quality Version Available on AMIGALAND.COM qqiK® *99* 919' Tel. 0116 246 3800 Fax. 0116 246 3801 [email protected] Weird Science Ltd., Q House, Troon Way Business Centre, Humberstone Lane, Leicester. LE4 2SE www.weirdscience.co.uk Foundation is a real-time strategy war gama which incorporates familiar pOCINDfiTION strategy elements with interesting new concepts Accomplished strategy game players will enjoy the enhanced control and complex resource management Beginners will enjoy the accessibility of the gamepfay when played In it's basic form and the depth f skill that Is attainable with experience. Forty game missions provided with more mission packs to be released soon. Custom games possible providing infinite landscapes with variable terrains and AGA. CyberGraphX and Picasso96 graphics modes are supported. Hundieds of speech and sound effects with an option to use AHI. The game can use large, wide or small graphics for different screens. U ses a database of 10 Million names and 1000 scanned faces Can be installed fully or partially to Hard Drive Fully multitasking and system friendly Amazing original music and custom made CD Audio tracks, The game supports many languages with free language packs. Free updates to bo released regularly to provide advanced features. TCP/IP support and optimizations are to be the first updates. COUNDfiTION Foundation roqui.aa a 2 Mag AGA aquippad Amiga (ag. A1200.) Tha gama h a t boon davalopad fo . 68030 baaad Amigas but an CbnqucM Gam: A1200 is enough to get the game running.
    [Show full text]
  • A History of the Amiga by Jeremy Reimer
    A history of the Amiga By Jeremy Reimer 1 part 1: Genesis 3 part 2: The birth of Amiga 13 part 3: The first prototype 19 part 4: Enter Commodore 27 part 5: Postlaunch blues 39 part 6: Stopping the bleeding 48 part 7: Game on! 60 Shadow of the 16-bit Beast 71 2 A history of the Amiga, part 1: Genesis By Jeremy Reimer Prologue: the last day April 24, 1994 The flag was flying at half-mast when Dave Haynie drove up to the headquarters of Commodore International for what would be the last time. Dave had worked for Commodore at its West Chester, Pennsylvania, headquarters for eleven years as a hardware engineer. His job was to work on advanced products, like the revolutionary AAA chipset that would have again made the Amiga computer the fastest and most powerful multimedia machine available. But AAA, like most of the projects underway at Commodore, had been canceled in a series of cost-cutting measures, the most recent of which had reduced the staff of over one thousand people at the factory to less than thirty. "Bringing your camera on the last day, eh Dave?" the receptionist asked in a resigned voice."Yeah, well, they can't yell at me for spreading secrets any more, can they?" he replied. Dave took his camera on a tour of the factory, his low voice echoing through the empty hallways. "I just thought about it this morning," he said, referring to his idea to film the last moments of the company for which he had given so much of his life.
    [Show full text]
  • What Can Perl Learn from Rebol ?
    What can Perl learn from Rebol ? No Rebol Course some hobby philosophy Perl Philosophy TIMTOWTDI simple and possible context sensitive Philosophy TIMTOWTDI simple and possible context sensitive Quote Take a dash of PERL, mix with the cross platform compatibilty of a Java, and make it extremely easy for beginners to start coding, and you get the general idea. A Hobby Philosopher „Real“ Philosopher Carl Sassenrath Carl Sassenrath - Apple, HP and Commodore Carl Sassenrath - Apple, HP and Commodore - Pantaray, American Multimedia, Videostream Carl Sassenrath - Apple, HP and Commodore - Pantaray, American Multimedia, Videostream - REBOL Technologies Carl Sassenrath - Amiga OS, IOS, VisCorp ED - CDTV - Amiga Logo, Next Gen. Forth, Rebol - Distribution - Browser Left Click : Start Rebol App Left Click : Start Rebol App Rebol App Rebol App Rebol App Rebol App - Browser Right Click : Get Meta Data Rebol Editor - Browser Rebol Shell Carl Sassenrath - Amiga OS, IOS, VisCorp ED - CDTV - Amiga Logo, Next Gen. Forth, Rebol Carl Sassenrath - Amiga OS, IOS, VisCorp ED - CDTV - Amiga Logo, Next Gen. Forth, Rebol ● Lisp, Forth, Logo and Self ● Lisp, Forth, Logo and Self ● Lightweight Distributed Computing ● Lisp, Forth, Logo and Self ● Lightweight Distributed Computing ● programming-in-the-small (PITS) PITS: ~ 800kB binary 1.8 MB for distribution Libs Tools Samples Docs Links PITS: Remote Editor: 53 Daytime Server Deamon: 61 bmp2png Converter TCP Port Scanner: 98 Simple Clock App: 106 Minimal Email Client: 130 Simple Picture Viewer: 132 PITS: Remote Editor:
    [Show full text]
  • 3 Signatures Parmi Les Employés De Commodore-Amiga Inc
    Signatures sur l'Amiga 1000 Page 1 sur 9 Chercher Vendredi 14 mars 2014 - 21:12 Translate Dossier : les signatures sur l'Amiga 1000 (Article écrit par David Brunet - mars 2011) Rubriques Des signatures légendaires · Accueil Ceux qui ont la chance d'avoir un des premiers Amiga 1000 doivent savoir la chose suivante : la coque plastique de cet · A Propos ordinateur dispose de 53 signatures parmi les employés de Commodore-Amiga Inc. ayant travaillé sur l'Amiga 1000. · Articles · Galeries En effet, le principal architecte de l'Amiga, Jay Miner, souhaitait ajouter une petite touche inédite à un ordinateur aux · Glossaire capacités elles aussi inédites. Ces signatures sont présentes dans les premiers modèles d'Amiga 1000, ceux avec la carte · Hit Parade mère de révision 6 (en NTSC) et A (sous deux variantes : PAL et NTSC). Ceux de la révision B, construits à partir de · Liens septembre 1986, n'en sont pas pourvus. L'acheteur n'était pas censé être au courant, d'où un effet de surprise lors du · Liste jeux Amiga premier démontage de la machine. · Quizz · Téléchargements Les signatures se trouvent à l'intérieur de la machine, sous le capot supérieur : · Trucs et astuces Articles · Actualité (récente) · Actualité (archive) · Comparatifs · Dossiers · Entrevues · Matériel (tests) · Matériel (bidouilles) · Points de vue · En pratique · Programmation · Reportages · Tests de jeux · Tests de logiciels · Tests de compilations · Articles divers · Articles in english · Articles in other languages Twitter Suivez-nous sur Twitter Liens Les signatures se trouvent là-dessous · Sites de téléchargements · Associations · Pages Personnelles · Moteurs de recherche · Pages de liens · Constructeurs matériels · Matériel · Autres sites de matériel · Réparateurs · Revendeurs · Presse et médias · Programmation · Développeurs logiciels · Logiciels · Développeurs de jeux · Jeux · Autres sites de jeux · Scène démo · Divers Si on compte le nombre de signatures, on en trouve 53 mais deux sont assez différentes des autres : Mitchie et Joe · Informatique générale Pillow.
    [Show full text]
  • Retrocomputer Magazine Atari ST520/ST1040: La Prova Hardware
    Jurassic News Atari ST520/ST1040: la prova hardware Commodore Club: Storia dell’Amiga Asymetrix ToolBook Emulare l’Olivetti P101 Cosenza Il linguaggio Insert Coin 2011 BASIC Il racconto: Lassù sulla montagna... Retrocomputing: prestidigitazione Retrocomputer Magazine Anno 7 - Numero 39 - Gennaio 2012 Collophon I dati editoriali della rivista Jurassic News Jurassic News Rivista aperiodica di Retrocomputer Jurassic News Coordinatore editoriale: Tullio Nicolussi [Tn] E’ una fanzine dedicata al retro- Redazione: computing nella più ampia accezione del [email protected] termine. Gli articoli trattano in generale dell’informatica a partire dai primi anni Hanno collaborato a questo numero: Besdelsec [Bs] ‘80 e si spingono fino ...all’altro ieri. Lorenzo [L2] La pubblicazione ha carattere Sonicher [Sn] puramente amatoriale e didattico, tutte Salvatore Macomer [Sm] Lorenzo Paolini [Lp] le informazioni sono tratte da materiale Giovanni [jb72] originale dell’epoca o raccolte su Internet. Antonio Tierno Felice Pescatore Normalmente il materiale originale, anche se “giurassico” in termini Diffusione: informatici, non è privo di restrizioni di La rivista viene diffusa in formato utilizzo, pertanto non sempre è possibile PDF via Internet agli utenti registrati sul sito: riportare per intero articoli, foto, schemi, listati, etc…, che non siano esplicitamente www.jurassicnews.com. liberi da diritti. La registrazione è gratuita e E’ possibile che parti del materiale anonima; si gradisce comunque pubblicato derivi da siti internet che non una registrazione nominativa. sono citati direttamente negli articoli. Contatti: Questo per la difficoltà di attribuzione del [email protected] materiale alla fonte originale; eventuali segnalazioni e relative notifiche sono Copyright: benvenute. I marchi citati sono di copyrights dei rispettivi proprietari.
    [Show full text]
  • Rebol a Programmer’S Guide
    Rebol A programmer’s guide Copyright 2008, Olivier Auverlot and Peter W A Wood First edition – December 2008 The programs in this book are intended to illustrate the topics under discussion. There is no guarantee given that they will function once compiled, assembled or interpreted in the context of professional or commercial use. By visiting the site at www.auverlot.fr you can • Talk with the authors • Download the example code • Look for updates and additions All rights reserved. Any reproduction, even partial, of the content, the cover or illustrations, by any means whatsoever (electronic, photocopier, tape or otherwise) is prohibited without written permission of the authors. Preface For many years the answer to the question “Which is the best book to learn Rebol?” has been Olivier Auverlot’s “Programmation Rebol”. As you probably guessed from the title, it’s written in French. Soon after it was published late in 2001, work started on a translation. It was even listed with a publication date on Amazon.com. Sadly, it has yet to see the light of day. At the beginning of 2007, Olivier published “Rebol - Guide du programmeur”. I hoped for news of a translation; but none came. It seemed that the only option was going to be to read the book in French. So why not translate the book myself? Translating “Rebol - Guide du programmeur” has been most enjoyable. Olivier’s writing is eloquent and informative. His command of Rebol shines through. I learned a lot whilst translating the book, some Rebol and some French. I hope you will too, though perhaps not so much French as me.
    [Show full text]
  • Numer 1/2011 (4) Cena 21 Zł
    cena cena 21 zł Numer 1/2011 (4) Numer 1/2011 Grafika: Konrad Czuba G9bX APELAPEL OO KonkursKonkurs nana artykułartykuł Redakcja PPA ogłasza konkurs na Na autora zwycięskiego artykułu czeka ARTYKUŁY!ARTYKUŁY! napisanie artykułu do Polskiego Pisma atrakcyjna nagroda. Może on wybrać Amigowego. Temat artykułu powinien jedną spośród trzech nagród: pasować do profilu pisma i powinien Drodzy Czytelnicy, ● oryginalny AmigaOS 4.1, być wstępnie uzgodniony z redakcją (np. e-mailowo na adres kontaktowy ● licencję na system MorphOS 2.x na Czekamy na Wasze artykuły, które [email protected]). Artykuł zgłoszony do wskazany komputer, zasilają bazę artykułów do kolej- konkursu nie może być krótką notką, ● scandoubler Indivision ECS. nych numerów. Przed nadesła- orientacyjne minimum to 10 000 zna- ków oraz ilustracje. Oprócz tego tradycyjnie każdy autor niem artykułu prosimy o skonsulto- artykułu zakwalifikowanego do druku wanie tematu z redakcją. Artykuły Redakcja zakwalifikuje zgłoszone arty- otrzyma bezpłatny (papierowy lub, na kuły, a następnie wybierze zwycięzcę. życzenie, elektroniczny) egzemplarz prosimy nadsyłać w postaci plików pisma. Termin nadsyłania artykułów tekstowych (ASCII) wraz z dołą- Zastrzegamy sobie prawo do wydruko- wania każdego ze zgłoszonych artyku- upływa 31 maja 2011 roku. czonymi obrazkami lub zdjęciami łów w Polskim Pismie Amigowym. (format PNG lub JPG). Propozycje Artykuł wybrany do druku nie może być Przy ocenie artykułów będziemy brali oraz sugestie należy nadsyłać na nigdzie opublikowany ani przed, ani rok pod uwagę atrakcyjność tematu, styl pisania, wnikliwe podejście do opisy- adres podany w stopce redak- po wydaniu go drukiem w PPA. Oczy- wiście zwycięski artykuł ma gwaran- wanych zagadnień, przygotowanie ilu- cyjnej. towany druk w naszym pismie. stracji.
    [Show full text]