Do differences between ATT and Intel formats of assembly languages come from differences between their underlying machine languages?

From Computer Systems: a Programmer’s Perspective, about assembly languages:

We see that the Intel and ATT formats differ in the following ways:

  • The Intel code omits the size designation suffixes. We see instruction push and mov instead of pushq and movq.
  • The Intel code omits the ‘%’ character in front of register names, using rbx instead of %rbx.
  • The Intel code has a different way of describing locations in memory—for example, QWORD PTR (rbx) rather than (%rbx).
  • Instructions with multiple operands list them in the reverse order. This can be very confusing when switching between the two formats.

There is close correspondence between assembly languages and machine languages (i.e. ISA).

Do the above differences between ATT and Intel formats of assembly languages come from some differences between their underlying machine languages?
Or do the differences between ATT and Intel formats of assembly languages only exist at the level of assembly languages, i.e. is it normal that both formats may be based on the same machine languages?


How do I read an email log that captures bodies in different combinations of encodings plus underlying format

I have a log of spam emails collected from various sources, in JSON. The goal is to move it all into plaintext to become a training corpus for a machine learning exercise. Mail subject, etc, is plaintext. Bodies, however, are encoded…

As an example,

“email_raw_body”: “–000_6fbc20cd885642f3aec9ff4c5f2facafUW01ME1360001bronzeuscenContent-Type: text/plain; charset=”utf-8″nContent-Transfer-Encoding: base64nnDQpfX19fX19fX19fX19fX19fX…”,

Figuring these out will be time consuming… There appear to be multiple encoding schemes, possibly related to different email clients and services? Is there a good package/library/api out there that I can use that will reliably decode these to plaintext/xml/HTML? I’m primarily in python, but will use whatever necessary.

Also, I’m new to this. Other considerations?

st.statistics – Generalized linear models: What’s the benefit of the underlying theory?

I was recently trying to understand generalized linear models (GLMs) and after investing quite a few days, it still hasn’t dawned on me what the fundamental benefit of the framework is. Normally, I am used to results like guarantees of convergence, limits for error etc, but all that seems to be missing here.

There is a common framework with underlying distribution, regressors/predictors linear in the coefficients, link functions and finally MLE but it seems to be branching off very quickly into the various subclasses, which each need a separate algebraical and numerical treatment.

So can anyone point me towards what is “general” about the GLMs and what is the benefit of that?


co.combinatorics – Combinatorics and geometry underlying a refined Pascal matrix/Newton identities

The partition polynomials of OEIS A263633 give the coefficients of the power series/o.g.f of the multiplicative inverse (reciprocal) of a power series/o.g.f. and so give the Newton identities for transforming between complete homogeneous symmetric polynomials/functions and elementary symmetric polynomials/functions. Certain Koszul duals are related to this.

The algebraic combinatorics of the complementary reciprocal of a Taylor series/e.g.f. is governed by the antipode/refined Euler characteristic classes of the permutahedra or, equivalently, by surjective mappings, so I have an indirect geometric combinatorial interpretation of ‘scaled’ versions of the Newton identities, but I’m looking for more direct interpretations.

What combinatoric/geometric structures are enumerated by the integer coefficients of these partition polynomials for conversion of an o.g.f. into a reciprocal o.g.f.?

entity – Obtaining underlying nutrition data from “NutritionLabel”

I would like to extract the underlying nutritional data contained in “NutritionLabel” output from Wolfram Alpha for all of the “Vegetables” defined in the “BasicFoodGroup” Entity

In[34]:= EntityList["BasicFoodGroup"]

Out[34]= {Entity["BasicFoodGroup", "Dairy"], 
 Entity["BasicFoodGroup", "Fruits"], 
 Entity["BasicFoodGroup", "Grains"], 
 Entity["BasicFoodGroup", "ProteinFoods"], 
 Entity["BasicFoodGroup", "Vegetables"]}

I’ve been going round and round on this without much luck. Any suggestions would be most welcomed!



When you forward a domain permanently via DNS does it keep the underlying URL?

It depends on your configuration.

Example: Redirect to fixed url

<VirtualHost *:80>
    ServerName test123.example
    RewriteEngine On
    RewriteRule ^.*$ https://test678.example/? (R=301,L)

