News for hackers. Stuff that matters.

aiiie

Re:How to See Bright, Vivid Images in Your Mind’s Eye on Sunday October 01, 2023 @07:45AM (#37724999)
It varies for me depending on my mood state. I find it most vivid in bouts of psychosis. I remember once being in such a state and being overwhelmed by my mind's eye seeming even more vivid than the images coming into my actual eyes. Seeing two distinct views at once was quite disorienting.
I'm a bit surprised at how often it seems to come up in random comment threads. The atmosphere here feels increasingly unwelcoming lately.

Or maybe people feel like they're just having abstract, hypothetical intellectual discussions. But when I read these threads, it just feels like signal after signal that I no longer fit in or have a place here.

Re:Last Resort Font on Friday October 09, 2020 @03:50AM (#24727779)
What’s the deal with the Git repo not including any source code? Is this a common way to use GitHub these days, as a download server for closed source projects?
Re:Bitbucket now rocks Git on Monday October 03, 2011 @02:22PM (#3067370)
When we were prototyping Git support, one of the first things we investigated was having automatic conversion between Hg and Git on the server. We weren't able to get the performance to a level where responsiveness would be acceptable, and maintaining consistency between the two repos was complex.

It's something we might revisit in the distant future. As a middle ground, I've been thinking of implementing support for multiple SCMs in a single repository with the conversion/syncing process left up to the user. But that'll probably take more than a couple of 20% days to bang out. :)

If you're interested, I have some patches against hg-git that make it easier to take an existing Hg repo and convert it to Git (as opposed to the other way around). I haven't had a chance to prepare them to go upstream yet, but my repo's here: [link redacted]

Re:Introducing Prompt. Nice SSH for iOS. on Friday April 15, 2011 @01:39AM (#2449563)
I was never really a fan of iTerm, but I do really like using my mouse in terminal applications, so I wrote a SIMBL plugin for Terminal that implements support for mouse tracking: [link redacted]

Also, I think a recent update added support for horizontally splitting windows (with cmd+D).

I do agree though, I think Apple could do a much better job with Terminal.

Re:Ask HN Emacs Users: What's in your .emacs file? on Wednesday September 01, 2010 @06:33PM (#1654560)
Here's some stuff I find useful when editing Python:

    (setq-default show-trailing-whitespace t)
    (setq longlines-show-hard-newlines t) ; displays "\" at the end of lines that wrap past the window's edge

    ; camel case word navigation
    (when (boundp 'subword-mode)
      (add-hook 'after-change-major-mode-hook '(lambda () (subword-mode 1))))

    ; Bindings
    (defun delete-backward-indent (&optional arg)
      "Erase a level of indentation, or 1 character"
      (interactive "*P")
      (if (= (current-column) 0)
          (delete-backward-char 1)
        (let ((n (mod (current-column) standard-indent)))
          (if (looking-back (concat "^\s*" (make-string n 32)))
              (if (= n 0)
                  (delete-backward-char standard-indent)
                (delete-backward-char n))
            (delete-backward-char 1)))))

    (defun newline-maybe-indent ()
      "Like newline-and-indent, but doesn't indent if the previous line is blank"
      (interactive "*")
      (if (= (line-beginning-position) (line-end-position))
          (newline)
        (newline-and-indent)))

    (add-hook 'python-mode-hook
              '(lambda ()
                 (hs-minor-mode 1) ; code folding
                 (define-key python-mode-map (kbd "RET") 'newline-maybe-indent)
                 (define-key python-mode-map (kbd "DEL") 'delete-backward-indent)
                 (define-key python-mode-map (kbd "M-RET") 'hs-toggle-hiding)))

    ; On-the-fly spell checking
    (add-hook 'python-mode-hook '(lambda () (flyspell-prog-mode)))

    ; On-the-fly pyflakes checking
    (require 'flymake-point) ; shows errors in the minibuffer when highlighted (http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs.d/plugins/flymake-point.el)
    (setq python-check-command "pyflakes")
    (when (load "flymake" t)
      (defun flymake-pyflakes-init ()
        (let* ((temp-file (flymake-init-create-temp-buffer-copy
                           'flymake-create-temp-inplace))
               (local-file (file-relative-name
                            temp-file
                            (file-name-directory buffer-file-name))))
          (list "pyflakes" (list local-file))))
      (add-to-list 'flymake-allowed-file-name-masks
                   '("\\.py\\'" flymake-pyflakes-init)))
    (add-hook 'python-mode-hook '(lambda () (flymake-mode 1)))

I have a feeling there's probably a better way to do that delete-backward-indent thing. Maybe I should just switch to hungry delete mode.

My entire .emacs is here: http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs

Re:Ask HN: What's the best way to get started with Vi(m) on Tuesday April 27, 2010 @02:45AM (#1297438)
Get like 2 or 3 different cheat sheets and keep them available whenever using Emacs. Steal someone else's ~/.emacs[1]. Make sure you use those Emacs key bindings in your shell. Bonus points if you're on OS X, which has Emacs bindings for all native text widgets.

[1] Here's mine: http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs :)

Re:Ask HN: What's in your .emacs file? on Thursday October 01, 2009 @08:08PM (#856128)
http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs

http://bitbucket.org/[redacted]/dotfiles/src/tip/.emacs.d/pl...

Probably my favorite bit of the config is that it uses flymake to run Pyflakes on my Python code as I'm writing it. I also have a little plugin that shows the error in the minibuffer area when the point is over the offending line.

It also disables backup/autosave file littering by using a locked down directory in /tmp.

As far as bindings go, I wrote delete-backward-indent for python-mode which deletes a level of indentation instead of just one space. There's also newline-maybe-indent that doesn't indent if the previous line has no indentation.

Everything else is pretty straightforward customization, I think. flyspell-prog-mode is another thing worth mentioning: it highlights spelling errors, but only in strings and comments.