• Mariano Guerra

    Mariano Guerra

    1 year ago
    Still thinking about the "present - future of coding spectrum", is building tools to make it easier to build docs/pages like this something that falls on the FoC spectrum? https://stripe.com/docs/checkout/integration-builder
    Mariano Guerra
    j
    +3
    8 replies
    Copy to Clipboard
  • Prathyush

    Prathyush

    1 year ago
    I don’t really know if this is question that belongs in FoC, so please feel free to moderate and remove this if it doesn’t fit the ethos. Here is the scenario: I am trying to gather resources that talk about hypergraphs/intertwingled style resources for a tweet thread I’m running: https://twitter.com/prathyvsh/status/1330063701802700800 Can you guys think of any examples in computation or in any other domains that talk about this idea of having a lot of recursive/reflexive structures? These are the ones I could find so far:
    Prathyush
    Kartik Agaram
    +3
    14 replies
    Copy to Clipboard
  • Chris Martens (they/them)

    Chris Martens (they/them)

    1 year ago
    message has been deleted
    Chris Martens (they/them)
    1 replies
    Copy to Clipboard
  • Breck Yunits

    Breck Yunits

    1 year ago
    Anyone have a good algorithms for minimum 2-dimensional diff? Input is 2 trimmed and clean CSVs (files don’t end in \n; lines don’t end in ,; no quotes or escaping). (one note: There often is a varying number of columns in rows) Example, given the 2 inputs below, write efficient diff and patch methods and a nice diff encoding.
    rank,color
    1,blue
    2,red
    3,green 
    
    rank,color
    1,blue
    2,orange
    3,purple
    A nice diff format would also be helpful. Can’t seem to find much on this yet, but there must be some stuff out there in the Spreadsheet/Finance world.
    Breck Yunits
    e
    4 replies
    Copy to Clipboard
  • Kartik Agaram

    Kartik Agaram

    1 year ago
    What should the right notation be for the rotate (circular shift) operation? This seems like an important question since the operation is common in cryptography, and since the ARM instruction set goes to great lengths to allow any instruction to perform it. But apparently there's never been a good notation for it: https://stackoverflow.com/questions/32785998/symbol-for-bitwise-circular-shifts Desirable properties:* Stop thinking in terms of shift. Every rotation left can also be viewed as a rotation right. It feels most natural to think of rotate(X, n) to mean "X rotated to start at bit n." * No distracting ambiguous usage anywhere. Luckily we've already discarded '<<<' above.
    <>
    has distracting connotations of inequality. Maybe
    ><
    ?* Ideally just ascii characters. Though I suppose we could use one of the circular unicode arrows at a pinch.
    Kartik Agaram
    a
    +5
    17 replies
    Copy to Clipboard
  • Kartik Agaram

    Kartik Agaram

    1 year ago
    An old thread I wish I could link to:
    Consider the powerful, time-honored environment that gives us many “small programs, each doing one thing well”, the Unix shell. There is a
    cut
    command, a
    sort
    command, and many more. A versatile collection of blocks that I can snap together in different ways (yay pipes!). There isn’t much duplication of commands and the environment seems to have nice composition properties.
    But it only goes so far.
    If I write a program in Unix using Java or Python, can I reuse the Unix
    sort
    to sort an array of items inside my program? Of course not, what an improper question! The decent choice is to reimplement sorting in my program (or use the standard library where someone else has already re-implemented it).
    The computer already knows how to sort things, why do I need to tell it again?
    -- @shalabh (https://shalabh.com/programmable-systems/on-composition.html) From the inventor of shells:
    I felt that commands should be usable as library subroutines, or vice versa. This stemmed from my practice of writing CTSS [OS] commands in MAD, a simplified Algol-like language. It was much faster and the code was more maintainable than IBM 7094 assembly code. Since I needed MAD-friendly subroutine calls to access CTSS primitives, I wrote in assembly code a battery of interface subroutines, which very often mimicked CTSS basic command functions. I felt it was an awkward duplication of effort. However, I did not go further in the context of CTSS.
    -- Louis Pouzin (https://multicians.org/shell.html)
    Kartik Agaram
    e
    +9
    44 replies
    Copy to Clipboard
  • Breck Yunits

    Breck Yunits

    1 year ago
    Are there languages where files are functions and imports are parameters? I am annoyed with file path issues when building typescript. When I try to build the same exact files with tsc, webpack, jest, or yarn, I get 4 different results. Are there any languages out there where a file is a function that takes parameters which are the paths to its imports? Where you don't include a file, but call it? Built-in dependency injection at the build level? ie:
    // main.foo
    printLib = printLib ?? "a_default_value_for_print.foo_import"
    printLib.print "hello world"
    // project.build
    main.foo(printLib = "print.foo")
    Breck Yunits
    shalabh
    4 replies
    Copy to Clipboard
  • Tyler Adams

    Tyler Adams

    1 year ago
    I've been thinking a lot about testing methodology recently because I'm writing a piece on my blog about it, and I realized this community must have a ton of things say about it, especially theorizing the fundamentals. I care about this a lot because in my experience a lot if not most time is spent testing, and doing testing better is a serious productivity improvement. For example, when should tests be deterministic vs random? When should one use unit tests vs integration tests (I suspect it's much deeper than "lots of unit, few integration")
    Tyler Adams
    g
    +4
    9 replies
    Copy to Clipboard
  • Nick Smith

    Nick Smith

    1 year ago
    Have people seen many programming languages where Sets are represented as functions from X → Bool and (more importantly) Lists are represented as functions from Int → X? And I mean they're truly just functions: all of the operations upon them are just operations upon functions, and thus they might be repurposed for other uses as well. Javascript and Lua kind of do this, except their philosophy is more like "all collections are just dictionaries", where a dictionary is a heavily-restricted class of function. This approach ("all collections are just functions") seems like a versatile foundation (especially in the context of the semantics of the programming language I'm working on), so I've been digging into the ramifications of it lately. My biggest challenge so far is figuring out how to identify for which functions operations like set union and intersection are computable. Depending on how the function is constructed/defined, it seems like it could be quite hard to figure out a static "safety check". I want these operations to be well-defined even on recursively-defined functions, so it's not as simple as "ensure the function definition is just a finite list of cases" (i.e, a dictionary). This doesn't seem unreasonable: Datalog works this way. Datalog predicates are recursively-defined functions from X → Bool (i.e. sets) that obey certain constraints so that queries upon them are answerable.
    Nick Smith
    e
    +4
    16 replies
    Copy to Clipboard
  • e

    Emmanuel Oga

    1 year ago
    thinking about better auto completion (a wizard style of auto completion instead of the typical list of options)
    e
    g
    +2
    18 replies
    Copy to Clipboard