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

Idempotency is easy if you don't use mutable state in your middleware.

Auth, logging, and atomicity are all isolated concerns that should not affect the domain specific user contract with your API.

How you handle unique keys is going to vary by domain and tolerance-- and its probably not going to be the same in every table.

It's important to design a database schema that can work independently of your middleware layer.


So idempotency is easy if your service does not do anything useful?


It's just the horrible misapplication of the term 'stateless' to a wrapper around something very-much stateful. It's here to stay.

(Though I do disagree with the original premise too. Putting on a 'stateless' boxing glove won't mean there's no difference between punching a guy once or twice)


> Putting on a 'stateless' boxing glove won't mean there's no difference between punching a guy once or twice

There are still side effects in the system, of course.

But what your database looks like afterwards is the important part.

Can you recover lost data, replay transactions, undo, etc etc?


Whether or not your service does something useful is up to you.

A database on it's own is enough for most business applications.

If you haven't seen this yet, you're just rent seeking.


I believe this research is totally true-- I had a lot of memories come back after

1. I stopped drinking heavily and using other drugs, i.e. marijuana

2. managed my diet to avoid heartburn without medication

3. schedule my meals so it was easier to sleep at night (always eat something for breakfast when I wake up)

I did not need any "poo infusion" or anything.

I had a gal bladder removal that didn't fix the problems the doctors thought it would and got a lot smarter about the kinds and variety of food I eat.

I believe alcohol in particular was really screwing up my gut biome and entire digestive system.


> 1. I stopped drinking heavily and using other drugs, i.e. marijuana

Heavy alcohol use and marijuana are both known to impact memory and recall directly.

Discontinuing both of those explains changes in memory. Attributing this to microbiome changes does not follow.


This paper actually surveys research on humans and not mice.

The association between gut microbiota and cognitive decline: A systematic review of the literature

https://www.sciencedirect.com/science/article/pii/S027153172...

It shows ”Gut microbiota modulation improves cognition in adults with early impairment. Diet, probiotics, and fecal microbiota transplantation share mechanistic pathways and that evidence clarifies how microbiota-targeted strategies support cognitive health.”

The action could be explained due to an anti inflammatory action by the gut biome.


Yes, there are some interesting potential mild modulations that can occur with microbiome change.

That paper commits one of the major sins of many microbiome papers which is to attribute all benefits of diet change to the microbiome. Like the parent commenter it gets drawn to the idea that all changes in the body can be traced back to the microbiome and assumes that it explains everything, but that’s obviously not true.

However, when someone is taking two powerful substances with direct brain action and known modulators effects on memory, blaming anything else in the body is bad logic.


>Heavy alcohol use and marijuana are both known to impact memory and recall directly.

And who said they don't do this (long term) exactly through their affecting the gut microbiome?


Both alcohol and marijuana have direct actions on the brain. That’s why people consume them.

They do not exert their primary effects via microbiome modulation. This is obvious because the effects occur nearly immediately upon consumption, whereas microbiome change from what you consume is a gradual process.

The question I have is: Why has microbiome become the explanation for everything? What would lead you to believe that microbiome would be the explanation for this, when the direct action upon the brain is so much more direct and obvious? Microbiome is an interesting area of research but how did we get to this point where some are ignoring the obvious and trying to construct alternative microbiome based explanations for things like alcohol and marijuana impairing memory?


>Both alcohol and marijuana have direct actions on the brain. That’s why people consume them.

Which is orthogonal as to whether those direct actions also affect long term memory.

>They do not exert their primary effects via microbiome modulation.

Who said anything about primary effects?


a great deal of alcohol, weed, etc, is consumed ,very specifcly, to forget. to the point that users, often workers doing labour, or other jobby jobs, get fairly aggetated by days, and especialy weeks end, wrapped up in an overload of the realities of serving others interests, and ends. drugs provide a crude function similar to the processing that occurs durring sleep and dreaming. That this has effects on the gut, is hardly unexpected ,but that the system will recover with due care, is. Treating the gut as a self maintaining biological digester, which it is, then suggests looking at how various industrial digestors operate and malfunction.


Or by affecting the kidneys, or by affecting the enteric nervous system, or through some other pathway for which we have no substantial evidence of influencing memory (yet). It just seems like a baseless prioritization of a hypothesis. For some reason, people are specifically fascinated by the gut–brain axis.


>For some reason, people are specifically fascinated by the gut–brain axis.

Might the reason be that we're constantly finding new important ways it affects things, or that we see major changes to seemingly orthogonal issues from targetting the gut microbiome directly?


I think the appropriate response here is some combination of Russell's Teapot and Occam's Razor: they might, but some kind of hard evidence is necessary before humouring that theory, particularly since there's a vastly simpler explanation on hand.


It has been well recognized that alcohol significantly disrupts the bacteria in your gut.


Anecdotal. I have never drank much alcohol, but an evening Trappist helped me turn off after a day's work.

Since I stopped that habit, I do notice memory getting worse. Not saying it is THE EXPLANATION, but it is an observation non the less.


Also, getting better sleep (by fixing heartburn and meals) will mean you're more rested, and improve functioning during the day.


It could easily be both.


Your hypothesis here though is full of complicating factors.

For example

>I stopped drinking heavily and using other drugs, i.e. marijuana

Like the primary change you made was to cut out using a whole bunch of drugs with known, significant neurological effects.


I think the "and" is for "stopped (both) A and B"


Yes, that's what they're pointing out. Changing multiple variables at once means you can't attribute changes to any one of those variables in particular.


The really crazy thing that happened to me when I changed diet to a more gut-biome friendly* is that (like I craved sweets before) I started craving vegetables and oatmeal. Like there was a regime change in my gut and the new guys pushed the buttons to get more of their food.

(less/no simple sugars, much more vegetables and starches/fibers, regularly eating 4 corn/20 plant oatmeal few times a week)


> 4 corn/20 plant oatmeal

What does this mean?


It's my own idea for a super oatmeal. Working on the idea that it's not just about having fiber in your diet, but more so about variated fiber. Each kind of fiber is preferred by a different type of gut bacteria (I'm just repeating after some hippy that most likely made that up). And the best gut biome is the most variated one. Usually pathologies stem from monocultures. Look at the most of the society. Bread, cookies, pretzels, even pizza etc. - it's all made of wheat. Sometimes you'll get oat cookies. But other grains show up in people's diets very rarely.

Here's the recipe. I'm using norwegian 5-grain oatmeal that has oats, wheat, barley, rye and spelt:

Recipe: Use two parts oatmeal (either 4-korn or 5-korn). Add one part nut mix and one part seed mix. So for 50 g of oats, add 25 g of nuts and 25 g of seeds.

Seeds: 30% flaxseed 30% chia 20% pumpkin seeds 20% sesame

Nuts: 4 parts walnuts 2 parts pecans 1 part Brazil nuts

P.S.: since most of these ingredients are pretty cheap (oatmeal used to be poor mans food), you can upgrade to Eco versions of these and get much better taste, without going that much up in price. Especially nuts.

Also, I have the nutmix and seed mix pre blended in 2 liter jars, so that I only have to mix them once a month or two.


You seem to be on the right track because supposedly for good gut health we need to eat at least thirty different plant foods each week. You've got twelve just for breakfast!

https://www.theguardian.com/wellness/2024/apr/04/30-plants-w...

https://mydoctor.kaiserpermanente.org/mas/news/eating-30-dif...


What did you do for heartburn? Just looking for ideas. I noticed reducing gluten helped me personally a lot


I stopped taking esomeprazole after being on it for 4 years, and frequently had to supplement with famotidine and tums anyway.

I had an infection and was prescribed antibiotics, and needed to pause the esomeprazole. I asked gemini about it and it suggested I take two probiotics while on the antibiotics, Saccharomyces boulardii and Lactobacillus rhamnosus GG. I noticed after a few days that I wasn't getting heartburn, and started putting the pieces together.

After the antibiotics ended, with still no heartburn, it recommend I add rhamnosus gg to the mix. So now I take all three daily and rarely get heartburn. It's been quiet a shock


There is a weak association with use of PPIs and memory loss. I myself noticed a difference once I stopped taking omeprazole regularly.


Most doctors will say avoid long term use of PPIs for a variety of reasons. Famotidine is much easier on the body, albeit less effective than PPIs.


thank you going to try this. I noticed my heartburn got a lot worse after having to take a few courses of antibiotics.


Some good notes on heartburn, a fiber regime, some combination of wheat dextrin, psyllium husk, inulin. All 3 are different and serve a somewhat different function.

Foods to eat, oatmeal, lentils.

Ginger tea, activated charcoal tabs.

Most all of that works very well to support gut bacteria so throwing some probiotics in as well can help. The gummy kind available in generic or Digestive Advantage work well!


Im not saying to live this way, but a super restrictive test diet may open your eyes to some thing and then you can add back.

I even once read that someone noticed an issue they tried to clear up for years with doctors went away on day 3 of a water fast. No, he wasn't going to fast forever. But he was shocked the first relief he ever had was that day. From there he solved his problem once his eyes were opened a bit.

I'd personally try all ground beef for a week or two. It won't kill you. Is it ideal? Probably not. But you will not have any problems from that short trial. Then add things slowly until you have a whole good diet you like.


Thanks, I’ll definitely give a fast and slow reintroduction a shot


It might not be gluten (protein) that is affecting you, but the fructans (carbohydrates) that are found in wheat, rye, and barely which are high in FODMAPs.

Look into low-FODMAP diets if you haven't already.


Thanks, my wife and I did one and it helped but it’s really hard to find the root cause because I also wasn’t eating bread at the time. I also get it from beer but not liquor, which makes me consider its gluten. Great point though, I’ll keep it in mind


It may not work for you but I had years of chronic heartburn. While sick with covid in 2020, I stopped consuming coffee and alcohol. It took a few months and for the long covid symptoms to subside, and then no more heartburn. At all. I felt really dumb that I never connected it to coffee before. I didn’t experience direct symptoms from coffee and I didn’t consume an excess amount. But it definitely was the cause.


The kind of coffee you drink can make a huge difference as well. Filter coffee is typically larger in volume so there’s more acidic liquids going in to trigger your heartburn. Compared to espresso which is usually a smaller volume. It can be a huge difference in heartburn between coffee types.


I'm a couple weeks into giving up coffee because of heartburn, and yeah, this tracks... unfortunately. I've replaced heartburn with heartache (having given up a beverage I've enjoyed daily for over 20 years).


What kind of coffee were you drinking? I replaced filter coffee with espresso and my heartburn went away.


Good luck, my friend. I’m right there with you. It’s not the physical effects but the rituals and the social connections that I miss. I felt the same with coffee as I did with smoking, which I quit about 20 years ago. It’s remarkable how much these simple vice shape our daily lives.


Yup. Discovered me and my dad have ADHD at pretty much the same time. In our case (very stimulant sensitive) we had to quit coffee to use ADHD meds. While I eventually switched to Inka (a roasted grain coffee substitute) when I saw how my heart results get better without coffee, he still struggles. He recently quit meds for some time due to unwanted symptoms and told me how he was away with some friends and deeply relished being able to normally drink coffee again.


I can confirm that eliminating coffee can make a big difference.


My "chronic" acid reflux disappeared at USMC boot camp so...exercise, no snacking, no alcohol, and rigid sleep schedule?


There are many resources online on which foods trigger gerd and reflux. Also, try the whole30 anti inflammation diet, and don't eat at least 2, preferably 4h before bed.


not the commenter but I bake my own soda bread and found that i was getting heartburn from the salt that was in the recipe. once i eliminated that i could eat as much as i wanted. I also cannot eat salt preserved potato chips on consecutive days.


I kind of wonder if sometimes acid reflux happens more than we realize, but we just notice it when spicy food comes up.


Pretty sure this is correct. You only notice it when it comes right out of the top. Other days it may be 25%, 50%, or 75% of the way up. And that's still bad for your oesophagus over the long term. My dad got cancer right at the bottom and one potential cause was chronic acid reflux (GERD leading to Barrett's eosophagus).


Fascinating to hear. I am trying to cut alcohol - still not entirely successful.

But I've been able to cut for months at a time. Whenever the cut happens, I feel my brain sort of "return" roughly a week or two in.

I'm not sure how to explain it other than something like fog clearing. Obviously makes some intuitive sense when you read it.

However, as someone that has consumed alcohol somewhat regularly (sometimes more, sometimes less) since college, it's bizarre to think about that consumption in retrospect. In effect, years and years of "fog" - it makes me wonder how different or similar life would have been without that fog.

Can't change the past now, but a data point and strong signal for the future.


I feel that same way you described with the "fog" clearing. I don't know exactly what it is, but I'm imagining it being the fact I _finally_ get some good, restful sleep (with it taking about 2 weeks give or take for that clear headed feeling to regenerate).


Oddly I don’t feel like I sleep better, but probably do. But I’m sure you’re right about the impact of sleep as a contributor to the overall clearing.


weird. gal bladder removal made me a lot smarter too. no, really. cuz it didn't fix my problems either. well, it did but in an unexpected way. because it forced me to ask myself the real questions. so i started fixing my life, bit by bit. trial and error.

theorem of indirection, i guess.


So, you stopped being an alcoholic and pothead, and your memory improved?

Wow, it must be those gut microbes!


What unnecessary snark. Is a little civility too much to ask for?


Ridiculous claims deserve to be ridiculed.


On Reddit perhaps. Not here.


> Strange game, the only winning move is not to play.

What a tired aphorism. Just like PG's 50 year old insights.


I most commonly use random() for generating names (e.g. docker's container names) and generating test inputs. I don't care about cryptographic safety in either case.


But you probably care about collisions in that case. The small state of a language-default insecure PRNG will make collisions much more likely. Especially if seeded by a clock.

I have seen temp file name collisions cause data corruption in a real system because the default language RNG was used. Also infinite loops in a production system because random() was called in the same clock tick by two separate threads generating a handle value. Both wasted weeks of effort to pin down.

random() should default to the system CSPRNG. Provide insecureFastRandom() for those who know they need it and it is safe for their use.


I wouldn’t imagine you care that much about speed either, right? Unless you’re generating gigabytes of random test data, maybe.


> Microsoft teams is an extremely high quality product already.

This has not been my experience with MS Teams. If I respond to a message on my phone, and then return to my laptop, Teams has disconnected and I have to restart the app on my laptop in order to get updated messages. Scrolling back even 5 minutes in Teams' message history incurs multi-second latency sometimes, so reviewing the context of a conversation you're in is very painful. Threading is handled very poorly in teams and makes teams feel much more like a decades old forum than a chat application.

I do agree this is a good move for Slack, but only because organizations are adopting teams due to its bundling with Office 365, something most companies are already using. Slack has no other way to survive because the people in the org making these decisions aren't concerned with the quality of the tools they are choosing, just the idea they are getting something for free.


yep, teams has a lot of potential, but there's a lot of rough edges. for example until recently copy-and-paste didn't work. i was just thinking of moving from teams to slack. hopefully this is good news


We've moved from Teams, to Slack, and back to Teams over the last 2 years. Teams has come a long way since 2017, but the basic chat functionality is still pretty far behind Slack.

Next time, I'll stick with Slack.


I've been using the Markdown Reader Chrome extension and using the browser print function to do this kind of conversion.

What would be really useful (to me personally) is a tool that renders plantUML/mermaid embedded into markdown to a PDF. I haven't been able to find a simple solution that doesn't require writing code to integrate the libraries together, or rendering the images separately and bringing them into the markdown document (which is tedious).


check out markdeep[1] which allows diagrams (but I don't think it is comprehensive like plantUML/mermaid)

[1] https://casual-effects.com/markdeep/


There is a filter for Pandoc that lets you embed PlantUML.

https://github.com/kbonne/pandoc-plantuml-filter


> any stage of the request or the response L4-L7 at FPGA speeds

I also work at F5, and used to work on the FPGA. This is unfortunately not true for TCL iRules. The FPGA basically only operates on L2-4, L7 is all software.

There was some talk about doing L7/iRules in an FPGA but prototypes never produced compelling enough performance gains to make it worth it.


I learn something new today - thanks.


Not mentioned in the article, but bit packed data structures are easier to interpret in hardware and offer more guarantees. If I'm designing an FPGA/ASIC I can predict how many clock cycles a statically sized data structure will need to move through my system, and how much RAM I need while it's being processed.

I have spent a lot of time working with FPGAs that process network packets and many of the performance guarantees relied on the rigid structure of L2-4 protocol headers.


I was a bit surprised myself that the author prefers JSON to bit-packed protocols, but given that the author is none other than Eric Raymond, I have to take him seriously.

Accidentally, in my work lately I used JSON for data exchange over the network where performance is not important, and MsgPack otherwise where it is (which is essentially a packed JSON).


I feel like the fact that it's ESR causes me to take him less seriously. I'm basing that on the other contents of his blog, such as http://esr.ibiblio.org/?p=7239 , http://esr.ibiblio.org/?p=26 , and http://esr.ibiblio.org/?p=6907 .


We don't even need to get into his (execrable) politics; he's substantively bad on technical issues as well.

http://esr.ibiblio.org/?p=6839


> “Are you” she asked “the most famous programmer in the world?”

> This was a question which I had, believe it or not, never thought about before. But it’s a reasonable one to ask...

That is precious.


Don't worry, if you look into the comments, the politics really comes out in force.


Did he manage to work white nationalism into binary versus ascii wire formats? I've seen him make some pretty impressive leaps before but that would be outdoing himself.


Appeal to authority, huh? Do you also take all of his many racist statements seriously, "just because he's none other than Eric Raymond"?

"The average IQ of the Haitian population is 67... Haiti is, quite literally, a country full of violent idiots." -Eric S Raymond

"... The minimum level of training required to make someone effective as a self defense shooter is not very high... unfortunately, this doesn't cover the BLM crowd, which would have an average IQ of 85 if it's statistically representative of American blacks as a whole. I've never tried to train anyone that dim and wouldn't want to." -Eric S Raymond

https://twitter.com/tqbf/status/780839196231630848

(Note: this is just the tip of the shitberg. There are SO MANY MORE examples on so many other topics (like "Is the casting couch fair trade?") from so many other times over the decades.)


There's no need to appeal to authority; the article gives specific reasons when to use JSON and when to use binary. What do you think about those arguments?


There’s a nice rebuttal from one of the ntp people in the article’s comments.

JSON is a disaster for many reasons. Hardware incompatible floating point is one; inconsistency in parser implementations (and ambiguities in the spec) also don’t help.

Also, why use a tree structured data representation when the underlying data structure is fundamentally just a N-tuple with a fixed schema?

Similarly, why use a text protocol to send around fixed length blobs or encrypted data?


Just to clarify the phrase "one of the NTP people": I'm the lead designer of NTS, which adds modern cryptographic security to NTP. I did not design NTP; Dave Mills did that, in large part before I was born.

If I got the chance to redesign NTP from scratch, there are a lot things I'd change, but use of fixed binary fields is not one of them.



I use CBOR, which is a really nice binary Json. I use it for a custom protocol for embedded systems and it's just brilliant.


Yep, see also MessagePack. Kind of telling that esr didn't notice the existence of either.


I agree with others here that learning a language has a lot to do with learning an ecosystem, libraries, and culture. To contribute to an existing project, it's not necessary to really know the language that intimately. I "know" a handful of languages, but I have contributed in environments that I don't "know."

To learn languages quickly, I think the best way is by learning the 'building blocks' languages are composed from. How are function arguments passed (value vs reference), how is memory management handled (garbage collected, reference counted, manual?). Learning these lower level language concepts then allows a person to approach a new language by saying "How does this new language X handle concept Y?"


I'm not sure where you're getting your pricing, but the Monologue is $299 [1] and a new MicroKorg is $399 [2].

The MicroKorg is a great piece of equipment, but it's also prone to aliasing problems at the upper end, which shouldn't be present in the Monologue since it's all analog.

The MicroKorg also offers different features: FM Synthesis and a Vocoder. The Monologue has a full 16 step sequencer, wheras the MicroKorg has only an arpeggiator.

For this price point I think a lot of mucisians are going to find the Monologue is a good value. It isn't far off the MiniBrute which came out at $400 and has less features.

[1] http://www.sweetwater.com/store/detail/MonologueBK

[2] http://www.sweetwater.com/store/detail/microKorg


Seems the Microkorgs have gone up in price over the years. I paid about $250 for it when I got it a few years ago. I noticed you can still get them for $200 second hand.

The aliasing can be a bit annoying indeed. You can really hear it when slowly bending a high lead. I don't think it uses band-limited waveforms. But for bass lines it is absolutely fantastic!


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

Search: