Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Perl? No, try INTERCAL. (Score 1) 80

If you must write in a language that often looks like line-noise, try one that was designed to look that way ... INTERCAL

ChatGPT prompt "please write me a short program in Intercal that calculates and outputs the first 20 prime numbers

ChatGPT Response: Below is a working INTERCAL program (tested for C-INTERCAL dialect) that calculates and outputs the first 20 prime numbers. It uses a very basic trial-division algorithm and outputs each prime on its own line.

PLEASE DO ,1 <- #20 ; how many primes we want
PLEASE DO ,2 <- #0 ; count of primes found
PLEASE DO ,3 <- #1 ; current candidate number
PLEASE DO ,4 <- #0 ; divisor for trial division
PLEASE DO ,5 <- #0 ; flag: prime/not prime

(100) PLEASE DO ,3 <- ,3 + #1 ; next candidate
PLEASE DO ,5 <- #1 ; assume prime
PLEASE DO ,4 <- #2 ; start trial division

(200) PLEASE IF ,4 × ,4 > ,3 THEN (300) ; stop when divisor^2 > candidate
PLEASE IF ,3 % ,4 = #0 THEN (250) ; divisible not prime
PLEASE DO ,4 <- ,4 + #1
PLEASE RESUME (200)

(250) PLEASE DO ,5 <- #0 ; mark not prime

(300) PLEASE IF ,5 = #1 THEN (400) ; if still prime, output
PLEASE RESUME (100)

(400) PLEASE DO ,2 <- ,2 + #1
PLEASE WRITE OUT ,3
PLEASE IF ,2 < ,1 THEN (100)
PLEASE GIVE UP

I haven't checked, but I believe there are too many "Please"s in this which will generate a "err: code insincere"

Comment It's been up far longer than intended. (Score 1) 18

Zvezda was originally built in the mid 1980s by the USSR to be the core of Mir-2 then mothballed until it was repurposed and modified for the ISS. I can't find a good source for the design service life of Mir-2 was, but Space.com says Mir had an intended lifespan of 5 years and Astronautix says Mir-2 also had an intended service life of 5 years.

Mir was in orbit for 15 years, three times its design life and by the mid 1990s the cooling and Elektron oxygen generating systems were starting to break down . Next month Zvezda will have been in orbit for 25 years, probably five times its design life.

I find it amazing that it is still functioning as well as it is, but ???

Comment Re:Maybe its me ... (Score 1) 18

There's always enough spacecraft docked to get the crew back to Earth if needed but given that the leak was first noticed in 2019 and has slowly become worse, this looks like "an abundance of caution".

OTOH, unless the USA is planning to stop sending crews to the ISS, it will need to send a new crew up sooner or later.

Comment The irony of using the name Tahoe for this (Score 1) 67

In 1988 CSRG, University of California, Berkeley released 4.3BSD Tahoe which IIRC was the first port they made of BSD to a non-DEC processor.

CM Mach and 4.3BSD Tahoe were the parents of NeXTSTEP (1989) which when merged with Classic Mac OS and refreshed with more recent Mach & BSD implementations through Darwin (2000) ultimately gave us the modern Mac operating systems.

In 2025 we learn that the Tahoe name has been dusted off for the last portable version of macOS.

I'm loving the irony.

Comment Re: Oh no! (Score 1) 69

My guess would be try to link email addresses to public figures and try to blackmail them with the threat of releasing all of their posts

This doesn't sound like an efficient method of determining the true market value of the posts. Why not hold an online auction for each public figure? Obviously bids would need to be in bitcoins or similar and they would need to find an escrow service that could handle bitcoins but that would not seem insolvable.

Comment What was the IP address? (Score 1) 51

Was it an RFC1918 (Private) address?
If so I fail to see a problem other than proof of sloppy failure to remove development testing code. Of course sending medical devices out with development testing code in them is a whole new can of worms.

If it's a public address, where is it?
The inference is it's in China, if so it is a major problem.

Comment Re:Full immigration amendment (Score 1) 65

If the immigration officer at the border is suspicious they may ask what you are planning to see, otherwise nobody will care. Before flying in, spend an hour researching the top 10 or 20 tourist attractions close to the areas you are flying into & out of and print off some kind of itinerary to show the immigration officer if asked. Nobody will know if you really did go into the Auckland museum or the National art gallery.

Comment Enforcing robots.txt restrictions (Was Re:Great!) (Score 1) 87

Many years ago I was a client of a web hosting service that blocked rogue web crawlers by a simple expedient. Its robots.txt file banned a directory and there was an invisible link on the page footers to a file in that directory. Anything accessing that file had its IP address blocked.

Shouldn't be too hard to update this concept for today's technology.

Slashdot Top Deals

"Bond reflected that good Americans were fine people and that most of them seemed to come from Texas." - Ian Fleming, "Casino Royale"

Working...