HNHacker News
TopNewBestAskShowJobs

lectrick

1,393 karma · joined August 13, 2010

ruby/rails coder (and recent dabbler in clojure, haskell and Elixir), gamer, philosopher, technologist, sailor, swimmer, biker, music lover, partier, hourglass-figure adorer, and fan of Bitcoin, Apple, Tesla, open-source, and startups. I lean liberal and libertarian, although I love debating anything controversial.

As of today (2/3/2016), this account is now 2000 days old with 1369 karma. I've decided to celebrate by announcing a switch to a (for better or worse) far-less-anonymous account, "pmarreck".

submissionscomments
lectrick··on Magic+
I'm a fairly highly-paid web dev and I don't have a curated personal website. Shocking, I know. I'd just rather spend time on other things, like paying work
lectrick··on Magic+
For what it's worth, I've used the service twice and it worked out great. People tend to complain more than praise (there must be some psychological concept to explain this...), so that's my two cents.
lectrick··on Kodak resurrects Super 8
Is there an actual double-blind study that proves that digital still cannot beat analog in certain realms? Because I'm having a hard time believing that this "analogue renaissance" isn't just pure marketing hokum.
lectrick··on Elixir 1.2.0 Released
Yes to all of the above :)
lectrick··on Elixir 1.2.0 Released
Just want to chime in reiterating everyone's thoughts already here that this language is fun, interesting, and worth your time investment to investigate.

The biggest hurdles I had coming from OO Ruby were 1) how to handle state, since you no longer can just hang information off any arbitrary object attributes, 2) pattern matching (but now that I grok it, I love it, it's so useful and leads to more concise code), 3) lack of inheritance (although oddly, I don't seem to miss it, it just leads to a somewhat different code design), 4) OTP semantics (which after you mount the learning curve, make a lot of sense from a resiliency standpoint).

There are a number of neat little details not yet mentioned or emphasized here such as full Unicode support, full-fledged macros that give you full AST access (in a non-homoiconic language, that is a rarity!), custom sigils (http://elixir-lang.org/getting-started/sigils.html), the ability to easily call into any Erlang library, the fantastic :observer.start() utility for visually observing tons of details about a running pid hierarchy, etc.

One possible hurdle unique to languages that feature message passing between independent processes (pids or process id's) as a core feature is that once you have a pid hierarchy, it seems to me that inevitably, one of them will get a backlog of messages requiring you to either apply back-pressure techniques (slowing down upstream synchronous messaging by slowing down replies, basically) or pursue some other strategy (code refactoring etc.) when messages start to get discarded under load due to overflowing the pid inbox.

lectrick··on Elixir 1.2.0 Released
It's a shorthand. Once you get tired of the long form, the shorthand will be appealing :P
lectrick··on Elixir 1.2.0 Released
Wouldn't it be "fun (a |> b) = b a"? (call b on result of argument a)?
lectrick··on The Website Obesity Crisis
The simple solution seems to be to add the absolute value of the code subtractions to the value of the code additions.

This would weight code refactors with the weight they deserve...

lectrick··on Internet Freedom Is Actively Dissolving in America
It may not be, but are there any widespread ones?
lectrick··on Apple's Tim Cook defends encryption. When will other tech CEOs do so?
And Martin Fowler has one of the best posts I've ever read on why privacy is important for a democracy: http://martinfowler.com/articles/bothersome-privacy.html
lectrick··on Internet Freedom Is Actively Dissolving in America
Can we get around provider monopoly fees with some sort of new wireless option? perhaps a new cell provider that isn't actually a cell provider, it's just a wireless data pipe provider that calls itself a cell provider to fit within the existing FCC regulatory scheme (and to easily switch to it from existing cellphones?) Could that be a startup?
lectrick··on When a Unicorn Startup Stumbles, Its Employees Get Hurt
This sounds tautological...
lectrick··on LÖVE 0.10 released with iOS and Android support
Yeah, yeah. Read this, I responded: https://news.ycombinator.com/item?id=10783873
lectrick··on LÖVE 0.10 released with iOS and Android support
You don't understand comments like this because you probably don't speak from years (20+) of programming experience in OO languages, like I do, and because it is hard to show people certain better ways of doing things that unfortunately requires years of experience beating your head against the wall in other ways to really see it. But don't take my word for it, here is John Carmack (hardcore C++ developer) on the topic, from this link: http://gamasutra.com/view/news/169296/Indepth_Functional_pro...

"My pragmatic summary: A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states their code may execute in. (Emphasis mine. That alone explains most of the bugs I've seen.) In a multithreaded environment, the lack of understanding and the resulting problems are greatly amplified, almost to the point of panic if you are paying attention. Programming in a functional style makes the state presented to your code explicit, which makes it much easier to reason about, and, in a completely pure system, makes thread race conditions impossible...

"No matter what language you work in, programming in a functional style provides benefits. You should do it whenever it is convenient, and you should think hard about the decision when it isn't convenient."

This is a man who has coded slightly longer than I have, and IMHO he is correct on all these points.

I merely believe he didn't go far enough (for example, immutable "variables", which are not available in OO languages without hairy workarounds, ENSURE that the state your code "sees" is not tampered with "from the outside," further reducing bugs), but statements like this are why I take the viewpoint I do.

Take the amount of time you debug as a percentage of your total programming time (and hell, we all enjoy debugging to a degree, don't we? But what's debugging, really? All it is, is trying to discover a state that wasn't conceived of when the code was designed, no? That's the whole point of your stack trace, right?). Now, chop that time in half. Would you want this? Who wouldn't?

Yes, FP is not appropriate for all realms where code lives. But it should most certainly fill all the spaces it currently does not, where its appropriateness is not out of the question.

I would also strongly recommend the "Are We There Yet?" talk by Rich Hickey http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hic... which pretty much destroys mutability as a language-level trait, pretty much rendering it the mother of all bugs (literally).

Again, don't take my word for it- here is MIT's core CS curriculum on mutability's dangers: http://web.mit.edu/6.005/www/fa15/classes/09-immutability/

Have I made a strong argument yet, now?

This is why I get upset whenever a new language comes out that does not feature FP/immutable paradigms. If you're new, you SHOULD be using these, otherwise you're just perpetuating more man-years of debugging hell for people. I am tired of watching new programmers make the same mistakes over and over and over again.

The very length of this comment alone indicates how hard it is to communicate this AND why it sounds like preaching/proselytizing/trolling.

lectrick··on Good Sleep, Good Learning (2012)
As a fairly serious sufferer of sleep apnea, this will definitely be a good read
lectrick··on As Downloads Take Over, a Turning Point for the Video Game Industry
I haven't bought physical media of any sort in years, but I also live in an area where I have FIOS and I can afford large hard drives/SSD's.

Those are really the limiting factors, I think.

lectrick··on As Downloads Take Over, a Turning Point for the Video Game Industry
http://www.gog.com/
lectrick··on Kim Dotcom loses extradition case
My only rational objection to this is that I don't think we've figured out how to predict actual losses to piracy.

In other words, it is extremely naive (and quite unfair to infringers) to assume that EVERY pirated copy of something is a lost sale. The folks I've known who pirate are more like... data hoarders than payment evaders... Oftentimes they never even bothered consuming the media, it was all about collecting things first for them, and they would have never paid for said media to begin with, so it really becomes nebulous to start swinging around accusations of theft, because... what was "stolen"? Some unknown percentage of the copies surely ARE lost sales, but how can we determine that percentage? Would it vary based on attributes of the media?

In any event, I think the entire state of China would probably be the worst copyright offender, if they're looking for someone to go after...

lectrick··on Detect and disconnect WiFi cameras
The US is a fucked up place because they want to make sure a babysitter doesn't shake their baby to death or a housecleaner doesn't break or pocket something without admitting it? Hyperbole much?
lectrick··on -2000 Lines of Code
While a fair salary is ideal for all parties, optimizing for job satisfaction would be a wiser decision than optimizing for salary amount. Scoring a high salary may merely mean the new hire will be one of the first to be cut from the crew should the firm hit choppy waters... an outcome that recruiters do not need to care about.
lectrick··on Why I no longer use MVC frameworks
See: why I will vehemently avoid all future Drupal projects (1 was enough)
lectrick··on -2000 Lines of Code
> recruiters

Dude, that right there is the problem. They make a commission off your starting salary, so OF COURSE their primary concern is your past and future financials.

This is why I hate recruiters.

lectrick··on Stop using gzip
Doesn't bzip2 have a concurrent mode that those others don't?
lectrick··on Show HN: Jukedeck – create unique, royalty-free music for your videos using A.I.
Does anyone (perhaps a music theorist) know what rules determine what notes sound well following each other/together?

I find an interesting parallel between 1/2/4/8 repeating beats/parts in songs, and binary...

lectrick··on Metabase: Why we picked Clojure
I wouldn't call a language that encourages writing spaghetti code and creating dependency hell to be "easy to work with", much less one which doesn't even pass its own test suite, which implies that even if you do everything 100% correctly, the spec itself is faulty, so you WILL have non-deterministic "3AM phone call, up till 3PM fixing" type bugs... No thanks
lectrick··on Metabase: Why we picked Clojure
Why wasn't Erlang/Elixir even considered? It checks off all their initial set of requirements
lectrick··on Metabase: Why we picked Clojure
Yes, Java is a mature language.

But any perusal of rosettacode.org is fairly indicative that other languages, while less mature, have adopted some good ideas.

For example, here's Quicksort in both Java and Elixir:

    public static <E extends Comparable<? super E>> List<E> quickSort(List<E> arr) {
    if (!arr.isEmpty()) {
        E pivot = arr.get(0); //This pivot can change to get faster results
     
     
        List<E> less = new LinkedList<E>();
        List<E> pivotList = new LinkedList<E>();
        List<E> more = new LinkedList<E>();
     
        // Partition
        for (E i: arr) {
            if (i.compareTo(pivot) < 0)
                less.add(i);
            else if (i.compareTo(pivot) > 0)
                more.add(i);
            else
                pivotList.add(i);
        }
     
        // Recursively sort sublists
        less = quickSort(less);
        more = quickSort(more);
     
        // Concatenate results
        less.addAll(pivotList);
        less.addAll(more);
        return less;
     }
    return arr;
     
    }
now Elixir:

    defmodule QuickSort do
      def qsort([]) do
        []
      end
      def qsort([pivot | rest]) do
        { left, right } = Enum.partition(rest, fn(x) -> x < pivot end)
        qsort(left) ++ [pivot] ++ qsort(right)
      end
    end
The advantage here is NOT just an "economy of typing."
lectrick··on How to be like Steve Ballmer
I would agree. I said it in direct response to someone pointing out his IQ of 150. I was making a point... Or would you say that it's OK to talk about someone ELSE'S IQ?

I also suspect that people would rather not know your phallus size or six+ figure income. All these things are left to discover as a side effect of normal interactions ;)

lectrick··on Half a year later, the Apple Watch feels like a stalled platform
Wow. I sincerely hope they're working on that! Seems like a silly distinction to make
lectrick··on How to be like Steve Ballmer
http://money.howstuffworks.com/second-career-ideas/10-reason...

http://www.forbes.com/sites/jacquelynsmith/2013/03/08/the-pr...

I think this is the actual study?

http://www.nerisearch.com/neri-newsletter-career-development...

Basically, a skilled employee gets the most out of a job in the first 3 years. And the new company gets the most out of the employee in the first 3 years (or so). After that, in order to restart the learning experience for both parties, a "change of venue" is necessary.

← PreviousPage 3 of 32Next →