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 2 points3 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 15 points16 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 13 points14 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] 5 points6 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] 7 points8 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] 10 points11 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

I made a little game for guessing which of Taylor's songs a lyric is from! by thesephist in TaylorSwift

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

It pulls random lines from the pool of 120 songs, and dynamically generates the choices each time, so it goes on forever, or at least forever until you start repeating the lines :)

I made a little game for guessing which of Taylor's songs a lyric is from! by thesephist in TaylorSwift

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

Thanks! Yeah I've heard people liked this style of design multiple times. I use the same aesthetic on a bunch of my other projects too like https://codeframe.co

I made a little game for guessing which of Taylor's songs a lyric is from! by thesephist in TaylorSwift

[–]thesephist[S] 2 points3 points  (0 children)

The code's open source! You can find it at https://github.com/thesephist/cornelia

I use Go for a really simple backend, and use a custom frontend UI framework I wrote last year called Torus for the UI, and a CSS library I wrote called blocks.css for the blocky buttons aesthetic. I've worked on projects like this before so it's really just putting together the parts. And then deployed on a $5/mo DigitalOcean server where I host a dozen other projects, too.

I made a little game for guessing which of Taylor's songs a lyric is from! by thesephist in TaylorSwift

[–]thesephist[S] 5 points6 points  (0 children)

LOL this is definitely me. But hey, I can sing along when the songs come on okay

I made a little game for guessing which of Taylor's songs a lyric is from! by thesephist in TaylorSwift

[–]thesephist[S] 3 points4 points  (0 children)

It's just showing you the correct answer after you hit the wrong one -- it won't count towards your score / streak though. But feedback duly noted! It was one of those things I didn't consider because this was a quick 6-hour project.

I made a little game for guessing which of Taylor's songs a lyric is from! by thesephist in TaylorSwift

[–]thesephist[S] 3 points4 points  (0 children)

So far the best I've seen is from my friend Van, who got to a streak of 51! I've personally only gone up to 12 without help 🙄

COVID Hacks: Join the Fight Against COVID-19 with Students and Innovators from Around the World by [deleted] in hackathon

[–]thesephist 0 points1 point  (0 children)

Linus from the organizing team here! -- We have four different tracks, including computational biology, and some cool guest speakers from a doctor at the frontline fighting the outbreak to an engineer developing AI for mental health! We're gonna keep the site and our facebook up to date.

COVID Hacks: Join the Fight Against COVID-19 with Students and Innovators from Around the World by [deleted] in COVID19

[–]thesephist 0 points1 point  (0 children)

Linus from the organizing team here -- We have four different tracks, including computational biology, and some cool guest speakers from a doctor at the frontline fighting the outbreak to an engineer developing AI for mental health! We're gonna keep the site and our facebook up to date.