Hacker Newsnew | past | comments | ask | show | jobs | submit | daviducolo's commentslogin

Find your code mate. Discover new GitHub users you don't follow yet, matched by your stack and interests.


yes with "prev" keyword


Numla – A calculator notepad that understands natural language

A minimal, privacy-focused notepad for quick math, currency conversions, and everyday calculations. Just type naturally and get instant results.

Write “Rent: $1,200 + Utilities: $150” and type “sum” to get the total. Convert currencies with live rates (”$500 in EUR”), handle percentages naturally (“20% off $80”), do date math (“christmas - 30 days”), or convert units (“5 km to miles”).

Features include multi-tab support, spotlight search (⌘K), focus mode, per-note themes, and variables for reusable values. Everything runs locally in your browser—no accounts, no tracking, no server-side processing.

Built with JavaScript, fully responsive for mobile. MIT licensed.

https://numla.app


I have just released version 1.1.0 which should fix the problems reported by users.

https://github.com/davidesantangelo/krep/releases/tag/v1.1.0


Thank you for the report! Here’s what I changed:

1. Always use the raw bad_char_table[text[i + pattern_len‑1]] shift—no extra lowercase lookup at runtime. 2. After a full match, advance by that same table shift instead of just doing i++, so you never miss overlapping occurrences. 3. Removed the “if shift==0 then shift=1” guard—since we build the table excluding the last pattern byte, zero shifts can’t occur.

https://github.com/davidesantangelo/krep/releases/tag/v1.0.6


Looks better! A couple of other minor comments, since I'm looking at it:

1. You don't need to assign the last char of the pattern inside the search loop every time around the loop. It will never change (line 1143). Just do it once before the search loop starts.

2. tc_last is the text aligned with the end of the pattern window (line 1142). You don't need to get it again when getting the shift (lines 1201, 1208). bad char is the last char which you already have.


I have applied your suggestions. Thank you again.

https://github.com/davidesantangelo/krep/releases/tag/v1.1.1


No problem, hope it was useful.

I've found a lot of real world performance comes from doing as little as possible inside the main search loop.

UPDATE: It's often the case that a simpler algorithm outperforms a theoretically better one. For example, you are using Boyer Moore Horspool, which is the simpler cousin of the original Boyer Moore. BM can get better shifts than Horspool, but it's often slower in practice.


An implication of doing as little as possible in the loop is you could boost performance by creating variants of the search algorithm for different types of search. Then you won't incur the penalty or constantly testing "if it's this kind of search do this else do that" inside the search loop.


I reposted the project because I have released a new version fixing everything that users have encountered.


New modular API Highly performant Scroll-linked animations Draggables ↔ Responsive Additive animations WAAPI support

And so much more!


Use this bash script https://gist.github.com/davidesantangelo/ce7424e68b7d1e7903e... and paste the result into your favorite LLM with a simple prompt "write a git commit message markdown from this <result>"


This doesn't answer the crucial question of why the change you're committing is necessary.


Don’t waste people’s time on messages created from diffs.


thanks for your feedback, I've just added a FAQ section to README

https://github.com/davidesantangelo/vsort/commit/f77a8ea49e0...


VSort is a high-performance sorting library that leverages the unique architecture of Apple Silicon processors to deliver exceptional performance. By intelligently utilizing ARM NEON vector instructions, Grand Central Dispatch, and the heterogeneous core design of M-series chips, VSort achieves remarkable efficiency particularly for partially sorted data collections.

VSort represents an advanced sorting solution for Apple Silicon, combining ARM NEON, GCD, heterogeneous core management, and adaptive algorithms. Its performance is competitive, with significant improvements for partially sorted or large datasets, making it suitable for high-performance computing tasks on macOS.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: