Better HN
topnewbestaskshowjobs
Log inSign up

simplify

2,061 karma · joined May 24, 2009 (17y ago) · 911 submissions

Submissions

comment 6y ago · link · parent

Exactly. Everyone needs to study the history of the Friedman doctrine before parroting statements like that.

comment 6y ago · link · parent

Wouldn't doing that imply we expect police officers to behave the exact way they're behaving now? How does that help?

Isn't it better to expect police officers to provide an actual benefit to society, and construct laws from that point of view?

comment 6y ago · link · parent

Is it really that maddening? This response feels much too political. There are things worth getting mad about, and then there are JavaScript frameworks.

comment 6y ago · link · parent

group-hover was made specifically for this use case: https://tailwindcss.com/docs/pseudo-class-variants/#group-ho...

comment 6y ago · link · parent

It's light on details (plan to fill out more later) but we're using Prolog for the roles & permissions system in our Rails app https://pubb.substack.com/p/practical-prolog-in-ruby-on-rail...

comment 6y ago · link · parent

Instead of a JS-centric approach, how about an even simpler, HTML-centric approach with Apline.js? :)

comment 6y ago · link · parent

Since when is saying "I think" considered to "proclaim as certainty"?

comment 6y ago · link · parent

This type of article is just as important as the deeper ones. It's not "obvious" to everyone; most non-Postgres users don't know about its JSON features (yes, most! https://xkcd.com/1053/)

comment 6y ago · link · parent

You're misusing the word "disingenuous". The author has no ill intention of being insincere.

comment 6y ago · link · parent

I also worked through the pre-Javascript world, the jquery world, the backbone world, and now the react world. And while I'm productive with react-like stacks, I've rediscovered how much more productive I am with HTML-centric SSR.

The problem you describe is solved by frameworks like Rails, and has been for at least 10 years.

It turns out there's no need to bring in hundreds to thousands of JS dependencies to implement your frontend. SSR gets the job done in a superior manner, both in DX and UX.

comment 6y ago · link · parent

Prolog is fundamentally well established (~40 years old), and you can start using it today in several programming languages. For example:

JavaScript http://tau-prolog.org

Ruby https://github.com/preston/ruby-prolog

Rust https://github.com/mthom/scryer-prolog

Erlang https://github.com/rvirding/erlog

If your language is missing one, implementing a basic Prolog is fairly simple. Take a look at the Ruby one: it's core is not even 500 lines of code!

There are also great options like SWI Prolog if you want to build your entire app in Prolog. But I imagine it would be much easier to convince a work boss to pull in a library instead :)

Re AI: It's true that Prolog's origins involved AI, but nowadays Prolog is better suited for more general logic programming tasks (there are better tools out there for AI specifically).

comment 6y ago · link · parent

Ruby on Rails is still the new Ruby on Rails. JS solutions still need another five years to catch up, unfortunately.

comment 6y ago · link · parent

I recommend starting with [0] to get a feel for what's possible. [1] is great when you have time to dive deeper. [2] is good motivation, and [3] will show you how to build a practical roles & permissions system.

Keep in mind that you don't have to build your app in 100% prolog to use prolog. There are likely implementations in your favorite language. For example, Rust[a] JavaScript[b], and Ruby[c].

[0] https://learnxinyminutes.com/docs/prolog/ [1] https://www.metalevel.at/prolog [2] https://youtu.be/G_eYTctGZw8 [3] https://github.com/TheClause/learn-prolog/blob/master/articl...

[a] https://github.com/mthom/scryer-prolog [b] http://tau-prolog.org/ [c] https://github.com/preston/ruby-prolog

comment 6y ago · link · parent

I second the nod to logic programming. I've been working on a board game engine in Prolog as a side project, and I'm having the most fun programming I've had in a very long time :)

comment 6y ago · link · parent

Ruby on Rails. Still nothing better for getting a high quality product out the door fast.

286.

Tech Stacks for Founders(pubb.substack.com ↗)

2 points · by simplify · 6y ago · discuss

comment 6y ago · link · parent

> There's no reason to believe Apple could suddenly solve it in a few months if they just cared a little harder.

No, they really could just solve it. Progressive web apps are so close to being useful. Apple just refuses to make them user-friendly to install. Just look at android for what's possible https://web.dev/progressive-web-apps/

comment 6y ago · link · parent

The author of this post is Anne Ogborn, one of the most experienced Prolog programmers in the community. She happens to be hosting a beginners & advanced Prolog course[0] that's starting in a couple days (I've enrolled myself). I see 70 others in the slack channel so far. Highly recommend.

[0] https://twitter.com/AnnieTheObscure/status/12476035165514670...

comment 6y ago · link · parent

Would you say the same about incomplete testing?

comment 6y ago · link · parent

To be fair, blocks, procs, and methods are fairly fundamental to Ruby. After a bit of study, they stop being surprising. I'm sure there are other examples, though.

comment 6y ago · link · parent

Right, those are the kind of permissions I had trouble with. That gist works for reads based on membership (even if a little unintuitive), but I couldn't figure out how do writes that validate using roles & permissions.

comment 6y ago · link · parent

I really want to like Hasura, but very quickly you'll run into limitations of its permission system. Especially when dealing with logic across relationships.

If only Hasura supported some king of Prolog / Datalog instead of their ad-hoc JSON language, then you'd be able to write nearly any possible use cases. Until then, I'll stick to building and maintaining my own backends... manually :(

comment 6y ago · link · parent

Prolog is the best way to describe these constraints. Nothing else comes close to its declarative power.

The industry will catch on, eventually.

comment 6y ago · link · parent

Not sure why you're getting downvoted, you have a point. Seems like a "no true Scotsman" fallacy:

"Yes they're used successfully in some companies, but they're not truly commercially viable".

comment 6y ago · link · parent

No joke, I started my career in Step 1 with Ruby on Rails. I lived and breathed Step 2 and Step 3 with the ever-changing industry standards: jQuery, backbone, angular (avoided), react, and (currently wrangling at work) the complex beast that is graphql & apollo, all over the span of 10 years. Coming back to Rails for a side project has helped me realize:

- Server-side rendering is actually fantastic. It's fast for users and there's no sluggish build step holding you back.

- Turbolinks covers 70% of the interactivity you need.

- Alpine.js covers another 20%.

- With Rails having webpack built in, there's no friction to writing/importing your super-fancy JS interaction for that last 10% when you need to.

Rails gets it right. It truly makes your dev life better, in ways that actually matter. Back then I was convinced Rails led to spaghetti code, but in hindsight I just needed to improve as a software developer.

10 years later, there still isn't a better tool than Rails for tech founders. There are some promising ones, but none that get you launched nearly as quickly. It's kind of annoying, to be honest. Is this that hard of a problem?

comment 6y ago · link · parent

That doesn't seem to be completely true. Basecamp has a "hybrid" app, where they use native frames to load web pages for content https://twitter.com/dhh/status/940358921960677376

comment 6y ago · link · parent

This is basically tailwindcss, and is an excellent approach when done well.

comment 6y ago · link · parent

They are the most highly discriminated against, though.

comment 6y ago · link · parent

I didn't like it at first, but after actually using it I find it very helpful in keeping on top of all types of things to do/watch/respond.

comment 6y ago · link · parent

Prolog also has some really impressive debugging tools. It allows you to pause execution, change the code, and then resume execution from an earlier point in time.

Michael Hendrick's "Production Prolog" talk gives a demo of this (at 12:17) https://www.youtube.com/watch?v=G_eYTctGZw8

1
91011
31