Better HN
topnewbestaskshowjobs
Log inSign up

alexrustic

8,387 karma · joined Jul 23, 2020 (6y ago) · 1,044 submissions

Hello World, I'm Alex, a tech enthusiast !

Check out two of my latest projects:

- Asyncpal - Preemptive concurrency and parallelism for sporadic workloads: https://news.ycombinator.com/item?id=41404020

- Jinbase - Multi-model transactional embedded database: https://news.ycombinator.com/item?id=42276813

Get in touch with me:

  a=" dot "; b="alex"; c="com"; d=" at "; e="rustic"; f="yahoo"; print(e+b+d+f+a+c)
Submissions

1.

What Does One Billion Dollars Look Like?(whatdoesonebilliondollarslooklike.website ↗)

78 points · by alexrustic · 1y ago · 94 comments

2.

Knowing better, doing worse: the science behind self-sabotaging behaviour(unsw.edu.au ↗)

3 points · by alexrustic · 1y ago · discuss

3.

Missing link to 'blobs' deep within Earth(theconversation.com ↗)

7 points · by alexrustic · 1y ago · discuss

4.

Malware in DNS(dti.domaintools.com ↗)

4 points · by alexrustic · 1y ago · 1 comment

5.

China's Baidu to bring its driverless cars to Uber globally(cnbc.com ↗)

1 points · by alexrustic · 1y ago · discuss

6.

Order Within Chaos in Double Pendulum (Island of Stability Simulation) [video](youtube.com ↗)

2 points · by alexrustic · 1y ago · discuss

7.

Duck.ai Privacy Policy(old.reddit.com ↗)

3 points · by alexrustic · 1y ago · discuss

8.

Photo Finish Explained [video](youtube.com ↗)

1 points · by alexrustic · 1y ago · discuss

9.

Clever Custom Software Used to Reconstruct First Recorded Sounds (2010)(theatlantic.com ↗)

1 points · by alexrustic · 1y ago · discuss

10.

Amazon Introduces SWE-PolyBench, a Multilingual Benchmark for AI Coding Agents(aws.amazon.com ↗)

3 points · by alexrustic · 1y ago · discuss

11.

Napster pioneered music sharing over 25 years ago. It just got bought for $207M(cnbc.com ↗)

11 points · by alexrustic · 1y ago · 4 comments

12.

Blake Scholl Built the First Independent Supersonic Jet [video](youtube.com ↗)

1 points · by alexrustic · 1y ago · discuss

13.

Open source AI: Red Hat's point-of-view(redhat.com ↗)

70 points · by alexrustic · 1y ago · 64 comments

14.

Working with The Associated Press to provide fresh results for the Gemini app(blog.google ↗)

87 points · by alexrustic · 1y ago · 64 comments

15.

US Cyber Trust Mark launches as the Energy Star of smart home security(theverge.com ↗)

1 points · by alexrustic · 1y ago · discuss

16.

An LLM is just a processor [video](youtube.com ↗)

2 points · by alexrustic · 1y ago · discuss

17.

Epic Games' app store will be preinstalled on Android phones(engadget.com ↗)

6 points · by alexrustic · 1y ago · discuss

18.

Tim Cook Wants Apple to Save Your Life(wired.com ↗)

3 points · by alexrustic · 1y ago · 1 comment

comment 1y ago · link · parent

Jinbase is designed to be thread-safe, ensuring it can be reliably used in a multithreaded context.

To interact with SQLite, Jinbase uses LiteDBC [1] an SQL interface compliant with the DB-API 2.0 specification described by PEP 249 [2], itself wrapping Python's sqlite3 [3] module for a more intuitive interface and multithreading support by default. I wrote for LiteDBC a stress test [4] involving concurrency with Asyncpal [5].

[1] https://github.com/pyrustic/litedbc

[2] https://peps.python.org/pep-0249/

[3] https://docs.python.org/3/library/sqlite3.html

[4] https://github.com/pyrustic/litedbc/blob/master/tests/test_s...

[5] https://news.ycombinator.com/item?id=41404020

comment 1y ago · link · parent

Thank you for your comment ! Indeed, for wide adoption across languages, we will need to port at least Paradict as that is the format in which BLOBs are serialized.

Protobuf relies heavily on predefined schemas and this rigidity goes against the flexibility of Jinbase's schema-less philosophy.

MessagePack (or CBOR) seems more convincing but Paradict has some subtleties that I don't find there. For example, Paradict preserves UTC offsets [1], handles integer bases, allowing for the representation of integers in decimal, binary, octal, and hexadecimal formats, has an extension mechanism that I find more interesting, etc.

Soon I will be adding a command line interface to Jinbase. From the CLI one will be able to read and write any type of data and this will only be possible because Paradict has a twin text format. MessagePack, from what I know, started with 1:1 compatibility with JSON and then over time it added things that are not present in JSON, thus breaking the 1:1 compatibility with JSON.

If I understand Peter Naur's take on programming [2] correctly, Jinbase is a software idea that I'm trying to implement (bring to life) one iteration at a time, and for that I need to have some level of control over the components (like the serialization format) so that I can adjust things accordingly. For example, the Paradict binary format is originally intended to serialize and deserialize only dictionaries (P...dict), but I changed that detail so that Jinbase users can freely store other things than dictionaries.

Once the core idea is fully implemented, we will see how to reproduce it elsewhere, one contribution/compilation after another...

[1] https://codeblog.jonskeet.uk/2019/03/27/storing-utc-is-not-a...

[2] https://news.ycombinator.com/item?id=26027448

21.

Show HN: Jinbase – Multi-model transactional embedded database(github.com ↗)

48 points · by alexrustic · 1y ago · 4 comments

22.

WWDC17: Essential Design Principles – Apple [video](youtube.com ↗)

1 points · by alexrustic · 2y ago · discuss

23.

Xavier Niel, a Driving Force of French AI, Is Now Shaping TikTok(wired.com ↗)

2 points · by alexrustic · 2y ago · discuss

24.

Windows App now available on all major platforms(techcommunity.microsoft.com ↗)

37 points · by alexrustic · 2y ago · 43 comments

25.

Kaspersky offloads U.S. antivirus customers to Pango Group(axios.com ↗)

5 points · by alexrustic · 2y ago · discuss

comment 2y ago · link · parent

If I understand correctly, goroutines = asyncio (non-invasive) + asyncio.to_thread (when needed, but automatic). So, it is still cooperative concurrency that feels preemptive due to its design. This Go capability is interesting, and it 'seems' that it cannot be replicated without some integration with the runtime of the target language, i.e., a 'baked-in solution'. For now, I'm fine with true preemptive concurrency, but this might change in the future.

comment 2y ago · link · parent

Thank you !

comment 2y ago · link · parent

Thanks for your comment !

When you are doing parallelism, don't forget to protect the 'entry point' of the program by using "if __name__ == '__main__'", and also avoid the __main__.py file [1]

  # this file isn't `__main__.py` !
  from asyncpal import ProcessPool

  def square(x):
      return x**2

  if __name__ == "__main__":  # very important !
      with ProcessPool(4) as pool:
          numbers = range(1000)
          # note that 'map_all' isn't lazy
          iterator = pool.map(square, numbers)  # map is lazy
          result = tuple(iterator)
          assert result == tuple(map(square, numbers))

[1] https://discuss.python.org/t/why-does-multiprocessing-not-wo...
12345
35