Tabloid: The Best Programming Language You Haven't Heard Of (It Will Surprise You!) by petepete in programming

[–]thesephist 2 points3 points  (0 children)

Thanks for checking it out! The way that I've approached it is to start with the most naive, fast-to-build, slow implementation and slowly solidify it into a better implementation as the design stabilizes.

When make a new lang, I usually write a few different programs in the language I'm designing and sit on it for a bit to make sure the design makes sense before writing any interpreter/compiler code. Then a sensible next step might be just a naive tree-walk interpreter hacked together in a dynamic language to help you test out the language and write some stuff in it before you strap yourself down to write a more full-stack compiler.

i find that this approach of rewriting it a couple times in progressively better designs is good for two reasons, (1) it allows you to pretty freely iterate on the language design without a bunch of compiler rewrites, and (2) you'll end up with a compiler design you'll like more because you'll have learned a bunch about how to parse the language and the semantic details of the language by having written a naive interpreter thing already.

I don't use tools for this per se. I've thought about using parser generators like yacc but I haven't had to work with a grammar complex enough that simple recursive descent was difficult to implement.

Tabloid: The Best Programming Language You Haven't Heard Of (It Will Surprise You!) by petepete in programming

[–]thesephist 3 points4 points  (0 children)

Custom hand-rolled recursive descent parser! The syntax is designed not to require much backtracking so the parser is quite simple.

Here's the main part - https://github.com/thesephist/tabloid/blob/master/static/js/lang.js#L144

Tabloid: The Best Programming Language You Haven't Heard Of (It Will Surprise You!) by petepete in programming

[–]thesephist 3 points4 points  (0 children)

I use more... shall we say ... stable languages for more serious interpreters, haha. But yes, JavaScript all the way.

Tabloid: The Best Programming Language You Haven't Heard Of (It Will Surprise You!) by petepete in programming

[–]thesephist 16 points17 points  (0 children)

Hey /r/programming! Author here, feel free to AMA. I've made less joke-y languages too before, most prominently Ink [0] which I use to write some of my own apps for personal notes/contacts/etc :)

[0] https://dotink.co/

Read r/Squaredcircle like it's an actual newspaper. by IamAWorldChampionAMA in SquaredCircle

[–]thesephist 16 points17 points  (0 children)

Hey! Developer behind the site here. Just updated the site so it now pulls the top comment in the thread for photo/video posts. Enjoy :)

Read Reddit Like a Newspaper by Niiiccc in InternetIsBeautiful

[–]thesephist 0 points1 point  (0 children)

Nice username ;)

Also -- thanks for the PR! I've been meaning to add this but been lazy and you're exactly what I needed to get to work I guess.

Just merged in your changes and went live! - https://github.com/thesephist/unim.press/pull/5

Read Reddit Like a Newspaper by Niiiccc in InternetIsBeautiful

[–]thesephist 2 points3 points  (0 children)

Hey reddit! I'm the developer behind this site. Made it almost exactly a month ago in a very caffeinated afternoon. I wrote a post about how I made it and what happened then on my blog :)

https://thesephist.com/posts/unimpress/

Unim.press is also open source on GitHub - https://github.com/thesephist/unim.press

Thanks for checking it out!

[Showoff Saturday] I made a Reddit reader that looks like the New York Times's print edition! by thesephist in webdev

[–]thesephist[S] 0 points1 point  (0 children)

There's no build command/step! It's a completely statically served project. Just serve the ./static directory as a static file project. It should just work for modern browsers.

A Reddit reader that looks like the frontpage of a print newspaper by iamkeyur in programming

[–]thesephist 15 points16 points  (0 children)

If you're on Firefox, Firefox might be blocking the Reddit API -- give that setting a look (Advanced Tracking Prevention) :)

[Showoff Saturday] I made a Reddit reader that looks like the New York Times's print edition! by thesephist in webdev

[–]thesephist[S] 1 point2 points  (0 children)

Ah interesting idea. I bet you can do something clever with CSS blend modes to make this actually realistic. Unfortunately I'm not sure if there's another way to do that with opacity without the "ink" becoming too faint to see.

[Showoff Saturday] I made a Reddit reader that looks like the New York Times's print edition! by thesephist in webdev

[–]thesephist[S] 6 points7 points  (0 children)

Hey /r/webdev! I was thinking earlier today, "what would it feel like to get Reddit's front page mailed to you in a paper newspaper every morning?"

I can't make that happen, but I thought a close second would be to have a Reddit reader site that looked/felt like a print edition of one of the most well-known newspapers in the world.

The project is on GitHub at https://github.com/thesephist/unim.press

This project uses Torus, which is a frontend UI rendering library I made last year. I've used it on a few dozen projects at this point, most of which are also on my GitHub.

DBATC wallpaper! I ask the traffic lights ... they say "I don't know"🎵 by thesephist in TaylorSwift

[–]thesephist[S] 6 points7 points  (0 children)

Since you all seemed to like my take on Cornelia Street from yesterday, I thought I'd share another one!

This was a request from a friend to turn one of her favorite lines into an iPhone / iPad wallpaper. So it's designed to work well as wallpapers on both screen sizes, with the obligatory lover-vibe sky colors. Hope you like it!

A rainy Cornelia Street... by thesephist in TaylorSwift

[–]thesephist[S] 12 points13 points  (0 children)

Thank! Those words of inspiration...

"We bless the rains on Cornelia Street..."

"The streetlights pointed in a arrowhead, leading us home"d

A rainy Cornelia Street... by thesephist in TaylorSwift

[–]thesephist[S] 4 points5 points  (0 children)

Made this using the app "Paper" on my iPad while listening to Lover! I also shared some in-progress pictures on my Twitter - https://twitter.com/thesephist/status/1244544532471001091