Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
shrughes
Oct 11, 2008

(call/cc call/cc)
Shredit

A Javascript text editor that runs inside whatever <pre>
element you want it to run in.

Adbot
ADBOT LOVES YOU

shrughes
Oct 11, 2008

(call/cc call/cc)

chips posted:



Why are the blue and purple lines doubling back?

shrughes
Oct 11, 2008

(call/cc call/cc)

Snodar posted:

"finally" has nothing to do with RAII.

What? RAII and finally blocks are two ways of doing exactly the same thing.

shrughes
Oct 11, 2008

(call/cc call/cc)
I'm making a Hacker News reader that operates by manipulating the content bodies of replies by handling requests through a custom NSURLProtocol, so that all the features of the site don't need to be handled or dropped.

So far, the CSS file's filtered to multiply every absolute font size by 7/4, and the body is given a black background for good luck. The html content is filtered to have the table stretch to 95% instead of 85%, and to point to the CSS file through hn://news.ycombinator.com/news.css instead of http://.



Here's what the unfiltered version would look like:

shrughes
Oct 11, 2008

(call/cc call/cc)
Ok, now the Hacker News reader analyzes differences and highlights new comments posted since the last time you visited the thread.

shrughes
Oct 11, 2008

(call/cc call/cc)

Pfhreak posted:

A usability note, I couldn't notice anything highlighted here.

Edit: Oh wait, that center comment is slightly whiter, I see it now. Might want to make that more obvious?

Seems obvious to me.

shrughes
Oct 11, 2008

(call/cc call/cc)
It's not my fault you're all optically challenged.

shrughes
Oct 11, 2008

(call/cc call/cc)

arvash posted:

I'm actually with Shrughes. It's quite visible to me although somewhat subtle, and it's not in anyway unusable. I enjoy how it's a small enough change that it doesn't change the actual look of the page.

I was sort of in denial/trolling about that. It looked fine on my computer screen, but while casually browsing HN on my phone yesterday, I noticed that the background looked completely white -- this was in Safari, not in my app. So I'm going to go with a little bold label saying the comment is new, or edited.

shrughes
Oct 11, 2008

(call/cc call/cc)
Alright, I've changed the app a bit, so that it shows unread comments with the word "(new)". And now it supports showing the number of unread posts whenever the title of a thread appears. Also, a few aesthetic improvements happened, like fixing the line height in the title and doubling the size of the voting arrows. Oh, and now you don't have to worry about fat-fingering your voting.


shrughes
Oct 11, 2008

(call/cc call/cc)

Ugg boots posted:

Why don't you just have a Vote button, that when you press it, it says "Vote Up/Vote Down/Cancel"?

Effort.

edit: Right now it just requires the insertion of a Javascript confirm(...) call in the javascript code at the right location. You can't use Javascript, as far as I know, to get arbitrary buttons. So you'd need to build the dialogue out of HTML.

shrughes fucked around with this message at 22:16 on Apr 19, 2010

shrughes
Oct 11, 2008

(call/cc call/cc)
Here are some final screenshots of the Hacker News app I submitted recently.





Of course, this got rejected "because it is a web clipping. Applications that only display a web page do not provide sufficient functionality beyond what a user can experience by adding a site to their Home screen using Safari."

Death to Steve Jobs.

There is already a sufficient difference between this app and Safari that makes me want to use this app. How should I change this app so that it will pass review?

shrughes
Oct 11, 2008

(call/cc call/cc)

fletcher posted:

HN works fine on mobile safari, why does every webpage need an iphone app? (not to mention there are already two unnecessary HN apps on the app store)

It doesn't for me -- the font is too small, the buttons are too hard to press, it's too easy to accidentally upvote somebody and I like being able to skip through comments I've already read.

shrughes
Oct 11, 2008

(call/cc call/cc)

vegieman posted:



I made a software version of https://www.passwordcard.org, so that I don't have to rely on the website.

So people concerned about security are supposed to download some rogue executable and run it on their computer?

shrughes
Oct 11, 2008

(call/cc call/cc)
This is a multithreaded echo server running with an epoll loop on each thread.

Only registered members can see post attachments!

shrughes
Oct 11, 2008

(call/cc call/cc)

ImDifferent posted:

How does the multi-threading figure in? I take it you're not creating a thread per connection - otherwise you wouldn't be that much better off than just using blocking sockets.

There are a fixed number of threads (probably the number of cores or twice that number) and connections are assigned randomly to a thread.

This is completely going to bottleneck on the network connection, even if you ran it on one CPU, of course.

shrughes
Oct 11, 2008

(call/cc call/cc)

Markov Chain Chomp posted:

Have you considered running in kernel space instead? It seems kind of silly to suffer so much latency due to the network stack and context switches and the like.

No. I am not actually interested in making the most optimized echo server.

shrughes
Oct 11, 2008

(call/cc call/cc)

Markov Chain Chomp posted:

I feel as though I've been deceived.

Go program your FPGA an echo server.

shrughes
Oct 11, 2008

(call/cc call/cc)

Luminous posted:

The general process for encryption is "don't do it yourself" as the common, or even uncommon things, people think of have already been entertained by the brains behind the libraries that actually make it to the wild, as well as that most things people come up with don't actually offer more security (often they actually lower it).

It's purely a function of the site address and site password, and if the algorithm is exactly the same as the one implemented at the website he linked to (pwdhash.com), it doesn't introduce any kind of slowdown factor, so this could be cited as an example of this principle.

shrughes
Oct 11, 2008

(call/cc call/cc)

SuicideSnowman posted:



Very early screenshot of a 2D space shooter I'm working on. My goal is to make a multiplayer based shooter (think a more modern version of the old Subspace Continuum game).

Are you aware of the Discretion project?

shrughes
Oct 11, 2008

(call/cc call/cc)

Volte posted:

I don't think the king and queen are distinguishable enough from each other. The defining characteristic of the king is usually the cross on top and the queen's is the spiky crown. They both look like queens to me.

The king is the one wearing a dress, making it look like more of a queen to me.

shrughes
Oct 11, 2008

(call/cc call/cc)
I have been working on a NoSQL clustered database system called RethinkDB, whose 1.2 release just got publicly announced.

shrughes
Oct 11, 2008

(call/cc call/cc)

Suspicious Dish posted:

Crockford's rationale against ++ is "if I use it, I'm tempted to merge everything into one line".

It's not unsafe or dangerous in any way, it's just Crockford applying his anecdata thinking that avoiding it will somehow make people write better code.

Yes it is unsafe. Why do you think Crockford has this opinion? Why do you think it only works on its own line in Go? Its use passed through some refactoring caused a security bug in Tarsnap. You're the problem, willfully using things you find "convenient" like some scrub.

But wait does Crockford seriously use += 1 in for loops or on its own line?

shrughes fucked around with this message at 12:11 on Mar 16, 2014

Adbot
ADBOT LOVES YOU

shrughes
Oct 11, 2008

(call/cc call/cc)
Sorry if my comment came off as attacking, I meant it more as self parody or a recording of my natural reaction to such a post.

The best thing about the CTR bug was how on HN tptacek had warned cperciva of this very thing in multiple arguments about what chaining modes to recommend.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply