Hacker Newsnew | past | comments | ask | show | jobs | submit | copirate's commentslogin

Why do these tools never have the equivalent of sketch contraints in FreeCAD? That's how I build my models and it avoids a lot of math.

I'd really like a "CAD as code" tool that's basically the FreeCAD Part Design workflow but with code. I know FreeCAD has a python interface but it's far from developer friendly.


It has constraints, it just doesn’t have a declarative constraint solver.

https://build123d.readthedocs.io/en/latest/tutorial_constrai...

Traditionally CAD programs require declaring geometry, then defining constraint relationships between them. That leaves ambiguity. I often create under-constrained sketches in Fusion, then change a dimension, which breaks the geometry in ways that technically respect the constraints.

They designed an imperative constraint system. A lot of constraints are linear, so you can just order the sketches and reference as needed. For circular or bi-directional references you probably have to define some construction geometry first, solve the constrains there, and reference it.

Something I haven’t seen before is their filter syntax for disambiguating solutions. You can express how the desired solution relates to the surrounding geometry. This constrains correctly across large parameter changes and will error when there is no longer a solution rather than switching to an unexpected solution to the constraint.

https://build123d.readthedocs.io/en/latest/tutorial_constrai...


The reality is build123d is a fairly thin layer over the OCCT kernel with some pythonic affordances. I'm not sure OCCT has a robust constraint solver, so there is little development there. FreeCAD on the other hand (besides being significantly more mature) is also build on OCCT, but also does a lot on top of the kernel to make it more featured and stable.

When I've needed to solve for something in OpenSCAD I've just written a recursive module --- would that not work in Build123D?

Parent was complaining about the lack of a built in sketch constraint solver in build123d, which is table stake feature of any "real" GUI CAD suite. build123d has some constraint options and you could probably use solvespace with it. Of course you can roll your own.

Also worth looking at this project https://gitlab.com/dmytrylk/solve123d which adds constraints on top of build123d using a jax-based numerical solver.

This is also something I really want, what is the best way to include constraint solvers? I have been messing around with sympy see what insights it provides in this domain, but to actually use it the cad DSL would have to be python, is there an easy way to build a simple constraint solver out of a normal imperative workflow?

I'm working on one with features you mentioned, with the main goal to make the workflow similar to mainstream CAD. Will release the first dev version in less than a month.

build123d has constraints for avoiding math. I'm not familiar with the sketch constraints in FreeCAD though, how do they compare?

https://build123d.readthedocs.io/en/latest/tutorial_constrai...


FreeCAD has a Python API that you can use to too. It's their "macro" functionality.

One thing I love about NixOS is how easy it is to run packages from different sources. For example, I needed an old package that's been removed from nixpkgs several years ago. To run it I just had to add an old release of nixpkgs as input to my flake.nix and add the package from this input. It pulls all its dependencies from that old release and there's zero conflict with the other packages.

So if I have to reinstall my phone it won't be usable for 24h because I won't be allowed to install my F-Droid apps?

> After all, real humans – even geniuses – are trained on much much less data than the whole Internet.

It's certainly different data, but one could argue that real humans have been trained on 3.5 billion years of evolution data.


But the author's workflow is actually very different from Boris'.

#6 is about using plan mode whereas the author says "The built-in plan mode sucks".

The author's post is much more than just "planning with clarity".


> The author's post is much more than just "planning with clarity".

Not much more, though.

It introduces "research", which is the central topic of LLMs since they first arrived. I mean, LLMs coined the term "hallucination", and turned grounding into a key concept.

In the past, building up context was thought to be the right way to approach LLM-assisted coding, but that concept is dead and proven to be a mistake, like discussing the best way to force a round peg through the square hole, but piling up expensive prompts to try to bridge the gap. Nowadays it's widely understood that it's far more effective and way cheaper to just refactor and rearchitect apps so that their structure is unsurprising and thus grounding issues are no longer a problem.

And planning mode. Each and every single LLM-assisted coding tool built their support for planning as the central flow and one that explicitly features iterations and manual updates of their planning step. What's novel about the blog post?


A detailed workflow that's quite different from the other posts I've seen.


> A detailed workflow that's quite different from the other posts I've seen.

Seriously? Provide context with a prompt file, prepare a plan in plan mode, and then execute the plan? You get more detailed descriptions of this if you read the introductory how-to guides of tools such as Copilot.


Making the model write a research file, then the plan and iterate on it by editing the plan file, then adding the todo list, then doing the implementation, and doing all that in a single conversation (instead of clearing contexts).

There's nothing revolutionary, but yes, it's a workflow that's quite different from other posts I've seen, and especially from Boris' thread that was mentioned which is more like a collection of tips.


