Hy - <AUTHOR> https://en.wikipedia.org/wiki/Hy <comment><USER3> hy was first introduced to me at PyCon 2013 in a lightning talk by @paultag, the language's creator. It was a _very_ fun lightning talk. You can still watch it online here:

[https://youtu.be/1vui-LupKJI?t=968](https://youtu.be/1vui-LupKJI?t=968)

I remember that day pretty clearly because in the same lightning talk session, Solomon Hykes introduced the Python community to docker, while still working on dotCloud. This is what I think might have been the earliest public and recorded tech talk on the subject.

[https://youtu.be/1vui-LupKJI?t=1579](https://youtu.be/1vui-LupKJI?t=1579)

This was also the same PyCon that Eben Upton opened with a keynote to discuss the mission of Raspberry Pi, while also announcing that each of the 2,500 attendees would receive a free physical Raspberry Pi at the conference.

It was a pretty darn good year of PyCon; 2013 was apparently a good vintage for open source tech with Python connections.

<comment><USER4> He (author of Hy) is quite entertaining.

<comment><USER5> Had the good fortune to work with Paul briefly. He's not only smart, but he's a heck of a nice guy.

</comment></comment></comment><comment><USER6> Many previous threads; some of the larger ones:

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

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

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

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

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

</comment><comment><USER7> If Hy could resolve its problems with let being moved to contrib and attracted enough manpower to reach 1.0 I think it could attract significant mindshare. Hy fills in the missing piece for devs who want to go all-in with modern Lisp supported by an established ecosystem, ie. front-end/Clojurescript/NPM, scripting/Hy/PyPi and back-end/Clojure/JVM.

<comment><USER8> I agree that removing 'let' makes the language much less pleasing for me to use. I recently looked in contrib for 'let' and saw the macro definitions but could not get it working. It seems like a small thing, but it does keep me from doing more than rare experiments with Hy.

<comment><USER9> Curious what problems you had with let. I tried it recently and it worked fine. Having an import is annoying but it's not the end of the world.

<comment><USER10> It was removed without the replacement macro being fully baked, and a number of other things were changed at the same time. Rather than rewrite my stuff at every minor release, I moved on.

<comment><USER9> That's what I'm asking. What's not fully baked about it? In my (admittedly small) testing, it does its job of assigning stuff in a temporary scope.

<comment><USER11> I haven't tried, but are the variables properly captured in closures? LET should have "temporary" lexical scope, not "temporary" temporal/dynamic scope.

<comment><USER12> It does at least act like it has closures. Try starting the REPL with $ hy --spy and you can see how examples get compiled.

</comment></comment></comment></comment></comment></comment></comment><comment><USER13> Hy made me reconsider Lisps and I'm glad it did. I'm now using CL quite a lot. It's possible to use Python libraries from CL:

\- there is py4cl and async-process: [https://github.com/CodyReichert/awesome- cl#python](https://github.com/CodyReichert/awesome-cl#python)

\- NumCL is a clone of Numpy: [https://github.com/numcl/numcl](https://github.com/numcl/numcl)

Common Lisp has many advantages though:

\- you can build a self-contained binary of your app, including web app. It's such a breeze to deploy, and it's possible to ship a binary to users.

\- the REPL is much better and more fun than ipython

\- CL is compiled. We compile our code _function by function_ , and we get many compiler warnings at compile time.

\- CL is stable, the syntax is simple, you can add the syntax you want with extensions (decorators, string interpolation,…) and yet, the implementations keep improving, and new ones are created (Claps, CL on LLVM).

\- CL is fast (how pgloader got rewritten from Python to CL: [https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much- fas...](https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-faster/))

\- there may be more libraries than you think: [https://github.com/CodyReichert/awesome- cl](https://github.com/CodyReichert/awesome-cl)

\- the object system is very nice, the multiple dispatch makes me have a cleaner and shorter ABI of my app.

\- there are more editors with good support than Emacs: Atom support is getting very good, and there's more: [https://lispcookbook.github.io/cl- cookbook/editor-support.ht...](https://lispcookbook.github.io/cl- cookbook/editor-support.html)

\- the (default) package management system works with "distributions", à la apt/Debian, so it doesn't break suddenly because of a third party of a third party dependency.

Of course, the web stack is less mature (but more promising: see Weblocks [http://40ants.com/weblocks/](http://40ants.com/weblocks/)) and CL might be more difficult. It's not for every one. But it's been a joy so far.

</comment><comment><USER14> Anyone got an ELI5 on the goal of this language, or the pros and cons?

I'm not a dev, but, a Python user with a background in data/info science - <USER2> I'm a bit unclear on what Wikipedia means by things like "a dialect language of Lisp", and using it to write "domain specific languages."

Is this just a way to use Python libraries in Lisp (which seems to be a low level programming language?)

<comment><USER15> Lisp is not typically a low-level programming language, but rather extremely high-level (high level of abstraction)[0].

The "dialect language of Lisp" quote just means that it's a variation of Lisp, but running in a Python environment.

The term "domain-specific languages" refers to programming languages created for a specific, often one-of, task. If you look at this repo, you'll see various languages used to create diagrams and graphs in this library. These are all examples of DSLs (note, they're in many places, this is just an example):

[https://github.com/francoislaberge/diagrams](https://github.com/francoislaberge/diagrams)

Regarding Hy specifically, it's basically Python that uses a different syntax, or skin, of sorts. Instead of white-spaces and colons, you get parentheses and...parentheses. It's more complex than that, but it's basically just a way to write Python for people that like Lisps.

0\. Yes, there are some examples of low-level lisps without features like memory management, but they're pretty unusual.

<comment><USER16> How does Hy manage recursion given the limitations there in Python?

<comment><USER12> It doesn't. Or does the same way as Python: imperative loops. TCO is a key feature of Scheme, but not of Lisps in general. Clojure doesn't have it. You can always trampoline like Clojure's loop does.

<comment><USER16> 10-4, thank you!

</comment></comment></comment></comment></comment><comment><AUTHOR> related: a story on Hy popped up on hacker news a few days ago [0][1]

but didn't get much attention at the time:

      """
      BETTER IS BETTER THAN WORSE:
      TALES OF A WEEK WITH HY AND A CALL FOR REVOLUTION
      by "Mr. Mojo Rising"
      """

I put it into nextjournal for easier reading:

[https://nextjournal.com/tosh/better-is-better-than- worse](https://nextjournal.com/tosh/better-is-better-than-worse)

\--

[0] [https://0bin.net/paste/xmJWIlIv+Ws+Fbjs#zCyc4Yc4T+YISv3MHwMT...](https://0bin.net/paste/xmJWIlIv+Ws+Fbjs#zCyc4Yc4T+YISv3MHwMTwScu0as4xzqjns9YKaw1v1k)

[1] [https://hn.algolia.com/?query=hy%200bin.net&sort=byPopularit...](https://hn.algolia.com/?query=hy%200bin.net&sort=byPopularity&prefix&page=0&dateRange=all&type=story)

<comment><USER17> Huh, I love this guy's writing style, thanks for the link.

</comment></comment><comment><USER18> I tried it out some time ago, but my view is that is too similar to clojure but also different in significant ways, making it a pain to remember the differences if you also happened to be working on clojure code. Being too similar but not the same can cause problems with programming language syntax.

</comment><comment><USER19> TI(also)L:

Kawa [Polish for coffee] is a language framework written in the programming language Java that implements the programming language Scheme, a dialect of Lisp, and can be used to implement other languages to run on the Java virtual machine (JVM). It is a part of the GNU Project.

[https://en.wikipedia.org/wiki/Kawa_(Scheme_implementation)](https://en.wikipedia.org/wiki/Kawa_\(Scheme_implementation\))

<comment><USER20> Interesting. Why not use Clojure which runs on the JVM?

<comment><USER19> I've used both Clojure and Scheme (lazy racket) and find them both interesting. The part about Kawa that's novel is that it can be used to make other languages that run on the JVM.

</comment></comment></comment><comment> vincent-toups I'm a long time Lisper and Hy makes Python just tolerable enough to use as a data scientist. It can't or doesn't want to solve Python's worst problems, but its a big improvement.

<comment><USER21> What are Pythons biggest issues from your perspective?

<comment> vincent-toups Scope and type weirdness and just general lackadaisical design philosophy. Hostility towards functional programming. Its also still really really slow, particularly in this era of JIT languages like Lua.

Also, I generally find the libraries to be amateurishly designed. Big one that comes to mind is Pandas.

</comment></comment></comment><comment><USER22> DNS error for the docs [http://docs.hylang.org/](http://docs.hylang.org/) :/

<comment><USER23> Not sure if it's quite the same thing, but this is still up [https://hy.readthedocs.io/en/stable/](https://hy.readthedocs.io/en/stable/)

<comment><USER24> It shows build status: build failing.

</comment></comment></comment><comment><USER25> Sounds very interesting! Anyone here who uses (or tried) Hy? I'm curious how easy it is to use some arbitrary thing in Python (library, code snippet, etc) in particular.

<comment><USER10> I wrote [https://github.com/rcarmo/sushy](https://github.com/rcarmo/sushy) on it before they moved let to contrib.

(I later ported it back to pure Python 3, because I couldn't move forward while Hy was in flux)

If let was "fixed", I'd probably move back to Hy.

</comment></comment><comment><USER26> I played around with Hy and found it fun but I'm not sure anyone is using it for anything serious?

</comment><comment><USER27> Cloudflare throws a dns origin error. Repo: [https://github.com/hylang/hy/blob/master/README.md](https://github.com/hylang/hy/blob/master/README.md)

<comment><USER28> Ditto, getting `Error 1016` from CloudFlare.

Have to resort with using web archive: [https://web.archive.org/web/20190714180208/http://docs.hylan...](https://web.archive.org/web/20190714180208/http://docs.hylang.org/en/stable/)

</comment></comment><comment><USER29> One problem I had with Hy is that some codebases really depend a lot on annotations, which gets a bit messier in Lisp syntax.

<comment><USER30> It's a lisp, so you can build your own syntax, the messiness of annotatations is only limited by your creativity.

      (defna add [a :: int b :: int] (+ a b))

[https://pastebin.com/5kpTBiz2](https://pastebin.com/5kpTBiz2)

You could expand that macro to support decorators as well via extra arguments before the args list, you'd be in great shape.

</comment></comment><comment><USER31> WHy? Super cool project, but what would be the purpose of it? Or is it just a fun project to develop skill?

<comment> vaer-k Lisps are pretty pleasant to write in, and having metaprogramming support in your language is a game changer.

</comment></comment><comment><USER32> It seems like it is pretty much just Python, but written with s-expressions and supporting macros.

<comment><USER33> The word "just" almost always adds nothing of value makes a sentence less polite.

<comment><USER32> I completely agree and try to limit my usage of it. I am using it here to emphasise that it is only a different syntax for Python and nothing more. That is not to say that it is not valuable or interesting.

</comment></comment></comment><comment><USER34> This is not like the clojure is to java, it's only a syntax transformation, superficial.

Usually lisp and FP means that you get immutable data structures and a good concurrency system, both of which you get in clojure.

I looked at this a while ago and figured it's not useful for production, but an interesting project none the less.

<comment><USER35> This is certainly true if you are used to clojure.

But interestingly enough, idiomatic common lisp code can be roughly play in the same field as Python in terms of "purity". Also, lot's of scheme code is almost imperative in nature, if you look at it from the perspective of a Clojure or Haskell programmer. This is why Paul Graham once gave the advice to use Python if you cannot use Common Lisp.

I think Richard P. Gabriel wrote a "complaint" about functional programming being redefined by the research/types/ML crowd (he wasn't so much complaining about them striving for purer FP, but for taking over the conferences, etc. driving out the more traditional FP traditions from the lisp communities).

Anyways, what I wanted to say is: FP is fairly broad as a topic, a lot can fall under it or out of it depending where you draw the line. That's not a bad thing and there is space for mutable lisps.

The other aspect is: If you have Python, there is not much to gain from s-expressions alone. sure you get macros, but otherwise you already have a lot of the benefits you get from Lisp over let's say C++ (dynamic typing).

<comment><USER34> Interesting; functional programming was introduced to me through dr. racket scheme, and the core concept in there was that there is no mutable state. To me, having mutable state makes it imperative, you're not evaluating functions/expressions, you're executing statements that modify a state.

<comment><USER36> As I see it, there are two orthogonal roots to functional programming: Mathematical functions on the one hand, and lambda expressions/closure/higher- order functions/... on the other.

The former implies immutability and technically belongs to the declarative side of things: A mathematical function declares a relation between input and output, but I say technically because functional code can read rather algorithmic.

The latter can be added to imperative languages that do feature mutable state. Depending on the language, I might still classify it as functional, but impure.

<comment><USER35> yeah, I'd say its quite simple. there is "Functional programming", and it is an umbrella term. Then there is "purely functional programming" and it's kind of better defined than it's hypernym. For purely functional programming we are certain that we want to be immutable, try to limit the usage of effects.

Lately, I think, there is even a de-emphasis in _functions_ as the base of (purely) functional programming. What's now beimg emphasized is the composability-aspect. Functions are an abstraction that is composable, but so are other abstractions.

</comment></comment></comment></comment></comment><comment><USER37> The Jupiter notebook kernel seems to be broken for it right now.

<comment><USER12> Which one is broken? There were at least two, last I checked:

* [https://github.com/bollwyvl/hy_kernel/](https://github.com/bollwyvl/hy_kernel/)

* [https://github.com/Calysto/calysto_hy](https://github.com/Calysto/calysto_hy)

</comment></comment><comment><USER38> Does it support syntax-rules or something similar?

<comment><USER12> It has defmacro.

</comment></comment><comment><USER24> DNS error for me as well.

</comment><comment><USER39> Lisp with the most amount of libraries.

</comment><comment><USER40> Does the language support macros? If not, it's totally worthless. Python is a pretty bad language for even casual FP, and a S-exp syntax layer isn't going to help.

<comment><USER41> _ If not, it's totally worthless._

Kind of a harsh assessment don't you think? Maybe some people enjoy working in Lisp-like languages while also enjoying Python's huge ecosystem of libraries. I doubt it's worthless for those folks.

<comment><USER40> No one actually likes the parens of Lisp. I mean, just look at Racket2. Even the dedicated lispers who work on Racket think they suck.

I've written both Racket and Common Lisp professionally and consider myself very competent in both. In fact, I think they're both great languages and one of the best around.

It's not because of the parens though, it's because what the parens give you: namely homoiconicity and easy macros.

Without these things, the increased syntax burden of parens don't buy you anything except visual noise and being forced to type extra characters.

<comment><USER42> > Without these things, the increased syntax burden of parens don't buy you > anything except visual noise and being forced to type extra characters

So instead of f(x), I have to accept the visual noise and extra characters of (f x)?

<comment><USER43> > So instead of f(x), I have to accept the visual noise and extra characters > of (f x)?

(f x) and f(x) have the exact same number of characters; one mans'visual noise' is another's 'visual clarity'

<comment><USER40> What about (+ (/ 1 2) 5) and 1/2 + 5?

Also if you think parens and prefix notation are so great, would you also like to see math papers written that way?

<comment><USER44> Now you have to know that 1 / 2+5 is still (1/2) + 5.

The S-exp can be shortened in anything calling itself a Lisp, using the unary reciprocal: (+ (/ 2) 5).

Math papers are full of obscure notations; they should standardize on s-exps. Then just a straightforward dictionary of symbols would be needed to look up a notation.

Math notation is at least 2D: it makes good use of spatial structures to reduce ambiguity. For instance, instead of inventing some crazy ternary operator, mathematicians will just arrange three arguments spatially around a symbol. The space subdivides recursively, so elements end up being positionally determined, somewhat like what S-exps do in 1D.

<comment><USER40> I can format equations in latex in fewer characters than I could express in Lisp, so what you're saying about 2D vs 1D really doesn't make any sense.

<comment><USER44> LaTeX is (understandably) geared toward single-character variable names, and provides canned control sequences for common functions like \sin \cos. Try it with variable names that are two or more characters, and user-defined functions.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER45> I genuinely fail to understand the advantages of any sort of Lisp. Contrary to what gigantic brain lisp devs might think, it's syntactical annoyingness is far too much of a barrier to overcome.

<comment><USER46> >it's syntactical annoyingness is far too much of a barrier to overcome.

You're likely being downvoted because statements like these are more a reflection of you than the language, but instead of phrasing it that way, you come across as making an absolute statement about the language.

In any case, I'll bit.

I'm not a Lisp programmer - the extent to which I do Lisp is the occasional Emacs Lisp. Still:

You can use virtually any character as part of your variable name. Lispers tend to use hyphen and '?' a lot. Once you get used to it, it's hard not to view all other languages as inferior. Why did they restrict the variable names so much?

A lot more substantive: I saw this in John Kitchn's blog post somewhere. My details are probably a bit off, but I think I have the general gist of it. His team works on, I believe, computational chemistry. Their code base is in Python, and they've developed an API for various aspects of their calculation. A lot of their functions require a lot of arguments - not generally a good idea, but it makes sense in the domain they work in. To manage that headache, they've built a systematic way of documenting all those arguments in their docstring, with a particular format.

Unfortunately, that means anyone in his team who creates such a function needs to conform to that format, and people get lazy, make mistakes, etc.

So using Hy, he wrote a macro for another syntax for defining a function. With this new way of defining a function, there was special syntax for all the special information that needs to be in the docstring. The macro then creates the Python function with the appropriately written docstring. If the programmer makes a mistake, the macro fails. So now everyone uses the macro to create those types of functions.

I don't recall the details, but let's say it was something like:

        deff func(x, x_doc="doc for x", y, y_doc="doc for y",...)

If someone makes an argument called x, but does not provide x_doc, then it will fail.

(I think in reality it was more than that - not just x_doc but x_doc_a, x_doc_b, etc and it generated the docstring from all those pieces).

Now are there other, perhaps Pythonic ways to do this? Probably. However, it is nice that for a domain specific problem, you can just invent new syntax and use it.

<comment><USER45> > You're likely being downvoted

I do not care about downvotes on here.

> You can use virtually any character as part of your variable name. Lispers

This is not a good thing.

> However, it is nice that for a domain specific problem, you can just invent > new syntax and use it.

This is equally not a good thing.

<comment><USER47> Readability trumps just about all else in software dev, so I am 100% with you there on variable name limits and lack of syntax extension.

```[a-zA-Z_][a-zA-Z0-9_]*``` is such a universal and useful convention that I find myself using it even when the domain allows other characters (bash, Xnix filenames). Obviously this is English-centric so I would include other language constructs if I were in a country with another dominant language.

In fact even though I have the ability (languages supporting unicode and a QMK keyboard) to use symbols, e.g. Greek letters for math, I don't, because I know it's a hassle for anyone else.

> You can use virtually any character as part of your variable name.

> invent new syntax

are a hassle and anti-pattern for the same reason.

<comment><USER11> I think you think all this stuff is bad because you're imagining having this power in C or JavaScript, in which case these features would be awful.

However if these features are exposed through clean abstractions in a language that is syntactically bare to begin with, you might have different thoughts.

</comment></comment></comment></comment></comment><comment><USER48> W-Hy?

</comment><comment><USER49> Cuddles the cuttlefish <3

</comment><comment><USER50> Let's combine things the many people hate: lisp parenthesis with python's GIL. :)

<comment><USER51> Some of us really like the parentheses!

<comment><USER50> I personally like parentheses. But a surprising amount of my engineering friends bring it up as a major issue as soon as we start talking about List or Scheme.

</comment></comment></comment><comment><USER52> The disturbing logo really puts me off wanting to learn more about this language.

<comment><USER53> Am I missing something? It seems it's just a "cute" octopus.

<comment><USER54> Funny enough, Cuttles is created by Karen Rustad. She also drew the Ferris logo for Rust.</comment></comment></comment>


What if we could see all concurrency bugs in the debugger? - <AUTHOR> https://stefan-marr.de/2019/07/what-if-we-could-see-all-concurrency-bugs-in-the-debugger/ <comment><USER2> The interface looks pretty interesting!

I think adding a way to select multiple universe nodes and say "I expect all these universes to converge on the value 66" and then serialize that expectation into a runtime verification which either runs during program execution or runs during program execution when in a concurrency sanitize mode would be pretty cool!

<comment><USER3> Thanks for the suggestion we don't provide that exact interface but we do allow querying over all the universes with a graph query language. In the paper we detail how to get the shortest path to all the end states which makes it a bit easier to debug.

</comment></comment><comment><USER4> TLA+ specs explore all state spaces of concurrent processes. Avoiding state explosions is something you need to be conscious of when building those. The modeling required also takes some learning investment. Curious if this can really pull off something like a TLA+ state exploration and invariant violation detection with real-world code.

<comment><USER5> TLA+ is great, but it struggles so much to handle lots of states...

Maybe that's a good thing since it encourages very symmetric designs, but it bothers me

<comment><USER6> Are there other systems where combinatorial explosions of states do not occur? Is there something in TLA that makes it prone to this where other model checkers perhaps aren't? Slightly related, isn't state space explosion an intrinsic part of any such problem?

If possible, could you explain what you mean by symmetry, and how it reduces state space (it's a big ask, I know).

sorry for the firehose of Q's! I'd really appreciate an expert's view though.

<comment><USER7> Model checkers are essentially glorified fuzzers, so the way they work is inherently vulnerable to state space explosion. The way to address that is to move closer to building things that are correct "by construction", and prove them as such. Symmetry is one way of doing this, it allows you to "reduce" a whole lot of redundant checking to something much simpler, based on some underlying properties of what you're working with. A logical proof works much the same way, of course.

TLA specifications are typically "checked", or rather "fuzzed" by model checkers; this is not formally required (TLA+ even includes a proof language) but things tend to be done that way.

<comment><USER6> Would whoever downvoted this please explain why so we can learn from it. Thanks.

<comment><USER8> Not the downvoter, but:

\- (Bounded) model checking is exhaustive, fuzzing is not. If your system successfully model checks, then no possible input can cause an error. Fuzzing is randomized, so there still _could_ be a bad input. That's why model checking is considered formal verification and fuzzing is not.

\- Not all model checking is brute force searches. A lot of model checkers use SMT or SAT, so the check time grows slowly even with large state spaces.

\- _Empirically speaking_, model-checking has scaled much better and been used for a wider range of applications than correct-by-construction has.

<comment><USER7> > (Bounded) model checking

Oh come on. If your _bounded_ model checking is actually checking every possible input or program state, then it's not just a method of verification but an actual proof. (It may be a subjectively _inelegant_ proof, but it's a proof nonetheless.) That much is obvious. What I clearly meant by "glorified fuzzing" was the far more common use of model checking in ways that _stop short_ of this standard. That sort of use can still be nicely scalable, it _does_ count as a formal method, and it can point out remarkably complex bugs in your system - but by definition, it cannot give any assurance that you're doing things correctly! That still requires proof.

<comment><USER6> To put my oar in, and this is purely based on what I've read about spin, spin can verify 100% for 'small' models. If larger models are checked, it will run out of memory so you put it in a probabilistic mode which gives probabilistic assurances, still 'good' but less than 100%. In that respect I suppose it's degenerated to rather posh fuzzing.

I think the difference between small and large is down to how long you're prepared to let it run, but even more fundamentally, how much memory you can give it.

I'd agree that if the model matches the code and you successfully check the entire state space then it's a proof.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Not quite the same, but reminded me of reversible debugging: [https://www.gnu.org/software/gdb/news/reversible.html](https://www.gnu.org/software/gdb/news/reversible.html)

<comment><USER10> Mozilla's rr is made for exactly that.

<comment><USER11> WinDBG's Time-Travel Debugging is another nice implementation of this.

<comment><USER12> Heh, it feels like everybody and their dog has written a reversible debugger.

Listed in this Hacker News thread we have 7 implementations in gdb, plus rr and WinDBG.

I'll add one more, an in-house hypervisor that I help develop. Stuff like finding "all concurrency bugs" as in this article would be a matter of scripting it up. BTW, we're hiring: [https://news.ycombinator.com/item?id=19797601](https://news.ycombinator.com/item?id=19797601)

So that's at least 10, counting the gdb backends distinctly except lumping the Linux native x86 and x86_64 together.

<comment><USER13> Of the 7 implementations listed in the gdb page: * gdb's "Native" implementation is unusably slow. 1000x slowdown during recording. * Simics is expensive and AFAIK a full-system simulator not very useful for debugging applications. * Moxie-ELF is for an obscure custom CPU. SID looks similar. * VMWare have discontinued support for reverse execution. * Chronicle-gdbserver is unusably slow, 300x recording overhead. * UndoDB is the only one that's really usable.

We actually have another gdb remote backend supporting reverse execution that's in active use but not publicly available yet --- Pernosco.

<comment><USER12> A properly-equipped full-system simulator is useful for debugging applications. I have one. It is decently fast too. It's free or very expensive, depending on how you count several in-house developers to maintain it.

</comment></comment></comment></comment></comment></comment><comment><USER14> Reminds me of Corensic's Jynx.

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

Never used it but the premise of running different possible thread interleavings in parallel and picking the one that crashes seemed genius.

<comment><USER6> Sounds like what some model checkers do. See [https://en.wikipedia.org/wiki/SPIN_model_checker](https://en.wikipedia.org/wiki/SPIN_model_checker) for example.

Spin homepage [http://spinroot.com/spin/whatispin.html](http://spinroot.com/spin/whatispin.html)

SPIN's language Promela is very odd, like stripped down basic from the 1980s but even more reduced after that.

Edit: a bit more from the spin site FYI "[spin] checks the logical consistency of a specification and reports on deadlocks, race conditions, different types of incompleteness, and unwarranted assumptions about the relative speeds of processes"

I wish so much I had reason to use it. I so much wish my programming career wasn't the daily, usually boring, straightforward business support. I'd love to work with TLA, formal methods, this and more but there seems no way to do get a job doing this. Any thoughts welcome. Been trying to learn hoare logic but it all seems so abstract, and it's easy to misunderstand things with no- one to ask. Anyway, sorry for the whinge.

<comment><USER15> I think the typical business software could be a great place to start because you have sections of the code that would be very simple to model in a formal methods environment and that really hairy section that could actually use it (but it would be hard).

I hate to say I've never had the patience for it. For me it has always turned out to be painful without much reward.

I think my experience isn't uncommon given the popularity of formal methods. If it was easy and full of low hanging fruit (like automated testing) it would probably be reasonably popular (like automated testing).

<comment><USER6> I dunno where in business software it might work, but my experience is that quality is often almost irrelevant. A few weeks ago I got myself unpopular for finding and reporting a serious bug. That could have been picked up through a little knowledge or some straightforward testing, but it wasn't because that didn't happen (there's a little more to it than that, but you see my point). If producing crap is acceptable, there's no room for formal methods. I've had a lot of experience of this.

If you can't get the boss's buy-in for even obvious correctness and/or timesaving approaches (where time spent = salaries paid), I'm stuffed.

Or maybe the problem's partly me. I can't rule that out. I'm not the most politic person.

> If [formal methods] was easy and full of low hanging fruit...

It isn't and I don't expect it to be. The fruit is right at the top, but it may be the best quality. I'm ok putting in the work to reach that.

</comment></comment></comment></comment><comment><USER16> For property-based testing of concurrency & nondeterminism, look into dejafu :)

</comment><comment><USER17> Obligatory plug for LLVM's Thread Sanitizer, which can find many concurrency issues before their express themselves as difficult-to-debug problems.

</comment><comment><USER18> Reminds me of super-compilation.

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

</comment><comment><USER19> (Thumbs-up)

I'm looking for sites/ information that can help me to publish papers. But I do not have much idea about it. How did you publish?

<comment><USER20> You typically have to know the venue (or journal) you want to publish at. Then make sure to check their websites (regularly) for CFPs (call for paper). Then you submit your paper by the given deadline following the given paper submission guidelines and wait until it is peer-reviewed. Then either it gets rejected or accepted (or some middle ground: asking for revisions).

</comment></comment><comment><USER21> Apart from looking nice, I think I understood the program even less afterwards.</comment>


Ask HN: Someone is trying to reset my email password - <AUTHOR> Someone is trying to reset my email password for live.com. I keep getting 7 digit 2FA code in my other email (4 times in last 10 days). Is there anything I can do to protect my account? Thanks <comment><USER2> It's possible that someone obtained a password dump and are trying to see if it works on your email account.

Check yourself on Have I Been Pwned, and if you see your information have been breached, reset all your passwords.

</comment><comment><USER3> Same with me, I have an old @hotmail.com email address. I changed my password to a random generated one, and I have 2FA. Other than this, I don't know what else I could do. But I think my account is safe as long as there are no vulnerabilities on the site, which it is highly unlikely there are.

<comment><USER4> That's funny, I've been getting Hotmail reset codes too. I actually requested one a long time ago but never got it, I thought it was just some queue that finally cleared itself.

</comment></comment><comment><USER5> One possible explanation is that someone thinks it's their email address, they've forgotten the password and are annoyed that they're not getting the 2FA code on their phone..

There was a thread about HNers having a common name and firstname.lastname email addresses and getting random emails not for them..

</comment><comment><USER6> Usually companies send the 2FA token once the password has been entered. So someone has your password and you're only saved by 2FA.

So you can start by changing your password maybe?

<comment><AUTHOR> Thanks. just did

</comment></comment><comment><USER7> I've had some password reset mechanisms send me codes without the attacker needing to know much. I believe this has happened with facebook before; my password there is unique and random, and even after changing my password to another random one, I still got a couple of occasional 2FA codes. Not sure if they've changed anything there to combat this, but just my 2¢.

</comment><comment><USER8> I'm being driven crazy by this sort of thing. Password resets for my Facebook account etc. But the worst ones I get are someone signing up for a service using my email address where the service doesn't verify the email address. The cherry on top is when this is done in language that I don't understand.

I was getting Netflix account information and Uber trip receipt emails in Spanish for a while with no option to say "this is not me".

<comment><USER9> For cases like that, if it doesn't seem like an accidental screw-up on their part and actually some attempt at impersonating you, an option might be to reset their password and close the account.

Actually, even if it's accidental, if you do it close to when they've opened the account (when you started receiving the mails), they wouldn't lose much if any data.

Of course, that's assuming that you have no way to contact them. If you can, that might be better.

EDIT: Changed "their account" for "the account" since it could be said to be yours too since it's your email. They effectively signed you up.

<comment><USER8> Yes, I've done a few things like that. I even cancelled a haircut. A lot of services can't be cancelled and require a phone call. I was on the phone with Netflix for over an hour trying to cancel a service - they initially didn't believe me that google allow email@example.com and firstname.lastname@example.com to go to the same account. I had to set up the alias in gmail to allow me to send mail as firstname.lastname@example.com and email the technician from that address.

Hours of my time wasted because a company doesn't verify emails.

</comment></comment></comment><comment><USER10> There's not much that you would want to do in this situation. The system is working as designed.

You should change your password to something you don't use elsewhere just to be sure they aren't attempting to log in with your actual password.

4 emails in 10 days is not excessive.

If the e-mails bother you and your account is secure, then you can just filter them into a folder and then go looking for them when you actually need to reset your password.

</comment><comment><USER11> Maybe get in touch with the support? Perhaps they can add some protection to the account.

</comment><comment><USER12> Its upsetting email providers still dont provide soft ip lock, at least for settings, that if you dont access from ip you really need to go more complex recovery options, considering infrastructure cost they could even charge for it.

<comment><USER13> The IP address is far from a reliable signal for identification, and shouldn't be used like that. Many (most?) ISPs around the world use dynamic IPs, and then there are mobile phone networks.

</comment></comment><comment><USER14> Same!</comment>


Show HN: Buellr, The best products according to social media - <AUTHOR> http://alpha.buellr.com/

<comment><USER2> I am actually doing something similar with <http://tawlk.com>

We also are about to release our comparison systems: [https://s3.amazonaws.com/screenshots.angel.co/25/30340/0e187...](https://s3.amazonaws.com/screenshots.angel.co/25/30340/0e187bdb92d4caf296131a1f5a512c71-original.jpg)

And our sentiment analysis engine is open source:

<http://github.com/Tawlk/synt>

We have released a lot of other open source code, and are also about to open up for more hiring :-)

<comment><AUTHOR> Interesting indeed! We'll poke around and ping you guys if there's any "synergy" as the biz folks say...

</comment></comment><comment><USER3> Looks intriguing, although I don't know if Smirnoff deserves to be #2 for Vodka. It would be interesting to see how the sentiment analysis works and why influences the score.

<comment><AUTHOR> Yeah what we're seeing from the data is folks are passionate about the brands they love (alcohol especially).

The score is influenced by positive mentions of that brand. Brands are lower on the list because they have less % of positive mentions than other brands.

</comment></comment><comment><USER4> Cool! Needs more categories: DSLR's, games, books, developer tools, etc., though I suppose you're limited by what people are tweet/facebook/gplus -ing.

<comment><AUTHOR> Yeah we're actually looking into what categories to expand into. Thanks for the tips!

Yeah that limit is correct, but almost all the things you listed are common discussions on the social web. The great thing is that we can query the entire social web, analyze the data and spit out a rank. So our only limit is the entire social graph.</comment></comment>


Industrial Design vs. Mechanical Engineering - <AUTHOR> https://www.fictiv.com/resources/spotlight/hardware-lessons-from-endless

<comment><USER3> I don't really understand this article.

The only example of industrial design and mechanical engineering being fused given in the article is the heat vent one where you took the vents off the top of the sweat-lodge shaped computer and put them on the bottom because it looked "like a large salt shaker"...

But doesn't heat rise? And now the vents are in the thermodynamically opposite place they should be, and simultaneously sheltered from crosswind by the gumdrop shape? That doesn't sound like much of a field-mesh rather than an intentional crippling of the engineering portion...

</comment><comment><USER4> They come off a bit biased towards the design fetish, and how the engineer had to deal with the knowingly uncompromising dream designer.

      Scott's mission was to reinvent the look, feel, and even
       personality of a computer, without limits. He worked to
      capture an idea and a feeling without worrying initially
      about the execution of that idea.

      The Engineering Challenge: Realize the Design

      For George, he sees his role as one to challenge
      assumptions and do his utmost to realize Scott's design.

      "My role as the Engineer is to take what the Industrial
      Designer says is the Bible and try and put that into
      production, more than coming back with "we have to change
      this and that," George says. "Because wherever possible,
      we don't want to compromise on our vision. We've made
      every step necessary to manifest the industrial design
      and try to reflect the creativity and personality of the
      product."

Design is great, but this just reminds me of design by Homer [1]

[1] [http://www.wired.com/wp-content/uploads/2014/06/the-homer- in...](http://www.wired.com/wp-content/uploads/2014/06/the-homer-inline2.jpg)

</comment><comment><USER5> Why aren't these manufacturing shops in the US? I consistently hear of difficulty working with offshore manufacturing plants like this - <USER2> here and there, poor quality build, etc.

<comment><USER6> Cost,at least perceived cost. But most likely the baseline quality to cost trade off doesn't justify it.

<comment><USER7> I often hear people complaining about how expensive US-based engineering services are. I always think, just wait till you find out how expensive it can be to outsource!</comment></comment></comment>


AP probe finds drugs in drinking water  - <AUTHOR> http://news.yahoo.com/s/ap/20080309/ap_on_re_us/pharmawater_i_4;_ylt=ArJ7VfgNcnDbrdEsPogmg7gE1vAI

<comment><USER2> Way to scare 'em back to using bottled water again, AP! Yes I know bottled may not be any better, but it will certainly _feel_ safer to people who want to Just Do Something in response to that FUD article.</comment>


YouTube introduces a new video player design - <AUTHOR> http://www.youtube.com/watch?v=-T04kpn8mCQ

<comment><USER2> Is it just me, or is everything the same except the colors?</comment>


We Offered Matching Funds for Open Source – Here's What Happened - <AUTHOR> https://medium.com/open-collective/matching-funds-for-open-source-9653a81f8dcb <comment><USER2> I completely agree but think it's a losing battle. With some exception, I feel that there is a disconnect between people who are naturally technical, and the people who are typically making decisions at companies about where to allocate spending. It tracks the same dilemma with technical people not viewing risk the same way as non-technical stakeholders. Non-technical people usually make decisions that value long term support, data security, compliance, actual live support plans etc., mainly because they know they can't deal with issues the same way technical people can. This creates an entire billion dollar industry that's fundamentally disconnected from how technical people normally think or value software. The fact that one semi-enterprise client has no problem paying thousands per month for a lackluster product/basic IT support, but a multi- million dollar startup won't pay $100/month or a developer making $100k/year+ still uses an unlicensed copy of their IDE ($20 sublime etc) only proves the point more.

It's a fundamental issue but one I think will get better as building software becomes more inclusive and normal in society/schools etc.

Sorry for the labels, just trying to make a point and share what my experience had been, from seeing both sides.

<comment><AUTHOR> You make a good point that the financial decision-makers and the engineers are often not the same people at companies, and this adds to the disconnect in how open source is valued. What do you think about the ideas presented at the end of the article suggesting some ways to address this, e.g. companies setting aside a fund for open source that their developers could decide how to spend?

From the "money people" perspective it would likely be more of a marketing/branding/recruitment/staff engagement expense (because those are the budget lines where they'll see value for the investment) - but at the end of the day the important thing is supporting critical open source projects.</comment></comment>


What happened to Diaspora? - <AUTHOR>

The one startup I've been really expecting to see launch today at YC demo day was Diaspora, but I didn't see them. I know they got into YC (Remember seeing them on an article about that), what's going on? <comment><USER2> They made a fatal mistake in building a Rails app. That led them down the wrong path for an ecosystem that needs to be a decentralized protocol. See tent.io, they've got the right idea. Not sure if they'll be successful, but work in this area needs to be at the protocol level, not at the application level. And as soon as I heard what they were doing I knew they were toast.

</comment><comment><USER3> It appears they're desperately attempting to spend all of their time working on quirky ideas that will never make a dime

</comment><comment><USER4> Diaspora, the software, works reasonably well, although it obviously suffers from a shortage of users. You can sign up at eg. <http://diasp.org>. Dunno what's going on with Diaspora, the company.

<comment><USER5> In the spirit of "why don't they just":

Why don't they just focus on marketing Diaspora instead of investing time in companion products?

Are the companion products intended to drive users to Diaspora?

<comment><USER6> It's mildly amusing that makr.io (their YC side project) has a "sign up with Facebook" button, but no "sign up with Diaspora" option.

</comment></comment></comment><comment><USER7> <http://blog.diasporafoundation.org/>

Read yesterday's post.

<comment><USER8> What a terrible idea.

 _Makr.io is a new kind of meme generator_

That really misses the point of what a meme is.

<comment><USER7> Tell that to <http://memegenerator.net/>, which gets over 20 million PVs a month.

<http://www.quantcast.com/memegenerator.net>

<comment><USER8> I know that exists, and I've used it myself, but makr.io seems to be missing the point of what memegenerator.net is used for.

</comment></comment></comment></comment><comment><USER9> I'm really confused. Is Makr open source? If it isn't then how is it a companion to Diaspora?

Also, you can't realistically expect to build a company (around Makr) and still have any time left over for Diaspora...unless you're Jack Dorsey.

Again, just confused.

<comment><USER10> It is open source, yes: <https://github.com/makrio/makrio>

But agreed, it seems like they're abandoning their core product. Not that it's gotten much traction in the last two years, but if they were going to abandon it, I wish they'd just say as much.

</comment></comment><comment><USER11> How is Makr.io even a real product concept? It appears to be a very limited version of the G+ image editor.. or any other meme maker in existence but with "SHARING" (remixing)

Am I missing something?

<comment><USER12> It's a hobby project, that's all it is. Not a real business to be taken seriously. Give them a few years, and they will be looking for a corporate day job. Nobody can live off venture capital for the rest of their lives.

</comment></comment><comment><USER13> whoever is responsible for that site should know that the blog button at the top of the page does not work.</comment>


Efficient Recurrent Neural Networks using Structured Matrices in FPGAs - <AUTHOR> https://arxiv.org/abs/1803.07661 <comment><USER2> The main idea is to take each weight matrix W, divide it into smaller blocks, each of dimension, say, n×n, and make each block a _circulant matrix_ that can be specified by a vector of only n elements.[a]

This reduces W's memory consumption by a factor of n, and makes other gains in computational efficiency possible. Read the paper for details.

However, as far as I can tell, it appears the authors have tested this technique only with one RNN architecture, in one task. It's hard to know whether the technique will hold up well in a broad range of RNN architectures/tasks.

[a] [https://en.wikipedia.org/wiki/Circulant_matrix](https://en.wikipedia.org/wiki/Circulant_matrix)

<comment><AUTHOR> Speech recognition be the task they implemented this for.

<comment><USER3> What about image recognition? Too complex? Or doable at 320x240 resolution?

</comment></comment></comment><comment><USER3> How does this compare to GPU? These FPGAs are high end ones and not cheap for sure.

<comment><USER4> According to [1], a high-end FPGA can do "AlexNet inference performance: int16 over 2,400 img/s, int8 over 4,500 img/s.". Plug in your favorite nVidia numbers and compare.

[1] [http://mipsology.com/zebra.html](http://mipsology.com/zebra.html)

<comment><USER3> Thank you very much for the link!

<comment><AUTHOR> Hi Insru - how do you think GPUs would fare taking into consideration alain94040 's metrics?

<comment><USER3> Please look at this pdf: [https://www.nvidia.com/content/tegra/embedded- systems/pdf/je...](https://www.nvidia.com/content/tegra/embedded- systems/pdf/jetson_tx1_whitepaper.pdf) There is a table on page 9 and it claims, that Titan X can make 3216 img/s while TUL-KU115 FPGA board can make only >1000 img/s. This KU115 chip has a project price of ~$2000. Real time capability is nice, but that's still expensive.

<comment><AUTHOR> Thanks for this PDF :)

Do you think TitanX has real time capability?

<comment><USER3> I am FPGA developer and have not much knowledge about GPUs. I just can make a guess, that no one can guarantee execution time on GPU. There are all little details well defined in FPGA design and result is always available after defined delay.

<comment><USER5> Though wouldn't it be far more interesting to compare the latencies at these rates, than the throughput? Roughly similar price and throughput, but very different energy efficiency and possibly latency could be rather significant for quite a few applications.

<comment><USER3> Xilinx has prepared some marketing material regarding latency: [https://forums.xilinx.com/t5/Xcell-Daily-Blog/Xilinx- reVISIO...](https://forums.xilinx.com/t5/Xcell-Daily-Blog/Xilinx-reVISION- stack-pushes-machine-learning-for-vision-guided/ba-p/754387)

<comment><AUTHOR> For some reasons the Xilinx link is not opening.

<comment><USER3> Strange. It's works here. Try this: [https://www.xilinx.com/support/documentation/backgrounders/r...](https://www.xilinx.com/support/documentation/backgrounders/revision_backgrounder.pdf)

<comment><AUTHOR> Got it! Thanks :)</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


Ask HN: How do you build your Golang based repo ? - <AUTHOR> Do you use Makefiles with Glide, dep, or other vendoring tools or are you experimenting with something else like Bazel ? What has been your experience ? <comment><USER2> You can ask 100 gophers. And obtain 100 different workflows ;)

I like to separate design and code, from build and test, from deploy and monitoring. And I like change. And experimenting with new techniques. dep is definitely next, as well as prometheus.

The things that determine what tools you use are often external to language design itself. How your remote team handles its gitflow. Whether people prefer vim on a remote dev instance or Atom locally with github integration. Are you targeting app engine or container engine.

Regardless of the heterogeneity, having a canonical $GOROOT source tree and deploying binaries makes things much more flexible.

I'll just point to one recent discovery that is helping a lot at the moment and may be useful to other people: godoc for static analysis

[https://golang.org/lib/godoc/analysis/help.html](https://golang.org/lib/godoc/analysis/help.html)

</comment><comment><USER3> I am using glide with a small Makefile + goreleaser

You can check it out here: [https://github.com/artpar/daptin](https://github.com/artpar/daptin)

The build scripts are located here: [https://github.com/daptin/daptin/tree/master/scripts](https://github.com/daptin/daptin/tree/master/scripts)

The current setup is recognised by travis and semaphoreci.

</comment><comment><USER4> We do a decent amount of go at the company I work for. We started out using Makefiles (2 or so years ago) then moved everything to Glide and now we use Dep. Makefiles weren't fun to deal with so I advise against that. We moved to Dep because we feel that is what the community is converging on. There is no great solution unfortunately. As long as you are able to live with some of the small downsides with any vendoring solution then really any would work.

</comment><comment><USER5> I moved from typical `build.sh` files to a small Go program that does more than just building. It also manages connected services as Docker containers, database imports and so on. For vendoring I moved all my projects to dep.</comment>


Ask HN: Digital Image Stabilization Techniques - <AUTHOR>

I'm currently using processing to mess around with motion tracking and pattern recognition and I would like to use image stabilization of my live video stream to improve on my current results.
The only problem is that some extensive googling hasn't turned up any practical info on implementing this. I understand the basic principles of determining a global motion vector and offsetting the current frame in relation to the last to compensate for camera motion, but elegant ways to implement this are escaping me.
Does anyone have any suggestions or sources that could help light the way? <comment><USER2> Is the camera in motion or steady?

It's somewhat easy to do if it's steady (pick a couple of reference points). Harder to do in-motion if you did not capture accelerometer data with the video feed.

<comment><AUTHOR> It's generally fairly steady at the moment, but I would like it to be able to handle motion in the future. I'm using the built-in iSight on my macbook as the camera, so theoretically I should be able to get some data from the macbook's built-in accelerometers, but I'm not sure that they would be accurate enough for this purpose.

Do you know of any sources for example code dealing with image stabilization?

<comment><USER2> I don't have any sources, I only know how it has been implemented by various companies.

Pentax, for example, offers some very powerful zoom lenses for CCTV cameras. They have an image stabilizer box that goes between the cameras output, and the viewing device. That box picks 4 points in the video and uses those 4 points as its reference. If you zoom in or out, the points move diagonally in unison. Any other movement left/right/up/down indicates camera shake and is compensated for. To do this, you have to start with an image that is slightly scaled down or cropped so that you have have some buffer room all around the frame.

<comment><AUTHOR> Yeah, it's starting to sound like something I'm going to just have to muddle through. The main reason I'm embarking on this project is just as a learning expedition more than anything else. So implementing everything from scratch is not necessarily bad.</comment></comment></comment></comment>


What things compute? - <AUTHOR> http://researchblogs.cs.bham.ac.uk/thelablunch/2015/07/what-things-compute/ <comment><USER2> I tried leaving this as a comment on the blog, but "Couldn't open socket".

The author, and any reader who finds this interesting, should definitely also read "Why Philosophers Should Care About Computational Complexity" by Scott Aaronson: [http://www.scottaaronson.com/papers/philos.pdf](http://www.scottaaronson.com/papers/philos.pdf)

This being the Internet, the natural assumption is that this is intended as contradiction or argument, but I really do just mean, you'll really want to read that too, as it informs the discussion in interesting ways.

<comment><USER3> Specifically, section 6 (Compuation and Waterfalls), which gives the answer that System X computes Y whenever it saves you the work of computing Y -- i.e. if being able to use X as an oracle decreases the asymptotic difficulty of Y.

So waterfalls (probably) don't play chess in the sense that any mapping form the waterfall to a chess program would itself be as complex as the problem (and its execution). But a chess computer does, since its output has a very simple mapping to actual moves (and in practice, most chess computers add a view layer to provide that mapping transparently).

<comment><USER4> Your comment is so much clearer for having a Y. Asking "Does X compute Y" instead of "Does X compute [anything]" makes all the difference.

</comment></comment></comment><comment><USER5> A computation substrate has state and can change its state within (feedback) loops. An elementary particle suffices this definition: It has state because its properties persist at least for some time, and it has feedback loops (interactions with other particles) that change its state. The more elementary particles locally affect each other, the more complex the state and feedback loops can be. What kinds of computation you can perform on such a substrate depends on the rules that govern the particles, in particular, how many feedback loops they allow to simultaneously affect a local arrangement of particles. It looks like there is an upper bound to this: No substrate can compute more kinds of functions than a Turing machine, which is a hypothesis that is closely tied to the conservation of energy and unitary (that the sum of the probabilities of all possible outcomes of a system equals 1). However, since matter decays, it is doubtful that anything around us can actually be as infinitely precise as the theoretical idea of the Turing machine.

</comment><comment><USER6> I'm not sure I see the problem with "everything computes". If every physical process can be shown to be isomorphic with one or more computational algorithms, which seems like a very reasonable supposition at this point given what we know about emulation, then that is just the nature of things. It seems more like a useful insight than an unsatisfying answer.

<comment><USER7> If "everything computes" then you can not use "because it computes" as an explanation.

<comment><USER8> I do not see how this is a bad thing. It seems incorrect at some level, but claiming that things that compute are somehow categorically different is an appeal to magical thinking.

I would agree that claiming that a rock computes by not simply vanishing from one plank time to the next is not satisfying. This leads me to think that computation has much more to do with whether a particular being has reach a thermodynamic local minimum than anything else (lava does not compute since, despite being far more active than a rock, its behaviour can be explained by the fact that it is a couple thousand degrees hotter than a normal rock). Energy dissipation also does not fit the bill since stars dissipate energy but do not compute.

Unfortunately the thinking surrounding things like proteins look incredibly similar, their behavior changes as a function of ph and temperature, and most arguments that a protein computes are based on defining a function for that protein. This gets us nowhere, but it does suggest that it may not be possible to define computation in a way that excludes systems dissipating energy to reach thermodynamic local minima.

<comment><USER9> Re: "claiming that things that compute are somehow categorically different is an appeal to magical thinking" \- This is not the case. The distinction that's being made is one of perspective and purpose, i.e. implementing method to get result. Or am I getting this wrong?

<comment><USER8> You are getting it correct, but the idea that computation is defined based on some purpose or from a limited subset of all perspectives is exactly what I take issue with. If your notion of computation is dependent on purpose and thus some teleological notion of function then saying something computes doesn't tell us anything about that being, only about how human beings perceive that being and its function. Again, this undermines the usefulness of having a perspective/function independent notion of computation. The magical thinking arises because we project our notations of function onto the being itself and conflate our uses for that being with the intrinsic properties of that being. Purposes/uses/functions are not intrinsic properties. Computation may not be an intrinsic property, it may only be a relational property, which would be an interesting result itself, but probably quite irritating to people who want to make arguments that there is something intrinsically different about certain kinds of systems.

</comment></comment></comment></comment></comment><comment><USER10> > In conclusion I want to shatter our presumed consensus: computers do not > compute. Not even computers. We compute. Computers just help us along.

Define "us". Define "compute". Seeing as the former is very fuzzy, and the latter is suggested by the article to be undefined, trying to use this to "prove" that brains are not computers is, well, nonsense.

Consciousness is a side-effect of electrochemical interactions. Nothing more, nothing less. Trying to believe otherwise - that consciousness is some "special snowflake" that can somehow exist independently of the machine which creates it - is about as folly as trying to believe a magical sky-wizard sculpted mankind from clay. Whether this counts as "computation" depends on how "compute" is defined.

</comment><comment><USER11> Its interesting seeing the gulf between the philosophers and the computer scientists. I think your average philosopher would enjoy a trip down the rabbit hole of automata theory and the hierarchy of things that can emulate lower levels things vs things that look different but are at the same computational level. Watching a non-CS philosopher rub a NFA up against a CFG, for example, would be interesting. What would Marx say about the assumptions of a DPDA wrt the labor theory of value (or anything else interesting?)

<comment><USER12> Though it's probably not the largest sub-discipline, there are (and have been for some time: [http://www.wiley.com/WileyCDA/WileyTitle/productCd-063122919...](http://www.wiley.com/WileyCDA/WileyTitle/productCd-0631229191.html)) a fair number of philosophers who are very interested in computing and (as you guessed) simulation as a way to approach their research questions.

</comment></comment><comment><USER13> I can't think of a definition of "compute" that would both include analog computers, but exclude e.g. a rock thrown.

I'm not sure how you could argue against the fact that in a near vacuum and a fixed gravitational field, a rock thrown will compute a fairly accurate approximation of a parabola.

<comment><USER14> It feels like everyone in this conversation is just choosing their own arbitrary definition of computation. The question is, why have you chosen that definition, what makes it useful? As the author points out, if rocks compute, then there is not much meaning to computation as a concept.

Computation in the colloquial sense refers to a sequence of events that happens inside machines that were made by humans in order to calculate some explicit mathematical results that the human operators have some interest in. I think this is a fine definition, and one that includes computers but not humans or rocks. I feel like the author erred in trying to redefine computation into some other abstract concept, muddying the water such that everyone is just talking about what "computation" means to them.

I think the real question we're getting at is, "what is the relationship between what a human brain does to solve a problem, for example moving a body into the correct position to catch a baseball, and what a computer does, which we know is executing explicit math equations to calculate trajectories, inverse kinematics, etc?" Right? We're talking about the illusion of intent, of goals, of the desire to solve problems - and as far as we can tell, rocks obviously do not possess those traits.

<comment><USER13> "..there is not much meaning to computation as a concept."

I kind of do agree with this.

So, if I want to calculate a parabola, and construct a machine to launch rocks at specific velocities and angles, then this machine is a computer, but if I just throw a rock without wantint to calculate a parabola, no computation has happened?

What if a kid is playing around with my rock launching machine? Is no computation happening because the kid isn't trying to calculate parabolas?

<comment><USER14> If the machine is just launching rocks at a specified angle and velocity, then no it is not computing a parabola. The rock's trajectory traces a parabola, but it has not been "computed" (in my view). A computation to me involves an explicit mathematical result related to some specific intent or question, not just physical objects playing out the laws of nature. The computer would have to make a statement, a result - "based on my calculations, at time X the rock will be at position Y."

<comment><USER13> Then you would clearly reject all analog computers, since e.g. an analog adder just involves electrons playing out the laws of nature. A rock launching machine is an analog computer for calculating a parabola. A specific result might be "where is the intersection with some Y value, and you have a platform at the height for that value. The distance the rock lands at would be the X value.

<comment><USER14> What is the point of reducing everything to nothing, or to the same thing? I mean I get it, technically it's valid, but it's very boring, there's nothing then to talk about. We are humans and we do have subjective experiences and classify things into different groups, and trying to understand the relationships and differences between groups gives us interesting things to think and talk about.

But hey, if a rock and a computer are the same thing, and computation is meaningless, words are meaningless, etc - why have you bothered to say anything at all?</comment></comment></comment></comment></comment></comment>


Show HN: A GraphQL server that executes multiple queries in a single operation - <AUTHOR> https://leoloso.com/posts/executing-multiple-queries-in-a-single-operation-in-graphql/ <comment><USER2> I absolutely think GraphQL will be the way forward once it evolves a bit further but I have 2 immediate concerns with this:

> As we've seen, we could attempt to use GraphQL to execute scripts, including > conditional statements and even loops.

There's a lot of things many technologies could be made to do but using GraphQL in this manner does not appear particularly readable nor maintainable. I can envisage a more evolved form of GraphQL might appear that looks more elegant for this type of work but as things stand this feels like it should be an anti-pattern.

> To run the query, there's no need for GraphiQL: it's URL-based, so it can be > executed via GET, and a normal link will do.

GET requests are meant to be idempotent but once again we see the GET method to do more than 'getting' \- sending emails no less! What happens when web crawlers start hitting that URL? This is a well-established anti-pattern and to have it as an example without warning people of the potential implications is only inviting junior developers to borrow this and make mistakes.

<comment><AUTHOR> Thanks for your comment

> using GraphQL in this manner does not appear particularly readable nor > maintainable

I fully agree. That's why I went to the trouble to design a different syntax. As I mention in its repo ([https://github.com/getpop/field- query/](https://github.com/getpop/field-query/)):

"The syntax described and implemented in this project is a re-imagining of the GraphQL syntax, supporting all the same elements (field arguments, variables, aliases, fragments, directives, etc), however designed to be easy to write, and easy to read and understand, in a single line, so it can be passed as a URL param."

I agree with your statement that GraphQL used for meta-scripting should be an anti-pattern. I'm not actually claiming what we should be doing, but what could be achieved if it is led in a proper direction. I actually proposed those 2 extra features for the spec (composable fields and composable directives) which, I believe, would do a great deal concerning this respect.

> we see the GET method to do more than 'getting' \- sending emails no less!

You're right in this remark, but this is just a demo to make it easy to make my point (as I mention in the article, I'm just printing the content on screen, not actually sending the email). In real life, whenever there's a mutation (such as sending an email), then you'd need to execute it via `POST`.

But for that same example, just remove one line from that big query (`sendByEmail`) and everything else is idempotent. That's the value of this method.

</comment></comment><comment><AUTHOR> In the link there are a couple of GraphiQL clients. Clicking on the Run button on them, you can play with this functionality, see how the response from "executing multiple queries" is merged, and how the queries can be chained</comment>


Metaclass programming in Python - <AUTHOR> http://www.ibm.com/developerworks/library/l-pymeta.html

<comment><USER2> If you use Django, I recently posted an example here: <http://www.djangosnippets.org/snippets/815/></comment>


Show HN: An Event Vendor and Venue Marketplace - <AUTHOR> https://planit.ng/how-it-works <comment><AUTHOR> We're building some key tools to implement over the next weeks.

Need feedback on: \- UI/UX \- Features to be added (we have a few coming over the next few weeks too) \- Demand-side marketing

We launched mid-June and currently have 5,000+ vendors

and basically anything else.

PS: We do plan to expand IF we nail our first market (Nigeria)</comment>


Climate Strike Software - <AUTHOR> https://github.com/climate-strike/license <comment><USER2> And yet this license is hosted on a Microsoft Azure instance of GitHub which is on a high performance data center incinerating the planet. Well well well.

At least to make your argument more serious, you should do what the FSF does in their philosophy and host this .md file on your own servers, not someone- else's data center.

<comment><AUTHOR> I am OP, but I posted it here because I thought it was interesting, not because I own the argument directly myself, however:

A static doc held in aggregate by a larger hosting firm is likely to be more beneficial power wise than a mostly-idle self-hosted server, isn't it?

There is also functionality available within Github (forking, pull requests, etc.), that developers are familiar with and able to engage with as a campaigning perspective that a self-hosting solution would not have.

So the argument of hosting it on Azure's DC vs your own undermining the campaign doesn't hold up for me, and as a static doc this is about as energy efficient as you can get really.

More needs to be done to make servers less toxic to the planet, but I don't think their use of a GitHub repo undermines their campaign and I am curious to find people who do. Would you genuinely find it less objectionable if they used a mostly-idle server on their own network?</comment></comment>


Show HN: Testcontainers, Docker support for JUnit integrated tests - <AUTHOR> http://testcontainers.viewdocs.io/testcontainers-java/ <comment><AUTHOR> Developer here! This library arose out of frustration with running Java tests that had some kind of non-Java dependencies - e.g. databases and web browsers for UI testing. Testcontainers lets you add Docker containers to your tests, linked to the lifecycle of the test rather than having to be externally managed from the outside. I've found it useful, and hope others do too.

A few blog posts outline some of the ways the library can be used:

* JUnit integration testing with Docker and Testcontainers [1]

* Fun with Disque, Java and Spinach [2]

* Better JUnit Selenium testing with Docker and Testcontainers [3]

[1] [https://rnorth.org/24/junit-integration-testing-with- docker-...](https://rnorth.org/24/junit-integration-testing-with-docker-and- testcontainers)

[2] [https://rnorth.org/25/fun-with-disque-java-and- spinach](https://rnorth.org/25/fun-with-disque-java-and-spinach)

[3] [https://rnorth.org/26/better-junit-selenium-testing-with- doc...](https://rnorth.org/26/better-junit-selenium-testing-with-docker-and- testcontainers)</comment>


Show HN: Foodshot – Handpicked food photos from around the web - <AUTHOR> http://foodshot.co <comment><USER2> very cool, what is your criteria for the photo? I am working on a food site that covers a slightly different domain. I am working on a new look that uses pictures as many of my users asked for it.

<comment><AUTHOR> Happy that you like it. All photos used on Foodshot are published under the Creative Commons Zero license, which means they can be used without asking for permission or providing attribution. Cool, what kind of food site do you work on? I am doing this as a side project for my main project, a food writing platform called Foodscene, foodscene.co.

<comment><USER2> my foodsite is bestfoodnearme.com Its a different take on finding food. I wanted a way to find food dishes by my location that fit a certain category or criteria such as peanut free, or paleo diet, or dinner. I did not want to search through lists of restaurants or reviews about the service. I just wanted something like a top N list of food dishes that people in the area thought were the best. Its a work in progress, and I am in the process of adding pictures and redoing the look.

<comment><AUTHOR> Very cool idea. It's often a hassle searching through dozens of restaurants on Tripadvisor. I hope that the pictures on Foodshot can help you out in the building process!</comment></comment></comment></comment>