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

/dpt/ - Daily Programming Thread

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

Thread replies: 324
Thread images: 39

File: DPT.png (389KB, 934x1000px) Image search: [Google]
DPT.png
389KB, 934x1000px
Old thread: >>60841126

What are you working on, /g/?
>>
C++ cannot enumerate foreach. It's been HALF A FUCKING CENTURY LMAO
foreach(index, number; numbers) 
if (number == some_value)
return index;
>>
>>60847291
Who really cares? C++ is garbage anyway, and you shouldn't be using it.
>>
>>60847291

Which languages enumerate in foreach loops?
>>
>>60847326
C#, D and Rust, top of my head
>>
>>60847326
Python
>>
Nim can do it too
>>
So does Chapel, and fucking Go lol
>>
>>60847291
haskell
head . dropWhile (/=some_value) $ numbers

lisp
(find some-value numbers :test #'=)
>>60847326
>foreach
map is better desu
>>
Isn't the whole point of foreach that you don't care about the index and are just abstracting it away? It's like using a reference because you don't like pointers and then complaining that you can't do pointer arithmetic on it.
>>
>>60847350

C# documentation tells me you need to manually maintain a counter variable.
D just appears to support it naturally, for plain arrays at least, which is kind of magic. Good job, D.
Rust makes you explicitly call an enumeration. Could use the same pattern in C++.

>>60847411

Not if the indices matter, which is the whole point of this exercise.
>>
>>60847411
I know map is better but what do remember C++ is an OOP language
>>
File: cats.webm (2MB, 1280x720px) Image search: [Google]
cats.webm
2MB, 1280x720px
Working on a wayland compositor backend. It's still just drawing cats.
Video of a screen, because it currently has no way of screenshotting or recording yet.
>>
>>60847291
This is retarded.
Why would you use foreach when you're trying to find an element.
for-each implies do something with each item, most likely IO
finding an element in a list or array should be a standard library function
>>
>>60847434
nice work anon
>>
>>60847434
Are you the C-fag I jabbed at for using C?
>>
>>60847444
Yes, probably.
>>
>>60847439
>for-each implies do something with each item, most likely IO
foreach(index, line; lines)
writefln("%ds\t%s", index, line) ;

Guess what this does
>>
>>60847467
>frog
nope
>>60847463
then use a for loop, lmao
for (int i = 0; i < array.length(); i++)
{ System.out.printf("%ds\t%s", i, array[i]);
>>
>>60847489
Ugly and disgusting. Why not use a fucking while loop then?
>>
>>60847291
>>
>>60847489
>for (int i = 0; i < array.length(); i++)
> { System.out.printf("%ds\t%s", i, array[i]);
And people hate rust, perl, Haskell and PHP for too many syntax and symbols
>>
File: 1409519933871.jpg (10KB, 375x375px) Image search: [Google]
1409519933871.jpg
10KB, 375x375px
for element in list:
index = list.index(element)
>>
>>60847427
I'd just like to interject for a moment. C++ is a multi-paradigm language with a heavy emphasis on object-oriented programming, and it is trivial to implement map in C++.
>>
>>60847529
C++ is literally C + Objects lmao
>>
>>60847529
>Blah blah blah C++ support POO blah blah
So basically, it's shit.
>>
>>60847535

>anon actually believes this
>>
>>60847496
Dude, printing the index of an array item is trivial and having a special construct for it is retarded.
The only pros is that you saved some chars from being written.
>>
>>60847545
Not just for supporting OOP, because of the fact that OOP is supposed to be C++'s essence. B*arne created C++ for OOP programmers
>>
>>60847496
Because in a while loop it's easy to forget to increment the counter.

>>60847535
And templates, and function overloading, and default arguments, and non-nullable references, and namespaces, etc, etc.

>>60847545
Virtually every language supports OOP though.
>>
>>60847563
My point is that if you are going to have a foreach loop, make a real foreach loop, not a neutered down half assed for loop.

I bet C++ foreach loops can't have custom index increment and reverse looping. It's there just as a placebo
>>
>>60847535
you are looked down on by C++ devs
>>
>>60847569
Why not just use J*va then lol?
>>
>>60847596
C++ devs are on the bottom on the barrel

>>60847598
Who the fuck knows, C++ is for POO programmers that think they are too smart for Java
>>
>>60847588
>templates
C++ templates are shit. Massive bloat, undecidable parsing, shitty syntax, terrible errors.
>function overloading
Useless and shit.
>default arguments
Useless.
>non-nullable references
C++'s invisible references are a fucking travesty, and encourage invisible state changes. NEVER use C++ references, or even C++ at all.
>namespaces
Also useless.
>>
>>60847535
LOL fucking retarded rustfag, you're fucking deluded if you think you're convincing anyone to switch from C++ to rust, and now you've shown your absolute incompetence by claiming that C++ is an OOP language and that it's "C with classes"
>>
>>60847589
You're right, why the fuck did they even add that half assed construct.
>>
>>60847614
I'm not convincing you to use Rust and neither I use Rust myself. But I do believe C++ is worse than Rust
>>
>>60847291
C#
var ind = MyList.IndexOf(MyList.Where(x => x == SomeValue).First())
>>
rust can't do this

for(auto &item : std::as_const(vec))
>>
File: 1497017864003.jpg (113KB, 640x658px) Image search: [Google]
1497017864003.jpg
113KB, 640x658px
Went from Java to C++
Are there any good guides on how to into pointer vs value assignment? I have a pretty good textbook but its either really lacking in that regard or I'm a dumbass, frankly probably both.
>>
>>60847629
>std::as_const
PUKE
>>
Wrote a little snippet of code on my phone while waiting for commencement to end...

https://pastebin.com/QD4CdThP
>>
>>60847627
holy shit, kill yourself
>>
>>60847626
C++ is the epitome of garbage, no language, not even Java can be worse than that shit
>>
>>60847629
Yes it does
fn main() {
let vec = vec![2, 3, 5, 7, 11];

for &v in &vec {
println!("{}", v);
}
}

>std::as_const
AHAHAHAHAHAHAHAHAHHA
>>
>>60847636
t. pajeet
>>
>>60847621
C++ has a history, tends to create half assed implementation of things, a few decades pass and everyone rushes on to finish the implementation
>>
>>60847654
I don't use POO language
>>
>>60847642
>Programming on a phone
That sounds fucking awful.
>>
>>60847426
>D just appears to support it naturally, for plain arrays at least, which is kind of magic. Good job, D.
Java goes further and allows you do use lists or regular arrays. Which is shocking for Java to do something well.
>>
Ruby must be so slow lmao.
>>
>>60847685
C++ is worse than Java
>>
File: Screenshot_20170610-174540.png (106KB, 1080x1920px) Image search: [Google]
Screenshot_20170610-174540.png
106KB, 1080x1920px
>>60847670

I'll do you one better: I used Vim.
>>
>>60847685

No, Java works the same way as C++ and (as far as I can tell) C#. There's no automatic way to get the index in a Java foreach loop.
>>
>>60847698
Do you have a physical keyboard on your phone or maybe a little bluetooth keyboard?
Otherwise that's just masochistic.
>>
>>60847627
At that point you might as well just do
int i = 0;
foreach(/*...*/) {
// ...
i++;
}

>>
>>60847291

std::for_each
>>
>>60847644
Oh yeah. There is an easier way
var ind = MyList.IndexOf(SomeValue);


Too clever for my own boots, thanks anon :)
>>
>>60847720

Nah. Just hackers keyboard. But I mean... I was REALLY bored. Anyways, I think it's time I can blow this pop stand. The baccalaureates just got their degrees, so this shit is over.
>>
>>60847765
That's even uglier and shittier, anon
>>
>>60847765
>2 foreach loops
keke
>>
>>60847772
yfw >>60847764 is still shorter and FAR more efficient than your 'clever' solution
>>
File: 1374576817989.jpg (4KB, 190x190px) Image search: [Google]
1374576817989.jpg
4KB, 190x190px
>>60847772
>>60847627
>>60847525
>O(n^2)
>>
>>60847772
>O(n)
>>
>>60847788
>>60847794

everybody is stupid except for me
>>
>>60847818
Yes now head to >>>/plebbit/
>>
>>60847818
they just have a bad habit of pretending to be retarded for the attention
>>
>>60847831

If you learn C++, maybe I will.
>>
>>60847849
I don't use windows and I don't intend to. I'd rather learn and use Java over C++
>>
>>60847764
The code snippets resolve to the same thing to the compiler, just depends if the codebase you're working in prefers linq or loops and if you care about the minor extension-method overhead.

You would actually space out the Linq version a little better in production environment

var ind = MyList.indexOf(
MyList.Where(/*..*/)
.PipeLine2()
.PipeLine3()
.First()
);


with single pipeline code the foreach will always be easier, with multipipeline it becomes a proper question to ask
>>
>>60847806
>muh "look mom, i can do it in one line"
>meanwhile it bumps up the complexity by a factor of n
>meanwhile it actually has more writing than if you were to just keep track of the number like a sane person who doesn't have a myopic fixation over LoC
>>
> (define add1 (lambda (x) (+ x 1)))
> (add1 0)

I started learning Scheme last week and have been really enjoying it.
>>
File: 1412011173618.png (418KB, 480x650px) Image search: [Google]
1412011173618.png
418KB, 480x650px
>>60847765
>Duplicate functionality: the language
>>
>>60847806
for i in lst:
for k in range(len(lst) + 1):
j =lst[k]
if j == i:
index = k
>>
>>60847872

Yes, that's C++ in a nutshell. Unavoidable, really.
>>
>>60847870
Wait till you find out how inefficient it is.
>>
>>60847866
>The code snippets resolve to the same thing to the compiler
I don't know anything about compiler optimizations but I'm having a hard time believing that the compiler is smart enough to figure that out. Got any source/proof? eg: have you tried writing those different code snippets and gotten the same CIL?

Even still, my way is easier to read because it doesn't try to be cute, and it's expressed in fewer characters.
>>
so I'm thinking of making a simple bittorrent client in Rust. kinda meh huh? would that be at all impressive on a resume? I have no original ideas, I know there are tens of thousands of amateur shitty bittorrent programs out there. I'm not applying to big companies, I just need something that shows I know basic programming concepts and can learn.
>>
How does one know when its okay to be inefficient.
For example, I'm using a higher level language, and I'm wondering if its okay to do things that traverse a list at least 6 times per call.
>>
>>60847947
>I have no original ideas,
Write a window manager for wayland
>>
>>60847627
>>60847866
You can go on about this stupid shit all you want, but it's note even correct.
[10, 20, 30, 20, 40]
1: 10
2: 20
3: 30
2: 20
5: 40
>>
>>60847972
>note
not*
>>
Is there a lazy lisp out there.
>>
>>60847872
meanwhile, rust omits basic functionality like C-style for loops, and delusional rust users expect it to replace C and C++
>>
>>60847990
Probably because Rust has a foreach loop that's not a shitty placebo (like C++)
>>
>>60847990
D's foreach loop is a flagship loop. It nullifies the usage of classic C99 for loops
>>
>>60847921

> Even still, my way is easier to read because it doesn't try to be cute, and it's expressed in fewer characters.

> with single pipeline code the foreach will always be easier, with multipipeline it becomes a proper question to ask

Reading comprehension.

I googled for my source but couldn't find it. The CIL will be different due to extension method overhead. Native foreach will always be quicker than extension method way. There's never been a case where I've cared about CPU time optimisation and I CERTAINLY don't care about space-on-disk optimisation for the code since the run time environment and assets take a dump on the small amount my code adds.
>>
>>60848013
>D
Literally nobody cares. Why did you even bring that irrelevant shit up?
>>
>>60847990
Rust has a good macro system unlike C. You can literally emulate C loops if you want to
>>
>>60848023
Sad that your "relevant shit" is worse than the irrelevant one?
>>
I can't stand not knowing how things work under the hood.
I think I should learn C.
>>
>>60848042
ASM*
>>
>>60848042
Yes, but you should also learn an assembly language.
>>
>>60848029
>macros
fucking dropped

text substitution is horribly inefficient

C++ has been moving away from macros big time
>>
>>60848042
You mean ASM, retard
>>
>>60848042
>2017
>thinks C shows how things "work under the hood"
It ain't 1976 anymore.
>>
>>60848052
>text substitution is horribly inefficient
That's a C problem, macros are a placebo text substitution in C
>>
>>60848052
>text substitution is horribly inefficient
Rust's macros aren't text substitution. They're AST macros.
I don't think they could have picked a more ugly syntax, though.
>>
>>60848052
You can't emulate a for loop using C macros idiot
>>
>>60848067
>I don't think they could have picked a more ugly syntax, though.

It's one of the things that keeps me away from Rust.
>>
>>60848085
>sepples faggot of all people calling Rust syntax ugly
>>
>>60848067
Post example syntax please.
>>
>>60848067
macros are still fucking disgusting, it's a "meta" used as a bandaid for a lack of high quality first-class language features
>>
>>60848085
No one cares, tripshit
>>
>>60848085
imo, Rust is at least better looking than C++. and the syntax grows on you.
>>
void foo(int *arr[]);

int main()
{
int *arr[100];

foo(arr);

// error: lvalue required as increment operand
++arr;

return 0;
}

void foo(int *arr[])
{
// fine
++arr;
}



Why?
>>
>>60847959
Be mindful of what is WORTH optimizing.
You almost definitely could improve that function, but unless it's causing a noticeable slow-down, you probably don't need to worry about it.

Obviously you don't wanna write slow code everywhere because "lol who cares it probably doesn't make a difference here", but pick your battles is what I'm saying. If it's not particularly difficult to make something a lot faster without effecting the readability then go I'd err on the side of optimizing. Otherwise I'd leave it alone unless it's proven to be a problem (with a profiler).
>>
Doing n operations in a once processed array is the same as doing n-1 in a once processed array, which is then processed once more with the last operation.
But the latter is worse right?
>>
>>60848098

I'm not a sepplesfaggot, though.

>>60848112
>Rust is at least better looking than C++

I disagree.
>>
>>60848123
you can't increment an array

in foo it decays to a pointer
>>
>>60847291
Look up structural bindings, they can let you achieve that if you so desire.
>>
>>60848144
I respect that. That's why I said "imo".
>>
File: dlang_chan.jpg (70KB, 349x368px) Image search: [Google]
dlang_chan.jpg
70KB, 349x368px
Threadly reminder that dlang-chan has RAII; she's quite fast in execution and compilation; she's becoming fully memory-safe; and she's super duper cute! Say something nice about her, /dpt/!

>Tour
http://tour.dlang.org/
>Books
https://wiki.dlang.org/Books
>GC
https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
https://wiki.dlang.org/Libraries_and_Frameworks#Alternative_standard_libraries_.2F_runtimes
>>
File: donald-trump-super-bowl.jpg (23KB, 559x400px) Image search: [Google]
donald-trump-super-bowl.jpg
23KB, 559x400px
>>60848152
>I respect that.

Good man.
>>
>>60848145
Oh.


Isn't this semantically misleading then?
>>
>>60848155
D is tempting, but I way too deep into Rust to give up now. I can't be bothered to spend the time to learn a completely new language.
>>
>>60848101
Here is an example from the rust book
macro_rules! bct {
// cmd 0: d ... => ...
(0, $($ps:tt),* ; $_d:tt)
=> (bct!($($ps),*, 0 ; ));
(0, $($ps:tt),* ; $_d:tt, $($ds:tt),*)
=> (bct!($($ps),*, 0 ; $($ds),*));

// cmd 1p: 1 ... => 1 ... p
(1, $p:tt, $($ps:tt),* ; 1)
=> (bct!($($ps),*, 1, $p ; 1, $p));
(1, $p:tt, $($ps:tt),* ; 1, $($ds:tt),*)
=> (bct!($($ps),*, 1, $p ; 1, $($ds),*, $p));

// cmd 1p: 0 ... => 0 ...
(1, $p:tt, $($ps:tt),* ; $($ds:tt),*)
=> (bct!($($ps),*, 1, $p ; $($ds),*));

// Halt on empty data string:
( $($ps:tt),* ; )
=> (());
}
>>
>>60848165

Yes it is, C's array decay rules are misleading. C isn't as pure and nice as you think.
>>
>>60848169
That's why you learn her after Rust, anon. Can't have enough languages under your belt. In fact, once I'm done with dlang-chan, I'm moving onto rust-chan (rust-kun).
>>
>>60848172
lmao, you went through and cherry picked the ugliest possible code segment probably in the whole book.
Every single language has ugly code. Average C++ code is way more hideous than average Rust code.
>>
File: woman sitting on a big rooster.jpg (98KB, 600x800px) Image search: [Google]
woman sitting on a big rooster.jpg
98KB, 600x800px
>>60848172
lmao
>>
>>60848169
heh, I'm way too deep into D to try Rust and I could easily be using Rust
>>
>>60848165
in C++ you can do

void foo(int *(&arr)[100])
>>
>>60848143
The latter is worse, but probably not a whole lot worse. To give you a bit of an idea, both would be described as O(n).
>>
>>60848165
Read "Modern C" by Jens Gustedt. It goes very in depth and explains all the quirks of C. He has an entire subsection on how arrays and pointers relate to each other.
The pdf is freely available online and found with a simple search.
>>
>>60848172
What is this even supposed to do?
>>
>>60848172
lmfao this is almost haskell level bad

how can people even defend languages like rust and haskell, it's straight shitposting
>>
>>60847911

There's many applications where speed isn't really a concern
>>
>>60848236
Thanks.
>>
I really hope Common Lisp arrays are O(1) access.
>>
>>60848243
It's not your placebo macro system like C
>>
>>60848172
"lmao lisp syntax is so bad who would want that?"
"wow cool we have lisp macros now in rust syntax. take a look at what it looks like. isn't it great?"
>>
>>60848192
>>60848216
>>60848243
>lmao
Shut the fuck up, you spewing retards.
>>
>>60848240
>>60848243
https://doc.rust-lang.org/1.4.0/book/macros.html#the-deep-end
Even says right there "as an extreme example...".
>>
>>60848243
How is haskell bad, because of the IO?
>>
>20 posters ITT
Nice samefagging. Sad thread.
>>
>>60848281
Low poster counts is typical for a general thread, idiot.
>>
>>60848042
Learn C, intrinsics, use a debugger that lets you inspect the asm and use a profiling tool.
Then you can figure out what's going on under the hood.
>>
>>60848272
very ugly, not practical like C-like languages

firstTruthy :: Monad m => (a -> Bool) -> [m a] -> m (Maybe a)
firstTruthy f = foldr
(\x r -> x >>= uncurry (bool r) . (return . Just &&& f))
(return Nothing)
>>
>>60848052
>inefficient
What kind of inefficiency are we talking about? Because compile time inefficiency is a problem pretty much only C++ faces.
>>
>>60848301
looking at functional code reminds me of all those years ago when I first looked at C code, having never programmed before in my life
>>
>>60848281
this

general threads are despised even among 4channers

it's mostly a small group of mentally ill circlejerkers and shitposters, and then some random newfags who ask for programming help/advice

you are the rejects of rejects
>>
>>60848267
It's too late, anon. We're overrun by social media retards.
>>
Welp. Assuming nothing horribly wrong goes by in the next few weeks while everything gets processed... I now have a master's degree in computer science.
>>
>>60848328
Post your dissertation.
>>
>>60848342
>revealing your identity online
>revealing your identity on 4chin
>>
File: 1402886051076.jpg (126KB, 856x704px) Image search: [Google]
1402886051076.jpg
126KB, 856x704px
>>60848318
>Reddit spacing
>>
>>60848288
/dpt/ is usually much higher. This thread in particular is just trash.
>>
>>60848342

I said a master's, not a PhD. And no, I'm not sharing my research papers on 4chan just yet. I don't feel like you guys knowing my real name.
>>
>>60848318
Before dpt it was pretty unbearable to do any programming talks on /g/ because the volume of complete morons was so much higher. Now these same morons look at a very mundane looking general and don't come here because they remember their previous experiences well.

Also /g/ was caught on the oop fad back then so it wasn't exactly good.
>>>/prog/
Prog was always a shithole.
>>
>>60848350
le nuffin to hide :d
>>
>>60848360
really? it actually doesn't seem so bad today. the gatekeeper isn't around and the type theory circlejerking is almost non-existent.
>>
>>60848301
Yeah, that strong typing kills it.
Compare to Lisp functional code.
(defmacro truthy (&rest values)
`(or ,@values))

(truthy nil nil nil nil nil 'ass)
=> 'ass
>>
>>60848372
Stop being a pussy. I've linked my github here before, which is attached to my real name.
>>
Why did he overcomplicate echo?
https://www.youtube.com/watch?time_continue=208&v=69CYF7nJKj8
>>
>>60848490
What c standard library does he use?
>>
>>> a = 10**11
>>> b = 1 << a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError

I don't get it: I can initialize a unsigned char array in Python of 10**10 elements, and it takes up 6.5GIB of RAM. Why can't I bitshift to the right by 10**11? How are you supposed to make a bit array?
>>
>>60848599
C has one, C++ has 2 or 3
>>
Here is a food for thought. Do you think a language adheres to the unix philosophy if it has GC?

Also I am going to claim that linear-imperative is less unix than functional programming.
>>
>>60848811
>muh unix philosophy
nice meme, retard

and there's nothing wrong with GC. just that the "unix philosophy" types are out of touch C fags who can't even do proper management in C
>>
wheres a good place to get started on making a simple AI for vidya? I'm using c# btw.
>>
>>60848862
>Game AI
>C#
ehehehe
>>
>>60848872
Oh come on, be helpful. My googling is pointing me to c++ book related.
>>
>>60848895
>c++
good
>>
File: IMG-20170610-WA0002.jpg (84KB, 540x960px) Image search: [Google]
IMG-20170610-WA0002.jpg
84KB, 540x960px
where the fuck do i find a cheap 1ed SICP? I can only find the 50 dls second edition and i poor
>>
>>60848862
most game AI uses behaviour trees
http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php
>>
module Body
Table = [ [ 2, 27.5, 34.2, 0.15, 26.5, 33.7, 0.175 ],
[ 3, 31.0, 37.5, 0.15, 31.5, 37.0, 0.175 ],
[ 4, 36.0, 40.3, 0.15, 34.0, 39.5, 0.175 ],
[ 5, 40.5, 43.0, 0.15, 39.5, 42.5, 0.175 ],
[ 6, 45.5, 45.5, 0.155, 44.0, 45.5, 0.18 ],
[ 7, 50.5, 48.0, 0.16, 49.5, 47.7, 0.1975 ],
[ 8, 56.5, 50.4, 0.165, 57.0, 50.5, 0.1975 ],
[ 9, 63.0, 52.5, 0.17, 62.0, 52.5, 0.21 ],
[ 10, 70.5, 54.5, 0.175, 70.5, 54.5, 0.215 ],
[ 11, 78.5, 56.5, 0.175, 81.5, 56.7, 0.22 ],
[ 12, 88.0, 58.7, 0.17, 91.5, 59.0, 0.22 ],
[ 13, 100.0, 61.5, 0.165, 101.0, 61.7, 0.22 ],
[ 14, 112.0, 64.5, 0.155, 105.0, 62.5, 0.225 ],
[ 15, 123.5, 67.0, 0.15, 115.0, 62.9, 0.225 ],
[ 16, 134.0, 68.3, 0.145, 118.0, 64.0, 0.225 ],
[ 17, 142.0, 69.0, 0.145, 120.0, 64.0, 0.225 ],
[ 18, 147.5, 69.2, 0.145, 125.0, 64.2, 0.225 ],
[ 19, 152.0, 69.5, 0.145, 126.0, 64.2, 0.225 ],
[ 20, 155.0, 69.7, 0.145, 128.0, 64.3, 0.225 ] ]
Indices = { :age => 0,
[:male, :weight] => 1,
[:male, :height] => 2,
[:male, :pbf] => 3,
[:female, :weight] => 4,
[:female, :height] => 5,
[:female, :pbf] => 6 }
CalsPerLbFat = 3500.0
CalsPerLbLean = 421.33
def self.rowproj(a, i)
i = 0 if i < 0
i = a.size - 1 if i > a.size - 1
i_low = i.floor
i_high = i.ceil
return a[i] if (i_low == i_high)
r_low = a[i_low]
r_high = a[i_high]
p_low = i - i_low
p_high = i_high - i
r_low.zip(r_high).map {|n, m| n*p_high + m*p_low}
end
def self.stat(which, age, gender)
row = self.rowproj(Table, age - Table[0][Indices[:age]])
return age if which == :age
row[Indices[[gender, which]]]
end
end
>>
>>60849096
thanks mate
>>
File: 2017-06-10-225426_537x537_scrot.png (223KB, 537x537px) Image search: [Google]
2017-06-10-225426_537x537_scrot.png
223KB, 537x537px
Why are Lisp weenies so pathetic?
>>
Why does Java exist?
>>
>>60849485
It's safer than Sepples.
>>
>>60849504
It's also slower than Sepples.
>>
>>60849485
>>60849521
programmer productivity is often more important than the speed of software execution, and java is still one of the fastest languages, especially for long-running server applications
>>
>>60849577
It's this shitty attitude which causes phones to have such shitty battery lives.
>>
>>60849661
like leaking memory? Is that a c++ feature ?
>>
>>60849661
I think that mostly because of bloatware and gigantic fucking screens.
>>
#include <ctype.h>
#include <stdio.h>
int main() {
/* my fucking life */
puts("do you want to play the unfair game Y/n");
if (tolower(getchar()) != 'n') puts("you lose");
}
>>
>>60849577
Shut the fuck up you fucking retard, fuck you.
>>
>>60849722
it gets worse
#include <stdio.h>
int main() {
puts("do you want to play the unfair game y/N");
getchar();
puts("you lose");
}
>>
>>60848480

I've linked my github here, and it's not attached to my real name. In any case, you're an anon, and I'm not. I can't go around tying pseudonyms to real names.
>>
>>60849738
Excuse me?
>>
>>60848372
I'm thinking about going in for a masters. What's your focus and how hard was it to get in?
>>
Koitlin is the shit
>>
>>60849765
Post github.
>>
File: 123545345r.png (79KB, 524x555px) Image search: [Google]
123545345r.png
79KB, 524x555px
How do you brainlets think you're going to get good at programming when you don't math past Algebra 1?
>>
File: inbed169.png (53KB, 3840x2160px) Image search: [Google]
inbed169.png
53KB, 3840x2160px
Learning computer science. What should I read?
>>
>>60849796
dumb frogposter
>>
>>60849687
this

and a lot of apps/""""apps"""" are made in other languages ranging from C/C++ to python and javascript
>>
>>60849778

Eh, I did my research in cybersecurity, particularly concerning cyber deception. As for how hard... let me put this into perspective: although my GRE scores were pretty decent, it really helps to get your master's at the same university you got your bachelor's, when two of your professors recommended you continue on to your master's, and they're both on the graduate committee. Those two professors also wrote me a bunch of letters of recommendation for me to get into a PhD program, so I guess now I'm headed across the state in two months.

Important lesson to take out of all of this... network with your professors. They give a bit more of a shit about you when you show any interest towards graduate work, and when you're working on graduate work.
>>
File: IMG-20170610-WA0012.jpg (150KB, 1280x768px) Image search: [Google]
IMG-20170610-WA0012.jpg
150KB, 1280x768px
I was asked to help with this code, and i only hsve this image. So sorry in advace.

Somehow, the insert query adds the value from "nome" and the others values 2 times, but with different ids.
Something like:
Id 1 nome marcus
Id 2 nome marcus
Id 3 nome thomas
Id 4 nome thomas
Could somebody help me?
>>
sigint: user says stop
sigterm: ok cleanup time
sigquit: hurry the fuck up asshole
sigkill: sorry time's up you're fucking dead
sighup: your window got closed please kill yourself accordingly
sigsegv: halt sir you are under arrest
>>
Hu
>>
>>60850229
>sigsegv: by the power vested in me as your host kernel you are hereby under arrest in the name of the queen!
>sigkill: OFF WITH ITS HEAD!
>>
>>60850229
>>60850263
>sigbus: breaking news, one fatality in municipal transportation accident
>>
$head
import std.stdio;

void main(string[] args)
{
import std.algorithm, std.range;
import std.conv;
stdin.byLine.take(args[1].to!ulong).each!writeln;
}


$ cat bigtextfile.txt | ./head 10
The Project Gutenberg EBook of The Adventures of Sherlock Holmes
by Sir Arthur Conan Doyle
(#15 in our series by Sir Arthur Conan Doyle)

Copyright laws are changing all over the world. Be sure to check the
copyright laws for your country before downloading or redistributing
this or any other Project Gutenberg eBook.

This header should be the first thing seen when viewing this Project
Gutenberg file. Please do not remove it. Do not change or edit the
>>
File: 1456117005164.png (116KB, 404x323px) Image search: [Google]
1456117005164.png
116KB, 404x323px
>>60850346
I fucking love this love language.
>>
File: 0093-002.jpg (31KB, 600x848px) Image search: [Google]
0093-002.jpg
31KB, 600x848px
Can someone explain me why using cases is a better practice than repeated if statements?

I heard some guy tell that "it reduces the charge on the CPU", whatever he meant by that.

However it was not the first time that I heard cases were better than repeated if statements so what's the reason?
>>
>>60850102
Help...
>>
File: _n.jpg (68KB, 798x908px) Image search: [Google]
_n.jpg
68KB, 798x908px
>>60850379
R-Rust can do it too
>>
>>60850379
it isn't a very good language
>>
>>60850346
Inefficient. It reads the the whole stdin, returns a range of all lines and then takes the first 10 items of the ranges.

You should have stopped reading lines as soon as you have done it 10 times.
>>
>>60850392
a switch/case can be optimized out to some form of hash table by the compiler. You probably need more than 10 cases for this to be a performance improvement however, and it's an extremely small performance improvement. Practically it doesn't even matter unless you have hundreds or thousands of cases. The advantage of a switch statement is it's easier to typed than chained ifs.
>>
>>60850392
The technical difference is in how the compiler implements them. When you use a switch-case statement, the compiler can create a jump table. When you use if-then-else, the compiler will generate code that steps through all the conditions until it finds one that evaluates true, or it hits the else statement.

In practice, the performance difference may not be that huge. You'll get better results by profiling your code to find the bottlenecks.
>>
>>60850520
Thank you.
>>
>>60850010
>cybersecurity
>uses a smartphone
>>
>>60850602

Anon, it's not really practical to not have a smart phone these days. Besides, how else am I supposed to browse 4chan and write C programs during my commencement ceremony after I've received my placeholder diploma but before they've allowed us to fuck off.
>>
>>60847211
Chapter 5 of KnR where you have to rewrite everything with pointers instead of arrays.
>>
>>60847211
Replacing some shitty excel worksheet. So pretty much a sql query builder thing. They've requested that the selectable values update according to what a user selects. This is becoming a huge pain in the ass as the where clause just works, but the components don't quite reflect the changes too well, and im pretty new to the this whole 'event-driven' business.
>>
Is ORM a meme?
I've been building an abstraction layer for a bunch of tools that extends a third-party/closed source software/DB and not sure if ORM would have been the right decision.
I like the fine-grained control and caching available to me without ORM. What am I missing out on?
I feel like ORM is just corporate-y protection layer for brainlets.

Also fuck MSSQL.
>>
>>60850908
>Is _ a meme?
probably
>>
what are the best languages to learn that aren't old/basically standard like java, c*, and are cross-platform? i am starting to learn python but am wondering what else is most useful.
>>
>>60851065
https://dlang.org/
>>
>>60851065
if you're looking for something completely different, go for Lisp or Haskell
>>60850908
sql can be incompatible between different databases, ORMs let you easily switch between mysql and psql for example
>>
>>60851065
rust, haskell, lua, nim, forth
>>
File: OpenGL Chart.png (63KB, 474x1402px) Image search: [Google]
OpenGL Chart.png
63KB, 474x1402px
Hey I can into OpenGL! This is pretty cool. Sofar only hardcoded data to see if I could even draw anything at all. Now I just need to write all the rest of the code to load real data and draw it.
>>
>>60851140
you should use glTranslatef for the different boxes then just have a consistent drawBox(width,height) routine
>>
I've been out of the loop when it comes to web design but I need to make a simple page now. Are divs still the standard way to position stuff?
>>
>>60851140
>glBegin
>glEnd
Please anon, it's not the 90s anymore.
Use shaders.
>>
>>60851180
>>>/g/wdg
>>
>>60851181
The old pipeline is not bad for learning or even completely unusable for low performance applications. As long as you're aware of the existence of the newer API which you should use in production code.
>>
File: CG Through OpenGL.png (900KB, 852x1108px) Image search: [Google]
CG Through OpenGL.png
900KB, 852x1108px
>>60851158 >>60851181
I know about that translations and shader language exists but I havent gotten to it yet. I got this book to follow along with, it starts out with simpler and saves the shader stuff for a later chapter.
>>
>>60851140
Shaders, anon. Use them.
>>
>>60851211
Again, the old pipeline is alright for learning. But if you want to learn the new API, I recommend learnopengl.com, used it myself last summer.
>>
>>60851181
>>60851228
but anon everyone is using vulkan now, why are you teaching him ancient methods?
>>
>>60851242
OpenGL is still viable. Not everybody needs the performance that Vulkan brings.
>>
File: CG Through OpenGL preface.png (254KB, 591x1449px) Image search: [Google]
CG Through OpenGL preface.png
254KB, 591x1449px
>>60851181
>>60851219
>>
File: CG Through OpenGL 19.png (40KB, 617x218px) Image search: [Google]
CG Through OpenGL 19.png
40KB, 617x218px
>>60851253
>>
>>60851242
Not even most game programmers use Vulkan yet.
>>
shaders are a clusterfuck, I wish I could go back to using intermediate mode
>>
File: stairway_to_heaven.png (850B, 242x173px) Image search: [Google]
stairway_to_heaven.png
850B, 242x173px
ffs
>>
>>60851202
>>60851140
>>60851211
for fuck's sake don't even bother with the deprecated shit, it's like starting programming with python, it straight up HARMS you and it could cause permanent brain damage
>>
>>60851140
You can see I was trying to draw a meme triangle but I had to hardcode some crazy big price changes because one thing that I havent figure out yet is how the scaling works so that a candle appears large enough to see.
>>
Hey everyone, I am trying to make a game where the player roles 2 dice and the total of the dice add up for the players points. If the same values are rolled on both dice (snake eyes, etc) then the player loses all of his points. This is my code.

if (dice !== 1 && dice2 !== 1) {
//add score
roundScore = dice + dice2;
document.querySelector('#current-' +
activePlayer).textContent = roundScore;
} else {
//next player
}


For some reason if just one of the dice is "1" then it doesn't add up the scores and doesn't add them into the players points. I want it so if both dice 1 and dice 2 are the same value (in this case, both dice roll 1), then it doesn't add up the points. Any advice would be appreciated. Thanks.
>>
>>60851357
Harms you? I started programming with python and I think I've been progressing pretty well since I did that two and a half years ago.
>>
>>60851385
Is this what you're trying to do?
if (dice1 != dice2)
score += dice1 + dice2;
else
score = 0;
>>
>>60848172
W E W
>>
>>60848172
LMAO
>>
>>60849237
>Lisp weenies
Gb2c2
>>
>>60849237
This is just sad.
>>
>>60851499
Yes, thank you. I figured it out 10 minutes ago and this is exactly what i did. I am retard.
>>
>>60851385
Your condition is wrong. You have written "if neither die is 1 then accumulate points"
>>
>>60848301
>write a function to do a thing
>some retard obfuscates it and posts it every day for a week
what the fuck is wrong with /dpt?
>>
>>60851676
I think we need abandon /dpt/ and create /fpt/, friendly programming thread, no rude dudes allowed.
It's about time, this place is becoming pure cancer.
>>
Gonna write a server and will probably be writing it to use UDP. Done some small scale UDP stuff before, but I'm wondering, what kind of a datastructure would be suitable for finding the connection entries of existing clients based on their address?
I'm talking of when you recv_from() and get the address of the sender. First I was thinking of a hashtable, but it would have to be a pretty good hashtable if there are thousands of connections I assume, since elsewhere I read it could be considered a vulnerability if for example an attacker could somehow make your hashtable devolve into a linked list (in a badly implemented hashtable.)
Anyone done this kind of thing before, or got any tips? The language is C.
>>
File: 1494112438234.png (535KB, 989x807px) Image search: [Google]
1494112438234.png
535KB, 989x807px
>>60851697
>implying the rude dudes won't just shit up that thread too
Face it, anon: bullies are everywhere.
>>
>>60851698
>but it would have to be a pretty good hashtable if there are thousands of connections I assume, since elsewhere I read it could be considered a vulnerability if for example an attacker could somehow make your hashtable devolve into a linked list (in a badly implemented hashtable.)

anon, what is this.
can somebody explain this to me.

Just use any hash map and don't worry about whatever you read, because it sounds like a bunch of nonsense.
>>
>>60851730
>anon, what is this.
Its a reasonable concern. Think for example if your hashing function was bad and caused a lot of collisions when applied to IP addresses. In just about any hashtable implementation, collisions will cause slowdown.
For example, say you have a very simple hashtable where under the hood there resides a simple linked list of entries. Effectively, if there are a lot of collisions, you will be doing an O(n) search every time you look something up in the table. If an attacker can purposefully get that to happen, that's a vulnerability.
>>
>>60851765
>if your hashing function was bad
Then use a good one, problem solved.
Don't roll your own, obviously. Just find a solid hash map implementation/library and live happily ever after.

It's a reasonable concern ONLY if you're writing your own hash function from scratch, but that means you most likely have way bigger problems in your program (and in your head, honestly).
>>
>>60851811
That's exactly why I am asking, if for example someone had an implementation they could recommend for me to look up.
>>
Rate my bitsieve. Slow (sums the primes under 2 million in ~0.7s), but can sieve 10**11 with 6.8GIB memory usage. Native Python in general is poor at bitwise manipulation, it seems.
import array

def bit_sieve(limit):
if limit >= 2:
yield 2
sieve_limit = int(limit - 1) // 2
x = array.array('L', [18446744073709551615])*(sieve_limit // 64 + 1)
for i in range(sieve_limit):
if (x[i>>6] & (1 << (i & 63))):
p = i*2 + 3
yield p
j = (p*p - 3) >> 1 # sqrt of p minus even range
if j < sieve_limit:
for k in range(j, sieve_limit, p):
x[k>>6] &= ~(1 << (k & 63))
else:
for k in range(i + 1, sieve_limit):
if (x[k>>6] & (1 << (k & 63))):
yield k*2 + 3
return
>>
>>60851826
uthash seems alright.

https://troydhanson.github.io/uthash/
>>
>>60851849
Do you have experience of using it in applications like UDP servers where you're doing constant look ups from thousands of entries?
>>
>>60851860
no, but a hash table is a hash table, i'm sure it'll handle it fine.
if you're worried, just simulate a huge workload with randomly generated ip addresses and see how well it does.
report back, i'm interested in what you'll find.
>>
>>60851879
>no, but a hash table is a hash table
Not necessarily. If you for example work with small data, you don't necessarily have to even handle collisions. Some identifiers are also hashed differently, because the data has different characteristics: strings are different by their pattern from IP addresses, for example (both are series of bytes but one is fixed size.) I'm not looking for a generalist solution to hashing but experiences of a specific problem - googling for a generalist hashtable implementation is something I can do myself.
>>
>>60851924
jesus fucking christ, anon.
there's nothing special about your UDP workload from the perspective of the hash table. it's all just data.

you need to stop wasting time and go see if the "generalist solution" works for you. the results may surprise you.
>>
Rate my code:
#include </dev/tty>


>>60847317
t. linus
>>
>>60851950
cute
>>
>>60851950
rate mine
#include </dev/urandom>
>>
>>60847635
Aside from paying attention to what the types are and dereferencing/referencing where you need to, remember that unlike in Java, compiler warnings often mean something important.
>>
Threadly reminder not to use Rust.
https://doc.rust-lang.org/1.2.0/book/dining-philosophers.html

fn main() {
let p1 = Philosopher::new("Judith Butler");
let p2 = Philosopher::new("Gilles Deleuze");
let p3 = Philosopher::new("Karl Marx");
let p4 = Philosopher::new("Emma Goldman");
let p5 = Philosopher::new("Michel Foucault");
}
>>
>>60848632
It's trying to bitshift without dropping any bits, which means you are doubling its size.
>>
File: 1486024652652.png (488KB, 1000x1050px) Image search: [Google]
1486024652652.png
488KB, 1000x1050px
>>60851991
>2012+5
>being a /pol/ack unironically
>getting triggered by names
>>
>>60850346
$head

class Head {
public static void main(String[] args) {
(new java.io.BufferedReader(new java.io.InputStreamReader(System.in))).lines().limit(Long.parseLong(args[0])).forEach(System.out::println);
}
}


  head   cat bigtextfile.txt | java Head 10
The Project Gutenberg EBook of The Adventures of Sherlock Holmes
by Sir Arthur Conan Doyle
(#15 in our series by Sir Arthur Conan Doyle)

Copyright laws are changing all over the world. Be sure to check the
copyright laws for your country before downloading or redistributing
this or any other Project Gutenberg eBook.

This header should be the first thing seen when viewing this Project
Gutenberg file. Please do not remove it. Do not change or edit the
>>
File: 1497105980750.png (782KB, 1024x512px) Image search: [Google]
1497105980750.png
782KB, 1024x512px
>>60851991
>>
File: 1396396606434.png (3KB, 168x141px) Image search: [Google]
1396396606434.png
3KB, 168x141px
Object (OtherObject &_o) : o (_o) {};
const OtherObject o;

this syntax is correct, right? but why does it say that
OtherObject ::OtherObject (const OtherObject &) is inaccessible?
>>
>>60852038
>D and Java code are virtually indistinguishable
poetry
>>
File: 1493579349429.jpg (247KB, 1990x762px) Image search: [Google]
1493579349429.jpg
247KB, 1990x762px
>>60852041
>if you dislike /pol/-tards you must be a /leftypol/-tard yourself
It's time to you to go back to >>>/r/the_donald.
>>
File: 1455285791028.jpg (48KB, 380x465px) Image search: [Google]
1455285791028.jpg
48KB, 380x465px
>>60852038
>people write in this language
>>
File: 1474617397273.png (1MB, 1019x881px) Image search: [Google]
1474617397273.png
1MB, 1019x881px
>>60852101
>people get paid to write this language
>>
>>60852080
Provide context moron
"Inaccesible" = private or protected and you're out of the clear I think, so can't tell you if you don't POAST SOME ACTUAL CODE
>>
>>60852095
>Frogposter directing someone to reddit
Oh the ironing
>>
>>60852123
there is literally not much more.
the question is more why does pass by reference need a copy constructor (and that's what it looks to me)
>>
>>60852095
dumb frogposter
>>>/r9k/
>>
>>60852198
>why does pass by reference need a copy constructor
It does not. You're fucking up in a different way.
maybe a {} after your constructor? I CANT KNOW IF YOU DONT POST THE ENTIRE CLASS DEFINITION FFS
>>
File: 1493022896377.jpg (49KB, 579x433px) Image search: [Google]
1493022896377.jpg
49KB, 579x433px
>>60852305
calm your tits, bubba. it was a syntax error all along
>>
File: 1456970168815.jpg (167KB, 500x500px) Image search: [Google]
1456970168815.jpg
167KB, 500x500px
>>60847211
Is there a better way for doing the following in Java

public int getSize(int a, int b)
{
return a*b;
}
public int getSize(int a, int b, int c)
{
return a*b*c;
}

Seems like i cant do

public int getSize(int a, int b, int c=1)
{
return a*b*c;
}
>>
tell me some interesting C project for my boring Sunday
>>
>>60852653
Or am i supposed to use Method Chaining in cases where i have several initlialzing varaiables in the class?
>>
>>60852661
write a virus that deletes all animu
>>
>>60852653
public int getSize(int[] args)
{
int t = 1;
for (int i = 0; i < args.length; i++)
t *= int[i];
return t;
}


How about this?
>>
>>60852753
Sorry, bad case in my example.

I want to be able to initialize a class with several different options or there will be standard values.

like

public FileBrowser(Path startPath, boolean showHiddenFiles, int MaxWalkInFileTree)

to

public FileBrowser( Path startPath, boolean showHiddenFiles = false, int MaxWalkInFileTree=null)

Is it possible in some way in Java except with method chaining?

This is possible in C++ and in C# if i remember correctly.
>>
>>60852807
Also, this is a Syntax question and not a Logical Problem.
>>
>>60852807
Not that I'm aware of. I think method chaining is already quite an elegant solution to the problem.

Also, put your in between code tags next time
>>
What a fucking nightmare.

I'm testing a driver+firmware for a usb device that periodically receives some data of varying size.
I've discovered that certain sizes of data fails to be received by the device. I can kind of work around this by disallowing these data sizes in the driver, but first I need to track down all the sizes that causes it.

But here's the thing, I tried to make a loop that sends some data and then increment the data size and send it again, and log which sizes fail. But in that loop, nothing fails! I've tried multiple variations but it's like the bug can only be observed when I manually try to send the data, not automated. It's so bizarre, and it's obviously a huge problem because there's no way I can manually check thousands of different sizes to see if they work or not
>>
>>60852832
How do i use Code tags?

"<Code> CODE HERE</Code>"
>>
>>60852835
Are you sure that the test uses the same method of transferring data to the device as would be used when doing it manually?
>>
>>60852843
Read the rules, they're useful
>>
Reading about Swift today. Seems like a nice language, like an improved Go.
>>
I'm having trouble understanding closures.
>>
>>60852869
Well then you might want to read a book about them or post what you don't understand about them exactly.
>>
>>60852869
Closures are brainlet-tier:

constexpr auto multiply_by(int a) {
return [=](int x) { return a*x; };
}

int main() {
auto multiplier = multiply_by(5);
return multiplier(2); // returns 10
}
>>
Fairly new to programming (5 years on and off but only in the past year have I been taking it a bit more seriously) so I'm still learning what I can about C++. Currently learning the C sockets library in order to make a peer-to-peer file transfer program for Linux, just for my own educational purposes
>>
>>60852653
public int getSize(int ...args) {}
>>
File: 39473.png (96KB, 1370x842px) Image search: [Google]
39473.png
96KB, 1370x842px
My head hurts.
>>
>>60848989
>What is holding Lua back as a programming language.
So what do you think /dpt/?

I think global by default is the biggest problem.
>>
>>60853151
Have you tried double quotation marks

>>60853177
I've never worked in Lua, it seems like a nice enough language.
>>
>>60853151
codecademy is notoriously fucking picky about some things for no discernible reason. I wouldn't rely on it very much.
>>
>>60853177
Lua is fine. It does a good job of what it was designed for: extending software. Lua is small and easy to embed and is quite fast for a scripting language with a small and orthogonal feature set, it is quite powerful for a lot of basic tasks.
>>
>>60853177
I detest LUA for no clearly logical reason.
Just looking at LUA makes my blood curdle.
>>
>>60853151
>Expected: 1, 2, 3
>You wrote: 1,2,3
>>
Why do you guys mess with Rust, Go, Haskell etc when there's C#, .Net Core and VS Code on Linux? It's literally a better choice than the rest
>>
>>60853246
Winner.
Thank you.
>>
>What are you working on, /g/?
Improving my job prospects by making a personal website. I want to make a web page that lists my accounts for LinkedIn, GitHub, StackOverflow, Hackerrank etc. There's just one problem: I cannot design for shit.
>>
>>60853258
Because people don't like Mono or VS Code and if you're a C# dev you're most likely going to get a job working on building things for Windows anyway.
>>
>>60853276
Why not just use a template design. Low effort, good product or a lot of effort for a mediocre product.
>>
File: iweriu4.jpg (62KB, 1006x517px) Image search: [Google]
iweriu4.jpg
62KB, 1006x517px
>>60853276
Just buy a design for a few bucks
>>
I saw this Humble Bundle style package for a handful of lang courses - is it worth picking up? I figured I might as well buy it because it's so cheap, and it would give me something to learn over the summer.

https://stacksocial.com/sales/pwyw-learn-to-code-2017-google-go
>>
>>60853277
I work on ASP.Net and C# applications just fine on Linux, you don't have to deal with WPF or Winforms. Just build system applications and net applications with it
>>
>>60853299
>Don't learn, just pay someone else to do it
>>
>>60853309
>working on your weaknesses instead working on your strengths
>>
>>60853292
>>60853299
Meh, I want to make something myself. I want make something simple like pic related.
>>
>>60853304
It's nothing I'd care for (except git).
But for a buck. I just feel good for thinking I'm saving at that point. I know it's dumb but emotionally I'm too dumb to realize that.
>>
>>60853347
Oh nvm. It's 20$ for the package.
Useless.
>>
>>60853304
It looks pretty useless. I think it's better to figure out something you want to build over the summer, pick a language based on that and then just go with it.
>>
>>60853304
>>60853347
>>60853356
What kind of shitty pay what you want is this? Anything below average just gets you the Javascript junk.

Why not just call it a bundle at that point?
>duh anon they need to exploit the impulse buyers who see that the price will probably rise.
Yeah but it's so disgusting.
>>
>>60853276
>hackerrank
Aren't people ashamed to be on that site?
>>
I'm trying to use a pointer to return an array but idk how to access it outside the function. what do?

it's c++
>>
>>60853406
I've only made a LinkedIn account. Next up will be GitHub and StackOverflow. I want to create a hackerrank account to improve my clojure skills.
>>
>>60853411
post code
>>
New thread:
>>60853430
>>60853430
>>60853430
>>
>>60853411
You allocate an array and return the address to it.
>>
>>60851341
1. Python doesn't have this problem
2. If the writer did some FP it wouldn't be that bad
>>
>>60852082
>virtually indistinguishable
Are you unable to read? Those to are very different in nature.
Thread posts: 324
Thread images: 39


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

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


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