Better HN
topnewbestaskshowjobs
Log inSign up

hellofunk

9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions

John Bellick, Mexico City
Submissions

comment 9y ago · link · parent

It really depends on what information is important to you. For example, seeing all your branches with visual lines that show how they are connected, you can do something like this in your .gitconfig file:

[alias]

    lg = !"git lg1"

    lg1 = !"git lg1-specific --all"

    lg2 = !"git lg2-specific --all"

    lg3 = !"git lg3-specific --all"

    lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(black)%s%C(reset) %C(dim black)- %an%C(reset)%C(auto)%d%C(reset)'

    lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n''          %C(black)%s%C(reset) %C(dim black)- %an%C(reset)'

    lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n''          %C(black)%s%C(reset)%n''          %C(dim black)- %an <%ae> %C(reset) %C(dim black)(committer: %cn <%ce>)%C(reset)'
Then doing "git lg" or one of these variants gives you a quick tree view. Colors and other customizations can of course be changed.

This is one of many tools I used to replace ST.

comment 9y ago · link · parent

For me, the best replacement was several command line aliases and bash scripts for maximizing my productivity with Git in the shell. I can now see all my projects (i.e. Sourcetree bookmarks) and their git status with one command, and easily fetch updates for all my projects at once (like Sourcetree does in the background) and view diffs in a tree-like form with branch lines, etc. All with simple scripts.

I used to think I wouldn't be able to live without something like ST but I was wrong and am more productive now without it.

comment 9y ago · link · parent

Can anyone explain what a hacker might actually do with this exploit?

comment 9y ago · link · parent

I tried irony mode, but my autocomplete pop-ups would contain all kinds of nonsense, and I noticed at least two other issues on the irony mode github page that showed other people with the same experience as mine, on Mac. So I eventually gave up after not tracking down a resolution.

comment 9y ago · link · parent

What package are you using for your Emacs back end for completion? I've tried several and never really found them stable or even working in some cases. I write a couple thousand lines of C++ every week in emacs and I've actually become very productive without auto completion, so perhaps I'm not missing it anymore at all.

comment 9y ago · link · parent

I was quite excited until I realized I cannot use this with c++.

comment 9y ago · link · parent

Indeed my experience is mostly with Clojure, which I mentioned because my parent commenter referred to ClojureScript. Glad to know a "normal" lisp handles this differently.

comment 9y ago · link · parent

In my case, it was definitely a problem of resource limits during compilation only, since the same logic would work fine if not a macro and run at runtime, so not a general case of the JVM not setup to handle the work, but specifically macros not able to handle the work.

C++ obviously has a limit on template depths as well, but they are so high that rarely does anyone get close to the defaults. Clojure probably has very limited defaults (assuming that defaults are the cause).

comment 9y ago · link · parent

I think that you are approaching the notation from a very left brained kind of logical point of view. Once you learn to recognize the patterns in musical notation, none of these concerns actually matter. Musicians just see the pattern and play it, and then focus on the stuff that is really difficult, which is the musicality.

comment 9y ago · link · parent

There must be a setting in regular Clojure on the JVM for controlling how much recursion or memory usage is available during macro expansion, because I've hit that limit very easily in the past. It's been about a year since I used Clojure much, but I doubt that's changed.

comment 9y ago · link · parent

I have plenty of personal experience trying to do things at compile time that are simply not available, and while I haven't looked up the details in a while, I do recall there being such a limit, but perhaps you have to make some settings on the compiler to get around. Macro expansion has relatively small limits in Clojure for things like memory usage.

comment 9y ago · link · parent

I think you misunderstood what I'm saying. Typically, the macroexpansion is a compile time process that uses different machine resources than the runtime processes of the same language.

comment 9y ago · link · parent

We are talking about the resources of the machine and which of those resources are available during compile time compared to those which are available at runtime.

comment 9y ago · link · parent

Typically you are limited at compile time because Lisps -- especially Clojure -- do not allow the same computing resources you get at runtime to be used at compile time, so there are some clear limits.

This can be true in C++ as well, but those limits are quite high and are easily set to something else. Perhaps Clojure also allows you to reset what these limits are.

comment 9y ago · link · parent

You grossly misunderstand and under-appreciate the role of a classical performer. It is true that they strive to honor the wishes of the composer. But if they all did this the same way, there would be no need for musicians. Instead, each interprets the world of the composer through the lens of their own individual creativity. Performing music is as much of a creative art as composing music. There is nothing narrow, closed, or "merely" about it.

comment 9y ago · link · parent

Keep in mind that I and the parent were mostly discussing C++, a very different language from C.

comment 9y ago · link · parent

I think you are spouting a bit of hyperbole. Some might be unsafe but there are more good examples out there than you are willing to admit. And many use modern C++ and demonstrate smart techniques.

If you are not being hyperbolic then please backup your 90% claim.

comment 9y ago · link · parent

The nice thing about C++ is that it is so widely used that for just about any task you can find examples of how to do it (usually many different ways to do something), especially for tasks like this article. You will also find plenty of C example, which you could also use in C++.

