Roy Tang

Programmer, engineer, scientist, critic, gamer, dreamer, and kid-at-heart.

Blog Notes Photos Links Archives About

Notes: Microblog-like status updates. You can subscribe to an RSS feed of this list.

Dec 2017

  • @IFTTT feature request: I want to be able to send a DM whenever I have a new Twitter follower. Doesn’t currently seem to be a “That” to support this.

    Posted by under notes at
    Also on: twitter / 0
  • Decision making tip: always add an option to “be paralyzed by indecision”. Example: go out for a walk, stay home and get some more work done, or be paralyzed by indecision? Spoiler: I chose to be paralyzed by indecision and take a nap. (I did the additional work after the nap)

    Posted by under notes at
    Also on: twitter twitter / 0
  • This was intense. Also brings backs memories.

    Quoted onlxn's tweet:
    Rematching my dad in Scrabble. Have never beaten him. He was once top 30 in the American dictionary, but he is old now, and I NEED this
    Posted by under notes at
    Also on: twitter / 0
  • It’s nice that the missing girl was found before Christmas, but this might make people think that social media is a good approach for missing persons cases, but I don’t think it’s the sort of thing that can scale to handle more missing persons cases

    Not every case is going to go viral, since people only have so much attention to give to such cases before they get tired of their feeds being nothing but missing person reports.

    I don’t have an alternative. Obviously if a loved one is missing, you’ll try everything you can.

    I think in this particular case, they got lucky that she was found, and they had contacts who were able to help the call go viral.

  • Think about the amount of software and AI that goes into a droid in the Star Wars universe. A droid like BB-8 has to be able to:

    • navigate (walk/roll) over any terrain

    • interface with any other system

    • repair spacecraft like X-Wings

    • have natural language processing that can understand up to billions of galactic dialects

    • make judgments as to whether people are trustworthy

    • be able to communicate and express emotion using a series of tones and beeps (surprisingly for all of BB8 and R2D2’s sophistication, no one considered adding a voice synthesizer to these models - C3P0 shows their software is certainly capable of speaking)

    At this point, they’re more like Transformers who can’t speak very well (similar to Bumblebee), actual living machines (which raises the question of whether it’s ethical to be trading or selling them the way the jawas do).

    We should get a Star Wars movie where it’s explained how droids are actually created by the All-Spark (directed by Michael Bay? lol)

    Also, yes I did rewatch The Force Awakens yesterday

  • My layman’s understanding: TRAIN is neutral to okay for the middle class, who get to pay less taxes. Prices will go up, but since they have some discretionary funds to spend, they can simply manage their budget accordingly. TRAIN is bad for the poor, who weren’t paying taxes before anyway. They get no direct benefit, and yet have to suffer higher prices. They already have low discretionary funds to spend, so they have to stretch their budgets further. TRAIN is a bit bad for the upper class (those who pay the correct taxes at least), but they have wider discretionary budget to spend so they will just pay a little more (or more will be driven to evade taxes completely) TRAIN is good for the government, since it means more collections and less money spent on enforcement (since taxes on consumption are easier to collect/implement than personal income taxes) Lastly, TRAIN is very bad for ROHQ employees due to the presidential veto.

    Posted by under notes at
    Also on: facebook / 5
  • TRAIN is neutral to okay for the middle class, who get to pay less taxes. Prices will go up, but since they have some discretionary funds to spend, they can simply manage their budget accordingly.

    TRAIN is bad for the poor, who weren’t paying taxes before anyway. They get no direct benefit, and yet have to suffer higher prices. They already have low discretionary funds to spend, so they have to stretch their budgets further.

    TRAIN is a bit bad for the upper class (those who pay the correct taxes at least), but they have wider discretionary budget to spend so they will just pay a little more (or more will be driven to evade taxes completely)

    TRAIN is good for the government, since it means more collections and less money spent on enforcement (since taxes on consumption are easier to collect/implement than personal income taxes)

    Lastly, TRAIN is very bad for ROHQ employees due to the presidential veto.

    Posted by under notes at #Philippines
    Also on: reddit / 0
  • Repost from sehurlburt:

    My therapist gave me homework, now it’s your homework too:

    Accept negative feelings without beating yourself up or wishing they would go away

    If we fight a negative feeling, it tends to last longer or get repressed & bubble up

    It’s actually healthy to not be happy all the time

    Posted by under notes at
    Also on: twitter / 0
  • How to specify that a column in the schema should be nullable?

    I tried adding a nullable attribute:

    var myFirstTDE = xdmp.toJSON(
      {
        "template": {
          "context": "/match",
          "collections": ["source1"],
          "rows": [
            {
              "schemaName": "soccer",
              "viewName": "matches",
              "columns": [
                {
                  "name": "id",
                  "scalarType": "long",
                  "val": "id",
                  "nullable": 0
                },
                {
                  "name": "document",
                  "scalarType": "string",
                  "val": "docUri"
                },
                {
                  "name": "date",
                  "scalarType": "date",
                  "val": "match-date"
                },
                {
                  "name": "league",
                  "scalarType": "string",
                  "val": "league"
                }
              ]
            }
          ]
        }
      }
    );
    
    tde.validate( 
      [myFirstTDE]
    );
    

    But this gave me a template error:

    "message": "TDE-INVALIDTEMPLATENODE: Invalid extraction template node: fn:doc('')/template/array-node('rows')/object-node()/array-node('columns')/object-node()[1]/number-node('nullable')"
    

    For a template defined using XQuery, adding nullable to the column works:

    <column>
      <name>ISSN</name>
      <scalar-type>string</scalar-type>
      <val>Journal/ISSN</val>
      <nullable>true</nullable>
    </column>
    

    How to do the same thing using JS/Json?

  • 1-0 at #gpsing. my pool is pretty sweet~

    [11:40] 2-0 matches 4-1 games #gpsing #mtg

    [12:31] 3-0 games, 6-1 matches. feels good to have a good gp start again #gpsing #mtg

    [13:32] first loss 3-1 matches 6-3 games #gpsing #mtg

    [14:55] 4-1 matches 8-4 games #gpsing #mtg

    [15:49] 4-2 matches 8-6 games noooo #mtg #gpsing

    [16:45] 4-3 matches 9-8 games no more losses to give )= #gpsing #mtg

    [17:50] 4-4 matches 9-10 games Deadzzzz #gpsing #mtg at least i dont have to be eaely tmr

  • This has all the markngs of someone who discovered clipart for the first time in office 2000

    Quoted gmanews's tweet:
    LOOK: Ex-TESDA chief Augusto Syjuco Jr. used clip arts in his complaint-affidavit vs former President Noynoy Aquino at the Ombudsman. | via @tj_roxas
    This has all the markngs of someone who discovered clipart for the first time in office 2000
Quoted gmanews's tweet:   LOOK: Ex-TESDA chief Augusto Syjuco Jr. used clip arts in his complaint-affidavit vs former President Noynoy Aquino at the Ombudsman. | via @tj_roxas
    This has all the markngs of someone who discovered clipart for the first time in office 2000
Quoted gmanews's tweet:   LOOK: Ex-TESDA chief Augusto Syjuco Jr. used clip arts in his complaint-affidavit vs former President Noynoy Aquino at the Ombudsman. | via @tj_roxas
    This has all the markngs of someone who discovered clipart for the first time in office 2000
Quoted gmanews's tweet:   LOOK: Ex-TESDA chief Augusto Syjuco Jr. used clip arts in his complaint-affidavit vs former President Noynoy Aquino at the Ombudsman. | via @tj_roxas
    Posted by under notes at
    Also on: twitter / 0
  • THE LAST JEDI Spoiler-free (promise) review:

    • great movie, but there was this weird draggy part around the middle that they maybe could have done away with
    • my brother whom I watched with says he thinks it was the best Star Wars movie ever. I’m not sure
    • Adam Driver needs to either speak up or work around his accent a bit
    • because we didn’t plan this movie outing so well, we ended up with terrible seats (i.e. very first row, slightly off-center) in the Imax theater. I think the Imax was fine, but being so up close made for some weird angles sometimes and sometimes the 3d didn’t work so well from where we were seated. And medyo nakakapagod sa mata. Never again!
    • walang post-credit scene lol
  • Repost from dogfather:

    I’d like to personally congratulate each and every individual involved

    I’d like to personally congratulate each and every individual involved
    I’d like to personally congratulate each and every individual involved
    I’d like to personally congratulate each and every individual involved
    I’d like to personally congratulate each and every individual involved
    Posted by under notes at
    Also on: twitter / 0
  • Repost from zaoyang:

    1/ There’s a concept known as financial compounding, but most people don’t know about intellectual compounding. Buffett and Munger employed this to great effect and to accumulate mental models such that they can make large decisions quickly. Intuition is simply reading a lot.

    Posted by under notes at
    Also on: twitter / 0
  • For some reason I rewatched the ending of Return of the King today. If Game of Thrones doesn’t have an ending as epic and as conclusive as this, it would be such a big waste

    Posted by under notes at
    Also on: facebook / 3