Using StringBind in BoxLang

Ok, to be honest, this is going to be a pretty lightweight post as it’s about a simple little string function in BoxLang, but as I discovered it rather recently and was intrigued by what it did. So first off – how did I find this? In the BoxLang docs, there’s a whole section on built-in functions and a subcategory just for string. I was looking it over and realized there were quite a few that I had not known existed. There are some interesting ones in there like pascalCase and snakeCase. I was pretty sure I knew exactly how these worked, but I went ahead and built a quick demo that demonstrates both: Ok, that works well enough, but let’s talk StringBind. StringBind... more →
Posted in: JavaScript

Using Chrome AI for Sentiment Analysis (Again)

Every now and then I get an idea for a blog post/demo, prepare to write about it, and realize I’ve actually covered the topic in the past. Sometimes, though, it works out really well especially when the technology has changed quite a bit. Almost a year ago, I blogged about doing sentiment analysis with Chrome’s AI upcoming AI feature. At the time, it worked…. ok. The biggest issue at the time was the inability to provide a system instruction to the model as well as being able to shape the response a particular way. Thankfully, both of those are now supported. As a reminder, the prompt API for the web is still in an origin trial, see the docs for more information and join the... more →
Posted in: JavaScript

Using AgentQL and Pipedream to Fix Missing RSS Feeds

Last week I blogged about how I used AgentQL to scrape a web page, this blog to be precise, into pure data. If you don’t remember, AgentQL lets you pass a simple query string that is run against a web page and parsed into data. So for example, I was able to use this query on my home page to get a list of entries in pure data: { blogposts[] { url title date } } The REST API was incredibly easy, and I demonstrated in BoxLang how I could use AgentQL to turn my blog’s home page into a much simpler, smaller, HTML version. This of course begs the question, how else could we transform it? What about creating a RSS feed for a blog that doesn’t have one! Of course, if... more →
Posted in: JavaScript

Using GenAI to Create a SDK from Sample Code

I’ve been experimenting more and more with AI-assisted coding (not gonna call it vibe coding, even when I do), and the results have been incredibly interesting. Today, I decided to try something interesting – generating a SDK for an API. There are multiple tools out there that can convert an OpenAPI specification to an SDK (and those tools I’ve seen are pretty darn cool), but I wanted to attempt another route. Earlier this month I blogged about the new Foxit PDF APIs I’m working with. These APIs are all really simple, which is good of course, but when prepping for the release, I wanted to build code samples for every possible operation. I did so, and they’re up in... more →
Posted in: JavaScript

Using BoxLang’s Cache Services

Recently I’ve been looking at BoxLang’s Caching service, mostly because the docs were updated which made it easier to dig into it. 😉 My usual expectation for a caching service is typically a key/value system with APIs to get and set and hopefully a simple way to handle expiration. So for example, I can idealy store a cache value and an expiration values at the same time, and if I fetch it later and it’s expired, I get a nice null value back. As I said, that’s the ‘baseline’ for what I expect, so I was kind of blown away, and a bit overwhelmed honestly, with what you can do on the BoxLang platform. At a high level, here’s some of the details: Out of... more →
Posted in: JavaScript

Using AI to Analyze Chart Images

I’ve done a few posts where I’ve asked GenAI services to analyze and summarize data. Most recently, I blogged about Chrome’s built-in AI APIs and summarizing raw data into simple English. In each case where I’ve done work like this, I’ve had access to the raw data of what I want the API to analyze. But what if you don’t? What if all you have is a simple chart image? I did some testing with this and here’s what I found. My Source Data For my source data, I created a set of charts using Highcharts. This isn’t my preferred front-end charting library, but I noticed their demos had (usually) a quick CSV export. That made it easy to get both a sample... more →
Posted in: JavaScript

Using Cloudflare’s Browser Rendering APIs for Screenshots

I’ve been a Cloudflare fan for a while now, but have mainly focused on their Workers Serverless platform. I was aware, of course, that they did a lot more, but I just haven’t had the time to really look around and explore. Recently I was doing some investigation into "url to screenshot" services and discovered that Cloudflare had this, and not only that, it’s part of a suite of browser APIs that are really freaking awesome. Cloudflare’s Browser Rendering APIs do things like: Get the HTML of a page, but after JavaScript has executed, allowing it to get dynamic HTML Render a PDF to PDF Scrape HTML via selectors Parse out content via JSON schema (I’m absolutely... more →
Posted in: JavaScript

Build Your Own Localized Events Calendar using Diffbot’s Knowledge Graph

Finding out what’s going on in your city can be a bit of a chore. For me, I use a combination of Facebook, specifically accounts for local organizations and news channels, and our local Reddit forum. This is… haphazard at best. I’m sure local "city wide" calendars exist, but I’m not aware of any that is used by the majority of folks nor do I trust them to actually cover everything going on. Having played with Diffbot’s Knowledge Graph last month ("Automating and Responding to Sentiment Analysis with Diffbot’s Knowledge Graph"), I thought I’d do some digging to see what would be possible via their API. Here’s what I was able to... more →
Posted in: JavaScript
1 2 3 4 11