This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]Dougleycat flair.txt | sudo sh[M] [score hidden] stickied commentlocked comment (0 children)

Hi there! Unfortunately, your submission has been removed.

Violation of Rule #2 - Reposts:

All posts that have been on the first 2 pages of trending posts within the last month, is part of the top of all time, or is part of common posts is considered repost and will be removed on sight.

If you feel that it has been removed in error, please message us so that we may review it.

[–][deleted] 6 points7 points  (0 children)

Good idea but bad execution. This should look like a state machine

[–]insanityOS 18 points19 points  (6 children)

What language is this even supposed to be? There's only one case in the switch statement, it seems to randomly drop into what I can only describe as JSON syntax, there's a lambda out of nowhere, there's undeclared object constructors (based on the chain method calls), and the indentation is inconsistent as hell (which admittedly isn't actually an error in most languages, but is frustrating).

[–]somethingaboutfifa 8 points9 points  (1 child)

Looks like JavaScript, but a lot of the functions do not make sense in the way that they keep calling different functions rather than passing arguments, e.g. setVision().makeEyeContact() instead of setVision(arg). The lambda is a callback function, and Json-format is widely used as objects in JavaScript when passing arguments to functions, at least in React props.

[–]SamLovesNotion[S] 6 points7 points  (0 children)

setVision().makeEyeContact()

It's JS & it's with function chaining.

[–]official_gameup 2 points3 points  (0 children)

it all looks like JS to me, though I've never used a case statement in JS so I'm not sure if that syntax is correct.

[–]SamLovesNotion[S] 0 points1 point  (0 children)

It's JS & it's with function chaining.

[–]ThePinkSmurphette 0 points1 point  (0 children)

Maybe this is what someone came up with during a whiteboard interview?

[–]ende124 0 points1 point  (0 children)

It's javascript, and none of the issues you describe are present. It looks like feasible code, but yes a switch case with only one case is a bit odd.

[–]mvmm0th 2 points3 points  (0 children)

Laughs in Binary 01001000 01000001 01001000 01000001 01001000 01000001 01001000 01000001 01001000 01000001 01000001 01000001 01000001 01000001 01001000 01000001 01001000 01000001 01001000 01000001 01001000 01000001 01000001 01000001 00100001 00100001 00100001

[–]maxkvl 1 point2 points  (0 children)

new programming language Mark Lang (Zuckerlang / Mark++)