1. 2

    “ in a world where I can rent a machine that tries billions of MD5 calls per second.” wouldnt the test for a successful hash operation involve using the hash to decrypt the data on each try? This would make MD5 cracking prohibitively expensive.

    1. 3

      Would it really be prohibitive? AES is really fast, especially with hardware instructions… and you probably only have to try the first block to check for the private key’s header?

      1. 4

        This is exactly what JtR does: https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/src/opencl/ssh_kernel.cl#L225 Theoretically you could probably pipeline the AES into GPU processing too, which does slow the “raw” crack rate, but not all that much.

    1. 2

      This is a fascinating idea. the page itself could really use some more information - how many sites/toots is it considering? (“all posts” is a bold claim, especially for a federated system). A paragraph on the page itself explaining what its doing would be helpful, especially for visitors who are not coming from lobste.rs. A link to a description of the “HN algorithm” would also be nice. And finally, the source code would be a good reference, too. thanks!

      1. 7

        This passes on a good opportunity to place the “dynamically-hyped” pun.

        1. 15

          a language called rockstar could be touring-complete.

          1. 3

            bows deeply

        1. 3

          Mastodon has working federation today and it continuing to innovate (http://activitypub.rocks/). It needs more original content (and possibly a better way to discover new content) to be a true twitter alternative. Sign up for a mastodon account today, start tooting and follow some people.

          A list of open servers is available at https://instances.social/list#lang=en&allowed=&prohibited=&users=

          1. 2

            It needs is more original content

            I can agree on that. The current population of mastodon is mostly technology oriented people etc. No true artists politicians and so on are registered yet that I know of.

          1. 3

            came to learn about writing a desktop window manager in 2018, got rickrolled. robot-window-blinds are still cool. though.

            1. 2

              Using a user-provided CSS plugin like https://addons.mozilla.org/en-GB/firefox/addon/styl-us/ makes it easy to define:

              #emojifundraiser { display: none; }

              1. 17

                If only json had allowed trailing commas in lists and maps.

                1. 9

                  And /* comments! */

                  1. 3

                    And 0x... hex notation…

                    1. 3

                      Please no. If you want structured configs, use yaml. JSON is not supposed to contain junk, it’s a wire format.

                      1. 4

                        But YAML is an incredibly complex and truth be told, rather surprising format. Every time I get it, I convert it to JSON and go on with my life. The tooling and support for JSON is a lot better, I think YAMLs place is on the sidelines of history.

                        1. 4

                          it’s a wire format

                          If it’s a wire format not designed to be easily read by humans, why use a textual representation instead of binary?

                          If it’s a wire format designed to be easily read by humans, why not add convenience for said humans?

                          1. 1

                            Things don’t have to be black and white, and they don’t even have to be specifically designed to be something. I can’t know what Douglas Crockford was thinking when he proposed JSON, but the fact is that since then it did become popular as a data interchange format. It means it was good enough and better than the alternatives at the time. And is still has its niche despite a wide choice of alternatives along the spectrum.

                            What I’m saying is that adding comments is not essential a sure-fire way to make it better. It’s a trade-off, with a glaring disadvantage of being backwards incompatible. Which warrants my “please no”.

                        2. 1

                          http://hjson.org/ is handy for human-edited config files.

                          1. 1
                          2. 5

                            The solutions exist!

                            https://github.com/json5/json5

                            I don’t know why it’s not more popular, especially among go people.

                            There is also http://json-schema.org/

                            1. 3

                              I had to do a bunch of message validation in a node.js app a while ago. Although as Tim Bray says the spec’s pretty impenetrable and the various libraries inconsistent, once I’d got my head round JSON Schema and settled on ajv as a validator, it really helped out. Super easy to dynamically generate per message-type handler functions from the schema.

                              1. 2

                                One rather serious problem with json5 is its lack of unicode.

                              2. 3

                                I think this only show that JSON has chosen tradeoff that make it more geared to be edited by software, but has the advantage of being human editable/readable for debugging. JSON as config is not appropriate. There is so many more appropriate format (toml, yaml or even ini come to mind), why would you pick the one that doesn’t allows comments and nice sugar such as trailing commas or multiline string. I like how kubernetes does use YAML as its configuration files, but seems to work internally with JSON.

                                1. 8

                                  IMO YAML is not human-friendly, being whitespace-sensitive. TOML isn’t great for nesting entries.

                                  Sad that JSON made an effort to be human-friendly but missed that last 5% that everyone wants. Now we have a dozen JSON supersets which add varying levels of complexity on top.

                                  1. 11

                                    “anything whitespace sensitive is not human friendly” is a pretty dubious claim

                                    1. 5

                                      Solution: XML.

                                      Not even being ironic here. It has everything you’d want.

                                      1. 5

                                        And a metric ton of stuff you do not want! (Not to mention…what humans find XML friendly?)

                                        This endless cycle of reinvention of S-expressions with slightly different syntax depresses me. (And yeah, I did it too.)

                                        1. -5

                                          Triggered.

                                          1. 13

                                            Keep this shit off lobsters.

                                  1. 7

                                    A very nice post on Elm coding in general! Alternate title: Parsing JSON in a strongly typed language means writing the structure of that json in said language. Its a common challenge and I’ve recenly come across some helpful sites to take a blob of json and write the code that matches its structure.

                                    Elm = http://json2elm.com/ Go = https://mholt.github.io/json-to-go/

                                    1. 1

                                      Hey man, I really liked your link! Thanks for sharing it!

                                    1. 4

                                      I loved using Dvorak for many years but in the end the symbol keys were just too different. A couple years after quitting I learned about Colemak. Today I’d recomment Colemak to someone wanting to get away from qwerty. Colemak has a lot of the home-row advantages of Dvorak and leaves the symbol keys alone! (except semicolon goes up a row because home row is too valuable)

                                      1. 3

                                        Thank you for this!!!!

                                        After using Colemak (3+ years) and then attempting Workman (slightly better than Colemak at reducing discomfort with reduced horizontal index finger travel for me personally), I’m ready for a keyboard that’s optimized for reduced pinky usage (even on Windows/Linux machines, I’ve swapped Ctrl with Alt/Meta such that keyboard shortcuts primarily use my thumb like Mac OSX’s Cmd) while still reducing the horizontal finger motion that was so common with Colemak.

                                        Time to roll up my sleeves and learn QGMLWY!

                                        For anyone who suffers from typing discomfort, I can’t recommend alternative keyboard layouts enough. It’ll likely take a long while to get used to typing in a different keyboard layout, however (I believe Colemak took me well over 8+ months to get decently proficient at [80+ WPM; my QWERTY baseline is about 95WPM], and I never did get proficient to the level I would have liked with Workman…).

                                        However, if you’re not willing to take the plunge to retrain your muscle memory (not a small undertaking!), there’s two small changes that really helped me out which I would recommend to anyone:

                                        1. Swap Capslock with Backspace. No more reaching the top right side of the keyboard with your right pinky in an awkward motion! Some VIM users have told me they remapped this to Esc… but I’m much more of a Ctrl+C person (plus, after the second tip below, Ctrl+C no longer becomes a torture test on your left pinky!)
                                        2. Swap Left Ctrl and Left Alt so that hotkeys only requires your thumb to hold onto the modifier instead of your pinky! (This is unnecessary if you’re on Mac OSX)
                                        1. 2

                                          I had pinky problems and have been using QFMLWY for 6 years. It’s one of the best investments I’ve made in my career. If you want a keyboard try the Kinesis Advantage.

                                          I wrote a little more here last time this came up on lobste.rs

                                          1. 2

                                            Thanks for the testimonial! Btw, what made you choose QFMLWY over QGMLWY (the latter is the one with ZXCV unchanged)? Part of the reason I was attracted to Colemak/Workman was because I didn’t want to have to change my hot key muscle memory/bindings (one of the reason why I never gave Dvorak a try). I’m guessing you didn’t find that to be a problem?

                                            I’ve demo’d the Kinesis Advantage in person, and wasn’t quite a fan of the bowl size (I have small hands. I’ve also used the Ergo Dox previously and had to sell it because my hands also too small to reach the keys and the thumb clusters comfortably)–I’m thinking of getting a TypeMatrix 2030 keyboard since I did enjoy the columnar non-staggered layout of the Ergo Dox.

                                            1. 1

                                              Oops, I actually use QGMLWB, I can never remember which and just copied what I (mistakenly) said last time. They’re similar enough that you can confuse them so I don’t think it matters what you pick :) I’d just go with your intuition.

                                              However, your concern still applies. The answer is that I don’t use keyboard shortcuts outside of my custom Emacs setup in any significant capacity. But even if I did, it wouldn’t have been a consideration–I overhauled everything at once and just resigned to being useless for a few weeks.

                                              The TypeMatrix looks good to me except for Ctrl under the pinky. I think if I had used this keyboard I would have kept with the foot pedals.

                                              1. 1

                                                Yeah, I’m definitely going to give the “most optimized” version a try… What do I have to lose ;)?

                                                Re: TypeMatrix: Per my own “life pro tip #2” in my GP post, I would personally be swapping Left Ctrl and Left Alt, so that I’d be using my thumb instead of my pinky for Ctrl (I never ever use Right Ctrl anyways, so that’s not much of a big deal, and if I needed to use Alt, for say Alt + Tab, I just use a combination of my right thumb [on R-Alt] and my left ring finger [on Tab]).

                                          2. 2

                                            I took the hardware way to solve the ‘pinky’ problem, and bought a typematrix 2030. It brings the enter amd backspace in the middle so you use your index/thumb to press them. The shift/control keys are also taller to make them easier to access.

                                            1. 1

                                              I swapped CapsLock for Ctrl and its 1000% more comfortable for my hands to not have to reach for the Ctrl key. Having CapsLock on home row and then having it be such a rare keypress (does anyone use caps lock any more) is easy to change into a big win.

                                              I’ve used Dvorak for a couple years and as a programmer, I would recommend Colemak to someone interested simply because they leave the symbol keys alone. Having dvorak’s home row vowels is a huge win but largely off setted by putting <>? up at QWE.

                                              1. 1

                                                However, if you’re not willing to take the plunge to retrain your muscle memory (not a small undertaking!)…

                                                Still not a small undertaking, but you feel better even after an hour of fumbling as you learn it. Compared to Colemak and Workman where I still couldn’t get with O and I after weeks of practice…

                                                ‘A’ being on the other hand entirely will take some getting used to.