Live data from Hacker News

Pyret – A language exploring scripting and functional programming

pyret.org

171–180 of 272 posts

Re: Pyret – A language exploring scripting and functional programming

#171
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"…

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…

> designed for real world use (carved with the footprints of a thousand language hackers, full of awkward inconsistencies, warts, and good-enough-for-nows)

Everything you mention here is a consequence of age not intent for real use.

An old teaching language would be just as bad if those are your only criteria.

Re: Pyret – A language exploring scripting and functional programming

#172
post #88

What's the point? One would hope they start with a description of why this is better for education than something like Python. I just gave it a quick glance, and it looks like many other programming languages - a bunch of odd text gibberish. I don't think the problem dividing people into "gets it" and "doesn't get it" has anything to do with nuances in syntax or semantics.

Despite what the down voters think, I actually found this comment useful because I had the exact opposite reaction. I took a quick look at the examples, saw familiar syntax and features and quickly concluded it looks like a nice toy, but I'd probably never use it because there are way too many unknowns (Performance, runtime, buggy, etc. etc.). I was actually a little flabbergasted when you said it looked like "odd te…

It isn't designed to be for student who have “sharpened” their teeth on Java or Python. Nor does it claim to be. And that paragraph you quote is written for educators, not for students.

Re: Pyret – A language exploring scripting and functional programming

#173

Earlier quoted context omitted.

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.

A teaching language doesn't have mounds of legacy code constraining its evolution.

Just mounds of legacy documentation and teaching materials.

Re: Pyret – A language exploring scripting and functional programming

#174
post #46

> Functions can end in a where: clause that holds unit tests for the function. These assertions are checked dynamically. Wouldn't it be even better to check these statically, such that a program with failing unit tests doesn't even compile? There may be tests that can't be checked statically, but I think these wouldn't quality as unit tests anyway. (These would be more at the level of integration tests.)

Tests are, by definition, checked dynamically. And setting aside terminology, there's a small issue called the Halting Problem that makes most tests unable to be checked statically.

Re: Pyret – A language exploring scripting and functional programming

#176
post #33

I'm somewhat confused by the indentation rules. Is this code valid? fun abc(d): d+1 end

Yes, Pyret is totally indentation-insensitive.

FOR NOW. We have a plan for making the indentation checked but it's not been our top priority, but it is on our stack. Languages take a while to cook. Welcome to the kitchen. (-:

Re: Pyret – A language exploring scripting and functional programming

#177
post #114

Earlier quoted context omitted.

Languages such as C, Java, Python, and Rust are usually designed by experienced programmers in industry, for experienced programmers in industry. Pyret, on the other hand, is designed by computer science educators, for computer science education. This does not preclude Pyret from being a useful language for general-purpose programming; it just means that language design decisions are driven foremost by pedagogy. For…

> Languages such as C, Java, Python, and Rust are usually designed by experienced programmers in industry, for experienced programmers in industry. Pyret, on the other hand, is designed by computer science educators, for computer science education. Honestly, looking at the examples on the Pyret main page makes me think that this isn't a good approach at all. I have been in software engineering for many years now and…

I think that's taking it a bit far. I especially don't see how being explicit about the problem you're solving (teaching computer science to newcomers in a collegiate setting) and focusing the effort towards that problem and iterating on the methods used to teach it (building better tools and iterating without importing unnecessary baggage) is "actively harmful."

Simply looking at text in a different language is not going to impart magical understanding. Things you haven't actually used in a non trivial program will seem complex at the beginning. And sure, you can rationalize that away by treating this like a special case, but it's just a general bias in our brains. And depending on your background, certain languages may seem more complex than others due to simply lack of exposure.

I'd rather propose putting it up to a damn test. Compare the computer science knowledge of outgoing students to other students in similar circumstances who were taught using a practical, heavily-used-in-industry language. Use a short test maybe, along with interviews to get at qualitative unknowns. The results of that could then be used to pick the best strategy to teaching going forward.

But also, in general, why not try to solve the problem better, without pre-supposing all the sunk costs and existing ideas? And not everything needs to be on the freaking altar of industry either. It's not like your college implementation of heap sort is gonna be mainlined in a company and used forever more. What're you optimizing, the couple of weeks it'd take for someone who already knows this to learn python? You already saved it probably by skipping the b.s. until it actually became relevant to learn about.

Re: Pyret – A language exploring scripting and functional programming

#178
post #3

> "while exploring the confluence of scripting and functional programming" Scripting and functional go amazing together, as long as it's (mostly) dynamic typing. In general, types really just get in the way when scripting or prototyping or trying to do anything fast, especially when you don't know the types of data you're going to be working with ahead of time, e.g. when it comes from a file or from an external API,…

`BinTree` is a type. There are two kinds of BinTrees. There are `leaf` BinTrees and there are `node` BinTrees. A leaf has no fields. A node has three fields. Thus, here are some BinTrees:

  leaf
  node(1, leaf, leaf)
  node(2, leaf, node(1, leaf, leaf))
and so on.

Re: Pyret – A language exploring scripting and functional programming

#179
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"…

Languages take a while to develop. Pyret will develop over a long time. Over time, it will surely grow to be much more than what it is now. But while it's growing, we need to chart a growth path. That path is dictated by the constraints of teaching computer science to beginners and slightly-more-than-beginners.

Every language you name and love and use had a growth path. This, ironically, includes Python, which also evolved from ABC: a teaching language.

Re: Pyret – A language exploring scripting and functional programming

#180

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…

> designed for real world use (carved with the footprints of a thousand language hackers, full of awkward inconsistencies, warts, and good-enough-for-nows) Everything you mention here is a consequence of age not intent for real use . An old teaching language would be just as bad if those are your only criteria.

But this doesn't happen to teaching languages. Because they don't have to work with real applications, they can change, and do their best to stay clean, and they be very minimalist (like Scheme), and only specify the bare minimum, ensuring a clean learning environment.
Post reply on HN