[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
/dpt/ - Daily Programming Thread
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

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

Thread replies: 332
Thread images: 41
old thread: >>52622420

What are you working on, /g/?
>>
>>52629675
kill yourself
>>
I'm making a video game for fun in C++ using the SDL library.
Anyone got an input on how vertical sync works and how to manage it ?

If I activate it using the SDL flag, it just slow down everything in my game. how should I manage that ? Is there a good way ?
>>
>>52629711
what do you mean slow down everything in your game?
>>
>>52629675
Can I ask a question?
Why possessed you to choose Hime as your forced /dpt/ mascot?
>>
Python doesn't have tail recursion when you use functions with big inputs you'll fail.

Does the same happen if you do recursion for example if you have an object that calls another object's method and so on down some chain
will this cause the stack to expand to the limit the same way it does with ordinary functions
>>
>>52629711
Vertical sync forces the rendering thread to wait until your display's vblank (the time at which it starts to draw the next frame out to the display)

This means you won't get any tearing.

If you are rendering in the same thread (which you should be for a simple game) then vsync will limit your loop to run once every ~16.67ms (for 60hz, this will be different if you have a 120hz display etc)

When you say 'slow down everything', be more specific.
>>
>>52629723
if vsync is off, my character takes 2 seconds to cross the map he is in.
If vsync is on he takes 15 seconds.
>>
>>52629675
Thats a fucking dude
what the fuck man
>>
>>52629749
yes
>>
>>52629760
fix your timestep

don't be this retarded:

https://www.youtube.com/watch?v=eDA37BmvNwM
>>
>>52629763
the actual show is much worse
it's basically one long extended episode of sexual harassment
>>
File: img000029.png (529 KB, 1006x1400) Image search: [iqdb] [SauceNao] [Google]
img000029.png
529 KB, 1006x1400
>Running a startup
>2 engineer operation, 4 guys total
>heavy analytics + payments flowing through our system
>Use shiny NoSQL system - Cassandra, because Postgres can't into scaleout (and too poor to afford 20TB+ node) and MySQL can't into write performance
>Keep payments + analytics in same cluster because poor

>Start selling really well
>Getting more paying customers with new product
>Finally might be able to afford real ops

>Have a 1 month of really bad downtime
>Customers angry
>But get to fixing it
>New 300k/yr customer going online tomorrow (I knew about this for weeks)
>Decided last week to upgrade Cassandra to latest version
>Performance goes to shit
>A lot of data silently gets corrupted in upgrade process
>Manage to give the impression everything is fine
>Any sort of load with crash the system
>Spending the entire night reversing everything/doing everything I can to get back into stability


I now know why stodgy old sysops guys hate upgrading software. I used to think "upgrade" meant better & faster. I now know that is a lie.
>>
>>52629878
that's what you get for using FREE SOFTWARE with NO WARRANTY
>>
>>52629878
kek
>>
>>52629878
Yeah pretty much. If you're at a startup and your shit goes into production you are probably unwise to update external dependencies until years from then. You might be able to get away with point releases for security fixes, but any major/minor version bump is probably going to fuck you.

>>52629898
Proprietary companies are even worse about this, they have no incentive to be transparent about the bullshitty bloat they add.
>>
>>52630034
That's why you pay them for support, you moron.
>>
>>52630044
Why do that when I could take the moral high ground and pay a free software company for support?
>>
>>52630044
must be bait
>>
File: 1451492957431.jpg (101 KB, 1024x904) Image search: [iqdb] [SauceNao] [Google]
1451492957431.jpg
101 KB, 1024x904
>>52630055
>free
>pay
>>
>>52629878
>Postgres can't into scaleout
> MySQL can't into write performance
>so ill just use something even shittier
>>
Learning Apple's swift language
Anyone got tips on learning Swift?
>>
>>52630108
What should I pay for then anon?
>>
Anyone know if there's any other algorithm to determine whether one array exclusively contains elements from another?

I think the obvious way would be O(n^2) worst case, but I feel like that's too much

bool contains(array, item)
{
iterate through array
if iterator == item
return true
return false
}

bool exclusivelyContains(array1, array2)
{
iterate through array1
if !contains(array, iterator)
return false
return true
}


the obvious use for this would be exclusivelyContains(input, "0123456789") or something like that
>>
>>52630195
>exclusivelyContains(input, "0123456789")
by the way I know there's a way better alternative for that specific case, but I'm looking for a general algorithm
>>
>>52630128
Cassandra can into both those things at the expense of having a very shitty datamodel. When it works, it works though.

However I hate fucking operating this database. The developers of this database hate SysAdmins with a passion for whatever reason and constantly look for more ways to keep SysAdmins up at night. Manual Repair is one of the most asinine shit about the database, and there is still no way to track progress or have any sane way of starting/scheduling repairs without fiddling with JMX (so fuck you if you are not a Java shop).

>>52629898
>>52630044
Paying for enterprise DB support is practically psuedo-consulting. Almost every vendor charges through the nose (like $800 per core, so you end up paying $6400/mo to run software on a machine you pay $300/mo for). Completely prohibitive for startups, especially when most will tell you not to use 75% of the database's "features" because they were added in for marketing and beta-tested by the community. (MongoDB being an egregious offender, but I've seen this with Cassandra too - writing several blog posts about secondary indexes and how they are amazing, but the docs essentially telling you are a retard for using them, or SPARK integration, which is piss slow on large datasets, making you question why you bothered in the first place).

I _vastly_ prefer open source databases, because at the end of the day, you can pop in an IRC channel and ask a local expert for some tips, and not some sales engineer who will try to upsell on some shit you don't need to solve a problem they caused.

>>52630195
For any 2 unordered arrays, doing a set comparison is O(n^2). IF the other array is ordered, you get O(nlogn)
>>
>>52629711
>>52629781
I'm searching online, but I don't get how.
SDL got a specific flag to activate the vsync, which I use.
Then my gaming loop is just
while(!quit){
// input the keyboard events
// do the stuff the game should do
// update the screen
}


Maybe that's just the normal behaviour and I should just manage the speed of my game modifying how many pixels the character move etc.
>>
>>52630247
>IF the other array is ordered
As in, if array2 is ordered by the frequency it occurs in array1?
>>
Ok guys, I think I'm going to learn C#.
>>
>>52630288
why?
>>
>>52630142
hookers and blow
>>
>>52630280
No, ordered sequentially. Then your
contains(array, item)
can just be a binary search which is O(logn).
>>
>>52630296
It seems like a good language for making video games.
>>
>>52630269
You're not describing what you mean by 'slow'
How fast does that loop run without vsync? Are you using a timer? etc
>>
>>52630269
the most common way to do it is to update your physics and game logic in fixed time intervals and interpolate to the current frame time

so if you update every 10 ms and there's 16 ms between each frame

first frame you'd update once and have 6 ms left over

then in the next frame you'd update twice and have 2 ms left over

etc.

http://gafferongames.com/game-physics/fix-your-timestep/
>>
Hey guys anyone good at Haskell here?

How do I avoid ugly branching and what's the best way to handle exceptions in general in Haskell?

I mean no matter how much I think about it I can't seem to find a way to make this more readable and easier to understand. I've looked at how catch and try work but they don't really simplify the process either.

upload :: Assignment -> UserIdentifier -> T.Text -> String -> IO Submission
upload a uid fileText fileName = do
let filePath = getAssignmentPath a
e <- doesDirectoryExist filePath
if (not e) then error "Assignment does not exist"
else do
let workingDir = filePath </> uid
e2 <- doesDirectoryExist workingDir
if (not e2) then do
createDirectory workingDir
updateSubmission a workingDir uid fileText fileName
else updateSubmission a workingDir uid fileText fileName
>>
how's my shitposting
package main

import (
"flag"
"fmt"
)

//usage: go run main.go -shitpost "i hate this board"

var shitpost string

func init() {
flag.StringVar(&shitpost, "shitpost", "shitpost", "shitpost")
flag.Parse()
}

func main() {
fmt.Println(shitpost)
for i := 1; i < len(shitpost); i++ {
space := make([]rune, i)
for j := 1; j < len(space); j++ {
space[j] = ' '
}
fmt.Println(string(shitpost[i]) + string(space) + string(shitpost[i]))
}
}
>>
>>52630330
upload a uid fileText fileName = do
workingDir = try (ensureDirectory (getAssignmentPath a) uid)
case workingDir of
Left _ -> -- error
Right workingDir -> updateSubmission a workingDir uid fileText fileName

ensureDirectory :: IO (Either Exception String)
ensureDirectory filePath uid = do
exists <- doesDirectoryExist filePath
if' doesDirectoryExist filePath then
if' doesDirectoryExist workingDir then
return workingDir
else do
createDirectory workingDir
return workingDir
else
fail "Assignment does not exist"
where
workingDir = filePath </> uid
if' = liftM3 if


Something like this?
>>
>>52630585
hey this does look better, thanks

what's liftM3 though?
>>
>>52629675
I'm making a learning tool for begining musicians using Ogre and portaudio. I'm solving problem with latency, but it isn't critical. Does anyone know a good sources of informations about portaudio?
>>
>>52630655
It lifts 3 arguments into a monad. I didn't have GHC handy when I wrote that but it won't work like that since if is a keyword, not a function.

You would have to do something like:
if' cond a b = cond >>= \result -> if result then a else b
unless' cond action = cond >>= \result -> unless result action

(probably a better way to write them)
ensureDirectory filePath uid = do
if' (doesDirectoryExist filePath) (do
unless' (doesDirectoryExist workingDir) createDirectory workingDir
return workingDir)
(fail "Assignment does not exist")
>>
>>52629831
>sexual harassment
>bad
ayy lamo
>>
File: Ijwmufu[1].png (9 KB, 640x480) Image search: [iqdb] [SauceNao] [Google]
Ijwmufu[1].png
9 KB, 640x480
>>52629675
GUI library for mIRC.
>>
>>52630303
>mfw i learned c# because of unity
it's pretty good. Their API probably has the best documentation I've ever come across. I've made decent stuff with it
>>
>>52631329
I don't want to use unity though, it's pretty awful
>>
>>52631333
What's awful about it?
>>
File: 1440628124386.jpg (49 KB, 576x402) Image search: [iqdb] [SauceNao] [Google]
1440628124386.jpg
49 KB, 576x402
I just installed Geany. Is there an option to open whole folder with files in it or I am just unable to find it?
Also is Geany any good ? (for C and Python at least)
Its just that appealed to me bcs its open source and very light.
>>
>>52631333
>I don't want to use unity
good
>>
>>52629760
> if vsync is off, my character takes 2 seconds to cross the map he is in.
> If vsync is on he takes 15 seconds.
That means that it should actually take 15 seconds, but disabling vsync basically makes the game run in "fast forward" (because you move the character "X pixels per <however long redraw takes>" rather than at a fixed speed).

It also means that the speed at which the game runs will depend upon the speed of the video hardware, and you'll get tearing (unless you're using triple-buffering).
>>
>>52631428
geany is bloat
use gedit
>>
>>52631428
You don't need much for C and Python. Geany does the syntax highlighting, so you're all set.
>>
>>52631534
what about some autocomplete plugins? do they exist? At least for the most basic keywords like "printf("")"...
>>
Is PyCharm free?I mean is there any money involved because on their website I see that I can download pro and community versions without any questions.
>>
>>52630330
GHC declares Either to be a monad:
instance Monad (Either e) where
return = Right
Left l >>= _ = Left l
Right r >>= k = k r

So (Left e) is an exception while (Right x) is a value. Exceptions propagate (i.e. if any part of a monadic computation is Left, the overall result will be Left).
>>
>See the X Macro technique in use
Holy crap, this is so nice.
It's shit like this why languages without a macro system are pure garbage.
>>
Why /dpt/ so slow? Did school start or something? Did you all finally get jobshahfhhaha okay but no, shit's slow.
>>
>>52631739
isn't it usually slow around this time of day

maybe not as much during school breaks/vacations
>>
>>52631433
>no reasons given

with VS it's golden. if xna's your thing, then good luck

>>52631739
busy working on my unity game
>>
>>52631767
I dunno, from the time I left for work to the point where I got into my office there was maybe 6 posts. What am I supposed to read for the next 8.5 hours? WORK STUFF?
>>
>>52631739
im playing world of warcraft vanilla
>>
>>52631109
if' = liftM3 (\p a b -> if p then a else b)

or lift bool since base 4.7
>>
>>52631691
Congrats, you learned about an over 50 year old technique.

Almost all languages can use CPP unless they use clashing syntax.

>It's shit like this why languages without a macro system are pure garbage.

It just sounds like languages which need to fall back on a macro system are not expressive enough instead.
>>
Do you guys visit any programming challenge websites like topcoder or codechef?

