510 karma · joined July 11, 2007
Socials: - github.com/awwaiid
---
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
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!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.
> 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* 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 :)
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.
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)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.
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
[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.
> (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
... 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).
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)
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.Must be annoying to have to press shift to get those symbol chars while you're coding, eh?