HNHacker News
TopNewBestAskShowJobs

mzl

1,920 karma · joined April 27, 2010

submissionscomments
mzl··on Ty: A fast Python type checker and language server
The semantics of Python makes it problematic to run at speed, it is not just about interpreted vs compiled code. Give the high levels of dynamic behaviors that are allowed, a Jit (like pypy) has a higher chance of getting decent performance if the code has an underlying behavior that can be extracted.
mzl··on Modern LaTeX
MDX as a middle ground with most of the text standard markdown and the escape hatch of custom React JSX when needed has worked well for me.
mzl··on Ask HN: Share your AI prompt that stumps every model
I tried Gemini Pro 2.5 with a lot of context: all the documentation for a system and several papers of interest, then asking it to use the system tom implement the proposed solution in the papers. The total context was over 500k words, so with usual estimates probably over 700k tokens.

The answers started out ok, but fairly quickly it seemed to loose track of the mid-stuff in the documentation, insisting on using one concept instead of another even when I explicitly told it not to. Full attention on 1M context is not really feasible (I don't believe that Google actually stores upwards of 1T of data just for my query), and there are various ways LLMs use selective attention. I'm not sure if Google has published anything on how they do it?

mzl··on Advanced Python Features
A typing system should only infer things that it knows are true, it should never invent restrictions. In a language like Python that is duck-typed, `Any` is the only reasonable choice in the absence of other real constraints like a type-annotation.
mzl··on Advanced Python Features
How would a typing system know if the right type is `int` or `Optional[int]` or `Union[int, str]` or something else? The only right thing is to type the argument as `Any` in the absence of a type declaration.
mzl··on Are .NET 4.x and JDK 8.x the "zombie" runtimes of enterprise software?
For a very long time, Scala was stuck at JDK 8 which hindered anyone that had a mix of Java and Scala code from upgrading.
mzl··on Show HN: Jq-Like Tool for Markdown
From the linked web-page

    A cat written with UUOC might still be preferred for readability reasons, as reading a piped stream left-to-right might be easier to conceptualize.[14] Also, one wrong use of the redirection symbol > instead of < (often adjacent on keyboards) may permanently delete the content of a file, in other words clobbering, and one way to avoid this is to use cat with pipes.
I personally think the cat-style is easier to read since it only uses commands and pipes, with no need to keep track of redirection directions.
mzl··on Meta torrented & seeded 81.7 TB dataset containing copyrighted data
Before the launch, Spotify had a deal with the music rights holders association in Sweden (STIM) that they could use a merged collection of friends and families music libraries. All this was removed before Spotify went out of beta.

So while it was using pirated media, it was sanctioned by the rights holders for the experiment of building Spotify.

mzl··on The Skyline algorithm for packing 2D rectangles
The standard heuristic any 2D packing algorithm starts with is left-bottom or bottom-left (the choice is symmetrical). Place a piece as much to the left as possible, and among equal choicse as low as possible (or vice versa, as the choice was in the linked article). From this base heuristic, further meta-heuristics can be developed with choices for the order to pack parts, how to choose among "almost equal" positions, choosing among rotations and symmetries, and so on.

As far as I can tell, the "Skyline algorithm" is bottom-left with the limitation that created holes can not be packed. This doesn't feel like a packing algorithm as much as it feels like a heuristic to speed up position finding.

mzl··on GitHub Copilot is not infringing your copyright (2021)
If one was sufficiently inspired by code A when writing code B, then it is a derivate work. This is a core tenet of copyright law.

At what measure is one sufficiently inspired for it to be a derivate work? That is up to courts to decide.

mzl··on All I want for Christmas is a negative leap second
Daylight savings time is not in a majority of countries. See the map on Wikipedia: https://en.wikipedia.org/wiki/Daylight_saving_time
mzl··on Delving into ChatGPT usage in academic writing through excess vocabulary
> academia is mostly about shitting out as many papers as you can

This is the classic case of publish-or-perish, since publication metrics are ubiquitous in all aspects of academic life unfortunately. Measuring true impact is the goal, but it is hard problem to solve for.

> and make them as verbose as possible

This is just laughably wrong. The page-limits are always too low to fit all the information one wants to include, so padding a text is just not of interest at all.

With that said, I wouldn't be surprised if people use ChatGPT a lot. If for no other reason most academics are writing in a language (English) that is not their native language and that is hard to do. Anything that makes the process of communicating ones results easier and more efficient is a good thing. Of course, it can also be used to create incomprehensible word salads, but I've seen a lot of those in the pre-LLM times as well.

mzl··on Apple's On-Device and Server Foundation Models
Yes, and if you recreate parts of what you learned you might run into copyright issues. Too much inspiration from something you've studied, and it becomes a derivative work subject to all the regulations. And there are no clear and strict rules, it is always a judgement call.
mzl··on Google Meet rolls out multi-device adaptive audio merging
My guess is that that would introduce too much latency (neural networks generally have bad latency).
mzl··on Why Are Sloths So Slow?
Who has ever said that evolution is perfect?
mzl··on OpenAI didn’t copy Scarlett Johansson’s voice for ChatGPT, records show
With the law, it is often about intent. If OpenAI had the intent to make a voice that sounded like Scarlett Johansson's in her, then I think that might be problematic for OpenAI. I am not a lawyer though.
mzl··on Show HN: Route your prompts to the best LLM
Sounds similar to the Composition of Experts from SambaNova (although that is for increased accuracy on single systems mostly, not for decreased cost from various suppliers): https://sambanova.ai/blog/samba-coe-the-power-of-routing-ml-...
mzl··on SEQUEL: A Structured English Query Language (1974)
SEQUEL and SQL are different languages (although related), and the SQL standard says SQL is pronounced as "ess queue ell"...
mzl··on Computing with JavaScript's Undefined (2020)
What Lisp would that be? Considering it is not (as far as I can see) mentioned in McCarthys History of Lisp (https://dl.acm.org/doi/pdf/10.1145/800025.1198360) I think no actual Lisp used unary arithmetic based on list lengths.

Sure, there might be toy examples used for teaching that did this, but that is a something different.

mzl··on Compiling with Constraints
The article links to the Unison project, which does optimal spilling and register allocation using constraint programming solvers.

The core idea is that memory for spilling is treated as an additional set of register-like locations, with costs for using.

mzl··on Show HN: LlamaGym – fine-tune LLM agents with online reinforcement learning
You could perhaps adapt the Doppel Bot slack bot from Modal Labs: https://github.com/modal-labs/doppel-bot
mzl··on Monte-Carlo graph search from first principles
Small side note, standard MCTS is often implemented with heuristic guiding the moves in the playouts and not just random moves, as that gives more interesting information.
mzl··on Researchers have found a faster way to do integer linear programming
The original paper (https://arxiv.org/pdf/2303.14605.pdf) that the linked article reports on is a theoretical algorithms paper, and does not contain any references to actual solvers or implementations.

For practical cases it is not that important what the worst-case complexity is, but rather what the expected complexity is of solving problems that occur in practice.

mzl··on Researchers have found a faster way to do integer linear programming
Lowering the algorithmic upper bound for a core NP-complete problem is always extremely interesting. However, this is not necessarily related to improving runtime for practical implementations solving the problem in question.

Solvers for mixed integer programming (MIP) use a lot of algorithms in conjunction with loads of heuristics. Building up the library of heuristics and strategies is a crucial part of why the improvement in MIP solvers have outpaced Moores law. From https://www.math.uwaterloo.ca/~hwolkowi/henry/teaching/f16/6..., the improvements in hardware from 1990 to 2014 was 6500x. But the improvements to the software are responsible for 870000x performance improvement.

The referenced article may become another part of the puzzle in continuing performance improvements for MIP solvers, but it is not in any way a given.

mzl··on Ask HN: What are you passionate about at the moment?
Just saw that it looks like an upcoming release of OR-Tools might include reified tables: https://github.com/google/or-tools/commit/94f3d9b46870e7ea04...
mzl··on Ask HN: What are you passionate about at the moment?
The key point for all of MDD, smart table, compressed tables, the case constraint, and regular expression and finite automata constraints is the ability to compress don't-care information, which essentially gives one reification for a low cost.

The implementation of a regular constraint can in essence be an MDD propagator (the implementation unfolds the automata into a layered graph, which is mostly isomorphic with an MDD), however it will depend on the implementation how efficient it is. In particular, if the original finite automata is already of an MDD shape with layers, some implementations (including the one in Gecode) will create too many nodes by creating all nodes for all layers.

Fun, didn't make that connection. Yes, it is a small world.

mzl··on Ask HN: What are you passionate about at the moment?
Thanks for the link. I think that your version of getting to a reified extensional constraint (your table method) looks like a reasonable way to do it, and probably works quite well for OR-Tools CP-SAT in particular.

Another way to do it directly is to embed the control variable in the table, with a full set of all possible tuples for when the control variable is false. This, however, gives a large blow-up of the table size, especially for wide tables/long words and might be too expensive. Using compressed/smart/cartesian product tables or MDD constraints if the system supports it would solve this (OR-Tools does not, AFAIK).

As for the Gecode model, my idea was that the way to model the words using separate element constraint for each letter could reasonably be extended into a model for reified words by changing the element constraints to tables over the triple <control variable, index, letter> in the above way. The benefit is that one would not trigger the combinatorial blow-up one gets for the above with a full table over the whole word since it is only a single letter.

In a related case, I used reified extensional constraints specified using regular expressions in https://github.com/zayenz/cp-mod-ref-2019-patchwork to optionally place polyominoes on a grid.

mzl··on Ask HN: What are you passionate about at the moment?
What model did you end up using? And what system did you do it in?

My immediate guess on how to model it would be to create reified constraints for the wordlists of different lengths (the constraints in chapter 22 of https://www.gecode.org/doc-latest/MPG.pdf). For each square, use standard logical constraints to check if it is the start of a word (previous square a black one, this square not a black one), and how long the word is (using backwards counting of runs). These can be used to trigger the reified constraints above.

If the word-lists are short-ish enough, then an alternative for the above model would be to model the whole words using MDD or regular expression constraints, with an added control variable and setting all values as don't-care for the false case.

mzl··on Show HN: Solve the best fantasy team with MiniZinc
I realized that there is more to do in handling the team positions. Since the number of each position is fixed, the whole array of team_position can be replaced with a fixed set of integers.

With that change, it is also possible to add symmetry breaking on the player identifiers within each type of player position.

These two changes taken together makes the HiGHS solver taker around 3.2s on my machine, and OR-Tools with 10 threads takes 1.28s.

mzl··on Show HN: Solve the best fantasy team with MiniZinc
Interesting model! Testing it locally, I could see that one issue in the model is that there is a lot of symmetry to the results. Enforcing that players in the team are ordered was not useful and did not help. Enforcing that the team positions were ordered helped a lot though, by extracting the `[position[p] | p in team]` expression as a separate array `team_position` and enforcing increasing on it.

With HiGHS the solve-time went from 1m7s on my machine (M1 Max) to just 7.23s. The model is solved at the root node with this change, as opposed to 1430 nodes without it.

Using OR-Tools 9.7 with free search enabled (see Configuration editor in the MiniZinc IDE) with the new model took 10.3 seconds. With 10 threads it is solved in 1.56s.

← PreviousPage 4 of 14Next →