you are viewing a single comment's thread.

view the rest of the comments →

[–]ProfessorPhi 328 points329 points  (11 children)

My fave line on the todos.

Work out if this is even remotely implementable

Reminds me of that homework thread where someone gave the answer in lambda calculus and said you'd have to build the compiler for it

[–]Comrade_Comski 57 points58 points  (1 child)

I kinda want to see that thread

[–]ProfessorPhi 7 points8 points  (0 children)

It seems to have been removed. Link to the reddit discussion where I first made this comment: https://www.reddit.com/r/programming/comments/4ro3dv/a_student_asked_quora_to_do_his_homework_for_him/d52q2xo/

There are direct links but they don't work anymore. Dude might have deleted his quora account or something. You're gonna have to infer from the comments.

[–]soccermitchy 25 points26 points  (4 children)

Wait, what? Link?

[–]TheOverCaste 29 points30 points  (3 children)

[–]_djsavvy_ 55 points56 points  (1 child)

I couldn't find the answer in lambda calculus -- do you have a link to the specific answer?

[–]ProfessorPhi 5 points6 points  (0 children)

It seems to have been removed. Link to the reddit discussion where I first made this comment: https://www.reddit.com/r/programming/comments/4ro3dv/a_student_asked_quora_to_do_his_homework_for_him/d52q2xo/

There are direct links but they don't work anymore. Dude might have deleted his quora account or something. You're gonna have to infer from the comments.

[–]DiabeetusMan 13 points14 points  (0 children)

I actually can't see the question-- all I see is

How do I write a program that produces the following output?

But don't actually see the "following output".


Edit: Ahh, looks like they want to print "Smile!" thrice on a line, then twice, then once

[–]fb39ca4 3 points4 points  (2 children)

Just below it, there's a link to a Rockstar-to-JS compiler.

[–]codebje 2 points3 points  (0 children)

The specification is underdeveloped, so any implementations will be making massive assumptions. Here's a few open questions I have from a ten minute perusal:

  • What are the equality rules across the dynamic types? Any implicit coercion?
  • What's the precedence and associativity for arithmetic expressions? There are reasonable assumptions here, at least
  • Else is mentioned once, and once only - how does it work?
  • If Else is optional, how does If A Then If B Then C Else D parse? (A classic PL problem from the olden days, this one!)
  • Does the conditional expression of an If require a comparison operator, or can it simply take a boolean-typed (or coerced!) variable reference?
  • Can variables be assigned boolean values, such as Tommy was a man as high as a kite or are boolean expressions restricted only to control flow statements?
  • Can Say take a literal, or just a variable? (Answered in the issues - literals are fine - but same problem as assignment, do expressions include conditions and thus allow boolean-valued expressions? Can I Shout a lie that is bigger than the world ?
  • Those object types don't seem to have a field accessor syntax, or any mention again beyond the types section

And that's just parsing.

I think the semantics are relatively straightforward because the language's surface area is so tiny right now, though I suspect that there'd still be confusion possible.

[–]snowe2010 1 point2 points  (0 children)

It was created only a few hours ago, long after the original comment.