4 ms·
I Hate the Letter F
- saagarjha 2y agoA true lipogrammer, I guess.
- kelseyfrog 2y agoSuch a grand oulipo. well done
- robin_reala 2y agoAs a commenter points out, that’d make programming a difficult pastime. Can’t think of a non-esolang without if and for apart from Brainfuck, and that’s got an f in the name.
- deleted 2y ago[deleted]
- coffee_ 2y agohappenstance x > 0: per x in y:
- deleted 2y ago[deleted]
- dangsux 2y ago[dead]
- pfortuny 2y agoI guess you can (at least in C ) use && where you would use “if” and a convoluted while where you could write a “for”.
- akira2501 2y ago#include <stdio.h> int main() { int a = 1; switch(a) case 1: puts("there's always this"); } Switch accepts a statement. It does not have to be compound.
- tgv 2y agoWhen you're dedicated and don't have to work in a large team: ihatetheletterf.h: #define cond if #define loop for #define otherwise default #define untrue false #define real float And when you work in a (large) team, they won't likely accept weird constructions just to avoid a letter anyway.
- reshlo 2y agoYou just used the letter f 13 times to make that file, though.
- thaumasiotes 2y ago> and a convoluted while where you could write a “for” What's convoluted about it? A `for` is about as simple as syntactic sugar gets. for( a; b; c ) { } is exactly equivalent to a; while( b ) { c; } (OK, a variable declared in `a` will remain in scope after the while loop terminates, but the only way for this to have an effect on anything is if you intentionally refer to it afterwards, in which case you needed to predeclare it for the for loop too.)
- evmar 2y agoWith Rust you could get by with "match bool { true => ..., _ => ... }" and "loop { ... break }" I think.
- notpushkin 2y agoYeah, using a language with pattern matching should do the trick. Maybe OCaml or even F#. rimshot
- Trung0246 2y ago`unsafe` code is a little bit tough since the keyword have an F, unless there's another way to create unsound code by abusing rustc.
- xanathar 2y agoBut you would not be able to define functions.
- fragmede 2y agowhitespace
- thayne 2y agoDefinitely an esolang
- frogulis 2y agoI infer from the wording in your comment that you consider Brainfuck to be a non-esolang. Your mind must operate on a different plane to mine!
- robin_reala 2y agoIt’s the most well known of the esolangs at least.
- yojo 2y agoJavaScript gives you the ternary operator (?/:) to handle conditionals plus switch/case. Plus you get map/reduce methods on iterables, and you can write procedures with “const thing = ()=> {}” I think I could write an arbitrarily complex program without major issue.
- Someone 2y agohttps://en.cppreference.com/w/cpp/language/charset https://en.cppreference.com/w/cpp/language/charset: “Mapping from source file (other than a UTF-8 source file)(since C++23) characters to the basic character set(until C++23)translation character set(since C++23) during translation phase 1 is implementation-defined, so an implementation is required to document how the basic source characters are represented in source files.”* ⇒ pre C++23, you could have a C++ compiler that used an Unicode “Pile of poo” (https://www.unicode.org/L2/L2017/17407-frowning-poo.pdf https://www.unicode.org/L2/L2017/17407-frowning-poo.pdf) instead of the letter F.
- reshlo 2y agoYou might be able to get by in Haskell if you avoid case expressions.
- reikonomusha 2y agoEasy in Common Lisp without sacrificing ergonomics or getting stuck in a Turing tarpit. We'd make a small preamble to define new names for things like DEFUN, Lisp's operator to define new functions. No F's needed to do that either. We can do this by taking advantage of read-time evaluation. First we get references to the symbols DEFMACRO and DEFUN. (eval-when (:compile-toplevel :load-toplevel :execute) (setq de*un (intern (map 'string 'code-char '(68 69 70 85 78)))) (setq de*macro (intern (map 'string 'code-char '(68 69 70 77 65 67 82 79))))) This technique can be used to access any symbol in Common Lisp that may have an F in it. Now, to make life-without-F easy, we define new names for DEFMACRO (mac) and DEFUN (proc) without actually lexically referring to the F-infected symbols: (#.de*macro mac (&body r) `(,de*macro ,@r)) (mac proc (&body r) `(,de*un ,@r)) Now we can define functions with PROC instead of DEFUN. Here's the Fibonacci function, with the F censored out. Note that we don't need IF since Lisp has the superior COND: (proc *ib (n) (cond ((= 0 n) 0) ((= 1 n) 1) (t (+ (*ib (- n 1)) (*ib (- n 2)))))) Test it: > (print (*ib 10)) 55
- benrutter 2y agoThis is excellent! I was playing around with a lisp (hy) recently, and hadn't really used macros before then. It's amazing how much you can reengineer lisp from within to meet your needs, even if they're as small as "I don't want to use F". I haven't seen any non-lisp languages that give you that kind of power, for better or worse.
- amenhotep 2y agoI think that's cheating. 70 is just F with a different hat on.
- reikonomusha 2y agoWould it be better for you if we took the Nth symbol in alphabetical order from the list of 978 standard symbols? You could do that. How about searching for all symbols with the letters DEMACRO that are 8 letters long? We could do that too. The technique works so long as you can uniquely determine the symbol through some combination of standard Lisp functions that don't contain F. Lisp has a big library, so it's not tough. "70" isn't a number that is associated to F in any common person's understanding, and the pronunciation of the number "70" in English has no objectionable F sounds, so I don't agree it's cheating. :)
- RodgerTheGreat 2y agoIn Lil[0], avoiding "F" is doable, but not very convenient. The if/elseif keywords are off the table, but you still have both explicit looping constructs and function declarations: while x ... end each x y z in w ... end on name x y do ... end There are five primitive operators with "F": typeof (rarely needed), floor (inconvenient to work around but at least you still have % for modulo), first (can be replaced with indexing), flip (transpose a matrix/table; this could be replaced (slowly) with a user-defined function), fuse (join a list of strings into a single string; very difficult to do without, since Lil doesn't have a vanilla string-concat operator), format (string formatting; this removes tons of functionality and the easiest ways of working around not having fuse). Most of the query forms (select, extract, and update expressions) would be OK, but they all need a "from" clause to specify the source table, so no dice. What you're left with is still very much Turing-Complete, but much less ergonomic. [0] http://beyondloom.com/tools/trylil.html http://beyondloom.com/tools/trylil.html
- danielheath 2y agoUnless and Each, in ruby?
- xigoi 2y agoif (x) { y; } → while (x) { y; break; } for (a; b; c) { d; } → a; while (b) { d; c; }
- skykooler 2y agoYou could do a lot in assembly (which uses instructions like JNZ for "if"), as long as you don't need any floating point math.
- labster 2y agoI wonder how easy it would be to avoid that letter when programming. It would certainly be easier in Perl, since you can use unless conditionals and while loops, and subroutines are simply called sub. In the case you absolutely need a module using the dreaded letter, require can be used instead of use so that letter can simply be escaped. The same applies to method calls, just call indirectly. The idea reminds me about JS*uck.
- beardyw 2y agoUpvotes awarded where the letter not used.
- fbn79 2y agoI think the "F" is OP Zahir https://en.wikipedia.org/wiki/The_Zahir https://en.wikipedia.org/wiki/The_Zahir
- yegle 2y agoSee also a novel w/o letter E: https://en.wikipedia.org/wiki/Gadsby_%28novel%29 https://en.wikipedia.org/wiki/Gadsby_%28novel%29
- SvenL 2y agoBoy, finally somebody who also hates a certain letter. I hate c - it’s totally garbage letter. Take for example Pacific Ocean. Every damn c in that two word is pronounced differently. Worst part, you could replace it with other letters (Pazifik Oshean). It’s redundant. C is just a nightmare…
- suprjami 2y agoI see.
- adrian_b 2y agoThe redundancy comes in part from the oldest forms of the Latin alphabet, where there were 3 forms of C, K was used before A, C was used before E or I and Q was used before O or U. Later they have understood that writing with different letters minor variations in pronunciation of the same phoneme is useless, so they began to use C in almost all cases where previously either K or C or Q were used, but K and Q have survived for some niche uses. The next complication has arisen in the Middle Ages, when in many European languages the pronunciation of C before E and I has been changed and instead of being the same as K it has become like the pronunciation of either English "s" or English "sh" or English "ch" or English "ts". Because English has borrowed many words from a lot of languages, keeping their spelling, it has gathered all these pronunciations, so as you have pointed, all these different pronunciations are possible in English and it is unpredictable which of them must be used in a given word.
- kalaksi 2y agoIn the same vein, as a non-native speaker, I sometimes find it funny when even words that are written the same way (or are very close) are pronounced differently. E.g. read vs. read. And then I also hear from movies that people pronounce "interesting" in different ways and begin to question how it should be done. Of course, my native tongue has it's own quirks and peculiarities. I guess languages are the ultimate legacy projects with massive amount of contributors :).
- 2-3-7-43-1807 2y agothat got nothing to do with a specific letter it's just "ingliti" ... maybe you get the drift
- d--b 2y agoSlightly related: https://en.m.wikipedia.org/wiki/A_Void https://en.m.wikipedia.org/wiki/A_Void
- jessekv 2y agoI don't hate the letter "s", but its sound is quite distinctive in conversation. In a crowded room, listen for the "s" sounds and you will see what I mean.
- mofunnyman 2y agoAsk any audio engineer about the letter S. You can walk out of the room, go live your life for a year, come back, and they will still be screaming.
- scottapotamas 2y agoThat sound has a name - sibilance
- pavlov 2y agoReplace it with “ph” in every word, and you’ll have the phine benephit of sounding like a 90s indie band or a 70s phone hacker.
- scosman 2y agoClearly doesn’t give a f
- adrian_b 2y agoWhile he hates the letter F because it looks like an incomplete letter E, this resemblance is relatively recent and it is due to the Ancient Greeks. The letter F was originally the letter "waw" of the North-Semitic alphabet, then of the Phoenician alphabet derived from it. In the Phoenician alphabet, the letter "waw" looked like a Y. When some Greeks have derived the Greek alphabet, they have created two distinct letters from the letter "waw", the letter that was later named digamma, which retained the position in the alphabet of the Phoenician "waw", and the letter that was later named upsilon, which was appended immediately at the end of the alphabet, after the last of the Phoenician letters. For unknown reasons, upsilon has kept the form Y, while the top of digamma has been rotated, becoming F. The letter digamma has continued to be pronounced like in Phoenician, where it was used to write the consonant a.k.a. semivowel form of U (which in English is normally written as W). The letter upsilon was used to write the vowel form of U. So the Greeks have created two letter variants of the original "waw", written as F and Y, to distinguish the consonant and vowel uses of U, like English has created W to be distinct from U, for the same purpose. The letter E comes from the Phoenician "he", where it had a similar form, but it was reflected. The reason why the Greeks have reflected E is likely to be the change of the direction of writing from right-to-left to left-to-right. So it is in the Greek alphabet where E and F began to look similar. Most Greek dialects have lost the semivowel U, therefore also the letter digamma, but that had not happened yet in the dialect from which the Etruscans and the Latins have taken the alphabet, so it still had F. Latin had a consonant not present in Greek, that which now is written F. Because there was some resemblance between Latin F and semivowel U, both being labial, the Latins have chosen F to write this consonant. Moreover in Latin the form of Y has been simplified to V. Also Latin had both semivowel U and vowel U, but they have chosen to write both of them as V. The letter U has appeared only in the Middle Ages, initially only as the small letter "u", which was the small variant of "V", the forms "v" and "U" have been added later, together with the different pronunciations attached to the letters. Some centuries after the first variants of the Latin alphabet, the letter Y has been appended to it, because by that time the Greeks no longer pronounced it as U, but it had become a front rounded vowel, like German U-umlaut or French U or Danish Y. Therefore the current Latin alphabet has 5 letters derived from Phoenician "waw": F, U, V, W and Y.
- satisfice 2y agoI avoid the thorn. I do that by substituting “th” for it or sometimes “y” as in “ye olde bakery.” Keyboards since the 17th century don’t include thorn, so as long as I am not using an Icelandic keyboard I don’t have to worry.