HackerTrans
TopNewTrendsCommentsPastAskShowJobs

seniorsassycat

no profile record

comments

seniorsassycat
·2 maanden geleden·discuss
I tried Claude code designing a snap fit, vase mode printed box. Ultimately didn't work out, it couldn't get the tolerances right and kept designing features that wouldn't print in vase mode.

Scad needs unit tests. It would be powerful to asset that a profile doesn't have slope greater than 45°, that intersection of two objects is null, or specific volume.

It also needs cut away views. I got okay results using boxes to remove everything except a sliver, to view a slice and internal details. But without hash marks, texture, or outlines it can be hard to tell the forms.
seniorsassycat
·4 maanden geleden·discuss
Not sure about faster, but you could do something with overrides, especially pnpm overrides since they can be configured with plugins. Build a list of packages that can be replaced with modern stubs.

It couldn't inine them, but it could replace ponyfils with wrappers for native impls, and drop the fallback. It could provide simple modern implementations of is-string, and dedupe multiple major versions, tho that begs the question what breaking change lead to a new mv and why?
seniorsassycat
·4 maanden geleden·discuss
Just switch to the +1 standard time. WA can switch to MST, which is equivalent to PDT.

It still requires federal approval, but from Sec Transit instead of Congress
seniorsassycat
·7 maanden geleden·discuss
What if I've already fixed the format issue (but not staged it). The pre-commit hook will pass, but it's not doing what the author intended (preventing unformated code from being committed).

What if I've only staged one part of a file, but the pre-commit hook fails on the unstaged portions, which should be fine since I'm not commiting or pushing those changes.
seniorsassycat
·7 maanden geleden·discuss
Node.js uses the same JavaScript engine as chrome and chrome dev tools can be connected to node to debug and profile.

node --inspect

chrome://inspector
seniorsassycat
·7 maanden geleden·discuss
I tend to agree but think npms post install hook is a degree worse. Triggering during install, silently because npm didn't like someone using the feature to ask for donations, is worse than requiring you to load and run the package code.
seniorsassycat
·7 maanden geleden·discuss
I really want something like this to be built into the language or runtime, I don't want to juggle configuration for 4 different libraries. Log4j and tracing seem to be well established without being built in, but it feels too late for js.

I'm curious if this is enough https://nodejs.org/api/diagnostics_channel.html

I don't like the js hotel libraries, their docs feel deliberately obtuse
seniorsassycat
·7 maanden geleden·discuss
Fork, and normal worker threads always enter a script, there's clearly no shared lexical scope. This spawn method executes a function, but that fn can't interact with the scope outside
seniorsassycat
·8 maanden geleden·discuss
Feels like the next step will be improving llm lsp integration, so tool use discovery becomes lsp auto complete calls.

This is a problem coding agents already need to solve to work effectively with your code base and dependencies. So we don't have to keep solving problems introduced by odd tools like mcp.
seniorsassycat
·8 maanden geleden·discuss
Signature taste if Oreos
seniorsassycat
·9 maanden geleden·discuss
That doesn't cast or change compile time type right?
seniorsassycat
·9 maanden geleden·discuss
I'm curious what effects the system prompt has

- randomize a and b, maybe there's a preference for answering a, or first option. - how do references to training data or roles affect the responses?

Limiting the response to a/b/pass makes sense to measure the results, but feels like it could affect the results. What would we see with a full response then a judgement pass
seniorsassycat
·10 maanden geleden·discuss
Do you have an example of the first?
seniorsassycat
·3 jaar geleden·discuss
|& pipes both
seniorsassycat
·7 jaar geleden·discuss
I agree, these are contrived examples, but I know that I have reached for inline logic many times in my career. To me another code smell is a scope with too many variables and do expressions are a tool to reduce the scope of variables. Refactoring to named functions will introduce another named variables.

Javascript doesn't have private modules so moving logic to helper functions in util modules doesn't reduce scope bloat.
seniorsassycat
·7 jaar geleden·discuss
This is the equivalent without a do expression.

    const func = (() => {
      let result; // cache
      return () => {
        if (result === undefined) {
          result = someComputation();
        }
        return result;
      }
    })();
You could write it without the immediately invoked arrow funciton or a do expression if `result` is in the same scope as `func`

    let result;
    const func = () => {
      if (result === undefined) {
        result = someComputation();
      } 
      return result;
    }
Result is in the same scope as func, inviting anyone to read from or write to it.

In all three examples `func` is assigned a zero argument function. That function returns the result of calling `someComputation`, but it stores the value in `result`. If `result` is not undefined `func` returns `result`. `func` is a cached, memoized, or lazy-loaded version of someComputation.

A do expression will return the last evaluated expression in it's scope, in this example that expression is `() => {...}`, not `return` because the inner anonymous function wasn't called.

---

I think a clearer demonstration of do expressions is an assigning switch or ifelse

    const value = do {
      switch (someString) {
        case 'Monday':
          0;
          break;
        case 'Tuesday':
          1;
          break;
        ...
      }
    }

    const other = do {
      if (isPrime(n)) {
        'prime'
      } else if (isOdd(n)) {
        'odd'
      } else {
        'even'
      }
    }
seniorsassycat
·7 jaar geleden·discuss
1.1 Comparing objects by value I _think_ I'd prefer a standard `equals` method, or more likely a `[Symbol.equals]` method. With `[Symbol.equals]` and `[Symbol.hash]` we could also build collections for objects.