[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: 314
Thread images: 29

File: 1487820592296-1.gif (937KB, 500x357px) Image search: [Google]
1487820592296-1.gif
937KB, 500x357px
What are you working on, /g/?

Old thread: >>62426259
>>
>>62431668
hi
>>
>>62431583
From that post, I'm mainly concerned with the bit about assets. Yeah, I can whip up some code, but I absolutely cannot do anything more than the most basic MSPaint stuff.

>you can start right now and land a client in 30 minutes theoretically
>I had my first client in under 2 hours, including signing up and writing a basic profile (ymmv)
So I have my 3-4 presentable iOS projects, my McJob, a dress shirt, and nothing else. What do I do—take a mugshot, write that I'm a miserable faggot with no real experience and then hope for the best?

Joking aside, can you give me any tips on spinning my very modest resume into something hirable there?

Anyway, thanks for all of this info and the encouragement, I really appreciate it.

>>62431566
Sounds like the way to go, honestly. I'm too honest and forthright when it comes to my drawbacks and I've had some bad luck with bullshitting because I'm such a beginner so I've been avoiding doing any further bsing, but I suppose that's the way to go for someone in my position.

>>62431607
This is true
>>
>>62431720
hello
>>
>>62431720
Hi yourself.
>>
File: 1486972681087.jpg (23KB, 261x311px) Image search: [Google]
1486972681087.jpg
23KB, 261x311px
Have you eaten your Lainos today, /dpt/?
>>
File: basehunter head.jpg (13KB, 213x202px) Image search: [Google]
basehunter head.jpg
13KB, 213x202px
Decided to play around with ANTLR a bit. Then I got the bright idea to implement a cancerous language in another cancerous language. It compiles BASIC into bytecode, then a Java program executes it.

In other news, my brain tumor is inoperable.
>>
>>62431852
>basshunter
how much do you think this guy made from his few hits? was he mostly an e-celeb? I hope he made money from that
>>
>>62431723
There are many resume templates available and even more guides on how to fill and write them. It's best to start now instead of continuing to converse and asking for emotional support.
>>
Bump for Lain
>>
>>62431890
>It's best to start now instead of continuing to converse and asking for emotional support
Understood

I am however looking for specific advice on what to do with what amounts to basically no relevant education and no relevant job experience. Can I just leave them off of a resume entirely? What's the 'best' thing to do in this bad situation?

I don't need any more emotional support, but there's not much out there in the way of advice for this specific question
>>
File: energy_efficency.png (340KB, 858x792px) Image search: [Google]
energy_efficency.png
340KB, 858x792px
All the languages below the red line should be banned by 2025 and extremely energy-inefficient, If you're using these languages please consider switching to the more environment-friendly alternatives. Remember, by using these languages you're making yourself directly responsible for the Global Warming.

Source: http://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf , https://sites.google.com/view/energy-efficiency-languages/results
>>
>>62431904
Play up what you can do. Depends on where you are interviewing. If you're interviewing with head bitch at HR, then gussy that fucker up with everything HR will love. Leave the technical shit to a minimum and describe the higher-level concepts.

If you're interviewing with an engineer or at least someone with a pulse and a degree that isn't in feminist underwater autistic dance therapy, consider talking more about the technical aspects of your projects.
>>
>>62431924
This is missing many factors that would better paint a "green" initiative picture. Namely, developer time, considering humans are extremely destructive carbon-footprint-wise.
>>
>>62431939
sorry m8 i know i'm talking to multiple different people here, i was asking for the purposes of freelancing via upwork

if I play my cards right I assume I can put freelance work on my resume and bypass this problem entirely
>>
How good am I in JAVA if I have no problems solving everything in codingbat. Am I fit for a computer science degree?
>>
>>62431924
>banning pascal

You can have my freepascal when you pry it from my cold, dead hands.
>>
>>62431952
Don't bother putting anything related to your education down if you all have is a high school diploma. All your clients care about is a list of projects and/or products you've worked on and how well you present yourself. Now go, anon, and impress us.
>>
File: spurdo.png (117KB, 1024x749px) Image search: [Google]
spurdo.png
117KB, 1024x749px
>>62431994
>Don't bother putting anything related to your education down if you all have is a high school diploma. All your clients care about is a list of projects and/or products you've worked on and how well you present yourself. Now go, anon, and impress us.
I... I will
dog bless
>>
>>62431954
You're fit for a lobotomy.
>>
>>62432050
jokes on you I'm already a brainlet or why do you think I would ask such a question and now go kys
>>
>>62432078
but seriously am I a complete beginner or already have some basic knowledge
>>
>>62431954
Try these
https://code.google.com/codejam/contest/6314486/dashboard
>>
>>62432097
Look, if you can write useful software in Java, then it's safe to say you aren't a complete babby with the language.
>>
>>62432115
kek kys cuck
>>
>>62431846
Yeah they keep me wired
>>
>>62432124
I can make a calculater kek so I m not a complete baby I guess?
>>
>>62431924
Time to set up a server farm executing random Perl scripts non stop in the amazon

HACK THE PLANET
>>
Anyone else feel like the highs and lows are too much?
>>
>>62431668
Friendly reminder that the concept of inheritance is broken at its core and should be done away with. Algebraic data types are the future, or to put it in a friendlier away: Use composition, never inheritance.

Also, friendly reminder that contract-oriented design (interfaces) are a meme as well. A semantically well-structed program will 99% of the time depend on an implementation's behaviour and not just its interfaces, meaning that using the interface as the type is misleading because it does not accurately capture the meaning of your data. This is a consequence of inheritance sucking balls.
>>
Object oriented matlab. I only attempted suicide twice today!
>>
>>62432210
I feel absolutely amazing when I figure a bug out then when I don't and I've been working on it for hours I feel like the biggest idiot on Earth.
>>
>>62432210
Post some thigh highs and low socks!
>>
>>62432227
>object oriented matlab
what the fuck are you doing?
>>
>>62432226
inheritance and interfaces are just partially defined sum types
prove me wrong
>>
>>62431954
computer science has nothing to do with programming tho
https://www.youtube.com/watch?v=0JUN9aDxVmI

for software engineering, maybe
>>
>>62431948
>>62431924
Considering Pajeets use less water and energy overall, Java should be considered the greenest language.
>>
i'm working on being an uninspired neet
>>
File: pAPcsCB.gif (2MB, 472x259px) Image search: [Google]
pAPcsCB.gif
2MB, 472x259px
i'm recompiling a program that was made in 2002.
It's a simple gui file explorer written in C and xforms toolkit.
Can't show any code tough it's proprietary :^)
>>
>>62432425
Being proprietary does not imply being closed source, nor does being closed source mean being proprietary.

You don't understand freedom, as in beer that is free, so you are dumb, as in idiot that posts idiotically on https: // boards . 4chan . org / g /
>>
>>62431924
i'm sure i'm not alone in having several questions about this data
>>
>>62432470
I wonder how Go uses so little memory, being a language with GC.
>>
>>62432468
>beer that is free
no such thing
>>
>falling for the dynamic memory allocation meme
>But it makes your programs faster and lighter!
>>
>>62432601
just use vector.push_back()
all the benefits of dynamic allocation with none of the downsides
>>
>>62432626
>benefits of dynamic allocation
there aren't any
>>
>>62432468
Like I said the code does not belong to me and i also have no right to share the code to anyone.
The program is written for freebsd 3 and IRIX unix.
So why the fuck should you even give a single fuck about it.
>>
>>62432542
What's Go's memory model even like? I see a lot of pointers, are these GCd refs or what? Can you explicitly stack allocate?
>>
>>62431668
Gonna probably be assigned my first lab today in my Python course. I don't know what to expect, any suggestions?
>>
>>62432678
>explicitly
no
>stack allocate
yes
>>
>>62432685
hangman.py
>>
>>62432542 (You)
Then again, the implementations aren't equivalent, the ones in Go could sacrifice performance for memory by not caching intermediate results for example.
>>
>>62431668
Writing a Lua bytecode interpretator
>>
>>62432788
It better be written in assembly.
>>
>>62431668

Gameboy Emulator without sound of course I don't know shit about sound emulation.
>>
File: 1504639061714.jpg (23KB, 385x309px) Image search: [Google]
1504639061714.jpg
23KB, 385x309px
>He puts spaces at the beginning and end of function parameter lists
>>
Working on a way for customers to add port forwarding rules to their routers so they don't have to fuck with the real config
Probably going to push it from the user portal using Ansible
>>
write some rust they said
    let mut todo: BTreeSet<adorned::PredHead> = BTreeSet::new();
let mut done = adorned::RulesSet::new();

// start with the query
todo.insert(adorn_pred(&BTreeSet::new(), &query).head);

loop {
let mut todo_iter = todo.into_iter();
let next = todo_iter.next();
let rest = todo_iter.collect::<BTreeSet<_>>();
todo = rest;

if let Some(ph) = next {
match db.get(&ph.name).expect("Rule does not exist") {
&schema::RuleType::IDB { ref rules } => {
let arules: Vec<_> = rules.iter()
.map(|r| adorn_rule(
&Vec::from(ph.adornment.clone()),
&r.head,
Vec::from(r.body.clone())))
.collect();
{
let idb_heads = arules.iter()
.flat_map(|r|
r.iter()
.filter_map(|p| match db.get(&p.head.name) {
Some(&schema::RuleType::IDB { .. }) => Some(p.head.clone()),
Some(_) => None,
_ => panic!(format!("missing rule '{}'", p.head.name))
})
.collect::<Vec<_>>()
)
.filter(|ph| !done.contains_key(ph))
.filter(|ph2| ph.name != ph2.name)
.collect::<BTreeSet<_>>();
todo.extend(idb_heads);
}
done.insert(ph.clone(), arules.into_boxed_slice());

},
&schema::RuleType::EDB { .. } => ()
}
} else {
break
}
}
done
>>
>>62433051
>if let
this is sexy
>>
>>62433051
this is somehow bettah than C++
*sh m h*
>>
>>62433051
This is more write-only than C++. Hell, it's almost as bad as Perl. Rustfags BTFO.
>>
How do you do it lads? I've got a whole load of personal projects I want to be getting on with but I'm so burned out from writing garbage at my shitty job at a big tech firm that I can't motivate myself to do the interesting stuff when I get home.
>>
>>62433051
does rust have constructors?
>>
>>62433051
You're definitely doing something wrong with this loop, doing into_iter -> collect on every iteration is just wrong. I understand you can't use `for` because you need to modify the container, but consider using the container directly without iterators, basically, all you need to do is to pop the top element, I think Vec would be perfect for this.
>>
>>62433144
It doesnt have classes, just structs and enums.
people generally write constructing functions if you need lots of members set
>>
>>62433196
yeah i wasnt sure if i needed faster .contains() or faster .pop().
But i do need to do both
>>
>>62433144
Rust has static functions, which can be used as constructors:
struct A {
x: usize,
}

impl A {
pub fn new(x: usize) -> A {
A { x }
}
}

[...]
let a = A::new(10);
[...]
>>
>>62433233
How do you initialize an object on the heap then?
>>
>>62432664
So I guess you just create arrays with size_t length?
How do you store elements in a container without knowing how many elements you're going to be storing? Some kind of arbitrarily decided upper bound? That's terrible practice.
>>
>>62433245
Conceptually, by moving the value into the heap, practically, by calling the constructor on the allocated memory.
let a = Box::new(A::new(10)); 
//this is equivalent to
// auto a = make_uniquie<A>(10);
>>
>>62433245
Box::new(123) // its an int on the heap
>>
>>62433292
It's not equivalent.
The rust version requires a move into the heap. The C++ version is constructed directly in-place in the heap.
>>
>>62433336
is that a problem, small stack?
>>
>>62433292
So you create a temporary on the stack and then just do a copy onto the heap? Huh. Does that get optimized away?
>>
>>62433372
Space is not the problem here. Time is.
And yes, I should be able to bypass the stack if for some reason I need to construct a massive object.
>>
>>62433336
>>62433373
Yes.
>>
>>62433336
>>62433373
It should, but it looks like sometimes LLVM doesn't optimize it: https://godbolt.org/g/vCFmB4 , yet it does with the box syntax: https://godbolt.org/g/rrTA4h . I guess it doesn't show itself in the benchmarks because creating large arrays in the heap is a rare case, you use Vec instead.
>>
>Xlib: sequence lost (0x3efc8 > 0x2efc9) in reply type 0x23!
what the fuck is your problem
>>
>>62431924
So webdevs are quite literally shitting all over our neat little planet?
>>
>>62432271
They are 'open' types, that is the problem.
You need to be able to model both open and closed sets of things conforming to some structure.
>>
>>62432271
Inheritance implies subtyping, which is a big mess.
>>
and you don't seem to understand
>>
>>62431924
Wow, I always knew Python was an utter shitlang.

>>62433627
Yeah, ironic since they're all vegan hippie code artisans.
>>
>>62433706
agreed
>>
>>62433601 (You)
Looks like it does initialize in the heap when I use an array of usize: https://godbolt.org/g/nPcnkd , but not if I use an array of u8: https://godbolt.org/g/kdmo5A . It looks like initialization is directly on heap if no large arrays are involved, for some reason. Still, the box sytnax fixes it, they should have really stabilized it a long time ago.
>>
Reminder that closed polymorphism (sum types) and open polymorphism (interfaces) can both be implemented with the lowly function type.
>>
>>62433855
please demonstrate, I am curious
>>
>>62433841
Rust is not production ready
>>
>>62433627
Using "scripting languages" is basically a morally wrong action, everyone should be ashamed of it.
>>
>>62433878
>a minor optimization sometimes doesn't work in corner cases
>the language is not production ready
I guess no language is production ready then, certainly not C/C++: https://github.com/gergo-/missed-optimizations .
>>
>>62431924
Shit a post from my former department made it here
>>
I feel like "Employed Rust programmer reporting in" is much more memey tbqh
>>
>>62433907
>C++
>GitHub page is about C compilers

Also,
>Minor
>>
>>62433868
https://en.wikipedia.org/wiki/Lambda_calculus#Pairs

the first item can be your tag, the second can be your value
>>
>>62433907
What is C/C++? A new language?
>>
>>62433868
>>62433954
and an interface is just a collection of things, use a tuple
>>
>>62433970
No, it's an expression, it evaluates to 1 and then increments the value of C.
>>
>>62433868
newtype Option a = Option (forall c. c -> (a -> c) -> c)
none :: Option a
none = Option $ \n s -> n
some :: a -> Option a
some a = Option $ \n s -> s a

maybe2option :: Maybe a -> Option a
maybe2option Nothing = none
maybe2option (Just a) = some a

option2maybe :: Option A -> Maybe A
option2maybe (Option h) = h Nothing Just


data Shape a = Shape
{ perimeter :: a -> Float
, area :: a -> Float
}

newtype Circle = Circle { radius :: Float }
circleIsShape :: Shape Circle
circleIsShape = Shape
{ perimeter c = 2 * pi * radius c
, area c = pi * radius c * radius c
}

newtype Square = Square { length :: Float }
squareIsShape :: Shape Circle
squareIsShape = Shape
{ perimeter c = 4 * length c
, area c = length c * length c
}

perimeterAreaRatio :: Shape a -> a -> Float
perimeterAreaRatio s a = perimeter s a / area s a
>>
Rust's support outside of x86_64 and i686 on the big 3 operating systems is really shit. Tried to grab some mips toolchains through rustup. Nothing fucking worked. They would either fail to install or fail to compile a simple program, complaining about a syntax error on their own scrpts without looking at the program.
>>
>>62433883

What are I/O bound programs?
>>
>>62434237
Doesn't reduce the energy overhead.
>>
If I have a fairly big program written in c++, can I give it a gui by wrapping it in java?
>>
>>62434380
sure, use the "java native interface"
>>
I've got a question for you guys.

Say you've got a structure that's something like
company
region
office
manager
employee

When is an example of a good time to be instantiating one of the objects higher up like 'region' rather than just using more specific SQL to get only what you need in the first place? Should you ever even be instantiating the whole thing it outside of something like a page that displays all valid information?

I feel like maybe I'm being unclear, but what I mean is should the data for a getAllEmployees() method for the Region object be loaded/queried from the DB when the method is called, or when the Region object is created.
>>
>>62433931
I'm an employed rust programmer though. The previous team full of incompetent C programmers so my boss decided to convert the entire company over to rust.
>>
>>62434425
I accidentally some formatting.
The structure there is supposed to be hierarchical, one to many going down that list.
>>
>>62433883

That is not a smart thing to say and makes you look like an idiot.

Maybe you should read "the pragmatic programmer" or just lurk more.
>>
plug in background: r=0, g=128, b=255 and text: r =0, g=32, b=64 on your terminal colors and that's what i'm looking at right now. looks very aesthetic
>>
Anyone know a bit Angular mojo?
Say I have a parent component, inside it is a child component with the directive *ngFor. Now say my parent component has a button. When I click that button, how can I make all of my child components run a particular method?
>>
>>62431924
C is my wife. i'm so proud of her!
>>
>>62434593
i heard if you learn the react framework on codeacademy you'll make an average of $105k starting
>>
Reminder that dynamically typed languages and languages with GC are brainlet tier and the reason why a) Pajeets are taking your job; and b) software is becoming bloated.

If you support these languages, you are literally supporting shit programs and shit programmers.
>>
>>62434637
i thought lisp was a pretty good language
>>
>>62434593
go to /wdg/
>>
>>62434648
Lisp is an exception because static typing was not invented in 1958. I know /dpt/ has a penchant for old languages, but things have improved since then... and then worsened. Programming peaked in 1978 when static typing was invented.
>>
>>62434637

>dynamically typed languages

Like Lisp, for example? The very language that invented garbage collection in the first place?
Or Matlab?

Stay classy, /g/..
>>
File: a career in game development.jpg (100KB, 610x537px) Image search: [Google]
a career in game development.jpg
100KB, 610x537px
Quit your job and make videogames
>>
>>62434425
dont load things from the db until you need them
>>
>>62434707
I make $180k as a software developer at a major investment bank and make games on the side. My most recent game costs $19.99 on Steam and has over 10,000 sales.
>>
>>62434637

>languages with GC

..like Haskell, Idris and Prolog?

Sepples-tard.
>>
File: 3Gt2MUh.png (1014KB, 1152x864px) Image search: [Google]
3Gt2MUh.png
1014KB, 1152x864px
>>62431668
>Feeling depressed about java assignment
>Just found out about arraylist

Holy fuck I wanna cry this makes everything so much easier.
>>
File: java collections cheatsheet.png (121KB, 1048x1236px) Image search: [Google]
java collections cheatsheet.png
121KB, 1048x1236px
>>62434885
don't tell me you were resizing your arrays by hand
I don't know how you can live without standard library collections
>>
>>62434815
Yes, purely functional languages are shitlangs for circlejerking neckbeards and washed-up academics. Does this surprise you? They might interest you, but they have no application. It's like if I said, "Cars made of wood are shit!" and you said, "You retard, my soapbox car rules!" Yeah, alright, kid. Enjoy playing with your toy language. Hope it makes you feel superior to a C++ software engineer raking in a six figure salary. At least you have your integrity, right? Bite me.
>>
>>62434815
Nice to read and write but they produce horrible programs.
>>
File: 1505013119305.jpg (99KB, 720x720px) Image search: [Google]
1505013119305.jpg
99KB, 720x720px
>>62434885
>>
Anyone familiar with Qt and QML?
Is there any way to see if QML accepted a QEvent and propagate the event to my OpenGL widget if it hadn't?
>>
>>62431668
Learning Python, not so sure if I'm making a mistake.
>>
>>62434947
please use a green-friendly programing language in order to protect our earth

see >>62431924
>>
>>62434947
it's a good language for when you have to actually get something done. but it's often ad hoc and ugly
>>
what's the point of atoi, atof etc when you have sscanf
>>
>>62434896
I'm doing this in C++, but can't figure it out. I need to grow an array tmp once it runs out of space reading in a file.
string resizeArray(string* tmp, int sizeOfArray) {
int newSize = sizeOfArray * 2;
int i = 0;
string* newArray = new string[newSize];
while(i < sizeOfArray) {
newArray[i] = tmp[i];
++i;
}
delete[] tmp;
return *newArray;
}


When I cout the contents of new array it has everything I want. So is this how I should return it? I want to delete tmp and then assign it to this newArray.
This isn't working. Please forgive me if this is obvious, this is my first time working with pointers.
tmp = *resizeArray(string* tmp, int sizeOfArray);  
>>
>>62435119
use realloc faggot
for vectors, multiply the maximum size by 1.25 every time you run out of room
>>
>>62435119
What's wrong with std::vector<std::string>?
>>
>>62435119

Not the guy you're talking to, but you know, you can just flush the buffer to disk if it's a write buffer and wrap around. If it's a read buffer you can process the input and then wrap around.
>>
>>62434896
Pretty much, that's why I was getting so damn frustrated.
>>62434931
It's pretty much the language standard at my Uni, some C/C++ later on tho.
>>
GODDAMNIT WHY ARE NONTECH PEOPLE SO STUPID

HOW DO THEY REMEMBER TO BREATHE
>>
>>62434947
Not a mistake at all. It's a good starter language. Only issue is that it isn't ideal for all applications. Keep at it.
>>
>>62435209
You don't.
Breathing is relegated in the brainstem, and is one of the most primitive and central functions of the brain.
>>
>>62431873
He made quite a bit. I'm a Swede. He had a lot of TV advertisement for albums and events happening, given the sheer volume of advertisement the sales would be quite huge.
No clue where he is now.
>>
>>62435233
Usually when people say "do they even remember to breathe" the implication is they're so stupid they lack this automatic capacity and have to manually breathe.
Doesn't make much sense but that's the idea.
>>
>>62435249
Maybe you should think about what you write instead of mindlessly regurgitating common sayings and spoken memes.
>>
>>62435298
I'm not that guy. Obviously.
>>
>>62432245
The boss says I have to use matlab. Now if you'll excuse me I have some ethernet cable I need to tie into a noose.
>>
>>62435209
They would feel that way about you if you attempted a hobby of theirs you have no idea about like cars or something.
>inb4 i know cars too
That's not the point.
What's common sense to you is not actually "common" sense.

Although with how integral computers are to our lives, it's amazing ouc schools still don't do more besides replacing books with ipads. But I guess that's just our high quality burger education.
>>
How do I look at an implementation of a class that's provided by Java?
https://docs.oracle.com/javase/7/docs/api/java/util/Deque.html
>>
>>62435344
>non tech people
>know about cars
No? Cars are tech.
>>
>>62435372
cars don't deal with electricity or logic like computer technology does
>>
>>62435372
>Cars are tech.
cars are still mainly mechanical, and your average hobbyist isn't writing software that will be on the road.

It's gonna be a weird future when people are installing Linux and modding their car's software though.
>>
>>62435439
>>62435445
https://en.wikipedia.org/wiki/Technology
Didn't know we had the special club present.
>>
>>62435459
jesus, youre a pedantic faggot.
Yes, cars are technology, but not the same kind of technology that computers are (atleast right now), implied by his original post's context.
>>
File: 1504829740833.jpg (126KB, 800x924px) Image search: [Google]
1504829740833.jpg
126KB, 800x924px
Post some good Java books and I'll suck your cock, no questions asked
>>
>>62435480
here's your list:
[]
>>
>>62435480
There are none
>>
>>62435472
>implied by his original post's context.
I don't see it at all. He's a /dpt/ patron who's expressing a very general complaint. Presuming he's meaning computers is silly.
>>
>>62435480
dumb akariposter
>>
>>62435480
Do sedgewick's algorithm course on coursera instead, it's free.
>>
File: chuuuuuuuuuuuu.jpg (650KB, 1000x1414px) Image search: [Google]
chuuuuuuuuuuuu.jpg
650KB, 1000x1414px
>>62435485
>>62435487
>>62435510
W-What the fuck? I was about to give you the best blowjob EVER...what if I give you guys a handjob? If you tell me a way to learn Java, I'll make you spurt twice!
>>
>>62434947
Nah, pythons growing in popularity and it's a super useful scripting language. Think of it like coding duct tape; practical for solving a bunch of problems.
>>
>>62435636
nope, completely wrong
>>
>>62435445
>It's gonna be a weird future when people are installing Linux and modding their car's software though.
It'll probably be illegal to run custom software on self-driving cars.
>>
>>62435636
No language should ever be described as "duck tape". And the fact that Python is duck tape and also "super useful" just shows how shit our industry is.
>>
>>62435575
no fuck off
>>
is ascending alphabetical order ABC, or ZYX? ABC makes sense to me because a = 65, b = 66 etc
>>
>>62435802
ascending = going up
>>
>>62431668
I'm not inspired at all. I've not programmed nothing in 5 months, only college shit.

How can I find ideas and inspiration? I want to do something in python with pypy but idk what
>>
>>62435862
which way is up?
>>
>>62435915
a .. z
>>
>>62436028
but that's going down the alphabet from the start to the end
>>
>>62436118
that's like saying 26 is "down" from 1
>>
can anyone give me some advice? I'm trying to create a 24/7 youtubelive music stream, i've got OBS and Snaz working to display the song title and artist info for the song currently playing in VLC, but there aren't any programs that allow you to display the album art from VLC.

how do i write a program to rip the album art from a the current song playing in vlc, and save it in a folder, where it is deleted and replaced with the image of whatever is currently playing?
>>
Is it just me, or people are finally starting to realize that oop is a meme?
>>
>>62436350
Some are, Pony-lang is doing an interesting take though with its functional-poo.
>>
File: 1497732996287.jpg (88KB, 1280x720px) Image search: [Google]
1497732996287.jpg
88KB, 1280x720px
>Composition
>Aggregation
>Association
>>
>>62436459
Pony-lang?
>>
>>62436522
It's in interesting language that's using the actor model OOP, but it's more a functionally declarative language. It's focusing on concurrency and no race conditions.
https://www.youtube.com/watch?v=fNdnr1MUXp8
https://www.youtube.com/watch?v=R6T8ytKV6dc

The CTO is pretty cool, but the language itself right now is pretty ugly and unusable to me.
>>
>>62431668
redpill me on tilde vs `````grave accent`````
>>
>>62431668
is this an okay guide?
>>
>>62436943
Yurop being contrarians as usual.
>>
>>62436968
if you're asking for help on what book to pick, i'd suggest you get the 'for dummies' book. not even bullying, they're usually pretty good. and oracle's evil so you should try to avoid funding them when you can
>>
New to C# and OOP in general, how can I make the following work?

public cellChecker(string [,] array)
{
X = 0;
Y = 0;
state = true;
cellContent = array[Y, X];

}


In the constructor of this class I initialize cellContent in terms of X and Y, but I want to be able to modify X and Y with a method so the cellContent actualizes. This is what I have:

public string GETcellContent()
{
return cellContent;
}
public void SETcellContent(int a, int b)
{
Y = a;
X = b;

}


So, in another class, when I call SETcellContent(1,3) the X and Y attributes do change, but GETcellContent() still acts as if X and Y were 0 as initialized in the constructor. How can I get away from this?
>>
>>62431924
I program exclusively in RPG, am I still safe tho
>>
>>62434421
So can I access objects and update the gui with values from that. Or would I need to have a function return a long array and sort them.
>>
>>62435480

https://en.wikipedia.org/wiki/Design_Patterns

Now open those lips.
>>
>>62431948
Cool story bro, better alt tab back to vscode and continue work on your node.js app interfacing with electron.
>>
>>62437498
they use smalltalk though
>>
File: 1499483794993.jpg (77KB, 658x632px) Image search: [Google]
1499483794993.jpg
77KB, 658x632px
>Those teeth
https://www.youtube.com/watch?v=8Jt9crSFd2Q
>>
I got an old copy of programming perl 2nd edition, I want to go over the fundamentals of perl. How much have the fundamentals changed since 1996?
>>
Here's a challenge:

Create a program that increments/decrements the amount of numbers (based on random values) in the third dimension of a multi-dimensional array based on the x-axis coordinate of the cursor.
>>
What kind of software do you write that doesn't involve the web? Almost all of my projects interact with the web.

I want to do something else but what? I don't want to do games.
>>
>>62437824
There's literally no reason to write a native desktop application in 2017 unless you're writing development tools.
Writing it as a webapp means you can serve it online, or put in a electron wrapper and ship it to every platform with no need to maintain a codebase for every platform.
>>
>>62434705
Matlab fucking sucks you retard
>>
>>62437851
Back to /wdg/, brainlet
>>
>>62437851
except performance is shit
enjoy your webkit bullshit
>hurdur my simple calculator / fart app uses 500 MB RAM and drains my laptop's battery because it's a portable web app designed using the latest hipster libraries
NO THANKS
>>
So I've been part of the homebrew scene for a few years, and want to try making an actual PC game, but I don't really know anything about libraries.

Should I lean OpenGL, SDL, or Vulkan? Also are there any other libraries I'd need to use for things like sound or keyboard/joystick input / whatever else? I wanna stay pretty close to the metal so I plan on using C.
>>
>>62438034
Metal 2
>>
>>62438034
Look up a tutorial for graphics/game engines and they will take you through each one. I used the sparky engine to learn.
btw
>Vulkan
HAHAHAHAHA
Just learn opengl/glfw/glew stuff. Unless you really want to shell out quick 2d games.
>>
>>62438032
developer time is expensive, processor cycles are not!

Fuck the end user on all counts, they're not paying for your product, their data analytics IS the product.
>>
File: 1457326588629.png (339KB, 577x660px) Image search: [Google]
1457326588629.png
339KB, 577x660px
Good material to learn C# and BTFO my pajeet class and poofessor?
>>
>>62438061
Why you talkin shit?
>>
>>62438065
also they perform like shit and I'd be ashamed to put my name on anything that wasn't snappy / native to a platform

it's different if you just don't give a single fuck or if it's a business tool but for any end-user-facing app or similar, just no man
>>
I'm making a game engine... with a twist.

If you can guess what it is, I'll share the source.
>>
>>62438088
it's functional
>>
>>62438104
What? Functional programming is stateless, so the game screen would never change and your character would never move.
>>
>>62437226
help pls
>>
>>62438141
Fuck off loser
>>
>>62436205
>>
>>62438156
this
>>
>>62438161
>Explain to me step by step how to do X
>>
>>62438131
obviously you can handle input in some way, but the internal logic would be functional

see http://prog21.dadgum.com/23.html
>>
File: 1468461043957.jpg (101KB, 1304x1184px) Image search: [Google]
1468461043957.jpg
101KB, 1304x1184px
>>62438076
HELP ME REEEEEE.

I DONT WANT TO BE STUCK WITH THIS PAJEET TIER COURSE,
>>
>>62438177
nvm i googled it
>>
>>62438131
well maybe not "pure" functional. "pure" functional is a place where there is no side effect aka fictional world.
>>
>>62438191
search for those jon skeet book my dude
>>
>>62438191
"C# books"
>>
>>62438191
>Uses pajeet language
>tries to btfo pajeets
>>
Anyone here do android app development? Is there any way to debug and hit breakpoints an app in a different country?
>>
Any good books on C++ concurrency and SIMD and shit like that
Just finished this book and its good as hell but now I'm looking for another good book to dive into
https://www.amazon.com/Understanding-Compression-Data-Modern-Developers/dp/1491961538

this looks good even
https://www.amazon.com/Learning-Binary-Analysis-elfmaster-ONeill/dp/1782167102/
>>
Why is the /dpt/ community so toxic tonight?
>>
>>62438182
Good read, thanks for sharing.
>>
>>62438305
how about logging?
> in a different country
so you are trying to debug an app that's installed on a phone? try logging
>>
>>62438315
https://www.amazon.com/C-Concurrency-Action-Practical-Multithreading/dp/1933988770
I've seen this recommended before. Haven't read it myself yet.
>>
>>62438322
is there any night that the /dpt/ community is not toxic?
>>
>>62438315
Idk but these links looked good

https://www.classes.cs.uchicago.edu/archive/2013/spring/12300-1/labs/lab6/

https://www.amazon.com/C-Concurrency-Action-Practical-Multithreading/dp/1933988770
>>
>>62438328
>>>62438305 (You)
>how about logging?
>> in a different country
>so you are trying to debug an app that's installed on a phone? try logging
So you're saying just make a bunch of logs, save and have the person send? They only have time to use it rarely and I'd like to be able to step over the code line by line because I can't recreate the problem.
>>
>>62438368
there's a service for debugging phone apps where they run your app on 10,000 different phones
that's pretty much what you need to do to fix these kinds of problems
>>
>>62438421
>>>62438368 (You)
>there's a service for debugging phone apps where they run your app on 10,000 different phones
>that's pretty much what you need to do to fix these kinds of problems
Is that crash reporting? Because I'm not getting crashes just not getting the expected behaviour.
>>
>>62438065

>processor cycles are not!
Depends what you're writing. Not everything is a CRUD application. Some applications have actual performance demands. Moreover, you should consider that your application is not the only one to run on the system. Just because the end user has 8 GB of RAM does not give you an excuse to make your application actually use that much memory. Just because the user's CPU executes 3 billion cycles per second across 2 cores doesn't mean you have to use 1 billion every second for yourself.

And beyond all that, a faster program uses less energy. Stop artificially raising everyone's carbon footprints just because your lazy ass can't be bothered to learn Qt. Hell, they even made Qt Quick, which uses a scripting language based on JavaScript, just for you fucks. And you know what? It might be the most bloated native framework, but AT LEAST IT DOESN'T EMBED AN ENTIRE WEB BROWSER IN THE APPLICATION.
>>
>>62438455
you can use it for whatever tests you want to run
I believe they allow you to view the screen of the phone remotely and attach to a debugger
quite expensive as I recall, though
>>
>>62437851
This kind of mentality is why I can't find a single application i don't have grave complaints about.

If you're determined to make programs suck feel free to. But don't expect me to ever use them and don't ignore your users when they conclude that your software sucks because it takes 5 seconds to open your shitty application for a task that'll take just over double that..
>>
>>62438462
well said dude
>>
File: 1505428866988.jpg (144KB, 1000x1430px) Image search: [Google]
1505428866988.jpg
144KB, 1000x1430px
auto a = make_integral_variable();    //variable set to 0
auto b = make_integral_variable<3>(); //variable set to 3

static_assert(a.get() == 0, "wat"); //ensure that a is 0 (at compile-time)
static_assert(b.get() == 3, "wat"); //ensure that b is 3 (ditto)

a.set<12>(); //set a to 12
b.set<5>(); //set b to 5

static_assert(a.get() == 12, "wat"); //ensure that a is now 12 (at compile-time)
static_assert(b.get() == 5, "wat"); //ensure that b is now 5 (ditto)
>>
>>62439067
why
>>
When a row has "Insert" it will add the string to the right of it to the index on the variable depicted by the integer to the right of the string.
When a row has "Delete" it will delete the index depicted by the integer to the right of it.
Print simply prints out the vector.

What will this print out to?

Insert Students 0
Insert Welcome 0
Insert Back 1
Insert Ready 5
Insert To 6
Insert Program 3
Insert Good 4
Delete 1
Insert Job 4
Delete 7
Insert CS211 1
Delete 3
Print
>>
File: fourleaf.png (403KB, 1218x1085px) Image search: [Google]
fourleaf.png
403KB, 1218x1085px
>>62431668
Got my 4chan app on macOS having some major performance improvements. Not sure if other /g/entoomen on macOS would be interested...
>>
what are some examples of projects that have enough technical merit to impress potential employers?
>>
>>62431668
Some stupid ass portable emulation machine, Hope is to make a Kickstarter/Indiegogo for the thing.

Right now it's a shit-stain soldering job, a Linux Distro and a is-working-though-it-shouldn't-be homemade controller,

Please kill me
>>
>>62439255
Interactive resume.

Interactive resume,

Interactive resume,

Literally the best thing you can do for yourself.
>>
>>62439233
now make one for the linux terminal using ncurses
>>
>>62439067

Care to share the definition of make_integral_variable?
>>
>>62439067
dumb frogposter
>>
>>62439319
>, Hope is to make a Kickstarter/Indiegogo for the thing.
youre pretty late on that one lad, find a new project
>>
>>62439366
https://blog.tartanllama.xyz/integral_variable/
>>
File: wake up.png (55KB, 198x199px) Image search: [Google]
wake up.png
55KB, 198x199px
c++ why the hell we need to be the one to specify when a value is constant
that should be the absolute job of the compiler
like how hard is it for the compiler to check that if int a = 0;
wow "a" is a fucking constant so make all optimizations possible for it
that was absolutely retarded
>>
>>62439568
>compile time checks for mutation
have fun
Get into a functional lang.
>>
>>62439593
alright then in c++ how do I make a multipurpose function so that when I use both
r1=f(1);
r2=f(a);
the compiler will do r1 at compiletime and r2 at runtime
>>
>>62439568
wut
how is it supposed to know if you want it to be a constant or not
>>
>>62439625
macro and template ftw?
>>
>>62439625
what different will that make??
>>
>>62439625
maybe instead of giving me shitty variables you tell me what youre trying to do and we fix your base design. It sounds like youre doing some convoluted bullshit to a simple problem.
Also use pure functions and you wouldnt have this issue.
>>
>>62439633
how will I do it with templates because I think I will have to define 2 functions:

template<class T>
constexpr T f(constexpr T v1){...}
and
template<class T>
T f(T v1){...}

and I want to define only one for both cases
>>
>>62439662
template <class T>
constexpr T f(T a) {
return a;
}
int main() {
constexpr int r1 = f(1);
int a;
cin >> a;
int r2 = f(a);
cout << r1 << endl << r2;
return 0;
}

werks
>>
>>62439706
what?
in that code how can f(a) work if f() is defined to return a constexpr
>>
>>62439723
I don't know how
I just know it works
>>
porting my reddit scraper to node.js to shits to learn javascript. last time I tried to use it callbacks and promises made it a pain in the ass, but with async/await it's pretty decent.

it scans a bunch of sfm/hentai subreddits and downloads the media that matches my fetishes.

I have one for 4chan as well, rips all the webm threads in gif that match my fetishes.
>>
>>62439730
I don't like magic and spells
>>
>>62439625
constexpr function
>>
>>62439738
you're in the wrong business
we're all wizards here
>>
>>62439738
that constexpr is a compile time stuff. it only get evaluated in compile time
>>
>>62439723
RTFM

http://en.cppreference.com/w/cpp/language/constexpr
>>
>>62439738
it depend on what version of c++ you are using really.
c++1x is literally voodoo magic
>>
>>62439067
sasuga dumb frogposter
>>
>>62439800
>tfw you forgot to buy a live chicken at the local market
>tfw you aren't going to be able to ritual sacrifice said chicken to use smart pointers
should I just use python
>>
I love how Andrei Alexandrescu drops words like "retarded" and such in his speeches.
>>
>>62439904
Andrei is love desu, glad he's making D, GOAT.
His gypsy apprentice also did some nice work with improving templates.
>>
>>62439895
it's just moving from one art to another. what is the differently anon.
>>
>>62439625
constexpr, this has been around for a while
>>
>>62439916
If it wasn't for Andrei, I wouldn't have been interested in D.
>His gypsy apprentice
Do tell, anon.
>>
uwaaaaa probably going to rewrite all the gtk stuff in gtkmm before I have to start making my own G_OBJECTS or something
still bottlenecked on generating thumbnails
i was looking at the DBUS section of thunar and it looked really long so im dubious about using the thumbnailer dbus thing or whatever
>>
>>62439938
https://www.youtube.com/watch?v=endKC3fDxqs
She's pretty qt as well.
But yeah, his talks actually got me to check it out, though I probably still would have, had i watched Walter's first.
>>
>>62439953
UwU wat dis?
>>
>>62439953
Thanks for the update, anon!
Retard question incoming though: Why does the dbus have to do with generating thumbnails?
>>
>>62439960
>she's just a masters student
obviously a genius, probably 150+ iq
>>
>>62439960
God damn I try to stay faithful to my 2D overlords, but she is pretty damn cute. Thank you based Andrei.
>>
>>62440014
https://live.gnome.org/ThumbnailerSpec
theres a thumbnailer spec, thumbnail generation program like tumbler generate thumbnails and stores them when asked via dbus. so you can send a request for a thumbnail for an image, and then get the image from wherever the thumbnailer put it, and it will only generate a new one if its needed

right now my program just opens all the images and scales them every time, which takes like 10 seconds if your search returns hundreds of images
>>
>>62440023
>>62440039
D seems to have the best slavs.
You should watch all of Vladimir Panteleev's talks if you havent.
>>
I'm writing a program in c that functions like a shell I guess. Is the a way that I can always make the top line of the terminal display some out?
>>
>>62440052
>>62440014
also it does all the images, when it would be smarter to only get the thumbnails for images currently visible in the scroll box
>>
Is there some persistent fifo variant multiple applications can write to?
>>
>>62440059
Escape codes? Ncurses?
>>
>>62440079
I'm currently using escape codes to store and restore the current position, but I'm ensure how to make it so that the user prompt doesn't overwrite the updated display when the terminal get's full.
Was hoping to avoid ncursors honestly
>>
>>62440052
>>62440062
I (think) I understand.
Never change, Gnome.
>>
>>62432685
>Python course
Drop out.
>>
>>62440058
Apparently. It's amazing how relatively popular D got with the Germans too.
>You should watch all of Vladimir Panteleev's talks if you havent.
I'm slowing making progress watching all the videos of dconf. My problem is that I only understand 10% of what these presenters talk about. Sucks being a retard.
>>
I only learnt about hashing a few days ago, so idk, but is it technically possible to log in by typing something other than your password? If the hash algorithm resolves to the same hash.
>>
>>62440131
>It's amazing how relatively popular D got with the Germans too.
This. A whole 2 people turned up to the annual D meetup this year.
That's half of the entire D community!
>>
>>62440625
if the hash function isn't shit then the universe will end before you guess a collision like that
>>
>>62439706
>template <class T>
Why won't they make it optional?
>>
>>62440625
Theoretically - yes, practically - impossible, unless you're using a not cryptographic hashing function.
>>
>>62440625
yes, it's technically possible
however passwords usually have a limit, like no longer than 20 or 30 characters, certain special characters aren't allowed, etc
so, if done correctly, it's also possible for there to be no collisions among the possible inputs
>>
in c++ can derived classes access private and protected members of the base class? google is giving me mixed answers
>>
>>62439233
I'm interested. I'm about to go to bed though, so no replies from me.
>>
>>62440669
Because
constexpr T f(T a) {
return a;
}

is an identity function for some concrete type T? They made it optional for lambdas tho, so you can write [] (auto a) { return a; }.
>>
>>62440697
they can access protected but not private members
>>
>>62440697
> private
No.
> protected
Yes.
>>
File: dev.gif (3MB, 225x324px) Image search: [Google]
dev.gif
3MB, 225x324px
>>62431720
Hello!
>>
File: Capture.png (18KB, 436x384px) Image search: [Google]
Capture.png
18KB, 436x384px
>>62440707
>>62440716
how come this program from my textbook works with all the members in the base class under private?
>>
>>62440769
>friend class
>>
>>62440769
There's no inheritance in the code, a class itself can access its own private members ofc.
>>
>>62440769
If one class friends another, that class is allowed to access this class' private and protected members.
>>
File: Mio*Ritsu 62.png (373KB, 1280x991px) Image search: [Google]
Mio*Ritsu 62.png
373KB, 1280x991px
>>62440793
how romantic
>>
>>62440779
>>62440785
>>62440793
ohhh ok i got it. i was thinking that friend classes and derived classes were the same thing
>>
>>62440649
rekt
>>
>>62440769
what a circlejerk
>>
@62440865
If you wanted (You)s anon, you could just ask.
>>
File: 2017-09-15-113700_949x952_scrot.png (202KB, 949x952px) Image search: [Google]
2017-09-15-113700_949x952_scrot.png
202KB, 949x952px
What does /g/ think about my config syntax?
It parses pretty well desu
>>
>>62441067
absolute madman
>>
>>62441067
Looks interesting, but I think natural language is a bad idea for configs in terms of maintainability, some more formalized scheme like toml would be better IMO.
>>
>>62441067
pretty neat, have any plans to open source it?
>>
>>62441108
Yeah I'll probably replace it by something sensible in the end...
But had to write a minimal parser anyway if I didn't want to work with inifiles or JSON
>>
>>62441127
The full thing will be on github once it's more done. It's going to be a monitoring system for minimal clients that run python.
Maybe I'll even rewrite client code in C for microcontrollers some day, but now just have to get it to work.
>>
>start idly wondering why openbox is configured in xml
>remember it was programmed by a women
>>
New thread:
>>62441175
>>62441175
>>62441175
>>
>>62441108
plus one for toml
>>
>>62437524
>implying I'm a webdev
Thread posts: 314
Thread images: 29


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