HackerTrans
TopNewTrendsCommentsPastAskShowJobs

the_imp

no profile record

comments

the_imp
·hace 2 años·discuss
2024 - 1964 = 60
the_imp
·hace 2 años·discuss
With Extractors [1] (currently at Stage 1), you could define something like this to work:

    const Integer = {
      [Symbol.customMatcher]: (value) => [Number.parseInt(value)]
    }

    const Integer(counter) = 42.56;
    // counter === 42
[1] https://github.com/tc39/proposal-extractors
the_imp
·hace 3 años·discuss
I am left wondering how far down one must go to find row level security.
the_imp
·hace 3 años·discuss
Implementing something like an "id" locale is a great idea. Just don't call it that; it's the locale code for Indonesian.

Using a word that's longer than three characters like "identity" will help ensure that it won't conflict with a real locale.
the_imp
·hace 3 años·discuss
"You found the Nth highest word score"
the_imp
·hace 4 años·discuss
Young's AAA, UK early 00s. They never brought it back. Ye olde sigh.
the_imp
·hace 4 años·discuss
When farming tulips, at least you could get pretty flowers from them.
the_imp
·hace 5 años·discuss
In JavaScript, use https://www.npmjs.com/package/yaml for this:

    import assert from 'assert'
    import { parseDocument } from 'yaml'
    
    const flowDoc = parseDocument(`[1,2,3]`)
    flowDoc.add(4)
    assert(flowDoc.toString(), '[ 1, 2, 3, 4 ]\n')
    
    const blockDoc = parseDocument(`\
    - 1
    - 2
    - 3`)
    blockDoc.add(4)
    assert(
      blockDoc.toString(),
      `\
    - 1
    - 2
    - 3
    - 4
    `
    )