Showing results for 
Search instead for 
Did you mean: 

Ashok Reddy on the Array Cast

Valued Contributor

In the latest episode of the Array Cast podcast we interview KX’s CEO, Ashok Reddy. 

On this episode we speak to Ashok about his experience in software development and the roles that KX, q and time-series computing will play in the future.


Valued Contributor
Valued Contributor

Here are the ChatGPT screenshots you mentioned starting around 38:00 in the episode


1. ChatGPT asked to write some kdb+ code

It was able to write a small sample function and correct it's errors with some guidance



To be absolutely correct it should have written

//No need for reassigning x with x:
//No need for whitespace
maxval:{max x}
//No need to use , to concatonte the values together
maxval[1 5 2 7 3]

//Going further

//Since no extra functionality is added you can assign direct from max
//Square brackets not needed for unary function
maxval 1 5 2 7 3



2. ChatGPT asked to create a quote and Trade table in kdb+

It does a decent job of creating the tables


The one mistake I did not point out to it is it's use of insert

//This will error with 'type error
q)insert[quote; (12:00:00.000;`ABC;10.5;11.0)]

//The correct syntax requires the ` to pass by reference and not by value
q)insert[`quote; (12:00:00.000;`ABC;10.5;11.0)]


3. ChatGPT asked to include datatypes in schema

It corrects it's mistake well here.

Although in it's previous example it did insert time datatypes to the time column and not timestamps which may confuse someone new to the language.


4. ChatGPT asked to write a function to list files in a folder by size in kdb+

It does horribly here.


What would people suggest as better answers?

//Basic attempt - does not filter out folders which would need improvement
//Would not work on windows
//Anyone have any nice ideas for a cross platform simple version?
//Using hcount to get size of files is one thing that comes to mind
q)`size xdesc flip `file`size!"SJ"$flip .[;(::;8 4)] {x where not x~\:""} each vs[" "] each 1_ system "ls -lS ."
file                                      size
fileTHing                                 570726400
PlatformKx-4.7.2-Linux-GA.tgz             569087810                 152423834


Moderator Moderator

Wonderful! A great listen. 

Thanks for sharing with the KX Community 🙌