@aksharvarma@mathstodon.xyz avatar

aksharvarma

@aksharvarma@mathstodon.xyz

PhD candidate in theoretical computer science.

Likes math; particularly discrete combinatorial stuff, probability, high dimensional shenanigans, etc. but also other things. Likes almost every place where math shows up in computer science.

Emacs user and there are too many features and packages I love.

LaTeX, beamer and TikZ are great.

Has at some point dabbled in sudokus, rubik's cubes and chess among many other things.

Cats.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

stefan, to random
@stefan@stefanbohacek.online avatar

What's the nerdiest app on your phone?

For me, it's an SSH client called ConnectBot. The name's a bit puzzling, but the app is really good!

https://play.google.com/store/apps/details?id=org.connectbot

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@stefan
Termux. It basically gives me a running Linux but at the moment the biggest use case is transferring files. I enabled static IP on the home routers and run sshd on them so that transferring files is just a SFTP call away. I find it quite useful in that regard. I don't need to worry about where the cables are and the interface is exactly how I am used to.

There's a python script someone I know has written to act as an alarm. It has been customized to their preference (eg. alarms are not sound files but the current time being spoken out (they really hate to track how many times they snoozed)) and works really nice. I haven't quite set that up but it's next on my list.

Of course I do get basic access to all programming language interpreters that I install. I can edit via emacs if I so wish. Essentially, it gives me a command line only Linux inside my phone and I underuse it drastically.

aksharvarma, to programming
@aksharvarma@mathstodon.xyz avatar

Evolution of how I think of while :

  1. When I first learned "loops":

while (condition is true) {do these things, adjust things so a slightly new condition is checked}

// That's where I first saw infinite loop and how there are intentional infinite loops.

  1. A small step to move condition update out of the loop body:

for (i=0; i< N; i++) {do these things}

// After the couple of days it took to get used to them, I found them neater and closer to how I think of things.

  1. Most of the time, the i from before is indexing into something, so let's directly deal with the item being indexed:

for item in collection:
do stuff

After the few days to rewire syntax muscle memory, going back would decidedly feel like a step back.

I don't want to give up automatic (and transparent) out-of-bound checks.

  1. There are actually only about 3/4 things one does inside a loop:

map/fold/scan/filter function-to-call collection-to-traverse-through

;; Getting rid of explicit indexing was just step one.
-- After a few days/months/years, I now realize that it is more important and less buggy if I think only of the function to call (and whether I want to end up with a new (maybe pruned) collection, a single thing, or "both" (that's how I think of scans))


Alternatively, my evolution as I learned new languages idioms:
-->
or -->
-->
or --> ???

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@BoydStephenSmithJr

I do know that maps/folds/etc. can be generalized to anything belonging to the functor class in ; so things like trees and other "container" type things beyond just lists. However, I didn't want to introduce special terminology in what was otherwise free of such jargon.

As for the rest of what you said, I don't know enough category theory to understand what you meant, although I can recognize them as being category theory terms.

Thanks for pointing out the connections. Hopefully, one day I'll get to a level of understanding where I can grok what you said.

aksharvarma, to emacs
@aksharvarma@mathstodon.xyz avatar

Ever since I found out that #emacs #dired allows me to use S to symlink exactly how C and R can be used to copy/rename, I try to always do my symlinks in dired in emacs and not in the terminal.

https://social.kernel.org/objects/b48cb5ed-e156-40f6-93c6-506a1cb6ae17

No one can keep ln -s straight because depending on the specifics, the way your brain deals with sentence ordering can change. From/to, source/destination, all get muddled with here/there. Does it mean that what's here points to what's there or does what's there point to what's here? What's the original which I should not delete gets confusing.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@harish Ah. So the thing is the original and the where is the other place it will show up at? That's a nice way to think. I would still prefer the emacs way, but this might be useful. I'll keep it in mind.

aksharvarma, to emacs
@aksharvarma@mathstodon.xyz avatar

I always told people that #texlatex is best written/edited in #emacs but didn't have a better argument for it than how well everything integrates. #AUCTeX, pdf-tools, #magit, etc. make it a seamless experience. I had a little bit of YASnippets going as well which made life wonderful.

That already brought things to the state of Gilles Castel's 2019 latex lecture notes in #vim article (which I believe is famous, at least in these circles). But yesterday I found a blog post by @karthink about how to get that and more in Emacs.

LaTeX input for impatient scholars: https://karthinks.com/software/latex-input-for-impatient-scholars/

The very first demo (40 seconds) shows how to get an equation in latex that I am sure would take me over a minute to write by hand (and it would look ugly in comparison). Then I looked at the second video (45 seconds) and realized that somehow org table style editing can be used for things like matrices and arrays and what not.

Just like that, less than 2 minutes has me committed to getting all that functionality in my Emacs config. Of course, this being emacs, I can tailor it all precisely to my comfort and I'm willing to spend however long is needed to get it to that stage.

ColinTheMathmo, to random
@ColinTheMathmo@mathstodon.xyz avatar

Does anyone here know a simple, direct proof that when p is prime, (\mathbb{Z}_p) is cyclic?

I've done a few quick web searches, and everything I've found has ether used deeper results, or seems to go via quite a convoluted route.

I'd be interested to know people's favourite proofs of this.

Thx.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@ColinTheMathmo @antoinechambertloir What's the proof of the 4k+1 result that is suitable for 14 year olds?

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@ColinTheMathmo
CC: @antoinechambertloir

Although longer than what I would want, I can see how the length is meant to avoid abstractions/depth that would make it harder for a younger audience.

Once suggestion, depending on time constraints: prove existence of multiplicative inverses, but do it via Fermat's little theorem. I think the necklace counting proof of Fermat's little theorem is something that your target audience can follow. I also think they'll find it engaging since it also adds a component which is totally devoid of algebra whatsoever.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@ColinTheMathmo

Just a comment adding to the discussion about exposition style of the presenter and target audience.

I personally, would do Fermat's little theorem's necklace counting proof, then would start off from step 5 of Euler's proof of the two squares theorem (as on Wikipedia). It builds on Fermat's little theorem, has some neat ideas that I would present as invariances and only requires them to trust one "magic" fact about all factors of a^2 + b^2 being representable as sum of squares whenever a and b are co-prime.

I can see how this is different from both the other proof approaches (needs a lot more "magic fact", and machinary that seems disconnected from the goal) that have been discussed and I like that depending on who presents it, the focus is on very different things.

My choice focuses on a counting proof which I think is very accessible and shows that very algebra looking math can be done almost algebra free. I also like the idea of exposing the audience to invariances as an idea: the more you see it the better off you are for other math (it'll show up in disguise in recurrences, induction, etc.) Finally, I think my approach is more, "Hey, here are a few cool hammers. See what I can do with it even though you may not see the hammer-nail match at first." I always like showing surprising connections. I could argue both for and against the approach described above, and I'm sure my inexperience shows but I find these differences in presentation styles fascinating.

CC: @antoinechambertloir

Mrfunkedude, to random
@Mrfunkedude@mastodon.social avatar

Hey Linux fans. I've got a question.

What do you think Linux provides, that Windows can not, to the average user aside from a smaller footprint on their hard drive?

I await your response.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@Mrfunkedude I probably have no idea how much or even whether any of this applies to an average user, but some of the benefits I find:

  • customizability: the OS does exactly and only what you want/set up. No updates if you don't want, make it look however you want. Have it use all the fancy bells and whistles and look fantabulous. Or have it be as bare bones as just a text terminal.

  • privacy: I don't need to use any (cloud) service I don't want to. I'm not dependent on some corporate overlord to give me privacy/security updates/etc. The thing doesn't up and decide to reboot because something I don't know triggered it. Almost everything you use will end up being from some kind of open source, not for profit application/single person.

  • performance: as others have said, Linux can run on machines that are from the days when Nokia bricks were top notch mobile phones. In fact, they might have worse looking specs compared to newer phones/tablets and Linux will happily keep going.

  • stable: I can open my 10 year old laptop, which I last opened a year or two ago and it'll boot fine and work immediately. And every server runs Linux (I think even Microsoft's Azure cloud stuff runs on Linux). Servers need stability, and standard, average, daily user's Linux is essentially the same as a server Linux.

  • security: also mentioned by others. I sometimes forget that viruses are a thing one needs to worry about because it is not a thing I'm aware of using Linux. I don't even know what anti-virus software is good/common.

  • usability: I don't think that usability is a big issue these days. Unless you are unlucky and end up on a bad machine with crap support you should generally be fine. Things should just work.

aksharvarma, to math
@aksharvarma@mathstodon.xyz avatar

Which of the following options is correct?

  1. All of the below
  2. None of the below
  3. All of the above
  4. One of the above
  5. None of the above
  6. None of the above

(Please use spoiler tags in your replies.)

peterrowlett, to random
@peterrowlett@mathstodon.xyz avatar

My son tried to solve a Rubik’s cube at the childminder, showing off since he does it routinely at home, but he got stuck. This is a plea for help!

We learned from the Think Maths instructions. At step 4 where the bottom ought to be a cross, dot, line or V, he says it did this - both line and V without being a cross. Then doing either the L move or the V move didn’t find a cross. I don’t know how to replicate the problem, so set up the yellow layer starting in this position (but without the first two layers solved). Playing around, we found we appeared to be stuck in a loop - depending on orientation we could sometimes rotate the line 90 or swap to a dot and back. I wasn’t able to inspect the childminder’s cube but he says the rest of the cube was two complete layers as it should be. Is this a situation that arises? What do you do if it does?

Think Maths Rubik’s Cube instructions screenshot showing step 4 - long, but available as a document online.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@standupmaths @peterrowlett rotating a corner wouldn't fix a edge orientation problem. Edges change orientation in pairs (if limited to valid moves). Corners rotate in triples (either all clockwise or all anti-clockwise). If you ensure that the flips/rotations you do being the cube back into one of the valid state listed above, it shouldn't be trial and error.

Generally, once you've reached the last layer, if you get stuck (as happened with the 3/4 of a cross) then you fix the immediate error (edge flip), then continue solving. If you then find corners behaving weird, then perform rotations to fix. If done step by step, to greedily bring it back into a known valid state, it would be fairly easy.

Of course, "fairly east" could be a biased observation based on my experience. I kept switching solving methods a lot and each teaches you a new invariant of valid moves. When I used to cube regularly, I could detect errors and fix them without referring to any resources. But you can always refer to your preferred method, get stuck, force cube into a state you expect and continue solving.

b0rk, (edited ) to random
@b0rk@jvns.ca avatar

what's a popular command line tool (other than git) that you wish had a clearer / more intuitive UI? I'm thinking of tools like dig which has this IMO pretty arcane output format

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@b0rk For emacs users git has a clean, clear intuitive UI in Magit.

joshuagrochow, to random
@joshuagrochow@mathstodon.xyz avatar

Is there a language where all 7 days of the week start with different letters/sounds?

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@joshuagrochow If you can count vya and ve as different sounds, then Malayalam satisfies the requirement.

The starting sounds are, roughly transliterated as (Mon--Sun):
Thi, Cho, Bhu, Vya, Vel, Sha, Nya

aksharvarma, to random
@aksharvarma@mathstodon.xyz avatar

I'm almost out of packages that are plug-and-play. So today I'm rehashing an old twitter thread about , THE porcelain for .

First, let me talk about my impression of git pre and post magit:

  • Pre-Magit, I wasn't happy/good at using git.
  • Post-Magit, I believe all git commands are clunky & unwieldy (especially in comparison to Magit).

The closest that my friends have come to making git better is with copious autocomplete setups (I think it was tmux, fzf, and a few other things). But I still say that magit is probably the lower bound on how nice it can be.

Eg: stage+commit in a wip branch, switch to main, pull from remote, merge wip to main, push to remote is:
S, c c, b b ⏎, F p, b b ⏎, m m ⏎, P p.
Done, in just 16 key strokes. At most there will be a couple of keystrokes extra before each enter if there are multiple branches to select from (but that would be true of any tool).

Not only do the keystrokes feel like the lower bound, the default choices are extremely sane.

Finally, it is not just the minimal keystrokes, it is also the extent of information that magit exposes and the amount of control it provides. Until I started using magit, I didn't know that beyond the usual amend to an earlier commit, you could also expand it (add changes, same msg) and reword it (change msg, no changes). Further, magit also exposes fixup and squash right in the commit submenu (see screenshot). In git, I would have no way of knowing what to do.

Magit is the git porcelain that makes using git feel like doing magic.

aksharvarma, to random
@aksharvarma@mathstodon.xyz avatar

@debacle @neeldhara

I know of and have tried out org-present and org-tree-slide. However, neither really gives me everything I want. I almost always need lots of nice math type-setting, which is why beamer has been my go to since forever. Plus, I don't see an easy way to get step-by-step showing of content a la overlay in beamer or fragment in reveal.js. That's something I must have as it is central to my presentation style.

However, I do agree that for extremely simple, quick and dirty presentations, nothing can come close to org-present/org-tree-slide, at least for #emacs folks.

Wrt executing source blocks, there are options like pweave (and an r equivalent) for beamer/latex. For reveal.js I think klipse plugin allows execution (albeit of a small selection of languages, with others needing custom work).

Most of the time, I don't need to execute code live, at most I want to be able to show relevant output based on parameters set earlier in the presentation (for which weaving/klipse are sufficient). Also, editing typos is not an important enough feature for me to switch.

Thanks for the discussion though. It is important to know use cases where one tool is superior to another. If I ever teach a programming heavy course, I'll probably use org-tree-slide.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@masi @debacle @neeldhara

I unexpectedly came across a package that does exactly what you described: automatic previewing in .

It shows the latex code when inside and automatically previews it as soon as we leave the math environment: https://github.com/io12/org-fragtog

I'm doing some org clean-up today and found this off of https://github.com/awth13/org-appear, which does the same for most other org entities/dates/tags/links/etc.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@masi @debacle

I should toot a list of packages that I use which silently improve the experience. The add-a-line-to-your-init-and-see-life-improve type of packages. I call them plug and play packages.

Some of them do things that don't seem a big deal until you see them in action. Then you realize that it is behavior that you really like and that it is gives a really good speed-up, ricing, visible feedback or something else that you didn't even know you wanted.

aksharvarma,
@aksharvarma@mathstodon.xyz avatar

@xenodium @masi @debacle

That was the first package I wanted to talk about!

hungry-delete: whenever you delete whitespace (either<backspace> or using<delete>), this would delete all whitespace except one. So if there were n spaces and you delete from the start of the whitespace, then only a single space would remain, same when you backspace from the end. Deleting again would remove that space as well. The behavior if you're in the middle is a bit difficult to explain in words but is totally intuitive once you see/use it.

Based on this description, I thought it doesn't do much. However, once I get used to it, I believe that this is the way and I am never going back.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • magazineikmin
  • Youngstown
  • khanakhh
  • ngwrru68w68
  • slotface
  • ethstaker
  • mdbf
  • everett
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • cisconetworking
  • rosin
  • JUstTest
  • Durango
  • GTA5RPClips
  • anitta
  • tester
  • tacticalgear
  • InstantRegret
  • normalnudes
  • osvaldo12
  • cubers
  • provamag3
  • modclub
  • Leos
  • lostlight
  • All magazines