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

vitepress seems to use https://github.com/lucaong/minisearch/ and the vitepress docs I have built and used are good.

Agreed, using `var` keyword for something that is non-var-ying (aka immutable) is not very intuitive.

Mutability is distinct from variability. In Javascript only because it's a pretty widely known syntax:

    const f = (x) => {
      const y = x + 1;
      return y + 1;
    }
y is an immutable variable. In f(3), y is 4, and in f(7), y is 8.

I've only glanced at this Zen-C thing but I presume it's the same story.


"immutable variable" is an oxymoron. Just because Javascript did it does not mean every new language has to do it the same way.

There are two distinct constructs that are referred to using the name variable in computer science:

1) A ‘variable’ is an identifier which is bound to a fixed value by a definition;

2) a ‘variable’ is a memory location, or a higher level approximation abstracting over memory locations, which is set to and may be changed to a value by an assignment;

Both of the above are acceptable uses of the word. I am of the mindset that the non-independent existence of these two meanings in both languages and in discourse are a large and fundamental problem.

I take the position that, inspired by mathematics, a variable should mean #1. Thereby making variables immutably bound to a fixed value. Meaning #2 should have some other name and require explicit use thereof.

From the PLT and Maths background, a mutable variable is somewhat oxymoronic. So, I agree let’s not copy JavaScript, but let’s also not be dismissive of the usage of terminology that has long standing meanings (even when the varied meanings of a single term are quite opposite).


I think you are confused by terminology here and not by behavior, "immutable variable" is a normal terminology in all languages and could be says to be distinct from constants.

In Rust if you define with "let x = 1;" it's an immutable variable, and same with Kotlin "val x = 1;"


Lore and custom made "immutable variable" some kind of frequent idiomatic parlance, but it’s still an oxymoron in their general accepted isolated meanings.

Neither "let" nor "val[ue]" implies constancy or vacillation in themselves without further context.


Words only have the meaning we give them, and "variable" already has this meaning from mathematics in the sense of x+1=2, x is a variable.

Euler used this terminology, it's not new fangled corruption or anything. I'm not sure it makes too much sense to argue they new languages should use a different terminology than this based on a colloquial/nontechnical interpretation of the word.


I get your point on how the words meanings evolves.

Also it’s fine that anyone name things as it comes to their mind — as long as the other side get what is meant at least, I guess.

On the other it doesn’t hurt much anyone to call an oxymoron thus, or exchange in vacuous manner about terminology or its evolution.

On the specific example you give, I’m not an expert, but it seems dubious to me. In x+1=2, terms like x are called unknowns. Prove me wrong, but I would rather bet that Euler used unknown (quantitas incognita) unless he was specifically discussing variable quantities (quantitas variabilis) to describe, well, quantities that change. Probably he used also French and German equivalents, but if Euler spoke any English that’s not reflected in his publications.


"Damit wird insbesondere zu der interessanten Aufgabe, eine quadratische Gleichung beliebig vieler Variabeln mit algebraischen Zahlencoeffizienten in solchen ganzen oder gebrochenen Zahlen zu lösen, die in dem durch die Coefficienten bestimmten algebraischen Rationalitätsbereiche gelegen sind." - Hilbert, 1900

The use of "variable" to denote an "unknown" is a very old practice that predates computers and programming languages.


Yes sure, I didn't mean otherwise, but I just wanted to express doubts about Euler already doing so. Hilbert is already one century forward.

Haskell, then.

    f x = let y = x + 1 in y + 1
Same deal. In (f 3), y = 4, in (f 7), y = 8. y varies but cannot mutate. Should be a true enough Scottsman.

“Immutable” and “variable” generally refers to two different aspects of a variable’s lifetime, and they’re compatible with each other.

In a function f(x), x is a variable because each time f is invoked, a different value can be provided for x. But that variable can be immutable within the body of the function. That’s what’s usually being referred to by “immutable variable”.

This terminology is used across many different languages, and has nothing to do with Javascript specifically. For example, it’s common to describe pure functional languages by saying something like “all variables are immutable” (https://wiki.haskell.org/A_brief_introduction_to_Haskell).


Probably variable is initially coming out of an ellipsis for something like "(possibly) variable* value stored in some dedicated memory location". Probably holder, keeper* or warden would make a more accurate terms using ordinary parlance. Or to be very on point and dropping the ordinariness, there is mneme[1] or mnemon[2].

Good luck propagating ideas, as sound as it might, to a general audience once something is established in some jargon.

[1] https://en.wiktionary.org/wiki/mneme [2] https://www.merriam-webster.com/medical/mnemon


> Probably variable is initially coming out of an ellipsis for something like "(possibly) variable* value stored in some dedicated memory location".

No, the term came directly from mathematics, where it had been firmly established by 1700 by people like Fermat, Newton, and Leibniz.

The confusion was introduced when programming languages decided to allow a variable's value to vary not just when a function was called, but during the evaluation of a function. This then creates the need to distinguish between a variable whose value doesn't change during any single evaluation of a function, and one that does change.

As I mentioned, the terms apply to two different aspects of the variable lifecycle, and that's implicitly understood. Saying it's an "oxymoron" is a version of the etymological fallacy that's ignoring the defined meanings of terms.


optimized for HiDPI screens (like those on Apple devices)


ohhh... is this that thing where people say "blurry" to describe anti-aliasing, because they actually want it to be pixelated?


Nope, it is the thing where people say "blurry" to describe "blurry".

https://github.com/zed-industries/zed/issues/7992#issuecomme...

This is how Zed looks like on my computer too. VSCode manages to render things crisply while Zed is a blurry mess.


Thank you for the example. That shows exactly what I was talking about, so this issue is clearly (at least somewhat) a matter of taste. To my eyes, those VSCode samples look harsh, crudely pixelated like something out of the 1990s, while the Zed samples look like normal anti-aliased text.


No other editor or app that I use on macOS looks like this. None. This is not just AA, I like properly AA’d text.


Ahh, thanks for the explanation. I guess I was thrown off by the screenshot attached to that bug report upthread, where someone compared zed's rendering against completely non-anti-aliased text rendered by VS Code.


No, this is a thing where the text is honest to God blurry on non-4K displays. The macOS version of Zed on a low DPI display has the worst font rendering of any application I've ever seen, and I used desktop Linux twenty years ago.

It's like they're rendering a high resolution font at low resolution using the simplest possible algorithm without lining it up with the pixel grid. It's very fuzzy. Characters have this weird sort of additive color intensity where strokes intersect that reminds me of Geometry Wars. It's broken.

They are working on it; the Windows build has decent rendering, and apparently the Linux version substantially improved recently. But they haven't gotten to macOS quite yet. I've been checking in on Zed every few weeks since it went public waiting for a fix.


It might be. I can't speak for anybody else, but it's probably the term I'd use myself if I was trying to explain it, even if it's perhaps not exactly the perfect one. The pixel edges just end up not hard enough, and the pixel corners just end up not sharp enough, and my eyes don't seem to like it. Whatever they're looking for when they're looking at text, pixelly text and printed text seem to supply it, and anti-aliased text doesn't.

(Though there must be some cutoff point past which the pixel size becomes irrelevant. I certainly don't mind reading stuff on the iPad.)


This is also a big issue for me and has one of the largets issues for a while. [1] I wish there was font hinting to the like of windows font rendering.

[1] https://github.com/zed-industries/zed/issues/7992


I also notice this. Maybe it was not intended to "snap" on animation checkpoints though. Scrolling with a touch scroll or mouse middle-click-and-drag is pretty smooth.


Additionally, the data is comparable to the census [1] which suggests there is not a lack of data context or translation from DB date format to actual date/age.

Then again, these are just posts of screenshots on a site filled with AI-generated content.

[1] https://x.com/jonatanpallesen/status/1891406665242546383



WiFi-to-WiFi hotspot is a good idea, I don't think all phones can do that though. I once used my rooted Android to spoof my Wifes MAC address to use her in-flight WiFi she paid for after she was not using it anymore.


If I understand correctly, if your WiFi chip comes with 2.4 and 5 GHz bands, it's "trivial" to connect to the network using the one band and provide the hotspot on the other one - it already has 2 antennas - at least the issue wouldn't be the hardware.


Lots of hardware supports being operated in access point mode and station mode at the same time -- on the same radio/antenna(s).

Even the venerable (and ancient) WRT54G could do this with appropriate firmware.

IIRC, I've even used this functionality with Windows ICS on my laptop many moons ago

It's not necessarily an efficient function, but efficiency isn't always the most important thing.

(These days, I often travel with a Mikrotik device that I've set up to be a hotspot abuser, so as to provide myself and whoever is with me a slice of Internet while having the immediate appearance of being a solitary device. It does this trick very well indeed.)


I know nothing about the Cola recipe, but this fork seems to change some things up [1]. README says it is from "This American Life" [2] but it looks like it is closer to that of colawp.com [3].

'TAL' calls for FE Coca, Alcohol, and Vanilla but 'colawp' does not.

1: https://github.com/mmichelli/Coca-Cola/compare/master...cogn...

2: https://www.thisamericanlife.org/extras/the-recipe

3: https://www.colawp.com/colas/400/cola467_recipe.html


I think it found an infinity money gltich. I held a 2 of hearts and a 3 of clubs on the far left and far right and it glitched out and did not give me 3 cards. Instead it gave me 3 black boxes, a royal flush and says I won "$"aHROcHM6Ly".... Now my cash keeps counting up, it is at over $2,000 now.


I hear Cabo is nice this time of year.


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

Search: