Arc (programming language): Difference between revisions

Content deleted Content added
m updated reference link from using http to https
Stylewiki (talk | contribs)
specify Arc has been ported to Common Lisp
 
(34 intermediate revisions by 26 users not shown)
Line 1:
{{Short description|Open-source programming language}}
'''Arc''' is a [[dialect (computing)|dialect]] of the [[Lisp programming language]] developed by [[Paul Graham (computer programmer)|Paul Graham]] and [[Robert Tappan Morris|Robert Morris]].
{{Distinguish|ARC Macro Language}}
{{Infobox programming language
| name = Arc
| logo = <!-- Filename only -->
| logo caption =
| screenshot = <!-- Filename only -->
| screenshot caption =
| paradigms = [[Multi-paradigm programming language|Multi-paradigm]]: [[Functional programming|functional]], [[Metaprogramming|meta]], [[Procedural programming|procedural]]
| family = [[Lisp (programming language)|Lisp]]
| designer = [[Paul Graham (programmer)|Paul Graham]]
| developers = Paul Graham, Robert Morris,<br />Arc [[Community of practice|community]]
| released = {{Start date and age|2008|01|29|df=yes}}
| latest release version = 3.2
| latest release date = {{Start date and age|2018|10|28|df=yes}}<ref>{{cite web |url=http://arclanguage.org/item?id=20772 |title=Arc Forum: Tell Arc: Arc 3.2 |website=Arclanguage.org |access-date=2018-11-07}}</ref>
| latest preview version =
| latest preview date = <!-- {{Start date and age|201Y|MM|DD|df=yes}} -->
| typing = [[Dynamic typing|Dynamic]]
| scope =
| programming language = [[Racket (programming language)|Racket]], [[Common Lisp (programming language)|Common Lisp]]
| platform = [[IA-32]], [[x86-64]]
| operating system = [[Linux]]
| license = [[Artistic License]] 2.0
| file ext = .arc
| file format = <!-- or: | file formats = -->
| website = {{URL|arclanguage.org}}
| implementations = Arc, Anarki, Arcadia, Rainbow
| dialects =
| influenced by = [[Lisp (programming language)|Lisp]], [[Scheme (programming language)|Scheme]]
| influenced =
}}
 
'''Arc''' is a [[dialectprogramming language]], a [[Dialect (computing)|dialect]] of the language [[Lisp (programming language)|Lisp]], developed by [[Paul Graham (computer programmer)|Paul Graham]] and [[Robert Tappan Morris|Robert Morris]]. It is [[free and open-source software]] released under the [[Artistic License]] 2.0.
== History==
In 2001, [[Paul Graham (computer programmer)|Paul Graham]] announced that he was working on a new [[dialect (computing)|dialect]] of [[Lisp (programming language)|Lisp]] named "Arc". Over the years since, he has written several essays describing features or goals of the language, and some internal projects at Y Combinator have been written in Arc, most notably the [[Hacker News]] web forum and news aggregator program. Arc itself is written in [[Racket (programming language)|Racket]].<ref>{{cite web |url= https://arclanguage.github.io/ |title= Arc Programming Language | publisher = GitHub}}</ref>
 
== History ==
In the essay ''Being Popular''<ref>{{cite web|url=http://www.paulgraham.com/popular.html|title=Being Popular | first = Paul | last = Graham}}</ref> Graham describes a few of his goals for the language. While many of the goals are very general ("Arc should be hackable," "there should be good [[Library (computing)|libraries]]"), he did give some specifics. For instance, he believes that it is important for a language to be terse:
In 2001, [[Paul Graham (computer programmer)|Paul Graham]] announced that he was working on a new [[dialectDialect (computing)|dialect]] of [[Lisp (programming language)|Lisp]] named "''Arc"''. Over the years since, he has written several essays describing features or goals of the language, and some internal projects at Graham's [[Startup company|startup]] [[business incubator]] named [[Y Combinator]] have been written in Arc, most notably the [[Hacker News]] web forum and news aggregator program. Arc itself is written in [[Racket (programming language)|Racket]].<ref>{{cite web |url= httpshttp://arclanguage.github.ioorg/install |title= Arc ProgrammingForum: Languageinstall |website=Arclanguage.org publisher |access-date= GitHub2018-11-07}}</ref>
{{Quote | It would not be far from the truth to say that a hacker about to write a program decides what language to use, at least subconsciously, based on the total number of characters he'll have to type. If this isn't precisely how hackers think, a language designer would do well to act as if it were.}}
 
==Motives==
He also stated that it is better for a language to only implement a small number of "axioms", even when that means the language may not have features that large organizations want, such as [[Object-oriented programming|object-orientation]] (OO). In fact, Graham feels that OO is not useful as its methods and patterns are just "good design", and he sees the language features used to implement OO as partially mistaken.<ref>{{cite web |url= http://www.paulgraham.com/noop.html |title=Why Arc Isn't Especially Object-Oriented | first = Paul | last = Graham | accessdate= 2013-01-23}}</ref><ref>{{cite web|url= http://www.paulgraham.com/arcfaq.html |title= Arc FAQ | first =Paul | last = Graham | accessdate=2013-01-23}}</ref> At Arc's introduction in 2008, Graham stated one of its benefits was its brevity.<ref>{{cite web|url= http://www.linux-magazine.com/Online/News/Arc-Makes-Programs-Shorter |title=Arc Makes Programs Shorter | newspaper = Linux magazine}}</ref>
In the essay ''Being Popular''<ref>{{cite web |url=http://www.paulgraham.com/popular.html |title=Being Popular |last=Graham |first = Paul |date=May last2001 |website=PaulGraham.com Graham|access-date=2018-12-05}}</ref> Graham describes a few of his goals for the language. While many of the goals are very general ("Arc should be hackable,", "there should be good [[Library (computing)|libraries]]"), he did give some specifics. For instanceexample, he believes that it is important for a language to be terse:
{{Quote | It would not be far from the truth to say that a hacker about to write a program decides what language to use, at least subconsciously, based on the total number of characters he'll have to type. If this isn't precisely how hackers think, a language designer would do well to act as if it were.}}
 
He also stated that it is better for a language to only implement a small number of "''axioms"'', even when that means the language may not have features that large organizations want, such as [[Object-oriented programming|object-orientation]] (OO). In factFurther, Graham feelsthinks that OO is not useful as its methods and [[Software design pattern|patterns]] are just "good design", and he seesviews the language features used to implement OO as partiallypartly mistaken.<ref>{{cite web |url= http://www.paulgraham.com/noop.html |title=Why Arc Isn't Especially Object-Oriented |last=Graham |first = Paul | last website= GrahamPaulGraham.com | accessdateaccess-date= 20132018-0112-2305}}</ref><ref>{{cite web |url= http://www.paulgraham.com/arcfaq.html |title= Arc FAQ |last=Graham |first =Paul | last website= GrahamPaulGraham.com | accessdateaccess-date=20132018-0112-2305}}</ref> At Arc's introduction in 2008, Graham stated one of its benefits was its brevity.<ref>{{cite webmagazine |urllast=Huber |first=Mathias |date=2008-02-08 |url=http://www.linux-magazine.com/Online/News/Arc-Makes-Programs-Shorter |title=Arc Makes Programs Shorter |magazine=Linux newspaperMagazine |___location=Lawrence, Kansas |publisher=Linux magazineNew Media USA |access-date=2018-11-25}}</ref>
A controversy among Lisp programmers is whether, and how much, the [[S-expression]]s of the language should be complemented by other forms of [[syntax]]. Graham feels that additional syntax should be used in situations where pure S-expressions would be overly verbose, saying, "I don't think we should be religiously opposed to introducing syntax into Lisp." Graham also feels that efficiency problems should be solved by giving the programmer a good [[profiling (computer programming)|profiler]].<ref>{{cite web|url=http://paulgraham.com/langdes.html |title=Five Questions About Language Design}}</ref>
 
A controversy among Lisp programmers is whether, and how much, the [[Ss-expression]]s of the language should be complemented by other forms of [[syntax]]. Graham feelsthinks that additionaladded syntax should be used in situations where pure Ss-expressions would be overly verbose, saying, "I don't think we should be religiously opposed to introducing syntax into Lisp." Graham also feelsthinks that efficiency problems should be solved by giving the programmer a good [[profilingProfiling (computer programming)|profiler]].<ref>{{cite web |url=http://www.paulgraham.com/langdes.html |title=Five Questions About Language Design |last=Graham |first=Paul |date=May 2001 |website=PaulGraham.com |access-date=2018-12-05}}</ref>
 
=== Reception ===
UponWhen its releasereleased in 2008, Arc generated mixed reactions, with some calling it simply an extension to Lisp or [[Scheme (programming language)|Scheme]] and not a programming language in its own right. Others applauded Arc for stripping Lisp down to bare essentials. Shortly after its release, Arc was ported to [[JavaScript]], asand well aswas being supported by ''Schemescript'', an [[integrated development environment]] (IDE) based on [[Eclipse (IDEsoftware)|Eclipse]].<ref>{{cite web | work = The Register |url= https://www.theregister.co.uk/2008/02/07/lisp_arc_challenge/ |title=Web datepioneer hits critics with Lisp gauntlet |website=The Register |date=2008-02-07 | place = [[United Kingdom|UK]] | title= Web pioneer hits critics with Lisp gauntlet}}</ref>
 
== Examples ==
[["Hello, World!" program|Hello world]] in Arc :
<sourcesyntaxhighlight lang="lisp">
(prn "Hello, World")
</syntaxhighlight>
</source>
 
A program used by Paul Graham toTo illustrate Arc's terseness.<ref>{{cite, web|url=Graham http://www.paulgraham.com/arcchallenge.htmluses |title=a Take the Arc Challenge | first = Paul | last = Graham}}</ref>brief program. It produces a form with one field at the url "/said". When the form is submitted, it leads to a page with a link that says "click here", which itselfthen leads to a page with the value of the original input field.<ref>{{cite web |url=http://www.paulgraham.com/arcchallenge.html |title=Take the Arc Challenge |last=Graham |first=Paul |date=February 2008 |website=PaulGraham.com |access-date=2018-12-05}}</ref>
<sourcesyntaxhighlight lang="lisp">
(defop said req
(aform [onlink "click here" (pr "you said: " (arg _ "foo"))]
(input "foo")
(submit)))
</syntaxhighlight>
</source>
 
==Versions==
 
===Official version===
The first publicly released version of Arc was made available on 29 January 2008,<ref>{{cite web |url= http://www.paulgraham.com/arc0.html |title=Arc's Out |last=Graham |first = Paul |date=29 lastJanuary 2008 |website=PaulGraham.com Graham|access-date=2018-12-05}}</ref> implemented on top of [[Racket (programming language)|Racket]] ("named PLT-Scheme" at that timethen). The release comes in the form of a [[Tar (computing)|.tar]] archive, containing the Racket [[source code]] for Arc. A tutorial<ref>{{Citationcite web |url=http://www.arclanguage.org/tut.txt |title = Arc | publisherTutorial |author=<!-- YUnstated. combinator--> | contributiondate=<!--url = http://ycombinatorUnstated.com/arc/tut.txt --> |website=Paul contributionGraham |access-date= Tutorial2018-12-05}}.</ref> and a discussion forum<ref>{{cite web |url= http://arclanguage.org/forum |title=Arc Forum |workwebsite= Arc language}}</ref> are also available. The forum uses the same program that [[Hacker News]] does, and is itself written in Arc.{{citation needed|date=June 2025}}
 
=== Unofficial versions ===
Due to thelack slowof developmentupdates ofin the official Arc branch, some members of the Arc [[Community of practice|community]] started unofficialtheir own repositories with unofficial emendationsmodifications, extensions, and libraries. One version, '''Anarki''',<ref>{{cite web |url= https://github.com/arclanguage/anarki| work|title=Anarki |last= Arc languageRapp |first=Kenneth title(kennethrapp) |date=14 Anarki|November publisher2018 |website=GitHub |access-date=2018-12-05}}</ref> permitted<ref>{{cite web |url= http://arclanguage.org/item?id=17707| work =Arc Forum | title = Announcement: anarki is no longer world-committable |last=Agaram publisher|first=Kartik (akkartik) |date=27 May 2013 |website=Arc Forum |publisher=Arc language |access-date=2018-12-05}}</ref> anyone to submit changes to the project. Theand has a community- managed wiki.<ref>{{cite web |url= https://sites.google.com/site/arclanguagewiki |title= Arc Lang Wiki| publisher |author=<!-- GoogleUnstated. | work--> |date= Sites}}</ref>!-- isUnstated. a--> better|website=Sites source of information than the official site at this point.{{citation needed|access-date=December 20122018-12-05}}</ref>
 
'''Rainbow'''<ref>{{cite web |url=https://github.com/conanite/rainbow| work |title= ConaniteRainbow |last=Dalton title |first=Conan Rainbow(conanite) |date=12 publisherOctober =2010 |website=GitHub |access-date=2018-12-05}}</ref> is an implementation of Arc in [[Java (programming language)|Java]].
 
'''Arcadia'''<ref>{{cite web |url=https://github.com/kimtg/Arcadia |title=Arcadia work |last= KimtgKim |first=Taegyoon title(kimtg) |date=19 Arcadia|August publisher2018 |website= GitHub |access-date=2018-12-05}}</ref> is an implementation of Arc in [[C (programming language)|C]].
 
''Arc++''<ref>{{cite web |url=https://github.com/kimtg/Arcpp |title=Arcpp |last=Kim |first=Taegyoon (kimtg) |date=13 August 2023 |website=GitHub |access-date=2023-08-13}}</ref> is an implementation of Arc in [[C++]].
===Timeline===
 
===Timeline of LISP Dialects===
{{Lisp}}
 
==References==
{{reflist Reflist|64em}}
 
==External links==
* {{Official website|http://arclanguage.org}}
* [httpshttp://www.arclanguage.githuborg/tut.iotxt Arc] at [[GitHub]Tutorial]
*{{GitHub|arclanguage/anarki|Anarki}}
* [http://ycombinator.com/arc/tut.txt Tutorial]
 
{{Lisp programming language}}
 
[[Category:Dynamically typed programming languages]]