Microsoft wins again

...

Other urls found in this thread:

muppetlabs.com/~breadbox/software/tiny/teensy.html
archive.rebeccablacktech.com/g/thread/56742962
youtube.com/watch?v=h-tubAlE9o8&t=72s
muppetlabs.com/~breadbox/software/tiny/teensy.htmlehdr:
twitter.com/AnonBabble

...

...

How did you do that?

$ cat hello.c#include void main (void) { puts("Hello, world");}$ gcc hello.c$ ls -lh a.out-rwxr-xr-x 1 user user 7.3K Dec 29 13:18 a.out

59KB? How the fuck did you do that? Its always about 8 kibs

Over 1GB of frameworks and other cancer on the system as a requirement.

KILL YOURSELF OP

$ strip a.out

Now it's only 6312 bytes. OP is looking more foolish by the minute.

Main should always return an int

One of my greatest regrets in college was installing Visual Studio because I could get it for free with a university email account. That shit literally will not uninstall. It's straight up malware. I had to go fish for third party uninstallers to help me manually extract every last bit of crap from Visual Studio from my machine.

Show your workings OP. It may help you to suck less.

Even the c++ version is only 9k.

...

...

$ cat hello.s .section .datamsg: .ascii "Hello, world!\n"len: .word 14.section .text.globl _start_start: movl $4, %eax movl $1, %ebx movl $msg, %ecx movl len, %edx int $0x80 movl $1, %eax movl $0, %ebx int $0x80$ as hello.s -o hello.o && ld hello.o -o hello$ ls -lh hello-rwxr-xr-x 1 user user 936 Dec 29 15:32 hello

Can we go even lower in size?

Yes
muppetlabs.com/~breadbox/software/tiny/teensy.html

And they contain malware too.
Better is just to nuke system and reinstall. And you'd better install a real OS, not an OS emulator from (((microsoft))).

I had Arch until college classes started requiring proprietary Windows-only software for shit. Can't take embedded class without IAR, can't do senior design bullshit deliverables without Microsoft Project and Microsoft Publisher. One more semester and it'll all finally be over.

ok
~ $ cat hello.c#include int main(void) { printf("Hello, world!\n"); return 0;}~ $ gcc -O2 -o hello.out hello.c~ $ ls -la hello.out-rwxrwx--- 1 lapt lapt 7928 Dec 29 11:06 hello.out

54 bytes (512 bytes MBR)

Your school should have computers with all that software installed. When I went to college, I refused to install any of it on my computers so I went to school to do my computer work.

This is 45 bytes

Holy shit is there any reason to use linux now, other than as a backup pussy repellent?

It allows you to customize your system and is completely safe despite 99.9% of people not having the knowledge to successfully audit it.

27 bytes

Your unmodified hello world, gives this on my system.

$ wc -c hello
648 hello

$ file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped

It is still possible to make it smaller without modifying the ELF header.

If I remove the sections and move the data to the bottom, I save 92 bytes.

$ wc -c hello
556 hello

It's possible to save another 4 bytes, by making an immediate value. That brings it down to 552 bytes.

If I run strip on it I am down to 272 bytes. If I run sstrip on it I am down to 132 bytes.

.globl _start_start: movl $4, %eax movl $1, %ebx movl $msg, %ecx movl $len, %edx int $0x80 movl $1, %eax movl $0, %ebx int $0x80msg: .ascii "Hello, world!\n"len = . - msg

...

The standard allows void main in an implementation-defined manner. Since gcc allows void main and I'm writing code that's specifically intended to be compiled with gcc it's fine.

OP a fagit.


I personally just used a combination of a VM and WINE. I guess it all depends on what you're willing to install on your computer.

archive.rebeccablacktech.com/g/thread/56742962

nuff said

Kill yourself.

Which terminal emulator are you using there?

You're right, and while we're at it, let's use a non-shit assembler.

$ cat bs.s.intel_syntax noprefix.code16.global _start_start: mov si, offset hello_world mov ax, 0xb800 mov es, ax mov cl, hello_world_end - hello_world mov ah, 0xf 1: lodsb stosw loop 1b jmp .hello_world: .ascii "Hello world"hello_world_end:.org 510.word 0xaa55$ as -c -o bs.o bs.s$ ld -Ttext 0x7c00 --oformat binary -o bs bs.o$ qemu-system-i386 -hda bs

I can't get it smaller than 29 bytes :|

You're still using real mode, but whatever, nice stuff.

23 bytes
#!/bin/catHello world

OP is writing in C, faggot

And other people are writing in x86 assembly. Why single out me?

Too tightly coupled, I would use indirection , factories and printing with strategy pattern to get a more agile artifact. Java would be better too.

C and assembly are very problematic languages. Please consider using something more diverse.

B L O A T F A G

this is minimalistic
b4 09 ba 0f 01 cd 21 b4 01 cd 21 b4 4c cd 21 48 65 6c 6c 6f 21 24

thats 16 bit hex program printing hello world, you can run it in 32bit windows machines
youtube.com/watch?v=h-tubAlE9o8&t=72s

Fucking liar, I wrote a quick Game of Life in C++ a few days ago for fun and that was only 13KB.

You can go way smaller.
BITS 32 org 0x08048000;Mini LEGAL ELF header;muppetlabs.com/~breadbox/software/tiny/teensy.htmlehdr: ; Elf32_Ehdr db 0x7F, "ELF", 1, 1, 1, 0 ; e_ident times 8 db 0 dw 2 ; e_type dw 3 ; e_machine dd 1 ; e_version dd _start ; e_entry dd phdr - $$ ; e_phoff dd 0 ; e_shoff dd 0 ; e_flags dw ehdrsize ; e_ehsize dw phdrsize ; e_phentsize dw 1 ; e_phnum dw 0 ; e_shentsize dw 0 ; e_shnum dw 0 ; e_shstrndxehdrsize equ $ - ehdrphdr: ; Elf32_Phdr dd 1 ; p_type dd 0 ; p_offset dd $$ ; p_vaddr dd $$ ; p_paddr dd filesize ; p_filesz dd filesize ; p_memsz dd 5 ; p_flags dd 0x1000 ; p_alignphdrsize equ $ - phdrstr: db "Hello world!",10strlen equ 13_start: mov al, 4 inc bl mov ecx, str mov dl, strlen int 0x80 mov al, 1 xor bl,bl int 0x80filesize equ $ - $$
$ nasm -f bin helloworld.asm$ echo " $(ls -l ./helloworld | cut -d ' ' -f5)" bytes116 bytes

Is FOURTY FIVE bytes

Is this supposed to symbolize minimalism somehow?

It's stylised.

It's wasteful and hard to manipulate. It embodies everything your "philosophy" stands against.

hey, portable code!

It's just connectbot on a Blackberry through the android emulator.

What is this, the 50's? gtfo grandpa, we aren't stuck with 8bits for memory addresses anymore

Everything over 8/16bit is bloat.
Make Amiga Great Again!

The biggest bloat here is you, fuck off grandpa REEE!

well, at least I'm not using a marxists stallman 'GNU AS' kike-assembler.

The dementia is really getting to you. It's time get off the net, grandpa.

I'm pretty sure modern Amigas are PPC_64.

You suck at programming and knowing how the tools work.

-rwxr-xr-x 1 user user 27224 Oct 22 11:41 gamut

Coded in C using only X libs and actually does something more useful than print two words that teaches no one anything about how to program.

You better make those fields selectable.

I'm not done with it yet, I'm in the process of writing my own text widget.

The point is, do that with MS shit.

Why no Gtk3 man?! Very lightweight! It's only a little more than a million lines of C code!

Nice job, mate.


Why the fuck do you care if an user says that about your post? It's not like your contribution suck less than OP.

When GTK jumped the shark and started to use CSS wrapped in a weird assed container for themes I knew it was time to relegate them to the dustbin of history. All of the toolkits suck but GTK doubly so.

Turns out writing your own widgets is harder than it looks but I've tried all the pure C versions and there are little things that piss me off about all of them so I decided to start from scratch and add the bits I needed at that time. Right now all I need is a text widget but, as it turns out, that's also the hardest one to get right.

I'll be releasing this once it's done on github in the hopes that it's adopted by the distros. I do use Xext, Xft, and Xpm but those seem to be in most of the repositories so here's hoping.

One of the things that always pissed me off about color pickers in linux was no zoom window. There is one that's in GTK3 that has one but pulls in an ungodly amount of libs to get it done which just shows me the state of programmers minds nowadays. There's a lib for that should never be a mantra adopted by any sane programmer, alas, javascript.

ha ha ha ha ha ha


sick trips, but the gtk3 one will survive the wayland jump.

The gtk3 one won't survive gtk4's CADT.

If and when that ever gets adopted I'll port, it is written in C after all. Given the uncertainty of big jumps in system components like that I'll hedge my bets and wait to see how it goes.

I'm not sure what to think about you laughing. I saw a need, I didn't like one single toolkit out there so I solved my own problem. Is that not what programming is about? What do you code? Games for android at 99 cents a pop perhaps? Are you a javascript guru perchance? Did you listen to all the hype back in the 90's saying that you'll be rich if you go into this field? Disappointing isn't it?

The bottom line is that I code for me. Not you, not anyone else. If what I do helps others fill a need then I am happy. If not, it's no skin off my back.

GTK needed a way to describe "styling" information for GUI elements. The traditional way of describing this information, hardcoding absolute values in C source code, is an unwieldy way to describe UI elements. CSS is a language that can "cascade" styling information based on the hierarchy of how the UI elements are related to one another. CSS is an adequate solution for this problem that moves a lot of the work of calculating UI information dimensions and makes the process a declarative process rather than an imperative process.

Some other examples of a declarative approach to UI description include Microsoft XAML, Mozilla XUL and Qt style sheets.

I was gonna point out the irony of defending pointless rewrites of standard software down to a toolkit level with accusations of CADT when I realised I was getting trolled.

Topkek.


programming is about duct taping standard libraries together against a deadline till just after everything falls over and you absolutely have to do the costly rewrite: running everything out of spec till it breaks, even people, and releasing after a final crunch to make sure you have plenty of bugs, hacks, and bad design decisions to haunt you over the lifespan of the point release.


no. write apps for you that have 800 buttons in a grid with zero padding because graphic design is gay.

...

You are like a little baby. Watch this:

clever, but not so clever it's retarded:
better than bsd, 10/10

Kek

wtf?

ftfy