Hacker News new | past | comments | ask | show | jobs | submit login
Bard can now help you code in over 20 programming languages (bard.google.com)
46 points by chrsstrm on April 24, 2023 | hide | past | favorite | 47 comments



I'd love to use bard, but I was dumb enough to pay for a custom domain and workspace. Thank you google for your incompetence.


This is the reason why I will always recommend to not go with Google at my company.

I asked Google during an RFP when I can use my paying personal workspace for things like reminders or Google Home (and invite my family). It was "right the corner". The corner is now what, 5 or 7 years away.

This is a company I am with for a bit less than 20 years, but I will leave.


Maybe they could use Bard to help them fix all of the bugs they’re loathe to ask humans to deal with? That was one of the under appreciated-mistakes which tanked new Google products: many of their most enthusiastic users signed up for Google Apps for Domains, and then Google blocked them from using and evangelizing everything they launched for the next decade.

I’ve seen another variation of this at work: we have two domains registered with G-Suite, Google professional services ghosted on a consolidation process, and this means that only one of those sees the licenses. They block all access to services when you’re logged in to the other domain, even just to view a third-party’s shared document unless you buy a second license for the same person. This has been a slow gravitational win for Office 365.


Even if you have many workspaces, keep a gmail account too. This conundrum has been true for many years now.


Yes. This is what I have to do. In fact my personal Gmail account is older but I kept it around.


And once paying customers may find a workaround by using their personal Gmail, just make sure they really can't use it by telling them: "Bard isn’t currently supported in your country. Stay tuned!"


> I'd love to use bard, but I was dumb enough to pay for a custom domain and workspace.

I suspect this is because they can't use Workspace data for improving the models.


Having a custom domain does not prevent you from also having a separate gmail.com account.


> Show me a clever hack for using deque instead of vector in C++

Ans:

  // This function will reverse the order of a vector.
  void reverse(std::vector<int>& vec) {
    std::deque<int> deq;
    for (int i = 0; i < vec.size(); i++) {
      deq.push_back(vec[i]);
    }
    for (int i = 0; i < vec.size(); i++) {
      vec[i] = deq.front();
      deq.pop_front();
    }
  }

  This is a clever hack because it avoids the need to write a custom function for reversing the order of a vector.
But it did write a custom function?!


Doesn't this preserve the original order? The deque is used as a queue, first in first out. In order for the elements to be reversed it should be used as a stack.


Pushing to back...

  q={v[0]}
  q={v[0],v[1]}
  q={v[0],v[1],v[2]}
Popping from front...

  v[0] = v[0]; q={v[1],v[2]}
  ...
Yeah, so clever it's doubly reversed


I know you are, but what am I? - A rack of GPUs somewhere


technically TPUs for Bard


Interesting, I asked it this:

> Me: Write a golang function to get a http request, following the API of the get function in Python requests library.

> Bard: Sure, here is a Golang function to get an HTTP request with an API similar to the requests.get() function in Python:

It produced a function that takes url and parameters. Decent first approximation.

ChatGPT has trouble with this (when I tried a couple months back)


Why on earth is there no link to whatever this "bard" actually is on that page - I need an on-ramp/slip road?

There is a link to "Learn More" which is also ... eventually a link wonders off somewhere ... nope some wankery about Lamda thingie. [random futile clicking]

It's the basics kids. No matter how far up your arse you are about your funky technology, do enable people to find the bloody thing easily, from all related pages. If you are a little rusty on spelunking then have a look at WAIS and Gopher (int al) for how to do it properly.

Obviously I can find it because I'm a fucking IT consultant. Why not make it easy for everyone?


Oh ... join "waitlist".

Nope, stuff to do.


SVP: “Hey, we’re rapidly falling behind and turning into a textbook example of innovators dilemma, what should we do?”

Sundar: “one word: waitlist”


Waitlists are magic at destroying any chance of word-of-mouth helping spread a product.

“Hey Bob, try out this new Bard thing!”

“I can’t, there’s a wait list.”

“Never mind then, you can just use ChatGPT instead.”

PS: it doesn’t fill me with confidence that Azure enabled OpenAI to scale to 10M users in record time, but a GCP can’t even scrape together enough compute to avoid a wait list on something comparable to LLMs hobbyists now run on their phones.


what is the monetization idea for each? my guess is google doesn't need the data as much as a new competitor would. they are in the growth phase.


It appears that a large part of OpenAI's success is the large volume of human feedback reinforcement learning that they've used to tune their models. The more feedback they get, the better the model becomes.

It's a bit like Tesla having an advantage developing self-driving AI models by having hundreds of thousands of their cars on the road ("the fleet") gather data about rare events for training the model.


That was a brutal “PS”, lol.


I got my waitlist acceptance today. I requested it late last week.


me: using python, how can I convert a .txt file to .pdf file? bard: save as. me: thank you. well done.


GPT 4 gets this (apparently) correct immediately, recommending the use of reportlab.pdfgen and writing a sample function.


Yeah. I do sub for an online class. It is impressive what the gpt4 can do. Too bad it takes forever to get the api for ver.4


They probably use gpt to process the applications.

What do you think they want?

Think about any inovative use of gpt and tell that in your form. Mine got approved really fast. Never implement nothing like what I proposed.


Ohhh. interesting. Care to share the secret sauce haha. Not sure if you can even dm on here.


I got two methods in one response, first a walkthrough of installing and using the FPDF library, and then again for PyPDF2.

But, the code for FPDF was incorrect, and pypdf2 is so old that even the deprecation warning causes an error. I fed the FPDF error back in and the output was still wrong, but close enough that I could figure out an answer. Not faster than just googling for sample code though.


When I use "write a function..." it produces code.


I know we all love GPT-4, and it totally deserves it, but we really need to support other companies building their own large language models even if it's Google. We don't want a monopoly situation.


Huh? We did have a monopoly (Google using this technology internally) and OpenAI broke it wide open, that’s the entire point.


OpenAI makes their product available outside the US. Google doesn't. Google loses by default.


Bard isn’t currently supported in your country. Stay tuned!

WTF


I got that message too. Classic Google trying their damndest to handicap the success of their own projects so they have an excuse to bin them in a couple quarters/years.


> Bard isn’t currently supported in your country

Italy disciplined OpenAI on GDPR concerns [1]. Google may not want the grief.

[1] https://www.bbc.com/news/technology-65139406


Would love to try, but unlike all of your competitors, you have decided to region lock to US only.


Can some one test fizzbuzz, sounds silly tho a lot of models fail on the combination check in my tests.


Q> Write a FizzBuzz problem in COBOL

A> Sure, here is the FizzBuzz problem in COBOL:

    IDENTIFICATION DIVISION.
    PROGRAM-ID. FIZZBUZZ.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    01 COUNT PIC 9(02).
    01 MESSAGE PIC X(08).
    01 BLANK PIC X(01) VALUE SPACES.
    PROCEDURE DIVISION.
    INITIALIZE.
    MOVE 1 TO COUNT.
    PERFORM UNTIL COUNT > 100
      EVALUATE COUNT
        WHEN 3
          MOVE "Fizz" TO MESSAGE
        WHEN 5
          MOVE "Buzz" TO MESSAGE
        WHEN 3 AND 5
          MOVE "FizzBuzz" TO MESSAGE
        WHEN OTHER
          MOVE COUNT TO MESSAGE
      END-EVALUATE
      DISPLAY MESSAGE
      ADD 1 TO COUNT
    END-PERFORM.
    GOBACK.
This program prints the numbers from 1 to 100. However, for multiples of 3, it prints "Fizz" instead of the number. For multiples of 5, it prints "Buzz" instead of the number. And for multiples of both 3 and 5, it prints "FizzBuzz" instead of the number.

Here is an example of the output of the program:

    1
    2
    Fizz
    4
    Buzz
    Fizz
    7
    8
    Fizz
    Buzz
    11
    Fizz
    13
    14
    FizzBuzz
    16
    17
    Fizz
    19
    Buzz
Disclosures:

1. I work for Google, but not on Bard.

2. I don't know COBOL. Would be good if someone can check if the code is legit. I get a feel that it checks for the numbers to match (3, 5), not be divisible by 3 and 5.


It's obviously wrong, it's not using the modulo function anywhere or any such construct. It'll print text only for '3' and '5', and then numbers from then on.

By the way, GPT 4 when asked to critique this listing immediately found the problem, and produced a corrected version as a bonus.

Bard feels like GPT 2 to me. Even GPT 3.5 can solve COBOL FizzBuzz correctly.

PS: Just to check that GPT 4 is understanding the problem and not just regurgitating something it saw, I asked it to solve the problem in different ways, such as unrolling the loop or avoiding the use of the MOD function. It can do that too.


Yeah, that’s one of my favorite hidden features of GPT-4, if it gives me a function that doesn’t really fit my coding style I’ll tell it how I’d like it and it will adjust.


Bard is garbage compared to GPT-4


This is amazingly short on details.

What are the programming languages supported, for example?


Well, you can ask Bard, and it (for me) lists 13 of the “over 20” languages.

Python, JavaScript, Java, C++, C, R, Ruby, PHP, Swift, Kotlin, SQL, HTML, CSS


I don't have access to Bard. I'm skeptical that's a valid approach. Language models are famously incapable of introspection. Does it change the answer if you tell it it's wrong, for example?


I asked and was able to get it to tell me:

C++

Go

Java

JavaScript

Python

TypeScript

Google Sheets functions

C

C#

R

Swift

Kotlin

PHP

HTML

CSS

SQL

Bash

Perl

Ruby

Lua

Rust


So what are the other 13 programming languages it supports?


They don't say, maybe they mean all versions of python?




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: