Post your code

Post your code.

Attached: ll.png (766x579, 81K)

Other urls found in this thread:

github.com/paradoxmoe/RandomMOE
duckduckgo.com/${search.value}`;
caniuse.com/#search=localStorage
twitter.com/AnonBabble

Attached: 2019-06-05-184740_1799x928_scrot.png (1799x928, 167K)

assert (m_UpstreamQueue.size > ...);

?

why the literal fuck would i want an assert for that?

not all the browser and OS support localstorage API by default, your code is not stable

Graphics in C is hell

Attached: 2019-06-05-165633_1280x1024_scrot.png (1280x1024, 143K)

>X11 is hell
correct

fast_ack =: 4 : 0
if. x < 2 do.
x+>:y
elseif. x = 2 do.
5++:y
elseif. x = 3 do.
3-~ 2x^3+y
elseif. y = 0 do.
(

github.com/paradoxmoe/RandomMOE

Doing all the exercises
(define (same-parity first . rest)
(define (same-parity? x y)
(= (remainder x 2)
(remainder y 2)))
(define (iter items result)
(cond ((null? items) result)
((same-parity? first (car items)) (iter (cdr items) (append result (list (car items)))))
(else (iter (cdr items) result))))
(iter rest (list first)))

> starting method names with uppercase

ew!

Javascript is unaesthetic desu.

>define
>not defun
>not defvar
?
doens't compile on common lisp online

nice

>all those positional arguments with no type hinting

that's just cringe. is there any good ide for c? something to c like emacs to lisp?
I'd like to check it out.
Also, you might probably wanna try wayland, if I'm correct its gppd x replacement

it's scheme

Rate my style
bonus points if you can tell what im coding for

Attached: style.png (433x356, 14K)

>document.querySelector('body')
Nigger, just use document.body
Why conduct a query for an element that's already indexed for you?

You're doing some graphics work on a z80 using z88dk. My guess is for the gameboy?

man looks weird when I do it to for loops too
like
why doesnt the last guy in the for loop have a semi-colon?
thats fucking nuts man

Attached: style.png (329x108, 2K)

zx spectrum

Why use the function keyword when superior arrow syntax exists?

Let me guess, you started learning programming this year.

Why is my code not working?? I might give it up and just go back to journalism

Attached: Project.png (323x241, 9K)

JavaScript but with someone who can't into web development

Attached: Screenshot_1.png (995x501, 29K)

jesus christ

werks on my machine (tm)

>prefixing variable names

Why is everyone using dark mode.

Someone rice out my Spyder (Python); tell me what to do

Attached: spyder.png (1512x562, 35K)

I know its one of the worst things I've ever written but it does the fucking job and honestly I could care less

>I could care less

turbo brainlet detected

>I could care less
Stop doing that.

Attached: 2019-06-06_01-58-19.png (556x798, 75K)

Is this ironic?

what do you mean

Most awful code I have ever seen. Here are some tips.

You never import in a function. This is absolutely retarded behavior. Secondly always avoid global variables. Variables should always be in local scope. If you are making a variable global declare it outside of a function.

Also I am 99 percent sure you need to wrap your print statement in brackets. Triple quotations are also block comments in Python IIRC and not strings which you should be using.

I might be wrong my Python is a bit rusty. I mainly use Scala/Go at my internship

r8

Attached: Screen Shot 2019-06-05 at 8.48.20 PM.png (1208x1480, 382K)

from time import sleep

def Counter():
time = 0
while True:
time += 1
print ("Time counted so far: ",time)
sleep(1)

if __name__ == '__main__':
Counter()

Here you have, faggot:
const search = document.getElementById("search");
search.addEventListener("keydown", e => {
if (e.key === "Enter") {
window.location.href = `duckduckgo.com/${search.value}`;
}
});

This considering you have in your HTML.
No idea what you are doing with that prepSearchBox() so I just ignored that part.
Also letting the user type in an unfocused input seems like shitty UX to me.

thanks

import statement should be outside of any functions and normally they're the first things at the top of your code.

"Time" is never initialized. The first time you run your program you're asking it to set "Time" to "Time + 1". But what is "Time" initially? "Time" is being adjusted before being defined.

This code works but I'm not sure it'll do what you want. Using python3 btw.

import time
Time = 0

def Counter():
global Time
Time = Time + 1
time.sleep(1)

Counter()
Counter()
Counter()
Counter()
Counter()

print("Time counted so far " + str(Time))

....+++++++++++++++++++
++++++++++++++++++++++
+++++++++++++++++++++
++++++++.+++++++++++
+++++++++++++++++++
++++++++++++++++++
++---.-----------
-------.++++++++
.>+++++++++++++
++++++++++++++
+++++..>+
++++
+++
++
.

if true:
return true
else:
return not(true)

No I dont like your solution it is ugly

its the best solution fagtron, but keep writing shitty code lmfao

I'm the original person you replied too much better.

I'm probably being a bit picky but remember functions should do one thing and they should do them well. Your counter function right now increments, prints, sleeps, loops and does a bunch of stuff it just shouldn't be doing. I would try to split it up just a tad bit more. There is a book called Clean Code which I really enjoyed and I think is a great read for anyone in CS or wants to program professionally.

>does a bunch of stuff it just shouldn't be doing
No

I like this code.

Again don't declare global variables inside a function. If you need a global variable just declare outside the scope of the function. If you need to loop you can always put it in a loop.

Up to you. I am just telling you that it can be improved. Your functions should be split up to encourage code reuse and to allow you to modify it more easily in the future if you are actually writing a professional program generating money and not a meme counter app

>Again don't declare global variables inside a function
In python the 'global' keyword is needed to identify the variable you're using is a global one and not a local one. It isn't a declaration.

Brainlet

#include

enum {
first=1,
second=1,
third=1,
fourth=1,
fifth=1
};

template
struct Counter {
unsigned operator()(){return (T + ...);}
};

int main() {
std::cout

While that may be ironic, I've seem many people who just learnt ternary do things like
isBigger = val1 > val2 ? true : false

If you declare a variable in global scope. You should declare that it is global in global namespace not in a function.

Also I believe in Python that if you declare a variable in global namespace it implicitly becomes global (not 100 percent sure about this) again I mainly write Scala and Go

Don't send hateful messages my way. The last time someone called me a fag I started an adpocalyse.

k

You're confusing stability with compatibility. And are they really worth supporting?

browsers that dont support fucking localstorage shouldn't be able to render any modern webpage anyways

import time

def timer():
timer.i += 1
time.sleep(1)

timer.i = 0

timer()
timer()
timer()
timer()
timer()

print( timer.i )

A simple landing page for my bro's business.

Attached: SharedScreenshot1.jpg (1920x1202, 328K)

Yeah exactly.

import time
Time = 0 # Time is a 'global' variable

global Time2 = 0 # SyntaxError: invalid syntax, 'global' isn't used this way in python

def Counter():
global Time # specify this function uses the global 'Time' variable
Time = Time + 1
time.sleep(1)

def DoesntWork():
# UnboundLocalError: local variable 'Time' referenced before assignment
Time = Time + 1
time.sleep(1)

Really. I mean: caniuse.com/#search=localStorage
Is there even an excuse at this point.

>web dev in VS

what? I code all my shit in VS

>Edge
>stable version is 18
>nightly version is 75
????

I bet you use an AK47 to open water bottles too

Edge forked Chromium and made a babby.

Give me a project to work on, ffs.

tyty

disgusting

AoC 2018 day 1 part 2
data = map(int, open("Day 01 input.txt", "r").read().split("\n"))
freq = 0
freqs = {}
while True:
for f in data:
freq += f
if freq in freqs:
raw_input(freq)
freqs[freq] = 0

/*TO-DO fix grmer *\

void die(char*msg)
{
fprintf(3,msg);
exit(0);
return -1;
}

int_32t* enkript(int*data, std::uint_64t lent )
{
int key=rand();
void* res=malloc(lent+sizeof(int8_t)*4); //Mult gets optimized at cmpile time ^_* no worries
if(!res)
die("FUCKING MALOLC");

char* cres=res;
*(int*)&cres[0]=key;
cres+=sizeof(int8_t)*4);
for(unsigned i=0xffffffff;((int)i)!=-1&&i

>is there any good ide for c?

Come home, white man

Attached: visual_studio.jpg (1200x794, 53K)

It just comes down to comfort for me.

Whenever I jump around between editors and IDEs there's always a keybinding or two that don't translate. I like consistency.

print('hello world")

print('hello faggot')

>intern
>giving tips

Shut the fuck up and stop opening pull requests full of broken garbage. Do the reading I told you to do instead texting on your fucking phone. I can see when you're on YouTube -- you're not subtle. Maybe you should actually spend some time actually programming and not just grinding leetcode so you can trick another company into giving you an offer.

> exit(0);
> return -1;

kys

is this some pasta? can't be this retarded

Turboautists can't tell satire from pasta.

it'd be a lot funnier if it compiled but did something completely unrelated to whatever it's "trying" to do

SORRY user SIR MY DIET OF RAW SPICES SENT ME TO THE DSS BEFORE I COULD GNUCC MY SCRIPT SIR ,VERY SORRY SIR HERES THE WORKING VERSION
TEAM WORKING IN THE JAVA VERSION SORRY FOR DELAY SIR

/*Fix'd Jow Forumscrypt */
#include"stdio.h"

void die(char*msg)
{
fprintf(stderr,msg);
exit(-1);
return ;
}
#include"stdint.h"
#include"stdlib.h"
int32_t* enkript(int*data, int64_t lent )
{
int key=rand();
void* res=malloc(lent+sizeof(int8_t)*4); //Mult gets optimized at cmpile time ^_* no worries
if(!res)
die("FUCKING MALOLC");

char* cres=res;
*(int*)&cres[0]=key;
cres+=sizeof(int8_t)*4;
for(unsigned i=0xffffffff;((int)i)!=-1||i

>OP
why do you call "const" something that's clearly a variable?

There's no difference between a const and a variable that never changes.

Here's your static linking, bro.

Attached: IMG_20190606_082816.jpg (4608x1323, 1.7M)

God I wish I coded.
I work as a "Software Engineer" but 80% of what I do is in Simulink

>javascript

puke.png

>Simulink

Are you serious? You've probably done more tinkering and creative problem solving than 99% of moder `web devs'

making things that don't change const is best practice what are YOU talking about?

hey, fuck YOU

Attached: Screen Shot 2019-06-05 at 10.48.00 PM.png (1594x968, 185K)

desu you are probably right. But sometimes the dev cycle can just be a slog of process.

Get raped and kill yourself, you retarded fucking faggot sack of nigger shit with down syndrome.

Attached: 2019-06-05-230321_1366x768_scrot.png (1366x768, 167K)

>xlib
if u want simple, use sdl
if u want good, use xcb
if u want modern, use wayland

> second=1,
third=1,
fourth=1,
fifth=1
wtf?

5 REM ** C64 BASIC CODE BY user **
10 PRINT "OP IS A RAGING HOMOSEXUAL"
20 GOTO 10

vim? a man of taste I see

Generate a Mandelbrot Set image, either on screen or as an image file for viewing. If that was easy do it with nicer colors, don't need to fully understand the math but use the technique where the glow fades out quickly off the edge... The nice looking way of doing it. If that was easy then do a Mandelbrot Set zoom, with colors (either paisley colors or the glow fadeout). If that was easy then while zooming in sway the camera to spots on the pattern, swirving smoothly (think Bezier Curves, or using forces to pull camera around or something smooth...)

If you can accomplish goals using ffmpeg filters or some other tool, instead of writing code, or a combination of code and other tools, then that is acceptable. Or do it all with your own code.

Generality gives better readability.

What font is that user?

Attached: temporary.png (401x24, 4K)