Hacker News new | past | comments | ask | show | jobs | submit | msravi's comments login

Why stop at greek or arabic when you can go all the way to sanskrit?

The words for sine and cosine derive from the sanskrit jiva (meaning bowstring, i.e., the chord of a circle)[1]. Sine and cosine were respectively jya and koti-jya, which got transcribed into arabic without the vowel (where it meant nothing). They then pronounced the vowel in the wrong place, calling it jeb (which meant pocket or fold in arabic)[2]. Then this wrong word got translated into latin as sinus (fold), and hence we have sine and cosine!

1. https://en.m.wikipedia.org/wiki/Jy%C4%81,_koti-jy%C4%81_and_...

2. https://en.m.wikipedia.org/wiki/Sine_and_cosine#Etymology


The wikipedia link has this occurring in the 12th century. But Hellenistic astronomers were already working with sine tables. What did they call the concept?

...where "we" = the nazi party's amazing rocket science team that the US spirited away from Germany after WW2.

https://en.m.wikipedia.org/wiki/Wernher_von_Braun


"Once the rockets are up, who cares where they come down?

That's not my department!" says Wernher von Braun.

https://www.youtube.com/watch?v=TjDEsGZLbio


That = should be a ⊃.

Sure.

NASA rocket team ⊃ Nazi rocket team

fuel-air mixture ⊃ fuel


Actually, I'm wrong. Part of the Nazi rocket team ended up on the Soviet rocket team, not the NASA rocket team, so it should more precisely be:

{NASA rocket team} ∩ {Nazi rocket team} ≠ ∅

Disney sure did a good job laundering the chief rocket Nazi's background. With the help of a certain paperclip, of course.


Disney had previous experience in that kind of tough laundry.

> things like "partial derivative of pressure with respect to volume" and add "at constant temperature"

They're the same thing, isn't it? Except that with add the "at constant temperature" addendum, you're just making explicit the other variable(s) that can potentially be varied. Without it, it just means all other variables, whatever they may be, are constant.

But if something depended on both temperature and some other quantity X, and you said "partial derivative of pressure with respect to volume at constant temperature," that would be sort-of misleading because you're only exlicitly mentioning one of the other two variables - rather, you should say "at constant temperature and X" or not mention either of them.


They aren't the same thing since the first is strictly speaking not well defined - see my answer to the OP. I think the problem is that physicists use the same letter, say U, to denote multiple different mathematical functions depending on the context. The "holding XXX constant" thing serves to tell you which function you're dealing with formally.

What do you use to fetch email? mbsync keeps messing up the UID of emails with gmail.


Personnaly, I use https://gitlab.com/shackra/goimapnotify , you can add a `~/.config/imapnotify/{{ youremailaddresshere }}.yaml` config file for each of your email addresses and enable and start it as a systemd service with `systemctl --user enable ---now goimapnotify@{{ youremailaddresshere }}.service`

Here is and example of a config file for a gmail address :

```

  host: imap.gmail.com
  port: 993
  tls: true
  tlsOptions:
    rejectUnauthorized: false
  username: {{ youremailaddresshere }}
  password: ''
  passwordCMD: pass mw/{{ youremailaddresshere }} | head -n1
  onNewMail: mailsync {{ youremailaddresshere }} | while read OUTPUT; do notify-send "" "$OUTPUT"; done
  onNewMailPost: ''
  onDeletedMail: ''
  onDeletedMailPost: ''
  boxes:
    - INBOX
```


> format

indent it with 2+ spaces

  like
  this


Thanks!


> tlsOptions:

> rejectUnauthorized: false

Means trust any cert?


Yes, thanks for pointing it out, it should be true.

I took it from my config which I did a long time ago and I guess I didn't pay attention enough when doing it, my bad !


Just Mutt's IMAP support.


offlineimap does the job for me I use it with Gmail and owa (trough davmail)



I really love working in neovim but this is a frustrating position that much of the community has taken. Editing multiple sites _simultaneously_ is nowhere as intuitive as with VS Code and IntelliJ/Sublime before it.

- Repeat - `.` - is ok for some bulk manipulations but in my opinion it's not as nice because it's after the fact. I like that in VSC I select all the occurrences I want to edit first and then if the selections match my expectations I go ahead.

- Visual mode only lets you work vertically in a contiguous block of text. That's not the same or as convenient as multi-cursor in VSCode where I can select the word "const" for example and ⌘-D to select more occurrences of it anywhere in the buffer, not just above/below, and bulk edit them to "let".

- Macros are often what I lean and they can do far more than multi-cursor editing could but they are far more tedious to string along and repeat when all I want is to change some text in multiple locations.

- Text replacement (sed) is also fine but not as convenient in my opinion.

Either way, neovim will be getting native multi-cursor support and I'm very excited about that because I'm not particularly fond of VS Code (in terms of perf/resource usage) but I recognise (neo)vim doesn't have a monopoly on good ideas.


There's also vis[0]

It is an editor that combines best parts from vim and plan9 sam[1] (multiple cursors, structural regular expressions).

0 - https://github.com/martanne/vis

1 - https://en.wikipedia.org/wiki/Sam_(text_editor)


I may not need it, but every operation they demonstrated is significantly slower than using multiple cursors, so I definitely want it.


If I want to change a word on one line, I find it faster to do <esc>cw replacetext rather than use the mouse to select the text and then replace text.

If I want to do that on 2-3 lines, I just use /findtext n and . to redo the prev command.

Anything more than that becomes a full search/replace.

Ymmv. It's just what I find efficient, given my muscle memory.


The point is that single-cursor editing is a special case of multiple-cursor editing. If there's value in any single-cursor editing operations that don't use regex (or other indirectness) then they have value when used with multiple cursors, too.

The mouse doesn't necessarily come into the discussion at all.


In vim, to replace in the next 5 lines (not instances)

    :.,.+5s/findtext/replacetext/g
In neovim, you'll see a preview of the changes as you type the regexp. Neovim is really good.


It's mostly a matter of taste. I do use multiple cursors quite often in Sublime Text when needing to edit some CSV or JSON file. It's probably the feature of Sublime Text, why i'm still having the editor around. It work's extremely well.

I could type ":.,.+5s/findtext/replacetext/g" in vim (and remember the syntax!) or i just could do "ctrl-d, ctrl-d, ctrl-d, ctrl-d, ctrl-d, replacetext" and have a visual, immediate confirmation on what i am doing. But i bet you, that i'll press ctrl-d 5 times faster than you entering ":.,.+5s/".


You do not have to remember the syntax; you can use Vimscript and you can create a custom keybinding that prompts you for the "findtext" and "replacetext" strings, then apply the search-and-replace operation over the next 5 lines (number of lines is easily adjustable and can be prompted for it, too; it does not have to be hard-coded either).

Vim users don't have to choose between precision and ease of use as you can build macros or mappings that match ANY workflow, creating powerful, customized processes that minimize the need to remember exact syntax or type it all out, for example achieving results similar to multiple cursors but with Vim's inherent efficiency and scalability. So, while Sublime Text's multiple cursors are handy, Vim can match - and even exceed - this functionality with very little setup (emphasis: one time setup!).

(I use VSCodium (which I really enjoy) for Go, PHP, and Elixir; IntelliJ IDEA for Java and Kotlin, and I use both Emacs and Vim for everything else).


I more commonly solve a problem like this one with /findtext<CR>creplacetext<Esc>n.n.n.n.

Remembering the syntax is not a problem here. Learning it in the first place, on the other hand...

I do like multiple cursors though. I end up switching to VSCode a couple times a week to do things where it's the right tool for the job.


What about holding down the shift arrow, pressing the down arrow five times, then ctrl-r? In most IDEs replace with an active selection will default to replacing only in the selection.


I speak vim, but vastly prefer multiple cursors when the editing is less trivial. Say you want to turn

  "foo bar" # For the 1st line
  "baz qux" # For the 2nd line
into

  "bar" # For the foo key
  "qux" # For the baz key
With multi cursors, you could select foo and baz and then interactively edit the rest of the line. I'm capable of doing that with vim, but by the time I'd even settled on an approach for it, I'd already be done in the other editor.

I could use Emacs macros to do the same kind of thing, and I've probably used `C-x (` a zillion times to build procedures I could then run 30 more times on the following lines. For quick interaction, I still prefer multi cursors.


For this specific example it's a visual block select of <foo > / <baz > cut and then visual select of <1st > / <2nd > and paste. But that's relying on things being the right width.

This is two lines, if everything was a different length, I think by the time I got multiple cursors to do this, I would have long managed by just doing the same editing task twice (cut overwrite-paste then cut overwrite-paste).

If I had to do this for many more lines I would have just used a substitution:

    :s/\(.*\)"\(\w\+\) \(\w\+\)" # \(.*\)\(\d\+\w\+\).\*/\1"\3" # \4\2 key/
And yes, that's 100% unreadable, but it was easy to write with the preview mode on modern neovim.

Although in this case I think a macro would probably be what I would settle on. This macro would look like:

    ^wdw/the<ret>wvawpwciwkey<esc>j (<ret> and <esc> are ^M and ^[ but I replaced them to avoid confusion)
But these are already the motions you would need to use to keep the multiple cursors in alignment. The thing is though that if you screw up it's usually easier to unscrew yourself when it's just one line than when you've gone ahead and screwed up 20 times. Yes it's still just an undo but when I've used multiple cursors, especially when you're trying to break up lines, you're forced to deal with that breaking up happening in all cursors. Things quickly get overwhelming.

Multiple cursors are effectively (in my experience) just macro recording with automatic playback simultaneously at all the positions you care about. Whereas if you just record a macro and apply it wherever you would otherwise place your cursors, you get the same result without having the visual mess of dealing with multiple cursors. And it's just as error prone as macros.


For longer distance, I use search navigation, faster than scanning where to put the cursors.


Vim can do multiple cursors as long as they start on the same column: ff<ctrl-v>jdw


But then you'd have to count beforehand and have no good way to correct instead of just going off that sweet immediate visual feedback


Vim, and I'm sure neovim, allow visually selecting an area by lines. If you then type ":" to initiate a search and replace, it will apply only to those lines.


Why would I want to go via this roundabout way? What happens if I decide to add/remove one more line to the mix later?


Say I want to change "foo" to "bar" in a single function in my file. I hit "V" to enter by-line visual mode at the top of the function, go to the end of the function and type ":s/foo/bar/g". If there are other words in the function that contain foo as a substring, then ":s/\<foo\>/bar/g".

Please describe your non-roundabout way then.


> If there are other words in the function that contain foo

How would you know that???

So that's the first roundabout eliminated:

- set word selection by default not to have to worry about substrings

But otherwise you're describing a different workflow: while there is no semantic meaning in the "next 5 lines", you actually don't know whether that would be 5 of 7, that's the whole point/benefit of incrementalism, there is in "this function", so block operations are a valid contender and I could also select the function and search&replace within the selection instead of doing word-by-word.

But then the original also works in a more direct way (maybe you actually don't want to replace all "foo" in a function, but skip some of them):

So you would skip your two roundabouts:

- go to the beginning of a function

- go+select to the end of a function

Then proceed with the "direct" way:

- go to your desired word anywhere within the function

- invoke select forward/backward commands until visually reaching the beginning/end of said function (the candidates will all be highlighted)


Thank you for your detailed reply. So let me address the points.

> How would you know that???

Typically I'm working on code that I wrote, or I've been studying it enough that I've gotten to the point that I'm refactoring and editing it. It isn't like a gameshow where I have a blinder on and then the blinder is removed and I'm given a task to perform.

> - set word selection by default not to have to worry about substrings

So you have to do another step? I can pick word selection or not dynamically on a case by case basis without having to go somewhere else and turn word mode on or off. Or maybe I'm misunderstanding how your editor works. At any rate, I don't see how my approach is roundabout -- I directly express if I want complete word matching or not, and I can even mix both types in a single search/replace operation.

I don't understand your next point -- I can select the body of a function without knowing how many lines it has. It isn't clear to me what your approach is, "incrementalism". Are you doing a word search and replace one at a time? I thought we were discussing multi-cursor editing.

> Then proceed with the "direct" way: > - go to your desired word anywhere within the function > - invoke select forward/backward commands until visually reaching the beginning/end of said function (the candidates will all be highlighted)

What you've described is just another way of doing it, not fewer steps.


> Typically I'm working on code that I wrote, or I've been studying it enough that I've gotten to the point that I'm refactoring and editing it

That doesn't explain it. You can't know for any "foo" whether all the content, including comments, has "foo" as a subword for any non-trivial amount of text because you're not a computer.

> so you have to do another step?

No, you reduce many steps having to specify word-based selection every time with a cognitive overhead ("If there are other words") with a single default.

> I can pick word selection or not dynamically

So can I, and I don't need to do precision jumping in the middle of a combined text field to do that, but that's a different benefit

> It isn't clear to me what your approach is, "incrementalism"

when instead of counting 5 lines and selecting them you press a selection key the amount of times is needed to select what you need

> I can select the body of a function

and as I've pointed out, that's a different workflow. You've added a "in this semantic block" requirement and mistakenly compare it to the original incremental one

> just another way of doing it, not fewer steps.

it is fewer steps, I've pointed out which steps are not needed, and then there is another condition complicating your simple explanation when it's not a certainty that you actually want to replace everything within a block. But again, within semantic blocks there are different tradeoffs


I'm not dumb and I'm sure you aren't either, so I think we are failing to imagine the same scenario the other is.

>> I can select the body of a function > and as I've pointed out, that's a different workflow. You've added a "in this > semantic block" requirement and mistakenly compare it to the original > incremental one

Yes, I picked that scenario because doing search & replace on all vars of a given name across the whole file doesn't require selection. Yes, I would normally want to replace that var name when it appears in comments too. Yes, I typically have a very good if not perfect knowledge of whether foobar is a variable name only or might appear as a substring of something else. If my variable name was "n" then I'd have to take more care.


> across the whole file

The original scenario explicitly states "not every instance in the open file ", so not sure why you bring that up

> in comments

same, where is this coming from? That adds no difference to these 2 workflows

> very good ... knowledge

This is just self-deception, you don't have the full text with auto-matching built into your brain, and since 'n' is an rethorical alternative, in reality you wouldn't even have a great way of knowing when to take more care


Clearly you know what work I do better than I know do.


Clearly I know the basic capabilities of a human mind better than you do.

But also: how is your very serious "I know all the text" limitation relevant to this general comparison of 2 approaches?


I think even the people advocating these stupid keyboard combinations don't really use them... they just think that it makes them sound smart.


There is a way to express your opinion without insulting people about something you have no way of knowing.

As a simple matter of fact, I have been using vim since the mid-ish 90s every day and do exactly what you claimed don't really do.


I hate to break it to you but you don't. I know that because there have been studies trying to show how using the keyboard is more efficient than the mouse. Every time, even when people swear they don't use the mouse to navigate text files, they do, and they do it a lot, nearly as much as anyone else. It's a great demonstration to how you just can't trust people's testimonies as they lie while actually believing their own lies (i.e. the really believe to be telling the truth which is fascinating).

I am proficient in emacs and don't need the mouse to do anything, but I am conscious I still reach for the mouse when more complex movements are required because it would be extremely dogmatic and unproductive to do otherwise, as it's just so much easier, and there's absolutely no shame in using the right tool for the job.


>Theoretical physics is highly mathematical, but it aims to explain and predict the real world. Theories that fail at this “explain/predict” task would ultimately be discarded.

This isn't really true, is it? There are mathematical models that predict but do not explain the real world. The most glaring of them is the transmission of EM waves without a medium, and the particle/wave duality of matter. In the former case, there was a concerted attempt to prove existence of the medium (luminiferous aether) that failed and ended up being discarded - we accept now that no medium is required, but we don't know the physical process of how that works.


We have lower error predictions but don't know why.

Methods for explaining why include Counterfactual inference and/or now quantum Causal interference.

All or some of quantum statistical mechanics, fluid dynamics, and quantum chaos intend to predict with lower error too


On the Cave and the Light,

List of popular misconceptions and science > Science, technology, and mathematics : https://en.wikipedia.org/wiki/List_of_common_misconceptions :

> See also: Scientific misconceptions, Superseded theories in science, and List of topics characterized as pseudoscience

Allegory of the cave > See also,: https://en.wikipedia.org/wiki/Allegory_of_the_cave

The only true statement:

All models are wrong: https://en.wikipedia.org/wiki/All_models_are_wrong

Map–territory relation: https://en.wikipedia.org/wiki/Map%E2%80%93territory_relation :

> A frequent coda to "all models are wrong" is that "all models are wrong (but some are useful)," which emphasizes the proper framing of recognizing map–territory differences—that is, how and why they are important, what to do about them, and how to live with them properly. The point is not that all maps are useless; rather, the point is simply to maintain critical thinking about the discrepancies: whether or not they are either negligible or significant in each context, how to reduce them (thus iterating a map, or any other model, to become a better version of itself), and so on.


Qualcomm's modems are hard to beat on one critical factor - power. Over multiple generations, with millions of devices on the field, they've had the advantage of tweaking their designs (both silicon and firmware) to work very optimally. Anyone can build a modem that "works," but to make it power efficient is a whole different ball-game.


The real problem is that the company doing the rescue is SpaceX, and that's owned by Elon. And HN does not like Elon.


Yes, the comments are a reflection of that. What a level of moral twisting


It's become the normal way of thinking here on HN. Everyone is so deep inside a box that they can't even see the edges. They're brainwashed with cult behavior.


reddit and tv says mars man BAD

ergo mars man BAD


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

Search: