Do It by Code
54 subscribers
710 photos
99 videos
14 files
1.24K links
We uhhhhh... do things by coding them.
Download Telegram
Collection of one-file C/C++ libraries with no dependencies, primarily for games
Article, Comments

#c #cpp
what I could get done in Go in less than 2 hours, is taking me longer than 4 hours just to find proper libraries to do it in Cuda
Fixed size 256-bit math library for Golang

This is a library specialized at replacing the big.Int library for math based on 256-bit types, used by both go-ethereum and erigon.

https://github.com/holiman/uint256
#go
The leptos web framework
Leptos is a full-stack, isomorphic Rust web framework leveraging fine-grained reactivity to build declarative user interfaces.

- Full-stack: Leptos can be used to build apps that run in the browser (client-side rendering), on the server (server-side rendering), or by rendering HTML on the server and then adding interactivity in the browser (server-side rendering with hydration). This includes support for HTTP streaming of both data (Resources) and HTML (out-of-order or in-order streaming of <Suspense/> components.)

- Isomorphic: Leptos provides primitives to write isomorphic server functions, i.e., functions that can be called with the “same shape” on the client or server, but only run on the server. This means you can write your server-only logic (database requests, authentication etc.) alongside the client-side components that will consume it, and call server functions as if they were running in the browser, without needing to create and maintain a separate REST or other API.

- Web: Leptos is built on the Web platform and Web standards. The router is designed to use Web fundamentals (like links and forms) and build on top of them rather than trying to replace them.

- Framework: Leptos provides most of what you need to build a modern web app: a reactive system, templating library, and a router that works on both the server and client side.

- Fine-grained reactivity: The entire framework is built from reactive primitives. This allows for extremely performant code with minimal overhead: when a reactive signal’s value changes, it can update a single text node, toggle a single class, or remove an element from the DOM without any other code running. (So, no virtual DOM overhead!)

- Declarative: Tell Leptos how you want the page to look, and let the framework tell the browser how to do it.


- GitHub: leptos-rs/leptos
- Picture's source
- Examples
- API Docs

#rust
Dioxus

Fullstack app framework for web, desktop, mobile, and more.

- Cross-platform apps in three lines of code (web, desktop, mobile, server, and more)
- Ergonomic state management combines the best of React, Solid, and Svelte
- Type-safe Routing and server functions to leverage Rust's powerful compile-time guarantees
- Integrated bundler for deploying to the web, macOS, Linux, and Windows


- GitHub: dioxuslabs/dioxus
- Docs: https://dioxuslabs.com/

#rust #native
Prompt-To-Agent : Create custom engineering agents for your codebase

Potpie is an open-source platform that creates AI agents specialized in your codebase, enabling automated code analysis, testing, and development tasks. By building a comprehensive knowledge graph of your code, Potpie's agents can understand complex relationships and assist with everything from debugging to feature development.


https://github.com/potpie-ai/potpie
https://potpie.ai/
This assembly code has a segfault, if you can, fix it please:

section .text
global _start

_start:
mov rax, 0x00752076756c2069
push rax
mov rsi, rsp
mov rdx, 0x7
mov rdi, 0x1
mov rax, 0x1
syscall


(those who fix it, don't send the correct code here or what it does, so it doesn't bcome a spoiler)

also happy 14th Feb to whoever celebrating it I guess
This media is not supported in your browser
VIEW IN TELEGRAM
Introducing Deep Research on Perplexity.

Deep Research lets you generate in-depth research reports on any topic.

Available to everyone for free—up to 5 queries per day for non-subscribers and 500 queries per day for premium users.
https://vxtwitter.com/perplexity_ai/status/1890452005472055673
13ft
https://github.com/wasi-master/13ft

This is a simple self hosted server that has a simple but powerful interface to block ads, paywalls, and other nonsense. Specially for sites like medium, new york times which have paid articles that you normally cannot read. Now I do want you to support the creators you benefit from but if you just wanna see one single article and move on with your day then this might be helpful.


How does it work?
It pretends to be GoogleBot (Google's web crawler) and gets the same content that google will get. Google gets the whole page so that the content of the article can be indexed properly and this takes advantage of that.


#paywall #python #selfhost
Do It by Code
This assembly code has a segfault, if you can, fix it please: section .text global _start _start: mov rax, 0x00752076756c2069 push rax mov rsi, rsp mov rdx, 0x7 mov rdi, 0x1 mov rax, 0x1 syscall (those who fix it, don't send…
The issue:
lack of explicit exit.
when the process is getting terminated, you are going to get segfault, because the code does not terminate its execution, so the CPU just continues execution past the program itself.

Possible fixed:
adding these at the end of _start routine:
first solution:
mov rax, 60
xor rdi, rdi
syscall


or:
second solution:
mov rax, 60
mov rdi, 0
syscall

==========================
can anyone say what is the difference between these two solutions?
1
Valve somehow announced TF2 SDK for better mods + a lot of sources (for non-commercial use)!

Article, Comments
SageMath

SageMath is a free open-source mathematics software system licensed under the GPL. It builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. Access their combined power through a common, Python-based language or directly via interfaces or wrappers.
Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.


- GitHub repo
- Official tutorial
- some algebra examples
Mouse Adventures Series

An attempt to write a cross-platform tool that can manipulate "Tecknet Hypertrak Gaming Mouse" configurations without having to use the awful Windows-only tool it's shipped with.


- Introduction
- Extracting the Firmware
- Writing a Disassembler
- Writing a custom tool
- Dumping and Parsing the USB Descriptors
- Enabling the Bootloader
- Writing an IDA Processor Module
- Dissecting the USB Code and Unbricking the Mouse

#Hardware #ReverseEngineering