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

GOOG's self-driving car written in FIOC

Name: Anonymous 2012-03-09 14:32

Problem?

Name: Anonymous 2012-03-09 14:41

- Python (like most other scripting languages) does not require variables to be declared, as (let (x 123) ...) in Lisp or int x = 123 in C/C++. This means that Python can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom and you lost all unsaved data. Local and global scopes are unintuitive. Having variables leak after a for-loop can definitely be confusing. Worse, binding of loop indices can be very confusing; e.g. "for a in list: result.append(lambda: fcn(a))" probably won't do what you think it would. Why nonlocal/global/auto-local scope nonsense?
- Python has a faulty package system. Type time.sleep=4 instead of time.sleep(4) and you just destroyed the system-wide sleep function with a trivial typo. Now consider accidentally assigning some method to time.sleep, and you won't even get a runtime error - just very hard to trace behavior. And sleep is only one example, it's just as easy to override ANYTHING.

Name: Anonymous 2012-03-09 14:41

that's probably why it takes several hundred milliseconds to make decisions

Name: Anonymous 2012-03-09 14:42

THEN go boom and you lost all unsaved passengers.
self-fix

Name: Anonymous 2012-03-09 16:46

>>2
Fucking units test, how do they work?

Name: Anonymous 2012-03-09 16:50

Type time.sleep=4 instead of time.sleep(4)
0/10

Name: Anonymous 2012-03-09 16:58

C/C++ (like every programming language) does not require variables to be correct, as

int fib(int n) {
        int p = 1;
        while (n--)
                p * n;
        return n;
}


This means that C/C++ can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom and
you lost all unsaved data.

Python: 1
>>6: Segfault detected

Name: Anonymous 2012-03-09 16:59

Also,

(define car sqrt)

Python: 2
>>6: Stack overflow

Name: Python 2012-03-11 7:10

Python here, brb, driving a car.

Enjoy your fibs.

P.S. Hal Abelson says hello.

Name: Anonymous 2012-03-11 9:29

>>8
No.

$ sbcl
This is SBCL 1.0.55.0-abb03f9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>;.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (defun car (x) (sqrt x))
; in: DEFUN CAR
;     (SQRT X)
;
; caught WARNING:
;   Derived type of X is
;     (VALUES LIST &OPTIONAL),
;   conflicting with its asserted type
;     NUMBER.
;   See also:
;     The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
;   caught 1 WARNING condition
STYLE-WARNING: redefining COMMON-LISP:CAR in DEFUN

debugger invoked on a SYMBOL-PACKAGE-LOCKED-ERROR:
  Lock on package COMMON-LISP violated when setting fdefinition of CAR while in
  package COMMON-LISP-USER.
See also:
  The SBCL Manual, Node "Package Locks"
  The ANSI Standard, Section 11.1.2.1.2
restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE      ] Ignore the package lock.
  1: [IGNORE-ALL    ] Ignore all package locks in the context of this operation.
  2: [UNLOCK-PACKAGE] Unlock the package.
  3: [ABORT         ] Exit debugger, returning to top level.

(PACKAGE-LOCK-VIOLATION
 #<PACKAGE "COMMON-LISP">
 :SYMBOL
 CAR
 :FORMAT-CONTROL
 "setting fdefinition of ~A"
 :FORMAT-ARGUMENTS
 (CAR))
0]

Name: Anonymous 2012-03-11 9:54

Haskell is the only obvious choiout of memory (requested 2097152 bytes)

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-03-11 11:01

>>7
Holy shit are you stupid.

Name: Anonymous 2012-03-11 11:09

>>12
He's of the "I'd rather write a unit test for every line of code rather than suffer the compiler telling me that I screwed up" crowd.

Name: Anonymous 2012-03-11 13:54

>>13

the compiler can not catch all errors. relying on the compiler leads to more errors in the long run

Name: Anonymous 2012-03-11 16:41

ITT: EVERYONE BUTTMAD!!!

Name: Anonymous 2012-03-11 17:40

his means that Python can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom

Post some code to show me what you mean.

Agreed on other counts.

Name: Anonymous 2012-03-11 18:52

>>16

>>> def f(n):
...   if(n==1 or n==2):
...     return 1
...   else:
...     return f(n-1)+F(n-2)
...
>>> f(1)
1
>>> f(2)
1
>>> f(3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 5, in f
NameError: global name 'F' is not defined
>>>

Name: Anonymous 2012-03-11 18:59

>>17
Does Python have anything like Perl's use strict 'vars'?

Name: Anonymous 2012-03-11 22:17

C (like most other compiled languages) does not require bounds to be checked. This means that C can't even detect a trivial off-by-one error - it will produce a program, which will continue working for hours until it reaches the error - THEN go stack overflow and you lost all unsaved data.

Name: Anonymous 2012-03-11 22:40

>>19
Nigga, you just went full retard. Out-of-bounds array indexing doesn't cause a stack overflow even if the array is on the stack. You should probably Google the definition of "stack overflow" (hint: it has something to do with moving a stack pointer) and get your ass back to /vip/.

Name: Anonymous 2012-03-12 0:37

>>20
Nigga, you just went full mad.

Name: Anonymous 2012-03-12 0:38

Name: Anonymous 2012-03-12 1:11

>>22
PERL (like most other dong languages) does not require doubles to be checked. This means that PERL can't even detect a trivial off-by-one dub GET - it will produce a shitpost, which will continue shitting for hours until it reaches anti-satori - THEN go threadstopped and you didn't lost all unsaved sages.

Name: Anonymous 2012-03-12 1:17

>>19
Hey African, your granny's a compiled language. U know der's no such fing rite? Dat kinda shit's up to da implementation, not da language. *slips a zuckerberg in your bum*

Name: Anonymous 2012-03-12 3:52

>>24
zuckerberg
LOLOLOLOL

Name: Anonymous 2012-03-14 1:56

ouch

Name: Anonymous 2012-03-14 2:16

Come on, now. Who wouldn't want a self driving car? VROOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOMMMMMMMMMMMMMMMMMMMMMm

Name: Anonymous 2012-03-14 2:54

Come on, now. Who wouldn't want a self driving cudder?
What sound does a cudder make?

Name: Anonymous 2012-03-14 8:34

>>28
like a kitten purring

Name: Anonymous 2012-03-14 22:41

HOT WHEELS SPEEDIN' AWAY.

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