[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: 32
File: DPT.png (389 KB, 934x1000) Image search: [Google]
DPT.png
389 KB, 934x1000
Old thread: >>54818406

What are you working on /g/?
>>
>>54827174
Muh OS (as soon as I get done with summer classes)
>>
let me just store everything at random and complain why it is random
>>
Nothing, as school has robbed me of my passion with mundane and uninteresting assignments and I have nobody to collaborate with on any interesting project.

I lack impetus, and thus I create nothing.
>>
>>54827231
>lazy
>blame school
>>
I just got out of a decade-long depression I was sure was going to last my entire life and now I'm making insane tech $ in my early 20's

I want to help you guys because I generally like you, and I sorta feel like you're like me. At least you're better than the average Silicon Valley douchebag. What can I do to help?
>>
>>54827275
You'll need some rope.
>>
File: 1460179110116.png (2 KB, 139x138) Image search: [Google]
1460179110116.png
2 KB, 139x138
>>54827267
Robbed of passion != OH WELL THAT'S TOO MUCH WORK FOR ME

Go ahead and write a basic roguelike in Assembly. Oh, you don't want to have to spend the tedium doing that? Guess you must be lazy!
>>
>>54827304
>ROBBED of passion
Yeah, and tax cuts are ROBBING the poor
>>
>>54827275
Successfully kill me off, for I cannot do it myself.
>>
kill me boo
>>
>>54827283
>>54827321
I had forgotten what beauty feels like, too. It would mean the world to me if you kept on for a while longer.
>>
>>54827351
Not the same guy, and I didn't mean for me, but fuck off you don't even know me
>>
>>54827275
host some shit on for anons >>54818410
like automated windows mpc-qt unofficial builds online
https://github.com/cmdrkotori/mpc-qt

or some other shit like that
>>
>>54827370
I love you.
>>
can anyone write a one-liner of this function?

def function(a, b):
d = ""
for i in b:
for c in a:
if i == c[0]:
d += c[1]
return d
>>
>>54827174
Hello fellow programmers, can anyone tell me where can I learn C# that you recommend? It can be video tutorials, books or web pages. Thanks in advance.
>>
>>54827351
I haven't forgotten beauty, nor am I, at present, living in monochrome. I've been in much more uncomfortable and desolate states.

I'm just tired of being alive, and know there's a very high probability that I'll keep going no matter what happens. Something stopping me by force is an okay thing to happen to me at this point.
>>
Working on Qt. The program connect to the database, show the web pages of the database. Also show times and temperature. Finally power of the TV if there is nobody in front of it during 5 minutes.
>>
>>54827432
Σ[ c[1] | i <- b, c <- a, i == c[0] ]
>>
>>54827449
Have you tried antidepressants?
>>
>>54827469
in python please
>>
I'm working on a gui terminal customization tool for linux. one probably already exists but I didn't look that hard. Anyways right now it supports urxvt what other terminals should it support.
>>
>>54827530
- Xterm
- Terminator
- Terminal
- urxvt-unicode
- Terop
- Jumax
- Leriox
- Valix22
- Bazing
- Zimbabue
>>
>>54827498

Antidepressants are bad. They make you shoot up schools.
>>
>>54827501
i don't know python
how about this

sum(map(lambda x: c[1], filter(lambda i: first(i) == c[0], product(b,a)))
>>
>>54827498
I'm not particularly depressed. Medication isn't a lifestyle I'd like to embrace anyway.

I just eat some cocoa beans (phenylethylamine etc) or yerba mate if I need to force the ability to change my state.
>>
>>54827563
Antidepressants make millions of people able to enjoy life. If they cause a couple to shoot up a school (and evidence for this plz), frankly, it's well worth it. Be selfish. You deserve it.
>>
>>54827568
>i don't know python
what language do you know?
some functional programming language?
>>
>>54827596
>(and evidence for this plz)

Look at the spate of shootings we've had over the past decade. Find one shooter that wasn't taking some sort of anti-depressant or anti-psychotic medication.

pro-tip: impossible
>>
>>54827600
several languages
mainly C++, D, F#, bit of Hasklel
>>
>>54827596
If they need antidepressants, chances are they shouldn't be enjoying the life they have. In the long run they'd be better off unraveling and addressing their real issues to achieve meaningful change.

the argument that antidepressants get people back on their feet to keep going, discover, and fix their lives, doesn't hold much water. Between the side effects and how it skews perception, they don't change much of anything. I've seen it once, I've seen it ten times, and I'm going to see it again.
>>
what are the rules for using for loops as variables in python again?

like
a = (b for b in c if b == d)
>>
>>54827732
fuck yourself learn Java
>>
>>54827732
grow up and learn an adult language
>>
>>54827668
It was the only thing that worked for me. Sometimes there's no one there for you, and you don't know how to make a connection with another person without feeling this endless, sharp misery, and no idea how to find out how to do it. Antidepressants aren't a cure-all. If you don't make the right changes yourself, it won't work. In fact, it's not even a guarantee-- some drugs just don't work for some people. But it can be work it.

>>54827625
It might be because most psychotic people are on antipsychotics.
>>
How the fuck do I enable irssi's new built-in sasl?
I set the shit in my config file and still it does absolutely nothing.
>>
>>54827432
The python way nowadays is to use list comprehension
Look it up
>>
>>54827732
you should probably look up list comprehensions to understand that and how its not "for loops"
>>
File: Persona_3_Aigis_4.jpg (1 MB, 2818x4062) Image search: [Google]
Persona_3_Aigis_4.jpg
1 MB, 2818x4062
>>54827275
>What can I do to help?

Help us build robot gfs.

Specs:

>Android body with height equal to mine
>Carbon fiber reinforced polymer frame with some parts, esp. joints made of aerospace-grade magnesium alloy
>Soft polymer hair, gold blonde
>Crystal blue eyes, each one contains a 15 Mpix RGB CMOS sensor with wide focus
>A fully functional mouth with teeth and 3 DOF tongue
>Fully functional hands and legs
>Art deco design
>Total weight is 50 kg of which 25 kg are li-pol accumulators
>8 hr working time, 3 hrs charge time
>Full custom OS of my design running on embedded 8 core CPU + 2560 core GPU
>Biometrically locked to my appearance and behavior
>Obeys me and protects me
>100% loyal to the point of compromising self-preservation
>fully customizable
>never ages
>>
File: AR180-1.jpg (486 KB, 1907x953) Image search: [Google]
AR180-1.jpg
486 KB, 1907x953
>>54827785

The worst thing is, though, if you go to the pysch and they think you're ""dangerous"" then they'll have all your guns taken away. Definitely not worth it.
>>
>>54827447
MSDN?
>>
>>54827751
>>54827781
I've been using Java for six fucking years. I'm asking required to do this in python you useless retarded pieces of shit

Slam your head against a window again and again against a window until it shatters than run your throat across the bottom of the window
>>
>>54827832
calm down rajesh
>>
>>54827832
>Java
grow up and learn an adult language
>>
>>54827809
Is this a joke? If not, I think you have an unhealthy and irrational obsession with guns.

>>54827800
I'd rather help you be happy in the absence of tech which is at least a few generations away. You have a computing machine which can do billions of calculations a second-- enjoy that for now :p
>>
>>54827842

If you're not using C exclusively then you'll never be a 10X rockstar guru.
>>
>>54827840
>>54827842
>>54827751
>>54827781

You're worthless beings who contribute nothing to society. Die
>>
>>54827882
>python >java
You're a worthless being who contributes nothing to society. Stop programming.
>>
File: 1445387586987.jpg (102 KB, 960x720) Image search: [Google]
1445387586987.jpg
102 KB, 960x720
>>54827869
>being obsessed with guns
>unhealthy
>irrational

Yeah, no thanks, mate. I don't subscribe to communism.

Free men have an obligation to be armed at all times.
>>
>>54827842
>>54827840
>>54827798
>>54827781
get off this board and never come back
>>
File: sicp anime girl 3.jpg (100 KB, 600x338) Image search: [Google]
sicp anime girl 3.jpg
100 KB, 600x338
>>54827882
read sicp
>>
>What can I do to help?
Hire me for 20$/hr to do any programming work. I can handle both high-level and low-level programming and even some math. Node.JS is ok too.

The only real downside is that I'm from the other side of the globe.
>>
>>54827903
>>54827892
you should honestly kys
>>
>>54827872

everytime I come to these threads you are giving your useless opinion on programming languages

eat a dick
>>
File: KYS KYS KYS.gif (48 KB, 2034x1491) Image search: [Google]
KYS KYS KYS.gif
48 KB, 2034x1491
>>54827916
>>
language elitists are cancer and need to commit suicide
>>
>>54827916
>>54827918

Ladies and gentlemen, we've got not one but TWO children with us today!
>>
>>54827899
not sure why you're telling me to leave.

thats not a for loop. its a list comprehension that creates a tuple. maybe you should just kys for rejecting an suggestion that'll help you actually understand what you're doing
>>
>>54827832
oh you wanted to know it in python? let me help.

__all__ = ('NamedTemporaryFile', 'gettempdir',)


if os.name == 'nt':
class TemporaryFile(FileProxyMixin):
"""
Temporary file object constructor that supports reopening of the
temporary file in Windows.
Note that unlike tempfile.NamedTemporaryFile from the standard library,
__init__() does not support the 'delete' keyword argument in
Python 2.6+, or the 'delete', 'buffering', 'encoding', or 'newline'
keyword arguments in Python 3.0+.
"""
def __init__(self, mode='w+b', bufsize=-1, suffix='', prefix='', dir=None):
fd, name = tempfile.mkstemp(suffix=suffix, prefix=prefix, dir=dir)
self.name = name
self.file = os.fdopen(fd, mode, bufsize)
self.close_called = False

# Because close can be called during shutdown
# we need to cache os.unlink and access it
# as self.unlink only
unlink = os.unlink

def close(self):
if not self.close_called:
self.close_called = True
try:
self.file.close()
except (OSError, IOError):
pass
try:
self.unlink(self.name)
except (OSError):
pass

def __del__(self):
self.close()

def __enter__(self):
self.file.__enter__()
return self

def __exit__(self, exc, value, tb):
self.file.__exit__(exc, value, tb)

NamedTemporaryFile = TemporaryFile
else:
NamedTemporaryFile = tempfile.NamedTemporaryFile

gettempdir = tempfile.gettempdir
>>
File: longperiod[1].gif (4 KB, 531x260) Image search: [Google]
longperiod[1].gif
4 KB, 531x260
Is there a python package to determine the time constant from raw data of a response curve?


Most of my data looks like the bottom of pic related.
>>
>>54827785
I've been there. Above I called medication a lifestyle choice, and that wording was very intentional. That's what it is, and it must be acknowledged as such.

Keep looking. And don't accept some vague notion of "chemical "imbalance"", or the idea that you're just broken or faulty from the get-go. You cannot take a mechanistic approach to describing human experience without also considering that the person themselves -is- that very machine. This renders the notion of a strictly mechanical failure not such a solid assertion.

Diet is the first thing to start with. I'd recommend a food allergy test. Histamine is a modulatory neurotransmitter, and it'll cause mood problems if it's consistently above baseline (ie your mast cells are chronically pumping it out for no good reason, your BBB becomes more permeable, and your brain can be compromised by circulating immune cells). This was part of my problem, and why I was having depressive episodes where I could barely bring myself to form a sentence, and mixed states etc.
>>
>>54827918

I was being sarcastic. I'm not part of the PL-fagging, thanks.

Well, mostly -- I get involved when delusional Cmen try to claim it's the greatest language ever conceived.
>>
>>54827896
All right. Well I still can't tell if you're memeing or not. Either you're autistic, i.e. you're serious, or I'm autistic, i.e. I'm catching the bait.
>>
>>54827940
normal function
def function(a, b):
d = ""
for i in b:
for c in a:
if i == c[0]:
d += c[1]
return d


one liner
def function(a,b):
d = ""

d += [c[1] for i in b for c in a if i == c[0]][0]

return d



this is not working...
>>
>>54827869
>You have a computing machine which can do billions of calculations a second-- enjoy that for now :p

I don't even have a titan X to run tensorflow and friends. My nvidia thermi 580 unironically fried itself ;-;

>I'd rather help you be happy in the absence of tech which is at least a few generations away.
Well, in current year we can make at list a simulated robot gf and work with that. If the simulation is good enough we'll be able to swiftly adapt it to real robot body once it becomes available.
>>
>>54827549
Thanks man ill add em to the list.
>>
>>54827947
you are a jackass and by your code it seems that you know fuck all about programming.
>>
>>54827939
>sees someone a question about a certain programming language you don't like
>get butthurt, insult them and order them to use another language while automatically assuming they're a race you don't like
>they're the baby
>>
I'm trying to get a web application written in python to freeze properly for El Capitan, but struggling. Might just release it windows only.
>>
>>54827987
>it seems that you know fuck all about programming
>FOR LOOPS AS VARIABLES
>>
File: 1421680731602.jpg (157 KB, 500x500) Image search: [Google]
1421680731602.jpg
157 KB, 500x500
>>54827974
>thinking people should be armed is an autistic position.

If that's autistic then call me Spede Pasanen.
>>
>>54827995
It's all about appearances anon
It's not thanks to your retarded choice in babby languages that I expect you are not an adult, but because of your cancerous posts that indicate you are at best new to 4chan and at worst new to life.
>>
>>54828019
riffle?
>>
>>54828030

Ironic shitposting is still shitposting.
>>
Hey /dpt/ what language should I pick to start learning programming?
>>
>>54828045
>>>/tv/
>>
>>54827974
>Either you're autistic, i.e. you're serious

>>>/lgbt/
>>>/reddit/
>>
Some faggot and another faggot are about to tell you that you should pick Java or Python

WHATEVER YOU DO, DO NOT LISTEN TO THOSE PEOPLE
>>
>>54827432
What do you want to achieve?
>>
>>54828045
Start with JavaScript. Press F12, type console.log("hello world!")

Congratulations!
>>
>>54828022
>insult me for using a certain programming language
>i'm the child
>>
>>54828045
PHP
>>
>>54828066
a one liner
>>
>>54828076
>i-it's not fair! how come he gets to insult me

free speech is for adults
>>
>>54828093
pythong masterrace gets all the pussy.
>>
>>54828132
yeah and maybe if they stopped acting like petulant cat ladies they might get some women too
>>
>>54828076
>tfw I'd rather go back to being a child with qt child body and no responsibilities

Why aren't you working on age-reversing therapy, /dpt/ ? Here is the human genome download https://pirateproxy.pe/search/human%20genome/0/99/0 what else do you even need
>>
>>54827197
Hey, no way! Me too.
Tell me more about your OS. C or ASM? How far to you want to take it?
>>
>>54828167
far up your ass
>>
>>54828149
>might get some women too
>/g/ autist projecting onto the pythong masterrace
It's just another social status, don't worry. You wouldn't understand anyway.
>>
>>54828163
DNA is my favourite programming language, but it's missing a few reference manuals.
>>
>>54828163
too busy masturbating.
>>
gcc -O3 made my code slower than -O2 and in fact slower than no optimization.
>>
>>54828218
>>>muh pussy
>>get btfo
>a-autism
stay classy
>>
>>54828225
plz search all the sum of human knowledge here, anon http://libgen.io/ I'm sure there are some Human Molecular Genetics manuals there
>>
>>54828241
This will probably be easy enough for you

https://www.codecademy.com/learn/python
>>
>>54828167
Combination of both, I've just been following along with this book and adding shit as needed (can't say it doesn't do the greatest job of explaining things sometimes).
https://littleosbook.github.io/
Can't say how far I'll go with it, knowing me I'll probably get bored of it and drop it in a few months
>>
File: dpt programming advice.png (6 KB, 433x91) Image search: [Google]
dpt programming advice.png
6 KB, 433x91
>>54828270
I don't want to learn trash
>>
>>54828225
Tried to get into it, but it seems very poorly documented. Most codebases seem like they're just haphazardly thrown together and only happen to work well enough for a certain set of tasks. Large functions often don't ever seem to be called. It's as though their programmer likes to leave remnants of the past to sleep, waiting to reawaken by chance.

The patent situation also kind of sucks.
>>
>>54828350
>[spoiler]
>>
>>54828315
but you could move out of your mother's basement within months if you picked it up :,( I'm just trying to help
>>
File: 1456717094021.jpg (231 KB, 1190x1118) Image search: [Google]
1456717094021.jpg
231 KB, 1190x1118
just fuck my shit up...my entire program looks like this but fuck refactoring hundreds of lines into nice methods, I'll never be able to change it when i'm done.

//send message
public static void sm(List<string> command, ref List<Message> message)
{
if (command.Contains("/?") || command.Contains("-?"))
{
Console.WriteLine("sm usage:\n\tsm sends the current message queue(built using the bm command) to all of the current target processes\nswitches:\n\t-s: sends the message queue synchronously\t(Win32/SendMessage)\n\t-p: posts the message queue asynchronously\t(Win32/PostMessage)");
}
if(command.Count == 2)
{
if(command[2] == "-s")
{
foreach(Message m in message)
{
m.send();
}
}
else if(command[2] == "-p")
{
foreach (Message m in message)
{
m.post();
}
}
}
else if(command.Count > 2)
{
Console.WriteLine("sm has a maximum of one argument\ntype sm /? for help");
}
else
{
Console.WriteLine("sm requires at least one argument\ntype sm /? for help");
}
}
>>
>>54828350

(N * 10^-n) % 10
>>
>>54828324

Dead code elimination was scrapped during the creation of the original compiler.
>>
File: 1415148655093.gif (499 KB, 500x281) Image search: [Google]
1415148655093.gif
499 KB, 500x281
>>54828372

Mk.III

>>54828392
yea, I'm tired and stressed.

public class Problem_2 {

public double subLinearFib(int n){

int firstHalf = n;
int secondHalf = n;

if(2 < n){

if(n % 2 == 1){
firstHalf = ((n - 1) / 2) + 1; // 249 - 1 = 248 / 2 = 124 + 1 = 125
secondHalf = firstHalf - 1; // 125 - 1 = 124

return (double) (Math.pow(subLinearFib(firstHalf), 2) + Math.pow(subLinearFib(secondHalf), 2));
}

else{
firstHalf = n / 2; // 250 / 2 = 125
secondHalf = firstHalf - 1; // 125 - 1 = 124

return (subLinearFib(firstHalf) * (2 * subLinearFib(secondHalf) + subLinearFib(firstHalf)));
}
}

return 1;
}

public static void main(String[] args) {
Problem_2 func = new Problem_2();
double x = func.subLinearFib(250);
System.out.println(x);


}
}
>>
>>54828409
It seemed lazy and wasteful at first as far binary size, but it's actually a very good feature to guard against memory corruption. Some dead code can also improve and reactivate itself by chance.

Downside is it can screw up your program sometimes.
>>
>>54828402
jesus fucking christ why C#
what is this for
do you actually need it to be in C#
>>
>>54828407
The output seems accurate as far as I'm concerned, but the actual output of the 250th Fib is

like 50 characters long
>>
>>54827896
Free men have a duty to armed at all times
>>
>>54828458
Use that to extract digits
>>
>>54828414
is this your fucking homework
>>
>>54828462
>free
>duty to be armed
pick one

free GOOD men have a duty to be armed
>>
>>54828462

Yes, that is correct.
>>
>>54828010
Mate, your code is no good unless you have to read it backwards and upside down for it to make sense
>>
Who here has fucked with OpenGL?

is it like a series of functions?
>>
>>54828462
A lot of people can barely handle having power over themselves, much less power over others. A lot of people shouldn't be armed.

If I had my way, there would be a very well defined set of actions that would immediately and permanently strip the right to have a firearm. I'm very sick of reading about cases where morons get to keep their guns.

If the state didn't exist, this belief could be individualistically enforced. Might as well use it since it does exist.
>>
>>54828449

It's c# because Windows API stuff with c++ makes me want to die. I'm just casting all of the fucky windows structs/unions to friendly c# types so i can get this done quicker. It's nothing more than an experiment.
>>
>>54828445

Frankly, the compiler itself has made many people very angry and has been widely regarded as a bad mov.
>>
File: 1464287167302.png (113 KB, 540x521) Image search: [Google]
1464287167302.png
113 KB, 540x521
>>54828582
>If I had my way, there would be a very well defined set of actions that would immediately and permanently strip the right to have a firearm.

Like being a counter-revolutionary, right? Marx get out.
>>
>>54828324
>work well enough for a certain set of tasks

if you do more than that, you are wanking. if you're not getting paid for those tasks, or if you're getting paid more than you need to live and support your family if you have one, then you are wanking.

99% of pl/cs is wanking. of course a lot of people like to wank, and some people will pay you to wank for them, but it's still wanking.
>>
>>54828582
>A lot of people can barely handle having power over themselves

The most beautiful thing I've ever heard
I - I think I'm crying
>>
>>54828587
Agreed. Since its earliest version reception has typically been less than positive. A lot of people have to wonder "why", "why must it be designed this way." Unfortunately there's a lot of backwards compatibility baggage at this point.

Attempts to contact the devs are most fruitless. The only replies are scattered in archives of forum posts written years ago, and they just blame the OS interfaces and frameworks they had to work with.
>>
File: real_burger.jpg (79 KB, 780x497) Image search: [Google]
real_burger.jpg
79 KB, 780x497
>>54828616
>if you're getting paid more than you need to live and support your family if you have one, then you are wanking.
>>
Hey I have a question. I have one day on gitHub where I have a ton of contributions, and on most other days I have a few, say 2-5, but on this one other day, I had a ton.

This one day is skewing the green color gradient to make every other day but this huge day of many contributions to be a pale green boxes instead of relative greens, due to the outlier, which is solid green.

Is there anyway to fix this? It's not pleasing to the eye, and it makes it hard to judge at a glance the difference between days when I contributed 3 and days when I contributed 6.
>>
>>54828610
Like being a moron and giving your kids guns to fuck around with. I'd also get rid of youth hunting. Want your kid to learn how to use a firearm? Have em shoot targets in the back yard. Don't need a bullet coming through my window because some kid tried to shoot something on a slope.
>>
>>54828766
>I'd also get rid of youth hunting.

I went hunting as a kid. Nothing bad happened.
>>
>>54828505
Unfortunately that's not my code :^(
>>
>>54828766
http://thegrio.com/2015/08/21/teen-boy-saves-siblings-home-invasion/
>>
>>54828779
>Personal anecdote
>All other cases will follow the conditions of my anecdote

You're asking for someone to not only trust the adult, but the kid as well as their dynamic. It raises the probability of someone getting shot.
>>
>>54828821
Not if you apply basic parenting you fucking dolt
>>
>>54828402
if command.Count == 2, command[2] shouldn't exist?
>>
>>54828821
>A bad thing may arise because of this situation
>Therefore we must ban it
You're european, yes?
>>
>>54828821

It's also a non-issue.
>>
>>54828883
alright but what about niggers and guns

and Shadow the Hedgehog (2005)
>>
>>54828896
give whites guns
>>
>>54828837
>Everything will always go according to plan.
>You should trust that other people will always make all the right decisions.

Look, let's stop being dim on purpose here. You're walking in the woods, wearing whatever it doesn't even matter. Kid shoots at something on a knoll, or down a slight incline. Doesn't know there's a road / path beyond the foliage occluding their sight. Misses, you happen to be there, you get shot. One example among the myriad problems that can occur.

People should always be assumed to be possibly incompetent when it comes to risk assessment.

Anyway. Fuck off, I'm not getting dragged into a debate about common sense.
>>
>>54828896
>niggers
>shadow the hedgehog

Ban both of them.
>>
>>54828908

Why is it that gun grabbers (you) always use the phrase "common sense" in relation to their absurd hypotheticals?
>>
>>54828860
America. From Vermont.

>>54828883
It also sets aside weeks of fall where you have to watch out for other people's bullshit more than usual. Best case scenario you feel like picking up all their beer cans after they go road hunting and make a few bucks.
>>
>>54828908
I thought anecdotes didn't matter
>>
>>54827432
wtf is this even valid python? What are you trying to do
>>
>>54828922
Because you wish common sense was common. And I'm not a "gun grabber". I just said there should be reasonable restrictions on who can have one, and how bad you can fuck up before you have them taken.

Mankind is not ready to disarm, and might never be. Doesn't mean any old dumbass should have whatever they want.
>>
File: hebrew text adventure.gif (826 B, 120x160) Image search: [Google]
hebrew text adventure.gif
826 B, 120x160
>>54828929
>From Vermont
>>
Might buy an external harddrive, can't find a suitable cloud storage for my porn.
>>
>>54828930
That's a hypothetical, not an anecdote.

>>54828974
Jews are relatively uncommon in Vermont. And I'm not secretly Bernie Sanders.
>>
>>54828968
>And I'm not a "gun grabber".

Right, and I'm the Queen of England (god save her).

>I just said there should be reasonable restrictions on who can have one

You can 'reasonably restrict' yourself to hell, gun-grabber.
>>
File: 1462790041023.png (204 KB, 750x3200) Image search: [Google]
1462790041023.png
204 KB, 750x3200
>>54828968
No, you don't want to take their guns, you want the state to do it for you
>>
>>54828987

Given that Vermont is one of the most gun friendly states in the nation, you MUST be Bernie Sanders. He is not a VT native, and for that reason, he does not like firearms. You do not like firearms. You are Bernie Sanders.
>>
>>54829000
nice trips and nice memefont
>>
>>54829000
I said in a prior post that if the state didn't exist, it could and would be enforced individualistically. If someone was a nuisance, anyone could choose to solve the problem as they saw fit and deal with any unforseen consequences.

This is not the world we live in. The human species has been at this for a while, we have the means to know what does and doesn't work over time. Hence why I'm not saying "no one should have guns".

Binary reasoning is retarded.

>>54829024
>The goyim are on to me.
Better go.
>>
>>54828987
fucking bernie sanders on /g/
>>
File: n11uP.jpg (217 KB, 1041x584) Image search: [Google]
n11uP.jpg
217 KB, 1041x584
>>54829041
There is absolutely ZERO evidence to suggest a correlation between homicide rate & gun ownership
>>
bernie is at the dubs game guys; chill
https://twitter.com/GuyFieri/status/737474928363118592
>>
>>54829061
I absolutely DIDN'T say there was, and am NOT interested in any argument FROM THAT PARTICULAR ANGLE.
>>
>>54828851

i fixed it :)

//send message
public static void sm(List<string> command, ref List<Message> message, ref List<SimpleProcess> targets)
{
if (command.Contains("/?") || command.Contains("-?"))
{
Console.WriteLine("sm usage:\n\tsm sends the current message queue(built using the bm command) to all of the current target processes\nswitches:\n\t-s: sends the message queue synchronously\t(Win32/SendMessage)\n\t-p: thisshitistoolongtopost)");
}
if(command.Count == 2)
{
if (message.Count > 0)
{
if (command[1] == "-s")
{
foreach (SimpleProcess t in targets)
{
foreach(Message m in message)
{
m.send(t.handle);
}
}
}
else if (command[1] == "-p")
{
foreach (SimpleProcess t in targets)
{
foreach (Message m in message)
{
m.post(t.handle);
}
}
}
else
{
Console.WriteLine("invalid argument\ntype sm /? for help");
}
}
else
{
Console.WriteLine("No messages to send.");
}
}
else if(command.Count > 2)
{
Console.WriteLine("sm has a maximum of one argument\ntype sm /? for help");
}
else
{
Console.WriteLine("sm requires at least one argument\ntype sm /? for help");
}
}
>>
File: friendly advice.png (100 KB, 715x611) Image search: [Google]
friendly advice.png
100 KB, 715x611
>>54829084
So WHAT THE FUCK ARE YOU TALKING ABOUT?

pic unrelated
>>
>>54829084
>>>Guns are bad because of people killing people
>>Facts showing homicide rate doesn't correlate with gun ownership
>I'm not at all interested in any argument from that angle
>>
>>54827981
consider:
konsole
xfce4-terminal
>>
>>54829130

Let's just lay this to rest and talk about programming.
>>
>>54829099
I'm talking about INSTANCES wherein it is reasonable to SUSPECT an individual is not COMPETENT to own a firearm, wherein it SHOULD subsequently be TAKEN AWAY until they can prove the capacity for decent DECISION MAKING, or in some cases, INDEFINITELY.

I think it would make sense for FIREARM ownership to be treated like a DRIVER'S LICENSE. If you can at a minimum fake the ability to NOT be RETARDED, you can own and operate a FIREARM. Naturally everything is DUALISTIC, a kid COULD kill or run off someone breaking into their house if firearms AREN'T SECURED, or they COULD fuck around with them with their friends or sibling and have someone end up DEAD because reasoning if contextual and situational, they might behave correctly with a parent and not otherwise. This HAPPENED in my lifetime in a town I won't directly name that's near Cabot, and it's fairly clear it DIDN'T NEED to happen.

So it all DEPENDS how you think the world OUGHT to be and how it will weigh out. I don't PERSONALLY care about forcing people to register guns or secure them, that's more or less a matter of chance. I DO think if you're some MORON letting your toddler play with a handgun, and they end up shooting someone, you should have your guns taken away. Like I said, COMMON SENSE, ETC.

Don't be a STUPID PRICK.
>>
>>54829205
B-T-DUBS, I've got A LOT of SHIT to do, so CONVERSATION is OVER on my end.
>>
File: 1463182457525.jpg (860 B, 94x94) Image search: [Google]
1463182457525.jpg
860 B, 94x94
>>54829205
>>
File: 1463432858226.gif (2 MB, 220x160) Image search: [Google]
1463432858226.gif
2 MB, 220x160
>>54829205
>>
WHY THE FUCK CAN'T I DISAMBIGUATE NAME COLLISIONS BETWEEN ADT CONSTRUCTORS IN HASKELL USING THE TYPE NAME

FUCK
>>
>>54829205
>I think it would make sense for FIREARM ownership to be treated like a DRIVER'S LICENSE.

NEVER YOU PIECE OF FUCKING SHIT COMMIE! NEVER IN YOUR MOTHERFUCKING LIFE TIME! MOLDY LABIA. SHALL NOT BE INFRINGED!
>>
Will we ever have a thread that isn't ruined by the tripfag?
>>
>>54829333
THESE FUCKING TRIPS ARE RIGHT
>>
>>54829362
Functionally this would ONLY apply to NEW purchases, despite technically applying to EVERYONE. It's LITTLE DIFFERENT than getting a youth PERMIT or HUNTING LICENSE, except it DOES NOT need to be RENEWED.

But they'd PROBABLY charge you INITIALLY. Otherwise no one GIVES A SHIT if you INHERITED your FATHER or GRANDFATHER'S firearms. Unless you try to buy another or GET a HUNTING LICENSE.

Use your HEAD and stop being STUPID.
>>
Alright /g/, entertain me. I think FP is total horseshit and a waste of time. If you can show me something IMPRESSIVE you've done with FP, I will concede to the anon who has impressed me and use a functional language on a project of his/her choosing. Note that it does have to be your own work.
>>
>>54829411
Your dubs look much nicer than my singles

>>54829536
You will consider literally nothing impressive
Do you think Monad comprehensions (for instance, list comprehensions) are bullshit?
>>
>>54829461
>Functionally this would ONLY apply to NEW purchases

I WILL BUY GUNS OUT OF SOME GUY'S TRUNK UNTIL THE DAY I DIE! LICENSING AND REGISTRATION WILL NOT BE TOLERATED.
>>
>>54829548
WHAT WOULD BE STOPPING YOU?
>>
>>54829536
>>54829545

In order to establish fair rules I will rate examples 1-10 with compelling reasons as to why I am not impressed.
>>
>wake up
>see quality of thread
>head on to IRC
On a related note. Anyone know a neat hexchat plugin which let's you view image links on mouse hover or preferably by setting the focus (using tab for instance) to the image link?
Also same for pastebin would be nice but that's less of an issue.
>>
>>54829567

Nothing will stop me. The spirit of 1776 is still alive.
>>
>>54829585
also any hexchat plungin which can highlight user messages on click?
>>
>>54829591
The human species is composed of relatively fixed underlying constants. The past continues because very few things ever truly end, nor begin.

Got shit to do. Bye tripknob.
>>
>>54829575
Can we have some inspiration?
>>
>>54829536
FP and OOP is about writing and designing code

The end products are not what either is about. You can do anything with both. But the advantages come in terms of the process of writing/designing said product.
>>
>>54829637
>Got shit to do.

Yes, your campaign trail won't march itself.
>>
>>54829637
fuck off bernie
>>
>>54827174
so i have taken two semesters of object oriented programming in java, i have summer break right now and have nothing to do. What i should work on or any projects that i can do?
>>
>>54829734
got any interests? like networking, compilers, etc...my guess is probably not much considering only two semesters. You can still try to think about these things because an invested interest will give you direction which can help you greatly in the future. And it's not a permanent commitment; you could toy around with something (say networking) and realize it's not that fun. You'll still have gained something.
>>
>>54829575
>>54829644
Like a simple task or something
>>
>>54829909
I was looking more for completed projects some anons had done
Not like the source code or anything. just a quick description of what it is
>>
>>54830036
I haven't really done any interesting products but you can get nice solutions to many problems
>>
>Describe my algorithm to my professor, ask if it would be a correct solution to the problem
>He says yes
>Code it up to the point where it gets right the one example input we are given
>Email professor with solution to second input (which we don't have example output for)
>Says it's about 200 off the optimal length

Welp, good thing the professor extended the due date.
>>
>stop talking about gun control
>/dpt/ dies
This is what fucking happens when we talk about programming you shits
>>
File: 1464305892224.jpg (42 KB, 712x712) Image search: [Google]
1464305892224.jpg
42 KB, 712x712
I'm trying to teach myself how to do network programming in C by making a shitty chat program. How do you properly use select() to read() from a single socket without blocking? From what I've read it's possible, but most examples I can find are geared towards using it to read from multiple sockets, and I just need to use it as a simple check to see if information has been received.
>>
>>54830226

I love that. Works for the one, or few, test cases you've come up with, then it all goes horribly off the rails.
>>
>>54830247
async monad
>>
>>54830234

Oh hey, that reminds me... the other day, I met someone petitioning for the most nonsensical gun control legislation ever. Essentially, you can tell a judge that a family member or a neighbor is crazy, and they lose their gun rights. And if they want it back, they have to prove they're not crazy.
>>
>>54830278
That's nothing, check out the gun control discussion itt

Sample:

>>54829061
>>54829084
>>
>>54828546
I've done some fucking.
But what isn't a series a functions?
>>
>>54828546
It's a specification
>>
hey fags
recommend me some udemy courses
>>
>>54830333
What the fuck is a Udemy? It sounds like a fucking tube or something connecting to an organ
>>
>>54830297

The first poster is correct, though. The latter is a gun-grabber weenie from Vermont who is probably Bernie Sanders.
>>
>>54828240
well -OX isnt magic mate, rtfm
>>
>>54830359
its where you pay (or watch free-) courses, like lynda.com

i saw one that was promising but it was written by an indian fella :(
>>
>>54830366
That's my point, the first is clearly a very strong argument against gun grabbers
>>
>>54830379
Just watch online tutorials and shit, no point paying
>>
>>54830388

Oh, thank the lord. I was worried you were suggesting they were BOTH ludicrous arguments.

My faith in /dpt/ has been restored.
>>
>>54830404
>having faith in nu/dpt/

/dpt/ is full of OOPSfags, snekfags, javafags, webfags, GPLfags, etc
>>
>>54830416

Are you joking? It's full of OOP-haters, delusional functionalfags, and incorrigible Cmen.
>>
>>54830416
webfags? Haven't seen one in dpt yet.
>>
>>54829863
maybe compilers, network from what ive heard is terrible. Also are there any games out of java? Or is c++ the best for games?
>>
>>54830460
>functionalfag
Functional programming is straight, that's why there are so many arrows in signatures
>>
>>54830460
>incorrigible Cmen
heh

When someone posts Java, there is always someone to complain.

But thankfully I see Python as one of the popular languages that gets the least amount of /g/ hate.
>>
>>54830482
>Also are there any games out of java?
Every popular mobile app?
And do I even have to say it? Minecraft
>>
>>54830491

That's because almost all the cool /dpt/ anons have left
>>
>>54830511
oh shit Minecraft? wtf
>>
>>54830513
Don't see how unavoidable derailment is cool.
>>
>>54830513
you're still here ~
>>
>>54830482
There are plenty of frameworks/libraries for games, Java being one of them; if you're interested in graphics/rendering though I recommend C/C++. Honestly you could probably find a tutorial on OpenGL and learn C/C++ from that as long as you are patient and do research on things that you don't understand or come off as weird. You'd definitely need to research pointers, but if you understand how Java references work under the hood I'm sure you could segue into them fast.

I, personally, really enjoy OpenGL. There are bindings for other languages so you don't necessarily need to learn C/C++ to use it, but it's a good challenge if you want a challenge. Will also look pretty good in the future if that bears any weight.
>>
>>54830485

Cmen use an awful lot of arrows, too, but we know how gay they are.
>>
>>54830513
The thread quality is pretty fucking bad as of late. At least during the average 2 ints meme-era people posted fucking code.
>>
>>54830558
Never called them gay, that was you

>>54830577
put prime fizzbuzz in next OP
>>
I've only ever made some basic web applications (mostly project management/task assignment stuff). I'm looking at making a basic desktop application that will effectively be a time clock.

Here's what I want it to do:

Have a list of employees that you can add/remove
Allow each employee to clock in and clock out multiple times a day
At the end of the week generate a report for each employee that show each day and a total number of hours at the end of the week

I know how I can implement the features but what I'm not sure about is the structure. I'm not sure what classes I should use. Should their be an employee class, a timeclock class, and a report class or should all of the functionality be consolidated to one or two classes?

I wind up with analysis paralysis when I try to think of how to organize things like this and then I never start coding. I know how I'd do it as a website but I'd prefer this to be a desktop application that I can learn the basics of C# through.

Thanks for any and all help.
>>
>>54830583
>Never called them gay, that was you

I know. I'm reiterating.
>>
>>54830595
Let me ask you some questions to help so that you can overcome analysis paralysis (snappy term, nice)

How will you store data? Is your data-store safe in the event of a system failure?
Example: I am an employee. I clock in, but the server crashes. Should someone have to punch in my clock in-time manually to restore records?
>>
>In 1942–45, Samuel Eilenberg and Saunders Mac Lane introduced categories, functors, and natural transformations as part of their work in topology, especially algebraic topology. Their work was an important part of the transition from intuitive and geometric homology to axiomatic homology theory. Eilenberg and Mac Lane later wrote that their goal was to understand natural transformations. That required defining functors, which required categories.


Reminder that you owe everything good in programming to Jews
>>
>>54830657
None of that has anything to do with programming. It's just advanced fedora tipping.

Programming would probably be better if category theory never existed.
>>
>>54830595
when i find myself in paralysis its usually because i'm trying to rush myself when the problem is bigger than i initially thought it was.

write the questions that pop into your mind down, but don't try to answer them yet. focus on one small part of the system of the design until you have it mostly fleshed out. then as you go to answer your other questions you'll have more answers.
>>
>>54830703
What languages do you use?
>>
>>54830655

It will be stored in a database as soon as I figure out how to use Entity Framework. I'm not entirely sure. It will be backed up off site if that is what you mean.

The program won't interact with a server, it'll be a locally stored database on the computer that the application is running on.
>>
>>54830716

I really ought to write things down. I always feel like I should be able to figure this stuff out without doing that though. I wind up thinking that most other programmers don't run into the problems I do which is probably true for some but not for the larger majority.

I'll give this a shot.
>>
>>54830731
That computer would be the server; I'll refer to it as a terminal to avoid confusion. What I meant is that if you tried to have a "clock session" object, something like

ClockSession { timeIn, timeOut }


And you committed timeIn timeOut to a database once both fields were filled, you have an issue where if the terminal/application unexpectedly crashes/closes/etc. you would lose information. So you don't need a ClockSession object but instead need to do immediate transactions to the database.

My reason for this approach is that I don't like to build up, I like to break down--starting with the "maximum" number of objects/data reps and removing extraneous items/anomalies. I find that this helps in avoiding the classical case of object creep prevalent in OOP projects. Once I feel like I've reached a candidate "milestone," a point where the design I have is minimal and meets all requirements, I start to play around with interactions.
>>
Typed languages are bullshit
>>
can a cute anon direct me to resources which will increase my regex knowledge from pajeet to pro?
>>
>>54831075
https://www.google.co.uk/search?q=regex+evaluator
>>
>>54831087
daisuki~
>>
File: 8923415.png (154 KB, 400x347) Image search: [Google]
8923415.png
154 KB, 400x347
>>54831094
>>
>>54827903
>MIT doesn't even use it anymore
>LISP? LOL EMACS

I didn't actually try to read that book until years after understanding the stuff within it and the damn thing just put me to sleep. It's really hard to get through that shit.

>>54830247
Selecting 1 socket is kind of dumb. Just check if it has data. You also have to set it to non-blocking if you want it to not block.

I recently went to a software conference, half the presentations were on React, why are web developers such losers?
>>
I'm trying to execute a c compilation. Tried from my external hard drive and from my desktop. In both cases I couldn't execute it and received a "Permission Denied" message. What might be wrong?
>>
>>54831343
Check permissions with 'ls -l'
Maybe it's a 32-bit executable running on a 64-bit computer.
>>
>>54831343
try sudo chmod +x caca then try ./caca agai
>>
>>54831226
haskell is pretty much better than scheme anyway
>>
>>54831365

Well, I guess is everythin ok?

>>54831369

Didn't work
>>
>>54831407
try executing yourself
>>
>>54831407
It's supposed to have the x bit set (next to the -rw--------) on the executable file caca.
Something is obviously fucked if gcc isn't putting the bit there. Is everything about your OS normal?
>>
It makes more sense to sort textures into render groups than it does to sort objects.
I very well might have an object that wants to render both a worldspace sprite and a UI element showing something relevant to that object.
If objects texture are rendered in the order that they appear in the object array, then that UI element would be clobbered.
So it makes more sense to sort textures into render groups, so an object can put it's sprite in one group and it's UI element in another.
>inb4 put UI element into separate object
Yeah, and how would I access that specific objects state?

And sorting arrays is expensive.
>>
>>54831407
ls -l again to confirm execution permissions set; then sudo ./caca
>>
>>54831407
RUN AS ROOT NIGGA YOU BROKE YOUR USER
>>
>>54831422

Just installed Linux Mint liket three hours ago, didn't modify anything important.
>>
>>54831440

Turns out 'root' isn't installed, i'm installing it now.
>>
>>54827174
mostly shit code from programming exercises from some book I took from /t/
>>
>>54831471
wat
>>
File: 1429618094247.jpg (41 KB, 680x382) Image search: [Google]
1429618094247.jpg
41 KB, 680x382
>>54831471
>>
>>54831440

Didn't work
>>
>>54831564
chmod 777 it
go full retard on that file
>>
>>54831564
Mint doesn't have a usable root account by default (Thanks Ubuntu). try:
sudo insertherestofyourshithere
>>
File: 1448290143552.jpg (185 KB, 850x904) Image search: [Google]
1448290143552.jpg
185 KB, 850x904
How many of you lads can understand this ?
How basic is this in windobuilder java?
Pls don't ignore me.
http://pastebin.com/KiWKnfzx
>>
>>54831708
>import>import>import>import>import>import>import>import>import>import>import>import>import>import>import
That's definitely Java
>>
>>54831677

Didn't work, still "Permission Denied"
Thread replies: 255
Thread images: 32

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.