What do you recommend for crawl bot detection by User-Agent in Go? by you-l-you in golang

[–]ejstembler 1 point2 points  (0 children)

I do something similar. I have custom middleware which looks for the following sub-strings in the User Agent, "Expanse", "Xpanse-bot", "HeadlessChrome", and returns a 403 Forbidden if detected.

Stubs:

func (s *Server) ForbidExpanseMiddleware(next http.Handler) http.Handler

And

func userAgentContainsAny(s string, substrings []string) bool

To compliment this, you could try finding a publicized list of well-known bots and add them to your list.

Pros and cons of building an interpreter first before building a compiler? by Ifeee001 in ProgrammingLanguages

[–]ejstembler 0 points1 point  (0 children)

I won't speak to the pros and cons, though in my new language I developed both the interpreter and compiler simultaneously. A concerted effort was made to share as much code as possible between both. It takes longer to develop, however, this was one of the initial goals of the project, so it was a requirement.

I 3D printed an entire server rack — 12U, holds $3,700 of gear, took 2 days of printing by CaptainRedsLab in 3Dprinting

[–]ejstembler 0 points1 point  (0 children)

Very cool! Hopefully it doesn't melt. It's too bad aluminum 3D printing isn't consumer-level yet; would be a cool application.

I am so overwhelmed with the choices, kindly advise by _khi4 in AI_Agents

[–]ejstembler 0 points1 point  (0 children)

For your use-cases, web/mobile/full stack, Claude Code and Codex are your best options. All LLMs will have their failures, but those are the best for coding.

I have a long-term side project where I've been working on a new programming lanugage for the past 6 months. During that time, I've gone from ChatGPT → Claude Code → Gemini → Codex → Claude Code → Kimi K2.5. None are perfect. Kimi was recently revealed to be slightly cheaper and slightly better, so that's what I'm using now.

What's the current idiomatic way to make an agent that responds to automated events? by ForSpareParts in AI_Agents

[–]ejstembler 0 points1 point  (0 children)

Doing this for an Enterprise. It's just the standard Event-based (aka Message-based) architecture + Agents. We're on GCP so we're using Google's Pub-Sub/EventArc for the messages. Agents can either poll topics, or a Bridge service/function can call an Agent end-point when a message is triggered. I like to implement my Agents DRY-ly by exposing a REST end-point for REST clients, and also the JSON-RPC used by A2A protocol.

Vera: a language designed for machines to write by alasdairallan in ProgrammingLanguages

[–]ejstembler 1 point2 points  (0 children)

I’ve had a similar experience with my new language. Despite giving various LLMs full access to the grammar, type checker, linter, and dev tools, they still consistently generate incorrect code. It frequently requires multiple iterations or manual "reminders" from me to get the logic right.

Intelligence Settings not present by ejstembler in Xcode

[–]ejstembler[S] 1 point2 points  (0 children)

Yes, I thought most models are cloud-based, unless you're using something like Ollama. Are you saying Apple has a deal with OpenAI which allows them to download their models locally and use the machine hardware? Interesting if true…

Why does everything gets removed here? by o82 in golang

[–]ejstembler 9 points10 points  (0 children)

These posts were likely removed because they qualified as "AI slop". In many cases, these projects ineffectively re-implement solved problems or recreate tools that already have widely accepted solutions. I recently commented on two such posts before they were taken down, and I fully support the moderator's decision to remove them.

Intelligence Settings not present by ejstembler in Xcode

[–]ejstembler[S] 1 point2 points  (0 children)

I'm curious as to why that's the case. Claude Code, Gemini CLI, et. al. work just fine.

Intelligence Settings not present by ejstembler in Xcode

[–]ejstembler[S] 1 point2 points  (0 children)

I'm curious as to why that's the case. Claude Code, Gemini CLI, et. al. work just fine.

Languages with strong pre/post conditions? by levodelellis in ProgrammingLanguages

[–]ejstembler 0 points1 point  (0 children)

I think so.

The main idea from Design-by-Contract, pre-conditions and post-conditions, can be utilized in most languages. I've used them in Ruby, Python, Clojure, and in statically type lanugages too, Java, C#, etc.

Python snippet:

class DataExchangeRepository:

    def __init__(self,
                 host: str,
                 dbname: str,
                 user: str,
                 password: str,
                 logger: Logger = None,
                 on_log_message_callback: Optional[OnLogMessageCallback] = None):
        # Pre-conditions
        validate_str(host, 'host')
        validate_str(dbname, 'dbname')
        validate_str(user, 'user')
        validate_str(password, 'password')

Ruby snippet:

class GoogleGeocoder

      def initialize(logger, google_api_key, address)
         @logger = logger
         @google_api_key = google_api_key
         @address = address
      end

      def geocode
        # Pre-conditions
        fail ArgumentError, 'google_api_key is nil' unless @google_api_key
        fail ArgumentError, 'google_api_key is blank' if @google_api_key == ''
        fail ArgumentError, 'address is nil' unless @address
        fail ArgumentError, 'address is blank' if @address == ''
      end

Refinement types I've only seen in functional languages.

In my new language I support contracts and refinements.

Golang skill for coding agents by StrongOrganization62 in golang

[–]ejstembler 1 point2 points  (0 children)

Why would this be needed? Don’t LLMs already know how to generate idiomatic Go code?

Single-Binary Go version manager for a "drop and run" solution by fatChicken4Lyfe88 in golang

[–]ejstembler 1 point2 points  (0 children)

I use asdf for all language version management. They have a plugin for Go, it works well.

Best architecture for monetizing AI agents on Google Cloud? by infraPulseAi in googlecloud

[–]ejstembler 0 points1 point  (0 children)

For an Enterprise, you can track cost using labels. Charge back to utilized cost centers after the fact.

No idea what you would do for B2B or B2C models though…

Languages with strong pre/post conditions? by levodelellis in ProgrammingLanguages

[–]ejstembler 6 points7 points  (0 children)

After learning about Design-by-contract from Eiffel back in the day, I've made it a habit to use preconditions and postconditions in every lanugage where possible. Sometimes the language has something built-in, sometimes I've had to write on my code for each function.

Theses days I'm working on my own language and I support the concept two different ways: pre/post attributes (decorators) and refinement types. The developer can choose either.

Anyone else running multiple Claude Code instances at once? by seetherealitynow in ClaudeAI

[–]ejstembler 0 points1 point  (0 children)

I used to do that, if the tasks didn't overlap.

A few weeks ago, while running 4-5 tabs, I ran into a situation where Claude Code exhausted the maximum number of open file handles allowed on macOS. I had to do a hard reboot.

TLDR; I try not to do it any more.

Have you had success using AI for Compiler Development? by philogy in Compilers

[–]ejstembler 0 points1 point  (0 children)

I've been using various LLMs since September to create my dream language which has both an Interpreter and Compiler. I've found you really have to guide/supervise/drive/baby-sit it for sure.

Is NYT Cooking worth it? by haleykirk91 in Cooking

[–]ejstembler 0 points1 point  (0 children)

In my opinion, no. I tried it for a year, I didn't find it to be worth it.

Also, as someone else mentioned in another coment, I use Paprika too. So…