Hacker Newsnew | past | comments | ask | show | jobs | submit | crustycoder's commentslogin

Things have moved on since 1994, not only can you still embed it in C and a load of other languages, you can even run it directly in your browser as there's a WASM port.

https://www.swi-prolog.org/pldoc/man?section=wasm-version


Dead? What, again?

Yet another rehash of the smoke and mirrors bullshit I've been hearing every 5 years or so for the last 40+ years.


I would formulate it as: The software development lifecycle is inevitable, or you will not have any software. The lifecycle is just not acknowledged and thus implicit to many people. If you hack in Notepad, FTP it to your webserver, then your lifecycle lasts till you switch it all off. A simple lifecycle, but unavoidable to have one.

You are using mutexes, they are on the Actor message queues, amongst other places. "Just use mutexes" suggests a lack of experience of using them, they are very difficult to get both correct and scalable. By keeping them inside the Actor system, a lot of complexity is removed from the layers above. Actors are not always the right choice, but when they are they are a very useful and simplifying abstraction.

Horses for courses, as they say.


Lock-free queues and 16-core processors exist though. I use actors for the abstraction primarily anyway.


Can you share some insights why mutexes are difficult to get correct and scalable?


Eh?

I've written a non-distributed app that uses the Actor model and it's been very successful. It concurrently collects data from hundreds of REST endpoints, a typical run may make 500,000 REST requests, with 250 actors making simultaneous requests - I've tested with 1,000 but that tends to pound the REST servers into the ground. Any failed requests are re-queued. The requests aren't independent, request type C may depend on request types A & B being completed first as it requires data from them, so there's a declarative dependency graph mechanism that does the scheduling.

I started off using Akka but then the license changed and Pekko wasn't a thing yet, so I wrote my own single-process minimalist Actor framework - I only needed message queues, actor pools & supervision to handle scheduling and request failures, so that's all I wrote. It can easily handle 1m messages a second.

I have no idea why that's a "huge dead end", Actors are a model that's a very close fit to my use case, why on earth wouldn't I use it? That "nurseries" link is way TL;DR but it appears to be rubbishing other options in order to promote its particular model. The level of concurrency it provides seems to be very limited and some of it is just plain wrong - "in most concurrency systems, unhandled errors in background tasks are simply discarded". Err, no.

Big Rule 0: No Dogmas: Use The Right Tool For The Job.


> That "nurseries" link is way TL;DR

Please read and understand that blog post, I promise it's worth your time.


Um, no I won't and no it won't. I have no time for tub-thumping.


Or perhaps just use a language that's designed to solve those sorts of problems? In 14 lines of code.

https://www.swi-prolog.org/pldoc/man?section=clpfd-sudoku


Is there a similarly short/simple solution not using all of the built ins? Haven't worked with prolog in a while but should be easy enough with primitives (albeit with more duplication)?


Well no, not really. The whole point is to use the appropriate tool for the task at hand. In this case it's the CLP(FD) library, https://www.swi-prolog.org/pldoc/man?section=clpfd


Why not just

    blocks(Rows, Blocks), maplist(all_distinct, Blocks), maplist(label, Rows)


He hates on C++ pretty much the same as he does on Rust. Your argument seems to be that Rust is better than C++, which is akin to trying to make the case that Cholera is better than Smallpox.

Language wars are boring and pointless, they all have areas of suckage. The right approach is to pick whichever one is the least worst for the job at hand.


The other reason jump changes are not a revolution and have remained just a curiosity is physics, something that's ignored by the article.

For non-ringers, in change ringing the bells rotate 360 degrees each time they strike, from mouth up to mouth up. The clapper hits the bell when the it has rotated roughly 270 degrees from mouth up and is more or less horizontal, approximately 2 seconds after it starts moving. The bells are usually in the 100kg to 1000kg range (for US folks, that's 220lb to 2200lb), although they can be up to 4000kg. The only point when the ringer can exert control on the bell via the rope is when it is near the balance and mouth upwards, and speeding it up or slowing it down any more than one "beat" is physically very difficult on heavier bells, particularly if you are doing it for a full peal, which usually takes 3+ hours.

About the least important thing in the 2022 rules changes (https://framework.cccbr.org.uk/version2) was the allowing of jump changes.

p.s. there's a split-screen video showing the ringer and the bell he's ringing here: https://youtu.be/qrdLP15Xsuk?t=67


Here you go: https://www.whitingsociety.org.uk/articles/basic-tuition/ita...

There are a fair few videos on YouTube as well.


That link (like the Wikipedia article) is talking about the mechanism by which the bell is rung, not what is rung out on them i.e. they are not ringing the changes.


It's got compositions on the page, a link to a PDF with compositions in it and a link to the Veronese ringing association which has many more examples - if you can read Italian.


Ah, I stand corrected. I couldn't listen to the examples last night so I have egg on my face this morning :)


I hadn't completely checked it either FWIW so worth asking the question.

It does sound slightly different as they use chords.


93% of the rings of 6 bells or more which are rung for English style change ringing are in England. Source: https://dove.cccbr.org.uk/

Change ringing is a branch of Group Theory and is mentioned in Knuth. The Steinhaus–Johnson–Trotter algorithm for efficiently generating permutations was published in the early 1960s, but has been known about by change ringers since the 1600s. Source: https://en.wikipedia.org/wiki/Steinhaus%E2%80%93Johnson%E2%8...


I'm licensed by The Engineering Council in the UK for doing computery stuff, and by the relevant European body. I've been writing software for a living for most of my 40+ year career, and still do. So Chartered Software Engineers do exist.

But perhaps not in CA.


We have no such thing in the US. There is no license for software "engineering" here, it's a made up term.


There is in Canada, licensed and bonded.


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

Search: