HN user

fdkz

48 karma

Elmo Trolla

http://etm.blastnet.ee/pub/

Posts0
Comments25
View on HN
No posts found.

This did not help in my case. I have 3 DisplayPort 1.2 monitors, and half of the open windows get still tossed around randomly when the monitors wake from sleep, or when the whole PC wakes from sleep.

I just disable the windows update service under "Services" and re-enable once every two weeks (and run the Windows Update GUI to click "search for updates" or what's it called) to keep everything up-to-date. Has worked without problems for the last year.

Why is zdnet trying to put this UK law as if it was something out of the ordinary ?

Because the 2006/24/EC data retention directive [1] didn't say anything about browsing history and even then was invalidated by the Court of Justice of European Union. The new UK law however:

"The law will force internet providers to record every internet customer's top-level web history in real-time for up to a year, which can be accessed by numerous government departments; force companies to decrypt data on demand -- though the government has never been that clear on exactly how it forces foreign firms to do that; and even disclose any new security features in products before they launch."

[1] http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2... (read "Article 5" "Categories of data to be retained")

One example: when the usb cable is yanked under macosx while a serial port is open, 50% of the time macosx crashes, and sometimes the crash occurs randomly up to 2 hours later.

I don't see a problem with the sentence "Much of aging comes from a misunderstanding of the effect of comfort - a disease of civilization". I read it like this: people think comfort is good and healthy and prolongs life, so they seek comfort and get fragile/sick - they misunderstand the effect of comfort.

I started with zx-spectrum and was also very happy with whatever was there :) But baby steps towards moving pictures that are indistinguishable from reality.. Eh, I'm just very picky. Ever noticed that the top side of a moving window moves before the bottom side on most LCD displays?

Yes, there is. I have side-by-side 60Hz and 120Hz monitors, and window dragging for example on the 120Hz one is much much smoother (I had to buy a gaming mouse, because most normal mice won't update at more than 100Hz I think). And movies don't have this jerky motion where 60Hz doesn't quite exactly divide with 24 fps that movies use.

A lot of people will be able to tell the difference. For example I routinely try to read pdf books on my iphone 4 ibooks (without zoom), but it's hard because there are not enough pixels!

http://www.displaymate.com/iPad_ShootOut_1.htm

.. Apple’s definition of a “Retina Display” is actually for 20/20 Vision (defined as 1 arc-minute visual acuity). However, 20/20 Vision is just the legal definition of “Normal Vision,” which is at the lower end of true normal vision. There are in fact lots of people with much better than 20/20 Vision, and for almost everyone visual acuity is actually limited by blurring due to imperfections of the lens in the eye. The best human vision is about 20/10 Vision, twice as good as 20/20 Vision, and that is what corresponds to the true acuity of the Retina. So to be an actual “True Retina Display” a screen needs at least 573 ppi at 12 inches viewing distance or 458 ppi at 15 inches. The 326 ppi iPhone 4 is a 20/20 Vision display if it is viewed from 10.5 inches or more. ..

But what is a perfect market? What if misleading the consumers brings in the most money? If it was possible to somehow find out and compare the environmental impact of manufacturing things we can buy, I'm sure our decisions of what to buy would be very different. Similarly, if the movie posters had the actor/millions printed on them, then the "market" would be better informed to say enough is enough. Maybe.

Python for Humans 15 years ago

Replying to myself. Using mkfifo is not necessary:

    import os, sys, time, subprocess, fcntl
    sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
    read_fd, write_fd = os.pipe()
    fcntl.fcntl(read_fd, fcntl.F_SETFL, os.O_NONBLOCK) # don't know of any windows equivalent for this line
    proc = subprocess.Popen("ping www.google.com", cwd=sys.path[0], stdout=write_fd, stderr=write_fd, shell=True)
    while 1:
        try:
            s = os.read(read_fd, 1024)
            if s:
                sys.stdout.write(s)
        except OSError:
            pass
        time.sleep(0.1)
Python for Humans 15 years ago

I'm using the mkfifo method on linux/macosx:

    import os
    import sys
    import time
    import subprocess

    # turn off stdout buffering. otherwise we won't see things like wget progress-bars that update without newlines.
    sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)

    pipename = "tempfile"

    if os.path.exists(pipename):
        os.remove(pipename)

    # create a pipe. one side is connected to the ping process, other side is connected to python.
    os.mkfifo(pipename)
    read_fd = os.open(pipename, os.O_RDONLY|os.O_NONBLOCK)
    writer = open(pipename, "w+")

    proc = subprocess.Popen("ping www.google.com", cwd=sys.path[0], stdout=writer, stderr=writer, shell=True)

    while 1:
        try:
            # nonblocking poll data from the external process.
            s = os.read(read_fd, 1024)
            if s:
                sys.stdout.write(s)
        except OSError:
            pass
        # sidenote: minimum sleep time is 1/64 seconds on many windows pc-s.
        time.sleep(0.1)

    # remember to remove the pipe "tempfile"

This paper talks about an alternative to SMs:

"Protothreads: Simplifying Event-Driven Programming of Memory-Constrained Embedded Systems" http://www.sics.se/~adam/dunkels06protothreads.pdf

source files (~60 lines without comments): http://www.sics.se/~adam/pt/

abstract:

Event-driven programming is a popular model for writing programs for tiny embedded systems and sensor network nodes. While event-driven programming can keep the memory overhead down, it enforces a state machine programming style which makes many programs difficult to write, main- tain, and debug. We present a novel programming abstraction called protothreads that makes it possible to write eventdriven programs in a thread-like style, with a memory overhead of only two bytes per protothread. We show that protothreads significantly reduce the complexity of a number of widely used programs previously written with event-driven state machines. For the examined programs the majority of the state machines could be entirely removed. In the other cases the number of states and transitions was drastically decreased. With protothreads the number of lines of code was reduced by one third. The execution time overhead of protothreads is on the order of a few processor cycles.

http://www.rexresearch.com/kahne/kahne.htm

Strand Magazine (October 1925) An Interview with Harry Kahne, Whose Brain can do Six Things at the Same Time

... Figure 3: Writing with Both Hands, Both Feet, and Mouth Simultaneously ~ A demosntration of multiple concnetration of both mind and muscle which Mr Kahne frequently gives before doctors and psychologists. Note: the right hand is writing backwards and revesed, whilst the mouth is writing backwards but correctly).

Has anyone tried the Shangri-La Diet? Seems too simple not to try it. From wikipedia:

"The diet itself consists of taking 100–400 calories in the form of extra-light (not extra-virgin) olive oil or sugar water per day, either all at once or spanned throughout the day. This must be consumed in a flavorless window, which is at least one hour after flavors have been consumed, and at least one hour before flavors will be consumed.[4] The consumption of these flavorless calories supposedly lowers the set point, and therefore, lowers weight."

I just mention this because I've read the authors paper "Self-experimentation as a source of new ideas: Ten examples about sleep, mood, health, and weight" and it seemed really interesting. Available here:

http://sethroberts.net/science/