[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>Programming Theory Thread, too much normie shit on /g/ edition

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 2

File: Edsger_Wybe_Dijkstra.jpg (846KB, 1200x1600px) Image search: [Google]
Edsger_Wybe_Dijkstra.jpg
846KB, 1200x1600px
>Programming Theory Thread, too much normie shit on /g/ edition

We had a formal design methods module last year. It was entirely based on Dijkstra's work and the laws of calculus, predicate calculus etc.

After a while I simply realized that most of the proofs were simply making statements about the truth or non-truth of a given line of code.

Ended up doing okay in it. Got 80% CA and exam was 70-something. Last lecture I asked my math prof -- "Why would we ever proof a program ourselves if a compiler/interpreter could do it better and faster?"

His response, "Ask Edward Dijsktra."
>kek

What do you think /g/? You've all probably dealt with Dijkstra wannabe professors before. Is there tangible benefit to his coding beliefs in 2016 or as higher level languages evolve will it even matter in the future?
>>
>why would I ever do a thing when I could just rely on the work of people smarter than me to do it better
You wouldn't, code monkey
>>
>>57668935

By that logic I should construct my own transistors and discrete electronics too presumably.

Brb harvesting silicate minerals.
>>
>>57669076
You should certainly know how
>>
I don't get it. Is it a rooster thread?
Axiom fu : forall A : Prop, A \/ ~ A.
Check fu.

Axiom iif : forall T (A : Prop), (A -> T) -> (~ A -> T) -> T.
Check iif.
Arguments iif {_} _ _ _.

Axiom iif_true :
forall T (A : Prop) (ft : A -> T) (ff : ~ A -> T) (H : A),
iif A ft ff = ft H.
Check iif_true.
Arguments iif_true {_ _} _ _ _.

Axiom iif_false :
forall T (A : Prop) (ft : A -> T) (ff : ~ A -> T) (H : ~ A),
iif A ft ff = ff H.
Check iif_false.
Arguments iif_false {_ _} _ _ _.

Definition order_sym := fun T (le : T -> T -> Prop) => forall x, le x x.
Check order_sym.
Arguments order_sym {_} _.

Definition order_total :=
fun T (le : T -> T -> Prop) => forall x y, le x y \/ le y x.
Check order_total.
Arguments order_total {_} _.

Definition max :=
fun T (le : T -> T -> Prop) x y =>
iif (le x y) (fun _ => y) (fun _ => x).
Check max.
Arguments max {_} _ _ _.

Theorem max_is_max :
forall T (le : T -> T -> Prop) (_ : order_sym le) (_ : order_total le)
(x y : T),
let m := max le x y in
le x m /\ le y m.
intros T le HS HT x y m.
unfold max in m.
case (fu (le x y)).
intro H.
assert (m = y).
apply (iif_true (fun _ : le x y => y) (fun _ : ~ le x y => x)).
auto.
rewrite H0.
auto.
intro H.
assert (m = x).
apply (iif_false (fun _ : le x y => y) (fun _ : ~ le x y => x)).
auto.
rewrite H0.
split.
apply HS.
unfold order_total in HT.
assert (le x y \/ le y x).
apply HT.
case H1.
intro H2.
exfalso.
apply H.
auto.
auto.
Qed.
>>
you are taking a standard of approach from /g/

while i am not sure what module you are discussing, responses like >>57669187 number in the majority here. Yet the content never ranges beyond porting available libraries to python or from python. It used to be said one does not respond to trolls. That guy responds like his mother. Don't bother with him.

Having said that, what are you talking about? I'll google for now but I'd like to know what you're getting at. It almost sounds like simple integrity checks from before the compiler, to ensure that the system is clean but it could make extension of the system a simpler deal. That there would be more than one person working on any computer is highly possible, that another student would attempt to steal from the others is not as unlikely as we'd all like to think.
>>
oh ok, you're just going over last chapter in every programming book. neeeevermind. im almost certain this is a non issue here because we have access to memory here. at least those of us that dont use the higher level languages.
>>
>>57668901
>Is there tangible benefit to his coding beliefs in 2016
Maybe yes, maybe no.
I think we shouldn't let beliefs guide us into the future.
Or at least we shouldn't blindly follow them.
>>
File: 1476046509837.gif (2MB, 320x240px) Image search: [Google]
1476046509837.gif
2MB, 320x240px
>>57669313
>>57669621

Lookup formal language and formal methods.

Essentially I'm wondering if most programming languages whether they're functional or not use a compiler that is formally designed using these methods that are outlined by Dijkstra

Or are most languages and libraries these days just put together based on practical functionality people need in a language or lib?

There's very sparse information on it outside of Dijkstra's teachings, SICP, and the module I did which was largely theory rather than practical application of the methods. So instead of diving into a lot of reading material I thought I'd ask /g/ for fun.
Thread posts: 9
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.