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



Thread archived.
You cannot reply anymore.



File: 1495063830698.jpg (29 KB, 926x694)
29 KB
29 KB JPG
Previous thread: >>60490315

What are you working on, /g/?
>>
First for C!
>>
>>60493195
Why haven't you learned Go yet?
https://github.com/golang/go/wiki/FromXToGo

Start here:
https://tour.golang.org
https://www.golang-book.com
>>
>>60493195
All hail Rust
>>
>>60493184
i prefer to wear pantyhose
>>
>>60493195
Just started learning java as my first language.

Did i make a mistake?
>>
File: dlang_chan.jpg (139 KB, 470x545)
139 KB
139 KB JPG
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); and she's super duper cute and easy to prototype in! Say something nice about her, /dpt/!!!

>>60493195
dumb frogposter
>>
Dumb frogposter thread
>>
>>60493216
no there is nothing wrong with java

https://www.tiobe.com/tiobe-index/
>>
>>60493216
Yes. Learn Lisp.
>>
dum frgopspter
>>
File: hskl.jpg (16 KB, 1161x801)
16 KB
16 KB JPG
Look, an employed Haskell programmer!
>>
>>60493216
YES. java SLOW. hurr JVM SLOW. boilerplate something something everything object. pajeet poo in loo OOP brainlet go back to plebbit
something something learn lisp instead
>>
>>60493269
lisp is slower than java, learn c it's the language what all better than all the other language
>>
File: b17.jpg (22 KB, 680x452)
22 KB
22 KB JPG
2 SCOOPS?!?!?!
>>
Guys, let's just take the shitposters, and move them somewhere else
>>
>>60493308
can we make them pay for the wall?
>>
>>60493265
looks like somebody threw a nickel in the air and took a photo of it.
>>
File: 139.png (367 KB, 505x490)
367 KB
367 KB PNG
>>60493308
>>
>>60493216
you might want to consider C#, if you have the choice. it's like Java in a lot of ways but it's also better than Java in a lot of ways
>>
File: 566.png (721 KB, 500x800)
721 KB
721 KB PNG
>>
File: lsp.jpg (21 KB, 898x532)
21 KB
21 KB JPG
Hey guys, it's an employed LISP programmer! Drat, he got away!
>>
/dpt/ /daily poo thread/ every thread
>>
File: 1493217650762.png (239 KB, 651x544)
239 KB
239 KB PNG
>>60493324
no
>>
>>60493333
fuck off retarded microshit shill. C# is fucking garbage. they made a knockoff of java and altered it without understanding the design principles behind java. C# is just shit. if you need more "control" like operator overloading and such you should just use C++ instead.
>>
File: please help me.png (318 KB, 680x452)
318 KB
318 KB PNG
>>60493299
SCOO TOOPS?!?!?!
>>
File: lambda_cubism100.png (19 KB, 100x112)
19 KB
19 KB PNG
I want to learn about how to use lambdas, map, filter, and stuff like that in Python.
I know the theory, but I just never apply it in real code where it probably could have helped me.

Is there a resource I can study to get better at applying this knowledge?
>>
I'm thinking of learning to program. What language or languages will get me a job? Please no meme answers.
>>
File: 1430853197680.png (331 KB, 474x432)
331 KB
331 KB PNG
>>60493397
>muh lambdas
>>
>>60493403
learn java first and then C++

https://www.tiobe.com/tiobe-index/
>>
>>60493299
>>60493324
>>60493338
>>60493379
Colbert has never mentioned the "two scoops" controversy. It was an oddball segment by Jeanne Moos, that probably aired once at a random time of the day. It was never meant to be taken seriously. It's a strawman erected by alt-right 4chan division.
>>
>>60493397
Python is the worst choice for this. Guido hates FP.
>>
>>60493397
Just google python lambda tutorial
>>
>>60493403
Java if you can out-pajeet the other pajeets.

(depends which sector / what you want to do)
>>
>>60493403
Jobbiest languages out there:
>C#
>Java
>Visual C++
>Visual Basic
>SQL
>>
>>60493448
>Visual C++
discredited, stop posting forever
>>
>>60493427
wrong

https://www.youtube.com/watch?v=0jPMW6mkxJ0
>>
So I'm a mediocre programmer at best, ~2.5 GPA, and I have no significant personal projects. What sickens me is that I will probably have no issues finding a job when I graduate in 7 months. They say imposter syndrome is a huge thing in software development, but I think it's mostly shit developers that know they are shit. :(
>>
>>60493397
>code
>>>/g/wdg/

>>60493407
>muh
>>>/v/

>>60493472
>software ""development""
>""developers ""
Also your retarded post isn't programming. Fuck off.
>>>/g/wdg/
>>>/g/sqt/
>>
Go > Java, C#, and even the best of both Java and C#
prove me wrong
>>
>>60493472
okay
>>
>>60493487
>prove me wrong
Prove what wrong? You stated a proposition without a proof.
>>
>>60493485
oh thanks. now I can hide all posts in this thread from your IP.
>>
>>60493448
t. microshart
>>
>>60493364
you sound reasonable. what design principles are you referring to? the lack of value types? C# learned from and improved upon the design of Java. C# is measurably better in all, and minor things like operator overloading are pretty far from the top of the list of reasons why. not to mention such a thing would be a ridiculous reason to use C++, a hugely different language from Java or C#, instead. oh and pretty funny to call C# "fucking garbage" when, after accounting for minor syntactic differences, C# is essentially a superset of Java. that would make Java garbage at best
>>
>>60493503
you're fanatically opposed to commitment
that's why you love multi paradigm
>>
Name one good programmer that has come out of the UK.
>>
>>60493515
What is a "Good programmer"? I would like to name myself, but I haven't even been to that shithole. My ancestors have though.
>>
>>60493513
didn't read but

>C# is essentially a superset of Java
java is a simplified C++. the whole point is that it's simple and easy to use in large teams. C# just misses this entirely
>>
>>60493513
>C# is essentially a superset of Java
I see, so every valid J*va program is also a valid C* program?
>>
>>60493527
>C# just misses this entirely
Have you ever used C#?
It's literally Java 2.0 but fixes every single shitty part of what makes Java awful. It simplifies and unifies all the awful parts of Java that are half-baked but ultimate end-goal designs, and then it gives you arguably the best SQL interface available.
C# is downright god-tier, its main problems are speed and memory usage.
>>
File: mlady.png (207 KB, 474x432)
207 KB
207 KB PNG
>>60493407
>>
>>60493403
>meme
>>>/v/
>>
>>60493461
It's true though.
Did I say it was a GOOD language?
I don't recall saying any such thing.
>>
@60493547
>C# is downright god-tier
What the fuck do you think you're doing you fucking snake oil salesman?
Get the fuck off of this imageboard right fucking now. You're like the slut that made bad life decisions and so she tries to drag other girls down to her level.
>>
>>60493547
t. poo in loo microshaft evangelist (shill)
>>
>>60493551
Just go to cripplechan, grandpa. You're the one who doesn't belong here.
>>
Fuck everyone who says Visual C++ or C# are good languages.
Also, fuck everyone who got pissed off at me for recommending them as languages that can get you jobs.
>>
>>60493585
>Fuck everyone who says POOlangs are good languages.
You can generalize this even more.
>>
>>60493585
> languages
> Visual C++
No, fuck you. Stop posting.
>>
poo
>>
>>60493585
>Visual C++
That shit is so tainted by MS extensions that it shouldn't qualify for C++ in the first place.
>>
>>60493565
>>60493563
>>60493551
>>60493549
>>60493514
>>60493485
>>60493511
the cancer that is killing /dpt/
>>
>>60493565
Its an incredibly easy to use language faggot
>>
>>60493604
>cancer
>>>/b/
>>
>>60493604
you must be new
>>
>>60493592
Wrong. The OOP principles are god tier. You're right about there being no good implementations of them though.

>Visual C++, C#
Proprietary. Therefore garbage. They do get you jobs though.
>C++
Bloated frankenstein language
>Java
Slow
>C with ADTs
Too much hassle
>Python
REALLY slow
>Ruby
ALSO really slow
>Everything else
slooooow
>>
>>60493597
No. Fuck you.
>>60493601
agree
>>
>>60493618
>The OOP principles are god tier
A case of "works on paper but is absolute garbage is practice"
>>
>>60493627
OOPmunism has never been tried
>>
>>60493618
How does it feel knowing you'll never be satisfied?
>>
>>60493638
all i want is a c++ that's actually as good as it feels to use it :(
>>
>>60493527
>java is a simplified C++
this is a massive oversimplification

>the whole point is that it's simple and easy to use in large teams
in the average context, C# is very similar to (and just as easy to use as) Java. the difference is that should you find yourself in a position where you need more control, you aren't shit out of luck

>>60493536
i said "essentially", and after accounting for syntactic analogues. look up the differences between Java and C#. what you'll find is a list of features C# has which Java doesn't
>>
>>60493618
>The OOP principles are god tier
Only if you mean some kind of indian POO-god.
>You're right about there being no good implementations of them though.
Yeah, no language is actually shitty enough to properly implement POO. Nor do I think such a language is even possible.

The rest of your post is redundant. Any POOlang is by definition garbage, the specifics aren't even worth mentioning.

>>60493627
>>60493636
What sort of retarded mind would one need to have to think that POO or c*mmunism """"work on paper""""?
>>
So, I'm trying to complete a challenge on Rosalind where I write a function that simulates the fibonacci sequence but with the modification that the rabbits die after m turns (i.e. a generalization of the Padovan sequence). I have a code that works but the problem is that it's too slow.

I'm a total noob when it comes to programming. I simplified the code to the best of my abilities, but it still takes several minutes to simulate more than 50 turns and lifespans higher than 12, and the challenges are timed.

Can I solve this by using a better computer, or is it strictly a code issue? The computer (our lab computer) has 4GB of RAM and an Intel 3.17 GHz processor.

The code is:

def fib(n):
if n == 1:
return 1
elif n == 2:
return 1
else:
return fib(n-1) + fib(n-2)


def fibd(n, m):
if n < (m+2) and m > 3:
return fib(n)
elif n < (m+1) and m == 3:
return fib(n)
elif n >= (m+1) and m==3:
return fibd(n-2, m) + fibd(n-3, m)
elif n >= (m+2) and m > 3:
return sum(map(fibd, [n-(m+x) for x in (range(-(m-2), 2))], [m]*m))
>>
>>60493659
>What sort of retarded mind would one need to have to think that ... c*mmunism """"work[s] on paper""""?
>he doesn't believe in the perfect classless state at the end of history
Opinion discarded.
>>
File: 1486180471404.jpg (158 KB, 850x850)
158 KB
158 KB JPG
>>60493659
>What sort of retarded mind would one need to have to think that POO or c*mmunism """"work on paper""""?
The kind you have once you reach the bottom of your whiskey bottle
>>
@60493689
"""People""" seriously believe this? I knew on an intellectual level that some people did because of how large their "userbase" was at some point, but I have never seen them "in the wild," as it were.
>>
>>60493709
>/dpt/
>flip it upside down
>/qbt/
>qute butts of traps
>>
Man, I miss being a horny teenager.
>>
>>60493715
/dpt/ is full of stupid kids no need to take their opinions seriously
>>
>>60493734
Buy some sex toys, the "your delivery is ready for pickup" message alone will make you diamonds.
>>
I'm better at programming when I'm drunk than y'all are when you're sober.
>>
>>60493770
did you just assume my inebriation?
>>
>>60493766
dild
>>
>>60493671

>simulates the fibonacci sequence but with the modification that the rabbits die after m turns

What is a rabbit in the context of the fibonacci sequence? What does it mean for said rabbit to die?
>>
>>60493799
I was thinking more in the line of a tenga, but if bumfun is your thing, then have at it.
>>
>>60493808
my thing is shitpost
hence the absence of letter o
>>
>>60493816
I count 3 in that post
>>
File: eggy.jpg (59 KB, 500x526)
59 KB
59 KB JPG
>>60493821
fcuk
>>
kotlin

y/n/m/cyrtq?
>>
>>60493845
:%s/kotlin/suck a nigger dick/g
>>
File: 1494913337792.jpg (54 KB, 500x500)
54 KB
54 KB JPG
What is the best imperative language created up to this point and why is it the best?
>>
>>60493821
the o in (You) doesn't count
>>
>>60493891
>shitpost
1
> of
2
>letter o
3
>>
>>60493883
C++ because reasons
>>
>>60493897
>shitpost of letter o
summary of this thread so far
>>
>>60493897
no o in >>60493799 unless you count the ones in Anonymous and the (You)
>>
>>60493917
This is true, but I was referring to >>60493816
>>
Man, this thread went full-retard way to quickly
>>
I'm a female programmer
>>
>>60493976
>>>/g/wdg/
>>
>>60493991
I use Idris.
>>
>>60493997
No, you don't.
>>
>>60494007
Yes, I do.
>>
>>60493976
code or gtfo
>>
File: fibonacci5.png (12 KB, 433x317)
12 KB
12 KB PNG
>>60493806
Well, actually, each unit represents a pair of rabbits. The rabbit pair starts as juvenile, and lives m turns. On the 1st turn, it grows up. On the second turn, it mates (but you still have 1 rabbit pair.) On the third turn, the original pair mates again and the juvenile pair appears (so now you have two pairs. On the fourth turn (if m is greater than three) the original pair mates again, but if m is three, they die, also, the juvenile pair is grown up and mates (though their children will not appear until turn 5.) This might sound confusing, so here is a chart for the series when m=3. For greater values of m, you would simply add more columns for older and older rabbits.
>>
>>60493976
with a Y chromosome
>>
>>60494013
Prove it
>>
>>60494031
If only, then I might get some respect around these parts

>>60494014
/**
* @param n n
* @return d on success, -1 on failure
*/
int64_t f(uint8_t n)
{
if (n <= 1) return n;
/* if n is greater than 92, fail */
if (n > 92) return -1;
n -= 2;

uint64_t a = 1, b = 1, c = 0, d = 1, e = 1, f = 0;

while (n) {
uint64_t g, h;
if (n & 1) {
g = a * d + b * e;
h = b * d + c * e;
f = b * e + c * f;
d = g;
e = h;
}
g = a * b + b * c;
a = a * a + b * b;
c = b * b + c * c;
b = g;
n >>= 1;
}

/* return d */
return d;
}
>>
Doing some automation with VBA
>>
>>60494046
>posting someone else's code
>>
>>60494046
That's some funky Idris code.
>>
>>60493976
You probably have more personal experience with this than I do, so enlighten me.
I keep trying to point out to /g/ how triggered / assmad they are that people like you exist. But they're literally so butt-angry they can't admit you exist long enough to even confess to being booty blasted.
What do.
>>
>>60494070
This is the first time I've posted anything about my gender. Can't help you there, friend. Sorry.

>>60494060
I wrote that code originally.

>>60494065
It's my own dialect.
>>
>>60494116
And you haven't written anything new in 16 days?
>>
>>60494131
I wrote that code months ago. I've been too busy with work to write anything since.
>>
Who here /east coast/
>>
>>60494070
it's not even a real female. "she" 100% won't post conclusive proof. the last time a "girl" in /dpt/ posted a pic it was an actual tranny.
>>
>>60494175
>i-it just can't be the truth! w-women can't program as well as I can! o-otherwise I'm worthless!
Pathetic.
>>
>get an arduino
>only thing my code does is store a signal and every quarter-second it invert it and write the result to a heavy duty linear actuator
three guesses as to what goes on the actuator head
(hint: it's not more machinery)
>>
>>60494209
post your boobs in /s/ with a timestamp
>>
>>60494209
and not a single timestamp was posted that day
>>
>>60494216
OHHHH, rea-dy lad-die biteyourknee
OHHHH, conk a col-lie conquer he!!
>>
>>60494211
hey excuse me can you like go be homosexual somewhere else
>>
File: codecamp.png (149 KB, 1083x698)
149 KB
149 KB PNG
>>60494175
do you guys really think no females lurk in here?

at the very least there are some over achieving chinks and jew broads. I've posted some sexist shit and the butthurt replies always seem like a woman wrote them. I can tell by their word choice.

Doubt any are here on a friday night though lol.
>>
>>60494302
there are literal faggots and white knights here

you overestimate how many women are unironic programming nerds
>>
>>60494211
Onahole
>>
http://steamcommunity.com/search/users/#text=kawaiianimeshoujo
Add me up, /g/ chan
>>
>>60494302

While I am fairly sure there are SOME women lurking all threads, most of 4chan is males, especially in programming threads. Computer Science departments are like... 10-20% female at most.
>>
File: bloody hell 2.jpg (398 KB, 521x1115)
398 KB
398 KB JPG
>>60494399
Those are dangerous, personal experience from 1 week ago
>>
>>60494405
What the fuck am I looking at?
>>
>>60494116
>female
>uses idris
fucking bullshit. if you post a pic that even remotely suggests you're a female (doesn't have to be tits or even your body at all like maybe some girly items you own or something) you'll be the first in /dpt/ history
>>
where can I buy a nice rubber duck?
>>
>>60494415
Onahole, with my dickblood, as I said, they're dangerous.
>>
>>60494428
That's a weird onahole.
What happened and how did it happen?
>>
>>60494302
surely it happens but odds are it's very, very few. don't underestimate the prevalence of whiny betamales who will rush to the defense of women as if they can't help themselves

>I can tell by their word choice.
might just sound like it because they drank out of plastic water bottles too much

>>60494403
>Computer Science departments are like... 10-20% female at most.
yeah, and these threads are made up primarily of high schoolers, so you can expect it to be even less
>>
>>60494459
>That's a weird onahole.
Tenga Flip Zero
>What happened and how did it happen?
Pull out, try to insert at high speed, scrape up against plastic
>>
>>60494426
https://www.aliexpress.com/item/Yellow-Duck-Rubber-Animals-With-Sound-Baby-Shower-Party-Favors-Toy-16-14-14cm-pool-Bath/32795559120.html
>>
>>60494478
Was probably just a shit onahole
>>
>>60494478
>insert at high speed
well, so onaholes aren't dangerous. you stupidity is
>>
>>60494486
what a majestic and cute duck
>>
>>60494486
>Paying for a debugger
printf is free
>>
>>60494486
Why the meshed poo hole?
>>
>>60494511
you squeeze the duck and it makes a sound
>>
>>60494511
>he's never had a rubber toy
are you literally from india?
>>
>>60494501
i like the look of this one too

https://www.aliexpress.com/item/Cute-Baby-Girl-Boy-Bath-Bathing-Classic-Toys-Rubber-Duck-with-sound-Yellow-Floating-Duck-fun/32728818679.html
>>
>>60493216
Yes.

Learn a statically-compiled, strongly-typed language first.

You will then gain an appreciation for dynamic typing and garbage collection, and the benefits/complexities/disadvantages it provides by comparison.

Learn Assembly -> C -> C++ -> C#

Then mess around with toy languages like haskell.
>>
>>60494578
>strongly-typed language first.
>Recommends C(ancer)
>>
>>60494578
Also,
>H**kell
Delete your post
>>
File: 1409519933871.jpg (10 KB, 375x375)
10 KB
10 KB JPG
nodes.insert(0, nodes.pop(nodes.index(min(nodes))))
>>
File: 1469998938179.gif (1.77 MB, 418x313)
1.77 MB
1.77 MB GIF
>>60494595
char buffer[256];
gets(buffer);
>>
>>60494609
Nice overflow
>>
>>60494578
>Learn a statically-compiled, strongly-typed language
>You will then gain an appreciation for dynamic typing
That doesn't make any sense.
>>
>>60494633
The joke, etc.
>>
>>60493195
>writing c++
>program segfaults right at the end of main()
>add a cout to make sure
>program stops segfaulting
>remove cout
>retest
>program doesn't segfault anymore
Why is c++ so shit?
>>
>>60494656
Stop using C++.
>>
>>60494656
>lying on the internet
>>
>>60494478
you know you are supposed to use lube right?
>>
>>60494656
your make got corrupted or something that 1 time
>>
>>60494595
import random
def sort(arr):
while arr != sorted(arr):
random.shuffle(arr)
>>
I really like the syntax of C# and the things in .Net, can I earn good money with it?
>>
>>60494681
yes. C# is getting really popular in the private sector. even if their main application or service itself isn't in C#, a lot of businesses are using it for testing, automation, tools development and such
>>
>>60494656
you're shit
>>
>>60494725
nice, thanks!
>>
>>60494725
t. microcock shill
>>
Anyone have an anime boy with a c++ book image so I can use as my avatar please.
>>
>>60494777
Hide your fucking powerlevel, faggot.
>anime boy
Lurk more.
>>
>>60494777
>>
>>60494818
C U T E
>>
Universal Function Call Syntax is a good idea. Why isn't this more common?
>>
>>60495006
A better idea is not to bother with methods
>>
File: shift.mp4.webm (974 KB, 1920x1080)
974 KB
974 KB WEBM
building a big timer with a 7 segment display. currently implementing the logic on a small one
>>
alright I'm gonna take a dump now
>>
File: IMG_20170506_190452493.jpg (519 KB, 2500x1406)
519 KB
519 KB JPG
>>60495040
will cut out the big one later
>>
>>60495018

But they make function composition so much easier!
>>
I took a several month break from coding after burning out, and now it's time to come back.
>tfw no idea what to work on
i just want some fun small project...
How hard do you think would be to learn code for android if i experienced with c#? java seems like poor man's c#, but fuck it would be hard as hell to give up super comfy shit like linq
is it possible to write android apps in c#?
>>
File: ReWqG.webm (1.02 MB, 1280x720)
1.02 MB
1.02 MB WEBM
>>60495052
also going to use simple led strips for it. (at first wanted to make each digit ~35cm big. Now it will be only 20. Thats big enough)
>>
>>60495055
Methods are shit. Use proper functions.
>>
>>60495067
they are the same thing son
>>
File: 1493883819598.png (56 KB, 281x218)
56 KB
56 KB PNG
>>60495080
Even marisa knows the difference, you fucking faggot
>>
>>60495115
Okay, let's hear it mr. genius
>>
How do makefile implicit rules work?

I'm trying to prevent total recompiles every time I change one header file that isn't even used by most of the program.
This should make a list of only the header files affected, and yet it doesn't let me use that %.c syntax in the dependencies section.
Is there an automatic variable that contains only the name of the first dependency of this implicit rule?
$(OBJ)/%.o: $(SRC)/%.c $(shell grep "#include \"" $(OBJ)/%.c | cut -d ' ' -f2 | sed 's/"//g')
>>
>>60495067

With universal function call syntax, this:
a.f(b)
is just syntactic sugar for
f(a,b)
or
SomeTrait::f(a,b)


These are real, free functions. You can pass them around as values all you want, return them, etc... And the method syntax makes function composition easier. Like F#'s |> operator, but for functions of arbitrary arity.
>>
File: 1438749590433.png (94 KB, 400x400)
94 KB
94 KB PNG
>>60495120
>method
A subroutine (commonly referred to as a function) that's a member of an object. Its scope, number of parameters, and what it can access differs from that of a function. Not all functions are methods, but all methods are functions.
You can thank marisa later. Now educate yourself next time, pleb.
>>
>>60495189
Took you long enough to google it
>>
>>60495189
>Not all functions are methods, but all methods are functions.
Actually, I take this back.

>>60495197
Sorry, I'm enjoying my manime right now. Of course, you should be happy I spoonfed your lazy ass.
>>
>>60495128
>Is there an automatic variable that contains only the name of the first dependency of this implicit rule?
Yep. Just use $<

>$(shell grep "#include \"" $(OBJ)/%.c | cut -d ' ' -f2 | sed 's/"//g')
Don't do this though. There's a much better way. You can make the compiler generate its own dependency list.

This is a trimmed down version of a Makefile I use:
DEPFLAGS = -MMD -MP
SRC = file1.c file2.c
OBJ = $(SRC:.c=.o)
DEP = $(OBJ:.o=.d)
BIN = program

all: $(BIN)
.PHONY: all

-include $(DEP)

$(BIN): $(OBJ)
$(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $@

%.o: %.c
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $(DEPFLAGS) $< -o $@


The compiler flags -MMD -MP are understood by any modern version of GCC and Clang, and they make the compilers generate .d files next to your .o files, which are mini-Makefiles containing all the header dependencies used to create the .o. The first time you build, it will rebuild everything, and subsequent builds will use the .d files (loaded with -include $(DEP)) to only rebuild the files who's header dependencies have changed.
>>
>>60495189

Well, since the language we're talking about is primarily Rust (although I think D and Nim also have UFCS), you should know that there isn't really objects. There are structs, and those structs can have "methods", but those methods are technically free functions, and can't have more access than any other free function, since there's no such thing as a private member.

All methods in Rust are free functions.
>>
>>60495223

Now this is a Makefile feature I was not aware of. Neato.
>>
jesus christ. can't use the fucking send_keys method in the selenium module on firefox
>>
>>60495189
this provides no indication as to why a function would be "proper" while a method would be "shit", considering a function taking a pointer to a struct and a set of parameters is equivalent to a method of that struct taking those same parameters after accounting for artificial syntactic analogues
>>
>>60493766
the kinkier the better, the thrill of buying a chastity cage was better than actually having it
>>
>>60495043
are you done yet?
>>
File: 1451156472373.png (147 KB, 405x327)
147 KB
147 KB PNG
>>60495285
Sorry, buddy, but I've already spoonfed enough in this thread.

>>60495396
On the delivery day for my onahole, I was fucking nervous (and horny) until it came. Sweaty palms for hours
>>
>>60495413
He was just shitposting; girls don't poop!
>>
>>60495425
>He
>girl
>>
>>60495431
Since only cute little girls use 4chan, the 's/S' is implied to save post space.
>>
>>60495269
It's probably the main reason I still use GNU Makefiles for simple projects, instead of a modern trendy build system. GNU make just works and auto-dependencies make it much easier.
>>
>>60493734
the grass is always greener

i'm actually kind of sick of fapping, it's a bit of a chore and it distracts from programming
>>
File: whenyoumasteredlisp.webm (3 MB, 1280x720)
3 MB
3 MB WEBM
/dpt/-chan, daisuki~

>>60495189
>A subroutine (commonly referred to as a function) that's a member of an object.
no

>>60493195
>What are you working on, /g/?
official /dpt/ tetris game

Thank you for using an anime image.
>>
>>60494302
the fuck is that language
>>
>>60495469
It's JavaScript with JSX extensions for React. God React is a fucking abortion.
>>
>>60495456
Yeah, and you get to have the ability to be fully independent. Don't you anons hate living with parents with unreasonable rules? I don't miss daily cave explorations with my dad at all, or when I had to clean my mom's spatula.
>>
>>60495479
Jesus christ, this just reminded me of being like old school JSP garbage.
>>
>>60495415
>Sorry, buddy, but I've already spoonfed enough in this thread.
i've long been aware of the facts. i'm simply asking you to attempt to justify your groundless opinion, given that you don't appear to understand the things you are saying
>>
>>60495486
Everything old is new again. We finally separated logic, views and style in web apps, and now React makes it trendy to put them all back together again. It's cool because Facebook does it or something. Web devs need to learn to think for themselves.
>>
>>60495488
>i'm simply asking you to attempt to justify your groundless opinion
What did I assert that was groundless?
>>
>>60495505
i believe you asserted methods to be "shit". such an opinion calls for justification
>>
>>60495571
I did not make such an assertion. That was another anon; you'll have to ask him. I simply replied to a post as to stop the potential spreading of ignorance.
>>
why is haskell a meme language?

why do unemployed/unemployable people seem to flock to it?
>>
>>60495454

I switched to CMake because it auto-handles this shit, lol.
>>
File: 1494175305794.png (267 KB, 637x360)
267 KB
267 KB PNG
>>60495281
This whole experience with trying to fucking get firefox, geckodriver, and selenium to all work together has fucking driven me up the fucking wall. Fuck.
Finally decided fuck it and decided to use Chrome
>>
>>60495632
>why is haskell a meme language?
Haskell isn't a meme language.
>why do unemployed/unemployable people seem to flock to it?

Because they believe they will be gurus in it and get the highly paid work with it, just because they "can" it.
>>
>>60495674
Am I better off learning haskell or idris as a first functional language?
>>
>>60495699
better learn scala
>>
>>60495699
Haskell, since you will have an easier transition to Erlang and so on.
>>
>>60495619
no spreading of ignorance was occurring. if you had read the posts in question, you would have seen that the discussion was about the equivalence between a function taking a pointer to a struct and a method on that struct, especially in regards to universal function call syntax. please try to make yourself aware of context before posting in the future so as not to waste people's time
>>
>>60495699
What languages have you done before?

F# -> Haskell -> Idris
is a nice transition if you worked with C# before

Haskell is a good start though

>>60495703
Scala is trash
>>
>>60495705
>Haskell
>transition to Erlang
Am I living in some kind of bizarro shitworld
>>
>>60495711
Scala has its place on the workplace alongside other pajeets. Haskell is just a meme.
>>
>>60495619
but you just spread your own ignorance.
>>
>>60495707
>>60495732
This post, >>60495080, made an incorrect assertion by strictly equating functions with methods; thus, I corrected him. The post was made independent of the context you stated; thus my reply did not need such context.
If any of you anons made that post and are simply lashing out because you hate being corrected, then I understand. However, please conduct yourself better in the future.
>waste people's time
Sorry, anon, but if you make ignorant statements, then your time is not valuable enough to be wasted.
>>
>>60495711
I mostly work with C++. I spun up a little scheme project recently to accept connections on a tcp socket and return a piece of data. I had almost no idea what I was doing and the whole process took something like 20 lines. I've been interested in actually learning "a functional language" ever since.
>>
>>60495801
Transitioning from a imperative C++ line of thought to a functional one can take some time. Lisp is fairly forgiving about this. I'd continue using Scheme (or Common Lisp) for now until you feel comfortable using it.
>>
>>60495789
the post >>60495080 was not made independent of context; it was a reply. the context is in the reply chain. this should be obvious given the fact that the statement "they are the same thing" is entirely meaningless without context. in the context of universal function call syntax, the assertion "they are the same thing" (referring implicitly to functions and methods), though vague, is technically valid given that they are indeed functionally equivalent
>>
>>60495801
You could try Haskell or F#
I wouldn't start with Idris
>>
>>60495789
and you then made your own incorrect assertions

>>60495897
>they are indeed functionally equivalent
no
>>
>>60495897
I grow weary of your continued and persistent spouts of ignorance as it seems you fail to realize it yourself. Begone.

>>60495938
>and you then made your own incorrect assertions
Do tell. I'm an imperfect being after all.
>>
>>60495938
>>60495956
i see no arguments here
>>
Hello friends

Just learning to script some basic shit in python.

I don't really understand how to handle exceptions.

code related- until this point I've been using conditional statements to check type/magnitude etc of inputs, but should all this be handled by a try/except combo?

Does handling exceptions usually require me to indent all the code to be checked under 'try'?

Seems a bit excessive to wrap code in except statements no?

import sys
import math

def roundup(x):
return int(math.ceil(x / 10.0)) * 10


def LintelMoment(r,l):
us_udl = 1000 * r/l
print('Zero value for length or reaction - calculation terminated')
lin_mom = (us_udl * (l / 2) * (l / 4)) / 1000000
print(str(lin_mom) + 'kNm')
return lin_mom


def RequiredArea(r,sigma_a):

if type(r) != float and type(r) !=int:
print('Reaction is not a valid number input')
return None
elif type(sigma_a) !=float and type(sigma_a) !=int:
print('Allowable stress is not a valid number input')
return None
else:
if r <= 0 or sigma_a <= 0:
print('reaction or allowable stress is <= zero, calculation terminated')
return None
req_area = roundup((1000 * r) / sigma_a)
print (str(req_area) + ('mm^2'))
return req_area
>>
>>60495413
Almost
>>
>>60496115
exceptions are gay but thats just my opinion
>>
>>60496115
Pathetic.
>>
>>60496241
Thanks senpai.

This is literally my first week of picking up python.

>>60496230
:^)
>>
>>60496260
Yeah that's not an excuse. please leave and take your social media memes with you
>>
>>60496287
>social media memes
are you retarded?
>>
>>60496241
please use a trip so i can filter you
>>
>>60496336
Using f.a.m (converted to senpai by the filter if that's still a thing) is trash and poor form. just like your programming

>>60496350
your first
>>
>>60496015
You are wrong and you know it
>>
>>60495632
Math people get wet from Haskell, it resonates with them
>>
So learning python at the moment.

Hadn't come across anything mentioning private/public variables/etc so did some googling and came across this post.

As a Python and Java programmer, I've found that private and protected are very, very important design concepts. But as a practical matter, in tens of thousands of lines of Java and Python, I've never actually used private or protected.

Why not?

Here's my question "protected from whom?"

Other programmers on my team? They have the source. What does protected mean when they can change it?

Other programmers on other teams? They work for the same company. They can -- with a phone call -- get the source.

Clients? It's work-for-hire programming (generally). The clients (generally) own the code.

So, who -- precisely -- am I protecting it from?

Right. The schizophrenic sociopath who refused to read the API comment blocks.


So what IS the point of private/protected?
>>
>>60493212
I looked at go and the retarded naming (broken camel case - even normal camel case would be more bearable) and the out-of-place feeling of channels really put me off it.
>>
>>60496372
I actually typed "senpai". It's ironic, because it's a respectful honourific despite the fact that you're a fucking retard.
>>
File: cat.gif (14 KB, 180x236)
14 KB
14 KB GIF
How different are the Python Standard libraries in 2.0 and 3+? I'm learning python 3.4, and I want to methodically study the standard library, but the only decent book is for Python 2.0. Can I still do that or will it be completely useless?
>>
>>60496519
Ensuring that other code doesn't use methods that are meant to be internal. That post is pretty dumb: it doesn't mean hiding the code so that people can't see it, it means making it so external code can't access it without raising an error.

Python does have an equivalent of private methods if you precede the method name by an underscore or two (there's a difference between these; look it up if you're curios).
>>
>>60496549
Different enough that you'll end up learning wrong things. Why use a book and not the Python docs? They're well-written
>>
>>60496601
Why use a book

Because I can get the physical book, sit on my couch for an hour or so, read all comfy and shit, and then grab my laptop and try things out. I really do hate reading technical stuff on a screen for long periods of time.
>>
>>60496519
>it keeps implementation-level stuff away from other programmers, you can change the way those internal functions work without having to worry that someone is (accidentally or intentionallu) using it somewhere
>private keeps your API documentation clean fron crud and bloat that the end user doesn't need to know about
They feel more appropriate when you're designing large, enterprise-level software and when using Javadoc or similar documentation tools. In small projects stuff like Pythons _methodname convention or custom documentation is good enough.
>>
>>60496519
this post is retarted. Protected means ensuring that the only one who can access/modify the internal variables is the calling function, noone else. This saves a lot of fuckups if you have a larger codebase.
>>
>>60493397
Map and filter are unpythonic. Use comprehensions instead.
>>
>>60493618
>The OOP principles are god tier. You're right about there being no good implementations of them though.
Just like real communism was never tried before, right?
>>
>>60493485
>software ""development""
>""developers ""
If you think there's something wrong with those terms, you probably don't have a job.
>>
>>60493515
Me.
>>
File: Capture.png (304 KB, 378x602)
304 KB
304 KB PNG
>>60496614
Not him, but I bought a 4:3 mi-pad 2 for around £150 specifically for this.

I read technical manuals, text books and art books with it.

Also works nicely for magasines.


I travel a lot so I mainly got it to avoid heavy books.
>>
>>60494046
>
/* return d */
return d;
>>
>>60496712
>mi-pad 2
what's it like reading on those? Is the screen a bit more opaque than a normal laptop? I just hate reading on my computer, so I don't want the same experience just on a smaller screen.
>>
>>60496614
I guess you're me in reverse, because I can't read a non-fiction book for more than 5 minutes.
>>
File: Reeeetard.png (210 KB, 377x470)
210 KB
210 KB PNG
>tfw too stupid for data oriented design
>>
Why the fuck is the map function called map?

Was historically named 'apply transform'.

Seriously who the fuck let programmers name anything. 20% of all programming related shit is named in a way that doesn't give any information as to what it does.
>>
>>60496756
Its the same screen panel as the ipad mini 4.
Literally the same resolution (le retina display™) and size and likely the same manufacturer.

Pop into your local Apple™ Genius™ Bar and take a look.
>>
>>60494505
The best tools are always paid. Open-source is a meme
>>
>>60496836
because it maps things from one value to another
>>
>>60496836
>>
>>60497009
I'm getting this picture in my head of James Cook exploring a car.
>>
>>60496836
"map" has been used historically to refer to transformations as well:
https://en.wikipedia.org/wiki/Linear_map

think about what a spatial linear transformation actually does; it defines a mapping from one space to another. i also feel like, semantically, a function called "transform" could potentially give the impression that it mutates a data set by transforming it in place, whereas "map" might better convey the idea that it "maps" the transformation of a data set into a separate data set
>>
>>60496836
On a related note. Why are a one dimensional arrays called vector in computing?
>>
>>60497097
They're called vectors in most fields.

They are a representation of a vector end coordinate in a space, the start of which is the origin
>>
>>60497097
Because of linear algebra
>>
Is there an easy way to implement a 2-4 tree?
>>
Thoughts on Think Python book?
>>
Can A* make nonoptimal paths in the presence of weird/cluttered obstrucion locations, or is my algorithm incorrect?
>>
File: 1421167516167.gif (1011 KB, 600x337)
1011 KB
1011 KB GIF
>tfw my simple Python script trades cryptocoins and yields around 10k USD / month
Why should I use another language?
>>
>>60497152
I believe A* will always choose the shortest path
>>
>>60497154
>tfw my simple Python script trades cryptocoins and yields around 10k USD / month

On C it would yield 100k/month
>>
>>60497169
Average CPU load is around 1% (of 1 core)
99% is waiting
>>
>>60496503
Physics major, there is no language I hate more than shitkell. Plus shitkell "programmers" are the most pretentious fucktards of all programming communities.
>>
>>60497152
i believe if you break out immediately upon finding the first successful path, it's possible for it to be suboptimal. your heuristic could guide the search down a suboptimal path that happens to find a solution before the algorithm opens the nodes in the optimal path. if i remember correctly there's a pretty easy way to wait until the optimal path is found, it just involves not exiting immediately on first success. i can't remember it off the top of my head, though
>>
>>60497097
They're not. A vector is not the same as an array.
>>
>>60497316
then what's the difference?
>>
https://www.youtube.com/watch?v=w2TcYP8qiRI

>google i/o
>memeapplication
>memechat
>>
>>60497356
>meme
>>>/v/
>>
>>60497360
tell that to google qts, not to me lol
>>
>>60497370
>lol
>>>/r/ibbit
>>
>>60497356
Can I link against flutter shared library and program in C?
>>
>>60497356
>>60497370
>qts

they literally look like dudes who went on hrt after puberty.
>>
>>60497353
vector is a C++ class that implements a dynamically sized array, similar to an ArrayList in Java. This is not the same as an array, which is generally statically sized and is not a class. Vector isn't really a generic computing term, whereas array is. Most programming languages would be expected to implement arrays.

In linear algebra it's true that a 1-dimensional array is called a vector, but not really in programming.
>>
>>60497152
>>60497244
then again... come to think of it (sorry it's been a while), that might only come up if you have a bad heuristic. it should never give a value greater than true distance, so you might want to make sure of that. also keep in mind that if you have a lot of equal distances between nodes (like in a grid), there will be multiple optimal solutions, and A* isn't guaranteed to find a pretty one
>>
>>60497426
>Vector isn't really a generic computing term
wrong, in low level computing vector and array (of bits for example) is used almost interchangeably
>>
>>60497458
https://en.wikipedia.org/wiki/Interrupt_vector_table
https://en.wikipedia.org/wiki/Vector_processor
two examples
>>
>>60497426
you're getting a bit caught up in language specifics here. while what you're saying is true in terms of C++ and Java, it's acceptable to refer to arrays as vectors in a non-language-specific context. notice that the first result under "Computer Science" on the WikiPedia page for "Vector" is "a one-dimensional array":
https://en.wikipedia.org/wiki/Vector
>>
>>60497426
the naming of resize-able arrays as vectors in c++ was an error that the author now regret.
>>
>>60497426
The class vector is called vector because it is a vector
>>
>somebody has package manager for the lang
>your systems package manager also has the same packages
>system packages will conflict with packages coming from custom package manager
FUCK
>>
>>60497514
I don't think it is that bad.
They have an array class which is a fixed array container and vector which can be resized.
If they had to rename anything, I would rather have them rename unordered map to hash table.
>>
File: banner.jpg (111 KB, 1280x284)
111 KB
111 KB JPG
>>60493195
Working on my imageboard 4kev.org
>>
File: CMvONhr.gif (133 KB, 151x200)
133 KB
133 KB GIF
Is a college freshman shitter welcome here? Currently working on some homework for a summer class I'm taking now.
>>
>>60493195
Trying to make a simple web and android app-based snake game with scores.
using Django as backend (my first time). python's ecosystem is really tricky compared to node and java's.


Any tips?
>>
>>60493217
China-chan is great but dlang is cancer. Kys yourself.
>>
>>60497757
no
>>
>>60497757
No one is welcome here. They just kind of exist, like a big middle finger to reality
>>
>Always wanted to be an artist
>Instead I have a PhD in computer science
I wasted my life.
>>
>>60497786
just like make game
>>
>>60498430
What did you specialize on for your PhD?
>>
>>60497146
Pls resbond
>>
>>60494578

>Java is not a statically compiled strongly typed language
>>
>>60498465
Learn Lisp.
>>
>>60498446
Speech recognition and synthesis, basically.
>>
>>60498478
I need python for scientific applications
>>
>>60494578
>C#
Enjoy slavery to Microsoft
>>
>>60493195
I've got a mostly-functional pomodoro timer script going that autoplays a Spotify playlist for you. I want to make it look and sound better if I can.
>>
>>60497684

That makes no sense to me. It feels like the naming conventions are back to front - std::vector should be the fixed-size container and std::array should be the resizable one.
>>
There is no point in learning assembly. You will likely never find a practical application for assembly. Any knowledge about memory management that you would gain from learning assembly can be gained from learning C.
>>
>>60498493
Is that supposed to be bad? It's not like we have better operating systems around
>>
>>60498592
Sure, hand-written assembly doesn't have a lot of practical applications these days, but assembly will teach you the fundamentals of how software works at that level.
C doesn't teach you about proper stack usage, registers, calling conventions, and so on.
>>
C++ class, should the copy constructor and the operator= be virtual?
>>
>>60498689

copy ctor definitely cannot be virtual, I don't think operator= can be. If it can then it shouldn't.
>>
>>60493216
Yes, it' a byte code managed language. Total shit.
>>
Is there any language out there that:
>is statically typed and compiled
>is Turing complete (inb4 assmad lambdacalculusfag bitches at me for the rest of the thread)
>is object oriented (inb4 assmad FPfags bitch at me for the rest of the thread)
>has garbage collection (inb4 assmad Dlangchanfag/Cfags bitch(es) at me for the rest of the thread)
>allows you to write generics that inherit from their parameters
>>
>>60498592
>Any knowledge about memory management that you would gain from learning assembly can be gained from learning C.
Wrong, C only teaches you how to manage primary and secondary memory, and it only teaches you how to manage primary memory not stored on the stack. It doesn't teach you how to manage your registers, nor how to create and destroy stack frames.
>>
>>60498598
install gentoo
>>
>>60498846
Scala
>>
New thread:

>>60499056
>>60499056
>>60499056
>>
>>60497458
I did not know that, thank you.
>>
>>60497603
So it's an array of classes?
>>
>>60496777
r u me?




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.