Does software count as an 'item' for you? If yes, for me (and I guess many others here) it would be various products of JetBrains, also Kotlin (even if I did not pay for that one directly) and OCR software from Abbyy. Also did not pay for, but use daily: nginx.
HN user
jsrn
Regarding this: "I wish Perl would do an inplace edit of a file without creating a backup, though."
$ perldoc perlrun
(or http://perldoc.perl.org/perlrun.html)says:
If no extension is supplied, and your system supports it, the original file is kept open without a name while the output is redirected to a new file with the original filename. When perl exits, cleanly or not, the original file is unlinked.
Which system are you using? With macOS and Linux, I get no automatic .bak extension when not providing a backup suffix, i.e. it behaves like you want under these systems.
Update: Apparently, anonymous files are not supported by Windows: http://stackoverflow.com/a/30539016 which would explain the behaviour you describe.
Here is the command with jq instead of json_pp
$ curl -sS 'https://www.google.com/complete/search?client=hp&hl=en&xhr=t&q=aurora' | jq . | gsed -nE '/<\/?b>/{s```g;s`"|,|^ *``g;p}'
(see my other comment about gsed vs sed)Nice!
To run this with macOS, I had to use the GNU version of sed. I installed it with
$ brew install gnu-sed
And it is then called with 'gsed' instead of 'sed'.As an avid Perl programmer, I had json_pp in my $PATH - for everyone else - it is here: https://metacpan.org/pod/JSON::PP
You can install it with cpanm:
$ cpanm JSON::PP
If you don't have cpanm, you can install it with $ curl -L https://cpanmin.us | perl - App::cpanminus
The modified command line from above then becomes: $ curl -sS 'https://www.google.com/complete/search?client=hp&hl=en&xhr=t&q=aurora' \
| json_pp | gsed -nE '/<\/?b>/{s```g;s`"|,|^ *``g;p}'
Here is a little Bash function to encapsulate this: $ function c() { curl -sS "https://www.google.com/complete/search?client=hp&hl=en&xhr=t&q=$1" | json_pp | gsed -nE '/<\/?b>/{s```g;s`"|,|^ *``g;p}'; }
Which then allows you to use it like this: $ c hacker
hacker news
hacker typer
hackerrank
hackerman
hackers movie
hacker fare
hackerone
hackers cast
hacker pschorr
For spaces in your query, use a '+': $ c New+York
new york times
new york and company
new york giants
new york post
new york daily news
new york weatherInvented in 1998 by Perl hacker Abigail:
http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-...
(check out Abigail's other JAPHs if you like stuff like this)
Regarding your (2.) - just to clarify this for others: With an enterprise provisioning profile, you can deploy your app to an arbitrary number of devices. These devices do not need to be known before via UDID (as with normal OTA provisioning). You can just upload the app to a server and ask people to download. So the devices do not technically have to belong to the same organization (even if this is perhaps Apple's intent). E.g., a friend of mine uses an enterprise account which they aquired for their university to deploy an app for a study (for data gathering). The subjects who install the app and enter their data are not all part of the university. Apple was informed about this use case and they did not have anything against it.
But, AFAIK Apple centrally checks the validity of the profile with each download and thus they are certainly able to detect if you use your enterprise profile to circumvent the appstore.
Thanks, that makes sense.
So the parameter would be the number of slots (== number of input units of the deep NN).
And the transformation of the text into bag-of-words / n-grams would not be considered feature-engineering - or at least only 'low level feature engineering' - the higher level features will be learned by the deep network.
I guess one could go lower level still and even do away with bag-of-words / n-grams : limit the text size to e.g. 20000 characters, represent each character value with a numerical value (e.g. its ASCII code point when dealing with mainly English texts) and then simply feed this vector of codepoints to the input layer of the deep network. Given enough input data, it should learn location-invariant representations like bag-of-words / n-grams (or even better ones) itself, right?
What would you use as input for the deep network?
I have only worked with text classification methods where I chose the features myself. As I understand it, a deep network still has (like a 'traditional'/non-deep ANN) a fixed number of inputs in its input layer, i.e. one would have to process each input text somehow before feeding it into the network (to make the input sizes equal). Is there a usual way to do this without doing feature-extraction?
"Bokeh will be BSD/MIT."
Point taken - what I primarily wanted to show is that the correct way is not much longer than the "looks like" solution. Yes, the Regexp is long, but it is nicely encapsulated in the Email::Valid module.
> because those who can benefit from this kind of basic regexp examples are also those who will not understand the limitations.
I share your sentiment. The article is certainly useful for learning regexps. But IMHO it should also point to the correct way of doing things - often, the correct way is using a module and thus the resulting code is not much longer than the code in the article. For email address validation:
use Email::Valid;
print (Email::Valid->address('john@example.com') ? 'valid' : 'invalid');
as a oneliner: perl -MEmail::Valid -E"say (Email::Valid->address('john@example.com') ? 'valid' : 'invalid');"
Other than installing the Email::Valid module with a cpanm Email::Valid
it is not much longer than the example in the article.Also, don't miss the movie adaptation of Roadside Picnic by Andrei Tarkovsky: "Stalker".
For a model railroad similar in spirit (I think) that was built out into a startup and now a successful business (by charging visitors and selling merchandise), check out the "Miniatur Wunderland" in Hamburg, Germany.
They build and program many things by themselves. Recently, they completed a very impressive addition: an airport, complete with starting and landing airplanes, cars etc. I listened to an interview with one of the founders, Gerrit Braun, where he says that for the airport alone they wrote several hundred thousand lines of code.
The airport: http://www.youtube.com/watch?v=Qz4NcTnQedo
Camera mounted on train: http://www.youtube.com/watch?v=RBArNAyODLc
"what's the lane?"
four options squeezed together:
-l: 1. "chomps" the input (which here means: removes newlines (if present) from each line, more general explanation: http://perldoc.perl.org/functions/chomp.html 2. and automatically adds a newline to each output newline (see below how to achieve this in a shorter way with a relatively new Perl feature).
-a: turns on auto-split-mode: this splits the input (like awk) into the @F (for fields) array. The default separator is one (or many) spaces, i.e. it behaves like AWK.
-n: makes Perl process the input in an implicit while loop around the input, which is processed line-wise: "as long as there is another line, process it!"
-e: execute the next command line argument as a Perl program (argument in this case beeing 'print $F[0]').
Note that the example can be shortened if you use -E instead of -e. -E enables all extensions and new features of Perl (which aren't enabled with -e because of backwards compatibility). This allows you to use 'say' instead of 'print' which adds a trailing newline automatically and lets you drop the -l option (if you don't need the 'chomp' behaviour explained above):
$ perl -anE 'say $F[0]'
Of course, the AWK command line is still shorter - and that's expected, because AWK is more specialized than Perl.Still, Perl one liners are often very useful and can do other things better / shorter than AWK - especially if the one-liner uses one of the many libraries that are available for Perl.
A thorough reference of all Perl command line options is available at:
http://perldoc.perl.org/perlrun.html
or just: $ man perlrunJust for the interested reader: when the first command line is changed into
pi:~$ echo 'foo bar' | tr -s ' ' | cut -d ' ' -f 2
it also outputs 'bar'. The -s (for "squeeze") option of tr turns every sequence of the specified character (space in this case) into one instance of this character.Of course, the awk solution is more succint and elegant in this case - I just think that tr -s / cut -d is handy to know from time to time, too.
"[...] if you read Russian, you can convince yourself of this by browsing his blog."
there is an English version of it here: http://www.artlebedev.com/mandership/
which is a translation of http://www.artlebedev.ru/kovodstvo/sections/
(I don't know if this is the blog you were referring to)
"[...] but it doesn't have an -i or --info option that tells me how many pages a PDF file has"
You could use pdfinfo - in Debian / Ubuntu, it is in the same package as pdftotext (poppler-utils).
To extract (only) the number of pages of a PDF:
$ pdfinfo FILE.pdf | grep '^Pages' | tr -s ' ' | cut -d ' ' -f 2with "failed attempts to copy" I meant they (Rubygems, Hackage, ...) did not succeed (yet?) to replicate the size, diversity, test coverage, community etc. of CPAN. I do agree that they are useful.
Sorry for the misunderstanding.
> And here's some constructive criticism for the aspiring Perl advocate
point taken, thanks.Perhaps the Perl success stories should be mentioned more often, too:
Want to launch a one-man search engine? Perl makes the easy things easy and the hard things possible: http://www.gabrielweinberg.com/blog/2009/03/duck-duck-go-arc...
Amazon.com, del.icio.us, Craigslist, the BBC? All have significant parts written in Perl: http://www.fischerlaender.net/perl/perl-used-for-web-develop...
Recently chromatic finished his book "Modern Perl":
http://www.onyxneon.com/books/modern_perl/index.html
you can download the PDF for free:
http://www.onyxneon.com/books/modern_perl/modern_perl_letter...
http://www.onyxneon.com/books/modern_perl/modern_perl_a4.pdf
this book follows and introduces modern practices/modules developed by the Perl community in recent years.
> Also, Ruby is a better language than Perl.
"Perl is the syntax, CPAN is the language" > Vim's recent resurgence can largely be traced
> to development of Textmate grinding to a complete
> halt.
makes sense - but then why didn't Emacs see an equivalent resurgence (although personally I think Emacs did see a resurgence, not because of Textmate but because of Org Mode). > Git beats seven shades of shit out of SVN.
you could argue the same for Mercurial (or darcs, for that matter). But Git had the better initial marketing, Github, the Ruby folks used it etc. > I cannot think of anything that's changed in Perl
> that'd justify any such interest.
hm, CPAN (and the arguably failed attempts to copy it by other language communities), Moose, MooseX::Declare, Devel::REPL, Dancer, Mojolicious, Task::Kensho, ... > In CLOS I don't even have to override
> a function and then call the base version,
> I can just use :before/:after methods.
that is possible in Perl, too, with method modifiers:
http://search.cpan.org/~drolsky/Moose-1.19/lib/Moose/Manual/...in fact, Moose took many ideas from CLOS (and Smalltalk, Ruby, Perl 6, ...)
you write:
> When people say things like this about
> perl they're usually talking from '98 or so
> when perl was the most flexible game in
> town. A lot has changed since then.
true, but don't forget Perl itself has changed a lot, too. > Interesting that JavaScript 1.6, 1.7 and
> possibly Harmony will have primitives for
> Python-like generators
If you want, you can already use JavaScript 1.6 and 1.7 - 1.6 is supported in FF 1.5+ and 1.7 is supported in FF 2+he answered a quite similar question here: "what do you feel the modern relevance of Lisp and Prolog are in AI".
> Weren't some rich Russians willing to pay for the privilege of a pirate-hunting vacation off the coast of Somalia?
No, that was a hoax:
> $ someCommandChain | perl -pe 's/because sed regex sucks/'
>
> Maybe I could spend some time learning a new regex dialect
Maybe you should first learn the Perl regex dialect (the above regex doesn't parse in Perl).> [...] but do leave the menu bar, as once in a while it's nice for fishing around for things I don't use often. Basically though, I just want as much screen real estate for code as possible.
depending on what your value for "once in a while" is, you might want to further optimize for screen real estate and just toggle the menu bar on and off when (seldomly) needed:
M-x menu-bar-mode
That's how I do it - and XMonad resizes the window automatically for me so that I never lose space and the Emacs window always fits on the screen.Thanks for the explanation of the difference between Emacs with/without Gtk+ support.
> I compiled my Emacs without gtk+ support
I guess with these three lines in my .emacs
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
this wouldn't make much of a difference for me?
(honest question) > SQL: express what you want to happen using relational notation,
> and it will magically happen. There are no real-world
> performance issues.
I don't think that's true: Consider theCREATE INDEX
statement - it's part of the API and it is intended for improving performance. True, a RDBMS will execute a query even if the programmer didn't issue CREATE INDEX before - but this more reflects the rigid separation ('data independence') of the logical and physical data model than a lack of control (API exposure) over performance details.