Malloc Never Fails (2012) - KirinDave
https://scvalex.net/posts/6/
======
dooglius
The title here is just blatantly false; there are certainly some scenarios in
which it won't fail, but many in which it will. The author is aware of this
since he fixes the claim toward the end:

> To clarify, the surprising behaviour malloc has does not mean we should
> ignore its return value. We just need to be careful because malloc returning
> successfully does not always mean that we can use the requested memory.

It's worth pointing out that if you turn overcommit off
([https://www.kernel.org/doc/Documentation/vm/overcommit-
accou...](https://www.kernel.org/doc/Documentation/vm/overcommit-accounting))
you will, in fact, get this guarantee

~~~
joosters
n.b. turning over-commit off comes with its own set of problems, such as
causing programs to fail long before all memory has really been exhausted.

For example, fork() will have to ensure that there is enough memory for a
complete copy of the running process. If you have a large process, e.g. using
4GB of a 8GB machine, then fork() won't be able to run, even if you just want
to fork and run a tiny program.

With over-commit turned on, the fork() would work (because of copy-on-write)
and the program could then happily exec() the new program.

The work-around is to allocate huge amounts of swap space so that the OS can
be confident that it can reserve all the potentially required memory from
fork(), even if it never normally has to use all that memory.

~~~
caf
Or if you're just forking to exec a tiny program, use vfork().

------
brynet
The malloc(3) family will absolutely fail on OpenBSD, for many reasons:
login.conf/ulimits, calloc(3) for when integer overflow is detected (nmemb *
size), same for OpenBSD's reallocarray extension. And yes, because the system
was unable to satisfy the requested allocation.

Linux overcommit, and developer mindset is a detriment to software quality and
portability.

~~~
jiveturkey
That's a needlessly confrontational statement. Yet I find myself in agreement.
Sigh.

------
pornel
This assumption lead to Rust's standard library not having a way to catch
allocation failures (which is only now being rectified, and only partially).

It's very Linux-centric and presumes a certain config+usage pattern. Not true
on Windows. Not quite true on macOS. Not true in WASM. Definitely not true on
embedded platforms.

~~~
mmillin
Is there somewhere to read about how rust is tackling this problem?

~~~
steveklabnik
A short overview:

1\. Rust the language knows nothing about allocation. If you care about this
behavior, it mostly limits the code of others' that you can use, but you can
always write your own versions of things that respect fallible allocations.

2\. Rust's standard library assumes memory is infallible. This is partially
because it's a good default, and partially because our allocator API was not
ready yet.

3\. We've been working on the allocator API.

4\. We have a rough plan for parameterizing data structures over allocators.

5\. If this topic is of interest to you, [https://github.com/rust-lang/wg-
allocators](https://github.com/rust-lang/wg-allocators) is where to get
involved.

------
em3rgent0rdr
Malloc allocates virtual memory. The original article had to issue a
correction at the end: "I was wrong about why malloc finally failed!
@GodmarBack observes, in the comments, that x64 systems only have an address
space of 48 bits, which comes out to about 131000 GB. So, on my machine at
least, the malloc finally failed because of address space exhaustion."

~~~
metrxqin
That's incorrect, 2^48 bits = 262144GB actually.

~~~
lifthrasiir
But x86-64 divides the 48-bit address space into two halves, only one of which
is available in the user mode.

~~~
monocasa
To be fair, there's nothing that says the higher half _has_ to be entirely
kernel mode. Only that bits 63 through 48 have to be the same value.

And Intel has a spec out for a PML5 page table, giving you 57 total virtual
address bits.

------
jvanderbot
What bothers me is that I read this train wreck without any red flags until I
saw his correction at the end. Even the headline was wrong given the article,
which itself was wrong.

I really should have coffee before HN

~~~
dragontamer
What exactly is "wrong" about the article?

Linux's Overcommit behavior is non-obvious to many programmers. Its one of
those issues that very few programmers I've come across in the workplace
understand properly.

This blogpost properly understands the issues associated with Overcommit, and
have done some preliminary investigations that describe the behavior. Its a
really good blogpost.

The general point of the blogpost is that "Malloc Fails due to address space
exhaustion more often than actual memory-exhaustion". Because actual memory
exhaustion causes OOM killer code to be run... and OOM killer is a non-obvious
case of the Linux kernel.

~~~
shereadsthenews
What's wrong with the article is that malloc is not even a feature of Linux.
There's mmap and brk, both of which have documented failure modes.

~~~
dragontamer
Most typical programmers will be using malloc, or some mechanism built on top
of malloc (C++ new). MMap and brk are useful for certain situations
(explicitly getting Huge Pages), but I don't think that the typical programmer
necessarily needs to know about those.

Since glibc malloc is built on top of mmap and brk, I think your distinction
is mostly academic. For any programmer using Linux and glibc... malloc's
failure mode IS mmap and brk failure modes.

~~~
shereadsthenews
It is a mischaracterization to say that C++ operator new is built on top of
malloc. If your new is overridden by, say, tcmalloc, your program will never
call malloc.

------
antirez
Interesting topic with many things to say about, but wrong content. The point
is that in most C programs, it is not worth to handle OOM errors, because what
you can do during OOM is of very little value, on the other hand handling OOM
correctly is _very hard_. However you can't do this in libraries, because you
don't know how the library is going to be used. So for instance in order to
make my Radix tree library resistant to OOM failures, I had to write a
specific fuzzy test that used a malloc failing with a given probability, and
check if the tree is sane after some stress-work with such malloc. In general
the complexity of handling OOM in complex programs that deal with complex data
structures is not often recognized.

~~~
monocasa
When writing C libraries, it's good form to be able to init your instance with
allocation and logging function pointers. That lets you play nice with most
any env you're being pulled into, and gives your consumers an obvious place
for nice hooks for debugging.

~~~
antirez
Yep, that's what I do in order to be able to fuzz test with an OOM returning
malloc() in my lib. Agreed on the fact it's good form.

------
asveikau
Another thing to keep in mind, though 32 bit is less and less common over
time, malloc would probably fail on a 32 bit process that is out of address
space.

~~~
TorKlingberg
Raspberry Pis almost always run 32 bit OSes, so that's a common place to
encounter 32-bit.

~~~
saagarjha
I had always thought they'd be running a 64-bit OS, given that the new
hardware is 64-bit. TIL that Raspbian is still 32-bit!

~~~
gmueckl
Unless you need the address space, there is little gain with a 64 bit OS. The
wider pointers use more RAM and eat up more of the available memory bandwidth
and caches. So not swotching to 64 bits is likely the best use if the
hardware.

~~~
saagarjha
It’s a toss up, I think: actual results depend on the task at hand. 64-bit has
the benefit of more, wider registers, which can speed up certain tasks.

~~~
gmueckl
I stand corrected. I missed the fact that ARM also introduced new registers in
AArch64. I thought that such a change only happened in amd64.

~~~
asveikau
The other thing about amd64 is that amd64 code can safely ditch old features
like x87 floating point, which is much slower than more recent features. Also,
function calls will more frequently pass by register. And I can think of one
OS specific feature that is better on amd64: when MS ported to amd64 they took
it as an opportunity to speed up the ABI for Structured Exception Handling
(SEH). The x86 one incurred a time cost even for code that did not throw.

Of course none of this applies to arm/aarch64.

------
philpem
I saw the title and thought "oh heck this isn't right at all"...

Set VM Overcommit to zero on an embedded system with no swap (a Raspberry Pi
will do nicely).

Write a C program that malloc()'s all the RAM.

Watch malloc start to fail when you hit the RAM limit and the kernel has
dumped all the I/O cache it can.

~~~
KirinDave
I think the author uses a hyperbolistic title, but if you read the article it
s addressed that there are ways it can fail.

The larger point is that very few users of malloc understand its semantics,
and in fact you _can 't_ know exactly how malloc will behave without knowing
things about the runtime configuration of the system (as opposed to the
hardware availability as many people like to think the simple case is).

------
Paul-ish
When I use Python sometimes I run into a MemoryError when working with large
datasets. How does the Python runtime know I am out of memory if the kernel
won't tell it. Does it try a write and catch the signal?

~~~
amelius
Perhaps any write can fail, and if one does then it triggers some code which
frees some pre-reserved space which allows the interpreter to continue, and
properly unwind the stack.

~~~
lalaithion
I believe that the python interpreter creates a MemoryError at startup, and
throws that when you run out of memory.

~~~
amelius
Ok, but while unwinding a try/except block, the interpreter might need some
extra memory, I suppose, depending on the code in the except clause.

------
vbezhenar
malloc fails with ulimit

~~~
dullgiulio
Very relevant, because containers are often under what basically is ulimit.

Not that you can do much when malloc fails...

~~~
chrisseaton
> Not that you can do much when malloc fails...

Tell the user they can’t do that operation? Use on-disk storage instead? Re-
use memory you already have (such as evicting a cache and taking the memory it
already had allocated)? Abandon what you were doing if it was only an
optimisation and wasn’t essential (such as allocating memory as part of a
speculative execution)? Run a garbage collector and try again?

Lots of options available in some situations.

~~~
Crinus
In practice i haven't seen any application to _gracefully_ handle out of
memory situations. Even back in Windows 3.x days when running out of memory
was common, most applications simply hanged or crashed (which also took the
entire GUI with them) and those that didn't often had a "no memory, kthxbye"
dialog that shut down the application. A very few rare cases would try to
display some "sorry, no memory, close some programs and try again" dialog but
even those were hit and miss, depending on the situation.

Once 32bit hardware-based virtual memory entered the picture, every single
application would just assume you have endless RAM - memory checks are
reserved for "common cases" like trying to create a 100000x100000 image in a
(32bit) image editor.

The reason for all that is simple: out of memory situations are stupidly and
increasingly rare and in most cases where they can happen there isn't much you
can do (e.g. what would you do if you run out of memory while making the
fourth button in a toolbar?) and really in the 99% of the cases there might
only be five people in the entire universe that will encounter such a case
(two of them will tweet about it though and amass a lot of "lol, those garbage
developers" retweets) so littering your codebase to keep those five people
(and their Twitter followers) happy is not worth the effort. I mean, are you
really going to put a "run out of memory" check after every toolbar button
allocation? And what are you going to do if that fails? What _can_ you do?

AFAIK some modern languages nowadays even assume memory allocations wont fail
(and if they do they just terminate).

~~~
chrisseaton
> what would you do if you run out of memory while making the fourth button in
> a toolbar?

Rollback what I’d created so far, evict caches, ask malloc to trim, try again,
if that failed roll back again and ask the user to reduce the volume of
application data open by closing views or documents or whatever before they
try again.

But yeah it’s a lot of engineering.

~~~
Crinus
> ask the user

You just failed to create a toolbar button, how are you going to ask a user do
something if you already failed to create a tiny UI element?

~~~
hyperman1
I guess you pre-allocate these UI elements when you start your application.

~~~
Crinus
What if malloc fails at that point because some other application (we're in a
preemptive multitasking OS) decided to gobble up all RAM?

~~~
fwip
If your application fails at start-up, you don't need to worry about saving
state and graceful failure.

------
aetherspawn
How does one guarantee that allocated memory is real? Can you easily wrap
malloc to zero/poke the memory in a way that catches all exceptions and
guarantees yay or nay ?

~~~
anilakar
Jens Gustedt suggested the following:

        memset(malloc(size), 0, 1)

The program will crash if malloc returns NULL or the memory is not writable.

~~~
hyperman1
And then memory deduplication comes along, finds out a huge number of
identical pages (all zero) and decides to deduplicate them. So if you want
your memory to stay real, I suppose you'd better fill it with random data or
something.

------
kazinator
You can arrange for malloc to fail. If overcommit is disabled with the right
sysctl parameters, then mmap will fail if there isn't enough physical memory
to materialize the entire mapping. Even under overcommit, very large malloc
requests that translate directly to large mmap requests can fail with a null
return.

------
boomlinde
You can disable memory overcommit in the kernel, before any of you start
assuming you can drop your malloc checks.

------
JasuM
What happens if you really run out of physical memory (including swap) after
overcommitting? Does your process get a signal, or will OOM killer just run
without notifying the process that triggered the condition?

~~~
gmueckl
Ig you try to allocate more than the system is willing to overcommit (e.g. a
huge block all at once), malloc will fail. But if phyaical memory gets
exhausted by accessing previously allocated pages, the OOM killer will
evebtuslly come around and kill processes without signalling. Signal handlers
could still make thenprocess (unknowingly) request more memory, so there is 0
guarantee that a handler could even run successfully.

~~~
JasuM
Oh yeah, I didn't think of that. I wonder if you could write a signal handler
carefully to not allocate any memory, stack or otherwise, or is some return
address or an internal structure being allocated transparently...

~~~
gmueckl
Just trying to allocate stack space for the signal handler may cause the stack
to spill into a new page. That is absolutely out of anybody's control. And if
that new page cannot be provided, it's game over.

~~~
JasuM
Makes sense. I was thinking that maybe signal handlers could use the regular
stack of the thread, but that would of course make everything fall down if the
"real" code would write to the stack before updating the stack pointer.

------
saagarjha
> Section III of this Phrack article is a down to earth description of how the
> glibc malloc implementation works, if you’re curious.

This is probably outdated, given that it was written in 2009.

~~~
mathieubordere
pocorgtfo 0x18 contains a more recent glibc malloc exploit which goes into
quite a bit of detail if you're interested.

------
antisemiotic
And then, some day, your code gets compiled for Windows under mingw/msys.

------
edoo
I always assume malloc success and that if it were to return null the system
is screwed anyway and the app will just abort. I write a lot of 'critical'
C/C++ now on embedded systems with mere KB of RAM and just never use the heap
ever.

------
lasthacker
malloc fails with a negative argument

~~~
saagarjha
malloc takes a size_t, which is unsigned. A "negative" argument is just
something that's absurdly large.

~~~
NullPrefix
On 64 bit systems it would result in a call to malloc asking for between 9.2
and 18.4 Exabytes.

------
mehrdadn
Translation: This is a euphemism for saying Linux blatantly violates the
language specification with no remorse.

(Yes, I realize Linux is the kernel, etc.)

~~~
simias
Linux is a kernel, not a C runtime so that's not really relevant. You say you
realize that but then what are you arguing for exactly? Arguably you could
complain that the glibc (or whatever libc you're using) is not working around
that by, for instance, scrubbing the pages in malloc() to force the kernel to
allocate memory.

But even then I'm not convinced that anything here is non-standard, at worse
maybe we're in a bit of a grey area. As long as the kernel maintains its smoke
and mirrors whether and how it allocates memory is irrelevant from the point
of view of the standard. The C language has a rather simplistic memory model,
it doesn't impose a lot on the implementation.

Now the problem occurs when the program attempts to access virtually-allocated
memory and the kernel realizes that it can't find any physical memory to map
it to. In this situation several things can happen but in general the process
will be killed. Is it against the standard for the OS to kill a program for
arbitrary reasons? I can't imagine why. It could also freeze the program,
waiting for more memory to become available. Again, not against the standard
as far as I can tell. Or maybe kill some other program to free memory.

If you have some specific part of the C standard in mind please do tell, I
always find these language lawyering arguments interesting, somehow.

~~~
mehrdadn
> If you have some specific part of the C standard in mind please do tell

See here:
[https://news.ycombinator.com/item?id=20145604](https://news.ycombinator.com/item?id=20145604)

Also note the POSIX standard:

 _Upon successful completion with size not equal to 0, malloc() shall return a
pointer to the allocated space. If size is 0, either a null pointer or a
unique pointer that can be successfully passed to free() shall be returned.
Otherwise, it shall return a null pointer and set errno to indicate the
error._

In neither case is there any provision for returning a non-null pointer to
anything other than an allocated block of memory of at least the given size.

~~~
simias
Thank you for your reply but I still don't buy it. As far as the program is
concerned it is returned a memory block, what this "memory" is effectively
behind the scenes is none of the standard's business. As long as the
implementation manages to maintain the illusion it's perfectly fine AFAIK. The
problem is when this breaks down and the kernel realizes that it can no longer
maintain the masquerade. If at this point it did something stupid like map
this block nowhere or remap something that's already been allocated and let
the program continue like this, then yes that would be a clear violation of
the contract. But it does no such thing, it kills the program instead. If
there's no program then there's no problem. At no point did a single C
instruction get executed in an environment that did not maintain a coherent
memory model. >In neither case is there any provision for returning a non-null
pointer to anything other than an allocated block of memory of at least the
given size. A pointer to virtual memory is a pointer to memory. The rest is an
implementation detail. If, when dereferenced, the kernel issues an order to
Amazon for more RAM and waits for it to be installed to resume the execution,
that's none of the C standard's business.

~~~
mehrdadn
> If, when dereferenced, the kernel issues an order to Amazon for more RAM and
> waits for it to be installed to resume the execution, that's none of the C
> standard's business.

We're not, and we never were, debating the situation where dereferencing the
non-null pointer returned by malloc _succeeds_ but takes long time due to your
Amazon order. We've been talking about the situation where it _fails_. malloc
is not allowed to return a non-null pointer to a memory block that cannot be
written to. Linux does it anyway, and in doing so blatantly violates the
standard.

~~~
simias
That _is_ my point, it doesn't fail. Either the kernel finds out a way to map
the memory and it succeeds, or it kill the program and the instruction never
runs. Code that doesn't run can't violate the standard. When the code is
allowed to run all the invariants are guaranteed to be respected. If I write
this code:

        char *b = malloc(2);
        if (b == NULL) {
          return 0;
        }

        b[0] = 'A';
        b[1] = '\0';

        printf("%s\n", b);

        free(b);

The standard tells me that if the malloc succeeds then the following code, if
allowed to run, will display "A" on stdout. The C standard cannot and does not
guarantee that a C program can't be interrupted however. For the sake of the
argument we could imagine a kernel that instead of killing the program freezes
it indefinitely on disk waiting for RAM to be available. It's functionally the
same thing. As long as the kernel doesn't let code run with broken invariants
it's fine. This is completely outside of the scope of a language standard to
define.

Or, to try one last time from a different direction, if you consider that the
C standard mandates that accessing memory returned successfully by malloc has
to be successful and I happen to press ^C when that happens in a program,
should the kernel refuse to kill the program? This is obviously absurd, but
it's effectively the same thing: the kernel reacts to some external state and
decides to terminate the program.

~~~
mehrdadn
Okay this is a far more reasonable argument but I'm not convinced it's right.
The standard does define normal and abnormal program termination. It also
defines <signal.h>. SIGINT addresses the keyboard case (or the implementation
can provide another signal). SIGABRT, SIGTERM, etc. are raised upon
termination. For the keyboard case, then the program would be made aware, and
it can indeed ignore the Ctrl+C request if it desires. That's perfectly normal
and nothing absurd. For other types of termination, the other signals are
raised. But in this case the program is terminated before any signal is raised
at all. Now, as a practical matter I would argue the hosted environment should
still be able to kill the program in the face of user request simply because
nobody wants a host that's the slave of the program even _if_ it's against the
standard, but this is going far, far, _far_ beyond that. It's happening at the
request of neither the user nor the program; it's just happening because the
host feels like it. Now that's both a violation of the standard and an uncool
one at that!

P.S. I don't think indefinite hold is "functionally the same thing" as
termination. A caller system(), for one, would need to return in one case, but
not the other.

------
systemBuilder
Seems like a needless feature, overcommit, "oh let's make our app faster by
pre allocating 2GB of RAM!" says the naive programmers, "Oh let's make our
operating system more powerful by allowing overcommit.". Overall, you moved
the allocation delay from the app to the OS, which has much less end to end
knowledge of how to do it effectively, overcomplicated both layers, achieved
practically nothing overall, like a dog chasing it's tail, except now both
layers have more garbage code, so it's like an obese dog chasing it's tail!


iOS vs. Android - A comparison for first-time developers - diasks2
http://www.diasks2.com/post/20172033158/ios-vs-android-a-comparison-for-first-time

======
ambirex
_The bottom line is, if you are selling a paid app, iOS is the way to go._

This conclusion from a single app is very weak at best.

Otherwise, thank you for the write-up from your experience.

------
SpikeX
I would have liked to have seen how the Windows Phone marketplace stacked up
against the other two, and how much better (or worse) it is in those
categories.

------
mdonahoe
"all sales are final"

You can ask apple for a refund. Not sure if they make the developer eat the
whole price or just the 70% cut


Show HN: Joconut - Smart PJAX jQuery plugin in 1kb - vdemedes
https://github.com/vdemedes/joconut
======
gojomo
I get the benefit of PJAX when you're replacing part of a page. If you're
replacing the whole page, how does this beat a real browser load of the exact
same data in the same number of hits?

(Is it simply that it saves you the effort of setting your caching headers for
inline resources properly?)

~~~
vdemedes
Partially agree here with you.

------
splitrocket
Seems to break if you have a link without an href.

It also seems to blow away any previous listeners places on elements. Any
plans to have callbacks for events so that listeners can be re-bound?

Aside from that, looks totally sweet. I'm going to use this in a bunch of
places.

~~~
vdemedes
Awful mistake, sorry, completely forgot about that issue. Will be fixed ASAP.
However, there is "new" event, which gets fired on every new page. You can
listen to it using $.joconut.on, see Readme in GitHub repository at
<https://github.com/vdemedes/joconut>.

Thanks, glad you like it!

------
aseemk
Great idea. I'm having trouble getting it to work (
<https://github.com/vdemedes/joconut/issues/5> ), but I'm looking forward to
trying it out!

One thought came to mind for a potential leaky abstraction: unlike HTML and
CSS that can be "undone" and are idempotent, JS has side effects that can't be
undone, and isn't always idempotent. Are there JS patterns we need to embrace
or avoid to ensure Joconut always "just works"?

------
jasoncartwright
Problem in FF? <https://github.com/vdemedes/joconut/issues/1>

~~~
vdemedes
Update pushed, issue fixed.

------
dagingaa
Missing some things:

\- How is this different form the existing PJAX-plugin?

\- Is there a demo page for this plugin?

~~~
vdemedes
Sorry, no demo page for now. It is different from PJAX in these ways:

1\. 1kb minified and gzipped

2\. Auto-loading of JS and CSS from new pages, if needed

3\. No need to set up and configure

------
prezjordan
What exactly does it do? I'm not sure if I follow completely.

~~~
pygorex
Loads pages via AJAX and updates the browser history using `pushState`. This
is an alternative to the PJAX library: <https://github.com/defunkt/jquery-
pjax>

Use either if you have an irrational aversion to page reloads.

Snark aside - jQuery Mobile uses a similar technique to cache entire pages in
the DOM and for page transitions.

~~~
chrischen
Or use if your site plays music :).

~~~
DigitalSea
Beverly Hills Cop MIDI track? Yes.

------
nchuhoai
Love to try this out, especially the loading scripts feature.

One question though: Is there any setup i need to do, or does it just fit
right in with my existing pjax set-up?

~~~
vdemedes
Nope, you just have to include joconut.js in the web page. It will do the
rest.

------
cmer
Could you explain what the benefits are over plain ol' vanilla PJAX? Thanks!

~~~
vdemedes
1\. No need to set up, just script tag

2\. 1kb minified and gzipped

3\. Auto-load of additional JS and CSS from new pages, if needed


Why ancient Roman graffiti is so important to archaeologists - akakievich
http://www.redorbit.com/news/science/1113411831/why-ancient-roman-graffiti-is-so-important-to-archaeologists-010516/
======
existencebox
At the risk of nitpicking: "Meanwhile, every female Roman voice has been lost
to time."

I bring this up less to bang on some diversity card, and more that it seems
very far from true? (Yes, they were a vast minority, but 'lost to time' seems
quite overwrought) In terms of poetry we have Sulpicia (both of them) and then
lots of miscellaneous daily writings e.g. the diary of Vibia Perpetua; and of
course Lucretia and Fulvia if we're talking public figures...

And the additional quote of female homosexuality being universally abhorred
also seems to be misaligned with what I was taught, but my memories of this
are both fuzzier and from my days in university, so I'd be more than willing
to be proven wrong. (The obvious argument in my favor is the amount the of
attention garnered by the supposed lesbian (both in location and sexual
practice) Sappho) My take on it was that there was as much of a distribution
in terms of outlook on sexual practices as there is today, albeit very
differently weighted.

That all being said, roman graffiti is _amazing_ as a view into "normal
people", the article leaving out the fact that gives me a good (but immature)
chuckle, that a large amount of graffiti included simply crude drawings of
penises.

~~~
ktRolster

      > that a large amount of graffiti included simply crude drawings of penises.

While reading your comment, I literally could not stop myself from thinking of
this. teehee

------
mwfunk
The advertising on redorbit.com (desktop site) is utterly preposterous- in
terms of the quantity, quality, and repetition, and the relentless popups. I
usually get annoyed when HN comments devolve into people discussing the page
or the site rather than the contents of the story, but this is just absurd.

I would normally assume that a site that looks like this has to be a domain
squatter's autogenerated site, or some sort of honeypot for distributing
malware.

Or maybe I'm not getting the same experience everyone else is? If this is what
it looks like to everyone, that's grounds for HN blacklisting redorbit.com
links. I hope this is a screwup and not what the site owners are going for.

~~~
mwfunk
What I'm seeing in this link: every image and every paragraph is followed by
the same Teleflora banner ad that scrolls open when you scroll past that image
or paragraph. At some point an animated Revlon ad also appears which expands
to fill the entire page. The sidebar and bottom of just about every page is
consumed by ginormous BS "Trending now!" links to "25 celebrities you didn't
know posed topless!" and "The weight loss trick that they don't want you to
know!" articles on other equally disreputable sites. The page for this article
looks like satire, it's so ridiculous and seedy and invasive. I wanted to read
the article, I really did.

~~~
b_emery
Here, try this instead. Some hilarious stuff. No adds, i'm pretty sure it's
circa 1995:

[http://www.pompeiana.org/Resources/Ancient/Graffiti%20from%2...](http://www.pompeiana.org/Resources/Ancient/Graffiti%20from%20Pompeii.htm)

~~~
GnarfGnarf
_" Gaius Pumidius Dipilus was here on October 3rd 78 BC"_

That's apocryphal, right? How did he know it was "BC"?

~~~
lostlogin
It gets weirder when you consider that Christ was most likely born between 7
and 2 BC.

------
arethuza
Another great bit of ancient graffiti are runes carved by some Vikings
sheltering inside the ~4800 year old tomb of Maeshowe on Orkney:

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

 _" He is a viking...come here under the barrow"_

[http://www.orkneyjar.com/history/maeshowe/maeshrunes.htm](http://www.orkneyjar.com/history/maeshowe/maeshrunes.htm)

~~~
ktRolster
Along the coast of Norway, outside Tromsø, I found these ancient stone
drawings:

[http://i.imgur.com/2ago5A9.jpg](http://i.imgur.com/2ago5A9.jpg)

[http://i.imgur.com/YaIIXdP.jpg](http://i.imgur.com/YaIIXdP.jpg)

Including the one of a six-legged cow (with three horns). I have no idea why
the Norwegians wanted to draw a six-legged cow, but I assume it must have some
significance. If anyone has any ideas, I would love to hear them.

~~~
riffraff
I would have interpreted the third horn as ears.

Two hypothesis on the six legs:

* an oddity, this things sometimes happen and might have been interpreted as good or bad omens, worth recording. The positioning (mid-flank rather than at the bottom, like the others) seems consistent with similar cases I have seen. Random internet result: [http://www.huffingtonpost.com/2012/01/25/6-legged-lamb_n_123...](http://www.huffingtonpost.com/2012/01/25/6-legged-lamb_n_1232176.html#gallery/22942/0)

* maybe those are not extra legs of the top animal, but horns of the bottom animal (who also has 4 short legs), maybe recording when some ram or species of deer charged into a much larger cow? Though the horns would be out of proportion, and I'd expect them to be curved.

------
matco11
>"These places weren’t necessarily vast repositories of lost literature, but
the eruption froze them nearly perfectly in time, preserving them for nearly
2,000 years—and preserving thousands of pieces of graffiti along with them."

Actually, Pompeii and Herculaneum are precisely one of the largest and most
precious repositories of lost ancient literature.

[http://ancphil.lsa.umich.edu/-/downloads/papyri/JankoRecentD...](http://ancphil.lsa.umich.edu/-/downloads/papyri/JankoRecentDevelopments.pdf)

[http://www.newyorker.com/magazine/2015/11/16/the-
invisible-l...](http://www.newyorker.com/magazine/2015/11/16/the-invisible-
library)

------
chrstphrhrt
Umm what? "[Pompeii and Herculaneum] weren’t necessarily vast repositories of
lost literature"

Not sure about Pompeii, but Herculaneum had the villa of Piso with tons of
scrolls from Philodemus, who totally fleshed out the ideas of Epicurus, upon
whose atomism all of modern science is based.

~~~
thaumasiotes
> Epicurus, upon whose atomism all of modern science is based.

It is difficult to comprehend the kind of confusion of ideas that could
provoke such a statement.

Modern science makes no reference to Epicurean atomism, other than in the
historical choice of the _word_ "atom" to refer to something that Epicurus
wasn't talking about.

~~~
chrstphrhrt
Okay. Then I'd be interested to know about atomism after Lucretius and before
the renaissance. Who was the first modern "inventor" of it?

My comment was meant to express alarm that anyone could say there was no lost
library buried by Vesuvius.

Here it is:
[https://en.wikipedia.org/wiki/Villa_of_the_Papyri#Epicureani...](https://en.wikipedia.org/wiki/Villa_of_the_Papyri#Epicureanism_and_the_library)

------
rjbrock
I love this type of stuff, because it is an insight into the way that normal
people (ie. not royalty) lived.

------
colanderman
Absolutely unreadable on mobile; the site just keeps scrolling itself back to
the top.

~~~
lostlogin
What OS? iOS and Crystal make it just fine. It's a pity add block isn't a
default position for everyone.

~~~
colanderman
Android.


Trump issues executive orders with effective bans of TikTok, WeChat - lvturner
https://www.cnet.com/news/trump-issues-executive-orders-with-effective-bans-of-tiktok-wechat/
======
Traster
I would imagine this is going to be struck down by a court not because he
doesn't have the power to do this, but because he'll have failed to adhere to
a fair process in coming up with this - the same reason that his DACA decision
was over-turned by the supreme court.

------
tellarin
This also potentially has many ramifications in different industries. Tencent
(owner of WeChat) is a big investor in media and entertainment companies. One
side effect, for example, is blocking financial payments to Riot Games, Epic
Games, Fortnite, and half the gaming industry.

~~~
jimmygrapes
The current wording seems to apply only to transactions involving WeChat,
leaving Tencent's other holdings alone... for now.

------
nicbou
> The concern stems from the data that TikTok and WeChat collects on their US
> users, as well as the perceived inability of Chinese companies like
> ByteDance and TenCent to reject requests from China's ruling Communist Party
> (CCP) access that data

Isn't this exactly what US companies have been doing to their users? Isn't it
also what the US government has been trying to achieve for years?

As a European user, it looks as if the pot is calling the kettle black.

~~~
aeternum
Yes, but hasn't China also forced US companies (and probably European
companies as well) to sell parts of themselves in order to continue operating
in China?

This can also be interpreted as a way to even the playing field.


Passwordless authentication is here: new Yubico FIDO2 key - rdslw
https://www.yubico.com/2018/04/yubico-and-microsoft-introduce-passwordless-login/?source=me
======
rconti
Can someone help me understand how this is different from the existing YubiKey
products, which I've used?

* Passwordless single factor with AD integration (couldn't this already be done by storing your password on the key?)

* 2factor auth with the token as one of the factors.

From the article:

\-----------

Single Factor: This only requires possession of the Security Key to log in,
allowing for a passwordless tap-and-go experience.

Second-Factor: In a two-factor authentication scenario, such as the current
Google and Facebook FIDO U2F implementations, the Security Key by Yubico is
used as a strong second factor along with a username and password.

Multi-Factor: This allows the use of the Security Key by Yubico with an
additional factor such as a PIN (instead of a password), to meet the high-
assurance requirements of operations like financial transactions, or
submitting a prescription.

~~~
freeone3000
"Passwordless" single factor done by storing your password on the key isn't
passwordless. You have a password. U2F replaces the password with a "bearer"
authentication token - it's two-factor auth without the password, instead of a
password-manager based approach.

The actual announcement in this blog post is Azure AD and Windows 10
integration, not anything new by Yubico.

~~~
bonestamp2
In the "passwordless" scenario... if someone stole your yubikey, could they
access anything you had authenticated it for?

~~~
rconti
and/or could they press the button in a terminal and get your token printed
out in plaintext, in a way that could be reused?

~~~
LammyL
In single factor mode (passwordless), your token is your password. So if you
lose it, someone could access your accounts if they know your username.

The USB tokens don’t store a password, they store a master key pair, and then
derives a site-specific key pair based on the URL you are connecting to. The
site issues a challenge and the token signs it. This prevents replay attacks,
and there is no way to export the secrets from the token. There is also no way
to authenticate to a site by just having the key plugged in - you have to
press the button on it. There is no way through software, even low level usb-
hid commands, to trigger the button press.

Overall it’s really well designed and more secure than passwords, even in
single factor mode.

The major downsides are that it requires browser support, and doesn’t work
with iOS.

------
cmurf
This is what I want for family members: the end to passwords and the end to
using Facebook (or even Google for that matter) to authenticate logins. I
continue to lament the end of Mozilla Persona.

------
eganist
Legal wonks:

I know biometric identification isn't afforded the same protection by law on
the basis that biometrics are public (e.g. fingerprints are left everywhere),
but what about physical keys? FIDO2 is entirely analogous to a physical key,
and it's not exactly public the way biomtrics are.

I'd still prefer a password for that added 5th amendment layer of protection,
but I'm looking for what legal minds think about this right now.


The "Soft Maximum" function - epe
http://www.johndcook.com/blog/2010/01/13/soft-maximum/

======
mcantor
This is my problem with mathematics. The concept of a "soft maximum," the
principles behind calculating it, and its startling similarity to a hard
maximum, are all fascinating and exciting to me. Look at that! Two completely
separate functions, and such magical results. According to this post, it's
useful for "convex optimization." I clicked through to the "related post,"
which was merely a comment about someone else's opinions on "convex
optimization," so I looked it up on Wikipedia:

<http://en.wikipedia.org/wiki/Convex_optimization>

Ah! A technique used to "minimize convex functions." Maybe some of this
notation will make sense to me if I understand the underlying concept of
whatever a "convex function" is.

<http://en.wikipedia.org/wiki/Convex_functions>

Great. An entire article that is completely and utterly meaningless to me. I
mean, absolutely nothing in that article--oh! "Convex sets?" That looks
promising.

<http://en.wikipedia.org/wiki/Convex_set>

Jackpot! The pretty pictures make the idea of a convex set clear to me.
Unfortunately, by now I'm 4 clicks away, and my actual understanding of the
subject is clearly just scratching the surface. Connecting my newfound--and
obviously still naive--understanding of convexity* to "soft maximums," which
initially inspired this search, feels dumbfoundingly impossible.

Am I approaching this all wrong? Am I expecting too much? Thinking too little?
I would love to understand more about this subject, and I have tried to learn
it the same way I learned how to program: by Googling and working on my own
problems. However, the resources simply don't seem to be there in the same
way. What's the deal, here?

* Would it be more accurate to say "Euclidian convexity?" What would that mean, exactly?

~~~
fgimenez
Trying to learn math from Wikipedia is like trying to learn English from the
dictionary.

As far as the subject matter goes, a convex function can just be thought of as
a function with a global maximum/minimum and no other local maximum/minimum.
I.E. The derivative is zero in only one place which is the global max/min.
These functions can then be easily optimized by taking their derivatives and
finding the zero. It is a really nice way to optimize a problem.

~~~
ntownsend
No, in this case, a convex function is one where you can draw a straight line
between any two points on its graph and not have the line intersect the graph
at a third point.

~~~
pieceofpeace
You are not contradicting what fgimenez said, its the same condition stated
differently.

edit: if two statements are not essentially same (and I am wrong), could you
please explain it.

~~~
jamii
The logarithm function is convex by this definition but has no maximum/minimum
point and never has 0 derivative.

------
imurray
The soft maximum often comes up when dealing with probabilistic models and in
neural networks. I'm surprised that a blog that has been highlighting
numerical issues hasn't pointed out how the soft maximum should be _computed_.

If x is vector of values then the naive code is:

      log(sum(exp(x)))

where exp operates elementwise. However, if even a single item of x is large
(1000 say) this will return Inf. If x are log probabilities, where you want
the log of the sum of the probabilities (common), the elements of x might all
be less than -1000 (also common) and then the function will return -Inf.

Many people have a function called logsumexp() kicking about to compute the
softmax robustly. It will do something like:

        y = max(x);
        return y + log(sum(exp(x-y)));

One example, slightly more elaborate, Matlab implementation is in:
[http://research.microsoft.com/en-
us/um/people/minka/software...](http://research.microsoft.com/en-
us/um/people/minka/software/lightspeed/)

~~~
dalke
See the followup posting

------
tjic
The huge flaw with this article: explaining WHY I would ever want to use a
soft maximum.

Yes, it "sands off the corners".

Why do I want that?

~~~
flipper
The article was possibly aimed at engineers or mathematicians so the author
thought the benefits didn't need explaining.

A soft maximum might be useful if you want a differentiable function that
closely approximates the max() function. By differentiable I mean you can work
out the rate of change of the function at any point. With the hard maximum,
the rate of change at the hard edge is not defined. Nicer to have one function
to represent the RoC and not have to worry about special cases.

~~~
tjic
Yep, I do have a CS degree, and I realized that the crisp corners are not
differentiable ... but a short paragraph about that and giving a few real
world examples would have strongly improved the post.

------
ramanujan
This is useful analytically, but one tradeoff here is that if this is in an
inner loop, the exp/sum/log process will be a lot more expensive than a simple
max.

For proofs and stuff it can be invaluable to have a differentiable objective
function, but in actual computation it's not always necessary.

~~~
roundsquare
Depending on your application, a good compromise might be to use soft max if
the numbers are nearby and a hard max if they are very distant (though you'd
need to find a suitable definition of distant and nearby).

------
mitko
Also known as "smoothed" max/min which in my opinion is better name as it is
mathematically more meaningful as the max function [NOT smooth] is
approximated with a smooth function.

There is no such thing as soft function in mathematics! Please be consistent
when naming...

------
shalmanese
Is there a accepted modification to the function to make it scale invariant?
I'm kind of weirded out by something that would spit out a different result if
did a unit change.

~~~
memetichazard
Here's an idea. Take the scaled function: g(x, y; k) = log( exp(kx) + exp(ky)
) / k

Let k be 1/max(x,y) so that you have:

g(x,y) = log(exp(1)+exp(min(x,y)/max(x,y))*max(x,y)

There are some issues if the maximum value can be negative or zero, though.


The Alt-Right Finds a New Enemy in Silicon Valley - gregorymichael
https://www.nytimes.com/2017/08/09/business/alt-right-silicon-valley-google-memo.html
======
justforFranz
pathetic.


Show HN: PDFlower – Reflow PDF papers for small-screen reading - chengchang
https://pdflower.com
======
chengchang
The majority of scientific and technical papers are delivered by the PDF file
for portable presentation. However, it difficult to read the PDF paper on
small screen devices, such as tablets and eBook readers.

So I wrote PDFlower to reflow PDF papers for small-screen reading.

Compared with plain-text extraction based tools, PDFlower reconstructs the
object level - columns, formulas, tables and figures - layout using some smart
heuristics, and then renders them for new page size.

~~~
ericmo
Example pictures are kind of small, hard to see the quality of the result.
Also, I'd use this for a Kindle device, not an iPad, so it'd be also good to
see how it looks in a Kindle.

~~~
chengchang
\- The output is a reflowed PDF. It keeps 'PDF quality'. \- Any PDF
reader/device could display new version paper technically. \- Kindle has
supported.

------
aw3c2
Does anyone know an open-source solution for this? What I read is no one's
business and I would never used a web-hosted service for something like this.

~~~
jasim
k2pdfopt works ok for me.

(bash function)

        tokindle () {
          ~/Software/k2pdfopt $* -dev kpw -mode fw -wrap -hy -ws 0.375 -ls-
        }

~~~
nattaylor
There's also koreader, which just uses k2pdfopt on the fly.

~~~
jasim
koreader looks fabulous! Last time I checked, the Paperwhite could not be
jailbroken. But it no longer seems true. Thanks for the link.

~~~
redwards510
Yes! All versions can now be easily jailbroken. The main features (to me) are
installing KOReader to view epubs and pdf files, and hacking the screen saver
display. The process only takes about an hour, mostly because you are reading,
doublechecking, and downloading the right files. This guide[0] is a very good
overview. I find mobileread's site to be too wordy and difficult to follow.

[0] [http://lifehacker.com/how-to-jailbreak-your-
kindle-178386407...](http://lifehacker.com/how-to-jailbreak-your-
kindle-1783864074)

~~~
voltagex_
Which version would you buy if you were buying a Kindle today? I only owned
the one before the DX... managed to crack the screen in an unfortunate elbow-
related incident.

~~~
jasim
Paperwhite has been really good to me. Both Oasis and Voyage look great as
well - they have higher resolution than the Paperwhite. And they have real
buttons to move between pages, so if I were buying a Kindle today I'd buy one
of them depending on my budget (Oasis is more expensive, but slimmer).

~~~
dustinblake
Current (and previous) generation Paperwhites have the same resolution as the
Voyage and Oasis. I have a Paperwhite and the screen is fantastic. I'd love
hardware buttons for page turning, though.

While the Oasis is expensive, if you add a nice cover to the Voyage you're
close in pricing. Either go solidly midline with the Paperwhite or go all out
with the Oasis, depending on your budget.

------
daphreak
I would like a "pricing" and a "privacy policy" link on the front page.
Probably won't spend time trying it out due to the omission.

Luckily there are interesting self-hosted / local options mentioned in this
thread.

~~~
franciscop
Exactly the same here. I won't go through the [maybe] lengthy process of
creating a new account to get a paywall then. Same goes with the privacy
policy, I don't want to use it with my own PDFs and lose their rights or with
other people's and screw things legally.

------
anigbrowl
Very cool. How hard would it be to go in the opposite direction? When I'm
using a desktop or a laptop computer it's most annoying that almost all news
sites, blogs, eg. optimize for a portrait orientation. I can only see a
relatively small amount of text so I have to scroll constantly, despite the
acres of available whitespace to either side. It's really annoying when
reading anything complex where you'd want to refer back to previous sentences
or paragraphs frequently to make sure you've understood the substance
properly. I would love to be able to reflow into 3 or 4 columns though...

~~~
chengchang
Thanks for your comment.

The PDF format will ignore some structures of paper and `draw` contents on a
fixed-layout flat document. For a char, e-readers cannot know it belongs a
paragraph, a figure caption or a formula. Plus, publishers render original
paper with the specific style. It is a problem. Some research concentrate to
improve PDF format, extract infos for scholarly papers, like articles on
DocEng - a compute science conference:
[http://dl.acm.org/event.cfm?id=RE135](http://dl.acm.org/event.cfm?id=RE135).
Then I read the spec of PDF format...

Anyway, that's hurt.

------
eb0la
That's the feature Kindle PDF reader should have built in from beginning.

Waiting in the queue for my account.

~~~
diab0lic
Unfortunately the kindle is optimizing for users buying Amazon content, not
for being the best general purpose eReader. This incentive mismatch between
Amazon and the end users is probably why we will never see such a feature
built in.

~~~
semi-extrinsic
If you jailbreak your Kindle and install Koreader (mentioned upstream) you can
have high quality PDF reflow, with support for two-column layouts as well as
math and displayed equations, on your Kindle today.

Here are some example images:

[http://www.epubor.com/how-to-install-and-use-koreader-on-
kin...](http://www.epubor.com/how-to-install-and-use-koreader-on-kindle.html)

~~~
ComputerGuru
Wow, that's quite the (both) useable and useful software - thank you for the
link. I'm not normally part of the "x should buy this out" group, but in this
case, Amazon really should.

~~~
TeMPOraL
No, they shouldn't - because if it goes against their business interest
(having Amazon-bought books look better than manually uploaded content),
they'll shut the project down.

------
towelrod
Interesting and I might have a use for this professionally. But there is no
indication on the main page about how it works (web service? code library?).
And it forced me to login on the second page, so I closed the tab.

------
edgartaor
I thought I'd give it a try. But... Signup Queue? I had never seen anything
like that.

Signup Queue

Hi, <my_email>

* You are on your way to PDFlower.

* 269 people in front of you.

* 0 people behind of you.

* Sharing this referral link may change your position in queue. Have a try. <referral_link>

~~~
wccrawford
I've seen that before. It's a pathetic attempt to force viral sharing. I never
participate on principle.

------
scivey7
This is something I haven't found an ideal solution for yet. There are
existing iOS PDF readers with reflow, but each seems to have its own issues.

To echo what others have said, this is an actual pain point and I'm very
willing to spend money on a solid solution. I've bought a few different PDF
readers just on the chance their reflow would be better than what I've found
elsewhere.

So I clicked on your link pretty ready to throw money at you, but I'm not sure
what I'm looking at. Is this an iOS app? Android app? It seems like some kind
of service, since it wants me to login, but I can't tell.

Consider working on the messaging and then reposting this. There's definitely
a market.

~~~
yaroslavyar
Could you please name it?

------
saint-loup
Adobe Reader has a little-known function similar to this. Go to Display > Zoom
> distribute (the last entry). It works reasonably well with simple, clean
documents. You can check wether the document is compatible in its property
panel.

------
adrianh
If you're interested in doing this for sheet music (sort of a similar-ish
problem), check out my product soundslice.com. Auto-reflowed sheet music
depending on your device width.

------
ldenoue
I'm also working on this PDF reflow and posted a video demonstration on my
twitter. Ping me if you would like to test:
[https://twitter.com/ldenoue/status/785142066665971713](https://twitter.com/ldenoue/status/785142066665971713)

------
MidoAssran
Cool concept. This should be built into all smartphones and tablets and
automatically run when they open PDFs.

------
estrabd
I just want something that'll collapse 2 columns into 1.

------
israrkhan
would be great, if you could provide a guest account to try it out. I closed
the window as soon as I saw the signup form..

------
chrismorgan
Ah, reminds me of the Celery tool Flower, pronounced flow-er rather than
flour. How is this one supposed to be pronounced?

------
nmca
Just want to comment that if this worked well I would pay for it. Probably up
to ~5 or maybe even 10 dollars a month.

~~~
ldenoue
I'm working on a similar system. Would you like to test it?
[https://twitter.com/ldenoue/status/785142066665971713](https://twitter.com/ldenoue/status/785142066665971713)


Ask HN: How are you productive without a computer? - singularity2001
Imagine it's a lovely day, you want to spend it outside and still boost your company (or project). What can you do? (If you exclude talking and reading)
======
baccheion
A large (artist's) sketchpad, brainwave entrainment (or silence), and time
spent thinking, reflecting, synthesizing, etc.

As someone who's been constantly on the computer since I was 12 (30 now), I
learned early on that it's good to know when I'm spinning in circles blindly
more than progressing, and to then move away from it to a quiet place (maybe
I'll pace around the living room, or work at the kitchen table), then work in
"low tech silence."

As a programmer/designer, there tends to be a lot of conceptual thinking and
synthesis involved with what I'm doing, which can often be done (better, even)
away from the computer. When I'm on the computer, I'm either learning,
doing/implementing, or screwing around. Deep thinking happens (better)
elsewhere.

~~~
JoeAltmaier
I circle the parking lot, or the block if its a hard problem. Once I went
clear around an 80-acre field before I had it solved (why the belly button on
our spherical projection of 2D data).

------
Nooance
I'm currently sitting on a beach, in the shade, reading this post on my phone.
(And also reading up and planning the marketing for my startup, and probably
writing a Facebook post and a blog post soon. Edit: Nope, still reading HN.
It's getting cold though. Should've brought a blanket.)

I wouldn't universally recommend typing on your phone, but I'm (relatively)
fast at it, and I can do it wherever. The limiting factor is formulating and
such anyway, for me.

My current view: [https://m.imgur.com/cMXoY7H](https://m.imgur.com/cMXoY7H)

------
RUG3Y
Thinking and generating ideas for me is easier without a computer. Computers
are distracting. The more I practice thinking and writing my ideas down, the
better I become at having thoughts that are useful. It's pretty elementary
stuff, but I think the conundrum is that it doesn't feel immediately
productive. This kind of thinking marinates and adds value to your work over a
long period of time, versus something like answering an email, which has
immediate results but usually is of little value.

------
manibatra
I would say exercise. A jog or a swim. Exercise has boosted my productivity a
lot. Enabled me to work longer hours. Helps me be in a better mood and just
feel healthy which spills over to my work.

------
LarryMade2
Sheet of paper and optionally a writing instrument. Otherwise some thing that
you can find interesting to observe or study. If failing that, random reading
material.

Ideas come from anywhere.

------
stephenr
I find riding my bike gives me great thinking time (once you have a regular
route that you can ride without getting lost/know where to look out for
dangerous traffic).

Also, gardening/diy work that's not overly complex can let your mind wander a
bit. I find it works both ways - I think about solutions to diy/garden
problems while at my desk and software problems with a shovel/hammer/etc in my
hands.

------
partisan
I took my notebook out the other day at a coffee shop after my laptop battery
died. I sat at an outside table and thought about a performance issue we were
facing and came up with a solution in about 15 minutes. That was way more
productive than the 15 minutes on my laptop would have been.

------
newman8r
introspection, meditation, and pondering your big picture - think about your
project - what about your project is stressing you out? what can you do
tomorrow to address the components that you're not comfortable with?

------
AnimalMuppet
I use a pen and a pad of paper. But I have to have the right kind of problem -
more of a big-picture issue. I can't be trying to do something that requires
close interaction with the code.

------
meric
Meditation to keep the mind up for the next day.

------
mtmail
I guess that leaves thinking and writing.

~~~
singularity2001
And drawing. And recording your promo video ...

------
tmaly
I exercise, go for a walk.

I also have a sketch pad where I can work out ideas on paper.


Auto Smiley Generator - huhtenberg
http://fffff.at/auto-smiley

======
callahad
Reminds me of Andi Albrecht's mercurial hook [0] which posts a photo from your
webcam to Twitter whenever a merge fails.

[0]: [http://andialbrecht.wordpress.com/2009/05/09/when-merging-
fa...](http://andialbrecht.wordpress.com/2009/05/09/when-merging-fails/)

------
toisanji
:) just tried it, its pretty cool, but has a lot of false negatives. Opening
my mouth was enough to trigger a smile and I can't even make a real smile. It
was cool that it have a false trigger when I frowned.

~~~
eam
So :D => :) ?

~~~
alagu
I don't think it is able to differentiate type of smileys. Only :). No :o, :p
or :D

But damn cool app :)

------
hkuo
Hilarious. Doesn't seem that useful as evidenced by him not being able to not
smile. He should make an LOL version of this though!

~~~
nym
There are all sorts of uses! For example, you could make a site called
smilelinks that is automatically generated based off the webpages that make
you smile. My guess is cuteoverload would dominate the list.

------
khelloworld
Nice demo to learn openFrameworks from. Cool app too.

------
nym
:)

------
apsurd
Upvoted for happiness inducing factor! yay =)

~~~
calcnerd256
Is that akin to saying "It made me smile."?

~~~
apsurd
yes.


Drafts of Chapters 5–8 from the Rails Tutorial 3rd Ed. - mhartl
http://news.railstutorial.org/rails_tutorial_draft_second_launch/

======
mhartl
The newly released chapters are substantial, and should be enough to keep
readers busy for a while. I hope to release drafts of the final four chapters
some time in the next week or so.

(Note to the curious: No, I can't write chapters this fast. It takes me two
weeks to write a chapter from scratch, a few days for a major editing pass,
and half a day to do the final edit. All the draft chapters had been through
at least a major editing pass before the [main
announcement]([http://news.railstutorial.org/rails_tutorial_3rd_edition/](http://news.railstutorial.org/rails_tutorial_3rd_edition/))
last week.)

------
cmaxwe
Is there anything similar to Rails Tutorial for a JS MEAN stack?