HN user

matejn

370 karma
Posts0
Comments35
View on HN
No posts found.

I hate that even more, especially since Visual Studio introducted it. I had the habit of selecting some text, and then typing to replace it. Now when my replacement starts with a parenthesis or quote, the text just gets surrounded instead!

Maybe this is just an XKCD moment https://xkcd.com/1172/ ...

I like the SQL solutions people posted. But what about this one in Prolog?

  ?- setof(Author, Book^Pages^(book_author(Book, Author), book_pages(Book, Pages), Pages > 1000), Authors).
Depending on the structure of the Prolog database, it could be shorter:
  ?- setof(Author, Pages^(book(_, Author, Pages), Pages > 1000), Authors).

I completed last year's in Scryer Prolog and it was a joy. Some problems were almost impossible due to the lack of mutation (Karger's algorithm comes to mind), but file parsing was a breeze and I find Prolog programs generally beautiful. My favourite syntactical feature is the full stop at the end of clauses.

I think the same applies to laws. You can't get information on why a law was passed, and many of them end up seeming odd or even counterproductive.

I think Windows will shorten the lifespan of your SSD even if you use "shut down", at least if you don't disable "fast startup". "Fast startup" basically replaces "shut down" with a light form of hiberation, which makes shutting the machine down take a long while and turning it on about a second faster. Not worth the tradeoff in my opinion. I also got some bugs when using fast startup, sometimes the sound wouldn't work until a reboot or my WiFi took weirdly long to connect. This is on a Lenovo Yoga/IdeaPad.

Hmm I used Vim for about 10 years and I never used R. I preferred one of the c- variants, usually ct and cas. I guess it depends on acquired muscle memory?

Oooh! I put that string there! It was a request by management, and I still don't know why. This site doesn't store any passwords, it's basically just a nice interface to external account management.

I heard a rumour that some legacy apps have weird validation on their login fields, so students wouldn't be able to log in with passwords containing certain strings. But I don't actually know of any examples.

I think it's quite normal to live in a 100+ year old building in a European city center. Though they're usually made from brick and not concrete.

And do people who have built their own house usually demolish it and move on after just 30-40 years? That's when you've just paid off your mortgage, heh.

At my parents' house, they just replaced the roof, which was well over 30 years old. The house itself is over 100 years old and completely fine to live in.

Prolog's execution model is well defined so there shouldn't be any surprises to the proficient programmer. I'd argue it's less surprising than what a C optimizing compiler does.

TurboWarp Desktop 4 years ago

My first foray into programming was on an HP-41C calculator. At the time I didn't know it was "programming", I just used it to make life at school easier. Kind of seems like an Excel moment now, where most people don't know they're "programming".

Programming Fonts 4 years ago

I also don't understand the default muted grey comments. I usually configure comments to be a bright red color.

I've recently had to copy a bunch of files over two Windows Servers and was pleasantly surprised by robocopy's (basically Windows' rsync) solution to this dilemma: the first two parameters always only refer to directories, and then you can list specific files starting with the third parameter.

This way there can be no confusion whether you're copying the contents of a directory or the whole directory, and you can't create a duplicated directory within your destination by mistake.

I have seen and used a close-door-to-start microwave. It was a regular microwave where the timer knob was broken. Every couple of weeks you would use pliers to turn the remaining spindle of the knob all the way to the right to reset the timer. :)

How is that a one liner?

Compare to: cp srcfile destloc/destfile

Edit: In addition, the above gulp command reports success even if the file doesn't exist. If you want to check that, you need to import another library and expand the command with another pipe.

I believe "x install your framework" is the job of a package manager, not a build tool.

I don't see how your argument holds ground. If everyone used make, tooling would support it, and you wouldn't need to learn the "quirks and tricks" of a dozen other systems.

The problem with make is that it's not portable, since it needs to call system specific binaries, like rm(1) vs del. There's also the BSD vs GNU divide.

Other than that, a newfangled tool like gulp doesn't even have a clean one liner for copying one file to a different location with a different name. It's absurd.

My laptop has a pretty bad screen and several shades of light grey and dark grey appear white or black, respectively, so these sites can be really annoying.