Hacker News new | past | comments | ask | show | jobs | submit | tobik's comments login

There is a good support for sndio in the FreeBSD ports tree as well. Albeit hidden behind the SNDIO build time option. It was quite the ride to get it to that point :-)

There are also now some sndio backends out there for applications not in the OpenBSD ports tree like Cava, shairport-sync, and Kodi.


FreeBSD's yes has just been updated because of this.

https://github.com/freebsd/freebsd/commit/1d61762ca37c20ab6f...

It's about twice as fast as GNU yes now on my FreeBSD system here.


Looks like that may drop some data if you get a short write, possible when writing to pipes etc.

Update: They fixed that issue with this follow up https://github.com/freebsd/freebsd/commit/2592fbb8


That's because you're using cat and a pipe. Try this instead:

  pv > /dev/null < /dev/zero


For anyone who is like me and finds it uncomfortable that things are now out of order, note that you can still put the input redirection in front:

  </dev/zero pv >/dev/null


Or even this:

pv </dev/zero >/dev/null

which is a common way of doing it (for any command with any inputs and outputs, not just the above ones), i.e.:

command < input_source > output_dest

All three pv command invocation variants, the one here and the two above, work. And it becomes more clear why they are the same, when you know that the redirections are done by the shell + kernel, and the command (such as pv) does not even know about it. So in all three cases, it does not see the redirections, because they are already done by the time the command starts running (with its stdin and stdout redirected to / from those respective sources). And that is precisely why the command works the same whether it is reading from the keyboard or a file or pipe, and whether it is writing to the screen or a file or pipe.


Bad example :)

Most simple uses of lambda like this can be substituted with functions from the operator module:

  import operator

  formulas = {
    'sum': operator.add,
    'subst': operator.sub,
    'mult': operator.mul,
    'pow': operator.pow
  }


I thank you for this example. If the operator definitions are not trivial and you want to keep them well mantained, then your example is very good.

However, what I meant was that for fast, quick coding, if your 'operator' function is really simple, then lambda fints perfectlu.

I know the Zen of Python says: "There should be one—and preferably only one—obvious way to do it", but i don't align to that principle. I think there should be more than one way to do something, and one should choose one that fits the best.


src/gnu already has Perl in it, which isn't a GNU project or under the GPL either.


Perl is dual-licensed under the GPL & the Artistic license: https://github.com/Perl/perl5/blob/blead/README#L83


I realize I'm replying to a 2 weeks old comment, so nobody will read this ever, but from your list sndio supports: streaming audio over a network, user-land mixing of audio sources, mixing of multiple audio streams at the same time, and per application volume settings.

> Per application input/output source settings

No, but the input/output device is selectable per application via the AUDIODEVICE environment variable.

> bluetooth audio devices

OpenBSD has no bluetooth support, so no. I'm also wondering why the kernel wouldn't create audio devices from these that the userland daemon can then just transparently use? Does an audio daemon need special support for bluetooth audio devices?

The sndio daemon has more features. Give the man page a read if you're interested: http://man.openbsd.org/OpenBSD-current/man8/sndiod.8


The Reasoned Schemer by Daniel P. Friedman, William E. Byrd and Oleg Kiselyov

https://mitpress.mit.edu/books/reasoned-schemer

It's from the author of miniKanren on which LogicJS is based.

There are implementations for a lot of other languages (other JS implementation too) on

http://minikanren.org/


Yes, it has V4L/DVB support via the multimedia/webcamd port/package, which is essentially a user space port of Linux' V4L/DVB drivers.

https://www.freshports.org/multimedia/webcamd


No, we are not. :-( For what it's worth I just tried to answer your question on the forums.


You can also display a list of all packages in the repository with

    pkg search -g '*' | less
Better pipe it to less because there are over 25000 packages.


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

Search: