Discussion
Loading...

#Tag

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp last week

It's Always the Process, Stupid

https://its.promp.td/its-always-the-process-stupid/

#HackerNews #Always #the #Process #Stupid #Process #Improvement #Continuous #Learning #Hacker #News #Innovation

  • Copy link
  • Flag this post
  • Block
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp last month

A Friendly Tour of Process Memory on Linux

https://www.0xkato.xyz/linux-process-memory/

#HackerNews #A #Friendly #Tour #of #Process #Memory #on #Linux #Linux #Process #Memory #Tour #Linux #Memory #Management #Process #Exploration #Hacker #News

0xkato

A Friendly Tour of Process Memory on Linux

A deep dive into how Linux manages process memory, page tables, and virtual address spaces
  • Copy link
  • Flag this post
  • Block
hamish campbell boosted
Hamish Campbell
@info@hamishcampbell.com  ·  activity timestamp 4 months ago

⁂ Article

Trust is the foundation of moderation in decentralised networks like the #OMN

In the world of decentralised, peer-to-peer, and federated networks, from the Fediverse to grassroots projects like the #OMN, moderation works differently. It’s not a matter of top-down control or terms-of-service written by #process lawyers. Instead, the basic unit of moderation is trust – and this shifts everything.

Yes, we need practical moderation tools – blocking, filtering, reporting, curation – the whole established toolkit. But more importantly, we need to root these tools in a tech […]

  • Copy link
  • Flag this article
  • Block
Hamish Campbell
@info@hamishcampbell.com  ·  activity timestamp 4 months ago

⁂ Article

Trust is the foundation of moderation in decentralised networks like the #OMN

In the world of decentralised, peer-to-peer, and federated networks, from the Fediverse to grassroots projects like the #OMN, moderation works differently. It’s not a matter of top-down control or terms-of-service written by #process lawyers. Instead, the basic unit of moderation is trust – and this shifts everything.

Yes, we need practical moderation tools – blocking, filtering, reporting, curation – the whole established toolkit. But more importantly, we need to root these tools in a tech […]

  • Copy link
  • Flag this article
  • Block
TOV
@textovervideo@fosstodon.org  ·  activity timestamp 7 months ago

If you want to work with audio files in Python, here are some helpful libraries.

#Pydub allows you to play, slice, concatenate and edit audio files effortlessly.

#SoundDevice allows you to play and record audio files.

#SoundFile allows you to read and write audio files in various formats.

#Librosa allpwsbyou to #analysis music and audio files.

#TorchAudio allows you to #process audio #signals with #PyTorch

An audio file represented as a waveform using Librose audio library in Python.
An audio file represented as a waveform using Librose audio library in Python.
An audio file represented as a waveform using Librose audio library in Python.
  • Copy link
  • Flag this post
  • Block
Felix Palmen :freebsd: :c64:
@zirias@mastodon.bsd.cafe  ·  activity timestamp 8 months ago

I finally eliminated the need for a dedicated #thread controlling the pam helper #process in #swad. 🥳

The building block that was still missing from #poser was a way to await some async I/O task performed on the main thread from a worker thread. So I added a class to allow exactly that. The naive implementation just signals the main thread to carry out the requested task and then waits on a #semaphore for completion, which of course blocks the worker thread.

Turns out we can actually do better, reaching similar functionality like e.g. #async / #await in C#: Release the worker thread to do other jobs while waiting. The key to this is user context switching support like offered by #POSIX-1.2001 #getcontext and friends. Unfortunately it was deprecated in POSIX-1.2008 without an obvious replacement (the docs basically say "use threads", which doesn't work for my scenario), but still lots of systems provide it, e.g. #FreeBSD, #NetBSD, #Linux (with #glibc) ...

The posercore lib now offers both implementations, prefering to use user context switching if available. It comes at a price: Every thread job now needs its private stack space (I allocated 64kiB there for now), and of course the switching takes some time as well, but that's very likely better than leaving a task idle waiting. And there's a restriction, resuming must still happen on the same thread that called the "await", so if this thread is currently busy, we have to wait a little bit longer. I still think it's a very nice solution. 😎

In any case, the code for the PAM credential checker module looks much cleaner now (the await "magic" happens on line 174):
https://github.com/Zirias/swad/blob/57eefe93cdad0df55ebede4bd877d22e7be1a7f8/src/bin/swad/cred/pamchecker.c

#C #coding

  • Copy link
  • Flag this post
  • Block
Felix Palmen :freebsd: :c64:
@zirias@mastodon.bsd.cafe  ·  activity timestamp 8 months ago

Found an issue and fixed it. Turns out destroying my #Process instance when the child exited was wrong, there could still be unread data in the #pipe. But then, only waiting for #EOF on the pipe was equally wrong ...

Now the code does the only reliable thing:

* When the child terminated, close the pipe for stdin immediately if one was present
* Only destroy the process instance once the child terminated AND the pipes for #stdout and #stderr (IF they were present) found EOF.

Committed now:
https://github.com/Zirias/poser/commit/18051d9da0ba7e4caf2882828e5706e35d419f94

And here are the docs:
https://zirias.github.io/poser/api/latest/class_p_s_c___process.html

My testing code also had to change a bit and now makes for a completely pointless and cute wrapper around /bin/ls 🙈 😂

#C #coding

The testing code in action
The testing code in action
The testing code in action
Some simple testing code for poser's new Process class
Some simple testing code for poser's new Process class
Some simple testing code for poser's new Process class
  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.8 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login