Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: functions Clear Filter

Spectrum – catching clojure.spec conform errors at compile time

spectrum A library for doing static analysis of Clojure code, catching clojure.spec conform errors at compile time. Wait what? It's like core.typed, but it relies on clojure.spec annotations. So it's an optional static type system? Kind-of. It finds errors at compile time, and predicates kind of look like types. So sure. Current Status Developer Preview, not yet ready for any kind of use. Current development is working towards making spectrum self-check. Goals usable pragmatic readab

The Lobster Programming Language

The Lobster Programming Language Lobster is a programming language that tries to combine the advantages of static typing and compile-time memory management with a very lightweight, friendly and terse syntax, by doing most of the heavy lifting for you. While it is a general purpose language, its current implementation is biased towards games and other graphical things, with plenty of “batteries included” functionality. Lobster is Open Source (Apache v2 license) and can be found on github. Onli

Show HN: I was curious about spherical helix, ended up making this visualization

Trying to understand how to move objects in 3D space MOVING OBJECTS IN 3D SPACE tap/click the right side of the screen to go forward → Have you ever wondered how to move objects along a spherical helix path? Okay… probably not, right? But one morning, this question popped into my head. It stuck with me long enough that I ended up diving into a few articles about it. From there, it spiraled into lots of explorations, trying to figure out how to move objects in 3D space. From a simple circ

Placing Functions

placing functions — 2025-07-08 What are placing functions? About a year ago I observed that in-place construction seems surprisingly simple. By separating the creating of the place in memory from writing the value to memory, it’s not that hard to see how we can turn that into a language feature. So about six months ago, that’s what I went ahead and did and created the placing crate: a proc-macro-based prototype for “placing functions”. Placing functions are functions whose return type is con

Show HN: MCP server for up-to-date Zig standard library documentation

Zig Docs MCP Model Context Protocol (MCP) server that provides up-to-date documentation for the Zig programming language standard library and builtin functions. It uses the same approach as Zig's official autodoc (ziglang.org) by reading STD lib source files directly through a WASM module. However instead of returning HTML, it outputs Markdown which significantly reduces token usage. Tip Add use zigdocs to your prompt if you want to explicitly instruct the LLM to use Zig docs tools. Otherwise

Superfunctions: A universal solution against sync/async fragmentation in Python

This library is designed to solve one of the most important problems in python programming - dividing all written code into 2 camps: sync and async. We get rid of code duplication by using templates. Table of contents Quick start Install it: pip install transfunctions And use: from asyncio import run from transfunctions import ( transfunction , sync_context , async_context , generator_context , ) @ transfunction def template (): print ( 'so, ' , end = '' ) with sync_context : print ( "it's

What's the difference between named functions and arrow functions in JavaScript?

Arrow functions (also known as ‘rocket’ functions) are concise and convenient. However, they have subtle differences compared to function declarations and function expressions. So how do you know which one to use, and when? Function declarations and function statements We have (at least) three ways of creating functions in JavaScript. The first is the function declaration. This binds a function to a given name. It looks something like this:1 1 I’ve used String.toLowercase() here, partly for b

Asynchronous Error Handling Is Hard

(Ed. note: This article was originally published on The CUDA Handbook blog on November 2, 2023.) Every API designer has struggled with the question of how best to propagate errors to their callers, since before the term “API” was invented. Even decades ago (say 30+ years), interface designers knew to separate the error return from the payload, in functions that return other results to their caller. Since it is sometimes useful to know what not to do: My favorite example of an antipattern in th

Bloom Filters by Example

Bloom Filters by Example A Bloom filter is a data structure designed to tell you, rapidly and memory-efficiently, whether an element is present in a set. The price paid for this efficiency is that a Bloom filter is a probabilistic data structure: it tells us that the element either definitely is not in the set or may be in the set. The base data structure of a Bloom filter is a Bit Vector. Here's a small one we'll use to demonstrate: Each empty cell in that table represents a bit, and the nu

Primitive Kolmogorov complexity is computable

/ 5 min read This post is mostly AI generated, of course with significant guidance, feedback, iteration and some edits from me. There was little for me to gain writing this myself, but I felt it needed to be written down regardless. Kolmogorov complexity and Solomonoff's theory of inductive inference offer formal, theoretical solutions to measuring complexity and forming predictions. However, both are uncomputable, a fact that is often treated as having significant implications in computabilit

Minimal Boolean Formulas (2011)

Minimal Boolean Formulas Posted on Wednesday, May 18, 2011. 28. That's the minimum number of AND or OR operators you need in order to write any Boolean function of five variables. Alex Healy and I computed that in April 2010. Until then, I believe no one had ever known that little fact. This post describes how we computed it and how we almost got scooped by Knuth's Volume 4A which considers the problem for AND, OR, and XOR. A Naive Brute Force Approach Any Boolean function of two variables ca

Minimal Boolean Formulas

Minimal Boolean Formulas Posted on Wednesday, May 18, 2011. 28. That's the minimum number of AND or OR operators you need in order to write any Boolean function of five variables. Alex Healy and I computed that in April 2010. Until then, I believe no one had ever known that little fact. This post describes how we computed it and how we almost got scooped by Knuth's Volume 4A which considers the problem for AND, OR, and XOR. A Naive Brute Force Approach Any Boolean function of two variables ca