HNHacker News
TopNewBestAskShowJobs

framp

34 karma · joined August 13, 2010

submissionscomments
framp··on Show HN: PSX Party – Online Multiplayer Playstation 1 Emulator Using WebRTC
This is very neat but gamepad mapping can't be configured and the browser default "standard" mapping doesn't work very well (at least with my Xbox one controller).

If you visit chrome://flags you can enable "Restrict gamepad access" which will disable the default controller's mapping.

Incidentally, I recently wrote a small crossplatform gamepad mapper you can use: https://github.com/framp/joystick-mapper/releases/tag/0.3.0

Configuration for psxparty here: https://github.com/framp/joystick-mapper/blob/master/example...

framp··on Ask HN: Most sustainable diet long term?
A few generic tips:

- Don't think of it as a diet, do something that could theoretically sustainable for the rest of your life

- Learn about food and how it affects your body (that's an important knowledge investment, given you'll be eating for the rest of your life; nutrition is a complex field and studies are not super reliable, but you start to notice patterns with time)

- Try food replacement powders (or bars) to replace unhealthy meals with something more balanced (I use Huel but depending on geography)

- Eat enough proteins (how much depends on your goals and your body) - with some exercise, this will help you build muscle

- Sleep plenty

- Split your meals (and your proteins) across the day to avoid hunger

- Get a reliable scale and weight yourself at the same time every day

- Start with an online calculator (like iifym.com), try to eat that amount of calories for 2 weeks and monitor your weight

- Keep track of calories / proteins / fibres / sugar / saturated fat / salt in the food you're eating so as to reach your goals

- Do strength training to build muscle instead of tons of cardio (this will help you to build muscle, which will increase your metabolism) - I would still do some HIIT cardio for your heart's health

- When you reach a plateau and you're not losing weight anymore I'd recommend adding more cardio instead of cutting calories (mainly not to lower the amount of protein intake)

- Once you're happy with your body fat percentage I'd go back to strength training + little cardio.

On training:

Body-weight training is perfectly fine even if you can't lift weight (even though if you have health concerns you may want to consult your doctor, as body weight exercise can still be problematic).

This can be a good starting point: http://www.startbodyweight.com/p/start-bodyweight-basic-rout...

Once things get easy you can decide if you want to improve your endurance (by going for sets with high reps) or your strength (by going for sets with low reps and adding resistance - like weights).

My story (hoping you'll find something useful):

I recently lost 16kg from 84kg to 68kg over 4-5 months going from roughly 24% to 13% body fat. I may have lost some muscle but very little - my strength and my measurements seem to be increased.

What I do exactly on top of following the above tips:

- I'm on Huel 95% of the meals and "cheating" every once and then when I'm missing chewable food or for social eating (Huel helps because you know exactly how much you're eating)

- When eating food which isn't Huel I'm roughly calculating how many calories would that be and how many proteins - and then I'm adjusting my Huel meals or replacing some with protein powder

- I eat every 2 hours, 6 meals a day, from 10am to 8pm (fasting for 14 hours, which is something I've accidentally been doing all my life).

- For the first 3 months of my journey I did only strength training (push-ups, pull-ups, squats, various core exercises)

- In the last 2 months I added 1 hour of cardio per day as I wasn't losing weight anymore and I still wanted to burn more fat.

Future plans:

I plan to lose some more weight and then focus on building muscle + little cardio by going 200 calories over maintenance and cutting every once and then.

I already tried in the past to build muscle with 600 calories over maintenance and I definitely put too much fat on.

My workout regime is going to stay the same and I'll keep on eating mainly Huel (unless I create / find a tool which will help me create a diet as structured and precise as Huel and deliver the ingredients to my door).

Best of luck on your journey!

I'm not affiliated to any of the products / websites mentioned.

framp··on Airtable Became a Unicorn by Reinventing the Spreadsheet
It wasn't any different in 2010 in the majority of the world, for most people; the 700k funding comes from a special location / network.
framp··on Elementary OS – Fast, open, privacy-respecting replacement for Windows and macOS
I can't speak for GTK as I don't use it much, but there are Qt engines that let you configure all the options without needing to write a theme.

I never went that way as I prefer to just use a theme designed by someone who knew what they were doing.

framp··on YouTube download sites are “biggest piracy threat” to music industry
That doesn't look like a reputable source for legal advice.

It is certainly violating YouTube terms of service.

Given the video is available publicly, copying the video is what happens every time you watch it from your computer.

The conversion point doesn't apply as YouTube videos are mp4 and you can just play a mp4 as audio.

I'd argue it's covered by fair use but I'm not a lawyer.

framp··on Show HN: Vuido builds desktop apps using Vue.js without Electron
There is also just JavaScript in Qt which is more mature and probably similarly - if not better - performing.

https://doc.qt.io/archives/qt-4.8/qdeclarativejavascript.htm...

framp··on NirSoft Freeware (2008)
I think the issue is that his freeware utilities were used as part of spyware by third parties.

AV back in the days were mainly all blacklists of known actors and a few tricks (eg: when the executable was obfuscated with a compressor like UPX or using some more advanced techniques)

framp··on How Discord Scaled Elixir to 5M Concurrent Users
Really lovely post!

I wonder how Cloud Haskell would fare in such a scenario

framp··on A day without JavaScript
If I recall correctly there was an old version of Google Maps which worked without JS. It was before they replaced the old snappy and functional Google Maps with the bloated and slow app we have now.
framp··on A day without JavaScript
You could use a link with a background-image

<style>.vote-42:active{ background-image: url(/api/vote/42) } </style> <a class="vote-42">Vote</a>

framp··on Intel Haskell Research Compiler
This is the original paper from 2013: http://www.leafpetersen.com/leaf/publications/hs2013/hrc-pap...

GHC can use this intermediate code (a-la LLVM) to produce executable. The idea is to create an intermediate code which is better optimised for their CPU.

framp··on Why You Can't Say
Why should it be disturbing?

Being precious is a relationship between two entities, where one of the two must be sentient. Considering the phrasing "Human life is a precious thing", my assumption is that the reader (or myself) is the one who perceive human life as precious.

To one self the only precious life is your own. This is baked in all of us by default, our genes make us value life. But what's the value of other people's lives?

We can evaluate other people's lives value with the benefits they bring us. Therefore, the people closer to us will have more values - because the influence our reality. What they do and how they interact with us also influence their value. If you were to save someone for a fire, you would probably give more value to your son than some stranger.

This maps to reality quite well - just think about how shocked are people for accidents happening in their own hometown and how little they care for people dying in a far away country.

It's obvious that people close to use will be worth much more - but let's assume we want to get more granularity on strangers. How can we evaluate human life which is not related to us? We can rank them by the value they bring to society, as that value is something you're going to benefit from as well. Let's say you're about to run over some people with a car and you can't avoid this scenario. You can just pick which ones to kill. Would you prefer running over a man or a fat man? A man or a woman? A man or a kid? A man or an old man? I won't get into considerations but you can think in term of cost for the society (pensions vs taxes vs health), the ability to procreate, the ability to benefit from more advanced education in the future.

But let's try to take a step further, let's say we want to employ people to solve a task. Let's become a business. Their value can be seen entirely related to how well they can solve this task.

My view is that we're just really advanced machines without any will or possibility to stray from our predefined path. Genes are our codebase, the environment we live in is our continuos input, our actions are a continuos output which feed into the environment itself - feeding back in our input.

We're just really complex processes running. When somebody dies is just like a process who was accomplishing some work that won't continue anymore. What could have that process done? If we had a state of all the particles (or strings, or whatever your smallest unit is) in the universe, we could theoretically calculate all the possible states, maybe changing the conditions which could have brought our process to die, calculating what it could have achieved.

Creating machines as advanced as ourselves is just a matter of time and technological advancement. Once we are able to create trained life at will and in a faster timespan (because everybody can do that in 9 months + 30 years of training), the value of life itself would dramatically decrease. Let's call them robots.

Why should I bother hiring free people when I can just create and kill some robots? And as an extension, why should I be able to kill robots but not people? What even is the difference at this point?

This would essentially bring the value of all the people we don't care about to whatever the cost of creating an equivalent skilled robot is. Which, given robots can create value themselves, is probably going to quickly get to zero and crash the entire economy. It would be like having slavery with infinite slaves.

Is human life a precious thing? Yes. For now.

framp··on UK Home Secretary says encryption on messaging services is unacceptable
Deniable encryption

https://link.springer.com/chapter/10.1007%2F978-3-540-77566-...

framp··on VS Code uses 13% CPU when idle due to blinking cursor rendering
This is wrong. The world on the other side is so much greener.

https://wiki.qt.io/Handling_PDF#Using_QtPDF

framp··on How we secretly introduced Haskell and got away with it
Glad to see Haskell used in production.

It's kind of funny that build reproducibility (which was a major issue before stack) is one of the strong point.

I wonder if, for your project, using cloudhaskell would have been more appropriate. I have a feeling some of the problems you found could have been solved with that.

framp··on British Government loses Article 50 court fight
Because it's an advisory referendum. Also, UK is not a direct democracy.
framp··on British Government loses Article 50 court fight
I think you're example is misleading.

The Queen becoming a dictator is completely different from the Parliament doing what it should do.

To keep it simple: This is a democracy, which means every citizen is giving away his/her power to a selected few.

The Parliament - the people you voted, more or less directly - has to act.

An ADVISORY referendum is going to be used as an ADVICE. The Parliament has to act - considering the people's will AND what makes sense for the country.

This mechanism is in place to protect you from direct democracy - which doesn't make sense because: A. People are easily manipulated - especially in a world where TV and internet make spreading information really easy B. People can choose to vote randomly, erratically C. People can have a different level of understanding on delicate matters - depending on their education and background

framp··on The careless errors of credit reporting agencies
> In the US they don't trust you per definition and instead you have to prove that you are good with money by basically creating debt and then paying it off.

You have to do the same to get a mortgage in UK. And that's why I need a credit card

framp··on Asciinema 1.3 Switches from Go Back to Python
Both gets fast really soon.

Have you ever checked out Maybe (http://learnyouahaskell.com/a-fistful-of-monads#getting-our-...)?

framp··on ReactJS vs. AngularJS
Didn't now Top Gear started reviewing JS frameworks.
framp··on Async and Await
The problem with async is that you have to wrap everything in try/catch
framp··on The connection between modern slavery and ecological disaster
Robots and automation?
framp··on Idris, a language that will change the way you think about programming (2015)
Great article and really interesting language!

I wonder how Idris is going to be affected when Dependent types come to Haskell as well (announced at last ICFP)

framp··on Thoughts on Haskell
Haskell is not a perfect language - but I don't really agree on the points raised by the author.

The things I don't like are:

- String vs ByteString vs Text - seriously tired of csing everythin

- Lazy by default is fun - but makes everything harder to optimize. What would happen if Haskell were strict? https://nikita-volkov.github.io/if-haskell-were-strict/

- Records are not namespaced - https://nikita-volkov.github.io/record/

framp··on Things men have actually said to me at tech events
This happens everywhere. Tech is nothing different.
framp··on 10 API tools released in 2015 you might have missed
That's a comprehensive list

- Really loved gelato personally

- Still wrapping my head if I should go the kong route or not

- Blockspring seems really cool, even for developers, definitively going to try it out

framp··on PostgREST – REST API from any PostgreSQL database
I'm using hapi + sequelize or loopback actually. Zazler looks interesting, thanks for the link!
framp··on PostgREST – REST API from any PostgreSQL database
Kong is great but adds dependencies to the project (I don't really want to deploy bloody Cassandra for a small API).

And it would be great to have 3rd party logins working in Kong

framp··on PostgREST – REST API from any PostgreSQL database
I don't think using stored procedures should be the focus of the project.

PostgREST is great because it lets you kickstart a CRUD application with ease.

I'm mainly a node.js developer nowadays and I'm using some frameworks to kickstart APIs for my clients - and then I jump in and add features.

What I really want is a solution to build a API server which deals with authentication, exposing my models through REST and other boring and repetitive stuff. In this way I don't have to focus on everything, but just on the specific problem I'm solving.

I don't think there is a valid solution out there right now.

That's why I'm contributing to PostgREST and I hope to see even more features coming out of it (eg: better authentication, maybe with 3rd party logins).

framp··on Developing Web Applications with Haskell
You should check out PostgREST, a tool to expose Postres tables through a JSON APIs: https://github.com/begriffs/postgrest
Page 1 of 2Next →