[racket] Live coding with Racket?

292 views
Skip to first unread message

George Rudolph

unread,
May 29, 2014, 5:02:04 PM5/29/14
to us...@racket-lang.org

I’m interested in what people are using to do live coding

with Racket?

I have Fluxus 0.17 installed in “C:\program files” on Windows 8.1”.

What is the correct require statement to include fluxus libraries

in my code? I’m having path problems.

 

I also have supercollider installed separately for music,

and I would like to know what are the most current Racket libraries

for interfacing with Supercollider as well.

 

I am thinking about having students in my upcoming Programming Languages

course do one or more live coding exercises, perhaps

even a live performance at the end of Fall semester.
There are other live coding tools,

but I plan on teaching them functional programming using Racket, so why

not have some fun?  I’d be interested in any suggestions you all might have as to how to make that experience pleasant for all.

 

George Rudolph

Associate Professor of Computer Science

Department of Mathematics and Computer Science

225 Thompson Hall

The Citadel

171 Moultrie Street

Charleston, SC 29409

843.953.5032

 

Hendrik Boom

unread,
May 29, 2014, 6:02:08 PM5/29/14
to us...@racket-lang.org
On Thu, May 29, 2014 at 08:59:44PM +0000, George Rudolph wrote:
>
> I am thinking about having students in my upcoming Programming Languages
> course do one or more live coding exercises, perhaps
> even a live performance at the end of Fall semester.
> There are other live coding tools,
> but I plan on teaching them functional programming using Racket, so why
> not have some fun? I'd be interested in any suggestions you all might have as to how to make that experience pleasant for all.

Maybe there should be a htdp book that uses live coding and audio
instead of numbers or pictures?

-- hendrik
____________________
Racket Users list:
http://lists.racket-lang.org/users

John Clements

unread,
May 29, 2014, 7:09:15 PM5/29/14
to George Rudolph, Mustafa, us...@racket-lang.org

On May 29, 2014, at 1:59 PM, George Rudolph <rudo...@citadel.edu> wrote:

> <image001.gif>
> I’m interested in what people are using to do live coding
> with Racket?
> I have Fluxus 0.17 installed in “C:\program files” on Windows 8.1”.
> What is the correct require statement to include fluxus libraries
> in my code? I’m having path problems.
>
> I also have supercollider installed separately for music,
> and I would like to know what are the most current Racket libraries
> for interfacing with Supercollider as well.
>
> I am thinking about having students in my upcoming Programming Languages
> course do one or more live coding exercises, perhaps
> even a live performance at the end of Fall semester.
> There are other live coding tools,
> but I plan on teaching them functional programming using Racket, so why
> not have some fun? I’d be interested in any suggestions you all might have as to how to make that experience pleasant for all.

Regarding your supercollider question: Mustafa Khafateh, a student of mine, has ported Rohan Drape’s rsc3 bindings to Racket; these are available as part of the new racket package manager, using the name “rsc3”. These are an ongoing project, and we’d love to hear any feedback that you can provide.

More info at

http://pkg.racket-lang.org/

(including a link to the github repo, etc.)

John Clements

Asumu Takikawa

unread,
May 29, 2014, 9:58:06 PM5/29/14
to George Rudolph, us...@racket-lang.org
On 2014-05-29 20:59:44 +0000, George Rudolph wrote:
> I have Fluxus 0.17 installed in "C:\program files" on Windows 8.1".
>
> What is the correct require statement to include fluxus libraries
>
> in my code? I'm having path problems.

Is there any particular error you are getting?

Also, in case we're not able to debug your issue, there's a Fluxus
mailing list too:
http://lists.pawfal.org/listinfo.cgi/fluxus-pawfal.org

Cheers,
Asumu

George Rudolph

unread,
May 30, 2014, 9:02:53 AM5/30/14
to Asumu Takikawa, us...@racket-lang.org
Here's my code:
----------------------------
#lang racket
(require fluxus-017/drflux)

