6 ms·
Using Prolog in Windows NT Network Configuration (1996)
- kazinator 3y agoInteresting. That Small Prolog seems to be alive. Note that the following HTTPS link times out; if you edit to HTTP it works: https://snapageno.free.fr/Code/C/SProlog.htm https://snapageno.free.fr/Code/C/SProlog.htm There is no copyright notice or license anywhere in sight; I think Microsoft wouldn't touch something like this with a ten foot pole today (without contacting the author directly to license it).
- opless 3y agoNice find! I wonder when it was put up, it took me a while to track the original down License-wise on the site it says: > You can use it for anything you want Which implies “public domain”, and … https://github.com/opless/small-prolog-walnut-creek-original https://github.com/opless/small-prolog-walnut-creek-original And on the copy on the Walnut Creek CD it explicitly says; These diskettes contain a public domain Prolog interpreter called Small Prolog version 2. In the USA the C User's Journal will have the latest releases. It has been compiled on an PC clone, on UNIX and on an Atari ST.
- opless 3y agohttps://github.com/opless/small-prolog-walnut-creek-original https://github.com/opless/small-prolog-walnut-creek-original Is a copy of the PD prolog used in the PNP system in NT More details (and probably where the original article was sourced from) http://www.drdobbs.com/cpp/extending-c-with-prolog/184409294 http://www.drdobbs.com/cpp/extending-c-with-prolog/184409294 Finally a good write up by Microsoft themselves https://web.archive.org/web/20040603192757/research.microsoft.com/research/dtg/davidhov/pap.htm https://web.archive.org/web/20040603192757/research.microsof...
- abecedarius 3y agoThanks, Small Prolog looks neat. Since I couldn't find an author name in the github repo and had to grovel through the Dr. Dobbs article for it, I'll copy it here: "Henri de Feraudy during the late 1980s".
- opless 3y agoAdded his name to the repo description, thanks for the suggestion!
- userbinator 3y agoThe actual network configuration program is a Win32 dynamic-link library called NCPA.CPL. The extension CPL indicates that it is a Windows NT Control Panel extension (or applet). It is represented in the Control Panels main window by an icon representing a netcard cable. That is still there in Windows 11, although MS had to put it back likely after a Very Important Customer started complaining loudly when MS redirected it to the horribly lobotomised new settings UI.
- dboreham 3y agoI'd heard (here, last time this came up) that the Prolog interpreter was removed c. Windows XP time.
- monocasa 3y agoIs expect it at least to have been removed when Microsoft rewrote the network stack in Vista.
- p_l 3y agoThe important network configuration rewrite happened in NT5, IIRC, with the introduction of NETSH.EXE and its Cisco-ish command line interface. (It's still there in windows 11 and is probably the powerful way of interacting with network stack). The infamous rewrite didn't change the structure of networking in NT too much, there was also quite a lot of activity before and after (windows server 2016 delivered considerable changes, for example, though some of them were present already in 2012 mainly due to Hyper-V).
- AshamedCaptain 3y agoProlog was still being used for the same purposes (handling high-level network configuration and even device state) at least as late as in late 2000s smartphones.
- grose 3y agoI think Prolog really shines as an embedded query engine (I know this is old and it's been removed since). It's perfect for declarative configuration, very easy to write powerful queries once you wrap your head around it. The Yarn constraints plugin also used (Tau) Prolog, although it looks like it's in the process of being replaced with JS, which makes me a bit sad. The reasoning is here: https://github.com/yarnpkg/berry/issues/1276 https://github.com/yarnpkg/berry/issues/1276. Seems like the biggest issue is lack of a nice dev environment. I maintain the Trealla Prolog Wasm port (npm package 'trealla') and I hope some day to use it for a VSCode extension or LSP or something to provide a nice dev experience. Tau's performance has also been cited as an issue[1] but Trealla is quite fast and I expect it could easily handle a complex Yarn workspace with tons of facts. If this sounds like something you'd be interested in helping me with, feel free to contact me or make an issue/discussion here: https://github.com/guregu/trealla-js https://github.com/guregu/trealla-js [1]: https://github.com/yarnpkg/berry/issues/4079#issuecomment-1033084124 https://github.com/yarnpkg/berry/issues/4079#issuecomment-10...
- sph 3y agoSoftware engineering is held back by having to get as much mindshare and reach the lowest denominator to have as many contributors or developers possible, so a niche language which might have been very productive to get the ball rolling, is cast aside once the project reaches maturity, and I would argue never for the best. Two examples off the top of my head are Reddit and SICP abandoning their Lisp roots because it's hard for new engineers (of average quality) to get into. Imagine if in mathematics there was a culture of avoiding abstraction and domain specific symbols because the average undergrad might have a hard time understanding them. Good luck exploring quantum mechanics with polynomials equations as your ceiling of complexity. In fact, it might a cultural problem at large: give people a chance to learn, and most are able to. But we are afraid of people needing to become familiar with it, that we strive to dumb everything down. Much of the UX focus of the 20 years has been on targeting the beginners, forgetting the fact that beginners eventually become power users and need force multipliers, not rounded-off scissors. (Sorry, Saturday morning philosophical rant after a week of thinking about the future of computing)
- 3y ago
- gamache 3y agoOnce I heard that ca. 1990s MS Word used an embedded Prolog to perform spell check. Anyone with knowledge of this, one way or another? I can't find any documentation of it online.
- jodrellblank 3y agoWord for Windows 1.1a was released in 1990 and the source code of it is available from the Computer History Museum: https://computerhistory.org/blog/microsoft-word-for-windows-1-1a-source-code/ https://computerhistory.org/blog/microsoft-word-for-windows-... It has 1800 lines of "SPELL.C" for 17 languages already by that time, so if there's a Prolog interpreter involved that might be a place to look. There were Word 2, Word 6, Word 95, Word 98 and Word 2000 released in the 90s as well so it's quite possible they rewrote the spellchecking several times and absense in that code won't be conclusive evidence against the idea.
- gamache 3y agoThank you for the link! Unfortunately the code in spell.c and spelcore.c seems to call out to an external DLL, whose source doesn't seem to be included here. Later versions of MS Word did the same thing, e.g., msspell3.dll.
- jodrellblank 3y agoProlog is excellent for bikeshedding, in fact that might be its strongest axis. It starts with everything you get in a normal language such as naming things, indentation, functional purity vs side effects, where to break code into different files and builds on that with having your names try to make sense in declarative, relational, logical and imperative contexts, having your predicates (functions) usable in all modes - and then performant in all modes - having your code be deterministic, and then deterministic in all modes. Being 50 years old there are five decades of learning "idiomatic Prolog" ideas to choose from, and five decades of footguns pointing at your two feet; it has tabling, label(l)ing, SLD and SLG resolution to choose from. Built in constraint solvers are excellent at tempting you into thinking your problem will be well solved by the constraint solvers (it won't be, you idiot, why did you think that was a constraint problem?), two different kinds of arithmetic - one which works but is bad and one which mostly works on integers but clashes with the Prolog solver - and enough metaprogramming that you can build castles in the sky which are very hard to debug instead of real castles. But wait, there's more! Declarative context grammars let you add the fun of left-recursive parsing problems to all your tasks, while attributed variables allow the Prolog engine to break your code behind the scenes in new and interesting ways, plenty of special syntax not to be sneezed at (-->; [_|[]] {}\[]>>() \X^+() =.. #<==> atchoo (bless you)), a delightful deep-rooted schism between text as linked lists of character codes or text as linked lists of character atoms, and always the ISO-Standard-Sword of Damocles hanging over your head as you look at the vast array of slightly-incompatible implementations with no widely accepted CPython-like-dominant-default. Somewhere hiding in there is a language with enough flexibility and metaprogramming to let your meat brain stretch as far as you want, enough cyborg attachments to augment you beyond plain human, enough spells and rituals to conjour tentacled seamonsters with excellent logic ability from the cold Atlantic deeps to intimidate your problem into submission. Which you, dear programmer, can learn to wield up to the advanced level of a toddler in a machine shop in a mere couple of handfuls of long years! Expertise may take a few lifetimes longer - in the meantime have you noticed your code isn't pure, doesn't work in all modes, isn't performant in several modes, isn't using the preferred idiom style, is non-deterministic, can't be used to generate as well as test, falls into a left-recursive endless search after the first result, isn't compatible with other Prolog Systems, and your predicates are poorly named and you use the builtin database which is temptingly convenient but absolutely verboten? Plenty for you to be getting on with, back to the drawing boar...bikeshed with you. And, cut! No, don't cut; OK, green cuts but not red cuts and I hope you aren't colourblind. Next up, coroutines, freeze, PEngines, and the second 90%. Visit https://www.metalevel.at/prolog https://www.metalevel.at/prolog and marvel as a master deftly disecting problems, in the same way you marvel at Peter Norvig's Pytudes https://github.com/norvig/pytudes https://github.com/norvig/pytudes , and sob as the wonders turn to clay in your ordinary hands. Luckily it has a squeaky little brute force searcher, dutifully headbutting every wall as it explores all the corners of your problem on its eventual way to an answer, which you can always rely on. And with that it's almost like any other high level mostly-interpreted dynamic programming / scripting language.