Introducing nushell - <AUTHOR> http://www.jonathanturner.org/2019/08/introducing-nushell.html <comment><USER2> The Powershell idea to push structured data through the pipe, which this project fundamentally replicates with a relational structure, has its merits; but it will always displease someone, and carries the burden of having to rewrite millions of utilities in order to unlock the real potential.

What if, instead, we pushed the approach "upstream", asking systems to have an additional stream that all shells can access? We have stdout and stderr, we could add "stddata" - a pipe that expects and produces structured data. Then it would become trivial to add support around the userland, without displeasing anyone - because it's just an additional interface, not a replacement. The pipe should support two or three formats to start with (csv, json, and maybe xml, so you can handle both tabular and child-parent relations with a varying degree of precision) and shells could have a special character for piping stddata (I like ¥) so everything else about them would stay the same.

<comment><USER3> I am at the stage that I am more than happy to rewrite whatever it takes to get better experience. This includes the OS. I think we have sacrificed too much on the altar of backward compatibility. I guess I am just tired of breakage because a file has a space in its name.

<comment><USER4> > I am at the stage that I am more than happy to rewrite whatever it takes to > get better experience. This includes the OS

Ever tried to rewrite one (and the software on top of it, since we're "including" the OS) :)?

<comment><USER5> Shout-out to anyone who remembers being blown away by BeOS when it was brand- new and extremely promising

<comment><USER6> I now have the Virtual Void song stuck in my head.

</comment></comment></comment></comment></comment><comment><USER7> The compelling idea here is that they convert the output of common shell commands into tabular data that can be manipulated using common operators, so that you don't have the remember sorting/filtering/grouping flags that may be different for every different shell command. So, imagine being able to use the same sorting/filtering logic on the output of `ls` as you might on the output of `ps`, and without relying on hacky solutions like pipelines to `grep`, `cut`, and `sort`.

It also means shell command output can be easily transposed into JSON and CSV. Actually pretty clever!

<comment><USER8> I've been delving into bash scripting a bit more than I'd like as of late and the lack of universally available consistent structured output for the CLI really got to me. Most of the script contents end up being these obfuscating and brittle "hacky solutions" that never should have been necessary. When I thought about pursuing fixing this I felt like the task was a bit overwhelming. I'm delighted that these developers are working on this!

<comment><USER9> The key flaw of UNIX philosophy is destructuring deserialization and reserialization based on lines, necessitating all manner of argument escaping and field delimiters, when pipelines should be streams of typed messages that encapsulate data in typed fields. Logs especially (logging to files is a terrible idea, because it creates log rotation headaches and each program requires a log parser because of the loss of structured information) also. Line-oriented pipeline processing is fundamentally _too simple._ Settling on a common data simple/universal format robust enough for all purposes, including very large data sets, to exchange between programs and is just complicated enough to eliminate escapement and delimiter headaches without throwing away flexibility (by a new/refined set of processing tools/commands) is key.

<comment><USER10> It's not so much a flaw as a tradeoff. Because it's so easy to produce lines of text, virtually every program supports it, even programs written by hackers who aren't interested in following OS communication standards.

<comment><USER9> No, that's your opinion, not mine. It's a flaw because it creates escaping magic, delimiters that are in-band (spaces) and every program has to know how to parse the output of every other program, wasting human time and processing time. Structured communication, say like an open standard for a schema-less, self-describing, flexible de/serialization like protobufs/msgpack, would be far superior, more usable, more efficient and simple but no too simple to process streams of data with structure and programmability already there.

Being able to dump structured information out of an exception directly into a log, and then from a log into a database, without any loss of information or extraneous log parsing, is a clear win. Or from a command as simple as listing files ("ls") into a database or into any other tool or program. Outputing only line-oriented strings is just throwing away type information, and creates more work for everyone else, even more so than continuing to stay with lines processing tools.

<comment><USER11> So, if you're not a fan of the UNIX philosophy, maybe check out Powershell. Or take a look at WMI and DCOM in Windows. Eschew shell scripts in favor of strongly-typed programs that process strongly-typed binary formats, or XML, or whatever. The alternatives are out there.

"Worse is better" isn't for everyone.

<comment><USER12> Nushell does not seem like a violation of the unix philosophy, or at least the version of it that I like best.

"Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface."

Perhaps I'm wrong, isn't nushell simply adding one more dimension?

Instead of a one-dimensional array of lines, the standard is now... a two- dimensional array of tabular data. Perhaps it is not strictly a "text stream" but this does not seem to me to be a violation of the spirit of the message.

Simple line-based text streams are _clearly_ inadequate IMO. 99.99% of all Unix programs output multiple data fields on one line, and to do anything useful at all with them in a programmatic fashion you wind up needing to hack together some way of parsing out those multiple bits of data on every line.

        maybe check out Powershell

I left Windows right around the time PS became popular, so I never really worked with it.

It seems like overkill for most/all things I'd ever want to do. Powershell objects seem very very powerful, but they seemed like too much.

Nushell seems like a nice compromise. Avoids the overkill functionality of Powershell.

<comment><USER5> Semantically, a one-dimensional list/array of "things" can be trivially transposed into a series of lines with a linebreak separator, but I don't think the same holds true for a "list of lists" (2-dimensional data) or a "list of lists of lists" (3D data) etc. At least without a standard begin-end list delimiter that allows nesting.

Just thinking about a way that perhaps an old tool can be "wrapped" to be tricked into working with 2+-dimensional data by somehow divvying up the 2+ dimension input data into concurrent 1-dimensional streams, but this seems to require a way to represent more than 1 dimension of data without breaking existing utilities (unless there was, like, a wrapper/unwrapper layer that handled this...)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> This is almost exactly what I have dreamed with a shell. I'm building a relational language ([http://tablam.org](http://tablam.org)) with the plan of something alike.

Some extra ideas:

\- Tables are amazing. But I think we need at least support for this "shapes" of data: List, Tables, Trees and maybe graphs

\- I think will be nice to have an equivalent of Request/responses alike http. And then a way to introspect what a command do, like auto-swagger.

\- Having widgets like table-browser, graphs, etc AS COMPONENTS.

In FoxPro you could say "browse" and it display a DataTable grid with full editing capabilities on the current table (or it ask for a table to open). In this case:

        ls | ui_browse

The key here is that the widgets work stand-alone, so is not necesary to fully build a terminal app just to see nicely data. Look like [https://goaccess.io](https://goaccess.io) and more like this idea: [https://github.com/sqshq/sampler](https://github.com/sqshq/sampler)

This mean we could get a jupyter-like experience here!

\- Some way to do curryng and maybe environment alias: You could setup an environment for the system, the user, this directory. In the environment is a .toml with vars and stuff.

The other thing where I think shells fail... is that are still old-style terminal. Having text output is cool, but having more rich widget system will unlock better the potential

<comment><USER14> Like PowerShell's different output formats (table, list, wide, ...)?

<comment><USER13> No output. Declared the input/output is in the shape table, list, tree.

Like when a http response say is json, text, csv, etc. This information unlock certain capabilities and will allow to provide efficient execution of queries.

If psql (postgresql terminal cli) declare their data is in the "tables" shape then it could take the |where name = "" query itself and execute it instead of output all the rows...

</comment></comment></comment><comment><USER15> There's a lot of comments here already so I don't know if this has been addressed already, but I don't get this shell. It seems to be fixing a problem that doesn't exist, and a lot of comments are echoing it. Current shells are not deficient, as Doug McIlroy originally stated, the universal interface is text and tools should take input and generate output based on this. You obviously can then pipe things together with these tools not necessarily knowing in advance how they will be used in a pipeline. You can get very far with sed, awk, etc, you just have to spend a little bit of time learning them, but they are not complicated. You can of course then introduce a command like jq for specialised purposes. But hte point is the shell isn't providing this, they are separate tools that you orchestrate using the shell. There is not a flaw with how it works at the moment, I truly believe and this isn't a dig at this project or anyone in particular, that people do not spend enough time learning these tools that have been there for decades. The re-inventions that appear on GitHub are not a product of the deficiency of the existing tools, I don't know what they are but it's not that. Unless I am missing something.

<comment><USER15> One downvote and counting. This is just my opinion. Let's crank this up a notch. Those advocating for more advanced interfaces are missing the point. Text is all you need, no graphics or objects or widgets, just text. I have no problem with this, I enjoy it like this, we don't need an improvement. There I said it, any downvotes will be worth it, because I get to voice my opinion. In the end I will still be happily using my POSIX shell scripts, awk, sed and enjoy my life.

<comment><USER16> "Goto is all you need, no ifs or loops or dynamic dispatch, just jumps. I have no problem with this, I enjoy it like this, we don't need an improvement. There I said it, any downvotes will be worth it, because I get to voice my opinion. In the end I will still be happily using my assembler and enjoy my life."

I'm sorry, I couldn't help myself. Your comment reminds me of an anecdote I heard from the early times of structured programming. When structured programming was just gaining its feet, there was a certain class of programmers who just could not understand why people would want to write structured code. You can do everything in assembly they said, you have much more control over performance, etc. They looked down on structured programming as not "real programming".

There's a lot of benefits to adding some structure to text. I don't think that Nushell's approach is the best one, but to say that there are no problems and we shouldn't look to improve things is just backwards. We should always look to improve our tools and our craft, otherwise we would still be stuck writing assembly.

<comment><USER17> _There 's a lot of benefits to adding some structure to text._

There are benefits, true, but there are also potentially serious drawbacks. Chief among them, I would hazard, is the risk that we get locked into a format that didn't anticipate a (completely unknown) future need and we have to go back and rewrite everything again.

The beauty of text's lack of structure is that people are free to interpret it any way they please.

<comment><USER18> I keep seeing comments like this one, but just as you can parse textual data into something more structured, like the examples in the post, you can also print the structured data as text. So the tools that use and generate structured data are no less compatible because it's easy to go back and forth between the formats at will. You're not losing anything with this approach.

<comment><USER19> > You're not losing anything with this approach.

True, but you are adding something. And if you add things you don't really need, it becomes plain old cruft.

Like the others above, I understand the urge to make some things simpler by adding complexity, but for the long haul I'm convinced it's better to keep tools simple and add any needed complexity to the code you're writing (whether it's shell scripts or anything else). And then document the complexity so future you or some poor stranger can understand why the hell you did that in the first place.

But I don't look forward to reading comments like "X was deprecated so we're converting these tables back to text streams so they can be converted back to Y properly."

</comment></comment></comment></comment></comment></comment><comment><USER20> A brand new shell, especially in Rust is a great thing to see and also how it tackles the problems that exist in other shells.

However, its interesting to see so many dependencies that are required to build it (73 crates last time I checked) and as shells have always been portable across many operating systems, I wonder how portable nushell would be since it wishes to replace my current shell.

<comment><USER21> I think the JavaScript/npm world has trained a generation of devs that high dependency counts are a code smell. This _can_ be true, of course, but that's largely because of external factors.

In a perfect world, a language's ecosystem would have a tiny stdlib and allow importing of libraries for everything else. The Linux philosophy would be followed strictly.

The problem is just that the overhead in securing, maintaining, and organizing all those libraries is pretty large, as we've seen by npm's repeated failures. Of course the *nix community seems to have largely solved the problem, but there's also a massive culture of volunteerism benefiting them.

<comment><USER22> I think there's definitely room for mirrors of package repos that focus on a stablized and audited subset of packages, with frequent security and bug backports and medium-length cycles for new features — like what Fedora and Debian do, but for language ecosystems.

<comment><USER23> Agreed. ActiveState has had that as a commercial offering for quite some time ([https://www.activestate.com/products/](https://www.activestate.com/products/)) and Red Hat is getting into it with (OpenShift) Application Runtimes. Given that providing such a thing is hard not-so-fun work I have a hard time seeing it getting available for free. (ASP).NET Core might be alone in being well- financed and free, something I think will lure (enterprise software) developers over long-term.

</comment></comment></comment></comment><comment><USER14> This looks great, but what exactly are the benefits over PowerShell? The article mentions PowerShell, then says:

> What if we could take the ideas of a structured shell and make it more > functional? What if it worked on Windows, Linux, and macOS? What if it had > great error messages?

\- Any shell with piping is already very functional, and PowerShell has script blocks (higher-order functions). Or does this mean "functional" in the literal sense? What functionality is missing? \- PowerShell works on macOS, Linux and Windows \- The examples of error messages further down look almost exactly like PowerShells error messages (underlining the command in the pipeline that failed)

It is not clear to me what exactly the authors sought out to do different

<comment><USER24> They clearly know about PowerShell. They acknowledge it as an inspiration and the core concept is the same.

That doesn't mean there aren't ways to improve upon PowerShell.

As a light user of PowerShell I consider it a poor implementation of a great idea.

Commands are way too long, control structures have poor syntax etc.

To make this very concrete, take this example from nu:

        ls | where size > 4kb

Now give me an equivalent in PowerShell and then let's talk about how different Nu is from PowerShell.

<comment><USER25> The equivalent, btw, is:

      ls | where length -gt 4kb

The only difference is powershell uses ">" and "<" for redirection, and so uses mnemonic operators for comparisons.

Nu doesn't seem to support redirection (or even have anything other than one input and one output stream, though metadata might serve the purposes otherwise served by additional streams; it's not how a program would return something Nu would treat as metadata, though.)

I guess that with a structured-data shell, error type of info could just be returned in-band under a different tag, in any case.

</comment></comment></comment><comment><USER26> Pretty cool idea and project. Hope you take it further and it turns into something truly spectacular!

My only comment is on the article. This line:

> Nu would not have been possible without Rust.

That's just patently false.

Perhaps you wouldn't have chosen to code it in another language. Or perhaps Rust had one or two benefits that assisted in the development of Nu. But you don't word it that way or go into any details as to what made Rust special/better than X, Y or Z language (not that you need to, but if you're going to make a wild statement, you should be prepared to back it up). The only 3 points made following that were about features that have widely existed in other languages well before Rust came along: async/await, async streams, and serde.

Rust is cool and is still exploring some really great ideas in making programs safer and more maintainable. But, it's not the greatest language ever (at least not yet), nor does it make the impossible possible. It can merely make some things easier at the cost of something else.

I'm glad you were able to use it effectively to create a tool you - and others - find useful.

<comment><USER27> Yeah I agree. That was intellectually dishonest.

I really like the idea and look of this project. To me it feels like PowerShell done better (and implemented by non-aliens).

<comment><USER28> I was about to post the same thing.

I could put this together in Common Lisp. I know precisely what CL technologies I'd use to do it, and perhaps after finishing the work I'd say "this wouldn't have been possible without Lisp", which would be true in some respect, but just as dishonest as the original article.

That doesn't mean I don't respect the work done. It's an interesting project and most definitely something that deserves attention. The language used to develop it is the least interesting aspect of this.

<comment><USER29> Yeah, a program written in X would not have been possible without the existence of programming language X.

</comment></comment></comment></comment><comment><USER30> Interesting! I am also looking forward to setting aside time to play around with [https://elv.sh/](https://elv.sh/), which takes a completely different approach with a similar philosophy.

<comment><USER31> Elvish author here, thanks for the plug :)

</comment></comment><comment><USER32> I pretty much like the idea, but my biggest problem with current day shells is error handling.

Errexit (aka `set -e`) is a great idea badly executed. There are many things which can be improved (e.g. printing a stack trace by default), but at its core, there are two things which break it.

1\. Inconsistent behavior: [https://www.in- ulm.de/~mascheck/various/set-e/](https://www.in- ulm.de/~mascheck/various/set-e/)

2\. You can't rely on it.

Inconsistent behavior should be no problem if a new cross-platform implementation is coming, but not being able to rely on it sucks. To give a quick demo:

      #!/bin/bash

      foo() {
        set -e
        false
        echo "Sucks"
      }

      printf 'Normal: %s\n' "$(foo)"
      printf 'Condition: %s\n'  "$(foo || true)"

Output:

      Normal:
      Condition: Sucks

So if someone is about to bring a new shell, please fix the error handling along the way. But hey, Yehuda Katz is part of the project. So I am looking forward to what is coming next :-)

<comment><USER33> After running into this and many other issues in sh/bash scripts (such as the pitfalls of handling newlines and spaces correctly with the splitting rules, the awkwardness of basic features such as lists or arithmetic, and the generally inconsistent and obscure syntax), I've moved all my shell scripts to Python3 and I have no regrets about it. Calling external programs is still very easy with the subprocess module. And it's installed pretty much everywhere you have sh/bash on.

To be fair, I am not even sure if creating a new shell scripting language is something worthwhile in this day and age. There's some value in the convenience of instantly turning a sequence of commands you just manually typed into a script, but there's a conflict in that the shell has to provide you a way to hack a sequence of actions together with as few characters as possible, while a script has to be comprehensible, maintainable and extensible. And the inertia you would have to overcome to successfully introduce a new programming language in addition to a new shell makes it intractable.

</comment></comment><comment><USER34> I really like this conceptually. I feel like with Powershell, you need a bunch of commands that actually pass objects around or act upon them; and something similar in Linux would require writing a lot of extensions first.

I've been using fish shell for years and glad I started down that route. It's been incredibly useful.

I really want to give this a shot too. I feel like too often I'll open up Python, read a file and then manipulate it when I need to something more complex than simple grep/sed/cut/wc etc... This feels like it really fills in that gap. It starts with something really simple: get your unstructured output in a structure, and then build from it. I could see people writing more custom extensions and objects later on if this gets popular.

<comment><USER35> Python has a similar idea with Mario. But because it's not a shell itself, it requires less of a commitment.

[https://github.com/python-mario/mario](https://github.com/python-mario/mario)

<comment><USER36> Or even more similar to the project being discussed, [https://xon.sh/](https://xon.sh/)

<comment><USER37> If you like xonsh, I might recommend the tako shell (by a former xonsh dev).

[https://takoshell.org/](https://takoshell.org/)

<comment><USER38> Tako seems to handle background tasks better than xonsh. The link to the code isn't working though, so I am not sure why.

<comment><USER37> Can you tell me which link is broken? The author's a friend, and I can poke him to update it.

<comment><USER38> [https://hz.mit.edu/git/tako/tako](https://hz.mit.edu/git/tako/tako)

</comment></comment></comment></comment></comment></comment></comment><comment><USER39> I read this, and read all about it, and the whole time I thought the name was "nutshell," until I saw they abbreviated it "nu."

Now I'm really disappointed that it's not called "nutshell."

But this is still very cool.

<comment><USER40> Nushell in a nutshell would have been the better title!

<comment><USER41> I sincerely hope that nushell becomes popular enough for O'Reilly to publish a book with that title. :-)

</comment></comment></comment><comment><USER42> Interesting PoC, but does it solve a real world problem?

If I had to reinvent the shell by breaking backward compatibility, I would do a statistical study using all the shell scripts publicly available on GitHub, a survey about the critics of the current shells in the literature, and then I would try to optimize a metric such as : words typed to complete a task, reproductivity, time-to-market, communication, mathematical soundness, etc. The result of the study might be that the current shell is enough and the cost of switching to another is too big (I don't know, it's an hypothesis)

People shared many thoughts and opinions on this thread, so that's already a win by itself

<comment><USER43> > _Interesting PoC, but does it solve a real world problem?_

Yes, the real world problem of making it combining shell commands easier and more interactive.

A solution doesn't need to solve a whole new problem. It's enough that it solves an existing, already solved problem, better.

The same way the travel luggage with 4 wheels doesn't solve anything the travel luggage with 2 wheels or no wheels solves, just makes so much more easy and awesome.

<comment><USER44> It also opens up a compelling use case for having a nice web interface for working with the shell (where you can button sort and export to Json on output) since the structure is common.

</comment></comment></comment><comment><USER45> Looks cool, but when I see things like this I figure there's no point in trying to learn something that won't exist on 99% of the systems I need to work on. Bash sucks, but it's almost always there. Embedded systems, desktops, big iron... Like many of the established Unix tools, bash has market penetration and staying power.

<comment><USER46> You might be in the "late majority" phase of tech adoption, and that's ok. Some of us early adopters bang our heads on new stuff and pass the results of our tests on to slightly less foolhardy souls :) Eventually, established tools arise out of the mess.

[https://ondigitalmarketing.com/learn/odm/foundations/5-custo...](https://ondigitalmarketing.com/learn/odm/foundations/5-customer- segments-technology-adoption/)

</comment></comment><comment><USER47> I like the concept a lot, especially the focus on outputting data in an organised way.

What I feel could be improved is the presentation of the tabular data. Some ideas below:

\- The screenshots show two horizontal lines consisting of dashes, one at the start of the table, one at the end. To me they seem redundant and could be replaced with spaces (whitespace). I did a quick check and PostgreSQL's psql tables also don't have lines like this.

\- How about using Unicode lines instead of dashes and plus sign in the header? This way there would be fewer gaps there. I'm not sure though how this would affect compatibility.

<comment><USER48> Ideally, presentation of the data would be handled by themes. Hopefully they build theming support.

<comment><USER49> I'd immediately say it would be nice with configuration that could opt-out of the relative and fuzzy dates.

Relative like "today" would be fine, if it includes the exact time today too.

</comment></comment></comment><comment><USER50> I love the idea of treating output as tabular data.

I see you already have a where operator. What would fit this very well would be in-built sql-like syntax. Since tables are first class, you should have an in-built way of handling them.

A languiage similar to q/kdb - it has a great SQL dsl, but also works as a regular programming language. It's also very concise and expressive, you can write oneliners that do mind bogglingly complex things.

<comment><USER51> What's a dsl? I wasn't able to find an answer in my quick google search

<comment><USER52> Domain Specific Language

</comment></comment></comment><comment><USER53> Whoa. It has been a while since I've seen something that truly feels like it can revolutionise my workflow. Amazing job to everyone involved in this project!

Really excited to try this, surprised that there is no pre-built binaries. Are these planned?

<comment><USER54> Yes, we'll hopefully have those up soon.

</comment></comment><comment><USER55> i feel like structured data in a shell will phase out. The posix pipes allow streaming _any_ data. So if programs want to stream structured data, just build programs who know how to communicate with each other using structured data. The older shells withstand the test of time with generic interfaces.

For instance, because of the influx of JSON the past few years I have learned to use jq very well. It does everything I need and I didn't need to upgrade my shell to use it. What if everything becomes protobuf down the road?

<comment><USER12>
       i feel like structured data in a shell will phase out.
       The posix pipes allow streaming any data.

There's a huge mismatch in coreutils.

Nearly everything is built around a line-based philosophy. However, nearly any coreutil you care to name also likes to cram multiple bits of information on a single line.

That means you often have to do a bunch of ugly manipulation with awk, sed, cut, whatever to anything programmatic with the output of each command.

        For instance, because of the influx of JSON the past few
        years I have learned to use jq very well. It does everything I need

Yeah, jq is awesome and covers a lot of needs. But coreutils don't really emit json, so... yeah. There's a lot that it can't work with, right?

        What if everything becomes protobuf down the road?

I know you're being facetious, I think protobuf is clearly overkill for very many needs.

Nushell seems to build upon what we've learned in the last 30-40 years. Pipes and simple interchange formats work well and are very useful for a lot of use cases. However, experience also shows that very few programs output lines of text that are atomic in nature. Each line represents multiple things and we frequently need to parse them out. That seems like a very common use case that our shell can handle for us.

</comment></comment><comment><USER56> I like this a lot but why does this have to be a completely new shell? Couldn't this also just be a set of tools that I can use in an existing shell and get the best of both worlds?

<comment><USER35> The idea of Mario is to use Python objects in your native shell (bash/zsh/fish/etc)

[https://github.com/python-mario/mario](https://github.com/python-mario/mario)

<comment><USER57> Xonsh seems like a more popular, maintained and viable approach to that:

[https://github.com/xonsh/xonsh/](https://github.com/xonsh/xonsh/)

<comment><USER35> Xonsh is a whole shell environment though, which isn't what parent wanted. As for popularity, yes, Mario is relatively new. :-)

<comment><USER56> The GitHub repo looks kinda weird on first glance (>1k commits but <100 stars, virtually no contributors or issues, empty LICENSE file) but yeah it is more of what I thought.

Personally, I'm not very accustomed to Python though, so I find the syntax kinda weird. I'd prefer something that feels more like a standard Un*x tool (like nushell).

</comment></comment></comment></comment></comment><comment><USER58> Looks amazing! Unfortunately a `cargo install` on stable fails due to a dependency "futures-async-stream v0.1.0-alpha.4" with the "rawkey,clipboard" features.

The source is pretty interesting. Here's the PS command: [https://github.com/nushell/nushell/blob/master/src/commands/...](https://github.com/nushell/nushell/blob/master/src/commands/ps.rs#L27)

And the sort-by: [https://github.com/nushell/nushell/blob/master/src/commands/...](https://github.com/nushell/nushell/blob/master/src/commands/sort_by.rs#L29)

<comment><USER59> Yup- the doc at [https://book.nushell.sh/en/installation#installing- rust](https://book.nushell.sh/en/installation#installing-rust) does call out that it currently needs the rust nightly toolchain.

</comment></comment><comment><USER60> How do I do this in nushell? It's an alias I created recently to ripgrep through java and go files and tell me which have both of two words:

      function both {
          comm -1 -2 <(rg -i -l -t java -t go $1 | sort) <(rg -i -l -t java -t go $2 | sort)
      }

Example usage: `both sharded jobqueue`

<comment><USER61> Your question brings to light some of the deep flexibility current shells allow with a very terse syntax. At least from Nu you can accept and process the output of your script.

As an aside, your one liner is having to process every file twice, even ones that have already been excluded by the other ripgrep... something like this should be more performant:

rg -il $2 $(rg -il -t java -t go $1)

<comment><USER60> Nice. Perhaps with an xargs thrown in to be safe...

</comment></comment></comment><comment> entire-name An object pipeline is certainly interesting, and I do use PowerShell from time to time. However, there is a reason extremely simple concepts such as "everything is a file" or "input/output/error are all text" survived for this long. I will quote an answer provided in a vaguely related question [0]:

> There is no spoon^H^H^Hstructured data. There is only text.

[0]: [https://unix.stackexchange.com/a/400](https://unix.stackexchange.com/a/400)

</comment><comment><USER62> This nicely ties into the recent HN thread about a dream OS that would provide databases at the OS level instead of forcing the re-implementation of databases in many programs.

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

</comment><comment><USER43>
      ^ls -la | lines | skip 1 | split-column " " perms files group user size month day time name

This is neat, but does nushell have the ability (should be trivial to add) to save such a pipeline and reuse it (similar to an "alias")?

e.g.

      myls = ^ls -la | lines | skip 1 | split-column " " perms files group user size month day time name

and then:

      myls | where size > 1000

Also perhaps the built-in commands could be namespaced? E.g. nu.ls or nu-ls vs ls. Then you wouldn't need escaping, and the names wouldn't shadow traditional commands (but could allude to them).

<comment><USER63> About namespacing, they are doing something equivalent, but making theirs the default. If they make theirs nu.ls, many (most) people would type ls ;)

<comment><USER43> >* If they make theirs nu.ls, many (most) people would type ls ;)*

Sure, and they'll get "ls" (the standard one, from POSIX), which should be the least surprise. From then on, they'll know to call nu.ls explicitly when they need it. Sounds like a better option.

</comment></comment></comment><comment><USER64> I really enjoy seeing new ideas around interfaces. But I do wonder, rather than creating a new shell, couldn't we have a 'json/structured' mode for cli programs - and maintain compatibility with existing shells? For example if it was toggled with a SHELL_FORMAT environment variable?

What issues could be faced with this approach?

<comment><USER65> PowerShell has an IMO good answer to this: if you run a classic CLI program, its output is interpreted as an array of strings (lines), so if you pipe the output, you have a way to process it into something object-like.

Having a toggle creates the problem that you have to write two implementations for your tools, or you end up having to memorize which commands can run in which modes. It's easier to have a consistent pattern and a way to up-convert existing CLI programs.

</comment></comment><comment><USER66> This project has goals similar to GNU eshell [1]. Great ideas, thank you for sharing.

[1] [https://www.gnu.org/software/emacs/manual/html_mono/eshell.h...](https://www.gnu.org/software/emacs/manual/html_mono/eshell.html#Introduction)

</comment><comment><USER67> This is great, we have a tendency to be content with existing tools we're familiar with but be blind to their limitations. I'm looking forward to how this project evolve!

However an important point for practical usage is the capability to run existing scripts, for example as oilshell [1] does. I skimmed through the README and doc but couldn't find the current status nor future plans.

[1] [http://www.oilshell.org/blog/2019/06/17.html](http://www.oilshell.org/blog/2019/06/17.html)

</comment><comment><USER68> Any time the first line of a project description reads "This is NewTool, written in <language>" it's an immediate red flag that makes it hard for me to continue reading.

Obviously it doesn't necessarily mean the project has no merits, but language choice is one of the less relevant details and it signals that the author wanted to make a toy in a language new to them. Good for them, but most of the time the rest of the world doesn't care.

If the project has merits, and this one might, it should talk about them in the intro.

<comment><USER69> > most of the time the rest of the world doesn't care

Much of the time, HN readers however will. There's the odd software developer hanging about here, some of whom are interested in programming languages, or so I believe.

</comment></comment><comment><USER70> This is really cool. I've always liked the ideas behind Powershell's approach, and so I'm glad to see someone is working on Linux-friendly shell that has the same sort of features.

I have to say that I don't care for the snark about "having to remember" arguments to various pipeline-munging commands. I get that this is a big challenge for new folks working with typical unix shells, but I'm not sure I see how this actually solves it. In order to avoid all those flags, a system like this requires more verbs overall, and those verbs have their own argument structure, eg `split-column " | " firstname lastname job`, so now instead of being able to label the arguments and order them how I want, I now have to remember the order they come in, and what they mean, and that `split-column " "` apparently eats extra whitespace (does `split-column " | "`?). Yes, the standard unix tools have these issues, as well. That's my point.

So yes, I love this idea, please keep pursuing it, and I look forward to trying it out. But focus on the benefits of working with structured data rather than pushing lines that sound good but aren't actually true.

</comment><comment><USER71> The idea is inspiring!

I'm finding it hard to get over them using pipes and dashes for table borders. Is this the 70's? It's genuinely hard to read these tables. See: [https://www.interaction- design.org/literature/topics/gestalt...](https://www.interaction- design.org/literature/topics/gestalt-principles)

</comment><comment><USER72> Hmm I like this but there's no way it's replacing fish for me, I'd rather use it as standalone command that provides the same functionality.

e.g. `ls | nu where size > 10` or `nu open Cargo.toml`

<comment><USER73> I finally decided to go look at fish. Why didn't I do this sooner??

</comment></comment><comment><USER74> As a long time Unix person who also discovered pwsh, like Yehuda did in the article:

Can I make nushell cmdlets (or equivalent) in something other than rust? pwsh limits me to .net languages, but I wanna use node.

</comment><comment><USER75> This looks really cool but isn't Powershell cross platform now? It looks to shadow much of the features of Powershell which opens scripting to the whole of the .Net library

<comment><USER76> The assumption with powershell is that your admin tasks should be coded in .net, and their dependencies should be imported from .net. Not required, but preferred.

<comment><USER75> Yeah and since .Net isn't my cup of tea this shell could be pretty cool

<comment><USER76> yes hopefully this project can implement a double pipe operator or something, so one pipe means pipe structured data (like powershell) and the other is pipe stdin/stdout output via memory so it is super fast.

</comment></comment></comment></comment><comment><USER77> Not sure if they're aware of Shcaml, which seems even more powerful since it supports anonymous records in lines:

[https://www.ccs.neu.edu/home/tov/code/shcaml/doc/](https://www.ccs.neu.edu/home/tov/code/shcaml/doc/)

Edit: features look similar in fact, since you can name columns and refer to them by name. Neat!

</comment><comment><USER78> I find it good in general but don't like the idea of reusing the names like `ls` and so on which is confusing with the option to invoke the real `ls`. Since they have single-character names already, a simple `l` would be one way to solve this.

I'm interested to see a solution to error handling (within multiple pipes!) and subprocess management as well but couldn't find much in the docs.

</comment><comment><USER35> Mario has a similar feel to this but in Python, and lets you use arbitrary code and construct your own functions in pure Python.

[https://github.com/python-mario/mario](https://github.com/python-mario/mario)

        $ mario read-csv-dicts map 'x["name"]' < hackers.csv
        Alice
        Bob
        Carol

<comment><USER79> You've made 9 comments in this thread, all promoting Mario. Are you the author?

</comment></comment><comment><USER80> Love it! Thanks. I've always thought powershell was a great concept, badly executed (those long names with capital letters, confusing errors, and insanely long time to return when a command is missing).

Is anyone interested in a shell with a GUI? As in, data still passing as text, but having a shell which can render textual data into widgets when displayed in the shell?

<comment><USER14> PowerShell has this with out-gridview, check out: [https://devblogs.microsoft.com/powershell/out-gridview- retur...](https://devblogs.microsoft.com/powershell/out-gridview-returns/)

My favourite feature is that you can select objects in the GUI to pass on to the next pipeline step

</comment></comment><comment><USER81> Very neat, love it. Few things-- 1) Recommend this install line (for those of us on mainline/standard who've never used a different toolchain) cargo +nightly install nu 2) Things like ls | where readonly don't work as expected-- readonly should be a bool, shouldn't it? 3) How do you paginate? ls | less doesn't work

</comment><comment><USER82> This seems like it could potentially be an awesome tool for data cleaning/munging in the terminal.

Really interested to see where this goes..

</comment><comment><USER83> Within the boundaries of the demo, it feels like all my time reading man pages is a landline network, and this is cellular.

</comment><comment><USER84> Interesting, there's definitely a niche for this. But I'm not sure it could replace a normal shell in my opinion. I'm confused at what other commands would do in this context? Will it tabularize; echo "Hello World"?

There's an elegant simplicity of treating all piped output as a string rather than objects...

</comment><comment><USER85> Feature suggestion: detect timing differences between program outputs to determine where an individual output ended and the next one began, so people can automatically scroll to the top of a stack trace for instance by double clicking it or something because the shell will recognize all those lines as a single message.

</comment><comment><USER86> Is the processed data typed? Can you offer auto completion of data fields based on these types?

I also thought quite a couple of times about implementing a data centric, typed shell language. My primary goal was to have a shell where one could discover every feature by oneself through the magic of types.

</comment><comment><USER50> People are really excited about this. Here's a question:

Would you pay for this?

My prior is that no, people would not pay for a new shell - they'd prefer sticking to bash because A. it's "standard" B. it's free.

I have to wonder how developing new tolls like nushell can be sustained over the long run.

</comment><comment><USER87> I feel open parsing files is misguided. Downright wrong if it profilerates into scripts, because suddenly simple scripts can't work on JSON, because opening JSON returns something different from a stream of lines.

<comment><USER25> > I feel open parsing files is misguided. Downright wrong if it profilerates > into scripts, because suddenly simple scripts can't work on JSON, because > opening JSON returns something different from a stream of lines.

Doesn't "open --raw" address that?

[https://book.nushell.sh/en/loading_data#opening-in-raw- mode](https://book.nushell.sh/en/loading_data#opening-in-raw-mode)

Also, I suspect most simple scripts that want to work on JSON Will _want_ to parse it, so the default makes them more easily able to work with it, not less.

<comment><USER87> I am having a problem with --raw not being default. Defaults must be secure and stable.

<comment><USER79> Can you explain why parsing JSON can't be secure or stable?

<comment><USER87> The problem is not with JSON parsing. It is with the fact, that people will use open without --raw to process, for example, Python files, because it is easy and works now. And some day later shell will learn to parse them into AST with open, and today's scripts will no longer work. Or worse start doing something very wrong.

</comment></comment></comment></comment></comment><comment><USER88> This looks very interesting.

Unfortunately, I'm having trouble building it on Mac OS X 10.14.5 and with the latest rust update installed.

        cargo:warning=libgit2/src/streams/stransport.c:12:10: fatal
           error: 'CoreFoundation/CoreFoundation.h' file not found

        cargo:warning=#include <CoreFoundation/CoreFoundation.h>

Can anyone clue me in? An Xcode update perhaps? (I'm doing it, but it is taking forever). I have a CoreFoundation.h on my system under MacOSX10.14.sdk, but it is not under a CoreFoundation folder.

</comment><comment><USER89> Bash is ubiquitous - the best selling point for knowing it and sticking to it.

I desire a fancy new shell but don't want it to become a crutch, limiting my usefulness and familiarity when I'm on a system lacking it.

</comment><comment><USER90> The idea of programs that work on structured data is quite old. Anyone ever read "structural regular expressions" by Rob Pike? Highly recommended: [http://doc.cat-v.org/bell_labs/structural_regexps/](http://doc.cat-v.org/bell_labs/structural_regexps/)

Also, using structural regexps for efficient interactive text editing: [https://github.com/martanne/vis](https://github.com/martanne/vis)

</comment><comment><USER91> This is very cool! The giant drawback of Poweshell is that it's so focused on Windows - this projects seems to provide some of that power cross platform. Very neat idea!

<comment><USER14> PowerShell has been focused on cross platform since 2016 (3 years now)

</comment></comment><comment><USER92> I'we always felt like there should be no file system and no shell but a relational database with a particularly suitable and extensible SQL dialect REPL.

<comment><USER93> I'm digging this, and up you a graph database, But how would you handle "small-file" cruft? Still have optional "folder" rows?

<comment><USER92> I can't really tell how do we apply make this idea compatible with the common workflow/model of computing. In my imaginary world everything down to the level of a statement of what is a code file in the real world is a separate record in a relational database, there are no file names and no folders (only tags, commentaries and other metadata).

In the real world folder hierarchy is probably inevitable so yes, it has to be stored in a way (in a separate table perhaps so we can have many-to-many relationships sort of what hardlinks do).

<comment><USER94> > In my imaginary world everything down to the level of a statement of what is > a code file in the real world is a separate record in a relational database,

I think you'd like prolog [https://swish.swi- prolog.org/example/examples.swinb](https://swish.swi- prolog.org/example/examples.swinb)

<comment><USER92> It's cool, indeed. Nevertheless, besides files which contain sets of logical statements/data, there are pictures, audio and video recordings which are binary by nature. Does Prolog support this kind of data types?

<comment><USER94> Yes, and you can see a few hundred libraries here [https://www.swi- prolog.org/pack/list](https://www.swi-prolog.org/pack/list)

</comment></comment></comment></comment></comment></comment><comment><USER95> Yes! I've always preferred PowerShell for scripting, Bash for an interactive shell. This seems like the best of both worlds, can't wait to try it out.

</comment><comment><USER96> how long before it starts implementing SQL over the input data?

They are already tables after all :-)

<comment><USER97> Yeah for [http://oilshell.org/](http://oilshell.org/) I am planning to use the model of "data frames", which I compare to SQL here:

 _What Is a Data Frame? (In Python, R, and SQL)_

[http://www.oilshell.org/blog/2018/11/30.html](http://www.oilshell.org/blog/2018/11/30.html)

I think starting with either SQL or data frames would be a good choice. They are similar except data frames also focus more on mathematical modeling, and data frames usually don't have indices. Otherwise they both have selection/projection, sorting, various kinds of joining, etc. Data frames also have vectorized arithmetic.

I am trying to reuse the designs that have proven to work over time (R, SQL, bash) rather than inventing new variants with potentially needless differences.

</comment></comment><comment><USER98> In case you are interested in more sophisticated ls or find, try fselect ( [https://github.com/jhspetersson/fselect](https://github.com/jhspetersson/fselect) ). That tool supports JSON as output as well.

Fselect has few really cool features, esp. when you got to deal with complex queries. Although not unix way at all.

</comment><comment><USER99> > Everything is data

We use a similar approach in our data prep tool [1] for non-technical users. Lists of files, lists of emails, contents of text files, spreadsheets or database tables - piping it all together allows mixing ETL and process automation in a similar fashion.

[1] [https://easymorph.com](https://easymorph.com)

Disclaimer: I'm the founder.

</comment><comment><USER100> I too have been off and on writing a Rust shell, though I want it to support `chsh` POSIX compatibility for my Arch setup. It's no where near complete though.

[https://github.com/nixpulvis/oursh](https://github.com/nixpulvis/oursh)

`nu` seems very cool (and I love the name ;), but isn't building atm.

</comment><comment><USER101> I like how powerful Powershell is, but I absolutely loathe it's verbose syntax and Pascal-Kebab-Case naming (at least for idiomatic Powershell).

This seems to have a lot of the power of Powershell, but with a terse, familiar syntax - I really like the look of this!

Being cross-platfotm is a huge seller for me too - I mainly work on Windows, but also on Linux and MacOS.

<comment><USER102> PowerShell is cross platform these days, FYI.

<comment><USER101> Yes, I should have mentioned that I've used Powershell Core too.

</comment></comment></comment><comment><USER103> Wonder if the temptation wasn't there to just call it 'nutshell' and if so, how it was resisted.

<comment><USER104> That's in fact how I read it in the title before reading your comment...

</comment></comment><comment><USER105> I like this. Very neat with tables; easier to memorise than PowerShells very verbose command names. It feels like a pseudo SQL interface to the OS. Only area where I think it oversteps the Unix philosophy is the integrated terminal multiplexer. I think the shell should be terminal agnostic.

</comment><comment><USER106> This seems to address a lot of the shortcomings presented here: [https://mkremins.github.io/blog/unix-not-acceptable- unix/](https://mkremins.github.io/blog/unix-not-acceptable-unix/)

</comment><comment><USER107> This looks great. Is the autocomplete as good as fish? If so I may switch from fish to nu. The autocomplete matters a lot. With fish I often repeat commands during development and I only have to type the first letter or two.

<comment><USER14> I find PowerShell autocompletion amazing. It has Ctrl+Space autocompletion similar to an IDE where you can select options with up and down arrow. Also ctrl+r for history search like fish (not always active like fish unfortunately)

</comment></comment><comment><USER108> Lately I've been paying more attention to alternative CLI tooling, extensions, etc. Our open source community uses git-flow-avh for example and it has been extremely helpful. I can't wait to try this out.

</comment><comment><USER109> Nu looks very promising. Are there any prebuilt binaries available?

<comment><USER54> Not yet, but we'll try to post some soon.

</comment></comment><comment><USER110> The next step this begs for is for the shell to be like lisp. The results are s expressions and you can write macros to slice dice and pipeline the data to your hearts content.

<comment><USER111> You may find closh interesting then [https://github.com/dundalek/closh](https://github.com/dundalek/closh)

Previous HN entry about it: [https://news.ycombinator.com/item?id=15600928](https://news.ycombinator.com/item?id=15600928)

</comment></comment><comment><USER112> Do shells exist which don't have a fixed maximum argument size, so you'd never need "xargs"? Or is the problem innate to Unix?

<comment><USER113> > ARG_MAX, maximum length of arguments for a new process

> or why do you get

> command: arg list too long

> [...]

> It's only the exec() system call and its direct variants, which will yield > this error. They return the corresponding error condition E2BIG > (<sys/errno.h>). The shell is not to blame, it just delivers this error to > you.

[https://www.in-ulm.de/~mascheck/various/argmax/](https://www.in- ulm.de/~mascheck/various/argmax/)

Additionally, see also [https://unix.stackexchange.com/a/120842](https://unix.stackexchange.com/a/120842) which speaks a bit about Linux specifics, and how Linux behaves a bit differently from a lot of the other operating systems in the Unix family with regards to limits on the length of arguments.

</comment></comment><comment><USER114> I just like seeing the fresh hacking in the Unix Shell space. I miss my old friends sed, awk, and xargs. This is compelling and fun too.

</comment><comment><USER115> This is great! It's like VisiData as a shell. I wonder how easy it would be to use the VisiData interface with the shell output?

</comment><comment><USER116> Why did I keep getting the impression on reading the article that I was seeing mysql 'select' readouts?

</comment><comment><USER117> What a missed opportunity not naming the post "nushell in a nutshell"

</comment><comment><USER118> Cool project! I like the intuitive syntax and clean doc. Will give it a try.

</comment><comment><USER119> Am I the only one who first read the title as "nutshell"?

</comment><comment><USER120> In the example you have, `ps` takes way too long.

</comment><comment><USER121> Could someone explain this to me in a nushell?

</comment><comment><USER9> Wow. Impressive usability OOTB. Great job!

</comment><comment><USER122> Job management?

<comment><USER54> Not yet, though we're talking about a few possible approaches.

<comment><USER123> How about a test framework? PowerShell has a unit test framework called Pester which is installed by default in Windows 10 and Server 2012+.

Anything you can script in PowerShell can have unit tests and code coverage and it integrates into CI systems.

I don't really like using PowerShell, but built-in unit testing is something I wish other shells offered. It is a huge plus.

</comment></comment></comment><comment><USER124> Looks stupid

<comment><USER125> Would you mind reviewing the site guidelines and sticking to the intended spirit when posting here? We'd be grateful.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

</comment></comment><comment><USER126> It looks to me like they took the concept of "everything as sql" to the extreme.

Do you want to live your entire life and everything you do in sql? I don't.

I think I will pass.</comment>


Apple TV does not update over ethernet - <AUTHOR> http://www.zdnet.com/the-incredibly-annoying-case-of-the-apple-tv-update-7000008387/

<comment><AUTHOR> Worth noting for any of you Apple TV users out there. This last update will constantly fail unless you use WIFI. I wish I would have seen this post before but since the update came out a couple weeks go. I tried resetting my settings, restoring to factory default. Today, I decided to fix it once and for all or buy a new one. Finding out that I needed to unplug my Ethernet cord to get the update to work was a mind blower for me.

This article seems to simulate a lot interesting thoughts for me on the future of Apple. It might be interesting discussion material.</comment>


How Intelligent Lighting Is Ushering in the Internet of Buildings - <AUTHOR> http://techcrunch.com/2015/12/20/how-intelligent-lighting-is-ushering-in-the-internet-of-buildings/?ncid=rss&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29 <comment><USER2> That's a really long article that totally ignores the fact that many building control systems and SCADA have been connected to the internet for 20+ years.</comment>


PM of Singapore Shares His C++ Sudoku Solver Source Code - <AUTHOR> https://drive.google.com/folderview?id=0B2G2LjIu7WbdfjhaUmVzc1lCR2hUdk5fZllCOHdtbFItbU5qYzdqZGVxdmlnRkJyYVQ4VU0&usp=sharing&usp=sharing&urp=https://drive.google.com/folderview?id%3D0B2G2LjIu7W#list <comment><USER2> Context from his speech: [http://www.pmo.gov.sg/mediacentre/transcript-speech- prime-mi...](http://www.pmo.gov.sg/mediacentre/transcript-speech-prime- minister-lee-hsien-loong-founders-forum-smart-nation-singapore)

Previously on HN: [https://news.ycombinator.com/item?id=9419035](https://news.ycombinator.com/item?id=9419035)

</comment><comment><USER3> I like this one a lot:

        Entry[Square] = BLANK; // Could be moved out of the loop

Maybe I'm reading too much into it, but this type of thinking makes me smile. The guilty perfectionism, "this can be improved."

Were I from Singapore, I'd be happy to see it in the person in charge of my country.

<comment><USER4> Please remember that Signapore has no free speech. I am kind of angry we're cirlclejerking about a PM whose a criminal according to my view [http://en.wikipedia.org/wiki/Human_rights_in_Singapore](http://en.wikipedia.org/wiki/Human_rights_in_Singapore)

Can we please just ignore this dictator and be amazed about code of other people instead?

It just feels wrong.... I think freedom of speech is a very very important part of the hacker community. I think no sane person would want this person in charge of his country. Coder or not.

<comment><USER5> Controls on speech were necessary for Singapore to move from a third world country to a first world one in just 30 years

<comment><USER6> Interesting theory. Do you have any evidence whatsoever to support that assertion?

<comment><USER7> It worked for South Korea and Taiwan. They were both ruled by strongmen on the fence between dictatorship and autoritarian democracy. Park Chung-hee industrialized S Korea in 20 years by ruling with a rubber-stamp parliament and a disregard for human rights. The country emerged stronger and gave way to a true democracy with 20 years of his death.

<comment><USER8> The trouble is that that doesn't prove that similar increases in prosperity could not have occurred without widespread human rights abuses.

<comment><USER9>
       USA is built on human Rights abuses first of native Americans then African Americans today you might talk about how free speech got USa where it is. But that is not true is it if you look at your history same is for most of the western world.
       Today US consumerism is built on human rights abuses of people in other countries but free speech whatever. Forget people of other countries many of your local goverments and corporations are being run on human rights abuses of people of color and Hispanics. Either by incarceration or being used almost like slave labor in your large farms.

</comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> I've put it on GitHub in case this is ever removed. :)

[https://github.com/Doppp/LHL-Sudoku-Solver](https://github.com/Doppp/LHL- Sudoku-Solver)

<comment><USER10> Code without a license on it is not public domain. In this instance, he probably won't care, but it's a bad habit to get into.

</comment></comment><comment><USER11> Clinton could play the Saxophone, after that I am struggling to think of any politicians able to demonstrate a useful skill.

Programming might not be that hard to pick up if you had done it before, couldn't this code have been written on a 25 year old computer to compile with a Borland era compiler?

Because the wider population don't understand programming and see it as magic, I fully expect his popularity to do well, he is practically a hacker in their eyes, able to conjure up magic and demonstrate skill.

<comment><USER12> Margeret Thatcher was a chemist. She's variously credited with inventing "raspberry ripple" icecream, or "Mr Whippy" soft-serve style icecream. (The last one is definitely not true, it was invented a long time before she started working).

<comment><USER13> Angela Merkel has a PhD in physical chemistry.

</comment></comment></comment><comment><USER14> Can someone (less lazy than me) try running it against this puzzle?

[http://www.telegraph.co.uk/news/science/science- news/9359579...](http://www.telegraph.co.uk/news/science/science- news/9359579/Worlds-hardest-sudoku-can-you-crack-it.html)

It's been over a year since I've thought about solving sudoku, but here's how I solved it then:

[https://github.com/wblakecaldwell/c-sudoku- solver](https://github.com/wblakecaldwell/c-sudoku-solver)

<comment><USER15> [https://gist.github.com/pegler/752ae571c5d6028ebe72](https://gist.github.com/pegler/752ae571c5d6028ebe72)

Row[1] : 800000000

Row[2] : 003600000

Row[3] : 070090200

Row[4] : 050007000

Row[5] : 000045700

Row[6] : 000100030

Row[7] : 001000068

Row[8] : 008500010

Row[9] : 090000400

8-- --- ---

\--3 6-- ---

-7- -9- 2--

-5- --7 ---

\--- -45 7--

\--- 1-- -3-

\--1 --- -68

\--8 5-- -1-

-9- --- 4--

812 753 649

943 682 175

675 491 283

154 237 896

369 845 721

287 169 534

521 974 368

438 526 917

796 318 452

Level Counts:

(8, 7): 1 (7, 7): 2 (7, 2): 3 (7, 5): 5 (2, 2): 7 (6, 2): 11

(1, 2): 20 (1, 7): 33 (6, 7): 51 (4, 7): 62 (2, 7): 86 (5, 2): 114

(8, 2): 160 (5, 3): 195 (5, 8): 217 (5, 9): 260 (5, 1): 317 (5, 4): 371

(4, 8): 398 (4, 9): 456 (6, 9): 473 (6, 1): 440 (6, 3): 429 (6, 5): 407

(6, 6): 392 (4, 3): 364 (4, 1): 360 (7, 6): 330 (7, 1): 302 (2, 1): 264

(7, 4): 229 (8, 5): 200 (4, 5): 164 (1, 5): 134 (2, 5): 115 (2, 6): 92

(1, 6): 71 (3, 6): 63 (4, 4): 47 (1, 3): 41 (8, 6): 37 (3, 4): 28

(3, 1): 20 (8, 9): 15 (2, 9): 12 (2, 8): 7 (1, 8): 4 (3, 9): 4

(3, 8): 1 (8, 1): 1 (1, 9): 1 (9, 1): 1 (1, 4): 1 (9, 3): 1

(9, 4): 1 (9, 5): 1 (9, 6): 1 (3, 3): 1 (9, 8): 1 (9, 9): 1

Count = 7826

Total Count = 13080

</comment></comment><comment><USER16> Remarkable. He uses lots of bitwise operations in the application.

<comment><USER17> He's using integers as sets of (small) integers,

        int Possibles = Block[BlockIndex] & Row[RowIndex] & Col[ColIndex];
        while (Possibles) {
            int valbit = Possibles & (-Possibles); // Lowest 1 bit in Possibles
            Possibles &= ~valbit;
            Entry[Square] = valbit;
            Block[BlockIndex] &= ~valbit;
            Row[RowIndex] &= ~valbit;
            Col[ColIndex] &= ~valbit;

is more generally:

        set<int> possibles = block[block_index].intersect(row[row_index]).intersect(col[col_index]);
        while (!possibles.is_empty())
        {
            int value = possibles.pop();
            entry[square] = value;
            block[block_index].remove(value);
            row[row_index].remove(value);
            col[col_index].remove(value);

</comment></comment><comment><USER18> For people who are criticizing this, try to find something good on it: it's just a curiosity about a powerful man of a well succeed country, that can inspire someone.

This also can be considered as a positive fact for me, once in my country, it's common to find politicians that even doesn't have any degree (including a very recent president).

</comment><comment><USER19> Looks more like C than idiomatic C++ at a first glance.

<comment> experimental- A very quick glance suggests to me that the only thing C++ specific there is the filename extension (although a C compiler would do a more thorough check than I do; and faster, even!)

<comment><USER20> And the single-line comments, if not using a C99-compliant compiler. I wouldn't be surprised if he was using Visual C++ and had to change the extension to support a comment syntax that doesn't make you want to strangle yourself.

</comment></comment></comment><comment><USER21> Capitalised identifiers? Global variables? Inconsistent indentation? PM of Singapore needs a better style guide.

</comment><comment><USER22> Now, could someone with his age and experience get a job in Silicon Valley? The answer is precisely what is wrong in today's tech firms. Ageism must die.

<comment><USER23> Yes. Absolutely.

Experience managing the resources of a population of 5.5 million, experience on the world stage, programming and problem solving ability, his alma mater include Cambridge and Harvard, and military service, able to maintain close relationships with important people (including the President of the United States.)

He would absolutely get a job in Silicon Valley.

<comment><USER22> He would, sure. But does anyone care about the thousands that have been dismissed due to their age?

</comment></comment></comment><comment><USER24> What strategy is this solver using? Is it a brute-force approach? Are there heuristics used?

</comment><comment><USER25> I think it's neat and could draw more people to CS, but yeah, people, let's not get overexcited over this. Knowing how to write a Sudoku solver in C++ says nothing, positive or negative about him as a prime minister

<comment><USER26> I've been a (reasonably successful) programmer for 20+ years and I don't even know how to play Sudoku, nor does learning interest me... not being able to write a Sudoku solver bears no resemblance on ones capabilities. This goes the same as being able to write one. So I agree, getting excited about this seems somewhat... irrelevant. Being able to write any kind of computer program doesn't demonstrate being capable of effective leadership. Having a compelling vision for one's country, understanding the issues you will need to overcome to get there and inspiring the people to help you take it there are far more relevant to me.

Knowing a bit of C++ and understanding an algorithm to make it solve a puzzle is largely useless in this context. Understanding a bit about technology at (close to) the lowest level, doesn't signify an understanding of how the internet works, how encryption systems work, how network security or the communications infrastructure works. Without an understanding of these in today's world of the communications and the internet, you may as well not understand how to program at all. Where we see technology failing the people (certainly in North America) are because legislators are largely incompetent in this context and seek to protect corporate interests over the needs of the people. I would say, being a systems administrator or systems analyst would make you far more capable of understanding the implications of technical bills and regulations than understanding a bit of C++.

</comment></comment><comment><USER27> Cool PM to have :)

</comment><comment><USER28> Buffer overflow on line 83. Input length is not checked but it must not be more than 79 characters long.

<comment><USER28> Sudoku2.cpp: In function 'void PrintStats()': Sudoku2.cpp:98:12: warning: unused variable 'j' [-Wunused-variable] int i, j, S; ^

</comment></comment><comment><USER29> Is there proof that this is his?

<comment><USER30> He was the top of his year in Mathematics at Cambridge, which is pretty damn hardcore. So its definitely feasible that he could bang out some C++ code.

</comment></comment><comment><USER31> Short of getting whipped, even the PM will learn to code. <sarcasm>

</comment><comment><USER32> Meanwhile, in the U.S. a president barely has the ability to access a computer due to the ridiculous regulations surrounding them.

<comment><USER33> Can any of the 20-some candidates for 2016 code? (Not that it is important.)

</comment></comment><comment><USER34> What a fascinating world this will be.

</comment><comment><USER35> Politicians and important folk recognise the power and awesomeness of C++, and don't waste time on Ruby, Go, Rust or other time waster languages!

</comment><comment><USER36> Globals and, more serious offense, braces on newline!

</comment><comment><USER37> This is awesome and I don't wanna hate but the question has to be asked why c++?

There are tens more languages that are more modern and "aspirational"

</comment><comment><USER38> Little bit off topic but, Google Drive is giving me 500 error.

It was long time ago I read that Google was directly rejecting the CVs that have typos in them which I find it annoying and not nice. And today I see this title typo in their error page which is totally fine and a mistake that i also make sometimes (leaving shift button little early while pressing 1)

<title>Error 500 (Server Error)!!1</title>

"For Google — a company that sees 50,000 résumés a week — the typo is one of five résumé mistakes that will immediately land yours in the "no" pile." [0]

[http://www.businessinsider.com/google-resume- mistake-2014-9?...](http://www.businessinsider.com/google-resume- mistake-2014-9?IR=T)

Human beings will make mistakes Google, there is no need to extremely force it to otherwise.

<comment><USER39> I would suspect that was intentional.

<comment><USER38> hmm, when i think about it now, maybe it was!!1

<comment><USER26> Occasionally you'll also come across someone who beats the joke to death just to make their point!!!1111OneOneEleven</comment></comment></comment></comment>


Ask HN: Is AWS having issues right now? - <AUTHOR> We're seeing connectivity issues around us-west-2 for the past hour (since around 3:30 AM PST). AWS status page is green as always. Is anyone else experiencing issues? <comment><USER2> We our having issues getting access to RDS for our phabricator instance right now. This is really frustrating.

</comment><comment><USER3> Getting issues primarily on US-EAST-1 this morning, multiple accounts affected.

<comment><USER3> We saw multiple error messages like this in our logs for multiple clients

php_network_getaddresses: getaddrinfo failed: No address associated with hostname

<comment><USER3> Confirmed : [https://forums.aws.amazon.com/thread.jspa?messageID=774198&t...](https://forums.aws.amazon.com/thread.jspa?messageID=774198&tstart=0)

<comment><USER3> Related to libc6 update?

<comment><USER3> Confirmed : [https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/167453...](https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1674532)

<comment><USER2> This is really helpful, thank you!</comment></comment></comment></comment></comment></comment>


Ask HN: Help, HN'er in trouble, we need a laywer in Delhi immediately - <AUTHOR> Hello Hacker News,
A fellow HN'er (who has to remain anon for a bit) is in serious trouble in India. She's been taken into police custody to be presented in front of a magistrate without representation. We URGENTLY need a lawyer on the ground in Delhi but it being Sunday there found that it is very hard to reach anybody there.
If you have contacts in Delhi or are in Delhi yourself please help us to find a competent criminal lawyer in the next few hours.
You can reach us through firstname.lastname@example.com phone + 31 6 30 366 241

   Jacques Mattheij (jacquesm) & Daniel Tenner (swombat).
 <comment><USER2> This is no joke. The case is driven by people who are influential with the police/judicial in Delhi. We need to get solid legal help on the ground before this person arrives in Delhi (in about 3 hours).

Please help.

Edit: some answers to common questions:

\- It is not a good idea to discuss the details of the case right now. There is a police case, it is completely made up as an excuse to get hold of the person we're talking about (I've seen the case filing). The main charge is kidnapping, and she's the victim - but somehow she still gets arrested. India for the win.

\- She's an Indian national.

\- We need a professional, influential, trustworthy lawyer and are willing to pay (reasonable fees).

<comment><USER3> Hey Daniel i've emailed you a lawyer contact.

<comment><USER2> Thanks. I've replied!

</comment></comment></comment><comment><AUTHOR> Thanks guys & girls it's been wonderful. We have located two lawyers thanks to your help, one of them was willing to take the case warts and all but not currently in Delhi, the other is in Delhi and also willing to take the case. I've put the lawyers in touch with her, Delhi police and each other.

We would not have been able to do this without HN on such short notice, thank you all very much.

<comment><USER4> It sometimes amazes me that despite all the debates about any "decline in quality" and despite the continuously expanding community, when the chips are down we can still band together.

<comment><USER5> I agree-- and yet, the most upvoted comments are the sideline comments discussing meta-aspects of the search, while the posts suggesting actual lawyers, or offering specific help, languish at the bottom.

I just went through and upvoted everybody who offered concrete help or advice.

<comment><AUTHOR> What you see here on HN is a shadow of what is happening to my inbox and phone, it's been ringing off the hook with people offering financial support and legal advice as well as lawyers offering their services. Incredible.

<comment><USER5> And I would upvote them too, if I could.

My point is not that the community isn't great. It's just that upvotes are the main currency I have to meaningfully reward individuals for their contributions (which is why you've received plenty of mine over the years).

</comment></comment></comment></comment></comment><comment><USER6> Indian police and people with access to political power usually pick people up on saturday or sunday when the courts are closed. This is the usual trick. A day in an Indian police lockup is not something you can stomach easily. If they are looking for you on a friday, it means political power and possible threats, beatings, forced confessions; hide and move away with family immediately until monday! If they are looking for you on other days, relax.

<comment><USER7> It's not just India. The FBI and the DEA love to make arrests on Friday after 10 am for this reason. The next court hearing is Monday morning.

<comment><USER8> Your reply is yet another "Tu quoque America!" post that is becoming far too predictable and common on HN. The US is not the subject of the OP's comment.

Clarification: My comment probably appears to be a knee-jerk defense of America. I'm a libertarian, and, as an example, I'm a huge fan of Radley Balko and his expose of no-knock raids and other many government civil liberty abominations, just so you know where I stand. I also believe the DEA should be shut down, and that many people in the justice department should probably be in prison. But my point is that power corrupts, universally. It is not isolated, obviously, to the US.

<comment><USER9> I disagree. He's not saying that this somehow excuses the Indian behavior, or that Americans are worse. He's simply pointing out that this is a widespread problem. I personally found the post interesting and am glad he posted it. It is definitely not a "tu quoque" as you say.

<comment><USER10> The difference being, in the US the police are only likely to give you a hard time if they think you are guilty. In India, they are only likely to do so if someone bribed them to.

<comment><USER11> Which is not any better for the detainee, because he still gets treated badly by someone who thinks he's entitled to doing so.

A police officer is not qualified to determine who is _guilty_. Only to determine who is _suspect_. All _suspects_ are to be treated alike. And of course, we can all come up with blatantly obvious cases where someone is guilty of some heinous crime. The point is that there are many more cases where the crime is less noteworthy, the guilt is less obvious and someone still gets treated badly before his _guilt_ has been established.

</comment></comment></comment></comment></comment></comment><comment><USER12> Good lawyers don't advertise (always a golden rule) but are often mentioned in searchable online media. A good technique (imho) for lawyer selection in any given major city is to collect a list of the most prominent lawyers in the specialization area of interest, and interview all of them. There will usually be fewer than a dozen candidates if you've done decent research & narrowing down. At some point in the interview ask who they would personally recommend as a lawyer if they couldn't recommend themselves. Then see where the answers converge.

This does take a few days and in a country like India might take even longer. So if you need somebody in a few hours it could be useless advice. If you can find somebody for initial representation and then switch to somebody else later, it might be more applicable.

<comment><USER2> Thanks. I think in the short term we just need someone there right now. In the long term this sounds like a good strategy, if there is a long term...

<comment><USER13> I am not sure if this <http://www.vakilsearch.com> ('vakil' means a lawyer in Hindi/Urdu) can provide lawyers to represent in a criminal case but you can just give it a shot for initial representation

</comment></comment></comment><comment><USER14> Hi Daniel,

My uncle is an ex MLA (member of legislative assembly) and is lawyer by background. He may be able to help. I have spoken to my dad about this, and he will connect you.

Please call him @ [redacted].

Best of Luck!

Sumit

<comment><USER13> jm2c.

Why not remove your uncle's contact details from here and PM to OP, rather!

</comment></comment><comment><USER15> I have also reached out to a few people - in the human rights/criminal law space - in Delhi. Will update you as soon as I hear back.

<comment><USER2> Thank you!

</comment></comment><comment><USER16> Jethmalani,Ram (Sr.) ph: 011-23792287,011-23794651 fax:011-23010944

<http://www.scbaindia.org/Web/aspx/directory.aspx>

<comment><USER14> Top notch guy, but unless you know him or have any political weight, he's not going to take the case.

<comment><USER13> Besides, in the past, he had shown great interest in playing the devil's advocate. Doesn't do low profile cases.

</comment></comment></comment><comment><USER17> Next time you need a lawyer urgently in India urgently, walk upto a court house. There'll be swarms of lawyers coming your way. Talk to a few of them in a group. Pick the one you feel comfortable. Lawyers are under employed in India, except for a select few who graduate to there own offices and staff. The rest ply the court houses looking for work.

<comment><AUTHOR> We are not in India. Daniel is in the UK and I'm in the Netherlands. We are trying to do this by remote control which is quite challenging. If we could have walked to the courthouse I'm fairly sure we would have done that.

</comment></comment><comment><USER18> Harish here. I am calling some people up. In case I find something, will send you an email on the email ID posted on your profile. Take care.

<comment><USER2> Thank you!

</comment></comment><comment><USER19> For those, like me, who have no connections to India, please let us know if there's something else we can do to help. Including, if you need it, asking us to contribute money - I'm sure many here would help good members of this community.

</comment><comment><USER20> Just a suggestion, but you might consider trying to get the news media to cover the case: if the general public are aware of the details, its more difficult for the police/judiciary to push through nonsensical judgements on a bogus case (note the case of Aseem Trivedi, for instance). In essence, they can't make a moderately well known person or case 'disappear', as it were.

<comment><AUTHOR> In any other case I would happily follow this advice, in this particular case we will use that only as a means of last resort and let's hope that it will never come to that.

</comment></comment><comment><USER21> I dont know any criminal lawyers but I am currently in Delhi and if there is anything else I can help with please let me know. My email is in my profile info.

<comment><USER2> Thank you. There may be something you can do, though not sure what yet - I've passed your email to Jacques (he's coordinating the action).

</comment></comment><comment><USER22> @swombat, @jacquesm : I've mailed you details for a senior criminal lawyer at Delhi. Do check. Let me know if I can help in any other way.

</comment><comment><USER23> Jacques, I had sent these questions in a mail to you. However, the answers should help others in identifying the appropriate lawyer.

1> What area of Criminal law this pertains to. 2> Is she an Indian? 3> Is she looking for professional representation or someone in personal capacity. Based on this we can look up one from a prominent firm or not.

<comment><USER2> Hello, see my answers above:

\- It is not a good idea to discuss the details of the case right now. There is a police case, it is completely made up as an excuse to get hold of the person we're talking about (I've seen the case filing). The main charge is kidnapping, and she's the victim - but somehow she still gets arrested. India for the win.

\- She's an Indian national.

\- We need a professional, influential, trustworthy lawyer and are willing to pay (reasonable fees).

Thanks for your help.

</comment></comment><comment><USER24> I am also working a few contacts but as far as I can remember right now none of them is based in Delhi.

edit: Two guys in Delhi are actively looking.

<comment><AUTHOR> Thank you.

</comment></comment><comment><USER25> [http://www.justdial.com/Delhi-NCR/Lawyers-For- Criminal/ct-32...](http://www.justdial.com/Delhi-NCR/Lawyers-For- Criminal/ct-324099)

<comment><USER2> Thanks!

</comment></comment><comment><USER7> Khaitan & Co. have an office in Delhi. Here's their Mumbai contact:

anshul.prakash@ khaitanco. com rabindra.Jhunghunwala@ khaitanco. com

<comment><AUTHOR> Thank you. We really need speed, email is probably too slow, mobile numbers?

(Apologies to you and anybody else in this thread for being brief, too little sleep and too much to do).

j.

</comment></comment><comment><USER26> If you think the situation applies, PUCL (<http://pucl.org>) might be an option. See the contact page for phone numbers. If nothing else, they should know some good lawyers.

</comment><comment><USER27> wow.. i don't understand what is happening here, what is the case about. at least a brief description.

EDIT: after reading thru the comments, i'm so sorry about the issue. My uncle is supreme court lawyer, but hey,also read that arrangements have been made. Good luck! and any major changes, you can reply to this post, i can strike back in no time with a trusted lawyer.

<comment><AUTHOR> Thank you very much, if you can drop me a line at firstname.lastname@example.com I'd be obliged.

<comment><USER27> Sent.

</comment></comment></comment><comment><USER28> You can maybe try <http://www.akosha.com/>

They are mainly into consumer complaints but should know good lawyers and they are based out of Delhi.

</comment><comment><USER29> Posted on Facebook, I urge the rest of you to do the same. I have a lot of international friends so hopefully I'll be able to help too.

<comment><AUTHOR> Thank you!

<comment><USER29> Geen probleem ;). Hope you manage to find some good representation!

</comment></comment></comment><comment><USER30> If you're a redditor, please upvote [http://www.reddit.com/r/india/comments/12m11h/ask_hn_help_hn...](http://www.reddit.com/r/india/comments/12m11h/ask_hn_help_hner_in_trouble_we_need_a_laywer_in/) (not my post)

</comment><comment><USER31> Usually, before we get a lawyer to agree to represent anyone, and in this case, a foreigner in India (EDIT: Indian national), the lawyer should be briefed on the skeleton of the case at least before he can take an informed decision, whether to take on the case.

You need to provide some cursory details of the case, before this gains some amount of traction at least.

<comment><AUTHOR> No, I should really not provide any 'cursory details' here, you are basically going to have to trust my word on that this case is very complex and involves a lot of backstory that could only hurt, not help if I start blabbing about it in public.

Those details are between her and her hopefully soon to be found lawyer, who can then decide if he/she wants to take the case.

I'm sure the general public would love to hear all about these details (you could make a cliff-hanger mini series about it and write a best-seller) but the case isn't served by creating either a public spectacle beyond what I've already done here (a risk in itself but we have no time).

<comment><USER31> Dude, If I stepped on your toes, I am sorry. I should have clarified what I meant by cursory details (if I had realised this would be the response, I would have written this earlier, honestly!). Something along these lines as provided by @akshat above:

1> What area of Criminal law this pertains to.

2> Is she an Indian?

3> Is she looking for professional representation or someone in personal capacity.

> Based on this we can look up one from a prominent firm or not.

OK, that was all. The reason I tried to write it here rather than PM, is because others could also benefit from this kind of info when talking to their own respective contacts/lawyers/colleagues.

Again, I want to clarify that I was not digging for the kind of details that you seem to have implied on the reply. And sorry if I upset anyone.

EDIT: @swombat has already replied to these questions above when I was composing my reply to jacquesm.

Thanks, @swombat

<comment><USER2> I don't think you stepped on Jacques' toes. We're just pretty stressed about this and so being brief (I'm now replying to messages/social media and gathering leads while he tries to ring up lawyers).

I answered those points now in my post:

\- It is not a good idea to discuss the details of the case right now. There is a police case, it is completely made up as an excuse to get hold of the person we're talking about (I've seen the case filing). The main charge is kidnapping, and she's the victim - but somehow she still gets arrested. India for the win.

\- She's an Indian national.

\- We need a professional, influential, trustworthy lawyer and are willing to pay (reasonable fees).

<comment><USER17> Lawyers certainly help. However you could also have someone contact a local women's rights group. Also put the word out to some of her Indian friends. May be someone could get some "political" help to get things going. That's how it works in India. If you know someone really rich in Delhi, they could also help. Most likely they know a M.L.A or an M.P or someone high up in the police. I hope fellow HN'rs with political contacts in Delhi would reach out to you.

</comment></comment></comment></comment></comment><comment><USER32> What you are describing is quite similar to this - [http://articles.timesofindia.indiatimes.com/2012-11-01/india...](http://articles.timesofindia.indiatimes.com/2012-11-01/india/34856977_1_nri- girl-nri-woman-british-girl) \- any thoughts? Is this the same girl we are talking about? Sounds like it is.

<comment><AUTHOR> No. Btw, that story is a fake by all accounts.

</comment></comment><comment><USER33> Have you contacted her family? She is an Indian national, does she have contacts there?

<comment><USER2> Without going into details, the first one is not an option and the answer to the second question is no, she has very few contacts.

<comment><USER33> Has she got dual citizenship? That could be one avenue to look at

<comment><AUTHOR> No.

</comment></comment></comment></comment><comment><USER34> I'm going to guess that this is the person who started Ask HN.

</comment><comment><USER35> (The proverbial 'that guy')

Delhi police or CBI (whomsoever) is handling the case is one of the best in the nation. So, let me do my bit (because no one else has raised any voice).

The post portrays Delhi and India in a bad light. I am pretty sure, the case is NOT as dramatic as it is being described (or the victim not as innocent) - An Indian national with very little contacts who is about to land (or is in custody from yesterday?)...

That said (and realizing that I am on the losing side), I appreciate the quick thinking you guys are doing to help the person, and personally I have huge respect for the well known names (Daniel & Jacques - who are often on the front page) and that you are losing your sleep over this!

Downvotes are welcome!

<comment><USER2> They may or may not be the best in the nation, but having seen the case with my own eyes and knowing the person in question and the backstory very well, I can assure you that:

1) the case is totally made up (to a truly ridiculous extent), has been so for the six months since it came to existence, and has been handled with complete disregard for truth or any attempt to seek the truth

2) this is indeed very dramatic for the person in question

3) the person in question is completely innocent

4) the people behind this made-up case are closely connected to and influential with the police in Delhi.

And yes, you're right that it does make the Indian police system seem very corrupt. I'd be ashamed of it if I was Indian.

<comment><USER36> > I'd be ashamed of it if I was Indian.

Oh get over yourself. How many abuses of power and privilege do we see in the UK and the USA. Try to keep your racist insinuations out of what might be an admirable attempt to help someone.

<comment><USER37> Maybe the sentence would have been a bit less sensitive had Daniel used "if I were a citizen of India" instead of "Indian", in order to remove the possible racial interpretation.

<comment><USER38> Indian is not a race :-)

<comment><USER37> apologies for my ignorance :(</comment></comment></comment></comment></comment></comment>