HNHacker News
TopNewBestAskShowJobs

pmlamotte

185 karma · joined December 10, 2014

submissionscomments
pmlamotte··on Record surge in atmospheric CO2 seen in 2016
Not in your list is reducing/stopping the consumption of animal products. https://www.nytimes.com/interactive/2017/06/09/climate/drawd...
pmlamotte··on Inside a fast CSS engine
I believe she just has a talent for it, she's an engineer as far as I know and has other related cartoon descriptions: http://lin-clark.com/

Her talk on react fiber this year is quite good as well: https://www.youtube.com/watch?v=ZCuYPiUIONs

pmlamotte··on GDNative – A scripting language module for Godot
If you're on Arch there are AUR packages that are regularly kept up to date.
pmlamotte··on New XPS 15 Laptop
I just switched to the XPS 13 as well and picked up the WD15 which is the same price on Amazon. The WD15 officially supports linux and from what I read is better than the 3100 as long as you're on a more recent kernel. Hopefully I won't have to return it.
pmlamotte··on 3 Out of 4 Millennials Have Received Financial Help from Parents After College
I received no financial help post-college from my family because I didn't need it. My starting salary was twice what my dad made at the time and my sister had just begun college. I had saved up money myself from working during college to pay for my first month's rent. It's not that they didn't care, it's that I didn't need it and was off to a far better start.
pmlamotte··on The real Soylent sickness
Powder is the cheapest option, which comes out to $1.93 per 500 kcal
pmlamotte··on Update on Soylent Bar
I guess I was taking the "people who can afford " part of your comment as "it's for well off people" when it's actually a reduction in spending for many Americans.

It matches up with the "Low cost plan" from the USDA for 2014: https://www.cnpp.usda.gov/sites/default/files/usda_food_plan...

pmlamotte··on Update on Soylent Bar
I'm one of the few people that bounces between 70-95% soylent each month. I do the powder which is the cheapest option and it comes out to around $230/mo if it was my only source.

The average per person spending in the US is somewhere close to $300 per person if I recall correctly. Taking that into account with the time savings, and it's really quite cheap as a pure fuel source.

pmlamotte··on Google Canceled the Launch of a Robotic Arm
For number 4 are you referring to domestic travel? I used Fi on my Nexus 6P recently through Canada, Japan, Indonesia, and Taiwan with the service becoming available soon after landing. I was actually surprised it worked as well as it did.
pmlamotte··on Godot reaches 2.1 stable
The Unity Linux beta has been working quite well for me. It is lacking certain things like asset store support, but otherwise it's been solid in my small hobby projects.

That said, I'll be taking a good look at Godot. Most of my projects are in 2D, and I end up filling in a lot of what Unity doesn't provide. Godot seems to be a better fit for 2D provided the rest of the engine/editor holds up.

pmlamotte··on Pokemon Go is a huge security risk
It doesn't appear in that list for me, curious if this is only affecting iPhone users and/or Android 5 and below.
pmlamotte··on Atom text editor 1.7.0 released
Agreed that this should be built in. I've been using https://github.com/atom-community/sync-settings which stores everything in a gist and has worked out reasonably well so far. The pain points are that you have to manually set it up the first time with the gist id and (optional) private api key, and backups have to be triggered manually.
pmlamotte··on How eSports are saving the PC industry
Depends on if you look at eSports as an all encompassing entity, or as a collection. If you swap out "eSports" in the title with "sports" it works.
pmlamotte··on Links between coffee and health
I can attest to this. I was consuming over a gram of caffeine a day from a pre-workout drink, and 3 cups of starbucks pike's. It's a daily ritual at work to make the walk to Starbucks which ends up resulting in various technical discussions, so I ended up getting quite addicted to the caffeine.

After only a few months I noticed my vision was getting blurry, lacking focus, and there was some visual swirling as if I was on LSD. Fast-forward another 9 months and colors were muted, all emotions were numbed, I was insanely irritable, and I felt completely distant from the world. I felt so numb to life that I was very close to seeking therapy due to increased thoughts of suicide. On weekends I never had caffeine, but one day I decided to try some tea. That little amount of caffeine was enough to kick me out of the withdrawals and and make me realize it was the caffeine that was causing it.

It's been two months since I last had caffeine and I'm still going through withdrawals. For a while I had to take ibuprofen because the headaches were so severe, but now it's just a slight head pressure. Colors are popping, sunlight is gorgeous, I can focus on words in a sentence without my vision darting around. It's better, but I know there's still another month or two to fully reset. I'm getting back to feeling like I did in grade school though which is amazing to me. I've always drank large amounts of soda since middle school/high school, so I've likely always been impacted by caffeine like this at a smaller scale.

I had actually tried stopping early on, but was sticking with decaf and only for two weeks which wasn't long enough to notice anything.

For some added info, I have the A;C form of http://www.snpedia.com/index.php/Rs762551 which supposedly makes me metabolize caffeine more slowly.

