Phone interview

>phone interview
>Write hello world in python3 without calling any functions or importing 3rd party files/packages

Attached: pink-wojak.png (967x954, 586K)

Other urls found in this thread:

python.org/dev/peps/pep-0318/
en.wikipedia.org/wiki/Bogosort
twitter.com/SFWRedditGifs

I smiled but you shouldn't create a thread for shit like this. Fuck off

>write hello world
Eas-
>Without calling any functions

Attached: 1515533873342.jpg (554x640, 210K)

is such a thing possible?

>write hello world in C without using any libraries

Attached: 3473e750e82f58a7cda3a6e930497e2e.png (420x420, 137K)

ez, open up python shell
type: 'hello world' enter
boom
give me a job

>not using assembly to run it bare to the metal

It's like you enjoy mediocrity

>print Hello World in Haskell
>without mutating the state of the frame buffer

def hello(f):
return "Hello world"

@print
@hello
def main():
pass


That was easy

Impossibru, even in assembly.

thanks for writing my assignment sucker

>annotators
Counts as a function call IMO

cool how does this work?

python.org/dev/peps/pep-0318/

just write a kernel bro

Technically you can't write any program without using function calls, since the kernel will call functions just to start the process. I'm sure this solution is valid for the challenge

Wtf is this

They expect you to be able to write your own kernel on the whiteboard moron, this isn't 1970 anymore.

Just bombed an interview. Got asked to implement the bubble sort sorting algorithm on a whiteboard, and sum all the primes below 2 million. Never heard of bubblesort until then, and they actually expected me to compute the primes myself. They walked me through the sorting algorithm, but I couldn't catch on and failed. Then I told them I could sum the primes if I had them, but they weren't impressed. I've never felt so defeated.

Attached: 1458872142395.png (645x1260, 197K)

this pasta always makes me kek

>tfw too brainlet to become developer

One day they will ask for gnome sort

Hold my beer.
#hello world

kek'd

$ python3 -c 'hello world'
File "", line 1
hello world
^
SyntaxError: invalid syntax

The best I've got so far is
class A:
pass

A.__lt__ = print
A() < 'hello world'

I'm trying to figure out how to do it without instantiating A

No, just system dependent. If you only have to target linux, for example, then you just call the kernel through an interrupt.

section .data
msg: db "Dickbutt", 10

section .text
global _start

_start:
mov eax, 4
mov ebx, 1
mov ecx, msg
mov edx, 9
int 80h

mov ebx, 0
mov eax, 1
int 80h

ret

Attached: dey dont fink.jpg (526x533, 58K)

class meta(type):
__lt__ = print
class A(object, metaclass=meta):
pass
A < 'hello world'

idk if its any better

No. I/O requires one to make a system call, which in turn requires a function call.

You can't write a fucking kernel in Python.

Yes you can lol, just because it would need a system running the python interpreter under it doesn't mean it can't be done, that's idiotic. Like saying the jvm can't be written in java.

The correct solution is that there is no solution, because you're still making function calls.

>just because it would need a system running the python interpreter under it
Yeah, and that system running underneath it would be the kernel, not whatever Python program you wrote. You would in effect be creating a scripting system for a kernel.

import atexit

@atexit.register
def dont_call():
print("hello world")


Technically I'm not the one calling the functions.

or:

try:
1/0
except:
"Hello world"

Maybe not, but you failed the second requirement.

atexit is built in, not 3rd party so i think it's still valid

int is a function call you idiot

You wrote a function call in your code so it doesn't count

Well done

No "call" is a function call, interrupting into the kernel isn't (even if the kernel calls a function then afterwards)

>gnome sort
>not sleepsort

>not bogosort

>not worstsort

>bogosort

en.wikipedia.org/wiki/Bogosort

Attached: 500full-igor-bogdanoff.jpg (500x500, 29K)

Never happened.

Attached: 24130023_1997546730483125_8441281401935737146_n.jpg (297x445, 24K)

>get to ring 0
>fuck up OS
>write directly into videobuffer
>...
>PROFIT
You just need to be good enough.