Hacker Newsnew | past | comments | ask | show | jobs | submit | more phpnode's commentslogin

It's common to sanitize a commit history before making code public. Old commits can contain potentially sensitive information, like certs committed by mistake and later removed, db dumps used for testing that contain unsanitized data, commit messages could be some value of unprofessional that you don't want to share with the world, that kind of thing.


I find its absence much more unprofessional.

Commits are an essential ingredient in a modern codebase to describe why each line of the code is there.

I don't want to go back to blocks being commented out and code intertwined with comments like /* 6-dec-2016 tomtomtom: moved from other_function() to fix latency */


Can you point to one such project which is not planned from the beginning to be open sourced and then later the entire commit history is made public.


IIRC, the Java source code repositories included pre-public commit history (you had to accept a license to access them).


This looks like a nice idea but it's a bit unfortunate about the name clash with https://github.com/rpominov/static-land

Edit: Dear downvoters, normally it'd be unlikely for the name clash to matter, but because these are both JS libraries, both available on npm, it's the difference between `npm install static-land` and `npm install staticland` which would be an easy mistake for anyone to make.


From rpominov/static-land’s README:

  Pros  
  
  - No name clashes.


That is unfortunate! Looks like the two projects were started around the same time, too. I may add a note to the site/readme pointing people to that repo if they were looking for it.


It's an out and out money laundering service. It exists for no other reason, there are no legitimate circumstances where someone would want or need to sell amazon gift cards at less than their face value. It is straight up money laundering and it's frankly incredible that it's lasted as long as it has.


> no legitimate circumstances where someone would want or need to sell amazon gift cards at less than their face value.

Absolute statements like this are so hard to back up.

For instance, if you live in Cuba, Iran, Syria, North Korea, or Syria, Amazon.com gift cards are worthless.

I know I received some AmericanEagle gift cards as a promotion recently, and unloaded them for less than face value just because I had absolutely no need/want to use them.


> there are no legitimate circumstances where someone would want or need to sell amazon gift cards at less than their face value

Many credit card rewards programs offer Amazon gift cards as a redemption option. The points:value ratio on these is generally significantly better than the ratio on cash rebates, even when you consider the hit taken on sites like purse.

e.g. 10,000 points might be redeemable for $100 in Amazon GC, but only $50 in cash, so even if you get the GC and sell them for $85, you still do better than if you had straight redeemed it for USD.


when


Nice catch.


How would that work?


http2 as a transport, some metadata like url or header as a signal for a load-balancer to route the stream somewhere else (to a vpn endpoint in this case).


Is that processor more or less powerful than the processor in this laptop?


Funny question, but the answer is less powerful.

"This processor is a Texas Instruments MSP430 microcontroller, roughly as powerful as the processor inside the original Macintosh."

"MSP430 is a 16 bit processor running at 16MHz. The Dhrystone benchmark measures 1.4 MIPS."[1]

No doom or rooting your MagSafe adapters.

[1]: http://www.righto.com/2015/11/macbook-charger-teardown-surpr...


MSP430 are nice to play around with for hardware projects and they are very cheap, so you can quickly get to cheap products if you start your work with them instead of far more expensive processors.


Is an MSP430 really cheaper than a low end STM32?

I mean the MSP430 was great, 10 years ago, but the industry hasn't stood still.


True, good point. I just have many MSP430 boards lying around, so even blowing up and giving away a few 100 I would be fine hence I go for them when trying something out. I worked on a few projects with low powered bluetooth that had mandatory MSP430 usage so I again something I go for if I have to try something quickly and has the potential to turn into something I want to give away/sell.


Maybe not actual Doom, but that's fast enough to run some sort of FPS at least. Certainly fast enough to be a useful personal computer.



even if you live in a terminal all day 1280 x 720 is just too small to be practical.

edit - I too once basked in the warm rays of a 320x200 CRT, it's OK at the time if that's all you've ever experienced, but it's hard to go back to that from 4k.


It was possible to achieve a lot with just 320x200 on 8-bit systems.

Or on programmable calculators (TI, HP, etc.), with just 128x64 or so screen.

Or on Amiga (704|640)x(200|256|400|512).

Or VGA PC 640x480. VGA was for the first time truly enough for an IDE. SVGA 800x600 soon followed. And 1152x864, etc.

So one should definitely be able to manage with 1280x720.

I think we can adapt to whatever is available. I guess one could even manage software development with just a single line (320x8, 40x1 characters) display. It'd certainly be far from optimal, but you could do it.

Of course now I enjoy 4K resolution and multiple monitors...


I think we can adapt to whatever is available. I guess one could even manage software development with just a single line (320x8, 40x1 characters) display. It'd certainly be far from optimal, but you could do it.

Or even a dumb terminal (TTY) that prints to physical paper.


> even if you live in a terminal all day 1280 x 720 is just too small to be practical.

Works fine for me. Even smaller makes me work on production stuff for weeks at a time. It's a matter of taste.


Here's me living with just a 1280x800 X201 laptop.

It is perfectly practical.


My 640x480 ARM-powered Psion netBook is crying now...


Everyone is trying to show off their nerd cred by bragging about how small their terminals are, but you're right. We have bigger, higher res screens for a reason these days: because they're better. And what's better than one terminal window? Two, side by side. Or four. Or four with a browser window open too. Not possible at 300x200, infinitely possible at 4k.

Hell, right now I have three terminals open. One that I'm using to make changes to a file, another that I'm using to just hit the up arrow and enter to scp the file to a remote server after every change, and another to tail the log file in case there's any errors popping up. Could I do it with one window? Sure. Can I use screen to make it seem like I have three? Of course. But why would I bother when I've got tons of real estate?


Well let's see, I use a 6x10 font. 1280/6=213 characters horizontally. 720/10=72 characters vertically. I think that is more than enough for a screen that size. Sure I would miss being able to have a zillion terminals open at once, but you pay for portability.


I don't think my IBM 3151 has that many pixels.


The most popular resolution nowadays is still 1366x768, so I would not agree with you there. I have that resolution on my 11" cheomebook and its fine, a 1080p panel would be a big improvement sure but its very far from unusable.


Here's a PR that fixes this issue - https://github.com/threepointone/markdown-in-js/pull/2


Note that local identifiers (such as vars) mask the import identifier so it will be easy to create a false positive.


It seems like you're looking to find something to complain about. Yes, you generally have to be careful about variable collisions. That is in no way specific to this module and, frankly, is something any competent programmer should be aware of.


It is specific to this project, in that it will rewrite your code to mean something other than what you intended it to mean.

I'm not being critical of this project, I'm being critical of the all too common practice these days of installing a dozen or more Babel plugins to fix every problem that exists, and thus creating your own one-off language that will be unreadable in 6 months.

Babel has become the new hammer in front-end development. Everything looks like a nail.


I really don't see where you're getting that from. How on earth does it "rewrite your code to mean something other than what you intended it to mean?" I explicitly included the "markdown" identifier. What on earth could I have meant otherwise?

How is:

   import markdown from 'markdown-in-js';

   const MyMarkdown = markdown`#Headline`;
any less clear than:

   import markdown from 'markdown-function-tool';

   const MyMarkdown = markdown('#Headline');
It's totally explicit and actually allows compile-time validation. I really don't understand your objection.

This will not be "unreadable in 6 months" any more than JSX or GraphQL are. Since I have plenty of projects that are over 6 months old using those techniques, I'm quite confident they work fine. It's not like there's any magic or implicit references going on.


Because if you do:

   import markdown from 'markdown-in-js';

   var markdown = function() { }

   var foo = markdown` #Header ... `;
It will incorrectly rewrite this template literal. And while they could potentially fill this hole, it doesn't change the fact this is unreadable code; there's nothing from the code that signifies it will be converted into some function calls the way that JSX or GraphQL at least have some visual signifiers.

JSX and GraphQL, I'm not a fan of either, but are at least real projects with standards texts written for. This is not a criticism of this project, but the practice of installing a bunch of AST transforms to save you a couple of keystrokes creates code that reads as 1 thing, but compiles to something much different.

If you don't recognize how changing your code to mean something different based on an AST is essentially creating a one-off language, I don't know how to help you.


> It will incorrectly rewrite this template literal.

That is a bug and should be fixed.

I'm not sure what visual signifiers that GraphQL has which this doesn't.

It's a fairly clear pattern of what's going on. I really don't see what is "unreadable" about it.


It's a leaky abstraction. The point is to make your code do something other than what you described it as doing (because it will do it "better"). That's what makes it unreadable; hiding behavior from code decreases readability.

I'm not that familiar with GraphQL, but as far as I can tell it doesn't depend on AST transforms. It seems to be a DSL that uses tagged templates. There's nothing wrong with DSLs.


Yes, I noted that in the PR. It's easy to fix it, why don't you try?


As noted above, I think the practice of installing a bunch of Babel plugins is the wrong approach to this problem. If you want to avoid parsing markdown in the client, then pre-compile it using one of the million markdown compilers that exist.


merged and published, thanks!


Presumably they've thought this through before announcing it.



They are probably using closure in the background, using the new type inference with the compiler, to collect the meta information.


Yes, the paper JS Nice is based on calls out that they use the Closure Compiler as a backend: http://www.srl.inf.ethz.ch/papers/jsnice15.pdf


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: