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

Pages: 1-4041-8081-

x86 Assembly Questions

Name: Anonymous 2014-04-26 23:52

$ cat bork.asm

section .data
fuck: dd 0xDEADBEEF

section .text
global _start
_start:
mov dword [fuck],0xABADC0DA

mov eax,1
mov ebx,0
int 0x80


Why doesn't writing to the .data segment segfault? Shouldn't Linux map it to a read-only page?

$ nasm -f elf bork.asm
$ gold -s -o bork-gold bork.asm
$ ld -s -melf_i386 -o bork-ld bork.o
$ du -bh *
432 bork-gold
132 bork.asm
340 bork-ld
608 bork.o


How does such a minimal binary take up 300+ bytes?

Name: Anonymous 2014-04-26 23:56

Please help me learn assembly

I want to use as but I guess ill switch to nasm if it's better. Look I just need a tutorial that teaches me how to program assembly step by step on linux. Please?

Name: Anonymous 2014-04-26 23:59

How does such a minimal binary take up 300+ bytes?

probably the elf header and shit, try objdump -d to see maybe?

Name: Anonymous 2014-04-27 0:05

Name: Anonymous 2014-04-27 0:18

>>2
https://web.archive.org/web/20120822144129/http://www.cin.ufpe.br/~if817/arquivos/asmtut/index.html
or if you've never programmed anything in assembly before
https://skilldrick.github.io/easy6502/

>>3
objdump -x bork-ld

bork-ld: file format elf32-i386
bork-ld
architecture: i386, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x08048080

Program Header:
LOAD off 0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
filesz 0x00000096 memsz 0x00000096 flags r-x
LOAD off 0x00000098 vaddr 0x08049098 paddr 0x08049098 align 2**12
filesz 0x00000004 memsz 0x00000004 flags rw-

Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000016 08048080 08048080 00000080 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000004 08049098 08049098 00000098 2**2
CONTENTS, ALLOC, LOAD, DATA
SYMBOL TABLE:
no symbols

Name: Anonymous 2014-04-27 0:20

>>5
thanks so much!

Posting my makefile since it was tricky to find the right options


all: 32 64

32:
nasm -f elf hello.s
ld -s -o hello -m elf_i386 hello.o

64:
nasm -f elf64 hello.s
ld -s -o hello hello.o

Name: Anonymous 2014-04-27 0:27

>>5
So according to this, my text and data segments only take up 26 bytes, and the other 314 bytes of my program are in the ELF header. What the fuck.

Also, confirmed that the data segment is writeable. Another what the fuck.

Name: Anonymous 2014-04-27 5:41

>>7
Of course data segment is writeable, as is bss segment. I think data is where your `int g_foo = 42; global variable goes, so you need that to be writeable so your variable is mutable.

Name: Anonymous 2014-04-27 5:46

>>7
A writeable .data segment is the norm. If you want fuck to be immutable, put it in .text or .rodata.

Name: Anonymous 2014-04-27 6:09

>>1
eax
32bit x86 code is obsolete and inefficient.

Name: Anonymous 2014-04-27 6:37

>>1
smallest linux executable is 45 bytes of boilerplate:
http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html

smallest DOS exe is just 1 byte

Name: Anonymous 2014-04-27 7:07

>>10
Actually 32 bit code is more efficient because all pointers are half as large; this has a significant effect on code density and instruction cache hit rate. In many cases this outweighs the benefits of the extra general purpose registers that are available in long mode.

Name: Anonymous 2014-04-27 7:17

>>12

Actually real mode is more efficient because all pointers are half as large; this has a significant effect on code density and int 21h cost. In many cases this outweighs the benefits of the extra register width and flat address space that are available in protected mode.

Name: >>12 2014-04-27 7:25

>>11
That's because the DOS COM ``format'' isn't an executable format in any modern sense. DOS just dumped the contents of a .COM file into memory at a fixed address and jumped into it. So you have no dynamic linking, no position independent code, no relocation, nothing. If you want any of that, you need that header ``boilerplate''.

Name: Anonymous 2014-04-27 7:28

>>14
nothing stops COM code from relocating itself.

Name: Anonymous 2014-04-27 7:37

>>13
The functional improvement going from real mode to protected mode is much larger than going from protected mode to long mode. Nearly all modern programs benefit (or even require) memory protection and a 4 GiB virtual address space. Conversely only certain workloads benefit from a 128 TiB virtual address space; for other applications the benefit of sticking with 32 bit pointers in long mode is so large that the Linux kernel supports a whole second 32-bit ABI specifically to allow for it.

Name: Anonymous 2014-04-27 7:40

>>15
It's a pointless exercise to write special purpose loader code for every program that needs to be relocated. The whole point of having a standard executable format is to make it possible for multiple programs to share the same loader.

Name: Anonymous 2014-04-27 7:45

>>17
It's a pointless exercise to write special purpose loader code for every program that needs to be relocated.
That is why we have compiler and static linker. OS kernel shouldn't do anything more than providing hardware abstraction layer. Everything else should be reconfigurable.

Name: Anonymous 2014-04-27 7:53

>>18
When did this become an operating systems discussion?

You are free to reinvent the wheel for every program you write. However I imagine after you've written the same dumb boilerplate loader code for three or four programs I imagine you will end up rearranging the combined result into something that looks a lot like loaders others have already written.

Name: >>19 2014-04-27 8:10

>>18
Also, as a side note - dynamic linkers need not be part of the kernel, and in practice they often are not. On Linux systems the dynamic linkers are just libraries can indeed be replaced.

Name: Anonymous 2014-04-27 8:25

>>19

Works just as okey. For example, Windows 3.1 provided it's own linker.

Name: Anonymous 2014-04-27 9:56

>>8,9
Ah, ok. I relocated fuck to .rodata and bork segfaulted as expected.
I also objdump -x'd this program and confirmed that it sticks the string in .rodata:

#include <stdio.h>
int main(int argc, char **argv) {
puts("EXPERT PROGRAMMER");
return 0;
}


That doesn't explain why it takes 6 fucking kilobytes to poop a constrant string onto stdout, but whatever.

>>11
Thanks for the read. Sticking the whole program inside the ELF header, that's funny.

Name: Anonymous 2014-04-27 11:22

>>11
DOS exe
*com

Name: Anonymous 2014-04-27 11:24

it sticks the string in .rodata
Of course it does. C string literals are const.

Name: Anonymous 2014-04-27 13:33

>>22

Now it's only 4kb.


#include <unistd.h>

int main(int argc, char** argv) {
write(STDOUT_FILENO, "EXPERT PROGRAMMER", 17);
return 0;
}

Name: Anonymous 2014-04-27 15:03

>>25
section .rodata
expert: db "EXPERT PROGRAMMER"

section .text
global _start
_start:
; afaik most registers are zeroed at start
mov al,4 ; write syscall
inc ebx ; fd = 1, aka stdout
mov ecx,expert ; str ptr
mov dl,17 ; str len
int 0x80

mov al,1 ; exit syscall
xor ebx,ebx ; error code = 0
int 0x80

$ du -b expert
320

$ size expert
text data bss dec hex filename
35 0 0 35 23 expert

$ objdump -d expert
expert: file format elf32-i386

Disassembly of section .text:

08048060 <.text>:
8048060: b0 04 mov al,0x4
8048062: 43 inc ebx
8048063: b9 74 80 04 08 mov ecx,0x8048074
8048068: b2 11 mov dl,0x11
804806a: cd 80 int 0x80
804806c: b0 01 mov al,0x1
804806e: 31 db xor ebx,ebx
8048070: cd 80 int 0x80


OMG OPTIMIZED

Name: Anonymous 2014-04-27 17:51

>>10
what is it obsolete by you dick head

Name: Anonymous 2014-04-27 18:31

I've impreoved hte program and made it more exciting


section .rodata
expert: db "LPOL"

section .text
global _start
_start:
mov al,4 ; write syscall
xor ebx,ebx
inc ebx ; fd = 1, aka stdout
mov ecx,expert ; str ptr
mov dl,4 ; str len
int 0x80

jmp _start

Name: Anonymous 2014-04-27 18:53

i miss dos

Name: Anonymous 2014-04-27 18:57

prints out a pyramid of stars... what should I prorgam next?

>>29
try dosbos, it can emulate IPX

section .rodata
expert: db "*"
nl: db 0Ah

section .text
global _start
_start:
mov edi,0
.loop:
inc edi
mov esi,edi
call stars
call newline
jmp .loop

mov al,1 ; exit syscall
xor ebx,ebx ; error code = 0
int 0x80

stars:
call star
dec esi
cmp esi,0
jne stars
ret

star: mov al,4
mov ebx,1
mov ecx,expert
mov dl,1 ; length
int 0x80
ret

newline:
mov al,4
mov ebx,1
mov ecx,nl
mov dl,1 ; length
int 0x80
ret

;; *
;; **
;; ***
;; ****
;; *****
;; ******
;; *******
;; ********
;; *********
;; **********
;; ***********
;; ************
;; *************
;; **************
;; ***************
;; ****************
;; *****************

Name: Anonymous 2014-04-27 19:39

Name: Anonymous 2014-04-27 20:36

made it look up an array to know what length each line is


section .rqodata
expert: db "*"
nl: db 0Ah
mr_arr: dd 2,3,4,4,4,2,2,3,4,0

section .text
global _start
_start:
xor edi,edi
loop:
xor esi,esi
mov si,[mr_arr + 4*edi]
cmp esi,0
je done
call stars
call newline
inc edi
jmp loop

done:
mov al,1 ; exit syscall
xor ebx,ebx ; error code = 0
int 0x80

stars:
call star
dec esi
cmp esi,0
jne stars
ret

star: mov al,4
mov ebx,1
mov ecx,expert
mov dl,1 ; length
int 0x80
ret

newline:
mov al,4
mov ebx,1
mov ecx,nl
mov dl,1 ; length
int 0x80
ret

;; **
;; ***
;; ****
;; ****
;; ****
;; **
;; **
;; ***
;; ****

Name: Anonymous 2014-04-28 22:52

any tips of learning x86

Name: Anonymous 2014-04-28 23:04

>>33
You need to be careful that you only use each segment for its intended use. The text segment (.text) can contain both code and data (keeping in mind that any data you place in the text segment cannot be changed by your program during execution). The initialized part of the data segment (.data) should contain just data, not code. And the uninitialized part of the data segment (.bss) cannot have values placed in it as assembly time at all -- all you can do here is allocate memory (that is, add to the total amount of memory to be included as uninitialized data). In all three types of segment, you can define symbolic labels; such a label has as its value an address within that segment.

Name: Anonymous 2014-04-28 23:48

I managed to call a c function today using the host c file:

void foo(void);
void main(void) {
foo();
}

// $ nasm -f elf primes.s
// $ gcc -m32 primes.o host.c
// $ ./a.out
// hello world


and the assembly code:


extern puts
section .data
msg db "hello world",0

section .text
global foo
foo:
push ebp ; save ebp onto the stack
mov ebp,esp ; save the stack pointer in ebp
push msg ; push argument onto the stack
call puts
add esp,4 ; skip past 'msg' on the stack
mov esp,ebp ; reset the stack???
pop ebp ; restore ebp

mov eax,1 ; sys_exit
mov ebx,0 ; 0
int 0x80


not totally sure its correct.. and I'd like to do it without a .c file

Name: Anonymous 2014-04-29 0:06

>>34
Fuck you, I make a new segment for every function I need and it's never bitten me in the ass.

Who cares about Windows asm any more anyway. Is it because AT&T syntax is such ugly garbage? Yeah, GCC made a blunder choosing that one.

Also, FASM is better than nasm.

Name: Anonymous 2014-04-29 0:15

>>36
FASM is the CL of assemblers, that is, for niggers

Name: Anonymous 2014-04-29 0:49

>>36
Is it because AT&T syntax is such ugly garbage? Yeah, GCC made a blunder choosing that one.
GCC allows you to select between Intel and AT&T syntax, same goes for GAS

FASM
Hipster shit, think of ruby or python

Name: Anonymous 2014-04-29 1:28

>>38
What assembler is better than FASM? And what the fuck do you mean by ``hipster''? You could say ``normalfag'' as fucking every ``normal'' person uses ruby or python.

Name: Anonymous 2014-04-29 10:49

>>38 i think you're stuck with at&t syntax for inline asm though

Name: Anonymous 2014-04-29 12:14

I have just created the ultimate makefile

[code]BINS := hello1 hello
ARCH := 32

ifeq ($(ARCH),32)
nasm_format := -f elf
ld_emulation := -m elf_i386
else # ifeq 64
nasm_format := -f elf64
ld_emulation :=
endif

all: $(BINS)

$(BINS): %: %.o
ld $(ld_emulation) -s -o $@ $@.o

%.o: %.s
nasm $(nasm_format) $<

clean:
rm -f $(BINS)
rm -r *.o
rm -f *~[code]

Name: Anonymous 2014-04-29 12:15

I have just created the ultimate makefile

BINS := hello1 hello
ARCH := 32

ifeq ($(ARCH),32)
nasm_format := -f elf
ld_emulation := -m elf_i386
else # ifeq 64
nasm_format := -f elf64
ld_emulation :=
endif

all: $(BINS)

$(BINS): %: %.o
ld $(ld_emulation) -s -o $@ $@.o

%.o: %.s
nasm $(nasm_format) $<

clean:
rm -f $(BINS)
rm -r *.o
rm -f *~

Name: Anonymous 2014-04-29 12:53

>>39
What assembler is better than FASM?
GAS is the best in my opinion but in fact, even nasm and tasm are better than this shit

>>40
http://wiki.osdev.org/Inline_Assembly#Intel_Syntax

Name: Anonymous 2014-04-29 14:14

>>43
Why do you think so? Is there a reason you prefer needless garbage and poor macros?

Name: Anonymous 2014-04-29 15:57

I did it! Prime number generator in assembly! WOW


#include <stdio.h>
int asm_main(void);
void print_number(int i) { printf("%d\n",i); fflush(stdout); }
int main(void) { return asm_main(); }



extern print_number
extern puts

section .data
msg db "LETS PRIMES.. 2",0

section .bss
prm: resd 1
num: resd 1
mem: resd 130000

section .text
global asm_main
asm_main:
enter 0,0
pusha

push ebp
mov ebp,esp
push msg
call puts
add esp,4
pop ebp

mov dword [num],0
mov dword [prm],3

.loop:
;; Here we put the prime we found
;; into the list of primes
mov eax,[prm]
inc dword [num]
mov ebx,[num]
mov [mem+4*ebx],eax

mov ebp,esp
push eax
call print_number
add esp,4

call next_prime
jmp .loop

popa
mov eax,0 ; return 0
leave
ret

next_prime:
add dword [prm],2

mov ebx,0
.loop:
inc ebx

mov eax,[prm]
mov ecx,[mem+4*ebx]
mov edx,0
div ecx ; eax/(ecx:edx)
cmp edx,0
je next_prime

cmp ebx,[num]
jne .loop

ret

Name: Anonymous 2014-04-29 19:07

>>45
But that's just C with some assembly used for hot loops. Surely you can do better.

Name: Anonymous 2014-04-29 20:11

>>46
I can't...

Name: Anonymous 2014-04-29 20:24

Name: Anonymous 2014-04-30 2:45

>>45-47
That program can be written entirely in assembly and linked against libc. No need to write your own startup code. Just call printf directly (the call to fflush can be totally omitted since stdout will be flushed automatically when main returns).

Name: Anonymous 2014-04-30 7:46

>>45
OMG OPTIMISED!

Name: Rob `Commander' Pike 2014-05-04 9:08

where do i get some crackmes

Name: Rob `Commander' Pike 2014-05-04 9:15

on linux

Name: Rob `Commander' Pike 2014-05-04 10:36

crackmes.de has a linux section

Name: Anonymous 2014-05-04 13:39

>>51

Cracking becomes useless skill today, because software moves to the cloud. It was really funny, when these faggots found that Diablo 3 cannot be cracked, because the game logic is in the cloud.

Today it is mostly reverse engineering (when Chinese manage steal American aircraft and want to RE its stuffing) and supporting legacy code (when employer lost his sources).

Name: Anonymous 2014-05-04 15:30

>>54
Now machine learning can be used to construct a model of game logic to fit recorded data.

Name: Anonymous 2014-05-05 15:03

I've written game of life in assembly!!!

Not sure what to try next, but I need to keep leaning - help me out?

Name: Anonymous 2014-05-05 15:22

>>56
Write 2A03 emulator in x86 assembly. Contrib your code to some major NES emulator project.

Name: Anonymous 2014-05-05 15:56

>>57
That sounds like a project I'd work on, except 5A22 in MIPS. Damn mode 7 fps rates.

Name: Anonymous 2014-05-05 16:33

>>55
Machine learning is a victim to the curse of dimensionality
http://en.wikipedia.org/wiki/Curse_of_dimensionality

A game, like Diablo 3, has a lot of instances of some CObject class, which has a some (many) of dimensions on it's own (like monster's health and damage, which itself correlates with weapon's damage and monster's strength). Software pirates can't just simply record statistics from the server and curve-fit observations into the alternative server implementation. Moreover, pirates are usually college dropouts, while analyzing statistics requires a lot of math skills.

Name: Anonymous 2014-05-05 21:19

>>59
I'm sure one of us could do it. It would be a fun project. Especially if the work done could be reused on other games like this.

Name: Anonymous 2014-05-06 9:28

* Sections: global variables go in the .data section, you can also reserve space in the .bss section but they start out as having the value 0. Your actual code goes in the .text section.

* Labels: assembly programming is all about gotos, there is jmp to go to a label, and then there are various conditional jumps jne (jump not equal), jc (jump if carry) they look at EFLAGS register which notes down information about the last arithmetic calculation you did.

* Registers: So there's a few 32 bit registers, eax, ebx, ecx, edx and they have ax, al, ah parts (so you can work with 16 or 8 bits) - you can zero or sign extend a number to go from one number type to a higher width one. There's also ebp and esp registers for the base and stack pointers.

* Stacks: The stack grows down so you subtract from sp to get more stack space. push and pop are useful.

* C function calls: To call a c function you put the parameters on the stack them 'call' it, once it returns you have to clear up too. c functions will preserve some registers but others you have to store on the stack and restore them once it returns.

* linux syscalls: you can do linux syscalls by putting parameters into registers then using the int 0x80 interrupt. This lets you write programs that don't use libc.

Name: Anonymous 2014-05-06 10:06

>>59
How to get a working crack for games like that:
1: borrow $50,000 from mafia
2: give $49,999 and a soda of her choice to studio programmer in exchange for the source
3: insert malware into cracked versions to steal data and be a botnet
4: monetize
5: pay $100,000 back to mafia

Alternatively, you can just fly to India and walk around the slums until you find the sub-sub-sub-contractor and pay him $50 for it, but it's less safe.

Name: Anonymous 2014-05-06 10:17

>>60

When you finally compile a half-broken implementation of the game server, Blizzard would already releasing Diablo 5 and no one would care about the years of your work.

That was the case with Ultima Online. When hobbyists managed to get up the servers, the game was long outdated and replaced with World of Warcraft.

Name: Anonymous 2014-05-06 15:25

>>63
It would be faster if it was automated. And why so negative?

Name: Anonymous 2014-05-06 20:11

>>64

And why so negative?
Because I'm a negative person. Hope everyone die in a nuclear war.

Name: Anonymous 2014-05-06 20:32

>>65
Are you a goddamn iOS evangelist or what?

Name: Anonymous 2014-05-07 17:09

Name: Anonymous 2014-05-08 13:30

x86 programming challenge

Implement fibonacci iteratively and recursively.

Name: Anonymous 2014-05-18 8:33

necrosage

Name: fibsrecurse.s 2014-05-18 8:35

extern print_number

section .text
global asm_main
asm_main:
enter 0,0
pusha

push dword 45
call fib
add esp,4

push ebp
mov ebp,esp
push eax
call print_number
add esp,4
mov esp,ebp
pop ebp

popa
mov eax,0 ; return 0
leave
ret

fib:
mov eax,[esp+4]

cmp eax,0
jne skip_fib0
ret
skip_fib0:

cmp eax,1
jne skip_fib1
ret
skip_fib1:

dec eax
push eax

call fib
mov ebx,eax

pop eax
push ebx ;need to save ebx
dec eax
push eax
call fib
add esp,4
mov ebx,eax

pop eax
add eax,ebx

ret

Name: fibsiter.s 2014-05-18 8:37

extern print_number

section .text
global asm_main
asm_main:
enter 0,0
pusha

;; The loop instruction decrements ECX and jumps to the address specified by arg unless decrementing ECX caused its value to become zero.
;;; calculate fib(ecx), must be 2 or more
mov ecx,1507

mov eax,0
mov ebx,1
dec ecx

iter:
mov edx,ebx
add ebx,eax
mov eax,edx
loop iter

push ebp
mov ebp,esp
push ebx
call print_number
add esp,4
mov esp,ebp
pop ebp

popa
mov eax,0 ; return 0
leave
ret

Name: Anonymous 2014-05-21 4:05

>>71
enter
pusha
popa
leave

286 QUALITY!

Name: Anonymous 2014-05-21 4:15

Love the "leave" mnemonic - it is 1-char less than the return from C/C++

Name: Anonymous 2014-05-21 13:59

>>71-73
enter, leave, loop and friends are effectively deprecated and will use a slow micro-coded implementation on newer CPUs. push, pop, movs and stos are among a few complex instructions that are still aggressively optimized.

Name: Anonymous 2014-05-21 19:30

According to Agner Fog movs and stos are still slower than manual mov&add, though they do take up less icache.

Name: Anonymous 2014-05-21 19:42

>>74

can't Intel just move the CISC crap into firmware and expose the RISC microcode directly?

Name: Anonymous 2014-05-22 3:57

>>75
According to Agner Fog

And the manuals say...? Suppose you are using a rep prefix, what then?

>>76
No, because then they would have to write a comprehensible specification of how their microcode is implemented and promise not to change it (very much). The former could be hard given that the micro-op interface has been a closely guarded trade secret for so long. The latter would be contrary to Intel's x86 compatibility religion, and given how the the whole P6/Netburst/Nehalem history has gone I doubt they'd want to tie their hands anyway.

Technically, the micro-op architecture is almost certainly designed with on-chip generation in mind (optimized for simple translation and ease of execution) and probably wouldn't perform well if the frontend were just thrown away leaving micro-ops to be fetched from Lx SRAM and then from DRAM.

Finally, who would care enough to write their own microcode anyway, if the x86 frontend was maintained? DEC went a somewhat similar route with their PALcode and nobody other than Microsoft and Digital themselves ever bothered have custom microcode written for their OS.

Name: Anonymous 2014-05-26 7:15

Is it true that MMU considerably slows down memory access and a single address space solution would be several times more efficient? As I understand it, spawning a process is a very expensive operation, due to MMU.

Name: Anonymous 2014-05-26 8:38

>>78
yes

Name: Anonymous 2014-05-26 9:14

C/C++ sucks because you can't attach metainfo to a function, determine it's size or copy it to another location (GCC cannot into position-independent code).

So the only way to attach meta info to a function pointer is through a hashtable, which is very inefficient compared to something like

char *getFunctionName(void (*f)()) {
return *((char**)f-1);
}

Name: Anonymous 2014-05-26 9:38

>>80
can you tell me one portable language that can do this?
you can always use non-portable extencions

Name: Anonymous 2014-05-26 10:09

>>80
"very inefficient"...? REALLY? Honestly, are you 12? I think you must be. It isn't inefficient at all, it's just you're to damned lazy and immature to do anything for yourself if the language doesn't do for you. If you want to tabulate data about functions make a fucking TABLE.

Name: Anonymous 2014-05-26 17:14

>>81

you can always use non-portable extencions
there are no nonportable extensions, besides patching intermediate assembly code.

>>82
If you want to tabulate data about functions make a fucking TABLE.
Table lookup is O(log2(N)). And you have to initialize it, after addresses become known.

Name: Anonymous 2014-05-26 19:00

>>83
Umb, hashtable lookup is O(1) if the size of the key is bounded by a constant. Though this would be interesting to have. A lisp to assembly compiler should implement the documentation string this way. Although I don't know if a page with execute permissions is the best place to store it. It might clog the instruction cache.

Name: Anonymous 2014-05-26 19:19

>>84
Umb, hashtable lookup is O(1)
that O(1) is order of magnitude slower than array[i]'s O(1)

Name: Anonymous 2014-05-26 19:41

>>83
Lookup can be O(1), especially with a non-hash table. Bury the fp in a global struct. (But globals! Functions are global symbols too, deal with it.)

>>85
O(10) is still O(1). You're going to have to switch to cyclomatic complexity if you want to whine about large multipliers.

Name: Anonymous 2014-05-26 20:25

>>86
Computers have finite amount of memory (i.e, they are FSMs), meaning that any computation is O(1), yet this O(1) tells you nothing.

Name: Anonymous 2014-05-26 20:39

>>87
That isn't true. It means many computations could be written as O(1) with a large constant multiplier. Some could not, in fact, because some computations cannot be made to fit in memory in an O(1) form. Others cannot be expressed in a general O(1) form if P!=NP, and even if P=NP, the memory required might exceed what is available.

Name: Anonymous 2014-05-26 21:29

>>87
You must be the Reuleaux triangle faggot from a few years back.

Name: Anonymous 2014-05-26 21:48

>>88

http://en.wikipedia.org/wiki/Coppersmith%E2%80%93Winograd_algorithm
it is not used in practice because it only provides an advantage for matrices so large that they cannot be processed by modern hardware.
so a fast algorithm isn't always useful.

Name: Anonymous 2014-05-26 21:52

So you losers failed computer science and now instead of debating it with colleagues in academia you debate with fellow losers on here?

Name: Anonymous 2014-05-26 21:54

>>90
Why not just calculate the matrices in your head?

Name: Anonymous 2014-05-26 21:57

I can solve the halting problem in my head. You aren't a qualified programmer if you can't as well.

Name: Anonymous 2014-05-26 22:01

>>91

Enjoy wasting your $150,000 on MIT or be a debt-slave your whole miserable office life.

Name: Anonymous 2014-05-26 22:03

>>94
Don't see his posts!

Name: Anonymous 2014-05-26 22:08

Programming is just mental manual labour.

Name: Anonymous 2014-05-26 22:18

After Aaron Swartz was murdered by MIT it was no longer worthy in my eyes. I'd rather receive my education from the underground.

Name: Anonymous 2014-05-26 23:34

>>90
It's not O(1) and can't be generalized to O(1) in finite space, which was the point of >>88. The original point remains that O(k*n) for k=10 is still pretty great.

>>93
That's called a siezure and you should be on medication.

Name: Anonymous 2014-05-27 0:57

>>98
Atheists cant do math, what's new?

Name: Anonymous 2014-05-27 1:11

>>99
Why do you love atheists so much, theist-kun? Have you both considered FUCKING?

Name: >>98 2014-05-27 4:33

I have considered fucking. But not with >>99-san

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