Live data from Hacker News

Executable code snippets in Bing

techcrunch.com

41–50 of 51 posts

Re: Executable code snippets in Bing

#42
post #24

DuckDuckGo implemented something similar a few weeks ago: http://duckduckhack.com/ This is probably Microsoft's response.

Well, I doubt they could throw something this slick together in a copule of weeks! Also, that DuckDuckHack looks to be something very different. I couldn't find anywhere that allows you to sandbox code on it. Seems to need to upload to a github repo first? What actually does it intend to be?

DuckDuckHack is the public contribution part of DuckDuckGo. Most of our Instant Answers are created by developers submitting code to repos on GitHub which we then review and publish. Many of these are programming-related but a bit different to what Bing has announced.

Re: Executable code snippets in Bing

#44
post #14

Doesn't work here. None of the given examples triggered the feature.

So, yes. It is only enabled for the US market at the moment. However, it's quite easy to see the result if you add `&market=en-US` to the end of the query. Example: https://www.bing.com/search?q=quicksort+java&market=en-US [Disclaimer: Dev at HackerRank. Not affiliated with this product, though]

Can't find anything for "leftpad" :(

Re: Executable code snippets in Bing

#45

Earlier quoted context omitted.

They also killed being able to search for symbols. That still bugs me.

And they ruined Maps. It's like Google doesn't want to be in the search business any more. No growth potential to deliver "maximum shareholder value" and bonuses for the MBAs.

I've been saying that Google Maps has gotten worse for a while now, and many people just say that other maps have gotten better instead. But I don't think that's true. I really do think that Google Maps has gotten substantially worse.

For one, it's super slow. I've switched to Bing Maps when I need to get an address quick on the desktop, because it's much faster. Google Maps has tons of lag when I'm sliding around the map on every browser and every major OS.

Secondly, the "natural language" features of searching has taken a major step back. I used to be able to say "[my town] mcdonalds to [neighboring town] chase bank" and as long as the map view was over my town, it knew what I meant. I just tried it now, map hovering over my town and McDonald's clearly shown on the screen, and it asks me which McDonald's I want, all of them from a city with the same name but in another state. It's like it doesn't know where it is, anymore. You have to get super specific in writing your search because it won't just assume you're talking about the McDonald's displayed on the screen anymore.

To be fair, I stopped using a lot of Google services when I used to have a Windows Phone and Google decided that anyone using a Windows Phone was inherently inferior and weren't allowed to use their services[1][2] but even now when I try to switch back, everything seems worse. Apple Maps is a better mobile experience, Bing Maps is a better desktop experience, and Outlook handles multiple email accounts much better than Gmail does. Bing search is just as good as Google in my experience, but they pay me to use it (Bing Rewards).

I'm honestly not sure what happened. Google used to be cool.

[1] http://mashable.com/2013/01/05/google-maps-windows-phone/#qY...

[2] http://betanews.com/2013/08/15/google-once-again-blocks-yout...

Re: Executable code snippets in Bing

#47
post #21

The sandboxing is interesting ... Each process is running in a directory on the same server. Also there's some files that are visible that probably shouldn't be, including one named "codechecker-android-release-key.keystore"... For the curious, try running the code block. You can uncomment/commment things out to see different results as there's a cap on the amount of stdout printed. import java.net.URLClassLoader; im…

You can read more about the environment here: https://www.hackerrank.com/environment We have a cluster of codechecker servers of the above type, which share the load of incoming queries. On each, sandboxing is via a chroot-based system. Programs get a fixed amount of memory/time. Re: the codechecker keyfile - we're looking into this, as I'm not an android expert - but quick searching tells me this is used to sign apk…

You might harden policy files for Java process to prevent usage of Runtime. Not sure about any attack vectors, but I can execute linux commands. Also interesting that you allowed threads.

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Solution {

    public static void main(String[] args) throws IOException, InterruptedException {
        final Runtime rt = Runtime.getRuntime();
        final Process pr = rt.exec("uname -a");
        new Thread(new Runnable() {
            public void run() {
                BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                String line = null;

                try {
                    while ((line = input.readLine()) != null)
                        System.out.println(line);
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }).start();

        pr.waitFor();
    }
	
		
}

Re: Executable code snippets in Bing

#48

Earlier quoted context omitted.

So, yes. It is only enabled for the US market at the moment. However, it's quite easy to see the result if you add `&market=en-US` to the end of the query. Example: https://www.bing.com/search?q=quicksort+java&market=en-US [Disclaimer: Dev at HackerRank. Not affiliated with this product, though]

Can't find anything for "leftpad" :(

Damn! That's a nice idea :D Forwarding it to the relevant team.

Re: Executable code snippets in Bing

#49
post #47

Earlier quoted context omitted.

You can read more about the environment here: https://www.hackerrank.com/environment We have a cluster of codechecker servers of the above type, which share the load of incoming queries. On each, sandboxing is via a chroot-based system. Programs get a fixed amount of memory/time. Re: the codechecker keyfile - we're looking into this, as I'm not an android expert - but quick searching tells me this is used to sign apk…

You might harden policy files for Java process to prevent usage of Runtime. Not sure about any attack vectors, but I can execute linux commands. Also interesting that you allowed threads. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Solution { public static void main(String[] args) throws IOException, InterruptedException { final Runtime rt = Runtime.getRuntime();…

* Running commands is fine -- infact bash is a programming language we support. As long as you cannot get out of the sandbox.

* Threads are allowed by the environment.

Re: Executable code snippets in Bing

#50

Earlier quoted context omitted.

And they ruined Maps. It's like Google doesn't want to be in the search business any more. No growth potential to deliver "maximum shareholder value" and bonuses for the MBAs.

I've been saying that Google Maps has gotten worse for a while now, and many people just say that other maps have gotten better instead. But I don't think that's true. I really do think that Google Maps has gotten substantially worse. For one, it's super slow. I've switched to Bing Maps when I need to get an address quick on the desktop, because it's much faster. Google Maps has tons of lag when I'm sliding around th…

google is doing the opposite of "don't be evil", they are not likable any more
Post reply on HN