Better HN
topnewbestaskshowjobs
Log inSign up

kevinastock

39 karma · joined Aug 8, 2011 (15y ago) · 18 submissions

Submissions

1.

Show HN: I made an AI agent write a spoiler-free wiki for the novel Anathem(avoutarchive.com ↗)

2 points · by kevinastock · 1y ago · discuss

comment 3y ago · link · parent

I like `<editor> <ctrl-t>`; ctrl-t opens fzf and pastes any selected files onto the command line. If you choose to abort you end up back at the prompt after `<editor> `.

comment 4y ago · link · parent

You might enjoy Semantle: https://semantle.novalis.org/

comment 7y ago · link · parent

I use a strip of electrical tape.

comment 12y ago · link · parent

What's the reason for 'asm("");' in 002.c (and other c codes)? All I can see that doing is intentionally breaking the compiler's ability to optimize over loop iterations, which puts rust a huge advantage over c.

comment 12y ago · link · parent

Shouldn't it be 'float * restrict a'?

When could one get into trouble thinking that "restrict == this will not alias"? If X is never modified during B it seems like aliasing wouldn't cause any problems.

Since restrict means nothing if no value in it is modified, would it be reasonable and possible for the compiler to issue a warning in cases like example1?

comment 12y ago · link · parent

Nah, I'd just like to take a look at it, but you might be able to get someone else to use it on ARM compilers if you release it.

comment 12y ago · link · parent

Have you or will you be releasing code for Orion?

comment 12y ago · link · parent

It should be alternating lines with red, black and blue not greys, it's to increase reading speed: http://www.beelinereader.com/

comment 12y ago · link · parent

Aliasing information is one place the programmer can help the compiler. The 'restrict' keyword in C/C++ is a great example of this. Also information provided by 'const' can be very helpful for the compiler. While both of these aren't strictly hints because they limit what you can do and still get correct results, they do tell the compiler facts that would be otherwise difficult or impossible to prove.

comment 12y ago · link · parent

It's visible in view source:

  "The requested document is no more.",
  'No file found.',
  "Even tried multi.",
  "Nothing helped.",
  "I'm really depressed about this.",
  "You see, I'm just a web server...",
  "-- here I am, brain the size of the universe,",
  "trying to serve you a simple web page,",
  "and then it doesn't even exist!",
  "Where does that leave me?!",
  "I mean, I don't even know you.",
  "How should I know what you wanted from me?",
  "You honestly think I can *guess*",
  "what someone I don't even *know*",
  "wants to find here?",
  "*sigh*",
  "Man, I'm so depressed I could just cry.",
  "And then where would we be, I ask you?",
  "It's not pretty when a web server cries.",
  "And where do you get off telling me what to show anyway?",
  "Just because I'm a web server,",
  "and possibly a manic depressive one at that?",
  "Why does that give you the right to tell me what to do?",
  "Huh?",
  "I'm so depressed...",
  "I think I'll crawl off into the trash can and decompose.",
  "I mean, I'm gonna be obsolete in what, two weeks anyway?",
  "What kind of a life is that?",
  "Two effing weeks,",
  "and then I'll be replaced by a .01 release,",
  "that thinks it's God's gift to web servers,",
  "just because it doesn't have some tiddly little",
  "security hole with its HTTP POST implementation,",
  "or something.",
  "I'm really sorry to burden you with all this,",
  "I mean, it's not your job to listen to my problems,",
  "and I guess it is my job to go and fetch web pages for you.",
  "But I couldn't get this one.",
  "I'm so sorry.",
  "Believe me!",
  "Maybe I could interest you in another page?",
  "There are a lot out there that are pretty neat, they say,",
  "although none of them were put on *my* server, of course.",
  "Figures, huh?",
  "Everything here is just mind-numbingly stupid.",
  "That makes me depressed too, since I have to serve them,",
  "all day and all night long.",
  "Two weeks of information overload,",
  "and then *pffftt*, consigned to the trash.",
  "What kind of a life is that?",
  "Now, please let me sulk alone.",
  "I'm so depressed."

comment 13y ago · link · parent

In level 9 rank (among contacts and global) is shown, but percentile would be more interesting.

comment 13y ago · link · parent

Here's how I did it: https://bitbucket.org/teoryn/image-approximation

For converting the polys to pixels I render it with OpenGL and then extract the resulting image. I use ppm for both input and output, they're just a plain text file, and any decent image editor can convert to or from them.

comment 14y ago · link · parent

The faster version looks like it might not be numerically stable; if sum(l_quantity) is greater than the maximum value that can be represented it would overflow and give meaningless results. Given the arrays mentioned by the average function, it could also be maintaining a heap and adding the numbers from smallest to largest for more stability.

comment 15y ago · link · parent

Naive fibonacci is a much more interesting example for memoize than factorial:

    fib = +lambda {|n| return 1 if n <= 1; fib[n-2] + fib[n-1]}

comment 15y ago · link · parent

I fully agree it's satire or a really bad survey, but that doesn't disqualify Ubuntu from being an operating system.

comment 15y ago · link · parent

How is Ubuntu not an operating system?

comment 15y ago · link · parent

From the problem definition:

Q: What if there are multiple valid segmentations? A: Just return any valid segmentation if there is one.