(build-cube)

------------------------
Here's the error
unsaved editor:2:9: collection not found for module path: fluxus-017/drflux collection: "fluxus-017....0.1\collects C:\Program Files\Racket\collects ... [151 additional linked and package directories]
#(23 17)

The fluxus documentation on its website was written back when
DrRacket was DrScheme, so I know a few details have changed since then.
So I guess my next question is how to make fluxus work with DrRacket,
or is there something "better"?

Matthias Felleisen

unread,
May 30, 2014, 11:34:26 AM5/30/14
to Hendrik Boom, us...@racket-lang.org

On May 29, 2014, at 6:00 PM, Hendrik Boom <hen...@topoi.pooq.com> wrote:

> On Thu, May 29, 2014 at 08:59:44PM +0000, George Rudolph wrote:
>>
>> I am thinking about having students in my upcoming Programming Languages
>> course do one or more live coding exercises, perhaps
>> even a live performance at the end of Fall semester.
>> There are other live coding tools,
>> but I plan on teaching them functional programming using Racket, so why
>> not have some fun? I'd be interested in any suggestions you all might have as to how to make that experience pleasant for all.
>
> Maybe there should be a htdp book that uses live coding and audio
> instead of numbers or pictures?


I intensely dislike 'fun' in education. It's like medicine; if it is bitter, it will heal you :-)




A lot of effort in US K12 education is about "getting students interested" and "making it fun and engaging." What saddens me to no end, is that this movement is swapping over into College. In my experience this desire to make classroom experiences "fun" is partly due to a lack of teacher training -- teachers don't know enough about the material to bring across their excitement and enthusiasm, intrinsic to the material rather than with extrinsic tricks and tools -- and only partly due to an unwillingness on the students' side to engage.

Having said that I think it is important to connect educational material to the real world and even making this connection "fun" -- as long as the introduction of this material does not overwhelm the key mission of classroom instruction, the teaching of principles that inform a person's life long ability to learn. I think I succeeded in creating a decent compromise with HtDP/2e and the mixing in off reactive programming and some decent batch programming. Going even further in the direction of "application" and "fun" would smother the design principles.

I think that this philosophy applies equally well to POPL courses; after all, it all started for me in those courses.


-- Matthias

Nick Shelley

unread,
May 30, 2014, 12:52:19 PM5/30/14
to Matthias Felleisen, users
As someone who learned correct programming principles from HtDP (out of classroom but with help from a PL professor), I'm glad it exists and I think it hit the right balance for me, and probably works well in classroom settings as well.

However, since I understand the value of HtDP from experience, I've since tried, unsuccessfully, to get multiple people to look into it to learn to program. These are people that have an interest in programming but not in school, have been through parts of www.codecademy.com and enjoyed it but can't seem to get into HtDP. My understanding after talking to them is that they get stopped by the wall of text with a bunch of numbers and an occasional picture of a cat or rocket ship. Even after getting them excited by showing them an animating rocket ship and how little code it took, they never get there on their own because there's too much to read and understand to get there.

My point is that although HtDP fits its target audience well, I think there's a different audience that Racket is missing entirely (even in the presence of things like Picturing Programs), the audience that wants to learn and be engaged with minimal reading. Whether that's an audience worth catering to is another question and one I'm not equipped to answer.

Matthias Felleisen

unread,
May 30, 2014, 12:58:27 PM5/30/14
to Nick Shelley, users

On May 30, 2014, at 12:50 PM, Nick Shelley <nickms...@gmail.com> wrote:

> the audience that wants to learn and be engaged with minimal reading. Whether that's an audience worth catering to is another question and one I'm not equipped to answer.


I am absolutely sure you are correct that this audience exists, I am equally sure it's growing, I expect someone will take care of them with spoonfuls of principles that they can eat for dessert, but I won't be me. The best I can hope for is that the person who delivers these bite-size pieces of principles will be informed by my ideas on how to get people to code properly.

George Rudolph

unread,
May 30, 2014, 1:12:22 PM5/30/14
to Matthias Felleisen, Hendrik Boom, us...@racket-lang.org
Matthias,
I agree with you--it's not our job to entertain students.
They may not even like our classes. It should be hard work,
and they should learn how to learn along the way.

I'm actually experimenting with an idea that live coding skills
can be useful as preparatory for developing cyberdefense skills.
Real-time interaction of a sort. Someone might argue that you can develop
those skills playing video games--but it's not the same thing.

Why would I choose this way? Honestly, I'm just exploring possibilities.
It may be a horrible idea. Certainly it will be if they lose sight of what
I'm really trying to teach.

George

Matthias Felleisen

unread,
May 30, 2014, 1:27:38 PM5/30/14
to George Rudolph, us...@racket-lang.org

On May 30, 2014, at 1:10 PM, George Rudolph <rudo...@citadel.edu> wrote:

> I agree with you--it's not our job to entertain students.
> They may not even like our classes. It should be hard work,
> and they should learn how to learn along the way.


It is perfectly okay to entertain students in the classroom.
As a matter of fact, I tell my 200 freshmen over and over again
that I am an entertainer who reminds them with interactive and
hopefully fun lectures what they should have read, studied, and
understood at this point in class -- on their own, from the text
book and in pair programming sessions with their partners. So no
I don't object to entertaining delivery or connecting with your
students on a personal level (I know their names after two weeks
and I remember a good number of them and greet them by name when
I encounter them).


I object to making material [acquisition] easy/fun/entertaining. I
object to pretty colorful pictures in text books. I object to
fast-paced delivery via our primary sensory mechanisms as opposed
to forcing the brain to do the hard work. Because I think there is
no other way to learn than engaging your brain actively.



> I'm actually experimenting with an idea that live coding skills
> can be useful as preparatory for developing cyberdefense skills.
> Real-time interaction of a sort. Someone might argue that you can develop
> those skills playing video games--but it's not the same thing.
>
> Why would I choose this way? Honestly, I'm just exploring possibilities.
> It may be a horrible idea. Certainly it will be if they lose sight of what
> I'm really trying to teach.



George, that is an experiment worth conducting. Report back to the list
on how it goes.

George Rudolph

unread,
May 30, 2014, 1:28:48 PM5/30/14
to Matthias Felleisen, Nick Shelley, users
Matthias,
The computer science/programmer purist in me agrees with you.
The pragmatist in me sees though, that "proper coding" is not only not
a priority for many people, it doesn't even show up on the list
of things that matter.

Should it? yes!
George
-----Original Message-----
From: users [mailto:users-...@racket-lang.org] On Behalf Of Matthias Felleisen

Matthias Felleisen

unread,
May 30, 2014, 1:35:33 PM5/30/14
to George Rudolph, users

One of my grads called me this morning, from Cambridge/England after trying three times to connect with me yesterday. I hadn't talked to him in 10 years.

[[ He called to say that (1) his Amazon interviewers loved everything on his CV that I had suggested to him way back -- but that's the unimportant part. Good students know and acknowledge where they learned the relevant stuff. ]]

He called to say (2) that he had been asked to interview 85 people for Amazon recently and that it confirmed all my predictions I had made to him as he grew up with me. These people graduate from "Java is all there is you need to know" so-called universities; they know the syntax; they know the JDK and SDK; they know Eclipse menu entries; they know some keyboard short-cuts; but they don't know any concepts. They can't think. They are unlikely to make a positive contribution and cannot be recommended.

So perhaps it's not on people's list, but it is on the list of second-level interviewers at shops that understand the value of software.

-- Matthias

John Clements

unread,
May 30, 2014, 1:50:36 PM5/30/14
to George Rudolph, us...@racket-lang.org

On May 30, 2014, at 6:00 AM, George Rudolph <rudo...@citadel.edu> wrote:

> Here's my code:
> ----------------------------
> #lang racket
> (require fluxus-017/drflux)
>
> (build-cube)
>
> ------------------------
> Here's the error
> unsaved editor:2:9: collection not found for module path: fluxus-017/drflux collection: "fluxus-017....0.1\collects C:\Program Files\Racket\collects ... [151 additional linked and package directories]
> #(23 17)
>
> The fluxus documentation on its website was written back when
> DrRacket was DrScheme, so I know a few details have changed since then.
> So I guess my next question is how to make fluxus work with DrRacket,
> or is there something "better”?

I don’t know about the current state of fluxus, but I’m suspicious about your collections path, in which it appears that fluxus is not preceded by a C:\…”. This doesn’t seem like a good idea, and it sounds like the fix might be to make your collections path consist of absolute paths.

John

George Rudolph

unread,
May 30, 2014, 1:56:56 PM5/30/14
to Matthias Felleisen, users
And that's the primary reason why, even though Java 8 has lambda expressions,
I plan to continue teaching functional programming concepts using Scheme/Racket.
One of my seniors, who just graduated, asked me a few weeks ago if I was going to continue
using Racket, or switch to Java in my course. I told him they need to use other tools and environments.
They need to see problems and solutions and concepts from an entirely different
perspective. It's more than just learning to code algorithms in Java vs. Scheme, etc.

George
-----Original Message-----
From: Matthias Felleisen [mailto:matt...@ccs.neu.edu]
Sent: Friday, May 30, 2014 1:34 PM
To: George Rudolph

George Rudolph

unread,
May 30, 2014, 2:56:30 PM5/30/14
to John Clements, us...@racket-lang.org
Well, there is no "collects" subdirectory under fluxus,
and I've tried absolute paths. I have fluxus installed
under "program files" as indicated in the fluxus manual.

Obviously, something is not correct with the path.
I was hoping someone would know what the correct path is.

the package manager installed something, but gave errors when it
ran as well.

-----Original Message-----
From: John Clements [mailto:clem...@brinckerhoff.org]
Sent: Friday, May 30, 2014 1:49 PM
To: George Rudolph
Cc: Asumu Takikawa; us...@racket-lang.org
Subject: Re: [racket] Live coding with Racket?


On May 30, 2014, at 6:00 AM, George Rudolph <rudo...@citadel.edu> wrote:

> Here's my code:
> ----------------------------
> #lang racket
> (require fluxus-017/drflux)
>
> (build-cube)
>
> ------------------------
> Here's the error
> unsaved editor:2:9: collection not found for module path:
> fluxus-017/drflux collection: "fluxus-017....0.1\collects C:\Program
> Files\Racket\collects ... [151 additional linked and package
> directories]
> #(23 17)
>
> The fluxus documentation on its website was written back when DrRacket
> was DrScheme, so I know a few details have changed since then.
> So I guess my next question is how to make fluxus work with DrRacket,
> or is there something "better"?

I don't know about the current state of fluxus, but I'm suspicious about your collections path, in which it appears that fluxus is not preceded by a C:\...". This doesn't seem like a good idea, and it sounds like the fix might be to make your collections path consist of absolute paths.

John Clements

unread,
May 30, 2014, 5:07:27 PM5/30/14
to George Rudolph, racket

On May 30, 2014, at 11:54 AM, George Rudolph <rudo...@citadel.edu> wrote:

> Well, there is no "collects" subdirectory under fluxus,
> and I've tried absolute paths. I have fluxus installed
> under "program files" as indicated in the fluxus manual.
>
> Obviously, something is not correct with the path.
> I was hoping someone would know what the correct path is.
>
> the package manager installed something, but gave errors when it
> ran as well.

Wait… you installed it using the package manager? I don’t see fluxus in the package manager or on PLaneT.

John
Reply all
Reply to author
Forward
0 new messages