This redirects every request to the URL http://test123.example/ and ignores the previous URL.

Don’t forget the ? at the end of the hostname or the parameter part (everything that follows the ?) will be still appended.

Example: Redirect with uri

<VirtualHost *:80>
    ServerName test123.example
    RewriteEngine On
    RewriteRule ^.*$ https://test678.example%{REQUEST_URI} (R=301,L)

This sends a Location header with the old request URL intact.

Things to consider

For better google results (SEO) and UX you should always reduce 404 errors.

If you are migrating to a new server name and the entire file hierarchy remains unchanged, I would advise to use the seconds example and keep the URL as is.

If the new server doesn’t contain all the old pages and would result into 404 errors you should go with the first option.

Topology in an underlying set of X.

Let X be a topological space and let S be a subset X fixed. Show that

$tau=$ ${A cup (B cap S) | A,B open at X }$

determines another topology on the underlying subset of X.

My attempt

Using that $A cup (B cap S)= (Acup B) cap (A cup S)$

Where we see that the union and intersection of subsets of $tau$ remains in $tau$ and with it we see that it is a topology.

I am new to this, I would appreciate it if you could tell me if the test is correct or failing, because you would give me some hint to learn topology.

Thank you.

ct.category theory – Ultralimit of Metric Spaces vs. Inductive Limits of Underlying Topological Spaces

Let ${(X_n,d_n)}_{n =1}^{infty}$ be a sequence of bounded metric spaces such that:

  • $X_n subseteq X_{n+1}$ is a metric subspace of $X_n$.

Let $omega$ denote the Zarisky ultra-filter (i.e.: complements of finite subsets of $mathbb{N}$ are always in $omega$) and let $X_{omega}$ denote the corresponding ultralimit metric space.

Let $F:Met rightarrow Top$ be the forgetful functor. Then the inclusions of $F(X_n)$ into $F(X_{n+1})$ are continuous and thus $(F(X_n),(mathbb{N},leq))$ form an inductive system; hence, we can take the inductive limit in $Top$. Denote this inductive limit by $varinjlim F(X_n)$.

How are $X_{omega}$ and $varinjlim F(X_n)$ related? I expect that $varinjlim F(X_n)$ can be identified with a subset of $X_{omega}$ but (most interestingly to me) is it a dense one?

dnd 5e – How aware are Forgotten Realms characters of the underlying mechanics of the world?

The game mechanics are not the “physics” of the world.

The main evidence for this is the existence of multiple versions of the D&D system that apply to the same settings (FR, but also Eberron, Greyhawk, Ravenloft, etc.).

If the Blackstaff Academy does a ton of research into what actually happens when a magic missile spell hits a creature, are they going to discover the 2e version, or the 5e version? Blackstaff Tower exists in both, after all. (Or are they going to discover that this is actually the Lords of Waterdeep board game and they’re all little purple cubes?)

The answer is “neither”, because the game mechanics are an abstraction. There is, in the world, a way to conjure a magic missile, a bolt of destructive energy that unerringly strikes your foe. The Waterdeep Medical Examiner’s Office could probably tell you a lot about magic missile wounds–whether they’re physical or purely metaphysical, which organs are affected, the three signs you must find before writing “Cause of death: Magic Missile” on your report.

Nowhere in this would they be described as “1d4 damage”. The 1d4 damage is something that exists at the table when we play a game about characters in this world. Sometimes a magic missile will hurt someone just a little, sometimes a lot. So we roll a die to see how bad that particular hit was.

However, that game comes with some assumptions that are part of the genre rather than the world. For example, the variable damage of attacks comes from the assumption that you’re in combat. A 3rd-level fighter is not going to die from one hit with a longsword in combat. If he’s getting decapitated by an executioner, that’s different. The rule that magic missiles do 1d4 damage reflects the experience of battlemages using the spell in live combat, because that’s what the game assumes you’re using it for. It doesn’t mean that, under laboratory conditions, some magic missiles are randomly four times as powerful than others.

How can I map CVEs to their underlying CWE?

I was tasked with developing a consistent, relatively complete map for CVEs to CWEs at my internship, and I’m kind of at a loss finding a method to find a 1-to-1 way to map CVEs onto CWEs. Ideally, this would all be automated in the end. The format isn’t important, a spreadsheet, text file, database etc are all fine.