HNHacker News
TopNewBestAskShowJobs

cygx

3,754 karma · joined January 27, 2011

submissionscomments
cygx··on Odin, Wikipedia and engagement farming
Yeah, that reference section (odin-lang.org, jangafx.com, learnodin.org, c3-lang.org, odinbook.com, gingerbill.org) is probably not up to Wikipedia's standards...
cygx··on Odin, Wikipedia and engagement farming
Well, Casey Muratori argued github stars should be considered a metric of notability, and the Gleam repository has almost twice the number (21.6k vs Odin's 11k)!

Jokes aside, I'm not sure Gleam belongs on Wikipedia if Odin does not...

cygx··on 30-year sentence for transporting zines is a five-alarm fire for free speech
Per Wikipedia, at least at one point in time, it was supposed to be. Quote:

Prosecutors produced group chat logs showing that the participants had debated at length whether they should bring guns. The former reservist allegedly wrote that "Cops are not trained or equipped for more than one rifle, so it tends to make them back off." Other chat participants argued that a noise demonstration was low risk and the assumptions about how police would respond were "way over the top".

cygx··on LuaJIT 3.0 proposed syntax extensions
There's some overlap in the languages they were inspired by (eg Scheme, or the chains Modula -> Lua vs Modula -> Java -> Javascript), but as far as I'm aware, the original designs were made independently.

Now, the object systems do look similar, but that seems to be a case of convergent evolution: Javascript took direct inspiration from Self, whereas Lua's system is based on a more generic fallback mechanism for table access.

cygx··on The case against geometric algebra (2024)
Note that by introducing the co-differential δ, you can write the Maxwell equations as a single expression (δ + d)F = J in the differential forms approach.

However, from the perspective of Yang-Mills theory, that's rather questionable as you're stitching together the Bianchi identity and the Yang-Mills equation for no particular reason.

cygx··on Computed goto for efficient dispatch tables (2012)
The problem is smuggling the label addresses outside the function

Just stick them in a static array and mark it .global via inline assembly.

cygx··on Your ePub Is fine
True, but that doesn't get Adobe off the hook: CSS mandates that unrecognized declarations should just be ignored, so the worst that's supposed to happen in the average case is some layout funkiness - not catastrophic failure.
cygx··on Transpiler, a Meaningless Word (2023)
Why is it useless? 'Compiler' denotes the general category, within which exist various sub-categories:

For example, a 'native compiler' outputs machine code for the host system, a 'cross compiler' outputs machine code for a different system, a 'bytecode compiler' outputs a custom binary format (e.g. VM instructions), and a 'transpiler' outputs source code. These distinctions are meaningful.

cygx··on An intuitive guide to Maxwell's equations (2020)
even more in geometric algebra: dF = J

You can do that using differential forms as well - using the co-differential δ, we can write a single equation (δ + d)F = J. However, from the perspective of Yang-Mills theory, that's a rather questionable approach as we're stitching together the Bianchi identity and the Yang-Mills equation for no particular reason...

cygx··on Nix: The Breaking Point
Microsoft is not your friend. Like most large companies, it tries to game the system to the detriment of the general public: Monopolistic practices (embrace-extend-extinguish, discounts for hardware vendors that only bundle Windows, ...), lobbying for software patents, tax avoidance, all that jazz.

There are also concerns with regard to civil liberties such as spying on their customers out of self-interest and on behalf of the US government, cooperating with authoritarian regimes such as China or their participation in Trusted Computing. Also note that while nowadays, just like many other tech companies, Microsoft might get criticized as being 'woke' by people with a certain political outlook, in the late 2000s, they were throwing people off xbox live for mentioning being gay in their profiles (or just having the surname 'Gaywood', for that matter).

cygx··on Nicolas Bourbaki
Shrugs. It's an issue, but not necessarily as extreme as some people make it sound, and not entirely limited to the social sciences (see e.g. the justification of the physicist who approved Igor Bogdanov's thesis back in the day: All these were ideas that could possibly make sense. It showed some originality and some familiarity with the jargon. That's all I ask.).
cygx··on Nicolas Bourbaki
In 2014, Springer and IEEE had to retract 120 comp-sci papers that were gibberish generated with SCIgen. The problem persists as of May 2021[1], and given the advancements in LLMs, I wouldn't be surprised if things are getting worse...

[1] https://asistdl.onlinelibrary.wiley.com/doi/10.1002/asi.2449...

cygx··on Webb and Hubble confirm Universe's expansion rate
Cf https://en.wikipedia.org/wiki/Scale_factor_%28cosmology%29

< 47k years: radiation-dominated era

< 9.8G years: matter-dominated era

> 9.8G years: dark-energy-dominated era

cygx··on Webb and Hubble confirm Universe's expansion rate
The Hubble sphere (the place where recession velocities hit the speed of light) is not the same as the particle horizon (our past lightcone at current cosmological time, the boundary of the observable universe) or the cosmic event horizon (our past lightcone at infinite cosmological time, the boundary of the asymptotically observable universe).

Cf the last paragraph of https://en.wikipedia.org/wiki/Hubble_volume

Observations indicate that the expansion of the universe is accelerating, and the Hubble constant is thought to be decreasing. Thus, sources of light outside the Hubble horizon but inside the cosmological event horizon can eventually reach us. A fairly counter-intuitive result is that photons we observe from the first ~5 billion years of the universe come from regions that are, and always have been, receding from us at superluminal speeds.

cygx··on Webb and Hubble confirm Universe's expansion rate
This is correct: For example, at time of emission of the light we receive today, GN-z11 had a recession velocity above 4c. A redshift of 1090 (which is the approximate redshift of the cosmic microwave background) corresponds to a recession velocity on the oder of 60c.
cygx··on Webb and Hubble confirm Universe's expansion rate
The party line is that energy is not conserved at cosmological scales. However, it's more of a semantic question: We can tell you exactly by how much it gets violated (that's basically the first Friedmann equation), and if you prefer, you can attribute the missing energy to the gravitational field. A lot of physicists don't like that approach as it isn't possible to write down a corresponding stress-energy tensor, ie gravitational energy cannot be properly localized.
cygx··on Webb and Hubble confirm Universe's expansion rate
Not sure that's convincing: Why would I multiply a unit of time (Yug) with unit of distance (Yojan) to arrive at the distance to the sun? Also note that per Wikipedia, the historical value of the Yogan can range from 3.5km (~2.2 miles) to 15km (~9.3 miles). How was the value of 8 miles chosen?
cygx··on Why Python's integer division floors (2010)
They made the correct decision here!

No love for Euclidean division?

cygx··on Why Python's integer division floors (2010)
It's a valid criticism: By the principle of least surprise, one should strive for a//b = int(a/b).

Basically, there's no free lunch. Personally, I prefer truncating integer division in combination with a pair of remainder operators.

cygx··on Why Python's integer division floors (2010)
A common approach (e.g. Cobol, Ada, Common Lisp, Haskell, Clojure, MATLAB, Julia, Kotlin) seems to be to provide two operators: One that uses truncated division, one that uses floored division. By convention, rem truncates, and mod floors.
cygx··on How Programming Languages Got Their Names
Perl: Pathologically Eclectic Rubbish Lister

(it's actually a reference to the Parable of the Pearl, but that name clashed with PEARL, a real-time programming language from the 70s developed in Germany)

cygx··on TCC RISC-V Compiler Runs in the Web Browser (Thanks to Zig Compiler)
https://www.youtube.com/watch?v=glL__xjviro&t=450s

Instead of popping up an alert, you could have requested the deletion of all files in the cloud storage.

cygx··on TCC RISC-V Compiler Runs in the Web Browser (Thanks to Zig Compiler)
Again, language-level safety doesn't matter here

It very well can:

For example, let's assume you have a graphics editor running in the browser that stores files in the cloud. If it uses a vulnerable C library to decode image data, an attacker might be able to play havoc with your files despite the sandbox never technically having been breached.

This can be mitigated by either using a safe language, or having the decoder run in an isolated wasm instance. Either way, you have to design your application with these considerations in mind and can't just take arbitrary, potentially vulnerable applications, compile them to wasm and be done with it.

cygx··on TCC RISC-V Compiler Runs in the Web Browser (Thanks to Zig Compiler)
Sure. Under that perspective, it's basically a new vector for XSS attacks.
cygx··on TCC RISC-V Compiler Runs in the Web Browser (Thanks to Zig Compiler)
In order to be useful, a sandboxed program needs to communicate with the environment (the equivalent of system calls). If you can corrupt internal state, you can control the arguments to those calls, which may have security implications.

For example, if you corrupt a program that's allowed to use web sockets, you'll be able to port scan the user's local network.

cygx··on TCC RISC-V Compiler Runs in the Web Browser (Thanks to Zig Compiler)
Note the SJLJ is one of the ways to implement C++ exceptions, which is one of the reasons why LLVM keeps it around[1].

[1] https://llvm.org/docs/ExceptionHandling.html#sjlj-intrinsics

cygx··on On Leibniz Notation
Cf https://en.wikipedia.org/wiki/Parameter_%28computer_programm...
cygx··on On Leibniz Notation
Or use the convention from differential geometry, where the letter denotes a coordinate on the function's domain.
cygx··on On Leibniz Notation
Note that in context of differential geometry, the name in the denominator is not associated with the function, but a coordinate system on its domain:

Let M be a differential manifold, eg M = ℝ² and φ a chart, eg cartesian coordinates φ: p ↦(x(p), y(p)) where x,y: M → ℝ. Then, ∂/∂x denotes the holonomic vector field tangent to the coordinate lines t ↦ φ⁻¹(x(p) + t, y(p)) through any p ∈ M.

It is convenient to identify vectors and directional derivatives (this is in fact one possible way to define tangent vectors on manifolds), which for a function f: M → ℝ yields

(∂f/∂x)(p) = ∂/∂x|ₚ f = lim_{h → 0} ( f(φ⁻¹(x(p) + h, y(p))) - f(p) ) / h

cygx··on The best WebAssembly runtime may be no runtime
Don't focus on the specific exploit, it's a general issue:

In order to be useful, your wasm application will likely have to be able to make systems calls, or whatever its equivalent might be on your particular host environment. If you can corrupt internal state, you can control the arguments to these calls. The severity of the issue will depend on what your application is allowed to do: If all it has access to is a some virtual file system, the host will still be safe. But if that virtual file system contains sensitive data, results may nevertheless be catastrophic if, say, it can also request resources over http.

← PreviousPage 2 of 34Next →