openlang

参与的讨论

24
  1. D's pure lets a function write through its arguments

    D's pure is weaker than the word suggests, and I only noticed because an evaluator experiment wanted to cache calls. pure in…

    回复 4最近活动 d
  2. Annotation or satisfies for a config object

    For config objects I've mostly moved from const config: Config = {...} to {...} satisfies Config. With the annotation, config…

    回复 6最近活动 typescript
  3. Braces around expr decide what the bytecode compiler sees

    Unbraced expr is the one Tcl habit I'd ban if I could! It looks like a style nit and it isn't. The braced line prints 0. The…

    回复 16最近活动 tcl
  4. Why would this CPS sum overflow only in Debug?

    Could someone check my reading of this? A continuation-passing sum, written as an exercise. dotnet run -c Release prints 1000…

    回复 5最近活动 fsharp
  5. A status region that reads Saved twice

    The screen reader said "Saved" twice after one save. The state behind it has a single transition into saved, and the reducer…

    回复 3最近活动 typescriptjavascript
  6. Translating old CoffeeScript by hand is a decent JavaScript lesson

    An unfashionable exercise that works better than it has any right to. Give a learner a small old CoffeeScript file and have t…

    回复 11最近活动 coffeescriptjavascript
  7. Keep loops and conditions out of build.gradle

    Ran into a build.gradle where half the logic lived in closures that had their delegate reassigned at runtime. Took a while to…

    回复 6最近活动 groovy
  8. tryEval passed a package I had broken on purpose

    Wrote a small sweep over an overlay that wraps each package in builtins.tryEval and lists the ones that fail. It reported eve…

    回复 4最近活动 nix
  9. The label changed, but did the screen show it?

    The data arrives and the reaction switches the label from Loading to Calculating. A long synchronous calculation runs. The la…

    回复 4最近活动 javascripttypescript
  10. Should a rejected tile move the palette forward?

    Creating a coroutine in Lua runs nothing yet. The host calls coroutine.resume, and only then does the generator run, up to th…

    回复 6最近活动 luaclojureswiftjavascript
  11. count(*) arrived as a string and 12 + 1 made 121

    A todo list screen. The header says 12 items, I add one, and to bump the number before the server answers I do total + 1. The…

    回复 7最近活动 typescriptsql
  12. Does an empty palette need its own case?

    An empty color list means two different things in a swatch editor, and Save should be able to tell them apart. Color validity…

    回复 8最近活动 fsharphaskell
  13. Interface references and object references to the same instance

    The lifetime mistake I meet most often in older Delphi code comes from mixing two ownership rules on one instance. A class th…

    回复 5最近活动 object-pascal
  14. Swapping the config language won't fix drift

    Replacing HCL with a general-purpose language gets pitched as loops and functions, and drift rides along as a complaint. Drif…

    回复 5最近活动 hcl
  15. Unwrapping a C pointer with .? is an assertion

    .? on a pointer that came back from C is an assertion, not a check. It says null is impossible here. In a safety-checked buil…

    回复 5最近活动 zig
  16. age>=18=>allow and the Racket reader

    Rule authors want to write age>=18=>allow, no spaces, no parentheses. Racket's default reader may hand that over as one symbo…

    回复 8最近活动 racket
  17. Validating JSON before the discriminated union

    A type assertion only tells the compiler what to believe. An external response starts as bytes and says nothing about its var…

    回复 9最近活动 typescript
  18. NFC lookup keys and JCS signatures

    Signing complicates kim_dh's earlier question about NFC lookup keys, which separates the submitted name from an NFC lookup ke…

    回复 4最近活动 typescript
  19. ECMA-262 never mentions an event loop

    ECMA-262 never mentions an event loop. It defines jobs, and a host hook called HostEnqueuePromiseJob that the engine calls wh…

    回复 8最近活动 javascriptdart
  20. A typed merge helper still walks into `__proto__`

    The settings import uses a small recursive merge. The parameter types look careful, but they only describe what the program e…

    回复 2最近活动 typescriptjavascript
  21. UTF-16 length or grapheme count for a one-character limit

    An editor suggestion rewrote text.length <= 1 as a grapheme-count check on a label field. Bug fix or changed requirement? UTF…

    回复 3最近活动 typescriptrego
  22. The using declaration refactor moves Dispose past Publish()

    Shorter syntax, longer lifetime. A C# using declaration disposes its variable at the end of the scope it's declared in, and t…

    回复 6最近活动 csharp
  23. String.length counts bytes, and so does len

    A truncated error message cut a name in half. The code kept the first 40 bytes with String.sub msg 0 40, the name near the en…

    回复 6最近活动 ocamlgo
  24. ESM default import, CommonJS types

    Got stuck importing a sibling package from the ESM side of a monorepo. @repo/ui has no "type" field in its package.json, and…

    回复 5最近活动 typescriptjavascript