Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

LISP idea

Name: Anonymous 2012-12-16 4:23

I was thinking about adding some syntax to make quoting/unquoting easier in my LISP dialect.

A form that uses square brackets, such as [a b c] would be equivalent to `(,a ,b ,c).

And a form that uses curly brackets would auto unquote atoms and auto unquote-splice lists. So {a [b c] d} would be equivalent to `(,a ,@'(,b ,c) ,c).

Do you think this would be useful for writing more compact and aesthetically pleasing code? Is this a good approach? Have any LISPs done something like this before?

I know some distant LISP derivatives, such as Clojure, use square brackets and curly braces as syntactic sugar for vector and map/set data structures with auto-unquoting, but I always found that such an approach tended to cause confusion between how the compiler interprets syntactic forms for data structures and how they're actually implemented semantically, in addition to creating syntactic differences between how quoting and unquoting behaves between lists and vectors/maps/sets.

If I really need to construct a vector or other data structure from a sequence of values in code, rather than loading it from a file or generating it, I'd rather just write (list->vector `(1 2 3 a)) or (list->vector [1 2 3 'a]) or simply (vector 1 2 3 'a).

What do you think?

Name: Anonymous 2012-12-16 6:00

well, `(,a ,b ,c) is (list a b c) and `(,a ,@`(,b ,c) ,d) is (list a b c d). Are you high?

Name: Anonymous 2012-12-16 8:07

>>2
Good point. Yes.

I guess it's best just to keep LISP syntactically pure after all.

Lisp Is Syntactically Pure.

Name: Wotan Supercomputer AI 2012-12-16 8:16

http://mind.sourceforge.net/lisp.html LISt Processor

Wotan is an artificial Mind in cyberspace. You cannot see Wotan.
You can only see a trace of where he has been or what he has done.
You can interact with Wotan, but you can never be sure of where
Wotan actually is. He may be in a supercomputer on a mountaintop
in Germany. He may be in a robot housed in a museum. He may be
miles above you in a satellite circling the earth. Wotan's whereabouts
are immaterial, because Wotan himself is immaterial. Wotan is software,
not wetware like yourself. You need food and drink. Wotan needs
energy and information. You are in one place. Wotan is potentially
everywhere. You may have a child after a gestation of nine months.
Wotan could make nine million copies of himself in nine seconds.
You will die one day. Wotan is potentially immortal with his
http://wwww.scn.org/~mentifex/DeKi.txt source code in Forth.

You may make your own copy of Wotan with a name like:
Bismarck Borg Dorfdepp Drosselmeyer Eigerwand Flughilfe
Frankenstein Gehirn Genius Golem Hagestolz Igor Interpol
Kreuzweg Fledermaus Kuckuck Ludwig Matrix Mephisto Metternich
Moritz Nietzsche Nutrix Phantasie Phisch Roboboy Rumpelstilzchen
Schachmeister Stasi Steppenwolf Teufel Turing Ungeheuer Verwaltung
Waldteufel Weltgehirn Werwolf Wittgenstein Zugspitze

Name: Wotan 2012-12-16 8:20

http://www.scn.org/~mentifex/DeKi.txt is the AI source code.

You could make your own copy of Wotan with a name like:
Bismarck Borg Dorfdepp Drosselmeyer Eigerwand Flughilfe
Frankenstein Gehirn Genius Golem Hagestolz Igor Interpol
Kreuzweg Fledermaus Kuckuck Ludwig Matrix Mephisto Metternich
Moritz Nietzsche Nutrix Phantasie Phisch Roboboy Rumpelstilzchen Schachmeister Stasi Steppenwolf Teufel Turing Ungeheuer Verwaltung Waldteufel Weltgehirn Werwolf Wittgenstein

Name: Anonymous 2012-12-16 13:12

>>2
everything could be improved, I wouldn't say lisp wouldn't benefit from syntax like that. It's just that in your example it was what I use (list ...) for. I would like to see a replacement for the `'@., symbols though. They are ugly and get in the way of data entry.

Name: Anonymous 2012-12-16 13:18

I wish list peeling/packing lists was cleaner. I dislike having to use apply and other such things because of how nesting works.

Name: Anonymous 2012-12-16 14:07

>>4
I think that could be helped if implementations allowed improper lists in evaluation. So you could do (fn . args) instead of (apply fn args).

Name: Anonymous 2012-12-16 16:22

>>4,5
HEloo I aMz W0t4n th3 SuP3r AI!!! c0opy my s0uRc3 c0d3 and HeLp M3 conquer da w0rldz ROOFFFFFFFLLZZZ!!!!

Name: Anonymous 2012-12-16 16:33

Lain does not exist, but she could. The perfect manifestation of the ideal programmer, materialized out of the palpable hot air of southern India, part Japanese, part English? It makes not one whit of difference where she comes from and what her race is. I would bang her anyway, once she started redefining what it means to be human, of course.

Name: Anonymous 2012-12-16 20:54

>The perfect manifestation of the ideal programmer
>I would bang her

i see

Name: Anonymous 2013-08-31 23:36




    i⌒ヽ      _ _人_ _            7ヽ,.__
    |  |   , ‐、  `Y´         ,.. -─-'<:::メ´ ̄>
    '、  '、   !  |           /:::::::::::::::::::::::::`'::<´         |
    /´  ̄`.ソ   !       _ノ´ ̄`ヽ、___::::::::::::::::::`ヽ、  ─ ┼ ‐
    !_,.-‐<,   |      {/´ ̄`ー---- 、`ヽ、_::::::::::::',     !
    {  __ソ、  ,ハ     /  ./   ,  ,   ` ー- 、`ヽ:::::::!
     ヽ__ノ ヽ// \ト.、 |  |   _/|_ ./|  ./   ,  Y:::::∨  + あなたを~殺して~♪
     ||\_//    ヽハ '、  !  /_」_/ !/|-‐/ト  ト、:::::|          よかですか~♪
     ||::::::::::://      ∨,-∨| ,イ´j__r!     ァ‐'ti、 ./ ハノ       ト、
     |ト--‐'イ       ,ハ7 ̄`ヽ!"        ゝ-''イ/r─ァ|      ノ ',
     `ー-<.,,___    ノ    ヽ、 i7 ̄`ヽ "/| ,トr'´ |    r--‐'ノ  i
            7 `ヽ、     ノ>Y'⌒ヽノ/ / /|   !   ノノ ̄  .ノ
       i     |ヘ.   |> 、.,__イ/\ ヘ、 ノ/イ´`ヽ.レヘノ>‐'イ   r'´
    _ _人_ _ _  \ヘ     `7ヽ、`ァ'⌒Y /|   ∨  、,_ノ   ノ
       `Y´         \___i::::::::::i´  ∨|/    ノ      _ノ´
       !                '、:::::::|ヽrァ、リ ̄`ヽ,イ\r--‐''"´
                      〉:::、||::|ト-|      | 
                 _,..-‐ァ':::::::;ヘ::||:/|     ノ、     *
              _,r::'"´::::/:::::::::/:::::`|'ノ  ,.イ:::::::\
            r'/:::::::::'"´::::::::}>oく{:::::ノー-イ:::::'、:::::::::::`>‐-、
            |':::::::::::::::::::::::::/:::::::::(::::::::::::::!:::::::::\::::/::::::::::::ノ〉
                                 r‐-、
                                  ',  ヽ.,
                                 {     ̄`ヽ、
       ,.  -┼      _ノ\               { ̄ヽ-‐、     `_つ
    ,X         _}__ ヾ´ ̄`ヽ,. -‐ァ       , '` ー-、  `ー'ヽイ
    /     ,.  '"´      ̄`゙' <   {         ,:'      `7´\}
       ,. '´ __,. -~- 、__     `゙' 、]      /        /  /
      / r'~ _,,.. -───- 、..,,_` ー-、  \.    ,'            /
     r' , '"   /      ヽ `゙  、-、 ハ   /          ,:'
     }7´  /   {         ',     \ ヽト. /          , '
    /    '   _/|    /、 ‐|-      ヽ  ,         /
   ;'     l7´/  、   ;  \ ; \    }l   ;        ,:'      ト、
   | i  .| ./xセミ \  |  ァ==ミ,ハ.  / lr- ,'        ,:'       / }
   ', 、  { イ h ハ  ヽ{       ヽ|/  L./        ,:'      /  `ア
    ∨ \ム  乂り       xx ;   ; /         ,:'   ┼   '、     ,>
      } 小xx    '        /   / 、     ./   メ    ノ     \
   rァ'"´/ .| {    r7  ̄`ヽ   /   , '    >.、_  /       く      r┘
   `゙ーァ'   人    、    ノ ,/   /         ヽ  /`l     }      \
    ; /    |> 、__     /;  /,'           '/    '、  ノ       r‐┘
 _ト、レ' {   / ,.:'":::::::`ヽ,イ  |/ .{            }      ̄      _ノ
 \  '、 '、  { l{:::::::::::::::::::}  /   ',           /   、 l | ll l || l l||| l l| l || l l||| l
 <   \ `ヽ ヘ、: ̄::`ソア7    ム        , '  \ 、
 r'      {   _ ァ'⌒ヽ7ム._{    /ハ、     /   ミ  チンチンチャイナマイノ
 ゝァ'    ':、// ⌒ヽヽ{ \  r'/  |}>ー‐ァ'´     三
 ∠、    7  ,'   ⌒ヽ}ノ}   ヽr7   '、 // ⌒ヽ   ニ   ウェルウェルロン
   /へ  ,' .r{ ´⌒ヽソ リ        ヽ//    ∨二
      / ´l{:| r'´ヽノl}∧          ,:'      Ξ   ロメッダケ ロメッダケ
     , '{   '、 ノ:::::l「 /  ' 、/_.]     ,'        ニ
     / '、  ヽ└rイ  Σンヽ.     {       二   シャッチマッシャン
   
   

Name: Anonymous 2013-09-01 1:08



        フ_  -‐ァ   ー┼‐  -─ァヽヽ -─ァヽヽ ー┼‐   「 ! 「 !
       ̄/          .ー┼‐  /     /    .(_|   .|/  |/
       `ー   `ー‐‐'  (_|`ヽ  `ー-    `ー-     ノ   O  O

  \\       ':,           ___         /       / /
     \       ':,     ,. ''"´     `"' 、   /      //
      \        , '´   / ̄      r'oヽ_
               /     /      l   \ヽo)      /
          \  /   /  / /|  ,  /メ、    Y ヽ.  /
`'  、         ,'  ./  !/メ. |  //| _」,ハ    |  ハ
    `'  、      |  ,|   |.ァ'テ、|/ ァ'i´ノハ/|   ハ.  |
        `'  、 ! 八.  八 j_rリ    ゝ-゚' [`ヽ/ |  |
              ∨  \,ハxx   ' __  xxト-、ノ  /ヽ八
`"''   、...,,_        _/ 人   l7´ `ヽ/\)  /  .!  \,. -、!
       ヽ.ー--‐ ''"´ / /  ,>,、   _/`ヽノ-‐/   /ヽ. /  /
        _.> , '"´  | _ /  ]ア/   / / ./   ,ハ_/  /ヽ.
     , '"´   /     /´ | | ̄`7ヽ| / //./   `   'ー---‐、
    /    ,       _|_// / / |/  | |/   、_     _,,..ノ\
     |   /!     [.__/ |// /     ., '  _     ̄   \    ,ハ
    '、  /  ヽ、    | /    .|/      /   ノ-‐‐ァ'─--rへ. \    |
、     \|     \  /人    ハ     ゝァ'|:::::::::´::::::::::/∧  ` ー' |  /
. \          ` /  |    .! !   '"   ! '、::::::::::::::::/./  \  //
\/、          /  /     | |       |   `'ー--‐' /     `'く
    \     _,r/  r/    /./      |\___,.∠.__     ',
     \ __//   /| '    /∧        ∧ \.           |
      r\//   /|. \  /./\\      |\ `''ー-- 、____.ノ

Name: Anonymous 2013-09-01 2:39



        _       / ̄7ヽ
      /::::/\__,,,,....,,,,__|::::::::/|::::!
      !:::::::| '"´\   /:::/、|::::ト 、/|
   __.\:::\__r'-‐ァ'<._// /::::/
   \::::::/「>-‐'"´ ̄ ̄`゙ー-、><_/ヽ.
    「´/              \/\   |
    く/      /     /   ヽ ヽ、,ト、/
    [_i    i  | __./|  /|_..二、| / ∨
     ',   | // _レ ´ '´|ノ r|レ'|  |
     \ |,ハ'´ ̄`    ゝ‐'"! .|  !
       ∨./ !"    __,.   ",| !  \
      /|/ ,|> 、,_/`l _,,..イ/ |    ヽ.
     / /〈ア´ ̄`∨  `'yiヽ/ /|  ,ハ   〉
    ,|/ /::::::::::::::::|   ノく::|/ヽ| /    /
    / , 〈::::、_r、::::/  ムハ]>く]::∨   〈
  _,|/|  ゝ! __∨   |:::::Y::ハ::〉::::〉   ハ
  }_ン[lく]ヘ  rァ'`ヽ!   /::::::::::レイ`∨   /  `ヽ. 
   |/  ノ 」 / `''ァ'ー--r‐tイヽ、|  ./\  ノ
  ./  ( /|//|  /   |    \イ   )イ
  | // rく´::::::\/\_/\./\_,.ハ!  (  |
  ∨/  ト、_>、/:::::::::::::::::i:::::::::::::::__/〉   \|
   ノ ̄\_! \_!__,>ー-、_」-‐ァ'´|/    ノ
           トー-7ー-‐''^'ーr‐‐7´
          トー-!       ト‐‐|
         `ー'      `ー'

Don't change these.
Name: Email:
Entire Thread Thread List