The NaCl API is reasonably simple and is fairly easy to wrap (plug - if anyone is looking for an example have a look at jim-nacl [1] which embeds into Jim TCL)
209 karma · joined November 10, 2013
The NaCl API is reasonably simple and is fairly easy to wrap (plug - if anyone is looking for an example have a look at jim-nacl [1] which embeds into Jim TCL)
from __future__ import print_function
import textwrap
t = """
Hello there
This is aligned
"""
# Need strip to get rid of extra NLs
print(textwrap.dedent(t).strip())I have always found that FreeBSD has had a much cleaner and more orthogonal feel as a system than any of the Linux distros and was always much more familiar for UNIX 'old hands'. If you come from the school where UNIX systems shouldn't have displays or the frippery associated with PCs and should be interacted with from a terminal you will probably be comfortable with FreeBSD. It shines as a rock-stable server O/S and in most cases trying to use it as a desktop is going to be fairly frustrating - the easiest way round this is not to bother and buy a MacBook Pro.
My view is that in the late 90s early 2000s adoption was impacted fairly significantly by two rather flaky major releases (3.0 & 5.0) where major bits of the system (SMP/Giant lock) were upgraded and took a long time to stabilise. These felt like a step back from the previous rock solid releases (2.2.8 & 4.11). Realistically the next really good release was the 8.0 series but since then the pace of development has really taken off and the 9.0 and 10.0 series are outstanding.
My view is that it is a great choice as a server O/S - with the significant commercial backing as an embedded O/S looks to have a strong future. I know that there will continue to be an interest in getting the desktop bits working but to be honest I think that this is a lost cause and should be dropped (though I acknowledge that the PC-BSD team doesn't agree)
One other point is that there is probably a chunk of the Linux userbase who probably shouldn't try FreeBSD as it really isn't aimed at them.
set -o emacs def check(n,am,pm,total):
for x in range(1,n):
if (am * x + pm * (n-x)) == total:
return "AM: %d @ %d / PM %d @ %d" % (x,am,n-x,pm)
return None
def solve(total,birds):
for am in range(1,total):
for pm in range(1,am):
result = list(map(lambda n:check(n,am,pm,total),birds))
if all(result):
return result
print(solve(3500,[10,16,26]))Some time ago I forked the SDS code and added a set of additional utility functions around this for a project I was working on at the time (basic file reading, regex, LZF compression, Blowfish encrypt/decrypt, SHA256 etc).
This was from a fairly old SDS version so this looks like a good opportunity to sync up with the library version.
Repository is here: https://github.com/paulchakravarti/sdsutils