lisp.ru

Started by cormullion, October 02, 2008, 09:44:54 AM

Previous topic - Next topic

cormullion

I had some fun trying to translate googlish to English - the original in Russian and was translated automatically by Google.



http://66.102.9.104/translate_c?hl=en&sl=ru&tl=en&u=http://www.lisp.ru/forums.php%3Fm%3Dposts%26q%3D10&usg=ALkJrhhllrp3d8poLapTbun7T-oq995dQg">//http://66.102.9.104/translate_c?hl=en&sl=ru&tl=en&u=http://www.lisp.ru/forums.php%3Fm%3Dposts%26q%3D10&usg=ALkJrhhllrp3d8poLapTbun7T-oq995dQg



And - whatever friend Cyril is saying here (what is horseradish pobesh ?) ;) - I do think that newLISP is indeed a good place to start learning Lisp. Once you've seen the potential of the basic ideas, you can decide whether to stay with newLISP or move on to languages that have no problems at all...

m i c h a e l

#1
Quote from: "cormullion"languages that have no problems at all


No programming language is free from problems. Even augmented languages, like Borland's Delphi, make some seemly simple things difficult to do. The problem domain for a programming language is too vast for any one solution. The best programming languages do one thing, and do it well. Smalltalk does objects well. newLISP is Lisp as a scripting language. But neither Smalltalk nor newLISP can satisfy everyones idea of a perfect language. Programming languages are imperfect because people are too.



The design of a Programming language is a lot of give and take. But Lutz would know better than I ;-)



m i c h a e l

unixtechie

#2
Lithper in that lisp.ru forum is "unixtechie" in this one. Here's a translation of Slobin's first comment there:


QuoteГлавное -- не раскатывать губы. Ньюлисп -- это такой бейсик. Ну или перл времён 4.036 (1993 год, кажется). Очень удобно, если нужен скриптик на сотню строчек в полностью контролируемом вами окружении. И полный афедроlaн, если у вас большой проект и есть возможность кому-то ввести вредоносные данные. SQL injection -- фигня по сравнению с тем, что в ньюлиспе до недавних пор вообще не было аналога функции read -- предлагалось эмулировать её через eval-string (а что при этом выполнится -- что прислали, то и выполнится). О том, что в режиме "сервера приложений" он наивно выполняет вообще всё, что придёт из сокета, я просто молчу. Ну и чисто языковое: ссылки (которые эмулируются через контексты) не являются первоклассными значениями, что делает обработку сколь нибудь сложных структур данных... неудобной.



The main thing is not to hope for too much. Newlisp is a sort of BASIC. Or PErl 4.036 (that was 1993, if I am not mistaken). Very convenient if all you need is a smallish script a hundred lines long in a totally controlled environment. And a total disaster for a large project and if there is a possibility of introducing hostile data. SQL injection is nothing compared to the fact that newlisp until recenty had no "read" function. One was supposed to emulate it with  "eval-string" (and what would be executed? whatever was sent over, that's what's executed).  Not mentioning that in the "application server" mode New Lisp  would naively run everything that is coming from the socket.

And a purely linguistic gripe, too: references (which are emulated with contexts) are not first-class elements of the language, what makes processing of any complex data structures .. unconvenient.



Но для мелких скриптиков -- да, хорош. У меня он практически вытеснил Питон из этой ниши. И, кстати, я таки да раздаю исполняемые файлы наивным пользователям. ;-) И автор, да, поддаётся убеждению, если убеждать настойчиво и аргументированно. Но, боюсencedь, человек, для которого этот язык будет первым, к неряшливому стилю привыкнет на всю жизнь.



But for tiny scriptlets it is OK. It almost pushed python out of my practice in this niche. And, yes, I do hand out packed one-file executables to naive users ;) And yes, newlisp author allows himself to be influenced by others' opinions if one argues logically and persistently.

But someone who starts using NewLisp as his first language //meaning, first Lisp variation -- translator// will get used to an untidy style for life



P.S. http://slobin.pp.ru/newlisp/">http://slobin.pp.ru/newlisp/



P.P.S. И он не по фамилии Лутц, а по имени Лутц! А по фамилии он Мюллер!

..and Lutz is not his surname. It's his name. His surname is Mu(e)ller


I do not agree, of course, but dropped that discussion thread and did not argure there.



(a) tiny and minimal languages have been used for sizeable projects allright in recent history of IT industry. Remember Lua, or tcl, or even perl (saw a book pushing it as a tool for fast prototyping in large and formal projects in corporate and military environments in the second half of the 90s)

Other examples could be Forth, or another minimal version of Lisp written by a German living in Germany and used by him in his consultancy work etc.



(b) a script bundled with NewLisp as a pseudo-executable that is standalone, can be made protected from unauthorized launching in a network server mode (or any other mode as all input will be filtered by your script directly).

Starting a socket that listens and then executes arbitrary code can be done with "nc" (netcat) or a dozen of other tiny utilities, or from any scripting language installed on your unix box (e.g. perl).

No one seems to be worried too much about it, for some reason. It's a given. The sysadmin should eliminate any such installations from his servers open to the internet, yes.



(c) And I have no patience when someone talks about supposed deficiencies of NewLisp because of its context feature, or reference/copying or macros treatment etc.

First, many other implementations lack something, but no one whines if those guys label themselves as "R4.. or R5.... Scheme" or "Common Lisp" in which "some features are not yet implemented in release xxx"



People are more than happy to bear all crap the windbag Graham feeds them about Ark.



But the whiners are oh so selective when they mention a well-rounded implementation like NewLisp

It's just a double standard.

unixtechie

#3
Quotesdfgh153 in that lisp.ru forum writes:

Для скриптов очень хорошо подходит ScSh, просто пусичка, и поаккуратнее ньюлиспа:

"ScSh" is very good for writing scripts, and it's tidier than newlisp



Slobin answers:

Well, as far as tidiness is concerned, Scheme is unbeatable! But, as far as I understand scsh // "scheme shell" -- one can get it at sourceforge or search for an announcement on http://www.freshmeat.net">www.freshmeat.net  -- translator// is a unix-only solution. If I need to automate a small thing under Windows .... then scsh should be counted out.

Ну, по аккуратности схему и впрямь хрен побьёшь!  Но это, насколько я понимаю, сугубо юниксовое решение. Если мне надо сделать какую-то мелкую автоматизацию в виндах (а там не столько вызывать внешние программы в стиле шелла, сколько дёргать какую-нибудь функцию user32.dll), то scsh, боюсь, в пролёте.


"horseradish" is a mistranslation of an idiom "hren", which in this usage means a negative emphasizer. "Hren pobjesh' means "you won't be able to beat it" -- not the literal "horseradish"

cormullion

#4
Thanks for the translations! It's always possible that people say interesting things... :)

Cyril

#5
Quote from: "unixtechie"Lithper in that lisp.ru forum is "unixtechie" in this one. Here's a translation of Slobin's first comment there:


Thank you for translation, unixtechie! I'll try to clarify my point later. No time to do this just now, sorry. :-(
With newLISP you can grow your lists from the right side!

Dmi

#6
QuoteНо, боюсencedь, человек, для которого этот язык будет первым, к неряшливому стилю привыкнет на всю жизнь.



But someone who starts using NewLisp as his first language //meaning, first Lisp variation -- translator// will get used to an untidy style for life

Hmm... just my 5 cents here: Personally me, programming newlisp, have the minimum possible errors quantity. Comparing C, Pascal, perl, awk, tcl, erlang....

My 100 - 300 lines newlisp programs are always runs just as being written, and, after that, I have smallest error corrections within them in my programming practice.

Yes, newlisp can cause bad style.

BUT newlisp can cause a good style also - languages like C, perl, erlang haven't this feature by design. imho.

;-)
WBR, Dmi