Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I built a programming language for beginners (dip-lang.org)
25 points by raghav_nautiyal on July 7, 2020 | hide | past | favorite | 28 comments



As someone who teached programming to many people on and off for the last 25 years, I still think nothing beats LOGO or Scratch. No tooling problems, no braces (in Scratch), no complicated syntax (what does "->" mean?). A programming language for beginners is NOT a dumbed down version of your functional/OO language of choice.

Turtle graphics helps people deconstruct problems into smaller parts - the essence of programming - and abstract over your solutions to solve more general problems. As a second step I use some IoT board with Scratch so people can turn on LEDs or react to sound which makes them motivated.

My first teaching 20y ago was with Java and it was a disaster. People struggled with the tool, syntax errors, semantics, braces and in the end could write some Java programs but did not understand what programming was about and could not solve their own problems.

+ Several submissions on one day.


As a hackathon project I made a language[0] inspired by LOGO but using Unicode characters for the drawing primitives (presumably children could have some physics buttons or GUI to insert them). It also has support for loops and subroutines but otherwise it's a limited DSL like LOGO.

[0] https://github.com/siraben/vpl


That sounds great! Will definitely give it a try!


Though most overlook it and/or consider it a toy language, Logo is a good educational language while remaining powerful. See for example [1]. It is also used beyond learning with some implementations specialized in agent-based modeling.

[1]: https://people.eecs.berkeley.edu/~bh/logo-sample.html


LOGO is a Lisp, which is what makes it great. I owe my entire programming career to learning LOGO as a kid.


Thanks! I'll try my best to improve.


I learned with turtle graphics and similar things. For me the visual aspect was really important and fun!


The visual aspects is very important to beginners, they get immediate visual feedback of the effects of their program. Cause (code) and effects are very easy to see.


As you developed it, did you workshop it with people who were actually beginners to programming?

I'm not a beginner, so maybe I'm wrong here, but it doesn't look that much simpler than python to me.


I’m not a beginner, either, but IMO, the documentation will lose you some, potentially many, beginners very soon.

In particular, I think “The above line is Dip's way of letting you know that you've created a function called greet” moves too fast, even if your beginners have math training. It likely won’t be clear to beginners that this is similar to functions in mathematics, and it introduces too many new things (what’s that -> about? What is print?)

I would teach users about variable assignment and reassignment (assuming those can be done from the REPL, but if they can’t, fix that first) before introducing functions. That way, you can introduce functions as helping against having to repeatedly type the same characters.

You probably can find a way to introduce print before functions, too (e.g. as a way to show multiple items on a single line)

The suggestion to sit with absolute beginners going through the tutorial is great. I expect it would uncover tripping points you aren’t aware of.

Edit: I also think using a calculator as the example program isn’t a good choice. New users already have a better calculator the moment they start the REPL.


I think the supporting documentation will be the key.

I have seen "start coding in a day" courses, that used Python (a robust language) to teach complete beginners from scratch.

In fact, I once attended a demo of a scholastic programming courseware app that had most of the people in the room (primarily K-12 teachers in their 30s) doing "Hello World" Python apps in about fifteen minutes, and understanding what they did, in about half an hour.

It was all in the presenter and the design of the site.

I have no idea if the app ever took off. That was about three years ago.


My favourite teaching program is a “higher or lower” game. You get the computer to randomly generate a number between 1 and 100 and the user has to guess. They then get told if they’re too high or too low.

That program teaches variable assignment, loops, conditionals, mathematical comparisons, input and output. It teaches the difference between numbers and strings too. But it’s also a short program, fun to play, and easy enough for people to hack so they can alter stuff on there to subtly change its behaviour (eg the messages printed to screen, the range of numbers randomly generated, etc).

I’ve had good success using that program for a range of different age groups and capabilities.

Edit: just to add, we would cover the basics about variables etc first before moving on to that game. But that would be the first “useful” program they’d write.


I will put that in as well :) Thanks


Thanks for the feedback! I hope to keep improving this!


For comparison someone can see in [1] the examples written in Python. One thing which I found strange is that you access values in list with /.

[1]: https://pastebin.com/Gm7qvF6c


This is pretty cool.

I'd gently suggest having a bit more explanation as to things like syntax and whatnot, on the front page (I had to dig into the documentation to find it), but I am an experienced programmer, so what I want may not actually be good for the project.

What really started it for me, was a HeathKit (remember them) programmable calculator that I brought in the 1970s.


Thanks! Did you check the learning path? Maybe that would clear it out!


I'll check. I've just skimmed it, so far.


Hello. A few weeks ago, I had posted a very basic version of a programming language that I put together, called Dip. I was blown away by the kind and honest feedback given by the community, and have worked on it, adding examples of Dip code so users can get to know the language, adding a learning path for beginners so that they can learn how to code in a streamlined fashion, and also changing the site to match the language’s identity.

So now, I (re)introduce you to Dip, a small project I’ve been working on, which also happens to be a programming language targeting beginners. I’ve tried to make the syntax easy to understand, and also tried to make the language easy to read and write for complete beginners. I've tried to eliminate a few issues the Python language has (such as indentation and error messages), though it is up to you to see to what extent Dip succeeds. I’ve also tried to allow Dip to communicate with Python, so users are not limited to Dip’s features, because the way I see it, Dip is not meant to compete with Python, and does not aim to, but I think Dip’s simpler syntax and error messages might be useful to beginners in some cases and get them up the learning ladder, and I would love to see Dip being used as a stepping stone by the Python community, learning the ropes using Dip, and then moving on to Python.

You can look at Dip’s website at dip-lang.org.

I would love your feedback on how I could improve the language.

Also, if you wish to contribute to this small venture of mine, feel free to help me with the core language or the site on Github.


Maybe I'm overlooking it, but it seems there is not link the the repo on the homepage.


It's there in the contribute section!

Here you go: https://github.com/raghavnautiyal/Dip/


Wouldn't it be easier for someone to learn a language when there are a lot of books, resources, YouTube videos and online courses available?


It would. That's why I think Dip should be used by beginners to get a grasp of programming concepts and syntax, and then move on the languages like Python! That's why I've built a learning path as well, that teaches the basics and then moves on to say how to transition to Python!


I understand what you are trying to do and it looks like you put in a lot of work but I think that the page is not doing a good job of guiding people through the course. Right now I think the website is very confusing to navigate and it's not guiding people through very well.

I also disagree with the assumption that your own language makes it easier to understand the concepts of syntax.

If it's just JS and people can watch a video about "what does let do in javascript" on YouTube or google "what's a loop in javascript" that makes it easier to understand these basic concepts if you have access to a big variety of explaining the same thing from various angles. I don't think having a "fake" language to learn it is making it any easier. There's a reason people learn JS or Python in school where there's also a lot of editors / resources that can be used even if they are curated in a way to help a total beginner.


Thanks! I'll try my best to improve


Story: I went to a user test interview for Mavo (which also caters to beginners). I'm a UI designer and I work in frontend scripting (HTML+CSS). I did my first hello world in Turbo Pascal almost 15 years ago so I'm NOT a beginner and I can understand code. the Mavo interview consisted of basic programming concepts. It made me sweaty and I felt like the dumbest baby user because of the expected timeframe to answer questions.

Presenting a FUNCTION to a beginner IS overwhelming (even tho you wouldn't feel overwhelmed as an avid developer).

Advice: Sit down with actual beginners and watch them trying to start a project using dip language. you'll learn so much about how far away from 'beginner friendly' you are (from a practical pov) :(


Thanks! I'll try my best to improve


"You can evaluate expressions by writing them after "

What true beginner programmer is even going to know what this means?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: