
Is_computer_on_fire() (2000) - adamnemecek
http://everything2.com/title/is_computer_on_fire%2528%2529
======
leakybucket
As I recall, we used this for system call testing/timing. (I worked at Be.)

~~~
niklasni1
You can't just say you worked at Be and not tell more stories! When were you
there and what did you do? Why do you think you didn't take over the world?
Have you tried Haiku?

~~~
mkramlich
indeed. Be belongs to a list of companies that would be great to hear insider
stories about. also NeXT, Thinking Machines, Symbolics (sp?), Infocom, Cray,
etc

------
digi_owl
I guess it goes well with the old UNIX printer error.

[https://en.wikipedia.org/wiki/Lp0_on_fire](https://en.wikipedia.org/wiki/Lp0_on_fire)

------
ungzd
BTW, this site (everything2.com) suffers from some malicious ad script. If
viewed from desktop, everything is ok, if viewed from android browser, it
displays this: [http://imgur.com/eWUjwHr](http://imgur.com/eWUjwHr) (text
means: "to view this site, UC browser is required", this message cannot be
dismissed).

~~~
ASalazarMX
Most likely your phone has unwanted software or your carrier is injecting ads.
At least it seems clean on my Android using Chrome or Firefox.

------
ams6110
I'd like to see the unit test for that one.

~~~
jesuslop
Maybe one can try the HCF assembly extension as in
[http://en.wikipedia.org/wiki/Halt_and_Catch_Fire](http://en.wikipedia.org/wiki/Halt_and_Catch_Fire)

------
bluedino
What was Everything2 supposed to be? I remember it was almost like a Wikipedia
thing that never really matured and it always seemed really slow. The
Blockstackers guys from Slashdot built it, didn't they?

~~~
SwellJoe
Kind of a more loosely structured WikiPedia, with fewer rules and a lot more
opinion. It's probably more comparable to the original wiki wiki web, by Ward
Cunningham (c2.com, which contains a little bit of everything, kinda like
everything2), though it evolved in different directions. It developed more
focus on creative writing and commentary over the years, with less emphasis on
encyclopedia style articles or technical articles, though I haven't paid
attention to it in like a decade. I was very excited about it when it first
came about, though.

It was closely related to Slashdot, but when Slashdot was sold, E2 remained
independent.

~~~
chromatic
_when Slashdot was sold, E2 remained independent._

Some of the profits of the Slashdot sale went to Blockstackers as an
investment to develop E2. Unfortunately, the dot-com crash (and, to be fair,
not enough effort spent marketing the software) meant there was little market
for the underlying CMS.

~~~
alxndr
And the underlying CMS was pretty messy if memory serves.

~~~
chromatic
It wasn't great, though for 2000-era mod_perl code, it was decent. It had a
lot of solid ideas that predated the Rails-wave of web development, but they
could have used a lot more polish.

~~~
alxndr
That's good to hear. It (and a python-based rewrite) was one of the first
software projects I looked at and had a chance to mess with when I began to
learn to code.

------
SeanLuke
Better: the Newton had, as part of the NewtonScript language reference, a
built-in "IsHalting" function which tested a function and determined if it
would halt with a provided input.

See page 23-84 of:

[http://manuals.info.apple.com/MANUALS/1000/MA1509/en_US/Newt...](http://manuals.info.apple.com/MANUALS/1000/MA1509/en_US/NewtonProgrammerRef20.PDF)

~~~
scintill76
Is this just a joke, or is the language and/or function actually limited such
that a meaningful return value can be computed?

~~~
SeanLuke
NewtonScript is very much a Turing-complete language.

------
chiph
I was just thinking about BeOS the other day. If you recall, Be had fantastic
multithreading, and could render multiple video streams at the same time. They
even gave you a file on the distribution CD to test this capability:

[https://www.youtube.com/watch?v=2jMFiRvxvrc](https://www.youtube.com/watch?v=2jMFiRvxvrc)

~~~
anon4
I keep hearing about Be's mt capabilities, but I haven't read anything in
detail. Can you point me to some materials that explain how it's different
from e.g. Linux?

~~~
dnautics
Yeah... It's been years since I thought about this, but: for linux you
basically have two options: fork() and pthreads. Fork creates a new process
and IPC between the parent and daughter processes can be cumbersome - and it's
not a terribly good system since if you're spawning a process to do a
different task, the default state contains overhead of the old task. Pthreads
gives you shared memory (and simple mutexes to protect critical data) but
that's about it.

Beos' app model discouraged the use of fork() - but you could if you wanted to
- and instead had a pthreads-like kernel level support for threads with some
very nice C classes that handle message-passing and the like; interthread
communication was baked in in too so you could have strong IPC without pipes.
BeOS also came with a hybrid spinlock-semaphore mutex called the 'benaphore'.

There were some very excellent C++ wrappers for all of these too, the BLooper
class was a by-default message handling loop (for example).

Finally, the threading model was pretty cool, it was a logarithmic stochastic
time allocator with a range of "hard priorities" that would give you RT
control (but could also freeze your machine if you had an infinite loop).
Unfortunately the kernel had a tendency to thrash threads between CPUs in a
multi-cpu setup. I think this was fixed in Haiku.

------
Aardwolf
The documentation is incomplete, it doesn't say whether it's in Kelvin or
Celcius.

~~~
Intermernet
Degrees Rankine.

[http://en.wikipedia.org/wiki/Rankine_scale](http://en.wikipedia.org/wiki/Rankine_scale)

------
agildehaus
Re-implemented in Haiku:

[https://github.com/haiku/haiku/blob/master/src/system/libroo...](https://github.com/haiku/haiku/blob/master/src/system/libroot/os/system_info.cpp#L193)

~~~
ComSubVie
I would have expected something more creative than a static number.

~~~
mveety
That's pretty much the behaviour on anything that isn't a BeBox. I had a
program I wrote that used this on my BeBox and when I moved to 5 Pro on a
Pentium it kept giving the same tempurature.

------
code_duck
'is_computer_on()' is an interesting corollary.

~~~
SapphireSun
I guess it returns a falsy value (null) if the computer isn't on.

~~~
shultays
It is undefined behaviour

------
Kiro
Is ariels's critique valid? Is that best practice for functions returning a
boolean?

What about applying the same logic to a function returning a number between X
and Y?

    
    
      if (random_number_between(1, 10) > 5) {
        do_something();
      }
    

Is this correct? I would personally name such functions
get_random_number_between instead but that violates this principle.

~~~
NickPollard
'best practice' is a difficult concept when it comes to naming things, which
is one of the two hard problems of computer science.

However, I agree with ariel. In a functional-style program, or indeed in most
programs, the important thing about a function is what it _returns_ , not what
it _does_. Calling a function 'getRandomNumber' describes the action of the
function, not the return value, which is just 'randomNumber'. As your example
shows, the logic in English flows much more naturally with the latter.

It's much better to talk about the box.size, rather than the box.getSize, for
example. To me, the presence of 'get' in a function name is almost always a
bad idea.

Similarly, I normally use the word 'as' rather than the word 'to' when naming
conversion functions, e.g. list.asArray, rather than list.toArray

~~~
laumars
You make some valid points, but what about instances where you have a getter
and a setter?

~~~
NickPollard
With setters, you're implicitly working in a mutable world, at which point it
makes sense to name it for the action, so I think you have to use 'set'. So I
would have x() and setX(), instead of getX() and setX().

In an immutable world where you're making a copy (perhaps even through a
lens), then I often use 'with', e.g. myNewObject = myObject.withX(12.0).

~~~
laumars
Interesting.

I guess on many occasions, the get/set could also be avoided by thinking about
the usage a little deeper. Take HTTP frameworks for example:

    
    
        getHeader()
        setHeader(key, val string)
    

could also be defined as:

    
    
        requestHeader()
        responseHeader(key, val string)
    

I must admit I'm someone who, despite best efforts to give meaningful and
consistent function names, often ends up with something less standardised by
the time projects start to grow, deadlines loom and fatigue sets in (I'd
imagine this is probably true for most people - if we're completely honest).
But it's always good to get (if you pardon my pun) reminders and advice about
sane naming conventions.

~~~
NickPollard
Yeah, naming things is _hard_. Harder than most other things. There's always
trade offs and it's heavily dependent on personal preference.

That said, I think your ideas here are good. 'Get' and 'Set' really don't
convey that much information, whilst your code above makes it clearer what is
going on.

------
rab_oof
Styleshedding: bikeshedding on programming language style and declaring only a
particular one true way is the only "universal correct" answer. (The tech
equivalent of the Islamic State (because Godwins Law is deprecated since Nazis
are now no longer the worst possible butchers to which to compare people.))

(Common sense from experience > style guides.)

------
slm_HN
This somehow reminds me of the show Halt and Catch Fire, which was one of the
most god-awful shows I've ever watched. After Breaking Bad, Mad Men and The
Walking Dead I expected a little more from AMC.

~~~
DrewRWx
Yet somehow it was renewed for a second season. I can't wait!

