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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 327
Thread images: 30

Previous thread: >>59875306

What are you working on, /g/?
>>
Krusty Source Observer
>>
Thank you for not using an anime image.
>>
/dpt/ poll. vote for your favorite language!
http://poal.me/cffayr
>>
>>59878904
SICP. I have no idea what I'm doing

Why am I getting this error?
>>
>>59878988
Nevermind, I had an extra pair of parenthesis around x right after (self x)

God damn it
>>
File: 123123.png (7KB, 641x675px) Image search: [Google]
123123.png
7KB, 641x675px
Is a circle with a radius of 0 a point or a circle?
What's its circumference?
>>
>>59879103
Stupid frogposter.
>>
>>59879114
brainlet detected
>>
@59879103
>>>/r/abbit
>>
>>59879103
It's a circle that occupies the same area as the point its centred on. Its circumference s 0.
>>
>>59879103
>Is a circle [...] a circle?
Yes.
>What's its circmuference?
c = 2*pi*R
c = 2*pi*0
c = 0
>>
Which language is best for programming? English, Norwegian, Polish, Russian, Hindi, Chinese, or Japanese?
>>
>>59879173
norwegian ofc
>>
>>59879168
>Is a circle [...] a circle?
>Yes
Is [...] supposed to stand for arbitrary sentences?
>>
>>59879173
times new roman
>>
>>59879173
Lojban.
>>
>>59878988
Why not use a real Scheme and not an abomination?
>>
>>59879185
[...] is optional.
>>
>>59879190
Like what?
>>
>>59878945
Where is Idris?
>>
>>59879201
where is what?
>>
>>59879201
languages used by less than 1000 people worldwide that will be long dead in 10 years not allowed
>>
>>59879197
MIT/GNU Scheme
Guile
>>
>>59879216
Iris
>>
>>59879220
>GNU
Definitely not.
>Guile
Definitely not.
>>
>>59879219
So why is D on there?
>>
>>59879201
In the trash where it truly belongs with all the other Turing complete garbage.
>>
>>59879236
#SHOTSFIRED
>>
>>59879247
Idris is only Turing complete if you want it to be.
>>
>>59879255
>>>/r/ibbit
>>
File: 1469842193315.png (315KB, 1876x559px) Image search: [Google]
1469842193315.png
315KB, 1876x559px
>>59879236
Because it's used by more than 1000 people worldwide and it'll not be long dead in 10 years
>>
File: ss (2013-07-13 at 05.01.12).jpg (60KB, 689x408px) Image search: [Google]
ss (2013-07-13 at 05.01.12).jpg
60KB, 689x408px
Larry, Mary and Jerry get in a taxi.

They have different destinations, but all the destinations are right on the highway, so no circuitous driving is required.
Larry’s destination is 10 miles away, Mary’s is 20 miles, and Jerry's is 30 miles. The taxi costs $1.50 per mile.

How much should each person pay?
>>
>>59879267
what's ribbit? ribbit isn't a board. are you mentally deficient?
>>
$ man life
No manual entry for life
$


what the fuck
>>
>>59879266
That doesn't make any sense whatsoever, something having a totality checker already means it's Turing complete garbage.
In good languages you don't have to check something which is a core property of the language itself.
>>
>>59879272
Wrong.
>>
>>59879272
>pic
has more to do with lazy programmers than the language
>>
>>59879274
$15 each
>>
>>59879274
$15
>>
>>59879291
>use totality checker
>everything you write must be total
>therefore not Turing powerful
>>
>>59879296
If I am not lazy I would use ASM instead of C, IDK what you are talking about
>>
>>59879274
Taxi travels 30 miles, passengers travel for a combined distance of 60 miles. Hence if each pays half price per mile, the cost of the journey will be covered and each will pay in proportion to the distance he traveled.
>>
File: stop.jpg (25KB, 319x283px) Image search: [Google]
stop.jpg
25KB, 319x283px
>>59879298
>>59879303

Wrong. Try again.
>>
>>59879274
$15

larry would have to be a real asshole to ask the others to pay more
>>
>>59879272
How can anyone who's not NSA shill C anymore these days?
>>
>>59879312
The totality checker can easily miss something which would otherwise be total in a total language. It's garbage. It's merely a hack to allow for a slightly better Turing complete language.
Any why are you typing in this retarded manner?
>>
>>59879274
Larry = ($1.50 / 3) * 10 = $5
Mary = Larry + ($1.50 / 2) * 10 = $12.50
Jerry = Mary + $1.50 * 10 = $27.50
>>
>>59879319
I think $15 is a fair deal. Why is it wrong?
>>
>>59879314
>implying D is to C what C is to ASM
>>
File: Impressive.png (110KB, 364x241px) Image search: [Google]
Impressive.png
110KB, 364x241px
>>59879342
>>
>>59879334
>The totality checker can easily miss something which would otherwise be total in a total language.
It's still a non-Turing complete language, just potentially less expressive than your hypothetical total language.

>Any why are you typing in this retarded manner?
I was quoting myself, obviously.
>>
>>59879342
>1.5/m
>travel 30 miles, since all on the same road
>money raised 27.50+12.50+5, fair is 45
>>
>>59879342
>>59879355
they would all have to be autistic google employees to agree to that
>>
>>59879378
what do you think 27.50+12.50+5 is?
>>
>>59879378
Yes, ensuring that the amounts sum to the total fare is a good sanity check.
>>
>>59879375
>It's still a non-Turing complete language
That's outright false. It has general recursion.
>>
>>59878988
Samefag here... I'm attempting to evaluate the following series (or rather, product)
PI/4 = ((2 * 4) * (4 * 6) * (6 * 8)...) / (3^2 * 5^2 * ...)