comment 9y ago · link · parent

> The solution to "the standard library is broken" is to fix the standard library, no? It's all free software after all.

Doesn't the author make that case at the end?

comment 9y ago · link · parent

I disagree and think these topics (especially the part about policies to search computers of entrants to the U.S.) are interesting and relevant to this crowd. (The fact that this post is #1 on HN right now suggests this as well).

comment 9y ago · link · parent

Is the policy to search computers and phones when entering the U.S. still happening? If so, is it also affecting U.S. citizens? I would think they'd have rights that don't allow this without a warrant. Not sure about non-citizens.

comment 9y ago · link · parent

I just wrote a bash script collection built on cmake that allows me to build and deploy libraries and modules for easy use in any project I want, without having to worry about all the include paths, linking, etc. I just add the name of the module to a Cmake variable and the scripts do the rest, making sure everything is found and included. Even third parties work nicely this way since I can just build them using my cmake scripts and have them automatically exported as modules for other projects to use.

Setting this up was a couple weeks of learning curve but I agree it is worth it to invest in Cmake and also learn the low-level details about how it all fits together since after all we are dealing with a native low-level language, it also pays to see under the hood of these "package managers" and build systems so you can be fluid on any platform where you need to build.

1733.

FlexiKiller: New Tool Identifies, Removes Spying Software on Mac, Windows(ibtimes.com ↗)

1 points · by hellofunk · 9y ago · discuss

comment 9y ago · link · parent

There is some strange geeky enjoyment from browsing all the serialization libraries out there. For my taste, I have centered on Cereal. When workind with C++ end to end, I have found it to be the easiest and fastest way to throw data around.

comment 9y ago · link · parent

This is true of college degrees in general, lots of companies in various industries require proof of a bachelor's degree, regardless of what the subject matter was, because it shows an ability to stick to a goal and get something done, despite the actual quality or enjoyment of the work.

comment 9y ago · link · parent

The Netherlands passed a law last year that requires all new car sales to be only electric cars starting 2020.

comment 9y ago · link · parent

A few things I really like:

1) I can very quickly arrange the workspace with whatever windows in whatever shape next to each other for viewing multiple code files. Some IDEs have split windows, but they are never as flexible as emacs, and the ability to save window configurations, launch entirely new frames, quickly jump back and forth between window layouts, makes me very productive. And of course, doing all of this without ever touching my mouse.

2) Yasnippet. The ability to write syntax completion logic for commonly used idioms really takes a ton of typing out of my day. Several IDEs support snippets in various forms, but I've never seen any as flexible as the yasnippet plugin, which is extensible in lisp. It has been much more useful for me than generic autocomplete.

3) Quick font zooming. I like being able to enlarge a font with one keystroke rather than jump through menus. Late at night when my eyes are tired, I can make everything bigger, or if I want to fit an entire coding file on the screen to see its full API, I can make just that split have a tiny font, off to the side, while my main coding split has normal font. And I can do all of this in approx 0.5 seconds.

4) Vim macros. I use evil mode in emacs, and many say its Vim bindings are better than vim itself, somehow. I use vim macros every single day, they do so much to save time when refactoring.

5) No buttons or nonsense on the screen. Just code. Literally no part of my laptop window has any space that is not used for coding, yet I can navigate better with all the keystrokes.

6) Automatic support for any language I wish to try, with proper syntax highlighting, indentation and all you'd need to edit code. Bash, C++, CSS, HTML, Javascript, Python.. heck recently I decided to try Erlang and the emacs mode for Erlang is a full IDE with automated builds and editing.

7) Undo Tree. Another little plugin that makes navigating your entire edit history easy, with all the branches in your workflow.

8) Ace Jump or similar (I'm not sure which of these I actually use, it's just in my muscle memory). With a single keystroke, jump to any word in any code file on the screen. If your eye can see it, you can jump right to it without navigating line by line or switching windows.

There is so much more but these come to mind. Every time I try Xcode or Sublime or Vim itself or Brackets or Eclipse or any of myriad other IDEs I instantly miss the raw basics of how text editing should be, especially when working with code files.

I will admit that I used emacs every day for at least a year before I came to find it so indispensable, because the learning curve and rewiring how you think about text editing is non trivial. Emacs is a lot like New York City. When you first move there, you think how the heck can all these people live this way?! Many people don't last too long and leave within a couple years. But those who keep at it and live past a certain threshold of time will often never leave. And if they do, they will miss it terribly.

Emacs is famous for two tools in particular, Org Mode and Magit. Ironically, I don't use either at all, yet still find it critical to my professional life.

comment 9y ago · link · parent

No matter how many IDEs I try I always come back to emacs. I am spoiled for life.

comment 9y ago · link · parent

If it's because the job genuinely requires the language skills, you'll find that all around the world. But if they're using that to mask a desire for particular race, that's different. However, most Singaporeans are not qualified for this job since most are not actually fluent in Chinese.
1
575859
110