HNHacker News
TopNewBestAskShowJobs

indentit

887 karma · joined June 5, 2017

submissionscomments
indentit··on Sublime Text 4 (Build 4126)
This is only possible for syntaxes which ship with ST. If you want to put a Markdown fenced code block for a third party syntax like Svelte, then it won't be highlighted as Svelte currently.
indentit··on Sublime Text 4 (Build 4126)
Also, curious to know, what do you like most about developing Sublime, and what do you like least?
indentit··on Sublime Text 4 (Build 4126)
Have you had any thoughts about how to improve the indentation engine ST uses to handle the common "switch"/"case" statement style? As I understand, it would mainly require a way to unindent 2 levels at once when typing the closing brace (or just getting it to match the open brace line/position) and for the first `case` to not unindent, just the later ones (which to be fair, may already be possible with some creative meta scoping and tmPreferences fun, though perhaps just not easy to maintain).

e.g.

switch (something) {

    case one:

        return;

    case two:

        foo();

        break;

}
indentit··on Sublime Text 4 (Build 4126)
What would you say ST's main weakness is right now, and (how) do SublimeHQ plan to address it?
indentit··on Sublime Text 4 (Build 4126)
Pretty sure you're the best thing to happen to ST since Will joined the team :)

What's your test suite like? Whenever something is regressed in a dev build, do you try to cover it with tests? Or are the UI side of things not tested in an automated fashion?

What are the plans for matching VSCode's useful features, like the one whereby all syntaxes can inject themselves into Markdown fenced code blocks etc?

It'd be great to see some better SQL syntax highlighting support - I saw a community effort on the Packages repo aiming to address this. Will there be a way to switch "active" sql dialect? Or configure it per project?

indentit··on Tab Unloading in Firefox 93
Tabs which get unloaded automatically mean that, when you switch to them, you get a long delay before you can view the tab again, and worse: it makes a new HTTP request, so if you were viewing a Confluence page or something, you will be tracked for reading the page again. So it's not a feature I've ever liked, but I like that Firefox will only unload a tab if it thinks it will crash due to low memory situations because that has never been an issue for me before. It's the main reason I like to use Firefox, Chromium based browsers are waaay too aggressive with this in my experience.
indentit··on What if Git worked with programming languages?
I guess this is what diffsitter[1] is for.

[1]: https://news.ycombinator.com/item?id=27875333

indentit··on Congratulations, Mini, you made the stupidest turn signals ever
And if one tail light isn't working in the dark, or the view of one is obstructed, what then?
indentit··on The Future of discord.py
> I'm tired of being forced to 'log in' to services just to read important information (now being trialed by Twitter and Reddit as well!).

As a non-user of both Twitter and Reddit, I'm genuinely curious about what "important information" is there that isn't anywhere else? Presumably I'm missing something big?

indentit··on Reversing LZ91 from Commander Keen
Forgive me, as I've never disassembled anything myself(!), but would it not be helpful to be able to disassemble an executable into pseudo-code or something (I guess ideally something a bit higher level but re-compilable) alongside the assembly language? It seems to me that it could be much easier to understand what is happening that way, no?
indentit··on Preparing your game for deterministic netcode
A link to your Slime Volleyball implementation would be welcome too - haven't played it since about 2005 when all the slime games were java applets ;)
indentit··on Why programmers don’t write documentation
> Programmers are comfortable with just being pointed to a repo and text files, while non-programmers want WYSIWYG docs somewhere central, which is the last place most programmers even think about.

Yup, I think if you are forced to use central WYSIWYG documentation, it makes sense to link to it from the readme in the repo. There's nothing worse than having documentation but being unable to find it or being unaware of it - it may as well not exist, and was a waste of time writing ;)

indentit··on Better Architecture Diagrams for Agile Teams: actionable tips and lessons
I really like this approach - thanks for sharing! It's much easier to follow a Domain Storytelling diagram than the current technical flowcharts we use for domain documentation and visualisation at work.
indentit··on HTTPWTF
I just figured it was one of those words spelt differently in American English, which most RFCs etc are written in. (British English native here.)
indentit··on Basic Computer Games (ported to C#, Java, JavaScript, Python, Ruby, VB.NET)
This reminds that that sometime around the year 2000, I bought a boxed "Game Creation Studio" which came with a manual and a CD. IIRC the programming language was similar to Dark BASIC. I don't remember much more than that, but it was fun to edit the sample games like air hockey. It was useful not just for the code but the bundled graphics - I'll never be an artist. I donated it to a charity shop in my teens because I'd moved on to more modern/mainstream programming languages and thought I'd outgrown it. Since becoming an adult, I miss it and ofc can't find it anywhere. So I fully appreciate the effort to preserve classic "self-programmable games/tutorials" in modern languages :)
indentit··on Ask HN: What websites do you visit every day?
1. Discord

1. GitHub

1. Sublime Text Forums

1. Hacker News

indentit··on Hacking the Git Shell Prompt
Isn't this what starship-rs[1] was built for?

[1]: https://starship.rs/

indentit··on RFC 1178: Choosing a name for your computer (1990)
> Nobody expects to learn much about a person by their name.

That's a good point, but humans are very different to computers - machines (be they physical or virtual) are provisioned for a specific purpose (even if that is to be "Fred's PC"), whereas humans need time to grow and can decide for themselves what to do as a career / what their hobbies will be, and change it any time.

But realistically, yes, the RFC is right that you may end up with machines whose purpose changes or multiple machines have the same purpose etc. But when they don't, it is much easier to have meaningful names. If you will name them differently, then please make sure all developers can access the list/mapping document and it is kept updated. It's frustrating if you want to investigate some production problems but end up looking at the wrong server's logs because devops didn't tell anyone they moved an application /website etc.

I like someone else's comment about app01 being easier to reason about and recreate than something named more specifically, and in the modern world, its easy to spin up a new docker instance or VM so there's less need to "let's just add this small service on that machine because it has spare capacity" (where capacity could be CPU/RAM etc.)

indentit··on How to Write Readable Code
This explained a few things very nicely which I had in my mind for what makes readable code, but had never grasped well enough to be able to describe it so neatly. So thank you to the author and the submitter - I have bookmarked it and will be able to refer to it when I am writing code or reviewing pull requests :)

Specifically, I always have in mind that a function should "only do one thing", so having multiple layers of abstraction in the same function would be picked up by that rule generally, but I like the explanation given with "if a welcome email has not already been sent, send a welcome email". This approach also makes it easier to test parts of code in isolation.

indentit··on State machines are wonderful tools
Could 2 lookaheads starting at the same position not be used for this purpose?
indentit··on Reading Manpages Like a Pro (2018)
Bat[1] can also colorize man pages quite nicely. The advantage being it will also highlight C code etc.

[1]: https://github.com/sharkdp/bat

indentit··on Datasette-ripgrep: a regular expression search engine for your source code
> I've been working on a trigram-based search engine with support for exactly this (via github.com/trishume/syntect) over the past several months and plan on open-sourcing it soon.

Awesome, I look forward to that - you'll post a "show HN" for it, I hope? :) Does syntect's lack of support for the newest sublime-syntax features cause you any problems?

> You might also like https://comby.dev - it is aware of code structure without parsing files

Thanks for sharing, will check it out!

indentit··on Datasette-ripgrep: a regular expression search engine for your source code
Agreed, this is why I like the idea of searching parsed files, for example using scope selectors against code tokenized with a sublime-syntax grammar. Unfortunately, it means it needs to be parsed/indexed first, which is slower than a plain regex search.

I wonder if the AST built by Tree-Sitter could also help with this type of search - does anyone know of any existing solutions for this?

indentit··on Dev Fonts
But most text editors don't render ligatures if the characters span token boundaries. Sublime Text at least doesn't.
indentit··on Things I Wished More Developers Knew About Databases
Regarding the two operators being on call at once due to "write skewing"

> In the situation above, there will be a write skew if two of the transactions successfully commit. Even though no dirty read or data loss happened, the integrity of data is lost because there are two people assigned to be oncall.

Wouldn't it make more sense to have a separate table/single row to store it so the earlier mentioned row versioning checks could be used? Plus one could instead store the history of how the on call operator has changed instead of just having an "oncall now" boolean field against each operator.

indentit··on Open Source does not mean “Includes Free Support”
The problem I see with allowing PRs but not issues (or locking the reporting of them behind a paywall) would be that there is no way for someone to discuss possible implementation details without having already potentially have gone down the "wrong" path and wasted time (i.e. Maintainer won't accept the PR without a significant rewrite), or spent money to discuss it when they already plan to contribute time and code to solve their own use case.
indentit··on How the URL Was Built
I thought we just press Ctrl+Enter so we don't have to type `.com`. It would feel weird to have that fill in a prefix instead of a suffix, as one's text caret is typically at the end of what you typed so its cognitively similar to performing an insert than an append currently...
indentit··on Full-Bleed Layout Using CSS Grid
This is good advice. I recently tried to rewrite my resume in HTML and CSS because I was annoyed with LibreOffice's (though Word would be no different) table handling/UX - wherein my table ended right before the bottom page margin so I ended up with an unnecessary trailing blank page.

After switching to CSS grids, I had problems with alternating row background colors (I achieved it, but relied on knowing the contents when what I really wanted was a generic solution). Apart from that (and me wanting to group some elements together to make the markup a bit more semantic and `display: contents` having some weird interactions), it was quite a breeze. But, then I tried to print it to PDF, and discovered that browsers won't split a grid row over two pages even if I tell it to, so ended up with more whitespace in other places... Am now trying to decide whether to just use table markup as one cannot specify colspans etc in CSS with `display: table-cell`...

indentit··on Show HN: Trueq.io – A New Q&A Platform for Developers
What are your goals for sustainability? Will you charge for use of the website or have advertisements?

I've always been a bit sad that the websites we use most (GitHub, StackOverflow) are closed source, and was kinda hoping this would be an open source reimagining of SO, so it would be interesting to learn more about what differentiates TrueQ. I understand you are very happy with your post editor, and that its kinda more for discussions than "solve this problem" like SO is, but there are other sites in the StackExchange network which could also fill the same role :)

indentit··on Ask HN: Your Favourite HN Comment?
I really like this comment about learning to cope with programming when requirements keep changing:

https://news.ycombinator.com/item?id=24543596

> From where I sit (a backend developer, thoroughly burned out by webdev a couple years ago), most of coding I do is software bureaucracy. Turn this data into that data, ensuring module X and Y get paged in the process. Oh, half of the code I'm about to write is implemented elsewhere - quick, figure out how to juggle the dependency graph to somehow route control from here to there and back. This data I want to convert is not of the right colour - oh, I need to pass it through three sets of conversion layers to get back essentially the same, but with a correct type tag on it. Etc.

> It's utterly and mind-numbingly boring, unless you architectured the whole codebase yourself, at which point it's somewhat fun because it's your codebase, and who doesn't like their own Rube Goldberg machines?

> At this point, I've learned a coping strategy: just forget the project scope and focus on your little plot of land. Doesn't matter that the software I wrote half of is going to help people do exciting stuff with industrial robots. What matters is that the customer changed some small and irrelevant piece of requirements for the 5th time, and I now have to route some data from the front to the back, through the other half of the code, written by my co-worker (a fine coder, btw.). So a bunch of layers of code bureaucracy I'm not familiar with, and discovering which feels like learning how to fill tax forms in a foreign country. If I start thinking about the industrial robots I'll just get depressed, so instead I focus on making the best jump through legacy code possible, so that I impress myself and my code reviewer (and hopefully make the 6th time I'm visiting this pit easier on everyone).

> Maybe it's a problem of perceptions. Like in the modern military - you join because you think you'll get to fly a helicopter and shoot shoulder-mounted rockets for daily exercise. You get there and you realize it's just hard physical work, a bit of mental abuse, and a lot of doing nothing useful in particular (at least until you advance high enough or quit). And so I started coding, dreaming I'll be lording over pixels on the screens, animating machine golems, and helping rockets reach their desired orbits. Instead, I'm spending endless days pushing people to simplify the architecture, so that I can shove my data through four levels of indirection instead of six (and get the software to run 10x faster in the process), and all that to rearrange some data on the screen that really should've been just given away to people on an Excel sheet with a page of instructions attached.

← PreviousPage 2 of 6Next →