frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
20•momciloo•3h ago•2 comments

Show HN: Kappal – CLI to Run Docker Compose YML on Kubernetes for Local Dev

https://github.com/sandys/kappal
26•sandGorgon•2d ago•14 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
282•isitcontent•23h ago•38 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
353•eljojo•1d ago•216 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
367•vecti•1d ago•169 comments

Show HN: I built a <400ms latency voice agent that runs on a 4gb vram GTX 1650"

https://github.com/pheonix-delta/axiom-voice-agent
2•shubham-coder•2h ago•1 comments

Show HN: Stacky – certain block game clone

https://www.susmel.com/stacky/
3•Keyframe•3h ago•0 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
95•antves•2d ago•70 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
84•phreda4•22h ago•16 comments

Show HN: A toy compiler I built in high school (runs in browser)

https://vire-lang.web.app
3•xeouz•3h ago•1 comments

Show HN: BioTradingArena – Benchmark for LLMs to predict biotech stock movements

https://www.biotradingarena.com/hn
29•dchu17•1d ago•12 comments

Show HN: Artifact Keeper – Open-Source Artifactory/Nexus Alternative in Rust

https://github.com/artifact-keeper
154•bsgeraci•1d ago•64 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
53•nwparker•1d ago•12 comments

Show HN: Nginx-defender – realtime abuse blocking for Nginx

https://github.com/Anipaleja/nginx-defender
3•anipaleja•5h ago•0 comments

Show HN: ARM64 Android Dev Kit

https://github.com/denuoweb/ARM64-ADK
18•denuoweb•2d ago•2 comments

Show HN: Gigacode – Use OpenCode's UI with Claude Code/Codex/Amp

https://github.com/rivet-dev/sandbox-agent/tree/main/gigacode
22•NathanFlurry•1d ago•10 comments

Show HN: MCP App to play backgammon with your LLM

https://github.com/sam-mfb/backgammon-mcp
3•sam256•7h ago•1 comments

Show HN: I'm 75, building an OSS Virtual Protest Protocol for digital activism

https://github.com/voice-of-japan/Virtual-Protest-Protocol/blob/main/README.md
7•sakanakana00•8h ago•1 comments

Show HN: I built Divvy to split restaurant bills from a photo

https://divvyai.app/
3•pieterdy•8h ago•1 comments

Show HN: Which chef knife steels are good? Data from 540 Reddit tread

https://new.knife.day/blog/reddit-steel-sentiment-analysis
2•p-s-v•3h ago•0 comments

Show HN: Micropolis/SimCity Clone in Emacs Lisp

https://github.com/vkazanov/elcity
173•vkazanov•2d ago•49 comments

Show HN: Horizons – OSS agent execution engine

https://github.com/synth-laboratories/Horizons
27•JoshPurtell•1d ago•5 comments

Show HN: I Hacked My Family's Meal Planning with an App

https://mealjar.app
2•melvinzammit•10h ago•0 comments

Show HN: Daily-updated database of malicious browser extensions

https://github.com/toborrm9/malicious_extension_sentry
14•toborrm9•1d ago•8 comments

Show HN: Slop News – HN front page now, but it's all slop

https://dosaygo-studio.github.io/hn-front-page-2035/slop-news
21•keepamovin•13h ago•6 comments

Show HN: I built a free UCP checker – see if AI agents can find your store

https://ucphub.ai/ucp-store-check/
2•vladeta•11h ago•2 comments

Show HN: Falcon's Eye (isometric NetHack) running in the browser via WebAssembly

https://rahuljaguste.github.io/Nethack_Falcons_Eye/
7•rahuljaguste•22h ago•1 comments

Show HN: XAPIs.dev – Twitter API Alternative at 90% Lower Cost

https://xapis.dev
3•nmfccodes•5h ago•2 comments

Show HN: Compile-Time Vibe Coding

https://github.com/Michael-JB/vibecode
10•michaelchicory•12h ago•3 comments

Show HN: Local task classifier and dispatcher on RTX 3080

https://github.com/resilientworkflowsentinel/resilient-workflow-sentinel
25•Shubham_Amb•1d ago•2 comments
Open in hackernews

Show HN: Moon Phase Algorithms for C, Lua, Awk, JavaScript, etc.

https://github.com/oliverkwebb/moonphase
72•oliverkwebb•8mo ago

Comments

ericpruitt•8mo ago
I adapted the same moonphase logic for the status line program I use with dwm. Did you run into any discrepancies with using January 0 vs December 31st? Some of the translations of Walker's as noted in my comment at https://github.com/ericpruitt/emus/blob/ea059239845ee6d57614... seem to produce differing results.
oliverkwebb•8mo ago
This discrepancy with time is explained in the book the algorithm is based on (Practical Astronomy with Your Calculator, which also does a good job explaining a ton of other ideas and models in astronomical calculation).

January 0th makes sense because a year starts on January 1st. You count days of the year from 1 instead of from 0. So if we are going by the day of the year, day 1 of the year should be Jan1, the consequence of this being that Jan0 exists and is Dec31 of the prev year.

I originally got into this because of my status bar on i3, hacking together C code from moontool into https://github.com/oliverkwebb/moontool about a year back.

hulitu•8mo ago
> January 0th makes sense because a year starts on January 1st. You count days of the year from 1 instead of from 0. So if we are going by the day of the year, day 1 of the year should be Jan1, the consequence of this being that Jan0 exists and is Dec31 of the prev year.

That's how bugs get introduced. /s

rybosome•8mo ago
Fun! From the repo[0]:

> Your function must be self-contained, such that someone could copy-paste it into their code and not get an error. It also must not effect the environment outside it if at all possible (no #define or mutating globals). It must be as "pure" and self-contained as the language will allow.

This is an interesting restriction, actually, with respect to style. The “natural” way I would program such an algorithm certainly doesn’t adhere to this requirement.

Producing functions that are still correct, idiomatic and legible while producing minimal changes to environment or state requires a non-beginners understanding of the runtime nature of the language.

[0]: https://github.com/oliverkwebb/moonphase?tab=readme-ov-file#...

danparsonson•8mo ago
Could you elaborate on this? Maybe an example of what you mean?
oliverkwebb•8mo ago
This is also interesting for speed, The algorithms ran by all the impls are identical, but sacrificing speed for cleanliness and adherence to spirit is done regularly.

Without having actually measured, the rust impl probably runs faster than the C impl, but that's not because rust is "faster" than C. That's because I used a closure with one call to floor() for modulus in rust, whilst in C I did 2 fmod()'s to get it because the alternative would've been to make the code unreadable or add a second function/macro (although thinking about it now, undef does exist...)

blululu•8mo ago
This is really nice. My initial thought was "why just divide the time interval since the Unix Epoch by the synodic period of the moon". Turns out the moon's phase is a bit more complicated than that. https://en.wikipedia.org/wiki/Lunar_phase#Calculating_phase
madcaptenor•8mo ago
That said, this is basically what the Hebrew calendar does (although of course they use a much earlier epoch)
o11c•8mo ago
`pom(6)` from `bsdgames` might already be installed on your system to do this. Source comments indicate it was originally based on prior versions of the same book but updated to the Third Edition in 1998.

For "implement simple task in many languages" you should probably think of Rosetta Code, now at https://rosettacode.miraheze.org/wiki/Rosetta_Code

lifthrasiir•8mo ago
This code consistently converts angles to the [0, 360) range, which is IMO overkill. A better approach is to normalize everything to [0, 2) range so that you can simply multiply or divide by pi to get the radians. If your math library has `sinpi` or `cospi` it will be even more accurate, as it no longer has to divide by 2pi to do the actual calculation.
librasteve•8mo ago
made a PR for raku, hope it gets accepted

some cool things stood out:

  sub fixangle($a) { $a mod 360 }    # raku has built-in support for Euclidean modulo
  pi                                 # raku has pi
  
  # Solve equation of Kepler
  my $e = $M; 
  my $delta;

  repeat {                           # raku's repeat loop allows initialisation of delta to be folded in
    $delta = $e - $eccent * sin($e) - $M; 
    $e -= $delta / (1 - $eccent * cos($e));
  } while abs($delta) > 1e-6;
eddyg•8mo ago
Thanks! (I'm a big fan of Raku; it doesn't get nearly the respect it deserves!)
oliverkwebb•8mo ago
Thank you! I accepted it
librasteve•8mo ago
yay - it has made it to raku module status https://raku.land/zef:librasteve/Moonphase
anthk•8mo ago
AWK can be far more than a DSL.
kbr2000•8mo ago
LCAL[0]: The Moon Phase Calendar Program

A PostScript program to visualize a calendar of moon phases (skip down to "LCAL PostScript Calendar Examples" for just that). Did some nice PS prints recently for the next 10 years, adapted to fit in a frame I had laying around.

[0] https://pcal.sourceforge.net/