# The Computer Language Benchmarks Game# https://salsa.debian.org/benchmarksgame-team/benchmarksgame/# Contributed by Wesley Moxam# Modified by Sokolov Yura aka funny_falcon# Parallelised by Scott Leggett# Thread.exclusive deprecatedrequire'thread'moduleMiniParallelclassWorkerdefinitialize(read,write)@read,@write=read,writeenddefclose_pipes@read.close@write.closeenddefwork(index)Marshal.dump(index,@write)Marshal.load(@read)endenddefself.map(array,&block)work_in_processes(array,[array.size,core_count].min,&block)enddefself.core_count@@core_count||=IO.read("/proc/cpuinfo").scan(/^processor/).sizeendprivatedefself.work_in_processes(array,count,&block)index=-1results,threads=[],[]mx=Mutex.newworkers=create_workers(array,count,&block)workers.eachdo|worker|threads<<Thread.newdoloopdomx.synchronizedoindex+=1endbreakifindex>=array.sizeresults[index]=worker.work(index)endworker.close_pipesendendthreads.each(&:join)Process.waitallresultsenddefself.create_workers(array,count,&block)workers=[]count.timesdoworkers<<create_worker(array,workers,&block)endworkersenddefself.create_worker(array,started_workers,&block)child_read,parent_write=IO.pipeparent_read,child_write=IO.pipeProcess.forkdostarted_workers.each(&:close_pipes)parent_write.closeparent_read.closeprocess_incoming_jobs(child_read,child_write,array,&block)child_read.closechild_write.closeendchild_read.closechild_write.closeWorker.new(parent_read,parent_write)enddefself.process_incoming_jobs(read,write,array,&block)untilread.eof?index=Marshal.load(read)Marshal.dump(block.call(array[index]),write)endendendclassFannkuchdefinitialize(n,start,max_perms)@n=n@p=(0..n).to_a@s=@p.dup@q=@p.dup@sign=1@sum=@maxflips=0@max_perms=max_perms@perm_count=-startstart.times{permute}enddeffliploopdoif@perm_count==@max_permsreturn[@sum,@maxflips]endif(q1=@p[1])!=1@q[0..-1]=@pflips=1until(qq=@q[q1])==1@q[q1]=q1ifq1>=4i,j=2,q1-1whilei<j@q[i],@q[j]=@q[j],@q[i]i+=1j-=1endendq1=qqflips+=1end@sum+=@sign*flips@maxflips=flipsifflips>@maxflips# New maximum?endpermuteendenddefpermute@perm_count+=1if@sign==1# Rotate 1<-2.@p[1],@p[2]=@p[2],@p[1]@sign=-1else# Rotate 1<-2 and 1<-2<-3.@p[2],@p[3]=@p[3],@p[2]@sign=1i=3whilei<=@n&&@s[i]==1@s[i]=i# Rotate 1<-...<-i+1.t=@p.delete_at(1)i+=1@p.insert(i,t)end@s[i]-=1ifi<=@nendendendabort"Usage: #{__FILE__} n\n(n > 6)"if(n=ARGV[0].to_i)<6core_count=MiniParallel.core_countchunk_size=(1..n).reduce(:*)/core_countsum,flips=ifcore_count>1# adjust job sizes to even out workloadweights=ifcore_count>1weights=[](core_count/2).timesdo|i|weights<<i*0.1+0.05endweights=weights.reverse+weights.map{|i|-i}else[0]end# Generate start position for each chunkchunks=core_count.times.zip(weights).mapdo|count,weight|[count*chunk_size+(count>0?(weights[0,count].reduce(:+)*chunk_size).round:0),chunk_size+(weight*chunk_size).round]endchunk_results=if(RUBY_PLATFORM=='java')chunk_collector=[]threads=[]chunks.each.with_indexdo|(start,weighted_size),i|threads<<Thread.newdochunk_collector[i]=Fannkuch.new(n,start,weighted_size).flipendendthreads.all?(&:join)chunk_collectorelseMiniParallel.map(chunks)do|start,weighted_size|Fannkuch.new(n,start,weighted_size).flipendendchunk_results.reducedo|memo,(cksum,fmax)|[memo[0]+cksum,[memo[1],fmax].max]endelseFannkuch.new(n,0,chunk_size).flipendprintf"%d\nPfannkuchen(%d) = %d\n",sum,n,flips
I am using Debian since later "Potato" distribution. Debian is one of the good distribution back in the time, today is even better.
Take a look at this newsgroup message from Ian Murdock this is how Debian was created.
From portal!imurdock Mon Aug 16 06:31:03 1993
Newsgroups: comp.os.linux.development
Path: portal.imurdock
From: imurdock@shell.portal.com (Ian A Murdock)
Subject: New release under development; suggestions requested
Message-ID: <CBusDD.MIK@unix.portal.com>
Sender: news@unix.portal.com
Nntp-Posting-Host: jobe.unix.portal.com
Organization: Portal Communications Company -- 408/973-9111 (voice) 408/973-8091 (data)
Date: Mon, 16 Aug 1993 13:05:37 GMT
Lines: 86
Fellow Linuxers,
This is just to announce the imminent completion of a brand-new Linux release,
which I'm calling the Debian Linux Release. This is a release that I have put
together basically from scratch; in other words, I didn't simply make some
changes to SLS and call it a new release. I was inspired to put together this
release after running SLS and generally being dissatisfied with much of it,
and after much altering of SLS I decided that it would be easier to start
from scratch. The base system is now virtually complete (though I'm still
looking around to make sure that I grabbed the most recent sources for
everything), and I'd like to get some feedback before I add the "fancy" stuff.
Please note that this release is not yet completed and may not be for several
more weeks; however, I thought I'd post now to perhaps draw a few people out
of the woodwork. Specifically, I'm looking for:
1) someone who will eventually be willing to allow me to upload the
release to their anonymous ftp-site. Please contact me.
Be warned that it will be rather large :)
2) comments, suggestions, advice, etc. from the Linux community. This
is your chance to suggest specific packages, series, or
anything you'd like to see part of the final release.
Don't assume that because a package is in SLS that it will necessarily be
included in the Debian release! Things like ls and cat are a given, but if
there's anything that's in SLS that you couldn't live without please let me
know!
I'd also like suggestions for specific features for the release. For example,
a friend of mine here suggested that undesired packages should be selected
BEFORE the installation procedure begins so the installer doesn't have to
babysit the installation. Suggestions along that line are also welcomed.
What will make this release better than SLS? This:
1) Debian will be sleeker and slimmer. No more multiple binaries and
manpages.
2) Debian will contain the most up-to-date of everything. The system
will be easy to keep up-to-date with a 'upgrading' script in
the base system which will allow complete integration of
upgrade packages.
3) Debian will contain a installation procedure that doesn't need to
be babysat; simply install the basedisk, copy the distribution
disks to the harddrive, answer some question about what
packages you want or don't want installed, and let the machine
install the release while you do more interesting things.
4) Debian will contain a system setup procedure that will attempt to
setup and configure everything from fstab to Xconfig.
5) Debian will contain a menu system that WORKS... menu-driven
package installation and upgrading utility, menu-driven
system setup, menu-driven help system, and menu-driven
system administration.
6) Debian will make Linux easier for users who don't have access to the
Internet. Currently, users are stuck with whatever comes with
SLS. Non-Internet users will have the option of receiving
periodic upgrade packages to apply to their system. They will
also have the option of selecting from a huge library of
additional packages that will not be included in the base
system. This library will contain packages like the S3
X-server, nethack and Seyon; basically packages that you and I
can ftp but non-netters cannot access.
7) Debian will be extensively documented (more than just a few
READMEs).
8) As I put together Debian, I am keeping a meticulous record of
where I got everything. This will allow the end-user to
not only know where to get the source, but whether or not
the most recent version is a part of Debian. This record
will help to keep the Debian release as up-to-date as possible.
9) Lots more, but I'll detail later...
Anyway, I'll provide more specifics in a week or so after I receive enough
replies.
Please, all replies by mail. I'll post a followup. If you wish to discuss
this in the newsgroup, please don't turn it into a flamewar. :)
Until later,
Ian
--
Ian Murdock Internet: imurdock@shell.portal.com
The Linux Warehouse
I’ve tried to use this ancient english message as a comment for PR review to bring attention
I bid thee good tidings. I beseech thee to take heed, for lo, several moons have waxed and waned since this comment hath been inscribed, yet it remaineth unresolved. I humbly beseech thee to attend to this matter forthwith, that we may advance the pull request without further delay.
After this message PR was closed, and even branch was deleted due to its obsolete.
The Agile coaching industry has become a parody of itself because of #agileclownshow, using buzzwords without actually providing any substantial value. It's as if they claim to know the solution to a problem but have no understanding of the problem itself. The issue with Agile coaching is not just the lack of expertise, but also the audience and those in charge. Just as a teacher must have experience in a subject to effectively teach it, an Agile coach must have experience in the business world. Simply put, they must have a track record of producing results, both positive or negative, before they can effectively coach anyone. If not then red nose and fancy hair should be the working suit.
Even more horrible is the fact that agileclowns make new agileclowns each show performed.
When you’re installing VirtualBox on a system with Secure Boot enabled, the installation process requires kernel modules to be loaded that are not signed by the system’s Secure Boot key. In this situation, you have two options:
Disable Secure Boot in BIOS: This option involves going into the system’s BIOS settings and disabling Secure Boot. This will allow the installation process to proceed without any further intervention.
Sign the kernel modules: If you prefer to keep Secure Boot enabled, you can sign the required kernel modules with a key that is trusted by the system’s Secure Boot infrastructure. This involves generating a new key pair, importing the public key into the system’s key store, and using the private key to sign the kernel modules.
#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko.xz; do
echo "Signing $modfile"
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 \
/root/signed-modules/MOK.priv \
/root/signed-modules/MOK.der "$modfile"
done
The steps you’ve outlined above describe how to perform the second option. The script you’ve provided will sign all the VirtualBox kernel modules that are present on the system. Once the modules have been signed, they will be allowed to load by the system’s Secure Boot infrastructure.
It’s worth noting that signing kernel modules is a security-sensitive operation, and you should take appropriate precautions to protect the key material. Also, the exact steps for signing kernel modules may vary depending on the distribution and version of Linux you’re using.
Slack has become the industry standard for modern developers’ communities, but Microsoft Teams has emerged as a challenger. However, what exactly does Teams offer, and why is it considered inferior?
The main reason is that Teams did not commit to conducting research on what is needed to facilitate effective communication in a rapidly growing environment. This lack of attention to detail is evident in certain elements of the interface.
Let’s start with the roster, which is a list of available chat entities and users. In Slack, it is streamlined and designed with use cases in mind, while in Teams, it is merely a simulacrum.
For instance:
In Slack, finding a chat only requires one click, while in Teams, you need to switch between group chats and private chats, which can be slow.
Slack has a well-designed interface for threads, making them easy to see and use. In contrast, Teams has a bloated and poorly functioning mechanism that is difficult to use.
In Slack, there is one roster for all chats, while in Teams, there are several different rosters for everything, which does not aid productivity.
The chat window and input area in Slack are simple yet sophisticated, while in Teams, they are overly complex and confusing.
Code pasting is impossible to do smoothly in Teams, whereas Slack allows for seamless pasting by simply inputting standard markdown backticks. Additionally, Teams do not differentiate between one backtick and triple backticks and does not change highlighting styles.
After pasting a message in Teams, the interface can cause the message to appear out of order and even before the previous message.
So why is Teams inferior to Slack? The main reason is that Teams has not invested enough in conducting research and designing an interface that is user-friendly and efficient. Slack, on the other hand, has a well-designed interface that is tailored to the needs of developers, making it the preferred choice in the industry.
Although I am not an advocate for Slack, I believe that Teams is a subpar platform that is not yet ready for production use. While it has many integrations and functionalities, it appears as though they were simply created to imitate Slack and give the impression that “Yes, we have that too.”