Hey quick question for anyone here with experience with servers, you can put different lengths of servers in the same rack, right? E.g., if one's 36" and one's 33" (made those numbers up not sure how accurate they are).
Background
When searches return many pages of results, Github avoids cluttering their UI by eliding page links. Instead, their UI let's you select:
Pages at the beginning of the results.
Pages near the current page.
Pages at the end of the results.
In this way, no more than 11 page links are e...
@NoHaxJustRadvylf Yes. You can put a 30" depth server in a 36" rack, but not a 36" server in a 30" rack. (And the width has to be exactly the same. The standard is 19")
Alphanumerics but no Alphanumerics
We define the alphanumeric bytes as qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890 (i.e. All letters, both cases, and numbers). The order does not matter and I typed it in that order to be lazy.
Your task is to write a program that prints the byt...
Task
In this challenge, your task is to write a program or function which takes an array of paths with an additional boolean indicating it is a file or directory and outputs a file/directory tree in any reasonable format.
Remarks
A directory can but should not end with a forward slash ("/")
A pa...
(relies on the solutions being integers, if you change : to ÷ it works for non-integers too but then the output will always be a float)
@NoHaxJustRadvylf stderr can be a file, it's common when running long/complex scripts to just set up stderr to be a file directly as an easy way of logging the errors
@ais523 I think he meant "a system in which /proc/self/fd/2 does not always refer to standard error", e.g. if /proc is not procfs, which is treated specially.
stderr appears to be write-only on TIO, which is unusual for programs being run normally, so I suspect that it is actually a file there (that's the most common case in which you get a write-only stderr)
many people are surprised to discover that reading from stderr normally works (just like writing to stderr writes to the user's terminal rather than a redirected stdout, reading from stderr reads from the user's terminal rather than a redirected stdin, in both cases unless stderr is also redirected)
doesn't need to be a pty specfically, any sort of terminal works I think
and yes, you could intentionally open a file as read-write but it probably wouldn't do anything useful because you'd have nowhere to put the file pointer
I used to use SunOS a while back, pipes there were bidirectional by default
@ais523 a pipe is just a pair of file descriptors, one for reading, and one for writing. You can use both in the same process, if you want, although normally you pass one end of the pipe to a child process, and keep the other end
when I ported my programs from SunOS to Linux, the only thing I typically had to change was to swap the ends of a pipe if I'd connected it backwards by mistake
<Linux man 7 pipe> On some systems (but not Linux), pipes are bidirectional: data can be transmitted in both directions between the pipe ends. POSIX.1 requires only unidirectional pipes. Portable applications should avoid reliance on bidirectional pipe semantics.
so looks like there's no way to get the two-queue behaviour
I don't think it was particularly useful anyway? I only used it by mistake
and measuring the throughput would be hard to define, as the "splice to /dev/null" approach wouldn't calculate the fizzes and buzzes at all
there was some discussion of the FPGA approach, I think the general conclusion was that FizzBuzz is possible at combinatorial speeds so it'd just be down to how much I/O bandwidth the FPGA had
you could use pretty much the same algorithm as in my answer (striping the memory differently)
and again, it's hard to define the speed of output
speed at which you can repeatedly overwrite VGA video memory, perhaps? (displaying on the screen is a valid output method, although I'm not sure whether modern computers can even be set into VGA text mode)
if you do it the originally intended way, with in and out processor instructions and interrupt vectors, you're going to have a huge number of processor traps and virtualised context switches, which are not fast at all
those are slow even on a non-virtualised processor, though, so modern I/O is often about trying to avoid them as much as possible
(which is why motherboards are so complicated, as they have to handle not just all the I/O routing, but also identifying the triggers for the various types of I/O occurring)
Convert from Greeklish to modern Greek
Greeklish, a portmanteau of the words Greek and English, is a way of writing modern Greek using only ASCII characters. This informal way of writing was extensively used in older applications / web forums that did not support Unicode, and were not programmed ...
Alphanumerics but no Alphanumerics restricted-source code-golf
We define the alphanumeric bytes as qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890 (i.e. All letters, both cases, and numbers). The order does not matter and I typed it in that order to be lazy.
Your task is to write a...
While unsuited for main, this might find success as a CMC in TNB. — Adám11 mins ago
':[{' are just those three characters. Then, on each (…)¨ we find the range ⍳ which gives us 0…: and A…[ and a…{ from which we drop ↓ from the rear -∘ as many elements as there are in each of : and [ and {, i.e. 1 each.
experience seems to be that boring restrictions don't improve challenges even if the task is interesting, but interesting restrictions make for good challenges even if the task is boring
there is something wrong with the sandbox, though, if we can downvote a challenge and say that it won't do well, when it's a duplicate of a challenge at +54 (both the estimate that it wouldn't do well, and the fact that the sandbox commenters missed the dupe)
@ais523 It did very well on main... 5½ years ago. The reason we discourage "print X without X" is because almost all interesting variations have now been done
@ais523 isn't the statement "they won't do well" true because of the existence of duplicates? So why bother finding the duplicates, if we know they exist? (and even if they don't exist as actual duplicates by SE's standards, we know they're overdone?)
I'm a bit disappointed that there isn't an ı with underdot (at least, I assume there isn't, the key sequence that should produce it doesn't do anything)
I wonder if it would be possible to configure uglifyjs or another mimifier to generate only invisible identifiers. Wouldn't really make the code harder to reverse engineer but anyone trying will probably bleed out their eyes
hmm, that almost sounds like a source-layout challenge at this point: write code which does one thing on its own, and something else if all the ASCII alphanumerics are removed
@Adám Here's a good use for font ligatures: you can distinguish =�> from => (where � is replaced with an invisible character, but I made it visible for clarity)
(which nearly any program will print, unless it's exceptionally long – the probability of a random program producing that error is over 50% well into the tens-of-kilobytes range)
anyway, I put more effort into my one-off jokes than many people do, so I tried to work out, in a few minutes, what sort of interesting language would error out on almost any source code, which is where the checksum idea came from
every now and then we all i do the thing where i type a word like "apple" but end up typing "a[[;e" because my hand was too far to the right. i wonder if thered be a way to do a challenge where you like... correct those errors :P
hmm, we should have more challenges that are a trivial task combined with a ridiculously onerous I/O requirement – it's bad to combine restrictive I/O with an otherwise interesting challenge, but sometimes the I/O can be the challenge
I've made at least one in the past, but it's likely an underexplored genre
also, esolangs suddenly start doing very badly when you make them do I/O beyond stdin/stdout/args
assuming that you aren't telling people to replicate the functionality of a standard program (which they will normally do simply by running that program)
functional programming doesn't work well with tacit syntax because it's hard to disambiguate which operators are being called and which operators are being used as function arguments
@pxeger not familiar with bqn but is the extra syntax required for handling functions as values, or just producing function values from functions-as-you'd-write-them-for-direct-use
BQN has one for curry left argument and one for curry right argument (the little bar points to the argument). APL derives the meaning from the position of the array vs the function.
@UnrelatedString BQN doesn't really require any syntax to use functions as first-class values. E.g. you can create the array 1‿+‿2 just as easily as you can create 1‿1‿2 and if F is a function, you can pass it as argument to G with G f
I think the "standard" golfing language solution to this sort of problem is to quote functions as string literals, and use string eval to do the unquoting
@ais523 It is, the Etruscans got it from the Greeks but they left their marks on it. For example you might notice that C, derived from Gamma, makes the same sound in Latin as K does in Greek. Which is because Etruscans didn't have a distinction between /k/ and /g/. So Romans used C for both until eventually inventing G for the /g/ sound.