Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xscott
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
91.
▲
by
xscott
8mo ago
Language changes over time, and I remember recent memes where a cute girl says something like "claiming you're moderate means you know conservatives don't get laid" (presumably because of abortion politics). It makes me
92.
▲
by
xscott
8mo ago
Very simple code is UB: int handle_untrusted_numbers(int a, int b) { if (a < 0) return ERROR_EXPECTED_NON_NEGATIVE; if (b < 0) return ERROR_EXPECTED_NON_NEGATIVE; int sum = a + b; if (sum < 0)
93.
▲
by
xscott
9mo ago
For or against, I don't know why the "just predicting" or "stochastic parrots" criticism was ever insightful. People make one word after another and frequently repeat phrases they heard elsewhere. It's kind o
94.
▲
by
xscott
10mo ago
No, but in this case it indicates some hypocrisy.
95.
▲
by
xscott
10mo ago
> It was annoying but if it hadn't happened Python would still be struggling with basic things like Unicode. They should've just used Python 2's strings as UTF-8. No need to break every existing program, just deprecate an
96.
▲
by
xscott
11mo ago
I'm not a web dev. Are people really that opposed to writing a function which would solve problems in their project? It's two lines long...
97.
▲
by
xscott
11mo ago
> Assuming assert existed It's a function you could write for yourself and give it whatever semantics you feel is best. No changes to the language required for this one.
98.
▲
by
xscott
11mo ago
The Rust example I showed changes behavior when you declare the types. It's not just a readability or bug catching thing.
99.
▲
by
xscott
11mo ago
> Why would you say that? I feel this pushes people away. It's not my obligation to evangelize for your pet language. I've spent enough time and written enough code in Rust to have a defensible viewpoint. This is public forum
100.
▲
by
xscott
11mo ago
It also comes up when you want compile time expressions as parameters to your generics: // nice and clean let a = Generic[T, A > B]::new(); // gross curlies needed because of poor choices let a = G
101.
▲
by
xscott
11mo ago
> Rust isn't as hard or as bad as you think. I think this depends a LOT on what you're trying to do and what you need to learn to do it. If you can get by with the std/core types and are happy with various third party cra
102.
▲
by
xscott
11mo ago
> For this specific issue, if square brackets were used for generics, then something else would have to change for array indexing The compiler knows when the `A` in `A[B]` is a type vs a variable.
103.
▲
by
xscott
11mo ago
I see your point, and it's a nice example, but not completely parallel to the Rust/StandardML thing. Here, your RHS is an initializer, not a value. // I don't think this flies in C or C++, // ev
104.
▲
by
xscott
11mo ago
Lol, yes they would. However, I wouldn't. :-)
105.
▲
by
xscott
11mo ago
> This is like complaining that in C [...] It's really not. Only one of my examples has the equivalent of superfluous parens, and none are dereferencing anything. And I'm not defending C or C++ anyways. When I was trying to l
106.
▲
by
xscott
11mo ago
Do these print statements print the same thing? let i = 1; let j = 1; print!("i: {:?}\n", !i); print!("j: {:?}\n", !j); let v = vec![1, 2, 3]; v[i]; There are definitely times you want to sp
107.
▲
by
xscott
11mo ago
Only `b` has the equivalent of "superfluous parens". It's practically your job to defend Rust, so I don't expect you to budge even one inch. However, I hate the idea of letting you mislead the casual reader that this is
108.
▲
by
xscott
11mo ago
Fwiw, I didn't go looking for obscure examples to make HN posts. I've had three rounds of sincerely trying to really learn and understand Rust. The first was back when pointer types had sigils, but this exact declaration was my
109.
▲
by
xscott
11mo ago
This is some True Scotsman style counter argument, and it's hard for me to make a polite reply to it. There are people who program with a "fake it till you make it" approach, cutting and pasting from Stack Overflow, and hopin
110.
▲
by
xscott
11mo ago
I'm not sure which of the dozen Rust-syntax supporters I should reply to, but consider something like these three (probably equivalent) syntaxes: let mut a = Vec::<u32>::new(); let mut b = <Vec::<u32>>::new(
111.
▲
by
xscott
11mo ago
Hours aren't SI/metric. That factor of 3600 makes any conversion to acceleration more ugly than it should be (rounding a curve for instance). Nearly as bad as 5280 in my opinion. And really, 30 meters/second would be a nic
112.
▲
by
xscott
11mo ago
I see, thank you. I'd have thought the memory size was (mostly) independent of the chip "level" (Ultra, Max, whatever), but my understanding of memory controllers is really limited.
113.
▲
by
xscott
11mo ago
The M3 Studio can have 512GB of RAM, the M4 Studio maxes out at 128GB, and the M5 laptop 32GB. I assume the eventual M5 Studio will allow more, but can anyone explain why newer generation chips are getting paired with lower max memory? Th
114.
▲
by
xscott
1y ago
You're confused about whose rights are at stake. It's you, not the LLM, that is being restricted. Your argument is like saying, "Books don't have rights, so the state can censor books."
115.
▲
by
xscott
1y ago
If you look at the LLMs as a new kind of fuzzy search engine instead of focusing on the fact that they're pretty good at producing human text, you can see it's not about whether the LLMs have a right to "speak", it'
116.
▲
by
xscott
1y ago
I think you have to start lower than that, with the voting system itself. I've seen it argued in several places that "first past the post" leads to only two parties.
117.
▲
by
xscott
1y ago
If you just want to see the colors in action, here's some some JavaScript you could run with Deno: const encoder = new TextEncoder(); function csi(text, ... args) { const filt = args.filter(xx => xx !== null);
118.
▲
by
xscott
1y ago
You don't know if those 9s repeat forever in this problem. It's output from a program, and the program could switch to 3s in 1000 more digits. The "adding" program is reading text digits from two other programs and can
119.
▲
by
xscott
1y ago
I did say we needed to be careful with the definitions. I'm sure you can look at Wikipedia to see that Minsky gave a definition like I used. You're not wrong to use a new definition though.
120.
▲
by
xscott
1y ago
> It seems like you're suggesting that mathematicians replace the reals with the computables. No, not any more. :-) I liked the idea a year or two ago, but I've come to believe that even the Integers are too bizarre to worry a
More ›