Poor Countries Are Running Out of Time to Get Rich - <AUTHOR> https://www.bloomberg.com/opinion/articles/2020-07-26/falling-populations-may-keep-poor-countries-from-getting-rich <comment><USER3> The article seems to be conflating GDP with GDP-per-capita. A booming population is an easy way to boost GDP, but a lousy way of growing GDP-per- capita. Conversely, there's no reason "poor countries" can't grow their average worker income by investing in education and worker productivity. The idea that developing nations are "running out of time" is ridiculous - <USER2> has really been their best friend in growing their average income.

<comment><USER4> > Conversely, there's no reason "poor countries" can't grow their average > worker income by investing in education and worker productivity

Emigration.

A highly educated worker will leave a poor nation and instead work in a rich nation. This is a problem inside of countries too.

Folks from poor parts of the USA move to richer areas to gain a better way of life.

<comment><USER5> Which actually acts like a transfer of wealth. Education is expensive, and the assumption has always been that educated citizens help grow their economy and country.

But when educated citizens emigrate, their new homes get the economic and cultural benefit of another educated citizen without having to foot the bill for educating them.

Long story short, the emigration of educated citizens makes a country poorer.

<comment><USER6> The transfer of wealth goes both ways, since expats' remittances are a significant source of income and investment to many developing countries. Return migration is also common, and a very significant source of benefits to the home country. It's pretty much a win-win.

<comment><USER7> > It's pretty much a win-win.

Even in strictly financial terms this is a dubious claim.

</comment></comment></comment></comment></comment><comment><USER8> The terrible horror of people in poor countries becoming better educated hand having fewer children.

This is just the usual silliness of acting like maximizing GDP growth, at the expense of all other factors, is a good idea.</comment>


Ask HN: Dashboard Stats - <AUTHOR>

We are planning on setting a dashboard for info about our business. We are going to have the usual revenue, visitors, customer types and bugs displayed. I was curious as to what other startups were displaying to see if there was anything that we could possibly add that might be good to see. <comment><USER2> I believe that every business (in a certain segment) has its own KPIs. Without knowing what space you are actually in, it might be hard to answer that question. For some this is sign-ups, tweets or MAU. Identify the key metrics first and concentrate on those for the dashboard. The less you have the more significant they become and thus you can tailor your efforts more effectively towards achieving those goals.

</comment><comment><USER3> i agree with neuromancer2600. it is hard to say without knowing your exact business and what stage you are in, but keep the list small and focus on only those things that will move the needle.

</comment><comment><USER4> Check out the geckoboard and statsmix blogs for ideas.</comment>


An overview of OCaml - <AUTHOR> http://simongrondin.name/?p=330

<comment><USER2> Author here, I originally posted this to [https://www.reddit.com/r/ocaml](https://www.reddit.com/r/ocaml) to gather some feedback prior to posting it here. It was a surprised when my boss told me "Hey, you're top 10 on HN right now". Glad to know someone liked it enough to post it here before I could :)

It's something I've been working on for quite a while, because I wanted to answer the question "Why do you like OCaml so much and why should I care?" once and for all. Hope you enjoy it.

Speaking of OCaml, all the traffic going to my blog is going through HARchiver [0], a very high performance proxy and reverse-proxy 100% written in OCaml that gathers datapoints for use with Mashape Analytics [1]. Disclaimer, I work at Mashape.

[0] [https://github.com/Mashape/HARchiver](https://github.com/Mashape/HARchiver)

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

<comment><AUTHOR> I also added a feed of your OCaml posts to OCaml Planet [1, 2] (just so that doesn't catch you by surprise) :)

[1] [http://ocaml.org/community/planet/](http://ocaml.org/community/planet/)

[2] [https://github.com/ocaml/ocaml.org/commit/8df5da9b6fe1ba4c43...](https://github.com/ocaml/ocaml.org/commit/8df5da9b6fe1ba4c4314a81b93db2719cc5ad596)

<comment><USER2> Thanks, I'm honored!

</comment></comment></comment><comment><USER3> Speaking of OCaml, I'm currently working through the Real World OCaml book [1] by Yaron Minsky, Anil Madhavapeddy and Jason Hickey, who are some of the drivers of using OCaml in production settings (Yaron Minsky works for Jane Street, who aside from being a quant firm are also the developers of the popular Core alternative standard library).

I highly recommend it.

[1] [https://realworldocaml.org/](https://realworldocaml.org/)

</comment><comment><USER4> I am not sure where this belongs in the tutorial to intermediate spectrum, but it feels relevant.

[http://learnxinyminutes.com/docs/ocaml/](http://learnxinyminutes.com/docs/ocaml/)

</comment><comment><USER5> I had trouble accessing the site, so here's a cached version: [https://webcache.googleusercontent.com/search?q=cache:hHpdNA...](https://webcache.googleusercontent.com/search?q=cache:hHpdNA5YjjQJ:simongrondin.name/%3Fp%3D330+&cd=1&hl=en&ct=clnk&gl=us)

<comment><USER6> I also did, and I also wasn't able to access gnuplot.info, maybe there is a problem w/ .name?

<comment><USER7> gnuplot.info works for me on IPv6 but not on IPv4 (get connection reset on IPv4), seems to be a problem with projects.sourceforge.net.

      gnuplot.info has address 220.127.116.11
      gnuplot.info has IPv6 address 2001:468:c80:a202:0:b074:0:c082
      220.127.116.11.in-addr.arpa. 3567 IN	PTR	projects.sourceforge.net.

This site has a different IP and seems to point to a DNS server/proxy:

      simongrondin.name has address 22.214.171.124
      220.127.116.11.in-addr.arpa. 85642 IN	PTR	unblock.us.org.

Edit: .name site works now

</comment></comment></comment><comment><USER8> > radical at fist first?</comment>


Why you can't search for phpBB on Bing - <AUTHOR> http://blamcast.net/articles/bing-crash <comment><USER2> > phpBB has a pretty bad security record

Not exactly true. phpBB2 has a bad security record. phpBB3 has been clean since day 1, IIRC.

<comment><USER3> I work with phpBB, and felt a little awkward stepping forth and saying this, so I'm glad somebody did.

phpBB3 has had a couple tiny problems, but nothing that could be used to attack users of a site or propagate an issue.

<comment><USER4> And still many people will refuse to use phpBB or have anything to do with it because of its checkered past.

<comment><USER5> I won't use phpbb or vbulletin or any of them because they feel cludgy. I don't want signatures. Two lines of text shouldn't occupy 500 pixels on my screen. And conversations among tons of people don't make sense when displayed at one hierarchy. Reddit and HN have spoiled me, any sort of unmoderated single-hierarchy forum is a chore anymore.

<comment><USER6> I'm out of the loop I suppose... what software would you use for, say, a support forum or something? I still use phpBB, and it works, but I agree it feels cludgy.

<comment><USER7> You might like Vanilla Forums better: <http://vanillaforums.org/>

</comment></comment></comment></comment></comment></comment><comment><USER8> For me, bing only produces errors if you don't have any bing cookies initialized.

A presumption that bots wouldn't store+return cookies?

<comment><USER9> I tried

1\. visit www.bing.com first

2\. search for few random words

3\. search those URLs OP mentioned

4\. They all works now.

Looks like a bug how Bing handles cookies.

</comment></comment><comment><USER10> If it's an automated system inducing the error state, it suggests that you could poison Bing by creating a similar error for popular keywords.

</comment><comment><USER11> I started using Bing recently and I noticed that I was getting error pages intermittently, and then pretty frequently.

phpbb and topic view are returning error pages for me (on latest ff, cookies enabled).

Another way I'm reliably getting an error page is adding parameter _& first=201_, e.g. [http://www.bing.com/search?q=stuff&first=201](http://www.bing.com/search?q=stuff&first=201)

This is the paging parameter, indicating you're at the 20th screen of results.

</comment><comment><USER12> Can't say I've ever been to Bing on this computer, but clicking on the links gives me the error.

However, after visiting Bing.com and then clicking on the links, they work.

</comment><comment><USER13> Works fine for me on the mobile site. Also the api returns results <http://www.unscatter.com/search/?q=Phpbb+%2Fbing>

</comment><comment><USER14> Problem still occurs for me when clicking his links - no bing cookies here as I don't use it.

</comment><comment><USER15> All the examples mentioned worked fine for me (on FF5, Chrome + IE9 on Windows 7). Weird...

<comment><USER16> None of them work for me on Windows 7 / Chrome. My computer is being sent to 18.104.22.168 or .120 when I ping www.bing.com (pinging bing.com goes to 22.214.171.124, which times out), in case that's useful to anyone - since this is only happening to some people, it could be an issue which isn't present on all of Bing's servers.

<comment><USER15> Got it to break; someone else here mentioned that when they cleared all bing.com cookies it generated the error - I got the same when I did that...

</comment></comment></comment><comment><USER17> They didn't fix sh*t. It's still doing the same thing for me.

</comment><comment><USER18> Every single one of his search examples "that breaks Bing" works for me just fine.

Either Bing fixed this the same hour his blog post was made, or he just ran into a temporary snag.

And his Google search of the error code on Bing is just that, a snapshot of a temporary error that has no correlation to any particular keyword in the url.

<comment><USER19> Bing seems to do refer[r]er and/or cookie checking. If I enter the search on www.bing.com or have a cookie from bing, a search for phpbb produces results, if I clear all all bing cookies and enter <http://www.bing.com/search?q=phpbb> in the location bar, I get the error.

<comment><USER20> an unsophisticated fix for an unsophisticated exploit

if the exploit supported cookies and could mimic IE it would bypass this form of blocking

</comment></comment></comment><comment><USER21> <http://www.bing.com/search?q=topic+view> works very well on me.

<comment><USER22> For me just now:

Ref A: 1868CAC6D8EA4D63B186C4E1C09E8822 Ref B: 22A00154B361421B403038C5A5D4A80F Ref C: Mon Aug 01 17:20:45 2011 PST

Edit: this is under Chrome incognito mode as others have mentioned

<comment><USER23> Same for me (different numbers, though). I'm not surprised, though—I'm on an EC2 VPN, which some internet services are somewhat biased against (notably Stack Overflow).

</comment></comment></comment><comment><USER24> Either that – or Bing itself is getting blocked from spidering Google on these queries ;)</comment>


PyEcore: a framework for building MDE-based tools in Python - <AUTHOR> https://github.com/pyecore/pyecore/ <comment><AUTHOR> Just a few words about the project, PyEcore is a Model Driven Engineering (MDE) framework written for Python 3. It allows you to handle models and metamodels (structured data model), and gives the key you need for building MDE-based tools and other applications based on a structured data model. It supports out-of-the-box: data inheritance, two-ways relationship management (opposite references), XMI/JSON (de)serialization, notification system, reflexive API...

There is two projects that are connected to PyEcore: pyecoregen ([https://github.com/pyecore/pyecoregen](https://github.com/pyecore/pyecoregen)) that provides a framework for code generation based on Jinja2 templates (model-to-text/m2t), and a WIP project to integrate PyEcore with textX ([https://github.com/igordejanovic/textX](https://github.com/igordejanovic/textX)) to provide parsing/AST to model (text-to-model/t2m)

The project is inspired by EMF, the Eclipse Modeling Framework, and tries to be compliant with it through terminology and XMI format. The goal is to make a full MDE environement for Python (data modeling, model-to-model, model-to-text and text-to-model transformations) while beeing interoperable with EMF-Java through XMI so EMF-based tools can be used if needed.</comment>


The Linux Scheduler: A Decade of Wasted Cores - <AUTHOR> https://blog.acolyer.org/2016/04/26/the-linux-scheduler-a-decade-of-wasted-cores/ <comment><USER2> Link to previous discussion on HN: [https://news.ycombinator.com/item?id=11501493](https://news.ycombinator.com/item?id=11501493)

</comment><comment><USER3> Run "numastat". If you only see one "node" column, then these issues don't affect you. At Netflix, almost all our systems are single NUMA node.

I tested the patches on 1 and 2 node NUMA, and saw 0% performance improvements, for some simple workloads.

The paper is also uninformed about scheduler bugs in general. Yes, there have been lots of scheduler bugs (I've worked on more in other kernels too, not Linux, where scheduling is even worse!). Yes, we already have tools for diagnosing them (eg, examining run queue latency as a histogram). Yes, we've already used visualizations too.

There's information for reproducing the bugs here: [https://github.com/jplozi/wastedcores/issues/1](https://github.com/jplozi/wastedcores/issues/1) . If you think for a second that you've hit these bugs, you should read these steps.

</comment><comment> m-app Found it funny that one of their patches reduces a function to:

      static int should_we_balance(struct lb_env *env)
      {
          return 1;
      }

<comment><USER4> certainly inlined and very likely optimized away altogether. Better to keep it that way, with a comment. Once the problem is fully understood, there may be room to enable it again with a more meaningful heuristics.

<comment><USER5> Ummm... isn't that the job of version control?

<comment><USER6> Yes, in theory. In practice, you'd not only remove this function but all of its calls. When somebody down the road realizes that they want this function back, they have to (A) realize it's in the VC history and (B) not only get back the function but all the calling points. That is so much of a pain and potentially error-prone that leaving this function in for a while with a comment might be the more practical approach.

<comment><USER7> On the other hand, it may no longer be called from every place where it should be. I've found that it's better to document what was wrong with the overall approach, scrape the dead code from the source base, and move on. Barnacles like these accumulate over time otherwise.

</comment></comment></comment></comment></comment><comment><USER8> Unless you are running on NUMA box does not look like this will affect you much.

<comment><USER9> Isn't NUMA how multi-core CPUs work still?

At least the AMD Bulldozer architecture diagram on the Wikipedia NUMA page shows this, both within a socket and between sockets:

[https://en.wikipedia.org/wiki/Non- uniform_memory_access#/med...](https://en.wikipedia.org/wiki/Non- uniform_memory_access#/media/File:Hwloc.png)

Is the same true for Intel chips? (The Wikipedia page mentions the Intel E8870 memory controller, but not whether newer chips use similar set-ups)

<comment><USER10> > Isn't NUMA how multi-core CPUs work still?

if you have > 1 socket, then yes, otherwise no.

Edit: added verb

<comment><USER11> These days, yeah, that's definitely the case. A few generations back there were a couple of multi-socket-single-memory-domain designs.

<comment><USER12> > A few generations back there were a couple of multi-socket-single-memory- > domain designs.

Core2Quad/Duo based Xeons, P4s, Athlon MP, etc

<comment><USER13> I thought the Core2 chips were actually multiple single-core processors on a single slab, which would make that true of all Core2 machines (not just Xeons). I was pretty deep in Nehalem details when it first came out and was under the impression that microarchitecture was Intel's first true multi-core chip (as in, the cores were actually integrated on the die). Could be wrong, though, since I never delved into the Core2 architecture.

<comment><USER12> >I thought the Core2 chips were actually multiple single-core processors on a single slab, which would make that true of all Core2 machines (not just Xeons)

Correct.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> LKML discussion: [https://lkml.org/lkml/2016/4/23/135](https://lkml.org/lkml/2016/4/23/135)

</comment><comment><AUTHOR> In case you want get a quick(-ish) overview, here are the slides that try to explain it: [http://www.i3s.unice.fr/~jplozi/wastedcores/files/extended_t...](http://www.i3s.unice.fr/~jplozi/wastedcores/files/extended_talk.pdf)

<comment><USER15> Your url is broken and should be: [http://www.i3s.unice.fr/~jplozi/wastedcores/files/extended_t...](http://www.i3s.unice.fr/~jplozi/wastedcores/files/extended_talk.pdf)

Parent directory: [http://www.i3s.unice.fr/~jplozi/wastedcores/](http://www.i3s.unice.fr/~jplozi/wastedcores/)

</comment></comment><comment><USER13> I worked on a massively threaded signal processing application a few years ago. We manually set all of our thread affinities due to the issues raised in this article. We were also using the real-time kernel and round robin scheduler, though, so we had other considerations as well.

<comment><USER16> It is standard practice when max throughput and/or latency are desired to pin. A scheduler provides convenience and automatic balancing in face of shifting workloads. If you have a fixed function system, it's just getting in the way.

<comment><USER13> Pretty much. Our pinning varied by task. Some were pinned to sockets, some to cores, and some to specific hardware threads. That's what I meant by "other considerations"; we would have still been pinning threads even if the bugs in the article didn't exist. The bugs just made figuring out the best pinning scheme more difficult.

</comment></comment></comment><comment> thread-manager Hi Guys, FYI in most new servers (~2005 and later), there is a BIOS setting to make NUMA systems look like they have one NUMA zone. From memory, I think it is the Interleaved option on most vendors. I strongly recommend most clients to turn it to NUMA mode (which tends to be the default for most newer servers)

</comment><comment><USER17> From what I understand this mostly effects servers and not desktop systems because most desktops don't have NUMA. I've noticed that Linux servers typically run on par (usually better) than their windows counterparts when it comes to performance.

Could this be an indication that Windows could also be suffering from some similar bug?

Once this bug is fixed in Linux it could supposedly improve performance by up to 30% in some cases. Linux is already performing on par with Windows (and this isn't really debatable), so does this mean that this patch help Linux out-perform Windows by much wider margins now?

<comment><USER18> > Could this be an indication that Windows could also be suffering from some > similar bug?

No. Linux and Windows vary greatly. If the only difference between the two OSes were in the scheduler, maybe then we could say Windows also suffers from a similar bug. But there are so many other working parts to a modern OS that Windows could be slower than Linux despite having a more efficient scheduler.

</comment></comment><comment><USER19> Well multi core is not one CORE but rather an integrated distributed system of cores linked with buses that are probably built with chips very similar to switch/commuters without all the KPEX poured in optimizing network equipments. So calling a multi core archi _one_ computer is a little lie.

Making an efficient multi core async system is as tough as making an efficient networked distributed system, except is has less heterogeneous components but probably also less devoted R&D.

So at one point I wonder why we just don't simply build extra cores as additional SOCs/ASIC, CPU or GPU you can plug on dedicated buses chosen according to the required latency in memory sharing, exchanging with central CPU/memory.

It is almost what actual buses are, just a tinge twisted with different rings, speed, latency because I don't think one bus can rule them all.

But, well who am I to have an opinion when google, apple, motorola, intel, Dec, IBM knows better than I how to design computers?

Just a no one.

<comment><USER13> > Well multi core is not one CORE but rather an integrated distributed system > of cores linked with buses that are probably built with chips very similar > to switch/commuters without all the KPEX poured in optimizing network > equipments.

Not really. Multi-core chips share processor execution resources and L2 cache between them. The on-die cores are directly tied to each other in a way that off-die components, including cores in another socket on the same board, are not. They _are_ a single computer.

Now, you can carry the network abstraction down to that level. Problem is, as an EE I can carry the network abstraction down below the register level. A register bit is a network of transistors and resistors, after all. At what point do we call something a computer? I personally think any clustering of tightly-coupled, on-die computational blocks is a "computer", which means the milti-core chips certainly count as one computer with multiple execution pipelines.

<comment><USER19> well, address bus is still a bus. They share a bus not the addresses. From the programming point of view it is the same, from the architecture PoV the complexity (number of gates and latency) it is not the same.

A network stack is just a external universal bus that deals and introduces way more complexity.

But it is just a bus.</comment></comment></comment>


Spolksy and Atwood's StackOver is a huge success - <AUTHOR> http://siteanalytics.compete.com/stackoverflow.com/

<comment> old-gregg I have a question for frequent SO posters: what do you get out of it? I like more choices and I think the resource is fantastic for googling, kudos to Jeff&Joel, but in my case, when googling doesn't help and I need to ask someone, it just seems that IRC beats it hands down: why would I go to SO asking jQuery questions if there's #jquery on freenode where John often answers questions himself? With something like jRuby or Linux hosting the picture is even better: JRuby lead programmers always hang out in #jruby, bunch of smart folks helping each other in real time.

Whereas I see people ask a question on SO and... what exactly do they do next? Sit for hours hitting 'refresh' every minute or so? SO is great for googling for similar questions answered in the past, but I just don't understand why people post questions there in the first place.

Sometimes I think that if IRC hasn't existed and someone would have launched it now as a fresh idea, all tech blogs would be filled with _"IRC changes everything"_ and _"the game is over for slow HTML-based collaboration"_

Am I missing something?

<comment><USER2> You can search SO, you can see the dozens of other answers to similar questions and you can see other answers by the person answering you. Realtime works for some set of easy quick answers - if the answerers are in your time zone.

<comment><USER3> I am pretty sure its the opposite, a complicated questions needs a feedback mechanism, you say X is wrong, I ask well what happens with Y, whats the output of Z. this really works better in realtime.

I find a lot of application / language / library developers are in irc reasonably often, whereas the questions on forums are a bit more of run of the mill how do I do types

</comment></comment></comment><comment><USER4> (a) It's Spolsky (b) compete.com is low by a factor of > 6\. We had 2,373,587 unique visitors in the last month.

<comment><USER4> Conclusion: compete.com has absolutely no respectable data, so don't look there.

<comment><AUTHOR> Sorry about the name typo (<pre coffee excuse>). Although the absolute numbers are always wildly inaccurate, Compete tends to be fairly good at viewing the traffic trends for a site. Or does the chart look nothing like your own internal ones?

<comment><USER5> _Compete tends to be fairly good at viewing the traffic trends for a site_

No it doesn't. Their graphs for Justin.TV traffic aren't even usually the same _shape_ as the real thing.

<comment><USER6> Same with GitHub.

<comment> jim-greer Same with Kongregate. Alexa is somewhat better. We use Quantcast's tracking pixel so you can see the real numbers.

<comment><USER7> The shape of the graph for grader.com is pretty close to the real thing (and eerily the same as Stackoverflow.com).

[http://siteanalytics.compete.com/stackoverflow.com+grader.co...](http://siteanalytics.compete.com/stackoverflow.com+grader.com/?metric=uv)

(Which is surprising. Grader.com is nowhere near as useful).

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> Poor Jeff. Did most of the work, and his name still comes second. I feel for you, man.

</comment><comment><USER9> I think that StackOverflow.com growth now is being pushed more by the organic search results from google and the praise being sung by ordinary users in blogs and forums.

I think the site is excellent, and looking forward to more growth as more eyes provide better questions/answers!

</comment><comment><USER10> yet experts-exchange remains strong [http://siteanalytics.compete.com/stackoverflow.com+experts-e...](http://siteanalytics.compete.com/stackoverflow.com+experts- exchange.com/?metric=uv)

<comment><USER11> I don't suppose that has anything to do with their blatant use of blackhat SEO tactics. If StackOverflow wants to be to Expert Sex Change what Facebook is to MySpace, more power to them.

<comment><USER12> I wished there was a way to tell google to never ever include another result from a certain domain.

Not just the one page, no, everything. I'd subscribe as a paying customer if they offered that feature.

<comment><USER13> I created a custom Google search for you here: [http://www.google.com/coop/cse?cx=014099110326932841740%3Aoy...](http://www.google.com/coop/cse?cx=014099110326932841740%3Aoyyrj_lqsaa)

Now, how would like to make the payment? ;)

You can also just add _-site:expertsexchange.com -site:experts-exchange.com_ to your keywords.

<comment><USER12> Hehe, ok :)

Wire transfer ? Pay Pal ? Cheque ? Cash ? My firstborn is spoken for.

Amazing, that's what I get for shooting my mouth off.

The funniest thing is I do something just like this on a site that I own to search for music files removing all the fake sites, but I never thought of using it to improve my regular searches. I simply used a submit form that sets the source of an iframe to googles result page. Works dandy.

Thank you once again, you had me laughing there!

</comment></comment></comment></comment></comment><comment><USER14> They're getting a lot of traffic, but is it really a success; are people learning or getting or understanding the best answers to their questions?

Are there enough smarties (experienced smart programmers) on the forum to answer all the inane newbie (inexperienced programmers) questions? And if there's too many newbies it's possible that incorrect or sub-optimal answers will get voted up because there aren't enough smarties to realise what are optimal answers.

</comment><comment><USER15> I'm surprised how they got a huge audience so fast. When I search for answers to technical problems on google, they appear on top results very often.

<comment><USER16> Me too! Last few weeks I have been working with Python (which makes me smile after Java and C++) and looked up plenty of stuff like "how to elegantly get first day of week N", and about 50% of my questions were answered in SO.

</comment></comment><comment><AUTHOR> I knew they'd be able to use their existing audiences to push the site but I think this is probably more than that. If the trend continues they really are going to have a huge amount of traffic and make a ton of money. I'm impressed.

</comment><comment><USER17> Okay great - but how do you monetize it now?

</comment><comment><USER18> Check this TwitPic's success! <http://siteanalytics.compete.com/twitpic.com/?metric=uv> One man show, and amazing growth of small little Twitter app!</comment>


Picking up where Google Inbox left off - <AUTHOR> https://medium.com/monolist/picking-up-where-inbox-left-off-7cfc78d66e4b <comment><USER2> It's still working for me...

<comment><USER3> And now its gone for me</comment></comment>


Esprit Board for Exploring ClojureScript on ESP32 Processors - <AUTHOR> https://www.tindie.com/products/fikesfarm/esprit-clojurescript-repl/ <comment><USER2> I like how Clojure can be used in more lightweight contexts by using Clojure _Script_ instead. Did you try a Clojure (JVM or GraalVM?) implementation?

<comment><USER3> I haven't. But I suspect that's next. If you compare things like Lumo / Planck (ClojureScript) to Babashka (GraalVM-based Clojure), you can clearly see the perf benefits of going native.

This stuff is arguably just an initial foray into the embedded world. You could imagine a Clojure dialect or compiler that emits WASM, or C, or even native code.

<comment><USER4> There is an older approximation of that, in Ferret ([https://ferret- lang.org/](https://ferret-lang.org/) ), which compiles a dialect of Clojure to c++, and can be used in embedded (IIRC it does have some pretty hefty limitations, but it's very cool nonetheless).

</comment></comment></comment><comment><USER5> am I wrong or is the code the interesting thing here-- and not specific to this devboard? Is there anything special about this board other than it 1. looks nice 2. supports the project 3. has the requisite 8+ Mib of PSRAm 4. has a silkscreen bug? genuinely asking as I am really still trying to figure out what i don't know about microcontrollers and embedded devices

<comment><USER6> It seems to require anything that can run the "Espruino" base, so this link probably covers that: [https://www.espruino.com/Other+Boards](https://www.espruino.com/Other+Boards)

<comment><USER3> The primary challenge is RAM. The (simplistic) approach I took with establishing a ClojureScript REPL is to have the standard library available, and that requires a lot more RAM than most Espruino boards have. Even with the ESP32, I had to make a few tweaks to Espruino in order to make more of the ESP32's RAM available.

Perhaps a more sophisticated approach could be devised involving "faulting in" ClojureScript standard library functions on demand as they are used, and by doing this use less RAM and reduce startup latency. If that were done, things would run on a broader range of chips (less RAM needed).

<comment><USER6> I bet a port to the Teensy 4 would be popular for some use cases. No wifi, but 600Mhz, gobs of RAM, and ~$20.

<comment><USER7> I thought it only had 1MB of RAM?

Might be an interesting target for Janet though!

<comment><USER6> Argh, you're right. I hadn't picked up that the WROVER boards have even more RAM.

Normally 1MB is "gobs" in the microcontroller world. The ~8MB in the WROVERs is a crazy amount of RAM for an mcu.

</comment></comment></comment></comment></comment></comment><comment><USER8> I'm impressed! ESP32 is really the swiss-army-knife of small processors.

How much support is there for getting access to features like bluetooth or I2C from Clojure?

<comment><USER9> Seems it's using Esprit ([https://github.com/mfikes/esprit](https://github.com/mfikes/esprit)) which is using Espruino ([https://www.espruino.com/](https://www.espruino.com/)) who in their reference documentation for the API ([https://www.espruino.com/Reference](https://www.espruino.com/Reference)) lists methods for both Bluetooth and I2C.

(The submitted project is with ClojureScript that compiles to JavaScript, not Clojure, to be extra specific in case someone misses the difference)

<comment><USER8> awesome! I think I'll try using Esprit instead of C in my next ESP project

</comment></comment></comment><comment><USER10> Just thought I will concentrate on javascript embedded one. Disruptive.</comment>


Show HN: D3 TimelineChart - <AUTHOR> https://github.com/commodityvectors/d3-timeline <comment><USER2> Looks nice. I've done a couple projects with a timeline, i was using this other library: [http://visjs.org/timeline_examples.html](http://visjs.org/timeline_examples.html)

comparing the two, the visjs is older with more features overall, but it seems to lack the option of having points instead of bars, like in your example.

</comment><comment><USER3> There's also this one: [https://github.com/namespace-ee/react-calendar- timeline](https://github.com/namespace-ee/react-calendar-timeline)

The documentation sucks (doesn't exist), but the component itself is pretty sweet.

</comment><comment><USER4> This looks very useful for what we need to do next at work. However, lately I've been avoiding all "layer on top of D3" libraries, in favor of understanding how to do the thing myself in D3, and just doing it that way. Sure, it's sometimes a significantly longer of a solution (300 lines vs 20), but the ability to completely change/improve any aspect of it without needing to switch libraries or dig into the library's source code or learn a new plugin system, this makes it worth the extra lines of code.

</comment><comment><USER5> In the same style, there is EventDrops: [https://github.com/marmelab/EventDrops](https://github.com/marmelab/EventDrops)

</comment><comment><USER6> Also, I make a timeline javascript widget a few years ago. Sadly, I can't open source it. I remember that then not was any decent widget or library to build an timeline.

If someone like to see it on action :

\- [http://elgreco.digibis.com/en/musobjects/timeline.html?busq_...](http://elgreco.digibis.com/en/musobjects/timeline.html?busq_concept=53)

\- [http://zardoz84.bitbucket.org/example/poli/index.html](http://zardoz84.bitbucket.org/example/poli/index.html)

\- [http://zardoz84.bitbucket.org/example/23f/index.html](http://zardoz84.bitbucket.org/example/23f/index.html)

\- [http://zardoz84.bitbucket.org/example/jfk/index.html](http://zardoz84.bitbucket.org/example/jfk/index.html)

Perhaps someday I would make a open source clone of it, with some improves that I have in mind to avoid some performance problems when there is too many elements (see the JFK example)

</comment><comment><USER7> Every time I start using a d3 library I get stuck and end up rewriting with my own code, without stuff that I don't even need, and with all the particulars that I want. Even in react. But, I often search for examples, so thanks for sharing :)

</comment><comment><USER8> Looks good, but I think the technical term for this is Gantt Chart.

</comment><comment><USER9> That's really cool! Might use this for my next project.</comment>


Show HN: Open-source Browser-based lecturing platform powered by WebRTC - <AUTHOR> https://liteboard.io/ <comment><AUTHOR> As a student, during this pandemic, I wanted a simple way to have online lectures that felt like in-person ones so I created liteboard.io ! A lecturing platform powered by WebRTC and Janus with state-of-the-art drawing tools for anyone who wants to host their own lectures!

I'm completing my second year of college next term and I would love to get some feedback on the project! Here's the Github link: [https://github.com/jeverd/lecture- experience](https://github.com/jeverd/lecture-experience)

<comment><USER2> Wow, this is great. Definitely will try.</comment></comment>


NoSQL Database Doesn't Mean No Schema - <AUTHOR> https://medium.com/capital-one-developers/nosql-database-doesnt-mean-no-schema-a824d591034e <comment><USER2> Please forgive me if I'm misunderstanding something, but hasn't Postgres basically completely subsumed the use case for schemaless datastores? I thought that in the (IMO) few cases where you want to store schemaless/sparse data, you could just use `jsonb`.</comment>


Spanish authorities raid Google offices over tax - <AUTHOR> http://www.reuters.com/article/us-google-probe-spain-idUSKCN0ZG1AC <comment><USER2> I don't think there is a justification for big corporations to do what they do and they have to be pursued. I've been working for a bank in a tax haven in Europe and I've seen that financial engineering powerful people use has been a known and accepted tool for the governments for a while, and now that Europe is living a financial crisis governments start asking.

These companies play in an absolutely different league than employees, self employed and small companies in Europe where they make you pay strictly all the taxes to mantain our social structure. They have big teams of lawyers, financial experts and advisors specialized in tax havens just to make grow their revenues in billions avoiding to pay taxes in the countries they have presence.

Totally unfair for regular people like me.

[http://www.uspirgedfund.org/reports/usp/offshore-shell- games...](http://www.uspirgedfund.org/reports/usp/offshore-shell-games-2015)

<comment><USER3> Why are you blaming the companies for acting rationally, rather than the governments for creating absurd tax environments?

I agree it's unfair, but I can't fault anyone for trying to legally minimize their tax burden. Tax law should just be simple enough that anyone can do it themselves.

<comment><USER4> I'm an energy investor and get to work with tax advisors and lawyers very often in order to maximise tax structures and cash repatriation. Everything we do is approved by tax authorities and positively seen by our shareholders. I agree to a certain extent with you that companies are acting rationally. I can assure you it's my responsibility to make the best use of these tools.

However, the direct and indirect pressure large companies exert on governments to promote/create these loopholes is absurd. I recently went to a latin american country which is promoting foreign investment. Guess what tools they are using to promote such FDI? Correct, tax credits, tax agreements with tax heavens, zero withholding taxes on dividends, etc. I won't go into more detail, but I've seen obscene (but legal) tax structures were little-to-no corporate taxes nor capital gains taxes have been paid in +billion euro transactions.

IMHO, this is unfair to everyday citizens. Citizens end up taking the burden of supporting the govt budget, at the expense of higher tax rates.

Unfortunately in the EU, there is very little interest from countries like The Netherlands, Ireland, and Luxembourg in implementing a common fiscal policy, with no loopholes, as this would considerably damage their "competitive" economies.

<comment><USER5> Ok, but that's not tax avoidance because the companies are absolutely following government rules. Given the choice of having billions of dollars of investment in their country and thousands of jobs but no corporate tax; or no investment and no jobs and no tax, those governments are making a rational choice.

The real problem comes when these deals disadvantage local businesses competing with the big foreign conglomerates. But often these deals are really only necessary because the government has set up ridiculously high trade barriers, so the only way to get investment is with ludicrously generous deals. Brazil seems to be a classic example of this. The entire economic system is tangled mess of massive market distortions.

<comment><USER6> >Ok, but that's not tax avoidance because the companies are absolutely following government rules.

You're mixing up terms here. Tax avoidance is minimizing your tax bill within the law. Tax _evasion_ is what you do when you pay less tax than your legal obligation.

</comment></comment></comment></comment></comment><comment><USER7> Google uses Bermuda (a British overseas territory) to avoid tax liability in the EU

"Google has paid €8.8 billion in fees to Bermuda," S&D group MEP Peter Simon complained. [1]

The irony being that the current president of the European Commission, Jean- Claude Juncker, was Prime Minister of Luxembourg when his administration was organising the low tax environment. [2] [3]

And now the EU claims that "the Anti Tax Avoidance Package is part of the Commission's ambitious agenda for fairer, simpler and more effective corporate taxation in the EU." [4]

[1] [http://www.euractiv.com/section/public- affairs/news/google-f...](http://www.euractiv.com/section/public- affairs/news/google-facebook-and-amazon-forced-to-face-meps-tax-questions/)

[2] [https://en.wikipedia.org/wiki/Jean- Claude_Juncker](https://en.wikipedia.org/wiki/Jean-Claude_Juncker)

[3] [https://en.wikipedia.org/wiki/Luxembourg_Leaks](https://en.wikipedia.org/wiki/Luxembourg_Leaks)

[4] [http://ec.europa.eu/taxation_customs/taxation/company_tax/an...](http://ec.europa.eu/taxation_customs/taxation/company_tax/anti_tax_avoidance/index_en.htm)

<comment><USER8> How can this still be possible? Shouldn't all tax legislation be such that if you break the spirit of it by having internal transfers (royalties, fees, interest) to a low-tax area, then you are still taxed based on the business that you had in the country in question, and not based on the net sum (i.e. zero).

The current state of tax law is that a billion dollar company pays almost no taxes but a million dollar company pays a lot. That can't be good for anyone (apart from the $1B company).

Are countries, simply put, afraid to put an end to tax schemes like this, because it would just mean that Ikea or Google would pack up and leave?

<comment><USER9> " _Are countries, simply put, afraid to put an end to tax schemes like this, because it would just mean that Ikea or Google would pack up and leave?_ "

In an "odd" application of market-competition, that is precisely what happened. Countries where Google generally did business wanted to tax Google at some X. Then along came Ireland, or Google found Ireland, and saw that they could do some legal paperwork and pay Ireland's tax rate of X-Y instead of X in the "source" countries.

The point I'm making is that Google did pack up and leave, and it will happen again unless really drastic actions are taken against them. I don't think anyone wants to do that, at this point.

You either bully _all_ countries from allowing loop holes such as this, even though they don't want to. Or you disallow Google from operating in your country if they don't pay taxes on the profit from "sales" you deem occurred in your country. Small countries that want/need that tax revenue from Google, even if it is X-Y, won't like it if you compel them into complying and causing Google to "pack up and leave". It also puts the "bullying" nature of whatever international body is tasked with enforcing this into light.

<comment><USER10> "Then along came Ireland."

This is utter nonsense. The problem is US tax repatriation laws introduced during the Clinton administration that allow US companies to leave their profits offshore in countries such as Bermuda or the Cayman Islands. Since they are only taxable on repatriation to the US, they pay no tax on them. Instead, they pressure Congress to introduce 'one-off' tax amnesties that allow them to repatriate at a much lower rate. This problem could be solved tomorrow if US politicians rescinded those tax laws. Ireland has no legal right to tax those profits, since they are earned by parent US company e.g. Google US. Which is perfectly correct, since the foundation of most of those profits are the intellectual property created primarily by the parent company. Don't let US politicians pull the wool over your eyes that this is a problem over which they have no control. In case you're interested, here's a good article that gives more background: [http://www.rollingstone.com/politics/news/the-biggest-tax- sc...](http://www.rollingstone.com/politics/news/the-biggest-tax-scam- ever-20140827)

<comment><USER11> And if they paid that tax in the US (which would then allow the US rate to be lower for the same revenue), how would that help Spain and France? The US would just be what Ireland currently is.

<comment><USER12> > (which would then allow the US rate to be lower for the same revenue)

While I'm sure it can be minimized, the US doesn't have a particularly low corporate income tax rate.

> And if they paid that tax in the US [...] how would that help Spain and > France?

Companies like Google not having to pay tax on revenues outside the US is essentially a government subsidy. One that creates a "slush fund" for US companies to acquire their European competition. We're essentially in a trade war, just that Europe hasn't realized it.

<comment><USER11> > Companies like Google not having to pay tax on revenues outside the US is > essentially a government subsidy. One that creates a "slush fund" for US > companies to acquire their European competition. We're essentially in a > trade war, just that Europe hasn't realized it.

Except that "US companies" incorporated in Ireland _aren 't_ US companies. Can't European companies also incorporate in Ireland?

<comment><USER12> No, because Google isn't paying the Irish corporate tax but instead moving the money to a second Irish company (hence the double Irish) based in the Bahamas. A European company with a subsidiary based in the Bahamas would trigger anti- avoidance laws, which a US company won't (until they bring the money back into the US) because of a loophole in the US anti-avoidance laws.

<comment><USER11> I think you misunderstand. The whole premise here is that none of the principals care where you're incorporated.

A company whose primary employees are in Europe and whose primary customers are in Europe can still be incorporated in Delaware and traded on the NYSE. These tax avoidance mechanisms aren't for "US companies," they only work if you're in practice an international company. A "European company" which is also in practice an international company could do the same by becoming nominally a "US company" without changing anything of consequence about their operations. Because international companies don't really care where they're incorporated.

The trade war isn't between US companies and European companies, it's between companies big enough to be "international" and everybody else.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> Google translate of [http://www.elmundo.es/economia/2016/06/30/5774ead6ca4741db16...](http://www.elmundo.es/economia/2016/06/30/5774ead6ca4741db168b45c9.html)

"the background of all these investigations are the lack of tax harmonization in the EU and tax strategy of the company, like others such as Apple or Twitter, for example. Sales declaring these firms in each country are unrelated to their actual billing. Subsidiaries in Spain-and other European countries act as agents of another parent company based in countries with lower tax burdens as Holland or Ireland. National subsidiaries taxed only by the minimum commissions they receive from their Dutch or Irish matrix, most of the turnover recorded paying minimum tax rates."

</comment><comment><USER14> I would expect google to keep all financial documents inside Google Drive. In doing so, I wonder what is left in the office for the Spanish authorities to find in a raid? (Google is ruthlessly paperless internally.)

<comment><USER15> Spain, and other Euro countries, have "paper" laws. Everything needs to be printed out and stored to make raids like these easier on the government. It also keeps their tax authority from ever having to worry about modernizing and, frankly, makes it easier for the government to manufacture "irregularities."

I think the financial crisis in some of these EU countries have reached a point where they are politically paralyzed (can't move to the right due to strong leftism in the electorate) so they'll just find a way to milk multi- nationals to keep the lights on. This isn't a long term strategy and is a sign of some bad stuff coming up. I believe in the long run the welfare state is unaffordable and without a move to the right these countries will suffer, especially as business moves to more tax friendly jurisdictions and leaves these markets over government abuse, low sales, low margins, etc.

Currently, Spain has 25% unemployment and almost 50% for those under 25. The GDP is falling at the same rate it is for France and Italy. The sudden interest in these countries to raid multi-nationals for tax reasons is no coincidence here. France just raided Google's office last month. I suspect Italy is next.

<comment><USER16> You are presenting a completely biased and anti-european view, looking at multinationals with the most rose tinted glasses.

Google, like many other multinationals pay absolutely minuscule taxes. They have eradicated large parts of national advertisement companies across Europe, who all have to pay normal tax rates, while Google pays close to zero.

You are not a leftwing nutjob just because you want companies to pay taxes for the money they earn in your country. A free market relies on a level playingfield and when multinationals can exploit loopsholes in this manner it distorts the competition.

I am not sure why you single out Euro countries as not interested in modernizing. I can't speak for other European countries but I can speak for Norway where I am from and our taxation system is decades ahead of archaic mess found in the US e.g. The fact that a large part of the American population have to pay professionals to fill out their taxes says something about the complexity and backwardness of the system.

<comment><USER17> > You are not a leftwing nutjob just because you want companies to pay taxes > for the money they earn in your country. A free market relies on a level > playingfield and when multinationals can exploit loopsholes in this manner > it distorts the competition.

How would you decide what money they earn in your country? It's a tricky question for multinationals.

<comment><USER18> It is indeed, and the recent spat of seemingly-illogical laws commonly known as "vat-mess" is the first step in trying to clarify that.

The internet is a real mess for anything that has to do with jurisdiction, which is the underpinning of taxation. Free flow of capital could be acceptable when goods were eventually involved, since their physical presence decided jurisdiction; as goods become similarly immaterial, new parameters are required. The current "equilibrium" is anything but.

</comment></comment></comment></comment></comment><comment><USER19> I heard someone related to the Paris office raid comment when that happened. She was saying that multinational corporations always say that their organization and tax schemes are legal but that in reality it's so complex and spread in multiple countries that nobody really knows for sure and so it's only legal by default.

<comment><USER20> Isn't that true for almost everything though? The laws are so complex that no normal citizen can understand them. Even lawyers seem to disagree now and then.

<comment><USER21> Tax law is a math problem. Google is a company run by math nerds. Of course they are going to solve for X.

<comment><USER22> Its also a law problem, so I would have expected Apple to have solved it first.

<comment><USER23> Well, the Double Irish was invented by Apple...

</comment></comment></comment></comment></comment><comment><USER24> Remember that Google was also raided in Paris almost exactly one month ago [1].

[1] - [https://www.theguardian.com/technology/2016/may/24/google- of...](https://www.theguardian.com/technology/2016/may/24/google-offices- paris-raided-french-tax-authorities)

<comment><USER25> I'm going to hazard a guess. The french did found something useful to crack google down in that raid and gave their buddies in Spain a nudge so they can combine the efforts and maybe strike a big one against the Double Irish.

<comment><USER26> I don't know. It's just as likely they found nothing and asked the Spanish to take a second crack at it. Irish tax law is stupid enough already. Europe sounds like they are jumping the gun.

</comment></comment></comment><comment><USER27> This is ridiculous and a form of bullying. If you want multinationals to pay tax, fix the laws. Were they really expecting Google to fake anything? No, they were looking to cause bad press. Form international alliances and create a proper incentive structure if you want to collect.

<comment><USER28> Google's tax avoidance is likewise ridiculous. Neither the bullying, nor the avoidance are illegal. If you support one, you should support the other.

</comment></comment><comment><USER29> Another PR stunt of the minister, Montoro. No more than that. He also makes public a lost of debtors to the IRS (which should be illegal but he gets away with anything).

Edit: Spaniard here.

<comment><AUTHOR> "should be illegal" means it is not.

What exactly is your point? Shaming debtors of the country is not ok?

<comment><USER30> Well, I suppose anyone who is a debtor to the IRS is a criminal . In The Netherlands it isn't legal to use the full name of a criminal in any publication, so it could be that the EU is a bit different in the way it treats criminals.

<comment><USER29> You are innocent until a judge declares you are not. Even in tax evasion.

Edit: sorry, I misunderstood your comment...

</comment></comment></comment></comment><comment><USER31> Why can't Spanish (and French) authorities simply subpoena any info they need from Google? Is Google able to shield relevant data by keeping it in Ireland or the US?

<comment><USER32> If they feared that Google might destroy evidence a raid makes sense over subpoenaing. It's also bigger and flashier so if the government wanted to make a show of it and 'send a message' (either to other companies or just seem to voters like they're being tough on companies dodging taxes (legally)) that's another reason that they'd go with a raid.

</comment></comment><comment><USER33> From _El País_ , a little over an hour ago:

 _In the case of the Spanish subsidiary, the Tax Office is analyzing why Google pays so little tax in Spain despite making multimillion-selling. With this action, the Agency 's technical investigators seek to determine if the international structure of the world's leading Internet search engine is not legitimate. Toward this aim they will try to prove that functionality the group attributed to its Spanish subsidiary are less than they actually performed._

 _The record is linked to an investigation into possible tax evasion. The company, known for its Internet search engine, has spent years in the crosshairs of Finance for its tax system, as part of their income managed through Ireland. Thus, it could be artificially reducing its business in Spain and lowering its tax bill._

Tax Office searches Google Spain and Google Ireland for evidence of tax fraud

[http://economia.elpais.com/economia/2016/06/30/actualidad/14...](http://economia.elpais.com/economia/2016/06/30/actualidad/1467280502_356974.html)

</comment><comment><USER34> Panama Papers showed a significant fraction of EU officials stash money in low tax havens. Icelands PM resigned as a result. The Panama Papers was a leak of terabytes of documents from a legal office who sets up these corporations and accounts.

Ironically the USA is a top tax haven due to anonymous shell corporations you can create in several states. Lots being stashed here due to anomymity and economic safety.

<comment><USER35> The US is a pretty poor corporate tax haven. Our corporate rates are higher than pretty much everybody in the EU (including soon-to-be-out-of-the-EU Britain). It's one of the major contributing factors to corporate inversions (the moving of corporate headquarters out of the US) and companies like Apple not bringing overseas profits back to the US.

</comment></comment><comment><USER36> This reminds me of Zooloander smashing the iMac on the ground trying to find file/folders

</comment><comment><USER37> Actually, I find the bouncing around of fees and payments behind these internet companies very complex, and maybe even justified to some extent. The value-add that generates the taxable income is almost entirely elsewhere.

Let's say Google Spain got €100M in revenue and had €20M local expenses (mostly sales, local support and localization). Now, say they owe €30M to US HQ for the service, servers, R&D, IP, support, etc... among other expenses. (For simplicity, let's suppose everything is hosted and originates in California.)

That leaves Spain with €50M in profit, ready to be taxed by Spanish tax authorities. This sounds quite out of proportion. The great value-added is not in Spain, it's in the US.

Google HQ could easily establish Google Spain owes €80M in service costs, thus local profit is nil. To me that's fair: corporate has the right to charge whatever they see fit for their services and collect profits accordingly.

They way I see it, paying fees to the Bermudas is a US, not Spain, tax evasion problem.

<comment><USER38> Going to be honest, a little confused where the Bermudas or the US comes into this...

Apparently this is regarding Google reporting the bulk of their sales out of Ireland and therefore not paying taxes in Europe? This is based on _maybe_ a loophole where Google makes sure to have Ireland staff conclude all sales contracts...

</comment></comment><comment><USER39> This all points back to the Multilateral Agreement on Investment, which reveals the intention of transnational corporations to try to limit sovereignty. It didn't pass but it's terrific object lesson (especially in the aftermath of Brexit).

The irony is that the _economic incompatibility thesis_ claims liberalization of capital tends to undermine free trade, because capital flows make very volatile markets, ultimately making it much harder for trade to take place. So what happens is the reaction to freeing up capital is increased protectionism which is what's generally happened since the '70s.

[https://en.wikipedia.org/wiki/Multilateral_Agreement_on_Inve...](https://en.wikipedia.org/wiki/Multilateral_Agreement_on_Investment)

</comment><comment><USER40> Could this be why Google calendar is down?

Is Google going Galt? :)

<comment><USER41> What do you mean by that? Is Google going to pay all the "content" producing Galts that it profits off (and has never paid)?

</comment></comment><comment><USER42> I wonder what they expect to find? Or whether it is just a display of force.

<comment><USER43> _> I wonder what they expect to find?_

Paperwork that contradicts statements the company has made, which would be shredded long before an inspector's arrival should a more formal appointment be arranged.

 _> Or whether it is just a display of force._

This is usually a factor in such raids too, but it only works if there is a chance something might be found so they wouldn't do it _purely_ as a show of force.

<comment><USER44> So, I'm not an expert in tax evasion, but if you give false statements to the tax office, why would you keep statements that can bring you down on paper in your office?

<comment><USER43> Business as usual.

The false statements are saying that "business as usual" is something else.

If BaU _isn 't_ something else then the statement isn't false and there is nothing to find (the paperwork will match the statements made).

</comment></comment></comment></comment><comment><USER45> IMO Google is so rich and so profitable that it could afford to pay all taxes due in all countries fairly, without any "optimization", while staying profitable and not undermining any R&D program or long-term project.

<comment><USER46> Google's infrastructure is almost all custom. There's a lot of people who would be out of a job if there was suddenly a >30% premium added to Google's infrastructure when compared to OEMs. If you want the laws to change, change the laws. The issue is the government, not the companies that are simply playing by the rules.

<comment><USER16> "Simply playing by the rules". No they aren't. They are paying a small fortune to figure out how to avoid paying taxes by following the letter of the law. However they break the spirit of the law, and hence are not playing by the rules.

This is not different from using drugs to win sports which hasn't yet been banned because it is too new. Strictly speaking it is legal, but it is both immoral and unethical.

The problem with depending on every possible behavior being described in the law and closing every loophole is that that would create a very draconian legal system nobody wants.

It is the same as with contracts between two parties. It is easy to screw each other over if one nitpicks about everything and don't follow the spirit of the contract. However the problem with such behavior is that it dramatically increases transaction costs, because one can not trust each other and have to make extremely complicated legal contracts.

I've noticed when dealing with American how the lack of any trust, makes any kind of business deal very expensive. Contracts are completely over the top.

I don't think this is how one wants society to develop. Parties in an economy have to be able to play fair with each other most of the time without resorting to ever more insane details and regulations.

<comment><USER46> I run a rental business and purposely purchase products that I need for personal use such that it can be deducted as a rental expense. As long as I use it >50% for rental stuff it's tax deductible.

Should I feel bad?

More specifically, does this violate the "spirit of the law?"

Even more specifically, every other rental owner does the same thing, so even if I change my behavior, I'm at a disadvantage with my competitors.

Again, your issues are with the government, not the companies that are following the law.

</comment></comment></comment></comment><comment><USER47> Don't be evil

</comment><comment><USER48> Pay Google pay! As everyone else!!

</comment><comment><USER49> Spain shaking down Google, while the US shakes down VW. A trade war by any other name...

<comment><USER50> I don't see how you can possibly make this comparison. What VW did is so much worse than legal but creative tax strategies. VW deserves to pay for all of the harm it did to the environment and our lungs.

<comment><USER51> Yes, just like GM, BMW, Mitsubishi, Hyundai, Ford, Fiat do.

All of which bought and used the _exact same_ defeat device.

So why is only VW being punished, and why almost 1.5 years after the EPA learnt about it?

<comment><USER50> Do you have a source? Those are extraordinary claims. I'm not aware of any other cheating anywhere close to the magnitude of what VW did. Also, what "defeat device" are you talking about? VW's cheat was in software; it wasn't some specific device.

And are you seriously surprised that it can take 1.5 years for a massive multi-billion dollar lawsuit to wind its way through federal courts? If you think 1.5 years is long, look at the Exxon-Valdez settlement, parts of which are still unpaid 28 years later!

<comment><USER51> The "defeat device" was a specific piece of software that Bosch provided with the chips they sold.

Also, it was 1.5 years from discovery to investigations being started.

And regarding the claims: They're not extraordinary. 4 companies have been in the original report that incriminated VW, others incriminated themselves [1], etc.

Germany is deciding to ban GM cars in Germany because they used the same defeat "device" VW used but refuse to fix things, etc.

[http://money.cnn.com/2016/04/26/news/companies/mitsubishi- ch...](http://money.cnn.com/2016/04/26/news/companies/mitsubishi-cheating- fuel-tests-25-years/index.html)

[http://www.autobild.de/artikel/dieselabgas- manipulationsvorw...](http://www.autobild.de/artikel/dieselabgas- manipulationsvorwuerfe-gegen-opel-7063673.html)

It's everywhere on the news here that all manufacturers did it. I'm surprised you haven't heard of it yet.

<comment><USER50> The wheels of justice grind slowly but exceedingly fine. VW is the largest and first target to be taken down, but hardly the last. I don't think your expectations of all of this getting resolved very quickly are realistic. Mitsubishi is currently being investigated by US regulators as of this past April, and will probably be charged on a similar timeline as VW. Keep an eye out for it. [http://www.reuters.com/article/us-mitsubishimotors- regulatio...](http://www.reuters.com/article/us-mitsubishimotors-regulations- usa-idUSKCN0XJ042)

As for the Germans taking on Chrysler, good. If Chrysler did it then they should pay, same as VW has and Mitsubishi is going to. [http://www.autoblog.com/2016/05/23/germany-fiat-chrysler- ban...](http://www.autoblog.com/2016/05/23/germany-fiat-chrysler-ban-diesel- emissions/) No one deserves to develop lung disease because some stupid manufacturers decided to cheat on tests rather than passing them. I still don't see how this is a trade war, when it clearly looks to me like an environmental enforcement issue.

</comment></comment></comment></comment></comment></comment><comment><USER52> Ironic, how a corrupt government tries to pursue corruption.

</comment><comment><USER53> Even Google Campus :/

</comment><comment><USER15> >Not sure why you're being downvoted.

HN is pretty intolerant of anything that isn't the far left, which is a bit ironic for what's supposed to be an entrepreneurial forum. This change seemed to happen a year or two ago. I suspect HN has been fully "redditized" now with college identity politics being the prominent narrative. The drive-by downvotes are just a symptom of that.

<comment><USER54> (Off-topic meta-conversation.)

HN tends to downvote _any_ political comments, especially comments that turn the discussion _more_ political, even in a story that already tangentially touches on politics. The HN guidelines more-or-less document the former; the latter seems like a natural consequence. In general, politics is almost always off-topic here; there are many other places to discuss politics.

(Personally, I tend to agree with [http://lesswrong.com/lw/gw/politics_is_the_mindkiller/](http://lesswrong.com/lw/gw/politics_is_the_mindkiller/) .)

Downvotes are a symptom of that: people downvote politics they disagree with and upvote politics they agree with. Politics, more so than many other topics, tends to bring out "downvote = disagree", not just "downvote = not a contribution". That's _in addition_ to the people (myself often included) who downvote any comment that turns the discussion more political, because such comments typically reduce the quality and novelty of the discussion.

<comment><USER15> >HN tends to downvote any political comments

This is, by far, the most political site I go to. The top comments are often politicized and the top stories are typical social media "outrage" stories.

I think you're painting a picture of HN that really doesn't exist, but did probably long ago. HN now suffers from the 'eternal September' many popular forums do. Techy forum participants are often high school and college students with far left anti-US views common in youth. Its no surprise that these viewpoints are the dominant narrative here.

I imagine there are people who downvote all politics, but they are clearly a minority here. The downvote button is just a agree/disagree button in practice and shows an obvious political bias.

<comment><USER12> Your the one creating the "eternal september" discussion in this thread. You take a story about international trade and make into a left-right issue, promoting your pet opnion that Europe have moved to far to the left. Then you turn the whole thread into meta by complaining how HN is turning into reddit (something so common it even is warned against in the guidelines).

Not only are your comments utterly predictable, and therefor uninteresting, they are factually incorrect. It's often the right wing that want to protect the local market. The US just forced China to limit subsidies on exports [0]. The UKs exit of the EU is largely a result of the left wing not being able to convince their votes, in favor of right wing conservatives.

That Europe has turned to the left as a result of the financial crisis is also not substantiated [1][2]. The few countries that have in recent years are have all been forced to enact (right wing) economic reforms. Including Greece, France and Portugal. Which is why people are protesting, not because they have suddenly become more leftist.

If you think HN has become leftist it's very likely that you are simply older than most people on HN. Young people today, whether they consider themselves left or right, are forced to care about things like housing, healthcare, employment and other issues that were previously considered left wing because society is changing.

[0] [http://www.ft.com/cms/s/0/4f4d1240-024a-11e6-99cb-83242733f7...](http://www.ft.com/cms/s/0/4f4d1240-024a-11e6-99cb-83242733f755.html) [1] [http://1.bp.blogspot.com/-q8uKkXy8X4I/TjH0passYGI/AAAAAAAAGV...](http://1.bp.blogspot.com/-q8uKkXy8X4I/TjH0passYGI/AAAAAAAAGVE/_lo4iVOcQBA/s1600/leftright2.jpg) [2] [http://ichef-1.bbci.co.uk/news/800/cpsprodpb/1D03/production...](http://ichef-1.bbci.co.uk/news/800/cpsprodpb/1D03/production/_89772470_eu_far_right_23052016_624map.png)</comment></comment></comment></comment>


If It Ain't TypeScript It Ain't Sexy - <AUTHOR> https://developer.okta.com/blog/2019/02/11/if-it-aint-typescript <comment><USER2> > Naively, someone might think you'd write fewer tests with TypeScript. That > someone would be wrong.

Have you seen unit tests that check "what if I don't send the right number/type of arguments"? Yeah those unit tests are not necessary if you use TypeScript.

<comment><USER3> They're not necessary in JS either.

You'd presumably have at least some tests in the form of "Give these input, get that output". By checking that output, you pretty much confirm its the right type at the same time.

I've seen a lot of test suites that have stuff like:

"given input A, test that result is defined. Given input A again, test that result is 1234". It's like, yo, if result is 1234, its obviously defined.

There are edge cases, so yeah, the amount of tests you don't write in TS is > 0, but it's far and few in between.

<comment><USER4> It was pretty common to write runtime type assertions at the top of functions in JS before TS was invented...

<comment><USER3> Different topic than unit tests, but also if its in the public interface of your code and you don't control all callers, you might need those assertions anyway (since they could be invoked from non-TS code, or they could have been cast to a any type, especially in non-strict mode TS)

</comment></comment></comment></comment><comment><USER5> If you maintain a popular public project, you help the entire JavaScript community if you use TypeScript, because then you can ship perfectly accurate type definitions along with your code. Even if the user is using plain JavaScript, their editor can probably use those type definitions to provide coding assistance.

Also, it's hard to call something a "leaky abstraction" when it's a superset of the thing it sits atop.

<comment><USER6> True, it's not the same kind of leaky abstraction you find with other technologies. I'm thinking more about the newcomer to JavaScript/TypeScript, who has only focused on the latest language features, trying to get a grasp of what is going on in the ES5-compatible code that gets generated.

Same is true with relying on Babel, of course.

<comment><USER7> More so than any random Babel preset someone might hand a new developer, though, Typescript has been pretty strict at this point towards staying strictly to ES Stage 3+ proposals. (And the few exceptions [enums, namespaces] are all common JS patterns that just about anyone should recognize the generated code, and are easy enough to avoid if you want to be more strictly ES Twenty Xteen+Types.)

(Also, the current Babel wisdom of "last two browser versions" suggests that ES2015 or ES2016 is the compatible downlevel of choice in 2019, rather than ES5.)

</comment></comment></comment><comment><USER8> I love TypeScript. It's like the good parts of Java (classes, type-checking, good support for service-based programming models) with Javascript goodness like handy functional programming tricks, concise code, reactive programming, and not having to worry about concurrency.

The biggest problem is that it lacks document that rolls up TypeScript _and_ Javascript underpinnings in one place. As it is you can't just read the TypeScript docs at [https://www.typescriptlang.org/docs/home.html](https://www.typescriptlang.org/docs/home.html) and get started. Or rather you can but you'll promptly run into many cases where you can't reason effectively about behavior because you don't understand how Javascript works. (E.g., iterating over collections of Javascript entities.)

There have been a bunch of projects to create a better Java. TypeScript looks like one of the best attempts so far, in part because it broke free of trying to remain compatible at the VM level. It does not deal with every use case for that reason but looks like an excellent language for microservices. Interestingly the origin as a client-side language is not that different from how Java was first marketed...

Edit: Moved reactive programming to the javascript side of the fence (what was I thinking?)

<comment><USER9> > I love TypeScript. It's like the good parts of Java (classes, type-checking, > good support for service-based programming models) with Javascript goodness > like handy functional programming tricks, concise code, reactive > programming, and not having to worry about concurrency.

This, 100%. And I'm saying that as a guy who's been writing Java for the better part of 10 years.

</comment></comment><comment><USER10> > TypeScript doesn't absolve you from learning JavaScript. When things go > awry, you've still got to be able to spelunk the JavaScript code it > produces.

TypeScript code is still 90% regular ES6 JavaScript, of course. That said I very rarely need to go grepping through the transpiled code.

<comment><USER11> Do you debug TypeScript code? If I get the code on the browser to place a breakpoint, it's JavaScript there, is there some way to transpile it so it carries the extra information?

<comment><USER12> That's what source maps are for (same situation as if you use ES6 and/or a framework and end up transpiling via Webpack etc)

<comment><USER3> sourcemaps are buggy as hell though (browser's devtools, and just generally the specification's problem, not TS's), and a lot of devtool features don't work with them. Debugging non-trivial problems with sourcemaps on is infuriating. It's really rare (though it happens every now and then in complex software) to have to go down to bytecode or native in something like C#, but in JS/TS/whatever, it happens all the time.

</comment></comment></comment></comment><comment><USER13> The problem I have with TypeScript isn't the language itself, but the illusion of type safety that it gives you. It gives you a better developer experience at compile-time, there's no doubt there. My problem is once TS is transpiled, all type-related bets are off. You can easily find yourself in situations at runtime where a string is passed into to a function that's expecting a number. You may not get an actual runtime error, instead you might just see unexpected behavior. I've had to fix bugs due to this situation more times than I can count (I didn't write the original code) in our Angular app.

<comment><USER14> That's the problem with JavaScript, not TypeScript. TypeScript doesn't eliminate that problem but it doesn't cause it either.

TypeScript does heavily mitigate that problem by verifying all the types that it can at compile time.

</comment></comment><comment><USER15> > Type-checking only helps with one class of bugs that can occur in a codebase

TypeScript is not only about eliminating bugs, for instance maintaining a large project is much easier comparing to Javascript.

However, A lot of teams would still use Javascript for small backend applications, and the best example is Lambda functions! With rising popularity of Serverless architecture JS is here to stay for backend.

While TS will remain a good alternative for many things of course.

<comment><USER16> You'd be surprised the number of places you can use TypeScript where only JS is supported. Most recently, TypeScript allowed me to easily use modules and ES2018 syntax with the legacy, somewhat terrible Google Apps Script JS engine, thanks to Clasp: [https://github.com/google/clasp/blob/master/docs/typescript....](https://github.com/google/clasp/blob/master/docs/typescript.md)

I often find merely searching for a typescript-compatible solution helps me discover some of the safest and bug-free options quickly, avoiding legacy jQuery-era projects.

</comment></comment><comment><USER17> I generally like Typescript, but I find it frustrating that it doesn't include a useful standard library. Instead, we're stuck with Javascript's bare bones of a library, which means a lot of thing that can be done in other languages just using their library, need to either code from scratch, or import from a 3rd party library.

<comment><USER16> Don't overlook the number of options available out of the box with the —lib parameter: [https://www.typescriptlang.org/docs/handbook/compiler- option...](https://www.typescriptlang.org/docs/handbook/compiler-options.html)

In many ways, I prefer this approach—it means TypeScript as a language will stay compatible with JavaScript, and keeps options like Babel 7's outright removal of TS types easily done. If you need a feature JS doesn't have, import it, or pick a browser or runtime API. Seems simple enough to me. :)

<comment><USER17> > Don't overlook the number of options available out of the box with the —lib > parameter

Thanks! I honestly wasn't aware of that at all!

> it means TypeScript as a language will stay compatible with JavaScript

If Typescript's library was written in JS, then the elements that were needed can be compiled down and included with your code.

> If you need a feature JS doesn't have, import it, or pick a browser or > runtime API

I really appreciate standardization—that way everyone is on the same page with basic methods. I don't have to worry about learning multiple versions, or worry that code I'm reading is doing the same thing in a slightly incompatible way. Or listen to people arguing about those same minor differences :-)

</comment></comment></comment><comment><USER18> The ugly: It is still javascript....

I heard this argument against CoffeeScript. At the time CS was still fucking amazing. And I loved it. Sure now people roll their eyes because JS has all the features coffeescript had, but not the indentation-based logic flow... Whatever. CoffeeScript 4 lyfe!

In any case, I see it as a positive. This is just like saying at the end you still gotta know Assembly to write in C...

Also they forgot to mention. Interfaces. Fuck I love interfaces. Self documenting code? Yes please. Awesome auto-completion from tools? Yes please. Sure if you develop in the caves like cavemen and use VIM only without anything to help you, sure, TS is slower. But the point is that amazing dev tools are amazing.

The problem with languages is when the type system isn't strong enough in some cases, but too strong in others. It would be nice for prototyping to use `var` and let the compiler figure the type out. However it would be awesome to write a method that says position 1 is a number between 1 and 100.

<comment><USER19> > The problem with languages is when the type system isn't strong enough in > some cases, but too strong in others. It would be nice for prototyping to > use `var` and let the compiler figure the type out. However it would be > awesome to write a method that says position 1 is a number between 1 and > 100.

Out of curiosity, which of those two cases do you think of as having too strong a type system? To me, both of them (type inference and numeric bounds at the type level) seem like they require a stronger type system to fix, not a weaker one.

</comment></comment><comment><USER20> > TypeScript requires a build step. That might be enough reason for a > JavaScript developer to say, "No, thank you."

In my experience most JS developers have other considerations. Tests are also a build step, so good chance a codebase already has those.

</comment><comment><USER21> Never got the answer: [https://news.ycombinator.com/item?id=18978404](https://news.ycombinator.com/item?id=18978404)

<comment><USER22> All of Airbnb? All of Facebook (in Flow)? All of Palantir, Coinbase, and Stripe?

No one answered that post because your history proves that you are not asking in good faith.

<comment><USER21> Interesting claim about Airbnb or Facebook. Thanks for an answer didn't knew it and I was seriously interested. I always ask to get answers - in good faith for me and others. No idea why you stalk my history and make false assumptions.

<comment><USER22> Haha Jesus. I originally saw this post because you linked to it from another crazy uninformed rant on ts, not because I "stalked your profile." Get a grip.</comment></comment></comment></comment>


Small C Compilers - <AUTHOR> https://bootstrapping.miraheze.org/wiki/Main_Page#Small_C_Compilers <comment><USER2> I love c4. The author writes very readable and simple code. I recommend trying out swieros as well "a tiny Unix like kernel": [https://github.com/rswier/swieros](https://github.com/rswier/swieros)

<comment><USER3> [https://github.com/rswier/c4/blob/master/c4.c](https://github.com/rswier/c4/blob/master/c4.c)

Holy what

<comment><USER4> Instead of just gazing at the sea of terse variable names in awe, try actually reading it! There's only about a dozen variables and they're all documented at the top - the actual code is actually amazingly clear for what it does. There's not a lot of gratuitous cleverness.

For example, just picking a random segment, you don't have to squint very hard to see that this is a number literal parser:

      else if (tk >= '0' && tk <= '9') {
            if (ival = tk - '0') { while (*p >= '0' && *p <= '9') ival = ival * 10 + *p++ - '0'; }
            else if (*p == 'x' || *p == 'X') {
            [...goes on to handle the hexadecimal case...]

(aside - I love the conversion from string to decimal by subtracting the string value of '0', as this will work for any text encoding where the decimal digits are monotonic and contiguous - so ASCII and EBDIC at least...)

<comment><USER5> > _I love the conversion from string to decimal by subtracting the string > value of '0'_

That's how everyone did character arithmetic since forever, though, especially with the letters. Wouldn't be surprised if it's in K&R. And it probably became a subtle source of errors when environments changed, as mixing semantics and implementation tends to do.

</comment></comment></comment></comment><comment><USER6> In this vein, and related to the Trusting Trust Attact section, I recently came across an x86 project that works to boostrap from nothing, reling on zero external software, even for compilation.

To that end it is organizes into "phases" where the lower levels bootstrap the higher ones, with level zero essentially coding directly in x86 opcodes.

I really want to dig into it more, but for the life of me cannot find the github page again. Any ideas?

<comment><USER6> Aaaaand, serendipidously, I just now stumbled upon it in an HN post a bit below this one:

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

That article mentions the project I was thinking of:

[https://github.com/oriansj/stage0](https://github.com/oriansj/stage0)

Amazingly, it seems they are even aiming to boostrap some minimal hardware as well! Super cool.

<comment><USER7> for some reason, I missed your reply to your own comment completely!

</comment></comment></comment><comment><USER8> What about the Tiny C Compiler (TCC) that Fabrice Bellard wrote? [https://bellard.org/tcc/](https://bellard.org/tcc/)

<comment><USER9> it not tiny anymore :-)

<comment> ainar-g Could I ask you what do you mean by that?

<comment><USER10> Not sure what the parent means by it, but here is lines of code data generated using David A. Wheeler's 'SLOCCount'.

        SLOC Directory SLOC-by-Language (Sorted)
        36270   top_dir         ansic=35504,sh=460,perl=306
        28825   win32           ansic=28716,asm=109
        9692    tests           ansic=8806,asm=858,sh=28
        2395    lib             ansic=2252,asm=143
        158     include         ansic=158
        140     examples        ansic=140

        Totals grouped by language (dominant language first):
        ansic:        75576 (97.54%)
        asm:           1110 (1.43%)
        sh:             488 (0.63%)
        perl:           306 (0.39%)

As far as I can tell, the top-level directory is the actual compiler itself. 35k lines is pretty small for a real C compiler that can bootstrap GCC (the versions that were still written in pure C).

<comment><USER9> What I mean is what I said :-) 70k is not tiny. And one cannot just throw away a backend and say that it's not part of the compiler.

Compare it with a few others:

8cc/9cc - 10K LOC cproc - 7K LOC lcc - 30K LOC

<comment><USER10> > And one cannot just throw away a backend and say that it's not part of the > compiler.

OK. Let me rephrase: TCC doesn't have 35k lines of code, but with five minutes' work it could be turned into a compiler with 35k lines of code capable of bootstrapping GCC _on Linux_. That should be enough to compare it to the ones you list.

<comment><USER9> That's an interesting way to put it. :-D I believe we could do that to a lot of other compilers, say, lcc (30k) with its multiple backends and get something like 10-20k.

Anyways, what I was trying to say is that "tiny" in "tinycc" has lost its meaning already.

</comment></comment></comment></comment></comment></comment></comment><comment><USER11> There is also [https://git.sr.ht/~mcf/cproc](https://git.sr.ht/~mcf/cproc) inspired by several other small C compilers including 8cc, c, lacc, and scc. I did not take a deep look at it yet, but it looks interesting.

</comment><comment><USER12> I wonder why LCC isn't mentioned. [https://en.wikipedia.org/wiki/LCC_(compiler)](https://en.wikipedia.org/wiki/LCC_\(compiler\))

<comment><USER13> and [https://bellard.org/tcc](https://bellard.org/tcc)

</comment></comment><comment><USER14> This one is fantastic: [https://github.com/michaelforney/cproc](https://github.com/michaelforney/cproc)

</comment><comment><USER15> I've tried to use TCC to see if it's possible to use it as a scripting language in a C++ project, and it seems to work pretty well.

(I've heard about chaiscript, but it seems way too big)

<comment><USER16> Genuine curiosity, it seems smaller than tcc? Is it by loc, by runtime mem used, by exec size ?

</comment></comment><comment><USER17> There's also this amazing thing: [http://www.simple- cc.org/](http://www.simple-cc.org/)

<comment><USER18> Anyone know what they're using for the repo web UI? [http://git.simple- cc.org/scc/](http://git.simple-cc.org/scc/)

<comment><USER19> Pretty sure it's this: [https://git.codemadness.org/stagit/](https://git.codemadness.org/stagit/)

</comment></comment></comment><comment><USER20> These look neat but they all seem to be targeting a subset of C (e.g. no struct support) instead of the full thing (even if we include stdlib). Only exception seems to be SmallerC (which as expected is larger than the other compilers/interpreters that only support a subset).

<comment><USER21> I made a branch of c4 that includes struct support. I should probably add it to the master branch so it gets more visibility: [https://github.com/rswier/c4/blob/switch-and- structs/c4.c](https://github.com/rswier/c4/blob/switch-and-structs/c4.c)

</comment></comment><comment><USER22> Say I wrote my own CPU (which I did), which of those tiny C compilers would be easiest to retarget?

My CPU is _very_ small, (~300 LUT4 on an FPGA using Yosys), but has a very minimal ISA. It's mostly an accumulator machine with a stack pointer.

<comment><USER23> I'm interested in what you mean by "wrote my own CPU". Could you elaborate please?

<comment><USER22> [https://github.com/pepijndevos/seqpu/blob/master/cpu.vhd](https://github.com/pepijndevos/seqpu/blob/master/cpu.vhd)

</comment></comment></comment><comment><USER24> Unfortunate that "CUCU", "C Interpreter", and "Small C for I386 (IA-32)" are already dead links, although the page history shows that it was created only a little over 2 years ago.

<comment><USER25> Sorry, blog layout has changed since then. [https://zserge.com/posts/cucu- part1/](https://zserge.com/posts/cucu-part1/)

<comment><USER26> You might want to fix the links so the old URLs work again.</comment></comment></comment>


Ask Polly: I Hate My Job and Feel Like a Fraud. What Should I Do? - <AUTHOR> http://nymag.com/thecut/2014/09/ask-polly-i-hate-my-job-what-should-i-do.html

<comment><USER2> _I love going to court and showing off, but that 's the only thing I love, and it doesn't happen all that often. I like people, and talking and attention, and not sitting at my desk doing boring shit. ... People are fooled every day into thinking I'm working hard, but I'm not. I'm phoning it in. I usually get pretty good results, and I am super-good at faking my way through. I win, for the most part (more than half the time, which is a pretty good average). But I really don't care all that much. I just can't get it up for this job, and this job requires a giant, ever-lasting boner — for details, for being correct, for rules and regulations and other people's shitty problems._

 _When I think about what I want to do, it 's all "have a nice vegetable garden and make muffins and ride my bike and throw parties and have babies" ...I'm passionate about things, but not career things. Family things, book things, living-the-good-life things. I like to hike, I like my friends. I like vacations. I like restaurants and barbecuing wild-caught salmon while drinking dry rosé._

Such profound honesty. I'm touched, quite frankly. No really I am. I'm sure most of us overlap at least 50% (or have at some point in our careers), we just don't have the courage to admit it, even to ourselves.

<comment><USER3> Maybe its more an attitude problem. I like those things; a job enables them. Maybe this author is well-off enough to afford to indulge every desire. If not, too bad - suck it up and go to work like the rest of us.</comment></comment>


IOS 5.1: Using the New Lock Screen Camera - <AUTHOR> http://www.macobserver.com/tmo/article/ios_5.1_using_the_new_lock_screen_camera/ <comment><USER2> If it means I won't get another hour-long recording of the inside of my purse, then it's brilliant. Making it slightly harder to trip that mode sounds like a good thing to me.

</comment><comment> jan-hocevar Looks cool!</comment>


Making hybrid android apps with native like performance - <AUTHOR> http://manzzup.blogspot.com/2014/02/making-hybrid-android-apps-with-native.html

<comment><USER3> I can see the html (in the example on github), the JavaScript and the CSS but I can't see any Android. Where is the Java code actioning an event? Where is the hybrid bit?

<comment><AUTHOR> github source is just the framework, it's like the jQuery framework. You have to make the HTML page and then run it on a webview component more on that -> [http://manzzup.blogspot.com/2014/01/write-android-app-for- yo...](http://manzzup.blogspot.com/2014/01/write-android-app-for-your-site- in-5.html)

<comment><USER3> OK - there is a bit more at that link. Suppose I wanted to get my current GPS location and pop it on the page/screen?

In the example you indicated, the HTML etc. is downloaded from a web site - <USER2> does the app need an Internet connection to run?

I can see where you are going with this but (with all due respect) I can't see a framework as yet.

<comment><AUTHOR> no internet connection need unless the app function requires it, jsut like a native android interface, the html files are bundled with the app. I agree that this isnt a framework by definition, but it functions as one</comment></comment></comment></comment>


Ask HN: How did you switch to mobile-phone free lifestyle? - <AUTHOR> Those who don't own a mobile phone or who don't use it regularly, how did you manage to switch to mobile phone free lifestyle? How do you manage your day to day life, do you feel alienated? Please share your tips and tricks for those of us who want to take the plunge. <comment><USER2> I turned off all the unnecessary notification like Twitter, Facebook, Messenger... etc. both on my computer and smartphone, I only check them when I have a little spared time to do so. They started to disturb me and actually they didn't help to keep the flow at all :)

It's still not completely mobile-phone free, but now I'm absolutely okay with the amount of my smartphone usage time.

</comment><comment><USER3> Switched to a candybar - calls & texts only, survived.

Then switched that off. Signed up for a paid (payg) SIP account so I could still make calls. I'm rarely out of range of a computer.

I've had to switch back to candybar though, when I changed daytime location because the wifi is HTTP/S only :( and the SIP won't work.

One of the things was to start carrying pen & paper again, and a camera!</comment>


Show HN: Socks Protocol Version 5 Library in Go - <AUTHOR> https://github.com/txthinking/socks5 <comment><USER2> Next time someone says to me that language's popularity doesn't matter for it's utility, I'll remember how Go's socks library appears on the front page of HN, while my pull request the Haskell's socks library (which implements the most basic feature that author added to the top of TODO list himself) is sitting unmerged and uncommented now for almost a year.(1) (If I sound bitter it's because I am.)

Seriously though, such "boring" libraries that you just need in your toolbox are a great way to evaluate the health of the whole ecosystem.

[1][[https://github.com/vincenthz/hs- socks/pull/24](https://github.com/vincenthz/hs-socks/pull/24)]

<comment><USER3> Maybe the author died?

</comment></comment><comment><USER4> I will always say this was a complete hack to a specific time in history. Having SOCKS in your toolbelt of tricks is always handy and can make hard things surprisingly easy.

Last time was I needed to tunnel a request from my development environment into a production VPN to contact a service which had IP access restrictions.

<comment><USER5> I'm curious was this a situation where ssh port-forwarding would not have worked?

<comment><USER4> It was an SSL connection with a custom cert chain. So I could easily wrap the HTTP side of things with a SOCKS forwarder which then SOCKS proxied into the VPN and then back out to the other site.

There might have been another way to do it, but given that wrapping HTTP in a SOCKS proxy is easy and ssh has a built in SOCKS proxy, this was quick win.

ps. It's SOCKS and not Socks - for the subject line of this story.

</comment></comment></comment><comment><USER6> If I only want the client side, does this add anything over [https://godoc.org/golang.org/x/net/proxy](https://godoc.org/golang.org/x/net/proxy) ?

</comment><comment><USER7> Honest question: What do people use Socks for? Personally I haven't used it since Firesheep...

<comment><USER8> it's a no-conf-required vpn:

       ssh -D 8000 -q -C -N user@sshhost

point firefox to use localhost:8000 as socksproxy, and all your internet traffic appears to have originate from sshhost.

<comment><USER9> Except for DNS? And anything else that doesn't use the proxy.

You can apparently set the firefox flag "network.proxy.socks_remote_dns"

Never tried it myself!

Now, perhaps firefox does not need to do a lookup; it sends the hostname to the remote end.

But best be safe?

<comment><USER8> Ok I checked -- you can tell firefox to proxy dns too when using socks proxy.

</comment></comment></comment></comment><comment><USER10> Last time I needed a SOCKS5 server + client in Go, I remember using github.com/getlantern/go-socks5. What does this offer above that?</comment>