Shared posts

09 Jun 13:05

Contributing to OpenBSD

I got a new laptop on Friday and gave it a shot with OpenBSD. This post summarizes that attempt and the way I was able to contribute to the project over the weekend. If you want ideas on how to get involved and give something back to the project - read on.




The laptop I got is a Lenovo G50-70 which comes with quite nice guts for a fairly low price. The first thing I did was slapping in my 5.6 CD set in order to obtain a 5.6 release dmesg from the laptop. The installation had only one bump. The re0 ethernet card was unable to obtain a lease from my router, initially I skipped the issue and just continued the installation from the sets provided on the CD.

Before installation I saw a mail on misc@ stating that X doesn't work on this specific machine. I enabled xdm and the same issue manifested itself - black screen. I spent two days hunting through Xenocara & graphics card driver code Finally found a good workaround: get a wife. I plugged in an external monitor as a last attempt to get X working and behold - it just worked. My wife was looking over the shoulder and noticed an outline of my xterm on the laptops primary display. Yes folks, it defaults to a really low brightness in X. Couple of hits on the F12 key (that's the brightness up function key on this laptop) and everything worked as expected. You can see the whole misc@ thread here. I got in touch with the original poster, he was already trying out PC-BSD and was planning to try out NetBSD to go through the driver differences between the systems. He thanked me for saving him time - he had the exact same issue :) I'm really happy that I could solve at least this small problem and it resulted in someone else not being  discouraged from OpenBSD.

I did mention a non working DHCP. The other person with the same laptop stated that his re0 card worked perfectly fine. This gave me some hope for getting my card working. After sending the 5.6 dmesg I obtained an amd64 snapshot USB image and burned it onto an USB stick. Unfortunately yet again the installer didn't receive a proper DHCP lease from my router. Two small tips for anyone in that situation. First you can tell the installer to use the sets from the USB stick. Just enter disk when asked where to obtain sets (the installer hints only about cd / http). Second tip, you can obtain firmware sets for fw_update from the project site as documented in fw_update(1). After booting up you can use the -p flag to point fw_update at your downloaded firmware and have it install the required ones without a working internet connection.

All of that said. I still didn't want to give up. I tried to obtain the lease again by executing sh /etc/netstart and got immediately dumped into ddb with a kernel panic. I reported the problem to the mailing lists. It's quite a long thread. The crash occurred on the MP kernel so the first thing I tried was reproducing it on the SP kernel. Each time I retyped all the debugging information (you can avoid manual typing if you set up a serial console). The problem is narrowed down to executing DHCP twice which results in an immediate panic on this machine. If you followed the thread, you will also notice that I reported the system freezing when re0 is configured either for DHCP or manually with a static IP address. Those happen shortly after a watchdog timeout from the re0 driver. Leaving the card unconfigured results in a stable system but of course no network connection. I did manage to get the card working once with a static IP address but was never able to reproduce that (even using backed up copies of the working configuration). Don't get me wrong. I got a ton of support from developers, the thread isn't complete as some people reply off list. Currently it's suspected t hat something else is corrupting kernel memory but it's only noticed when some things are moving through the network (i.e. by the pool debug checks when creating/freeing mbuf clusters). Pool debug is a known 'poison' value that is written to freed kernel pool memory and checked and next use t o see if something is scribbling where it shouldn't be. This can detect memory use after free & sometimes a machine memory map misses (stuff the machine uses for itself, acpi, smm, or something else). Don't think that I came up with that information on my own :) I paraphrased this from an off list email to give you some scope on the problem. My bad luck was that all of this happened during a porting hackathon - so people that would know more about that specific issue weren't around or were busy with something else.

The weekend was almost over and without a working network connection I had to slap Linux on top of the box to do Koparo work during the working week. I'm not giving up on OpenBSD on this box. I intend to try snapshots regularly on it to see if the installer picks up the DHCP offer. I might also try to reproduce that bug on the bsd.rd (installer) kernel. In case a developer picks up my report for serious debugging - I will just kill Linux on this box and dedicate it for troubleshooting while doing Koparo work on my other machine.

That covers all the work on the laptop. Though that's far from everything I did over the weekend :) If you are a frequent reader of my blog you should now that I also have an i386 machine dedicated for OpenBSD. I was playing around with it in parallel to setting up the new laptop.

The i386 machine is rolling with snapshots so the first thing I did was obtain a new one and upgrade the box. I changed my primary mirror for snapshots from the one I used during installation and didn't ever bother to change it in the system configuration. Because of that during each upgrade the installer defaults to the mirror I no longer use. Fortunately the installer comes with a list of mirrors that you can view by hitting '?' when it asks for the HTTP server. This loads up the file into less and you can then pick a mirror by entering it's number that was displayed in the listing. To my surprise less failed. I reported the problem on the mailing list. This resulted in an immediate reply from a developer with a thank you for spotting the issue. Shortly after a fix was committed so the issue will be gone next time I upgrade my box.

CVSROOT: /cvs
Module name: src
Changes by: rpe@cvs.openbsd.org 2015/04/05 06:37:14

Modified files:
distrib/miniroot: install.sub

Log message:
Cope with the removal of less from install media.
Noted by Adam Wolk, thanks.

OK krw@ deraadt@

I'm happy that I was able to detect an issue. That's one of the main reasons I run snapshots. With the issue solved it was time to take a look at the ports I maintain. I started off with a small reminder for a port I submitted a couple of weeks ago. The port was picked up and committed so now you will be able to install the go cover tool with pkg_add gocover.

I'm also the maintainer of otter-browser and before that weekend otter released beta 5. The port in OpenBSD was still beta 4 so it was time to provide an update. I talked with the Otter upstream and again was told that we need to incorporate some hotfixes in the port. This time it was a significant amount of patches. I decided to start with a quick work in progress port update followed by a question to the mailing list on how to handle the additional patches. While waiting for the reply & some more talks with Otter upstream I discovered a problem with the previous port. The GH_COMMIT variable in ports didn't work the way I expected it to so the package didn't contain the upstream fixes we were supposed to incorporate. Since this resulted in an incorrect package I decided to send a documentation patch to tech@ which makes it more clear that the GH_COMMIT variable is preceded by GH_TAGNAME. This submission resulted in Stuart taking a closer look at how both of them work and resulted in quite a big overhaul (well from my perspective) of the ports ecosystem. Followed by a commit to base & my updated documentation patch. There was also a slew of commits to existing ports that used both variables.

CVSROOT: /cvs
Module name: ports
Changes by: sthen@cvs.openbsd.org 2015/04/05 07:32:16

Modified files:
infrastructure/mk: bsd.port.mk

Log message:
Make it fatal to specify both GH_TAGNAME and GH_COMMIT, when this happens the
GH_COMMIT is quietly ignored. Problem noted by Adam Wolk, discussed with a few
in the room
CVSROOT: /cvs
Module name: src
Changes by: sthen@cvs.openbsd.org 2015/04/05 07:33:06

Modified files:
share/man/man5 : bsd.port.mk.5

Log message:
Don't use GH_COMMIT and GH_TAGNAME together. From Adam Wolk.

Since the issue was solved, with significant help from Stuart I submitted an updated port for Otter beta 5, which was preceded by a fix of the previous port from Stuart himself. All in all you can now pkg_add otter-browser to get the beta 5 and give it a spin :)

If you didn't notice by now. I'm trying to encourage all of you to give OpenBSD a spin. It's not hard to contribute to the project - even in a small way. I do hope that my contributions to the project matter and will result in at least one less problem for someone else in the future.
12 Apr 00:32

Scenery Cheat Sheet

Billy Wayne McCann

Can't believe they left out Forrest Gump.

At the boundary between each zone, stories blend together. Somewhere in the New Mexico desert, the Roadrunner is pursued by a tireless Anton Chigurh.
08 May 15:52

Supplements to Boost Your Brain: A Primer on Nootropics

by A Manly Guest Contributor

mech

Editor’s Note: This is a guest post from Mans Denton

For all the discussion about health and fitness, the primary driver of the human organism is often left out: the brain.

Since the 1950s, neuroscience has made discoveries that we can use to improve our memory, focus, alertness, and general cognitive abilities.

The application of these discoveries led to the birth of “nootropics,” a term coined by a Romanian doctor named Corneliu Giurgea in 1972 after discovering a family of “smart drugs.” Nootropics are natural and synthetic compounds that can improve your general cognitive abilities, such as memory, attention, focus, and motivation.

Despite the relatively new term, smart drugs have been used for thousands of years. In the absence of modern technology and scientific understanding, ancient cultures utilized herbs to improve cognitive function on all corners of the globe. Records of traditional Chinese medical doctrine date all the way back to 1100 BCE; and in Ayurvedic medicine on the Indian subcontinent, herbs were utilized as cognitive enhancers as early as 5000 BCE.

Caffeine in tea form was discovered between 1500 and 1000 BCE in China, while the more potent coffee beverage was popularized in the 13th and 14th centuries. The human love affair with brain boosting substances is ancient, but only recently has science caught up with our ambitions. What follows is a brief description of nootropic benefits, a list of recommendations, tips on customizing your usage, and a few words of caution.

How to Approach the Use of Nootropics

Unfortunately, so far there has been no pill invented that will instantly transform you into a cognitive superman, a la the movie Limitless. There are no shortcuts to mental sharpness: the foundation of cognitive deftness and fortitude remains study, discipline, and regularly engaging in attention-strengthening exercises.

Rather than giving you mental strength, nootropics can simply enhance the mental strength that you’ve already built the old fashioned way. Approach them the very same way you do supplements for your physical workouts. Downing pre-workout drinks and whey protein isn’t magically going to turn you into a ripped strongman if you don’t use them in conjunction with hitting the gym. In the same way, nootropics won’t transform you into a genius, but they can give your brain a stronger “pump,” and help you hold on to the gains you make from your mental exercises.

Just as you might up the caffeine you take before going to the gym on a day where you’re feeling more fatigued than usual, or have a harder than usual workout planned, use nootropics for those occasions where you’re feeling mentally groggy and/or have an especially difficult cognitive task to complete.

Cognitive Benefits of Nootropics

Ancient medical practices recognized the different applications for various herbal remedies, and modern nootropics have a wide variety of uses as well. There are five main applications for nootropics, which all require specific supplementation. The specifics of the compounds I mention can be found below.

Memory – For young adults and the elderly alike, a better memory is always useful. Many nootropics are specifically designed to prevent the type of neurological degradation that causes Alzheimer’s, senile dementia, and Parkinson’s. Young individuals can retain material more efficiently when using memory-enhancing nootropics. Some smart drugs are better utilized for short-term/working memory, while others operate with longer-term effects. Piracetam, choline, and creatine are common memory enhancers.

Focus – Anybody that has experience with coffee knows the advantage of enhanced focus and attention. Many of the smart drugs that improve focus or alertness are stimulatory in nature, but also create a sense of clarity. Caffeine is a nootropic when paired with L-theanine. Asian ginseng and CILTeP also improve focus.

Mood Enhancer – Some nootropics enhance cognitive function by improving mood and reducing anxiety. In numerous studies, reduced anxiety results in higher test performance for a variety of cognitive indicators (including short and long-term memory). Caffeine and L-theanine is a mood enhancer, along with bacopa monniera and Asian ginseng.

Anti-Fatigue – Smart drugs that prevent fatigue work by blocking receptors in the brain or providing more efficient synthesis of energy. By reducing fatigue, users can work longer and more efficiently. Creatine and rhodiola rosea are effective anti-fatigue agents.

Reasoning & Creativity – A smaller category of nootropics also influence general reasoning skills and improve creativity in problem solving. Creatine and iodine are effective in enhancing these cognitive abilities.

Many nootropics have evidence to support these claims, but unfortunately, due to poor funding, long-term studies have not yet been done. Therefore, the long-term effects — whether for good or ill — of utilizing smart drugs on the brain is yet unknown.

Where to Get Nootropics

Below, we get into the specifics of nootropics and dosage recommendations. Many of them, however, are probably compounds you’ve never heard of. So where do you go to find these nootropics?

Some nootropics are available at brick and mortar stores that specialize in health products, like GNC and Whole Foods. The downside with going this route is that the prices tend to be higher and the selection lower.

For lower prices and better selection, buying online is the best route to go. But make sure to only buy from reputable dealers. Anyone can fill a pill with rice powder and pass it off as the real deal. To avoid being sold a bottle of snake oil, I recommend only purchasing supplements that come with 3rd party certificates of analysis for safety purposes. Also check out online reviews and forums for recommendations on reputable dealers. Here are a couple good ones to peruse:

Starting Compounds and Stacks

Nootropics are typically single-chemical compounds extracted from nature or synthesized by man. Combining compounds together for synergistic effect is called “stacking.” For beginners, here are a few compounds and stacks that are safe to choose from.

Caffeine + L-Theanine

Surprise! There is something better than caffeine alone. L-theanine is an amino acid found in green tea that can negate many of the side effects of excessive caffeine usage while enhancing the positives. Advantages of using L-theanine with caffeine include:

For those who consume caffeine regularly, a dosage of 100mg caffeine and 200mg L-theanine is best. Beginners can see positive effects with as low as 50mg of caffeine and 100mg of L-theanine, but the 1:2 ratio is best.

Creatine

For the same reason that creatine is useful for improving muscle mass and strength, it serves as a powerful nootropic as well.

Using creatine for cognitive purposes requires doses of 5 grams per day. At this rate, it will take around 2 weeks to start seeing an effect, but users can utilize a “loading phase” of 20 grams per day for 5 days to speed up this process before reverting back to 5 grams per day.

Bacopa Monniera

Bacopa monniera is an herb used in traditional Ayurvedic medicine. Users experience varied benefits including:

  • Improved short and long-term memory
  • Better reasoning test performance through reduced anxiety
  • Enhanced attention and focus (but not as powerful as caffeine)
  • Reduced anxiety/nervousness

The neurotransmitter benefits include improved acetylcholine release (involved with enhanced memory) and reduced stress on dopaminergic systems, which regulate the dopamine neurotransmitter related to happiness and pleasure.

Using 300mg of bacopa monniera extract (50% bacosides A and B) is best for beginners. Unlike other herbs, bacopa is fat soluble so it is best to take this with some type of dietary fat source; a piece of meat or a meal with cooking oil will suffice. Traditional Indian villagers use ghee with bacopa monniera.

Piracetam and Choline

The first “nootropic” found in 1972 was piracetam, which is a derivative of the neurotransmitter GABA. Scientists are still unclear about the exact mode of action, but piracetam does increase acetylcholine uptake and utilization in regions of the brain responsible for memory formation. Early studies on animals and humans showed that piracetam alone could improve memory better than a placebo, but combining choline with piracetam was even more effective.

Choline is a useful nootropic alone, as it is the dietary precursor to acetylcholine (which improves memory formation). Most people do not consume enough organ meat and eggs to fulfill choline needs, which makes it useful to supplement. The combination of choline and piracetam is not only effective for improving memory in young adults, but is also a leading treatment for Alzheimer’s, senile dementia, and other neuro-degenerative diseases in the elderly.

Another interesting feature is the use of this stack for lucid dreaming. Lucidity is an awareness of being within a dream and manipulating events consciously.

Piracetam is the most popular and most well-known of the racetams, but there are structurally similar chemical relatives that have varying effects. Aniracetam is a more potent analogue that absorbs quickly, but does not last long. Oxiracetam is a neuro-protective agent that can halt and reverse brain trauma, while newer analogues like coluracetam and phenylpiracetam are still being tested in a laboratory setting.

A starting dose of 1600mg of piracetam is sufficient, though some people can utilize up to 6 grams. The most effective sources of choline are alpha GPC and CDP choline (200-300mg of either), rather than taking lecithin or choline bitartrate.

Rhodiola Rosea

This high-altitude herb is utilized as a mood enhancer and anti-fatigue agent. Rhodiola can help improve mood and enhance memory by increasing serotonin levels. Chronic usage of rhodiola can reduce reaction time and improve reasoning skills as well. The increased mood is often responsible for enhanced performance, which is why traditional Chinese medicine relied heavily on rhodiola (called “Hong Jing Tian”).

Starting with 350mg of rhodiola (3% rosavins) once a day can improve mood and reduce mental fatigue similar to creatine. Unlike creatine, rhodiola is an adaptogen that benefits from routine cycling rather than daily use. For rhodiola, a 3:1 ratio “on” and “off” is optimal, but individual guesswork is needed.

Asian Ginseng

The most famous and researched nootropic is Asian ginseng (not to be confused with American ginseng, which has few nootropic effects). Benefits of Asian ginseng include:

  • Improved memory
  • Enhanced focus/attention (similar to caffeine)
  • Enhanced mood through reduced anxiety
  • Enhanced performance: reaction time, endurance, memory retention

Starting with a dosage of 100mg (3-5% ginsenoside concentration) per day, just 1-2 doses will provide nootropic effects. Asian ginseng also pairs well with ginkgo biloba.

CILTeP

A new and more advanced nootropic combination is CILTeP, which stands for “chemically induced long-term potentiation.” The combination of artichoke extract and forskolin improves cAMP and inhibits PDE-4, which theoretically improves alertness, focus, and memory.

CILTeP is the result of a collaboration of the nootropic community. It came out of an open-source process instead of a laboratory. The ingredients were tweaked by dozens of nootropic users (including Tim Ferriss) to find the optimal doses, but has been completely untested in a research setting.

A good starting point is 900mg artichoke extract (5% caffeoylquinic acids), 4mg forskolin, 500mg L-phenylalanine, 750mg acetyl-L-carnitine, and 5mg vitamin B-6.

Customized Nootropics

Like diets and other lifestyle choices, the best nootropic stacks and combinations are often based on the individual. Many nootropics interact differently from one person to the next, which is why subjective, personal testing can be an effective tool for optimized cognitive enhancement. Test out different stacks and determine for yourself what works best.

One effective method of customizing nootropics is to determine which neurotransmitters are dominant in your brain and which are deficient. In The Edge Effect by Eric Braverman, one can take an assessment to determine your dominant and deficient neurotransmitters.

Some products, such as Onnit’s Alpha Brain, try to help individuals with pre-made combinations. Alpha Brain has many effective compounds, including alpha GPC choline and L-theanine, but many of the ingredients aren’t at a level that will serve as an effective dose for everyone.

Three Rules of Nootropics

As with any other tool, there is a “right” and a “wrong” way of using nootropics. There is plenty of variation in the goals and methodology of using nootropics, but being mindful of these three rules will yield more effective and balanced outcomes.

1. You must track results. There are many different modern technologies that can allow you to test and track nootropic usage to ensure they are having a positive effect on your cognition. No matter what area of cognition you are improving, Cambridge Brain Sciences and Quantified Mind have various tests to track progression. Even the Mercury App, which offers subjective testing based on feelings, can help you determine whether certain nootropics are working for you.

2. Do not become attached. People using nootropics sometimes fall victim to attachment either physically and/or mentally. Physical addictions to caffeine, rhodiola, and phenibut can reduce cognition and alter brain chemistry in the long-term. Mental addiction is harder to distinguish, but equally disastrous; any time you feel a need for nootropics, take a break. Use smart drugs in special situations rather than craving enhancement all the time.

3. Nootropics are not a substitute. If you are chronically under-slept, have a poor diet, and do not exercise routinely, nootropics will not solve all of your problems. Proper lifestyle choices are the number one priority; cognitive enhancement through nootropics is just a bonus in times of need.

Being mindful of these three rules and starting slowly with nootropics can expand your capabilities and help you to achieve your goals. Traditional cultures across the world have utilized many of these cognitive enhancing compounds for thousands of years, but modern science is validating their claims and making nootropics more accessible for everyone. Most importantly, they will allow you to break free from genetic limitations and deficiencies.

______________

Mans Denton is a biohacker hoping to optimize mental and physical capabilities by any means necessary. He blogs at The Hacked Mind and manages Pure Nootropics, which focuses on a small line of safe smart drugs.

07 Sep 11:23

Bee Orchid

In sixty million years aliens will know humans only by a fuzzy clip of a woman in an Axe commercial.