Hacker News new | past | comments | ask | show | jobs | submit | Exuma's comments login

Im with ya. The OP link is so painfully predictable and 1 dimensional. Its like people are unoriginal, which isn't so bad, but simultaneously dont possess the awareness to realize theyre unoriginal..... so to those who are not unoriginal its all so very tiresome. Oh wow you used swearing to make your point... I wonder how long it took for you to come up with that. I myself love the very much alive-and-dynamic interwebz. I love the creativity. I love the weird. I love javascript. I love the 9000 ways to do things because it always works out in the end and sorts itself out. There's ebbs and flows just like every other thing in life, where things evolve in phases

damn thats really freaking cool

for one i work with GB large files and vd instantly opens them. SCIM it took a lot of painful seconds to open 14mb file


What’s a real world thing or two that this could solve vs writing code


Well, you still write code. The difference is the code is written either in ordinary Python or Java and not as mathematical equations.

For example, to do the "Some employees are qualified to do either role, but others can only be a cashier, or a restocker." constraint in the article, it would be written like this:

  def required_skill(constraint_factory: ConstraintFactory):
      return (constraint_factory.for_each(Shift)
              .filter(lambda shift: shift.required_skill not in shift.employee.skills)
              .penalize(HardSoftScore.ONE_HARD)
              .as_constraint("Missing required skill")
              )
Some examples taken from Timefold quickstarts:

- Employee scheduling (https://github.com/TimefoldAI/timefold-quickstarts/tree/stab...)

- Vehicle routing (https://github.com/TimefoldAI/timefold-quickstarts/tree/stab...)

- School timetabling (https://github.com/TimefoldAI/timefold-quickstarts/tree/stab...)


Great to see this math being made more accessible!

The Python examples seem to have a very strong Java smell. That might just be my prefer for functional styles over OOP styles though.


Let us know how we can improve! Feel free to start a discussion (https://github.com/TimefoldAI/timefold-solver/discussions) or submit an issue (https://github.com/TimefoldAI/timefold-solver-python/issues).

We aim to treat Python as a first-class citizen (while keeping it maintainable). For instance, many of the Java methods are mapped to properties on the Python classes with more Pythonic names (see `ScoreExplanation` for an example).

I suspect what gives the Java smell is probably the `SolverFactory`/`SolverConfig`, which is a lot of boilerplate code. A lot of the code can be generated, although we would need to design an API for that.

The fluent (method chaining) API might also be giving the Java smell; I don't see many fluent API being used in Python. In particular, needing to either end lines with `\` or surround the statement with brackets make long fluent chains annoying to use. This is harder to change, since there is no Pythonic alternative that I know of for method chaining.


Langchain did something overloading the | or operator in their LCEL DSL to form LLM pipelines. It feels like abusing python but it's familiar enough as a Unix syntax


Does

  constraint_factory.create_from_chain(
      ForEach(Shift)
      | Filter(lambda shift: shift.required_skill not in shift.employee.skills)
      | Penalize(HardSoftScore.ONE_HARD)
      | AsConstraint("Missing required skill")
  )
Feel more Pythonic than

  (
      constraint_factory.for_each(Shift)
      .filter(lambda shift: shift.required_skill not in shift.employee.skills)
      .penalize(HardSoftScore.ONE_HARD)
      .as_constraint("Missing required skill")
  )

?


Knapsack problems, some simple scheduling problems, even the travelling salesman problem.

Many problems in business and manufacturing fit this bill. Optimal product mix, optimal routing, choosing the best spot for a warehouse, scheduling employees, constructing an investment protfolio, coming up with a diet that fits certain criteria, etc.

I even remember a practice problem from uni where we had to optimally distribute songs on two sides of a tape album (it was an old professor), satisfying constraints such as “each side should have a ballad” and “each side has at most x minutes of running time”.

You can do this with regular coding too, but if you can easily construct a certain kind of mathematical model of your problem, you can easily solve it with linear programming.


Is that protein isolate different than my isolated whey protein workout shake


No, but I think protein isolate does have a use in the context of athletes


I got an amazing one only to find out Zalgo is not supported EXỦMÂ :[


Small plug of company I love (not paid or anything). Field skillet is literally the best cast iron I’ve ever used. Their skillet size is truly sublime for breakfast stuff and smash burgers


They look nice (and it's good to see important design tweaks like having a second handle opposite the main one even on smaller skillets like the 10in), but they are spendy. I got a Finex from their original Kickstarter (I liked the idea of them being made here in Portland), but they're also not cheap. My instinct is that some quality time sanding the cooking surface smooth would produce similar results in a cheaper pan...


Hmm i very strongly disagree. It was immediately apparent to me even on the first cook how vastly superior the surface was to any standard Lodge or whatever. Nothing wrong with Lodge, I have those too, but I was very surprised. TBH i wasnt really expecting much, my expectations were very low when I got it on a whim as I kept hearing people rave about it.

The seasoning over time is also vastly superior because of these tiny grooves. I buy the skillet one as a gift for people and its pretty much unanimous that it's their favorite.

Not trying to hype, its just legitimately one of my favorite pans


I forgot to mention if you get the griddle (Sorry, i kept calling it a skillet before, i meant this one: https://fieldcompany.com/collections/cast-iron-griddles/prod...)

If anyone gets that.... cook some smash burgers in it and it gets the best seasoning ive ever seen, very quickly.


$185? WTF? Mine was like $10. It's a sheet of iron, FFS, not gold laminated.


> It was immediately apparent to me even on the first cook how vastly superior the surface was to any standard Lodge or whatever.

Can you expand on this? What was different on the first use that made its superiority so obvious so quickly? I have only a rudimentary understanding of cookware, so the difference between a $10 cast iron pan and a $200 cast iron pan isn't immediately apparent.


> sanding the cooking surface smooth would produce similar results

Your instinct is a good one - I tried this with a 12" Lodge skillet, working my way up to 220 grit with an orbital sander, and it instantly became my favorite pan.


While I agree it’s painful, I’ve seen examples of ai reproducing exact bastardized versions of famous instagram digital artists. You can clearly see where it learned from it and it’s extremely obvious, not in the sense of one who could say “oh yes I was inspired by this” but a literal 1:1 copy that has the drunken haze of melted ai nonsense over top. In this respect I was like damn … that may piss me off.


It is not even about remaking some individual work, that is just the most egregious.

For any other output, even if it does not reproduce 1:1, the only reason it works at all is thanks to acquired training data and most of it is stolen.


Yeah, you can do anything with AI so you can train it to reproduce a specific image if you want to. Normally this would be considered overfitting in a foundation model, so there's some protection in that they don't want to be doing it. But with fine-tuning it can happen intentionally.

But people can also copy you by hand if they want to.


I tried this in a raytracter today while learning rust and it made the scene render all white. Lol


This actually made me chuckle, although it took an embarrassingly long second.


I love this landing page, excellent work. Steps me through lots of examples with clean and efficient writing. Nice work!

Edit: i just bought it


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

Search: