Live data from Hacker News

Pyret – A language exploring scripting and functional programming

pyret.org

211–220 of 272 posts

Re: Pyret – A language exploring scripting and functional programming

#211

Earlier quoted context omitted.

Racket is still immature, still has a focus on education, and has more than enough warts of its own. For that matter, so does Scheme: It just has less of them. Which has its problems. Oh, and Racket is in no way as good for Real Work as CL. It doesn't have the libraries, and it sure as heck doesn't have perf.

Says you, and many disagree, including Racket's commercial users. But of course it's pointless arguing with a CL fanatic (I learned that two decades ago on c.l.s, and looks like nothing has changed), so please do go ahead and have the last word.

Gladly.

>including Racket's commercial users.

A language doesn't need maturity to have commercial use. Rust had commercial adoption pre-1.0, and that adoption is increasing. Rust is also nowhere near mature.

Racket being built in part for education is also undeniable. Look it up.

Racket's library support vs CL's is highly debatable. Neithet is ideal, but both are "good enough," so let's leave it at that.

As for Racket's perf, that's just a fact. Look at Racket, then at SBCL. Then at Racket. Then at SBCL. Sadly, it isn't SBCL. But if it started doing native code compilation, maybe it could be a bit more like SBCL.

This is also true of Scheme: Some of the Schemes are much faster than Racket, for many of the same reasons (many of them aren't as fast as SBCL, as I understand it, although I haven't run the benches, so I can't be sure).

This doesn't make Racket a bad language by any stretch. I don't happen to like it, but that's just preferential: there's nothing unambiguously bad about it AFAICT. In fact, it's quite well designed.

>a CL fanatic

Crap. You got me. All that time I spent arguing with lispm that yes, Scheme is a Lisp, explaining to people what Scheme is and why it's cool, explaining that yes, Hygienic Macros are a good idea, and no, that doesn't just mean declarative macros ala syntax-rules, there are imperative systems that do the same thing, discussing the differences between Racket and Scheme, and why I think they matter, but you can choose either, depending, writing CHICKEN Scheme macros, barely tested (because I was busy), on my cellphone, and so on, was just a ruse. I've really been a CL user all along. /s.

While there are things I love about CL (and I've even considered moving to it for various reasons, despite it being an uglier language - although in some ways also a more practical one), and things I hate about the Schemes - CHICKEN in particular (familiarity really does breed contempt! At least a little...), I still think that Scheme is a beautiful language.

While I don't think I'm a fanatic for anything, if I am a fanatic, I'm a Scheme fanatic, not a CL one. I have, as I've mentioned above, argued a lot with CL fanatics on This Very Forum.

Idiot, I'd take with a grin. Incompetant, with a smile (I may well be). Possibly misinformed? I'll downright admit it.

But a CL Fanatic? That's not just a stretch, it's flat-out wrong.

Re: Pyret – A language exploring scripting and functional programming

#212
post #164

Earlier quoted context omitted.

I rephrase your post in my head: The value of an education-oriented programming language is a boost to X education outcome relative to competing alternatives, and that "avoiding specific complexities" would be the mechanism by which to achieve your outcome. Therefore, (Pyret intervention) -> (educators don't struggle with language complexities) -> (education outcome) But first I want to know that there's even a diffe…

I think you are intentionally simplifying my statements, and the intents of educators, in an intentionally disingenuous way. If you are not being malicious, then I apologize, but the only way I can interpret you seems to indicate you have an axe to grind. Let me provide an example of a language complexity that hinders education, presuming education cares about things common to many languages like function, types, con…

> I think you are intentionally simplifying my statements, and the intents of educators, in an intentionally disingenuous way.

You're telling me that:

(Pyret intervention) -> (educators not struggling with complexity) -> (education outcome)

was so bad you think I'm dishonest? And you think that's the "only way" you can interpret the situation? And just in case you're wrong -- sorry?

1. Proposing a causal relationship: (independent variable) -> (dependent variable)

2. Proposing complexity: (independent variable) -> (mediating factors) -> (dependent variable).

This is a fucking good start to any policy conversation. Where else do you find this online?

Re: Pyret – A language exploring scripting and functional programming

#213
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 first language that I learned was a "teaching" language: BASIC. That was in ~ 1981. A potential advantage at the time was that BASIC tended to be a completely self contained environment, meaning that you didn't have to assemble things like build tools and libraries. "Hello world" was one line of code, you entered it, and it ran. And at that time, just dealing with the tools -- typically on a mainframe -- was the…

I first started getting into programming using flash and actionscript. I think having a self-contained environment is incredibly important for beginners. When I started trying to learn rails a few years later I got completely hung up on getting a dev environment up and running since I was new to unix-like environments, and I didn't come back to it for several more years. I can't imagine trying to get into front-end development as it is today with all its constantly shifting dependencies while also trying to learn how to code and how to stand up a server.

Re: Pyret – A language exploring scripting and functional programming

#214

Earlier quoted context omitted.

An infix language could also require whitespace around operators, so that a-b could be a an identifier. Like in a Lisp infix macro: (infix (a + b * c) / d). This kind of thing is quite habitable: we hardly lose sleep over (3.4) the list of one float versus (3 . 4) the dotted pair of integers.

I'd say that white space requirements around operators even seems implicitly consistent with the Pythonic idiom of semantic white space and the Pythonic dictum of only one way to do things.

Python has many ways to do just about everything (e.g., list comprehensions are completely redundant). It's a nice marketing slogan, though.

Re: Pyret – A language exploring scripting and functional programming

#215

Earlier quoted context omitted.

There's more to it; making whitespace significant makes it harder to read in print and when presented with non-monospace fonts on-screen. Even without these caveat, it's still a bit harder to visually process. It's like the = vs == problems. It's easy to get right, you almost always get it right, but it's close enough to cause errors and requires extra concentration effort. Other lisp-ism: gratuitous abbreviations. I…

it's kind of interesting because originally my comment was a stronger defense of hyphens then when I compared it to Case sensitivity I actually back tracked. Ada for instance specifically considered then rejected case sensitivity because they had a (at least one) study that said case sensitivity was a source of errors. I don't know how well instrumented the pyret courses are but I would be very if they have studies o…

Pyret's implementation is by design very privacy-preserving (we don't just quietly make a copy of everybody's code, people have to explicitly share copies — we don't want to freak out students by surveilling them). But we do have some data that students have given us. In those data, we do not find evidence of case-sensitivity being a problem.

Re: Pyret – A language exploring scripting and functional programming

#216
post #125

As someone who teaches coding to beginners for a living (I founded One Month and I teach Python to business students at Columbia University), this language looks really intimidating to beginners. Maybe Pyret isn't for beginners, and it's intended to teach people who already have some basic knowledge more advanced concepts like functional programming. That's fine. But to a total beginner, the syntax of Pyret is defini…

>> Maybe Pyret isn't for beginners, and it's intended to teach people who already have some basic knowledge more advanced concepts like functional programming I often hear people say that functional programming is advanced concept. I think students are able to learn functional programming as their first model of computation, before they are even exposed to Turing machine computing. It's not like you have to first lea…

Many of our functional programming students are ~12 years old, and have not yet been exposed to any other textual programming language. They handle it just fine. They don't write lambdas, but they do actually use functions-as-values (without fully realizing it). It's really not a big deal, except for people who were taught otherwise and don't realize the fog that permeates their thinking!

Re: Pyret – A language exploring scripting and functional programming

#217
post #5

Honestly imo Python is the best language to start with for learning. It has all the basic constructs of both functional and object oriented programming in plain english without a bunch of syntax to worry about. I personally think it's the most readable language. it's also quite intuitive imo. Lastly, there's a fantastic community and instant help is available for all skill levels but especially beginners on #python o…

No, Python doesn't actually have a lot of things you need in education. See https://news.ycombinator.com/item?id=13189513

Re: Pyret – A language exploring scripting and functional programming

#218
post #32

Earlier quoted context omitted.

> Well not really, we need better teachers and methods for teaching programming and computing. I think most of the Pyret developers would agree wholeheartedly! To this end, the Pyret development team works closely (and in some cases, overlaps) with Bootstrap [1], a nation-wide program to teach programming to middle school students. The feedback we get from these teachers (and the process of teaching teachers) directl…

Is there a good quality MOOC on Pyret? I am not in high school but am not a programmer either. I started using DrRacket MOOC fairly recently on Edx and had no idea about Pyret until today. My interest in finding good quality teaching, led me to Racket, all the way from the hype of Python/Ruby, and anyone else in between. I am trying to follow Racket but now I am confused between Racket and Pyret.

Confused? Don't be! If you're happy with Racket, stay there. Racket is absolutely awesome. If you're using Gregor Kiczales's MOOC, you're learning from an absolute master. Pyret also has many things to offer, but you can sample them after you're done with the EdX MOOC. Come over to the Pyret list [http://www.pyret.org/discuss/] and drop us a note, and we'd be happy to guide you through.

Re: Pyret – A language exploring scripting and functional programming

#219

Unexplained important things: * concurrency, is there any nice built in syntax like Python async? Any kind of threading? Multiprocessing support? * error handling, how is it done? Where are exceptions? * standard and file io, string operations, serialisation? * no builtin higher math types (matrix etc.), is math done on decimal floating point numbers? * foreign functions, interfacing with other languages, embedding?

Judging from the red/blue colors in the logo and that the website was generated with Frog, I assume that once you feel too big for Pyret's shoes you'll discover that you've actually been using Racket all along and will start using the Racket language directly.

Except note that Pyret is not implemented atop Racket. It used to be (a #lang) but that proved not suitable for our needs, so we built a very sophisticated run-time system on top of JavaScript. Pyret now compiles to JavaScript entirely in the browser (and Pyret's compiler is written in Pyret itself, so it's all bootstrapped goodness).

That said, Racket is indeed a fantastic next language after Pyret. I myself constantly switch between the two.

Re: Pyret – A language exploring scripting and functional programming

#220

Earlier quoted context omitted.

Is there a good quality MOOC on Pyret? I am not in high school but am not a programmer either. I started using DrRacket MOOC fairly recently on Edx and had no idea about Pyret until today. My interest in finding good quality teaching, led me to Racket, all the way from the hype of Python/Ruby, and anyone else in between. I am trying to follow Racket but now I am confused between Racket and Pyret.

There is no MOOC I know of that uses Pyret (yet). Racket is great! If you're already deep into Racket, I wouldn't say stop to try Pyret unless you particularly have the goal of learning more languages, or there's something about Pyret that really gets you interested. We taught a programming languages course that uses Racket back in 2012, but all the material is still online: https://cs.brown.edu/courses/cs173/2012/ S…

Thank you. I am not deep into Racket yet, but it requires concentration which I lack at the moment. Based on your suggestion, I'm going to stay focused and attempt to complete, instead of distracting myself.

I started reading HtDP2e before finding the Edx. The MOOC helped reinforce what I was reading. I realized that through Racket, learning to program is a superior experience. This, compared to any other (popular) languages, people are teaching (or coding on the screen). I spent too much time watching people code. People attempt to teach online, but most of them lack the traditional pedagogy. They know how to code, but they don't necessarily know how to teach.

The only exception I would make to above (as far as what I know right now), is Harvard's CS50.

Post reply on HN