HNHacker News
TopNewBestAskShowJobs

awwaiid

510 karma · joined July 11, 2007

meet.hn/city/us-Washington

Socials: - github.com/awwaiid

---

submissionscomments
awwaiid··on Wow, Perl 6 [video]
In a few weeks we are having the DC-Baltimore Perl Workshop (in Baltimore on April 16) where there are a few talks on Perl 6. Join us! http://dcbpw.org/
awwaiid··on Ask HN: Who is hiring? (March 2016)
Optoro (http://optoro.com) | Washington, DC | ONSITE | Fulltime | Ruby Dev, Sr Mobile Dev (iOS & Android), Director of Platform Stability

Each year, 10-15% of all inventory is returned or deemed excess, which poses a $500B problem for retailers nationwide. Our mission is to champion the world's returned and excess goods, create unmatched value and power the future of sustainable commerce. Optoro's software & eCommerce platform provides a better way of dealing with those goods – delivering better value for clients, offering amazing deals to consumers and keeping items out of landfills.

We program primarily in Ruby (Rails) and Javascript (AngularJS), but are increasingly building native mobile applications (Android and iOS). In all roles you'll be a member of a team (currently we have 7), working closely with business partners to build our products and solve problems.

For the Ruby Dev, we are looking to hire 2-3 more people in the mid-to-Sr experience range.

For the Sr Mobile Dev position we'd love to find someone who can take on some leadership (at least technical) responsibilities, covering both platforms.

The newly created Director of Platform Stability will be responsible for delivering enterprise-grade stability in all of Optoro’s products. The Director will build and lead a team whose primary responsibility will be to ensure that Optoro is meeting all committed Service Level Agreements (SLAs), both internal and external. More details in the full posting.

We can offer relocation for a great candidate.

Get details and apply at http://optoro.com/careers/join

awwaiid··on VT100 Terminal Art: old text-based animations you can run in your terminal

    clear; curl -s http://artscene.textfiles.com/vt100/twilightzone.vt | ruby -e 'STDIN.read.split("").each{|c|print c;sleep 0.001}'
This one is my favorite so far. Some of these are NSFW!
awwaiid··on Ask HN: Is Python dying?
Er... wait no longer! Grab rakudobrew and perl6 some stuff :)
awwaiid··on Ask HN: Is Python dying?
Yes this is the case; Through libraries we are trying to make it easy to CALL perl5 (and ruby and python and...) modules from Perl 6. But porting -- aka translating -- is another matter. Mostly it requires a similar amount of effort as if you are translating your program to any other dynamic language for nontrivial programs.

My understanding is that LOTS of Python2 programs work fine in Python3 with no (or very trivial) changes. Very very few Perl5 programs will work fine in Perl6 with no changes.

awwaiid··on Large-scale conspiracies would quickly reveal themselves
I wonder if the author could test the model against the Snowden leak -- how many people knew vs the time it took to leak.
awwaiid··on Large-scale conspiracies would quickly reveal themselves
Uhm. HELLO?! That's what they WANT us to think.
awwaiid··on Announcing Rust 1.6
Don't forget Python and R and C++ and JS and ... hmm. Almost like the language doesn't have much to do with it so much as the writer. But I digress!
awwaiid··on Why Would Anyone Use Perl 6?
Yes exactly. To take the code snippet a cousin-reply mentioned one step further, swaping @a and @b:

    > my @a = <1 2 3 4>;
    [1 2 3 4]
    > my @b = <2 3>;
    [2 3]
    > say so all(@a) < any(@b);
    False
    > say so all(@b) < any(@a);
    True
awwaiid··on Why Would Anyone Use Perl 6?
* Seems kinda cool

* Makes $x == 5|6 look kinda cool

* $string ~~ /<first>/ & /<second>/ & /<third>/ # matches all three regexes. huh. kinda cool

* (5|6).foo maybe we can do that in cpu-parallel (it doesn't now)? That might be kinda cool

* sub is-prime($n where $n > 2) { $n % none(2..sqrt($n)) == 0 } # Logical O(1) prime test if only you had that quantum-coprocessor? That... would be kinda cool

* ... you might notice a pattern to the motivation for this feature :)

awwaiid··on Why Would Anyone Use Perl 6?
LISP fan? :)

The trick of course is that then your libraries effectively define your language. There are various sweet-spots of native-language features, standard-lib features, and external libraries. I think it is a matter of taste and trade-offs.

awwaiid··on Why Would Anyone Use Perl 6?
I think Perl 6 gets to claim some APL-ness :) . Though you do sometimes need to be explicit:

    my @x = 3,4,5,6;
    say "yep" if 5 < @x.any; # yep!

    (5 < @x.any).perl.say
    # output: any(Bool::False, Bool::False, Bool::False, Bool::True)
(edit: forgot to add the full junction output)
awwaiid··on Why Would Anyone Use Perl 6?
Yes! "Cool and also a bit mad" is a great description of Perl 6 (and maybe a few other awesome languages. At least until people get used to them... I guess we're all a bit mad!)
awwaiid··on Why Would Anyone Use Perl 6?
I'm contributing toward language integration bindings, hoping to make it convenient and socially acceptable to call out to Perl 5, Python, Ruby, ... so that we will have (a subset of) CPAN, pypy, Rubygems, and so on. You can do this from any language really -- it is just binding to the c lib of the guest language.

It kinda makes me sad that the instinct for most of these things is to port a lib from language to language to language... when does it end?! I never want anyone to write pyplot again -- let's just call pyplot from ALL the languages thanks to the magic that is a little c library called libpython.

awwaiid··on Why Would Anyone Use Perl 6?
Sigils in Perl 6 are rough type constraints on their content. More specifically, the indicate a Role. $x is unconstrained, @x does the Positional role, %x does the Associative role, &x does Callable.

Twigils in Perl 6 are where the scope indicators come in, clarifying class instance vars, dynamic scope, and so on.

So if I see %.foo I can tell you that this variable can be used as the Associative role, that it is scoped as an instance variable, and that it has an accessor with the same name.

For more, see the first few sections of http://doc.perl6.org/language/variables

awwaiid··on Why Would Anyone Use Perl 6?
I think a good idea would be to look through Ruby Enumerable (which is most excellent!) and see how things correspond to P6, or where they are missing. Like in this case you can do:

    [2,3,5,"hello",42,3.14].any ~~ $x
But that's not really the same, since it converts the entire array to a junction and then does the match. Really this is a lot closer:

    [2,3,5,"hello",42,3.14].first($x):p
Which returns the first match (as a pair (hence the :p adverb) so it won't be false even if it is a false value)... but it isn't right either because it gets mad at comparing numbers and strings (I'm asking about this in #perl6 now on irc).

Ultimately: it would be trivial to port ALL Enumerable methods to Perl 6 List (or some role to cover all iterables or such), and do it in a library even if it wasn't in the core standard lib.

I'm always fascinated by how much of Ruby (and lots of other languages) are more about their Standard Lib than about their language. In the Ruby world, lots of people end up with ActiveSupport, which sprinkles in all sorts of cool stuff into the standard lib -- and I've ever seen a native 'for' loop rather than a .each in pragmatic Ruby.

awwaiid··on Why Would Anyone Use Perl 6?
The | junctions seem a lot like sets to me, though I guess there is a lot of fancy you can use. One that comes to mind is that you can pretend that it is a single value, even if it is a complex junction of & and | things:

    > (5|4) + 1
    any(6, 5)
    > (5&4) + 1
    all(6, 5)
    > my $x = 5|4|3|2
    any(5, 4, 3, 2)
    > say "yep!" if $x + 2 ~~ 7
    yep!
    > ((2|3|4|5|6|7) & (3|4)) + 1 ~~ 5
    True
    > ((2|3|4|5|6|7) & (3|4)) + 1 ~~ 6
    False
Kinda weird, especially & junctions. The docs[1] say "Junctions are meant to be used as matchers in boolean context; introspection of junctions is not supported. If you feel the urge to introspect a junction, use a Set or a related type instead."

So far in my Perl 6 exploration I don't think I've used/needed junctions -- strikes me as a specific sort of use-case, but maybe familiarity would help me spot more (useful) opportunities.

[1] http://doc.perl6.org/type/Junction, though like all P6 docs needs more contributions

awwaiid··on Perl 6.0 released
I've been thinking that one advertising angle is to claim that Perl6 is more the successor to Ruby than it is to Perl5 :)
awwaiid··on Perl 6.0 released
... and plans for equally quality interop with other langs, such as Python and Ruby. The only thing special about the perl5 one is that it came first.
awwaiid··on Modern Perl 4th Edition is out, ebook version is free
Indeed. But the book is about Perl5. Perl6 is such a different language that someone moving from Perl5->Perl6 will likely be mostly/completely a rewrite.

... unless, I suppose, they are following the practices in Modern Perl ala Moose and some other things. I guess maaayybbeee they could translate across. But it would be touching ever single line, in a transformation that would be on par with switching to Ruby (or Python I suppose).

awwaiid··on Perl 6 Introduction
Note, however, that Perl6 is a completely different language with a different set of standard libraries and ecosystem and pros-and-cons. You'd be as well off comparing Perl6 to Ruby as you would Perl5.
awwaiid··on Perl 6 Introduction
Perl6 is such a completely different language and implementation that calling Perl5 is no different than calling Ruby or Python -- they all involve effectively embedding or calling out to the other language.

Here is a gist where I'm calling out to some Python. It is not done in the magical future way (which is in progress) of just doing "use matplotlib::pyplot:from<python2>" or similar, but not too bad.

https://gist.github.com/awwaiid/ef3f0abcfa96e34977b4

(I wrote this some months ago -- it can be a bit cleaner now)

awwaiid··on Perl 6 Introduction
Isn't that sort of a mis-feature that we don't expect to see in code very much? I thought mainly people would be using sigils, and ideally the correct sort of sigil to indicate if it is a single thing, list of things, hash of things, callable thing, etc.
awwaiid··on Perl 6 Introduction
[minor syntax/markup edits]

One that has caught my fancy are various uses of the "Whatever Star". This appears as a * in a few contexts. In many it is really a shortcut for the "Whatever" class, so you can use it in function signatures to enter sort of "automatic mode".

  @shuffled_names = @names.pick(*) # randomly pick... however many you have. whatever.
But I think more interesting and different than that is using whatever-star as an automatic lambda thing.

  @nums.map(*/2 + 3)              # expression-lambda from context around a whatever-star
  @nums.map( -> $n { $n/2 + 3 } ) # equivalent with a real stabby arrow lambda
  @nums.map( { $^n/2 + 3 } )      # $^n is a generated alphabetical-positional argument
I suppose this isn't really fundamental... but is definitely different.
awwaiid··on JPMorgan and Other Banks Struck by Coordinated Cyberattack
This article has an AMAZING amount of weak conclusions and flat-out poor wording. Maybe the author was under an above-average tight deadline? Scaremongering?
awwaiid··on ASCII Delimited Text – Not CSV or TAB delimited text
I fixed my keyboard -- @,#,^,{,}.... no shift by default. Have to press shift to get 2,3,6,[,],9,0,...

Must be annoying to have to press shift to get those symbol chars while you're coding, eh?

awwaiid··on Chromium on Linux replacing GTK+
They don't seem to do a straight unstable -> stable path. I'm not completely sure, but I'm pretty sure I've seen features stay in unstable while stable releases keep happening.
awwaiid··on Perl 5 + Perl 6 = Perl 11
Well a lot of the normal stuff is still normal. But that's no fun to show off, so instead lots of Perl6 examples are full of edge cases. When I translated small examples from Perl5 to Perl6 I found them to be pretty similar, though with more obvious OO and cleaning some of the array/hashref sigils visuals.
awwaiid··on Mathematics self-proves its own Consistency (contra Gödel et. al.)
This is why we should stick to a constructive logic :)
awwaiid··on Who Are We at War With? That’s Classified
Because nobody wins. Having the world dependent on US stability is a good thing.
← PreviousPage 8 of 9Next →