Reddit Programming – Telegram
Reddit Programming
212 subscribers
1.22K photos
125K links
I will send you newest post from subreddit /r/programming
Download Telegram
C# vs Java int: Primitive type semantics, runtime behavior, and tribal knowledge
https://www.reddit.com/r/programming/comments/1mrbeuz/c_vs_java_int_primitive_type_semantics_runtime/

<!-- SC_OFF -->How a debate over C# vs Java int and specs led to the Lₐₓ/Lₐₜ/R (LAX/LAT/R) taxonomy: a framework for type classification. <!-- SC_ON --> submitted by /u/_msiyer_ (https://www.reddit.com/user/_msiyer_)
[link] (https://msiyer.com/csharp-vs-java-int-primitive-type-semantics-runtime-behavior-and-tribal-knowledge/) [comments] (https://www.reddit.com/r/programming/comments/1mrbeuz/c_vs_java_int_primitive_type_semantics_runtime/)
Branch prediction: Why CPUs can't wait? - namvdo's blog
https://www.reddit.com/r/programming/comments/1mrjr1m/branch_prediction_why_cpus_cant_wait_namvdos_blog/

<!-- SC_OFF -->Recently, I’ve learned about a feature that makes the CPU work more efficiently, and knowing it can make our code more performant. The technique called “branch prediction” is available in modern CPUs, and it’s why your “if” statement might secretly slow down your code. I tested 2 identical algorithms -- same logic, same data, but one ran 60% faster by just changing the data order. Data organization matters; let's learn more about this in this blog post! <!-- SC_ON --> submitted by /u/vannam0511 (https://www.reddit.com/user/vannam0511)
[link] (https://namvdo.ai/cpu-branch-prediction/) [comments] (https://www.reddit.com/r/programming/comments/1mrjr1m/branch_prediction_why_cpus_cant_wait_namvdos_blog/)
Experimenting with Dyad (self-hosted coding assistant) using Gemini + Ollama 3
https://www.reddit.com/r/programming/comments/1mrqlc0/experimenting_with_dyad_selfhosted_coding/

<!-- SC_OFF -->I recently tested out Dyad, a self-hosted, open-source coding assistant. It can connect to external models like Google Gemini, but it also supports local inference through tools like Ollama 3. I documented the whole setup (Linux) and then pushed it through a series of programming challenges to see how practical vibecoding actually is: generating a static website building a Kahoot-style clone and even rebuilding one of my own projects (an animated 3D map in Three.js) For comparison, I ran Dyad both with Gemini (cloud) and Ollama 3 locally on my PC. The local run was slower and more limited, but still surprisingly capable for certain tasks. Curious if anyone else has experimented with self-hosted coding assistants. Did you find them practical for real projects, or more of a novelty at this stage? <!-- SC_ON --> submitted by /u/OnlyDemor (https://www.reddit.com/user/OnlyDemor)
[link] (https://youtu.be/rhnhtzhDqV4) [comments] (https://www.reddit.com/r/programming/comments/1mrqlc0/experimenting_with_dyad_selfhosted_coding/)
New Search Algorithm 1.4x faster than binary (SIBS)
https://www.reddit.com/r/programming/comments/1ms4pqr/new_search_algorithm_14x_faster_than_binary_sibs/

<!-- SC_OFF -->Developed Stochastic Interval Binary Search using multi-armed bandits - achieved iteration reduction in 25/25 test cases up to 10M elements. <!-- SC_ON --> submitted by /u/Charming-Falcon6276 (https://www.reddit.com/user/Charming-Falcon6276)
[link] (https://github.com/Genius740Code/SIBS) [comments] (https://www.reddit.com/r/programming/comments/1ms4pqr/new_search_algorithm_14x_faster_than_binary_sibs/)
A case for fleeting websites with agentic coding
https://www.reddit.com/r/programming/comments/1msbcjn/a_case_for_fleeting_websites_with_agentic_coding/

<!-- SC_OFF -->AI isn't all doom & gloom - it can genuinely bring joy too! Without agentic coding, I would never have had found the time to develop this silly little fan page I made! And it actually made some people happy - how great is that Sure in the end only a couple hundred people checked it out, but that was well worth the effort I had to put into it. I will gladly use agentic coding for other temporary websites again! <!-- SC_ON --> submitted by /u/avataw (https://www.reddit.com/user/avataw)
[link] (https://andrewru.com/posts/agent-mode-for-fun) [comments] (https://www.reddit.com/r/programming/comments/1msbcjn/a_case_for_fleeting_websites_with_agentic_coding/)
moonfish: a ~2000 Elo python chess engine
https://www.reddit.com/r/programming/comments/1msic8l/moonfish_a_2000_elo_python_chess_engine/

<!-- SC_OFF -->Moonfish is a chess engine I developed in Python a few years ago to understand how engines work under the hood. The code favors simplicity and readability over performance optimization. The engine implements: Negamax Layer-based Parallelization: Distributes work at specific search depths (L1P, L2P algorithms) Lazy SMP Move Ordering: MVV-LVA (Most Valuable Victim - Least Valuable Attacker) Null Move Pruning PeSTO Evaluation Function with Tapered Evaluation UCI protocol Integrates with lichess bot platform Web API Uses Cerebellum as opening book Endgame tablebases support Distributed via PyPI (https://pypi.org/project/moonfish/), you can access the engine from your custom python code, check the README (https://github.com/luccabb/moonfish/tree/master?tab=readme-ov-file#installation-and-usage) Bratko-Kopec test suite Custom test suite to ensure basic functionality. Not sure how much ELO it tests for, but if these tests are passing it your custom engine search implementation is likely not super off. If it does fail then your search algorithm _likely_ has a problem You can control how the engine behaves via CLI arguments, `moonfish --help` to check all options. On Performance: ~2000 Elo when tested against lichess stockfish bots. it beats stockfish lvl 5 ~2000 Elo (https://lichess.org/forum/general-chess-discussion/what-are-the-elo-ratings-for-stockfish-levels-4-5-6-7-and-8#8). mostly loses to stockfish lvl 6 ~2300 Elo (https://lichess.org/forum/general-chess-discussion/what-are-the-elo-ratings-for-stockfish-levels-4-5-6-7-and-8#8). When testing online on lichess against other engines it performs at ~1700 Elo The above is when running on a Macbook M1 Pro, this will vary based on hardware and parameters passed to the engine. No time control implemented—deeper searches take proportionally longer For a list of resources and inspirations that helped shape Moonfish, check out the references (https://github.com/luccabb/moonfish?tab=readme-ov-file#references) in the repository. <!-- SC_ON --> submitted by /u/luccabz (https://www.reddit.com/user/luccabz)
[link] (https://github.com/luccabb/moonfish) [comments] (https://www.reddit.com/r/programming/comments/1msic8l/moonfish_a_2000_elo_python_chess_engine/)
API Live Sync #4: OpenAI Fetcher
https://www.reddit.com/r/programming/comments/1msmgqq/api_live_sync_4_openai_fetcher/

<!-- SC_OFF -->In our previous articles, we laid the foundation with architecture, data structures, and the core service layer. Now it's time to tackle one of the most challenging parts of live API synchronization: actually fetching those OpenAPI specifications from development servers. <!-- SC_ON --> submitted by /u/evilhighlord (https://www.reddit.com/user/evilhighlord)
[link] (https://creative-labs.hashnode.dev/api-live-sync-4-openai-fetcher) [comments] (https://www.reddit.com/r/programming/comments/1msmgqq/api_live_sync_4_openai_fetcher/)