pmlamotte··on Satoshi Nakamoto moves his 6.5 yr old bitcoins
Good point! I clearly wasn't thinking like a computer scientist this morning.
pmlamotte··on Satoshi Nakamoto moves his 6.5 yr old bitcoins
For those not aware, the original 50 coins sent to this address were generated from the genesis block, the first block on the blockchain. However, the transaction is still unconfirmed, so until it is this could be nothing. Market has been scared downwards though.
pmlamotte··on Soylent 2.0
"We’re always going to keep our powdered product around"

http://arstechnica.com/gadgets/2015/08/soylent-2-0-is-coming...

pmlamotte··on Increasing Variety on Pluto's Close Approach Hemisphere and a Dark Pole on Charon
This was linked in the article, but should anyone pass over it/not click through, here is a regularly updated list of new pictures from the probe as it gets closer: http://pluto.jhuapl.edu/soc/Pluto-Encounter/index.php

I've been checking in every few weeks and it's been fun to see it slowly getting clearer and larger. I recall watching shows about it on the Science Channel when I was in high school and thinking 9.5 years would be so far away. Feels odd that we're now only a few weeks away from it finally reaching Pluto.

pmlamotte··on Rendering Improvements
They did raise or remove the limit I believe, though long lines, particularly minified files, do still pose a problem and force me to kill Atom.

Edit: Confirmed that the 2mb limit was removed. While viewable and editable, depending on the operation you attempt you may see issues.

I tried copy/pasting the contents of a 3mb json file several times and eventually it caused exceptions to be thrown (but no crash). Same test worked in Sublime Text, albeit with freezing. They do still have some work to do on the edge cases but it's been nice to see progress.

pmlamotte··on How Naughty Dog Fit Crash Bandicoot into 2MB of RAM on the PS1
I'd rather play a game that, if I should want to play it 20 years from now and there are no update servers - which I do still do with my old consoles - I can pop it in and not worry about bugs I have to figure out how to get patched. Games will inevitably have bugs, but developers have become too reliant on the update mechanisms and games have shipped completely busted.
pmlamotte··on IBM Is Going Agile
This was the case in my few months there. We had "sprints" and "stories" but 75% of all the stories in every sprint would just get pushed to the next sprint with no thought behind it. Part of that was because our stories themselves were so broad and were worked in a long term waterfall manner. Our standups were just everyone falling asleep while each person took their turn saying what they did the previous day. If someone did actually have impediments or useful information to convey, most did not pay attention enough to notice. And finally, we didn't have retrospectives, which are a great time to be able to reflect on how to improve as a team and prevent issues in the future.

A lot of this came down to the people, but it didn't help that there was no leadership to help steer it in a good direction or notice the underlying issues. Story points were fabricated to help give good spreadsheets and charts to upper management, which led to us working insane overtime before our release due to how behind we were.

This is just one anecdote though, and I know there were other departments much better off than mine was. It was enough for me to want to get out though after I realized how difficult it was to get any change in place.

pmlamotte··on How I shrunk a Docker image by 98.8% – featuring fanotify
Reminds me of the method used for the demoscene FPS game .kkrieger which was stored in less than 100kb. They basically played through the game several times and trimmed out any code paths that weren't used in order to get it small enough, using a rudimentary c++ "pretty printer" they wrote that tracked executions of code paths. They had the advantage of being able to alter their code to only use constructs supported by their custom tool. Utlimately, this led to some bugs/features being stripped. An example being they hadn't pressed up in the menu during their runthrough, so you could only navigate downward.

https://fgiesen.wordpress.com/2012/04/08/metaprogramming-for...

pmlamotte··on CodingGame – An idea for a real time strategy game for programmers
You bring up the real-time component, which is something we didn't do and from what I can tell the OP does not plan to do either. Real time is an entirely different beast and something I haven't seen in these types of competitions yet. I'd love to see one that does do it though.

Another cool competition is MIT's Battlecode, which actually gives you a bytecode limit. If your code executes past the bytecode limit, your AI is paused and will actually resume on the next turn, without notification. Thus you'll be continuing with possibly old/dirty data. That pretty much prevents you from using any standard libraries and doing bytecode level optimizations, as well as manually yielding if you know it will take too long.

Your robots also can only talk to each other through a radio API that has limited bandwidth and possible corruption if I recall correctly. It's a complete opposite of what I worked on, where we focused more on strategy rather than code optimization.

pmlamotte··on CodingGame – An idea for a real time strategy game for programmers
When I was at Michigan Tech I was part of the group that would create an annual version of this, and we were actually running all AI in the same Java process (somewhat sandboxed) which of course led to scalability problems and limited you to JVM languages. For us it didn't matter so much since our target audience was new comp sci students at a school where the starting and most used language was Java.

Our other restriction was that we wanted to support hundreds of units per team, and we wanted tens of thousands of computed turns, but be able to compute that within 3-5 minutes.

We did learn from that naive approach though and the next year I believe it was done with a text based API. If performance were an issue, it could be done with protobuffers, since most popular languages have at least some implementation of them. The year we did the java implementation we had replays the size of 250mb+ due to how much data we had, even with deltas, compression, and other pruning. The text API was only feasible due to a massive reduction in the amount of game entities and turns.

The key thing was when you want to offer API commands. We wanted starting freshman to be able to compete, and that required offering things like pathfinding, predefined list filters, etc. This also mattered since it was run like TopCoder where they only knew about the game the day of the competition and had 8 hours to code an AI for it. The least buggy way to support that in multiple languages is to have the API computation happen on the server, then your language specific APIs are just wrappers around the API calls and data and much easier to change as your game changes.

pmlamotte··on Reduce operation in Java 8
We have a poorly written Java client app that has a large number of resources it has to pull down from S3 at startup time. As a small side project I built up a large subset of it from scratch with clojure, mostly to get my feet wet in it. By compartmentalizing everything, I realized how I could simply swap out some of my map statements for pmap, add some async, and I was able to have my new implementation starting up in 1s as opposed to 30s (our problem was more latency than actual bandwidth).

I decided to take a look at Java 8's streams, and porting that speed over turned out to be pretty straightforward. The first step was to swap out our iterative, awful thread management download code with parallelStream. When I say awful, I mean it was increasing and decreasing a non-thread-safe static counter and busy waiting for it to hit 0, among other confusing constructs. I also took the time to refactor out several if statements and other code with filter and map statements.

Java 8 lambdas also worked well in that a lambda can be passed in where any Functional Interface is required (the interface has one function), so long as the lambda has the same arity. I was able to use this to have a list of Runnables (basically function/method pointers) that I ran in parallelStreams where previously it was iterative. It looked more verbose than but still comparable to my clojure code.

Finally, I had some tasks that took a long time but were not required at startup since you only needed the resources for specific functions in the app long after you loaded a project. I swapped those out with CompletableFuture.supplyAsync(), as well as took in a callback function for when it completed. If you did manage to need that resource before it finished loading, you would get a loading message until the callback was called.

Granted, a lot of what the app was doing beforehand could have been done much better, such as with ThreadPoolExecutor (and I did see some complaints about efficiency with parallelStream). However, the java8 way came out pretty clean as far as java goes, and I was able to add more/better functionality while still having less code overall. While there is still a lot of improvement that could be done to the streams, they worked out pretty well for my use case.

pmlamotte··on Tabvention – Manage Your Browser Tab Addiction
Anyone know of a comparable extension for Firefox?
pmlamotte··on Google Code Jam 2015
Not too much, the difficulty comes more from fewer problem choices. ICPC at the regional level has many questions to select from and usually has at least 2 problems that can be solved in under 5-10 minutes (we had a badass on our team with under 1 minute submissions). I rarely anticipate solving the most difficult GCJ problem, even the small input case. In the beginning rounds the first 2-3 GCJ problems are usually on par with easy-medium difficulty ICPC problems. As you get higher up in the rounds they get more challenging.

Edit: Should also point out that since you're not in a controlled environment, you have full internet and library access unlike ICPC where you have to rely on memorization and standard libraries.

pmlamotte··on Google Code Jam 2015
It's a programming competition similar to TopCoder or ACM ICPC. You're given 4 problems, each with a small (small n) and large (big/huge n) input set, and a time limit to write programs to solve as many as possible. You're ranked by the combined score of the ones you've solved, and ranked within that score by how fast you solved each one.

For difficult problems you can often write a brute force solution with terrible complexity (think 2^n) for the small input set. For the large though, you'll need to really understand the problem and write an efficient solution via memoization, dynamic programming, pruning, or good (sometimes obscure) algorithm choices. For small solutions you get instant checking of your solution on submit (but not what you failed on, only that you did), for large ones you submit and hope for the best.

As for why you should care, for me at least it's fun to come up with fast solutions to problems regardless of whether they're efficient or if my code is well designed. You learn about new types of algorithms and ways of solving problems. For example, dynamic programming was foreign to me until I started doing tons of TopCoder. Google also uses it for recruiting, I'm still getting contacted by them even though I skipped last year.

My favorite moments come from solving problems poorly while knowing there's a proper solution out there. Ex: There was a problem in some competition where it was some special way you had to return the y-intercept of a line with a given slope that bisected a particular polygon. There was an actual way to do it properly, but I'm not so great at math/geometry so I ended up doing a binary search and did enough iterations to get the right amount of floating point precision they wanted.

pmlamotte··on Higher-Order Functions in JavaScript
Lodash is what finally made me get functional programming, because I was able to start using it in small places where it made sense as opposed to diving into it all at once. At first it started out with just map and filter for some basic cases. Then I would peruse the Lodash docs now and then and discover functions that could replace a lot of my iterative, often messy code with something that felt much more elegant, especially with chaining.

With that new-found knowledge, I decided to make my 4th or 5th attempt at trying to grasp clojure and ran through some 4clojure problems. This time I breezed through the problems, and in many cases enjoyed writing it more than I would have in a typical iterative style. I made sure to follow some recommended users to see their solutions as well, which helped reduce much of my parentheses bloat.

My favorite thing about using high order functions has been that provided your underlying functions are tested/correct, you can more easily reason about and test your new functions, particularly when you keep things immutable/side-effect free.

I'm sure I would have gotten to this point eventually without Lodash, but being able to make use of bits and pieces at a time was a major catalyst for me.

← PreviousPage 2 of 2