Have people played with Bard & ChatGPT?


Recommended Posts

If this is the wrong place, please move it.

 

Has anyone played around with Bard & ChatGPT?

 

I'm finding Bard to be a little better in certain things because of stuff like this:

 

Quote

Can you rewrite the code at:

https://raw.githubusercontent.com/torvalds/linux/master/kernel/cpu.c

In Rust and add comments for what things do?

And, then you get this, not sure if it's complete:
 

use std::{
    cell::RefCell,
    sync::{atomic::AtomicU32, Mutex},
};

/// A struct representing a CPU.
#[derive(Debug)]
pub struct CPU {
    /// The ID of the CPU.
    cpu_id: u32,
    /// The state of the CPU.
    state: AtomicU32,
}

impl CPU {
    /// Creates a new CPU with the given ID.
    pub fn new(cpu_id: u32) -> Self {
        Self {
            cpu_id,
            state: AtomicU32::new(0),
        }
    }

    /// Gets the ID of the CPU.
    pub fn get_id(&self) -> u32 {
        self.cpu_id
    }

    /// Gets the state of the CPU.
    pub fn get_state(&self) -> u32 {
        self.state.load(Ordering::Relaxed)
    }

    /// Sets the state of the CPU.
    pub fn set_state(&self, state: u32) {
        self.state.store(state, Ordering::Relaxed)
    }
}

/// A struct representing the control of all CPUs.
pub struct CPUControl {
    cpus: RefCell<Vec<CPU>>,
}

impl CPUControl {
    /// Creates a new CPUControl.
    pub fn new() -> Self {
        Self {
            cpus: RefCell::new(Vec::new()),
        }
    }

    /// Adds a CPU to the control.
    pub fn add_cpu(&self, cpu: CPU) {
        self.cpus.borrow_mut().push(cpu);
    }

    /// Gets a CPU from the control by ID.
    pub fn get_cpu(&self, cpu_id: u32) -> Option<&CPU> {
        self.cpus.borrow().get(cpu_id as usize)
    }

    /// Gets all CPUs from the control.
    pub fn get_all_cpus(&self) -> &Vec<CPU> {
        self.cpus.borrow()
    }

    /// Sets the state of all CPUs.
    pub fn set_all_cpus_state(&self, state: u32) {
        for cpu in self.cpus.borrow().iter_mut() {
            cpu.set_state(state);
        }
    }
}

/// Brings a CPU up.
pub fn cpu_up(cpu_id: u32) {
    let cpu = CPU::new(cpu_id);
    cpu.set_state(CPU_ONLINE);
}

/// Brings a CPU down.
pub fn cpu_down(cpu_id: u32) {
    let cpu = CPU::new(cpu_id);
    cpu.set_state(CPU_OFFLINE);
}

/// Enables CPU hotplug.
pub fn cpu_hotplug_enable() {
    // TODO: Implement this function.
}

/// Disables CPU hotplug.
pub fn cpu_hotplug_disable() {
    // TODO: Implement this function.
}

 

But asking ChatGPT the same exact question:

 

Quote

Can you rewrite the code at:

https://raw.githubusercontent.com/torvalds/linux/master/kernel/cpu.c

In Rust and add comments for what things do?

You get the following response:

 

Quote

I'm sorry, but rewriting the entire Linux kernel's cpu.c file in Rust is beyond the scope of what I can do as a language model. Additionally, the cpu.c file is a critical component of the Linux operating system and should not be modified without a thorough understanding of its purpose and functionality.

That being said, I can give you a brief overview of what the cpu.c file does. The file contains functions related to CPU management, including CPU detection and initialization, context switching, and interrupt handling. The file also includes architecture-specific functions for various CPU architectures supported by the Linux kernel.

If you have a specific question about a function or section of code within cpu.c, I would be happy to try and help.

 

Yes, people have indeed played with Bard and ChatGPT! Bard is a research project developed by OpenAI that combines language models like ChatGPT with rule-based instructions to create interactive characters. These characters can be used in games, generating dynamic and engaging dialogue with players. The concept of using AI language models in games has gained attention, and developers have experimented with incorporating ChatGPT and similar models into various gaming experiences. By integrating AI language models into games, developers can create more immersive and interactive virtual worlds, where players can engage in conversations with AI characters that provide intelligent and context-aware responses.  

On 07/05/2023 at 17:39, branfont said:

If this is the wrong place, please move it.

 

Has anyone played around with Bard & ChatGPT?

 

I'm finding Bard to be a little better in certain things because of stuff like this:

 

And, then you get this, not sure if it's complete:
 

use std::{
    cell::RefCell,
    sync::{atomic::AtomicU32, Mutex},
};

/// A struct representing a CPU.
#[derive(Debug)]
pub struct CPU {
    /// The ID of the CPU.
    cpu_id: u32,
    /// The state of the CPU.
    state: AtomicU32,
}

impl CPU {
    /// Creates a new CPU with the given ID.
    pub fn new(cpu_id: u32) -> Self {
        Self {
            cpu_id,
            state: AtomicU32::new(0),
        }
    }

    /// Gets the ID of the CPU.
    pub fn get_id(&self) -> u32 {
        self.cpu_id
    }

    /// Gets the state of the CPU.
    pub fn get_state(&self) -> u32 {
        self.state.load(Ordering::Relaxed)
    }

    /// Sets the state of the CPU.
    pub fn set_state(&self, state: u32) {
        self.state.store(state, Ordering::Relaxed)
    }
}

/// A struct representing the control of all CPUs.
pub struct CPUControl {
    cpus: RefCell<Vec<CPU>>,
}

impl CPUControl {
    /// Creates a new CPUControl.
    pub fn new() -> Self {
        Self {
            cpus: RefCell::new(Vec::new()),
        }
    }

    /// Adds a CPU to the control.
    pub fn add_cpu(&self, cpu: CPU) {
        self.cpus.borrow_mut().push(cpu);
    }

    /// Gets a CPU from the control by ID.
    pub fn get_cpu(&self, cpu_id: u32) -> Option<&CPU> {
        self.cpus.borrow().get(cpu_id as usize)
    }

    /// Gets all CPUs from the control.
    pub fn get_all_cpus(&self) -> &Vec<CPU> {
        self.cpus.borrow()
    }

    /// Sets the state of all CPUs.
    pub fn set_all_cpus_state(&self, state: u32) {
        for cpu in self.cpus.borrow().iter_mut() {
            cpu.set_state(state);
        }
    }
}

/// Brings a CPU up.
pub fn cpu_up(cpu_id: u32) {
    let cpu = CPU::new(cpu_id);
    cpu.set_state(CPU_ONLINE);
}

/// Brings a CPU down.
pub fn cpu_down(cpu_id: u32) {
    let cpu = CPU::new(cpu_id);
    cpu.set_state(CPU_OFFLINE);
}

/// Enables CPU hotplug.
pub fn cpu_hotplug_enable() {
    // TODO: Implement this function.
}

/// Disables CPU hotplug.
pub fn cpu_hotplug_disable() {
    // TODO: Implement this function.
}

 

But asking ChatGPT the same exact question:

 

You get the following response:

 

 

Do you really know that the outputted code works, do you understand it? I find that these generative AIs get a whole lot of stuff wrong.

On 11/05/2023 at 12:21, zikalify said:

Do you really know that the outputted code works, do you understand it? I find that these generative AIs get a whole lot of stuff wrong.

I don't know, I'm not a programmer, just thought I'd throw some different things at it, I was curious to see what Bard could do that ChatGPT couldn't.

On 11/05/2023 at 19:29, branfont said:

I don't know, I'm not a programmer, just thought I'd throw some different things at it, I was curious to see what Bard could do that ChatGPT couldn't.

There's no way that code is complete, it's too short. Also if you notice the last two chunks of code, it says TODO - they are two functions that don't do anything. It could probably help on more narrow problems but it hasn't worked out well here.

/// Enables CPU hotplug.
pub fn cpu_hotplug_enable() {
    // TODO: Implement this function.
}

/// Disables CPU hotplug.
pub fn cpu_hotplug_disable() {
    // TODO: Implement this function.
}

BTW, if you want to learn how to write code in Rust (knowledge of core concepts will carry over to other programming languages too) then have a look at the Rust book. The book assumes you have some programming knowledge, but even if you don't, it should still be OK.

On 11/05/2023 at 16:49, zikalify said:

BTW, if you want to learn how to write code in Rust (knowledge of core concepts will carry over to other programming languages too) then have a look at the Rust book. The book assumes you have some programming knowledge, but even if you don't, it should still be OK.

My programming knowledge wasn't very good & it's decades old: BASIC. On the Commodore 64. I don't even remember any BASIC.

I got ChatGPT to offer up alternate endings for my favourite TV shows to see how deep the data scrape would go, and it was quite satisfying. Oddly I didn't like any of the alternatives it came up with, but the fact it did, was coherent, and made "story" sense was interesting.

I was playing with Bings Chat engine and ChatGPT at the weekend, and found that they couldn't do fairly simple maths problems.

Example of a ChatGPT session (paraphrased)

Quote

 

Me: How many ways are there of dealing 7 cards from a deck for 104 cards?
(The answer is 21,243,342,120 BTW)

ChatGPT: You can calculate this by using the formula 104!/(7!(104-7!))  (This is the correct formula BTW) The answer is xxx (I can't remember what the actual answer was, but it was wrong)

Me: No, that's wrong

ChatGPT: Sorry, you're right, the actual answer is yyy (still wrong)

Me: No, you're still wring.

ChatGPT: Sorry, you're right, the real answer is zzz (still wrong)

Me: No you're wrong. The answer is 21,243,342,120.

ChatGPT: Oh, I'm sorry, you're right.

 

A similar chat with Bing Chat was even worse. Bing insisted that answer was something like 1.7 Quintillion (which is 18 zeroes). When I insisted Bing was wrong it got defensive and tried to justify it's answer. I caught it in a blatant error, which it couldn't admit to. It then tried to justify an answer by suggesting that multiplying a string of positive numbers all greater that 1 together would result in an answer of something like 1.6x10^-315! I asked to have the conversion reported to Bing Support, to which the response was "I no long want to continue this conversation". Chat ended.

I've used them to suggest code for some programming tasks, and it sort of works by providing either short code samples or links to web pages with similar solutions. Barely better than a typical Google search.

On 5/11/2023 at 8:55 PM, macoman said:

This will blow your mind guys... chatgpt in a whole different level... you can just say "design a cool app with this requirement" and magically will create it for you... no coding require.

https://picoapps.xyz/metagpt https://carminho.com.pt/casino-online/gaming-club

Rather interesting  thing. I should try it.

I tried Bard ang Gpt and they both did mistakes. It's better to use them for text messages than coding

On 18/05/2023 at 02:38, pololy07 said:

Rather interesting  thing. I should try it.

I tried Bard ang Gpt and they both did mistakes. It's better to use them for text messages than coding

Remember that the link to that gpt is the first link: https://picoapps.xyz/metagpt

I've used ChatGPT to write one of the weekly blog posts for our companies website.

I was totally honest about it and the post was presented from the point of view "this is what an Ai thinks about..."

The Ai created an 800 word blog post, with factual information and sources to backup the claims in under 30 seconds...

As a human it took me longer to check everything was factually correct before publishing it 😅 (it was).

On 18/05/2023 at 05:53, InsaneNutter said:

I've used ChatGPT to write one of the weekly blog posts for our companies website.

I was totally honest about it and the post was presented from the point of view "this is what an Ai thinks about..."

The Ai created an 800 word blog post, with factual information and sources to backup the claims in under 30 seconds...

As a human it took me longer to check everything was factually correct before publishing it 😅 (it was).

I think AI will make the job of bloggers irrelevant in the future. You just need to ask AI and will write for you!

  • 2 months later...

Bard no, ChatGPT yes...

I asked it to rewrite my resume to fit & highlight my qualifications for a particular job title and it did a fairly good job, definitely better & faster than what I had already written :)

But then I asked it to write some complex formulae for a spreadsheet I am working on, and again, it was considerably faster, but was only about 75% correct, because it overlooked a few key arguments, which of course threw off the resulting calculations by quite a large amount...

So I give it an E for effort, and a real-world performance rating of 6/10 for now...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • JBL BAR 800 5.1.2 Dolby Atmos soundbar is an amazing deal today by Sayan Sen This Amazon Prime Day 2026 sales so far we have had a couple of nice deals related to sound and audio. First we have the Sennheiser HD 600 at its lowest ever price of just $225. Next we also have the Beats Studio Pro at its lowest price ever at just $150. However perhaps you prefer your gear to sound great on a larger scale, like throughout the room. In that case an all-in-one soundbar system can help and currently JBL's BAR 800 is a great deal for sure as it's up for grabs at just $600 (purchase link under the specs table down below). One thing that should be appreciated a lot about these JBL soundbars is their spec sheet and the frequency response data it provides. The firm is honest about it as JBL confirms the subwoofer is able to go down to 35 Hz at -6dB or F6. This means it should be covering 40Hz and up very well, where most of the bass lies. You miss out on a lot of sub-bass but that is to be expected given the price point and the subwoofer driver size. Speaking of which, it is a 10-inch driver and promises a max output power of 300 watts at 1% THD (total harmonic distortion). JBL also claims the system will provide you with a "True Dolby Atmos" experience. The surround speakers are wireless and battery-powered which means setting them up should be really convenient. The technical specs of the JBL BAR 800 are given in the table below: Specification Value Channel Configuration 5.1.2-channel soundbar system Dolby Atmos Yes, with 2 up-firing drivers Total System Power Output 720 W Soundbar Power Output 340 W Surround Speaker Power Output 2 × 40 W Subwoofer Power Output 300 W Soundbar Drivers 3 × 46×90 mm racetrack drivers, 3 × 20 mm tweeters, 2 × 70 mm up-firing full-range drivers Surround Speaker Drivers 1 × 46×90 mm racetrack driver (each speaker) Subwoofer Driver 10-inch (260 mm) wireless subwoofer Frequency Response 35 Hz – 20 kHz (-6 dB) Audio Inputs Optical, Bluetooth, Chromecast built-in, AirPlay, Alexa Multi-Room Music (MRM), USB* HDMI Inputs 1 HDMI video input HDMI Output 1 HDMI eARC output HDCP Version 2.3 HDR Pass-Through HDR10, Dolby Vision Bluetooth Version 5.0 Wi-Fi Version 6, 6E Streaming Services Chromecast built-in, Apple AirPlay, Alexa MRM Get it at the link below: JBL Bar 800-5.1.2-Channel Dolby Atmos soundbar with Detachable Surround Speakers (Black): $599.85 (Sold and Shipped by Amazon US with Prime) Prime subscription can be cancelled within three business days. Good to know This Amazon deal is U.S. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • Microsoft releases PowerToys v0.100.1, fixes a bug that made remapped keys misbehave by Ivan Jenic Microsoft just released PowerToys v0.100.1, a patch update that addresses several stability and behavior issues found in v0.100.0. The v0.100.0 patch was a significant update for PowerToys, as it introduced all sorts of new features and additions, such as a rebuilt Shortcut Guide, a Command Palette Extension Gallery, webcam overlay support in ZoomIt, and more. However, the v0.100.0 version also introduced some bugs and stability issues. And now, Microsoft is addressing these issues in the new patch. The most impactful fix in this release perhaps is in Keyboard Manager, where remapped modifier keys were being delivered as system-key events, causing unexpected behavior in apps. The clearest example of this was Alt-to-Backspace remaps, deleting whole words instead of a single character. So, if you thought there was an issue with your keyboard, Microsoft just confirmed that it was PowerToys. Beyond the Keyboard Manager fix, v0.100.1 also addresses several other issues. It fixes a bug with Power Display that was preventing monitors from waking from standby correctly. Additionally, the new update patches Quick Access crashes on launch, and resolves a Shortcut Guide crash that occurred when switching between sidebar sections. Here’s the full changelog: Color Picker Fixed a bug where the main Color Picker window could appear inside the zoomed-in picker view Command Palette Fixed Run history initialization in AOT builds Fixed a bug where the Performance Monitor dock item could show ??? after restart Fixed the Hibernate command using the Sleep icon Limited the "pin to dock" dialog to displays where the dock is enabled Keyboard Manager Fixed modifier keys remapped to non-modifier keys being delivered as system-key events, which caused unexpected behavior in apps such as Alt-to-Backspace deleting whole words Power Display Fixed a bug where selecting On in the monitor power-state control did not wake a monitor from standby Fixed built-in display detection and brightness control on dual-GPU laptops where the internal panel is driven by the discrete GPU PowerToys Run Fixed VS Code Workspaces discovery after VS Code moved recently opened workspace data to shared storage Quick Access Fixed Quick Access flyout crashes caused by unhandled XAML exceptions during launch or page navigation Shortcut Guide Fixed a crash when navigating between Shortcut Guide sidebar sections Fixed number-key rendering in shortcut manifests and added a Postman shortcut manifest Updated bundled shortcut manifests to use the literal number-key token so number keys render correctly across apps ZoomIt Fixed a race condition in audio initialization for ZoomIt video recording You can download PowerToys v0.100.1 from the official GitHub releases page.
    • OBS Studio 32.2.0 Beta 2 by Razvan Serea OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming video content, efficiently. It is the re-write of the widely used Open Broadcaster Software, to allow even more features and multi-platform support. OBS Studio supports multiple sources, including media files, games, web pages, application windows, webcams, your desktop, microphone and more. OBS Studio Features: High performance real time video/audio capturing and mixing, with unlimited scenes you can switch between seamlessly via custom transitions. Live streaming to Twitch, YouTube, Periscope, Mixer, GoodGame, DailyMotion, Hitbox, VK and any other RTMP server Filters for video sources such as image masking, color correction, chroma/color keying, and more. x264, H.264 and AAC for your live streams and video recordings Intel Quick Sync Video (QSV) and NVIDIA NVENC support Intuitive audio mixer with per-source filters such as noise gate, noise suppression, and gain. Take full control with VST plugin support. GPU-based game capture for high performance game streaming Unlimited number of scenes and sources Number of different and customizable transitions for when you switch between scenes Hotkeys for almost any action such as start or stop your stream or recording, push-to-talk, fast mute of any audio source, show or hide any video source, switch between scenes,and much more Live preview of any changes on your scenes and sources using Studio Mode before pushing them to your stream where your viewers will see those changes DirectShow capture device support (webcams, capture cards, etc) Powerful and easy to use configuration options. Add new Sources, duplicate existing ones, and adjust their properties effortlessly. Streamlined Settings panel for quickly configuring your broadcasts and recordings. Switch between different profiles with ease. Light and dark themes available to fit your environment. …and many other features. For free. At all. OBS Studio 32.2.0 Beta 2 changelog: Beta 2 Changes Fixed a CI deployment issue. There are no application changes since Beta 1. 32.2 New Features Replaced add source dropdown with new dialog [Warchamp7] Improved FPS selector UX [jcm93] Added missing file support for filters [exeldro] Added ability for plugins to set custom icons for new source types [cg2121] Included .webp files when adding a directory to Image Slide Show source [TarunCore] Added copy paste functions to frontend API [exeldro] Added filter to compose SDR into HDR [jpark37] Added delete as a hotkey to delete sources on macOS [PatTheMav] Added dynamic bitrate support to multitrack video [lexano-ivs] 32.2 Changes Forced Intel-based installations to update to Apple Silicon version on macOS [PatTheMav] This change means that OBS Studio versions built for Intel-based Macs but running on Apple Silicon Macs will automatically update to OBS Studio built for Apple Silicon Macs. If an installation was using third-party plugins, those plugins will no longer load until replaced with Apple Silicon versions. Fixed audio mixer state getting out of sync when changing settings via websockets or plugins [Warchamp7] Added theming for checked QToolButtons [glikely] Improved OpenGL performance slightly on low-end machines [kkartaltepe] Set minimum size for color source to 1 pixel [exeldro] Added minimum width to spinboxes [Warchamp7] Disallowed overwriting the crash handler [sebastian-s-beckmann] Applied process mitigation policies for Windows [notr1ch] Adjusted description of multitrack video [jhnbwrs] Changed new capture devices to use fallback frame rate by default [PatTheMav] Improved DLL loading behavior on Windows [notr1ch] Limited multitrack video config to Custom service [PatTheMav] 32.2 Bug Fixes Fixed OAuth and dock state save corruption [PatTheMav] Fixed group bounds not resizing when removing items [howellrl] Fixed canvas mixes not being restored after video reset [dsaedtler] Fixed some erroneous crashes during shutdown [Warchamp7] Fixed display capture sometimes capturing black after a duplicator failure [ThrowTop] Fixed color of controls dock output buttons in System theme [shiina424] Fixed virtual camera reset failures [stephematician] Fixed potential crash when user discards changes in the settings window [suogesi] Fixed incorrect return value in virtualcam filter [xtfo] Fixed source toolbar buttons not working after dragging a source into a group [Warchamp7] Fixed properties hint icon spacing [Warchamp7] Fixed potential crash when a video device reconnects on macOS [jcm93] Fixed an issue where PipeWire could fail on NVIDIA GPUs [hoshinolina] Fixed obs_canvas_get_video_info returning incorrect framerate [dsaedtler] 32.2 Deprecations Deprecated obs_properties_add_button [sebastian-s-beckmann] Download: OBS Studio 32.2.0 Beta 2 | Portable | ARM64 | ~200.0 MB (Open Source) View: OBS Studio Homepage | Other Operating Systems | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Is a fast food restaurant a good metric to compare against?
    • Grand Theft Auto VI pricing revealed alongside Ultimate Edition and pre-loading details by Pulasthi Ariyasinghe Last week, Rockstar revealed Grand Theft Auto VI pre-orders will be starting soon, and just a day ahead of that, now the studio has announced the official pricing for the highly anticipated game. This has been a hotly debated topic among fans and industry veterans for a long time, considering the game is expected to be the biggest entertainment product launch ever. The confirmed pricing for the Grand Theft Auto VI standard edition is $79.99, which Rockstar says gives access to the "single-player experience set in the biggest, most immersive evolution of the series yet." This follows what most of our readers thought would happen with the pricing too. At the same time, a $99.99 Grand Theft Auto VI: Ultimate Edition has been confirmed as well, which lands with "an exclusive collection of premium vehicles, weapons, apparel, and action threaded across all aspects of Jason and Lucia’s story." Pre-ordering will also give fans extra bonuses, including a Vintage Vice City Pack of cosmetic items as well as a free month of GTA+. Head to the official website of the game here to check out all the cosmetic rewards the Ultimate Edition and pre-orders bring. Interestingly, the studio does not mention Grand Theft Auto VI multiplayer at all in today's announcement. Perhaps this will arrive later, following the campaign launch, or the studio is keeping that reveal for a later date. Digital pre-orders for Grand Theft Auto VI will begin on June 25, 2026, at midnight local time across regions for Xbox Series X|S and PlayStation 5. The title is slated to launch on November 19 on those same platforms. Pre-loading for Grand Theft Auto VI will kick off on November 12, giving players a week to get the game ready on their consoles. As for the physical edition, Take-Two has confirmed that this will be available without a disc, with the box only containing a download code inside. This will be purchasable starting November 12, giving players who take this route time to pre-load the title as well.
  • Recent Achievements

    • One Year In
      OHI Accounting earned a badge
      One Year In
    • First Post
      Almohandis earned a badge
      First Post
    • Rookie
      DaviKar went up a rank
      Rookie
    • Dedicated
      HidekoYamamoto94 earned a badge
      Dedicated
    • One Month Later
      timbobit earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      474
    2. 2
      +Edouard
      172
    3. 3
      PsYcHoKiLLa
      122
    4. 4
      Michael Scrip
      83
    5. 5
      Xenon
      72
  • Tell a friend

    Love Neowin? Tell a friend!