The work on [2] is fascinating to me, both because of the problem domain and as a case study on the effective application of ASP. I will be reading this paper carefully to pore over the details.
HN user
wgetch
I second the recommendation to start with Lifschitz and move on to the Potassco book from there. To add: One does not need to know Prolog to get into ASP, the semantics are unique and more minimal. That said, I personally struggled with ASP before it clicked, it takes time to grasp the lingo and grok the semantics if you have never worked with something similar. Best to have a guide that introduces the concepts one at a time ("What do you mean, there's more than one type of negation?!")
When you arrange point-topped hexagons into an approximately hexagonal shape, the combined "hexagon" is flat-topped. Take a look at the demo site:
Potassco is a wonderful collection of software. I have used clingo recently to prototype some puzzle ideas that I had. After encoding the rules in ASP I could quickly produce a single model through clingo to see if the puzzle design was feasible or not. (I also decided to use clingo to enumerate the solution space, but it turned out to be much bigger than I anticipated and after ten days I terminated the process with just shy of a billion solutions found...)
Since then I have been dreaming of using it to actually power puzzle software, where a single logic program could be used for both puzzle generation and validation. But that's not even the only "power couple" I can think of with respect to clingo/ASP integration. There are a number of hard problems that benefit from the declarative approach and could leverage the power and speed of a solver like clingo. And with libclingo this is now a feasible option to transform your problem into an ASP program, call clingo, then transform the answer set into your solution.
ASP has both classical negation and negation-as-failure, but that is not quite why I'd say it is "more declarative". Prolog is capable of performing "imperative" tasks (by this I really mean side effects), while ASP solvers exclusively find stable models (answer sets) that may (or may not) exist for a given logic program. In ASP you can only declare a model with your input, and the output is either one or more stable model(s), or the knowledge that the model was unsatisfiable.
You are right about it being more than just a "modeling language to solve combinatorial problems", I agree that description sells it a bit short. As you pointed out, it is well suited for problems involving non-monotonic reasoning and uncertainty. You can encode reasoning that is more reality-hardened, with logical rules to deal with imperfect information.
Answer set programming is also well suited for combinatorial search problems such as this. The classic approach for ASP solvers is to reduce a logic program into an instance of the boolean SAT problem and feed that into a SAT solver. The language used in ASP is a variant of Prolog called AnsProlog. AnsProlog programs may have variables which are grounded before solving, and programs may produce any number of stable models (satisfiable solutions). Here is my own general Sudoku solver in AnsProlog:
#const d=3.
#const n=d*d.
1 { s(X,Y,1..n) } 1 :- X=1..n, Y=1..n.
% Achieved: A value is chosen for each cell
X1=X2 :- s(X1,Y,N), s(X2,Y,N).
Y1=Y2 :- s(X,Y1,N), s(X,Y2,N).
% Achieved: No value is duplicated for any given row or column
r(X,Y,Z) :- X=1..n, Y=1..n, Z=((X-1)/d)*d+((Y-1)/d)+1.
(X1-X2)*(X1-X2)+(Y1-Y2)*(Y1-Y2)=0 :- s(X1,Y1,N), s(X2,Y2,N), r(X1,Y1,Z), r(X2,Y2,Z).
% Achieved: No value is duplicated within a d*d region
#show s/3.
The program above can be used to generate completed puzzles from scratch, or it can be combined with an input file containing an incomplete puzzle to generate any or all valid solutions. Due to the semantics of ASP, additional constraints can be appended to the program to support Sudoku variants without modifying the existing lines.You begin to contemplate neutral yet fascinating sensations.
8c29152333c388888888961e813457759ca87a8b54078779f8cbdefedf6401d2
You picture an infinite and essentially captivated dimension.
a8888ff4ddb3e7c0c38d30a8b4184f78d85888806f67ab73ca64c5ad51cae6b8
There is, perhaps surprisingly (or not), already a relevant XKCD mentioning this feature while poking fun at the computational abominations that were already possible in Excel:
On that note, TFA claims that the introduction of LAMBDA finally makes Excel Turing complete, unlike the kind of Turing machine simulators the stick figure is referring to in the XKCD comic...
(In contrast, Felienne Hermans’s lovely blog post about writing a Turing machine in Excel doesn’t, strictly speaking, establish Turing completeness because it uses successive rows for successive states, so the number of steps is limited by the number of rows.)
What happens if both DNS requests are hijacked? Could an attacker return both a different IP and a different public key that correspond to a malicious server?
Edit: I should clarify, I think the issue stems from DNS being a potential attack vector itself. You can't blindly trust what DNS tells you. This is precisely the problem that certificate chains (issued by a trusted third party) purport to resolve-- one of trust.
While the majority of existing homebrew are either games or emulators, the systems are not limited to just playing games and there are a few options for programming them. devkitPro[0] provides a cross-compiling toolchain for 3ds homebrew development, if you are comfortable with C/C++ it is not all that difficult to program on the platform. There are several "portlibs" including SDL (SDL1 not SDL2 unfortunately) provided by devkitPro, which come in handy if you don't want to learn low level 3ds-specific APIs. There are also some homebrew game engines[1] that allow running Lua-based programs, though I haven't tried these myself.
[0] https://devkitpro.org/wiki/Getting_Started [1] https://www.3dbrew.org/wiki/Homebrew_Applications#Game_Engin...
With ZSH, you can use a named directory hash to create such 'aliases' to directories:
hash -d hello=~/Documents
~hello/world
The shortened names also show up in your PROMPT if it is using %~ to display cwd.This is unfortunate, assembly programs were the strongest aspect of the TI homebrew community. Some really great games and applications were made possible by native binaries on the older TI calculators. A couple of details I found in another article[1]:
- The new OS prevents the calculators from being downgraded
- The OS prevents running Asm/C programs, only Basic (and on some editions Python) programs are allowed
- Applications can still be installed if signed by approved TI vendors
Sounds like the TI homebrew community is about to get splintered. You'll have the jailbreakers fighting for code execution, but this could easily end up a small underground operation mirroring other jailbreak efforts. It could become too much of a hassle to get asm programs back (custom OS?), if so most people will accept the limitations and move on. At least there's still Basic and Python, if nothing else.
[1] https://www.cemetech.net/news/2020/5/949/_/ti-removes-asmc-p...
WebLiero strives to be as accurate to the original as possible, and from what I can tell recreates the physics, objects, and particles systems using the same general structures as the original. It derives its physics constants and other gameplay data, including weapons definitions, from the original game and optionally can swap definitions from a selection of the original Liero's mods. Similarly new custom mods can be created, see my other comment in this thread.
It is worth mentioning that officially Liero has been recreated and is an open source project. So the details of the physics engine are now public. The code for v1.36 is a modern rewrite of v1.33, of which the source code has been lost. See https://liero.be/ for more history.
It's a secret to everyone, but it is possible to run a WebLiero server with custom mods by providing a json/json5 file and a wlsprt file (which uses a custom but simple binary format) to the in-game "/loadmod" command. At this time, however, the author is still developing mod support and the formats (JSON schema in particular) are subject to change so... caveat emptor.
That said, if anyone is interested in tweaking WebLiero mods and is not afraid to get their hands dirty, I wrote a (very rudimentary) program to convert .wlsprt to a folder of indexed-color PNG files and vice-versa[1]. You'll probably also want a copy of the "official" mods to use as a reference[2].
At the risk of counting chickens before they hatch, I am actually in the process of writing a mod editor in the spirit of LieroKit/LieroM8 that would smooth some of the rough edges of modding this game. I'm calling it WebLieroKit, unfortunately due to the timing of this post making the front page I cannot provide a working demo but I felt it was worth mentioning while there are eyeballs around.
[1] https://phazon.xyz/files/liero/wltools.tar.gz [2] https://phazon.xyz/files/liero/mods.tar.gz
I intend to do a proper writeup for this, in the meantime I published a short blog[1] with the program along with some background information.
[1] https://blog.phazon.xyz/answer-set-programming/2020/04/22/mu...
Always interesting to see logic programming applied to music, it is in my experience a good fit for the musical problem space. I spent some time exploring the analysis of chords using answer set programming. On the surface ASP programs look very similar to Prolog but the semantics differ; you query Prolog to answer a question or series of questions related to your program, whereas ASP produces complete "stable models" of your program (it answers "all questions").
The first version of my analysis program would most likely have been a valid Prolog program, and furthermore the program was completely positive (contained no negation). After several weeks of rewrites, I ended up with a much smaller program that also took advantage of ASP "choice" and "optimization" rules. Much of the complexity was reduced by one fundamental improvement in the representation of internal facts and adjusting the rules to accommodate. In hindsight, the original version used a rather foolish approach, but like many things it took some effort to realize why and how to do better.
This process of rewriting and incremental improvement (and initially struggling in a less-familiar programming paradigm) gave me a great appreciation for logic systems, and also a desire to use them more often. There is something very beautiful in reducing a problem into logical relationships, and instead of focusing on algorithms just focusing on the problem space and how different pieces interrelate. It does take practice and experimentation to produce an elegant solution to a problem, but with experience it gets easier. I have no doubt the author of this article could make it feasible to discover chords and tunings as he describes in the Future Work section. Though I would recommend starting over with this goal in mind; even a naive but viable solution might reveal some property of the system that would transfer over to the original program and increase its versatility.