HNHacker News
TopNewBestAskShowJobs

tokipin

1,062 karma · joined September 21, 2007

submissionscomments
tokipin··on Having a Servant Is Not a Right
i don't understand. for years my mom worked at her job (12hrs night shift, hard labor, without most of her fingers on one hand which she lost in an accident), cooked and cleaned, and took care of her young children
tokipin··on Having a Servant Is Not a Right
i don't see the problem. crime -> prison. it seems classist to me to not throw them all into the same place
tokipin··on DNA seen through the eyes of a coder
As I said, it depends on what you consider part of the system. And over large time scales the randomness 'blurs' such that other factors become more significant (e.g., your DNA is not a random sequence of nucleotides).

Here is a question. Do you agree or disagree that survival/death decides which of nature's experiments work?

tokipin··on DNA seen through the eyes of a coder
Right, but which balls make it through and which don't isn't random -- that's decided by the holes. It is tricky though. I guess it depends on what you consider to be within the system and outside of it. In this example you have randomly generated the holes, whereas I don't think there's anything random about what it means for something to be dead or alive.

For example, we might say that children born with fatal/harmful defects are "unlucky," which is true, but this is a short-term perspective. Over larger timescales, we can say (poetically) that the rarity of these particular kinds of DNA configurations is a "design choice" rendered by the laws of nature. The larger the time scale, the less meaningful individual "chance" things are and the more "systemic" factors come into play. This is probably an instance of "the law of large numbers".

--

Another important thing to point out is that the environment is dynamic and species interact with eachother in all sorts of ways. The concept of a single species evolving in vacuo is very dry, but the reality is different. Throw a few different species into the mix and suddenly you have an explosion in the kinds of behavior and phenomena you will find. I think intelligence is one of those phenomena.

In other words, the natural world has all the depth and richness necessary to account for the "enlightened" properties that you attribute to life. In fact, if I had to pick one gripe I have with religion, it would be that it blinds people as to the raw amazingness and beauty that can be found in the natural world.

tokipin··on DNA seen through the eyes of a coder
when it comes to evolution, people get stuck on the word "chance". evolution uses chance as a search mechanism. it is death which "chooses" in the design-sounding way you mention. it is because evolution is 'blind' as to what will and won't be deathed that randomness is a good search algorithm.

i.e. the idea that life is due to nothing more than chance is a strawman

tokipin··on First water plume seen firing from Jupiter moon Europa
it's my understanding that the gravitational "torsion" from Jupiter alone is enough to do all sorts of things (like keep a planet thermally active)
tokipin··on There’s a 1,200-year-old Phone in the Smithsonian Collections
they probably recognized sound as just vibrations in materials. it's a pretty straightforward observation, in my opinion. actually thinking of using a string in that way is the "outside the box" part

i think generally ancient people don't get the credit they deserve. they weren't dummies. even now-silly-sounding ideas (e.g. geocentric model) had logic to them (e.g. stars had no apparent parallax)

tokipin··on The Day Mandela Was Arrested, With A Little Help From the CIA
best historical overview on Mandela for those of us who have only heard the word 'apartheid' but didn't know what it refered to (video): http://on.msnbc.com/1cpfpAr
tokipin··on List of cognitive biases
i heard about a book that discusses the various ways in which our brains fool ourselves. i've never actually seen it though. anyone have a clue what book it might be?
tokipin··on NSA tracking cellphone locations worldwide, Snowden documents show
i think @daveid's point is common, and i haven't actually read anything by Brin on the matter so i don't know what counterpoint he might make. maybe tracking itself would be tracked? maybe person X is watching you watch person Y? i think in general, however, with that much information, people will simply not care what everyone else is doing. part of what makes "private" information interesting is its rarity.

and i don't think anyone claims it wouldn't be a different culture, or that we should throw away core privacy like being able to sleep in our own beds without someone watching

tokipin··on NSA tracking cellphone locations worldwide, Snowden documents show
i think if this kind of thing is inevitable, then it should be the case that this kind of information should be completely public to all, not just to governments. similar to what David Brin argues (http://en.wikipedia.org/wiki/The_Transparent_Society)
tokipin··on Satoshi Nakamoto is probably Nick Szabo?
personally, this kind of thing seems obvious. i would be surprised if the person who wrote the paper didn't take cute things like this into account
tokipin··on Wolfram Language
i think i answered that question already, which is yes, but technically no. here is a rough Javascript version of the original example:

    makeObj[] := Module[{obj, i = 0},
     obj["inc"] := ++i;
     obj["dec"] := --i;
     obj[] := i;
     obj];


    makeObj = function() {
        var i = 0;
        
        var obj = function(in) {
            switch(in) {
                case "inc" : return ++i;
                case "dec" : return --i;
                case undefined: return i;
            };
        };

        return obj;
    };
tokipin··on Wolfram Language
if you're asking whether functions in Mathematica are first-class values, then yes. everything in Mathematica is first-class. functions are just symbols that have associated pattern-matching rules in the form f[___], otherwise they are the same as any other symbol.

you can do, for example:

    RandomChoice[{Plus, Times}][2, 3]
where the result will be either 5 or 6. in more explicit form:

    If[RandomReal[] < .5, Plus, Times][2, 3]
example of an "anonymous" function:

    (#1^2 + #2^2 &)[2, 3]
square of all numbers from 1 to 100:

    #^2 & /@ Range[100]
simpler form:

    Range[100]^2
all pairwise products of the first seven prime numbers (among themselves):

    Times @@@ Tuples[Prime /@ Range[7], 2]
etc.
tokipin··on Wolfram Language
yes, using Module primarily. here's one way you might make a basic object-like thing (though i would generally advise against OO stuff in Mathematica. part of the power of the language is due to how it keeps everything straightforwardly manipulable):

    makeObj[] := Module[{obj, i = 0},
     obj["inc"] := ++i;
     obj["dec"] := --i;
     obj[] := i;
     obj];
precisely speaking, however, Module simply renames symbols to make them unique. the effect is the same as a closure, but it isn't a "pure" closure like you would find in other functional languages, because you can do for example Names["i*"] and find that the supposedly-private 'i' has the name i$2656 and you can alter its value that way

another point is that you could, if you wanted to, create your own version of Module and other scoping stuff, since it's a matter of making a macro by using the HoldAll atttribute [1] and using 'ReplaceAll' to replace specific variables or arbitrary structures

[1] http://reference.wolfram.com/mathematica/ref/HoldAll.html

tokipin··on Wolfram Language
right, but in those cases you can just go to the documentation, which is pretty clear in the various ways you can use functions. for example: https://reference.wolfram.com/language/ref/Map.html
tokipin··on Wolfram Language
i think you're right that the "essense" is not lisp. Mathematica is more abstract than lisp, and it has lisp-like features built on top of it. that said, the analogy can be useful because things like "macros" are completely natural to the language:

    In[1]:= FullForm[a + b]
    Out[1]= Plus[a, b]

    In[2]:= a + b /. Plus -> Times
    Out[2]= a b
tokipin··on Wolfram Language
you can do

    SetOptions[EvaluationNotebook[], DockedCells :> {}]
and there are options to remove the window frame, etc. but i think if you are using certain licenses the toolbar may not disappear. and the main toolbar never disappears, to my dismay
tokipin··on Wolfram Language
part of the problem Mathematica has is that people assume it's just for math, which isn't the case. it's a very general system. this renaming, while utterly dorky and aesthetically hamhanded, will at least help clear that misunderstanding
tokipin··on Wolfram Language
i think that's a reference to the fact that Mathematica uses M-expressions and operator precedence. it doesn't look like lisp, but if you FullForm an expression you will see that it's all just M-expressions.

that said, i think it is lisp-like as a design choice. the Mathematica language itself is more raw than even lisp -- you can take the language in different design directions. Wolfram chose to include lisp aspects

tokipin··on Wolfram Language
the spec of the underlying language would be very simple. it's basically just repeated pattern matching. beyond that, knowing where to draw the line would be a bit weird. for example, does the function TextRecognize [1] need to be specified?

and by the way, Mathematica's documentation is enormous so i don't think a single spec would be necessary. maybe a few functions here or there would need some clarification in certain edge cases, but those would be higher-level functions like Plot

[1] http://reference.wolfram.com/mathematica/ref/TextRecognize.h...

tokipin··on Wolfram Language
what's wrong with just using

    obj["a"] = 1;
    obj["b"] = 2;
    Print[obj["a"]]
or

    obj = { "a" -> 1, "b" -> 2 };
    Print["a" /. obj]

?
tokipin··on Mathematica on Raspberry Pi for free
Mathematica can deal with arbitrary-precision numbers (or better said, Mathematica doesn't blindly use whatever underlying number format is present, it has precise controls for this sort of thing http://reference.wolfram.com/mathematica/tutorial/ArbitraryP...)
tokipin··on Mathematica on Raspberry Pi for free
the MATLAB language is pretty poorly designed, in my opinion. take for example the use of abbreviated function names.

everything in Mathematica (including graphics and UI) is described using the structure of the Mathematica language itself. the whole system is malleable/composable to a degree that few languages approach

for example:

    Nest[Button, "hello", 5]
will create a nesting of 5 buttons. that's the same Nest you would use when nesting a function:

    Nest[# + 1 &, 2, 5]
And neither of these are hacks, they both work under the same exact rules, because:

    Nest[whatever, a, 5]
gives

    whatever[whatever[whatever[whatever[whatever[a]]]]]
it's the frontend that chooses to interpret certain symbols (such as 'Button') in particular ways.
tokipin··on Why I use a 20-year-old IBM Model M keyboard
i don't see how you can avoid that long-term without a split/curved keyboard. maybe if you deliberately angle your hands, but then the keys are weird to hit
tokipin··on Nonplussed
probably they hire only one hemisphere of the brain
tokipin··on HealthCare.gov’s glitches prompt Obama to call in expert troubleshooters
i thought healthcare.gov is for those states which opted out of the medicaid expansion (i'm not sure about this). it may have been the case that the number which have opted out was unexpected by an order of magnitude. i don't know if i'd buy this excuse though
tokipin··on What is your most productive shortcut with Vim?
VsVim:

http://visualstudiogallery.msdn.microsoft.com/59ca71b3-a4a3-...

tokipin··on Solving a Combination Lock Puzzle with JuMP and Julia
not quite sure i understand the problem, but here's one Mathematica approach:

  m = {{39, 90, 75, 88, 15, 57},
     {9, 2, 58, 68, 48, 64},
     {29, 55, 16, 67, 8, 91},
     {40, 54, 66, 22, 32, 25},
     {49, 1, 17, 41, 14, 30},
     {44, 63, 10, 83, 46, 3}};

  Select[
   Extract[m, #] & /@ Transpose[{Range[6], #}] & /@ Tuples[Range[6], 6],
   Total[#] == 419 &]
tokipin··on Robot Turtles Kickstarter midmortem at $250k
interesting. i have an idea for a game that appears to be roughly in the same spirit, though in my case the game is intended to be 'a puzzle game' that in a sense just happens to involve basic programming. there are non-trivial and interesting ways to get across various programming things... even very arcane programming things
← PreviousPage 6 of 21Next →