Message from @Durtle02

Discord ID: 391754872329994250


2017-12-17 00:50:05 UTC  

any of you guys ever had to program in assembly?

2017-12-17 00:50:14 UTC  

Yes.

2017-12-17 00:50:33 UTC  

that was most cancer

2017-12-17 00:51:32 UTC  

Worst assembly I had to deal with was CUDA/PTX asm.

2017-12-17 00:51:42 UTC  

lol

2017-12-17 00:51:47 UTC  

Had to literally edit the assembly by hand because the compiler was generating wrong code.

2017-12-17 00:51:57 UTC  

wow

2017-12-17 00:52:01 UTC  

that sucks

2017-12-17 00:52:18 UTC  

Back in the CUDA 1.0 days.

2017-12-17 00:52:25 UTC  

```Java
java.lang.NullPointerException
```
FUUUUUUCK OOOOOOOOOOOOOOFFFFFFFFFFFFFFFFFFFFFF

2017-12-17 00:52:29 UTC  

AAAAAAHHHHHHHHHHHHH

2017-12-17 00:52:31 UTC  

lol

2017-12-17 00:52:40 UTC  

post your code dude

2017-12-17 00:52:59 UTC  

Had to translate this

2017-12-17 00:53:01 UTC  

debugg session

2017-12-17 00:53:05 UTC  

Too much to post

2017-12-17 00:53:15 UTC  

```CPP
// The function1 is a recursive procedure defined by:
// function1(n) = 2*n if n <= 4
// = n*function1(n-2) + function1(n-3) + n otherwise.

int function1(int n)
{

if (n <= 4)
{
return 2*n;
}
else
{
int comp = n*function1(n-2) + function1(n-3) + n;

return comp;
}
}

// The main calls function1 by entering an integer given by a user.
void main()
{
int ans, n;

printf("Enter an integer:\n");

// read an integer from user and store it in "n"
scanf("%d", &n);

ans = function1(n);

// print out the solution computed by function 1
printf("The solution is: %d\n", ans);

return;
}
```

2017-12-17 00:53:16 UTC  

I know what's wrong (I think)

2017-12-17 00:53:49 UTC  

I also lost the backup code that was working

2017-12-17 00:53:52 UTC  

There's no `void main` in C++, you drunk?

2017-12-17 00:54:00 UTC  

lmao

2017-12-17 00:54:07 UTC  

https://cdn.discordapp.com/attachments/372508286529961996/391754901232943106/1513460349662.png

2017-12-17 00:54:17 UTC  

you sure about htat?

2017-12-17 00:54:20 UTC  

that

2017-12-17 00:54:25 UTC  

Yes, I'm sure.

2017-12-17 00:54:37 UTC  

I played a language lawyer on the internet, in the past.

2017-12-17 00:55:03 UTC  

cuz void main worked for me before

2017-12-17 00:55:12 UTC  

Don't make me fucking quote ISO/IEC 14882 on your ass.

2017-12-17 00:55:21 UTC  

do it

2017-12-17 00:55:47 UTC  

do it

2017-12-17 00:56:34 UTC  

https://cdn.discordapp.com/attachments/372508286529961996/391755521436418060/Screenshot_from_2017-12-16_22-56-12.png

2017-12-17 00:57:02 UTC  

It shall have a return type of type `int`.

2017-12-17 00:59:11 UTC  

This is the latest draft, for a more up-to-date version.

2017-12-17 00:59:28 UTC  

¯\_(ツ)_/¯

2017-12-17 00:59:34 UTC  

fucking visual studios

2017-12-17 00:59:59 UTC  

Visual Studio is garbage for C++ support.

2017-12-17 01:00:03 UTC  

```scheme
(define (hofstadter-male-female n)
(letrec ((female (lambda (n)
(if (= n 0)
1
(- n (male (female (- n 1)))))))
(male (lambda (n)
(if (= n 0)
0
(- n (female (male (- n 1))))))))
(let loop ((i 0))
(if (> i n)
'()
(cons (cons (female i)
(male i))
(loop (+ i 1)))))))

(hofstadter-male-female 8)

(define (find-first func lst)
(call-with-current-continuation
(lambda (return-immediately)
(for-each (lambda (x)
(if (func x)
(return-immediately x)))
lst)
#f)))
```

2017-12-17 01:00:14 UTC  

IS THIS ENOUGH PARAENTHESES MR KRABS?