I'm preparing for a test and came across this exercise, I will be puting my solution at the end and hope for you guys if possible to provide better solution with explanation in whatever language you are confortable with.
In base -2, Integers are represented by sequences of bits in the
folow...
Sometimes I'll have an extra terminal window either to view debug output or if I want a separate window to run the program, in which case I either make the REPL a floating window, have an extra column, or put it below Firefox, whichever I feel like doing at the time.
@orlp No, I prefer having separate terminals that tile with i3.
Oh, I see. That does sound convenient. I usually just fire up irb in a separate terminal when I need something like that.
Copying large amounts of text is a pain. I usually just do something like File.open('asdf.txt', 'w'){|f| f.puts str }. The copy function sounds super convenient.
It doesn't sound too hard, actually. Something like def copy str; File.open('/tmp/copy.txt', 'w') {|f| f.puts str }; `xclip /tmp/copy.txt`; end would probably do the trick.
@TheNumberOne I have Caps lock bound to Ctrl, because it's much easier to reach there.
I've been thinking about installing xcape so that it acts as Esc when tapped, and Ctrl when held with another key, but I never got around to doing that.
If I ever finish this do you guys think it would be fun? I think it could be fun but I don't know if it would be too hard to come up with a good strategy or something
this will totally be some mystical piece of PPCG lore a couple of years from now... "Hey, guys, I was just idly browsing through the sandbox's edit history... and a mod once tagged it with yingluck. :O"
@Doorknob yesterday (I think, working nights messed up my sense of time and dates) I posted a link to my sandboxed challenge immediately before the bot linked to the same thing
I forgot there even was a bot, and it was slow enough to let me do it myself first :p
Catchphrases and concepts that spread from person to person are known as memes, which, courtesy the Internet, can now explode across the Earth like a highly contagious virus (hence "going viral"). As with their real-life counterparts, some infectious diseases are global (pandemic), while others a...
Arranging Matrices
code-golf (doesn't actually require any matrix math)
While doing homework on matrix multiplication, I realized that I could avoid rewriting all of the matrices by arranging them intelligently on the page. If the problems were:
A * B = C
A * D = E
F * D = G
I could arrang...
???, 347 bytes
What? The traveler was shocked. Never in his life had he heard such a sentence/phrase said so beautifully.
Hello, World!
It rung like a booming echo in a field of tranquility. So strong, yet...calm. In fact, the force was so strong, it knocked down a nearby sign that said "Store/H...
If anybody else had posted it, I wouldn't have figured it out in a million years.
An airlines company has several planes of the same type.Each plane has a seating capacity of 24 X 3 rows and 8 seats in each row split has shown.
Hide Copy Code
1 [a] [b] [c] [d] [e] [f] [g] [h]
2 [a] [b] [c] [d] [e] [f] [g] [h]
3 [a] [b] [c] [d] [e] [f] [g] [h]
If 4 people book - allocate 4...
First, some definitions.
A Hadamard matrix is a square matrix whose entries are either +1 or −1 and whose rows are mutually orthogonal. The Hadamard conjecture proposes that a Hadamard matrix of order 4k exists for every positive integer k.
A circulant matrix is a special kind of matrix where ...
@Lembik your sentence "It is known that, except for 4 by 4 matrices, there are no circulant Hadamard matrices." isn't strictly true, since you didn't consider n=1 and n=2
We Australians have a pretty awful national anthem. Here it is in all its glory:
To the tune of Advance Australia Fair
Australians all let us rejoice,
For we are young and free;
We've golden soil and wealth for toil;
Our home is girt by sea;
Our land abounds in nature's gifts
Of be...
@BetaDecay you know "The integers will be in the range -(2^32-1) to 2^32-1." is ruining it for a bunch of esolangs, and I don't think it really adds anything to the challenge. Byte range or "any reasonable range your language supports, but at least 256 values" would probably be sufficient.
Fission... but any language that can only store a) unsigned integers b) bytes c) can't read integers from stdin and therefore has to read byte values (or implement atoi just to compete)
There are a lot of intelligent people of PPCG, and for that reason a lot of our usual challenges are hard. This means that we are throwing new users straight into the deep end with huge problems which they may not be able to solve.
For that reason I propose we have a 'tutorial'. This may be a me...
also @Lembik there is an easy way to check orthogonality by taking bitwise xor and then checking that popcount is equal to n/2 (using 1 and 0 instead of 1 and -1)