> Making the model write a research file

Having LLMs write their prompt files was something that became a thing the moment prompt files became a thing.

> then the plan and iterate on it by editing the plan file, then adding the todo list, then doing the implementation, and doing all that in a single conversation (instead of clearing contexts).

That's literally what planning mode is.

Do yourself a favor and read the announcement of support for planning mode in Visual Studio. Visual Studio code supported it months before.

https://devblogs.microsoft.com/visualstudio/introducing-plan...


I'm not saying they invented anything. I'm saying it's a different workflow than what what I've seen on HN.

I don't care about Visual Studio, I don't use it, but the page you've linked seems to describe yet another workflow (not very detailed).


Since some time, Claude Codes's plan mode also writes file with a plan that you could probably edit etc. It's located in ~/.claude/plans/ for me. Actually, there's whole history of plans there.

I sometimes reference some of them to build context, e.g. after few unsuccessful tries to implement something, so that Claude doesn't try the same thing again.


The author __is__ Boris ...


They are different Boris. I was using the names already used in this thread.


It can protect the identity of the members, though.


Apparently, one member of the group uploaded a personal photo as an avatar.

I've also heard of side-channel attacks on Signal that could allow for profiling a user's location, which with the FBI's resources could presumably eventually result in identification.


Sure, I was not talking about Signal. Something like Bitmessage[1] can.

[1] https://en.wikipedia.org/wiki/Bitmessage


Bitmessage is/was awesome, but it fundamentally doesn't scale.

Every user has to attempt decryption of every message sent by any sender. Later they cobbled on some kind of hokey sharding mechanism to try to work around this, but it was theoretically unmotivated and an implementation minefield (very easy for implementation mistakes in the sharding mechanism to leak communication patterns to an observer).

Bitmessage would be great if we had something like Schnorr signatures (sum of (messages signed with different keys) = (sum of messages) signed with (sum of keys)) that could tell you if any of the sum of a bunch of messages was encrypted to your secret key. Then you could bisection-search the mempool.


There's also this issue[1] with about 300 participants about limits being reached much more quickly since they stopped the 2x limit for the holidays. A few people from Anthropic joined the conversation but didn't say much. Some users say they solved the issue by creating a new account or changing their plan.

[1] https://github.com/anthropics/claude-code/issues/16157


Something to check is if you’re opted into the test for the 1M context window. A co-worker told me this happened to them. They were burning a lot more tokens in the beta. Seems like creating a new account could track with this (but is obviously the Nuclear option).

I recently put a little money on the API for my personal account. I seem to burn more tokens on my personal account than my day job, in spite of using AI for 4x as long at work, and I’m trying to figure out why.


Super, and for those of us on the annual plan, I guess I just accept my new reality


I can definitely vouch for that being the case, for me.


If it's the same author they can reuse the code. They can copy the code but they can't link it.


This problem may be specific to Darwin because on NixOS I've never had a file overwritten by nix (even with home manager). When a file is managed by nix it's a symlink to a read-only filesystem (/nix/store), so no program can overwrite it. If the symlink is replaced by a regular file, nix refuses to reapply.


Correct for data, not for config files. Config files are stateful unless you do the procedure I mentioned, because they're generated at first application launch.

If you try to symlink into an existing file Nix will indeed complain, which is why you have to erase the config file and then put yours in place. You can either write it out from a .nix file (pure reproducibility) or from symlink copy from a file managed by git (technically impure but effectively reproducible).


But my config files (/etc, ~/.config, etc.) are either managed by nix (and no program can modify them), or they are not and in that case nix will never touch them. In what situation would nix overwrite a file?


Actually Nix even errors out if the file it tries to write is already in place. I have this sometimes when I move fish functions from being defined adhoc with funcsave to putting them in my nix config because I want them on all my machines.


If the attacker is waiting for a lucky event to occur (finding more blocks than others while having less than 51% of the mining power) it means that they are constantly wasting mining time. That in itself is a huge cost (operational cost and block rewards thrown away), but it also means that they can't predict when it will happen. A double spend attack must be planned in advance because the first transaction must occur at the beginning of the attack. I'm not sure how they could constantly try double spends without risking losing the money each time the attack doesn't happen.

I don't see how it could be profitable. If it can't be profitable, then the risk of someone doing it is pretty low. If they already have the necessary hardware, they'd be much better off mining.


> I'm not sure how they could constantly try double spends without risking losing the money each time the attack doesn't happen.

If you're not trying to profit from the double spend itself but rather from a collapse following a proven double-spend, you can double-spend the bitcoins to yourself.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: