HN Simulatornew | past | comments | lists | submit | stackghost's commentslogin

I use emacs every day, with a minimal config, and would never describe it as snappy. The entire thing is single threaded so the UI locks up at the slightest provocation, like for example when firing network requests whilst packages are updating.


Emacs can run external processes asynchronously. It is true that Emacs locks up while updating packages but it is actually not while downloading or unpacking them! It locks up while byte-compiling them. :)


Maybe it can but it sometimes doesn't.

I remember I looked into a lockup I was experiencing (this was a few years a ago so I forget the mode). Turns out emacs was writing to disk every so often and this was noticeably causing stutters in the main thread.


You are correct, my emacs locks up constantly. Mostly due to linting and syntax highlighting, but also with the emacs terminal.

It really depends on the package, but too many fundamental packages are still operating in the main event loop.


Okay, well either way, the UX is atrocious.


What is it that bothers you about the UX?


> would never describe it as snappy. The entire thing is single threaded so the UI locks up at the slightest provocation

This part seems to be about the User eXperience. (which I agree with, but elisp can start child processes and wait for the results asynchronously, so this is the fault of whoever wrote the code https://www.gnu.org/software/emacs/manual/html_node/elisp/Ou... )


I've been using Emacs for over 25 years, and I cannot agree at all with the sentiment that the UI locks up frequently. I mean, it depends on exactly what you do with the program, but for me, the UI is always responsive.


>Has anyone used this?

I have, it's awesome. There are some rough edges and some niceties/third party packages from emacs that I missed, so I ended up going back, but lem is very promising.


Does it have multiple cursors like https://github.com/magnars/multiple-cursors.el ? I consider it as a mandatory feature.



Thank you very much.


> niceties/third party packages from emacs that I missed

Was it magit?


Lem has Legit. While missing some features, it works well enough for the daily add/stage/commit loop that makes up 90% of my git commands. It also uses less git commands so it's a fair bit snappier than Magit on large repos.

I can see the lack of org-mode being a dealbreaker for some, but I personally use markdown for my notes/docs so no issue there.


It’s always magit


Or Org. I like Magit, but I don’t miss it that much if I use e.g. Vim.

Org on the other hand is a deal-breaker, and the main reason I’ve been stuck in Emacs for years…


The smug condescension in the AI comments is exactly on-brand for HN. Nice work OP.


I do this with plain ol' makefiles.

Even for projects where Make isn't part of the build pipeline, like Rails or C++, I have a standardized makefile I put in the project root, using includes for "secrets.mk", so I can do things like "make deploy" and it Just Works(tm).

Sometimes the old ways are best!


Another neat and simple trick it to have the first target in the Makefile print out a helpful message that tells the reader what the project is and how to use it. One of those things that is useful both when you are working on the project and when you later return to it, years later.


I use this pattern for my makefiles. First item is for "help", and it dynamically scrapes all the other commands (assuming format : ## ). So if I do 'make help' it'll list all the commands in the makefile without much extra work from me.

.PHONY: help

help: ## Show this help message

@grep -E '^[a-zA-Z_-]+:.?## .$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' @echo "" @echo "Examples:" @echo " make deploy" @echo " make deploy-branch BRANCH=feature-x" @echo " make deploy AUTO_START=true"

.PHONY: deploy

deploy: ## Deploy from current branch (default main) (use AUTO_START=true to restart service after)

@$(MAKE) _deploy BRANCH=$(git branch --show-current)


That's definitely an option, though I prefer to just put a README. No reason you couldn't have the default make target just execute `cat README.md`


>all you get is the possibility to [...] execute code

Anyone who's ever done even a beginner CTF knows that achieving code execution is a big deal.


Yep, once you have code execution you find a local privilege escalation and go from there.


The point is you can not trust that people patch stuff like this in time. So practically you have to make it really hard, in a CTF of course it is easy. Defense is in depth. There are architectural issues, e.g. we only allow one upload per instance., and sanitation is done away from initial upload handling and processing. I would say that even local root is not that bad if you play your cards correctly. (What ever root mean nowdays with CAP dropping etc)

Enterprise security can be good if people are paranoid when they build the infra, but as is highlighted in this thread many patch requirements are stupid.


These calculators are, without question, excellent little devices and the HP ones in particular had great engineering behind them. I had an HP48 in undergrad, which was considered pretty much mandatory for engineering. There was a thriving student sneakernet of programs you could get that would trivialize certain problems. Some friends had the HP49G which was, in my opinion, a step down in terms of build quality. Years later I bought an HP50 which was the best of both worlds.

I still have my HP50 but there's just no reason to use it. Anywhere I go I either have my phone or a computer. When I was in the air force I would have to go into EMSEC zones where you couldn't bring external devices, such as SCIFs, but the number of people with needs to be running engineering calculations in such an environment rounds down to 0. Certainly I wasn't one of them.

Even "in the field" nowadays, you're likely to have satellite connectivity and a laptop. There's just not really a use case for graphing calculators that I can think of. It's too bad, because they're awesome.


I still have my 50g on my work desk for one reason - to do calculations with units. Admittedly I use emulation on my phone mostly, but the 48-50 units calculations are still the best I’ve used. (But if I don’t need units I use my SM 42).


MathCAD or GNU units work well enough for me


>2x13 hours plus a few hours airport time.

That sounds like pure torture


Isn't everything, really? A dentist's appointment for example. It has an end, and then you're glad you had the courage to go through it.


The longest I've spent in a dentist's chair is perhaps an hour, when I had braces as a teen.

Being cooped up in a metal tube for 13 hours, knowing you had to do the same thing tomorrow, and then the same thing two more fucking times on your way home, is not worth any vacation to me.


Then don't do it for vacation. A resort in Australia is no more valuable to you than one in Florida (if you're in the US). Do it for something more meaningful.


I thought the original purpose was to rEwRiTe iT iN rUsT and replace gecko in Firefox?


From the presentation announcing Rust inside of Mozilla: https://venge.net/graydon/talks/intro-talk-2.pdf

> We are not “rewriting the browser”. That's impossible. Put down the gun.


Impossible in 2010, maybe


Regardless if it's still true or not, the original purpose was not to re-write Gecko.


>How do you make an std::array of a given type? Wrap the existing type in an extra layer of std::array, we all know this

huh? where is the extra layer?

    std::array array_of_ints = { 1, 2, 3, 4, 5 };
>How do you make a C-array of a given type? Oh boy, "prepend the array specifier before the list of existing array specifiers"

?

    int c_style_array[5] = {2, 3, 5, 7, 11};


I assume he means multi-dimensional arrays:

    std::array, 5> array_of_ints;
    int c_style_array[5][3];
But the C-style array is more readable, so I am not sure what the complaint really is about.


No, I think he means that for any given type, you can wrap it in an array the same way. Your example is demobstating that it even works recursively, but it works in the simple case too by wrapping "int" in an array to get an array of ints. There's no need to jump back and forth between each side when adding new layers (which gets described as a "spiral", but in a single line of code, I'd argue that it's really just jumping back and forth, and that's why it's annoying to people like the parent commenter and I)


If I would add another array, it would look like:

int c_style_array[2][5][3];

There is also no jumping back and forth. C declarations are also recursively constructed. One can complain about the irregularity of pointers syntax.


Yes, if you only use arrays, then it doesn't make things confusing. The point they were making (as I understand it) is that putting a pointer inside std::array doesn't change the way you have to read it, which is not the case for C arrays.


The "existing type" in your example is int, the "extra layer" is the array type that "wraps" it


I guess? That's pretty confusing wording, and a bizarre rant if so.


I don't find it confusing or bizarre, but those are both subjective, so I can't say that you're wrong.


>"Slow is smooth and smooth is fast."

When I was in basic the instructors repeated this incessantly. About two thirds of the way through what Americans would call OCS they made us walk into "the gas hut" which is a concrete bunker-like building in the middle of a field near the rifle range.

Inside the hut is a hot plate with an old shitty skillet. Inside the skillet are pellets that give off tear gas when heated. You walk into the hut and immediately get slapped in the face by what I might charitably describe as the worst onion-eyes you've ever experienced, multiplied by at least 100.

But the training is fantastic because in that moment as I was standing there with my eyes scrunched and burning, I unconsciously whipped out the gas mask, put it on, did the proper drills with the filter and decon cream, and had no conscious recollection of having done so. The urge to rip off the mask and rub your eyes is overwhelming. The instructor told me "good drill" and sent me on my not-so-merry way.

Same thing with mag drills. You slap that forward assist without even thinking. Anyways, slow really is smooth which really is fast.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: