HNHacker News
TopNewBestAskShowJobs

kxyvr

1,289 karma · joined December 3, 2014

submissionscomments
kxyvr··on New York Gov. Kathy Hochul to Reject Ban on Noncompete Agreements
To piggyback onto this, a $250k limit affects most physicians. Hospitals will argue that a physician leaving a facility hurts the hospital because that physician will bring their patients with them. What they don't mention is that this is literally impossible for all shift work positions like emergency medicine, anesthesia, hospitalists, critical care, or radiology, among others. They don't choose their patients.

Anyway, medical noncompetes frequently target a certain number of mile radius around the hospital. In a tightly packed area like NYC, this basically locks the physician out of working for any other hospital during the non-compete period. Recently, the hospitals have become very aggressive at pushing their staff to work longer stretches of shifts with no breaks. Also, there's no overtime since they're considered exempt employees. They can get away with this because it's very difficult for their staff to leave without either moving or working locums out of the area until their non-compete times out. This doesn't work for many families if, for example, they have children or older parents to care for.

Much of the American healthcare system is now owned by private equity and they will fight tooth and nail to keep their non-competes. Healthcare workers are burning out and the non-competes eliminate much of their leverage to push for better working conditions. It's disgusting and needs to stop.

kxyvr··on Moderna Melanoma Vaccine Cuts Death Rate in Half
This is great news. We can always use better treatments. I had a case of metastatic melanoma (III-A) in my early 20's and the drug of choice at that time was interferon, which was not a particularly pleasant experience. There were experimental vaccines at the time as well, so these new vaccines have been multiple decades in the making.

As some unsolicited practical advice, yes, it's always good to protect one's self from the sun using long sleeves or sunscreen. However, melanoma can and often does occur in areas that does not receive sun exposure. This could be between your toes or inside your butt cheeks. As a result, it's worthwhile to have a dermatologist conduct a skin exam once a year. Normally, this is covered under a specialist visit for insurance and for many insurance plans this is a flat fee.

Outside of a regular exam, any growth that has unusual size, shape, or color should be checked by a dermatologist, especially if it changes. My lesion was raised off the skin and red in color. It also changed and grew over time. If one can not immediately see a dermatologist, lacks insurance, or money for a visit, regular pictures of the skin blemish or growth can help track changes. If it changes, though, it really does require a dermatologist to look at it.

Lastly, dermatologists can and do make mistakes. In my case, my lesion was dismissed as a benign nevus at first visit. When I revisted the physician six months later, it was larger and was finally biopsied to discover it was melanoma. It is possible that the cancer metastasized in the interim period, but we'll never know. That said, if one is concerned about a growth and the physician defers, it is very simple to tell the dermatologist that you'd feel more comfortable if we biopsied the growth just to be sure. You don't have to be mean and I've never been refused. At that point, they take a small sample of the growth and send it to the lab. Then, you know for sure. Normally, the sample is taken by using a razor blade and skimming off some of the surface. It's fast, easy, and while not painless, it is not particularly painful. Generally, this is rolled into my specialist visit fee for insurance, but they may send an additional billing code to insurance.

Finally, dermatolgists can be difficult to schedule with. Honestly, their schedule is often filled with cosmetic procedures like skin peels and botox because it's so profitable. That said, any dermatologist can do a biopsy, so just call around to find one with an opening that takes your particular insurance.

I apologist for the side talk. I often find the whole talk to your doc discussion regarding skin lacks details, so hopefully this helps. Great to hear that the treatments are progressing.

kxyvr··on What Is a Hessenberg Matrix?
In a vacuum, you shouldn't care. Broadly, Hessenberg matrices arise in a variety of contexts, so understanding their properties helps these algorithms proceed more effectively.

For example, upper Hessenberg matrices arise during an Arnoldi iteration, which is itself a key building block in Krylov methods, which are highly effective sparse linear system solvers, which are necessary for solving certain kinds of mechanics problems needed for engineering. That is to say, it's important, but somewhat removed from the end application. The reason they arise in this context is due to a clever trick.

Say, for example, we want to solve the linear system Ax=b. Take the right hand side, b, and label it as our first vector, v. Save the norm in this new matrix T, T(1,1) = norm(v), and then normalize v and save it, V(:,1)=v/norm(v). Next, we add a new vector to this batch. Let v = AV(:,2). Orthogonalize v against the previous vectors in V using any variety of algorithms such as Gram-Schmidt or Householder reflectors. Save the orthogonalization coefficients in the second column of T. Hence, T(1,2)=inner(v,V(:,1)). Then, save the norm of this orthogonalized vector, T(2,2) = norm(v), as well as the vector itself V(:,2) = v/norm(v). Here is a code in MATLAB/Octave that does this simply:

  randn('seed',1);
  m = 5;
  A = randn(m);
  b = randn(m,1);
  V = zeros(m,0);
  T = zeros(1,0);
  for i = 1:m
      if i == 1
          v = b;
      else
          v = A*V(:,end);
      end
      for j = 1:i-1
          T(j,i) = V(:,j)'*v;
          v = v - T(j,i)*V(:,j);
      end
      T(i,i) = norm(v);
      V(:,i) = v/T(i,i);
  end
  H = T(:,2:end);
If you cut off the first column of T, we obtain an upper Hessenberg matrix H. This matrix now has the property that AV(:,1:end-1) = VH. This is the Arnoldi iteration.

Why we care in this context goes back to the original linear system that we spoke of, Ax=b. Say we want to find a least squares solution, min norm(Ax-b). If we look for a solution for x within the vector space defined by V, x = Vy, then we can rewrite this system as min norm(AVy-b). If we generate V using the Arnoldi iteration, we have min norm(VHy-b). And, note, most of the time we don't need to find V that spans the whole space. Meaning, m vectors for an m-dimensional space. A smaller number will do, which means that V has a small number of columns. Since the first vector of V is b, we have, min norm(V(Hy-e1)) where e1 is the vector with 1 in the first element and zeros underneath. Since V is orthonormal, it does not affect the norm, so we have min norm(Hy-e1). Since H is upper Hessenberg, we can transform it into an upper triangular matrix using Givens rotations, which are alluded to in the linked article, which gives essentially a QR factorization of H, cheaply. This gives us min norm(QRy - e1). Since Q is orthonomal, it doesn't affect the norm, so we have min norm(Ry - Q'e1). Since R is upper triangular, we can solve a linear system and this is cheap. And, here we have an incomplete description of the algorithm GMRES. We go through this trouble because in many important contexts this is vastly cheaper than computing a factorization of the original matrix like LU or computing Gaussian elimination. This is one of many places where upper Hessenberg matrices are found, hence, the article above.

By the way, if anyone enjoys this kind of trickery, these are the kinds of algorithms studied in more traditional applied mathematics degrees, as opposed to pure math or statistics. It doesn't mean that they're not taught elsewhere, but it's kind of their bread and butter. A better description of the above algorithm for GMRES can be found in Saad's book, "Iterative Methods for Sparse Linear Systems", which is free to download.

kxyvr··on Ask HN: Can you suggest advanced books on integral calculation?
As mentioned in a sibling comment, Lebesgue integration can be helpful with probability theory because we can wrap some information into the measure rather than the function. Though, to be sure, this can often be done in a similar manner using the Riemann-Stieltjes integral.

To me, part of the value of Lebesgue integration is in understanding the limitations of Riemann integrals and when they break. Some of this is covered in Stroock's book in chapter 5.1. Alternatively, when in working in function spaces, we may need to integrate in a more general way than Lebesgue integration, so things like Bochner integrals, which require similar theory. This can arise in the theory related to things like PDE constrained optimization, which most of the time is targeted toward physics related models.

All that said, bluntly, I prefer to work with Riemann integrals when at all possible. However, the same question then applies. Do you or someone else have a reference for a rigorous derivation of the divergence theorem or integration by parts in multiple dimensions using Riemann integration? It's not particularly hard in one dimension, but higher dimensions is tricky and it's hard to get the details of integrating on the surface correct. Stroock's book is the only reference that I know of and he does it with Lebesgue integration.

kxyvr··on Ask HN: Can you suggest advanced books on integral calculation?
Along a similar line, the only book that I've found that has goes through a careful derivation of the divergence theorem using Lebesgue integration is, "A Concise Introduction to the Theory of Integration," Second Edition by Daniel W. Stroock. I prefer this one to his later book, "Essentials of Integration Theory for Analysis."

Does anyone else have a good reference or book on the topic?

kxyvr··on So you want to learn physics (2021)
For the mathematically inclined, the best I've seen is An Introduction to Continuum Mechanics by Morton Gurtin from 1981. At one point, it could be purchased from Google books directly as a pdf.
kxyvr··on A non-mathematical introduction to Kalman filters for programmers
No. It's used differently.

Here's another way to understand Kalman filters that doesn't require statistics, but does require some knowledge of feedback controllers. Consider a model of a system of the form

  x'=Ax+Bu
  y=Cx
Here, we have a linear system with a state variable `x`, system dynamics `A`, control `u`, control dynamics, `B`, and observation `y`. This states that we have linear dynamics, but we can only observe some of the state variables. For example, perhaps we can observe position, but not velocity or acceleration. At the same time, we want those other variables because we need them for a feedback control or some kind of observation. In order to do this, we use machinery similar to a feedback controller. Define an observer system:

  xx' = Axx + Bu + L(y-Cxx)
  xx(0) = xx0
Here, we have a new observer variable `xx` that we want to converge to the true state variable `x`. To do this, we have introduced a new matrix of gains called `L`, which we call the observer gain for a Luenberger observer. The reason that this system is useful is that if we consider the error `e=x-xx`, and subsitute this into the above equations, we get:

  e' = x' - xx'
     = ...
     = (A-LC) e
From ODE theory, we know that `e` will converge to 0 if the real part of the eigenvalues of `A-LC` is negative. Hence, to facilitate this, we focus on trying to find an appropriate `L` that forces this condition. In order to do this, we note that the eigenvalues of `A-LC` are the same as it's transpose, `At-CtLt`. This leads to an optimization formulation:

  min 0.5 <Qee,ee> + 0.5 <Ruu,uu> st ee' = Atee + Ctuu, ee(0) = ee(0)
The notation `<x,y>` means inner product and is simply `xt y`. Here, we're essentially looking at the adjoint equation with a new kind of control `uu` and a new adjoint state variable `ee`. This is a linear quadratic control on the adjoint of the error generated by the Luenberger observer. There is a mostly open choice for `Q` and `R` that we discuss below. Through a long sequence of derivations that is nearly identical to that of linear quadratic control, we find that we eventually solve for a matrix P in the system:

  PAt + AP - PCt inv(R) C P = -Q
And then set the observer gain to `L=-PCt inv(R)`

Given this observer gain, we go back to our system above with `xx`, plug it in, and then solve. That system is constantly updated with observations of the original system in `y` and it produces an `xx` that converges very rapidly to the original state variable `x`. This gives us a way to view all of the state variables in the original equation even though we can't observe them all directly.

Now, to get to a full Kalman filter, there's a question of how to choose the matrices Q and R above. They could be almost anything. If you have an estimate of the what you believe the covariance of the errors are in the state and observations in the original equations, you get to a Kalman filter. Really, the derivation above is continuous, so it would be a Kalman-Bucy filter. Honestly, you don't need any statistics, though. Normally, just normalize the weights, so that all of the state variables are around the same size and then maybe adjust it on what you think is more important. It generally works just fine.

In short, a Kalman filter is a little machine that uses the same machinery as a feedback controller that rapidly converges to the state of a system of interest. This is useful because it's unlikely that all of those states can be observed directly. Due to how feedback controllers work, it is robust to errors and can handle variation or error in the observations.

kxyvr··on Will Computers Redefine the Roots of Math?
I'm slow on replies, but thanks for the references. I'll have a look.
kxyvr··on Will Computers Redefine the Roots of Math?
Thanks for sending by the mathlib examples. They're not particularly intelligible for me, but it's something to work towards.

Generally speaking, I work in the intersection between optimization, differential equations, and control. To that end, there's a variety of foundational results in things like optimization theory that I'd like to see formalized such as optimality conditions, convergence guarantees, and convergence rates.

Two questions if you know. One, which theorem prover would you recommend for working toward these kinds of results? Two, is there appetite or a place to publish older, known theorems that have been reworked and validated? And, to be clear, two is not particularly important for me and my career, but it is for many of my colleagues and I'm not sure what to tell them about it.

kxyvr··on Will Computers Redefine the Roots of Math?
I am a mathematician and would love to mechanize my proofs. The issue is that systems like Coq construct proofs in a radically different way than how we were trained. I've struggled with Coq even with a somewhat more than a passing knowledge of the system; I used Coq's underlying language Gallina to write interpreters, which were then processed into OCaml while studying in graduate school. At the same time, I can barely turn out a basic proof in Coq.

What would help dramatically for me and others that work in applied math are proofs that cover the material in something like Principles of Mathematical Analysis by Walter Rudin. These are proofs that cover basic real analysis and topics like continuity, differentiation, and integration. It would also help to see basic linear algebra proofs such as that all real symmetric matrices have a real eigendecomposition. Now, these may exist and it's been a couple of years since I've looked. If anyone has a link to them, I'd be extraordinary grateful.

kxyvr··on Optimization Without Derivatives: Prima Fortran Version and Inclusion in SciPy
I work professionally in computational optimization, so here are some of my observations coming from the world of mechanics.

In my experience, it's because the client is trying to reuse an existing simulation code for something that requires optimization. This could be something like imaging (parameter estimation), calibration, or control. For example, say someone has something like a PDE solver that can simulate sound waves going through a media. If you can match the output of this simulation to some collected data, the parameters for the simulation will tell you what material is where.

Anyway, the issue is that these existing codes are rarely instrumented or derived in a way to make it easy to get derivatives. Management doesn't want pay for a rewrite, so they demand that existing equity (the simulator) be used. Then, a derivative free optimizer (DFO) gets slapped on as a first attempt. To be clear, this doesn't work particularly well, but it tends to be the place where I most often see these algorithms used.

As to why it doesn't work very well, derivative based optimizers can scale to the order of hundreds of millions of variables without too many issues (modulo the kind of problem, but it works very well for a lot of problems of value). DFOs tend to have issues past a few dozen variables.

Now, for anyone not wanting to end up in this conundrum, when you write your original simulation code parameterize on the floating point type. Basically, don't write the code with double, use some kind of generic, template parameter, or whatever on something we'll call MyFloat. The purpose here is to allow the code to be more easily compatible with automatic differentiation (AD) tools, which will give a real and machine precision exact derivative. Don't do finite differences. Don't think reinstrumenting later is easy. It's not. It's a pain. It's expensive. And, to be clear, AD can be done poorly and it can be slow. However, I've never seen a code instrumented with AD and a good gradient based optimizer do more poorly than a derivative free optimization code. They've always done dramatically better. Beyond just giving the derivative, I'll also mention that even if the client wants to recode the simulator to give an analytic derivative for speed, it is vastly easier to do so if the results can be checked with a simulator instrumented with AD. There's also other tricks of value that can be used in a properly instrumented code such as interval arithmetic for some kinds of sensitivity analysis.

Anyway, there are other reasons to use derivative free optimization. Some functions just flat out don't have derivatives. However, in the world of mechanics, most do and DFOs gets abused due to poor prior planning. In either case, please, for the love of math, just parameterize on your floating point type. It would make my job much easier.

kxyvr··on Julia 1.9
I appreciate the work on this. That's not particularly easy code to write, so thanks to whoever is working through this.
kxyvr··on Julia 1.9
At least in the past, there were some issues with the licensing of dependencies. For example, both Julia and MATLAB were dependent on a variety of routines from SuiteSparse such as the Choleski factorization and the QR factorization. These routines are dual licensed commercial/GPL. The difference is that your MATLAB license gave the ability to use things like the MATLAB Compiler to distribute somewhat closed code to a client because they, ostensibly, have a license for SuiteSparse. Julia did not, so any project compiled into a stand alone executable would be subject to GPL unless an additional license for the dependencies was purchased. Now, if you're only distributing the source code, which most people do, this doesn't matter as much, but we should all be aware of our license responsibilities. MATLAB has more functionality built-in and I trust they've done the legal legwork for their included routines, so I don't have to.

To be clear, Julia constantly updates and I'm sure many of its original dependencies are being recoded to help address this issue. I still think it's worth a check and audit if someone wants to put together a broader project as to not get burned by this issue later.

kxyvr··on “Cytokine Storm” Debunked: Machine Learning Exposes Killer of Covid-19 Patients
This kind of comment makes me genuinely angry. It's exact opposite. Repeating this lie led to painful death.

My wife is an ICU physician. I traveled with her around the country during the COVID pandemic to help provide moral support for what was a very difficult job. One of the most common, heart breaking stories were the patients who were wrongly told by their friends or the internet they were going to die if they were intubated. Now, it is your right to refuse intubation just as it is your right to refuse resuscitation. That said, my wife would recommend intubation if it was warranted and these patients would flat refuse because of information like this. Then, she would watch them slowly and painfully decompensate day by day. Weaker and weaker. Then, when they were at death's door, they would universally reverse their refusal of intubation and ask her to do everything. At this point, my wife would hold their cell phone while they video chatted their husbands, and wives, and parents, and children. Tell them how much they loved them. Then, they would crash and my wife would frantically try to intubate them and keep them alive. At this point, they had no reserves. Most of them died.

No physician in their right mind recommends intubation without cause. It's a procedure. It carries risk. However, it is vastly easier to do in a controlled setting before someone has no reserves and is crashing. It means that they could give the patients lungs a break, so they can heal.

I listened to these stories day after day after day and tried to support my wife as best as I could. Physicians are not perfect. They do make mistakes. They also have vastly more experience dealing with the intricacies of care. That said, comments like this one absolutely killed people. People who didn't need to die. That was and still is wrong.

kxyvr··on Beware of AI pseudoscience and snake oil
It wasn't an expensive disaster for IBM, but it was for MD Anderson Cancer Center, which spent $62 million on a project using Watson that didn't work:

https://www.medscape.com/viewarticle/876070

Certainly, not all projects work and institutions need to take risk. However, there is a big financial and opportunity cost to this. Rather than spending $62 million on Watson, and assuming a $100k salary with a a cost multiplier of 2 ($200k for 1 FTE), that amount of money could have paid for 77.5 FTEs over the 4 year duration of the Watson contract (62e6/200e3/4). I suspect that the overall scientific contribution of those researchers would have been higher.

kxyvr··on Nursing home owners drained cash while residents deteriorated, filings suggest
As someone who has been through this, I'll offer some random, unsolicited advice:

1. Much is dictated by level of care. Meaning, there is a spectrum from independent living, assisted living, and nursing home. Independent living is the cheapest with the least amount of assistance. A nursing home is the most expensive and has the highest level of care.

2. Money does not necessarily dictate better care. We obtained better care from a $5k/mo facility than a $9k/mo.

3. Staff turnover is high. Reviews are important, but if the reviews are more than a year old, it doesn't mean a lot.

4. Most of the time, better care can be had if the facility knows the family is involved and they are being watched. To this end, each state I've been involved with allowed the family to demand a camera be installed in the room. The rooms with cameras are the first to be handled. And, to be clear, I don't like this, but it is what it is. Outside of this, families that visit either every day or multiple times a week who get to know the staff generally receive better care.

5. Medicaid can cover the cost of a nursing home, but all assets need to be essentially depleted to a few thousand. This includes any value in the home. It may be possible to transfer the assets to a trust, but there tends to be a cool down where this only works if the assets have been in a trust for multiple years. An estate lawyer familiar with this area of law would know best.

6. If assets are depleted as in 5, some states subsidize home based care through medicaid. This tends to be paltry, but it can help. I think we were originally authorized 20.5 hours a week and the amount essentially came out to $9/hr.

And, to be clear, all of the above addresses none of the emotional difficulty of being put in such a position.

As far as the article goes, I don't doubt it. We saw some really horrific things in the nursing homes. When you're going through it, it feels like a mix of sadness, helplessness, and rage. It doesn't have to be bad, but often is. At the same time, there are situations were you must use one because its not safe to have your family member be alone. Things like dementia, fall risks, etc. Please never judge someone for using a facility; it may be required. Just protect yourself and your family as best you can.

kxyvr··on Ask HN: Math books that made you significantly better at math?
1. Principles of Mathematical Analysis by Walter Rudin (baby Rudin) - I'd studied real analysis in the past, but this book is direct and rigorous and provided a good framework to move forward into things like functional analysis in a way that I was not prepared for with other books.

2. Differential Equations and Dynamical Systems by Lawrence Perko - Solidified for me how dynamic systems behaved and were solved. Very much helped my understanding of control theory as well.

3. A Concise Introduction to the Theory of Integration by Daniel Stroock - Helped solidify concepts related to Lebesgue integration and a rigorous formulation of the divergence theorem in high dimensions.

4. Convex Functional Analysis by Kurdilla and Zabarankin - Filled in a lot of random holes missing in my functional analysis knowledge. Provides a rigorous formulation of when an optimization formulation contains an infimum and whether it can be attained. Prior to this point, I often conflated the two.

kxyvr··on Ask HN: Has anyone worked at the US National Labs before?
I spent about a decade working for one of the NNSA labs. I think they're a good place to work, but it's a very different work environment than startup culture. Most of what I'm seeing in the discussion is pretty accurate. I'll add a few things in case they're deal breakers.

It's likely that you'll either be required to or pressured into obtaining a security clearance. Have a look at Standard Form 86 (SF86) and see if you're fine with these kinds of questions. Depending on how comfortable you are with this line of questioning, do note there will be more digging especially if you've lived abroad, had prior drug use, had prior legal issues, or a variety of other items that pique their interest. Failure to obtain a clearance is grounds for termination in most circumstances.

A clearance comes with certain responsibilities. You will have to report certain kinds of travel even if on vacation. You will have to report certain kinds of contacts even if not work related. You may not be allowed to freely publish even non-technical documents or books without prior approval depending on the level of clearance. There is a way to accommodate the lab in a way where you can mostly live your life freely. Most of this is just paperwork. However, you do give up some of your autonomy.

There is a proprietary innovation form they will push you to sign that will assign to them all innovations even on your personal time without company resources. Likely, this is not valid in California. Not sure if this is currently negotiable. They were pretty insistent in the past.

Pay for a starting Ph.D. was a little over $100k about 10 years ago. It capped out for most people at around the $130-140k region after 10 years of experience. Likely a bit different now, but not tremendously so.

While it depends on the group, internal politics heavily favors pedigree and degree level. Meaning, you are treated better if you have a Ph.D. even if it's not really necessary for your position. I'm not sure I would consider a job there with less than a masters. Practically, this means you're more likely to be the PI with a higher degree. More likely to be selected for promotion. More likely to be able to move to management if that's of interest. More likely to obtain internal research funding. To be sure, I don't agree with this, but it's a reality of the culture.

Things like time card fraud are taken very seriously. Meaning, if you work extra hours, you will be compensated for it either in terms of flex time or pay with overtime. Management doesn't like to pay overtime, so this means that you'll likely be out on time most of the time.

It's a professional workplace where people come to work and then leave. As such, no alcohol on the facility, no gaming tables, or sleep cubicles or cutesy architecture. It's not that people are completely serious the entire time, but they are professionals and there is a pretty strict separation between what's considered business activity and personal activity.

The research projects are great. There's easier access to grant money than in academics and it provides the opportunity to work in areas that are not necessarily commercially viable, but have broader impact. Getting access to the money either means being good at proposal writing, and having the right pedigree, or making friends with someone who is and likes to farm out work to you. When I say money here, you're not going to make anything more on the grant. It means being able to buy out your time to work on this particular project.

That's already probably too much, so I'll stop here. In short, I think they're a great place to work if you can fit into the culture with them. They tend to play by the book professionally and tend to hold by their agreements with you. However, there is a lot of paperwork and you will necessarily give up some of your personal autonomy.

kxyvr··on Stone tablet shows Babylonians able to approximate √2 with 99.9999% accuracy
Joanna Papakonstantinou wrote a PhD thesis on the historical development of BFGS and the secant method back in 2009:

https://scholarship.rice.edu/handle/1911/61898

Part of that thesis discusses the Babylonian use of the rule of the double false position and it's application to solving quadratics, which can be used to get the square root. Anyway, I'm not an expert in this history, but I believe she includes references to the related texts for those interested.

kxyvr··on Bloated college administration is making education unaffordable
To add to this, Pew has an article that talks about a variety of topics including funding of higher education:

https://www.pewtrusts.org/en/research-and-analysis/issue-bri...

If you look at Figure 4, within the last 10 years, and for the first time ever, the amount of federal money flowing into state universities exceeded state money. There are all sorts of consequences for this. Mostly, I mention this to echo that state contributions to higher education have gone down consistently and the editorial's assertion that the high cost of a university education can be reduced to a bloated administration is a simplified argument of a complex issue that is likely made in bad faith.

kxyvr··on A large scale non-linear optimization library
I'll contend that this depends. For example, in mixed-integer linear programs, the function evaluations are trivial, but the combinatorial search is expensive. Alternatively, for nonlinear, continuous optimization problems with constraints, the primary cost is often the preconditioning or factorization of the systems associated either with an augmented or KKT systems. That said, for unconstrained or bound constrained, nonlinear, continuous optimization problems, I largely agree. And, even with general constraints, it's sometimes the case it's the function evaluations. Mostly, I wanted to contend that the linear system solves can often be the limiting factor and better large scale factorization codes are needed.
kxyvr··on A large scale non-linear optimization library
Many already do, but not necessarily explicitly. If an optimizer accepts user defined functions for its evaluation and derivatives, these computations can be done using a GPU even though the optimizer itself knows nothing about the GPU. For example, GPU are extensively used in parameter estimation problems associated with PDE contrained optimization. Essentially, the PDE solves use GPUs to solve the differential equation and then then results are fed back into the optimizer. Many of these packages use common open source optimizers.

More generally, there's a question of where the algorithms themselves benefit from GPUs or parallelism in general. For large scale nonlinear, continuous optimization problems using second-order, Newton like methods, the big costs are in the function evaluations, their derivatives, and the linear system preconditioners/solves. Generally speaking, how the function evaluations and derivatives are computed are on the user. For the preconditioning/linear system solves, there's value in parallelism. However, here, the GPUs have traditionally lagged. Basically, we need a factorization, be it sparse or dense, and it's only been recently where good library support has been extended for GPUs. For the longest time, the entire matrix factorization needed to fit onto the GPU and many of these matrices were large. That said, for optimizers that accept a user-defined preconditioner, the use of GPUs is already possible.

kxyvr··on The Framework Laptop Chromebook Edition
I just went through this process with Gentoo on a framework laptop. Here are some random, likely incomplete notes to make this work. It uses a swap file on an encrypted filesystem

  1.  Create a swap file.  Our rule of thumb is ram + sqrt(ram) for hibernate

      fallocate -l 72GiB swapfile
      chmod 600 swapfile
      mkswap swapfile
      swapon swapfile
      swapon --show

  2.  emerge suspend

  3.  Get the number to use with resume_offset later.  In the current case, it was 125798400

      swap-offset /swapfile
      
      emerge sys-boot/grub
      grub-install --target=x86_64-efi --efi-directory=/boot                       
                                                                                 
      vim /boot/grub/grub.cfg                                                      
                                                                                 
      timeout=5                                                                    
                                                                                 
      menuentry 'Gentoo Linux 5.18.19' {                                           
              root=hd0,1                                                           
              insmod all_video                                                     
              linux /kernel-5.18.19 root=/dev/mapper/root resume=/dev/mapper/root resume_offset=125798400
      }

  4. Fix suspend.conf

     vim /etc/suspend.conf

     resume device = /dev/mapper/root                                             
     resume offset = 125798400    

  5. Setup an initramfs

     cd /usr/src
     mkdir initramfs
     cd initramfs                                                                 
     mkdir -p bin dev etc proc sys new-root                                       
     cp -a /dev/{null,console,tty} /usr/src/initramfs/dev/                        
     cp -a /bin/busybox ./bin                                                     
     cd bin                                                                       
     for i in `./busybox --list`                                                  
     do                                                                           
         ln -s ./busybox $i                                                       
     done                                                                         
     cd ..                                                                        
     cp -a /sbin/cryptsetup ./bin                                                 
     mkdir -p ./run/cryptsetup                                                    
    lddtree -l /sbin/cryptsetup

    Copy in all of those files until the local cryptsetup works appropriately

    vim init

      #!/bin/sh                                                                        
                                                                                 
      # Define a rescue shell                                                          
      rescue_shell() {                                                                 
          echo "Error in boot process, dropping to a shell"                            
          exec /bin/sh                                                                 
      }·                                                                               
                                                                                 
      # Mount our devices.  We sleep prior to dev to hopefully finish loading.         
      mount -t proc none /proc                                                           
      mount -t sysfs none /sys                                                         
      sleep 2 && mount -t devtmpfs none /dev                                           
                                                                                 
      # Decrypt the root partition                                                     
      cryptsetup --allow-discards luksOpen /dev/nvme0n1p2 root || rescue_shell         
                                                                                 
      # Attempt to resume                                                              
      printf '%u:%u\n' $(stat -L -c '0x%t 0x%T' /dev/mapper/root) > /sys/power/resume  
                                                                                 
      # If we're not resuming, mount the new root                                      
      mount -o noatime,discard -t ext4 /dev/mapper/root /new-root                      
                                                                                 
      # Unmount (cleanup) our devices                                                  
      umount /proc                                                                     
      umount /sys                                                                      
      umount /dev                                                                      
                                                                                 
      # Boot from the unencrypted partition                                            
      exec switch_root /new-root /sbin/init
          
  6.  Suspend should be working with:

      echo shutdown > /sys/power/disk                                              
      echo disk > /sys/power/state  

      or preferably

      loginctl hibernate
Anyway, there's a lot of missing detail in there, but the idea is that there's a swapfile inside the normal encrypted root partition. For me, I've enough ram where I don't really use swap unless hibernating, so a swapfile versus a separate encrypted swap partition suffices.
kxyvr··on An X11 apologist tries Wayland
I'll ask here in case anyone knows: I actually needed to move from Wayland to X11 on the new Framework laptop because of problems with the touchpad, which I believe uses libinput in Wayland. It appeared as though small motions of the touchpad weren't registering and seemingly no amount of fiddling with the libinput parameters helped. I moved to X11 and the synaptics driver and have had zero issues. I'm not really looking for tech support, but I am curious if anyone else has had similar experiences. This was the final issue that pushed me off of Wayland and back onto X11.
kxyvr··on BMW's 3,854-Variable Problem Solved in Six Minutes with Quantum Computing
Candidly, it took way too long to find their model. Information about each of the challenges can be found here:

https://crowd-innovation.bmwgroup.com/servlet/hype/IMT?docum...

A pdf of the formulation can be found here:

https://crowd-innovation.bmwgroup.com/apps/IMT/UploadedFiles...

and their data set can be found here:

https://crowd-innovation.bmwgroup.com/apps/IMT/UploadedFiles...

If anyone from BMW is reading this, I will contend that you will get more interest if the sites that host your information are search indexable and if the news briefs published about the contest and conference actually refer back to the conference/contest website.

kxyvr··on Tell HN: You can't hire because you don't post salary ranges
How well is this law actually enforced? As an example, I quickly pulled a physician job at a random HCA hospital in Denver:

https://careers.hcahealthcare.com/jobs/9031565-pulmonary-sla...

I see no salary ranges. I pulled some other medical jobs as well and it seems moderately random if they list anything at all. Really, I may be misunderstanding the law and what information is supposed to be disclosed, but the larger hospitals and medical groups in Colorado mostly don't post salary ranges.

kxyvr··on Roe's overturn is tech's privacy apocalypse
Yes, I believe women have been prosecuted for self-inducing abortions using an abortifacient even prior to the current court ruling. For example:

https://newrepublic.com/article/111368/the-rise-diy-abortion...

https://www.latimes.com/nation/la-na-abortion-murder-2015061...

https://www.nytimes.com/2014/09/22/magazine/a-mother-in-jail...

There are more examples. The point is that those who received an abortion have been prosecuted even prior to Roe being overturned. It stands to reason that they will be prosecuted now.

kxyvr··on Why I’m Leaving the University
As far as I know, Texas has not removed tenure. In 2015, Wisconsin significantly weakened their system and Georgia did as well in 2021. There was a paper published last year that discusses the impact of the political decisions on Wisconsin's university system that can be found here:

https://peer.asee.org/impacts-of-governmental-policy-actions...

This does discuss the impact of essentially removing tenure, but the impact is also intertwined with budget cuts enacted around the same time. As a side comment, the good faculty that I know would absolutely favor a tenured job over a non-tenured.

kxyvr··on The Materials Project
For someone that understands this topic better than I, what's the difference between the target audience or information from this site compared to something like https://www.matweb.com?
kxyvr··on Interview with John Cook: mathematical consultant
Not a problem! And, yes, federal contracts are incredibly confusing and full of terminology that most people outside of that line of business do not use. That said, one more resource that may be helpful is your local SBA (Small Business Administration) office. There's some information online:

https://www.sba.gov/federal-contracting

However, some of the local reps can be good. If your business qualifies for 8(a) status, there's much more help that the government can provide that can also be helpful. There's information on the SBA's website as to what that means and how to register if you qualify.

That said, I'd start with a local chapter of the NCMA. That will help demystify much of the process. Then, I'd talk with the SBA to see if they can provide further assistance.

← PreviousPage 2 of 13Next →