Hacker Newsnew | past | comments | ask | show | jobs | submit | thyrsus's commentslogin

If your colleagues just don't feel the benefit of the extra .lit file, is there a way to pull their changes to the derived files into your own .lit files and to keep the .lit files in a parallel version control repo or branch?


Sorta? Noweb and org mode's support of it, at least, has a "detangle" and it worked surprisingly well last time I tried it. You can't edit the comments it puts in the source, for obvious reasons. And I'm sure it has trouble if you tried to get too fancy. But it did allow me to edit the generated source directly and pull those edits back into my literate source. I imagine if this was something people were more often doing, you could make it more reliable, even.


Leo probably has the best implementation of bringing in others changes into your literate project.


Nope. The current system may be misdirecting 95% of labor, but until we have sufficiently modeled all of nature to provide perfect health and brought world peace, there is work to do.


And not only that, but most >>changes<< to software shouldn't happen, especially if it's user facing. Half my dread in visiting support web sites is that they've completely rearranged yet again, and the same thing I've wanted five times requires a fifth 30 minutes figuring out where they put it.


I'm a python newby, so please correct the following: The first function looks quadratic in time and linear in stack space, while the second function looks linear in time and constant in stack space. Memoizing would convert the first function to linear in time and linear in space (on the heap instead of the stack). For python, wouldn't I always use the second definition? For Haskell, I would use the [1..] syntax which the compiler would turn into constant space linear time machine code.


Late response, but yes, you are completely right. You wouldn't use either implementation whether you're using Python or Haskell; you'd use what you said, because that's both the most obvious and the most performant method of achieving the goal. It's just a fun exercise to show that the version using a lazy map is equivalent to the obvious thing. Some people find it mind-bending and satisfying in the same way some people might find bit-twiddling hacks cool, or math nerds might find any of these mathematical identities cool.

https://math.stackexchange.com/questions/505367/collection-o...


I do a lot of ansible which needs to run on multiple versions, and their yaml typing are not consistent - whenever I have a variable in a logic statement, I nearly always need to apply the "| bool" filter.


This is likely hair splitting, but you are far more likely getting bitten by the monster amount of variance in jinja2 versions/behaviors than by anything "yaml-y"

For example, yaml does not care about this whatsoever

  - name: skip on Tuesdays
    when: ansible_date_time.weekday != "Tuesday"
but different ansible versions are pretty yolo about whether one needs to additionally wrap those fields in jinja2 mustaches

  - name: skip on Tuesdays
    when: '{{ ansible_date_time.weekday != "Tuesday" }}'
and another common bug is when the user tries to pass in a boolean via "-e" because those are coerced into string key-value pairs as in

  $ ansible -e not_today=true -m debug -a var=not_today all
  localhost | SUCCESS => {
    "not_today": "true"
  }
but if one uses the jinja/python compatible flavor, it does the thing

  $ ansible -e not_today=True -m debug -a var=not_today all
  localhost | SUCCESS => {
    "not_today": true
  }

It may be more work than you care for, since sprinkling rampant |bool likely doesn't actively hurt anything, but the |type_debug filter[1] can help if it's behaving mysteriously

1: https://docs.ansible.com/ansible/11/collections/ansible/buil...


Yep. I just want strict yaml:

anything encased in quotes is a string, anything not is not a string (bool, int or float)


Including keys?


That style is not restricted to Asian speakers. Reading (a translation of) Gabriel Garcia Marquez's "One Hundred Years of Solitude" with its deep recursive layers of introducing a topic and then giving the backstory thereof - the firing squad from the first paragraph gets explained a hundred or so pages later - I immediately recognized my wife's normal pattern of discourse. I then congratulated her on having a Nobel prize winning speaking style :-)


I'm afraid I'm cheating -- I've never read the book but I am watching the Netflix series.

So I can't say if it's a faithful or reasonable adaptation of the book, but it is quite well done. I suspect that it's less deeply recursive than the book, but it captures a sense of magical realism for which I've heard the book praised. The camerawork is remarkable and the performances are excellent.


I enjoy this humor.


Do these AIs know how to do test driven development? Can you tell them the code generated must pass these test? Can AIs assist in developing tests?


Yes, absolutely.


My employer has stuff I'm responsible for which hit this the at least 18 months ago. The subscription cost was little problem but the headaches debugging kubernetes pod description imagepullsecrets was much more painful. We called Docker sales and asked how much it would cost us for unlimited anonymous downloads from our IP address. They took a couple weeks to just say "go away".


This says that the implementation cannot cede time slicing to the OS, therefore it would seem to necessarily occupy kernel space. Am I mistaken?


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: