zwegner's comments

zwegner | 3 years ago | on: Speedsolving Rubik's Cube: 8355 Method

There's a method entirely based on group theory, a version of the original computer algorithm created to solve the cube (the Thistlewaite algorithm) simplified for use by a human [1]. It iteratively solves the cube into simpler groups that need a smaller moveset to solve (the last step uses only half turns on each face, no quarter turns). It requires only a bit of memorization, and you can understand exactly how the algorithm works. It's not a great speedsolving method, but you can get relatively fast with it: in [2] there's a solve below 30 seconds.

[1] https://www.ryanheise.com/cube/human_thistlethwaite_algorith... [2] https://www.youtube.com/watch?v=GmjYWYDPhiM

zwegner | 4 years ago | on: Cubeast – Cubing the Smart Way

Yeah my MoYu also has a face or two that sometimes desync. Really annoying.

I have a basic case recognition feature, though no statistics are tracked there yet. I also have some code for tracking splits (only CFOP), though I haven't integrated it into the app for tracking stats.

csTimer has a ton of features too, but I've completely stopped using it, since CubingB has everything I need for basic timing and lots of improvements (like not losing session data, easily moving solves between sessions, partial scramble diagrams).

zwegner | 4 years ago | on: Cubeast – Cubing the Smart Way

Cubeast looks pretty awesome, but it only works in Chrome, which is a non-starter for me. So a few months back I started my own Python/Qt app, which is roughly similar to Cubeast, but less features as of now: https://github.com/zwegner/CubingB

I haven't had much time to work on it lately, and there's limitations like only supporting Bluetooth on macOS and only one type of cube (the MoYu AI), but it's open source and works pretty well as a timer (both for smart cubes and regular cubes).

zwegner | 4 years ago | on: Vim – Minimal Setup Explained

For a case like that, I'll use rectangular block mode--it's really fast and intuitive, so I'll usually pick that over :s/a/b/g if it's applicable.

The whole thing would be something like <ctrl-v>5jecs<esc>. Ctrl-v starts rectangular block mode, go down 5 lines and to the end of the word, change selection to "s", return to normal mode.

zwegner | 4 years ago | on: Show HN: Evil Wordle

The solution partitions the solution space exactly the way I want it to: it was designed for the site this thread is about. Obviously it doesn't work against an arbitrary adversary.

My solution is static and doesn't take any clues into account, so what you're saying just doesn't feel very relevant. The only "solution in general" to an arbitrary adversary, if you're not allowed to look at the clues it gives, is just to guess every single target word, which isn't very interesting.

Now, you could easily argue that the greedy strategy used by the site is suboptimal, and I'd agree, but AFAIK nobody's put up a site with a better one yet.

zwegner | 4 years ago | on: Show HN: Evil Wordle

This uses different word lists than Wordle/Adversarial Wordle, but still has a 4-guess optimum, no 3-guess is possible.

My solver's found about a thousand so far, here's a good one: "abyes choup donut dingo" (note that there are a number of 'fake' words allowed for guesses).

zwegner | 4 years ago | on: Adversarial Wordle

Four is possible in many ways:

    aiery canst dolma offal
    realo tings dampy humph
    raine scold bulgy ought
    ureas gilpy cyton conic
    lutea prosy canid cigar
    leary ungot camis humph
    stale groin dampy humph
If you're wondering what some of those words mean, Wordle (and this variant) have a big list of fake words it allows for guesses.

I think 4 is probably optimal, but my solver is still running. :) There's probably way more fours as well, my solver only prints new bests found, and this list is from progressively allowing a wider and wider search, so each result is from a separate run. I wonder how many end in 'humph'.

zwegner | 4 years ago | on: Titanpointe: The NSA’s spy hub in New York, hidden in plain sight (2016)

Ha, looking at the pictures, I thought "that looks just like the records building in the middle of season 3 of Mr. Robot", and it's the same building.

BTW this is unrelated to the thread, but Mr. Robot is an incredible show, and the middle of season 3 (where this building is featured) in particular is probably the greatest television I've ever seen. Episodes 5 and 6 are like a full two-episode climax to a story arc that had been building since season 2. I generally avoid any "hacker" type shows/movies for the cheesiness/cringiness of the hacker portrayals (and Mr. Robot does start off a bit cheesy), but I'm glad I made an exception here.

zwegner | 4 years ago | on: Leveraging SIMD: Splitting CSV Files at 3Gb/S

Yeah, I see how the quoting complications make CLMUL pretty hard to use (or just useless). I have a few ideas about how to deal with the quoting/escaping, and if I get some free time in the near future I'll try and code something up.

I've also pinged Geoff and Daniel on Twitter, linking your library: https://mobile.twitter.com/zwegner/status/147340073352554497... ...maybe they'll have some ideas. (Geoff has mentioned that he had done some initial work on a simdcsv)

I'll also drop some more links that you might've already seen, but could be useful otherwise. For removing double quotes, rather than memmove, you could use the "pack left" operation on vectors. There's a handful of ways to do this pre-AVX-512-VBMI2 (where the magical vcompressb instruction was added), like in these SO questions:

https://stackoverflow.com/questions/36932240/avx2-what-is-th...

https://stackoverflow.com/questions/45506309/efficient-sse-s...

And for keeping the main lexer structure that ZSV uses now, but using a small DFA to maintain the lexer state, this other trick from Geoff might work: https://branchfree.org/2018/05/25/say-hello-to-my-little-fri...

zwegner | 4 years ago | on: Leveraging SIMD: Splitting CSV Files at 3Gb/S

Thread's getting a bit old, hope you see this :)

Referring to the OP, I'm not sure what exact dialect of csv they're using, but its quoting rules are nothing like Excel's: quotes are escaped with a separate character (possibly backslash), and quoted regions can start anywhere, not just the start of a field. This makes CLMUL much easier to apply, quite similarly to how it's used in simdjson. Finding escaped characters can be done branchlessly with a handful of scalar operations on the masks (this code is in simdjson too).

For proper Excel-style parsing, you're quite possibly right (and looking at ZSV, I trust that you've thought about this problem a lot more than me). I'm not certain that it can't all be done efficiently with very few branches, though, using mostly SIMD and some scalar operations on masks. CLMUL might not be useful here, since quotes are treated completely differently depending on whether the field started with a quote. Instead you'd have a first phase basically looking for a comma or newline followed by a quote, then looking for the next unescaped quote. Escaped quotes within quoted fields can be found with a similar sequence to simdjson's backslash support (and removed with something like vcompressb on newer AVX-512 chips).

page 1