And I get the following error
. . num-prod: undefined;
cannot use before initialization


When I run this:
(define (pi-approx n)
(define (square x) (* x x))

(define (num-prod ind) (* (* 2 ind) (* 2 (+ ind 1))))
(define num (product num-prod 1 inc n))

(define (denom-prod ind) (square (+ (* ind 2 ) 1)))
(define denom (product denom-prod 1 inc n))

(* 4 (/ num denom)))


Why is num-prod undefined when I clearly define it?
>>
Would anybody welcome lambdas being introduced in the next C standard?
>>
>>59879424
>lambdas
>C standard
why? just use Rust already jesus
>>
>>59879419
Oh, I should probably mention, product is the following:
(define (product term a next b)
(if (> a b) 1
(* (term a) (product term (next a) next b))))


Basically, term and next are functions and [a b] represents the range of input values
>>
>>59879424
anyone using C would probably stick to their dusty macros.
>>
>>59879424
no

just allow plain old functions scoped inside a function like the GNU extension already has
>>
>>59879342
With Jerry, even though he travels 30 miles, his actual fair should be that of 10. Larry can offer Jerry free ride until he reaches his destination since it does not cost him anything extra.

Larry has to pay $5 in this deal and Jerry has to pay 27.50, Mary has to pay more than $10 as well. 2 people are paying more. I don't think this deal would hold in real life. $15 each is still a fair deal.
>>
>>59879417
Not if you're using the totality checker, which was implicitly assumed to be the case.
>>
>>59879173
Polish is pretty neat for programing
public string Główna()
{
var kurwa = new Gówno();
kurwa.Zażółć(jaźń => jaźń.gęśla);
return "chuj";
}
>>
>>59879424
>C doesn't have lambdas in the standard
I always knew C is for lesser programmers but this is just embarrassing
>>
My game
STOP BULLYING ME
>>
>>59879457
>no
But why?
>>
File: 123456y7gfre3456y.jpg (62KB, 500x334px) Image search: [Google]
123456y7gfre3456y.jpg
62KB, 500x334px
post your github.
>>
>>59879459
>I don't think this deal would hold in real life. $15 each is still a fair deal.
agreed

but
>Larry can offer Jerry free ride
"in theory" jerry should pay more than larry to make it fair, otherwise larry doesn't have an incentive to give jerry a free ride and he can tell him to fuck off
>>
>>59879461
The language itself is Turing complete (meaning it's trash), but a subset of it isn't.
>>
>>59879488
lambdas are unnecessary neckbeard crap with shitty syntax. do a function definition with the plain old syntax and pass a function pointer instead of defining the function inline. only haskell-tier retards think it's good to have everything on one line
>>
Why is C so ugly? It makes me puke
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <X11/Xlib.h>

int main()
{
Display *d;
Window w;
XEvent e;
int s;

if (!(d = XOpenDisplay(NULL))) {
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");
exit(1);
}

s = DefaultScreen(d);
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0,
0, WhitePixel(d,s));
XSelectInput(d, w, ExposureMask | KeyPressMask);
XMapWindow(d,w);

while (1) {
XNextEvent(d, &e);
if (e.type == Expose) {
XDrawString(d, w, DefaultGC(d, s), 5, 15, "C is Cancer", 17);
}
yuk!
>>
>>59879495
I wouldn't want to make anybody here feel small, so I won't post my github. lets just say I have over 300 confirmed repos and I am the top programmer in the united states. I can program in over 700 different languages.
>>
>>59879495
I don't have a github account, my current contract gives my employer ownership of all my side projects.
>>
>>59879488
>>59879527
and if you want lambdas and such crap then just use C++ or rust or someshit
>>
>>59879536
why are you posting this again?

also, you forgot XCloseDisplay
>>
File: 1460067182640.png (62KB, 227x221px) Image search: [Google]
1460067182640.png
62KB, 227x221px
>>59879495
>so h-here's my g-game demo
>oh is that the main character? she seems to have rather large breasts...
>y-yeah...
>>
>>59879550
>my current contract gives my employer ownership of all my side projects.
Lol

kys
>>
>>59879544
>I am the top programmer in the united states
An IIT grad here, nice
>>
>>59879544
Vad i helvete sa du precis om Sverige, din lilla danskjävel? Jag ska tala om för dig att jag gick ut som kursetta på Kustjägarkompaniet och jag har deltagit i flertalet hemliga räder mot Danmark och jag har över 300 bekräftade nedkämpade danskjävlar. Jag är tränad i gorillakrigsföring och jag är den främsta krypskytten i hela Försvarsmakten. Du är inte mer för mig än ytterligare en måltavla. Jag ska utplåna dig med en precision som sällan skådats i Skandinavien, sanna mina jävla ord. Tror du att du kan komma undan med att säga sån skit om Sverige genom Internet? Tänk om, danskjävel. Medan vi talar kontaktar jag mitt hemliga nätverk av spioner över hela Sverige och din IP-adress blir spårad just nu så det är bäst för dig att du förbereder dig för stormen, danskjävel. Stormen som utplånar det patetiska lilla ting du kallar ditt liv. Du är helt jävla död, danskjävel. Jag kan befinna mig varsomhelst, närsomhelst och jag kan döda dig på över sjuhundra sätt och det är enbart med mina bara händer. Jag är inte bara utförligt utbildad i obeväpnad närstrid, utan jag har även tillgång till hela Svea Rikes amfibiekårs arsenal och jag kommer använda den till dess fulla omfattning i syfte att utplåna ditt sorgliga arsle från Skandinaviens yta, din lilla danskjävel. Om du bara hade haft en aning om den oheliga vedergällning din lilla “fyndiga” kommentar skulle dra ner över dig så hade du kanske knipit din jävla käft. Men det kunde du inte ha haft, det gjorde du inte och nu betalar du priset, din förbannade danskjävel. Jag ska skita vrede över dig och du kommer drunkna i det. Du är helt jävla död, danskjävel.
>>
File: tty.gif (15KB, 750x460px) Image search: [Google]
tty.gif
15KB, 750x460px
>>59879581
>>
>>59879581
norsk > svensk
>>
File: 1453173100295.png (178KB, 282x357px) Image search: [Google]
1453173100295.png
178KB, 282x357px
You guys probably assume im retarded for failing at a Object Oriented language but i could really use some help understanding what im doing wrong in this C# application.

Ive created a specification/inheritor class from the class Patient named PrivatePatient, it has its constructor that pulls from the normal Patient constructor and everything worked generally fine, however when i try and create a PrivatePatient object using the Patient constructor i get the error 'Patient' does not contain a constructor that takes 6 arguments.

Here is the code for the Patient constructor
       public Patient(String name, int age, String patientType, int hoursTreated)
{
this.name = name;
this.age = age;
assignedDoctor = null;
this.setIdentifier();
this.patientType = patientType;
this.hoursTreated = hoursTreated;
}

And here is the code for the PrivatePatient constructor
        public PrivatePatient(String name, int age, String patientType, int hoursTreated,
String privateHealthFundNo, String preferredDoctor)
: base(name, age, patientType, hoursTreated)
{
this.preferredDoctor = preferredDoctor;
this.privateHealthFundNo = privateHealthFundNo;
}


Im sure its obvious to you guys but if you need more info i can post more.
>>
>>59879650
post an example of code where you're trying to create it
>>
>>59879650
>Object Oriented
>>>/r/abbit
>>
>>59879650
I only think you're retarded fit having that picture in your hard drive
>>
>>59879527
I'll ignore your use of buzzwords and just address your points.
>shitty syntax
That's quite personal and one that could be addressed if enough programmers cared.
>do a function definition with the plain old syntax and pass a function pointer instead of defining the function inline
But why do that when one could just use lambdas? It'd be easier.
>have everything on one line
Again, quite personal, and that can be addressed by line breaks if you dislike it so much.

>>59879557
Wanting C to have lambdas doesn't justify using very different languages.
>>
>>59879650
I really hope you're not working on the NHS IT system
>>
>>59879675
listOfPatients is an ArrayList, but here you go
this.listOfPatients.Insert(this.listOfPatients.Count, new Patient("Fred Bear", 29, "Private", 10, "HCF236788", "Ben Casey"));
[/spoiler]
>>
>>59879527
>shitty syntax
This is as retarded as saying "functions have syntax" or "loops have syntax".
>>
>>59879701
>>59879712
it's objectively a different syntax compared to everything else in C. you would need a very compelling reason for it to be included in the C standard.
>>
>>59879731
What syntax are you talking about? Are you really that fucking brain-dead to think that something has a fixed syntax?
>>
>>59879709
haven't done c# in a while but shouldn't it be new PrivatePatient(...)?
>>
>>59879650
>>59879709
It's because you are using 4 parameter patient constructor with 6 parameters.

Try using 4 parameters in constructor or create PrivatePatient object cast to Patient, like

this.listOfPatients.Insert(this.listOfPatients.Count, new PrivatePatient("Fred Bear", 29, "Private", 10, "HCF236788", "Ben Casey") as Patient);
>>
Hi all! I would like to ask something about stuff I don't know and in a pretty basic level, but it could feel like I'm shitposting. May I ask it?
>>
>>59879745
any syntax regardless of the specifics of the implementation would be different than what is currently in the C standard you disingenuous sperglord
>>
>>59879780
Can I ask why do you want to ask?
>>
>>59879709
>new Patient(
change it to
>new PrivatePatient
>>
>>59879780
maybe
>>
>>59879781
This implies that something has a fixed syntax, which is false and anyone without severe autism can see that.
>>
ok i'm sure you will convince them to add lambdas to the C standard
>>
>>59879817
I couldn't care less about the C standard. I'm just pointing out your blatant retardation.
>>
>>59879731
>>59879781
Let's assume that lambdas were added, and they used the same syntax that was used in C++, it still wouldn't be foreign or weird enough compared to the rest of C.
>>
>>59879827
kill yourself you shitty sperg
>>
>>59879835
I always knew C is for lesser programmers, but this is just embarrassing.
>>
If you cannot write a semifactorial function yourself you must cease and desist from participating in these threads.
>>
>>59879791
Sure. I'm explainning it.

>>59879796
Sorry if I bother you.

I always had in mind to do/build my own kind of virtual assistent. It won't imply some kind of AI, but I would like to make it voice interactive. Just to give simple orders at the beginning.

The thing is, I don't know if I should research 1st on the harddware part, or in the software one, and I'm kind of lost. Can I have some advice on how should I start this?
>>
>>59879842
>projecting this hard
>>
>>59879850
+18 please.
Learn to curse before you come here.
>>
>>59879817
I'm not trying to convince the committee; I want to know the opinions /dpt/ on this matter.
Thus far nobody has made a compelling argument against it.
>>
>>59879850
Who said this?
>>
>>59879850
Who said that?
>>
File: poointheloo.jpg (207KB, 900x657px) Image search: [Google]
poointheloo.jpg
207KB, 900x657px
http://poal.me/oz84d5

DO
THE
POLL
/DPT/
>>
File: 1430853197680.png (331KB, 474x432px) Image search: [Google]
1430853197680.png
331KB, 474x432px
>muh lambdas
>>
>>59879850
Who what when where why
>>
>>59879889
Can you stop typing in this retarded fashion if you aren't quoting anyone?
>>
>>59879875
lambdas are shit, they don't belong in C and you should kill yourself
>>
>>59879190
Why not use a real Lisp and not an abomination?
>>
>>59879908
But why (to both clauses)?
>>
>>59879888
>no java
kys microcuck shill

real poll:
>http://poal.me/cffayr
http://poal.me/cffayr
>http://poal.me/cffayr
http://poal.me/cffayr
>http://poal.me/cffayr
http://poal.me/cffayr
>>
>>59879910
Like what?
>>
>>59879888
Fuck off microloo pajeet
>>
C# is legitimately shit. most people who claim to like it are most likely literal shills or 'evangelists' as they call it
>>
File: 1478971511157.png (28KB, 470x241px) Image search: [Google]
1478971511157.png
28KB, 470x241px
>>59879952
>>
>>59879910
Because SICP uses Scheme, not any other Lisp.
>>
how do you deal with chinese caracters in the code? I'm trying to compile a chinese repo and there're chinese chars in the code and even some file names, should I covert the files to UTF-8? what do about the file names? visual studio keeps failing.
>>
>>59879987
what language faglord
>>
>>59879952
>C# is legitimately shit
Hard to discuss with such impressive arguments
>>
>>59879928
>still no Idris

>>59879987
Like he said, Chinese
>>
>>59879940
Common Lisp
>>
>>59880005
Why would I use it over Scheme?
>>
>>59880010
because i said it?
>>
>>59879996
c++
>>
>>59879987

Why are they encoded as any format other than UTF-8?
>>
>>59880014
That wouldn't enough I'm afraid.
>>
What did he mean by this?
https://twitter.com/johalun/status/825871407691075584
>>
>>59880016
#pragma execution_character_set("utf-8")
>>
>>59879967
oh yea, nobody ever hated on Java before C# existed.
Is this how delusional Javascrubs are?
>>
>>59880017
no idea, I downloaded the master zip from github, so far I've seen at least 3 different encodings in these files.

>>59880038
I'll try this, thanks.
>>
>>59880010
Most if not all CL implementations are standard-compliant
CLOS
Better macro system
Supports different collection types out of the box
loop/format - may be considered a con to some lispers
You can declare and define datatypes with deftype and friends
Many more libraries (quickdocs.org)
>>
>>59880071
Super fast to implement in. You basically just write pseudocode, do nothing to it, and it works.
>>
Abandoned a Java project to do some machine learning stuff and realized how much I missed linear algebra; anyone know if you need a CS degree to work in that field?
>>
>>59880085
Super fast to write wrong, buggy code in, you mean.
>>
>>59880091
Yes, typically a PhD.
>>
>>59880084
>CLOS
Stopped reading right there. You could have at least put it last, you not doing so tells me everything I need to know.
>>
>>59880124
Your loss.
>>
>>59880102
Fuck, I expected that much; do I need an MS before I can tackle that if I've already got a STEM degree?
I was looking at MSCS programs but a lot seem like lrn2code programs for non-technical people to get in on high paying tech jobs.
>>
>>59880170
Good question. I don't know if you can get into a PhD program with a non-CS STEM degree. That's something worth asking a university.
>>
>>59880005
you are genuinely fucking retarded

SICP is based on scheme

every time someone brings up lisp on /g/ i just KNOW that they don't know what they're talking about 98% of the time
>>
>>59880148
It's the exact opposite.
>>
got an R problem

"Perform cross-validation or another approach in order to select the best degrees of freedom for a regression spline on this data. Describe your results."

# Create an array CV of size 16
cv <- rep(NA, 16)
# Create spline models with DFs of 3 through 16, and use 10 fold cross validation to find its MSE
for (i in 3:16) {
fit <- glm(nox ~ bs(dis, df = i), data = Boston)
cv[i] <- cv.glm(Boston, fit, K = 10)$delta[1]
}


i get a bunch of warnings all in a row
## Warning in bs(dis, degree = 3L, knots = numeric(0), Boundary.knots =
## c(1.1296, : some 'x' values beyond boundary knots may cause ill-conditioned
## bases
>>
>>59880200
Do you feel relieved knowing your reading comprehension skills are completely absent?
>>
>>59880259
the entire discussion was about SICP in the first place

don't bring up common lisp
>>
>>59880268
common lisp is for commoners

scheme is for superior beings
>>
>>59880243
cv.errormat = data.frame(matrix(NA,nrow=10, ncol=10))
degree.k <- 3:13
for(j in 1:10){
set.seed(j)
for (i in degree.k){
fit2 = glm(nox ~ bs(dis,df=i),data=Boston)
cv.errormat[j,i-2] = cv.glm(Boston,fit2, K=10)$delta[1]
}
}

colnames(cv.errormat) <- degree.k
boxplot(cv.errormat, xlab="Degrees of freedom", ylab="cross-validation error", main="Regression spline over different seeds")
>>
>>59880091
machine learning is a literal meme. it's such a new field that even the best academics don't know all that much about it
>>
>>59880186
When I talked to my undergrad they wanted me to take intro to programming classes to qualify for MS programs, guess there's no way around sitting through those if I want something more than a code monkey job.
>>
>>59880312
>machine learning is a literal meme
not an argument.
>>
>>59880294
doing that code gave me a whole lot more warnings. the graph works on the original, idk what the warnings even mean. i'm trying to create models for splines where the degree of freedom is 3 to 16, and fine which of them has the lowest MSE according to cross validation
>>
>>59880336
https://github.com/darraghdog/STATS216-2015-Homework/blob/master/HW3/STATS216%20Homework%203%20Version%203.Rmd
>>
>>59880268
Scheme is babby-tier Lisp. Common Lisp is for actual programmers.
>>
Im working on a saas project where i found out that team dynamics and social skills matter... Only being a architect does not cut it... Fuck me right.
>>
>>59880364
>Fuck me right
kik?
>>
>>59880312
Which makes it hot for innovation; I'm already a scientist, I get a boner over shit that isn't understood.
>>
>>59880353
why would copy and pasting some guys solution for it be helpful in fixing my code
>>
>>59879103
from a practical perspective, it depends on whether the center's translational coordinates are going to change or if its radius is going to change
>>
>>59878904
I wrote my own HTTP server.

How dangerous would it be to forward a port to my laptop which is hosting the server so I can access it from outside my network...
>>
>>59880319
If you want to get into machine learning in an academic setting the process would be something like this:

SAT placement 1400+
College placement into calculus 1 or higher, english 101 or higher
4-year undergraduate program (bachelor of science in computer science major)
apply to transfer to a good graduate school for CS majors like Cal Berkeley
Graduate program (Masters in CS, which includes getting a thesis relevant to your studies published)
Apply to whatever specialized college you want (probably Stanford, Cal Berkeley, or MIT)
Upper graduate program (Ph.D in CS which includes getting your dissertation (a book) published

All of this is going to cost you a shitload of money and basically you'll be in school the rest of your life.
>>
>>59880397
Extraordinarily dangerous
>>
>>59880381
Nah its a insurance related...
>>
File: 1491931666835s.jpg (5KB, 250x250px) Image search: [Google]
1491931666835s.jpg
5KB, 250x250px
>>59879168
is a circle that isn't a circle a circle?
checkmate gaytheist
>>
>>59880405
for you
>>
>>59880405
Any good alternatives for hosting on my own network?
>>
>>59880419
Not hosting on your own network.
>>
How many of u have worked with docker swarm clusters in production? Because im having a hard time with microservices im resposible with.
>>
>>59880425
can i host in yours?
>>
>>59880397
why not just use ssh?
> i can't for the life of me get ssh set up between my laptop and desktop fwiw
>>
>>59880433
Docker is way, way overkill. Just use jails.
>>
>>59880436
I don't have a network, I'm very antisocial.
>>
>>59880446
We have 30 microservices next to a legacy app and it seeems to work using docker searm and shipyard
>>
>>59880457
you NEET?
>>
>>59880465
>falling for the microservices meme
Do you also support the reactive manifesto?
>>
sepples question.
are member variables guaranteed to be initialized after the base class?
so eg.
struct A
{
int x { 0 };
A() { x = 1; };
};

struct B : public A
{
int y { 1 / x };
B() { };
};

this can never cause a division by zero?
>>
>>59880440
>>59880475
Who said that?
>>
>>59880398
Err, I guess I should have clarified I already have a BS in chemistry, I got straight As from calc1 - Fourier analysis before I had to stop my math minor because I couldn't afford it. I was recruited to a top 5 for my field but dropped out when there wasn't funding for my supposed project and I absolutely loathed the profs who had funding since they were more into running their "side" businesses than innovating.
>>
>>59880495
read this sentence.
>>
>>59880475
Im sorry but can u try going from a legacy symphony app with 1000users to 130k users then u actually love the point going from monokith to microservices with single resposibility
>>
>>59878904
4kev.org my imageboard :P
>>
>>59880468
Nah man
>>
>>59880503
Well, most masters programs have transfer requirements you have to meet before you can be admitted. It would depend on what college you want to apply for.

Cal Berkeley lists their admission requirements for a masters in computer science on their website for instance.
>>
>>59880530
>antisocial
>not NEET

how do you do it?

you got a job as a programmer?
>>
What made you grow up from using C?
>>
>>59880521
Because when the firm gets bigger u have alot of component ownership issues and microservices are actually a easier way to solve team issues kek
>>
>>59879550
I am also unemployed
>>
>>59880542
I got a job with a company that doesn't expect me to be a happy smiley bubbly social person.
>>
File: C9Kso0SWAAAsmb0.jpg:large.jpg (133KB, 1394x884px) Image search: [Google]
C9Kso0SWAAAsmb0.jpg:large.jpg
133KB, 1394x884px
What did he mean by this?
>>
>>59880503
url for cal berkeley's CS graduate program for reference btw: http://grad.berkeley.edu/program/computer-science/

Some of your courses will probably satisfy some of the requirements, but you'll probably have to complete a lot of extra coursework to be eligible for admission.
>>
>>59879550
Too late, I already GPL'd it
>>
>>59880577
HAHAHAHAHAHAHAHAHAHAHAHAHA
>>
C++ newbie here. Is this code properly written?
public:
inline CMemTextW(void): m_TXT( NULL ) , m_Text( NULL ) , m_errTXT( NULL ) , m_CP( E_CP_NULL ){ }
virtual inline ~CMemTextW(void){ CMemTextW::Clear(); }
inline const WCHAR* GetErrTXT(void){ return m_errTXT; }
inline void Clear(void);
inline BOOL Load( const WCHAR*const a_pFile , DWORD a_dwMaxLen , const UINT a_uCodePage = CP_ACP );
inline const WCHAR* GetLine(void);
inline const WCHAR* GetText(void){ m_errTXT = NULL;return m_Text; }
inline BOOL ReStart( void )
{
m_errTXT = NULL;
if( m_Text )
{
m_TXT = m_Text;
return TRUE;
}
return FALSE;
}
inline EXXX_CodePage GetCP(void){ m_errTXT = NULL;return m_CP; }
inline BOOL 关联( const WCHAR*const pText );
inline WCHAR* 切断( void );
};


Not mine, I'm trying to understand the role of those characters that look like could cause a compiler error anytime. Should those characters be there?
>>
>>59880563
Use that possibility to learn how a firm works, how programmers make decisions, and how last decisions are made. These are actually things i thought would be easy but i was wrong...
>>
File: 33.png (10KB, 722x388px) Image search: [Google]
33.png
10KB, 722x388px
hmmm
>>
>>59880626
source?
>>
>>59880626
C has supported coroutines for years. How bad is C++ that it's only just catching up to C?
>>
>>59880626
C++120 can't make C++ less trash than it already is
>>
>>59880614
inline     BOOL    关联( const WCHAR*const pText );
inline WCHAR* 切断( void );

Nope
>>
>>59880614
You mean the chinese characters?
>>
>>59880614
>>Is this code properly written?
no, that looks more like C.
even worse, winapi C.
even worse, chinese winapi C.
>>
>>59880614
No. Most of those uses of inline are superfluous.
>>
>>59880614
Why in god's name are you writing MFC in the current year?
>>
>>59880645
>she doesn't program exclusively in elvish winapi BASIC
>>
>>59880645
>Looks like C
>public
>virtual
>: m_TXT( NULL ) , m_Text( NULL ) , m_errTXT( NULL ) , m_CP( E_CP_NULL )
Idiot.
>>
File: 1473289474894.jpg (27KB, 640x638px) Image search: [Google]
1473289474894.jpg
27KB, 640x638px
>>59880663
>she
>>
File: index.jpg (4KB, 284x177px) Image search: [Google]
index.jpg
4KB, 284x177px
>>59880633
https://www.linkedin.com/pulse/multithreading-c17-c20-rainer-grimm
>>
>>59880643
Yes.
>>
>>59880666
What is a Turing-complete macro system, Satan?
>>
How are C++ programs supposed to be divided into .cpp and .h? I'm a pajeet-tier moron who has only written Java so far.

Is there some kind of recommended structure or do I just go and create a new .h and .cpp file to do a single thing, i.e a sorting algorithm and then include it where needed?
>>
>>59880675
>she doesn't know
>>
>>59880614
absolutely disgusting

>should those characters be there?
no
>>
>>59880682
Lisp macros.
>>
File: 1437115133850.gif (491KB, 499x428px) Image search: [Google]
1437115133850.gif
491KB, 499x428px
>>59878904
Still trying to get proficient with vim + tmux
>>
>>59880688
Function definitions age types
>Header files

Implementation of functions
>Body file
>>
>>59880707
Use Vim with Tilix. No need to waste time in Tmux
>>
>>59880688
in general, put everything in header files.
until you have static variables or get multiple definition errors or undefined reference to vtable shit.
then move stuff to a cpp file.
>>
File: 1359654183792.png (185KB, 580x323px) Image search: [Google]
1359654183792.png
185KB, 580x323px
>>59880699
explain
>>
>>59880719
brew install tilix ?
>>
>>59880707
tmux isn't even that hard.
>>
>>59880722
Everyone in /dpt/ is a qt programmer girl
>>
File: headers.png (57KB, 517x578px) Image search: [Google]
headers.png
57KB, 517x578px
>>59880688
eveything else goes int the .cpp
>>
>>59880649
>>59880701
Make the inlines nul with /* */ or replace the chars? how can I tell whether the code will break or not? this is the translation of the chars:

关联 = Association
切断 = Stop
>>
>>59880580
>>59880539
Ok I guess I'll have to take a few post bacc CS classes rather than just pirated books and github projects after all.

Any clue on usual GRE expectations for top 10s? GATech's are pretty low but Stanford wants above 90% in both. I got >95% Verb but only somewhere in the upper quartile on Quant.
>>
>>59880737
>MacOS
No idea, I thought you were using Linux.
You can try building it
https://gnunn1.github.io/tilix-web/
>>
>>59880614
stop making me want to use japanese characters in my source code to rp as a cyberpunk
>>
>>59880753
No idea. Cal Berkeley is pretty impacted though, having one of the highest rated CS departments in the world, so I'd assume admission reqs would rival Stanford at least.

I'm just a lowly undergrad still working on my bachelors in CS so you're way ahead of me.
>>
>>59880769
Why not å or æ or þ or ð?
>>
>>59880784
that's not cyberpunk
>>
>>59880754
Thanks I'll give it a shot.
>>
>>59880788
Why not? It's primitivist/traditionalist cyberpunk
>>
>>59880769
struct ╯︵┻━┻ { };
using ╯°□° = ╯︵┻━┻;
throw (╯°□°)╯︵┻━┻ { };
>>
>>59880780
Cal treats their chem grad students like utter dogshit so I don't care much for them anyway.

Good luck to both of us I suppose.
>>
>>59880857
Yeah, I've heard some really shitty stories from alumni I've run into at conferences so I didn't even bother applying. Mostly about the faculty being super elitist and out of touch with their own industry. Your classic ivory tower intellectual old man on the mountain complex.
>>
File: 1476111082775.jpg (46KB, 540x652px) Image search: [Google]
1476111082775.jpg
46KB, 540x652px
>>59880745
Too ambiguous.
>Everyone on /dpt/ is a qt GNU/loli.
This statement better describes the demographic of /dpt/, and it gives credit to the organization that gives us, qt lolis, freedom from our onii-chans 'proprietary grasp.
>>
should i finish K&R before looking at assembly, or can i take a short diversion? downloaded "the art of assembly"
>>
i've never read sicp

should i actually get it or is it just a meme
>>
>>59881096
It's a meme. All you ever need to know is that computer programming is meant for the codemonkey slave class, and that the true leaders of the world are top level executives.
>>
>>59881090
They aren't related in the slightest, so I don't know why you asked.
>>
File: 1479308433498.jpg (27KB, 480x580px) Image search: [Google]
1479308433498.jpg
27KB, 480x580px
>>59881032
>qt GNU/loli.
GTK GNU/Loli
>>
>>59881090
It doesn't matter. Just seems more disciplined to finish what you started.
>>59881096
It could be good for beginners. Otherwise I'd say it won't do much for you, might find it interesting though. Solving familiar problems in a unique language.
>>
>>59881174
i got wrecked by a shell code problem on a capture the flag for middle schoolers so i feel insecure about my lack of knowledge on it
>>
virtual ~CWQSG_TypeLinkList()
{
DelAll();
}


>~
Is it safe to use this character like that?
>>
>>59880748
replace the chars

your ide should be able to refactor it for you
>>
Anyone doing the google jam this saturday? Is it feasible to get top 1000 or there are too many autists?
>>
>>59881032
>>59881136
>GNU
>>>/r/abbit
>>
remember that bogo sort is the only sort you need if you're lucky
>>
>>59881240
I'm considering making a tab and replace all chars with unique random strings, I've noticed in other files there're characters that when translated cause conflicts with other things.
>>
>>59881096
>>59881110
>"""meme"""
>>>/v/
>>>/b/
>>
>>59881096
no it's only for newfags
>>
>>59881259
>>59881274
Go away.
>>
>>59881302
No matter how strong the pain is, it's my duty to move forward.
>>
>>59881274
>>>/r/eddit
>>
>>59881321
What are you going to mean by this?
>>
>>59881341
>going to
What did he mean by this?
>>
>>59881382
>he
Did you just assume his gender?
>>
>>59881382
We are machines searching for things that make us feel human.
>>
When naming a function or variable or similar strings, what is the most safe syntax to use? is using A-Z, a-z and 0-9 safe even if it turns out with strings like 00xx or 0x00?
>>
File: 1483574517525.png (38KB, 179x199px) Image search: [Google]
1483574517525.png
38KB, 179x199px
>>59881526
it depends on the language
>>
>>59881507
>We
Speak for yourself.

>>59881526
As long as you use an alphabetical character as the first character (which is required by C) you should be fine. Though there's no reason for your identifiers to look anything like hexjunk unless you're doing RE.
>>
>>59881537
How about C, C# and C++? Surely not assembly.
>>
>>59881548
>which is required by C
Instantly trash.
>>
>>59881548
>alphabetical character as the first character (which is required by C)
Good to know.
>>
>>59881571
C is basically unavoidable if you're doing any kind of serious work with native code.
>>
>>59881581
>he doesn't know about c++
>>
>>59881567
http://stackoverflow.com/a/228797
>>
File: 1444097216291.png (116KB, 1515x663px) Image search: [Google]
1444097216291.png
116KB, 1515x663px
Y'all niggers need to see this >>>/sci/8825237


>ideone.com/c697Lt
>>
>>59881588
Sepples has non-standardized name mangling, and using it for anything you can't do in C causes you to lose the real advantages of writing in C.
>>
File: ohBucko.png (6KB, 966x21px) Image search: [Google]
ohBucko.png
6KB, 966x21px
Is my data structure too crazy?
>>
>>59881605
>he doesn't know about extern "C"
>>
>>59881610
What's so crazy about a dictionary?
>>
>>59881603
>sci
no thanks
>>
>>59881610
auto chosenAnswer = ...
>>
baby trying to learn python here:
I'm trying to write a simple funcion that defaults to the last argument used when you call it more than once, but it's not working.

last = "dog"

def speak(message, name=last):
global last
print(name + " says:")
print(message)
last = name

speak("woof")
speak("meow", "cat")
speak("meow")


this gets me:
dog says:
woof
cat says:
meow
dog says:
meow

what am I doing wrong?
>>
>>59881610
std::__detail::_Map_base<unsigned short, std::pair<unsigned short const, std::unordered_map<unsigned short, std::unordered_map<unsigned short, io::pci_device const*, std::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, io::pci_device const*> > >, std::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, std::unordered_map<unsigned short, io::pci_device const*, std::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, io::pci_device const*> > > > > > >, std::allocator<std::pair<unsigned short const, std::unordered_map<unsigned short, std::unordered_map<unsigned short, io::pci_device const*, std::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, io::pci_device const*> > >, std::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, std::unordered_map<unsigned short, io::pci_device const*, std::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, io::pci_device const*> > > > > > > >, std::__detail::_Select1st, std::equal_to<unsigned short>, std::hash<unsigned short>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](unsigned short&&)

define "crazy"
>>
>>59881626
Look the ideone link you fuckface
>>
>>59881622
It's a dictionary where each key points to a Tuple containing a string and a reference to a Checkbox.

Idk, it just seems sort of awkward.
>>
>>59881638
That's wild!
>>
File: lmfao-whos-dat.jpg (10KB, 134x110px) Image search: [Google]
lmfao-whos-dat.jpg
10KB, 134x110px
R8 my keylogger written in golang.
>>
>>59881678
Forgot the damn link
https://pastebin.com/mTdZzSdq
>>
>>59881589
perfect, bookmarked.
>>
>>59881610
>not using auto

>>59881616
>using it for anything you can't do in C causes you to lose the real advantages of writing in C.
>>
>>59881718
Who are you quoting?
>>
>>59881629
last = "dog"

def speak(message, name=None):
global last
if name == None:
name = last;
print(name + " says:")
print(message)
last = name

speak("woof")
speak("meow", "cat")
speak("meow")
>>
>>59881724
>I'm going to kill myself tomorrow
Sad, anon. I don't see how that's relevant, however.
>>
File: what did she mean by this.webm (195KB, 1920x1080px) Image search: [Google]
what did she mean by this.webm
195KB, 1920x1080px
>>59881718
>the real advantages of writing in C.
>>
>>59881629
Python evaluates the defaults for function arguments only once, when the function is defined. They get stored inside the function object and retrieved from there if the number of arguments is too small.

See for yourself:
>>> def f(x=100): pass
...
>>> f.__defaults__
(100,)
>>
>>59881629
(defparameter *last* "dog")

(defun speak (message &optional (name *last*))
(format t "~a says:~%~a~%" name message)
(setf *last* name))
>>
>>59881718
>auto
What is auto?

Some way to create data structures automatically?
>>
>>59881641
>ideone
no thanks
>>
>>59881750
Don't hold your breath.
>>
>>59881767
http://en.cppreference.com/w/cpp/language/auto
>>
>>59881765
What kind of abomination is this language?
>>
>>59881793
Common Lisp
>>
>>59881765
Format is truly the worst programming language.
>>
>>59881804
An elegant language for a more civilized age.
>>
>>59881804
It's probably the ugliest thing I have ever had the displeasure of seeing.
>>
It seems like everything in the app making field is geared towards people who can't code. I know how to code Java, so now what. Where do I find a programming environment for Android that just lets you make an interface and then code the internals?
>>
@59881848
>app making field
>code
>Java
>>>/r/abbit
>>
>>59881841
Close your eyes and pretend it doesn't exist.
>>
>>59881825
HA
>>
>>59881870
t. programlet
>>
>>59881816
What's so bad about
(format t "~v@{~{~a~^ ~}~:*~^~%~}" 666 '(poop))
?
>>
>>59881858
>r/abbit

>>>t/umblr
>>
>>59881887
I think you come from rabbit based on the formatting of your post.
>>
>>59881914
>>
>>59881848
>I know how to code Java, so now what.
Now learn to shit properly and not like some sort of dog.
>>
>>59881898
I think you should go back to rabbit based on your lack of positive contributions to this thread.
>>
>>59881898
I think you come from tumblr based on the autism of your post.
>>
I'm starting to do a basic interpreter, the goal is being able to write stuff like

>calculate the area of an square of 22 m

The idea is that it will look for "calculate", then "area", then "square" and finally look for an int/float number.

For that purpose I'm using the strstr function that allows me to look for an specific word inside an string.

#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <windows.h>

using namespace std;

int ayuda(void);

int main(void)
{
string command, aux;
system("CLS");
cout << " 4chan\n " << endl;
do
{
cout << ":::~ ";
getline (cin, command);
cout << "The command is " << command << endl;
string aux (strstr(command,"help"));
if (aux)
cout << "Help was found";
} while (command != "exit");
}


The problem here is that I can find any word BUT I can't make a conditional out of it, so let's say that if in the string there is the word "help", then it shows me the helping documentation.

g++ returns this

27:48: error: cannot convert 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'const char*' for argument '1' to 'char* strstr(const char*, const char*)'
string auxiliar (strstr(comando,"ayuda"));
>>
>>59881922
Everything in your post reeks of rabbit.
Seriously: piss off. Your kind is not welcome here.
>>59881923
Go be retarded somewhere else, like at rabbit.
>>
>>59881950
please return to reddit since you can't stop talking about it
>>
>>59881977
The rabbitors seem to be out in force at the moment. You need to go back.
>>
>>59881928
>windows.h
>>
>>59881928
either
string aux(strstr(comand.c_str(), "help));

or
command.find("help")
>>
>>59881848
https://developer.android.com/index.html
>>
>>59881725
>>59881764
thanks it works now
>>
Trying to learn some mobile dev by going through the programming challenges chart.
Thread posts: 327
Thread images: 30


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.