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


rad! sponsored


It's the first section in the article -

"I have implemented manual memory management via cpp/new and cpp/delete. This uses jank's GC allocator (currently bdwgc), rather than malloc, so using cpp/delete isn't generally needed. However, if cpp/delete is used then memory collection can be eager and more deterministic.

The implementation has full bdwgc support for destructors as well, so both manual deletion and automatic collection will trigger non-trivial destructors."


When you’re debugging, especially a complex system, especially during an outage or postmortem, understanding when your commands executed relative to when your log lines appeared is really helpful.


That's a good reason to have timestamps in the history, which you should.

Something like

  export HISTFILESIZE=
  export HISTSIZE=
  export HISTTIMEFORMAT="[%F %T] "
  shopt -s histappend
really ought to be default in bash.

It's not as clear why you need it in the interactive prompt.


I didn't make it quite as clear as I should: the reason to have it in the prompt is mostly so that you, or someone you're working with, can spot a trend you may not consciously think to look for if the timestamps weren't in front of you.

It sounds silly, but it has saved my butt more than once. Especially if you have bugs that e.g. only show up once per hour on the hour, and are otherwise fine.


That's a poor and hacky substitute of using Linux audit features. It's perhaps the right robustness/complexity trade off for my personal machine, but for work they likely already have audit features turned on and you can access the timing from there.


I think you need to put a number on "likely", here. 80% of all workplaces, maybe? Even that seems a little high. There are a surprising number of devs who have never even heard of auditd. It's just not the kind of thing most people come across in their day to day work unless they go digging for it, or come from a security or DevOps background or something.


sounds like your describing https://linux.die.net/man/1/ts


Oh, that's an interesting use case, alright.


fun fact - this person (jcs) also founded lobste.rs


This is the thesis of Bullshit Jobs!


Bullshit jobs infect the whole stack from the board of management down, but "middle-managers" are probably the most over-represented.


I love the crossover with the Prince of Persia, which was also an early computer labor of love.


What was the original?


arewefastyet.com


the answer would appear to be "hell yeah (mostly)"


Wait, this busking happened on the way TO work and not the way home?

No wonder why no one stopped!


Thinking through the implications of building batteries for homes and coordinating them for demand response programs a la Tesla Powerwall.

Distributed battery storage can help alleviate transmission bottlenecks that prevent other storage and renewables from coexisting on the current grid (building new transmission is slow, on the order of decades).

Home batteries themselves are made of commodity parts (18650 battery cells power everything from vapes to electric cars) and battery management and demand response are software problems that are amenable to good systems programming.


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

Search: