[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 20
File: K&R himegoto waifux2.png (1 MB, 1000x1400) Image search: [Google]
K&R himegoto waifux2.png
1 MB, 1000x1400
old thread: >>52048348

What are you working on, /g/?
>>
File: hacker.org.jpg (399 KB, 1366x768) Image search: [Google]
hacker.org.jpg
399 KB, 1366x768
>>52052415
>What are you working on, /g/?
hacker.org challenges
>>
>>52052415

SAGE GOES IN ALL FIELDS
>>
>>52052444
Is that anything like codeeval?
I've been using it to learn C and algorithms.
To illustrate how much I improved, the fizzbuzz challenge took me 5 hours.
The last one I did, stack implementation took me 10 minutes.
>>
love me
>>
>2016
>not crossdressing while developing node.js libraries
What the fuck is wrong with you guys?
>>
>>52052479
>Is that anything like codeeval?
No, it involves a wider variety of programming/hacking disciplines including cryptography, webpage manipulation, harder programming challenges, and other complex shit
>>
>>52052518
I wrote most of a C library while wearing a plaid skirt once, it was nice.
>>
>>52052497
>shit non-windows support
>shit speed
Dropped.
>>
>>52052444

Traveling Salesman Problem?

Also, nice trips.

>>52052518

Well for starters, I'm a man, and a skirt would not complement my beard and mustache. And second of all, I don't like JavaScript.
>>
>>52052606
>>SML - many implementations that push the boundaries of functional programming theory and provide users with cutting edge compiler technology
And what boundary has SML pushed lately? The only advantage it seems to have over ocaml/f# is better syntax, yet it can't even match the featureset of either (let alone both).
>>
>>52052671
https://en.wikipedia.org/wiki/Standard_ML#Implementations
>>
>>52052415
>animshit
>>
i dont even know why i come to these threads i dont even program
>>
>>52052590
>Traveling Salesman Problem?
no, just a fancy map where you solve challenges that unlock harder challenges
>>
I'm thinking of creating a C-like(as much as possible given the circumstances, inspired from C# probably) query language that compiles to SQL.
I'm not sure whether it's been done before or how functional it'd actually be, but holy shit, I can't stand that ugly syntax.
>>
Stupid generic anime edition

Make some cool Haskell edition or something next time
>>
File: literategirl.webm (3 MB, 1280x546) Image search: [Google]
literategirl.webm
3 MB, 1280x546
Ask your favorite programming literate anything.
>>
>>52052415
kill yourself

i'm making a new thread after 310
>>
>>52052833
I love Japanese architecture
>>
Why would anyone developing for windows even consider using a language other than C#?
>>
>ML
>pushing anything
>>
can anyone tell me how the input "123451^2v5:4?9p2g8pppppp" prints the output 945321 in http://www.hacker.org/hvm/ ?
>>
>>52052914
If C# had a clean way(as in not the shit from InteropServices) to manually manage memory, it'd be the greatest language ever.
>>
>>52049167
Dynamic parallelism as in the CUDA definition, global methods calling global methods, making recursion possible. If alpha-beta is no good with parallel execution, what algorithms are better suited? My idea was using recursion to build a tree of a specific depth as to make better decision based on future states. Each layer would be executed in parallel, one layer after the other.
>>
>>52052705
Half of them are dead, half of the others are deprecated for some other compiler in the last part. This also doesn't list any impressive or new feature.
>>
>>52052989
Why would you bother managing memory with a high level language like C#.
>>
>>52052914
2bh family, F# is strictly superior to C#, and OCaml is strictly superior to F#.
>>
NEW THREAD

>>52053042
>>
>>52052914
I prefer C + asm and native Win32 for small, fast executables.
Programs should never be larger than a few kb, not require any external dependencies (run on clean installed OS), and should always start and shutdown instantly (even on mechanical hdds and couple years old cpus)
>>
>>52052791
I'm pretty sure they'll assume you're dumb and you misspelled "github", trashing your resume for that reason and not because you didn't use github.
Use bitbucket or something else non-ambiguous.
>>
>>52053045
Janny is going to delete it.
>>
>>52053051
>Programs should never be larger than a few kb
opinion

>not require any external dependencies (run on clean installed OS)
what is static linking

>and should always start and shutdown instantly (even on mechanical hdds and couple years old cpus)
shutdown yeah, start depends on the kinda program
>>
>>52053045
I hope the janny bans you.
You are literally textbook spamming the board.
>>
>>52053060
no, they normally delete the thread(s) posted before the bump limit, even if they get 100+ posts. that's if they delete any thread at all.
>>
>>52053007
You can only get good speed with GPU parallelism by using specific worksizes and semi-large operations. Those that are too fast cost you a fuckload of time because of the context switch and initialization, while those that are too slow, unless they saturate the device, are typically bottlenecked by single-core performance and not multicore (but not always).
>>
>>52053077
No, they don't, not if the thread is already at the bump limit. Then it's just which thread came first.
>>
>>52053077
how are they supposed to know that?
They delete the newest one, regardless of the amount of posts within it.
>>
>>52053074
the OP of this thread is the one spamming the board. >>52053042 was legitimately posted after the bump limit.
>>
>>52053051
I look forward to your modern webbrowser that fits in 400kb you fucking retarded autist
>>
>>52053085
>>52053089
see https://archive.rebeccablacktech.com/g/thread/S51978383#p51978383
>>
>>52053093
nobody cares you fucking autist
you're kicking and screaming about an anime pic on the programming section of an anime imageboard on christmas day
i can't think of anything more pathetic desu senpai
>>
>>52053041
if youre going to shill a language, please shill C++ or C#. ML languages dont need to be compared to a conventional language like C#. F# is not 'better', its just different. It handles OO in a different way. I love the ML family of languages, but we dont need idiots like you trying to say its going to replace everything and become the single do-everything language.
>>
>>52053102
>modern webbrowser that fits in 400kb
Definitely possible with margins to spare (if you write it for win32, x86 only).
>>
>>52053124
forcing your images by posting a duplicate thread before the bump limit is ridiculous fucking cancer and you're all enabling the mentally ill mutilated faggot and not helping him recover from his sick shit
>>
>>52053114
Okay? This is useless because it doesn't say when the thread was deleted compared to when the old thread hit the bump limit, and I can't even find any links to that thread in the original one.
>>
>>52053162
fucking retard kill yourself

i'm not going to waste my time on you just fucking kill yourself you're a worthless piece of biological trash
>>
>>52053160
the only mentally ill person here is you, baka
>>
>>52053160
>>52053177
Damn son, you are angry.
>>
LEGITIMATE THREAD:

>>52053042
>>52053042
>>52053042
>>
>>52053082
The workload I have here are small arrays of 300 elements that will be 'worked on' with around 4.5 leaves per node, hoping to get a depth of around 10. Each node has their own copy of the array that is slightly different from others. Using only my CPU I only got to a depth of 3 before the time to calculate became unacceptable (a couple of hours) and I never got to 4.
>>
Reminder not to create a new thread unless Janny has deleted the early one before the old one is autosaging.
>>
>>52053219
>no anime
>>
>>52053219
>>52053162
>>52053160
>>52053114
>>52053093
>>52053045
Spamming is against the rules, senpai.
>>
>>52053247
this is an insane rule that you/the trap fag made up to rationalize his twisted behavior

if the old one makes it to auto sage it doesn't automatically validate the premature new thread

and you know the janitor in /g/ isn't every active so he isn't likely to delete it in time, if ever
>>
File: come-on.jpg (14 KB, 264x281) Image search: [Google]
come-on.jpg
14 KB, 264x281
>>52052518
>gender is a social construct
>>
>>52053276
yes and this thread is spam. >>52053042 is the legitimate thread.
>>
>>52053307
no one cares about ur're shit thread
>>
>>52053045
VENERABLE MODS OF /g/, I PRAY OF THEE TO SEND A-NON-E-MOOSE TO THE REALM OF PERMABAN

AMEN
>>
>>52053335
kill yourself
>>
>>52053072
>Programs should never be larger than a few kb
You should try out Agda
Print "hello world" is about 3 megabytes
but hey, at least you can prove it doesn't have any bugs right? right guys? guise?
>>
>>52053344
Janny can't tell. I know it's bad to post an early thread, but it's far worse to then post another one if the early one hasn't been deleted by the time the original is autosaging.

Your mental gymnastics are astounding.
>duplicate threads are against the rules
>janny isn't active so early threads don't get deleted
>therefore I must create another thread which will appear to be a duplicate once the original thread is autosaging/expired
>>
File: awoo~.png (762 KB, 1000x1000) Image search: [Google]
awoo~.png
762 KB, 1000x1000
>literally every thread ITT is a spam post
omedetou dude, you've literally made /g/ a worse place
>>
File: hentaidesune.jpg (60 KB, 640x960) Image search: [Google]
hentaidesune.jpg
60 KB, 640x960
>>52053360
>mfw i don't
>>
p-progamming?
>>
>>52053403
It's also an established norm on 4chan to not create a second fucking thread after that.
>>
>>52053417
>>52053419
kill you'reselves
>>
>>52053416
# Prints the classic right-angle meme text with random white space.
# Copyright (C) 2015 Anonymous

import random

# Ask for the meme text.
meme_text = input("Meme text <- ")
meme_text = meme_text.upper()

# Save length of the meme text.
meme_length = len(meme_text)

# Print the string in all caps with spaces between individual characters.
index = 0
meme_string = ""
while index < meme_length:
meme_string += meme_text[index] + " "
index += 1
print(meme_string)

# While the full meme is unprinted:
index = 1
while index < meme_length:

# Add random white space after the next letter in the string.
letter = meme_text[index]
modified_letter = letter + (str(random.randrange(meme_length * 2) * " "))
modified_letter = modified_letter[:-1]

# Print the modified character.
print(modified_letter)
index += 1

[/code
>>
>>52053434
I reported you to the FBI for cyber bullying me
>>
anyone who uses openbox regularly: is the <query> part of <action name="If"> deprecated? I don't see it in the recent example configs but the documentation says it's required.
>>52053403
nobody is stirring up shit but you
>>
Is anyone playing Stockfighter?

Are you having [spoiler]fun?__________[/spoiler]
>>
>>52053452
>banned
HAHAHAHAHA
>>
>>52053446
lel fucked the tags up
>>
>>52053463
not banned, tard.

kill yourself
>>
is i banned nao?
>>
>>52053457
>no spoilers

god damn it
>>
>>52053419
Why delete top kek posts?
>>
Thank you janny.
>>
Wish F# was more lenient with operator names.
for vector, using:
!|a for magnitude of a
!||a for square magnitude of a
!^a for unit of a

I would've liked something like | a | and a^

suppose you could use quotations or workflows
>>
>>52053480
i forgot you can check 4chan.org/banned
mods pls no bully :'-(
>>
>>52053494
That page doesn't list all bans. So it's possible somebody was banned, but it's also possible the janny just deleted the posts as a warning.
>>
>>
Does any one want to work on a quick collaborative program?

I'm at my girlfriend's parents house and everyone was browsing facebook so I didn't have anything to do.

I'm not expecting the program to be any good at all, I just think it would be funny to try to work on something really difficult together.

We can make an official /g/ github account.

I don't have any ideas except for a meme text library.
>>
nerds mad about who makes a thread first on 4chain lmao
>>
File: lemon-pepe.jpg (115 KB, 900x900) Image search: [Google]
lemon-pepe.jpg
115 KB, 900x900
>>52053521
Yeah it only shows if your IP address is banned.

>mfw 7 proxies
>>
>>52053502
Buttmad much
>>
File: new-pepe.png (262 KB, 680x661) Image search: [Google]
new-pepe.png
262 KB, 680x661
>>52053533
>making fun of people posting on 4chan while posting on 4chan
>>
>>52053562
kek
>>
In Java, is it acceptable to do this if I don't want to create a million objects that will only ever fulfill one single purpose?

public class BigClass {
List<InnerClass1> someList;
Map<String, InnerClass2> someMap;

public static class InnerClass1 {
Integer value1;
String value2;
}

public static class InnerClass2 {
List<String> strings;
BigDecimal someValue;
}
}
>>
>>52053562
>meme arrowing me
>>
File: lord-hamercy.jpg (8 KB, 220x236) Image search: [Google]
lord-hamercy.jpg
8 KB, 220x236
>>52053584
>getting this buttblasted on an american anime imageboard
>>
>>52053577
not sure what you're asking. static classes still get instantiated individually
>>
>>52053577
>a million objects
classes*
>>
>>52052415
Please stop this programming trap meme.
Thanks.
>>
>>52053618
oh yeah inner classes are fine.
>>
I'm just getting the hang of structs and enum types, but what is the point of unions?
>>
F# is such a beautiful language

I am crying
>>
>>52053612
see >>52053618

I just don't want an overload of domain/model files that only get used in one process
>>
>>52053577
You know everything doesn't have to be a class right?

Especially if you have singletons (classes that only ever fulfill one single purpose) you should redesign your program.
>>
>>52053577
for what purpose
>>
>>52053637
I would cry about how beautiful f# is but i'm busy writing it
>>
>>52053525
https://kobra.io/#/e/-K6PvEMUfqd2mLQ4VoP9
>>
>>52052415
OP, your image says the date is April 19th in Japanese, I think.
>>
>>52053643
it's perfectly fine, you can even make them protected/private so they don't show up outside your package/class.
>>
>>52053057
Do I need a github to be taken seriously these days?
>>
>>52053699
No you need a linkedin
>>
>>52053699
No, but if you are a desperate pawn in the free capitalist market like me then you will do anything to get hired.

The only serious barrier to employment for programmers today is your first "real" job.
>>
>>52053699
most people believe git and github are one and the same, so probably.
I still wouldn't put down a gitgud or neetco.de link because those are run by dumb NEETs who will inevitably shut down the site when they get cut off from their parents or the government or both.
Just pick github or bitbucket.
>>
>>52053647
>>52053658
>>52053678
So is it fine or am I supposed to use interfaces and/or anonymous classes for this somehow?
>>
>>52053699
Yes. They've been doing github training (shell & cli, but not the actual site gui) for everyone at my company for the past 2 weeks. People I know can't even get into jobs because employers expect your portfolio on your github
>>
>>52053736
for what purpose?
either way will work, it's more a matter of what will be easy for you to understand while developing or coming back to the code after a long time.
>>
>>52053725
>bitbucket
This

It has Atlassian on it, so it'll raise your chances in a big company
>>
>rust
How can I safely have a wrapper type for something like an OpenGL object?

I think I can do some magic with PhantomData to fix the object outliving the context that created it, but how can I make a safe destructor? Either I have to assume the context is bound when it gets dropped, or keep a pointer to the context in every object?
>>
>>52053758
>for what purpose?
Correct json deserialization, front-end requires a response like this
>>
>>52053804
I don't know anything about json.
>>
>>52053719
But I have nothing to link to. Except all those people who graduated the same year as me, but went on to actually do something with their lives.
>>
>>52053811
yeah I'd usually ask /wdg/ but it's as dead as can be
>>
>>52053736
why create an object if it wont have any instance methods to manipulate it?

if you want to define and create one instance of an object and nothing more, you can define it as you create like so

Object onceOff = new public class innerClass{
private int x = 69;
private String y = dragon dildos;

public String getY(){
return this.y;
}
};

System.out.print( onceOff.getY() );


Should print dragon dildos, maybe i made an oops somewhere
>>
>>52053826
is this for a job?web dev isn't enjoyable at all.
>>
>>52053742
Why do you faggots spout this shit like its a universal truth.

Not every employer is impressed with your fizzbuzz and memestars, all they actually Carr about is can you sit in an office for a few hours without crying because you miss the basement too much.
>>
>>52053834
I'm liking it a lot so far
>>
>>52053848
meme star is a good idea, thanks anon
>>
>>52053855
why?
>>
>/dpt/ doesn't know how to average two ints
lel
>>
>>52053818
That's the joke, having a bad github is just as bad as an empty LinkedIn, if nor worse.
>>
>>52053848
meme star is piss easy
i'll hire anyone who can do a memespiral.
>>
>>52053881
you mean the tornado spin?
btw, by meme star I mean a five-pointed star, not eight lines coming from a central point.
>>
>>52053830
That doesn't even come close to working
>>
>>52053881
>2d char array
>google how to draw a spiral
>boom $100k/year
>>
>>52053848
>Why do you faggots spout this shit like its a universal truth.
experience mostly. Before I got my job, almost every phone call involved them asking to see my portfolio so they can see mmy experience in the languages they deal with. Also, like I said, they've also been doing it intensively in my own workplace, and are hiring taking people's github into account
>>
>>52053777
Anyone help, this is relevant in C++ or other languages with deterministic destruction.
>>
>>52053922

> and are hiring taking people's github into account

Would it look shady if I just dumped stuff on my github account and applied to jobs?
>>
>>52053777
>>52053933
RAII basically guarantees that if object A (context) is used to create object B, object B will get destroyed first.
>>
>>52053777
OpenGL programmer here. What the fuck is an "OpenGL object"?
>>
is it pants on head retarded to initialize an object with it's own methods?

i want to do something like this:
class Meme:
def __init__(self, name):
self.name = get_name()

def get_name():
return input("What is the name?")

>>
File: fibonacci spiral.png (4 KB, 220x139) Image search: [Google]
fibonacci spiral.png
4 KB, 220x139
Surely /dpt/ isn't so stupid that they can't draw a golden spiral?

         MEMEMEMEMEME     
MEME MEM
EME EME
MEM M
ME EM
ME MEME EME
E EME MEM
M MEME
>>
>>52053956
If it's stolen, then yes, but if you can't write any useful code on your own you'll probably be fired from any job that you get.
>>
>>52053982
fizzbuzz tier.
>>
>>52054000
let's see what you got then m8
>>
>>52053871
It's fun, easy and pays well, co-workers are all helpful and nice

So far it has been more informative and useful than 3 years of college because I get to interact daily with architects and developers that have been at it for decades
>>
>>52054009
this t᠎bh f᠎am s᠎mh
>>
>>52053966
Yes, use setters, getters

http://www.python-course.eu/python3_properties.php
class P:

def __init__(self,x):
self.x = x

@property
def x(self):
return self.__x

@x.setter
def x(self, x):
if x < 0:
self.__x = 0
elif x > 1000:
self.__x = 1000
else:
self.__x = x
>>
>>52053966
Not at all
>>
>>52053956
You'd have to be very dedicated to randomly create and commit randomly to projects over time to do that, but we also do programming tests in interviews anyway. github is just a very useful tool to trim down candidates
>>
>>52053988

Not stolen. Just my own stuff. I have a github but I've never felt the need to put any of my code on there, so if I put it all on and it says, "Uploaded 1 month ago" that'll be negative points against me surely.
>>
>>52053963
Yeah, but at the time B is destroyed, context Z could be bound to the thread that calls glDeleteShader(B) and BOOM.
>>52053965
Go read the spec.
>>
>>52053966
DRY

I think it's fine
>>
>>52054024
your code is seriously making me nauseous
>>
>>52054027
>>52054037
thanks, i'll do it this way then
>>
>>52054024
that's not really answering the question. you've just rewritten his shitty snippet.
>>
>>52054030
Well a hardly updated github during work history gaps strongly reinforces your lack of programming activity
>>
Is subversion just dead then?
>>
>>52054030
Then put it up unless you don't want anyone else to see it.

Employers want to see "motivation" and a "drive for excellence" aka "a self-defeating and perverted desire to work overtime regularly without complaining." a github profile with daily activity demonstrates this perfectly
>>
>>52054057
Think of it like this, all you have done is broken up a complicated init block into other methods/functions.

You just so happen to use them elsewhere too
>>
>>52054080
nah, it's just losing momentum. i think people who were programming a lot about a decade ago still use it out of habit.
>>
>>52054073
>>52054053


He can use init, but if he's gonna init to a function, its better to use setter/getters as it also provides data encapsulation

If you're gonna do this:
self.name = get_name() 


Might as well go pythonic and do a setter/getter
>>
>>52053830
>tfw even unused OCaml OOP is less verbose than Java OOP
let onceOff = object
val x = 69
val y = "dragon dildos"
method getY = y
end in print_endline onceOff#getY
>>
>>52054080
Pretty much

Git is the present and Mercurial is the future, SVN and CVS are both relics of the past
Knowing them will make you useful in maintenance of legacy software though
>>
>>52054080
As a central repo for the workplace, no.

For a public profile, ishygddt
>>
>>52054081

So essentially I have to put up my work on github to prove that I'm active even though I'm pretty much content leaving my stuff saved on my own harddrive. Interesting...
>>
>>52054085
I agree.
>>
File: 1448473404155.jpg (114 KB, 720x960) Image search: [Google]
1448473404155.jpg
114 KB, 720x960
>>52054096
>pythonic
you're killing me
>>
has anyone got a tutorial or some example code on using tk with C?

I'd like to add a GUI to some of my code
>>
>>52054111
Getting a job is pretty much metaphorical dick sucking/riding.

>>52054121
how does all that puke fit into such a tiny dog?
>>
Would anyone be interested in a program that changes the names of your reaction images so that you can't be identified from reposting them?
>>
>>52054111
If a faggot tells you to jump, do you ask how high?

You don't "need" one but if you already have one then use it.
>>
>>52054154
not me i like having them in a chronological order so i can find them somewhat easily
>>
this is all /dpt/ can do:
https://kobra.io/#/e/-K6PvEMUfqd2mLQ4VoP9

# Get input string
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void tornado(const char *str)
{
/* someone do this part */
/* pls /dpt/, do my homework, pls! */
}

int main(int argc, char **argv)
{
FILE *file = fopen(argv[1], "r");
if (!file)
{
perror("SOMETHING BAD HAPPEN\n");
return -1;
}
char *str = (char *) malloc(sizeof(char) * strlen(argv[1]));
strcpy(str, argv[1]);
fclose(file);
tornado(str);


printf("FUCK YOU!!!!1!one!");
**(void **)0; /* what the fuck does this even do *//* try it? */
return 0;
}

// i'm done ok
/* we're writing this in C, shut up */
/* because pointers are cool and you can't code your way out of a paper bag desu senpai */
>>
>>52054096
python isn't java. the whole point of properties is that you can seamlessly add them when needed.
>>
>>52054154
A random filename generator?
Smh desu senpai
>>
>>52054183
>properties
>seamless
>add
Choose one.
>>
>>52054121
So.. what if you had to change the function on self.name?

You would have to refactor
self.name = new_function() 

def new_function():
print("blah")


Whereas with setters/geters, you would literally just change the setter decorator (and no need to keep track of the functions assigned to self attributes)

@x.setter
def x(self, x):
print("blah")


That's it! no need to worry about what function self.x is calling.

>>52054183
I know, but when codebase changes setter/getters will help it become more maintainable
>>
>>52054174
looks like it casts 0 to a pointer to a void pointer and then dereferences it twice.
>>
Been dicking around with ANSI escape codes and such. Trying to have foreground and background of differing intensities is a pain in the butt. Using \e[9x and \e[10x is non-standard, but it does not help any more than \e[3x;1m, with 22m to clear intensity settings.

Also, Windows doesn't always play well with ANSI escape codes (or really, at all), but it seems Ruby is doing some pre-processing?

module Screen
# Constants
# Note: Color names based on appearance in VGA, Win32, and XTerminals.
# Not particularly official names, because the official 'yellow' isn't
# actually that yellow. It's more like a brownish-gold.
CSI = "\e["
COLORS = {
black: 0,
darkred: 1, blood: 1,
green: 2, darkgreen: 2,
brown: 3, gold: 3,
blue: 4, darkblue: 4,
magenta: 5, purple: 5,
darkcyan: 6, turquoise: 6,
gray: 7, silver: 7,
darkgray: 8,
red: 9, lightred: 9,
lightgreen: 10, neongreen: 10,
yellow: 11,
lightblue: 12, bsodcolor: 12,
fuchsia: 13, pink: 13,
cyan: 14, lightcyan: 14,
white: 15
}

# Clear all data from screen
def self.clear
$stdout.write "#{CSI}0J#{CSI}1J"
end

# Set color of text
def self.set_color foreground: nil, background: nil
fg = COLORS[foreground]
bg = COLORS[background]
if fg then
code = (fg > 7) ? 90 : 30
code += fg % 7
$stdout.write "#{CSI}#{code}m"
end
if bg then
code = (bg > 7) ? 100 : 40
code += bg % 7
$stdout.write "#{CSI}#{code}m"
end
end
end


Woo!
>>
>>52054167
If by "faggot" you mean "business owner," and if by "high" you mean "long do you want to remain unemployed and in poverty," then yes.
>>
>>52054211
>people use this language unironically
>>
>>52054246
Idc im making money with it
>>
>>52054024
So basically when you do this:
p = P()
p.x = 1001


x will be set to 1000? That's p cool.
>>
>>52054174
that's because you kept trolling

>>52054185
>>52054171
If you use default filenames then they are numbers unique to your download, and if you name them yourself then anyone who looks at the archive can identify you specifically based on which posts have the filename you gave it. Whenever I post a reaction image I just start at the top of my folder and wait until I find an appropriate one anyway.
>>
QUICK POLL

How many of you have degrees, and if so, what degree do you have?

Please respond by replying to this post, and feel free to include any relevant information.
>>
>>52054314
3rd Degree Burns

Im hot, and I have a 300k job as a skin restortion research dummy
>>
>>52054314
i have a degree in my cock up your ass
>>
>>52053027
High Level Language does not imply Garbage Collection

get your shit together
>>
>>52054273

Have fun making your Meme class
>>
>>52054174

Anon... two things. First of all, your code opens and closes a file while doing nothing with it. Second of all, you've got a buffer overrun. You write a null terminator outside the buffer you allocated with malloc with strcpy.
>>
>>52054314
I'm a 360 degree professional no-scoper
>>
>>52054273
that is not cool. it's filthy disgusting.
>>
>>52054314

BS in Computer Science. Currently studying for my MS.
>>
>>52054391
What do you propose?
>>
>>52054411
use java, C# or C++. almost any other language is better than python.
>>
>>52054423
how so?
>>
>>52054423
I agree but our friend is using python, its works just as well until he needs more performance
>>
File: 1450795015333.gif (3 MB, 294x238) Image search: [Google]
1450795015333.gif
3 MB, 294x238
>>52054423
>java
>C#
>>
>>52054314
MSc CS
>>
>>52054397
Why would you study for your microsoft after obtaining a bullshit in computer science?
>>
>>52054499
C# is good, and between CoreCLR/mono is coming to Linux/OSX. It's basically Java done right.
>>
File: codeeval.png (12 KB, 956x283) Image search: [Google]
codeeval.png
12 KB, 956x283
So do I get any indication on why my score is so low? Site is CodeEval
>>
>>52054411
But seriously, use OCaml.
>>
>>52054562
5 means you got everything wrong
Failed means you got a segfault or your input is wildly different from the required output.

What challenge is this?
>>
>>52054566
Python is meme enough

WHy learn oCAML?
>>
File: protopepe.png (128 KB, 611x672) Image search: [Google]
protopepe.png
128 KB, 611x672
>>52054549
>>
>>52054275
>>52054185
>>52054171
>>52054154
What about a program that maps the filenames to a random string when you post? This way you can keep the files organized however you like on your computer.
>>
>>52054314
Bachelors in physics, making 100k/year at a fortune 500 company
people on /dpt/ call me retarded almost daily
>>52054459
static typing
>>
>>52054592
Fizzbuzz
I can do fucking fizzbuzz, but I just used the online editor so can't see what the error is
>>
>>52054627
You have to be retarded to make a post on 4chan calling another poster retarded.
>>
>>52054667
Clearly, you did something wrong.
When i first did that challenge, I got 95 because my program was leaving stray spaces at the end of the fizzbuzz strings for each test case.

Post your code/.
>>
>>52054627
I see no reason why you wouldn't be a retard
>>
>>52054625
sounds nice but i wouldn't care enough to use it t᠎bh
>>
>>52054700
I can't seem to get to the code I submitted
I'll do it again
>>
>>52054728
What's a good indicator someone isn't a retard, anon?
>>
>>52054763
a doctorate in gender studies
>>
>>52054763
They don't make retarded statements.
>>
>>52054700
Seems like its probably because I didn't know what fgets did
>>
>>52054243
Unless you employ every single programmer in the world then yes.

What good is it for someone to meet your specific requirements if they're not applying for your job
>>
>>52054869
>what are slaves
>>
>>52054869
Doesn't the free market require that some people will remain unemployed in order to increase the growth of capital, even in the job market for programmers?
>>
>>52050524
Depending on what my tripcode is, I'll start a project
>>
>>52054947
I don't want to live on this planet anymore.
>>
Any other programming paradigms I should utilize besides DRY KISS?
>>
>>52054992
NIH
>>
>>52054901
>>52054943
All I'm saying is people are taking very specific advice as if its the general case
>>
>>52054947
Every womyn page should display a hateful diatribe about why the command is sexist to women for being too hard to use and go off into a tangent about mansplaining or something.
It'll be hilarious.
>>
>>52054970
>>52055070
https://github.com/xjeweyzook/womyn-pages
WOMYN PAGES COMING SOON
>>
>>52055070
How can a genderless programmer truly be free if there are "commands" in their environment?

Shouldn't they be renamed "suggestions?"
>>
>>52054562
The number is the percentage completed.

0 means you got 0 right
5 means you got 1/20 right

You'll know if you failed if it says failed
>>
>>52055088
>oppressing the non-binary
>>
>>52055159
suggestions can be used to gaslight innocent womyn
they should be renamed requests
>>
>>52055088
please use this license
http://nonwhiteheterosexualmalelicense.org/
>>
>>52055183
Can computation itself really exist without oppressing vulnerable populations when it is based on digital (binary) logic?

Isn't waiting for quantum computing the ethical thing to do?

Isn't quantum computing enough? Should we wait for some sort of multi-verse programming in which all possibilities are rendered equally probable?

Is gender proliferation the death of logic and reason itself?

Did I leave the oven on?
>>
>>52055205
>>52055183
Righto lads, computer is booting now
I'm on holidays so it might be a bit slow of a development
>>
>>52055253
You did, get your ass downstairs.
>>
>>52055253
There's a beautiful safe space waiting for everyone in the LGBTJIDFAZT*K rainbow inside your oven
>>
>>52055267
Thanks Mom, please leave me some tendies.
>>
lel at least one guy did get banned ITT

https://www.4chan.org/bans

but not me and i'm the guy who nerd raged and posted the "duplicate" thread
>>
>>52055306
janny you forgot one
>>
So this is infinitely looping for some reason. It's meant to read a line from the file and use the first two ints like 3 and 5 in fizzbuzz and the third int is how high to go. And do this for each line until EOF
#include<stdio.h>
int main(int argc, char * argv[])
{
FILE *file = fopen(argv[1],"r");
int x,y,n,i;
char line[1024];
while(fgets(line,1024,file))
{
scanf(line,"%d",&x);
scanf(line,"%d",&y);
scanf(line,"%d",&n);

if( (n<21) || (100<n))
{
printf("n must be between 21 and 100");
}

for(i=1;i<=n;i++)
{
if( (i%x==0) && (i%y==0))
{
printf("FB ");
}
else if(i%x==0)
{
printf("F ");
}
else if( i%y==0)
{
printf("B ");
}
else
{
printf("%d", i);
}
}
printf("\n");
}
}
>>
>>52055339
kill yourself
>>
>>52055276
Your mom and I are busy on the couch, anon.
Now stop shitposting and help your mother.
>>
>>52055306
/mu/ mods are absolutely ruthless

thanks for being good /g/anitors mods
>>
>>52055275
I love LGBT communities with their message of accepting all sexual orientations.
Except for pedophiles of course, I can fuck right off. Hypocritical little shits.
>>
Thinking about a good architecture for my beatmap generator. I want all components to be as modular as possible, so I can easily swap them out. I got the following:
START -> reader (position float, eof bool)-> filter (map Map) -> writer () -> END
The reader is responsible for decoding the audio and finding positions for notes. Initially I'll use a beat tracker for finding notes. Rhythm game purists will kill me for using the baseline, but that's for now. I might make another reader based on the onset of vocals or combine them. Each time a chunk of audio is decoded and analyzed, the reader returns the last found position in ms and a flag indicating EOF. The last found position is fed into the filter.
The filter is responsible of creating a generic map based on the results of the reader. So it makes sure the map contains notes which are well spaced out and form a fun playable pattern.
The writer translates the generic map into a StepMania file or some other format. Nothing special senpai.
There're numerous knobs to turn in order to tweak the components, but I'll just use cli args for now. Eventually I want to make the application automatically detect the correct configuration.
Should I split some logic into separate modules or does it all sound good? I want to stick to the KISS principle as much as I can.
>>
>>52055406
*LGBTP
>>
>>52055425
P for pansexual maybe, it's a miracle the whole alphabet hasn't yet been integrated into the abbreviation.
>>
>>52055425
*LGBTQPOMGWTFBBQT᠎BHF᠎AM
>>
>>52055469
>the alphabet
fuck you you west centred white normative patriarch shitlord
>>
>>52055469
That's what the + in LGBTQIA+ is for.
>>
>list to string in Haskell
let showList = ("[" ++) . (++ "]") . (foldr (++) "") . (join ", ") . (map show)


;-) I'm going to write all my programs point-free
>>
>>52055502
I mean, all of unicode of course.
>>
>>52055528
muh nigga
>>
>>52055509
nah it's LGBTTIQQ2SA
>>
>>52055509
Who will be satisfied with that? Is one sexual orientation more important than the other that isn't earlier in the list? Shouldn't minorities be presented better?
>>
Just learning about type theory, dependent types and Coq. Very interesting stuff.
>>
>>52055534
>in the future, emojis are part of the LGBT abbreviation
>>
>>52055509
>>52055534

>tfw LGBT becomes .*
>>
>>52055564
does the 2 stand for 2D?
Because i identify as a 2D anime schoolgirl.
>>
>>52055608
Lesbian, Gay, Bisexual, Transsexual, Transgender, Intersex, Queer, Questioning, 2-Spirited and Allies
Thread replies: 255
Thread images: 20

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.