
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
github.com/tmc/bubbweb
BubbWeb is a library for running Bubbletea terminal user interfaces in WebAssembly.
Check out the live demo to see BubbWeb in action.
import (
tea "github.com/charmbracelet/bubbletea"
"github.com/tmc/bubbweb"
)
func main() {
// Create your BubbleTea model as usual
model := yourModel()
// Use bubbweb to run the program in WebAssembly
prog := bubbweb.NewProgram(model, tea.WithAltScreen())
if _, err := prog.Run(); err != nil {
// Handle error
}
}
# Build everything with go generate
go generate
# For local testing with auto-reload
cd example
go run github.com/tmc/serve@latest # or any other HTTP server
Then open http://localhost:8080 in your browser.
See the example
directory for a complete example including:
This project can be easily deployed on GitHub Pages:
example
directory to your GitHub repositoryexample
directory/
or /example
depending on your repository structureYour Bubbletea WebAssembly application will be available at https://[username].github.io/[repository]/example
BubbWeb handles several challenges of running Bubbletea in WebAssembly:
bubbletea_write
: Sends input from JavaScript to the Go programbubbletea_read
: Reads output from the Go programbubbletea_resize
: Sends terminal resize events to the Go programbubbletea_mouse
: Sends mouse events to the Go programMouse events are translated from browser events to BubbleTea's mouse event system:
case tea.MouseMsg:
switch msg.Type {
case tea.MousePress:
// Handle mouse press at (msg.X, msg.Y)
case tea.MouseRelease:
// Handle mouse release
case tea.MouseMotion:
// Handle mouse movement
case tea.MouseWheelUp, tea.MouseWheelDown:
// Handle scrolling
}
}
The coordinates are automatically converted from pixel coordinates to terminal cell coordinates.
MIT
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.