[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: 323
Thread images: 48

old thread: >>59861075

What are you working on, /g/?
>>
>>59866546
Lisp is the most powerful programming language.
>>
capture the flag for middle schoolers
>>
python and jinja2 for my free programming class im taking
>>
File: 1484223470340.jpg (37KB, 600x338px) Image search: [Google]
1484223470340.jpg
37KB, 600x338px
>>59866546
>tfw learning 68k asm
>>
File: 1479959652218.png (46KB, 1071x431px) Image search: [Google]
1479959652218.png
46KB, 1071x431px
>>59866546
Daily reminder Java is the language of /g/
>>
>>59866581
>what is unironically voting
>>
>>59866546
Job applications... hate how I have to reduce myself a product with a sales pitch to get hired.
>>
File: 1479963255632.jpg (82KB, 408x600px) Image search: [Google]
1479963255632.jpg
82KB, 408x600px
>>59866546
Thank you for using an animge image.

>>59866559
Lain agrees!
>>
>>59866615
>>
>>59866615
Be a NEET.
>>
File: 1477763922962.jpg (791KB, 1920x1080px) Image search: [Google]
1477763922962.jpg
791KB, 1920x1080px
Hey /g/ I'm wondering if what I'm doing is okay. It works but I was wondering if there's a better way.
I need a random String ( From "00" to "99" ). So I generate an int then add the "0".


String spaceLocation;
Random r = new Random();

int randomNum = r.nextInt((99 - 0) + 1) + 0;
if(randomNum < 10){
spaceLocation = "0" + randomNum;
}
else{
spaceLocation = "" + randomNum;
}
>>
>>59866615
You're asking another company to give you money.
I think they have the right to be picky.
>>
>>59866581
With the amount of shilling going on I always thought there would be more Rust fags
>>
>>59866546
This anime is actually really cute I'm about 5 episodes in
>>
>>59866634
Picky sure, but I have to hand myself to them on a plate. Working is fine, I just hate the application process. It's degrading.
>>
>>59866635
I'd like a Rust programmer to show me a function that correlates it's how trendy it is vs. how much it's actually used for anything at scale
>>
>>59866652
>Complains but gives no better alternative to the process.
>>
>>59866581
Doesn't surprise me that 40% of the people here only know Java.
>>
>>59866667
how do you give an alternative to trying to get hired some place? you mean like live off welfare and drink 40's all day and smoke muh blunt?
>>
>>59866667
Find work that needs to be done. Do work on it subject to the review of others. Get paid. Like a more structured version of what occurs in open source development.
>>
>>59866581
>>59866675
turns out the majority of people are mediocre. who knew
>>
>>59866667
Also this whole sentiment is bullshit
>whatcha gunna do about it, you aren't in charge!
>hahaha I'm a prick!
>>
>>59866667
>>59866679
>>59866721
>>
>>59866679
>>59866691
>>59866721

No, I'm not trying to be harsh.
I'm saying if (You) think the whole 'selling yourself in an interview' process is "degrading"
at least try to come up with an alternative to the current interview process to which you dislike so much
otherwise it must be the only option so why complain?

tl;dr :
Why complain about things without any idea of a better alternative?
>>
>>59866748
> be me
> be getting interviewed
> lean over to interviewer
> "you know, I think I've got a better way to do this interview".
> interviewer shows me the door.
don't show up to a place and try to change process. especially not at your own interview you dipwad
>>
File: ints.png (68KB, 759x749px) Image search: [Google]
ints.png
68KB, 759x749px
Reposting >>59866757

I need to store an int in a char array which will later be printed as a string, and I want to make sure I have enough space to store it, I found this macro and it works fine but I'm having trouble figuring out why it works.
#define ENOUGH ((CHAR_BIT * sizeof(int) - 1) / 3 + 2)

The size of an int in bytes * how many bits per char, gives us the amount of bits we need to store any int in a char array, -1bit for the sign bit. Now the /3 part confuses me, why 3? I'm assuming the +2 is for the null terminator + the sign as a character (not a bit). Why are they dividing bits by 3?

I know I could use sprintf to do this instead but I still want to know why this works.
>>
How do I get hired for programming work?
I went to a bunch of job fairs and they're all for entry level scrub work and the IT openings all wanted certs in plugging in routers, and not software dev.
>>
>>59866748
The better alternative is to compare dick length. That isn't going to work now is it moron?
>>
>>59866615
>>59866634
>>59866652
>>59866667
>>59866748
>>59866760
my advice would be to build a portfolio of things you are proud of, and if possible some copyrights. I don't need to degrade myself for interviewers--I've got enough work to show that it speaks for itself and they want it.
>>
    List<int[]> DoThing(int[] i)
{
return new List<int[]>()
{
new int[] { 1, 2 },
new int[] { -1, 2 },
new int[] { 1, -2 },
new int[] { -1, -2 },
new int[] { -2, -1 },
new int[] { 2, 1 },
new int[] { -2, 1 },
new int[] { 2, -1 }
}
.Select(o => new int[]
{
o[0] + i[0], o[1] + i[1]
})
.Where(
o =>
(o[0] > 0 && o[1] > 0) &&
(o[0] <= 64 && o[1] <= 64)
).ToList();
}
is this good code?
>>
>>59866778
buf[floor(log(n) / log(10)) + 2];
>>
>>59866748
>Why complain about things without any idea of a better alternative?
In hopes someone will present one.
>>
>>59866638
There is a S2 later this year. Enjoy.
>>
>>59866760
What is this Recursion? Trying to change the process from the process? I'm talking right now on this board; in this thread.

If you're going to complain about something give an alternative otherwise it goes nowhere and has no use.
>>
>>59866808
or, just complain. It's an anon image board not a self help seminar. none of this is going anywhere or has any use to begin with
>>
>>59866748
>people aren't allowed to complain about things they don't like
You would be a terrible boyfriend.
Also you are replying to multiple people.

I'm willing to discuss the work I've done. They can poke and prod and I'm sure that my experience more than qualifies me for most of the positions I apply to. But the whole "write a grovelling cover letter", "edit your resume so that it's only one page. No one wants to spend more than 2 minutes looking at you", "put in plenty of buzzwords in them because more than likely it's going straight into a machine and no one will actually look at your cover letter because a probably poorly written algo graded your resume an 89", etc. puts us at the level of commodities.
>>
File: WAAAAAAAAAAH.jpg (297KB, 1280x720px) Image search: [Google]
WAAAAAAAAAAH.jpg
297KB, 1280x720px
>>59866788
>submit resume
>they don't even look at my github
>check my traffic stats, literally no visits in weeks
>"sorry anon we've decided not to move forward with your resume"
>literally 274 resume submissions and this is the first time i've ever gotten ANY response
>>
File: londonHover.gif (856KB, 500x333px) Image search: [Google]
londonHover.gif
856KB, 500x333px
>>59866803
Had not thought of that, I retract what I had said :^)
>>
>>59866823
274 resume submissions? what sort of meme language do you write in? I write Python, Lisp, C, Ruby and build infra for AWS and have recruiters begging to suck my dick daily
>>
File: 1491532402312.jpg (190KB, 559x836px) Image search: [Google]
1491532402312.jpg
190KB, 559x836px
Am i hurting myself by using MATLAB for arrays? How much harder is array shit in other languages?
>>
>>59866802
I appreciate the alternative but I'm still curious as to why the compile time constant macro works. Specifically why the magic number 3, how did they get that number, as in what does it represent? It's converting the bit count into a character count somehow, but why divide by 3?
>>
File: graduated.png (171KB, 946x887px) Image search: [Google]
graduated.png
171KB, 946x887px
>>59866820
I'm going to make the excuse that its 4AM where I am and I wasn't thinking straight.
I agree with Anon on the first post about job interviews. I don't know where I was going with my retort.
Although >>59866803 showed me the light.
>>
>>59866847
Matlab is made to do arrays and is probably the best language available to do arrays
>>
>>59866847
you should use numpy and scipy with Python. it's fucking great for arrays. really fast too (libs are written in C and Fortran I think?)
>>
>>59866863
>>59866870
Yes but when i learn other languages how do arrays work differently? I mean syntactically speaking. Say C++
>>
>>59866877
Most languages have different syntax, that's not an issue... Arrays are arrays and loops are loops, etc. If you know one, with little effort you know them all.
>>
>>59866847
Every second spent on Matlab correspond to losing one IQ point.
>>
>>59866784
Straw man argument.
>>
>>59866889
Goddamn, my IQ is like -10000 then. It's a wonder I'm breathing...
>>
>>59866891
I don't see you giving me a better alternative to my complain. Why you bitching?
>>
>>59866900
Scratch that. It must be like -1000000. Yes, it took me that long to correct myself. It takes a while for MATLAB to load...
>>
>>59866901
The better alternative to measuring dick length is
the regular interview process employers currently use.
Also stating fallacy in arguments isn't "bitching"; if anything is educating.
I don't if you do but I get nothing out of this 'online debate'. :^)
>>
>>59866939
Wrong.
>>
>>59866632
Random r = new Random();
String spaceLocation = String.format("%02d", r.nextInt(100));
>>
>>59867059
Thank you Anon, I had forgot about formatting.
>>
File: .png (245KB, 3000x3000px) Image search: [Google]
.png
245KB, 3000x3000px
Picture this.

You're a NEET who wakes up and goes to sleep at different times everyday which makes your sleeping and awake patterns pretty much different day by day

I live like this and I have trouble knowing what time of the day it is for me compared to a normal persons day who woke up at at 10:00.

If a person wakes up at 10:00 then they would have lunch at around 13:00. This means if I wake up at 15:00 I would have lunch at 18:00.

This program would show me the relative time of my day compared to a normal person so I can create a schedule for studying, having meals at normal times and knowing when to sleep.

What do you guys think? Would it be useful to you?
>>
>>59866615
you sound like a new grad looking for his first job
>>
File: 1491957157050.png (32KB, 555x421px) Image search: [Google]
1491957157050.png
32KB, 555x421px
>>59867200
wouldn't this just be a counter starting from 0 at the moment you woke up?
>>
>>59867203
Wow, stellar detective work.

I've had internships before. I've never been comfortable with them.
>>
>>59867200
I find it pretty easy to wake up at the same time when I have non-negotiable obligations to show up at a certain time and place.
Stop being a fucking neet, people weren't meant to live this way.
Even your hunter gatherer ancestors would get up at dawn to forage for food or else they'd die of hunger.
>>
>>59867200
Sounds like something you could make, but you shouldn't put on your resume...
>>
>>59867222
I was thinking of matching the minutes too
>>
>>59867239
fuck off normie
>>
>>59867245
>>59867200
you can schedule events with alarms on your phone's calendar. it is indeed useful to me.
>>
>>59867200
This sounds like it would further one's spiral into NEETdom.
Try making it in Excel/Calc first, and then implement in a program.

>>59867239
>Stop being a fucking neet
It's easy to say that, but bad habits die hard, anon. This is especially hard for people who've become NEETs in the first place
>>
>>59867256
>normie
Oh the ironing
>>
>>59867200
To me; no.
But I think I understand your idea. You create a routine based off counting the amount of time passed since you woke up.
Not that I'm doctor or anything but I've lived liked you and I got nothing done, I'm more efficient when I'm awake/asleep at the same times everyday.

Maybe you should create a game out of living a healthful life.
E.G
Congrats you got up early now you can play a Video Game ( Or other positive stimuli )
Congrats you walked n meters you can now eat a slice of cake.

Train people to be better people.
This would be more beneficial to everyone not just NEETs.
>>
>>59867256
>>59867263
Enjoy blowing your brains out at 29
>>
Question: Why is Python's class system so fucking stupid?
>>
File: 1487180970544.png (227KB, 500x375px) Image search: [Google]
1487180970544.png
227KB, 500x375px
>>59867281
idk about this guy but thats 1 year away for me
>>
File: 5352122.jpg (37KB, 678x519px) Image search: [Google]
5352122.jpg
37KB, 678x519px
>>59867291
nice b8 m8. you havin' problems writing a python class?
>>
>>59867281
More like killing innocents through resentment because they felt they were treated unfairly. They're Cain's Children.
>>
>>59867291
Because it's not CLOS.
>>
>>59867299
No, just curious why literally every single method within a class needs "self", why there's no private variables/encapsulation.

I like Python, just can't stand how much of a bandaid solution its class system looks like
>>
>>59867281
>29
Why would someone kill themselves when they're one year removed from gaining magical powers?

>>59867293
Congratulations!

>>59867303
>they felt they were treated unfairly
Most of them were. I won't debate why because this is /dpt/, but go read some stories from wizards.
>>
>>59867291
Guido doesn't know what he's doing. Everything was made kind of ad-hoc. It's the product of a "grown" language.
>>
>>59867333
The mental illness that prevented them from approaching the opposite sex also leads them to suicide.
>>
>>59867333
I've read a few, all I see are weak ineffective people with mental deformities being weeded from the gene pool.
>>
>>59867314
I guess? I'm guessing you write Java. You can emulate Java's encapsulation using the __ prefix on your class methods. That's not to say it's perfect but neither is Java's.

also consider the following case where self makes a difference:
```
>>> def my_method():
... pass
...
>>> class MyClass():
... def __init__(self):
... self.first = my_method()
... self.second = self.my_method()
...
... def my_method(self):
... pass
...
...
>>>
```
>>
>>59867388
Got damn that's ugly.
>>
>>59867388
>>59867314
I fucked up that formatting bad but you get my point.
>>
This is really cool
https://www.youtube.com/watch?v=rop0W4QDOUI
>>
>>59867333
I'm not saying they weren't treated unfairly. I'm saying they're resentful either way.
The feeling of being treated unfairly is not bound by actually being treated unfairly is what I mean.
To keep it related to /dpt/ I wrote it in Java.
[spoiler][/spoiler]
boolean anonFeelsTreatedUnfairly;
boolean anonIsTreatedUnfairly;

if(anonFeelsTreatedUnfairly && anonIsTreatedUnfairly){
System.out.println("RESENTFUL");
}
else if(anonFeelsTreatedUnfairly && !anonIsTreatedUnfairly ){
System.out.println("RESENTFUL");
}

if(!anonFeelsTreatedUnfairly && anonIsTreatedUnfairly){
System.out.println("FINE");
}
else if(!anonFeelsTreatedUnfairly && !anonIsTreatedUnfairly ){
System.out.println("FINE");
}
>>
>>59867314
the not fucked up version
>>> def my_method():
... pass
...
>>> class MyClass():
... def __init__(self):
... self.first = my_method()
... self.second = self.my_method()
...
... def my_method(self):
... pass
...
...
>>
File: 1h9.gif (3MB, 255x191px) Image search: [Google]
1h9.gif
3MB, 255x191px
>>59866546
>tfw Umaru-chan season 2 has been confirmed
>>
>>59867426
Thank you for the clarification (not trying to be sacastic by the way). Though more often than not, such individuals were treated unfairly due to the environment they grew up in and/or their mental state; as such their feelings are justified most of the time.
The current state of western society is such that wizards and similar fall through the cracks. Few are aware or care because the number doesn't justify any special action, the "victims" are hard to have empathy for. Whether this is wrong or not is up for debate. Regardless, I have no idea why I'm talking about this, and I'm going to stop.
/* /dpt/-related */
int wizard(unsigned age, int virgin) {
return age >= 30 && virgin ? 1 : 0;
}
>>
>>59867530
return (age >= 30 && virgin);
>>
Lisp is syntactic purity.
>>
File: 1469663567025.jpg (28KB, 455x348px) Image search: [Google]
1469663567025.jpg
28KB, 455x348px
>>59867550
God damn I'm retarded.
>>
>>59862288
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Numerics.Generic_Elementary_Functions;

procedure Wew is

package Float_Functions is new Ada.Numerics.Generic_Elementary_Functions(Long_Float);
use Float_Functions;

subtype Check_Range is Positive range 1 .. 40_000;

begin
for I in Check_Range loop
declare
Iterator : Natural := Positive(Long_Float'Ceiling(Long_Float(I)**(0.666)));
Goal : Positive := I**(2);
begin
while Iterator*(Iterator+1)*(Iterator+2) + 1 >= Goal loop
if Iterator*(Iterator+1)*(Iterator+2) + 1 = Goal then
Put_Line(
Integer'Image(I) & " because" &
Integer'Image(Goal) & " =" &
Integer'Image(Iterator) & " *" &
Integer'Image(Iterator+1) & " *" &
Integer'Image(Iterator+2) &
" + 1"
);
exit;
end if;
Iterator := Iterator - 1;
end loop;
end;
end loop;
end Wew;
>>
>>59867562
I was gonna learn Common Lisp and my friend said "oh man thats not what Lisp used to be" wtf does he mean and should I go ahead and install SBCL?
>>
>>59866666
>>
PYTHON IS THE MOST POWERFUL PROGRAMMING LANGUAGE
>>
File: 1491352179388.jpg (92KB, 400x400px) Image search: [Google]
1491352179388.jpg
92KB, 400x400px
>>59867575
>>
https://www.youtube.com/watch?v=17WoOqgXsRM
>>
>>59866559
*gets no users or useful libraries*
*decays into obscurity*
>>
>>59867422
that was pretty cool, actually
>>
>>59867624
Yeah the 50,000x50,0000 pixel maze was impressive
>>
>>59867567
I can't believe it was taking him over an hour.
import math
num = 0
i = 1
j = 2
k = 3
while(num < 4):
sum = i*j*k + 1
if math.sqrt(sum) == math.floor(math.sqrt(sum)):
num += 1
print math.sqrt(sum), i, j, k
i = j
j = k
k += 1


As an aside, I keep seeing this Jupyter Notebooks with %%time at the top, and that allows them to output something like:
CPU times: user 26.7 s, sys: 1.21 s, total: 27.9 s
Wall time: 28.1 s

What module is that? There is nothing in time itself that formats that well.
>>
>>59867720
>27.9s
Jesus Christ. Is that a joke?
>>
>>59867720
thats not a module it's a built in function of iPython. check it out it's called %time

https://ipython.org/ipython-doc/3/interactive/magics.html
>>
File: cython.png (8KB, 1024x768px) Image search: [Google]
cython.png
8KB, 1024x768px
>>59867720
>>59867748
Should have use Cython
>>
I'm going through the basics of PyQt, and I just have to know
Why do they insist on calling it a signal and slot?
Why can't they use industry standard terminology? I would have understood perfectly fine if they just called it an event, event handler, and delegate.
>>
File: 1491314872064.png (42KB, 805x545px) Image search: [Google]
1491314872064.png
42KB, 805x545px
Can someone give me a legitimate reason to use anything outside of C++? It has tons of features and STL is pretty useful.

All the other languages just seem unusable by comparison, it's like the windows 7 of languages.
>>
File: 1490484678175.png (435KB, 720x720px) Image search: [Google]
1490484678175.png
435KB, 720x720px
>>59867831
>Frogposter
>Says something completely retarded
Wow, what a surprise.
>>
>>59867831
``enjoy your memory management''.
Managed languages are just easier to whip something up as soon as possible.
C# also has super nice syntactic sugar.
>>
>>59867831
>>59867861
lol I was gonna say. "Uh the moment I need something offhand?"
from bottle import route, run, request

@route('/', method='POST')
def index():
print request.body.readlines()

run(host='0.0.0.0', port=80)

look now i have a server I can send POST requests to
>>
>>59867312
>implying clos isn't shit
>>
File: 1491547471923.gif (893KB, 400x554px) Image search: [Google]
1491547471923.gif
893KB, 400x554px
>>59866546
I want to get a job.
Do I need a degree to get a programming job if I already know most languages they're demanding for fluently?
>>
>>59868018
The degree makes it easier. It gives you access to new grad job postings. Otherwise, they'll just take experience and github and whatnot.
>>
>>59868018
No. But you will need a good portfolio
>>
>>59867748
>>59867807
That time was just an example from a notebook I read recently, not the time to run snippet I posted. [spoiler]Here is the notebook it's from if you're interested: http://nbviewer.jupyter.org/github/skipgram/modern-nlp-in-python/blob/master/executable/Modern_NLP_in_Python.ipynb was a really good read imo[/spoiler]

>>59867800
Thanks, I'll check it out
>>
if I wanted to write a program that would need to collect the first x amount of replies to a post what type of language would I need to use?
>>
>>59868051
I'd use an interpreted language like Python so you can use BeautifulSoup or Scrapy to scrape the page and python Requests to fetch it and such
>>
>>59868051
>>59868071
Someone made a python library to interface with 4chan API. Yeah. Use python. It is easy to learn and you can import anything that is hard.
>>
>>59868103
hunh, I didn't know that 4chan had an API lol. Looks like I just found my first Lisp project.
>>
File: whore1.png (327KB, 964x369px) Image search: [Google]
whore1.png
327KB, 964x369px
How do I read files from a different directory than the code in C++?
>>
>>59868051
haskell, it's so easy
use http://hackage.haskell.org/package/HTTP-Simple
for quering json
use some json lib like aeson
>>
>>59868112
https://github.com/4chan/4chan-API
Literally the first thing I googled
>>
>>59868113
Put the full path name, retard. And remember that in Windows you use the backslash(\), not the forward slash.

So you need to write double backslashes for every new directory.
>>
>>59868140
I don't doubt it's easy to find I guess the words '4chan' and 'api' had never graced my search bar at the same time before. been doin' uh.. other stuff.
>>
>>59868164
First thing that came to my mind when I want to download bulk images off /h/
>>
File: 1475849412181.jpg (95KB, 1096x688px) Image search: [Google]
1475849412181.jpg
95KB, 1096x688px
>>59868171
I hadn't fully considered the gravity of 4chan having an API. o_o
>>
are there any sites like pastebin but for hex? I need to create a paste that shows hex and ascii on the same time.
>>
>>59868269
I'm a really big fan of sprunge.us and ix.io
>>
>>59868301
I need something that lets me paste the hex and generates the ascii besides it, just like any hex viewer out there but it must accept hex as input and must show both hex and asii on the same page like in a table or something, I could use any paste site with plain text otherwise.
>>
Anyone happen to know how to import gensim word2vec model into a matrix or tensor? the worst kind of question, niche and basic
>>
File: g.jpg (438KB, 900x2134px) Image search: [Google]
g.jpg
438KB, 900x2134px
Is there a good reason to read SICP? I read through the wiki saying it's basically a waste of time unless you want to learn scheme (which isn't too big of a priority for me). Would it be better to get Art of Computer Programming or something?
>>
>>59868570
i was just going through the first chapter, and its actually kind of fun. scheme has a REPL for instant feedback. also, check

http://composingprograms.com/

its SICP-structured but in Python
>>
>>59866306
Yeah from the opengl programming end it's kinda like that.
I recommend reading https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/
Sure. It's not for novices but it's still informative of ways to think about your codes relationship with the GPU.
>>
Rate my fizzbuzz, actually compiles and works!

#include <iostream>
#define function decltype(var)
#define var auto
using std::to_string;
using namespace std::string_literals;


function fizzbuzz() {
var out = ""s;

for(var i = 0; i <= 100; ++i) {
out += i % 3 ? "" : "Fizz";
out += i % 5 ? "" : "Buzz";

if(i % 3 and i % 5)
out += to_string(i);

out += "\n";
}

return out;
};


function main() -> int

try {
std::cout << fizzbuzz();
}

catch(...) <%%>
>>
>>59868683
>#define var auto
Can you not typedef auto or something?
>>
>>59868699
<source>:4:14: error: typedef declared 'auto'
typedef auto var;
^~~


What kind of error is this even
>>
int main()

try {
std::cout << "asd";
}

catch(...) <%%>

why is this allowed
>>
>>59868113
You can directory with chdir just like you would with cd on the command line (on the simple windows version anyway).
>>
>>59868727
To catch exceptions from initialisation lists in constructors.
>>
Made a simple DOS based Denial of service program. Give it a try, tell me what you think.

http://s000.tinyupload.com/index.php?file_id=31533658777464690745
>>
hilarious when almost every leetcode problem metrics show java solutions significantly faster than C# solutions.
from what I've seen it's usually:
C > C++ > Go > Java > Python > C# > Ruby > Javascript
>>
>tfw my whole "java" project has a memory leak
>tfw just letting it run for 2 days causes the system to die
>tfw can't pin point the leak
>>
>>59868570
honestly if you want to have a better understanding of fundamentals, wouldn't hurt. even if you plan to be a java-developer or web dev or whatever
>>
>>59868879
>Python .> C#
Doubt
>>
>>59867584
this
>>
>>59868894
>can't pinpoint the leak
Either wrap your allocations and deallocations in functions that track them or use a tool like
https://clang.llvm.org/docs/LeakSanitizer.html
Or valgrind.
>>
>>59868962
Yeah I will do that, just annoyed that something I spent time and went slowly through not to fuck up, just fucked up.
>>
File: example2.png (51KB, 1442x524px) Image search: [Google]
example2.png
51KB, 1442x524px
>>59868912
here's an random "medium" difficulty bit manipulation challenge. out of the ~50 challenges I've completed, the distributions of the runtimes are almost always the same, even across different 'domains'. I was surprised, because I've been told C# is supposedly speedy.
now, this could mean shit, but it's interesting at least
>>
>>59866315
where did I use floating point?
>>
>>59868683
As someone who works on a team, I would diacourage you from using the ternary operator when "do nothing" is one of the results. It's hard to tell at a glance what the code should be doing. Use a regular if statement.
>>
Programming language poll continues
http://www.strawpoll.me/12732251
>>
>>59866546
     const Maybe<int> asd2 = nothing();

how do I do this in c++
it cannot infer the template argument from the assignment
but if I have to explicitly write out the argument every time I cannot have a nothing() that magically returns a good Maybe<T> for any kind of T anywhere
>>
>>59869508
nothing<int>()
>>
>>59869508
>>59869515
or, and this is the solution i'd recommend

make nothing the default constructor

const Maybe<int> asd2 = { };
>>
>>59869519
this is what i was looking for
t-thanks
>>
Entity = NTT();
Entities = <int> TTs();
>>
>>59869475
>Python is the 3rd most popular language
>>
>>59869584
There is nothing strange with Python popularity.
Popularity of Java is much more surprising.
>>
>>59869475
>Haskell on level with C++
Have we started the fire?
>>
>>59869620
Not surprised Java is the most common language taught outside of strict computer disciplines.

Engineers, business folks, humanities etc. They are all taught Java. Java was the Python before Python became popular.
>>
can someone post a functional solution to project euler problem 2?
>>
>>59869733
www.google.com
>>
>>59869733
not mine
let fibs = 1 : 2 : zipWith (+) fibs (tail fibs)
sum . takeWhile (< 1000000) . filter even $ fibs
>>
File: confuse.jpg (15KB, 300x300px) Image search: [Google]
confuse.jpg
15KB, 300x300px
I started doing the practice problems on project euler, one every day.
I'm on problem 3 and I think my logic is sound, its just that this method would take a long time before I see the result.
##lists the largest prime factor of the number 600851475143
number = 600851475143
factors = []
for var in range(2, number):
print(var)
if number % var == 0:
factors.append(var)

for prime in factors:
for num in range(2, prime):
if prime % num == 0:
factors.remove(prime)

print("the max is " + str(max(factors)))

I'm relatively new to programming and I don't know much. I've never had to optimize like this before. do you have any resources i could read on how I could optimize the speed?
>>
File: Ethernet_LAN.svg.png (88KB, 800x527px) Image search: [Google]
Ethernet_LAN.svg.png
88KB, 800x527px
Can somebody help me where/how to start. I learned basic syntax of python, I'm newb. I want to make a small lan chat so that my pc (windows 7) can communicate with my laptop (ubuntu 16.04). Oftentimes I just want to send links from one machine to the other without using emails or so. A simple chat, it can be in the terminal.

How could one start making LAN chat? Also, my pc does not have physical connection to laptop, only via wifi
>>
File: cover.jpg (2MB, 1632x1470px) Image search: [Google]
cover.jpg
2MB, 1632x1470px
In java what is the point of using more classes when you can do the same thing with less then 2 classes.

is it makes program more complex?
>>
>>59869852
You are finding the largest prime no?
Why are you testing your primes from smallest to biggest? Do it counting down.

Write a single function that can test if a number if prime number or not and have it go from num to 2 instead of 2 to num.
>>
>>59869927
You might not see the purpose for this in small, babby-level projects, but writing object oriented code is meant to add a layer of abstraction.

If you follow basic OOP principles (especially SRP), it will become easier to make sense of and work within a larger project.
>>
File: 1485260720930.jpg (70KB, 600x883px) Image search: [Google]
1485260720930.jpg
70KB, 600x883px
>>59866581
>>
>>59870275
>>
>>59870325
GCC (MinGW) or Visual Studio
>>
>>59866847
I'm assuming by array stuff you mean linear algebra. I have a few friends who used to exclusively use MATLAB at work (academia), but they switched to Julia a while ago and do not regret it. Python with numpy and scipy is also an alternative. Most of the linear algebra is the same LAPACK code either way, so it doesn't matter much which language you choose with regards to the performance unless you're doing something special. I wouldn't use C though unless you have a good reason. Armadillo works but it's not enjoyable.
>>
>>59870325
GCC

Use a mingw-w64 distribution either through TDM-GCC or msys2.

>>59870334
MinGW, the original, is not being maintained anymore. Don't rec it.
>>
>>59869885
Server:
import socket
from sys import stdin
from select import select

# refer to:
# * https://docs.python.org/3.5/library/socket.html
# * https://wiki.python.org/moin/TcpCommunication
# * https://docs.python.org/2/library/select.html

TCP_IP = '192.168.0.17' # your network address
TCP_PORT = 12345 # any random port
BUFFER_SIZE = 1024

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # create a TCP socket
s.bind((TCP_IP, TCP_PORT)) # bind it to ip:port
s.listen(1) # allow a backlog of 1


conn, addr = s.accept() # connect with client
keep_going = True
while keep_going:
ready = select([stdin, conn],[],[]) # wait for input from socket or keyboard
for author in ready[0]:
if author == conn:
data = conn.recv(BUFFER_SIZE)
if not data:
keep_going = False
conn.close()
break
print(data.decode('utf-8').rstrip())
else:
data = stdin.readline()
conn.send(data.encode('utf-8'))


Might not work on Windows, so set the server up on Ubuntu.

Set the value of TCP_IP to your computer's address within your wifi network and run the program. The other person can connect with a telnet client.
>>
>>59869885
>Also, my pc does not have physical connection to laptop, only via wifi
That's why we have the INTER-net: to be able to treat uniformly networks which run on radically diverse infrastructure. That's IP. If you use TCP/IP, you can obtain duplex stream connections. Say your laptop has adress 192.168.2.3 and you also have your desktop on the same subnet. We're going to use port 6666 because why the hell not? You install openbsd netcat or any equivalent bare TCP swiss army knife in both machines, you do nc -l -p 6666 on the laptop, nc 192.168.2.3 6666 on the desktop and voilà! A LAN serverless chat where everything you type on one end appears on the other and you're done! Other protocols are basically the same, it's just that the conversation is super formal and you have to say exactly the right thing to the program on the other side, or you can't talk with the other end directly and you have to both talk to a server to exchange messages, or you encrypt the stream or whatnot. IRC is just an Internet Relay Chat, where servers arrange to deliver your plain-text messages to the right client(s) and that's it. Now buy a raspi, plug it at your place and setup an irc server on it, it can't be made more simple. And IRC supports SSL/TLS.
>>
>>59870481
>And IRC supports SSL/TLS.
Wait forget about it: it's utter shit to use anywhere but on the public internet.
>>
>>59870334
>>59870380
Thanks.
>>
>>59869885
you should set a static IP for your laptop/desktop based on their MAC address
otherwise you'd have to flood your entire local subnet
>>
>>59869885
>>59870481
openbsd-netcat on the ubuntu laptop:
nc -l 6666

Or alternatively >>59870455's script,
telnet 192.168.0.17 6666

probably works even on wangblows. I know issuing 3 deeply magical commands feel less like an accomplishment than writing a big my-first-project entirely in python that's a chat client --- your mother will be less proud ---, but this is the first step in understanding how the whole computer science world works very hard to "keep it simple", as the saying goes.
>>
So have anyone pirated the Idris book yet? I'm not going to pay $40 for it.
>>
>>59870596
use genesis you NOOB
>>
File: libgen.png (34KB, 862x483px) Image search: [Google]
libgen.png
34KB, 862x483px
>>59870606
I did and all I got is a book on early islamic legal theory. This is not the one I want.
>>
>>59870629
Hello!

Idris programming language author here.

why the fuck are you trying to pirate my book !?
>>
>>59870629
>>59871038
busted!
>>
>>59870596
Do you already know Haskell?
>>
>>59871038
Because I want to read the book and I don't want to pay $40 for it. You should have published a free online version like the authors of Real World Haskell did.
>>59871087
Yes, I do. I've even spent some time playing with Agda and Coq.
>>
>>59866793
No, not really.

I can't tell at-a-glance what it does. Why aren't you using a List of the built-in tuples?
>>
>cleaning huge datasets and training cnns on a shitty laptop
kill me
it's so slow and I can barely do anything while it's running
>>
>>59869475
>only vote for perl
based me
it's a dream to write in aside from it being terrible for actually doing anything
>>
>>59871205
>it's a dream to write in aside from it being terrible for actually doing anything
Nani?
>>
Does anyone have any ideas on how to code out in the sunlight? I feel like there must be a way.
>>
>>59871460
what devices do you own?
>>
>>59871460
Buy an e-link reader with android, connect a keyboard to it and code.
>>
File: 20160502_152400.jpg (357KB, 2048x1152px) Image search: [Google]
20160502_152400.jpg
357KB, 2048x1152px
>>59871521 (You)
Alternatively you can just buy https://getfreewrite.com/products/freewrite-smart-typewriter .
>>
>>59867620
Wrong.
>>
>>59867991
Who are you quoting?
>>
>>59871460
Non-glossy screen will probably work better. Other than that, use a laptop with decent battery life and crank up the brightness.
>>
File: lisp_is_dead.png (40KB, 1161x602px) Image search: [Google]
lisp_is_dead.png
40KB, 1161x602px
>>59871582
Sad!
>>
>>59871597
read this sentence.
>>
>>59871638
Terrible graph.
>>
>>59871706
anime website
>>
>>59866559
>Lisp is the most powerful programming language.

Any Turing-complete programming language without flat memory model is as powerful as Lisp.
>>
>>59871521
How would I be able to code on an e-ink reader? Would I replace the OS?
>>
>>59871771
Any Turing-complete programming language without flat memory model is as powerful as Haskell.
>>
>>59871638
Isn't that graph relative to number search queries which was dramatically growing?
>>
File: lisp_is_dead_mkii.png (46KB, 1159x606px) Image search: [Google]
lisp_is_dead_mkii.png
46KB, 1159x606px
>>59871823
Just buy one with Android and root it to get access to the terminal, then use vim to write code. Maybe you'll even be able to install gcc on it.
>>59871839
I don't know, but you can see Haskell is stable and if you add Clojure it actually grows over time.
>>
>>59871830
Redundant claim.
>>
>>59871891
>I don't know
Welp it seems that it's absolute.
https://trends.google.com/trends/explore?date=all&q=%2Fm%2F01tlw,%2Fm%2F04kyw,%2Fm%2F06zrb,%2Fm%2F03j_q,google
>>
>>59866559
hehe ;) have you tried JAVA?
>>
File: 1481144585792.png (56KB, 782x790px) Image search: [Google]
1481144585792.png
56KB, 782x790px
why is agile devlopment more suited for handling changes in requirements?
seems to me that there would be a lot more tests, documentation and user manuals to change than in a traditional approach
>>
>>59872069
Christ-chan is cute!
>>
>>59872069
https://www.youtube.com/watch?v=a-BOSpxYJ9M
`Agile` is a stale meme no one gives a fuck about anymore, except for people who want to sell you books and courses on how to do agile development.
>>
>>59872069
I think the first thing to remember is that the difference between waterfall and agile contains a spectrum.

"Traditional" waterfall dev is
>scope the work
>design the work
>do the work
>test the work
>deliver the work
Only then are scope changes, feature requests, and other things generally even considered.

Agile basically builds this process into many small loops where you can get a minimum-viable-product out ASAP, immediately learn what your users are loving and hating, and then tighten in another feedback loop and implement it.
>>
>>59872069
>>
>>59872126
I always thought that Agile was a philosophy to building systems. Like keep close customer feedback and being accepting to change etc. (http://agilemanifesto.org/principles.html)
>>
>>59872177
>Like keep close customer feedback and being accepting to change etc
Is this not literally what I described in the last sentence of my post?

I was contrasting it to waterfall-style development.
>>
>>59872126
makes sense
won't there be a lot of architectural/design issues if you dont scope all the requirements of an application before coding shit though?
i.e. you run into some requirement down the line that doesn't fit your design at all

>>59872118
>some meme claims some other meme is dead
stop the fucking presses
>>
>>59872191
waterfall is a business model
the exact wrong way for software development
>>
>>59866546
I am learning pygame. It is disgusting.
>>
>>59872191
No, your post suggests a method with:
>Agile basically builds this process into many small loops where you can get a minimum-viable-product out ASAP...
The Agile philosophy never suggests how you should do it, like building software in small loops, but what you should do.
>>
>>59872201
>some meme
He's one of the authors of the manifesto tho.
>>
>>59866546

Learning Ruby. just a little program that opens files without specifing the directory.
>>
>>59866546
generating pic at runtime
>>
File: Screenshot (5).png (64KB, 1078x953px) Image search: [Google]
Screenshot (5).png
64KB, 1078x953px
>>59872462

whoops forgot the image lol
>>
>>59866635
>>59866660
Funny thing about Rust, none of the shills actually use it. They don't even know how to compile code. Maybe if they did they would know Rust has the slowest compiler ever written, and that's why it will never be used in production.
>>
>>59872475
Lol
>>
>>59872475
>application
Trash.
>>
>>59872544

Welp, mabye "program" sound more correct.
>>
>>59872483
I'm a Rust shill and I use it for my pet project and yes, it's somewhat slow because the smallest compilation unit is crate. All you have to do is to organize your code into individual crates so you don't recompile everything. Also, they're working on incremental compilation.
>>
File: 1469566688975.gif (2MB, 320x240px) Image search: [Google]
1469566688975.gif
2MB, 320x240px
>>59866546
Learning how to use vim + tmux
>>
>>59872572
Sprinkling your post with buzzwords doesn't make your narrative into reality.
Besides, Rust has been in a "working on it" state for, what, four years?
They're never going to deliver and you know it.
>>
Working on PCI support. I need a simple PCI device that's well documented and easy to program, so I can test my shit.
Any suggestions?
>>
File: incrimental.png (25KB, 1503x392px) Image search: [Google]
incrimental.png
25KB, 1503x392px
>>59872611
> They're never going to deliver and you know it.
It's already in the nightly: https://internals.rust-lang.org/t/incremental-compilation-beta/4721 .
>>
File: fractal.jpg (38KB, 800x366px) Image search: [Google]
fractal.jpg
38KB, 800x366px
Just sharing the only true language; all others are obsolete.
Enjoy :^)
https://hastebin.com/gituyesudo.js
>>
>>59872574
gl;hf
>>
@59872755
what language is this?
>>
>>59872799
ActionScript 3
>>
which one will get me going in the right direction?
https://teachyourselfcs.com/
https://functionalcs.github.io/curriculum/
https://github.com/open-source-society/computer-science
>>
What is "headless chromium"?
>>
>>59872833
Mein Kampf
>>
>>59872834
Chromium engine without the GUI I guess, something like Selenium or PhantomJS.
>>
Be real with me /dpt/, if Haskell is so great then why isn't all new software written in it?
>>
File: groovy.jpg (163KB, 699x593px) Image search: [Google]
groovy.jpg
163KB, 699x593px
Tell me about Groovy, anons. Will it let me abuse and slap the JVM around like the dirty whore she is?
At first glance it appears to be in the same vein as Ruby -- a nice little language with singular use case (in this case a web framework). Am I mistaken?
>>
>>59873678
It isn't. Even Lisp was widely used before the winter hit.
>>
>>59873678
new software isn't about being great
>>
>>59873742
>>59873735

But people are telling me that everyone that's smart uses Haskell and that by using it my programs wont have bugs. But when I look around I don't see any big new project being written in Haskell (in fact most are using shit like Go), so is everyone stupid or have i been memed? I am C# programmer btw
>>
>>59868113
use C++17 filesystem standard library faggot
>>
>>59873816
You're being memed.
>>
>>59873816
>>59873742
>>
>>59873678
Because normies can't into Haskell.
>>
>>59873705
It's a nice scripting language.
>>
Is it possible to make a function with n nested loops, being n decided at runtime without using recursion ?
>>
>>59873972
would require self-modifying code probably
>>
>>59874001
so? you think I'm some kind of pleb?
>>
>>59873972
I think macros will help you achieve that.
>>
>>59866632
I love diagrams like these. Got any more?
>>
Anyone know a good resource for learning C++ and specifically template programming?
>>
>>59874032
cppreference.com
>>
Are lexicographic permutations and algorithms to generate them useful ?
>>
Why are JIT compiled languages slower than native compiled languages?
A JIT compiler knows exactly what instruction set extensions the host has while a native compiler can only optimize for the most common instruction set extensions. So in theory any proper JIT should destroy an -O2 program, but in practice it's the reverse.
>>
>>59874165
maybe because they're busy compiling
>>
>>59873972
void func(int n)
{
for (int i = 0; i < n; i++) {
// Well that easy...
}
}
>>
>>59873972
If you can do it with recursion, you can do it with iteration.
>>
>>59874228
Oh, you said nested calls. Ignore me...
>>
>>59874165
>while a native compiler can only optimize for the most common instruction set extensions
Not true. GNU compilers do not implement multiple code paths, but for instance Intel's do.

>So in theory any proper JIT should destroy an -O2 program, but in practice it's the reverse.
Most JIT'd languages also have a garbage collector, which trades development efficiency for performance.
>>
>>59874165
Because JIT languages are always full of other inefficiencies.
>>
>>59874243
https://pastebin.com/8DLw5EYB

This is an algorithm to calculate the lexicographic permutations of a vector of integers, ex: {1,2,3}
How can I write it with iteration ?
>>
>>59874319
http://blog.moertel.com/tags/recursion-to-iteration%20series.html
>>
>>59874319
>>59874243
The swap is: swap(vector, index a, index b)
>>
>>59874310
>Not true. GNU compilers do not implement multiple code paths, but for instance Intel's do.
Is that why ICC is faster on Intel chips than on AMD chips?
>Most JIT'd languages also have a garbage collector, which trades development efficiency for performance.
But isn't atomic reference counting slower than garbage collection?
>>
>>59874396
>Is that why ICC is faster on Intel chips than on AMD chips?
Partially, yes. Almost all optimized codepaths on ICC checks for the "GenuineIntel" string in the CPUID.

>But isn't atomic reference counting slower than garbage collection?
You forgot about manual memory allocation.
>>
>>59874396
Reference counting adds overhead all the time. GC leads to intermittent pausing. And of course it's not like you need either.
>>
File: 1473442521136.png (21KB, 900x900px) Image search: [Google]
1473442521136.png
21KB, 900x900px
>GC is slow
>b-b-b-b-buh reference counting
>>
>>59874470
kys
>>
>>59874470
>frogposter
>is retarded
>>
>>59874509
>sherlock
>>
>>59874414
>ICC checks for the "GenuineIntel"
I wonder what would happen if you were able to trick it so it follows the Intel code path on your AMD chip.
>>59874414
>>59874418
>manual memory management
Obviously manual memory management is faster (or is hardware garbage collection faster?) than garbage collection. How would C++, when using atomic reference counting like std::shared_ptr and std::unique_ptr, hold up against something like Java when dealing with lots of (de)allocation?
>>
>>59874533
>I wonder what would happen if you were able to trick it so it follows the Intel code path on your AMD chip.
Patchers already exist for that, no?

>How would C++, when using atomic reference counting like std::shared_ptr and std::unique_ptr, hold up against something like Java when dealing with lots of (de)allocation?
Here's an exercise for the reader.
>>
>>59874533
unique_ptr is zero overhead. Overall it's likely that if you were to use shared_ptr for everything it would be less efficient than a good GC, but nobody does this. The only language I know that reference counts everything is Swift.
>>
>>59874553
Swift does it because Objective-C and, in general, Apple's software do.
>>
>>59874565
Yeah I think Apple decided that having a slightly less responsive interface (generally negligible) would be better than having an interface that stutters all the time, yet they didn't want their programmers to do MMM. Good decision IMO at least in the mobile world.
>>
>>59873816
>But people are telling me that everyone that's smart uses Haskell and that by using it my programs wont have bugs.
No program is screened from bugs unless it's provable. There are numberless RFCs, standards and unspoken standards used in most programs.
>>
>>59867517
You lie.
>>
>>59874553
>unique_ptr is zero overhead
That's pretty neat. I always thought unique_ptr had some, but not as much as shared_ptr, runtime overhead. Apparently Rust shills bash on C++ because of it's way of dealing with memory for no apparent reason.
>>
Any Rust people here?

How can i get a struct's data at a call site?

I don't really know how to explain this well. I have a struct. When I need to give the struct it's own data at a callsite, can i just say StructData = StructData? Or is there something else I should do?

I also have like a thousand other stupid questions if someone has the time and willingness to answer.
>>
>>59874029
they're called mind maps, i was forced to make them about basically everything when i was in school
>>
>>59874778
> to give the struct it's own data at a callsite
Do you mean like
impl StructData {
fn func(&self) {
// use self.xyz
}
}
>>
Best JVM language?
>>
>>59874588
Didn't they make that decision years before they even considered getting into mobile, though?
>>
Do you know any program that can recursively search a string of text through multiple files in a directory and subdirectories at once? I'm trying with grep but looks like the msys version isn't working properly:
grep.exe -i -n -b -H -R -l -T 'stringtosearch'

No output text in console except the underline, it remains stuck running like this.
>>
>>59874855
Uhh, not really.

So, I have a Struct. Then in a completely different file, I have a call to a function in the impl of said struct. I need to get a specific struct items data.. well, back to the struct :D That impl function which is called at the callsite basically replaces all of the struct values, but I need to keep the old value for this one entry.

Kind of hard to explain.

I'm wondering if i should do (at the call site) something like let struct_data = StructData, and then in the call to the impl function I do struct_data: struct_data?
>>
>>59874916
You forgot to tell it where to look, no? For instance, adding a dot as the final parameter will (should? it does on Linux) make it search in the current directory you're in.
>>
>>59874640
Rust is a lot better than C++ when it comes to memory management for other reasons. Rust has affine types and was designed from the ground up with moving, ownership, and borrowing in mind. It can do RAII more efficiently and more safely.
>>
>>59874927
If the impl function you want to call is a static method, i.e. without the `self` argument, you can call it via struct's namespace, like SomeStruct::some_funct();
>>
>>59874916
Can't you just do -inbHRlT btw?

I don't know, there was some difference between GNU and BSD parameter-handling, IIRC one of them supports just putting them all together.
>>
not sure if i can ask this here

so I'm learning java, and im stuck on an exercise

it has to have 3 parameters.

basically its a function that has to put

have to do a "line" with 3 dots of differents color, colors red blue and green.

colorLine(Red, Blue, Green) (order ca be w.e)


problem is that the order can be different and all,

idk how to do that
>>
should i learn C, basic, or Julia?
>>
>>59874916
> Do you know any program that can recursively search a string of text through multiple files in a directory and subdirectories at once?
grep, actually, you'd be better off with ack, ag or ripgrep for this.
>>
>>59874963
Okay. So if this StructData struct has another struct StructData2 inside it, should I call StructData or StructData2? :D I mean I guess they're identical? (Structs work by reference, not by value?)

The StructData2 struct is constantly being updated. That's actually the second problem I don't have an answer to yet.

So, I basically need a snapshot of the StructData2's values when calling the impl function from a call site. So basically StructData holds a StructData2 entry, but it should stop updating once it.., well, starts existing.

Is this where this https://doc.rust-lang.org/book/structs.html#update-syntax would come in handy? I just throw a .. in there and the values stop updating in StructData?

And can I use .. when I'm not giving any of the actual values to the Struct in the call?

The values are supplied somewhere totally else, in multiple locations. I don't want to touch those sites.

This is pretty tricky for someone who's never used Rust before.
>>
>>59875002
C far and away. even if it's not used a lot in new code, there's loads of legacy code written in it. including *nix operating systems..
>>
>>59875027
Which one should i start with practicing in?
I plan to make a simple game in some simpler language, either:
lua
java
C
Julia

which one is the best for this summer-mission i have planned?
>>
>>59874999
formulate a proper question before you let us do your homework
>>
>>59875055
Lua is the best of those languages for a simple game. None of those languages are good for a complex game (maybe Lua for scripting).
>>
>>59874963
I only now took a look at whether or not it's static.

So, there's both
pub fn new(asd1: asd2, asd3: asd4, asd5: asd6) -> Stuff {

as well as
pub fn load(&mut self, asd1: asd2, asd3: asd4) {

So looks like there are both static and non-static functions, and they all have uses at different call sites.

So, how do I do it when it is static?
>>
>>59874944
kek you're right, it just werks even on wixoss:

grep.exe -i -n -b -H -R -l -T 'stringtosearch' .


It gave me only a list of files though.

>>59874966
Same results with -inbHRlT it just prints the file names, no table.
>>
>>59875055
C. You can use SDL2.
>>
>>59875076
what would be good for a complex game?
>>
>>59875009
can you give me an example of recursive search with grep? I can't get it to print the line numbers/offsets and the table, it returns only the file names: >>59875082
>>
>>59874778
>>59874927
>>59875024
I have no fucking idea what you are trying to do.

>>59875105
C++ if you want middleware, Rust otherwise.
>>
>>59875066
tried my best m8
>>
>>59875105
If you're serious about programming a complex game, you should use something like Unity.
>>
>>59875118
>problem is that the order can be different and all
what does that even mean?
>>
>>59875024
I don't follow you at all. If you want for someone to answer, post more code and

less

unnecessary

spaced

text.
>>
File: 12321.png (42KB, 1192x883px) Image search: [Google]
12321.png
42KB, 1192x883px
>>59875141
the color order.

ill post a pic but its in spanish (im a spic my english is bad)
>>
>>59875115
>I have no fucking idea what you are trying to do.
D:

In file1.rs I call file2.rs' Struct1 impl functions.

The Struct1 in file2.rs holds another Struct inside it, we'll call it Struct2 (which exists in file3.rs but doesn't matter).

So, in Struct1 i need a snapshot of Struct2's data from when the Struct1 impl functions get called. The Struct1 impl functions basically replace all the data in Struct1, because that data needs to be updated sometimes. What I need to do is get Struct2's data with those impl function calls, stuff it in Struct1 and make it stop being in sync with Struct2.

This is pretty complex. Not a good first Rust program for sure.
>>
>>59875107
grep 'regex' -R ./
>>
>>59875167
I can't really copy the code form the project, it's company-code and way too many lines and shit.

I tried to explain as well as I could in >>59875187
>>
>>59875172
triada(color1, color2, color3) {
put color1 in cell1
put color2 in cell2
put color3 in cell3
}
>>
>>59874999
just look at the types
>>
>>59875221
I love you thanks
>>
new thread
>>59875306
>>
>>59866693
>mediocre
>/g/
yup sounds right
>>
>>59869475
>http://www.strawpoll.me/12732251
Python i can understand
But fucking java looks like it was voted to the top ironically
>>
>>59866546
i'm working on summoning the self discipline (and failing every day) to actually learn python, html, sql, ccna etc. for getting into network security. you?
>>
File: file.jpg (65KB, 641x581px) Image search: [Google]
file.jpg
65KB, 641x581px
Hey I'm looking to do a project that appears impressive but is in reality extremely simple. This is to add to a github repo that I send along with applications and such.

What are good projects that can impress HR people that take not much time?

I'm a decent programmer and I know C and C-based languages in addition to Lisp

Pls help <3
Thread posts: 323
Thread images: 48


[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.