Hello everyone; this is my first post to this list. I present my apologies beforehand, because I know these kinds of topics can be easily misconstrued as trolling attempts or “mental masturbation”; all I can say in my favor is that these are real, honest questions on my part. If any part of this has been discussed before (and I cannot imagine it has not), please point me to the relevant places and I shall leave in peace; I must say I did go over the full Google Groups archive for this mailing list and could not find anything to answer my questions.
I would like to start by saying that I have always had a strong attraction to Lisp-like languages. In the past years I have been reading on functional programming topics, specially about Scheme, the Y combinator, macros, Paul Graham’s ramblings, etc., and I can say that I have finally come to understand the origins of my attraction: the purity, simplicity (of the basic concepts), elegance and power in functional programming (in general) and Scheme (in particular) are, in my view, unbeatable. So I declare myself an outright Scheme lover.
In addition to that, my professional career has always been tied to programming and software engineering, because that is what I enjoy doing the most (as opposed to managing). I have had long stints (several years) of developing in C, C++ and Java. Incidentally, when I am programming in language X in that list, I usually find myself pining for language X-1 (from Java to C++, from C++ to C); but I digress…
The thing is, I must admit I have a secret desire and it is time to come out in the open: I want to leave those imperative languages behind and finally use Scheme for a real, “in the large” project… There, I feel better now that I said that!
So let me get to my point before I bore everyone here to death: can my desire be realistically fulfilled? Can Scheme (Racket) be used for a more “enterprise-y” project (console app, GUI app, web app, whatever, accessing data from any RDBMS in transactional ways) where I will have a team of developers working on separate parts of the system at the same time? How can Scheme (Racket) help me with the software engineering aspects of such a project? Has anybody here had any experience in projects similar to this?
Which brings me to my second question: can Scheme (Racket) be used to develop all these different kinds of applications (console, GUI, etc.)? Can anybody point me to real life examples of each type of application developed with Scheme (Racket)?
[In fact, I specifically came to Racket after having had a grand vision of being able to develop all the components for a web app (SQL to access the DB, business logic, HTML for presentation, CSS for styling, JS for interactivity, even XML for configuration) using a single unified language (or many small separate DSLs based on a single language) and I have been kind of surprised at not finding this idea fleshed out anywhere as a framework, library, module, etc.]
I guess at the bottom of my questions lurks the following (and this is the non-trolling I was referring to before): if Scheme is the be-all and end-all of programming languages, how come I don’t hear of more success stories using it, other than Paul Graham’s (which, important as they are, in my view are not recent enough to provoke and inspire anymore)? Where are the flag web applications, GUI enterprise systems, even console applications, that have become watershed proofs of Scheme (Racket) as THE SINGLE BEST programming language there is (something of which I am 100% convinced)?
I really would appreciate (and am thankful for) any insight coming from the illustrious people on this list. Best regards.
--
Gonzalo Diethelm
Can Scheme (Racket) be used for a more “enterprise-y” project (console app, GUI app, web app, whatever, accessing data from any RDBMS in transactional ways) where I will have a team of developers working on separate parts of the system at the same time? How can Scheme (Racket) help me with the software engineering aspects of such a project? Has anybody here had any experience in projects similar to this?
Which brings me to my second question: can Scheme (Racket) be used to develop all these different kinds of applications (console, GUI, etc.)? Can anybody point me to real life examples of each type of application developed with Scheme (Racket)?
If Scheme is the be-all and end-all of programming languages, how come I don’t hear of more success stories using it
OK, this is clearly a setup for someone to ask, so I'll ask :)
What's the first-best language?
_________________________________________________
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
So let me get to my point before I bore everyone here to death: can my desire be realistically fulfilled? Can Scheme (Racket) be used for a more “enterprise-y” project (console app, GUI app, web app, whatever, accessing data from any RDBMS in transactional ways) where I will have a team of developers working on separate parts of the system at the same time?
Which brings me to my second question: can Scheme (Racket) be used to develop all these different kinds of applications (console, GUI, etc.)? Can anybody point me to real life examples of each type of application developed with Scheme (Racket)?
[In fact, I specifically came to Racket after having had a grand vision of being able to develop all the components for a web app (SQL to access the DB, business logic, HTML for presentation, CSS for styling, JS for interactivity, even XML for configuration) using a single unified language (or many small separate DSLs based on a single language) and I have been kind of surprised at not finding this idea fleshed out anywhere as a framework, library, module, etc.]
if Scheme is the be-all and end-all of programming languages,
As the old saying goes, "You can write Fortran in any language."
Today, thanks to the Racket platform's meta-language facilities, if we
are feeling cocky, we can suffix that old saying with, "... and you can
write any language in Racket." :)
--
http://www.neilvandyke.org/
I trust there is a bug in your crystal ball! What an awful prediction!
So, PLs advance but programmers do not? Not good!
--
Cheers,
Marco
Hi,
Just to be proud a little bit. :-)
Here is my project in Scheme which is still going strong after 4-5 years.
(This is basically a console program.)
http://www.hexahedron.hu/personal/peteri/autolisp/simulator/index.html
The company has used it in Europe several thousand times, and the construction of
several hundred halls have been executed using the results of the software.
Best regards,
Peter Ivanyi
I'd say the one you use Racket to create for the task at hand ;-).
--
Pablo.
http://pablo.rauzy.name/
On Aug 20, 2011, at 6:49 AM, pablo wrote:
> I'd say the one you use Racket to create for the task at hand ;-).
_________________________________________________
1. There definitely are enterprise-class applications in the wild which were built with Scheme and/or Racket. The following were mentioned: some of Disney World's virtual rides, the control system for some Boeing / USAF telescope arrays, a large enterprise system interacting with PostgreSQL, a simulator that helps the process of pricing hall structures, and a system used to convert data files between two very different hardware architectures.
2. It is possible to build console, GUI and web apps with Racket. There are countless console apps everywhere; DrRacket is a good example of a complicated GUI app; it is likely that the PLaneT server is implemented in Racket (could anyone please confirm this)?
3. Scheme (current standard) is the third-best language there is. Racket is the second-best language. It is not clear which would be the overall best language (this was tongue in cheek, I assume, but I would love to hear the answer).
4. Racket is a rather recent language that is just beginning to take off, and things are looking very bright.
5. There might be a Racket software engineering book soon, planned by Neil Van Dyke. I declare myself as a sure customer.
6. I think there is one thing missing in Racket, and this was also pointed out during the discussion: database drivers for major DBMSs (I would say at least Oracle, DB2 and SQL Server on the commercial front, and PostgreSQL, SQLite and MySQL on the open source front). In addition to that, I think Racket would be greatly enhanced by a single relational data access layer that would hide the differences between specific RDBMSs and facilitate switching from one to another. (Note: I am not trying to dictate anything about Racket, just voicing my opinion).
My conclusion is that I will keep learning and using Racket for my future projects; I fully expect that learning experience to be a thoroughly entertaining personal journey. Heartfelt thanks to everyone who contributed answers to my questions, and to those who have brought Racket to where it stands today. You guys rock.
gonzalo diethelm wrote at 08/20/2011 11:15 PM:
> 5. There might be a Racket software engineering book soon, planned by Neil Van Dyke. I declare myself as a sure customer.
>
Besides my vaporware book, there are several already existing books for
Racket, included in electronic form for free with Racket. Plus there
are the related books HtDP and PLAI by the same people. And I have
heard of two other tentative new Racket books in the works other than my
own.
> 6. I think there is one thing missing in Racket, and this was also pointed out during the discussion: database drivers for major DBMSs (I would say at least Oracle, DB2 and SQL Server on the commercial front, and PostgreSQL, SQLite and MySQL on the open source front). In addition to that, I think Racket would be greatly enhanced by a single relational data access layer that would hide the differences between specific RDBMSs and facilitate switching from one to another. (Note: I am not trying to dictate anything about Racket, just voicing my opinion).
>
Looks like this question didn't get answered before.
Three generalized interfaces that support multiple RDBMS backends:
http://planet.racket-lang.org/display.ss?package=db.plt&owner=ryanc
http://planet.racket-lang.org/display.ss?package=dbi.plt&owner=bzlib
http://planet.racket-lang.org/display.ss?package=sqlid.plt&owner=oesterholt
There's also these (plus some unreleased ones):
http://planet.racket-lang.org/display.ss?package=snooze.plt&owner=untyped
http://planet.racket-lang.org/display.ss?package=spgsql.plt&owner=schematics
http://planet.racket-lang.org/display.ss?package=mysql.plt&owner=jaz
http://planet.racket-lang.org/display.ss?package=mongodb.plt&owner=jaymccarthy
http://planet.racket-lang.org/display.ss?package=mongodb-native.plt&owner=dabag
http://planet.racket-lang.org/display.ss?package=sqlid-helper.plt&owner=sweeney
http://planet.racket-lang.org/display.ss?package=sql-table.plt&owner=dfisher
http://planet.racket-lang.org/display.ss?package=libpq.plt&owner=synx
http://planet.racket-lang.org/display.ss?package=sqlite.plt&owner=jaymccarthy
http://planet.racket-lang.org/display.ss?package=sql-oo.plt&owner=jaymccarthy
Regarding Oracle and DB2, I suspect that anyone invested in one of those
could use some of the open source Racket interfaces for other RDBMSs as
examples for supporting another RDBMS. The cost might be relatively
minor (considering the large existing investment in the RDBMS).
> My conclusion is that I will keep learning and using Racket for my future projects;
Glad to hear it.
There is a lot of smart activity to going on with Racket, which is not
always well-advertised, so asking questions on the email list is often
helpful.
--
http://www.neilvandyke.org/
>>
>
> Regarding Oracle and DB2, I suspect that anyone invested in one of those
> could use some of the open source Racket interfaces for other RDBMSs as
> examples for supporting another RDBMS. The cost might be relatively
> minor (considering the large existing investment in the RDBMS).
For my private use (and with the intention to put it on Planet some time if I find the courage :-;), I've started working on bindings to the open source OCILIB library, a widely used, very convenient and time-saving wrapper around Oracle's own OCI.
Although at the moment it would be version 0.0 ... 01 or such, it will be "work in progress" and evolve not for the next months, but for the next years for sure, as for me it will be the enduring link between job (having turned Oracle DBA since spring last year) and spare time interest (Racket).
>
>
>> 6. I think there is one thing missing in Racket, and this was also pointed out during the discussion: database drivers for major DBMSs (I would say at least Oracle, DB2 and SQL Server on the commercial front, and PostgreSQL, SQLite and MySQL on the open source front). In addition to that, I think Racket would be greatly enhanced by a single relational data access layer that would hide the differences between specific RDBMSs and facilitate switching from one to another. (Note: I am not trying to dictate anything about Racket, just voicing my opinion).
>
Perhaps I can add a remark to this "from the other" (the database admins') side :-; ? From the point of view of an Oracle DBA (I'm emphasizing "Oracle" here as I don't want to generalize, having no comparable experience with other rdbms's), applications written with a goal of "database independence" can be a big problem and lead to grave performance (or even, data integrity) issues. This is because even though the sql may be the same, important concepts like read consistency etc. are implemented in a very different ways in different rdbms'.
So anyway, when an application changes to use another rdbms, major work might be required ...
Ciao,
Sigrid
My database package (ryanc/db) works for PostgreSQL, MySQL, SQLite
directly and Oracle and DB2 via ODBC. It should work with SQL Server
also, but I haven't tested that configuration.
Docs are here:
http://planet.racket-lang.org/package-source/ryanc/db.plt/1/4/planet-docs/db/index.html
> In addition to that, I think Racket would be greatly enhanced by a
> single relational data access layer that would hide the differences
> between specific RDBMSs and facilitate switching from one to another.
> (Note: I am not trying to dictate anything about Racket, just voicing
> my opinion).
There are many things you might mean by that (ORMs,
relational-algebra-to-SQL compilers, etc). The concerns that Sigrid
raised make me think that hiding *all* the differences is a hopeless
task, but maybe something with a narrower focus could be useful. Are
there any existing frameworks that accomplish what you have in mind?
Ryan
Great information, thanks. I take it this package works natively with PostgreSQL, SQLite and MySQL. Is it possible and "cheap" to make it work natively with other RDBMSs, such as Oracle?
> > In addition to that, I think Racket would be greatly enhanced by a
> > single relational data access layer that would hide the differences
> > between specific RDBMSs and facilitate switching from one to another.
> > (Note: I am not trying to dictate anything about Racket, just voicing
> > my opinion).
>
> There are many things you might mean by that (ORMs, relational-algebra-to-
> SQL compilers, etc). The concerns that Sigrid raised make me think that hiding
> *all* the differences is a hopeless task, but maybe something with a
> narrower focus could be useful. Are there any existing frameworks that
> accomplish what you have in mind?
You are right, my requirement is ambiguous. This is what I have in mind:
1. A set of abstractions (probably written in Racket) that allow you to interact with any RDBMS in a uniform way: select records, join tables, insert / update / delete data, etc. Hopefully you would have one or more DSLs to specify what you want to do, and not have to use strings (as in JDBC) for your commands. This should apply to all RDBMSs.
2. A generic library (probably written in C / C++) that provides all the low-level trappings for #1.
3. A set of drivers (written in C / C++), one for each RDBMS, that #2 uses when configured to talk to that particular RDBMS.
So I would love to be able to write something like this in a Racket-y style:
(select-from '((tab-A A) (tab-B B)) '(A.col-1 A.col-2 B.col-3) '(some magical way to specify conditions and joins...))
And this would work for, say, Oracle, if somebody takes the time to develop #3 above for the Oracle case. Bonus points if the solution uses prepared statements (for reasons of security and efficiency).
> Ryan
--
Gonzalo Diethelm
It's certainly possible. I haven't looked at the Oracle C API(s), but I
would estimate it would take between one and two thousand lines of
Racket code. ODBC support, for comparison, currently takes about 1500
lines. More features, like interval types and asynchronous execution,
will add to that.
What benefits would "native" Oracle support provide (compared to ODBC)
to justify the cost?
>> > In addition to that, I think Racket would be greatly enhanced by a
>>> single relational data access layer that would hide the differences
>>> between specific RDBMSs and facilitate switching from one to another.
>>> (Note: I am not trying to dictate anything about Racket, just voicing
>>> my opinion).
>>
>> There are many things you might mean by that (ORMs, relational-algebra-to-
>> SQL compilers, etc). The concerns that Sigrid raised make me think that hiding
>> *all* the differences is a hopeless task, but maybe something with a
>> narrower focus could be useful. Are there any existing frameworks that
>> accomplish what you have in mind?
>
> You are right, my requirement is ambiguous. This is what I have in mind:
>
> 1. A set of abstractions (probably written in Racket) that allow you
> to interact with any RDBMS in a uniform way: select records, join
> tables, insert / update / delete data, etc. Hopefully you would have
> one or more DSLs to specify what you want to do, and not have to use
> strings (as in JDBC) for your commands. This should apply to all
> RDBMSs.
It sounds like you want some kind of abstract SQL syntax. I'll probably
try to do something like that.
> 2. A generic library (probably written in C / C++) that provides all
> the low-level trappings for #1.
> 3. A set of drivers (written in C / C++), one for each RDBMS, that #2
> uses when configured to talk to that particular RDBMS.
Why would I write C code when I could write Racket code? These are
currently done using Racket and, when necessary, FFI bindings.
Ryan
Would be good if someone does the end-all-be-all of sexp SQL syntax. If
someone else doesn't do it, eventually I will try.
Sexp SQL done at least 3 times for Racket that I know of. Two of those
are open source. One is in PLaneT, but I haven't looked at it closely.
http://planet.plt-scheme.org/package-source/soegaard/sqlite.plt/1/2/doc.txt
--
http://www.neilvandyke.org/
--
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE
Better speed (at least in theory; benchmarks would be required).
> It sounds like you want some kind of abstract SQL syntax. I'll probably try to
> do something like that.
Exactly.
> > 2. A generic library (probably written in C / C++) that provides all
> > the low-level trappings for #1.
> > 3. A set of drivers (written in C / C++), one for each RDBMS, that #2
> > uses when configured to talk to that particular RDBMS.
>
> Why would I write C code when I could write Racket code? These are
> currently done using Racket and, when necessary, FFI bindings.
I am a noob regarding FFI, so I don't know what must be done in C and what can be done in Racket. C is the usual way to go for this kind of thing in other languages.
> Ryan
--
Gonzalo Diethelm
Yes, that would be great!
> Sexp SQL done at least 3 times for Racket that I know of. Two of those are
> open source. One is in PLaneT, but I haven't looked at it closely.
> http://planet.plt-scheme.org/package-
> source/soegaard/sqlite.plt/1/2/doc.txt
Maybe this could be a starting point?
--
Gonzalo Diethelm
Racket's FFI is very cool. You can really do a lot in Racket proper
because of the way it works.
One big, fairly recent example:
http://blog.racket-lang.org/2010/12/racket-version-5.html
Robby
Not really (at least not I). What I want is pure direct access to data in tables (no ORM), but using a natural DSL that applies to all RDBMSs.
I am thinking about something more in the lines of what is shown here: http://java.dzone.com/announcements/simple-and-intuitive-approach
I pine for a DSL that applies to all RDBMSs (even if I have to modify my queries when switching back-ends), that does not force me to write SQL in a string and that gives me access to the DATA in my TABLES (that is, I don't care about hiding the fact that there ARE tables and columns underneath).
Best regards.
--
Gonzalo Diethelm
DCV Chile