News for hackers. Stuff that matters.

kwood

It’s bizarre to me that nowadays an application can become frontmost application at all. When I switched to OSX back in the days, it was an advertised feature that this can’t happen the same way it does on Windows. If something wants attention, its icon bounced in the dock. Nothing more.
Just turn off “Preferences->Mission Control->When switching to an application, switch to…”, that would be the setup you are asking for.

As for myself, I don’t use Spaces at all.

I have a keyboard shortcut for every application I use daily. CMD+CTRL plus a letter, M for Mail, T for terminal, B for browser… And so on.

Some keys are “overloaded” via Keyboard Maestro, like editor “E”: If MacVim is open, use it, otherwise open TextMate (Not using both much these days since switching to VSCode, which inherited “V” after I ditched Voodoopad :))

To make this work ergonomically, I have to be able to press CMD+CTRL with either the left or the right hand. So the first thing I do with new Macs, is remapping the right Option/Alt Key to Ctrl via Karabiner.

Using this system for the past 15 years, my worst fear is that one day Apple will close down its system so much, that this simple remap will no longer work - they are already on the hunt for kernel extensions…

Re:Ask HN: Is RSS dead? on Friday March 06, 2020 @02:03AM (#22501537)
I'm currently writing a new client for RSS, which is dead. Framework of choice is Rails - which is also dead.

This thread inspires me to pull in some jQuery and change the project name to Graveyard.

Re:Why We're Ditching Ruby on Rails for JavaScript and Node.js on Friday September 21, 2018 @03:54AM (#18037955)
Ah, didn't realise there is a blog article about it. Thanks!
Re:Why We're Ditching Ruby on Rails for JavaScript and Node.js on Thursday September 20, 2018 @06:53AM (#18031252)
Do you mind sharing what back office solution you guys found?

Did somewhat the same kind of research for our projects, but unfortunately didn't find anything decent that could really compete with ActiveAdmin/Rails Admin/Trestle in terms of features and maintenance…

Re:Why the New V8 Is So Damn Fast on Wednesday August 01, 2018 @11:05AM (#17663121)
From what I remember, object spread came a year later and is ES7 (in case you need a starting point for research)
Re:VS Code can do that? on Monday April 23, 2018 @03:52AM (#16901332)
It saves a whole keypress (because you need to go into multicursor mode first, then press Home / Ctrl+A to get to the beginning of the line.

Additionally, there is a case where if you don't select the last line until the end, you end up in a state where the last cursor is already at the beginning. If you press "Home" now, you end up having that last cursor at the beginning of the line - and the other ones at the indentation level (see https://github.com/Microsoft/vscode/issues/14919#issuecommen...)

(Disclaimer: Author of the mentioned plugin, so I am heavily biased against my own workflow and saving-keypresses-obsession :P)

Re:Visual Studio Code 1.14 released on Tuesday July 11, 2017 @03:37PM (#14747299)
You don't have to type "end". Shameless self plug: I wrote an extension that closes everything automatically, inspired by a plugin for vim with the same name: endwise[1]

It's not 100% done yet, support for other languages is still missing. But it works.

[1]: https://marketplace.visualstudio.com/items?itemName=kaiwood....

Re:Visual Studio Code April 2017 on Thursday May 04, 2017 @02:42PM (#14267516)
A good decision to focus on closing issues and doing more polish for the past month. The project moves fast, so taking a step back is really appreciated - before it gets out of control (as in: too buggy)
Re:Going native on Friday March 24, 2017 @04:45AM (#13947528)
How would you create a native GUI app on Linux for either Gnome or KDE, considering that GTK and Qt are not allowed by this definition?

And yes, you may think: "Easy, if a GTK app runs on Linux its native, if it runs on another platform, it's not". Does that mean JavaScript apps for Gnome[1] can be called native, because they have officially blessed bindings to the underlying framework/platform and are fully integrated with GTK?

If not, does that mean as soon as you use any kind of binding/bridging technology "nativeness" is ruled out? Think of C++ apps for Gnome, they use bindings…

If yes, we are only left with defining what the "official" way for doing GUI's on a given platform is. Whatever the vendor gives us and preinstalls on its OS? Ok, no Electron, it uses the Chrome rendering engine, that is definitely third party and NOT native!

But… What if I open a WebKit WebView from Objective-C[2] to render my HTML from there and write my logic making use of JavaScriptCore[3] on macOS? Are we native yet? :)

[1]: https://developer.gnome.org/gnome-devel-demos/stable/beginne...

[2]: https://developer.apple.com/library/content/documentation/Co...

[3]: https://developer.apple.com/reference/javascriptcore

Re:Visual Studio Code 1.10 on Thursday March 02, 2017 @11:24AM (#13775299)
It's not, OP didn't count the other processes in (they are listed seperatly in Activity Monitor). VSCode needs roughly the same amount of RAM on macOS.
Re:Announcing TypeScript 2.2 on Thursday February 23, 2017 @02:26PM (#13716894)
I understood the question – and that IntelliJ has all of those things is exactly the point I was trying to make.

You get most of the features from a heavyweight IDE, but they managed to get the architecture incredibly lightweight so you can use it as a "daily driver" editor as well.

It is snappy enough to quickly edit some configuration or Markdown files (with live preview and clickable links), it has text based configuration files, its easy to write plugins with a couple of lines of code – and all sorts of other things that previously could only be found on the "editor-side" of the spectrum (export VISUAL="code -w", anyone?).

Unique selling points are quite hard to find, most things where invented somewhere else. Its more the combination of things and walking the thin line between the text editor and IDE worlds.

Re:Announcing TypeScript 2.2 on Thursday February 23, 2017 @03:30AM (#13712495)
Apart from Intellisense completion, a full featured integrated debugger, version control integration wich supports line wise staging, a diff viewer, a fast integrated terminal that even gets link detection in the next release, proper variable renaming and a working "Go to Definition" that is even implemented in most of the third party language plugins?

No. Pretty much the same as Notepad++.

Re:Visual Studio Code 1.9 on Thursday February 02, 2017 @04:25PM (#13554800)
The gained performance in the current release (and in Insiders for the past days) is huge - even without heaps of output. Those couple of milliseconds improved rendering time matter even if you "only" ls in a directory.

Thumbs up for this, Daniel. Thanks.

Re:Visual Studio Code 1.9 on Thursday February 02, 2017 @03:58PM (#13554591)
Can't compare to Sublime myself, but the global search got some major overhaul and is doing parallel searches since the last release (1.8). Can't complain about the speed.
Re:Visual Studio Code 1.9 on Thursday February 02, 2017 @03:56PM (#13554575)
Apart from the built in task runner system, you can always use an extension that does a "classic" command-R.

I use https://marketplace.visualstudio.com/items?itemName=formulah... and bound it to exactly this key.

Re:App.net is shutting down on Friday January 13, 2017 @03:09AM (#13389220)
The original idea was to focus a lot on the API part of the site, so that developers can build all kinds of apps around the service, hence the name.
Re:Visual Studio Code 1.7.2 on Thursday November 24, 2016 @06:13AM (#13029723)
Actually, audio/video can be and is used. There is an API for previewing HTML documents, <video> and <audio> tags work perfectly fine.
Re:Visual Studio Code 1.7.2 on Thursday November 24, 2016 @05:57AM (#13029659)
Those are animated GIF's, not "real" videos.
Re:Visual Studio Code 1.7 on Thursday November 03, 2016 @04:32AM (#12862369)
Commenting out is there, you can search the keyboard shortcut settings to find the proper key. Actually, there are multiple commands on that subject:

- editor.action.commentLine toggles comments

- editor.action.addCommentLine & editor.action.removeCommentLine

- editor.action.blockComment for block comments

Re:Visual Studio Code 1.6 on Tuesday October 11, 2016 @08:50AM (#12683862)
Good point! I already have double pressing the terminal toggle in my muscle memory, using focus might be worth changing that habit.

To "get out" of the terminal, cmd+1 sets focus on the editor again (to be precise: focus on the first editor group if there is a split view).

Re:Visual Studio Code 1.6 on Tuesday October 11, 2016 @07:34AM (#12683347)
It does support Github Flavoured Markdown and has a preview mode built in, no extension needed.
Re:React Implementation Notes on Tuesday October 11, 2016 @06:41AM (#12683057)
I was in quite the same situation, Angular 1.x was quite hard to grok at first. But React just "clicked" instantly.

For integration with Rails, I found https://github.com/reactjs/react-rails to be quite useful. It integrates the Babel transformer for JSX into the asset pipeline and brings a couple of helper functions, so no additional setup needed.

You start writing your components, "mount" them via the helpers in standard .erb templates (or even without the template directly from a controller action), done.

Re:Visual Studio Code 1.6 on Tuesday October 11, 2016 @05:49AM (#12682825)
Yep, works. Even without using slashes in the search string.
Re:Visual Studio Code 1.6 on Tuesday October 11, 2016 @05:45AM (#12682812)
What you're really looking for is exactly 1 shortcut: cmd+shift-p (or ctrl-shift-p, depending on the platform) for the command palette, where you can fuzzy search for every available command.

If a command has a keyboard shortcut (toggle terminal has one), it's in that list. It even shows your custom shortcuts.

Re:Visual Studio Code 1.6 on Tuesday October 11, 2016 @02:52AM (#12682289)
UserVoice is now deprecated[1], but they are perfectly fine with opening Github issues for feature requests.

[1]https://code.visualstudio.com/blogs/2016/08/19/goodbyeuservo...

Re:Visual Studio Code 1.6 on Tuesday October 11, 2016 @02:49AM (#12682276)
> Make it easier to run Python code. I don't think there's an easy way to run my script and see the output in a terminal without filling in some json file? Please correct me if I'm wrong.

There are multiple extensions that run code without any setup for almost any language. I use https://marketplace.visualstudio.com/items?itemName=formulah...

Older »