Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Beginner Question Thread

Name: Anonymous 2014-05-26 22:20

The atmosphere of /prog/ is not always welcoming to beginning programmers, so I hereby proactively create this thread as a safe place for beginning programmers. You may use this thread to discuss your experiences, feelings, and questions relating to your entering of the field of programming. Should you encounter any difficulty on your journey to becoming a computer scientist, have no fear, and post in here! However, try to keep the questions concept oriented, or on personal projects. It isn't enjoyable to do someone's homework for them. Special priority will be given to NEETs and those without access to an educational institution.

Name: Anonymous 2014-05-29 16:02

>>40
Strange that you're so worked up about Rust syntax when it's an Algolian crapmound with

Cons(1, box Cons(2, box Cons(3, box Nil)));

No infix operators, fucking parentheses and curly braces everywhere - and you're saying that it's turning into a pathetic C++ clone just now?

Name: bust a rhymes 2014-05-29 16:38

rust a shit

Name: Anonymous 2014-05-29 16:40

>>39
It's box T. And you won't write it frequently enough to matter. 99% of the time you want a borrow (if not just a plain value), which isn't changing. The idea is partly to get people to stop heap-allocating everything. And yes, you can borrow stack variables.

BTW, neither of your examples are anything like Rust syntax. I hear a lot of complaining that Rust is going all C++, yet Rust has done away with type/variable juxtaposition. It uses ML-style type annotations instead.

Name: Anonymous 2014-05-29 16:46

>>43
99% of the time you want a borrow
If that was true no one would care about Rust in the first place. 99% of the time I want an owned box.

Name: Anonymous 2014-05-29 16:51

Name: Anonymous 2014-05-29 20:19

>>45
There's no need to annotate the LHS, you would write let foo = box 10; in real code.

Name: Anonymous 2015-04-18 15:46

Hello /prog/, a Coq question (second exercise page 20 Coq in a hurry).

I'm trying to prove the following:
forall A B C D: Prop,(A->B)/\(C->D)/\A/\C -> B/\D
That is, in Coq, I have
Coq < Lemma example forall A B C D: Prop,(A->B)/\(C->D)/\A/\C -> B/\D.
1 subgoal
====
forall A B C D : Prop, (A->B)/\(C->D)/\A/\C -> B/\D
example < intros A B C D H.
1 subgoal

A : Prop
B : Prop
C : Prop
D : Prop
H : (A->B)/\(C->D)/\A/\C
====
B/\D
example < destruct H as [H1 [H2 [H3 H4]]].
1 subgoal

A : Prop
B : Prop
C : Prop
D : Prop
H1 : (A->B)
H2 : (C->D)
H3 : A
H4 : C
====
B/\D
example <

Now what? I simply want to prove that having A and A->B as hypothesis gives us B.

Then I use
split.
apply H1; assumption.
apply H2; assumption.
Qed.


Thanks for reading, but I solved my problems while writing this post. I realized that I had to destruct H as [H1 [H2 [H3 H4]]] and not as [H1 H2 H3 H4], as I originally tried to do (gave me errors ofc).

Name: Anonymous 2015-04-18 16:52

>>47
MODUS PONENS

Name: Anonymous 2015-04-18 16:57

Name: Anonymous 2015-04-18 18:59

own my boxed anus.

Name: Anonymous 2015-04-18 19:40

>>47
intros; firstorder.

Name: Anonymous 2015-04-19 7:43

>>51
Ah, interesting. Thanks.

Name: Anonymous 2015-04-19 18:23

MODUS ANUS

Name: Anonymous 2015-04-19 23:20

MODUS BBCodens

Name: Anonymous 2015-04-23 18:26

I'm trying to set up a Kareha board and have literally zero idea what I'm doing. I've already gone through the documentation to no benefit. Currently have a domain that I can mess with via cPanel, and I've downloaded the Kareha stuff.

Help please?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List