Feed aggregator

Joe Marshall: Crazy person thinks ``Lisp sucks''

Planet Scheme - Tue, 07/13/2010 - 20:18
In this post, a person going by the initials CC declares: There's a good reason almost no software has been written in lisp. Lisp sucks. Not just lisp, but the whole way the logic is arranged as nested things. The simplest problem becomes a mind-bending puzzle. Instead of easy to understand:
if (a equals b) { 
  c = not d; 
} else { 
  c = d + b; 
}
You have this nested inner to outer logic where if is a function.
c = if(equals(a,b), not(d), plus(d,b)) 
The first is definitely more readible [sic] and it reads like we think of the logic. No one thinks of if as a function that takes three arguments, and forcing you to work that way just makes you crazy. I suppose it is futile to argue with an admittedly crazy person, but perhaps being forced to work with conditionals has made me crazy as well. A closer translation of the original code would be this:
(if (equals a b)
    (setq c (not d))
    (setq c (+ d b)))
If these sorts of differences are a ``mind-bending puzzle'', perhaps the author should consider a career in the housekeeping or food-service industries.

Watch Russian Spies in REAL TIME !!! - Video Evidence For Icompetento FBI Bustards

comp.lang.scheme - Tue, 07/13/2010 - 18:00
Watch Russian Spies in REAL TIME !!! - Video Evidence For Icompetento
FBI Bustards
Watch Russian Spies in REAL TIME !!! - Video Evidence For Icompetento
FBI Bustards
[link]
[link]
[link]

The FAT per DIEM FBI bustards use our TAX PAYER MONEY and INCOMPETENCE is UNACCEPTABLE. Hey Racist and INcompetent FBI Bustards, where is the ANTHRAX Mailer ? Where are the 4 blackboxes ? Where are the Pentagon Videos ? Why did you release the 5 d

comp.lang.scheme - Tue, 07/13/2010 - 18:00
The FAT per DIEM FBI bustards use our TAX PAYER MONEY and INCOMPETENCE
is UNACCEPTABLE.
=====
[link]
[link]
[link]
Hey Racist and INcompetent FBI Bustards, where is the ANTHRAX Mailer ?
Where are the 4 blackboxes ? Where are the Pentagon Videos ? Why did

See Hot College Girls Sex images

comp.lang.scheme - Tue, 07/13/2010 - 11:00
See Hot College Girls Sex images At [link]
Due to high sex content, i have hidden the videos in an image. in
that
website on Up Side search box click on image and watch
videos in all angles. please don,t tell to anyone.

Programming Praxis: Word Cube

Planet Scheme - Tue, 07/13/2010 - 10:00

Word cube is game in which players form words from the nine letters in a cube. Words must have four or more letters and must use the central letter from the cube; at least one word will use all nine letters in the cube. The player who forms the most words wins. Many newspapers publish a word cube on their puzzle page, and Stealthcopter publishes a word cube on line daily. Wikipedia describes word cubes under the caption “word polygon.” There are twelve words formed from the word cube at right: bonnie, bunion, coin, concubine, conic, cubic, ennui, icon, nice, nine, nuncio, and union.

Your task is to write a program that finds all matching words for a given word cube. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.


Grant Rettke: Bought some nice work boots

Planet Scheme - Mon, 07/12/2010 - 20:42

The MSF beginner’s riders class that I took a month or so ago required shoes that covered the ankles and I ended up buying a pair of the Brahma Hutch II lace-less steel-toe boots from Walmart. Wearing now for a about a month I’ve been really impressed; they are comfortable, broke in really easily, and slip on and off pretty quickly. Perhaps the only downside for motorcycle-riding is that the steel-toe makes for awkward shifting and breaking. For that reason I’m looking at buying some real motorcycle boots pretty soon; in particular the TCX X-Five.

All in all for only $30USD this is a really nice boot.

Grant Rettke: Bought a helmet

Planet Scheme - Mon, 07/12/2010 - 20:35

After a good bit of research I decided to go with a Shoei RF1100. After a few hundred miles I’ve found it to be really nice; comfortable, a lot of air goes through it, and it doesn’t squeal when you are sitting behind a windshield like a couple of reviews that I had read suggested.

Perhaps the most bothersome discovery is the ridge on the top of my head that is going to force me to purchase some extra padding or something to level out the top of the helmet so it quits giving me a headache!

One “funny” thing I found in the owner’s manual was a warning that if you purchase the Matte Black helmet then you need to be extra, extra-careful about protecting its finish. Great!

scm-5e7 release

comp.lang.scheme - Mon, 07/12/2010 - 16:00
This message announces the availability of Scheme release scm-5e7.
SCM conforms to Revised^5 Report on the Algorithmic Language Scheme
and the IEEE P1178 specification. SCM is written in C and runs under
Amiga, Atari-ST, MacOS, MS-DOS, OS/2, NOS/VE, Unicos, VMS, Windows,
Unix, and similar systems.
SCM is free software and part of the GNU project. It is released

Scheme Library slib-3b3 release

comp.lang.scheme - Mon, 07/12/2010 - 12:00
This message announces the availability of Scheme Library release slib-3b3.
SLIB is a portable Scheme library providing compatibiliy and utility
functions for all standard Scheme implementations.
SLIB supports Bigloo, Chez, ELK 3.0, Gambit 4.0, Guile, JScheme,
MacScheme, MITScheme, Pocket Scheme, RScheme, S7, scheme->C, Scheme48,

Re: Can someone give me an example of the SNAME type ?

comp.lang.scheme - Mon, 07/12/2010 - 06:00
Can someone explain me the essential parts of this function,
specifically, with some examples of SNAME ? How should the SNAME look
like ?
DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
doc: /* Eval args until one of them yields non-nil, then return
that
value. The remaining args are not evalled at all.

ANN: bigloo3.4a

comp.lang.scheme - Sun, 07/11/2010 - 07:00
------------------------------ ------------------------------ ------------------
Bigloo (3.4a)
,--^,
`a practical Scheme compiler' _
___/ /|/
Thu Jul 1 12:14:45 CEST 2010 ,;'( )__,
) '
Inria -- Sophia Antipolis ;; //

Cheap wholesale Chanel goggle

comp.lang.scheme - Sun, 07/11/2010 - 07:00
sunglasses:
Cheap wholesale ADIDAS Sunglass (paypal payment
[link])
Cheap wholesale ARMANI Sunglass
Cheap wholesale Burberry Sunglass
([link] free
shipping)
Cheap wholesale BVLGARL Sunglass
Cheap wholesale Cartier Sunglass (paypal payment
[link])

Availables : More that 3500 Solutions manuals and Test Banks (Part 3)

comp.lang.scheme - Sat, 07/10/2010 - 18:00
List of Solutions Manuals
_________________________
contact me to : mattos...@gmail.com
mattosbw1(at)gmail.com
NOTE : "THIS SERVICE IS NOT AVAILABLE FOR : CHINA, INDIA, PAKISTAN,
IRAQ, IRAN, PHILIPPINES, NORTH KOREA, NEPAL, BANGLADESH, SRI LANKA,
MALDIVES & BHUTAN".
If your wanted solutions manual is not in this list, also can ask me

Availables : More that 3500 Solutions manuals and Test Banks (Part 2)

comp.lang.scheme - Sat, 07/10/2010 - 07:00
List of Solutions Manuals
_________________________
contact me to : mattos...@gmail.com
mattosbw1(at)gmail.com
NOTE : "THIS SERVICE IS NOT AVAILABLE FOR : CHINA, INDIA, PAKISTAN,
IRAQ, IRAN, PHILIPPINES, NORTH KOREA, NEPAL, BANGLADESH, SRI LANKA,
MALDIVES & BHUTAN".
If your wanted solutions manual is not in this list, also can ask me

Programming Praxis: Contents: Permuted Table Of Contents

Planet Scheme - Fri, 07/09/2010 - 10:00

We examined in a previous exercise a program that extracts a chronological listing of the exercises on the Programming Praxis website from the praxis.info file. We also discussed in a previous exercise a program that creates a permuted index. In today’s exercise we will combine those two programs into the program that is used to create the Permuted Table of Contents page at Programming Praxis.

The format of the praxis.info file was given in a previous exercise. The output from today’s program should look like this:

<table cellpadding="10">
<tr><td>129</td><td>20 Apr 2010</td><td align="right">&nbsp;</td><td>145 Puzzle: Build and evaluate expressions using the digits one through nine and the simple arithmetic operators</td><td><a href="/2010/04/20/145-puzzle/">exercise</a> <a href="/2010/04/20/145-puzzle/2/">solution</a> <a href="http://programmingpraxis.codepad.org/SzbrJbjx">codepad</a></td></tr>
<tr><td>51</td><td>17 Jul 2009</td><td align="right">International Mathematical Olympiad: Three exercises from</td><td>1960s math competitions</td><td><a href="/2009/07/17/international-mathematical-olympiad/">exercise</a> <a href="/2009/07/17/international-mathematical-olympiad/2/">solution</a> <a href="http://programmingpraxis.codepad.org/JRGmt2wZ">codepad</a></td></tr>
...
</table>

Your task is to write a program that reads praxis.info and produces the permuted table of contents. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.


Availables : More that 3500 Solutions manuals and Test Banks (Part 1)

comp.lang.scheme - Fri, 07/09/2010 - 00:00
List of Solutions Manuals
_________________________
contact me to : mattos...@gmail.com
mattosbw1(at)gmail.com
NOTE : "THIS SERVICE IS NOT AVAILABLE FOR : CHINA, INDIA, PAKISTAN,
IRAQ, IRAN, PHILIPPINES, NORTH KOREA, NEPAL, BANGLADESH, SRI LANKA,
MALDIVES & BHUTAN".
If your wanted solutions manual is not in this list, also can ask me

Yinso Chen: BZLIB/SHP.plt 0.4 now available - Web API

Planet Scheme - Thu, 07/08/2010 - 20:33
A new version of SHP.plt is now available via planet.  This is a major rewrite of SHP and provides two main upgrades:
  • a "web API" interface - your web script can now be exposed as an "API" (think XMLRPC/JSON), and it automatically works with either XMLRPC or JSON (details below)
  • general performance enhancement - the scripts are now compiled and cached to reduce disk IO.  If the scripts are updated then they are automatically recompiled
As usual, the code is released under LGPL.

Installation 
(require (planet bzlib/shp:1:3)) 

SHP requires some newer dependencies (bzlib/base:1:6, bzlib/date:1:3, bzlib/parseq:1:3, bzlib/xml:1:3, bzlib/mime:1:0), and the current versions of PLT Scheme and Racket have issues with version dependencies (the link: module mismatch bug), so you might have to clear out the planet cache and recompile them again.

As usual, SHP comes with a small example site that you can play with under the example sub directory - cd to the example directory and run (require "web.ss") will start the example site.  The example site is still just trivial code right now - it will eventually be enhanced and separated into its own package.

Cached Compiled Script All of the scripts are now compiled and cached.  This has some potential performance benefit, since we will only access the file content when the file timestamp changes (meaning the file has been touched and/or modified).  As this is a non-visible feature, we won't spend much time discussing it, except to note that the change is not just done for performance reasons - it is also done to enable and simplify the design of web api, which is discussed below.

Web APIUnder the example site you can find the script shp/api/add2, which contains the following:


;; -*- scheme -*- -p 
(:api-args (a number?) (b number?)) 
(+ a b)

This is the new *web api* - it takes in 2 numbers, a and b, and return the added result. To write an api script, you must use the :api-args expression, and then supply the arguments inside. The arguments can be specified in the following forms:


(:api-args a b) ;; both a & b are non-validating and you get what's passed in

(:api-args (a number?) (b string?)) ;; a expects a number, and b expects a string 

(:api-args (a number? 3) (b number? 5)) ;; a & b both expect numbers, and both have default values if they are not passed in (a defaults to 3, and b defaults to 5). 

When you run the example site you can access the api via the following http call:

GET /api/add2 HTTP/1.0 

When running the above in browser you should get back an XMLRPC response:

Content-Type: text/xml; charset=utf-8 

<methodResponse>
<fault>
<value>
<string>required: a</string>
</value>
</fault>
</methodResponse>

XMLRPC is the default response mode for web APIs.  What it returns by default as shown above is an error message, because neither a or b is passed in.

To pass in the values - you just need to specify them in the query string as following:


GET /api/add2?&a=50&b=90 HTTP/1.0 

which will return the following:

Content-Type: text/xml; charset=utf-8

<methodResponse>
<params>
<param>
<value>
<int>140</int>
</value>
</param>
</params>
</methodResponse>

The add2 script contains args of (a number?) and (b number?), which mean that both a & b expects a number input.  So if we pass a non-number to the api


GET /api/add2?&a=not-a-number&b=also-not-a-number HTTP/1.0 

we get the following:


<methodResponse>
<fault>
<value>
<string>invalid-conversion: "not-a-number"</string>
</value>
</fault>
</methodResponse>

Which shows that the validation takes place for each of the arguments.  We will talk about how the underlying validation magic works later.

XMLRPC Request Payload Now the API doesn't just work for query string parameters - you can pass in an XMLRPC payload as well.  To do so you need to use POST instead of GET, and put the following XMLRPC request into the payload:


POST /api/add2 HTTP/1.0 
Content-Type: text/xml; charset=utf-8 

<methodCall>
<methodName>add2</methodName>
<params>
<param><name>a</name><value><int>50</int></value></param>
<param><name>b</name><value><int>90</int></value></param>
</params>
</methodCall>

Which will return the same result:


Content-Type: text/xml; charset=utf-8

<methodResponse>
<params>
<param>
<value>
<int>140</int>
</value>
</param>
</params>
</methodResponse>

Partial Path Dispatch with XMLRPC methodName You might have noticed in the above that the token add2 is specified twice in the request - once in the path, and once in the methodName parameter in the payload.  And if you were to use a bogus method name such such as add3 in the methodName parameter, you will see that it is being ignored - the path has precedence.

So - the dispatch rule is - if the path matches the script exactly, the methodName parameter will be ignored.

This is designed to follow the same dispatching rule of regular SHP scripts, and to ensure that one script compiles into one api. 

But if you like to use the regular XMLRPC dispatch, it also works - you just need to remove the add2 from the path, as follows:


POST /api HTTP/1.0 # notice - no add2 here 
Content-Type: text/xml; charset=utf-8 

<methodCall>
<methodName>add2</methodName>
<params>
<param><name>a</name><value><int>50</int></value></param>
<param><name>b</name><value><int>90</int></value></param>
</params>
</methodCall>

So instead of posting to /api/add2, just post to /api, and specify add2 in the methodName parameter.  This is called partial path dispatch, for the lack of a better term for now.

NOTE - in order for partial dispatch to work, the /api directory must not contain an index script, because otherwise the index script will be matched first prior to the partial dispatch kicking in.

Partial Path Dispatch With Query String There is another way of doing partial path dispatch, and that involve the using of query string.  Yes, you can specify query string with POST requests, and the query string values will be parsed properly in SHP.

The way to do it is to specify a query key that starts with **.  So for example, if we want to dispatch to /api/add2, we can dispatch as follows:


POST /api?**add2 HTTP/1.0 # note the **add2 key in the query string. 
Content-Type: text/xml; charset=utf-8 

<methodCall>
<methodName>add3</methodName><!-- note the wrong method name --> 
<params>
<param><name>a</name><value><int>50</int></value></param>
<param><name>b</name><value><int>90</int></value></param>
</params>
</methodCall>

The above has exactly the same effect as if you have done a direct dispatch - the ** prefix will be stripped, and then appended to the path.  And this rule, along with the direct dispatch, supersedes the method name in the xmlrpc payload.

This design exists for a reason - to deal with web forms that have multiple submit buttons

Web forms that have multiple submit buttons usually have each button mapped to different actions, and instead of requiring you to do manual dispatch on the server side based on which button is clicked (the name & value of the submit button clicked gets submitted to the server side along with the data), you can partition the API calls based on the name of the button (partition on name instead of the value is better, because that way it allows you to localize the value without worrying about breaking the script). 

For example, if you have a server-side-based calculator that has the +, -, *, /, = submit buttons, you can theoretically have the following scripts:


/api/add 
/api/subtract
/api/multiply
/api/divide
/api/equal 

And then have the buttons mapped to the name of **add, **subtract, **multiply, **divide, and **equal, and map the form's action to /api.  SHP will do the dispatching for you correctly.

JSON Request & Responses Besides working with query strings and XMLRPC request and responses, the same api script also can handle JSON requset & responses - you just need to POST the payload with the appropriate content-type, which is text/json.


POST /api/add2 HTTP/1.0 
Content-Type: text/json; charset=utf-8 

{ a : 50 , b : 90 } 

And the response will automatically be a JSON as well:


Content-Type: text/json; charset=utf-8 

140 

Since JSON does not have a method name parameter, it does not have a corresponding partial path dispatch rule, but the query string's partial path dispatch rule remains in effect. 

And of course if you are using JSON you will want to use JSONP, which you can by specifying an additional ~jsonp query string parameter as follows:


POST /api/add2?~jsonp=myCallback HTTP/1.0 
Content-Type: text/json; charset=utf-8 

{ a : 50 , b : 90 } 

Which will generate the following response as a JSONP result:


Content-Type: text/json; charset=utf-8

return myCallback( 140 ); 

That explains the basic rules with regards to using the web api.  The next post will discuss the syntax of the web API, as well as how to extend it so you can use other types.

Grant Rettke: Welcoming Chris Aldrich

Planet Scheme - Thu, 07/08/2010 - 13:35

Chris Aldrich reads a lot of good books. I enjoy hearing about what he has read lately and thought that it would be nice to share his thoughts so I offered that he could post here if he was interested (or until he blogged elsewhere or whatever). He said yes. His user-name is caldrich.

Simple hack to get $500 to your home.

comp.lang.scheme - Thu, 07/08/2010 - 08:00
Simple hack to get $500 to your home at [link]
Due to high security risks,i have hidden the cheque link in an
image. in that website on left side Above search box, click on image
and enter your name and address where you want to receive your
cheque. please don't tell to anyone.
Syndicate content