Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cchianel
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
cchianel
12d ago
I implemented continuations (required for Python generators) differently in my Python (AST) to Java (bytecode) translator. The switch dispatch to restore variables and jump to next location is the same, but instead of throwing an exception,
2.
▲
by
cchianel
2mo ago
Look at it this way: I am arguing against "No Free Lunch theorem says an optimization algorithm cannot solve all problems because for some problems it performs worse than other algorithms"; I am arguing approximate solutions are g
3.
▲
by
cchianel
2mo ago
I personally disagree with "no free lunch"; (for the uninitiated, "no free lunch" refer to the fact for any deterministic algorithm, there exist a problem that will force the algorithm to go through the entire solution s
4.
▲
by
cchianel
2mo ago
It seems to just be a wrapper over or-tools and other solvers from their landing page, with the difference being it run on their servers versus your hardware. Their website does not mention what hardware is allocated per model (which determ
5.
▲
by
cchianel
3mo ago
Think of WASM as a kinda universal library target. You can compile C, Rust, C#, Java to WASM, and then you can use it in a different language from the source. This way, Java can run C or Rust code without going through a FFI (foreign functi
6.
▲
by
cchianel
4mo ago
You can find a list of quickstarts at https://github.com/TimefoldAI/timefold-quickstarts . Examples include: - School Timetabling - Employee Scheduling - Conference Scheduling - Flight Crew Scheduling Metaheurstics are
7.
▲
by
cchianel
4mo ago
Currently, no language ports of Timefold Solver are planned. Unfortunately, FFI (foreign function interface) have a terrible performance penalty, and since we would be doing multiple FFI calls for moves, it can easily become 100x slower jus
8.
▲
by
cchianel
4mo ago
Although this post discusses Constraint Programming - Satisfiability (CP-SAT) Solvers and Mixed Integer Problem (MIP) Solvers, it does not discuss Metaheuristic Solvers. Metaheuristic solvers are different in that you don't need to mod
9.
▲
by
cchianel
10mo ago
I haven't; from a quick reading, InfoBax is for when you have an expensive function and want to do limited evaluations. Timefold works with cheap functions and does many evaluations. Timefold does this via Constraint Streams, so a func
10.
▲
by
cchianel
10mo ago
I thought "No Free Lunch Theorem" was a joke from its name (although I should know better since "Hairy Ball Theorem" exists). So if I understand correct, it states that all optimization algorithm must choose an order to
11.
▲
by
cchianel
10mo ago
By 1% of optimal, I was giving an example percentage to clarify there are solutions that exists, that are almost as good as optimal, that can be found in reasonable amount of time. There cannot be a guarantee to find a solution to a given p
12.
▲
by
cchianel
10mo ago
That depends; do you want the optimal solution? If so, I agree it is impossible for a fully general problem solver to find the optimal solution to a problem in a reasonable amount of time (unless P = NP, which is unlikely). However, if a &q
13.
▲
by
cchianel
10mo ago
Some additional optimization resources (for metaheuristics, where you only have the objective/score function and no derivative): - "Essentials of Metaheuristics" by Sean Luke https://cs.gmu.edu/~sean/book
14.
▲
by
cchianel
1y ago
Games on old consoles such as Nintendo 64 and the Playstation One use a variety of tricks to be playable on limited hardware. For the specific example of Final Fantasy VII, there is one trick that allows you to skip almost the entirely of D
15.
▲
by
cchianel
1y ago
Related: Archipelago ( https://archipelago.gg/ ), a framework that randomizes multiple games, across multiple clients. For example, Player A is playing Mario 64, and Player B is playing Pokemon Red. Some items from Player B&#
16.
▲
by
cchianel
1y ago
N-Queens can be solved (find a single valid solution) in polynomial time [1]. That being said, Local Search is a powerful technique that can solve a lot of problems such as employee scheduling, vehicle routing, or maintenance scheduling. Yo
17.
▲
by
cchianel
1y ago
CPython bytecode changes behaviour for no reason and very suddenly, so you will be vulnerable to changes in Python language versions. A few from the top of my head: - In Python 3.10, jumps changed from absolute indices to relative indices -
18.
▲
by
cchianel
1y ago
The primary reason, in my opinion, is the vast majority of Python libraries lack type annotations (this includes the standard library). Without type annotations, there is very little for a non-JIT compiler to optimize, since: - The vast maj
19.
▲
by
cchianel
1y ago
As someone who did a CPython Bytecode → Java bytecode translator ( https://timefold.ai/blog/java-vs-python-speed ), I strongly recommend against the CPython Bytecode → PySM Assembly step: - CPython Bytecode is far from s
20.
▲
by
cchianel
2y ago
(Disclosure: I work for Timefold) OR Tools is a MIPS/SAT solver, while Timefold is a meta-heuristic solver. As a result, the developer experience is quite different: - In OR Tools, you need to write your constraints as mathematical equ
21.
▲
by
cchianel
2y ago
IPC methods were actually used when constructing the foreign API prototype, since if you do not use JPype, the JVM must be launched in its own process. The IPC methods were used on the API level, with the JVM starting its own CPython interp
22.
▲
by
cchianel
2y ago
JNI/the new Foreign FFI communicate with CPython via CPython's C API. The primary issue is getting the garbage collectors to work with each other. The Java solver works by repeatedly calling user defined functions when calculating
23.
▲
by
cchianel
2y ago
I had to deal with a lot of FFI to enable a Java Constraint Solver (Timefold) to call functions defined in CPython. In my experience, most of the performance problems from FFI come from using proxies to communicate between the host and fore
24.
▲
by
cchianel
2y ago
I had the misfortune of translating CPython bytecode to Java bytecode, and I do not wish that experience on anyone: - CPython's bytecode is extremely unstable. Not only do new opcodes are added/removed each release, the meaning
25.
▲
by
cchianel
2y ago
John Walker built a virtual machine for the Babbage's instruction set, and it has a web emulator: https://fourmilab.ch/babbage/emulator.html . I don't think Ada program is available as an example though, so yo
26.
▲
by
cchianel
2y ago
For constraint programming solvers, you need to define a model (i.e. what are the variables that the solver can change). Typically, a good model naturally enforces hard constraints. For instance, consider the employee scheduling problem, wh
27.
▲
by
cchianel
2y ago
Great overview on the structure of the CPython's Virtual Machine (as well as an introduction to stack based virtual machines). I am unfortunately very familiar with CPython's bytecode [1], and do not recommend trying to do anythin
28.
▲
by
cchianel
2y ago
I written a data structure for grouping intervals into disjoint connected clusters. Each cluster in the data structure is a connected component of the interval space (see https://en.wikipedia.org/wiki/Connected_space f
29.
▲
by
cchianel
2y ago
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&q
30.
▲
by
cchianel
2y ago
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-py
More ›