You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(10) |
Jun
(6) |
Jul
(1) |
Aug
(10) |
Sep
(20) |
Oct
(5) |
Nov
(2) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(25) |
Feb
(6) |
Mar
(59) |
Apr
(9) |
May
(3) |
Jun
(13) |
Jul
(6) |
Aug
(16) |
Sep
(14) |
Oct
(12) |
Nov
(4) |
Dec
(10) |
2004 |
Jan
(16) |
Feb
(12) |
Mar
(53) |
Apr
(16) |
May
(43) |
Jun
(40) |
Jul
(48) |
Aug
(20) |
Sep
(23) |
Oct
(27) |
Nov
(33) |
Dec
(8) |
2005 |
Jan
(2) |
Feb
(20) |
Mar
(7) |
Apr
(9) |
May
(2) |
Jun
(6) |
Jul
(5) |
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
(6) |
2006 |
Jan
(6) |
Feb
(6) |
Mar
(1) |
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(2) |
2009 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: david <da...@da...> - 2004-09-14 22:35:22
|
In linux you can make jars and jnlp files executable ----------------# /opt/java/jnlpwrapper #!/bin/bash # the wrapper for binfmt_misc/jar /opt/java/j2sdk1.4/jre/javaws/javaws $1 ------------------- /opt/java/jarwrapper ---------------- #!/bin/bash # the wrapper for binfmt_misc/jar /opt/java/j2sdk1.4/bin/java -jar "$@" The following script tells the kernel how to execute jar and jnlp files -----/etc/init.d/java.sh ------------------------------------------------- #!/bin/sh modprobe binfmt_misc mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc echo ':ExecutableJAR:E::jar::/opt/java/jarwrapper:' > /proc/sys/fs/binfmt_misc/register echo ':JNLPfile:E::jnlp::/opt/java/jnlpwrapper:' > /proc/sys/fs/binfmt_misc/register Now, if a jar is in your path and the executable bit is on you can just type the name of the jar or then jnlp file like this : david@newport:~$ jscheme.jar JScheme 6.3 4/5/04 http://jscheme.sourceforge.net > |
From: Geoffrey K. <ge...@kn...> - 2004-09-14 22:18:51
|
On Sep 14, 2004, at 17:18, Ken Anderson wrote: > Here's a way to make JScheme scripts executable from the UNIX command > line. > > #! /bin/env java -jar ~/jscheme/lib/jscheme.jar > (load "elf/basic.scm") > (print (Date.)) That's great! Now if only java could remain in memory so that startup would be faster, the way servlets do. You could start a java listener then the command line would invoke a client that sends it messages. Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk |
From: Ken A. <kan...@bb...> - 2004-09-14 21:19:00
|
Here's a way to make JScheme scripts executable from the UNIX command line. #! /bin/env java -jar ~/jscheme/lib/jscheme.jar (load "elf/basic.scm") (print (Date.)) |
From: Ken A. <kan...@bb...> - 2004-09-14 20:53:36
|
http://www.jai.ch/ has a cute applet you can type java into. It is a course to learn java. Maybe we could do something like this to teach JScheme. k |
From: Ken A. <kan...@bb...> - 2004-09-14 20:48:54
|
I'm suprised it isn't more scheme or common lisp like. It has no set! you have to say (set 'var value). However, the examples are very compact they must have been inspired by perl scripts. We can learn something from them. k At 12:02 PM 9/14/2004 -0400, Geoffrey Knauth wrote: >from LtU today: http://www.newlisp.org/ > >Geoffrey >-- >Geoffrey S. Knauth | http://knauth.org/gsk |
From: Ken A. <kan...@bb...> - 2004-09-10 17:52:13
|
use-module does not seem to work with a class JScheme 7.1 (8/31/04 1:32 PM) http://jscheme.sourceforge.net > (use-module jlib.Swing.class 'import '(border maketagger)) ** WARNING: (load) can't open "class jlib.Swing" #t > border SchemeException: ERROR: undefined variable "border" at jsint.E.error(E.java:14) at jsint.E.error(E.java:19) at jsint.DynamicVariable.getDynamicValue(DynamicVariable.java:27) at jsint.Evaluator.execute(Evaluator.java:348) at jsint.Evaluator.eval(Evaluator.java:275) at jsint.Evaluator.eval(Evaluator.java:264) at jsint.Evaluator.readEvalWriteLoop(Evaluator.java:122) at jsint.Evaluator.runJscheme(Evaluator.java:108) at jsint.Scheme.runJscheme(Scheme.java:174) at jsint.Scheme.defaultMain(Scheme.java:139) at jsint.Scheme.main(Scheme.java:111) at jscheme.REPL.main(REPL.java:149) > maketagger SchemeException: ERROR: undefined variable "maketagger" at jsint.E.error(E.java:14) at jsint.E.error(E.java:19) at jsint.DynamicVariable.getDynamicValue(DynamicVariable.java:27) at jsint.Evaluator.execute(Evaluator.java:348) at jsint.Evaluator.eval(Evaluator.java:275) at jsint.Evaluator.eval(Evaluator.java:264) at jsint.Evaluator.readEvalWriteLoop(Evaluator.java:122) at jsint.Evaluator.runJscheme(Evaluator.java:108) at jsint.Scheme.runJscheme(Scheme.java:174) at jsint.Scheme.defaultMain(Scheme.java:139) at jsint.Scheme.main(Scheme.java:111) at jscheme.REPL.main(REPL.java:149) > (use-module "jlib/Swing.scm" 'import '(border maketagger)) #t > border (lambda ?? R...) > maketagger (lambda maketagger ()...) > |
From: Ken A. <kan...@bb...> - 2004-09-03 17:27:24
|
JSR 223: Scripting Pages in JavaTM Web Applications http://www.jcp.org/en/jsr/detail?id=223 jsr 241: The groovy programming language http://www.jcp.org/en/jsr/detail?id=241 |
From: Ken A. <kan...@bb...> - 2004-09-01 18:26:23
|
Here's an example of how powerful Scheme can be. You can replace over 5,000 lines of Java with less than 100 lines of Scheme! I've been working with Jena, a Java framework for building Semantic Web applications, with RDF and OWL, http://jena.sourceforge.net. RDF is a XML way of representing Statements of the form of triples like (subject predicate object), but uglier. A set of such statements is called a Model. Jena provides RDQL, an RDF query language. Here's two examples: SELECT ?property WHERE (?person, <vCard:FN>, "John Smith") , (?person, ?property, ?obj) USING vCard FOR <http://www.w3.org/2001/vcard-rdf/3.0#> , rdf FOR <http://www.w3.org/1999/02/22-rdf-syntax-ns#> This says "find the person who's full name is "John Smith" and list the names of the properties he has". SELECT ?resource WHERE (?resource, <info:age>, ?age) AND ?age >= 24 USING info FOR <http://somewhere/peopleInfo#> RDF has a primitive for querying a model to return a sequence of statements that match the given subject predicate and object, which #null meaning "don't care". (.listStatements model subject predicate object) I figured it wouldn't be hard to implement this kind of query language in JScheme. Here are two examples using "http://jena.sourceforge.net/tutorial/RDQL/vc-db-2.rdf" as a model. (select (?property) (join (?person VCARD.FN$ "John Smith") (?person ?property ?object) (from db))) produces: (http://www.w3.org/2001/vcard-rdf/3.0#N) (http://www.w3.org/2001/vcard-rdf/3.0#FN) (http://somewhere/peopleInfo#age) Its macroexpansion is: (map* (lambda (r) (let ((?person (.getSubject r)) (?property (.getPredicate r)) (?object (obj r))) (list ?property))) (let ((source (from db))) (apply append (map* (lambda (r) (let ((?person (.getSubject r))) (jenaq source ?person #null #null))) (jenaq source #null VCARD.FN$ "John Smith"))))) ;;; Select any resource who's age is >= 24. (select (?resource) (filter (>= (string->number ?age) 24) (where (?resource INFO:AGE ?age) (from "http://jena.sourceforge.net/tutorial/RDQL/vc-db-2.rdf")))) produces: ((http://somewhere/JohnSmith/)) Its macroexpansion is: (map* (lambda (r) (let ((?resource (.getSubject r)) (?age (obj r))) (list ?resource))) (filter (lambda (r) (let ((?resource (.getSubject r)) (?age (obj r))) (>= (string->number ?age) 24))) (jenaq (from "http://jena.sourceforge.net/tutorial/RDQL/vc-db-2.rdf") #null INFO:AGE #null))) One might argue that i must have cut some corners, which i have. For example, there is no syntax checking and the query could be written more efficiently (by combining the map* and filter into a single pass). But i can't imagine this taking up much more code. k |
From: Ken A. <kan...@bb...> - 2004-09-01 14:24:26
|
Wow, this looks very interesting! At 09:43 AM 9/1/2004 -0400, Geoffrey Knauth wrote: >You probably saw this, but just in case you missed it, this cookbook's new, and it looks like the contributors are PLT and comp.lang.scheme heavyweights: > >http://schemecookbook.org/Cookbook/TOC?skin=voidtoc > >Geoffrey >-- >Geoffrey S. Knauth | http://knauth.org/gsk |
From: Ken A. <kan...@bb...> - 2004-08-31 18:09:56
|
I've created a bin/make (and bin/make.bat) that takes commands to build part or all of JScheme. I've also created bin/jscheme and bin/jscheme.bat which shows how i typically start things. Here's the documentation: bin/make -help make command* The default command is -all command ::= -key arg* Where command is one of: -help Print help message -all Build everything. -clean Remove all .class files. -javac Compile Java classes. -jar Make lib/jscheme.jar lib/jscheme.zip applet.jar and lib/jschemelite.jar -test Run tests on lib/jscheme.jar -javadoc Make Java api documentation. -contrib Build the contributed applications. -repl Start a Read Eval Print Loop -server Start the web server. -webpages Make web pages for http://jscheme.sourceforge.net |
From: Ken A. <kan...@bb...> - 2004-08-26 21:13:47
|
jscheme.JS.eval() and probably any other method will throw a jsint.BacktraceException when a error occurs. This exception will print a backtrace of the Scheme stack, as well as the Java stack, if BacktraceException.printJavaTrace == true. So you may want to write a version of eval() that returns an Object or an Exception, and check for it. In the example below (i haven't compiled this) eval1() returns the backtraceException, and eval2() returns the underlying java exception. public class myeval { /** Return an Object a Backtrace Exception. **/ public Object eval1(String x) { try { return jscheme.JS.eval(x); } catch (Throwable e) { return e; } } /** Return an Object or the underlying Exception. **/ public Object eval2(String x) { try { return jscheme.JS.eval(x); } catch (Throwable e) { return jsint.Procedure.stripExceptionWrapper(e); } } } Please go to http://jscheme.sourceforge.net and join the mailing list! k At 11:10 AM 8/25/2004 -0700, Peter Norvig wrote: >Can you guys give him an answer? > >Thanks, >-Peter > > >---------- Forwarded message ---------- >From: Joseph Toman <jj...@ed...> >Date: Wed, 25 Aug 2004 10:53:01 -0700 >Subject: JScheme error handling? >To: pe...@no... > > >Hello, > >I'm trying to use JScheme to glue a JVM onto a C++ application (a bad >hack I have to live with). I can't >seem to find a clear explanation of what jscheme.JS.eval returns when >it's fed undefined variables, unbalanced >parens, i.e. garbage. I've looked in both the API documentation and >the code itself. Can you give me a pointer to where to >look? Is it a SchemeException similar to what you would get from >running jscheme.REPL at the command line and >feeding it garbage? Thanks for any help you can give. > > Joseph Toman |
From: Ken A. <kan...@bb...> - 2004-08-19 18:37:54
|
Since TimerTask is abstract you need to subclass it. Here's one way to do it. (load "dclass/dclass.scm") (define-class (package frog) (public class TimerTask) (public void run () ... do something ... )) You could also do it this way: package foo; import jscheme.JScheme; public class TimerTask extends java.util.TimerTask { public void run() { JScheme js = new JScheme(); js.load(new java.io.File("code.scm")); // Load scheme code. js.call("run"); } } At 10:15 AM 8/19/2004 -0700, david wrote: >This is probably obvious but .. > >I need to schedule a jscheme procedure to run >in a servlet container and can't work out how to >pass the Task to the timer. Do I need to do JS.eval >or something like that? > > > > >------------------------------------------------------- >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Ken A. <kan...@bb...> - 2004-08-19 18:21:08
|
At 09:44 AM 8/19/2004 -0700, David Ascher wrote: >Ken Anderson wrote: > >>Welcome! One of the most important things that LL has done was bring academic and business software developers together! > >Thanks, and agreed. (I'm following Ken's lead and including the two lists -- I'll elide them if so prompted). > >>Here are some comments about your paper. I liked it, and i hadn't thought about the connection with open source much before. I may use JScheme examples, but i've been reading a Jython book. > >Didn't know much about JScheme until now. I'm glad I know more now. > >>Criterion 3: Dynamically types: >>"thus being dynamcally types makes sense if the nature of objects being manipulated is either unknown or unpredicatable" >>This i certainly true for procedures like (read) which can return anything. >>However many dynamic procedures are "typable", such as (map car xs) says that xs has type "list of lists". The important thing is you don't need the full ceremony of, say Java, to get the types right. This is why you write a one line shell script to copy files from one place to another, than write a C program. > >Yes. I tried to be careful in not using phrases like 'weakly typed' or 'typeless', which, I agree, aren't especially useful features. > >>Open source, deeply: >>I once read something about military software. The crisis was that their code was implemented in 400+ languages. These were actually OS x Language rather than real language differences, but because there were 400 implementations, all different in some way, that was the maintenance issue. > >Believable. I'd love a reference... I don't think this is where i saw it, but its close http://www.stsc.hill.af.mil/crosstalk/1995/10/Survey.asp http://www.stsc.hill.af.mil/crosstalk/1997/12/languages.asp >>Evolution by meritocracy and natural selection >>"set of individuals" is often of size 1 initially for Perl, Python, and TCL. How does this core grow over time? JScheme has 3 main developers but about a dozen who've contributed, sometimes significantly (changing the implementation enough i don't recognize it). > >I don't think there's a good generalization to be made there (and unfortunately a main requirement of the paper is to be able to generalize across languages). Each language community I've studied has reacted differently to the pressures put upon it, with very differing results. > >>Small memory systems >>Python might be too big, but LUA seems to fit on gaming systems, and there have been tiny lisp/schemes on small hardware. One might argue that a dynamic language could make better use of available memory. For example newton script saves memory by being prototype based rather than class based and thus save space. There are also efficient code representations that could be a win here. > >Lua aside, I agree in theory, not in practice yet af far as I know. I know very little about implementation techniques, but the market says that with some exceptions (Lua, Tcl), dynamic language implementations are "big" -- that is, bigger than hand-crafted low-level code. I would be thrilled to be proven wrong by some really bright implementor who "solves" problems like JITting of messy languages like Python which have eluded real-world, practical type inferencing mechanisms (StarKiller, as far as I know, is still very far from being applicable in the real world). I think the Northeastern PLT-Scheme guys have done the best attempt. http://plt-spy.sourceforge.net/papers/scheme-workshop-2003-web/scheme-workshop-2003.html unfortunately, a few python classes do sneaky things at the meta level that causes the inference to fail. If those classes were altered we might have something. >>Myth: "Dynamic languages are more brittle" >>I think the issue here is that while static type checking finds errors at compile time, and dynamic type checking finds errors at runtime, most type errors are found the first time the dynamic code is run. > >Mostly agreed. Most type errors are found in the compile time of a statically typed language because statically typed languages force you to think about type almost above all else. I get the feeling that "people" will blame things like runtime errors in programs written in dynamic languages on the language, but runtime errors in programs written in static languages are blamed on bad programming. Seems unfair, no? ;-) It sure does. >Your points about refactoring are interesting in that they're a real challenge for me. People have built remarkable refactoring tools in some languages (Smalltalk, Java come to mind), but almost nothing really useful in open source languages. Part of me thinks that it's because the open source programming language community in general doesn't buy into "big idea" approaches to software engineering, and refactoring tools are definitely a big idea (i.e. big rewards from big investment). So the languages naturally evolve to deal with micro problems, with little attention to how language changes could make higher level tools more doable (e.g., type annotations, various pragma constructs, etc). Maybe the focus tends to be about the language rather than about programming. For JScheme we wanted a small simple interactive language on top of Java. Maybe Eclipse could be a basis for such tools for dynamic languages. Squeak is probably a "big idea" language but its user interface is completely foreign to modern users. >>Myth: "dynamic langues don't have good tools" >>What about licensing issues? Can i distribute my software to my customers? >>Do i have to donwload every piece of sotware separately? > >I haven't seen that in practice, but that may be a peculiarity of the languages I deal with -- the licenses are relatively clearly unencumbered from distribution hassles, and one of ActiveState's value-add bits is to simplify the packaging/distribution problem. Is that a problem you get a lot w/ JScheme? No, JScheme has a liberal license, but we are now also providing third party jars with different licences. >>Lack of startigic vision: >>Besides SOAP and REST ERLANG has an intersting compact alternative. > >I definitely need to learn more about erlang. Thanks for the pointer. Do you have a specific reference for web services & ERLANG? http://www.sics.se/~joe/ubf/site/home.html Universal Binary Format they also have xml webservices but its UBF that i find intersting. |
From: david <da...@da...> - 2004-08-19 17:15:34
|
This is probably obvious but .. I need to schedule a jscheme procedure to run in a servlet container and can't work out how to pass the Task to the timer. Do I need to do JS.eval or something like that? |
From: David A. <Da...@Ac...> - 2004-08-19 16:44:59
|
Ken Anderson wrote: > Welcome! One of the most important things that LL has done was bring academic and business software developers together! Thanks, and agreed. (I'm following Ken's lead and including the two lists -- I'll elide them if so prompted). > Here are some comments about your paper. I liked it, and i hadn't thought about the connection with open source much before. I may use JScheme examples, but i've been reading a Jython book. Didn't know much about JScheme until now. I'm glad I know more now. > Criterion 3: Dynamically types: > "thus being dynamcally types makes sense if the nature of objects being manipulated is either unknown or unpredicatable" > This i certainly true for procedures like (read) which can return anything. > However many dynamic procedures are "typable", such as (map car xs) says that xs has type "list of lists". The important thing is you don't need the full ceremony of, say Java, to get the types right. > This is why you write a one line shell script to copy files from one place to another, than write a C program. Yes. I tried to be careful in not using phrases like 'weakly typed' or 'typeless', which, I agree, aren't especially useful features. > Open source, deeply: > I once read something about military software. The crisis was that their code was implemented in 400+ languages. These were actually OS x Language rather than real language differences, but because there were 400 implementations, all different in some way, that was the maintenance issue. Believable. I'd love a reference... > Evolution by meritocracy and natural selection > "set of individuals" is often of size 1 initially for Perl, Python, and TCL. How does this core grow over time? JScheme has 3 main developers but about a dozen who've contributed, sometimes significantly (changing the implementation enough i don't recognize it). I don't think there's a good generalization to be made there (and unfortunately a main requirement of the paper is to be able to generalize across languages). Each language community I've studied has reacted differently to the pressures put upon it, with very differing results. > Small memory systems > Python might be too big, but LUA seems to fit on gaming systems, and there have been tiny lisp/schemes on small hardware. One might argue that a dynamic language could make better use of available memory. For example newton script saves memory by being prototype based rather than class based and thus save space. There are also efficient code representations that could be a win here. Lua aside, I agree in theory, not in practice yet af far as I know. I know very little about implementation techniques, but the market says that with some exceptions (Lua, Tcl), dynamic language implementations are "big" -- that is, bigger than hand-crafted low-level code. I would be thrilled to be proven wrong by some really bright implementor who "solves" problems like JITting of messy languages like Python which have eluded real-world, practical type inferencing mechanisms (StarKiller, as far as I know, is still very far from being applicable in the real world). > Myth: "Dynamic languages are more brittle" > I think the issue here is that while static type checking finds errors at compile time, and dynamic type checking finds errors at runtime, most type errors are found the first time the dynamic code is run. Mostly agreed. Most type errors are found in the compile time of a statically typed language because statically typed languages force you to think about type almost above all else. I get the feeling that "people" will blame things like runtime errors in programs written in dynamic languages on the language, but runtime errors in programs written in static languages are blamed on bad programming. Seems unfair, no? ;-) Your points about refactoring are interesting in that they're a real challenge for me. People have built remarkable refactoring tools in some languages (Smalltalk, Java come to mind), but almost nothing really useful in open source languages. Part of me thinks that it's because the open source programming language community in general doesn't buy into "big idea" approaches to software engineering, and refactoring tools are definitely a big idea (i.e. big rewards from big investment). So the languages naturally evolve to deal with micro problems, with little attention to how language changes could make higher level tools more doable (e.g., type annotations, various pragma constructs, etc). > Myth: "dynamic langues don't have good tools" > What about licensing issues? Can i distribute my software to my customers? > Do i have to donwload every piece of sotware separately? I haven't seen that in practice, but that may be a peculiarity of the languages I deal with -- the licenses are relatively clearly unencumbered from distribution hassles, and one of ActiveState's value-add bits is to simplify the packaging/distribution problem. Is that a problem you get a lot w/ JScheme? > Lack of startigic vision: > Besides SOAP and REST ERLANG has an intersting compact alternative. I definitely need to learn more about erlang. Thanks for the pointer. Do you have a specific reference for web services & ERLANG? --david |
From: Ken A. <kan...@bb...> - 2004-08-18 23:19:25
|
Welcome! One of the most important things that LL has done was bring academic and business software developers together! Here are some comments about your paper. I liked it, and i hadn't thought about the connection with open source much before. I may use JScheme examples, but i've been reading a Jython book. Criterion 3: Dynamically types: "thus being dynamcally types makes sense if the nature of objects being manipulated is either unknown or unpredicatable" This i certainly true for procedures like (read) which can return anything. However many dynamic procedures are "typable", such as (map car xs) says that xs has type "list of lists". The important thing is you don't need the full ceremony of, say Java, to get the types right. This is why you write a one line shell script to copy files from one place to another, than write a C program. Open source, deeply: I once read something about military software. The crisis was that their code was implemented in 400+ languages. These were actually OS x Language rather than real language differences, but because there were 400 implementations, all different in some way, that was the maintenance issue. Evolution by meritocracy and natural selection "set of individuals" is often of size 1 initially for Perl, Python, and TCL. How does this core grow over time? JScheme has 3 main developers but about a dozen who've contributed, sometimes significantly (changing the implementation enough i don't recognize it). Small memory systems Python might be too big, but LUA seems to fit on gaming systems, and there have been tiny lisp/schemes on small hardware. One might argue that a dynamic language could make better use of available memory. For example newton script saves memory by being prototype based rather than class based and thus save space. There are also efficient code representations that could be a win here. Myth: "Dynamic languages are more brittle" I think the issue here is that while static type checking finds errors at compile time, and dynamic type checking finds errors at runtime, most type errors are found the first time the dynamic code is run. Here's a lazy refactoring method i've used for the Java part of JScheme:Change the thing you want to change and let the compiler tell you what else you need to change. You could argue this is a benifit of Java, but the only advantage is that you get all the static errors at once, while in a dynamic language you would get them only one at a time. If i get a pile of compiler errors i only change one or two before recompiling so the "advantage" isn't very important. In the 2 refactorings i've done recently, there was one bug that the compiler did not catch. However, the orignal version of JScheme i got from Peter Norvig was 2500 lines of perfectly compilable Java code, but it took me 60 tests before i had a running JScheme application. So you should expect a but every 41 lines of code with strong typing. So static and dynamic typing come out pretty even. Myth: "dynamic langues don't have good tools" What about licensing issues? Can i distribute my software to my customers? Do i have to donwload every piece of sotware separately? Lack of startigic vision: Besides SOAP and REST ERLANG has an intersting compact alternative. At 03:06 PM 8/13/2004 -0700, you wrote: >It occurred to me that all of you might already know each other quite well, but that only Jeremy knows me. I figured I'd give a little intro to my background and perspectives on the domain of programming languages. > >I've been programming since 1981 or so, and have gone through a fairly typical sequence of programing languages for someone of my generation. In rough order (and forgetting some I'm sure): > > - Basic, Pascal, Logo, AppleScript, HyperTalk, REXX, Prolog, FORTRAN, C, PostScript, C++, NewtonScript, Awk, Perl, Tcl, Java, S, MetaPost, Python, JavaScript, PHP. > >Notably absent from the list is any significant experience with functional languages. What I think of as a gap in my education may be a 'feature' when it comes to the composition of this PC ;-). > >I dabble in languages as an intellectual pastime, getting more satisfaction from breadth of experience than depth. I don't consider myself an expert in any of the above languages, having met experts in many of them. > >I'm an academic by training (degrees in Physics and Cognitive Science from Brown, with a strong CS component to both), have experience doing non-CS research (computational modeling of and psychophysical experiments in human vision), and have worked in various software firms on various domains such as graphics, UI, neural networks, mobile apps. I've spent the last 4+ years at ActiveState (now a part of Sophos) focusing on building tools for users of languages like Python, Perl, Tcl, PHP and XSLT. I was the tech lead for Komodo (one of ActiveState's IDEs for same languages), and currently run the Tools & Languages division of Sophos, aka ActiveState. In other words, while I have a technical and academic background, I do have to keep an eye on a balance sheet. Life is strange. > >I have a public preference for languages like Python over many others, having co-written two books on the topic and serving on the Python Software Foundation board since its inception. I am professionally bound to respect differences of opinion on such preferences, obviously. > >I've been responsible for systems large enough to know that I don't ever want to be responsible for _truly_ large systems. > >My interest in the LL workshop is a combination of intellectual curiosity and a belief that supporting the growth, adoption of, and interest of not-so-mainstream languages is important for a wide range of goals, including the selfish (ensuring ActiveState's future success) and the more altruistic (making the world a more fun place to program in, and a more fun place to use software). > >I've been involved in the planning of enough conferences that I know not to commit to too much -- the fact is that my job will take precedence over any conference duties, and surges in workload are predictably unpredictable. I am happy to assist in reading and discussing papers and the like, but will stay out of logistical discussions, especially since I don't know the expectations of the LL crowd. > >I will also consider getting ActiveState to help fund the conference, but such decisions are (deliberately) left to my marketing team, who have to judge where we spend the few dollars we can allocate to conferences. > >Finally -- I've recently published a whitepaper on a related topic, (see www.ActiveState.com/Dynamic), and I want to emphasize at the outset that I did not intend to step on any toes in the definitions used in that paper esp. w.r.t. the usage of the term "Dynamic Languages" (which in the context of the paper assumes an open source component which many dynamic languages don't have). That paper tries hard to make a "business" case in the context of market dynamics, and unfortunately many simplifications had to be made (e.g. regarding the taxonomies of programming languages and the relative importance of various languages) to make the paper (hopefully) convincing. My default expectation is that we are all aligned in an effort to correct the simplistic market presentations on programming languages. Feel free to send me comments on the paper (off list!) if you want. > >With apologies for the long intro, I look forward to working with all of you, > >--David |
From: Ken A. <kan...@bb...> - 2004-08-17 14:47:36
|
Geoffrey reminded me that its good to take inspiration from other languages. Here are some macros i've been playing with. ;;; Alternatives to lambda. (define-macro (\\ args . body) `(lambda ,args ,@body)) ;; Convenient for writing simple one argument functions. (define-macro (_ . body) `(lambda (_) ,@body)) (define-macro (| . body) ;; Ruby like: (| a b | (* a (+ 1 b))) -> (lambda (a b) (* a (+ 1 b))) (define (crack rest sofar) (cond ((null? rest) (error "No closing | found!")) ((eq? (car rest) '|) (cons (reverse sofar) (cdr rest))) (else (crack (cdr rest) (cons (car rest) sofar))))) (mvbind (args . body) (crack body '()) `(lambda ,args ,@body))) (define-macro (mvbind pattern source . body) ;; Like multiple-value-bind. `(apply (lambda ,pattern ,@body) ,source)) (define-macro (while cond . actions) `(let loop () (if ,cond (begin ,@(append actions (list '(loop))))))) (define-macro (for var vals . body) ;; Python like for loop ;; Example: (for x in xs if (prime? x) (print x)) (if (eq? (car body) 'if) `(for-each* (lambda (,var) ,body) ,vals) `(for-each* (lambda (,var) ,@body) ,vals))) (define-macro (lt var val . body) ;; Arc 1 variable let. `(let ((,var ,val)) ,@body)) (define-macro (if. . args) ;; Arc if. (if (null? args) '() (if (null? (cdr args)) (car args) `(if ,(car args) ,(cadr args) (if. ,@(cddr args)))))) |
From: Ken A. <kan...@bb...> - 2004-08-17 14:13:29
|
At 08:30 PM 8/16/2004 -0400, Geoffrey Knauth wrote: >while(<>) { print if (/BEGIN/ .. /END/); } Perl is hard to beat for one liners. The best i could come up with was: (let ((flipFlop (.. (// "BEGIN") (// "END")))) (iterate (stdin) (_ (if (flipFlop _) (print _))))) Here's the rest of the code you'll need: (load "using/run.scm") This macro looks a little strange, but i find it very useful for writing one argument functions. (define-macro (_ . body) `(lambda (_) ,@body)) (define (stdin) (BufferedReader System.in$)) (define (// pattern) (lambda (x) (.matches x pattern))) (define (.. p1 p2 . inclusive?) (let ((state #f) (inclusive? (if (pair? inclusive?) (car inclusive?) #f))) (lambda (line) (if state (if (p2 line) (begin (set! state #f) inclusive?) #t) (if (p1 line) (begin (set! state #t) inclusive?) #f))))) k |
From: Geoffrey K. <ge...@kn...> - 2004-08-17 01:03:48
|
I should have been more clear what I meant: something that would take the embedded Java code, compile it, put it in the right "scm/" directory (given the package name), and add the current directory to the classpath. The thought was prompted by a posting I saw in comp.lang.scheme today: http://groups.google.com/groups?hl=en&lr=&ie=UTF -8&c2coff=1&selm=411bde55%241%40news.tulsaconnect.com The author notes that in a small amount of Perl you can extract text between BEGIN and END: while(<>) { print if (/BEGIN/ .. /END/); } Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Aug 16, 2004, at 19:22, Geoffrey Knauth wrote: > Sounds great Ken. I wonder if this bit could be automated: > > --- scm/MouseInputAdapter.java --- > package scm; > public class MouseInputAdapter extends > javax.swing.event.MouseInputAdapter { > } > --- > > Geoffrey > -- > Geoffrey S. Knauth | http://knauth.org/gsk > > On Aug 16, 2004, at 17:27, Ken Anderson wrote: > >> There are several concerns you must deal with when developing a Java >> GUI: >> - layout - where components go. >> - action - what happens when you click on something. >> - model - what happens to the underlying data "model" when an action >> happens. >> - update - what happens to the gui when an action happens. >> - enable - which actions are currently enabled. >> >> I've enclosed a slice of code that i'm using in an application tries >> to separate these concerns: >> - layout is delarative, like XUL http://luxor-xul.sourceforge.net/ it >> could be in xml. >> Layout show relative position of components and associates a named >> action and enabling state with each component. Any action occurs in >> its own thread. >> - model - the model is a simple prototype object which includes named >> components of the GUI. >> - update - Any update occurs in an invokeLater >> >> One way this differs from the Mode-View-Controller pattern is that >> i'm using a single update procedure. So i need to think about that >> more ... >> k >> >> [The attachment swing-action.scm has been manually removed] >> > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Geoffrey K. <ge...@kn...> - 2004-08-16 23:26:58
|
Sounds great Ken. I wonder if this bit could be automated: --- scm/MouseInputAdapter.java --- package scm; public class MouseInputAdapter extends javax.swing.event.MouseInputAdapter { } --- Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Aug 16, 2004, at 17:27, Ken Anderson wrote: > There are several concerns you must deal with when developing a Java > GUI: > - layout - where components go. > - action - what happens when you click on something. > - model - what happens to the underlying data "model" when an action > happens. > - update - what happens to the gui when an action happens. > - enable - which actions are currently enabled. > > I've enclosed a slice of code that i'm using in an application tries > to separate these concerns: > - layout is delarative, like XUL http://luxor-xul.sourceforge.net/ it > could be in xml. > Layout show relative position of components and associates a named > action and enabling state with each component. Any action occurs in > its own thread. > - model - the model is a simple prototype object which includes named > components of the GUI. > - update - Any update occurs in an invokeLater > > One way this differs from the Mode-View-Controller pattern is that i'm > using a single update procedure. So i need to think about that more > ... > k > > [The attachment swing-action.scm has been manually removed] > |
From: Ken A. <kan...@bb...> - 2004-08-16 21:31:05
|
There are several concerns you must deal with when developing a Java GUI: - layout - where components go. - action - what happens when you click on something. - model - what happens to the underlying data "model" when an action happens. - update - what happens to the gui when an action happens. - enable - which actions are currently enabled. I've enclosed a slice of code that i'm using in an application tries to separate these concerns: - layout is delarative, like XUL http://luxor-xul.sourceforge.net/ it could be in xml. Layout show relative position of components and associates a named action and enabling state with each component. Any action occurs in its own thread. - model - the model is a simple prototype object which includes named components of the GUI. - update - Any update occurs in an invokeLater One way this differs from the Mode-View-Controller pattern is that i'm using a single update procedure. So i need to think about that more ... k |
From: Ken A. <kan...@bb...> - 2004-08-10 21:05:04
|
OK, i like your approach of everyone sharing the same environment. This is what the lisp machine did, though there was typically only one user at a time, though many processes with no user/kernel distinction. You could take down a Lisp Machine by typing (setq current-process nil) Luckily, you could use set! to redefine define. Maybe you can make a game for your students out of this - write your servlet so what people do to the global environment won't bother it. It might motiviate a good discussion about modularity and objects. k At 04:36 PM 8/10/2004 -0400, Timothy John Hickey wrote: >On Aug 10, 2004, at 3:14 PM, Ken Anderson wrote: > >>Tim, >>Your documentation mentions that a init.scm file is loaded the first time a .servlet is executed. >> How should a servlet that needs to load code do it so it only happens once? >One way is to use the (use-module "FILE.scm") command >but we need to make a (reload-module "FILE.scm") command that can be used in development.... > >> >>Also, since all servlets run in the same environment, won't your students potentially have name conflicts, at least potentially? >This is true, but I view it as a feature and not a bug. > >The idea is to have the student's append their initials or login id to all their globally defined names >(e.g. (define (tjh-webpage TITLE CSS BODY) ......) ) >then the students can load each others code and use each other's procedures ... > >We could also have students use the > (use-module "FILE.scm" 'import 'all "PREFIX:") >or (reload-module "FILE.scm" 'import 'all "PREFIX:") >approach to load in their code with a prefix..... This keeps the FILE.scm code simple >and still allows the libraries to be used without much interference... > >This can be used to encourage a community of reuse. Student's in the summer course >thought it was very cool that they could all use everyone else procedures .... > >I do need a way for them to reset the primitives, because last summer someone >wrote a servlet that started with > (set! define 5) >which wiped out the real defintion of define!! > >Another possibility would be to create a global hashtable H of jscheme.JScheme instances >and have a macro that looked up the SchemeEvaluator in which to evaluate the servlet... > >For example, > >(use-context > "tjh" > > (use-module "mydefs.scm" 'import 'all) > ... > (servlet (a b c) > BODY > ) >) > >would lookup the context (a jscheme.JScheme. instance) >with key "tjh" (or create one if it doesn't exist), and then >evaluate the servlet in that context. Does this seem like >a reasonable approach?? > >---Tim--- > > > > > > >> >>k |
From: Timothy J. H. <ti...@cs...> - 2004-08-10 20:36:44
|
On Aug 10, 2004, at 3:14 PM, Ken Anderson wrote: > Tim, > Your documentation mentions that a init.scm file is loaded the first > time a .servlet is executed. > How should a servlet that needs to load code do it so it only happens > once? One way is to use the (use-module "FILE.scm") command but we need to make a (reload-module "FILE.scm") command that can be used in development.... > > Also, since all servlets run in the same environment, won't your > students potentially have name conflicts, at least potentially? This is true, but I view it as a feature and not a bug. The idea is to have the student's append their initials or login id to all their globally defined names (e.g. (define (tjh-webpage TITLE CSS BODY) ......) ) then the students can load each others code and use each other's procedures ... We could also have students use the (use-module "FILE.scm" 'import 'all "PREFIX:") or (reload-module "FILE.scm" 'import 'all "PREFIX:") approach to load in their code with a prefix..... This keeps the FILE.scm code simple and still allows the libraries to be used without much interference... This can be used to encourage a community of reuse. Student's in the summer course thought it was very cool that they could all use everyone else procedures .... I do need a way for them to reset the primitives, because last summer someone wrote a servlet that started with (set! define 5) which wiped out the real defintion of define!! Another possibility would be to create a global hashtable H of jscheme.JScheme instances and have a macro that looked up the SchemeEvaluator in which to evaluate the servlet... For example, (use-context "tjh" (use-module "mydefs.scm" 'import 'all) ... (servlet (a b c) BODY ) ) would lookup the context (a jscheme.JScheme. instance) with key "tjh" (or create one if it doesn't exist), and then evaluate the servlet in that context. Does this seem like a reasonable approach?? ---Tim--- > > k > |
From: Ken A. <kan...@bb...> - 2004-08-10 19:15:09
|
Tim, Your documentation mentions that a init.scm file is loaded the first time a .servlet is executed. How should a servlet that needs to load code do it so it only happens once? Also, since all servlets run in the same environment, won't your students potentially have name conflicts, at least potentially? k |
From: Geoffrey K. <ge...@kn...> - 2004-08-05 22:36:42
|
Cool. Worked for me on GNU/Linux, not on Mac OS X (no frame showed). ;; value of (frameExample) on GNU/Linux - frame displays javax.swing.JFrame [frame1,0,0,32x32,layout=java.awt.BorderLayout,title=DEMO,resizable, normal,defaultCloseOperation=HIDE_ON_CLOSE, rootPane=javax.swing.JRootPane [,0,0,32x32, layout=javax.swing.plaf.metal.MetalRootPaneUI$MetalRootLayout, alignmentX=null,alignmentY=null, border=javax.swing.plaf.metal.MetalBorders$FrameBorder@180f96c, flags=385,maximumSize=,minimumSize=,preferredSize=], rootPaneCheckingEnabled=true] ;; value of (frameExample) on Mac OS X - frame does not display javax.swing.JFrame [frame1,0,22,0x22,layout=java.awt.BorderLayout,title=DEMO,resizable, normal,defaultCloseOperation=HIDE_ON_CLOSE, rootPane=javax.swing.JRootPane [,0,22,0x0,layout=javax.swing.JRootPane$RootLayout, alignmentX=null,alignmentY=null, border=, flags=385,maximumSize=,minimumSize=,preferredSize=], rootPaneCheckingEnabled=true] Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Aug 5, 2004, at 17:03, Ken Anderson wrote: > Here's how to get the jscheme icon to appear on the title bar of a > frame: > > (import "javax.swing.UIManager") > (import "javax.swing.JFrame") > (import "javax.swing.ImageIcon") > (define (frameExample) > (UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName)) > (JFrame.setDefaultLookAndFeelDecorated #t) > (let ((frame (JFrame. "DEMO"))) > (.setIconImage > frame > (.getImage (ImageIcon. > "jscheme/images/jscheme-icon2.gif"))) > (.pack frame) > (.show frame) > frame)) > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source > Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |