HNHacker News
TopNewBestAskShowJobs

randomguy7788

40 karma · joined May 13, 2012

submissionscomments
randomguy7788··on Q&A with Mark Zuckerberg
did he actually answer ANY question? i cant find any...
randomguy7788··on How Google Works
thats quite a change. what made you make that huge a switch?
randomguy7788··on Twitter sues U.S. government over ability to disclose surveillance orders
theyre actually pretty late at this. google, microsoft and apple had fought for this a while ago. I'm actually disappointed in how long it took them
randomguy7788··on PM at Microsoft (2005)
agree with this sooo much
randomguy7788··on Atom: Hello Windows
care to list a package that you need to that isnt in atom yet? (i would love to take a crack at building it)
randomguy7788··on Show HN: Dollar and Cent – A functional tool belt for Swift
that is awesome to hear!
randomguy7788··on Show HN: Dollar and Cent – A functional tool belt for Swift
its unfortunate that it repeats the same mistakes that underscore and lodash does (imo) and makes it very hard to do composition (data comes in first instead of the predicate/function)
randomguy7788··on Jsperf for Fast.js, Lodash, Native
oh for sure, i agree with your sentiments (since there are no intrinsic language features nor primitives to make any of this easy in js. even ramda is just a better crutch really). i am actually in the same situation :P but you did say it was unpleasant to read (which i still think it isnt, but not as good as other languages that have better support).

haha man i dont know how many time ive written a reverse/flip function in our codebase and then erased it an hour later cause i know i would be called out on it lol

randomguy7788··on Jsperf for Fast.js, Lodash, Native
guess that really depends.

  var nums = Array.apply(0, Array(300)).map(function(x, idx) {
    return idx;
  });

  var filter = ramda.filter;
  var map = ramda.map;
  var reduce = ramda.reduce;
  var compose = ramda.compose;

  var gt100pred = function(x) {
    return x > 100;
  };
  var add = function(a, b) {
    return a + b;
  };

  var result = nums
    .filter(gt100pred)
    .map(Math.sqrt)
    .reduce(add, 0);

  var gt100 = filter(gt100pred);
  var sqrt = map(Math.sqrt);
  var accum = reduce(add, 0);
  var result = compose(accum, sqrt, gt100)(nums);
=============

with the above your code does look shorter. but there is one big plus with the latter that not only can you pass around the predicate but the operation in itself can be passed around(gt100 is reusable etc..). (ramda actually works like a functional library wherein the function/predicate is the first argument and the data structure is the last. this makes partial function application and currying work much better)

also when we do away with the boilerplate the final thing looks like this:

  // "I want the sum of the square roots 
  // of all numbers greater than 100 in this list".
  var result = nums
    .filter(gt100pred)
    .map(Math.sqrt)
    .reduce(add, 0);
vs

  // think of it as pipelining from right to left.
  // get any number > 100, sqrt it, then accumulate it.
  var result = compose(accum, sqrt, gt100)(nums);
and if this was haskell:

  foldl (+) 0 . map sqrt . filter (> 100) $ [0..300]
randomguy7788··on Introducing Swift
guessing multiple return types are supported by just returning a tuple?
randomguy7788··on My thoughts on SF after living here for six months
just moved to SF from Ohio 3 months ago myself and i feel the exact same way as this guy...(its been more of a positive than a negative for me though)
randomguy7788··on AngularJS versus Ember
we're currently working on an angularjs application that has to deal with massive amounts of editable data on screen (think of purchase orders, ship notices, invoices that need to be sent out to walmart, kroger, target scale). although i have had minor issues here and there all you really need to know is what angular is currently monitoring (usually you expose the mutable parts of your models) and exposing that to the angular runtime while hiding what it doesn't need to know to get a performance boost. as for reusability angular services has been both easily and wonderful to use because of angularjs DI approach to everything.

this application also has to have a pluggable(200+ different company business/validation rules) rule engine, and being able to configure angularjs services through its providers interface has been very helpful with that problem.

we're not done yet so i can't give a final verdict but we've been overall pleased with the framework so far. i also agree with some of the sentiments in here where angularjs does not currently seem to have a culture of what is "idiomatic" angular which can be very detrimental in the short and long run.

one of the reasons we didn't go with ember is that the decision was made at the time where in they were making huge changes to ember.

randomguy7788··on Poll: What Language would/do you use to build a web application
at the top of my head reddit and youtube are written in python...
randomguy7788··on Fish shell 2.0
yes please! would love to have a setup like yours on windows
randomguy7788··on Java Infinite Streams
ahh, thanks for clearing that up and explaining the difference between the terminologies!
randomguy7788··on Java Infinite Streams
nullary i believe is a word(a function that does not take in any arguments) just like how a unary function takes in a single argument, a binary takes in 2 arguments, ternary takes in 3 arguments, variadic etc etc etc... my apologies if you were being sarcastic :P (i am not a native english speaker)
randomguy7788··on Journey From RequireJS to Browserify
you can actually use the same config file for the runtime and the build
randomguy7788··on Ask HN: Who is hiring? (January 2013)
would you guys hire a non ruby/rails developer(willing to learn of course, i can read/grok it but i've never written anything in it). my background and knowledge only applies to java/c#/python/coldfusion/javascript/xpath/xquery/xslt(i do know backbone/coffeescript which is listed on the job post). thanks!
randomguy7788··on What goes into Java 8?
default methods in interfaces will more or less mimic the same behavior.(sorta like mixins its not exactly the same but yeah lol)

    class SomeClass implements Linq {}

    public interface Linq { 
        public IEnumerable where(Func) { default implementation... }

        public IEnumerable orderBy(Func) { default implementation... }
    }
randomguy7788··on Jetstrap for Bootstrap
thanks for the reply, i have done something similar for a document editor/creator(EDI documents) but purely javascript. i might just try CS out now. cool stuff, hope to see more out from you guys.
randomguy7788··on Jetstrap for Bootstrap
have to say, this is an amazing design and editing tool they built. seems to be built on top of backbone?
randomguy7788··on SassMe: Visualize SASS color functions in real-time without compiling
a bit buggy on the key listeners, very evident they are listening to a key up event and replacing the text value so i cant use the left and right arrow keys <- -> to move on the text field
← PreviousPage 2 of 2