Live data from Hacker News

Pyret – A language exploring scripting and functional programming

pyret.org

151–160 of 272 posts

Re: Pyret – A language exploring scripting and functional programming

#151
I really like this sensible policy:

Some thoughts on syntax

We believe indentation is critical for readable code, but we don't want the whitespace of the program to determine its meaning. Rather, the meaning of the program should determine its indentation structure. Indentation becomes just another context-sensitive rule.

Unambiguous syntax (the reason for explicit end delimiters) means you can copy-and-paste code from email or the Web, and its meaning won't change. Your IDE can help you reindent code without worrying that doing so will change the meaning of the program.

Re: Pyret – A language exploring scripting and functional programming

#152

Earlier quoted context omitted.

What about a 'teaching' OS/compiler/toolchain vs. the 'real' thing? e.g., a stripped-down OS kernel with minimal clean code optimized for teaching vs. throwing someone into Linux source. or a teaching-oriented compiler vs. wading into GCC/LLVM? Teaching languages/OSes/compilers/toolchains (if done well) lower the barrier to entry while providing a conceptual transition path to learning 'real' stuff later on the job.…

In my OS course we were taught using Linux.

Sure, there are advantages to both approaches, if done well. But I bet that diving into Linux first would make it really hard for beginners to get a deep grasp of core concepts; may be fine for more advanced learners. e.g., the scheduler is probably 10,000,000,000 lines of complexity when the core scheduling algorithm probably fits on one page of code.

Re: Pyret – A language exploring scripting and functional programming

#153
post #52

I've never understood the idea of a 'teaching' programming language. (Modulo examples like Logo and Scratch, which offer much more than a language as part of a wider teaching/computing system.) You spend all this time ramping up on a language, toolchain, library, etc, that you will eventually be unable to leverage beyond a certain point since it is not one used by everyday programmers. The delta in "quality learning"…

This paper ( http://cs.brown.edu/~sk/Publications/Papers/Published/fffkf-... ) linked from "Why Pyret" ( http://www.pyret.org/pyret-code/ ) is a long answer to "why teaching languages." It may also be useful to know that Pyret exists as part of a larger project and community. We're using Pyret to develop curricula for Bootstrap ( http://www.bootstrapworld.org/ ), which integrates computing curricula into existing mid…

So Pyret is attempting to help solve the very real problems engaging kids and supporting teachers through creating a toolchain and teaching materials based on real research.

Is there a way to make a donation to this project?

Re: Pyret – A language exploring scripting and functional programming

#154
post #74
post #42

Earlier quoted context omitted.

Pyret is inspired from Racket, which starts at step 1 with functional programming. It's not about readability or getting people to learn as fast as possible to write basic code, but to try and teach core program design principles easily and build a solid base within a single semester. The syntax is not as clean as Python, but it offers much more clarity in terms of testing, signatures, and offers a very interesting m…

If the goal is to teach functional programming with testing and signatures, is the awkward syntax (that isn't really very close to C#, Java, or Python) better than a set of macros on top of typed Racket? It seems like it'd be easy to define a typedracket-derived #lang where you had to write: (define (sum a b) : [-> Integer Integer Integer] (where (= (sum 0 1) 1) (= (sum 2 2) 4)) (+ a b)) And make the type signature a…

The syntax looks really Haskell to me, so it's not that awkward.

Re: Pyret – A language exploring scripting and functional programming

#155
I've long thought that Haskell is much more intuitive than any engineering languages out there for people with no programming experience, since it builds on mathematics that everyone has already learned. It's great to see functional programming placed at the center of intro-level programming teaching.

Re: Pyret – A language exploring scripting and functional programming

#156

Every time I see a project pop up touted as being simple and a good "teaching language", it has some weirdness or pet features thrown in that turns enough people off to keep adoption low. If you want a good teaching language which will receive substantial adoption, do this: * syntax-wise, use curlies and semicolons like C, Java, Perl, JS, etc. * use many of the good function names that Perl uses. * have all variables…

Thanks for the advice! What are some examples where a teaching language has followed these points and succeeded?

What is the weirdness and/or pet features you see in Pyret?

Re: Pyret – A language exploring scripting and functional programming

#157
post #14

Example from the OP: fun to-celsius(f): (f - 32) * (5 / 9) end What's the justification for allowing the use of hyphens/dashes in reference names, when underscores would seemingly provide the same purpose? One of the most common problems I notice in newbie code is inconsistency in using whitespace, e.g. `a-b` vs `a - b`, though in that situation, for Python and virtually every other language I've used, those both res…

I love hyphenated symbols. It's so much easier to read than camel or Pascal-casing. As another poster pointed out, using whitespace between subtraction variables and the minus sign is just a non-issue in practice.

Re: Pyret – A language exploring scripting and functional programming

#158

Earlier quoted context omitted.

This paper ( http://cs.brown.edu/~sk/Publications/Papers/Published/fffkf-... ) linked from "Why Pyret" ( http://www.pyret.org/pyret-code/ ) is a long answer to "why teaching languages." It may also be useful to know that Pyret exists as part of a larger project and community. We're using Pyret to develop curricula for Bootstrap ( http://www.bootstrapworld.org/ ), which integrates computing curricula into existing mid…

So Pyret is attempting to help solve the very real problems engaging kids and supporting teachers through creating a toolchain and teaching materials based on real research. Is there a way to make a donation to this project?

Yes! You can contribute to the Bootstrap project directly:

http://www.bootstrapworld.org/contribute/index.shtml

Re: Pyret – A language exploring scripting and functional programming

#159

Earlier quoted context omitted.

The idea is that the concepts of CS are universal, regardless of programming language. So instead of using a programming language that has been designed for real world use (carved with the footprints of a thousand language hackers, full of awkward inconsistencies, warts, and good-enough-for-nows), teach in a teaching language - a programming language that is very regular, with very simple semantics, not necessarily d…

If they are universal, what is wrong by using a reall word language? >"full of awkward inconsistencies, warts, and good-enough-for-nows" can not agree with 'full'. but Is there a teaching language better? I do not think so.

Compare CL to Scheme. One was designed for Real Work, the other for PL research and teaching. The difference is stark.

Re: Pyret – A language exploring scripting and functional programming

#160

Every time I see a project pop up touted as being simple and a good "teaching language", it has some weirdness or pet features thrown in that turns enough people off to keep adoption low. If you want a good teaching language which will receive substantial adoption, do this: * syntax-wise, use curlies and semicolons like C, Java, Perl, JS, etc. * use many of the good function names that Perl uses. * have all variables…

A new language created: branchly
Post reply on HN