Skip to content

Instantly share code, notes, and snippets.

View cartermp's full-sized avatar
🦫
reject modernity, become a beaver

Phillip Carter cartermp

🦫
reject modernity, become a beaver
View GitHub Profile
This file has been truncated, but you can view the full file.
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.type,error.msg,sqs.error,error.cause_chain,email,target,code.lineno,latency,id,name,http.url,transaction.id,code.namespace,type,duration_ms,provider,account.id,service.name,http.method,operation,busy_ns,idle_ns,status_code,library.name,http.host,classification,invitation_id,thread.id,thread.name,library.version,code.filepath,customer.payment.outbound.missing_in_internal,level,parent_name,adapter.payment.missing_in_internal,net.host.port,service.version,span.kind,organisation.id,http.scheme,sqs.outcome,internal_account.id,organisation_id,http.path,http.user_agent,http.status_code,trace.parent_id,span.num_events,sns.topic,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are j
func GetCosineSimilarity(a, b []float32, idx int) (float32, error) {
if len(a) != len(b) {
return 0, errors.New(fmt.Sprintf("vectors must have the same length: %d != %d, idx: %d", len(a), len(b), idx))
}
var dotProduct float32
for i := 0; i < len(a); i++ {
dotProduct += a[i] * b[i]
}
// openai vectors are already normed
using OpenTelemetry;
using OpenTelemetry.Logs;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
var appResourceBuilder = ResourceBuilder.CreateDefault()
.AddService(serviceName: Telemetry.ServiceName, serviceVersion: Telemetry.ServiceVersion);
We couldn’t find that file to show.
We couldn’t find that file to show.
package main
import (
"errors"
"go.opentelemetry.io/otel/attribute"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)
var (

Herein lies my thoughts on what the FSSF should seek to accomplish and why. Ultimately, it comes down to spending the money that we have to further the reach of the F# language. How that gets done could make for some challenging implementation details.

It's a marketplace out there

Like it or not, language adoption is a game in a market.

Java didn't overtake the world in the 90s because it was better than C++. It did it because Oracle pumped hundreds of millions of dollars into marketing efforts to get people to realize that it was more productive than C++. They even took out ads in newspapers.

And other times you don't need explicit marketing because you're the default language used for a platform (kotlin via Android, Swift via iOS) and you get to piggyback on the marketing for that platform instead. C# fills this role for Microsoft's stuff that's .NET-based. Yes, F# can "me too" here, but this is just a tiny drip of adoption (albeit steady).

// Learn more about F# at http://docs.microsoft.com/dotnet/fsharp

open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running

module DotProduct =
    let rec dotProduct (vector1 : float []) (vector2 : float []) : float =

        if vector1 |> Array.length = 0 then

Title:

F# is awesome - learn what's new and what you can use it for!

Abstract:

F# is a functional cousin to the C# language. It's part of .NET, but has a lightweight syntax and several awesome features that make it a great choice for writing succinct code, web apps, and doing data scripting and analytics. It's got great tooling support, and highly active community, great package and ecosystem support, and it's used in all kinds of domains.

F# 6 is the latest release of F#, bringing some great new features that simplify some things for beginners and make it an even more well-rounded language for folks who love type safety and robustness but don't want to write a bunch of code to get those things.

// Learn more about F# at http://docs.microsoft.com/dotnet/fsharp
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
let MAGIC = 7
let simple n =
n &&& 0xFF