How to write a minimal WebKit browser in 30 lines of Swift

This article shows how to write a minimal WebKit browser in 30 lines of Swift. This is what the result will look like:


Now on to the code –

We start with Swift shebang line so that we can run the script directly from the command line without compiling it first (edit-run instead of edit-compile-run):

We continue by importing WebKit and setting up the application. Every graphical Cocoa application needs one (and only one) instance of NSApplication (or subclass) instantiated, so we start by setting up our NSApplication instance. Then we go ahead by setting the activation policy of this application to “regular” since this is an ordinary app that will appear in the Dock:

Next up we need a window for our web browser. We create an NSWindow instance of size 800×600 px which we center and then set the title for. After setting up the window we finally…

View original post 123 more words

The Washington Post verifies ‘the pause’ in global warming

Watts Up With That?

Jason Samenow sends word of a new article in WaPo that does some of the same sort of surface temperature analyses we see right here on WUWT. Seeing what a good job Matt Rogers did in his defense against claims of cherry picking, statistical significance woes, and Trenberthian masking, it made me wonder; “How long before he gets called into the chief editors office at WaPo and reassigned to be the correspondent covering Botswana?”

Global warming of the Earth’s surface has decelerated – Matt Rogers, Capital Weather Gang

The recently-released National Climate Assessment (NCA) from the U.S. government offers considerable cause for concern for climate calamity, but downplays the decelerating trend in global surface temperature in the 2000s, which I document here.

View original post 274 more words