HNHacker News
TopNewBestAskShowJobs

cerved

1,409 karma · joined October 12, 2016

submissionscomments
cerved··on Trump to impose $100k fee for H-1B worker visas, White House says
It's not a tariff
cerved··on Many hard LeetCode problems are easy constraint problems
The Coursera courses are a great resource for learning how to model problems.

> any good primer literature I might check out for understanding the basis of tweaking constraint solvers? I have started running into some performance issues after integrating an optimization function, and have started to wonder how can I claim back some performance.

There is usually less tweaking of solvers and much more remodeling the problem using a different viewpoint or constraints to solve the problem. There courses teach you that. But beware that's it's not so trivial.

Also, careful with LLMs and constraint solvers, sometimes they yield absolute rubbish.

cerved··on Many hard LeetCode problems are easy constraint problems
Presumably you run it with multiple workers, preferably in parallel (it's designed to run like that)

Depending on your problem and how you can solve it (single threaded & low memory vs. anything goes) it might be a good idea trying other solvers. OR-Tools CP-SAT(LP) pretty much never does bad on a any problems but there are other CP-SAT solvers like Chuffed & Huub as well as Gecode which is a pure CP solver that does great providing you can make a gif search heuristic up front. Another option is of course racing solvers.

Then there are other things like MIP solvers, CBLS solvers etc. The nice thing with MiniZinc is that it's pretty easy to compare different solver backbends for a problem

cerved··on Using Claude Code SDK to reduce E2E test time
The author said they used Claude to decide which E2E tests to run and "Claude never missed a relevant E2E test."

How many times did they conduct this experiment? Over how long time? How did they determine which tests were relevant and that Claude didn't miss them? Did they try it on more than one project?

My point was that none of this tells me this will work in general

cerved··on Many hard LeetCode problems are easy constraint problems
No. They use sophisticated algorithms called propagators to prune the invalid solutions from the domains of possible solutions in conjunction with a search strategy, like branch and bound
cerved··on Many hard LeetCode problems are easy constraint problems
Which solver do you use?
cerved··on Many hard LeetCode problems are easy constraint problems
Define large. We've written model which solves real business issues in 8K lines of MiniZinc and it wasn't slow.

The conventional wisdom is the larger you make an NP hard problem, the slower is going to get. Irregardless of algorithm.

cerved··on Many hard LeetCode problems are easy constraint problems
I've worked on a model with thousands of variables and hundreds of thousands of parameters with a hundred constraints. There are pitfalls you need to avoid, like reification, but it's definitely doable.

Of course, NP hard problems become complex at an exponential rate but that doesn't change if you use another exact solving technique.

Using local-search are very useful for scaling but at the cost of proven optimality

cerved··on Many hard LeetCode problems are easy constraint problems
Well if your using MiniZinc you're free to use a CP solver, MIP solver, SAT solver, CP-SAT-LP solver. In general the model is roughly the same, even though some formulations work better for some solvers than others.

But CP (and CP-SAT) solvers tend to do very well on scheduling problems

cerved··on Many hard LeetCode problems are easy constraint problems
from ortools.sat.python import cp_model
cerved··on Many hard LeetCode problems are easy constraint problems
Not only has he made a great website, he's also a super nice guy
cerved··on Many hard LeetCode problems are easy constraint problems
MiniZinc is a really great modeling language for constraint programming. Back in August I gave a talk at NordConstNet25 on how we used it to build a product configurator in what's (probably) the worlds largest MiniZinc model

https://pierre-flener.github.io/research/NordConsNet/NordCon...

cerved··on Using Claude Code SDK to reduce E2E test time
I think the point is, E2E takes too long, so it was only run nightly. Now it's also run, selectively, as well as nightly
cerved··on Using Claude Code SDK to reduce E2E test time
Well since it never broke for some rando on the internet, surely that means it will always work for everyone
cerved··on Nullable but not null
It doesn't. That's why it's the responsibility of the application layer to correctly implement the data model of the database and not the other way around
cerved··on TODOs Aren't for Doing
That's what FIXME is for
cerved··on Debugging Bash Like a Sire (2023)
(D)ash is not bash --posix
cerved··on Debugging Bash Like a Sire (2023)
They are not the author of fzf
cerved··on JavaScript Trademark Update
Postgres presumably
cerved··on JavaScript Trademark Update
LMS/GLAS
cerved··on Microsoft Releases Classic MS-DOS Editor for Linux Written in Rust
Probably more like need to use it. Basically nano for windows
cerved··on Mbake – A Makefile formatter and linter, that only took 50 years
I like it because it's language and tooling agnostic, declarative, fast and ubiquitous.

Where it's less great is complicated recipes and debugging

cerved··on Solving LinkedIn Queens with SMT
What about a CP-SAT solver?
cerved··on Show HN: I wrote a modern Command Line Handbook
<3 GNU Make
cerved··on Postgres IDE in VS Code
it's fasterb and has a functional vim interface
cerved··on Postgres IDE in VS Code
Is there something related to Access in this that I missed in this or you just being salty, because I have to work with that garbage and if there's something better than DBeaver I can use for that I'm all ears
cerved··on Postgres IDE in VS Code
More streamlined UI. I find the graph viewer to display some things nicer, like coloring tables, bringing in related tables. Slightly better introspection and code formatting. Easier refactoring capabilities. Easier to get IdeaVim working then whatever Ecplise plugin is needed in DBeaver.

In my experience, DataGrip has been easier to get up and running out of the box and bringing the big IDE guns than DBeaver but DBeaver also does done this really well. For example I have never been able to setup DG with Access but DBeaver works pretty good out of the box with that garbage. Also it's free.

Both are solid

cerved··on Postgres IDE in VS Code
SSMS is what my nightmares are made of
cerved··on Postgres IDE in VS Code
Since most databases expose similar schema views it shouldn't be too complicated. Feels like JetBrains has been doing this for a long time
cerved··on Postgres IDE in VS Code
I'm more confused why the version control of the thing using the database is including the entire schema of the database in it's repository
← PreviousPage 3 of 34Next →