[HN Gopher] Show HN: Superblocks AI - AI coding assistant for in...
       ___________________________________________________________________
        
       Show HN: Superblocks AI - AI coding assistant for internal apps
        
       I'm Frank, the Head of AI Engineering at Superblocks. We're a
       platform for enterprise developers to build and host mission-
       critical internal apps.  Today we launched Superblocks AI and are
       excited to hear feedback from the HN community!  Superblocks AI
       combines the power of the Superblocks drag-and-drop App Builder
       with robust AI code generation, code optimization, code
       explanation, mock data generation, and API call generation across
       SQL, Python, JavaScript, JSON and HTML.  We built Superblocks AI
       with the intention to streamline some of the repetitive and often
       confusing aspects of building internal tools, here's a brief
       overview:  Generate Code: LLMs like ChatGPT have quickly become a
       critical part of developers' lives and we wanted to bring that
       experience natively into our product. The response is streamed for
       the best UX, similar to Chat-GPT, and can be modified before use.
       Explain Code: Understanding someone else's code for large internal
       engineering teams is often a challenge. Highlight code and
       Superblocks AI offers an explanation that you then have the ability
       to add as a comment.  Edit Code: You can make alterations to code
       by highlighting it and choosing prompts like optimize performance,
       enhance readability, or something custom. We've added an inline
       code diff view for easy verification of changes.  Generate API
       Calls: You often want to make an API call but need to spend 30
       minutes looking up the documentation and crafting the correct call
       in Postman. We provided a way for you to give a prompt, and
       Superblocks AI will generate REST and GraphQL queries for APIs like
       Stripe, Salesforce, your favorite SaaS provider, and more.
       Generate Mock Data: This enables faster UI development by
       generating mock data for components like tables, charts, grids
       etc., which can be especially handy during prototyping.  I'd love
       to hear feedback from the HN community on how you think this
       feature should evolve over the next few months!
        
       Author : frankgrecojr
       Score  : 85 points
       Date   : 2023-06-27 17:00 UTC (6 hours ago)
        
 (HTM) web link (www.superblocks.com)
 (TXT) w3m dump (www.superblocks.com)
        
       | anotherpaulg wrote:
       | This looks cool. I like that you're showing diffs and integrating
       | the AI code and suggestions back into the original source code.
       | 
       | I've been focused on similar concepts with my open source AI
       | coding tool. My tool is a command line GPT chat tool. You can ask
       | it to write or edit code in any git repo. It displays live diffs
       | as the AI edits stream in and automatically integrates them into
       | your source files. I think this is similar to what your article
       | is describing?
       | 
       | Folks might want to check out `aider` if they want to do the
       | style of AI coding you're showing, but on their own git repos.
       | 
       | https://github.com/paul-gauthier/aider
        
         | frankgrecojr wrote:
         | Thanks! I took a look at your repo and love the concise gif!
        
       | dvt wrote:
       | This is neat, but, as with all projects in this vein, I fail to
       | see the real value add. We've had ML-powered code generation for
       | several years now (Copilot released publicly in late 2021), and
       | apart from a cute novelty, there's no real use case I've found. (
       | _Maybe_ except for generating tests, but when dealing with a
       | novel code base, the models really can 't figure out dependency
       | injection, mocks, weird edge cases I'd care about, etc.)
       | 
       | This might be a bit contrarian, but I don't really think there's
       | product market fit here, at least for engineers. And if given in
       | the hands of non-engineers, you'll need to have an engineer at
       | least look over the code anyway. I haven't seen or heard of
       | anyone that seriously uses ChatGPT to generate code and uses it
       | in prod (apart from engagement-farming Twitter posts).
       | 
       | > Understanding someone else's code for large internal
       | engineering teams is often a challenge
       | 
       | Without proper context, this will fail miserably. Have you ever
       | seen a corporate codebase before? It can be the definition of
       | "wtf?" even for a seasoned developer that's been working there
       | for years.
       | 
       | This AI-generated code trend reminds me of the "no-code" fad of
       | the past decade.
        
         | danielbln wrote:
         | I feel like I live in an alternate universe to this comment.
         | Every engineer I know (devops, software, hell even datascience)
         | is using GPT-4 or Copilot (especially Copilot with the new chat
         | interface) and people, myself included, use it every day.
         | Refactor this code for me, add a function that does X, why is Y
         | failing, align this code with a different coding pattern, I
         | cobbled together this React app, clean it up and refactor it
         | and factor Z functionality into a node backend, help me
         | understand this bit of obtuse Python code, and the list goes on
         | and on and on. I've seen tremendous value, and its not without
         | fault mind you, LLM hallucination is a real problem, but I
         | would be very sad and annoyed if tomorrow they'd take LLMs out
         | of my daily engineering flow.
        
           | johnfn wrote:
           | Copilot shines with a number of things and isn't very good at
           | a number of other things. Whether you get value out of
           | Copilot says more, I think, about the kind of work you do on
           | a day-to-day basis than it does about the utility of Copilot.
           | 
           | Copilot/GPT is excellent at writing lots of new lines of
           | code. It's also really good at getting you started in
           | code/frameworks that you don't really understand.
           | 
           | However, Copilot/GPT is not nearly as good at troubleshooting
           | problems in existing code. If your job involves lots of bug
           | fixing or tweaks to existing features, Copilot and GPT are
           | next to useless.
           | 
           | I've noticed that if my work falls into the first category,
           | Copilot often speeds me up something like 30% to 40%. If my
           | work falls into the second category, it's 0%.
        
             | bravura wrote:
             | How about this? Taking a dense obtusely written ML
             | algorithm with a ton of mathematical notation, plug it into
             | GPT4, and get torch code? Cuz I do that often.
        
               | thundrio wrote:
               | That falls pretty clearly into the first bucket the
               | parent listed, "Help write lots of code"
        
           | jiggywiggy wrote:
           | It's not better then me.
           | 
           | But I use it when I'm lazy, tired or at times drinking.
           | 
           | And then it's really nice. At times it costs me too much time
           | solving it's mistakes. But then it nails something perfectly
           | and I'm impressed again.
        
             | danielbln wrote:
             | I often work with new (to me) tech or build
             | prototypes/PoCs, it's pretty great for that.
             | 
             | It's useful to recognize when a dialog is a dead-end,
             | otherwise it's easy to enter a rabbit hole that the llm
             | can't get out of. Best to poke at it from another angle
             | and/or within a new dialog, then.
        
           | dvt wrote:
           | Forgive the long reply, but I'm going to go ahead and "press
           | X to doubt," because I have been _trying_ to use both ChatGPT
           | and Copilot, and the results are abysmal apart from anything
           | but  "write me a linked list" or "give me some React
           | boilerplate." If you have examples of it working for you,
           | please share them. Here's a very salient example of it _not_
           | working for me: I spent about 1-2 days figuring this out, so
           | it 's definitely non-trivial, but it's not something insane
           | either. I'm working on a new project/startup idea and this is
           | part of it (verbatim prompt I just used on chatGPT):
           | hi, can you write me a function in rust that, if running on
           | windows:              1. figures out if the topmost window is
           | a windows explorer window         2. if it's a windows
           | explorer window, it returns the path (as a string) that the
           | windows explorer window is actively viewing         3. if
           | it's not a windows explorer window, it returns a blank string
           | 
           | This is a deceptively difficult task, as it requires all
           | kinds of COM finagling, and ChatGPT gets it royally wrong:
           | #[cfg(windows)]         fn get_active_explorer_path() ->
           | String {             use std::ptr;             use
           | winapi::um::winuser::{EnumWindows, GetWindowTextW,
           | IsWindowVisible};             use
           | winapi::shared::windef::HWND;             use
           | std::os::raw::c_int;             use std::ffi::OsString;
           | use std::os::windows::ffi::OsStringExt;                  let
           | mut path = String::new();             let mut active_explorer
           | = None;                  unsafe extern "system" fn
           | enum_windows_callback(hwnd: HWND, lparam: LPARAM) -> c_int {
           | let active_explorer = &mut *(lparam as *mut Option<HWND>);
           | let mut buffer: [u16; 512] = [0; 512];                 if
           | IsWindowVisible(hwnd) != 0 && GetWindowTextW(hwnd,
           | buffer.as_mut_ptr(), 512) != 0 {                     let
           | window_title =
           | OsString::from_wide(&buffer[..]).to_string_lossy();
           | if window_title == "File Explorer" {
           | *active_explorer = Some(hwnd);                         return
           | 0; // Stop enumeration                     }
           | }                 1 // Continue enumeration             }
           | unsafe {
           | EnumWindows(Some(enum_windows_callback), &mut active_explorer
           | as *mut _ as LPARAM);             }                  if let
           | Some(hwnd) = active_explorer {                 let mut
           | buffer: [u16; 512] = [0; 512];                 if
           | GetWindowTextW(hwnd, buffer.as_mut_ptr(), 512) != 0 {
           | let window_title =
           | OsString::from_wide(&buffer[..]).to_string_lossy();
           | if window_title == "File Explorer" {
           | let shell32 = winapi::um::shellapi::GetShellWindow();
           | if shell32 != hwnd {                             let mut
           | path_buffer: [u16; 512] = [0; 512];
           | if
           | winapi::um::shellapi::SHGetPathFromIDListW(ptr::null_mut(),
           | path_buffer.as_mut_ptr()) != 0 {
           | let path_str =
           | OsString::from_wide(&path_buffer[..]).to_string_lossy();
           | path = path_str.into_owned();                             }
           | }                     }                 }             }
           | path         }
           | 
           | I'm actually on my Mac right now, and I don't even need to
           | test it, because the first red flag is `"window_title ==
           | "File Explorer"`. File Explorer will change its window
           | titlebar to the currently viewed folder (so the conditional
           | will _always_ fail). There 's also other comical mistakes,
           | including passing a null pointer to `SHGetPathFromIDListW`,
           | using `GetShellWindow` which returns the desktop, and not
           | taking into account that Explorer windows can have multiple
           | tabs. Okay, let's see if we fare better on MacOS.
           | #[cfg(target_os = "macos")]         fn
           | get_active_finder_path() -> String {             use
           | std::ptr;             use objc::runtime::{Class, Object};
           | use objc::{class, msg_send, sel, sel_impl};             use
           | objc_id::Id;                  let mut path = String::new();
           | unsafe {                 let workspace: Id<Object> =
           | msg_send![class!(NSWorkspace), sharedWorkspace];
           | let front_window: Id<Object> = msg_send![workspace,
           | frontmostApplication];                 let front_window_pid:
           | u32 = msg_send![front_window, processIdentifier];
           | let running_apps: Id<Object> = msg_send![workspace,
           | runningApplications];                 let app_count: usize =
           | msg_send![running_apps, count];                 for i in
           | 0..app_count {                     let app: Id<Object> =
           | msg_send![running_apps, objectAtIndex: i];
           | let app_pid: u32 = msg_send![app, processIdentifier];
           | if app_pid == front_window_pid {                         let
           | bundle_url: Id<Object> = msg_send![app, bundleURL];
           | let bundle_path: *const Object = msg_send![bundle_url, path];
           | let path_str: *const i8 = msg_send![bundle_path, UTF8String];
           | if !path_str.is_null() {                             let
           | c_str = std::ffi::CStr::from_ptr(path_str);
           | path = c_str.to_string_lossy().to_string();
           | }                         break;                     }
           | }             }                  path         }
           | #[cfg(not(target_os = "macos"))]         fn
           | get_active_finder_path() -> String {
           | String::new()         }              fn main() {
           | let active_finder_path = get_active_finder_path();
           | println!("Active Finder Path: {}", active_finder_path);
           | }
           | 
           | Doesn't look like it: this is what I got, which doesn't even
           | compile. I'm not as familiar with MacOS systems programming,
           | so I'm not even sure what's wrong with it, frankly. My
           | solution involved using osascript on MacOS (which is the
           | first Google hit, though I'll have to port it, as some folks
           | may not have it on their systems).
           | 
           | So what is ML code generation useful for? Apart from helping
           | on the Nth CRUD app someone's building, I just don't see it.
        
             | clarge1120 wrote:
             | Thanks for including this example. It helps me understand
             | what you mean.
             | 
             | ChatGPT is not really equipped to do this level of code
             | design because there are too many steps for it to handle at
             | once. It can handle your instructions if it could first
             | write a detailed design spec, then write code and unit
             | tests, then run them, read the compiler output, and
             | iteratively make changes.
             | 
             | IOW, this would require a purpose-built solution which uses
             | ChatGPT's underlying engine to take your list of
             | requirements and turn them into built and tested code.
        
               | dvt wrote:
               | > ChatGPT is not really equipped to do this level of code
               | design because there are too many steps for it to handle
               | at once
               | 
               | There's no code design going on here. My solution was
               | literally just going through like 100 StackOverflow
               | answers & Microsoft's god-awful documentation to get the
               | 50 lines of code that does what I need it to do.
               | 
               | In fact, this is _precisely_ what I 'd hope ChatGPT would
               | be good for. Most of my final code is simply copy-pasted
               | from SO/example repos/official docs. He's the correct
               | function (comments added by me so I'll know wtf this is
               | meant to do when I look at it again in 3 months).
               | fn get_context_path() -> Result<String, Error> {
               | unsafe {                 // Init COM libraries in this
               | thread                 CoInitializeEx(Some(ptr::null()),
               | COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)?;
               | // CabinetWClass is the Explorer window class
               | let class = s!("CabinetWClass");                 let
               | topmost_explorer = FindWindowA(class, None);
               | let foreground_window = GetForegroundWindow();
               | // Breadcrumbs IFF topmost window is an explorer window
               | if topmost_explorer == foreground_window {
               | let windows: IShellWindows =
               | CoCreateInstance(&ShellWindows, None,
               | CLSCTX_LOCAL_SERVER)?;                     let unk_enum =
               | windows._NewEnum()?;                     let
               | enum_variant: IEnumVARIANT =
               | unk_enum.cast::<IEnumVARIANT>()?;
               | // Iterate through all IShellWindows
               | loop {                         let mut fetched = 0;
               | let mut var: [VARIANT; 1] = [VARIANT::default(); 1];
               | let hr = enum_variant.Next(&mut var, &mut fetched);
               | // No more windows?                         if hr ==
               | S_FALSE || fetched == 0 {
               | break;                         }
               | // Not an IDispatch interface?                         if
               | var[0].Anonymous.Anonymous.vt != VT_DISPATCH {
               | continue;                         }
               | // We should be able to turn an IShellWindow into an
               | IShellBrowser                         let shell_browser:
               | IShellBrowser = IUnknown_QueryService(
               | var[0]                                 .Anonymous
               | .Anonymous                                 .Anonymous
               | .pdispVal                                 .as_ref()
               | .unwrap(),
               | &SID_STopLevelBrowser,                         )?;
               | let shell_window = shell_browser.GetWindow()?;
               | // NOTE: The window we're matching with is actually the
               | shell's parent                         // Given that
               | windows can be tabbed, we want to make sure the parent is
               | the top                         if
               | GetParent(shell_window) == topmost_explorer {
               | let shell_view = shell_browser.QueryActiveShellView()?;
               | // Do some COM finagling, including a QueryInterface
               | cast,                             // until we get the
               | folder path we're looking at
               | let folder_view: IFolderView =
               | shell_view.cast::<IFolderView>()?;
               | let folder: IPersistFolder2 =
               | folder_view.GetFolder::<IPersistFolder2>()?;
               | let curr_folder = folder.GetCurFolder()?;
               | // NOTE: This fails on non SYSPATH paths (e.g. "Home" or
               | "Recent")                             let path =
               | SHGetNameFromIDList(curr_folder, SIGDN_FILESYSPATH)?;
               | let result = path.to_string()?;
               | // To figure out what path we're on (e.g. what tab is
               | active), we try to match the
               | // parent title with the folder
               | // FIXME: Unless using full paths as titles, we can have
               | ambiguities here                             let mut
               | title: [u16; 512] = [0; 512];
               | let len = GetWindowTextW(topmost_explorer, &mut title);
               | let title = String::from_utf16_lossy(&title[..len as
               | usize]);                                  // We found the
               | proper tab (child)                             if
               | result.contains(&title) {
               | // Cleanup COM & return path result
               | CoUninitialize();                                 return
               | Ok(result);                             // Must be
               | another one (or something went wrong)
               | } else {                                 continue;
               | }                         }                     }
               | }                 // Cleanup COM & fallback to blank
               | string                 CoUninitialize();
               | return Ok(String::from(""));             }         }
        
             | frankgrecojr wrote:
             | When I have use cases similar to this one (similar in
             | complexity), I'll pair program with it. If the code fails,
             | I'll tell it what error I got and ask it to refactor. If
             | the explanation it gives with the code shows it didn't
             | understand the question, I'll guide it along the correct
             | track.
             | 
             | It's not perfect at "zero-shot" answers but from my
             | experience is very good when you work with it
             | conversationally.
        
             | johnfn wrote:
             | I get a lot of mileage out of GPT, so let me see if I can
             | explain. I wouldn't ask GPT/Copilot to do what you asked.
             | After using them for a while you start to get an intuitive
             | sense of what's easy and what's hard for them to do, and
             | your specific example is indeed too difficult to get GPT to
             | do properly. They have the biggest utility for me for stuff
             | that I would ask a junior programmer to do - like a new
             | grad.
             | 
             | The real value proposition of GPT isn't that it can solve
             | really hard problems. The value proposition is that it's
             | about as capable as a junior engineer, except it can write
             | code much faster than any junior engineer, so it can speed
             | you along on the boilerplate-y parts of coding that
             | otherwise would be a lot of manual effort. It's especially
             | useful for things that feel "easy" but which I don't have
             | the relevant domain expertise. For instance, the other day
             | I needed to write a fairly trivial shell script to parse
             | some JSON files. I never write shell scripts and I always
             | forget the syntax, but GPT wrote it correctly on the first
             | try. That probably saved me 20-30 minutes of googling for
             | how to do things like read files, etc in shell scripts.
        
               | ElFitz wrote:
               | It's great at simple tedious stuff.
               | 
               | It's useful for average things and concepts we might be
               | unfamiliar with.
               | 
               | It's of limited use, if not utterly useless, for most
               | things a senior would have a hard time wrapping their
               | head around.
               | 
               | And where it really shines, is when adapting an answer
               | you'd otherwise look for on Google to your code, context,
               | and constraints.
        
             | selalipop wrote:
             | I don't write Rust but does this look (more) correct?
             | extern crate winapi;              use std::ptr::null_mut;
             | use winapi::shared::guiddef::{CLSID, IID};         use
             | winapi::um::combaseapi::{CoInitialize, CoCreateInstance};
             | use winapi::um::shobjidl_core::CLSID_ShellWindows;
             | use winapi::um::winuser::GetForegroundWindow;         use
             | winapi::Interface;         use
             | winapi::shared::winerror::{HRESULT, SUCCEEDED};         use
             | winapi::um::exdisp::IWebBrowser2;         use
             | winapi::um::unknwnbase::IUnknown;         use
             | winapi::um::oleidl::IDispatch;         use
             | winapi::shared::wtypes::BSTR;         use
             | winapi::um::winnt::LPCWSTR;         use
             | winapi::shared::ntdef::VOID;
             | 
             | use std::ffi::OsString; use
             | std::os::windows::ffi::OsStringExt;                    //
             | Helper function to convert a wide string to a Rust string
             | wide_to_string(wide: &[u16]) -> String {
             | OsString::from_wide(&wide)             .to_string_lossy()
             | .into_owned()
             | 
             | }                   // Helper function to convert BSTR to
             | Rust String         fn bstr_to_string(bstr: BSTR) -> String
             | {         unsafe {             let length =
             | winapi::um::oleauto::SysStringLen(bstr) as usize;
             | let slice = std::slice::from_raw_parts(bstr, length);
             | wide_to_string(slice)         }
             | 
             | }                  fn main() {         unsafe {
             | // Initialize COM             let hr =
             | CoInitialize(null_mut());                  if SUCCEEDED(hr)
             | {                 let mut shell_windows_ptr: *mut IUnknown
             | = null_mut();                 let shell_windows_iid: IID =
             | IShellWindows::uuidof();                 let
             | shell_windows_clsid: CLSID = CLSID_ShellWindows;
             | // Create IShellWindows instance                 let hr =
             | CoCreateInstance(                     &shell_windows_clsid,
             | null_mut(),
             | winapi::um::combaseapi::CLSCTX_ALL,
             | &shell_windows_iid,                     &mut
             | shell_windows_ptr as *mut _ as _,                 );
             | if SUCCEEDED(hr) {                     let
             | shell_windows_dispatch: &IDispatch = &*(shell_windows_ptr
             | as *mut IDispatch);                          let hwnd =
             | GetForegroundWindow() as LPCWSTR;
             | // Get Item of IShellWindows                     let mut
             | result = null_mut();                     let mut params =
             | winapi::um::oaidl::DISPPARAMS {
             | cArgs: 1,                         cNamedArgs: 0,
             | rgvarg: &mut winapi::um::oaidl::VARIANTARG {
             | n1: winapi::um::oaidl::VARIANTARG_0 {
             | n2: winapi::um::oaidl::VARIANTARG_0_0 {
             | vt: winapi::um::oaidl::VT_I4 as u16,
             | wReserved1: 0,
             | wReserved2: 0,
             | wReserved3: 0,                                     n3:
             | winapi::um::oaidl::VARIANTARG_0_0_0 {
             | lVal: hwnd as _,                                     }
             | }                             }                         },
             | rgdispidNamedArgs: null_mut(),                     };
             | shell_windows_dispatch.Invoke(
             | winapi::um::exdisp::DISPID_ISHELLWINDOWS_ITEM,
             | &winapi::shared::guiddef::IID_NULL,
             | winapi::um::winnls::LOCALE_USER_DEFAULT,
             | winapi::um::oaidl::DISPATCH_METHOD,
             | &mut params,                         &mut result,
             | null_mut(),                         null_mut(),
             | );                          // Convert result to
             | IWebBrowser2                     let web_browser2:
             | &IWebBrowser2 = &*(result.pdispVal as *mut IWebBrowser2);
             | // Get LocationURL property of IWebBrowser2
             | let mut location_url: BSTR = null_mut();
             | web_browser2.get_LocationURL(&mut location_url);
             | let path = bstr_to_string(location_url);
             | println!("Path: {}", path);                 } else {
             | println!("Failed to create IShellWindows instance.");
             | }             } else {                 println!("Failed to
             | initialize COM.");             }         }         extern
             | crate winapi;
             | 
             | use std::ptr::null_mut; use
             | winapi::shared::guiddef::{CLSID, IID}; use
             | winapi::um::combaseapi::{CoInitialize, CoCreateInstance};
             | use winapi::um::shobjidl_core::CLSID_ShellWindows; use
             | winapi::um::winuser::GetForegroundWindow; use
             | winapi::Interface; use winapi::shared::winerror::{HRESULT,
             | SUCCEEDED}; use winapi::um::exdisp::IWebBrowser2; use
             | winapi::um::unknwnbase::IUnknown; use
             | winapi::um::oleidl::IDispatch; use
             | winapi::shared::wtypes::BSTR; use
             | winapi::um::winnt::LPCWSTR; use
             | winapi::shared::ntdef::VOID; use std::ffi::OsString; use
             | std::os::windows::ffi::OsStringExt;
             | 
             | // Helper function to convert a wide string to a Rust
             | string fn wide_to_string(wide: &[u16]) -> String {
             | OsString::from_wide(&wide) .to_string_lossy() .into_owned()
             | }
             | 
             | // Helper function to convert BSTR to Rust String fn
             | bstr_to_string(bstr: BSTR) -> String { unsafe { let length
             | = winapi::um::oleauto::SysStringLen(bstr) as usize; let
             | slice = std::slice::from_raw_parts(bstr, length);
             | wide_to_string(slice) } }
             | 
             | fn main() { unsafe { // Initialize COM let hr =
             | CoInitialize(null_mut());                       if
             | SUCCEEDED(hr) {                 let mut shell_windows_ptr:
             | *mut IUnknown = null_mut();                 let
             | shell_windows_iid: IID = IShellWindows::uuidof();
             | let shell_windows_clsid: CLSID = CLSID_ShellWindows;
             | // Create IShellWindows instance                 let hr =
             | CoCreateInstance(                     &shell_windows_clsid,
             | null_mut(),
             | winapi::um::combaseapi::CLSCTX_ALL,
             | &shell_windows_iid,                     &mut
             | shell_windows_ptr as *mut _ as _,                 );
             | if SUCCEEDED(hr) {                     let
             | shell_windows_dispatch: &IDispatch = &*(shell_windows_ptr
             | as *mut IDispatch);                          let hwnd =
             | GetForegroundWindow() as LPCWSTR;
             | // Get Item of IShellWindows                     let mut
             | result = null_mut();                     let mut params =
             | winapi::um::oaidl::DISPPARAMS {
             | cArgs: 1,                         cNamedArgs: 0,
             | rgvarg: &mut winapi::um::oaidl::VARIANTARG {
             | n1: winapi::um::oaidl::VARIANTARG_0 {
             | n2: winapi::um::oaidl::VARIANTARG_0_0 {
             | vt: winapi::um::oaidl::VT_I4 as u16,
             | wReserved1: 0,
             | wReserved2: 0,
             | wReserved3: 0,                                     n3:
             | winapi::um::oaidl::VARIANTARG_0_0_0 {
             | lVal: hwnd as _,                                     }
             | }                             }                         },
             | rgdispidNamedArgs: null_mut(),                     };
             | shell_windows_dispatch.Invoke(
             | winapi::um::exdisp::DISPID_ISHELLWINDOWS_ITEM,
             | &winapi::shared::guiddef::IID_NULL,
             | winapi::um::winnls::LOCALE_USER_DEFAULT,
             | winapi::um::oaidl::DISPATCH_METHOD,
             | &mut params,                         &mut result,
             | null_mut(),                         null_mut(),
             | );                          // Convert result to
             | IWebBrowser2                     let web_browser2:
             | &IWebBrowser2 = &*(result.pdispVal as *mut IWebBrowser2);
             | // Get LocationURL property of IWebBrowser2
             | let mut location_url: BSTR = null_mut();
             | web_browser2.get_LocationURL(&mut location_url);
             | let path = bstr_to_string(location_url);
             | println!("Path: {}", path);                 } else {
             | println!("Failed to create IShellWindows instance.");
             | }             } else {                 println!("Failed to
             | initialize COM.");             }         }        }      }
        
         | bitlad wrote:
         | I think this is just a marketing ploy jumping on the Generative
         | AI bandwagon. In real world, this will not work as the actual
         | output might really confuse the end user.
        
         | padolsey wrote:
         | > I haven't seen or heard of anyone that seriously uses ChatGPT
         | to generate code and uses it in prod
         | 
         | I have. And I'm sure others have too. I dare say there are many
         | who probably _shouldn't_ be using it because of privacy/IP
         | concerns and so you won't hear about them.
         | 
         | > cute novelty [...]
         | 
         | I thought the same not so long ago. But gpt4 for me was a game
         | changer. It's helped me debug and fix some legitimately complex
         | code, and has been awesome at wholesale refactoring modules to
         | fulfil a new purpose. E.g. today I wanted help reconciling
         | between runtime and persistent LRU cache stuff. And it
         | understood what I wanted and assisted. After a few nudges it
         | gave me a refactored module with comments and a few tests. It's
         | like having a very capable junior dev in one's pocket :P
         | 
         | Ps. Trust me: it's not long before we have ai coding bots that
         | grab open tickets and hammer together PRs with full testing
         | suites. I imagine it's already happening.
        
           | ghughes wrote:
           | > I imagine it's already happening.
           | 
           | Not quite, that I know of, but some of us are working on it
           | :)
           | 
           | I have a feeling that while the glorious future you describe
           | can probably be realized using LLMs as a foundational
           | technology, the software engineering effort needed to get
           | there is on par with other AI moonshot projects e.g.
           | autonomous vehicles.
           | 
           | If you or others reading this are interested in this topic,
           | see this post for some interesting discussion and links to
           | projects in development (and in the comments there's a link
           | to a Discord server that was set up for further discussion):
           | https://news.ycombinator.com/item?id=36422730
        
             | FractalHQ wrote:
             | Can you not please? I enjoy coding and I don't want to have
             | to change careers again. Can you just automate something
             | else like Congress or the people running the Taco Bell
             | drive through?
        
           | [deleted]
        
         | frankgrecojr wrote:
         | > I haven't seen or heard of anyone that seriously uses ChatGPT
         | to generate code and uses it in prod
         | 
         | I would agree with this in general. The main goal here is to
         | optimize the "editor experience". When I personally code, I'll
         | have ChatGPT pulled up on the side in case I need to reference
         | it for speed. Some examples of how I might use it are:
         | 
         | - add some tests for me to review - take an existing piece of
         | code and modify it in some way - help me think of ways in which
         | I can write some code if I'm lazy that day.
         | 
         | This would generate code that after I iterate on it would need
         | to be reviewed which speaks to your point, "you'll need to have
         | an engineer at least look over the code anyway" which I agree
         | with.
         | 
         | The main goal is to have it there as a resource to pair program
         | with rather than trusting it without review/input.
        
         | H8crilA wrote:
         | You're telling me you've never once pressed "TAB" to auto-fill
         | the line or even several lines with Copilot? Because about half
         | of the letters in my source code is now Copilot generated.
         | 
         | The value added is that you don't send your source code to
         | OpenAI and/or their parent org Microsoft.
        
           | vorticalbox wrote:
           | Microsoft has owned GitHub since 2018.
        
             | ghughes wrote:
             | I think the GP meant the value added by Superblocks?
        
           | frankgrecojr wrote:
           | I do it all of the time (with GitHub copilot). It's getting
           | much better. If I retro my interactions with it, I think I'll
           | usually give it a "once over" to see if what it's doing makes
           | sense. Sometimes I'll add a comment to my PR saying what AI
           | did/didn't write to give the reviewer a heads up.
        
             | vorticalbox wrote:
             | I mostly use it for the generation of doc strings in python
             | and js doc in typescript.
             | 
             | Recently I've been using git diff and asking 3.5 to write
             | the PR description for me and so far it is doing quite
             | well. The 16k tokens means I can feed even more into it.
        
               | derwiki wrote:
               | This would be a great pre-commit hook! Generate commit
               | message and fill .commit_msg for review/further editing.
        
         | [deleted]
        
         | alexp7 wrote:
         | AI code generation is not yet ready for a full-blown apps, but
         | it works well on smaller well-defined functions. For example,
         | Nekton.ai asks the user to split the workflow into smaller
         | steps, and automates it one by one.
        
       | Kiro wrote:
       | I thought Superblocks was blockchain company. Is this a pivot?
        
         | frankgrecojr wrote:
         | We have never been a blockchain company. However, I do believe
         | there is one with a similar name.
        
           | Kiro wrote:
           | Not just similar name but the same URL as well:
           | https://twitter.com/getsuperblocks
           | 
           | I presume you bought the domain name from them in that case.
        
             | frankgrecojr wrote:
             | Yea I believe we did.
        
       | ttul wrote:
       | Superblocks is cool, but... when I tried building a simple web
       | hook receiver, it totally failed because the sender of the web
       | hook had their own particular notion of how authentication should
       | work. And Superblocks was rigid in its concept of "web hook".
       | There is no way to write arbitrary request handling code to get
       | around this limitation.
       | 
       | As with all low-code / no-code solutions, you can't please all
       | the people all the time. But I felt the design choice in this
       | particular case was overly rigid and with little justification.
        
         | frankgrecojr wrote:
         | Thanks for your comment! We're always open to product
         | improvement around our Workflows product. I agree there's more
         | features we need to add to service a robust set of web hook use
         | cases.
         | 
         | With that being said, there may be ways to accomplish what
         | you're looking for with the current state of our Workflows
         | feature so feel free to send me a DM on Twitter or Linkedin.
        
       | mad_vill wrote:
       | Looks really cool!
        
         | frankgrecojr wrote:
         | Thanks!
        
       | Topfi wrote:
       | I honestly really like this, both conceptually and from an
       | implementations point of view.
       | 
       | Assisting in the creation of single purpose functions is, in my
       | experience, by far the most reliable use case for LLMs in regard
       | to code creation at this point in time, yet is something I
       | haven't seen many companies really lean into. In fact, the only
       | other example I know of is Cloudflares Workers Workshop [0],
       | which I have been waiting for since May.
       | 
       | What I especially like about the implementation showcased in your
       | demo videos though was the visual component. Some subtle
       | animations, effective use of diff, methods being editable before
       | pasting, it all felt very cohesive and thought through, which is
       | something I can't say about every company utilizing OpenAIs APIs.
       | Seems more like something that can serve a real value add for
       | users, rather than just jumping on LLMs because it's the hot
       | thing this summer.
       | 
       | Really hope more people are experimenting with the "visual
       | implementation" of LLMs, using animations and graphs to
       | communicate LLM outputs has a lot of unused potential currently.
       | 
       | [0] https://blog.cloudflare.com/introducing-cursor-the-ai-
       | assist...
        
         | frankgrecojr wrote:
         | Thanks for the kind words! A lot of thought went into the user
         | experience. You can expect the same level of thought with all
         | of our future AI features.
        
       | cududa wrote:
       | At first was excited when I clicked the link. I think for some
       | people, this is a fantastic solution.
       | 
       | However, for me, what I was hoping it was/ one thing I'm still
       | looking for: Feed in my whole repo to the GPT-4 API, train on it,
       | and ask questions about the code base/ particular functions. Has
       | anyone seen that?
        
         | late_night_ wrote:
         | Ever heard of Cody by Sourcegraph?
         | 
         | about.sourcegraph.com
        
           | derwiki wrote:
           | Does it do well? How does it get around the context window
           | limits?
        
         | anotherpaulg wrote:
         | My tool aider lets you ask GPT questions about a git repo, as
         | well as letting you ask gpt to edit the code. Here's an example
         | of exploring and then modifying an open source js repo:
         | 
         | https://aider.chat/examples/2048-game.html
         | 
         | Here's an article about how it does that:
         | 
         | https://aider.chat/docs/ctags.html
         | 
         | I think bloop is also good for searching and Q&A against code.
         | I'm not sure if it will let you edit/modify the code though.
         | 
         | https://bloop.ai
        
         | frankgrecojr wrote:
         | This will be awesome when it's possible! I often wish GitHub
         | Copilot knew more about my repo than it does.
        
         | detour wrote:
         | haven't used it yet but Tzap looks like it'd fit the bill
         | 
         | - https://github.com/tzapio/tzap
         | 
         | - https://news.ycombinator.com/item?id=36377918
        
       | rubenfiszel wrote:
       | This is cool, but otherwise you can just use windmill as an open-
       | source internal app builder and use Github Copilot in vscode to
       | get the best AI assistant out there:
       | https://www.windmill.dev/docs/cli_local_dev/vscode-extension
        
       | bitlad wrote:
       | Airplane too, does have a coding assistant similar to this [1].
       | 
       | [1] https://www.airplane.dev/autopilot
        
       | iLoveOncall wrote:
       | Wow, a new low code app generator! And it even managed to
       | shoehorn ChatGPT in! How exciting!
        
         | bitlad wrote:
         | A lowcode app generator that "used" appsmith's open source
         | project to build on, gamed hacker news to be on the top page
         | once, has a new low code app generator with shoehorned chatgpt.
         | 
         | ZIRP Hustle is real.
        
           | ranma wrote:
           | The architecture has diverged significantly from the Appsmith
           | project (Apache 2.0 licensed) since forking the frontend
           | canvas and evaluation code more than 2 years ago. Most of
           | Superblocks is built from the ground up to optimize for
           | performance, scalability and extensibility.
           | 
           | In terms of ChatGPT, Superblocks's goal is to develop a
           | simple visual interface for creators to integrate AI into
           | their workflow to build applications quickly. The platform
           | makes it easy to verify, deploy, and monitor your changes,
           | which would be difficult to do with just a chat interface.
        
       | light_hue_1 wrote:
       | This looks neat but the examples are terrible.
       | 
       | The fact that it's even willing to write a function which removes
       | PII from a string is nonsense. No such function is possible.
       | 
       | And the comment for filterUsersTable is incredibly long, tedious,
       | and unhelpful.
       | 
       | How does the SQL thing work? How does it know what my schema is?
       | That's nowhere on screen.
       | 
       | The only believable example is the Salesforce one which anyone
       | could do.
        
         | frankgrecojr wrote:
         | > And the comment for filterUsersTable is incredibly long,
         | tedious, and unhelpful.
         | 
         | This is good feedback. I think having an ability to adjust
         | verbosity is valuable. A comment version should maybe be more
         | concise than the actual explanation.
         | 
         | > How does the SQL thing work? How does it know what my schema
         | is? That's nowhere on screen.
         | 
         | When you configure integrations with Superblocks, we query your
         | integrations metadata which we use to give the best answers
         | here.
        
       | foxbee wrote:
       | If you're interested, there's a number of open source
       | alternatives to Superblocks
       | 
       | Budibase. https://github.com/Budibase/budibase
       | 
       | Appsmith. https://github.com/appsmithorg
       | 
       | Tooljet https://github.com/ToolJet/ToolJet
       | 
       | And more (I'm sure others will comment)
        
         | slig wrote:
         | I've been using Windmill and it works like a charm.
        
       ___________________________________________________________________
       (page generated 2023-06-27 23:01 UTC)