tactechs
tactechs
TacTechs
49 posts
Don't wanna be here? Send us removal request.
tactechs · 12 years ago
Text
I was curious about whether NB or Note was more common in a codebase I was working on, and that was fairly simple to see:
git grep NB $DIREC | wc -l
However, then I wondered whether different people used NB or Note, so I tried
find $DIREC -type f | grep -v '/\.' | xargs -n1 git blame | grep NB
however, it took a while, and top suggested git blame was the culprit, which makes a lot of sense. How to minimize git blame? Well, we don't need to blame any lines except for the ones which contain NB, and we don't need to do any files except for the ones which contain NB.
So . . .
git grep --line-number NB $DIREC | \ cut -d ' ' -f 1 | \ rev | \ cut -c '2-' | \ rev | \ while read s; do \ arr=("${(s/:/)s}"); \ git blame -L $arr[2],$arr[2] $arr[1] | \ cat; \ done;
Anyway, it seemed like in this codebase, Note was used more frequently, but there wasn't any one person who used NB, and everyone who had used NB had also used Note before.
2 notes · View notes
tactechs · 12 years ago
Link
partially applied functions
The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said “Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, “Foolish pupil - objects are merely a poor man’s…
2 notes · View notes
tactechs · 12 years ago
Text
find ./src -name '*\.scala' | xargs wc -l | sort -n | tail -n 2 | head -n 1
a good heuristic for figuring out which file to refactor next
0 notes
tactechs · 12 years ago
Text
pbcopy is a neat tool. If you want to copy the contents of a file:
pbcopy < $FILE
If you want to copy the result of some command line trickery
look cam | egrep p.s | pbcopy
0 notes
tactechs · 12 years ago
Photo
egrep '^.r.....e...$' /usr/share/dict/words
Tumblr media
413 notes · View notes
tactechs · 12 years ago
Text
time sleep 1
0 notes
tactechs · 12 years ago
Photo
Tumblr media
1 note · View note
tactechs · 12 years ago
Link
The other tool you can investigate is scala breeze. It's mostly for NLP, but also good for other things.
I sent out a tweet last night asking if there are any good data libraries for Scala. The next morning, Saddle gets released. I’ve heard it described as “Pandas for Scala,” which is great because nothing beats having data frames ported to a new language.
6 notes · View notes
tactechs · 12 years ago
Photo
Tumblr media
0 notes
tactechs · 12 years ago
Link
Today we are releasing updated versions of most of the officially supported MongoDB drivers with new error checking and reporting defaults. See below for more information on these changes, and check your driver docs for specifics. Over the past several years, it’s become evident that MongoDB’s...
9 notes · View notes
tactechs · 13 years ago
Video
vimeo
Guerrilla Guide to Pure Functional Programming
Functional programming is expression-oriented programming. A functional program is not a sequence of instructions, but a single, referentially transparent expression. Computation proceeds by substitution.
2 notes · View notes
tactechs · 13 years ago
Photo
omg monica lam is on their team </fanboy>
Tumblr media
Today’s the first test of Chris Haseman and Susan McGregor’s very cool Dispatch ap—follow it here, and find out more about the project here. 
12 notes · View notes
tactechs · 13 years ago
Photo
Tumblr media
0 notes
tactechs · 13 years ago
Text
get your ip address
hostname | xargs host
0 notes
tactechs · 13 years ago
Text
Github UI Update
I am definitely still in the “Anger” phase of the Github UI Update process. Why can’t I just get over it and get into acceptance?
0 notes
tactechs · 13 years ago
Text
Super proud of this, took me a while to work out some features that scala parsers doesn't support by itself. Also, braved the harsh sonatype submission process to submit this.
pirate 0.1.0
This is the first release of pirate, and it has some neat features. It parses UNIX style help text naturally, and has an extremely simple API, just the Pirate apply funtion.
Here’s an example of how it would parse the arguments for uniq.
val helpText = "[-cdu] [-i] [-f int] [-s int] [input_file [output_file]]" val arguments = "-c -i -f 3 sorted_file".split(" ") Pirate(helpText)(arguments)
Pirate parses CLI arguments effortlessly.
2 notes · View notes
tactechs · 13 years ago
Photo
Tumblr media
I agree, angry unicorn, I agree.
0 notes