Launch HN: Medumo (YC W18) prepares patients for surgeries - <AUTHOR> Hi HN! We are building enterprise software that prepares patients for surgeries (http://www.medumo.com). Millions of patients go through these things every year. The problem is that patient instructions are provided months in advance, in the form of paper handouts or verbal instructions that are easily forgotten. As physicians, we saw firsthand how poor patient experience can impact hospital operations and surgical outcome. For example, when patients forget to stop medications that can cause bleeding, the surgeries have to be cancelled last minute which is costly. Or worse, poorly prepared patients get the surgery and have avoidable complications.
Our team came together to solve this problem with patient navigation software that gives turn-by-turn instructions, reminders, and educational material through friendly, accessible medium (SMS/email) to deliver the best experience and surgical outcome.
Unfortunately, health systems are notorious for moving slowly, so introducing a new digital platform can be challenging and slow. We are overcoming this by starting with simple use cases like colonoscopy, proving our value quickly and expanding to other areas. Another challenge is that patients respond differently to instructions; so instead of taking a one-size-fits-all approach, we are constantly varying instructions and A/B testing patient behavior to improve outcomes.
12 hospitals use our software to date. We have demonstrated improvement in show rate and procedure preparation quality. Here's an example: https://bwhbulletin.org/2018/02/01/endoscopy-center-sees-suc...
We know HN has a lot of people who have experience building or selling software to hospitals and faced tough obstacles with the scars to prove it. We'd love to hear your thoughts around hospital enterprise sales, pilot design, patient engagement, and anything else that you've seen come up on your journey! <comment><USER2> The #1 takeaway I have from my time watching small companies try to integrate into big EMRs in surgery areas is to find a physician champion. Convince one physician who will make it happen. Periop and procedural areas are run like an assembly line and are more rigidly opposed to change in their workflows and processes than a lot of the rest of the hospital. As a small company, your biggest obstacle will be to convince the hospital IT shop that you're worth the trouble and security risk. The best way to do that is to convince the customer of the hospital IT department - i.e. the physician champion.

A company I think has a great strategy for this is Redox, have a look at their strategy kit: [https://www.redoxengine.com/blog/integration-strategy- kit](https://www.redoxengine.com/blog/integration-strategy-kit) They've got a great blog too: [https://www.redoxengine.com/blog](https://www.redoxengine.com/blog)

I'd be thrilled to have a chat with you about your implementation strategy.

<comment><AUTHOR> Thanks for the very "heart felt" advice. The hospitals that we have traction all have great champions. Coincidentally we are working with Redox on a few deployment already. I'd love to chat with you more. What's the best way to connect?

<comment><USER3> Although having a great champion is important, I'm not so sure if that person necessarily has to be a physician at the hospital. Dave Chase touches on this briefly here (I don't necessarily agree with the title of the article): [http://hitconsultant.net/2017/03/30/new-walking-dead- digital...](http://hitconsultant.net/2017/03/30/new-walking-dead-digital- health-startups-meeting-maker/)

Just as you are working with colonoscopy centers, working with large medical groups that do a lot of their procedures through surgical centers (pain management, basic ortho stuff), would be a good way to start before working into hospital systems.

</comment></comment></comment><comment><USER4> _HIPAA Compliant

Rigorous 3rd party security and compliance validation._

I worked for a large insurance company for over 5 years. You say you currently have 12 hospitals as clients. My experience in insurance suggests that if you expand your business to include smaller facilities, you will find that small offices can vary a lot in their understanding of things like HIPAA. This can de facto result in more burden on you to make sure compliance actually happens.

Somewhat random thought: I bet you could expand this service to provide support for people who are elderly and/or chronically ill.

There is a huge market for tech to help seniors maintain their independence by making sure they are safe etc while living alone in spite of declining abilities. People who are chronically ill sometimes express the wish that an app or service might help them stay on track with taking meds etc. Chronic conditions that are well controlled can mean a mostly normal life. But things can spin badly out of control quite rapidly because of a single missed dose of medication.

</comment><comment><USER5> In Finland this is already happening. This app is being used (and it is actually very useful, too): [https://www.buddyhealthcare.com/news/supporting- pediatric-su...](https://www.buddyhealthcare.com/news/supporting-pediatric- surgery-patients/)

</comment><comment><USER6> Wow, this is actually something useful.

This isn't another "Uber for X" or "AirBnB for Y". I can't wait for you all to get huge and for this to succeed just for the fact this idea is so simple + pure but has such huge promise.

<comment><USER7> Interesting I have had 3 surgeries (two abdomen and one transplant) in the last year in the UK and they used paper based systems and verbal instructions for the two planed ones.

The NHS still runs on paper :-) still cant do my regular bloods at my local ahead of my regular check up at another specialist hospital.

<comment><AUTHOR> We'd love to explore the UK but have no clue what's the best way in. Any suggestion?

<comment><USER4> Perhaps not obvious, but you can expect to need to do localization: [https://news.ycombinator.com/item?id=16333599](https://news.ycombinator.com/item?id=16333599)

That might be a place to start, with translation and localization of instructions.

</comment></comment></comment></comment><comment><USER8> As a medical student with an interest in software, this is great to see. A great solution to a costly problem that is likely underestimated by most. As I spend more time "on the ground" in the healthcare system, I see more of these practical problems that have very real consequences, with outdated pseudo- solutions. I'm excited by the prospect of emerging solutions like this.

<comment><USER9> I'm interested in hearing your thoughts on the current state of healthcare software.

</comment></comment><comment><USER10> I'm not a doctor, but I know Adeel (the doctor who wrote this post), and can't say enough positive things.

More often than not, doctors use printed pages to give instructions, and those pages subsequently get thrown in my trash can. As an occasional patient, I want my doctors on Medumo.

</comment><comment><USER11> Congrats on the launch. We're[0] in the medical education space and it's always good to see more being done in this space. We're not targeting patients, but rather students.

We'd love to collaborate and support you guys with anatomical illustrations or other content that can help patients understand their procedures or medical conditions (We cover Anatomy, Histology and Medical Imaging. Although we don't yet cover much in terms of pathologies, but healthy anatomy). We know how hard it can be to license accurate and high quality content in this field. Feel free to reach out to us (you can email me directly, details in my profile, or via our website).

[0] www.kenhub.com

</comment><comment><USER12> I am wondering if insurance companies would be interested to pay for this as well.

For surgeries that need pre-authorization from the insurance, the insurance has enough information about the upcoming surgery to use your services and prevent avoidable complications. (Insurance companies don't like to pay for avoidable complications!)

</comment><comment><USER13> Hi Adeel, congratulations on launching! I'm curious, how is Medumo different from SeamlessMD?</comment>


Ask HN: What software do you use to run Facebook contests and sweepstakes? - <AUTHOR>

<comment><USER2> Rafflecopter

<comment><AUTHOR> This looks really great!

<comment><USER2> It is a great tool. Be careful of the FB guidelines for hosting giveaways sweepstakes on their site. There are some rules about how you promote - do it wrong and you can lose your page. RC has a good blog post on the DOs and DONTs. Rafflecopter's been great though. They are still rolling out features - would love to see the different winners displayed when there are multiple prizes. That part can be a little confusing.</comment></comment></comment>


Deep learning powers a motion-tracking revolution - <AUTHOR> https://www.nature.com/articles/d41586-019-02942-5 <comment><USER2> Interesting to see deep learning techniques entering the realms of non-cs focused academia. I recently heard of another example from the Planet Money podcast[1], that used deep learning to perform an elephant census.

One of my favorite things about ML is using it to reduce human labor hours on tasks like these.

[1][https://www.npr.org/2019/08/09/749938354/episode-932-deep- le...](https://www.npr.org/2019/08/09/749938354/episode-932-deep-learning- with-the-elephants)

</comment><comment><USER3> I wonder what the next iteration of new CS tech will be once we apply ML to every field where it's easily applied.

<comment><USER4> You can apply it on top of arbitrary combinations of fields where ML could be easily applied to.

</comment></comment><comment><USER5> Drones.

[https://arbital.com/p/AI_safety_mindset/](https://arbital.com/p/AI_safety_mindset/)

</comment><comment><USER6> Image segmentation and 3d pose estimation are not new. I'd like to see how the new deep learning approaches compare to the existing state of the art.

<comment><USER7> Deep learning approaches have been the state-of-the-art for these tasks for several years now. Other techniques just cannot compete.

<comment><USER8> They are not fast enough for real time 3D pose estimation (60fps)

<comment><USER7> There are DL methods that well exceed 60 fps for single-instance estimation (on high-end GPUs, especially on Turing or Volta cards with FP16).

I would also be interested in any alternative approach that even comes to the ballpark of DL performance in pose estimation.

<comment><USER6> The Kinect could do pose estimation on 48 joints at 30 FPS on the Xbox 360's CPU.</comment></comment></comment></comment></comment>


Israeli Laser Drone Dome System Downs Swarm of UAVs in Newly Released Video - <AUTHOR> https://sputniknews.com/military/202002121078295995-israeli-drone-dome-system-downs-entire-swarm-of-uavs-in-newly-released-video <comment><USER2> 'Swarm' = 3 drones</comment>


Where are the unit tests for git? - <AUTHOR>

I found some 'tests' in this folder:
https://github.com/gitster/git
But where are all the other tests? E.g. merging, diffing, etc are all units and thus easy to test, but I couldn't find some.
Are there any tests? How is the git community guarantee that all still works, if they rewrite parts or make substantial changes? <comment><USER2> they are in the ./t/ directory in the repository.

Look for more information in the README file: ./t/README</comment>


American Murder Mystery - <AUTHOR> http://www.theatlantic.com/doc/200807/memphis-crime

<comment><USER2> <http://news.ycombinator.com/item?id=225962>

Example of the political incorrectness within:

"We are undergoing the Paris-ification of America. The snobbish French always thought Americans were nuts to let Washington, the capital of the country, and New York, the capital of the world, turn into hellholes. Why build public housing projects in the middle of your great cities for riff-raff? The French elite, no fools, kept beautiful Paris for themselves. They warehoused their African immigrants out in the bleak suburbs, where every night is Car-B-Que night."

</comment><comment><USER3> What does this have to do with technology???

<comment><USER4> <http://ycombinator.com/newsguidelines.html>

<comment><USER5> Off-Topic: Most stories about politics, or crime, or sports, _unless they're evidence of some interesting new phenomenon._

Upvoted. Interesting phenomenon. Unintended consequence in a complex system. Interesting.</comment></comment></comment>


Pink Floyd: Pandora's Internet radio royalty ripoff - <AUTHOR> http://www.usatoday.com/story/opinion/2013/06/23/pink-floyd-royalties-pandora-column/2447445/ <comment><USER2> David Lowery made this point in a much more compelling and complete way:

[https://news.ycombinator.com/item?id=3850935](https://news.ycombinator.com/item?id=3850935)

Of course, ultimately, people are (rationally) compelled by the own immediate interests. That's what allows people to deride musicians for trying to "cling to obsolete business models", as if a verdict on the viability of someone's business model entitled people to ignore their rights. So I don't expect Roger Waters and David Gilmour to have much more luck pressing this argument than any other musician has had.

<comment><USER3> However, note the context here:

You are reading about the thoughts of a musician long past their prime. They have created vast wealth at one point in time, and now they only have the records to really keep them going.

Vast availability of music DOES NOT MAKE MONEY FOR ARTISTS unless the labels are 100% cut out. Even then the numbers are small. They won't make minimum wage.

HOWEVER... vast availability of music WILL increase their concert attendance. Which means -- $ for the musicians.

This is why old timer musicians from an age where record sales were the way to make $$ will be against the new order of things. Pink floyd is not currently in the business of selling out madison square garden every night of their visit to new york.

NOW I do not necessarily know which way is the better way. In fact I prefer freely available music online and concerts. However I am not in a position to make the call :P

<comment><USER2> Pink Floyd makes galactic sums of money from concert appearances. The average Merge Records artist does not. Lowery addresses this in his post.

</comment></comment></comment><comment><USER4> Two things to always remember about this debate.

1) Pandora's biggest cost by ridiculously far is royalty payments.

2) Pandora is not now and has never been profitable.

Lots of stuff is broken to make this so, but it's not a case of big bad "piratey" Pandora ripping off poor defenseless artists and laughing all the way to the bank.

<comment><USER5> It's easy to not be profitable, though. Just pay large-enough salaries or invest in future growth what otherwise would've been profit.

<comment><USER4> In 2011, Pandora paid over 50% of revenues in performance royalties. 50%. Of _Revenues_.

<comment><USER5> That's a much more telling stat.

<comment><USER6> Not really - it just means they aren't very efficient at monetizing music. Why should artists subsidize a channel that devalues their art?

<comment><USER5> They shouldn't of course. The point being made was that Pandora isn't laughing all the way to the bank.

<comment><USER6> That's true. The basic problem does seem to be that people love music enough to have paid a reasonable amount for it in the past, but now have been conditioned to believe that it is cheaper than it really is.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Short on facts. What's this "85% pay cut" line they keep repeating? Unsupported and smacks of sensationalism.

This thread has a much better discussion of the actual numbers. [https://news.ycombinator.com/item?id=5935183](https://news.ycombinator.com/item?id=5935183)

In short, Pandora is small right now and that's why the payout seems small. But by paying per-listener as opposed to per-broadcast, it has the potential to scale to higher payouts than traditional radio.

<comment><USER8> But the problem in the other thread is the assumption that a radio listener and a Pandora listener are the same. They're clearly not, because if Pandora streamed the same thing to every listener it wouldn't have any customers. People pay Pandora for music customized to their personal taste. From the musician's point of view, that makes it _less_ effective than radio at reaching new listeners.

<comment><USER7> That conclusion makes absolutely no sense. Personalized stations are WAY more effective at targeting new listeners than radio stations that play the same shit over and over.. especially for smaller/emerging artists.

Do you think Amazon would be more or less effective without personalized product recommendations? Which is better for niche products, Amazon or Walmart?

<comment><USER8> Prove it.

I would _way_ rather have my product sold in Walmart. That's why Walmart suppliers are willing to accept such thin margins. Amazon's great for consumers. As a consumer, I like it that they have pretty much anything I would want to buy.

As a _content creator_ , put me in Walmart _any time_ , as I will be surrounded by a much smaller number of competing products. Being on the same shelf as big sellers Justin Bieber and Skrillex is a _dream_ scenario for an emerging artist. My needs as a producer are way different from my needs as a consumer.

<comment><USER7> Um, you completely missed the point. Most niche products will never make it into Walmart. Just like most bands don't get much radio airplay. Those systems are optimized for pumping out a large volume of a limited selection. You see that, and can fantasize about being in that "top 100", but you're not following your logic to its conclusion with respect to the rest of musicians.

What's interesting is that even for the top 100 the Pandora model has the potential to scale to higher royalties than the radio model, which pays the same whether 1 or 1 million people listen to a broadcast. Less popular bands find niche audiences, more popular ones get paid for every single listen.

<comment><AUTHOR> This is true. I found new artists from Pandora (my Orbit station) that mainstream radio stations have never heard of and certainly wouldn't play.

In other words, radio is focused around the head (big hits in any genre) while Pandora reaches the "long tail".

</comment></comment></comment></comment></comment></comment><comment><USER9> OT: Give credit to Pandora to provide the fodder for Roger Waters, David Gilmour and Nick Mason to finally agree on something :)

<comment><USER10> LOL, I was just thinking the same thing. Considering what broke them up, it wouldn't be surprising if Waters composed the whole thing.

<comment><USER11> "Welcome Pandora, welcome to the machine. What did you dream? It's alright we told you what to dream. So welcome to the machine."

<comment><USER12> "It came as a heavy blow, but we sorted the matter out."

</comment></comment></comment></comment><comment><USER13> It's a pretty touch choice for artists, I bet: Make nothing or make next to nothing.

The old days aren't coming back. Your unloyal customers will steal your product if you don't sell it cheaply enough for their liking.

Subsequently, you either have the choice of trying to make money on your loyal customers only or changing your product. You could try stopping your unloyal customers from stealing from you from some means, but that has not been an avenue that has a high return since it tends to also involve treating your loyal customers like unloyal customers.

<comment><USER14> Except artists make more now than they ever have...

<comment><USER15> Could not be more wrong

</comment></comment></comment><comment><USER16> I don't think Pink Floyd has much to worry about:

       NYSE:P Q2 (Apr '13)	2013
       Net profit margin	-22.78%	-8.93%
       Operating margin	-22.67%	-8.83%
       EBITD margin	-	-7.16%
       Return on average assets	-53.46%	-19.23%
       Return on average equity	-127.11%	-37.49%
       Employees	740

Their royalty checks will stop shortly after Pandora ceases operations :-)

<comment><USER17> Streaming services like Pandora and Spotify are simultaneously destroying the existing industry, not paying artists, losing money hand over fist, and tricking consumers into thinking they are actually supporting content creators. It's lose/lose/lose and the worst scenario across the board.

I thing Spotify is far, far worse than piracy because with piracy at least people know the artists aren't making in money. People somehow believe that listening to a couple of brief ads per hour, or paying a whopping $10 a month, is enough to receive unlimited access to all music ever created. What a disaster.

<comment><USER18> You forgot several big wins: music lovers enjoying music in an easy to use service they love. And thousands of unknown/unsigned artists getting discovered and kicking off their careers.

<comment><USER17> Like I said, people have actually been tricked into thinking Spotify is a good thing for the industry.

<comment><USER19> Industry seems to be doing pretty good. But why should I even care about "the industry"? I can get why should I care about the artists, but "the industry" is just the means to the goal of getting music, if there would be some other means that gets the same result - who cares if "the industry" disappears?

<comment><USER8> The industry also provides marketing, administrative, and editorial services that are extremely valuable. Artists aren't necessarily good at self- promotion, accountancy, sound engineering etc. etc. Bands usually have managers because they're good at making music, not tour management and so on.

</comment></comment></comment></comment></comment></comment><comment><USER20> I'll start believing in royalties when I start thinking it makes sense to pay an engineer for every car that crosses a bridge he designed for his life + 20 years or to pay the architect 10 cents every time I open my front door.

Pink Floyd can sob 'till the cows come home, but it's not going to make me believe that he's _they 're_ entitled to money for something he's _they 've_ already done.

<comment><USER21> Engineers and architects are paid up-front for their services. Musicians aren't. Do you have a suggestion for how they could be?

It's true that musicians _sort of_ used to be paid up-front, in the traditional label model where a record company gave a musician a big advance to make an album, and then pocketed most of the actual profits from the sales of that the album (akin to hiring an engineer to build a bridge, then collecting tolls on that bridge). But that's no longer the model for most up- and-coming independent artists, and in any case, that just shifts the royalty- collecting burden to the record companies, who still need to be able to recoup their initial advances.

Another approach, which works well for bridge-building, is that the government just pays some engineers to build a bridge, then lets everyone use the bridge for free. This is like the _really_ old school practice in which a wealthy prince commissions Beethoven to write a string quartet, and once complete that string quartet is then freely available for anyone to perform. As a model for music in the modern world, this would mean socializing the music production business, i.e., taxing everyone the price of a Spotify subscription and pumping that money into NEA grants for artists to record new music, which would then be free for everyone. On the bright side, this would eliminate all worries about piracy and chilling effects from anti-piracy enforcement. But there are also lots of drawbacks, e.g., in this model the decision as to what music should exist would be made, not by the market (as in the indie model), or a profit-oriented record company (as in the label model), but by government bureaucrats whose incentives come from the political process. Of course this could have some good effects (maybe they'd fund fewer Justin Biebers) but IMHO there are serious problems with a system in which an artist's viabilaity is contingent on their staying in the good graces of the government.

Also, just so you know, Pink Floyd is a band, not a person.

<comment><USER22> A Kickstarter-like model seems like it should work quite well for music. When enough funding is earned, the album can be released to the public. Providing only some teasers or something along those lines to fuel interest in the meantime. It is pretty hard to pirate content that is not available to anyone, and once you feel you've made enough money to release it, it doesn't matter much much "piracy" happens beyond that point – you've already been paid.

</comment></comment></comment><comment><USER23> Not really relevant to the current topic of Pandora's relationship to music, but for those interested in the historical problem with music (and the music industry), I strongly recommend reading "The Problem With Music" by Steve Albini (From The Baffler, No. 5, 1993)[1]. This was my first introduction to The Baffler, and led me to start reading their publications regularly. I don't always agree with the author's point of view, but almost always find the content stimulating.

[1]: [http://www.petdance.com/actionpark/albini/the-problem- with-m...](http://www.petdance.com/actionpark/albini/the-problem-with- music.html)

<comment><USER8> That's _20 years_ out of date, though. I am tired of hearing free music advocates basing their arguments on how bad things were in the music industry _a generation ago_.

</comment></comment><comment><USER24> Further cementing my opinion that you should never find out about people you really like (authors, musicians, etc.) as you're bound to be disappointed.

Pink Floyd may have a point. But by conflating profit and revenue they lose credibility in their arguments. Why resort to lame rhetoric? Pandora can be growing as a business and still losing money. The fact they had an IPO and got more users doesn't change the fact that they are (as of last quarter) still losing plenty of money.

<comment> k-mcgrady I think their point was that that's not the musicians fault. If you want to make a business distributing a product you need to find a way to pay for that product and then sell it at a higher price. You don't start the business and then try to force a pay cut on the producer just so you can make a profit easier. Pandora should focus on getting consumers to pay more (higher subscriptions, more effective advertising which they can charge more for etc.).

Edit:

It's obvious that the music industry has business model problems but in this case it's Pandora that has the business model problem. The industry doesn't need to lower it's prices - Pandora needs to figure out a way to pay them as they need the music more than the music industry needs them.

<comment><USER25> It's kind of interesting that if the supplier of the good pandora was pushing was anything but an artist or musician, we'd be totally on their side for trying to get a fair price the goods they're providing. However, since the supplier is an artist or musician, they're the bad guys for wanting a fair price for what they produce.

</comment></comment></comment><comment><USER26> The government has no business getting involved with this one way or the other. It's up to businesses to negotiate. If rights holders aren't happy with the money they're making they shouldn't sign the contract.

If the bands aren't the rights holders then they really have no say. That's a whole other can of worms.

My personal anecdote is that bands are making far more money from me than they did before. I'm discovering bands I wouldn't have know about otherwise. That's the catch 22. The big, well known bands will always make money whether it be through sales or streaming. The smaller bands are much easier to discover through streaming but may not make much money through it.

</comment><comment><USER27> Relevant discussion on reddit: [http://www.reddit.com/r/Music/comments/1gyylv/my_song_got_pl...](http://www.reddit.com/r/Music/comments/1gyylv/my_song_got_played_on_pandora_1_million_times_and/)

The artists don't seem to understand that Pandora simply doesn't have the scope or reach of their other revenue sources.

<comment><USER8> 150m users is about half the population of the US. How big of a market does Pandora need before it offers decent terms to its suppliers?

<comment><USER27> But the users are listening to their own songs.

</comment></comment></comment><comment><USER28> What we are seeing here is an argument about value for money. The consumers are not willing to pay more for the end produce so what is left is the creators and distributors arguing over their share.

The truth is that music is not a valuable commodity because so many people can produce good music. Being a musician is a blue-collar job, a technician (for the moment) is a white collar job.

</comment><comment><AUTHOR> As Dave Birch pointed out on Twitter: "Dark Side of the Moon, used to illustrate, came out in 1973 - it should be in the public domain now" [https://twitter.com/dgwbirch/status/349281727153319937](https://twitter.com/dgwbirch/status/349281727153319937)

</comment><comment><USER29> Messrs. Gilmour, Waters, and Mason say "Artists would gladly work with Pandora to end AM/FM's radio exemption from paying any musician royalties – a loophole that hurts artists and digital radio alike", but if there's any evidence of their having done so, I've not heard of it.

</comment><comment><USER30> I would have liked to see more numbers.

How much does Pandora charge? How much do they pay in royalties? How much do artists make from radio royalties? How much did artists make in royalties from CD sales? How much have CD sales declined for Pink Floyd?

</comment><comment><USER31> Since Roger Waters revealed himself to be an anti-semite, I can no longer take anything he says seriously.</comment>


Ask HN: Which Laptop models would you recommend for a developer using Linux? - <AUTHOR>

<comment><USER2> Lenovo Thinkpad.

Switched to Thinkpad X250 recently from old HP netbook and so far very much happy. Running Ubuntu 15.04 with Gnome.

Everything works out of the box, no problems with hardware so far, no need to patch or edit any obscure config files or download weird drivers.

Solid hardware. Internal battery that allows you to switch drained battery to a full one (if you have it) at any moment without the need to turn notebook off.

Besides that, I really like how Thinkpads look. Sturdy build that feels great in your hands.

Good keyboard. Some people don't like that type of keyboards (chicklet), but I feel comfortable working on it.

<comment><USER3> Beware of the 2nd generation (2014) X1 Carbon. The HDMI port doesn't support audio (in either Windows or Linux), the click pad rattles and requires too much force/travel for something you're supposedly to do as effortlessly and frequently as clicking, the mouse buttons that correspond with the trackpoint are practically non-functional, and the "adaptive function row" is an endless source of frustration. And for reasons that I may or may not be able to fix eventually, wifi on Linux Mint with this laptop is so unreliable that I spend most of my time in Windows despite otherwise preferring Linux. I'm typing this on one right now, so I know from experience.

I've read that the 2014 T-series clickpads and trackpoints have similar issues too. Generally, when people recommend Thinkpads for their quality they're referring to the X and T series. The 2014 models are frequently showing up in the Lenovo outlet store with surprisingly low prices because of low sales and high returns. Not a good deal. I would have gotten a refund if it wasn't a refurbished purchase.

<comment><USER4> I have the 2014 T440s and it's the best laptop I've ever used, though I guess that's not a particularly large sample size. I definitely think the 2015 T450s should be much better because they brought back the buttons but the clickpad is not really that hard to get used to. I think this year's Thinkpads should be really awesome, and if I could justify it I'd easily get a 2015 X1C now that they fixed the keyboard and trackpad.

It does have a wifi issue, it seems to me that the Intel 7260 wifi chip has serious issues across multiple laptops from what I've read online. But I found that for my home network switching to 5ghz fixed all my issues so it might just be an interference thing.

<comment><USER5> By the way, you can replace the trackpad assembly on your T440s with the T450s version that has clickpad buttons.

</comment></comment></comment></comment><comment><USER6> IBM/Lenovo Thinkpad. Sturdy, replacements / repair kits available, often used by university students. Buy refurbished, max ram and swap for ssd. look for i5 / i7 models T420, x201T is a tablet pc (pen, but no touch) available in i5/i7 models. avoid the newer models / research linux compatibility first.

<comment><USER7> I have a W530 for work and it works very well with Linux Mint 17. There was a bit of trickiness with the dual graphics cards and getting it to work right on the dock to output to quad monitors, but if you're not using multiple monitors via a dock, I highly recommend the W530. Even with that little bit of work it's been an excellent performer.

<comment><USER8> I'll second the recommendation for the Thinkpad W530, with one additional suggestion: go for one of the "pre-configured" ones, skimp on RAM and HDD, and upgrade it yourself.

I purchased mine right about two years ago (brand new from a seller on Amazon in order to avoid delivery delays when purchasing direct) and went for one with only 4 GB of RAM and a 500 GB SATA HDD. I paid (separately and, again, via Amazon) $300 for 32 GB of RAM and $385 for a 480 GB SSD (and spent 20 minutes installing them) but this was much, much cheaper than purchasing the W530 with those upgrades pre-installed. I ended up giving away the "original" 4 GB RAM to a friend who could use it and (since I very rarely need or use the optical drive) I usually keep the original 500 GB SATA HDD in the secondary bay in order to keep a fresh, up-to-date backup of my data for when the SSD inevitably fails without warning.

The NVIDIA Optimus graphics system is apparently a PITA for some people but since I don't use a dock or external monitor it's really not been an issue for me. I believe I have my BIOS set to the "Discrete Graphics" setting (to use the NVIDIA card) and Ubuntu has no problems with it (I previously ran Arch Linux on the W530 with the Intel card and also had no issues).

The W530 isn't nearly as light as many other laptops (about six pounds, if memory serves) but, then again, it's considered a "Mobile Workstation" \-- and with the quad-core i7 @ 2.70 GHz, 32 GB RAM, the 480 GB SSD and 500 GB SATA spinning disk, and FHD 1920x1080 15" display, it truly is!

Side note: after using MacBooks and MacBook Pros exclusively for ~7 years, I said that I'd never again buy a "PC laptop" (i.e. a non-Mac), but I'm extremely happy with my W530 (running Linux, of course) and use it almost exclusively nowadays. About a year after purchasing the W530, I sold my MBP simply because I had only used it two or three times in that year and thought I might as well sell it and get something out of it instead of letting it sit around and eventually become obsolete.

</comment></comment></comment><comment><USER9> Dell XPS 13 developer edition. It's a beautifully designed machine with excellent battery life, a good keyboard and a sensational screen, at a reasonable price. The fact that it comes pre-installed with Ubuntu is just the cherry on top of a very attractive cake.

<comment><USER10> Have you experienced problems with the WiFi? Mine constantly disconnects from the wireless network.

<comment><USER11> I think I may have seen this a couple of times, but it's certainly not constant for me. It may just be my router.

I'm dual booting Ubuntu 15.04 and Windows 8.1 as I support software on both platforms. So I'm suffering from the "reboot twice to get working audio" issue and occasional touchpad problems.

I believe that both will be fixed with kernel 4.1.

</comment></comment></comment><comment><USER12> "Ubuntu Desktop certified hardware ( Dell / HP / Lenovo / Asus )"

[http://www.ubuntu.com/certification/desktop/models/?query=&c...](http://www.ubuntu.com/certification/desktop/models/?query=&category=Laptop&release=&level=Any&vendors=Dell&vendors=HP&vendors=Lenovo&vendors=Asus)

// I am a happy Lenovo Thinkpad user :)

<comment><USER8> Nice, thanks for that!

I'm also a happy Thinkpad owner but have been considering a new one, although it's hard to find one that can compete with the two-year-old W530 I have now.

</comment></comment><comment><USER13> Would love to hear some thoughts on the System 76 laptops. I'm tempted by the 15" Gazelle Pro, but haven't heard any first-hand accounts from real users.

<comment><USER8> I wish I could remember where it was at, just within the last week I recall reading several unfavorable opinions about System 76. It was either here, on Reddit, or the FreeBSD forums.

I had been considering one of their laptops due to the apparent extensive Linux support and wonderful "unicorns and puppies" praise on some of the Jupiter Broadcasting podcasts (until it hit me that System 76 is a huge sponsor and so they wouldn't be saying anything negative about them) but the comments I just read caused me to strike them from my short list.

<comment><USER14> I heard of these issues too, on Reddit. After my experience with their support people, I decided that the issues were either an active social media PR campaign against them by one of the other vendors or regular mishaps of the support department or a combination of both.

</comment></comment></comment><comment><USER15> The Lenovo T420 can't be beaten, to this day. You can sink three SSDs in the thing (one mSATA, one primary 2.5", one in place of the ODD), it survives a beating or two, it has the legendary classic ThinkPad keyboard (later models don't) and as late models have switched to U series CPUs, the full wattage Sandy Bridge CPU in there can keep up with many of the current models. Extensibility is not bad with an eSATAp port (or two if you dock). The dock has two DisplayPorts, the laptop has one. USB3 can be added via an ExpressCard.

The only other possibility I would entertain is the new Dell M3800 developer edition. The step up is significant: it has a quad core i7-4712HQ and Thunderbolt and 4K screen as an option. While even a well pimped out T420 is well below $1000 (starting at a few hundred, even), this one will run to $3K and more if you pile on everything. I'd get it if I needed Thunderbolt bandwidth but otherwise just go with the old.

</comment><comment><USER16> Dell xps 13 developer edition comes with Ubuntu

</comment><comment><USER17> I'm running Linux Mint 17.1 Mate on a Toshiba Satellite P55t B5340. i7, 16GB ram and 500GB SSD. Also has 4k screen, but I run in 1920 x 1080 since I can't get good scaling with Mate. I really like this notebook. Nice keyboard also. Has numeric keypad which is nice.

</comment><comment><USER18> If you're on a budget, you could get a lenovo X200 Tablet, fit a new battery and 8GB of RAM. You get a nice touchscreen which you can orient as you please and 2 minipcie expansion slots.

That is, if you don't require modern OpenGL/gpgpu features, nor plan on doing massively parallel jobs on it (It sports a Core(TM)2 Duo CPU L9400 @ 1.86GHz)

Hypothetically, you _could_ solder a faster processor (not realistically for most of us tho).

Why the X200 and not a more recent one? They changed the keyboard / buttons afterwards, for the worst :(

NB: you might want to patch the bios to remove the mpcie whitelist ibm/lenovo put in. Misewell flash coreboot (requires in-circuit programming, due to flash block write protection)

<comment><USER19> Question; does the pen work with the linux install?

<comment><USER18> Yup.

You'll want to add something in the lines of

xsetwacom set "Wacom Serial Penabled 1FG Touchscreen touch" Area 104 26074 115 16374

for proper calibration to your .xinitrc (as it doesn't survive reboots). As always, RTFM ;-)

</comment></comment></comment><comment><USER20> Dell XPS 15. Awesome build quality, very very similar to the Macbook, but slightly cheaper, and still had an option for a hi red screen. And you won't have everyone assuming you're running OSX.

</comment><comment><USER12> 6 month ago : " Ask HN: The best Linux laptop" [https://news.ycombinator.com/item?id=8673709](https://news.ycombinator.com/item?id=8673709)

</comment><comment><USER21> Personally, I use a Macbook Pro. I don't want to spend time messing with my configuration files. I want to focus on what gets money flowing into my pocket.

To answer your question, I've heard great things about the Dell M3800. You can get Linux preloaded and get a higher resolution screen. Dell has worked with Canonical to make sure the hardware support is there.

Before this machine, I had a Thinkpad and I really had trouble understanding what all the hype was. I don't think I'd buy one now after Superfish.

</comment><comment><USER22> As already told before: Thinkpads or Dell developper edition. I will add HP's pro series: a bit Probooks but mainly Elitebook series which are really great too.

Run away (far!) from general use HPs. Only professional series are fine.

Plus excepted the XPS, you can at least here find other laptops pretty easily on refurbished/used market.

</comment><comment><USER23> I've been running Arch on a Thinkpad t430s for about three years now, it's a very solid laptop.

</comment><comment> data-cat MacBook Pro with Retina

<comment><USER8> Running Linux?

<comment><USER24> I know a guy who runs OSX and windows at the same time. He just swipes left to slide windows on and swipes right to get back to OSX. Since Linus uses a macbook for development I assume you can do the same thing with Linux.

<comment><USER25> I installed vmware fusion to run windows and linux vms on my MBP. It works great and the swiping feature is really slick, allowing me to jump between desktops as needed.

</comment></comment></comment></comment><comment><USER26> Would echo several other comments herem. Am in the lucky position of owning a Dell XPS 13 with Linux pre-installed and then using a Lenovo X250 for my job, and they're both excellent laptops for development on. The work one isn't running Linux, so my comment is less fully tested but the hardware alone is just a joy with the solid feel to everything.

I'd definitely buy the XPS again as it's been brilliant (not Wi-Fi issues as other owner mentioned), although I might forgo the touch screen which adds nothing really on Linux and marginally increased weight and apparently causes slightly lower battery life.

</comment><comment><USER27> Definitely pricey and a little off the beaten track but I absolutely love my Chromebook Pixel LS. Ubuntu was super easy to set up using Crouton. Everything worked out of the box, the only minor modification I made was replace the synaptic touchpad drivers with a ported version of Chromebook's. When I'm not developing I usually keep it in ChromeOS as it is extremely snappy and responsive. A quick keypress and I can drop into Ubuntu to get some work done.

</comment><comment><USER28> I have a two year old Lenovo S431 running Linux Mint 17.1. For the most part it runs flawlessly. My only complaint is the wireless card. I can't connect to comcast wifi networks when xfinity wifi is turned on, and in general, the wifi range is horrible. I wanted a thinner, portable laptop, but from what I've read, a lot of the newer Lenovos that aren't part of the business line (like the T series) have wifi problems.

</comment><comment><USER29> I have an 2 year old Asus N56V. With Debian not everything worked out of the box when I bought it. But after a couple of weeks the problems were solved.

If I were to buy a new one I'd be really tempted at this, which aims a being fully FOSS powered: [https://puri.sm/](https://puri.sm/)

BTW, have you considered a mac and then installing Linux on top of it?

</comment><comment><USER30> It really depends.

You may go with a Thinkpad or a Dell XPS if you need a well built machine or you could go with a less flashy, cheaper expendable machine that's slightly slower, slightly heavier and less durable. More memory is good, a good screen is good. I'd suggest avoiding any hardware with less than stellar Linux support.

</comment><comment><USER31> While not a pure developer, I am extremely impressed with the Lenovo X1 Carbon Gen 2 with I7 and an SSD. It has the perfect blend of speed, strength, lightness, battery life and quiet which I always thought was unattainable. I.E. at least one factor would have to go.

<comment><USER3> I just wrote a comment specifically warning people against buying this very model. I have the 20A7/20A8 model. Does your clickpad rattle and require more force than every other laptop? Does your function row take half a second every time you want to switch rows? Do your function row keys only respond when you press forcefully in specific locations that are near but not the same as their icons? Does your HDMI audio work? You obviously don't have the Linux wifi problems I do. What distro do you use?

I agree that the "speed, strength, lightness, battery life and quiet" is excellent by the way.

</comment></comment><comment><USER32> Along with lots of other people here. I recommend getting a ThinkPad that is Ubuntu certified. Even if you don't use Ubuntu, it will mean that there is good linux support for all of the hardware.

I use a T440s and it is fantastic. No issues whatsoever in Mint 17.1 Mate 64-bit.

</comment><comment><USER33> A chromebook that has the 4 gigs of ram and a 32 gig ssd is large enough to handle the android sdk's, I was trying to do this on a 16 gig chromebook, but 16 gigs is only enough for web development, the android sdk is pretty huge.

</comment><comment><USER34> One of these guys:

[http://shop.gluglug.org.uk](http://shop.gluglug.org.uk)

put in an SSD.

if you do go for a thinkpad or dell xps, if it has a 'decent' graphics card, search google for overheating on that model before buying.

</comment><comment><USER35> I've generally had good experiences with ASUS and very poor ones with Samsung.

</comment><comment><USER36> Very good: Thinkpad X250, Thinkpad X1 Carbon, Thinkpad T550 \- Good: Dell XPS 13

</comment><comment><USER19> Im using Centos 7 on a thinkpad x201. No issues with a standard install.

</comment><comment><USER37> I would actually recommend getting any Windows laptop and just use Hyper-V (or VirtualBox/VMware if you prefer Type-2 Hypervisors) to run Linux.

Most modern laptops can handle virtualization with no noticeable performance penalties even for heavy dev tasks, and the UX is essentially identical to running on bare metal if you use the full screen immersive mode that most virtualization software offers for interaction. The virtualization stack takes care of most hardware compatibility issues, and running Windows as your host OS means you won't have to restart to do Windows specific dev stuff and/or play games (Hyper-V allows full access to the GPU for the "host OS").

Getting a Macbook and running Linux with VirtualBox, VMware Fusion or Parallels is also a viable alternative if you don't need to game on the Windows VM but need OS X support instead.

</comment><comment><USER38> Linux on the desktop is a mistake that's driving a lot of bad code into distributions. Get a macbook, which has, even now, a very solid desktop environment that'll always be more functional and easier to use than any desktop linux, and use vagrant to develop against linux virtual machines, and/or ssh into your linux environment.

This is how I've done it for the last several years with great success.

<comment><USER39> What bad code is desktop linux driving into distributions?

<comment><USER38> primarily systemd, journald, dbus.</comment></comment></comment>


IEEE: What Constituted Invention? (History of the Intel 4004) [mp3] - <AUTHOR> http://www.computer.org/portal/web/computing-lives/home/-/blogs/what-constituted-invention-

<comment><AUTHOR> The other three parts are here:

[http://www.computer.org/portal/web/computing- lives/home/-/bl...](http://www.computer.org/portal/web/computing- lives/home/-/blogs/what-constituted-invention-part-two%3A-busicom-and-intel)

[http://www.computer.org/portal/web/computing- lives/home/-/bl...](http://www.computer.org/portal/web/computing- lives/home/-/blogs/what-constituted-invention-pt-3-busicom-and- intel%3A-defining-a-product)

[http://www.computer.org/portal/web/computing- lives/home/-/bl...](http://www.computer.org/portal/web/computing- lives/home/-/blogs/what-constituted-invention-pt-4)</comment>


What's the fastest anyone has deployed a Python / Django app? - <AUTHOR>

<comment><USER2> I had a HUGE learning curve with Heroku. I'd recommend against it. I think in the end, it would have been cheaper and faster to deploy to just a generic cloud server on Digital Ocean or Rackspace or whatever.

<comment><AUTHOR> From experience with most providers, Heroku has been the fastest and easiest to deploy to. It's interesting to hear an alternative experience. What would you say got in the way for you?

<comment><USER3> My first attempt at deploying to Heroku was a very simple admin based app to demonstrate something to a friend. That was really simple and went without problems. Then I tried a slightly larger app and it was a disaster.

A lot of the problem is that I develop in Aptana / Eclipse, and the file layout that Aptana expects is different from what Heroku expects (Aptanas has one extra directory at the top level, yet Heroku expects some of its files in the top level directory).

In the end I have a slightly hacky try / except around some imports in urls.py to get around the problem.

</comment></comment></comment><comment><USER4> Heroku might be worth looking at if you're just getting started with some basic Python deployment. Although it wont really teach you anything about deployment other than some Git basics.

Suggest starting here: [http://www.deploydjango.com/](http://www.deploydjango.com/)

</comment><comment><USER5> not sure what you mean, but I have found nginx, uwsgi, pypy, psycopg2cffi a fast combination :-)

<comment><AUTHOR> Thanks! To be more clear, I meant approx. times (if possible) and which stack (as you've done) or PaaS was used.</comment></comment>


Show HN: Muon, a low-level programming language inspired by C, C# and Go - <AUTHOR> https://github.com/nickmqb/muon <comment><USER2> I have a criticism regarding how basic data types are named: [https://github.com/nickmqb/muon/blob/master/docs/muon_by_exa...](https://github.com/nickmqb/muon/blob/master/docs/muon_by_example.md#core- types)

Type names like long, short, char (and the oh-so-dear long long) are ancient cruft which shouldn't be used in a new programming language. They are confusing (as in, the answer to question: how many bits are there in your int, long, short depends on both arch and compiler) and since 70s we discovered it the hard way that they're non-extensible (multiple times, actually!). Similar for the fate of char in the post-ASCII world. C still keeps them for backward compatibility, but types like uint32_t defined in stdint.h is becoming common practice for new code.

The choices are also not compatible with C or Go, adding further to the confusion (Muon's int is 32-bit and long is 64-bit on all archs!), so even for C/C++ and Go programmers, the nostalgia turns into a pitfall. Having no familiarity with C# (not much of a Windows user since late-90s, and C# virtually doesn't exist for Linux/macOS people which Muon claims to be targeting), I looked it up, and it seems it's based on C#'s distorted and incompatible adoption of C89's data types.

Go applies the same custom to float/double as float32/float64 which makes it uniform. Go also defines int to be the size of the native integer register size on the target arch (which I like because this is what int supposed to mean originally, this was the common understanding when porting between C and assembly, although some may disagree after ~50 years of weird adaptations of it) which unifies uint and size_t, rendering size_t obsolete.

Ironically, Muon makes use of explicit number-of-bits suffix for one data type: bool32 (and there's no bool16 or bool64). I don't even know why one might have it as a basic language type.

I really hope he adopts a naming convention that is similar to C99's stdint.h or Go (which the author claims to be inspired by), or their shorter cousins u8, u16, ... used in Linux source code.

<comment><AUTHOR> Yup, the type names for integers (byte, short, int, long, etc.) are borrowed from C#. All primitives in Muon have a well-defined, platform/architecture independent size. Two exceptions: ssize and usize (machine word sized integers), which are mostly used for C interop.

C# programmers should feel right at home, but you're right that there is a very slight learning curve for others.

But, I hear you! I've personally worked a lot with C# which is why I chose the current names, but I realize that there are others that prefer the explicit names (u8, i8, etc.). I'll be adding a type aliasing feature soon, so anyone who wants to define their own alternative type names will be free to do so. At that point it may also make sense to use explicit names as the default.

<comment><USER3> Related, and very much a personal preference: Given that there will be no classes etc, isn't the use of camel case (and the not-that-different Pascal Case) for both structs and functions giving up a dimension of distinction?

The ClassCamel and snake_function_case split of Python and Rust is something I bikeshed about often - sooner or later 'IO', 'TCP' or 'MMbT' needs to be CamelCased and then it all goes downhill. Or C and C++ (the latter is also mentioned as an inspiration), which never used CamelCase. I think Java then used it purely to distinguish itself also by style from these direct and unsafe memory poking languages.

<comment><USER4> I'm surprised that Ada's Camel_Snake_Case isn't more common. It's no more verbose than snake_case but easier to read the words like a natural language and avoids acronym capitalization ambiguities, e.g. "XML_HTTP_Request" instead of "XMLHttpRequest".

<comment><USER5> I think it's uncommon because it is redundant - if you already have underscores to separate words, why capitalize?

Personally, though, I find casing to be a better way to split up words in languages which have . as a member access operator, for the simple reason that it makes property or method call chains more readable. When you have both dots and underscores in the mix, they both register up as whitespace first, and then you have to distinguish which is which. When it's just dots, it's clear where the boundaries are.

</comment></comment></comment></comment></comment><comment><USER6> This language looks incredible. I like the code examples and was really sold when I read its point number 2 about functions and no inheritance.

The only frustration I immediately notice is strong reliance on white space for syntax.

* This makes life harder in a modern world of various operating systems and high distribution. Some means of distribution mutilate white space. XML language design spent enormous effort considering for this.

* Line termination differs by OS. Now it's largely just posix vs Windows, but there used to be even more variance and there could be more in the future.

* Parsing around white space is severely misunderstood by people who do not write parsers regularly. Just this weekend I encountered unique white space syntax added into React's JSX to compensate for this that doesn't exist anywhere else in either JS or XML.

* As somebody who maintains a popular code beautifier I have had to learn the hard way that people really enjoy flexibility around white space. They deliberately use my software instead of, or in addition to, the popular software coming out of Facebook because of the flexibility my software allows. The bottom line for many developers is that code beautification can be fully automated and is better performeded by computers and should never be a factor when authoring code.

* code beautification is also highly subjective. Everybody has different opinions on beauty and easy to read. Providing the means to allow developers to exercise those opinions dynamically and automatically makes people happy. So long as it's just vanity the code stills executed and reads the same way.

<comment><USER7> >* code beautification is also highly subjective. Everybody has different opinions on beauty and easy to read. Providing the means to allow developers to exercise those opinions dynamically and automatically makes people happy. So long as it's just vanity the code stills executed and reads the same way.

No. Formatters have won. All code should be run through a formatter that contains zero options. The result is the how the code looks. Obviously languages with significant whitespace are more limited in what their formatters can do, but the point about it being subjective is irrelevant.

<comment><USER8> You forgot to mention why formatters would be superior. I do share your opinion, and the two reasons I can think of are (1) consistency and (2) short- circuits style discussions in code review.

</comment></comment></comment><comment><USER9> I like the emphasis on simplicity. I like the functions, the namespaces, the customizability of allocators, and more. Much respect to the author for creating Muon and sharing it.

What sets Muon apart from all other languages that I've personally tried is that Muon seems to have chosen a unique indentation approach. First, there is a double-syntax for blocks, because Muon requires block indents with significant whitespace (akin to Python) and simultaneously requires block open/close braces (akin to C). Second there is a free choice of tabs or spaces (but not both) and simultaneously a meta-markup line that a developer can put at the top of a file that enables mixing tabs and spaces.

IMHO these kind of whitespace choices seem small at first, yet eventually make open source development more difficult when teams make different choices, and when teaching examples make different choices. I'm a big proponent of `rustfmt`, `gofmt`, and similar tooling that makes it easy to align diverse teams from many groups.

<comment><AUTHOR> That's a fair point. It's the reason that I've marked significant whitespace as "experimental" in the documentation. Since the language is in an early stage, I think it's OK to try some slightly more experimental constructs for now. The feature does provide some nice benefits in terms of parsing robustness, which is really noticeable especially when working with live error feedback (i.e. language server, coming soon).

But rest assured, this is very much on my radar! If it turns out to be too much of a pain, I'll remove it (or make it opt in). Fortunately, because of the redundant braces the transition would be seamless: we can just drop the whitespace requirement.

<comment><USER10> I actually think that this is pretty close to the sweet spot. You make line breaks significant, but not the indentation level. The indentation will be inferred automatically from the braces. That way you can paste code that has the wrong indentation, hit save, and as long as the braces are balanced, the indentation will get fixed automatically by an auto-formatter.

I would be very interested to know how happy Python programmers are with the indentation level being significant. Did Guido ever say anything about it?

<comment><USER11> I worked almost exclusively in python for about five years and loved significant whitespace. It was one of the things I missed most when working in other languages. Now I work primarily in Haskell which has significant whitespace with optional braces and I still love significant whitespace and never use the brace style.

In practice I found the copy/paste problem exceedingly rare to the point that it has been completely a non-issue in both languages.

</comment></comment></comment></comment><comment><USER12> More interesting link, I think: [https://github.com/nickmqb/muon/blob/master/docs/muon_by_exa...](https://github.com/nickmqb/muon/blob/master/docs/muon_by_example.md)

Uniform call syntax and constructor functions go a long way in making usage more pleasant. I'm curious about "tagged pointers", though: is the only way to make a "union" by taking the reference of a bunch of things? Seems somewhat inconvenient. Finally, there seem to be a couple of opinionated requirements in the language, namely significant whitespace (made "worse" because you're already using brackets to define scope) and restricting generic parameters to single-letter names that seem like they're a bit _too_ restrictive.

<comment><AUTHOR> Correct, tagged pointers are just for pointer unions, a value union could be emulated using the transmute builtin function. A more general mechanism for discriminated unions is on the roadmap. It would have been nice to include it for the initial version, but I've been in stealth mode for too long already so really needed to launch ;).

Re: whitespace, see my comment here: [https://news.ycombinator.com/item?id=19599908](https://news.ycombinator.com/item?id=19599908)

I'm not worried about single letter generic param names being too restrictive. Having more than 2 or 3 type params usually implies some fairly heavy abstraction, which is not really in the spirit of the language.

<comment><USER12> My concern with generic parameters was that I might have situations where both of them start with the same letter so I have to assign an unrelated letter to one of them (for example, say a type generic over an Iterator and Index: one of them can be I and the other one would be…J?)

<comment><AUTHOR> Good point, I agree that's a bit of an awkward case. It's something I'm planning to keep an eye on. If this becomes a problem in practice, we can do something about it.

</comment></comment></comment></comment><comment><USER10> Very cool project! Thank you for taking the time to prepare this reveal so well. Examples and roadmap and all. Good job!

It looks like you started with writing an interpreter in C#, then wrote the compiler in the language itself. Which is a cool concept, I must say. I can't fully wrap my head around the practicalities, though. Do you compile the compiler with an older version of itself during development? Do you plan to update the interpreter as the language evolves?

 _Builtin serialization of any type_ Couldn't this be implemented with compile time evaluation in the standard library?

 _Variable redeclarations_ Why?

What about a build tool? Is an interface with the compiler going to be part of the compile time evaluation?

How long have you been working on this? Is this your first language project?

<comment><AUTHOR> Thanks for the kind words!

Correct, the initial compiler is built using the C# interpreter; the compiler can then be used to compile the next version of itself. Bugs and backwards incompatible language changes can be a problem though. For that reason, it's a good idea to keep the C# interpreter updated so there's always a safe path to bootstrap from.

Variable redeclarations may be useful in certain scenarios, e.g. redeclaring a variable of type Maybe<T> as T. You're right that serialization may be better implemented as a library using some kind of reflection capability, this needs some more thought. I haven't yet thought about the specifics of build tools, but I very much want to make it easy for people to write tools, and offering the compiler as a library will be part of that.

I started with the initial idea for Muon late 2017/early 2018. Initially, the plan was to create a higher level language (more like C#), but the more I iterated the more I realized that low-level was the way to go. Muon is my first large language project, though I've always been interested in compilers and have written some toy languages in the past.

</comment></comment><comment><USER13> Zig has had a bit of HN traffic in the past year. Any thoughts on how these two compare with each other?

<comment><AUTHOR> There's quite a bit of overlap with Zig (and maybe even more with V, which recently appeared on HN).

Some differences between Muon and Zig:

\- Syntax/ergonomics: Muon has return type inference, Go-like syntax/no semicolons, no "pub fn"s anywhere, reference type notation.

\- Memory management philosophy: Muon makes it easy to allocate memory, e.g. via "new" operator and fully customizable thread-local allocators.

\- Minimal error handling: Muon provides abandonment (i.e. panic), but no extra error handling features like Zig does.

\- Muon is a more minimal language in general: no meta programming (yet, at least), no async, no bit fields.

Zig is a lot more mature though, so I'm trying to catch up as fast as I can ;).

<comment><USER14> I'm jealous of that self hosted compiler! For Zig I've mandated that we have to forever maintain both the stage1 C++ compiler as well as the self-hosted one (which is not feature complete yet).

Also I have some bad news for you...

> One major caveat: after the above stages have finished, a C compiler still > needs to run to generate the final binary, which usually takes up the most > time. The LLVM backend will (hopefully) reduce this.

Nope. LLVM is about 80% of the time that it takes to compile Zig code. Other language authors have found similar results. See for example [http://pling.jondgoodwin.com/post/compiler- performance/](http://pling.jondgoodwin.com/post/compiler-performance/)

Anyway, Godspeed. I'll be watching Muon with interest :-)

Edit: one more question, if I may:

> No undefined behavior. Undefined behavior can lead to various, hard-to-spot, > bugs. In Muon, all behavior, including platform-specific behavior, is > defined.

> The compiler currently outputs C code.This means that we inherit C's > undefined behavior model, which goes against the goals listed above! An LLVM > backend is in the works which will avoid any undefined behavior.

> High performance. Strive for parity with C.

How are these things to be reconciled? First of all LLVM IR and C have basically the same undefined behavior model. In both C and LLVM IR it's possible to output well-defined code. But more confusing to me is how it's supposed to be fast, if everything is defined?

For example: [https://godbolt.org/z/7d8RLG](https://godbolt.org/z/7d8RLG)

        export fn add1(a: i32, b: i32) bool {
            return (a - b) > 0;
        }
        export fn add2(a: i32, b: i32) bool {
            return (a -% b) > 0;
        }

In this Zig code, we see 2 implementations of a function. `add1` has undefined behavior if `a - b` overflows. `add2` has defined behavior: wraparound arithmetic. The assembly code, with optimizations on:

        add1:
            cmp     edi, esi
            setg    al
            ret

        add2:
            sub     edi, esi
            test    edi, edi
            setg    al
            ret

You can see that the version with undefined behavior has 1 fewer instruction. How can you expect to compete with C (or Zig's) performance without undefined behavior?

<comment><AUTHOR> Hey Andrew, I really like your work!

In addition to the Muon compiler I'm still maintaining a C# interpreter which is used for bootstrapping (just so there's always a safe bootstrapping path), so there's some extra work there. The interpreter only supports a subset of the language, which means that I have to selectively avoid a few language features in the compiler. It's not too bad though.

I've been digging into LLVM over the last week, and I'm slowly coming to that conclusion. I'm tempted to add an x86_64 backend, but there's already so much work to do ;). Perhaps WASM would be an interesting target to add. It's new so it doesn't have too much cruft yet, and it may actually work as an intermediate representation (haven't looked at this at all though).

Re: edit. Integer overflow will be defined as 2-s complement wraparound. In your example, Muon would always emit the extra instruction, even in optimized builds. I must admit that I don't have a good intuition yet for how often these cases happen. If it means that Muon is leaving significant performance gains on the table, I'd be willing to consider adding a construct that would allow undefined behavior for very specific sections of a program to enable these optimizations. But by default, there would not be any undefined behavior.

<comment><USER14> Thanks for the compliment. I look forward to watching Muon's progress, and stealing all your good ideas! (I mean that in a friendly way; both Zig and Muon are MIT licensed and of course Zig's ideas are all up for grabs too)

<comment><AUTHOR> That's entirely fair game, good luck to us both! ;)

</comment></comment></comment></comment></comment></comment><comment><USER15> One thing that is missing from Go is computation expressions (in C# 7.0 async/await was generalized to a computation expression). Computation expressions are extremely powerful feature in F# which introduced the idea of async/await. If it is generalized then you can properly handle code failures better.

In the Go community they have found returning the result/error tuple is tedious enough that people don't properly handle their errors. I would argue this is because of the lack of generics and computation expressions.

In F# I can do something like this:

      let result : Task<Result<MyObject, Error> = asyncResult {
        let! validatedObject = validateObject object
        let! dbObject = GetSomethingFromTheDatabase object
        return dbObject
      }

      doSideAffectLastCodeAndHandleAnyErrors result

This lets you create little DSLs and code that you can handle errors in a central location and in your main code just get the work done without thinking about it. Makes for a really great workflow.

See also [https://github.com/louthy/language- ext](https://github.com/louthy/language-ext)

</comment><comment><USER16> This looks promising. We haven't seen a lot of new languages lately that could turn into viable alternatives to C. Muon binaries don't seem to have a runtime or other dependencies so it looks like a module written in Muon can be statically linked into an existing C/C++ project. Pretty cool.

<comment><AUTHOR> Yes, one of the goals for Muon is to make it easy to use Muon code from another language.

There's a recent wave of new languages in the same spirit as Muon, like Zig, Kit, Jai and V (the last two have not yet been released). But since they all have no/minimal runtime, it should be relatively easy to reuse libraries between them.

<comment><USER17> I noticed Rust was not your list of languages. Is Rust fundamentally different then these languages? If so, why?

<comment><AUTHOR> Ah, good question. Rust could definitely be in that list as well! It's a more mature language (so that's why I didn't mention it in the list), but conceptually it very much fits.

<comment><USER18> Seeing the original list, my guess was that it was no gc, with a small runtime - and the immediate question then was - how is this different/better than "D as a better C"?

<comment><AUTHOR> The main difference is simplicity. D has a lof of features, like classes, inheritance, exceptions, properties, etc. Muon is a much simpler language that specifically avoids all of those things.

</comment></comment></comment></comment></comment></comment><comment><USER19> I guess a killer feature would be an integrated "package" manager like .NET's NuGet. Being able to easily "import" C dependencies that way, along with other projects written in Muon could make life much easier. I'm thinking like Rust's Cargo, but without the nonsense of having to build all the dependencies oneself which takes time and storage space - just using a pre-built versioned release would make a massive difference to workflows and reduce friction. Is anything like this in the works/on the roadmap? (I didn't see it but maybe I just missed it, while browsing on mobile ;))

<comment><AUTHOR> Short term, I have some tools planned for automatic generation of foreign function definitions based on .h files (currently you have to do this by hand, which is tedious and also somewhat error prone).

Long term, I agree that a package/dependency manager would be great! There's already so much work to do though, so this will unfortunately be out of scope for the near future.

<comment><USER19> Understood, thanks :) it'd be great to have an issue on GitHub I could subscribe to for notifying me when your auto FFI generation tool is ready, it would give me a greater incentive to try Muon ;)

<comment><AUTHOR> Done :)

[https://github.com/nickmqb/muon/issues/2](https://github.com/nickmqb/muon/issues/2)

</comment></comment></comment></comment><comment><USER20> I haven't looked too deep, but this language seems to have a lot of features and goals in common with Zig, are the two projects in any way related?

edit: just saw your relevant comment :)

</comment><comment><USER19> This looks to have been well thought out. I generally shy away from C/C++, I prefer the GC approach of C#. (I have also coded a little Rust but find it challenging.) But looking at the docs and examples, I'm very tempted to try Muon! I like the lack of undefined behavior very much, even if it only transpiles to C atm; I look forward to the LLVM target.

</comment><comment><USER21> This is a really interesting project and I like where you're taking it. I've played with Nim for a number of years, and I really like the no-runtime aspect of Muon and the flexibility and simplicity that you've created with it. Unlike many others in this thread, I like the whitespace decisions you've made, though I go in the opposite direction - have you thought about making braces optional?

Your roadmap looks great as well. Have you considered any of the following?:

\- Lisp-style Macros (e.g. Macros as functions that transform an AST object) -- this would also answer many of the preprocessor questions you had, especially if you can specify compile-time behavior (like in zig)

\- Github-based decentralized package management system

\- Owned pointers memory management options

<comment><AUTHOR> Thanks! I don't think we should lose the braces. Braces help avoid mistakes when refactoring/copying/pasting code, and they make the language look more familiar to people coming from C-like languages, which I think are large enough advantages to justify having them.

I'm considering adding some meta-programming/reflection capabilities in some form, if they don't increase the complexity of the language too much. Lisp- style macros would be a possible approach, compiler plugins would be another. The latter approach might be easier to implement though.

A package manager will be out of scope for at least the near future, but long term it would be great to have one!

Re: owned pointers. I'd recommend that people look into more coarse grained memory management strategies first (e.g. arena allocation), and use one of those if possible. However, these strategies definitely have their limitations, which is where alternatives like owned/shared pointers could come in. However, to implement a "proper" owned pointer, e.g. an alternative to std::unique_ptr<T>, we would need destructors (which Muon will never implement) and move semantics (of which there is a chance that Muon _might_ implement it, but probably not anytime soon). With move semantics we can perhaps create a lighter weight owned pointer that is still useful; I'll have to experiment a bit to see how that would work out.

</comment></comment><comment><USER22> What about threading and a corresponding memory model?

<comment><AUTHOR> Right now, you'd have to use OS-specific threading APIs for that (via foreign function declarations). I'm planning to add threading support to the standard library to make it easier to write cross-platform multi-threaded code. Also on the roadmap are basic concurrency primitives, like channels.

I haven't decided on what I will do in terms of a memory model: likely, I will add acquire/release constructs to the language, which should be enough to implement things like lockfree data structures as libraries.

</comment></comment><comment><USER23> I feel like there is a lot of lessons that one MUST take into account if they want to create a new PL. Not getting inspiration from Rust or F# should be a mistake.

Sadly Rust also didn't take inspiration in Go's std library.

<comment><USER24> > Sadly Rust also didn't take inspiration in Go's std library.

golang's stdlib is nothing special, and even has bad practices, such as weird casting to arbitrary interfaces and hoping it does the right thing.

<comment><USER25> I think parent refers to Go std library comprehensiveness.

While Go comes with batteries included, Rust leaves up to community libraries to fill in the blanks for lots of basic functionalities such as regular expression for example.

<comment><USER24> golang is not that special in that regard either way then, see: Java, Python, C#, etc.

<comment><USER25> I don't think your parent said Go's std lib was special. Just that Rust could have learned from it.

</comment></comment></comment></comment></comment><comment> F-0X I need to get this gripe off my chest. I want types on the left, and not optional.

I read the main function first. I saw that call to countOccurances, without an argument. I was confused how it was going to count occurances if it didn't know what it was looking for. Then I noticed the implementation of this method above.

Had there have been a type of Map<string, int>, I'd have reasoned what it does easily.

I hate type inference, it does not help.

<comment><USER26> Here the problem seems to be especially that the _return type_ is infered. Usually the return type of a function is regarded as belonging to the functions interface and should be accessible without reading the implementation.

<comment><AUTHOR> Muon always allows you to specify a return type for clarity, though. The key point is that you have the option not to. Not all code is created equal. For library functions that are used by many others it is probably a good idea to add explicit return types, but if you're quickly iterating on a prototype it can be nice to not have to specify them.

I should also add that a language server will really help here. The tooling can just tell you what the return type of a given function is. I can also imagine building some tooling that automatically adds return type annotations if they are missing (which would be quite easy to build). Such a tool could be used as a commit hook to enforce a certain coding standard for teams that would prefer this.

<comment><USER5> The problem is with contract versioning. If you're writing a library, and your return types are derived rather than explicit, it's way too easy to break your clients by changing the type without even noticing. So maybe require it for public interfaces?

<comment><AUTHOR> I'm not yet convinced to make it absolutely required, but some kind of warning/linter message would definitely be useful for this.

</comment></comment></comment></comment></comment><comment><USER27> In the 'Glimpse of Muon' example, how does the Map::getOrDefault() function work? Shouldn't it accept 2 args: a key and a default value (if the value associated with the given key is not found)?

<comment><AUTHOR> Sibling comment (granzymes) is correct, also see implementation here: [https://github.com/nickmqb/muon/blob/d557c18d2dcd3fc15a7a7a6...](https://github.com/nickmqb/muon/blob/d557c18d2dcd3fc15a7a7a6ed6dbfa0fc76f400b/lib/containers.mu#L487)

In Muon, you can always add more functions to an existing namespace, so if you wanted to have a function with that behavior you could add it.

</comment></comment><comment><USER28> > "Data oriented. Just functions, structs and enums. NO: classes, inheritance, > properties, etc."

Does it mean C is a data orientated language?

<comment><USER29> Yes. Many people who go towards data oriented designs (not to be confused with data driven) implement them in C (or very C-like C++).

</comment></comment><comment><USER29> I like it in general, but i have a few comments:

1\. "Data oriented. Just functions, structs and enums. NO: classes, inheritance, properties, etc."

I think you should allow for struct "inheritance", at least in an Oberon-style manner. There are many cases where having a common "head" between structs is useful (e.g. widgets for a GUI toolkit, object types for a scripting language, etc).

2\. "Memory is initialized to zero. Array bounds are checked (can be turned off where needed)."

It is not clear from this, but how can both be disabled in a case-by-case basis? For example in D local variables are initialized to zero by default but you can do something like (IIRC): Foo foo = ? (or = nil, i do not remember) which the compiler interprets as "do not zero-initialize this). Similarly can i do something like array[foo] (bound checked) and array{foo} (non-bounds checked, imaginary syntax)?

3\. "An LLVM backend is in the works which will avoid any undefined behavior."

LLVM inherits most of C's undefined behavior, so it will not solve your problem there - you'll need to explicitly generate code that works around undefined behavior. This is a problem that the Free Pascal developers also faced (the language has much less undefined behavior than what LLVM assumes).

4\. I am not fan of the language enforcing code style (e.g. "The name of a type parameter must be a single uppercase character." and significant whitespace)

5\. Nitpick, but "List<T> struct #RefType { dataPtr pointer count int capacity int }" is a dynamic array, not a list (also, an example of why significant whitespace isn't a great idea :-P)

6\. "Type inference for function return values and locals"

I actually prefer to explicitly see the data types passed around, it helps better understand what exactly the code is doing (not just the algorithms, but also the data types which are important) without needing to have too much "implied code" in my mind (i.e. with explicit data types i don't need to "know" that "foo" returns "bar" when looking at its use in a diff (or any other non-syntax highlighted, non-code aware code viewing context), i actually know it because i see it in the code).

(FWIW for this reason i also dislike auto in C++ and similar constructs in other languages - you save a bit of short term typing now, for a lot of long term headache later)

7\. "fgets(s pointer #As("char _" ), size int, stream pointer #As("FILE _")) pointer #Foreign("fgets")"

I think you need to make your type system good enough to natively express C types, otherwise the string-based pseudotypes will bite you hard later when you want to move away from using C as a backend.

8\. I do not see any mention of a preprocessor, how is code supposed to IFDEF stuff (like, e.g. a commercial program that needs to have something like IFDEF DEMO, or a source file that needs to behave slightly differently if linked as a static library or dynamic library, or the use of two APIs like e.g. IFDEF LINUX, IFDEF WIN32, IFDEF OPENGL, IFDEF VULKAN, etc) or work around language limitations (like the non-availability of inherited structs mentioned above that C programs often work around by using a macro that defines common elements for structs)?

9\. "Number literal suffixes"

I'm not fan of the underscore in the suffixes and also i'd avoid the uppercase L and introduce an i (that is 'nop' but could be useful for automatically generated code via scripts and/or macros).

There are other minor nitpicks, but i'd need to actually check it in practice to write more :-P.

<comment><AUTHOR> Thanks!

1\. Right now, you can emulate this with the transmute builtin function. Not yet sure if the additional complexity of this feature would be worth it.

2\. Array bounds checks can be avoided by using the unchecked_index builtin. Uninitialized locals are not yet possible, but I think it makes sense to eventually add a construct to allow that, for situations that need every last bit of performance.

3\. I've only started to look into LLVM recently, thanks for the heads up.

4\. See my comment here: [https://news.ycombinator.com/item?id=19599908](https://news.ycombinator.com/item?id=19599908)

5\. C# programmers would like to disagree with you ;). Note that the formatting issue is not due to significant whitespace, as you'd have the same issue writing up a Golang snippet.

6\. Editor support (specifically, language server) should help a lot here.

7\. The string based types are only used for inserting the right cast to make the C compiler happy, so they should not be an obstacle.

8\. Compile time evaluation can be used for some cases. Adding a preprocessor comes with its own set of tradeoffs, haven't yet decided what to do there.

9\. A lowercase l looks a lot like a 1 in many fonts, hence the uppercase L. Will consider adding an i suffix.

<comment><USER29> 1\. The point of this is to avoid repeating the common headers and have the type system validate that a pointer/reference of a subtype is compatible with its parent type (in C you'd need to typecast which can be dangerous).

5\. I also tend to name dynarrays as lists, but in this case you have both List and Array and the only difference seems to be that one has a capacity while the other doesn't. Having both can be a bit confusing when you actually wanted a (linked) list.

6\. It will only help when inside the editor, hence why i explicitly wrote "when looking at its use in a diff (or any other non-syntax highlighted, non- code aware code viewing context)".

8\. None of the examples i mentioned can be solved with compile-time evaluation (except some cases of IFDEF DEMO) since they change what code is actually compiled (e.g. if you want to use an API that may not even be available on a target - like e.g. DirectX on Linux) or generate code themselves.

9\. I do not think it makes much sense to worry about that, there are fonts that have 0 and O look the same, let the user fix their fonts, do not punish those who use unambiguous fonts with inconsistency. Trust your users.

<comment><AUTHOR> 1\. That's true, I didn't mean to imply that transmute is equivalent, there would definitely be benefits to the feature you're suggesting. But it also brings additional complexity of course.

6\. Sorry, I totally missed that part of your comment! A language server won't help in that case. At least wrt to return types though, you're always allowed to specify them for clarity. I can imagine building some tooling that automatically infers and adds explicit return type annotations if they are missing. You could run this as a commit hook if you wanted to enforce that as a coding standard.

8\. Right, I was referring to the IFDEF DEMO case (assuming it's used to implement straightforward feature flags). I agree that for the other cases that you mentioned we'd need something else. For now, for some situations, you could compile with different files (e.g. gfx_opengl.mu, gfx_directx.mu, etc.), though it's a pretty crude solution, especially if you want to combine conditions (e.g. Linux + OpenGL). Definitely thinking about this.

</comment></comment></comment></comment><comment><USER30> The last thing I'd want is a heavier and less stable Electron. Do pointers decay automatically in Muon after 2.2 us?

On a more serious note, as a particle physicist, I hope this trend of naming software after fundamental particles ends soon...

<comment><USER16> Given that particle physicists named their particles "up", "down", and "strange" I don't think they have the high ground here.

<comment><USER31> Ouch. I think you'd best not argue this one, cozzyd.</comment></comment></comment>


Lorem Picsum, death by a million pixel-gigabits - <AUTHOR> https://dmarby.se/blog/lorem-picsum/ <comment><USER2> Image resizer scaling is one of the more interesting problems I have worked on in the last 10 years of so. I was part of a small team that designed and built the resizer that powers the nine.com.au network of sites. Modest by USA standards it gets close to hundreds of millions of views a day across the whole network.

We ended up using shared nothing architecture. The whole thing ran on 6 T2 large AWS instances using a slightly modified version of Thumbor where if you rotated the key the disk cache would be shared so avoid a large scale cache invalidation. It worked quite well and we rotated the key every few weeks.

Things I learnt.

Pretty much all image resizers have the same performance as all the good ones call out to C libraries in the end. Akamai (the CDN we used) despite having site-shield on would still hit the back-end ~100 times for the same image on occasion as I suspect all of the whitelisted machines could request the same image if their internal sharing didn't kick in fast enough.

Long tail images were the ones that brought the resizer to its knees. The hot images would quickly enter the local disk cache and were not an issue. Purge the whole cache though and the long tail images would quickly overwhelm the instances.

The last thing I learnt was to have a backup cloud-front ready to flip over to. At one point Akamai had issues and the resizer was facing origin load. It capped out at about 300 RPS which couldn't keep up with what was expected. It got even worse when the T2 instances ran out of credit. Spinning up cloud- front solved that issue once the DNS flip kicked in.

One good thing to come out of it was I helped write the C# thumbor library as we had one site that was using C# and nobody could move over to the new resizer without it.

<comment><USER3> I once tried to pitch a one "mobile ecommerce website as a service" company in Vancouver to go for GPU based image rescaler at around 2011.

A very dumb proposal: no caching, resize on the fly, the gpu has many gigabits of resizing performance for as long as JPEG is involved. One GPU works in decoding with VDPAU, one in encoding with CUDA.

That knocked down any google app engine based "elastic" service on economic basis, but the catch is that you have to send that GPU resizer to every colo. That did not work out as with google app engine you were getting access for google's POP network for almost free, and they were already paying for gigantic amount of CDN traffic.

\----

When I worked as sub-subcontractor for the Alibaba's RDMA wired DC project, there was one demo by another team where they got DSP devs involved and they got a 10GB/s JPEG transcoders for under 100W. I think, most of power budget was going to the FPGA that was linking it all with the NIC :/

An expensive toy, but it again demonstrated to me just how powerful is the "lockdown" power of all those "cloud" companies. You can not buy anything like this on the open market.

Imagine what it could've been if they offered something more cash worthy over the RDMA there.

I said long ago that the killed product during the Bitcoin boom was not the mining itself, but leasing and renting the rigs. Your capital costs get covered near instantly, and you can cash out the next week. I believe that all that "cloud" thing will eventually follow this path.

<comment><USER4> This is a (rambling) underrated pro comment and you should turn each of these little vignettes into blog posts.

</comment></comment></comment><comment><USER5> More interestingly, the github repo is just a wonderful example of a fully built application using modern techniques in a microservices architecture: [https://github.com/DMarby/picsum-photos](https://github.com/DMarby/picsum- photos)

It's so hard to always find how all the pieces fit together and this repo has it all. Really impressive.

<comment><USER6> Is it really a microservice architecture? It looks like it is a web application with a frontend, backend api and normal modules/packages for the functionality?

</comment></comment><comment><USER7> Funny timing, I was just looking at this over the weekend.

Another option if you prefer cat pictures: [http://placekitten.com/](http://placekitten.com/)

</comment><comment><USER8> I wonder how much it would cost to do a similar service and just upload all images and dimension possibilities to S3 + use cloudfront cdn.

<comment><USER9> Well let's limit the possibilities to any image between 1x1 and 1920x1080.

Calculating the number of possible images is simple enough. It's just 1920*1080, or 2073600 images.

Now what's the average size of each image? Well the average of each dimension is half of the full size, so the average area should be 1/4th to of a 1920x1080 image, or 518400 pixels per image.

So in total, we need to save 1074954240000 pixels. Now how many bytes does each pixel take to store? I really don't know. You can save them as 8bit RGB PNG images and assume each pixel will use 24 bytes. You'd add some for headers, and remove some to account for compression, but let's ignore that for now. Maybe someone else can chime in. But for now we need to store 25798901760000 bytes, or about 23TB.

Not impossible, but sounds needlessly expensive.

<comment><USER10> I'll bet that most image requests will be within certain parameters. 2^x by 2^y. So you could probably pre-cache most real-world image sizes, and leave dynamic generation for 1-offs.

<comment><USER11> AND you could try to figure out how to do that beforehand, but some LRU-type cache solves the problem without any prior knowledge of what those sizes are.

</comment></comment></comment></comment><comment><USER12> One of the mysteries of my career is that everyone seems to be using Varnish except for the companies I work for.

We are always using some other solution. Like pure CDN or our own poor man's S3.

</comment><comment><USER13> Is there any economical margin in running a similar service?

People do it just for fun or have some monetisation strategy?

</comment><comment><USER14> nice to see a digital ocean site with some popularity not getting nuked or otherwise blacklisted.

<comment><USER15> Why would it get nuked or black listed ?

<comment><USER16> DO has sometimes been accused of overselling capacity and then terminating services when they are fully used. I have never actually heard a first-hand account of this, but I assume that is what the parent is talking about.

<comment><USER17> I'm not sure if this is what you're talking about, or if the scale just wasn't a problem, but anecdotally I've (accidentally) pegged a 5$/mo instance for at least a month without any issues.

EDIT: I do know that DO/Linode/(maybe vultr) have blackholed IPs during large scale DDOS attacks, simply because they don't have the infrastructure to mitigate it, and you affect their other customers.

</comment></comment></comment></comment><comment><USER18> I wonder how much it costs them to maintain this service.

<comment><USER19> I run [https://dummyimage.com](https://dummyimage.com), the first placeholder image service which has been online since 2007. I use a 1GB, 1vCPU instance from DreamCompute costing $6.00 per month. That's it.

To be fair dummyimage.com doesn't do any sort of image reading or resizing. Source doe at [https://github.com/kingkool68/dummyimage](https://github.com/kingkool68/dummyimage)

<comment><USER20> What kind of traffic does your service attract?

<comment><USER21> For reference: I do about 7GB of image traffic/day for placekitten (a similar service) for about the same cost ($6/mo). I _do_ resize images.

<comment><USER11> I love placekitten. Thank you for this service!

</comment></comment></comment></comment></comment><comment><USER22> Awesome, its one my fav places for random images :D

</comment><comment><USER23> Seems like a hell of a lot of engineering effort for something that could easily be replaced by a gradient...

<comment><USER24> It's a good exercise to test these technologies and how to run things at scale.

A real image from third party is valuable since gradients don't have onload events for example.

<comment><USER25> An image gradient then. 1 px wide perhaps, or high. Few problems resizing it (even on client) and it should be reusable.

<comment><USER24> I think the point is not to get away with the scaling problem.

Here's one service I used in a project's development mode:

[https://dummyimage.com/2500x2000/000/09f.png&text=HackerNews](https://dummyimage.com/2500x2000/000/09f.png&text=HackerNews)

In the production build I changed it to the real host.

</comment></comment></comment></comment><comment><USER26> Why would a stateless service need a database?

</comment><comment><USER27> nice to see a familiar project still going strong. :)</comment>


Get Vista's Best Features in XP - <AUTHOR> http://lifehacker.com/389735/get-vistas-best-features-in-xp <comment><USER2> I was thinking, before I clicked the link, "What are Vista's Best Features that an XP user would want?" I couldn't think of any. After reading the article, i remember that SuperFetch and ReadyBoost are definite improvements as are the improved startup/shutdown times. Things like Aero and the other junk listed are not things people care about so they don't count in my book.</comment>


Show HN: Omnihash, a multi-hashing utility - <AUTHOR> https://github.com/Miserlou/omnihash <comment><USER2> Similar to 'rhash' [1], but in python. I like it!

Some feedback:

\- What is the algorithm called 'SHA'? Is it the algorithm now commonly called 'SHA-0' [2], specified in NIST's FIPS PUB 180 (without revisions), published in 1993, and later withdrawn in FIPS PUB 180-1 in 1996 where SHA-1 was offered in its stead?

\- I like your thorough coverage of all the myriad varieties of CRCs. In many casual usages, the differences between CRCs are glossed over, and I like that you chose the rigorous approach.

\- I'm happy that you included SHA-3 and BLAKE2.

\- Consider including support for all of the FIPS 180-4 algorithms. The ones missing from this implementation are 'SHA-512/224' and 'SHA-512/256'.

[1] [http://rhash.anz.ru/](http://rhash.anz.ru/) [2] [https://tools.ietf.org/html/rfc6194](https://tools.ietf.org/html/rfc6194)

<comment><AUTHOR> I didn't know about rhash! Cool! This might be easier to install and use though.

All of the first hashes come from Python's "hashlib.algorithms_available", so that's a really good question. Your guess seems like a good one.

I haven't found any 'SHA-512/224' and 'SHA-512/256', or any Skein function implementations in Python! PR's welcome!

</comment></comment><comment><USER3> You include things like DSA and ECDSA, which are not hash algorithms, but signatures. Is a signature being computed internally? If so, with what key?</comment>


Derek Sivers on E-Myth Revisited (2004) - <AUTHOR> https://sivers.org/book/EMythRevisited <comment><USER2> After having read E-Myth Revisited, I'm revamping how I work "in" versus "on" my business. I'm documenting the various activities and roles I fill, and preparing to hire help where I feel someone else could fill that role.</comment>