No guts?
>>
>>52631930
no.
why would I need to challenge myself in some shitty competition.
>>
>>52631930
Codeeval just to mess around, same with hackerrank.
>>
File: 1451421501411.jpg (40 KB, 565x600) Image search: [iqdb] [SauceNao] [Google]
1451421501411.jpg
40 KB, 565x600
But anon, how would you know if you are any good if you don't challenge yourself?
>>
>>52631964
>>52631993

was replying to this anon
>>
What's the most versatile language I could learn to eventually work on my own or remotely for a company with?
Also, how viable is learning Java to make minecraft mods and steal money from kids?
>>
>>52632010
You will need a year until you learn java enough to make money that way
>>
File: Linus_Torvalds_05.jpg (3 MB, 2346x2346) Image search: [iqdb] [SauceNao] [Google]
Linus_Torvalds_05.jpg
3 MB, 2346x2346
Is he right? Should tabs be 8 characters long?
>>
>>52632003
>would you know if you are any good
because my code works, is fast, flexible and accomplishes the tasks I set out? don't need to do some arbitrary challenge to prove how good i am to someone. maybe if i were a highschooler or freshmen in college.
>>
^
Pretty weak attempt for (You)'s.
>>
File: doge.jpg (32 KB, 537x529) Image search: [iqdb] [SauceNao] [Google]
doge.jpg
32 KB, 537x529
Hello fellow programmers.

I'm currently working on Wordpress and my site, an e-commerce with tons of products, is very slow. I think it's because of lots of large image files we are using.

I'm looking at each jpeg and png file over 100kb and using paint.net to lower their quality in order to get a sub 100kb size. Do you think this will have a big impact on the site's performance?

What do you suggest me doing in order to get the site faster?
>>
>>52632010
>Also, how viable is learning Java to make minecraft mods and steal money from kids?
Minecraft modding scene is a complete mess. First you'll need to learn the API for the several dozen mod loaders. Then the minecraft API. Then you'll have to worry about each update breaking compatibility with your mod. Then you'll have to worry about compatibility with existing mods.

It's just not worth it unless you absolutely love minecraft and aren't doing it for the money.
>>
>>52632095
I suggest you check what actually makes it slow first instead of randomly guessing and most likely wasting your time.
>>
>>52632095
Oh shit you're doing it by hand? If you're using Wordpress, there's a plugin that will optimize shit automatically for you on upload.
>>
>>52632052
Is that Sam Hyde?
>>
>>52632052
my tabs have always been 2
Also who fucking cares since my tabs will be whatever your prefered size is on your own machine
>>
>>52632052
He might be right in that it produces better code. But it's hard to get used to
>>
>>52632095
post site

maybe you have shitty plugins and javascript running somewhere. unless you have 100+ 500x500 images on the page, it shouldn't be slow.(unless the server is shitty)
>>
>>52632107
Filtered.
>>
>>52632156
>unless you have 100+ 500x500 images on the page, it shouldn't be slow.(unless the server is shitty)
This may very well be the problem. We have lots of big heavy images.

>>52632111
I'm looking at some perfomance detectors.

Thanks for the suggestion anons.
>>
>>52632204
>We have lots of big heavy images.
Display small thumbnails instead, then link to the full images elsewhere? Surely you aren't displaying the full res images? If the site is slow with a bunch of small thumbnails, then you need a faster host.
>>
>>52632105
I dunno. A couple years ago between school and looking for work I found an MC server which eventually got some ex military dude to join it. He literally paid $2500 every couple of months for in game money so he could outdo these other kids. I'm guessing people dont usually get that lucky?
>>
>>52632095
mozjpeg
>>
>>52632052
4
>>
>>52632095
dumbass you should have large high-quality pictures to help sell your shit

if you don't want it to be slow maybe don't use fucking wordpress you lazy faggot
>>
>>52632358
Eight fours long? Hm interesting.
#include <stdio.h>

int main (void) {
44444444puts("Hello, world!");
44444444return 0;
}

I dunno man.
>>
It's okay to have breakfast beer, right?
>>
Would starting to learn Python be smart move? I kind a want to know language that do work in web dev and also in system programming.
>>
File: 1440510109220.jpg (38 KB, 900x837) Image search: [iqdb] [SauceNao] [Google]
1440510109220.jpg
38 KB, 900x837
why does C++ compile lamda functions into functors instead of just a regular function?
>>
>>52632450
if you don't mind having a beer belly
>>
>>52632450
Only if you want to be an alcoholic.
>>
>>52632451
absolutely. just don't rely too heavily on python for the system programming part. there are better languages with less overhead for it.
>>
>>52632502
Like what?
Also, can Python be used as a replacement for PHP? Can it be embedded in HTML like PHP? If no, which languages can?
>>
File: 259520492304.jpg (101 KB, 960x720) Image search: [iqdb] [SauceNao] [Google]
259520492304.jpg
101 KB, 960x720
how many hip entrepreneurial programmer friends with their own multibillion dollar startups do you have?
>>
>>52632543
yeah, lookup the django framework
>>
/g/ are there any good reasons I shouldn't learn from books from library that are 5-7 years old?
I'm guessing that updating myself on syntax and techniques isnt the only issue here.
>>
>>52632552
How the fuck you get this pic? That's me over there! In my green hair year. Jesus, I look like a freak.
>>
File: mr2dx.jpg (242 KB, 2048x1365) Image search: [iqdb] [SauceNao] [Google]
mr2dx.jpg
242 KB, 2048x1365
>>52632552
>starbucks
>fedoras
>windows 8+ on laptop
>green hair
>that dumb as fuck table arrangement
>'programmers'

AHHHH
>>
>>52632552
looks like designers to me
well except the beard guy, and maybe the fedora too
>>
>>52632570
Are you the filthy iPhone swine?
>>
If I want a job in programming, what languages is best to learn?
Only know basic Java and c ++ atm, also where are some good websites to learn Java, all the ones I've been to moves at a slow pace or hasn't taught me much
>>
>>52632486

It's too late for that.

>>52632490

I mean.. the germans do it. It can't be that bad, right?
>>
/g/ are there any good reasons I shouldn't learn from books from library that are 5-7 years old?
I'm guessing that updating myself on syntax and techniques isnt the only issue here.
>>
>>52632607
>It can't be that bad, right?
The germans started 2 world wars. What do you think?
>>
>>52632602
Java has the most jobs, period.
>>
>>52632615
it depends
design principles are usually timeless, even though a better way to do some old thing are discovered every once in a while
just dont go with anything ancient like SICP
>>
>>52632602
Did you take it to the bar?
>>
>>52632619

fug :(
>>
>>52632602
java

https://docs.oracle.com/javase/tutorial/
>>
What would be a neat 2d platformer mechanic to implement? Something challenging..and new

I need to spice my game up
>>
>>52632691
You're on Jupiter therefore no jumping.
>>
>>52632691
Well before you start anything, you'll need a logo. I know a guy.
>>
>>52632585
no, programmers
one of them interns at google
it's not the beard guy
or the fedora guy :^)

>>52632567
>5-7 years old
>any reason not to
well, it depends on the technology
mostly, no
at least when it comes to C based langs, syntax/techniques aren't changed much, they are built upon for backward compat
e.g. for a specific technology like winapi - you'll see a lot of old sit from 20 years ago that's still there - not removed, built upon
>>
>>52632691
time travel
>>
>>52632699
there's no standing up on jupiter either. or being not-crushed by incredible atmospheric pressure.
>>
>>52632713
braid kinda already did that though
>>
>>52632691
Having control over obstacles in your way
>>
File: screen.1453816577.png (142 KB, 1600x831) Image search: [iqdb] [SauceNao] [Google]
screen.1453816577.png
142 KB, 1600x831
>>52632699
>no jumping
>on Jupiter

But if they were on jupiter, they'd fall through the planet

>>52632702
im half artist so i could do that myself

>>52632713
How is that specifically related to 2d platformers?

Webm-related
https://a.pomf.cat/dlqvae.webm
>>
>>52632717
and there are a million shitty platformers already out there too you know
>>
>>52632691
You have a gun that shoots balls with gravity fields
>>
>>52632691
scrap your shitty 2d platformer and make a necromancer game where you spend your time slaughtering paladins and partying with skeleton bros
>>
>>52632717
just make something like mario but add some simple gimmick.

portals
time travel - ala braid
ristars stretchy arms
duck tails pogo stick mechanic
Sanic physics and speed
time travel - ala sonic cd
N style physics

loads of other shit

or some mix of any of those, or something novel and new.
>>
>>52632744
although sorta related to this >>52632730 , i think that could actually work nicely.

You could make blackholes, low gravity or high gravity, depending on how long you charge the shot.

>>52632749
>necromancer game
too many people are already making those types of games m8
>>
>>52632707
>>52632653
Ajax from 07
>>
>>52632770
>too many people are already making those types of games m8
i honestly havn't seen a single one, let alone a good one
also are you really pulling that argument while making a 2D platformer out of all possible games?
>>
>>52632619
They didn't start the second one really. France and England declared war on Germany first. They just retaliated. :(
>>
>>52632796
>i honestly havn't seen a single one
trust me there's tons. there's like 4 that I know of right now which are being made right on /vg/

> are you really pulling that argument
The genre has nothing to do with it. Hell, it could be a necromancer 2D platformer. The problem is the theme
>>
>>52632829
Poor germany :(. All they wanted was to take over europe and kill all the Jews.
>>
File: 1453728004698.jpg (31 KB, 675x949) Image search: [iqdb] [SauceNao] [Google]
1453728004698.jpg
31 KB, 675x949
>>52631530
>geany is bloat
>>
>>52632878
Another quality post from a weeaboo.
>>
File: 1453717846020.png (548 KB, 516x685) Image search: [iqdb] [SauceNao] [Google]
1453717846020.png
548 KB, 516x685
>>52632935
Being this mad over pictures on the Interbutts.
>>
>>52632935
To be honest family, I'd rather have weebs posting than some tripfag talking about fucking beer.
>>
>tfw only know shit about opengl and game programming

I need to find a job, what do I need to learn to actually get at least a code monkey job?
>>
>>52632979
>Making an observation on the interbutts automatically translates to anger.
Whatever helps you cope with your pedophilia, buckaroo.
>>
Give me some must have packages for emacs. I am starting to use it but I am totally lost as where to find these plugins. Also why is there mulitple package managers (e.g. elpa,melpa)?
>>
>>52633014
Normie pls go
>>
File: ff.jpg (40 KB, 346x450) Image search: [iqdb] [SauceNao] [Google]
ff.jpg
40 KB, 346x450
>>52633010
why not get a job as a game programmer since you know game programming
>>
>>52632570
>thinking anyone would believe a female is in a /g/ programming thread
>>
>>52633019
ELPA is the official Emacs one, but you have to sign copyright papers and shit to get in (as do all contributors who change more than ~15 LOC), so most people put stuff on MELPA, which basically gets the latest snapshots from Github, BB and such.

Look here for interesting things:https://github.com/emacs-tw/awesome-emacs

Undo-tree is definitely a must have.
>>
>>52633045
>working in game industry as a programmer
No, why torture yourself with one of the worst jobs in the field?
>>
>>52632459
A lambda has to capture variables from the enclosing scope, which a regular function can't do.
>>
>>52633088
Is that from personal experience?

My friend interned at an AAA game dev company. Said it was one of the best experiences he ever had. In fact I got sick of his bragging. Made a shitload of money too.

I guess it's a terrible job if you work at a terrible company.
>>
>>52633045
I was looking into that, but most studios require years of having worked on AAA games and other industry experience. I figured I could get a regular old job and work on my sparetime at coming up with something semi impressive before I apply to those jobs
>>
File: 1426037411823.jpg (70 KB, 810x780) Image search: [iqdb] [SauceNao] [Google]
1426037411823.jpg
70 KB, 810x780
>>52633070
>2016
>thinking there are no girls on /g/
>>
>>52633071
Wow they have big list and many features for many languages. Thanks man.

>Enable installation of packages from MELPA by adding an entry to package-archives...
where is package-archives located?
>>
>>52629711
Looks like your game logic is locked to your framerate ala anything by Bethesda.
Not sure how to fix it, but thats what your issue is.
>>
>>52633139
>2016
>still not learned the rules of if you want to attention whore then post pics
>>
>>52633139
females cannot program.
>>
>>52633019
The meme
https://github.com/syl20bnr/spacemacs
>>
>>52633106
Game programming involves a lot of calculus, not every programmer can solve differential equations of second order in their mind and that's basically one of the requirements for any game programming job, so for most it's the worst job ever, but if you're good at math and can distinguish lagrange's polynomial from chebyshev's polynomial, it might be a good experience, otherwise no.
>>
>>52633019
moe-theme
>>
File: 1452106910605.jpg (85 KB, 324x324) Image search: [iqdb] [SauceNao] [Google]
1452106910605.jpg
85 KB, 324x324
>>52633163
Go on then. Seems like you're the one seeking attention here by putting on the "hurrhurr no gurlz on teh internets" spiel. <3
>>
>>52632570
proof?
>>
>>52633178
I'd wait until it's out of beta myself.

>>52633145
You're looking at MELPA's github, right? Just put that code there into your ~/.emacs or ~/.emacs.d/init.el (use one or the other as your init file -- I use the 2nd).
>>
>>52633221
>proof

it was bait anon
>>
>>52633184
I thought it was mostly linear algebra unless you're working on physics stuff?
>>
File: 1429017313721.png (239 KB, 512x512) Image search: [iqdb] [SauceNao] [Google]
1429017313721.png
239 KB, 512x512
>>52633019
to boost your productivity by ten folds:
nyan-mode

for git management:
magit

for high quality c/c++ auto completion (needs clang):
irony-mode + company + company-irony
>>
I'm learning Common Lisp. Eventually, I'd like to make games with it.
>>
>>52633246
>unless you're working on physics stuff
true, but a lot of games can require physics stuff, even the most basic of genres. of course, there's frameworks that mostly handle that like box2d and such, but its definitely a good idea to know how to do it raw.

for example I had to use calculus(verlet integration) to move the hair >>52632731

box2d would have been too much overhead and doing it manually gave me more control
>>
>>52633268
(L(O(L)))
>>
>>52633166
>current year
>falling for the "females can't program meme"
>>
>>52633184
it depends. if you're doing everything yourself you'll be doing those things but a normal company is going to use an engine or have dedicated engine devs and plenty of programmers won't have to deal with physics and "heavy" math.
>>
>>52633229
I only have .emacs file and .emacs.d folder but not init.el inside it so I guess I'll have to use .emacs.

>>52633263
Good to know. I will work more in Python for now.Do I need anything for it?I also used Geany for Python,its very fast and built in terminal for instant results is cool feature.How do I run Py code from Emacs? C is my old love but I didn't work with it for years.
>>
>>52633345
for a good python editor, look at spyder.
>>
>>52633322
they can use html/css, MAYBE some javascript.

but anything beyond that is out of the question.
>>
>>52633345
You'd have to create the init.el yourself, but it doesn't matter which one you use (init.el is more tidy IMO).

Doing M-x run-python starts a basic interpreter. Searching google for python+emacs will turn up more stuff.
>>
>>52633369
>he did it AGAIN!
>>
>>52633425
prove me wrong and i'll be happy to change my mind.
>>
>>52633369
I work with a chick who does web design. html, css, php, mysql shit like that. Makes some nice looking stuff too. But I've never met a chick who actually program-programs.
>>
>>52633304
The hardest part is knowing that emacs is the best editor for lisp, but stubbornly sticking with vim and slimv anyways
>>
>>52633440
https://github.com/freebsdgirl/
DONE. (e)Qual-i-ty.

>>52633451
Vim is awesome, that's why.
>>
>>52633451
Why the fuck would anyone use vim in 2015?
>>
>>52633440
Grace Hopper? Adele Goldberg?
>>
>>52633246
Well, programming a game is basically simulating a real world environment, so it's 90% physics and you need to be good at math.
>>
>>52633465
See >>52633461 and your nearest calendar.
>>
>>52633477
Both trannies
>>
File: kill me.png (298 KB, 2271x2380) Image search: [iqdb] [SauceNao] [Google]
kill me.png
298 KB, 2271x2380
>preparing for interviews
>>
>>52633477
>>52633461
>original argument is no girls on /g/
>on /g/

>>52633139


show me a female programmer on /g/
>>
>>52633498
The argument was actually 'females cant program'.
>>
File: psql.png (98 KB, 1278x778) Image search: [iqdb] [SauceNao] [Google]
psql.png
98 KB, 1278x778
I was reading postgresql docs and wanted to try out the text search things.

http://www.postgresql.org/docs/9.5/static/textsearch.html

So I wrote a quick script to grab 4chan posts and fill a database.

They're kinda neat, would need to be fitted to a particular set of data though.
>>
>>52633505
it branched off into 'females can't program', but the original argument is related to /g/, since that's how it literally started, with the image.
>>
>>52633498
me, hi
>>
>>52633406
Ok thats fine too I guess. So there is no way to have hit F5(or whatever) to show me output in terminal or interpreter at the spot?
>>
>>52633526
mtfs dont count
>>
>>52633556
They should just be purged, tbqh.
>>
>>52633556
why not? the brain is the organ responsible for programming and mtfs have physically female brains
>>
File: cool dog.jpg (70 KB, 500x500) Image search: [iqdb] [SauceNao] [Google]
cool dog.jpg
70 KB, 500x500
>>52633526
sup bby

show me that female crafted code
>>
>>52629675
>What are you working on, /g/?
Pic
>>
File: a ruff victory.jpg (65 KB, 500x368) Image search: [iqdb] [SauceNao] [Google]
a ruff victory.jpg
65 KB, 500x368
>>52633577
>>
>>52633577
promise not to laugh?
>>
>>52633574
MTFs aren't women, they're deviant men. They have a disorder. Nothing wrong with that, but let's not kid ourselves here.
>>
>>52633581
>TeX
not even once
>>
>>52629878
>because Postgres can't into scaleout
lol that's literally what Postgres was made for.

congrats on your startup, but you need better engineers, obviously.
>>
>2016
>not identifying as a MTFTM double-trans lesbian
>>
>>52629878
>Cassandra, because Postgres can't into scaleout

You literally fell for a meme
>>
>>52633612
It is de facto in CS publications, also it is really nice to work with.
>>
>>52633655
I know, I write my assignments in them. Which is also why I know

>not even once
>>
>>52633681
>not even once
>has used it more than once
I don't get it... ?
>>
>>52633533
Sure there is. I haven't really used Python for a while, but with default Emacs C-c C-c starts a Python process with the current buffer as input.

This might help: http://www.jesshamrick.com/2012/09/18/emacs-as-a-python-ide/
>>
>>52633703
its a figure of speech anon
>>
>>52633703
It's a meme ya dip.
>>
>>52633604
>female brain
>not a woman

ok.jpeg
>>
>>52633769
I don't understand, is biology not a mandatory class in the US? Or are you just an ass-blasted regressive?
>>
>>52633769
Apparently you don't know how chromosomes work.
>>
yeah.
www.github.com/scharlatan
>>
>>52633769
>female brain
You can inject as much female hormones and shit you want anon, but it aint gonna change your genetics.

>>52633802
>>52633805
>US
>biology
They literally teach that God created the universe 6000 years ago in a bunch of states in the US.
>>
>>52629675
Please stop this programming trap meme.
Thanks.
>>
>>52633722
Thanks man I am so relieved that its just needs C-c C-c to invoke intepreter and show me output at the spot.
>>
>>52633805
what do chromosomes have to do with programming? doesn't matter if you are XX or XY, male and female brains are different and the brain is all that matters when it comes to programming

>>52633847
post-natal, hormones have nothing to do with it
>>
>>52633885
I guess I misinterpreted you, I thought you were saying if a man has the 'mind of a female' then they are men. In which case you are a faggot and I am a magical elephant.
>>
>>52633885
>talking about differences in male and female brain
>talking about postnatal period
>"hormones have nothing to do with it"

>what do chromosomes have to do with programming?
Testosterone is good for developing gray matter, anon-kun

>male and female brains are different and the brain is all that matters when it comes to programming
You don't think genes and hormones/hormone production have anything to do with the brain?
>>
https://github.com/siddharthasahu/automata-from-regex
anyone here ever used that?
it says it's missing graphviz, but it is installed
>>
>>52633950
>it says it's missing graphviz, but it is installed
are you sure
computers dont lie
>>
>>52634007
huehue
yes
but I just noticed it might need python 2.7
I have the 3.5 installed
>>
Is anyone familiar with the NNTP standard or newgroups in general?

I need to find the most recent article in a group, but the "reported high water mark" (i.e. the most recent article) is incorrect; it's off by a day or two. Is it normal to get an incorrect number?

I can even see articles above that number, i.e. if the article is number n, I'm able to view article n+1 perfectly fine.

Am I just supposed to keep going upwards until I reach a non-existant article?
>>
I have just seen a random job on freelancer , it had 20 indian bidders , 10 pakistanians, 3-4 bangladesh and one romanian.
Their pictures are each a meme of its own.
This world is fucking crazy, internet is the most cancerous thing seriously.
>>
>>52634052
ah yes I really need 2.7 to run it
fuck python and their cancer version management
>>
File: 867424.jpg (7 KB, 250x250) Image search: [iqdb] [SauceNao] [Google]
867424.jpg
7 KB, 250x250
>>52634150
>>52633950
>https://github.com/siddharthasahu/automata-from-regex

kek
>>
>>52634218
https://www.freelancer.com/u/joshiprakash.html?ref_project_id=9471111

https://www.freelancer.com/u/qazi03.html?ref_project_id=9471111

https://www.freelancer.com/u/nadeem092.html?ref_project_id=9471111 (personal favourite)
>>
File: 1438018218504.jpg (18 KB, 310x392) Image search: [iqdb] [SauceNao] [Google]
1438018218504.jpg
18 KB, 310x392
>>52634218
>>
>>52634121
Nevermind, I'm fucking retarded.
>>
>>52634278
>joshiprakash
Software developer
I am very ethical person and believes in smart work. and like to work against challenges. always ready to accept the challenges in my field.
>>
File: profile_logo_.jpg (20 KB, 280x279) Image search: [iqdb] [SauceNao] [Google]
profile_logo_.jpg
20 KB, 280x279
>>52634278
>This guy walks into a bar and slaps your girlfriends ass, whispering CLIENT SATISFACTION in her ear
what do?
>>
>>52634288
Were you checking the low water mark?
>>
>>52632691
>2d platformer
Just don't
>>
>>52632052
Kerneldoc says use tabs, but tabs should be displayed as 8 spaces.
You can display things however the fuck you like in your own editor, all it means is that you have to keep within 80 chars/line assuming some people will be using 8 space tabs.

This is pretty logical since most terminals default to 8 space tabs, and wrapping lines in terminals is fucking hideous.
>>
File: 1432235603229.png (1 MB, 1964x1432) Image search: [iqdb] [SauceNao] [Google]
1432235603229.png
1 MB, 1964x1432
>>52634897
>programming in a terminal
>current year
>>
>>52635029
>What is grep
>What is diff
>What is cat

Nobody is saying you have to do it, but others do and would rather you don't fuck up their workflow.
>>
>>52635029
Windows scripter detected.
>>
Do u gys think a book for ajax from 2007 from the library is dated? I cant afford from anywhere else over 40 dollars ( a good book)
>>
>>52635125
Damn it pajeet just google the book and read it online.
>>
File: Gentoo.png (7 KB, 720x400) Image search: [iqdb] [SauceNao] [Google]
Gentoo.png
7 KB, 720x400
>>52635029
>he doesn't program in a minimal installation of Gentoo
>>
>>52635152
>he fell for the install gentoo meme
>he fell for the D meme
>he fell for the shittiest curly brace style meme
>>
>>52635152
I like the font, let's see some letters that normally look ugly with fonts
oO0iIlLjmn1
>>
So I'm sitting at my xterm in KDE hacking some kernel code, and this bitch comes up to me and says "Do you know which of these computers runs Windows?" Well that d it. I flipped up my shades and looked her straight in the eye and said "Fuck no I'm open source bitch". I picked up my 10 lb IBM Model M keyboard and said "I can kick your ass at 120wpm" and broke it over the cunt's head. She dropped to her knees and I kicked the jewel case out of her hand and into her teeth. Next I grabbed her by the neck and said "How's your uptime" before suplexing her backward through the air and into the server room. Some smoke that smelled like burning hair started to drift out so I jumped on my razor scooter and rode off into the sunset.

what're you working on /dpt/
>>
>>52635132
Ive already read 2 books on my computer screen, it hurts my eyes Michael.
>>
>>52635239
Python
>>
File: GentooSF.png (9 KB, 720x400) Image search: [iqdb] [SauceNao] [Google]
GentooSF.png
9 KB, 720x400
>>52635174
What can I say, I'm a meme man
>>52635176
They're all in here somewhere
>>
>>52633440
https://github.com/glfw/glfw
>>
File: 1.png (72 KB, 697x455) Image search: [iqdb] [SauceNao] [Google]
1.png
72 KB, 697x455
i made a minimal flash player because adobe's suck. just need to figure out where to add volume button and it's done
>>
File: 36a5974.jpg (9 KB, 200x200) Image search: [iqdb] [SauceNao] [Google]
36a5974.jpg
9 KB, 200x200
>>52635321
>https://github.com/glfw/glfw
>Camilla Berglund
>pic
That's a dude, 100%.
>>
>>52635372
Nope.
>>
>>52635393
Are you he himself?
>>
>>52635440
I'm a she ;)
>>
>>52635372
this

i've seen dudes more feminine than that
>>
File: noire.jpg (16 KB, 200x303) Image search: [iqdb] [SauceNao] [Google]
noire.jpg
16 KB, 200x303
>>52635321

But really, any girl who is actually a decent programmer doesn't tell anyone their gender online.
The only people who are bothered by the "girls can't into program" maymay are those who keep being told they are shit.

They're under the impression it's just because their female, but actually their code is just shit and everyone is brutally honest about it.

Software people are like tiles on a roof, nobody fucking cares what you look like or what you're made of until you start pissing water everywhere.
>>
>>52635321
none of the names in the list of acknowledgements look like they're the name of a female
>>
>>52635343
CVE when?
>>
>>52629675
Fuck you pedo trap OP
>>
File: 2n1IBkC.jpg (474 KB, 1920x1080) Image search: [iqdb] [SauceNao] [Google]
2n1IBkC.jpg
474 KB, 1920x1080
Roll em if you got em
>>
Im a female /g/ :D
>in AP comp sci class
>mainly went into AP to learn java cuz >i love minecraft
Was wondering if any comp sci majors could tell me what jobs are available if i major in comp sci
>i plan to major in this but would like
>to know what jobs are out there
>>
>>52636026
HOW BIG IS YOUR DICK
>>
>>52636026
You have to be over 18 years old to post on 4chins.
>>
>>52636026
>mainly went into AP to learn java cuz >i love minecraft

Minecraft is from the finest shitcode that only javists can produce.
>>
File: domo arigato.jpg (80 KB, 600x549) Image search: [iqdb] [SauceNao] [Google]
domo arigato.jpg
80 KB, 600x549
>>52635992
>>
>>52629675
How hard would it be to write an app that does this equation for me.

(Leverage)pips = (risk)(account)

I would enter in the pips, risk amount, and account size and then it would tell me how much leverage I can use.

I found an app for this but I didn't like the way it gives the answers.
>>
I'm working on a hostile takeover of a company i literally developed all the software for from the ground up.
Literally all my code, no frameworks or anything.

>tfw got laid off for idians
>tfw the idians literally couldn't figure out my heavily documented code
>got offered $50 to teach them
>site is still unchanged after a year except minor frontend shit
>they started to franchise
>tried to get me to sign a document releasing my code to them, i refused

finally got a lawyer in tow who's on my side.

hoping to sue for a massive amount or the company as a whole, since technically without my code the service as a whole literally would not exist today.

They still use my code for day to day business operations, this code also interfaces the mobile apps and everything as one functional unit.

She just started going over my case, going to learn about my options soon.


Daily reminder to write/agree/sign some kind of contract with your employer.

2016 is starting off very promissing.

Going to be running a company by the end of the year one way or another.
>>
Hey dpt when in C I memcpy a string to a malloc pointer why does it work despite the size of the string being > than the malloc ammount?

>>52636191
Just make something that asks the user the value and then reads from the command line and passes it to a variable, its trivial stuff you can do it in an afternoon with C#/python/etc being your 1st language and your 1st programming project.
>>
>>52632552
I think my friend may have started with uber early on
>>
>>52636302
>Hey dpt when in C I memcpy a string to a malloc pointer why does it work despite the size of the string being > than the malloc ammount?
I'm guessing malloc finds a space in memory where your specified contiguous amount of allocated memory can fit. Putting something larger in there will just override what's after in memory, if there is anything after that in memory
>>
>>52636341

Oh, ok.
Thought that was it, but didn't knew what to search for.
>>
>>52633369
Why do you guys think that is?I thought women were naturally better with language skills and just as good with math as males?
>>
>>52636302
>memcpy a string
What the fuck is strcpy?
>>
>>52636477

I am storing stuff inside a memory pool, stuff like but not limited to:
>ints
>char arrays
>structures
>>
>>52636302
Which language should I use?it would like to use it on my windows pc and also my android phone.
>>
>>52633938
>You don't think genes and hormones/hormone production have anything to do with the brain?

They have a point as sex differentiation occurs before birth. Genes have a limited effect after birth, things like dementia, but most genetic disorders of the brain are set in stone before birth. Gender dysphoria is not a genetic disorder.
>>
>>52636420
>just as good with math as males?
On average, not actually IIRC. Poorer analytical skills on average, but not by much. But it's mostly just an interest thing. Not many girls want to be a programmer when they grow up.

>>52636191
Not hard at all for someone who knows how to program. You could probably put this up on a bounty site for $50 and have someone complete it by the end of the day.
>>
>>52636477
memcpy is safer and faster unless you meant strncpy
>>
>>52636535

For windows C# will get you what you want.

You could write it in python/lua and run it on windows and on android using termux(probably) so you dont have to write things twice.
Both are very simple languages suitable for first times.
>>
>>52633938
the smartest female i know works on more /g/ related shit than /g/ itself.

I'm talking about ASM and embedded development, shes an EE major with a minor in CS.

Gender has absolutely nothing to do with the field you will end up with in life.

the only people preventing women going into STEM is literally fucking women thinking that they can't go into it.
>>
Working with the 3.4 package unchanged from install for python(No additional modules or packages installed)

How do I manipulate sqlite3 query results as integers?

I know it's probably basic stuff, but that's the joys of having a shit teacher throughout high school.
>>
File: image1.jpg (81 KB, 880x570) Image search: [iqdb] [SauceNao] [Google]
image1.jpg
81 KB, 880x570
>>52636606
>On average, not actually IIRC

Yes actually. There are more men better than women at math, but there are also more men worse than women at math. When it comes to averages they balance out.
>>
File: 1453653436556.gif (3 MB, 899x603) Image search: [iqdb] [SauceNao] [Google]
1453653436556.gif
3 MB, 899x603
Sokoban's going well
>>
>>52636606
A bounty site? I never heard of this before. I've had a few ideas for apps before. What happens if someone just mark Zuckerbergs me?

Also, which sites are preferred for this kind of thing?

>>52636613
Thanks I like the idea of doing it myself but I also like the idea of paying a mercenary to complete this mission for me in an timely manner
>>
>>52636726
thank you for posting qt :3
>>
>>52629831
show name?
>>
>>52636730

Well my 1st project was something very similar(calculating support and resistance based on the average previous swing) and I did it in an afternoon with C# being my 1st language and it being my 1st program.
I still use it to this day.
>>
>>52636717
This is so weird because I've always thought that was true since I was in elementary school. To me it seemed like there were a lot of guys who were way slower than most of the girls.

But it also seemed like the smart males were quite a bit smarter than most of the girls and smarter than the smart females too
>>
>>52629675
How do I be a good programmer?
I only know C.
>>
>>52636761
Secret Princess Himegoto
>>
File: 1453653439712.jpg (172 KB, 1291x603) Image search: [iqdb] [SauceNao] [Google]
1453653439712.jpg
172 KB, 1291x603
>>52636746
no problem mate, I've been busy
>>
>>52636777
I like you. How did that turn out for you are you still trading? You sound like a lucky guy.
>>
>>52636809
Is the secret that she has a feminine penis?
>>
>>52636819
yup, although I've moved towards making my own models after that.
Currently doing a pattern database.
>>
>>52636883
Pattern database? I know about some patterns but are you trying to make an indicator or something that uses price action patterns?
>>
>>52636215
i'd fire someone who doesn't make use of frameworks too
>>
hey guys what are some programming books that a beginner programmer should pick up
>>
>>52636606
>Not hard at all for someone who knows how to program. You could probably put this up on a bounty site for $50 and have someone complete it by the end of the day.

Only finding sites related to dog the bounty hunter on google
>>
How the hell do you compare streampos against each other?
>>
>>52637042
SCIP
>>
>>52636952
The thing about indicators is that they dont really work, so the pattern database looks at a ton of markets simultaneously and goes from there.
>>
>>52636726
If I see this dumb bitch one more time I'm gonna find you and delete your entire picture folder.
>>
File: 1453653439709.gif (3 MB, 880x603) Image search: [iqdb] [SauceNao] [Google]
1453653439709.gif
3 MB, 880x603
>>52637218
>>
>>52637241
ON MY WAY BITCH, BETTER HAVE BEER IN THE FRIDGE AND FEAR IN YOUR EYES
>>
>>52637098
Yeah, was just curious about what kind of program you're working on. Indicators tell you what happened, while price action whispers what's going to happen next.
>>
>>52637279
YOU BETTER LIKE PERONI CUNT
>>
>>52636606
Found this free lancer site is this a good one? Is 50 usd reasonable for something like this?
>>
>>52637317
Yeah that sounds good.
Should I bring like.. Chips or something
>>
>>52634627
The latest post was part of episode 4 (of some show), which was released minutes before I checked. I was completely retarded, in that I looked up the show on an online indexer, and saw that episode 3 had aired a day before (I thought I was looking at the same post).
>>
>>52637366
yeah family, I could do with some curry or tartare sauce for it, feeling exotic to be honest
>>
File: 1445468849306.jpg (296 KB, 900x900) Image search: [iqdb] [SauceNao] [Google]
1445468849306.jpg
296 KB, 900x900
>>52635992
Rolling.
>>
>>52637392
I'm Canadian so I'm actually just gonna bring poutine and pucks.
>>
>>52637423
sounds good either way mate, never tried poutine but it looks delicious
>>
>>52637303

Just give a shot at programming, you'll find yourself freed from depending on others to implement your ideas.
>>
Let's say I have a database table. It is defined as follows:

column VARCHAR name
column VARCHAR highscore


I have not defined a primary key.

This database collects user highscores over the span of twenty years.

Will I be able to retrieve the highscore of users inbetween two dates?
Will I be able to sort the rows by the order in which I added them?

Is a timestamp column always necessary to make this possible? I know an autoincrementing integer ID will make that possible, but will I still be able to set two dates and get the results inbetween them?
>>
>>52637447
Maybe one day. But right now I'm more interested in trading. And trading comes a lot easier to me than learning to code.
>>
>Converting cpp to c
>cpp code uses templates and shared pointers and automatic reference counting
What should I do?
>>
What's the beginner's choice to start learning programming software/language? I've looked around with google but since different opinions are everywhere I'd like to read it from you. If it's relevant, I'm starting a programmer analyst course and I'd like to start the basics now that I have free time.
>>
>>52637465
No. Keep a date field. Even if sql somehow kept track of when you inserted the rows, youd want a date field because you'd lose that data when you migrate your table.
>>
File: DB5uP44.jpg (37 KB, 450x365) Image search: [iqdb] [SauceNao] [Google]
DB5uP44.jpg
37 KB, 450x365
WATER IS FUCKING WET
http://www.zdnet.com/article/minecrafts-new-education-edition-written-in-c-will-outrun-the-java-version/
>>
>>52637877
who would have fucking guessed
>>
Can anyone here help me with some java streams and lambda expresssions ?


public static void printSumElements(List<Integer> list) {
int x = 0;

//TODO how the fuck does this work
/**
* 1. loop over the array
* 2. add every int to the totalsum
* 3. print result
*/
list.stream();


System.out.println(x);

}

this is how I want it to work but I have no idea how to do that only with lambda and streams

Any help appreciated
>>
>>52637799
>Even if sql somehow kept track of when you inserted the rows, youd want a date field because you'd lose that data when you migrate your table.
Good point.
>>
>>52638044
>>52638044
>>52638044
>>52638044

NEW
>>
>>52638008
something along the lines
[/code]foreach(int a : list) {
x += a; // do you mean x by totalsum?
}[/code]
why lambda? streams?
what do you want to do?
explain
>>
>>52638069
fuck me
-/
>>
>>52638069
>>52638084
well we have to use lamda and streams because its an assignment and your proposed way is obviously streaight way to the solution but I gotta use lambda
>>
>>52638108
well if it's an assignment you should probably do that on your own :^)
>>
>>52638122
yeah sure I dont wan a complete solution but I could use a hint how I could do it
>>
>>52638069
He wants to do something like this:
int x = list.stream().mapToInt(listElement -> listElement.intValue()).sum();

System.out.println(x);


This is from memory, it may be wrong. You may also do it in one statement, but I'm not sure if his homework wants that.
>>
>>52638146
im confused my list already consists of integers why do you maptoINT ?
>>
>>52638164
Because I don't think
list.stream().sum()

would work.

anyway just google it, I've done enough.
>>
>>52638164
https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html
>>
>>52638164
>>52638146
>>52638197
thanks mate, appreciate it
lambda expressions and streams are just pretty new to me
cheers man
>>
>>52638211
Now please read what the other anon posted.
I only helped because they confused me to start with.

Trust me, literally the only thing you can do to fix yourself is reading and writing lambdas.

Do it.
>>
>>52638229
will do
>>
>>52638008
>>52638069
Sorry I'm idiot, but ANYONE tell me for what are lambdas good?
>>
>>52638588
lambdas are ugly as fuck imo, they are hard to read too.
>>
>>52638631
Aaaah, so obfuscation?
>>
>>52638654
well for me that is.
Thread replies: 332
Thread images: 41
Thread DB ID: 475747



[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | 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.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.