Readit News logoReadit News
ky3 commented on The Day the Telnet Died   labs.greynoise.io/grimoir... · Posted by u/pjf
digitalPhonix · 2 days ago
The CVE referenced is caused by this commit:

https://codeberg.org/inetutils/inetutils/commit/fa3245ac8c28...

One of the changes is:

    -  getterminaltype (char *user_name, size_t len)
    +  getterminaltype (char *uname, size_t len)
What is the reason for a rename these days? If I saw that in a code review I’d immediately get annoyed (and probably pay more attention)

ky3 · 2 days ago
Wouldn't attention to getenv() calls yield more benefit? Such calls are where input typically isn't parsed--because parsing is "hard"--becoming targets for exploit.

The present fix is to sanitize user input. Does it cover all cases?

ky3 commented on Code is cheap. Show me the talk   nadh.in/blog/code-is-chea... · Posted by u/ghostfoxgod
acedTrex · 13 days ago
I've always said every line is a liability, its our job to limit liabilities. That has largely gone out the window these days.
ky3 · 13 days ago
EWD 1036: On the cruelty of really teaching computing science (1988)

“My point today is that, if we wish to count lines of code, we should not regard them as ‘lines produced’ but as ‘lines spent’: the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.”

ky3 commented on Mathematics for Computer Science (2018) [pdf]   courses.csail.mit.edu/6.0... · Posted by u/vismit2000
MaxBarraclough · a month ago
For good measure here's a link to Dijkstra's The undeserved status of the pigeon-hole principle.

https://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD109...

ky3 · a month ago
For even better measure here's a slice of HN reactions to EWD1094:

https://news.ycombinator.com/item?id=46085897

ky3 commented on Mathematics for Computer Science (2018) [pdf]   courses.csail.mit.edu/6.0... · Posted by u/vismit2000
AstroBen · a month ago
Good textbooks have gone through expert reviews and multiple iterations of improvement. That can't be said of an LLM answering your personalized questions or the book problem

But why not both?

ky3 · a month ago
> Good textbooks have gone through expert reviews and multiple iterations of improvement.

That's an assumption increasingly false, unfortunately. The spirit of collegiality has been beaten back.

Far better to hone logical skills that sift between fact and error than to rely on social reputation. Ironically we're discussing a text designed to do exactly that.

The savvy LLM user already knows to be on the lookout for falsehood, if not bad pedagogy. That's a benefit, not a drawback of LLMs.

ky3 commented on Mathematics for Computer Science (2018) [pdf]   courses.csail.mit.edu/6.0... · Posted by u/vismit2000
AstroBen · a month ago
I looked into this book before and without solutions it makes it much harder to use for self-study. Maybe LLMs do change that now but I'm not sure I'd trust their output if I were learning the topic

Susanna Epp's Discrete Mathematics With Applications is also a really good option

ky3 · a month ago
The logical skills to evaluate the output of a LLM are the same skills brought to bear reading any book. What makes you trust this textbook then? Textbooks are not infallible.
ky3 commented on Mathematics for Computer Science (2018) [pdf]   courses.csail.mit.edu/6.0... · Posted by u/vismit2000
ky3 · a month ago
re: Chapter 15.8 on the so-called pigeonhole principle

Following Dijkstra’s EWD1094, here’s a way to solve the hairs-on-heads problem eschewing the language of pigeonholes and employing the fact that the mean is at most the maximum of a non-empty bag of numbers.

We are given that Boston has 500,000 non-bald people. The human head has at most 200,000 hairs. Show that there must be at least 3 people in Boston who have the same number of hairs on their head.

Each non-bald Bostonian must have a hair count between 1 and 200,000. The average number of such people per hair count is 500,000 / 200,000 = 2.5. The maximum is at least that; moreover, it must be a round number. So the maximum >= 3. QED.

ky3 commented on Mathematics for Computer Science (2018) [pdf]   courses.csail.mit.edu/6.0... · Posted by u/vismit2000
PanoptesYC · a month ago
I've not worked through a large book of problems like this before. At risk of sounding silly, are there solutions to the sample problems? I've given a few a go but can't find the answers anywhere to check my work.
ky3 · a month ago
Such problems are a cakewalk for LLMs, you realize? Lots of didactic activities you could do with LLMs.
ky3 commented on Trump says Venezuela’s Maduro captured after strikes   reuters.com/world/america... · Posted by u/jumpocelot
ericmay · a month ago
By that logic the US shouldn’t get involved in any other foreign entanglement or global police action because of unintended consequences. Tell me, who from the international community will seize Russian shadow fleet oil tankers evading sanctions!

Wait! Crap!

We can’t sanction Russia - if we do it might destabilize the Russian dictator and if he goes out a worse authoritarian regime might come to power!

ky3 · a month ago
Which nation did Maduro invade again? Did you confuse Venezuela with Russia?

> By that logic the US shouldn’t get involved in any other foreign entanglement or global police action because of unintended consequences.

Strawman. No-one is claiming that.

ky3 commented on Trump says Venezuela’s Maduro captured after strikes   reuters.com/world/america... · Posted by u/jumpocelot
ericmay · a month ago
Are you really trying to paint Maduro’s authoritarian regime, who traffics people and drugs, and helps Russia evade international oil and arms sanctions and the US arresting of him as “their leadership doesn’t want to give America access to their natural resources”?

The EU doesn’t even recognize Maduro as the legitimate leader of Venezuela and he forced the democratically elected president into hiding!

ky3 · a month ago
Are you arguing two wrongs make a right? This most recent wrong would likely gestate an even worse authoritarian regime than the earlier wrong.

Where is the right you're seeing?

ky3 commented on Reverse math shows why hard problems are hard   quantamagazine.org/revers... · Posted by u/gsf_emergency_6
paulddraper · 2 months ago
The first time I saw the Pigeonhole Principle was in the following:

Problem: A plane has every point colored red, blue, or yellow. Prove that there exists a rectangle whose vertices are the same color.

Solution: Consider a grid of points, 4 rows by 82 columns. There are 3^4=81 possible color patterns of columns, so by the Pigeonhole Principle, at least two columns have the same color pattern. Also by the Pigeonhole Principle, each column of 4 points must have at least two points of the same color. The two repeated points in the two repeated columns form a rectangle of the same color. QED.

The Pigeonhole Principle is very neat. It would be hard not to use it for the proof.

Partly that article argues against proof by contradiction which does seem to be overused.

ky3 · 2 months ago
A grid with 19 columns is enough. Every column at worst has all 3 colors, one of them used twice. Once we fix that one color, there are C(4,2)=6 ways of filling out the rest of the entries. Since there are 3 colors, there are exactly 6*3=18 worst possible columns. With 19 columns a repetition is guaranteed, yielding the desired rectangle.

For fun, try strengthening the result to a square.

u/ky3

KarmaCake day346August 21, 2012
About
Kim-Ee Yeoh

ky3@atamo.com

http://www.atamo.com/

View Original