You are viewing archived messages.
Go here to search the history.

Kartik Agaram 2024-10-21 07:39:19

Emacs-style ranges on a text buffer that I can now hang attributes like color, decorations and click handlers on to.

The final complexity cost was 200 lines but it was a non-linear path getting there. I went up to 500 lines before starting from scratch with a new approach.

Earlier this year I threw out an implementation after suffering with it for 2+ years. It feels like I'm getting the hang of this programming thing that I threw out an implementation after 2 days.

🎥 attributes.webm

Tudor Girba 2024-10-22 04:39:58

Beautiful! I can very much appreciate the non linear effort that goes into such an editor. Can you also add an attribute that hides that part of the text, or that replaces it with another and still keep wrapping at the end of the visible line?

Kartik Agaram 2024-10-22 04:54:22

Not yet, no. But it's an interesting idea I hadn't considered. So far I only know how to conceal or replace text based on syntax rules.

Tudor Girba 2024-10-22 04:59:31

I think mixing the two modes could be an interesting next step 🙂

Kartik Agaram 2024-10-26 17:25:45

I've been getting back into teaching kids programming. Of course, this time using Lua, LÖVE and Carousel. After a couple of months, it occurred to me to collect all my little impromptu puzzles and exercises into a single app anyone can go through on their own schedule.

Carousel cards (LÖVE app, really just a zip file containing source code, 169KB)

Nowhere near done yet. But it has 50 little "levels", each taking between a few seconds and a minute. A full game/curriculum might need 2000 levels or something.

Tom Larkworthy 2024-10-27 06:08:32

excellent timing! I was gonna do a programming session today with my 9 year kids (twins) today. I had a quick peek and the exercises are at the right level, and it suits the way I teach them where I have a single shared screen on a projector and open discussion.

Tom Larkworthy 2024-10-27 09:34:34

Great. Very nice set of exercises. I went through it with one of my daughters. It took 66 mins. It mentally taxed her. I think it went very well but partially because I know the common mistakes and asked the right questions when I saw her mentally make a mistake, so I diffused misunderstands fairly quickly.

I think you should use red/green/blue not rgb as variable names as thats assumed knowledge. I recorded the full session with her if you want it.

Kartik Agaram 2024-10-27 09:52:20

Very good point about rgb. Yes I'd be very interested to see it. And wow, I hadn't expected anyone to get through 50 levels in one session!

Tom Larkworthy 2024-10-27 10:53:00

my 2nd child crashed out after the graphics section when we hit the logic bit (around ex 30), but its near lunch time and she says she will continue after food. She loved it too, its very fun fiddling with the graphics parameters, they both got a hit of joy at the animation parts and it was a good point to start guided experimenting.

edit: yeah she was indeed keen to finish and did.

Kudos on your "level" design. Very very well written and good progression.

Scott 2024-10-27 15:06:29

This is such a cool idea, I love it! Excited to see where you take it next

Scott 2024-10-27 15:12:39

makes me think of like a mix of what why the lucky stiff was trying to do with hackety hack back in the early 2000s (youtube.com/watch?v=20ihzA8v89U) and kind of a more interactive version of the style in The Little Schemer/Seasoned Schemer/Little Typer books

Kartik Agaram 2024-10-27 22:14:48

Thanks both for the encouraging words! Here's a new version with some small fixes and now 108 levels: carousel-cards.love

While I've tried to leave illegible what you're supposed to learn from any single screen/level/lesson, I can't deny I've had some goals. Here are the topics I've tried to cover (with additions in this version in bold):

  • numbers, math
  • print
  • variables
  • functions
  • drawing
  • colors
  • assignment/mutating variables ( x = x+1 )
  • callbacks ( car.draw , etc.)
  • animation using car.update
  • if , else , elseif
  • operators ~= , <= , >=
  • loops
  • arrays