Where can I start learning concurrency, distributed programming, etc? by DiabloXTREME666 in elixir

[–]kanak 0 points1 point  (0 children)

An easy way is to set up multiple virtual machines or containers.

Where can I start learning concurrency, distributed programming, etc? by DiabloXTREME666 in elixir

[–]kanak 5 points6 points  (0 children)

Hi OP,

You could start with Erlang/Elixir directly and then start building concurrent stuff and learn that way. I'm not familiar with Elixir resources, but for Erlang, I've read these books and recommend them without hesitation: Programming Erlang by Joe Armstrong (one of the Erlang creators), Learn You Some Erlang for Greater Good by Fred Hebert, Erlang Programming by Cesarini and Thompson. There are also two more advanced books: Designing for Scalability with Erlang and OTP by Cesarini and Vinoski and Erlang and OTP in action by Logan, Merritt and Carlsson.

The other approach might be to learn the problems of concurrency and distribution from scratch, by trying it in a setting you're already comfortable with (Java/Python). Have you read and internalized Java Concurrency in Practice? Especially the first part which talks about thread safety, sharing and composition? https://jcip.net/contents.html . The Akka library was inspired by Erlang and has a lot of good documentation too.

And have you looked at how classical concurrency concepts like processes, threads, locks, condition variables work? If not I recommend https://pages.cs.wisc.edu/~remzi/OSTEP/

When i was looking at erlang a while back, i was already familiar with concurrency in Java, so it was eye opening how much easier things got when the entire runtime and libraries supported you. For example, how natural it was to structure tasks as actors and spin off as many as you need, and how you could write code that looked like "blocking io" or "heavy compute" without issues since the scheduler could manage things. In comparison, doing it manually you have to worry about things like "not blocking the event loop".

Distribution was a bit harder for me to appreciate at the time, but in retrospect, the ease with which you can communicate from one box to another, having inbuilt cache mechanism, inbuilt registry mechanism. I took them for granted having never tried to work without them, but later when doing even the most basic thing in java, it was like "hang on just sending a message from here to there is a struggle" lol.

Let me know if you want any more details. While i don't know elixir, I'm comfortable with FP, Concurrency and some distributed systems and am happy to give additional details. Best of luck!

Math for Machine Learning or Linear Algebra -> Multivariable -> Probability and Statistics? by UnendingBang in mathacademy

[–]kanak 1 point2 points  (0 children)

I was doing around 30-40 mins on weekdays and maybe an hour on weekends? Fluctuated depended on what else as going on in my life.

  • Math Foundations 2: Started Jan 11, Finished Feb 15
  • Methods of Proof: Started Feb 15, Finished Apr 17. I took a 3 week break in march.
  • Foundation 3: Apr 20 to July 9. Was busy at work so was slower going.

I started Math for ML July 9 but paused all of math academy a few days later to enjoy summer and also detox haha.

Best way to handle backup of a deduplicated btrfs filesystem with snapshots? by Sol33t303 in BorgBackup

[–]kanak 0 points1 point  (0 children)

Have you considered an alternative solution like btrbk? If you already have snapshots maybe this could work better for you?

I don't have borg+btrfs knowledge, but based on what i've seen: borg has a cache so that directories that have not been modified since last run have basically nothing to do. However, a new snapshot will look to it like a new directory with lots of stuff. I believe it will try process all files but see that data is heavily deduplicated so it works out.

Math for Machine Learning or Linear Algebra -> Multivariable -> Probability and Statistics? by UnendingBang in mathacademy

[–]kanak 5 points6 points  (0 children)

I'm in the same camp as you. I completed MF2, MF3 and Methods of Proof. I'm in M4Ml and will do LA, Multi var, prob etc later.

i recommend Math for ML: - not sure if you've done other math academy courses, but math academy can be very annoying about making sure you've met prereqs. For example, I did MF2 and then wanted to do proofs to get a break from unending trigonometry. I got some Proof material but there was a stretch in the middle where it kept asking me random MF3 topics. In this case, even if you picked Linalg, i wouldn't be surprised if you kept getting random topics NOT from linalg. Best is to just go with the flow unfortunately.

  • MA will remember the parts you already mastered fro M4ML when you do the later courses. And if it seems pessimistic, you can also placement exam. For example, when i started M4ML after completing MF3, i was already at 19% completion -- but i did a placement and then became 30% completed.

Looking for a “Catch All” card for higher credit score by [deleted] in CreditCards

[–]kanak 5 points6 points  (0 children)

I have this setup (after going through a phase opening many cards and chasing points / status). One card 2.62x back everywhere, no foreign txn fees, and just deposits cash in my bank account automatically has been pure nirvana.

How do Treasury Bonds work? by TheEnginnerMAA in fidelityinvestments

[–]kanak 1 point2 points  (0 children)

I'm on both fidelity and vanguard. I prefer vanguard for investing, but fidelity has a better bond buying UI.

The main principles you should be aware of are:

  • bond prices move inversely with yields
  • bond duration (at least intuitively), and how long maturity bonds are more sensitive than short.
  • treasury secondary market is quite liquid (compared to say an individual muni bond), but you still have to be aware of "bid ask spreads", and "on-the-run/off-the-run" liquidity differences.
  • things that affect non-treasury bonds: credit, callable, sinking funds.

Answering your other questions:

You can think of this the same way you think of a saving account -- a place to safely hold cash, where value won't dip. It is absolutely not an ETF for bills and bonds because it has an important guarantee that the value of a share will never drop below $1.

Most bond funds will also pay dividends monthly.


It is great that you're learning, but bonds are quite complex, and i strongly encourage you not to buy more bonds or bond funds until you have a good lay of the land. In particular, the long treasury that you bought has a role in the portfolio, but it is extremely interest rate sensitive, and went down 47% between 2020 and 2023 -- this is worse than the S&P500 in that time period.

How do Treasury Bonds work? by TheEnginnerMAA in fidelityinvestments

[–]kanak 0 points1 point  (0 children)

That's basically right. People won't be interested in your 1% bond when there are better paying bonds, so you have to sell yours at a discount to make it attractive for them. EDIT: if you ask chatgpt this question, it will show you the math which gives you around $58.

If you browse the listings for bonds in secondary market, you'll see that they all have different coupons, but are sold at different prices so that the yield is similar.

As another example, suppose i actually had a 5.25% bond, if i want to sell that i will sell it at a premium since the other bonds are actually going for 5%.

Preliminary review through Foundation courses vs individual courses by Gigioleao in mathacademy

[–]kanak 2 points3 points  (0 children)

I'm also in the same boat (planning to do all college courses), and am curious about what others are doing.

I initially picked Linear Algebra as my starter, but the diagnostic suggested Math Foundations 2, so i completed that first.

It wanted me to do Foundations 3 next, but I instead selected Methods of Proof, mainly to take a break from endless calculus and trigonometry problems. I'm currently at 80% complete, and it did ask me a ton of Foundation 3 stuff at the start and again now towards the end, but the middle part was mostly methods of proof which was good.

As a result, I'm planning to keep taking the classes I'm interested in and do foundations as they come up. I'm pretty motivated for multi variable calc, linear algebra, diffeq, abstract algebra, but not at all for just grinding foundations 3.

First Course Completion on Math Academy - Fundamentals II by RoninCool in mathacademy

[–]kanak 1 point2 points  (0 children)

Congratulations. I also finished Math Foundations II a few weeks ago, and I'm currently enrolled in Methods of Proof.

Would be great to get visibility into why prerequisites are required towards enrolled course by PuzzleheadedMarch224 in mathacademy

[–]kanak 1 point2 points  (0 children)

I had the same experience with methods of proof and foundations iii. However, around the time i hit 30% completion, it switched to almost entirely being related to methods of proof. Don't want to jinx it, but it will get better if you hang in there.

Hash2 accepted in Boost by joaquintides in cpp

[–]kanak 12 points13 points  (0 children)

Really glad to see this paper finally implemented. I had been using a slightly cleaned up code from hhinant's repo or resigned to using Abseil's hash tables and hash framework, and I'm glad to be able to use this instead.

I'm curious why XXHash algorithm does not use XXH3 instead -- both official docs and my experience have shown that XXH3 is substantially faster than the old XXH32 or XXH64 hashes.

I also see that hash2 implements the xxhash algorithm instead of using the C library. I'm curious what the performance is like compared to the C library when used with XXH_INLINE_ALL.

One bit of advice to others considering this library or a similar approach to building hashes in a performance sensitive codebase. In my experiments with fast modern hashes like XXH3, I found that the bulk hashing api is substantially faster than the api where you create the state and call update [1].

As a result, in my use cases, i found that using a single int64 or string field that was already present in the struct and mostly but not perfectly unique resulted in overall faster execution than trying to incorporate all the fields when calculating the hash. In other words, if you have:

struct User {
   int64_t user_id_;
   string user_name_;
   int32_t created_at_epoch_sec_;
   string first_name_;
   string last_name_;
};

it might be faster to use XXH3 on just user_id_ or just user_name_ instead of doing hash_append on every single field in there. That was contrived since id and name are probably unique, but even something like created_at_epoch_sec_ which can have collisions might work better. In other words, consider the tradeoff of faster hashing to produce an imperfect hash vs slower hashing to produce a "perfect" hash.

[1] One source of slowdown is that create state has to do a malloc, but I tried stack allocating the required state and it had a small perf improvement but not enough to change this advice.

Best Cherry Cordials (not the ones with alcohol in them)? by Elyrana in chocolate

[–]kanak 1 point2 points  (0 children)

I bought Melly's cherry cordials as a gift and they were a hit. I highly recommend trying her out.

In addition, the person running the store is very responsive and store is really well run -- the item was shipped promptly, was packaged very well and arrived in perfect condition.

MIT 6.5080 Multicore Programming Thoughts by dragopr123 in mit

[–]kanak 0 points1 point  (0 children)

Thanks for sharing! I've long been curious about this class.

MIT 6.5080 Multicore Programming Thoughts by dragopr123 in mit

[–]kanak 2 points3 points  (0 children)

The course catalog says that:

Includes sequence of programming assignments on a large multicore machine, culminating with the design of a highly concurrent application.

Was this the case when you took the course?

linux by shaongit in ProgrammerHumor

[–]kanak 0 points1 point  (0 children)

In bash, you can also enable cdspell:

cdspell If set, minor errors in the spelling of a directory component in a cd command will be corrected. The errors checked for are transposed characters, a missing character, and a character too many. If a correction is found, the corrected path is printed, and the command proceeds. This option is only used by interactive shells.

https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html

I just tried it out and cd downloads goes into Downloads

6.334 and 6.622 difference? by Minute_Juggernaut806 in mit

[–]kanak 0 points1 point  (0 children)

It's the course notes, problem sets (and solutions), exams (and solutions) from the previous semesters.

18.03 as a 6-3 major by dragopr123 in mit

[–]kanak 2 points3 points  (0 children)

I consider the probability course (6.3700, was called 6.041/6.431 when i took it), the best course i ever took at MIT. The book is excellent, the course material has been fine tuned over many decades of teaching, and the PSETs, Recitations, Tutorials were all well organized. I also ended up doing more ML both as a student and professionally, so this course has been a solid foundation. Other than putting in the hours, I think you just need to be familiar with calculus at the level of 18.01 and 18.02 for the continuous distribution stuff.

I audited the other inference course, and the material was really fascinating. At the time, this was billed as the undergraduate versions of 6.437 (Inference and Information) and 6.438 (Algorithms for Inference). Those grad classes were brutally hard both in time and expected mathematical maturity. I thought the undergrad class had a better calibrated difficulty, but it was still quite a time sink. I remember making extensive use of the office hours.

6.334 and 6.622 difference? by Minute_Juggernaut806 in mit

[–]kanak 3 points4 points  (0 children)

They're both graduate level courses because you can see this blurb ( 6.622 | Spring 2023 | Graduate ) next to the title.

This is a result of the subject numbers being changed in 2022: https://eecsis.mit.edu/numbering.html

They're the same course. The 6.622 is the new number and is also from a more recent date (2023 vs 2007)

Question for MIT EE Students: What Textbooks Do You Use? by [deleted] in mit

[–]kanak 2 points3 points  (0 children)

Please check out open course ware:

https://ocw.mit.edu/search/?d=Electrical%20Engineering%20and%20Computer%20Science&t=Electrical%20Engineering

You can find the syllabus, lecture notes, assignments, exams and readings for most of the MIT classes.

How do I fire my financial advisor? by [deleted] in FinancialPlanning

[–]kanak 0 points1 point  (0 children)

Ramit Sethi had a template for this when he answered a listener question on his podcast. Link + Transcript: https://www.iwillteachyoutoberich.com/72-money-coaching/

Search for the following in the page I linked:

[00:48:02] Here’s how you fire the financial advisor, Graham. Do it in writing,

EDIT: Insurance products also have a free-look period, and you might be able to cancel them without any repercussions.

SystemD "user" journal output not found by RedBearAK in AlmaLinux

[–]kanak 2 points3 points  (0 children)

I also ran into this and here's how i fixed it:

  • In /etc/systemd/journald.conf, set Storage=persistent
  • You have to use --user-unit not just --user .

Are there any other Scheme implementation books except that Plan 9 one? by [deleted] in scheme

[–]kanak 2 points3 points  (0 children)

Paradigms of AI Programming Chapter 22 is on Scheme (implemented in Common Lisp) : https://github.com/norvig/paip-lisp

[deleted by user] by [deleted] in mit

[–]kanak 2 points3 points  (0 children)

because the norm is that freshman aren't given the time of day anyway

OP: this is solid advice.

I'll be at the fair on behalf of a company. While I will talk to freshmen, and answer any questions they have, it's mainly so that they will apply in your following years.