145 stories
·
1 follower

Sublime Text 4

1 Comment and 3 Shares

The first stable release of Sublime Text 4 has finally arrived! We've worked hard on providing improvements without losing focus on what makes Sublime Text great. There are some new major features that we hope will significantly improve your workflow and a countless number of minor improvements across the board.

A huge thanks goes out to all the beta testers on discord and all the contributors to our packages.

Download Sublime Text 4

License Changes

Sublime Text license keys are no longer tied to a single major version, instead they are now valid for all updates within 3 years of purchase. After that, you will still have full access to every version of Sublime Text released within the 3 year window, but newer builds will required a license upgrade. These are the same license terms we use for Sublime Merge, and they allow us to deliver more frequent and exciting updates as soon as they're ready, without having to roll them into a new major version.

Tab Multi-Select

File tabs have been enhanced to make split views effortless, with support throughout the interface and built-in commands. The side bar, tab bar, Goto Anything, Goto Definition, auto complete and more have all been tweaked to make code navigation easier and more intuitive than ever.

Apple Silicon and Linux ARM64

Sublime Text for Mac now includes native support for Apple Silicon processors. Linux ARM64 builds are also available for devices like the Raspberry Pi.

Refreshed UI

The Default and Adaptive themes have been refreshed with new tab styles and inactive pane dimming. Themes and Color Schemes support auto dark-mode switching. The Adaptive theme on Windows and Linux now features custom title bars.

Context-Aware Auto Complete

The auto complete engine has been rewritten to provide smart completions based on existing code in a project. Suggestions are also augmented with info about their kind, and provide links to definitions.

TypeScript, JSX and TSX Support

Support for one of the most popular new programming languages is now shipped by default. Utilize all of the smart syntax-based features of Sublime Text within the modern JavaScript ecosystem.

Superpowered Syntax Definitions

The syntax highlighting engine has been significantly improved, with new features like handling non-deterministic grammars, multi-line constructs, lazy embeds and syntax inheritance. Memory usage has been reduced, and load times are faster than ever.

GPU Rendering

Sublime Text can now utilize your GPU on Linux, Mac and Windows when rendering the interface. This results in a fluid UI all the way up to 8K resolutions, all while using less power than before.

A single frame being rendered. See our blogpost on OpenGL rendering.

Updated Python API

The Sublime Text API has been updated to Python 3.8, while keeping backwards compatibility with packages built for Sublime Text 3. The API has been significantly expanded, adding features that allow plugins like LSP to work better than ever. Read the revamped documentation here.

Compatibility

Sublime Text 4 is fully compatible with version 3. It will pickup your session and configuration automatically. If you'd prefer however, it is possible to keep things separate.


Download Sublime Text 4


Full Changelog

GPU Rendering

  • New hardware_acceleration setting will composite the UI on the GPU
  • By default, GPU rendering is enabled on Mac, and disabled on Windows and Linux
  • Details about the active GPU will be displayed in the Console

Context-aware Auto Complete

  • The auto complete engine now suggests completions based on patterns in existing code
  • Uses the entire project as a source, instead of just the current view
  • Plugins may specify symbol kind info to be displayed in suggestions list

Tab Multi-Select

  • Multiple tabs can be selected using ctrl/cmd, their contents will be shown side-by-side
  • Selecting multiple files from the sidebar will also preview them simultaneously
  • Included themes have a tab connector joining the active sheet and tab when using sheet multi-select
  • The sidebar can now select multiple files using alt
  • Goto Anything allows opening tabs side-by-side using ctrl/cmd
  • The Definition popup has a dedicated button for opening files side-by-side
  • Multiple tabs can also be selected from the tab dropdown
  • The menu Selection/Tab Selection contains various options for manipulating tab multi-select
  • File/New View into File has been replaced by File/Split View using multi-select

Python 3.8 API

  • Added a Python 3.8 API environment for plugins
  • Plugins can choose Python version via .python-version file in plugin folder
  • Existing plugins are fully supported via legacy Python 3.3 API
  • Many API improvements and additions - see API section for more details

Goto Symbol

  • Goto Symbol in Project is now significantly faster on huge projects
  • Icons are now shown next to symbols, indicating the symbol kind
  • Symbols with 3 characters or less are now indexed

Syntax Definitions

  • Added out of the box support for TypeScript, JSX and TSX - thanks to Thomas Smith
  • Added ability to "branch" within syntax definitions, for non-deterministic or multi-line constructs
  • Many syntax highlighting improvements, including significant improvements to:
  • Significantly improved load times, match times and reduced cache size on disk
  • embed is now lazy loaded, resulting in much higher performance for syntaxes like markdown
  • Added branch and fail for non-deterministic parsing
  • Added version: 2 to fix edge cases while retaining backwards compatibility
  • Added extends to inherit from another syntax definition. Multiple inheritance is supported, provided all parents have the same base syntax
  • Added hidden_extensions
  • Allow using pop alongside push/set/embed/branch
  • Fixed a performance issue with bounded repeats in regular expressions
  • Syntax tests can now assert that reindent is working as expected
  • Syntax tests can now assert that symbols are indexed
  • Prevent infinite include loops via with_prototype
  • Fixed a number of scope related bugs
  • Fixed some regex capture related bugs
  • Added more information to the Show Scope Name popup

OS Compatibility

  • The following operating systems are no longer supported as a result of adding Python 3.8:
    • OS X 10.7
    • OS X 10.8
    • Windows XP
    • Windows Vista

Platform Integration

  • Added automatic dark/light theme and color scheme switching, based on OS theme changes
  • subl - can now be used to read from stdin on all platforms
  • Windows will remember their Virtual Desktop/Space/Workspace, controlled by the remember_workspace setting
  • Scroll bars now follow platform conventions when clicking on them. Configurable using Scroll Bar.sublime-mousemap
  • Mac: Releases use universal binaries with Apple Silicon support
  • Mac: Updated icon to follow macOS 11 style
  • Mac: Windows will now stay maximized when using Mac window tabs
  • Mac: Fix various issues with the wrong cursor being used
  • Linux: ARM64 builds are now available
  • Linux: Text drag and drop is now supported
  • Linux: Added proper support for Wayland
  • Linux: Touch screen events are now handled
  • Linux: Better support for copy+paste with other applications that don't support utf8 text
  • Linux: Native file dialogs like those for KDE will be used when configured
  • Windows: IME preview and multi-select support
  • Windows, Linux: Added support for custom title bars
  • Windows, Linux: Use vsync for animations instead of a fixed 60hz
  • Mac, Linux: Improved compatibility with some keyboard layouts

Application Behavior

  • Added Safe Mode, to simulate a clean install. Enabled by passing --safe-mode on the command line or holding shift+alt/option at startup on Windows/macOS respectively
  • Added Help/Report a Bug to link to our public issue tracker
  • Added options to hot_exit setting to control behavior when the last window is closed
  • Fixed a possible case where an update loses the current session
  • Settings containing a UTF-8 BOM will no longer fail to load
  • Added support for previewing TGA and PSD images
  • Added close_deleted_files setting to control behavior of session restoration when files have been deleted on disk
  • Popup windows now use virtual windows for improved performance
  • Improved performance when loading files with very long lines
  • Improved rendering performance on very long lines
  • Improved performance with large session files
  • Data directories have dropped the "3", though if a "3" directory still exists it will be used
  • Mac: Quick Switch Project now works without any windows open
  • Mac, Linux: The cache and index are now located in the proper location (~/.cache and ~/Library/Caches respectively)

Auto Complete

  • Typing the full tab trigger of a snippet will move it to the top of the results
  • Manually typing in the only available completion will hide the auto complete popup
  • .sublime-completion files can now specify annotation, kind and details
  • Ranking quality improvements
  • Improved behavior of completions starting with non-word characters
  • auto_complete_trailing_symbols is now disabled by default
  • cancelCompletion will no longer prevent manual invocation
  • Added the auto_complete_when_likely setting
  • Added auto_complete_preserve_order setting
  • Added auto_complete_include_snippets_when_typing setting
  • Added auto_complete_use_index setting
  • Added auto_complete_use_history setting to control if previous choices are automatically selected
  • Running the auto_complete command when auto complete is already showing will re-query plugins for results
  • auto_complete_selector now applies to the position before the just-typed in character, matching auto_complete_triggers

Input Handling

  • Modifier key taps can now be used as part of a key binding. For example, ["ctrl", "ctrl"] will trigger when Ctrl is pressed twice without pressing any other keys in between
  • Linux: AltGr can now be used in key bindings via altgr
  • Linux: Added a workaround for a touchscreen driver bug, which would cause right click and mouse scrolling to stop working
  • Linux: When the menu is hidden, pressing alt will show it
  • Mac: Fix Pinyin input
  • Mac: Keypad keys can now be bound to as expected
  • Mac: Added key bindings for macOS application tabs
  • Windows, Linux: Hide mouse cursor when typing. Controlled via hide_pointer_while_typing setting
  • Windows, Linux: Fixed being unable to bind Ctrl+Break

Editor Control

  • Added File/Print, which prints via a browser
  • Added Edit/Copy as HTML
  • Build systems now use new annotations functionality instead of phantoms, reducing re-flow
  • Undo history is preserved in the session
  • Comments and layout are preserved when programmatically editing preferences
  • Caret blinking is disabled by default. Set caret_style setting to smooth for previous behavior
  • Improved automatic indentation detection
  • Added relative line numbers, controlled by the relative_line_numbers setting
  • Added setting scroll_context_lines
  • Added setting hide_pointer_while_typing
  • Added setting control_character_style
  • Added Project/Recent/Remove Deleted
  • Added chain command to run multiple commands in series
  • switch_file command now handles filenames with compound extensions
  • The scroll_past_end setting now supports customizing the scroll distance using numbers from 0.0 to 1.0
  • Double-clicking a semi-transient sheet's tab will now fully open the sheet
  • trim_trailing_white_space_on_save can now be set to "not_on_caret"
  • trim_trailing_white_space_on_save now trims only newly inserted trailing whitespace by default. Controlled via trim_only_modified_white_space setting
  • Expanded draw_white_space setting, supporting leading and trailing white space
  • Unicode white space characters, such as the zero width no-break space, are now drawn as hex values. Controlled via draw_unicode_white_space setting
  • Fixed spelling correction to support languages with upper case characters after start of word
  • Added commands to simplify customizing the active theme or color scheme
  • Quick Switch Project will open the selected project in a new window if Ctrl (Cmd on Mac) is held down
  • Added wrap_width_style preference
  • Added console_max_history_lines
  • Added additional settings to control the status bar: show_sidebar_button, show_indentation and show_syntax
  • Console now uses Python syntax highlighting by default
  • Added Central European (Mac) encoding support
  • Key Bindings: Join Lines is now on Ctrl+Shift+J / Cmd+Shift+J
  • Key Bindings: Expand Selection to Indentation is no longer bound by default
  • Key Bindings: Ctrl+J / Cmd+J is now used as a prefix for sequential key bindings, similar to Ctrl+K / Cmd+K
  • Code Folding: fixed some edge-case incorrect behaviors
  • Linux: Added support for alternate font weight names
  • Linux: Selection is no longer cleared when another application makes a selection
  • Linux: Added Ctrl+Space to trigger Auto Complete
  • Linux, Windows: Added Alt+Shift+Left Mouse Button as an alternative column selection binding
  • Linux, Windows: Added Shift+F10 key binding to open the context menu

Text Commands

  • Macros now record Find commands
  • Reworked Jump Back and Jump Forward commands
  • Improved behavior of Wrap Paragraph
  • Improved behavior of Swap Lines
  • Added Revert Diff Hunk
  • Added Selection/Expand Selection as a general mechanism to expand the selection
  • Selection/Split into Lines will now split a selection into words if the selection doesn't contain any newlines
  • Show a sum in the status bar when there are multiple selections and all of them are numbers
  • set_file_type command now accepts "scope:" prefixed syntax names
  • Fixed sort_lines replacing unicode newlines with regular ones

Snippets

  • Added auto_complete_include_snippets setting, for disabling auto complete integration
  • Added ignored_snippets setting, for disabling default snippets

Indexing (Goto Definition)

  • Files ignored by .gitignore are not indexed by default. Controlled via index_exclude_gitignore setting
  • Files without known extensions are no longer indexed by default. Controlled via index_skip_unknown_extensions setting
  • Improved behavior with constantly changing files
  • Significantly improved load times

Files and Folders

  • Saving files is now asynchronous
  • Improved performance when adding directories with extreme amounts of files
  • When save_on_focus_lost is enabled, closing an unsaved file will save and close it, instead of prompting to save
  • Improved behavior of save_on_focus_lost in conjunction with administrator owned files
  • Added reload_file_on_change setting to control if files are automatically reloaded or not
  • folder_exclude_patterns and folder_include_patterns now support project-relative paths, by starting the path with //
  • Folders in the sidebar can be recursively expanded via alt+arrow key
  • Added preview_on_click setting to support only previewing files on left click
  • Windows: Fixed Open Containing Folder for UNC paths
  • Windows: Fixed Save dialog not showing for new files with control characters on the first line
  • Windows: Fixed Ctrl+Backspace inserting a DEL character when a dialog is open in the background
  • Linux: Fix recreated directories not working correctly with file change monitoring
  • Linux: Recursively expanding and collapsing sidebar folders now works with alt or super

Find

  • Find results are highlighted on the scroll bar, controlled by highlight_find_results_in_scrollbar
  • Find in Selection now highlights the area that will be searched
  • Commands can now be run without the find panel having input focus
  • Fix keypad enter not working in find panel
  • Improved find history behavior
  • Find: Various performance improvements with large files using graceful degradation
  • Find: Fixed adjacent matches being skipped when find in selection is in use
  • Find: Fixed find in selection option not being cleared when changing tabs
  • Find: Selection will no longer be reset after Find All is used when finding in selection
  • Find: Results are now properly highlighted on Find All when close_find_after_find_all is turned off
  • Find in Files: Improved performance with large numbers of matches
  • Find in Files: Can now filter by .gitignore
  • Find in Files: Added Preserve Case option for replacements
  • Find in Files: Fix not recursing into directories on networked file systems
  • Find in Files: Hide rulers by default in find results
  • Find in Files: Added Find/Cancel Find in Files menu item
  • Find in Files: Binary file patterns are applied when an explicit folder is given
  • Find in Files: Using "Find in Folder…" from the sidebar context menu will apply project file filters
  • Find in Files: Added close_find_after_find_all preference
  • Find in Files: Added close_find_after_replace_all preference

UI

  • Changed default color scheme to Mariana
  • Added Default Dark theme
  • Added themed_title_bar setting
  • Changed file tab style, adding file_tab_style setting
  • Goto Symbol shows more information about symbols
  • Definitions hover popup shows more information about symbols
  • Sheets without input focus are now dimmed when using included themes
  • Added a New Tab button in the tab bar, and hide_new_tab_button setting
  • Added show_tab_close_buttons_on_left setting
  • Added highlight_gutter and highlight_line_number settings
  • Added the ability to auto hide the menu, tabs, and status bar when typing. See auto_hide_menu and related settings
  • Window title bar can be controlled by show_rel_path and show_project_first settings
  • Tab context menu now includes Close Unmodified Files and Close Deleted Files entries
  • Side bar row highlights now properly reflect the selected tabs
  • Color Schemes: Added glow font option
  • Color Schemes: Added support for the underline font style
  • Color Schemes: Added new property, inactive_selection_border
  • Color Schemes: Slightly darkened the background of Mariana
  • Color Schemes: Added support for stippled_underline and squiggly_underline
  • Color Schemes: .hidden-tmTheme files are now supported by the .sublime-color-scheme convertor
  • Themes: Included themes use variables extensively, making customization simpler
  • Themes: Added style property for title_bar element, for better integration with OS "dark modes"
  • Themes: The tree_row for the file with input focus now gets the attribute highlighted
  • Themes: The settings key now supports objects, with keys being settings and values being a boolean, string or array of strings
  • Themes: Added sheet_contents class to text, image and HTML sheets
  • Themes: Added the background_modifier property for sheet_contents
  • Themes: Added a number of new attributes to tab_control for richer tab theming
  • Themes: The highlighted attribute is only applied to the most recently active sheet, rather that the most recently active sheet in each group
  • Themes: tab_control and sheet_contents classes now synchronize their highlighted and hover attributes
  • Themes: tooltip controls now support animations to their opacity
  • Linux: Show sequential key bindings in the menu
  • Linux: Fixed context menu position being slightly offset

Spell Checking

  • Updated dictionaries
  • Added support for non-utf8 dictionaries
  • Updated Hunspell for improved suggestions
  • System dictionaries are now available on Linux
  • Dictionaries in ~/Library/Spelling are now available on Mac

Rendering

  • Properly query glyph extents in order to avoid cutting off large glyphs
  • Windows, Linux: Added support for per-display subpixel ordering
  • Mac: Improved window resize performance
  • Windows: Fixed rendering bug where other applications could cause persistent artifacts via window animations
  • Windows: Add support for color emoji

API

  • Improved coverage of plugin profiling
  • The cProfile module is now included on Linux
  • Added HTML sheets, which can be created via window.new_html_sheet()
  • repr now works as expected
  • Updated OpenSSL to 1.1.1j
  • .sublime-commands files now support filtering commands via the "platform" key
  • Minihtml now handles list-style-type CSS property - circle, square and disc
  • Minihtml now processes subl: links, running them as commands
  • Minihtml now supports white-space: nowrap
  • Improved minihtml rendering performance
  • EventListener has many new features and bug fixes
    • on_query_completions() can now
      • Return suggestions asynchronously
      • Return command completions
      • Include symbol kind information
    • New: on_init() is called once with list of views opened before plugin was loaded
    • New: on_exit() is called immediately before plugin_host exits, after API is shut down
    • New: on_text_changed() and on_text_changed_async() provide detailed modification info
    • New methods:
      • on_reload()
      • on_revert()
      • on_new_window()
      • on_new_window_async()
      • on_pre_close_window()
      • on_pre_move()
      • on_post_move()
      • on_post_move_async()
      • on_new_project()
      • on_new_project_async()
      • on_load_project()
      • on_load_project_async()
      • on_pre_save_project()
      • on_post_save_project()
      • on_post_save_project_async()
      • on_pre_close_project()
      • on_associate_buffer()
    • Fixed on_selection_modified() to not be called twice when left clicking
    • Fixed on_selection_modified() begin called on non-selection state changes
  • New TextChangeListener for getting callbacks when a text buffer is changed
    • Can be dynamically bound to a Buffer using TextChangeListener.attach and TextChangeListener.detach
    • Methods:
      • on_text_changed()
      • on_text_changed_async()
      • on_revert()
      • on_revert_async()
      • on_reload()
      • on_reload_async()
  • Sheet has some new methods:
    • file_name()
    • group()
    • close()
    • is_semi_transient()
    • Sheet.is_transient
  • View has a number of changes and improvements
    • Fixed newly created views not having a valid viewport before being returned to the API
    • add_regions() now has an annotations parameter, to allow adding a per-region annotation to the buffer. The exec command uses this API for build errors
    • add_regions() calls that add an underline now have that underline applied to whitespace characters
    • show() now takes keep_to_left and animate parameters
    • text_point() and related functions now accept a clamp_column parameter
    • Added "glow" to style_for_scope()
    • Added View.rowcol_utf8(), View.rowcol_utf16(), View.text_point_utf8() and View.text_point_utf16()
    • Added sublime.KEEP_ON_SELECTION_MODIFIED, which can be passed to show_popup()
    • New: element() returns a string describing widget views (find input, quick panel input, etc)
    • New: assign_syntax() sets the syntax used in a view, supports Syntax objects, paths and scope selectors
    • New: syntax() returns the currently set Syntax
    • New: clones()
    • New: sheet() and sheet_id()
    • New: export_to_html()
  • Window has some changes and improvements:
    • show_quick_panel now accepts placeholder text, via the placeholder argument
    • Added sublime.CLEAR_TO_RIGHT and sublime.SEMI_TRANSIENT for use with open_file()
    • Added the flag sublime.REPLACE_MRU for use with open_file(). When multiple sheets are selected, this flag will cause the opened file to replace the most recently used sheet with the file being opened
    • Added the flag sublime.WANT_EVENT for use with show_quick_panel(). This will pass an event dict to the on_select callback. The dict will contain the key modifier_keys, which will be a dict that may contain zero or more of the keys: primary, ctrl, super, alt, altgr
    • open_file now accepts sublime.ADD_TO_SELECTION as a flag
    • New: selected_sheets(), selected_sheets_in_group() and select_sheets()
    • New: workspace_file_name()
    • New: bring_to_front()
  • sublime.ok_cancel_dialog() and sublime.yes_no_cancel_dialog() now accept an optional title parameter
  • Added sublime.open_dialog, sublime.save_dialog and sublime.select_folder_dialog
  • Syntax definitions can be queried via sublime.list_syntaxes(), sublime.find_syntax(), sublime.syntax_from_path(), sublime.find_syntax_by_name(), sublime.find_syntax_by_scope(), and sublime.find_syntax_for_file(). They return Syntax objects
  • Improved sys.stdout to extend io.TextIOBase
  • sublime.executable_path(), sublime.packages_path(), sublime.installed_packages_path() and sublime.cache_path() may now be called at import time
  • Added sublime.SymbolRegion and sublime.SymbolLocation with corresponding methods on View and Window
  • Fix a bug with popup being stuck open when a popup is shown in the hide event handler of another popup
  • Added open_project_or_workspace command
  • append command has new, optional disable_tab_translation argument
  • Added modifier_keys to event dicts when commands are invoked via a menu
  • Added sublime.DYNAMIC_COMPLETIONS. on_query_completions() can return this flag to indicate that completion results should be re-queried as the user types
  • Added sublime.INHIBIT_REORDER. Returned by on_query_competions()
  • CompletionItem now accepts a details parameter, which can include basic HTML
  • CommandInputHandler now has an initial_selection() method
  • Added Region.to_tuple and Phantom.to_tuple
  • Fixed ViewEventListener.on_load_async() sometimes not being called
  • Added sublime.QuickPanelItem() with support for kind info, annotations and basic minihtml
  • Plugins may now add selections to the Jump Back history list via the add_jump_record command
  • Plugins may suppress selections from the Jump Back history list via the jump_ignore_selection region
  • Plugins may now disable the default HTML and CSS completions
  • Added Buffer.id() and Buffer.file_name()
  • The TextInputHandler and ListInputHandler classes may define a method want_event() that returns True to receive an extra parameter, an event dict, when the validate() and confirm() methods are called. The dict will contain the key modifier_keys, which will be a dict that may contain zero or more of the keys: primary, ctrl, super, alt, altgr
  • Add sublime.ui_info() for high-level information about the UI
  • Popups will be properly positioned when displayed near the right-hand side of the editor
  • Popups near the right-hand side of the editor with wrapped lines will now be properly sized
  • Added ListInputItem so that ListInputHandler objects can provide kind info, annotations and details
  • Improvements to the API, applied to the new Python 3.8 environment only:
    • bool(sublime.Selection()) will return False when len() == 0
    • sublime.load_binary_resource() now returns bytes instead of bytearray
    • Added Selection.__iter__()
    • Added Region.__iter__()
    • Added Region.__contains__()
    • Added Settings.to_dict()
    • Settings can now be treated like a dict
    • Plugins starting with _ will be ignored, __all__ global will be respected
    • Events won't be reported until plugin_loaded() has been called
    • .pyc files can now be imported when contained within .sublime-package files, although they will not be scanned for plugins
  • The certifi Python package is preinstalled
  • Significant performance improvements when rapidly printing to the Console
  • Added sublime.log_control_tree(). When enabled, clicking with ctrl+alt will log the control tree under the mouse to the console
  • Added sublime.log_fps(). When enabled, the render times are tracked and logged
  • Added logging status functions:
    • sublime.get_log_commands()
    • sublime.get_log_input()
    • sublime.get_log_build_systems()
    • sublime.get_log_result_regex()
    • sublime.get_log_indexing()
    • sublime.get_log_fps()
    • sublime.get_log_control_tree()
  • Logging functions are now toggle when no argument is passed:
    • sublime.log_commands()
    • sublime.log_input()
    • sublime.log_build_systems()
    • sublime.log_result_regex()
    • sublime.log_indexing()
    • sublime.log_fps()
    • sublime.log_control_tree()
  • Backwards Compatibility Break: The event parameter passed to commands when a minihtml link is clicked changed from a two-element list to a dict with the keys x and y
Read the whole story
kbreit
67 days ago
reply
Share this story
Delete
1 public comment
jgbishop
67 days ago
reply
Woo-hoo!
Durham, NC

Russian Multiplication: A Different Way to Multiply

2 Shares

I’ve loved math since I was a kid. One of the big reasons for this is that there’s always more than one way to solve a particular problem and in discovering those solutions, you learn something about mathematics and the nature of numbers.1

In this video, math fan Johnny Ball shows us a different method of multiplication. In Russian multiplication (also called Ethiopian multiplication and related to ancient Egyptian multiplication), you can multiply any two numbers together through simple addition and doubling & halving numbers. The technique works by converting the numbers to binary and turning it into an addition problem.

I loved learning about this so much that I scribbled an explanation out on a napkin at brunch yesterday to show a friend how it worked. We’re friends because she was just as excited as I was about it. (via the kid should see this)

  1. I’ve probably told this story here before, but for an assignment in a quantum mechanics class in college, we had to derive an equation using two different techniques. After much struggle at the whiteboard on a Saturday morning, a friend and I got the results of these two approaches to converge on the same answer and it felt like we had unlocked a deep secret to the universe.

Tags: how to   Johnny Ball   mathematics   video
Read the whole story
kbreit
519 days ago
reply
Share this story
Delete

Rob Manfred should resign

1 Share
Al Yellon

We used to have commissioners who cared about baseball. Now we’ve got a tone-deaf apologist.

Sunday, Rob Manfred held his first major news conference since the Astros punishment for their sign-stealing scandal was revealed.

He shouldn’t have bothered. All he did was make jaws drop with his stunning ignorance of how angry many people are about the scandal and the perceived lack of punishment for Astros players.

Check out this tone-deaf statement:

“Hurt”? Well, maybe, although listening to Astros players attempt to apologize over the last few days, I wonder how “hurt” they really are, and they continue to get paid millions of dollars to play baseball. No players were fined, just the team, and owner Jim Crane had to pay only $5 million (the maximum allowed by MLB’s constitution), about the cost of one year of a middle reliever.

There’s been much discussion about whether the Astros should have to vacate the 2017 World Series title since the punishment was announced. I’ve gone on record here as saying I don’t think that would accomplish anything. But after Manfred’s unbelievably ridiculous comment about that Sunday, I might change my mind:

Manfred defended his decision not to vacate the Astros’ championship, saying, “The idea of an asterisk or asking for a piece of metal back seems like a futile act.” The commissioner devaluing the meaning of a championship seems… not great? Counterintuitive, even? The “piece of metal” is literally called the Commissioner’s Trophy.

A “piece of metal”? That’s all, Rob? It’s not just a “piece of metal.” It’s what the “piece of metal” represents. You would think that someone leading the entire sport of baseball would not have to be told that, but here we are. Tell all the Cubs fans who lined up for hours during the winter of 2016-17 to have photos taken with that trophy that it’s just a “piece of metal.”

Maybe it is time to take that 2017 trophy back and simply declare that year’s title “vacant.” Yu Darvish had one of his usual cogent Twitter comments:

Back to Manfred: Not satisfied with simply being tone-deaf, the Commissioner took a swipe at reporters during his news conference regarding some excellent reporting done by Jared Diamond of the Wall Street Journal:

So a journalist was doing his job, finding out information, and the work done by Diamond in revealing the Astros’ “Codebreaker” system was one of the better pieces of reporting done on the scandal.

At best, Manfred’s comment was sarcasm. On its face, Manfred seemed to be telling Diamond he had done something wrong. There’s an old saying that resides right at the top of NBC Sports writer Craig Calcaterra’s Twitter account that seems relevant here:

Exactly. There’s been so much covering up here that it took the great work of Ken Rosenthal and Evan Drellich at The Athletic, and later the WSJ’s Diamond, to make the scandal public. Manfred does not seem happy at all about that.

Apparently tired of questions about the Astros scandal, Manfred tried to move on:

Then there were several more questions about the Astros scandal, but the whole thing can be summed up with this paragraph from NBC Sports’ Bill Baer:

All in all, this press conference could not have gone worse for Manfred. The press found it condescending and the comments he made rang hollow to the players. Manfred seemed on edge and unprepared addressing arguably the biggest controversy baseball has faced since the steroid era. This is a dark time for the sport.

Condescending? Check. Unprepared? Check. Tone-deaf? Check. I have often said that I wonder if Rob Manfred is even a baseball fan. All that news conference did is confirm in my mind that he’s not.

In my view, this is more than the biggest controversy since the steroid era. The Astros’ sign-stealing scheme might be the worst thing to happen to baseball since the Black Sox scandal of a century ago.

I am well aware that the Commissioner’s role has changed much since the first Commissioner, federal judge Kenesaw Mountain Landis, took office November 8, 1920 nearly 100 years ago. As you no doubt know, Landis was hired by baseball owners to help clean up the image of the sport after the Black Sox scandal. He did so, and swiftly, by permanently banning eight members of that White Sox team who were alleged to have thrown the 1919 World Series. (I say “alleged” because a legal case brought in 1920 resulted in acquittals.) Landis was given broad authority to work in the “best interests of baseball” and often did. We haven’t had a Commissioner like that since ... well, probably since Bowie Kuhn, at least, and Kuhn was regularly roasted by the general public for his own tone-deafness. Granted that MLB’s collective-bargaining agreement with players limits some of the powers of the Commissioner, Manfred has still done little to give the general public confidence in the sport.

But now, public perception of baseball now is heading toward that low reached after the 1919 World Series was thrown. I am well aware that Rob Manfred serves at the pleasure of baseball’s owners, and that his primary function is to help them make buckets of money. In that, he has certainly succeeded, even while angering many baseball fans with proposed and actual rule changes supposedly designed to improve “pace of play” (hint: they haven’t), and the recent proposal to contract up to 42 minor-league teams, which has resulted in outcries almost everywhere except owners’ suites. Baseball seems to be working for everyone but fans, the paying customers, for whom Manfred and team owners seem to have nothing but contempt.

Baseball needs a strong Commissioner who could help restore its tattered reputation. I’m not certain who that individual could be in the year 2020, but I do know this: It’s not Rob Manfred. Manfred should resign. If he doesn’t, baseball’s owners ought to realize how much damage Manfred is doing to their brand and fire him.

Read the whole story
kbreit
526 days ago
reply
Share this story
Delete

One Guy Gets Entire Park to Sing Bon Jovi

1 Comment and 3 Shares

(Wait for it, wait for it…) One guy, singing Bon Jovi’s Livin’ On A Prayer, gets an entire park to sing along with him. I know this was a tough week for many, but if this doesn’t brighten your day, I do not know what will.

See also Leadership Lessons from the Dancing Guy, which I swear is related. (via open culture)

Tags: Bon Jovi   music   video
Read the whole story
kbreit
542 days ago
reply
Share this story
Delete
1 public comment
anthonylatta
542 days ago
reply
One of my best memories was when I did something similar. Heading to a baseball game full of fans, the train car was packed. I started singing "Take me out to the ballgame," and the entire car started singing. It was a minute of smiles and laughter. I'm sure others have similar memories...
Washington, DC

Multitasking, windows, and the Mac

1 Share

When I heard about Front and Center, my first thought was “Why would anyone want their windows to behave that way?” But I didn’t write a post about it right away, because maybe my snap judgment was wrong. I read the release articles by Lee Fyock and John Siracusa and the initial posts1 by John Gruber, Jason Snell, Stephen Hackett, Ryan Christoffel, and others. And then I spent the next week using my Macs and thinking more about how I use them. I came to the (admittedly self-serving) conclusion that my snap judgment was right: what Front and Center does is at odds with my view of multitasking and would be a hindrance to my use of the Mac.

Here’s what Front and Center does:

In “Classic” mode, clicking on a window brings all the windows in that app to the front, just like it did in classic Mac OS. In “Modern” mode, only the clicked window comes to the front. In either mode, Shift-click on a window to get the opposite of the chosen behavior.

In my everyday use of the Mac at work, I have several windows open at once, all of them showing different views of the project I’m working on. Typically I have two or more Preview windows, a couple of Finder windows, a Terminal window, one or more graphics editing windows2, and a small handful of BBEdit windows. And as I work, I usually have to refer to one or more documents3 while I’m creating or editing another. Which means I am continually switching between those documents.

The key here is that while I work I switch between different sources of information. On my computer, the information is contained in documents, the documents are displayed in windows, and the windows are “owned” by apps. In one sense, the apps are essential for accessing and creating the information, but in another sense they are incidental. While I work, I am not thinking “I need to activate Preview” or “I need to activate BBEdit,” I’m thinking “I need to see the basement floor plan” or “I need to add a paragraph about the basement layout to my report.” And, significantly, when I need to refer to that floor plan, I don’t want my report suddenly covered up by all the other drawings I have open in Preview.

To me, this is the essence of multitasking. I am not multitasking, the computer is. I am focused on one thing. It just so happens that that one thing requires documents from several apps and those documents are continually changing as the work progresses. For the computer to help me with my work, it must pretend to be as focused as I am, and that means being able to switch focus to the documents I need (and only the documents I need) when I need them.

All of this is a long way of saying that I see the the current Mac behavior as correct.

But what about the classic Mac behavior? I am, generally speaking, a big fan of the original Mac UI design team. They got so many things right the first time, and they tweaked most of the things that weren’t quite right within a few years. But the UI for multitasking, which was introduced with MultiFinder in System 5 in 1987, was not one of those things.

I don’t think this was the UI designers’ fault. When the Mac was introduced, it was a single-tasking system. To switch to a second application, you had to quit the one you were in and launch another. And even after the MultiFinder came along, the underlying operating system retained a lot of that original design. The main thing it retained was that the foreground application was in control. Background applications ran only when the foreground app ceded them a time slice. This was called cooperative multitasking, or as I like to call it, not really multitasking.

This under-the-hood prominence given to the foreground app in classic Mac OS made it natural4 for all the foreground app windows to be in front of all the windows of the other apps.

Part of the reason Apple bought NeXT in 1996 was to sweep away the cruft left over from the Mac’s original OS design and give it a real multitasking operating system. With that came the window-first UI that John Siracusa dislikes and that I find perfectly suited to the way I work and, fundamentally, correct.

Obviously, not everyone agrees. From John Gruber’s post:

I never liked Mac OS X’s change in this regard, but I haven’t used a third-party utility to restore the classic style in at least 10 years. But now that I have it back, I realize I’ve missed it. When you switch to an app via the Dock, all its windows come forward. When you switch to an app via ⌘-Tab, all its windows come forward. It feels right to me that when you switch to an app by clicking one of its visible background windows, the whole app comes forward.

I would argue that just because Gruber misses the old behavior doesn’t make it right. When you switch to an app via the Dock, all its windows come forward because you have clicked on a icon for the app. Similarly, when you switch to an app via ⌘-Tab, all its windows come forward because you have selected the icon for that app. But when you click on a background window, you are not selecting an app, you’re selecting a window. So it’s the window that should come forward, not the app as a whole.

The main reason you might think all of the windows associated with an app should also come forward when you click on one of them is because you got used to that behavior. It’s familiar, which is important, but not necessarily correct.

Of course, I was quite familiar with the classic Mac OS behavior, having bought my first Mac in 1985. Why am I not as fond of it as Siracusa and Gruber? I can think of a couple of reasons:

  • First, I wasn’t a kid when I started using Mac. I was 24 years old and it was my third way of using a computer, coming after punchcards, timesharing on mainframes from terminals, and a Commodore 64. I definitely have Mac-induced habits, but they may not be as ingrained in me as they would be in someone who started using it at a younger age.
  • Second, and more important, I switched from the Mac to Linux in the late 90s and didn’t return until 2005. During that time I got used to the X Windows way of working, which is closer to the current Mac behavior. When I came back to the Mac, it was running OS X and using its multitasking was very much like what I’d been doing the previous eight years.

If you’re an app-centric sort of computer user, by all means get a copy of Front and Center, and do it before its price gets raised. But if you’re like me and think more in terms of documents and windows rather than apps, you might like Witch from Many Tricks. It lets you use ⌘-Tab (or another key combination—I use ⌃-Tab) to quickly switch between windows without bringing an entire app to the front.


  1. I’m not sure they’re detailed enough to call them “reviews.” Then again, Front and Center is a very focused app—there aren’t many details to discuss. 

  2. These used to be Acorn and OmniGraffle, but lately I’ve been using Graphic and Affinity Designer instead of OG. 

  3. I’m using “documents” in a broad sense here, including not only files that are on my computer, but also web pages and the ephemeral output of Terminal commands. 

  4. And maybe necessary. I’m not enough of a programmer to know if it was even possible for Apple to have allowed the foreground app to leave some of its windows behind those of other apps. 


[If the formatting looks odd in your feed reader, visit the original article]

Read the whole story
kbreit
555 days ago
reply
Share this story
Delete

Back to windows after twenty years

2 Shares

Apple’s stubborn four-year refusal to fix the terminally broken butterfly keyboard design lead me to a crazy experiment last week: Giving Windows a try for the first time in twenty years.

Not really because I suddenly had some great curiosity about Windows, but because Apple’s infuriating failure to sell a reliable laptop reluctantly put me back in the market. So when I saw the praise heaped upon the Surface Laptop 3, and particularly its keyboard, I thought, fuck it, let’s give it a try!

Looks good, doesn’t it?

The buying experience was great. There was nobody in the store, so with four sales people just standing around, I got immediate attention, and typed away a few quick sentences on the keyboard. It felt good. Nice travel, slim chassis, sleek design. SOLD!

The initial setup experience was another pleasant surprise. The Cortana-narrated process felt like someone from the Xbox team had done the design. Fresh, modern, fun, and reassuring. Apple could take some notes on that.

But ultimately we got to the meat of this experience, and unfortunately the first bite didn’t quite match the sizzle. The font rendering in Windows remains excruciatingly poor to my eyes. It just looks bad. It reminded me of my number one grief with Android back in the 5.0 or whenever days, before someone at Google decided to do font rendering right (these days it’s great!). Ugh.

I accept that this is a personal failure of sorts. The Windows font rendering does not prevent you from using the device. It’s not like you can’t read the text. It’s just that I don’t enjoy it, and I don’t want to. So that was strike one.

But hey, I didn’t pluck down close to $1800 (with taxes) for a Windows laptop just to be scared off by poor font rendering, right? No. So I persevered and started setting up my development environment.

See, the whole reason I thought Windows might be a suitable alternative for me was all the enthusiasm around Windows Linux Subsystem (WSL). Basically putting all the *nix tooling at your fingertips, like it is on OSX, in a way that doesn’t require crazy hoops.

But it’s just not there. The first version of WSL is marred with terrible file-system performance, and I got to feel that right away, when I spent eons checking out a git repository via GitHub for Windows. A 10-second operation on OSX took 5-6 minutes on Windows.

I initially thought that I had installed WSL2, which promises to be better in some ways (though worse in others), but to do so required me to essentially run an alpha version of Windows 10. Okay, that’s a little adventurous, but hey, whatever, this was an experiment after all. (Unfortunately WSL2 doesn’t do anything to speed up work happening across the Windows/Linux boundary, in fact, it just makes it worse! So you kinda have to stick with Linux tooling inside of Linux, Windows outside. Defeating much of the point for me!).

So anyway, here I am, hours into trying to setup this laptop to run *nix tooling with Windows applications, running on the bleeding edge of Windows, digging through all sorts of write-ups and tutorials, and I finally, sorta, kinda get it going. But it’s neither fast nor pleasant nor intuitive in any way. And it feels like my toes are so stubbed and bloody by the end of the walk that I almost forgot why I started on this journey in the first place.

I mean, one thing is the alpha-level of the software required to even pursue this. Something else is the bizarre gates that Microsoft erects along the way. Want to run Docker for Windows on your brand new Surface Laptop 3? Sorry, can’t do that without buying an upgrade to Windows Pro (the $1800 Surface Laptop 3 apparently wasn’t expensive enough to warrant that designation, so it ships with the Home edition. Okay, sheesh).

The default Edge browser that ships with Windows 10 is also just kinda terrible. I clocked a 38 on the Speedometer 2.0 test, compared to the 125 that my MacBook Pro 13 ran with Safari. (But hey, there’s another beta version of Edge, the one that now uses the Chrominum rendering engine, and that got it to a more respectable 68.)

Anyway, I started this experiment on a Monday. I kept going all the way through Friday. Using the laptop as I would any other computer for the internet, and my new hobby of dealing with the stubbed toes of setting up a *nix development environment, but when I got to Saturday I just… gave up. It’s clearly not that this couldn’t be done. You can absolutely setup a new Windows laptop today to do *nix style development. You can get your VS Code going, install a bunch of alpha software, and eventually you’ll get there.

But for me, this just wasn’t worth it. I kept looking for things I liked about Windows, and I kept realizing that I just fell back on rationalizations like “I guess this isn’t SO bad?”. The only thing I really liked was the hardware, and really, the key (ha!) thing there was that the keyboard just worked. It’s a good keyboard, but I don’t know if I’d go as far as “great”. (I still prefer travel, control, and feel of the freestanding Apple Magic Keyboard 2).

What this experiment taught me, though, was just how much I actually like OSX. How much satisfaction I derive from its font rendering. How lovely my code looks in TextMate 2. How easy it is to live that *nix developer life, while still using a computer where everything (well, except that fucking keyboard!) mostly just works.

So the Surface Laptop 3 is going back to Microsoft. Kudos to them for the 30-day no questions return policy, and double kudos for making it so easy to wipe the machine for return (again, another area where Apple could learn!).

Windows still clearly isn’t for me. And I wouldn’t recommend it to any of our developers at Basecamp. But I kinda do wish that more people actually do make the switch. Apple needs the competition. We need to feel like there are real alternatives that not only are technically possible, but a joy to use. We need Microsoft to keep improving, and having more frustrated Apple users cross over, point out the flaws, and iron out the kinks, well, that’s only going to help.

I would absolutely give Windows another try in a few years, but for now, I’m just feeling #blessed that 90% of my work happens on an iMac with that lovely scissor-keyed Magic Keyboard 2. It’s not a real solution for lots of people who work on the go, but if you do most of your development at a desk, I’d check it out. Or be brave, go with Windows, make it better, you pioneer, you. You’ll have my utter admiration!

Also, Apple, please just fix those fucking keyboards. Provide proper restitution for the people who bought your broken shit. Stop gaslighting us all with your nonsense that this is only affecting extremely few people. It’s not. The situation is an unmitigated disaster.

Read the whole story
kbreit
631 days ago
reply
Share this story
Delete
Next Page of Stories