Ask HN: Hack a healthy, yet not expensive, meal. - <AUTHOR> Hack a healthy, yet not expensive, meal. I know most entrepreneurs are money-constrained, but I believe that an entrepreneur should eat healthy meals. It affects your brain over the long term. So can you advise healthy meals that are still within the 2-guy-in-a-garage budget? Thanks. <comment><USER2> My wife and I have been working on this for a while. We want to eat at home, but we really don't like the process of cooking every day.

So, we cook once every 4-8 weeks. We purchased a freezer that we put in the garage for $3-400, and we do all of our meal prep at once. We buy all of our ingredients in bulk at Costco or the local Farmer's market, and then we prep 30-40 meals in one day. So, all we have to do for each meal, is thaw the package the day before, throw it in the oven or in a pan the following day, add a salad, and you're done.

It takes a lot of planning, and it takes a while before find a set of recipes that freeze well, but after a year or so of doing this, we pretty much have the list. We're at the point now, that my wife pulls 8 or 10 recipes from the database, she puts the ingredient list together, we go shopping on one day, and asssemble and freeze meals the second day. It's about 8-10 hours work for both of us, and it cuts down 1-1/2 hours of meal prep and planning every day for 4-6 weeks. Along with the recipe in the database is a label with cooking instructions that gets printed out and saran wrapped to the package.

If you Google for this, it's called "Once a month cooking".

</comment><comment><USER3> I recommend finding someone on craig's list to cook for you, so you don't have to worry about it. Time is at such a premium when you are trying to launch your own business, and if they're shopping for a family, they are probably better at bargain hunting and coupon clipping than you are.

I did just that, and I discuss it in this post. Wasn't sure if HN would appreciate it, so I haven't submitted it here:

[http://sidsavara.com/personal-productivity/the-price-of- my-d...](http://sidsavara.com/personal-productivity/the-price-of-my- dreams-60-a-week)

<comment><USER4> Time is at such a premium no matter what your goals are. And since this is HN, I should mention that this seems like a great idea for a startup.

<comment><USER5> Yeah, there's probably a huge market for places where people could go to eat meals someone else cooked for them!

<comment><USER6> Yeah! Maybe you could even deliver!

</comment></comment></comment></comment><comment><USER7> I have no idea about food prices in your part of the world, but being a high school student living on a very small budget (think $200/month for food expenses, and this is Denmark which is relatively expensive) I have learnt a few tricks.

One of them is baking your own bread! I have an electric mixer with some special tools for dough, so I spend 15 minutes every two days and have pretty good and cheap bread.

Soups are another nice one, forget about the advanced ones, go with something simple, yet good, e.g. potato-leek-soup. Make big portions, put it in the freezer.

Basic courses such as pasta can be pretty good if you spice it up a little. Forget about the ketchup, mix up a simple tomato sauce.

And a little gem from The Silver Spoon: Some oil on a pan, put on a whole garlic clove untill it's brown, get it off the pan. Add a can of tuna, and some tomato puree that has been mixed with a bit of water. Turn down the heat, give it some fifteen minutes and add to your pasta. Inexpensive, easy and surprisingly good if you spice it up a bit.

Basically anything that you can make in big portions and freeze is a bargain.

<comment><USER8> +1 for your own bread. My mother gave me a recipe for "food processor" bread, which involves about $0.25 worth of ingredients and a few minutes of work.

It's not the right season at the moment, but you could also consider growing your own stuff in the garden. Fresh herbs from the grocers are $$$, and don't taste/smell as good as what you pull and carry to your stove.

Commercial tomatoes breeds are optimized to have a tough skin, so that they can be thrown into large containers while green and hauled to the grocery store while ripening. None of this has anything to do with tasty or healthy. Growing your own tomatoes is also easy if you have a sunny spot, and you can pick varieties that taste better than what you'll end up with from the store.

None of these are cost-optimizing in a large way, but if you're going to be cooking anyway, you might as well enjoy better taste and the satisfaction of producing something physical and tangible.

<comment><USER9> +1 for grow your own. I take that a bit farther since I have chickens (<http://softwarefromthefarm.blogspot.com>) :-)

Although I have the acreage to grow pretty much whatever I want, you can grow lots of stuff in a small apartment as long as you have a window that gets enough light. Herbs don't take up much room, esp. if you use a strawberry pot and plant multiple types in the same pot. You can also grow tomatoes, etc. in pots

</comment></comment></comment><comment><USER10> Eat food (as opposed to processed food-like substances). Not too much. Mostly plants.

Read Michael Pollan's "In Defense of Food": <http://www.amazon.com/dp/1594201455/>

It's a whole different model from the shifting "red meat is bad" "no, carbs are bad" "avoid fat" "eat omega-3 fat!" madness that has ruled eating for decades.

<comment><USER11> I've been a fan of Tim Ferriss's 3-minute breakfast since he posted it awhile back: [http://www.fourhourworkweek.com/blog/2008/02/28/beating- the-...](http://www.fourhourworkweek.com/blog/2008/02/28/beating-the-morning- rush-the-3-minute-slow-carb-breakfast/)

<comment><USER12> I'm a big fan of the Seth Godin breakfast: [http://sethgodin.typepad.com/seths_blog/2006/09/compromise_h...](http://sethgodin.typepad.com/seths_blog/2006/09/compromise_how_.html)

</comment></comment></comment><comment><USER13> I bought a cast iron skillet for 10 bucks ([http://www.amazon.com/Lodge- Logic-4-Inch-Pre-Seasoned-Skille...](http://www.amazon.com/Lodge-Logic-4-Inch- Pre-Seasoned-Skillet/dp/B00006JSUA/ref=pd_sim_k_4)) and it's the best thing ever. Fast to heat up and start cooking and easy clean up. Best thing to make for me is pan-seared yellowfin tuna steaks over veggies like asparagus or broccoli.

Get a 5oz tuna steak of sushi-quality, marinade it with some soy sauce and sesame oil, sprinkle on some seasoning and sesame seed and just sear it on the pan for 2 minutes each side. Delicious, healthy, and fast.

Same goes for chicken. Blackened chicken, easy, done. The cast iron skillet goes from stove top to oven. God I love this thing.

<comment><USER14> Ever try making pizza on it? Flip it over, stick it in the oven as high as it will go and then after it gets NASA hot (this is a good time to have your dough warm up from a nice slow rise in the fridge) just slide your pie on. It will cook up in 3-5 minutes and come out tasting surprisingly legit. Cast iron is the deal.

<comment><USER13> I love you for sharing this tip. I've got a 10 incher so it won't make big pies but I can definitely get something fast and tasty going on.

<comment><USER6> Cast-iron skillets are great for baking bread, too. Shaking in a little cornmeal will help keep it from sticking. The big cast-iron dutch ovens are even better, though: the lid keeps in moisture, and the resulting steam is good for the crust. The enameled ones are easier to clean (and ideal for soup). You can probably find a knock-off Le Crueset-style pot for $60, give or take.

The easiest way to clean them is with a little kosher salt. It's quite abrasive.

See also: [http://www.nytimes.com/2006/11/08/dining/08mini.html?_r=2...](http://www.nytimes.com/2006/11/08/dining/08mini.html?_r=2&pagewanted=1&ei=5070&en=55fdc83a0e7b6687&ex=1165726800&oref=slogin)

</comment></comment></comment></comment><comment><USER15> Rice and beans. There are 1000 variations.

<comment><USER16> > Rice and beans.

I wouldn't aspire to a Hispanic diet. They're mostly short and chubby as far as I can see.

<comment><USER17> In that case, could you let us know what you eat so we can avoid being bigoted morons?

<comment><USER16> How exactly is it bigoted to notice that poor hispanics, who subsist largely on starch, have poor health and builds?

<comment><USER17> A) You said nothing about economic status, which makes all the difference in the world. Poorer people universally have worse health than middle-income or wealthy people.

B) Rice and beans isn't only eaten by Hispanics; maybe you should turn off the Lou Dobbs and pay a little attention.

<comment><USER16> Poorer people can't afford good food and have to eat mostly starchy staples. That's why their health is generally worse.

And you are quite wrong about low income "universally" meaning poor health. There are poor populations all over the world with good health from good diets. The healthiest sub-population in the US, and possibly the healthiest group in the industrialized world, are working class whites in the upper mid- west, in states like Minnesota. They eat a lot of meat.

<comment><USER17> I guess those nuts over at the MacArthur foundation have no idea what they're talking about.

You may want to submit your theories there.

[http://www.macfound.org/site/c.lkLXJ8MQKrH/b.951947/k.11B4/R...](http://www.macfound.org/site/c.lkLXJ8MQKrH/b.951947/k.11B4/Research_Networks__Socioeconomic_Status_and_Health.htm)

<comment><USER16> I guess this is some survey of the US which concludes the obvious: that income and health generally correlate. The best lesson to extract is probably "Don't eat like poor people." Which was my original point. It still ignores the plain fact that various poor populations with good diets are quite healthy. The exceptions invalidate the simplistic assumption about the general case and point to diet.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER18> The things poor people eat all around the world:

\- rice \- beans \- soy \- potatoes \- fish \- veggies (anything dark but not too expensive)

The real key to a good-tasting meal is freshness, even with simple foods. Seasoning is like makeup for food.

<comment><USER19> +1 for freshness

'real' food has 'bio-sensor' ... you can tell just by looking, that a fruit/veggie is bad

it's much harder to 'sense' that in processed food

i find that fruit/veg is harder to fool with, maybe having to do with its low price (not much incentive to cheat)

in my country we got rotten meats cleaned with formaldehyde and then soaked in fresh blood to be sold along with fresh meats ... such thing is unheard of in veg/fruit (groceries can wax to prevent, but once fruit/veg is rotten, it's hard to 'rejuvinate')

being vegetarian leads to simpler life, no worries about mad cow, avian flu, etc

<comment><USER20> Having worked with formaldehyde I expect that is a horrific practice for all concerned. Very shocking.

I'm not sure why, as a vegetarian, you feel you don't need to worry about avian flu. You catch it by being in close proximity to live poultry, not by eating it. As you've already said that your meat is dead when you buy it I don't see how your risk is any less than mine.

<comment><USER19> well, here resto and kfc seem to emphasize that they cook chicken at 350 deg C (or some high number like that), ensuring 'avian flu free'

i don't have direct experience with avian flu (I was in Taiwan during SARS, wearing masks, but didn't catch the flu) so i assume i can get it from eating ... well maybe it's just a marketing tactic from kfc and others

but still the peace of mind is there :D not having to worry about some stuffs is great

<comment><USER14> You can't get avian flu from eating an infected bird. You can't get avian flu from an infected person. You can only get it from a live bird (and even then it's rare). The hysteria was preliminary--on the off chance that it mutates for person-to-person infections.

Cooking chicken to 350C will result in charcoal, but will have done nothing to prevent avian flu as it was not a risk before. Just marketing.

</comment></comment></comment></comment></comment><comment><USER21> A large part of proper diet is eating a wide variety of stuff, so mix it up. Most of the stuff that is good for you is cheap anyway. Salads, fruits, vegetables, etc.

Resist the temptation to subsist on potatoes, pasta, and some of the other cheap, often high carb, low nutrition stuff.

</comment><comment><USER22> Saute mushrooms, with rosemary, garlic, onion, red pepper, salt and black pepper (to taste). Serve over couscous with yogurt (I recommend full fat stonyfield farms yogurt).

Variations: add sundried tomato to mushrooms.

Pasta with red sauce. Red sauce: saute garlic and a small onion. Add tomato puree (2 big cans), fresh basil (1 plant, break leaves off, wash, chop), garlic (saute first, then add tomato), oregano, parsley, salt and pepper (to taste).

Variations: add some cream and vodka to red sauce, gets you pink sauce.

Another good pasta sauce: saute garlic and onion in butter, then add heavy cream. When that heats up, add grated cheese (parmesan or swiss), salt and pepper (to taste), and possibly 1-2 tablespoons of flour (to thicken). You can also add sun dried tomato (saute it with the garlic), or cherry tomato (add it at the very end).

This video changed my life: <http://www.youtube.com/watch?v=dU_B3QNu_Ks>

In fact, just youtube Gordon Ramsey, Alton Brown, Jamie Oliver, etc, for good ideas.

</comment><comment><USER23> I cook based on price, ease, health, and how long it takes the materials to go bad. My favorites:

Lentils with onions, potatoes, and/or ham. Chop, put in saucepan with water. Salt.

Chili with rice. Fry hamburger and onion. Add canned kidney beans, tomato sauce, chopped habanero, and chili powder. Salt. I highly recommend a ricemaker.

I also like Thai curry with rice, but it'd be too much hassle if it weren't for the basil plants I grow. Fry chicken or fish with curry paste; add other stuff, like potato and peanut with red curry or eggplant or bamboo shoots with green curry. Add basil and habanero at the very end.

I keep some beans, tortillas, and cheese on hand for when I'm too lazy to actually cook, and lots of fruit for snacks.

<comment><USER3> Really? First basketball, now a thread about eating, that's where I find you?

<comment><USER23> this is so weird. if I randomly see you in a coffee shop in an hour, I'm going to freak out.

</comment></comment></comment><comment><USER24> Hire someone - I have a lady come in and make a weeks worth (7 meals for 2 children + 2 adults) of great tasting, healthy Indian vegetarian meals (4 dishes) for $40. The cost of the food is ~$20 if you shop smart, meaning avoiding grocery stores and getting your veggies from an Indian grocery store (India Cash and Carry in Sunnyvale is great).

Instead of making rotis (which mess up the kitchen and take a while to make, and really only taste good fresh), we just get low carb whole wheat tortillas.

</comment><comment><USER25> This is an awesome recipe that costs <£1 - I've managed to make it for 35 pence (not sure what that is in dollars these days) using product near their expiry date.

Buy some cheap soup in a tin. I recommend Cream of Chicken because it's quite nice and usually available. Go to the bakers or supermarket shortly before they close and buy a cheap crusty round bread loaf on discount. You could use a square loaf but that's just stupid. Warm up the soup. Whilst the soup is warming up, butter the underside of the bread and put it in the oven, medium heat for no more than 10 minutes. You ideally want it crusty and solid on the outside but not burnt. When the bread is done, slice off the top of the bread. Scoop out the insides, tearing them up into little pieces.

Here comes the science bit, watch carefully now:

Pour the soup into the empty bread, use the torn up bits of the inside to bulk it up a little or leave them to dip into it. Add salt and pepper to suit and enjoy not having to wash a bowl afterwards. I defy anyone to eat a whole one including the bread.

It won't leak because you baked the bread hard. The butter stops it from getting stuck to the bottom of the tray in the oven.

There, soup hacked :)

</comment><comment><USER26> Cook huge meals once or twice a week and save the leftovers...Spaghetti lasts me 4 meals, chicken pot pie lasts me about the same. +1 for PG's beans and rice...I cook it with kielbasa and sautee peppers and onions and that lasts me for 4 or 5 meals. Since I'm doing all my cooking, the average cost per meal comes in right around $3...not bad for a 2-guy-in-a-garage budget.

</comment><comment><USER27> \- eggs are cheap. egg white omelets and frittatas are reasonably healthy.

\- chili and soup. you can make a ton at once and then keep it in the freezer for meals the rest of the week.

<comment><USER28> Eggs.

Used as a replacement for meats in most dishes. Ideal cooking temperature is 145 F.

Warning: Be wary of dirty looking eggs; cook throughly; each egg contains around 75% Daily Value of cholesterol, so you may want to remove yellows post boiling or pre-scrambling.

Adding PG's comment: Beans and rice can get boring, but do serve well as a backup when nothing else is working.

<comment><USER29> _each egg contains around 75% Daily Value of cholesterol, so you may want to remove yellows_

Is there something wrong with eating cholesterol?

</comment></comment></comment><comment><USER30> Risotto - all that's required is rice, stock, and parmesan. Add mushrooms, shrimp or whatever if it's saturday.

Spaghetti bolognese - make a big serving and freeze it in portions.

</comment><comment><USER31> Some of the cheapest meals you can make will be pasta, stew, or chili type dishes.

For example, a great tasting pasta dish I made last night contained the following: (prices are approximate and based from a Canadian's standpoint)

\- 1lb of Bacon: $4.50 (Yes, it's not GREAT for you but in moderation it's ok and it's easily substituted with another meat) \- One onion, one head of Garlic: $1.50 \- 1lb of Pasta: $2.50 \- Parmesian, Some Butter, Parsley: $2.00 (plus you most likely already have this)

That creates 4 servings of a fabulous restaurant quality pasta (This is the actual recipe: [http://thepioneerwoman.com/cooking/2008/09/cooking-with- ryan...](http://thepioneerwoman.com/cooking/2008/09/cooking-with-ryan-pasta- carbonara/))

I made it last night, girlfriend and I have left overs for today. Super cheap, delicious, and healthy enough considering most of the stuff we eat is pretty healthy ( see : moderation!)

You will save a ton of money making food yourself but there's the whole issue of it being time consuming which makes sense in a time = money world. In my scenario, cooking is a hobby and I want to improve it so it's a bit different, maybe you are the same!

</comment><comment><USER32> CHEAP TRICK: Buy staple foods that'll keep. Pasta, canned tuna, canned veggies, tomatoes, beans and rice rarely go bad. For good cheap protein, try preparing eggs (not only scrambled or hard-boiled, but use them in egg salads, green salads or in pasta recipes.) Also, check out: [http://www.getrichslowly.org/blog/2007/07/30/16-ways-to- eat-...](http://www.getrichslowly.org/blog/2007/07/30/16-ways-to-eat-healthy- while-keeping-it-cheap/).

CHEAP DINNER: Because I have no patience and often forget to eat, I've figured out a cheap, filling lasagna-type

1) Prepare favorite pasta (penne works well) 2)Heat some marinara sauce, can or jar is fine. 3)Once the sauce starts to boil, reduce heat and add 1/2 C to 3/4 C cottage cheese to sauce (works like ricotta). 4)If you prefer, spoon cottage cheese over hot pasta and cover with heated marinara, then microwave or bake briefly to warm cheese. This adds a nice layer of melty cheese.

(Cover plate of pasta, cheese and marinara with shredded mozzarella and bake at 425 for 9-12 min. if you want to be fancy and cheap.)

</comment><comment><USER33> Wait until you get to the point where you want it healthy, cheap, and made for the super lazy. It gets even harder. Pans, ingredients, seasonings _NNOOOoooo_. If it's more complicated than PB&J I just can't bring myself to make it.

This leads to lots of frozen steam-able veggies, fruit whenever we get around to going to the store, lots of yogurt, bagged salad... but also a ton of noodles.

<comment><USER34> It might be different where you shop, but I generally found bagged and pre- made salads to be expensive and bland, and not last long. Salad is among the easier foods to make.

I have to agree with you on yogurt and frozen veggies.

<comment><USER33> Does your average head of lettuce last longer than the bagged variety? I hadn't really looked into it. If that's the case, though, it may be worth the extra effort.

</comment></comment></comment><comment><USER35> Buy whole meat instead of individual cuts. Honestly, it takes maybe 45 seconds to cut up a whole chicken. Use the breast meat for dishes with tasty sauces and cook the thighs, legs, and wings whole. Keep all of the bones and giblets to make stock. Boil the stock down A LOT. It takes a while, but you honestly don't have to do anything while it's reducing. Take the stock and pour it into ice cube trays and place the tray in the freezer. Any time you want to make a dish and give your sauce an extra heartyness, just throw an ice cube of stock in there.

Great easy sauces include:

-Chicken stock, soy sauce, and a little cornstarch

-Heated oil mixed with minced scallions, ginger and a little salt

-Chicken stock, pan drippings, savory and a little flour for thickening.

If you want to get more sauce ideas, I highly recommend the cookbook "Sauces." Filled with tons of awesome sauces and a great basis for learning about sauce making to create your own!

Cheap cooking and healthy cooking go hand-in-hand if you know what to do!

</comment><comment><USER36> Not exactly on topic, but... one of my future startup ideas is a robotic garden: basically, some kind of a transparent container with a controlled atmosphere and temprature, watering system, and nutrient supply that would produce a supply of fruits/vegetables year-round in any location.

<comment><USER37> I've seen those 'kitchen gardens' on infomercials.. 'just 3 payments of $49.99'. You can grow your own lettuce.

Would be cool if you could actually create something that would sustain a family - it will be difficult to find produce that will yield well for many conditions without expending a ton of energy to control its environment though.

<comment><USER9> You don't _need_ a year-round supply of fresh fruits/veggies. Just need to be able to preserve the out of season stuff.

I used to have those grand plans of automated gardens until I realized that 90% of the problem is solved by a small greenhouse you can build for $10 in Home Depot materials.

</comment></comment></comment><comment><USER38> Salad. Cut up the lettuce (the more colors the better - spinach, red leaf, romaine) once a week. Stick it in a big covered bowl in the fridge. Then add different stuff for different varieties - corn, tomatoes, avocado, shrooms, tuna, steak, chicken, ...

</comment><comment><USER39> I've been cooking low-carb for a few weeks as an experiment.

For dinners I've been having a bit of meat over a large salad.

Last night:

1) half a bag of mixed lettuces 2) a diced tomato 3) 6-8 oz of frozen shrimp, thawed, pan fried in a dab of oil and a big heap of cajun spices 4) some home made dressing from acquaintances who run a local pizzeria and bottle their own dressing.

Other variants: * replace cajun shrimp with chicken breasts ground and cooked up taco-style, and throw some thin-sliced red onion and thick-cut avacado in there * ...or a steak, marinated for a few hrs in fresh squeezed lime juice and soy sauce, then quickly seared on a grill.

When you're eating a lot of bulk veggies, a little premium priced meat goes a long way.

When you're eating mos

</comment><comment><USER40> A big wok full of veggie stir-fry was my "go-to" dish in college. Frozen vegetables work well enough if money is really tight, but if you're willing to work with whatever is in season (or on sale) at the grocery store, you can get a lot of variety and flavor without spending much.

Fresh ginger and garlic, along with some soy and sweet chili sauce, is really all you need for seasoning; protein can come from tofu, chicken, or really any meat or seafood item; carbs come from rice or ramen noodles that are boiled and then tossed in to sautee once all the veggies are done.

</comment><comment><USER41> Everyone's got different standards for healthy, and cheap. Mine probably aren't great, but I think it's a good starter position for going down this road. Especially if you're not really a cook.

Here's mine: hit the grocery store and pick up some freezer ziplock bags and some family-size packs of meat (whatever's on sale). Individually bag and freeze them. With some veggies and sauce (A1 goes well with a lot), you've got some good options.

Also, pasta. Mix in some chicken.

</comment><comment><USER42> All you need are a few "all purpose" ingredients

1\. boneless, skinless chicken breast

2\. mixed frozen veggies

3\. rice or bread (rice keeps a lot longer...)

4\. Misc seasonings (salt, pepper, chili powder, teriyaki sauce, soy sauce, etc)

You can buy these things in bulk and they will last forever. Combine to make whatever dish you like. One of my favorites when I was working out a lot:

1\. Season chicken breast teriyaki sauce

2\. Wash rice and put in rice cooker

3\. Steam veggies along with the rice

4\. Cook chicken on foreman grill

5\. Pull out veggies, season with salt and pepper

6\. You're done!

You could do a stir fry dish just as easily.

</comment><comment><USER43> Mixing a salad with a can of low sodium tuna fish, lettuce, and spicy mustard provides a lot of protein and no simple carbohydrates so it will keep your blood sugar from crashing. Add baby carrots to it and the fiber will keep you full for hours. If you create several of these and keep them refrigerated in plastic containers you'll always have healthy meals on hand for when you get hungry.

</comment><comment><USER44> Meta-tip: Don't forget to do the math. I like making my own chili, and it's healthier and tastier than pre-packaged fare, but after adding everything up (15oz each red, black, and pinto beans, 28oz diced tomatoes, a few fresh habaneros, ~1lb ground turkey, one onion, chili powder), it's slightly more per meal than if I'd bought a small fast-food chili or can of Hormel's

</comment><comment><USER45> Take some premade pizza dough, put some ricotta cheese on it for the base - saute some baby spinach (10oz or so) and artichoke hearts (1 can will do) throw it on the pizza. Cook a single chicken breast in a skillet, dice it up, throw it on the pizza - sprinkle with feta cheese, add some crushed red pepper - throw it under the broiler until the feta is soft.

Enjoy.

</comment><comment><USER46> I make a lot of meals for my roommate and myself with 2 cans of tuna ($.69-.89 a piece) and a package of 'parmesan couscous' ($2.49). The couscous part can be broken dwn even further if you just buy a big thing of couscous without the flavoring and make your own.

Total: $3.50 for two people. You could probably feed three with it, the servings are huge.

</comment><comment><USER37> I go to whole foods every 3-4 days. Pick up just enough: \- Tuna salad, Turkey, Pre-sliced peppers, Broccoli, Yogurt, walnuts, Green / white tea, prepped salads, walnuts, etc

Trick is to make sure its ready to eat - even if its a little more expensive, that keeps me from eating out. Also, going every 3-4 days means that I eat everything, no waste.

<comment><USER47> Whole Foods is probably the least economical place to shop.

<comment><USER48> If your whole foods has a bulk section its rather economical to shop there for that.

But on the topic of cheap/good for you eats: Can't go wrong with burritos made with beans,corn and rice.

<comment><USER29> _If your whole foods has a bulk section its rather economical to shop there for that._

Indeed. However, the bulk spices are even cheaper online, if one knows at which websites to shop.

<http://www.herbalcom.com> ($6.25 to ship any size order)

<http://www.herbco.com> (free shipping for orders over $250)

<comment><USER48> Wow thanks man. I generally go to ethic stores for spices which is really cheap compared to conventional grocery stores. But not as cheap as that.

</comment></comment></comment></comment></comment><comment><USER49> Ive found excellent recipes here <http://www.marksdailyapple.com/category/recipes/> this guy is on the money, ive been loosing weigth just by following some of his advice.

</comment><comment><USER50> _"... So can you advise healthy meals that are still within the 2-guy-in-a- garage budget? ..."_

You supply the ingredients, OpenSourceFoods for recipes (with pictures) ~ <http://www.opensourcefood.com>

</comment><comment><USER51> A dish I like for breakfeast: \- grits (cooked) together with ham & eggs \- fresh tomatos as "salad"

Grits are awesome to start the day with because they are not lying heavy in your stomach but the energy lasts long.

</comment><comment><USER52> Canned Beans. Chick Peas are my favourite. Open the can and eat with a fork or spoon. Best to use the cans that can be opened by hand to avoid excessive preparation time.

</comment><comment><USER53> Fish. Find the chepeast possible fish and eat with rice.

</comment><comment><USER19> fruit - nature's fast food

as a bonus, the waste is bio-degradable

</comment><comment><USER54> Spinach - lots of spinach. Popeye had it right.

<comment><USER40> Spinach is great, but if you're on a tight budget, and therefore not getting a lot of trace minerals, the oxalic acid content can actually mess you up pretty badly. (Oxalic acid binds to calcium, iron, etc. to form an indigestible chelate.)

<comment><USER54> I didn't know this - thanks.

</comment></comment></comment><comment><USER55> Here is one: Lamb cotelets with couscous. It takes 5 minutes to cook and is quite delicious. It's in the Jamie Oliver book.

</comment><comment><USER56> indian fare from trader joe's is bomb, particularly if you're vegetarian and broke. it's $2 a packet and all you need to do is just squeeze it out and add starch (the nan they have in the bread section is also pretty solid).

also, living in sf, burritos are the cheapest and most filling (not to mention tasty) takeout you can get hands down.

</comment><comment><USER57> breakfast: granola that has flax oil + protein powder + multivitamin.

I am going to switch it up and try oatmeal + a flax/fish oil

</comment><comment><USER58> Corn beef hash.

<comment><USER59> That's usually larded with fat...?</comment></comment>


Formatting your web content to be a pleasure to read - <AUTHOR> http://www.informationarchitects.jp/en/100e2r/ <comment><USER2> They write with a certainty that doesn't seem warranted.

Your website will be read on screens that range from 3" diagonal to 30" diagonal and with a DPI that ranges from about 100 to 300.

Now, it would potentially be smart to use the default font size so that your site would be consistent with every other site out there, but that isn't the case. MOST sites use smaller text. Browsers aren't optimized for the default text size, they're optimized for what gets used. The default size is a compatibility relic.

That isn't to say that a larger font size is wrong, but that is one of many factors to consider when designing.

<comment><USER3> You're right.

The mobile web/iphone didn't really exist in 2006 when this was written.

<comment><USER4> This site would actually look pretty good on an iphone, because the lines are short. (They actually have a mobile version of the site.)

It sucks big time when a site uses small fonts, and the iphone cannot reflow it.

</comment></comment></comment><comment><USER5> Slightly OT, but my pet peeve is the growing number of sites that assume a minimum browser width that is wider than I like to keep my browser windows, as if everybody kept their browser window maximized at all times. I still read old bare-HTML sites often enough that I don't like to do that; I prefer to keep them about 800 pixels wide. Too many sites won't fit; some of them even manage to turn off the horizontal scrollbar, a neat trick.

I think the largest minimum width any page should assume is 640. I could live with 800, but 1024 is too wide.

<comment><USER6> I totally agree. I have two 1920x1200 screens, and I put two browser windows per screen, so I always max out at exactly 960.

<comment><USER7> That sounds like extremely productive HN'ing. ;)

</comment></comment></comment><comment><USER8> Robin Williams' (not that one ;) _The Non-Designer's Design Book_ is a great introduction to "design for the rest of us".

You can preview it online: <http://books.google.com/books?id=n1AuwXafMO8C>

<comment><USER9> I read that book when I was studying design. It is definitely a worth read. It reads very quickly, and truly "shows" key prinicples instead of just "telling" them.

</comment></comment><comment><USER10> I've been setting Firefox's minimum font size to 16 for the past couple of years, and my eyes are very grateful. The web is all about text, the sites whose layouts break when I set the fonts two points higher make me sick. There is no reason whatsoever why I should ever have to strain my eyes when using a computer.

<comment><USER11> Do you have your DPI set right for your monitor? Maybe the OS assumes a 100 DPI display, but if your monitor is actually 150 DPI, everything will be 2/3 the size it should be, e.g. 12-pt fonts will be 8-pt.

</comment></comment><comment><USER12> Not a bad article, but the layout of the article itself has some flaws (numbered lists are indented negatively, ...). I wouldn't normally complain about that, but I will in an article that tells us how to format text.

<comment><USER13> I am quite sure that is done deliberately. I can't find a good resource to point to, but this article by Mark Boulton describes why you would do that with bulleted lists. I would assume that the same applies to ordered lists:

[http://www.markboulton.co.uk/journal/comments/five-simple- st...](http://www.markboulton.co.uk/journal/comments/five-simple-steps-to- better-typography-part-2)

> With the advent of desktop publishing it became suddenly very easy and cost- > effective to produce bodies of text. The problem was these bodies of text > work within a box. Every character in this box had to be within the box, > Hanging Punctuation requires characters to be out of the box. This was a > problem for the software and as a result was ignored. An important aspect of > typesetting just swept under the carpet like that. It's a great shame.

And:

> A ranged left body of type is pretty much destroyed, aesthetically, when > punctuation isn't hung. The eye looks for straight lines everywhere, when > type is indented in this way, it destroys the flow of text.

<comment><USER14> What i don't understand is why there's incongruity between the numbered headers and the numbered lists. Surely if you're going to stick the list numbers in the margins, the header numbers should be in the margins as well?

<comment><USER15> I don't think so. The numbers in the header are more like an outline of items. The numbers in the list are not part of the outline. Hanging the numbers in the gutter is the typographically "proper" treatment there.

</comment></comment></comment></comment><comment><USER16> I agree completely that most web sites are poorly formatted with columns that are too wide to scan, the site cluttered with animated ads, and/or improper guttering that allows text to collide with the actual window frame. It is a known problem and one that the majority of sites obviously don't care about even though they should.

The referenced page though, as an example of proper design, is not a good solution. When resizing the window, column widths jump erratically so it is hard to keep your place; and at a comfortable column width, there is so little text it takes but a few seconds to read, and then one has to scroll. Having to scroll every couple of seconds sucks big time, even worse than dealing with small font. Furthermore, he has done something to sabotage the font resizing buttons so when I try to make the text less gargantuan, it retains the text size but inexplicably shrinks the column size. As ghastly and infuriating as sites that make me disable javascript before I can copy text. I am sure his gargantuan text looks nice on his iPhone or whatever high density display device he is using, but it is way too big on a normal screen.

Unfortunately, screens are now tied into film aspect ratios (as if this is what you spend most of your hours on), windows for non-film watching applications resize most easily to fill the screen to these film dimensions, toolbars are crammed on top and bottom of applications, using up even more vertical space, and HTML has no flowing multi-column support whatsoever, making good solutions impossible and small font the least worst among many terrible choices.

<comment><USER17> _he has done something to sabotage the font resizing buttons so when I try to make the text less gargantuan, it retains the text size but inexplicably shrinks the column size._

The width of the column is set in "ems" rather than pixels. This has the advantage of ensuring that the measure (column-width) remains the same number of characters wide. 66 characters is often regarded as the ideal measure.

[http://webtypography.net/Rhythm_and_Proportion/Horizontal_Mo...](http://webtypography.net/Rhythm_and_Proportion/Horizontal_Motion/2.1.2/)

</comment></comment><comment><USER18> thanks for the reminder about this. these help in not just making it a pleasure to read, but also in improving comprehension of what you are reading.

There is a principle called "Chunking", the term to describe breaking into digestible units of information, that relates to this.

<http://www.chambers.com.au/glossary/chunk.htm>

</comment><comment><USER19> > We don't want to change our browser settings every time we visit a website!

We don't have to. Using Firefox or Chrome, I simply press Ctrl+ or Ctrl- to make the text bigger or smaller, and the browser remembers my settings for that site.

<comment><USER20> Does anyone else find it highly annoying that browsers started to size the whole page instead of just text with this? I liked using it to change the size of the characters, but without upscaling images and such.

<comment><USER21> Firefox has a setting to switch back to the old behaviour, but yes, I dislike the new default.

</comment></comment></comment><comment><USER22> It's interesting to argue that you should 16px fonts because that's the browser default size and browser vendors must have had a good reason, then in the next section argue that the default line-height is too small and needs to be increased. Are the browser defaults only logically chosen when they agree with your particular thesis?

The browser defaults are set the way they are to maximize compatibility with previous versions of browsers. The 16px font size is probably a relic from Mosaic or Netscape 1.0.

</comment><comment><USER23> There are variations in responses people have to text, but for the most part, there's a general range of what's prefered by the masses. Since web pages are solely created to communicate to people, it makes sense that time spent understanding readers' responses to text would be crucial in web design. I understood that from your article.

I teach reading and have read a lot on how the eye moves across the page, how information is brought in through text, font type and size, color and so on. Overall you have a good general point, people don't want to work to read. Key points I like are...

1\. don't use small text, 2\. use contrasting colors that aren't too stark, 3\. create line spacing that doesn't over-crowd (1,5) and, 4\. use white space.

I love sites where there's just enough text on a screen to allow me to fully engage in it before scrolling. Everyone wants a pleasurable web experience, especially those wanting traffic!

<comment><AUTHOR> ...and 5. don't make lines of text too long. Traditional spacing of about 66 characters per line works pretty well

</comment></comment><comment><USER24> Select a font that looks good on your targeted medium (e.g. a relatively low resolution screen).

People piss all over MS (and I've been in line, at times), but they did some good things with regard to screen fonts. And lo, someone conveniently "forgot" to close the barn door (until they'd escaped ;-).

<http://www.will-harris.com/verdana-georgia.htm>

<http://en.wikipedia.org/wiki/Verdana>

(There may be a better article, but it's been years since I would have last seen it.)

</comment><comment><USER25> Good advice for a blog or news site, but figuring out a good design becomes exponentially harder for web apps.

Yes, they include plenty of text, but you also have a lot of "actions" (links, buttons, tabs, whatever). Web apps also have to balance readability with making common tasks easy. In particular, making common tasks easy may mean putting more buttons and form elements on a single screen to reduce the number of pages/clicks for a task.

</comment><comment><USER26> I change the font size in my browser all the time. A smaller font usually makes the organization of the text more apparent and requires less scrolling, especially if you need to refer to different sections of the document at the same time, while a larger font can be read more passively and from a greater distance.

Neither default is suitable for all situations, there's no right answer.

<comment><AUTHOR> Certainly, but the design of a web page should allow for those font-size changes. Generally when I read on a tablet it is a lot closer to my eyes than my laptop.

<comment><USER27> There's also the need to provide a good default, particularly for those readers who don't know they can resize text themselves.

</comment></comment></comment><comment><USER28> Great Article. I have been experimenting with reading content on the web with <http://www.readability.com>. It's a browser plugin that grabs web content and formats it in a easy to read layout.

</comment><comment><USER29> Isn't so much of this a matter of taste that would vary depending upon the audience and the subject matter?

Aesthetics are not absolutes, and they evolve.

EDIT: Why would this be downvoted? It's an honest question.

<comment><USER30> I didn't vote you down, but people are probably considering the difference between design and aesthetics/taste. Design should be a solution to a problem.

In this case, the problem as defined is readability. Having lines of text one after the other with no leading (line-spacing) can be difficult to read.

Having text that's too wide requires you to turn your head which can be uncomfortable.

Text that's too small can be... too small. The article was arguing for an optimal font size which may or may not be correct, but the argument was that 16pt/72dpi font is effectively the same size as most printed books, which are optimized for reading.

Text with poor contrast — light gray on gray is going to be difficult to read no matter the subject matter.

His individual arguments may be wrong (although I don't think they are), but the scope of design, for a given problem can be more absolute than just taste or aesthetics.

Taste is more about liking 10pt fonts even if you're designing for something to be readable.

<comment><USER29> Thanks. I agree for the most part. But, I think the font choice/spacing here at HN for instance, works for a tech forum, whereas it might not be as optimal for articles or poetry.

I guess I am saying that content and audience can define the problem you you are trying to solve. It could vary for that reason.

</comment></comment></comment><comment><USER31> And yet another designer noticing the trend in increasing size of desktop monitors but missing simultaneous trend towards smaller devices, like netbooks and tablets.

</comment><comment><USER32> Related (from 2008):

[http://www.wilsonminer.com/posts/2008/oct/20/relative- readab...](http://www.wilsonminer.com/posts/2008/oct/20/relative-readability/)

</comment><comment><USER33> I didn't like that page. Thought the text was too big.

</comment><comment><USER34> Not that pleasurable to read on a netbook.

<comment><USER32> That's odd since the iA site has media queries to account for other resolutions and devices. Is it because the fonts are too big to you? Just curious.

<comment><USER35> Internet Explorer <9, Firefox <3.5, and Safari <3.1 don't support CSS3 media queries. Perhaps GP uses an outdated browser.

</comment></comment></comment><comment><USER36> That was a pleasure to read. Very refreshing.

</comment><comment><USER37> " _Having air around the text reduces the stress level, as it makes it much easier to focus on the essence._ "

But his extreme left margin creates unnecessary tension and looks unbalanced on the page.

On the other hand, I applied his 140% line-height advice to my site, and it reads much better.

</comment><comment><USER38> I followed your advice re size, but the default sizes are just too big, so big it's ugly. I ended up making everything bigger than it was, but not default- size-big. Maybe your advice is best for blogs.

<comment><USER15> His advice is definitely for small or medium form writing. Places where you have substantial blocks of text. If you are trying to style headings or a web application then some of the ideas will apply but you should seek advice specific to that. For instance, the "give your text breathing room" is always going to be correct, but how much room you need is different for a small chunk of text in a button vs a large block of text. The context that it is placed in also matters.</comment></comment>


Decompiling C# (async/await) - <AUTHOR> http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/04/16/decompiling-async-await.aspx A look under the hood of a C# decompiler. <comment><USER2> About the only time that you have to be really careful with stuff like this is if you're writing something that's super sensitive to GC pauses, such as an XNA game. In those cases, yield return, linq, lambdas, some foreach loops will all generate short lived objects that will cause the GC to kick in more often. So if you're doing that in every update loop you could end up with performance issues. And even that is only on some platforms, as the desktop GC does a great job of dealing with short term garbage.

But in most cases such as ASP.NET MVC actions, or doing an API call in a desktop app, the maintenance and high level code simplification you can get by using these techniques __far __outweighs the low level "cost" of the code generated by the compilers.

It's good to know what's going on under the covers though.

<comment><USER3> Reminds me of an experience I had. I kind of naively wrote something as a method that would "yield return" bytes. After all, everyone is familiar with that attitude so many people have, that you write what looks nicest and worry about bottlenecks later. I'm personally not usually too big on that attitude (I think it's often an overused excuse for obviously bad code) but "yield return" does let you write some very natural-looking stuff.

So later I did compare it to a very simple for loop operating against a byte[], and had both versions work against a 10MB buffer (not unrealistic input in my use case). The throughput of the "yield return" code was something like 5 times less. I didn't try too hard to track down the precise cause of that at the time (maybe it was GC from lots of temporaries as you say? I was pretty CPU bound, and thinking it could have had more to do with a more straightforward loop generating code with fewer jumps after JIT), I just took the faster version.

<comment><USER4> A "yield return enumerable" is "delay executed" so evaluating it multiple times causes the yield-return execution to occur at every evaluation (if you haven't taken care to ToArray() or ToList() it). Do something like:

      var myBytes = GetMyBytesItr();
      for (var i = 0; i < myBytes.Count(); ++i)
      {
        ProcessByte(myBytes.ElementAt(i));
      }

and you'll be in a world of hurt especially if GetMyBytesItr() allocates a memory buffer. Count() causes the "get the bytes data" action to occur, as does every iteration of ElementAt(). Now I'm not saying this is definitely what you were experiencing, but it's a common pitfall. Also, using ElementAt() for each iteration is, of course, completely contrived for this example (you'd want to foreach instead which would cause only one execution of the "get the bytes data" action).

<comment><USER3> That wasn't the issue in my case. It was foreach (var b in f()). f did not do any allocations, just a loop with a bunch of yield return statements.

This is why I suspected that it was simply worse machine code after JIT. But I wasn't sure of all the details of the code that was inserted on my behalf.

<comment><USER5> One of the biggest differences is that if you do:

      foreach (var byte in byteArray)

The compiler transforms that into a normal for-loop that accesses the array directly. So that's already an advantage for the array over your enumerator.

The other difference that will have a major performance impact is the way the IEnumerator pattern works, even with generics. For:

      foreach (var b in f())

The generated code looks roughly like this:

      using (var enumerator = f())
      while (enumerator.MoveNext()) {
        var byte = enumerator.get_Current();
      }

As a result, you've gone from 0 method calls per iteration (direct array access) to 2 virtual method calls per iteration (MoveNext and get_Current). An incredibly smart JIT might be able to figure out that the virtual methods are always the same and turn them into static invocations, or even inline them, but I don't think the CLR can do this for you reliably.

</comment></comment></comment></comment></comment><comment><USER5> The ILSpy team's hard work is part of what made it possible for me to write my .NET -> JS compiler (<http://jsil.org/>). My ~120k LoC wouldn't work without their ~450k LoC (well, I don't consume all 450k...)

ILSpy is a pretty interesting application/library to look at under the hood. The decompilation logic that transforms .NET bytecode (MSIL) into higher-level data structures is split into a bunch of well-defined transform phases that run in a pipeline, which means you can actually step through the pipeline and watch it improve the readability and semantic clarity of the IL one step at a time. It's an incredibly valuable debugging tool and really useful for understanding how this kind of decompiler works, and it was a big influence on how I ended up designing the similar parts of my compiler.

As a whole, I think ILSpy demonstrates just how valuable it is to have a really well specified instruction set sitting beneath your compiler and runtime. MSDN's documentation for the instruction set is clear and understandable and libraries like Cecil and ILSpy make it easy to load, manipulate, and save for whatever your purposes might be - runtime code generation, machine transforms of compiled code, obfuscation, deobfuscation, or outright cross-compilation.

<comment><USER6> Interesting, so the benefit there is generating higher-level JavaScript instead of interpreting IL at a lower level?

<comment><USER5> Yeah. I consume the munged IL that comes out of their transform pipeline (though for complex reasons, I don't use all of it - some of their transforms are destructive in ways that aren't helpful, or I'd have to undo them) which saves me the trouble of reimplementing things they already figured out, like how to transform most branch/jump patterns into if statements and while loops.

I could generate JS from raw IL (and other projects like Volta did just that) but ILSpy gives me a huge head start in terms of producing JS that actually looks like what you'd write by hand. For loops instead of while loops, switch statements instead of cascading ifs, etc.

<comment><USER6> Volta, from the demo I used a long time ago, seemed horrendously slow, too. JSIL feels far faster. I guess you gain a bit of performance by making the code higher level so the JS engines can tell if an optimization is safe.

Is JSIL limited to a subset of IL? Can you target C++ (in pure mode) to it? Opcodes like cpblk, and others?

<comment><USER5> Volta's approach seems to be essentially implementing a low level .NET runtime and representing the bytecode as JS. It gives you some cool stuff for free (for example, that low level approach means their type system works almost exactly like .NET's universally) but it does indeed mean that you have to work harder to give JS engines an opportunity to optimize your code. It makes integration tougher, too. In comparison, the best way to describe JSIL's approach is trying to express .NET concepts on top of JS, so it uses JS standard libraries and types wherever possible.

JSIL is theoretically limited in that there are things expressible in IL that you simply can't do in a browser. However, out of all the executables I've run the compiler on so far, very little of the IL they contain is actually impossible to translate - the tricky patterns and opcodes seem to get used only occasionally in one or two methods.

Some parts are definitely harder than others; I've only recently gotten support for pointers and the 'unsafe' class of C# features working: <http://jsil.org/try/#5055026> and that's only covering a subset of all the different opcodes defined for doing interesting things with pointers and references. For example, function pointers will probably never work, and IIRC there are a few opcodes dedicated to interacting with those.

</comment></comment></comment></comment></comment><comment><USER7> Its great to see a post on c# around here these days.

</comment><comment><USER8> Inside every language there is a minimal language with all the syntactic sugar translated into a subset of the language.

e.g. the C# compiler turns "var a = 3;" into "int a = 3;" It turns anonymous lambdas into methods with generated names (i.e turns one line of code into 3-4 lines), and makes classes with constructors that do the environment capture if needed. It turns "yield return" generator methods into objects that have state.

While async/await is a cool feature and is worth using, it is worth noting the up trend in complexity of generated code – and ansyc/await generates significantly more code in the simpler language without this feature than previous new features did.

How much code does an await statement give rise to? it looks like about 40-50 lines to me.

<comment><USER9> You need to compare it to the alternatives. For instance how much IL will be procuded from creating Tasks with Continuations?

Async/Await makes it easier to write asynchronous code in a traditional linear manner, it's easy to shoot yourself in the foot but it's just as easy with the alternatives.

Here's an article that I wrote a while back on what Async & Await generates: [http://blog.filipekberg.se/2013/01/16/what-does-async- await-...](http://blog.filipekberg.se/2013/01/16/what-does-async-await- generate/)

<comment><USER10> Personally I think the Async/Await model is too limiting. E.g. lets talk about this:

        var result = await client.GetStringAsync("http://msdn.microsoft.com");

From the perspective of the caller, that code is still blocking. It solves the problem of threads being blocked, but that's only one of the problems you have.

The real and more complete alternative would be to work with a well designed Future/Promise framework, like the one in Scala [1] which is also usable from Java [2]. Doing concurrent computations by means of Futures/Promises is like working with Lego blocks.

Let me exemplify with a piece of code that's similar to what I'm using in production. Lets say that you want to make 2 requests to 2 different endpoints that serve similar results. You want the first one that completes to win (like an auction), but in case of a returned error, you want to fallback on the other one (type annotations and extra verbosity added for clarity):

        val url1 = "http://some.url.com"
        val url2 = "http://other.url.com"

        // initiating first concurrent request
        val fr1: Future[Response] = client.get(url1)

        // initiating second concurrent request
        val fr2: Future[Response] = client.get(url2)

        // the first fallbacks on the second in case of error
        val firstWithFallback: Future[Response] =
          fr1.fallbackTo(fr2)

        // the second fallbacks on the first in case of error
        val secondWithFallback: Future[Response] =
          fr2.fallbackTo(fr1)

        // pick a winner
        val finalResponse: Future[Response] =
          Future.firstCompletedOf(firstWithFallback :: secondWithFallback :: Nil)

        // process the result
        val string: Future[String] = finalResponse.map(r => r.body)

        // in case both endpoints failed, log the error and
        // fallback on a local copy
        val stringWithFallback: Future[String] = string.recover {
          case ex: Exception =>
            logger.error(ex)
            File.read("/something.txt")
        }

Given an HTTP client that's based on NIO, the above code is totally non- blocking. You can do many other crazy things. Like you can wait for several requests to complete and get a list of results in return. Or you can try the first url and if it fails, try the second and so on, until one of them succeeds.

In the context of web apps, you can prepare Future responses this way and return them when they are ready. Works great with the async responses support from Java Servlets 3.0. Or with a framework such as Play Framework 2.x you can simply return Future[Response] straight from your controllers [3]

[1] [http://docs.scala-lang.org/sips/pending/futures- promises.htm...](http://docs.scala-lang.org/sips/pending/futures- promises.html)

[2] <http://doc.akka.io/docs/akka/snapshot/java/futures.html>

[3] <http://www.playframework.com/documentation/2.1.0/ScalaAsync>

<comment><USER11> .NET has futures and continuations, see Task[1].

I haven't used tasks heavily yet so I'm not sure how to implement everything in your example. But I believe it's all possible.

Async/await is "just" syntactic sugar for tasks. So I'm not sure what you mean by "still blocking from the perspective of the caller". When you call an async method, you get back a Task. When you use await on a task, the compiler rewrites your code to introduce continuations. If you need some more powerful Task features hidden by the syntactic sugar, you always still have the option of using tasks explicitly.

[1] <http://msdn.microsoft.com/en-us/library/dd321424.aspx>

<comment><USER8> The interesting thing about async / await is that for the coder, the code looks linear, but it doesn't execute that way. So a gap is opened up between "the perspective of the coder" and the perspective of the machine.

I think that bad_user means that if you await one client.GetStringAsync then await a second client.GetStringAsync, the second GetStringAsync only starts after the first one completes, so the first get "blocks" the second, "from the perspective of the caller". I.e no parallelism.

Of course, you don't have to do that. Code elsewhere in this thread.

</comment></comment></comment></comment></comment><comment><USER12> ILSpy is probably one of the best utility programs I have ever used... It has saved me countless times from poorly documented API's and helps me work around countless bugs in third party libraries.</comment>


Startup Parents: You Are Not Alone - <AUTHOR> http://jeffkward.com/startup-parents

<comment><USER2> This post switches subjects between the first and second sentences. Startup founders are a proper subset of entrepreneurs.

<comment><AUTHOR> Thanks pg, I edited to make it more clear.</comment></comment>


In the Netherlands, Empty Prisons Become Homes for Refugees - <AUTHOR> http://news.nationalgeographic.com/2016/05/160517-refugees-netherlands-prisons/ <comment><USER2> What has this to do with hackernews?

<comment><USER3> From the guidelines:

 _On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one 's intellectual curiosity._

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)</comment></comment>


Purescript-native can now target Golang - <AUTHOR> https://discourse.purescript.org/t/purescript-native-can-now-target-golang/878 <comment><USER2> Tangential, but some very cool things are happening in Purescript-land, especially when it comes to row types or UI research:

* [https://github.com/natefaubion/purescript-variant](https://github.com/natefaubion/purescript-variant) (open variant types)

* [https://github.com/natefaubion/purescript-run](https://github.com/natefaubion/purescript-run) (extensible effects implementation based on purescript-variant)

* [https://github.com/ajnsit/purescript-concur](https://github.com/ajnsit/purescript-concur) (time-reifying UI framework, there's also a Haskell and a JS implementation of Concur)

* [https://github.com/arthurxavierx/purescript-comonad-ui-todos](https://github.com/arthurxavierx/purescript-comonad-ui-todos) (comonadic UIs)

* [https://github.com/paf31/purescript-purview](https://github.com/paf31/purescript-purview) (incremental lambda calculus UI library, this is mind blowing!)

* [https://github.com/paf31/purescript-sdom](https://github.com/paf31/purescript-sdom) (declarative diff-less UI library)

There's also [0], a mature UI framework used in production at Slamdata. Lumi [1] are writing their frontend in Purescript.

What I especially like about Purescript is that the community is open to experimentation, while at the same time not being afraid to backtrack when things turn out to be a bad idea, like the row tagged Eff monad. The recent addition of QualifiedDo is a good example of this, which allows you to rebind >>= in the following manner:

      test :: forall m a. I.IxMonad m => m a a String
      test = I.do
        a <- I.pure "test"
        b <- I.pure "test"
        I.pure (a <> b)

Imo, there simply is no better way for a Haskeller to target JS at the moment.

[0] [https://github.com/slamdata/purescript- halogen](https://github.com/slamdata/purescript-halogen)

[1] [https://www.lumi.com](https://www.lumi.com)

<comment><USER3> I've tried several times to use Purescript to target web browsers. I got frustrated by Bower - it's especially hard to start a new project using tools that say "don't use me, I'm deprecated". There was a huge amount of fairly sloppy javascript boundary code. And - it turns out - I like laziness.I dunno, I wish I could run ghc code efficiently in a web browser. But even though I can't, I much prefer to run ghc code inefficiently in a web browser than run a language intended to facilitate binding to javascript's sloppy semantics.

When I tried using ps-concur or some other ps gui libraries, I didn't feel inclined to keep progressing. When I learnt reflex with ghcjs, I built stuff, and I kept finding new things I wanted to build.

The best way for a Haskell to target browsers at the moment is via ghcjs. Hopefully one day it'll be with a ghc-to-wasm compiler.

<comment><USER2> I think Bower was just a "good enough" solution when Purescript was initially implemented. Afaik, people are moving away from it in favor of spago [0] or psc-package [1].

JS' semantics are pretty much opaque when staying in Purescript. Of course all bets are off when using the FFI, but then again the same goes for GHCJS.

One major thing in favor of GHCJS is the ability to share code between backend and frontend, but that's not a concern when e.g. the backend is written in another language anyway.

EDIT: Also, Purescript on the backend (targeting node or native code) is slowly becoming a thing as well, as this is what this submission is about :)

[0] [https://github.com/spacchetti/spago](https://github.com/spacchetti/spago)

[1] [https://github.com/purescript/psc- package](https://github.com/purescript/psc-package)

<comment><USER4> > but that's not a concern when e.g. the backend is written in another > language anyway.

well, for anyone who's been in this situation, it should be a concern, since it's incredibly easy to get out of sync between backend and frontend (e.g. model, validation, etc.).

Ideally we could all code in preferred-language; target all major platforms using a single/universal UI framework, and call it a day...but reality is messier than that, we're often forced to code apps in multiple languages, multiple UI frameworks (if targeting native iOS + Android, and browser/PWA), and hope it all comes together such that the house of cards stays standing through language/framework/platform upgrades.

<comment><USER2> I agree, but what I meant is that if you're forced to use a language other than Haskell on the backend, than there's no advantage in choosing GHCJS over Purescript in terms of code sharing.

</comment></comment></comment></comment></comment><comment><USER5> Wow, hadn't kept up with purescript at all. It can now compile to JS, Go and C++11 and supports full interop in all 3 cases! That's pretty damn cool.

How's the language itself? I had heard it was a Haskell clone, is that still mostly true? If not, where does it differ and differentiate itself?

<comment><USER6> It compiles to Erlang too. The language itself is extremely similar to Haskell but with some refinements around some of the legacy baggage Haskell suffers from (string handling for example). Some differentiators include: strict evaluation by default, handling of record types, an extremely modular package policy (nothing is imported by default), and a lack of some things that can potentially make Haskell esoteric at times (template Haskell for example). The community is small but dedicated. Documentation can be very minimal in a lot of cases, so it's not a beginner friendly language, but once you are up and running, it's a pretty awesome experience overall.

<comment><USER7> In my experience attempting to learn it you have to be pretty familiar with Haskell since as you mention a lot of stuff isn't well documented outside of types and small blurbs.

It's been a year since I tried and I'm sure a ton has changed since then but I don't expect this to be different for a while. Which isn't necessarily a bad thing, as all new languages have this problem and learning Haskell is very valuable experience for any programmer - just not an easy one.

Basically PureScript isn't something you can jump into like Elm or Typescript or w/e, while being an experienced programmer who knows JS or non-Haskell-y languages, but it's future is very bright if it gets mainstream adoption IMO and I'm following it closely.

</comment></comment></comment><comment><AUTHOR> Found some instructions for how to use the Golang backend: [https://github.com/andyarvanitis/purescript- native/blob/gola...](https://github.com/andyarvanitis/purescript- native/blob/golang/README-go.md)

</comment><comment><USER8> PureScript always seemed like a saner, more practical Haskell to me. Is that the case? How useful is it in real world applications these days? I've never really played around with it.

<comment><USER9> > PureScript always seemed like a saner, more practical Haskell to me.

What gave you this impression?

<comment><USER8> Saner: no language extensions and a bit more explicitness with imports, plus claims of other cleanups.

More practical: claiming smooth interoperability with JS, whose package ecosystem sees more development and whose runtime is widely available.

</comment></comment></comment><comment><USER10> Are there any websites indexing "underground" languages to indicate their current adoption status ?

From "only the language developers and their friends are working with it, for experimental projects",

to "some fancy startups are using it with good results thanks to its cool new features" ?

I don't mean it as a way to depreciate the work people put onto those projects, but it would certainly help with understanding what one's expectations should be.

If i take OP example : adding a new target to a language that's already heavily used in some startups in production doesn't mean the same thing than if the language is just used for toy projects and experiment. We all know how hard it is to reach production-grade quality (for pretty much anything), and how many good ideas simply collapse on the face of overlooked details from the real world.

</comment><comment><USER11> When the author mentions that Go's build system is useful in this scenario, what does he mean? Can Purescript compile to Go with "go build"? Doesn't make sense to me. I'll be sure to give this a try!

<comment><USER12> Presumably it means that Purescript compiles to Go which can then be built with "go build" instead of compiling to C++ and leaving it to the user to figure out how to compile it with their other C++ sources.

</comment></comment><comment><USER13> Good but I wouldn't give it a try unless I see working code repo which has working REST server along with basic SQL database driver integration.

Test suite integration and project build tips would be nice.

</comment><comment><USER9> Can someone explain the advantage of using Go as an intermediate language?

Since there's no way to translate Go back to PureScript, I assume the intention isn't to write an application in PureScript, compile it to Go, and edit the resulting Go code.

So is this just a way to utilize the Go compiler to produce binaries from PureScript, or am I missing other use cases?

<comment><AUTHOR> My target use case would be to write the domain logic parts of a business system in PureScript together with a lot of other services where Go makes more sense.

</comment></comment><comment><USER14> Surprised that Purescript is still a thing, it appears to have died out from all conferences that focus on new tech like StrangeLoop and similar.</comment>


What would happen if we randomly gave $1,000 to poor families? Now we know - <AUTHOR> https://www.washingtonpost.com/opinions/2019/12/03/what-would-happen-if-we-randomly-gave-poor-families-now-we-know/ <comment><USER2> Link to actual study: [http://emiguel.econ.berkeley.edu/assets/miguel_research/88/G...](http://emiguel.econ.berkeley.edu/assets/miguel_research/88/GE- Paper_2019-11-20.pdf)

<comment><USER3> Thanks for the study, getting pay walled. Will have to read this later.

Side note: on mobile, the papers in line citations are anchored to the individual reference (tapping the citation redirects user to reference). This is a pretty neat feature. Hope more people start to use it.

<comment><USER4> That's a PDF which has been compiled by LaTeX.

</comment></comment></comment><comment><USER5> Famed anthropologist James Ferguson wrote a pretty thorough read that breaks down the arguments on both sides that was also reviewed by the Washington Post: [https://www.washingtonpost.com/news/monkey- cage/wp/2015/07/2...](https://www.washingtonpost.com/news/monkey- cage/wp/2015/07/24/this-book-will-change-the-way-you-think-about-cash- transfers-for-the-poor/)

</comment><comment><USER6> Tax cuts are the best way to put $$ in the hands of the poor.

Raising taxes on the poor, to "give them" more money as proposed by UBI is a terrible policy no matter what this or any other study says.

<comment><USER7> Why?

<comment><USER6> Governments are the largest, most inefficient and wasteful monopolies in the world. There's zero incentive for them to provide cost effective or reliable solutions to problems. Private sector alternatives are better the large majority of the time.

<comment><USER8> UBI does precisely that. Instead of the government offering a service, they redistribute that money so the poor can get that service on the open market.

<comment><USER6> Social Security pays out negative returns. Meaning you're guaranteed to receive lower returns from it in contrast to whatever capital you invest. A person could do better putting their money in a bank account that pays out 0.000001% APY.

UBI is the same as social security. You're guaranteed to receive less money than whatever you invest in it. The state will likely funnel a major portion of collected tax revenues into dubious projects like giving free healthcare to illegal immigrants and funding transexual beauty pageants.

Then when the program fails as it inevitably will, they'll say the problem is taxes are too low. They'll propose tax hikes and people unfortunately being uneducated will far for it and think its a good idea, the same way many are falling for it right now.</comment></comment></comment></comment></comment>


New study discovers your brain actually works in up to 11 dimensions - <AUTHOR> http://www.sciencealert.com/new-study-discovers-your-brain-actually-works-in-up-to-11-dimensions <comment><USER2> Paper here [http://journal.frontiersin.org/article/10.3389/fncom.2017.00...](http://journal.frontiersin.org/article/10.3389/fncom.2017.00048/full)

alternate title: brain topology requires 11 dimensions to be mapped properly</comment>


Military Smartphone: Galaxy S20 Tactical Edition - <AUTHOR> https://www.samsung.com/us/business/solutions/industries/government/tactical-edition/ <comment><USER2> Ars had a pretty good take on it: [https://arstechnica.com/gadgets/2020/05/the- galaxy-s20-tacti...](https://arstechnica.com/gadgets/2020/05/the- galaxy-s20-tactical-edition-is-a-shock-and-awe-campaign-against-reality/)

</comment><comment><USER3> This case looks awesome, but great work on the marketing team selling what is basically all software upgrades. Would be a cool statement piece even without the military uses though.

</comment><comment><USER4> After 11 years of daily use without any hardware issues I accidentally dropped my Nokia N900 into the big river this week. It was a few seconds completely under rushing water. I fished it out, removed the battery, dried it over the night and stated it again the next day. It worked flawlessly! Well that is what I call military quality.

</comment><comment><USER5> The only people who will buy this will be the Liberate Michigan types, and then they'll wear it in a belt clip.

</comment><comment><USER6> I thought this was satire for a minute.

</comment><comment><USER7> [https://gizmodo.com/the-four-eyed-night-vision-goggles- that-...](https://gizmodo.com/the-four-eyed-night-vision-goggles-that-helped- take-dow-1654543721) in case anyone else is wondering about the four-lensed goggles.

</comment><comment><USER8> Pretty impressive marketing for what's essentially a case with a remapable Bixby button.

</comment><comment><USER9> Not going to lie, I wish hands-free chest mounted cell phone systems was more popular in the civilian world.

</comment><comment><USER10> There's no way I'd trust an android with anything critical.

<comment><USER11> If you look at current pictures of operators in the field many are already using Android phones (usually Samsung). They primarily mount on the upper chest in the admin area of a plate carrier which helps keep the phone out of the way and makes the device immediately accessible. This Tactical Edition uses a Juggernaut case which is already the defacto standard case and mounting solution. ATAK is an interesting platform even in the limited version civilians have access to.

<comment><USER10> There are no buttons, so there's a pretty big limit to the accessibility (although I've seen the catastrophic UIs on the previous generation of military gear that was mostly resistive touch so maybe this is considered an improvement.)

Plus that still doesn't answer the complete lack of stability in android; stuff crashing all the time is just how the OS is designed to function.

</comment></comment></comment><comment><USER12> Stealth Mode. That's a great way of referring to airplane mode!</comment>


To Be Continuous - <AUTHOR> http://www.pipelinedb.com/blog/to-be-continuous <comment><USER2> I'm surprised no one has mentioned Esper yet: [http://www.espertech.com/esper/](http://www.espertech.com/esper/)

Esper does exactly this - you run streams of events over it and it continuously executes SQL to see if it matches. If so you can:

\- run code

\- make new streams

\- store the results

Esper's been doing this kind of thing for 9 years now.

<comment><USER3> Esper is really curious. I looked at it while getting a feel for the general landscape of streaming data tools in late 2013 - to be clear, it was a very cursory look, on the timescale of a few hours at most. I quote what my final take-away was at the time:

> Seems good but... such a weird project. Codehaus, svn, not high activity, > but consistent, stable releases for five years. Maybe just not the kind of > thing webdevs get into? Not sure if that's a strike against or not.

With the demise of Codehaus it looks like they've moved to github:

[https://github.com/espertechinc/esper](https://github.com/espertechinc/esper)

But oddly they don't seem to have migrated their svn history, and the README implies they don't plan to... I certainly hope they didn't lose it when Codehaus shut down. There was, as noted, already 9 years worth of code changes in that repo. That would be unfortunate.

</comment></comment><comment><USER4> I downloaded the OSX .pkg installer and didn't see anything in /Applications or /opt after running it and telling it to install to my root drive. Just glancing at some docs on your site I see pipeline-init, so doing a find on / to find out where it placed the binaries see it installed to:

/usr/lib/pipelinedb/usr/lib/pipelinedb/bin/pipeline-init

Is this intentional?

EDIT:

After playing around with the .pkg file it looks like the packed Payload contains '/usr/bin/pipelinedb/usr/lib/pipelinedb' which is probably the problem. I see broken symlinks for pipeline-init etc in /usr/bin pointing to /usr/lib/pipelinedb, so I'm guessing this repetition of the path above is a mistake.

Also I see a postinstall script creating a symlink from pipeline to psql. This seems like a bad idea as psql is pretty universal already as the name for the PostgreSQL CLI binary, maybe 'pipesql' might be better?

<comment><USER5> Sorry about that, OSX packaging is a bit finicky right now. We'll publish a package with more sensible defaults very shortly.

<comment><USER4> Great thanks! Looking forward to checking it out.

<comment><USER5> We just updated [http://www.pipelinedb.com/download/0.7.7/osx](http://www.pipelinedb.com/download/0.7.7/osx).

Please shoot me an email (I'm Derek) if you have any issues installing this package. Thanks for your patience!

<comment><USER6> There was an error with init and created an issue in github

[https://github.com/pipelinedb/pipelinedb/issues/1025](https://github.com/pipelinedb/pipelinedb/issues/1025)

</comment></comment></comment></comment></comment><comment><USER7> How does the PipelineDB differ or build on the ideas from Aurora/Borealis/StreamBase? At least at a high level, something like LiveView[1] seems to provide similar functionality to PipelineDB's concept of a Continuous View.

I was under the impression that the academic projects had proposed StreamSQL as a general language, though since StreamBase's acquisition it now seems to have been branded as TIBCO StreamSQL[2]. Have you guys been part of any efforts to make sure that there is an open language standard?

[1] [http://streambase.typepad.com/streambase_stream_process/2013...](http://streambase.typepad.com/streambase_stream_process/2013/05/liveview-14-new- continuous-queries.html)

[2] [http://www.streambase.com/developers/docs/latest/streamsql/](http://www.streambase.com/developers/docs/latest/streamsql/)

<comment><USER8> There is also TelegraphCQ, a competing project at Berkeley around the same time; TelegraphCQ was also built on top of PostgreSQL and its support for Continuous Queries seems essentially identical to Continuous Views here ("materialized views", "triggers", and "continuous queries" are all quite similar to each other in terms of the underlying technology needed). TelegraphCQ was commercialized as Truviso, bought out by CISCO a few years ago.

[http://telegraph.cs.berkeley.edu/telegraphcq/v0.2/](http://telegraph.cs.berkeley.edu/telegraphcq/v0.2/)

<comment><USER7> Thanks for the link, I hadn't seen TelegraphCQ previously. Following the trail, I also came across a couple other similar research projects relating to Stream-oriented DBs. Specifically, STREAM from Stanford and Cougar from Cornell, though it appears that all of these academic projects are dormant at this point.

<comment><USER9> All of the academic stream systems from the early 2000s are long over. The students have all graduated.

Truviso got bought by Cisco and disappeared into their internal projects.

StreamBase got bought by TIBCO and is still available today.

<comment><USER10> And Coral8 got bought by Sybase and became Sybase CEP, also still available. (Sybase is now owned by SAP.)

</comment></comment></comment></comment></comment><comment><USER11> This looks very cool. Although, I'm not sure I totally understand how it can be used to replace batch ETL processes. So, PipelineDB eliminates ETL batch processing by incrementally inserting data into continuous views, but the documentation says that it's not meant for ad-hoc data warehouses as the raw data is discarded. So, does that leave me still using batch processes to load my data warehouse? Is PipelineDB going to be my data warehouse as long as I only want the resulting streamed data? Just trying to figure out what this would look like and where its place is in a data warehouse environment.

<comment><USER5> Hey Chad, PipelineDB co-founder here. PipelineDB certainly isn't intended to be the only tool in your data infrastructure. But whenever the same queries are being repeatedly run on granular data, those are the types of situations in which it often makes a lot sense to just compute the condensed result incrementally with a continuous view, because that's the only lens it's ever viewed through anyways (dashboards are a great example of this). Continuous views can be further aggregated and queried like regular tables too.

In terms of not requiring that raw data be stored, a typical setup is to keep raw data somewhere cheap (like S3) so that it's there when you need it. But granular data is often overwhelmingly cold and never looked at again so it may not always be necessary to store it all in an interactively queryable datastore.

As I mentioned, PipelineDB certainly doesn't aim to be a monolithic replacement for all adjacent data processing technologies, but there are areas where it can definitely introduce significant efficiency.

<comment><USER12> So what's the best practice for when you want a real time dashboard but also want the ability to compare data overtime. E.g., ave. bounce rate this month vs last? Is Pipeline still ideal in this case?

<comment><AUTHOR> Jeff (PipelineDB Co-Founder, here) - Yes, PipelineDB is great for this use case. One powerful aspect of PipelineDB is that it is a fully functional relational database (a superset of PostgreSQL 9.4) in addition to a streaming- SQL engine we have integrated the notion of 'state' into stream processing, for use cases exactly like this.

You can do anything with PipelineDB that you can do with PostgreSQL 9.4, but with the addition of continuous SQL queries, sliding windows, probabilistic data structures, uniques counting, and stream-table JOINs (what you're looking for here, I believe.)

</comment></comment></comment></comment><comment><USER13> As someone who's made a lot of use of `tail` and similar, this is appealing.

But I don't have a lot of use cases in personal projects, and am unlikely to find a good use-case at work in the near future. What's the 'adoption path' for something like this?

I think a really robust sample data set with example queries (think the neo4j imdb examples) would be a great way to show how powerful and easy something like this can be.

<comment><AUTHOR> Jeff from PipelineDB here. Great suggestion! We've actually created this using sample Wikipedia data. See:

[http://docs.pipelinedb.com/quickstart.html](http://docs.pipelinedb.com/quickstart.html)

</comment></comment><comment><USER14> How similar is this to something like [http://riemann.io](http://riemann.io) for processing events from a stream?

<comment><AUTHOR> I'm not familiar with riemann.io but the main differences seem to be that Riemann is clojure-based and would require external storage of some sort. PipelineDB is SQL-based and has integrated storage. It really depends on what kind of event processing you're looking to do.

The main tradeoff with PipelineDB and other stream processing frameworks like Riemann, Storm, Spark Streaming, Samza, and others is mainly flexibility for simplicity. Not all streaming computation lends itself to SQL, but in scenarios where it does continuous SQL queries and a relational database can be simpler. But as with all data processing endeavors, you have to find the right tool for the job.

</comment></comment><comment><USER15> Very cool that it is open sourced - seems like there would be a lot to learn from the code. Link: [https://github.com/pipelinedb/pipelinedb](https://github.com/pipelinedb/pipelinedb)

</comment><comment><USER16> This is awesome, thanks for making it open source!

Would it be possible to set triggers or something on the continuous views? Lets say I want to take action (immediately) when a value calculated over sliding window goes above a limit.

It's a bit late here but I'll definitely play with PipelineDB tomorrow.

<comment> usman-m Not right now, but it's definitely a feature we're thinking about.

Awesome--let us know what you think about it!

<comment><USER16> Will do, I love PostgreSQL so I'm pretty excited to se what the possibilities are!

Found this gem in the docs :D

Unsupported Aggregates: xmlagg ( xml )

        :(

</comment></comment></comment><comment><USER17> This claim about ETL not needed in the future sounds dubious. I work on a large application that is all about ETL. If we wanted to use this new method instead, I am not sure how it would deal with the following:

\- State in the data. In many sources we have, processing depends on some internal state, which must be kept along the time. For example some process has started and we will know when it ended, and we must keep its state so we could correctly process the ending event (to match it up). I am not clear how this will work with continuous views. I would say this is actually the major reason of what makes ETL processing non-trivial.

\- Processing failure. Let's say something goes wrong and the data processing fails (or it can actually be even planned downtime). How do we know where to restart, to avoid processing data twice or miss data? Does the continuous stream take care of this metadata? And how does it deal with the state information per above? If you do data processing in batches, there is an obvious point of restart. Again, I think the extra complexity that "continuous" approach says is unnecessary relates to the fact that you want to be able to checkpoint the state of processing for various reasons.

</comment><comment><USER18> It seems PipelineDB doesn't have a clustered version, all the data must be sent to one server similar to Postgresql. Considering the fact that stream processing feature is usually useful in big data (if the data size is not that big and the data can fit in memory, complex aggregation queries usually don't take more than 1 second using a columnar database), is it possible to use PipelineDB for millions of events per second?

</comment><comment><USER19> Do Continuous Views work with table-table joins, or must there always be at least one stream present? The documentation[1] doesn't specify.

If so, this could be an interesting alternative to RethinkDB's changefeeds, as RethinkDB doesn't support joins on the change stream.

[1] [http://docs.pipelinedb.com/joins.html](http://docs.pipelinedb.com/joins.html)

<comment><USER5> Founder @ PipelineDB here (hi Slava!)

Currently continuous views must read from a stream. However, in the very near future it will possible to write to streams from triggers, which would probably give you enough flexibility to model the behavior you want if you could conceptualize a table as a stream of changes.

</comment></comment><comment><USER20> Cool. Very cool.

My first thought (aside from "Cool") was that the current time would be the tricky thing that can't be incorporated into a continuous view. But even that seems to be handled! [http://docs.pipelinedb.com/sliding- windows.html](http://docs.pipelinedb.com/sliding-windows.html)

Looks pretty impressive. :-)

</comment><comment><USER18> We needed to implement continuous queries in our application code. (It's actually hard to do it right in Postgresql so it's very limited) [https://github.com/buremba/rakam/wiki/Postgresql- Backend#con...](https://github.com/buremba/rakam/wiki/Postgresql- Backend#continuous-query-tables) Since stream processing and real-time analytics are quite hot topics nowadays, I think real-time databases will get much more attention in a near future.

<comment><USER21> Postgres actually does expose a commit log mechanism since 9.4, expanded with 9.5.

[http://www.postgresql.org/docs/devel/static/logicaldecoding....](http://www.postgresql.org/docs/devel/static/logicaldecoding.html) and 9.5's track_commit_timestamp = on.

<comment><USER18> Sorry for the late response. HN just sent me notification mail.

The documentation states it as "by default". It's required to change wal settings in config file and write a custom logical decoding output plugin in order to take advantage of that feature.

Currently, PaaS provisers such as RDS and Heroku Postgres don't support and it would not be easy to setup it manually. AFAIK, that feature is intended to be to used for backups.

</comment></comment></comment><comment><USER22> Well said! Good timing too, I'm beginning to sketch out how to tackle this large file set processing that has to stitch together data from corresponding files. The magnitude I'm imagining is such that I can't just read all the files into memory and do the matching, number crunching, and what not against. I like the concepts and terminology in this article. Definitely worth keeping in the back pocket going forward if not diving into it all outright. Thanks so much.

</comment><comment><USER23> It looks like PipelineDB is implemented as a fork of PostgreSQL. I would be interested to understand what is different about the architecture of PipelineDB that it couldn't be integrated into upstream PostgreSQL.

<comment><USER24> Cofounder at Couchbase here.

Is the license decision driven by business or is there some dependency that pushes you to GPL? For us Apache 2.0 has been worth it even when other companies use our code in their products.

<comment><USER3> And not just the GPL, but the AGPL. That one caught me by surprise. Does this mean there is going to be a MySQL-style dual-licensing situation in the future? (or is this already the case?)

<comment><AUTHOR> PipelineDB is actually licensed under the GPLv3. We accidentally updated our files with the AGPL earlier today by mistake but have since rectified that. Apologies for the mixup!

<comment><USER25> As much as thank you comments are downvoted here I'll still say: Thank you! Same goes to everyone else who avoids hasseling developers everywhere with AGPL.

</comment></comment></comment></comment></comment><comment><USER26> Can PipelineDB be used to run projections for an EventStore?

I'm experimenting with the EventStore pattern for a side project, and I have struggled to implement projections. Could PipelineDB be a way to deliver that?

</comment><comment><USER27> In the example for sf_proximity_count, you state the view covers a 5 minute sliding window, but the WHERE clause does not reference clock_timestamp(). Is 5 minutes an implicit default?

<comment><USER5> There was a bug in the example. Fixed, thanks!

</comment></comment><comment><USER28> What does ETL mean in this context?

<comment><USER29> Extract, Transform, Load

</comment></comment><comment><USER30> Wonderful! Great job.</comment>