WTF Bites
-
Seriously, do these language designers feel so triggered when the compiler complains about missing semicolons that they want a language to not have them?
But, omitting semicolons save so much storage space.
Think about the environment
-
@pie_flavor Here's a crazy idea: Don't give whitespace syntactic meaning.
Seriously, do these language designers feel so triggered when the compiler complains about missing semicolons that they want a language to not have them?
It doesn't give whitespace syntactic meaning - just the newline character.
-
@pie_flavor newline is whitespace.
-
@Gąska according to some people.
also, yeah, no syntactic meaning to whitespace.publicstaticvoidMain(string[]args)
compiles, right?
-
@Tsaukpaetra said in WTF Bites:
@Zerosquare said in WTF Bites:
they just use Google like Facebook, and type "what's on their mind".
Where does the empty search lead these days anyway?
Deez nutz, natch.
Bofa?
-
@pie_flavor said in WTF Bites:
@Gąska according to some people.
According to most languages: https://en.cppreference.com/w/cpp/string/byte/isspace Even according to Kotlin itself: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/is-whitespace.html
also, yeah, no syntactic meaning to whitespace.
publicstaticvoidMain(string[]args)
compiles, right?That's lexical meaning, not syntactic.
-
@pie_flavor said in WTF Bites:
@Gąska according to some people.
also, yeah, no syntactic meaning to whitespace.publicstaticvoidMain(string[]args)
compiles, right?Oh, @Kian said "syntactic", not "semantic". Yes, I disagree with that too. Whitespace have a very important syntactic meaning - separating adjacent tokens. But after tokenization, all whitespace should be completely meaningless, like comments. There should be no difference in how the program is interpreted regardless of how I visually arrange code, if all other tokens stay in the same place relative to each other (in the one-dimensional space of consecutive characters that make a file).
-
Whitespace have a very important syntactic meaning - separating adjacent tokens.
As I pointed out above, that's the definition of lexical analysis, not syntactical analysis. Some compilers may do both at once since splitting tokens is trivial, but they're still separate steps of the compilation process.
-
As I pointed out above, that's the definition of lexical analysis, not syntactical analysis.
101-level academic teachers are the only people who care about the difference.
-
@pie_flavor said in WTF Bites:
@pie_flavor Why the fuck would you ever want that?
Either make semicolons mandatory or don't use them at all. This is a programming language, not a guessing game.Filed under: Fuck DWIM.
Semicolons are used to separate statements on the same line. If you don't have two statements on the same line, you don't need semicolons. Easy.
Hmm okay, admittedly “that’s different”. Since the syntax is (very loosely) C based, I assumed semicolons are the default and not using them is only an “ok, I guess you forgot it” that’s not recommended. If the default is to never have any (you rarely need multiple statements on one line) I guess that’s fine.
Also, close your damn tags.
Death first.
-
@Gąska and if you don’t do that you end up with a horrible abomination such as FORTRAN where you don’t need a space after an
if
.
-
As I pointed out above, that's the definition of lexical analysis, not syntactical analysis.
101-level academic teachers are the only people who care about the difference.
Not true, pedantic dickweeds care too. Also people that want to win arguments in the internet.
-
Wait what? Someone actually downvoted me for making fun of academia? Talk about butthurt.
-
Not true, pedantic dickweeds care too.
How do you distinguish them from 101-level academic teachers?
-
@dkf can you reply? Not an academic teacher.
-
can you reply? Not an academic teacher.
Knowing a few that are definitely at least one or the other, I wasn't sure how to distinguish them…
-
Not true, pedantic dickweeds care too.
How do you distinguish them from 101-level academic teachers?
All 101-level academic teachers are pedantic dickweeds, but not all pedantic dickweeds are 101-level academic teachers.
-
@Kian ...anymore.
-
@Gąska But I’ve never been an... wait, does TA’ing count? Shit!
-
@japonicus said in WTF Bites:
@dkf nowhere
If you were using Google you could click "I'm feeling lucky" and it wouldn't lead nowhere.
-
Unlike most other fields, mathematicians are much more willing to accept all the weird quirks in corner cases than to patch their rulesets - see axiom of choice and Banach-Tarski paradox.
I don't actually think this is true (see for instance the great effort made to establish axiomatic set theory on a solid foundation, once it was realised that the original foundation was quite leaky). It's just that in a great many instances, there's no way to get rid of the weird corner cases without either introducing even worse ones, or dropping half the useful results. Or sometimes both at once.
@anotherusername said in WTF Bites:
(2 screenshots, same 2 windows in both screenshots... activating either of the windows is "fixing" its icon but then the other window's icon changes to mimic it as soon as its button is repainted
Update: Fixed it by exiting Explorer and then restarting it
I used to get this regularly on my work computer. Every now and then one task bar icon would go wonky, and as in your experience, activating it would fix that one but knock another one off. Restarting the Explorer process was also the only solution I found. I don't think I've had it since they rolled out the Win10 SOE at work, but I also got a new computer at that point so anything could be the cause.
-
@pie_flavor said in WTF Bites:
Semicolons are used to separate statements on the same line. If you don't have two statements on the same line, you don't need semicolons. Easy.
@pie_flavor said in WTF Bites:
Also, close your damn tags.
Say those again. Slowly.
(And remember that most programming languages – nearly all, actually – can be multi-line, too, not just HTML.)
-
As I pointed out above, that's the definition of lexical analysis, not syntactical analysis.
101-level academic teachers and coders writing compilers and interpreters are the only people who care about the difference.
FTFY
-
@djls45 do they? Is there a significant difference between lexing and the rest of parsing process? AST isn't usually built in one step; there are functions that transform intermediate tokens into another set of intermediate, slightly more high-level tokens.
-
Is there a significant difference between lexing and the rest of parsing process?
Depends on the language, but the lexer is usually pretty trivial providing you avoid some annoying edge cases (i.e.,
iffor
shouldn't be two keywords in sequence).
-
@LaoC that just makes it weirder. Do racist people research their racism online? As in, you think certain demographic must be awful so you go to Bing of all things and search for more evidence? I don't know what would make it worse, the racism itself or that they used Bing.
People are totally colorblind these days so I'm sure it's purely academic interest.
-
@pie_flavor said in WTF Bites:
@Gąska according to some people.
According to some people including the Unicode Consortium. So yeah, you can agree with that or be
wronglegacy.Edit: related Java WTF
public class FalseIsTrue { public static void main(String[] args) { if ( false == true ) { //these characters are magic: \u000a\u007d\u007b System.out.println("false is true!"); } } }
-
what the shit
https://i.imgur.com/aNZ8A6Q.png
That's very clearly from the Minecraft icon.
https://i.imgur.com/jDQi3w2.png
-
@pie_flavor said in WTF Bites:
what the shit
https://i.imgur.com/aNZ8A6Q.png
That's very clearly from the Minecraft icon.
https://i.imgur.com/jDQi3w2.pngHey, at least yours still has icons!
-
@pie_flavor Are you saying your Windows10 is acting up?
-
@TimeBandit said in WTF Bites:
@pie_flavor Are you saying your Windows10 is acting up?
I don't have that problem.
-
@anotherusername said in WTF Bites:
@TimeBandit said in WTF Bites:
@pie_flavor Are you saying your Windows10 is acting up?
I don't have that problem.
Try leaving your computer un-rebooted for about 16 days?
-
-
The colors used to be Standard Borg Green, but adjusted it after problems with the blue light program...
-
@Tsaukpaetra said in WTF Bites:
The colors used to be Standard Borg Green
Filed under: Comfort is Futile!
-
Is there a significant difference between lexing and the rest of parsing process?
Depends on the language, but the lexer is usually pretty trivial providing you avoid some annoying edge cases (i.e.,
iffor
shouldn't be two keywords in sequence).So is AST parser, if your grammar is simple enough. And even in complicated grammars, with RD parser, you end up with many sub-parsers that are quite trivial to write.
What I'm asking is, is there an actual, important difference between how lexers are made or behave and how higher-level parsers are made or behave that warrants creating an entire new field, lexical analysis, separate from the general syntactic analysis? In other words:
L - all lexers that might possibly exist
P - all parsers that might possibly exist
F - some special feature or property that some parsers have∃ F ∀ l ∈ L ∀ p ∈ (P \ L): F(l) ∧ ¬F(p)
Is the statement above true? If so, what's this feature that only lexers have and all other parsers don't?
-
@Tsaukpaetra said in WTF Bites:
@anotherusername said in WTF Bites:
@TimeBandit said in WTF Bites:
@pie_flavor Are you saying your Windows10 is acting up?
I don't have that problem.
Try leaving your computer un-rebooted for about 16 days?
Nope, my Windows 7 doesn't seem to have that problem.
-
Is there a significant difference between lexing and the rest of parsing process?
Depends on the language, but the lexer is usually pretty trivial providing you avoid some annoying edge cases (i.e.,
iffor
shouldn't be two keywords in sequence).So is AST parser, if your grammar is simple enough. And even in complicated grammars, with RD parser, you end up with many sub-parsers that are quite trivial to write.
What I'm asking is, is there an actual, important difference between how lexers are made or behave and how higher-level parsers are made or behave that warrants creating an entire new field, lexical analysis, separate from the general syntactic analysis? In other words:
L - all lexers that might possibly exist
P - all parsers that might possibly exist
F - some special feature or property that some parsers have∃ F
∀
∃
l ∈ L ∀ p ∈ (P \ L): F(l) ∧ ¬F(p)
Is the statement above true? If so, what's this feature that only lexers have and all other parsers don't?
I think this should be sufficient, although I guess the answer is still no.
-
@topspin it wouldn't, because the property wouldn't be shared by all lexers, but only those having this special property. This might or might not warrant creating a subfield specifically dedicated to those special lexers, but it still wouldn't justify special treatment of all lexers.
-
i.e.,
iffor
shouldn't be two keywords in sequenceI've used a BASIC language where it would be. But it also didn't allow variable names longer than 1 character, so it wasn't really an edge case.
-
@anotherusername said in WTF Bites:
But it also didn't allow variable names longer than 1 character,
-
26 variables ought to be enough for everybody.
-
@anotherusername said in WTF Bites:
But it also didn't allow variable names longer than 1 character,
26 variables ought to be enough for everybody.
IIRC, that was the default, but the
DIM
command could be used to change the number of variables (>= 26)... it supported an array syntax, but the variables were just one single array in memory with the 26 named variables mapped to it, i.e.A = A[0]
,B = A[1]
, etc.
-
How is it possible for a site to have big intrusive AdSense ads pointing (mostly) to its own articles?
-
-
26 variables ought to be enough for everybody.
But it probably also used
$
to prefix strings, so that's 52. Luxury!
-
It might not be very visible on screenshot due to broken drawing routine, but this is an installer that launches a separate installer that launches a separate installer:
-
@Gąska <img src="yo_dawg_meme_274684367.xlsx">
-
@anotherusername said in WTF Bites:
@TimeBandit said in WTF Bites:
@pie_flavor Are you saying your Windows10 is acting up?
I don't have that problem.
Neither do I. And I noticed they both have
7+ Taskbar Tweaker
.
-
@Tsaukpaetra said in WTF Bites:
Try leaving your computer un-rebooted for about 16 days?
I can't. I let Windows Update do its thing!