Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.is
Exported on 1/6/2026 at 14:21:38 PST from Cursor (2.3.23)
User
I have a problem that I would like to solve using an LLM or agents. The problem is I have a system that has a lot of logs. Log files. I can access those log files through SSH. That is not a problem. What I need to do is analyze the log files—basically analyze the crash logs, exceptions, or things like that. I would like to leverage an LLM to do that analysis and come up with information like what the outcome should be, how many errors there are, and other insights. So what is the best way to do that? Is using an LLM and creating an agent a good option? If so, how do we actually create an agent? I do have access to LLMs—say I have internal access to the OpenAI API. Could you devise a simple solution for how this kind of problem can be efficiently solved, so that this agent can analyze the logs with the help of the LLM? Also, I would like to know how you are planning to handle this analysis if t
| #!/usr/bin/env -S kotlin -Xplugin=/opt/homebrew/opt/kotlin/libexec/lib/kotlin-serialization-compiler-plugin.jar | |
| @file:DependsOn("io.ktor:ktor-server-core-jvm:3.3.1") | |
| @file:DependsOn("io.ktor:ktor-server-jetty-jakarta-jvm:3.3.1") | |
| @file:DependsOn("io.ktor:ktor-server-servlet-jakarta-jvm:3.3.1") | |
| @file:DependsOn("io.ktor:ktor-serialization-kotlinx-json-jvm:3.3.1") | |
| @file:DependsOn("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1") | |
| @file:DependsOn("ch.qos.logback:logback-classic:1.5.12") | |
| @file:CompilerOptions("-jvm-target", "21") |
| //> using scala 3.7.3 | |
| //> using dep com.softwaremill.ox::core:1.0.0 | |
| import scala.concurrent.duration.* | |
| import java.time.Instant | |
| import ox.* | |
| import scala.util.boundary | |
| import java.util.ArrayList | |
| import java.util.concurrent.locks.LockSupport |
| package org.jetbrains.demo | |
| import io.ktor.server.application.* | |
| import io.ktor.server.engine.* | |
| import io.ktor.server.netty.* | |
| import io.ktor.server.response.* | |
| import io.ktor.server.routing.* | |
| fun main() { | |
| embeddedServer(Netty, configure = { |
| {"resourceSpans":[{"resource":{"attributes":[{"key":"host.arch","value":{"stringValue":"aarch64"}},{"key":"os.type","value":{"stringValue":"Mac OS X"}},{"key":"os.version","value":{"stringValue":"15.5"}},{"key":"service.instance.id","value":{"stringValue":"ab814328-7f99-4a93-a3a0-0eec9f60dc47"}},{"key":"service.name","value":{"stringValue":"Amper"}},{"key":"service.namespace","value":{"stringValue":"org.jetbrains.amper"}},{"key":"service.version","value":{"stringValue":"0.8.0-dev-3078"}},{"key":"telemetry.sdk.language","value":{"stringValue":"java"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.version","value":{"stringValue":"1.50.0"}}]},"scopeSpans":[{"scope":{"name":"org.jetbrains.amper.telemetry","attributes":[]},"spans":[{"traceId":"0299868cc90426bd8b92acbb079c9ffa","spanId":"6608b921b48291e7","parentSpanId":"3b1be2d9afd95352","name":"JVM startup","kind":1,"startTimeUnixNano":"1754611508891394000","endTimeUnixNano":"1754611509268394000","attributes":[],"event |
Kotlin/Native requires that C libraries are compiled with a specific verison of GCC.
You can use the GCC used by Kotlin/Native itself. These Gradle tasks will help with this.
// build.gradle.kts
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile| ### Llama 2 Chat | |
| POST http://127.0.0.1:8080/completion | |
| Content-Type: application/json | |
| { | |
| "prompt": "What is Java Language?", | |
| "temperature": 0.7 | |
| } | |
| ### Llama 2 tokenize |
| #!/usr/bin/env java --enable-preview --enable-native-access=ALL-UNNAMED --source 21 | |
| import java.lang.foreign.*; | |
| import java.lang.foreign.MemoryLayout.PathElement; | |
| import java.lang.invoke.MethodHandle; | |
| public class FFMCrash { | |
| static Linker LINKER = Linker.nativeLinker(); | |
| static SymbolLookup loaderLookup = SymbolLookup.loaderLookup(); |
| { | |
| "$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
| "description": "A dual axis chart, created by setting y's scale resolution to `\"independent\"`", | |
| "width": 400, | |
| "height": 300, | |
| "data": { | |
| "values": [ | |
| { | |
| "process": "java", | |
| "time": "2023-04-27 00:00:00", |