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



Thread archived.
You cannot reply anymore.



File: esr.png (162 KB, 847x1138)
162 KB
162 KB PNG
What are you working on, /g/?

Previous thread: >>64710009
>>
>ESR
Has gone completely retarded nowadays
>>
fuck opengl
>>
>>64717348
fuck directx
>>
fuck openvg
>>
>>64717344
Really? What is he up to these days?
>>
>>64717344
like most C tards
>>
File: raymond[1].jpg (18 KB, 246x300)
18 KB
18 KB JPG
>>64717465
>>64717344
He looks like your friendly neighborhood pedophile.
>>
File: dpt.png (19 KB, 645x773)
19 KB
19 KB PNG
>>64717485
>If compiler is a metaprogram is compiling metaprogramming?
Never change, /dpt/.
>>
>>64717325
Linear types will save systems programming
>>
>>64717698
Well?
>>
File: c++.jpg (13 KB, 260x194)
13 KB
13 KB JPG
>>64717698
>>64717737
>this is what /dpt/ actually believes
>>
>>64717737
If that was an actual thought formed by what you call your brain, why do you argue? If you think 1+1=11, why do you try to argue about math? Have some self-awareness, anon, sweetheart.
>>
>you can't use structured bindings with previously declared variables
wtf!
>>
>>64717875
use std::tie sucker
>>
>>64717885
std::tie is a hack
>>
>>64717913
all of sepples is a hack

you live with it or you reject it
>>
>>64717325
one of its inventors
>>
Perl 6 is on the rise and soon it will be a standard everywhere.
>>
doing some opengl tutorials, lads
>>
>>64718061
post your first triangle
>>
File: 382.gif (602 KB, 320x213)
602 KB
602 KB GIF
How do you guys sell your software?
>>
File: Matlab.png (56 KB, 600x227)
56 KB
56 KB PNG
This is MatLab-chan. She is very self-concious and hates it when people say she isn't a real language. Say something nice about her to make her feel better.
>>
>>64718086
>not open sourcing it
>>
>>64718094
some people open source their shit for non-commercial use and make people contact them for commercial licensing but i think they're a bunch of chodes and they should at least list a price up front on their website so you can know if their shit is worth looking into
>>
>>64718088
Saw her deepthroated by NumPy once.
>>
>>64718086
i ask for patreon donations :^)
>>
>>64718118
That's depressing.
>>
>>64718086
>How do you guys sell your software?
>sell
You mean you don't use your skills to program ransomware and malware?
>>
c++ is the greatest language of all time
>>
>>64717698
it is, yes.
any kind of program that manipulates other programs is metaprogramming
>>
got a job as a c++ programmer
still no gf
>>
>>64717913
>not using structure bindings
>>
>>64718273
The absolute state...
>>
What do you guys think about competitive programming
>>
what's the coolest or most clever piece of code you've written?
>>
>>64718265
prove it
>>
>>64717325

Realistically speaking, what's an Enterprise software engineer day to day like? I'm learning C++ and Java right now.
>>
>>64718088
Why's she called MatLab chan?
How about MatKitchen chan?
>>
>>64718324
Kaggle is pretty cool
>>
Without software hardware is useless.
>>
>>64718386
>musheen learning meme
>>
>>64718404
nice argument
>>
Without hardware software is useless.
>>
Without pleb users, hardware and software is useless.
>>
>>64717764
>i named random pic as C++ therefore I made a joke about C++
>>
File: 2018-02-13 19-57-17.webm (336 KB, 1920x1080)
336 KB
336 KB WEBM
>>64718079
got an ugly cube
>>
>>64718440
>the pic is named "C++" therefore there must have been an attempt to make a joke about C++
>even though C++ wasn't even part of the discussion
This is how autists actually reason...
>>
whomst the FUCK are yall QUOTING
>>
>>64718458
try multiple lights
>>
What kind of comments do you guys leave in your programs for others to find?
>>
>>64718493
>others
n-nani?
>>
>>64718496
Don't you have a github filled with stuff, anon?
>>
>>64718493
I make sure the comment sections in my code real like a short horror story about a programmer losing his mind.
>>
>>64718511
read*
>>
>>64718510
yes, but a private one.
>>
Threadly reminder that SICP shills are full of shit.
>>
>>64718493
>comments
int width; // plane's width

vs
int plane_width;
>>
Why is this place so negative and hostile?
>>
>>64718524
>a private github repo
>he actually paid to hide his code
>as if anyone was looking for it
Sounds legit.
>>
>>64718543
well technically it's a gitlab.
>>
>>64718536
>Why is this place so negative and hostile?
>this place
You mean 4chan, or the internet as a whole?
>>
>>64718531
why would you do the first one but to trigger people?
>>
>>64718529
This has a different focus, and MIX assembly is kinda stretching it. Still a great book on algorithms.
>>
>>64718543
>he thinks you have to pay to have a private repo

lmao
>>
>>64718531
Depending on the surrounding function, you could get away with
int w;
>>
>>64718585
>he thinks you can have a private repo hosted on github for free
Last I checked, it wasn't.
>>
>>64718591
>Last I checked
5 years ago?

get with the times
>>
File: 1511282567970.png (14 KB, 627x554)
14 KB
14 KB PNG
pls halp

I got some project from github and I want to include it into my project in visuaids studio

I followed this:
https://stackoverflow.com/a/4446085/6636609

now including the dependencies works but when I want to use the appropriated namespace it doesnt find it.

in java such things dont happen. just saying.
>>
>>64718627
>visuaids
in intelij is import from git repo
>>
>>64718627
>have to import it into something for it to work
>it's a process
Just saying C doesn't have this problem
>>
What's the point of FizzBuzz? What's the 'correct' solution? Is it a trick question?
>>
>>64718687
>What's the 'correct' solution?
No one knows
>>
>>64718687
>What's the 'correct' solution?
To get up and leave. Real programmers don't do fizzbuzz.
>>
>>64718493
for (int i = 0; i < size; ++i /* Advance to the next index. */);
>>
>>64718687
the answer depends on i
>>
>>64718687
It can't be solved, just like the Halting Problem
>>
>>64718687
It works as a filter. People who fail at fizzbuzz actually exist.
>>
File: cute.jpg (680 KB, 1920x1080)
680 KB
680 KB JPG
>>64718529
this is a (reference) book about design, analysis, and implementation of algorithms. sicp is about the practice of programming itself.
>>
>>64718739
god i wish i was that banana
>>
>>64718645
>>64718650
that doesnt help riii
>>
>>64718739
>>64718745
kys
>>
>>64718531
>caring about trivial shit
comments are used for sections that aren't initially obvious what the intent goal of the section is, so when something does go wrong in a program and another person is looking through it they know what the original programmer's intent was and see if it's correct. No one cares that you're commenting a variable name.
>>
>>64718687
a quick test to filter out brainlets.
>>
>>64718745
don't split
>>
>>64718687
Supposedly the point is to weed out liars and non-programmers. I literally cannot fathom any applicant who could fail a FizzBuzz-tier question, but apparently those people exist in significant numbers. Wherever they are, I wish they lived near me so I could land an easy job.
>>
>>64718772
also used to check out if a candidate is able follow instructions. for example, you ask for numbers from 1 to 101 instead of 1 to 100 and see if the guy notice.
>>
>>64718794
>from 1 to 101 instead of 1 to 100 and see if the guy notice.
I'm not sure it's a good filter.
>>
>>64717325
>What are you working on, /g/?
Finished a GPU benchmark for my NVMe library, demonstrating that you can initiate disk IO directly from a GPU kernel with little overhead compared to repeated kernel launches and memcpy'ing from an mmap'd file.

https://github.com/enfiskutensykkel/ssd-gpu-dma/tree/master/benchmarks/cuda
>>
>>64718836
small changes like that are a good idea though
otherwise you'll get people who don't know how to program but cram a lot for interviews and simply memorize a fizzbuzz solution
>>
>>64718854
>cram a lot for interviews
How do you cram for a technical interview without knowing how to program?
>>
>>64718865
You'd be surprised.
>>
>>64718850
nice

Haven't see you in a long time
>>
>>64718854
You should also ask for variations, for example:

>write fizzbuzz without using iteration, only recursion
>the above without declaring any variables except function arguments
>the above without any arithmetics except addition or subtraction
And so on.
>>
>>64718854
No, You're just testing attention to details in a test situation. Nothing related to real life.
>>
>>64718871
Been busy the last days trying to get it to work. Also, I discovered that IOMMU peer-to-peer support is just broken on intel and the lower-level Nvidia driver API doesn't implement it at all.
>>
>>64718881
Sure thing, anon. Keep telling himself that his inability to follow instructions or solve fizzbuzz without repeatedly running and correcting the code doesn't say anything about "real life", your programming skills and your overall intelligence level.
>>
>>64718865
By being a tricurious genderfluid metasexual Papuan who racially identifies as a reaperbinder.
>>
>>64718875
But now you're just adding arbitrary programming restrictions that don't map to any job-related work. Your variations should be variations of the problem itself, not variations of the implementation of the problem.
>>
File: laugh-milk.gif (739 KB, 285x235)
739 KB
739 KB GIF
>>64718908
>who racially identifies as a reaperbinder.
Lost!
>>
>>64718903
Keep telling yourself that your inability*
>>
>>64718893
How do you come up with project ideas like that?

Also, do you have a job or something?
>>
>>64718910
It forces you to think about alternative ways of implementation (i.e. do it functionally instead of imperative).
>>
>using convolution to compute moving averages
neato
>>
How do I make myself enjoy programming?
>>
>>64718903
We're in an interview, that's a special situation. If you filter people on their aptitude to pay attention to details, you'll have people who pay attention to details, but you'll miss a lot of very talented people.
>>
>>64718937
build something you need
>>
>>64718937
If you're male you should have a biological disposition to fix things, so look for something to fix with programming and you will enjoy it
>>
>>64718944
>If you filter people on their aptitude to pay attention to details, you'll have people who pay attention to details
That is one of the necessary abilities to become a good programmer, and I would happily filter out people who lack given the current supply of programmers.
>>
>>64718980
I wish to fix my life.
>>
i feel like im a retard who cant understand anything about programming should i quit
>>
>>64718937
>How do I make myself enjoy programming?
By wearing programming socks and cute hand-warmers while you program.
>>
>>64718928
It isn't implied that everyone should know various programming paradigms for a generic programming job, especially if it's entry level. If you seriously need someone who knows them, then you need to be up front about it in the job description.
>>
>>64718918
Well, I am a PhD student and that library is sort of a proof of concept of what I'm actually working on. But I also want it to be well enough as a standalone thing, so I try to make it simple to use for anyone just stumbling across it.
>>
>>64718990
Enjoy your code monkeys.
>>
im stupid as hell, will i have any luck with programming?
>>
>>64718928
>functionally
>for a job interview

rofling irl rn
>>
>>64718998
>i feel like im a retard who cant understand anything about programming should i quit
No. Just stick around and pretend you're a paid expert IRL, like the rest of /dpt/.
>>
>>64718993
then programming is not for you, in fact it is probably counter intuitive.
>>
>>64718998
If you don't think you're going to make it, don't try to. You may have talent elsewhere.
>>
>>64719003
>"you aren't actually supposed to know programming for an entry level programming job"
And this is why recruiters have to continue to waste everyone's time by screening out candidates asking about Fizzbuzz.
>>
>>64719007
You're already showing clear signs of mental deficiency. Please tell me all about how programmers with a good attention to details are worse than programmers like you.
>>
File: 1508530268377.png (303 KB, 358x474)
303 KB
303 KB PNG
>>64717325
I'm going through Programming Rust right now and so far I can say with absolute certainty that all the people involved in designing the language have aspergers syndrome.
>>
>>64719002
What are programming socks?
>>
>>64718273
>C++
>Best language
>side effects

Lol no
>>
>>64719006
>>64718918
But if you're asking about that specific idea, I attended a talk on NVMe two years back and I just got an idea about how it could probably work even if memory was moved around onto devices.
>>
>>64719038
I say that filtering people on "attention to details" during an interview is stupid. You'll just end up with people that can read correctly and apply correctly an order. That's absolutely not what you need for good coderz. Coding is an art, you need artist.
>>
>>64719016
It may surprise you, but it's actually expected that you at least have a basic understanding of multiple programming paradigms in real jobs.
>>
>>64719044
>Rust
You're wasting the last precious days of your youth on this?
>>
>>64719031
No, what I'm saying is that FizzBuzz-tier questions should only test your ability to come up with ANY working solution. Whatever additional questions you want to ask is up to you, but any additional requirements you test for beyond "can write code that works" should be listed in the job description.
>>
>>64719084
Ah, I seem to have misunderstood you then. Sorry for that. I agree with you wholeheartedly.
>>
>>64719038
I'm >>64719063
Let me rephrase it. Filtering on attention to details is good to recruit soldiers. Do you want to recruit soldiers or programmers? Why programmers are often poorly dressed?
>>
>>64718536
>wanting a coddled safespace circlejerk
you have come to the wrong place
>>
>>64719063
>I say that filtering people on "attention to details" during an interview is stupid. You'll just end up with people that can read correctly and apply correctly an order.
Are you seriously so fucking dumb that you think I'm saying attention to details is the only necessary or even the most important aspect in programming? I literally just told you it's one factor. All other things being equal, if I told you that your fizzbuzz should go from 1 to 101 but instead you go from 1 to 100 or from 1 to 102, while Bob gets it right, you're out and Bob gets the job, because Bob is less likely to introduce retarded off-by-one bugs into the code-base.
>>
>>64719135
>being so autistic you literally decide for a candidate based on their fizzbuzz implementation
>>
>>64719135
>while Bob gets it right, you're out and Bob gets the job, because Bob is less likely to introduce retarded off-by-one bugs into the code-base.
And when facing a difficult problem, Bob will suckm, because he's just a good soldier when I'm a an artist.
>>
>>64719148
i ask my candidates for a fizzbuzz implementation in the blockchain
>>
What the fuck is
 Bus Error 
????
I never seen that kind of error before

I tried to make a multiple datatype array in seppels, and the test program exited with that error
>>
>>64719201
possibly a misaligned access?
>>
>>64719201
you can't be this retarded, right?
it's the first result, ffs
http://www.lmgtfy.com/?q=c%2B%2B+bus+error
>>
>>64719170
>I'm a an artist.
the eternal excuse of the incompetent
>>
>>64717325
SICP for Python, yay or nay?

I have no interest in learning lisp.
>>
>>64719082
>wasting the last precious days of your youth
if only I could go 4 years back...
>>
>>64719201
>I tried to make a multiple datatype array in seppels, and the test program exited with that error
You probably overflowed or tried to reference already free'd memory.
>>
>>64719249
passed the 25 year mark huh
>>
>>64719237
>SICP for Python
that's like Web programming for Assembler ffs
if you're that averse to using the appropriate tool for the job, just skip the damn thing instead of trying to shoehorn the absolutely wrong tech into the topic
>>
>>64719249
what happened 4 years ago?

how old are ya?
>>
>>64719267
>what happened 4 years ago?
Rust was released.
>>
>>64719148
>>64719170
>being so autistic that you don't understand what "all other things being equal" means
>being so autistic that you think employers should hire you, despite your sub-par performance, because "you're an artist"
No wonder you incompetent fucktards can't get a job. I want to believe you are trolling, but deep down I know you're legit stupid.
>>
>>64719278
>but deep down I know you're legit stupid.
And yet you keep coming here and spend your time arguing with us...
>>
>>64719262
don't particularly give a fuck about that one
>>64719267
made a series of decisions that fucked up my health long-term
not being able-bodied is not a fun time, and my shit's minor compared to the big-league handicaps
>>
Why are there so many scheme implementations ? Do they vary a lot ?
Should I pick one over the other ?
>>
>>64719300
>made a series of decisions that fucked up my health long-term
Now I'm really curious. What, why?
>>
>>64719302
pick all
>>
>>64719302
>Why are there so many scheme implementations ?
Because it's the most popular dialect of Lisp, and Lisp started out as a theoretical language, so it just kinda evolved that way.

>Do they vary a lot ?
To some degree, but not extremely.

>Should I pick one over the other ?
Pick one that has an active community (e.g. Racket, and not Guile).
>>
>>64719307
back in my day(tm) kids were taught to avoid sharing personal information on the Internet
>>
>>64719236
That's not what all of my employers think.
>>
>>64719327
I don't see how explaining in what way you are disabled would compromise your anonymity in anyway. I think you are just baiting our curiosity here, anon.
>>
>>64719335
Self-employment doesn't count
>>
>>64719327
back in my day(tm) kids were taught to avoid getting rides with strangers and talk to strangers on internet.

Then Uber(tm) happened where you do all this things
>>
File: laughing-albino.jpg (27 KB, 280x390)
27 KB
27 KB JPG
>>64719365
Lol'd
>>
>>64719290
>And yet you keep coming here and spend your time arguing with us...
Stupidity is not the only thing that can ail a person, anon. But in your case, it's stupidity.
>>
>>64719387
>"ur stupid"
>"yes, so why do you come here?"
>"ur stupid"
You literally already made this point.
>>
>>64719316
they all name their binary "scheme" !

>>64719321
What about chez ?
>>
>>64719397
post a brainlet meme that'll really it hit home
>>
>>64719342
>don't see how explaining in what way you are disabled would compromise your anonymity in anyway
Relatively easy to imagine, unfortunately.
>think you are just baiting our curiosity here, anon
Not intentionally, but effectively, yes. Twas a lapse in self-control, I'm correcting that now by disengaging from further conversation on this topic.
>>
>>64719397
>being too stupid to understand the actual point
Ask yourself what you were trying to imply here (>>64719290) and then go re-read my response.
>>
Anon had a SRS and is stuck dilating for the rest of xir life
>>
Good discussion
>>
>>64719404
>What about chez ?
Never heard of it before, but then again I haven't programmed Lisp in over 8 years.
>>
>>64719365
>avoid [...] talk[ing] to strangers on internet
About as effective as abstinence-based birth control.
Knowing how to avoid spilling too much data on the Internet is a tall order though.
>>
>>64719431
So, you're telling me what I actually meant now, too? Cool story, bro.
>>
>>64719302
>Why are there so many scheme implementations
easy to implement. Big projects need scripting languages -> tinyscheme(gimp), s7(some project), ...
>Do they vary a lot
Some implement r5rs. Racket implements r6rs. Some more are trying to implement r7rs, they can't even agree if they like them.
Anyways rXrs are not enough for proper language. Each implementation implements they own object systems, FFI and other API's that you are going to need for program bigger than fizzbuzz.
>Should I pick one over the other
Pick one that has the features you need. Your code will mostly not be portable across implementations.
>>
>>64719404
>chez
racket's aiming to switch to it as a backend
http://blog.racket-lang.org/2018/01/racket-on-chez-status.html
chez is fast as fuck for a scheme (and recently open sourced), but racket's got the advantage ecosystem/DSL tool wise
Guile's got Guix and GuixSD
Elisp's got the Emacs ecosystem
I'd still give Racket a shot first tho, niggas even got something more typed than usual as one of the sublangs.
>>
>>64719454
>you're telling me what I actually meant now, too?
Was I, anon? I don't see it explicitly stated. Are you going to tell me what I actually meant now?
>>
>>64719484
Neat Racket demo, btw:
https://www.youtube.com/watch?v=t3xdv4UP9-U&t=11m52s
70,000 spheres (ray traced on the card), 500 lights, at 60 frames per second
>>
>>64719513
>"no u"
Well, if your argument is that you're not wasting your time, you're really not making a very good case for yourself.
>>
>>64719484
>DSLs, sublangs, etc.
w-well I'm not really on that level (yet ?). I-I just know a bit of elisp because of emacs.
But yeah I'll try racket.
>>
File: 2930953242255.png (5 KB, 190x266)
5 KB
5 KB PNG
>>64719531
>if your argument is that you're not wasting your time
I don't remember trying to make any such argument.
>>
>>64719266
I just do not see lisp/scheme being a language I will ever want to utilise in my programming. So what is the point of me learning it?

What I am looking to learn is good programming practice that is translatable to C/C++/Java/Python/Swift
>>
why does this segfault?


#include <stdio.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <string.h>
#include <pthread.h>

int server_fd, valread;
struct sockaddr_in address;

typedef struct _thread_data_t {
int tid;
int new_socket;
} thread_data_t;

int main(int argc, char const *argv[])
{

int PORT = atoi(argv[1]);
int opt = 1;
int addrlen = sizeof(address);
int i=0;

pthread_t tid[10];

return 0;
}

>>
>>64719574
Because it's C
>>
>>64719555
>I don't remember trying to make any such argument.
It's nice of you to confirm my original point then, even though you tried to claim that I meant something entirely different.
>>
>>64719574
nevermind... I forgot my code was supposed to take an argument.
>>
>>64719553
no worries m8, they've got some of the better beginner-oriented stuff too
really good docs/books/etc IIRC, and a nice IDE + libs for the learning process
pajeet-overflow quotes from
https://www.quora.com/Is-Racket-a-good-introductory-Programming-Language
>Is Racket a good introductory Programming Language?
>Yes. Racket has been created by people who were teaching programming, and it was deliberately made clean and easy to learn
>I believe that Racket might actually be the best choice as an introductory programming language, because of its simplicity, but also because of plenitude of excellent teaching resources (many of which are free), such as the books How to Design Programs, How to Design Worlds or Realm of Racket.
>There is also an initiative for teaching children programming that is called Bootstrap which also uses Racket. A couple of years ago, there was a story of a seven year old girl who wrote her own video game. She was also using Racket
/shill
>>
>>64719574
argv[1] is out of bounds, perhaps?
>>
File: 1498412638431.png (411 KB, 800x800)
411 KB
411 KB PNG
>>64719558
>good programming practice
>C/C++/Java/Python/Swift
>>
>>64719558
>I just do not see lisp/scheme being a language I will ever want to utilise in my programming. So what is the point of me learning it?
It'll give you some perspective so you won't have to be a typical ignorant C/C++/Java/Python/etc. monkey, if nothing else. On the other hand, if learning a tiny programming language like Scheme is that much of a huge deal for you, you're probably squarely in the code monkey category.
>>
>>64719617
yea thats it... how come I only realize obvious shit instantly after I make a forum post?
>>
Lads, I have to wrap my head around webprogramming with ASP.NET, the MVC principle, Entity Framework, OData and SAPUI5, because I'm such a good goy.

The problem is that I've absolutely no experience in that regard.

Will it be enough if I start of with a few basic online tutorials for Javascript, XML and JQuery before tackling SAPUI5?
>>
>>64719558
>I just do not see lisp/scheme being a language I will ever want to utilise in my programming.
absolutely nothing wrong with that
>So what is the point of me learning it?
similar to the point of learning basic Prolog or other shit during CS - to give you awareness of certain approaches which are much easier to grasp in a language/tool more suited for them.
Metaprogramming/program manipulation using LISP-likes being the one in this case.

However, this is a nice to have - especially if there are things that will bring you more benefit for the same effort.
E.g. if you still don't know
>good programming practice that is translatable to C/C++/Java/Python/Swift
you'd be better served investing your time in those.
Just don't forget to consider giving the lisp shit a skim too in the future - some (many) of the techniques described are translatable to your favorite language. How often you'd need them is the better question, which is why doing balls-deep into SICP first may not be the best use of your time.

So, what do you know, what do you want to know / be able to do, what do you feel you're missing?
>>
>>64719631
I see these as being languages that will be useful to me. You may disagree with that choice, but for my needs they will best serve me.

>>64719640
>It'll give you some perspective

What do you mean?
>>
>>64719655
I too get tired from staring at the same piece of code too long and then the obvious escapes me. It happens every once in a while.
>>
>>64719655
you've just experienced a perfect example of
https://en.wikipedia.org/wiki/Rubber_duck_debugging
>>
File: 6.jpg (74 KB, 983x443)
74 KB
74 KB JPG
I have to make a program where i can show the process of the fetch cicle (instruction cicle) in c. I can make the hexadecimal sum between two elements but my problem is that i can't break the figure in their independent variable (c91a= element1= c, element2=9, element3=1, element4=a)
I know that i have to use an array to save each element in each position but im hitting a wall here. Help?
>>
>>64719669
>You may disagree with that choice,
nah, they're just shitposting (or actually that autistic to honestly believe it)
>>give you some perspective
>What do you mean
see >>64719665
>>
>>64719691
learn to format your code first
>>
>>64719691
what's with the pajeet indentation?
>>
>>64719664
Jesus fuck, are you already working for someone and they need you to learn this?
>>
>>64719665
Holy shit, a really useful post on here?

So I did an electronics degree, which while it had a programming aspect, was very basic and functional. It didn't do much of CS, architectures, heaps and stacks etc etc.

While I can get a program up and running, I don't think about the resources available, which makes me think that I can't really apply for more software engineering focused jobs, as I won't have the background on how to properly structure my programs.
>>
>>64718850
Why would anyone post their real github on /dpt/ ?
>>
>>64719704
internship
>>
File: 1516271393644.png (21 KB, 645x773)
21 KB
21 KB PNG
I dont get it. can someone explain.

I have an existing project in visual studio. I want to use the shit in some other project.

how the fuck do I link that to my existing project? can someone explain for a complete brainlett?
>>
>>64719699
>>64719703
That's the point? Im learning to program?
>>
>>64719713
dude does it all the time
had a decent argument that it's no biggie in his case IIRC
>>
>>64719760
Copy and paste you mongrel
>>
>>64718687
Well, you can do it several ways and they all could show something about the candidate. Whether you can see a bigger picture than just ad hoc solution, whether you write clear and elegant code (no duplication etc.), whether you write wasteful code (in execution - repeated modulo checks). It's obviously no precise measure, but at least it can filter out monkeys.

Here is the most beautiful fizzbuzz I've seen:
fizzbuzz :: Int -> String
fizzbuzz n = (test 3 "fizz" . test 5 "buzz") id (show n)
where
test d s x | n `mod` d == 0 = const (s ++ x "")
| otherwise = x
>>
>>64719772
retarded? Im not gonna copy those thousands of locs
>>
>>64719792
Are you legit retarded? You don't have to copy them one by one. Just copy everything inside your project folder
>>
File: 1492626854250.png (443 KB, 598x1021)
443 KB
443 KB PNG
>>64719603
well I guess I'm sold.
Thank you kind anon.
>>
>>64719806
is sepples really too retarded to link another project?
>>
>>64719669
>What do you mean?
It will give you a better idea of what is possible, and where most mainstream languages stand on the power scale.
>>
>>64719821
I don't know man, I'm even too stupid for SAPUI5
>>
>>64719821
>visual studio = sepples
>>
>>64719711
>a really useful post on here?
Please, you flatter me too much! (don't forget the balls tho)
>did an electronics degree, which while it had a programming aspect, was very basic and functional
No worries, it's normal for EE to have shitty code - it's a stereotype for a reason.
Vice versa, it's normal for CS fags to be embarrassingly clueless about electronics, and I'm sure you folks have stereotypes for that too.
Specialization and all.
>While I can get a program up and running, I don't think about the resources available
Folks who don't focus on embedded/systems programming often aren't too great in that regard too. Just think about all the Java pajeets and so on. Hell, niggas be doing missile guidance systems that leak memory like a sieve, since it leaks slow enough that the system hits the target before it becomes an issue.
Don't forget the old maxim:
https://cbednarski.com/articles/make-it-work-make-it-right-make-it-fast/
>, which makes me think that I can't really apply for more software engineering focused jobs, as I won't have the background on how to properly structure my programs.
Don't sell yourself too short. You might be able to score a Junior position, given that folks switch from HVAC to this shit.
Just don't lie on your resume, explain your strengths (more disciplined approach compared to non-engineering lads - but phrase it more tactfully) and weaknesses, but don't overdo it to avoid getting shafted during the compensation negotiations.

Still, let's see. You did engineering, know EE-tier C programming, and would like to get a dev job, does that sum it up? Add anything that I'm missing.
What field would you like to focus on? Webshit (front/backend), embedded, automotive, HPC, scientific, academic, meme learning, big data, enterprise, etc?
>>
File: 1500199337112.png (94 KB, 971x280)
94 KB
94 KB PNG
>>64719817
No probs m8.
Don't forget to balance between "committed for life" and "distro hopping err week" - picrel is one extreme, but the other one has its downsides too.
>>
>>64717325
I'm going to read Game Programming Gems Series.
What are your thoughts on this serie of books?
>>
>>64719760
ideally you'd package it up as a library and then use your language's method of linking to other libraries
in C++: create shared object (or plain object) and headers, then adjust include/link flags of consumer project
in C#: fuck if I know
>>
Question to CS majors:

Does your school actually teach you software development or does it just teach you algorithms and other shit employers don't care about?
>>
>>64720002
[picrel] is the only book for real men.
>>
>>64720002
what gamedev books ve you read already
>>
>>64720123
None. It's my first book on gamedev.
>>
>>64720062
We have CS and SE majors here
former tackle heavy algorithm autism while the latter ooshit
>>
>>64720161
Why are you going in the gamedev direction? As a hobby, or do you want to work in the sector. If the latter, you are aware of the slave-driver situation with most game dev studios, right?
>>
>>64720161
lot of them here https://github.com/miloyip/game-programmer
>>
>>64718458
Anon are you doing the fixed function pipeline? If so take my advise and stop. When you decide to learn modern opengl, you'll have to literally start from scratch.

Opengl superbible is a good source for modern opengl.
>>
>>64720220
aren't es and webgl fixed function tho
>>
Haha why the FUCK would you ever use anything other than Kotlin?
>>
>>64720241
>ignore kot blin posters
>hide kot blin posts
>etc
>>
>>64720186
It's just a hobby, i have no idea of the slave-driver situation in the game dev studios. I just like to learn different things.

>>64720190
Thank you.
>>
>>64720227
Opengl ES threw out the fixed function pipeline before Opengl real actually.
>>
>>64719899
That's about right yes.

I haven't really decided on that bit yet. At home I've tried making Unity games and mobile apps. I guess I'd like to program up some embedded stuff for home automation. Machine learning is going to be big going forward though
>>
>>64720257
>just a hobby
cool cool
just wanted to give you a heads up to research the shit in case you start considering investing time in that direction (career, that is)
>>
File: 1491546521851.png (364 KB, 657x550)
364 KB
364 KB PNG
>>64720062
not CS but :
>no algorithms except bubble sorting in programming intro with C/C++ (visual C++ but only with the C subset).
>no data structures
>start to learn OOP in C# end of 2nd semester because the teacher really like C#
>one other course is intro to OOP in C++ (no algorithms or datastructures, just learning heritage, and some features of C++, no generics).
>next course is some stupid algorithms in Java
>finally a semester of C#, Xaml and ASP.NET.
>no algorithms or data strucures or patterns or practices or whatever the fuck you want. Just learning a couple features of the language, a small project and the teachers doing little howtos.
I wasted 3 fucking years learning jack shit in programming. And now feel like a fucking fraud. I can't even look the HRs in the eyes during the interview.

not even related to your post, but I just need to get his off my chest.
>>
File: 1516271904142.png (48 KB, 800x729)
48 KB
48 KB PNG
Im too retarded to get fucking sparsehash running. I will just use the std hashmap

https://github.com/sparsehash/sparsehash
>>
>>64720220
nah, I'm following learnopengl.com, which uses the programmable pipeline, as far as I know.
>>
>>64720274
Thank you, i didn't know although i'm not surprised of that but I'm just a neet that learns different things just to pass the time.
>>
>>64720190
cool so if I start now I should be able to go through all of these by the year 2147
>>
>>64720062
typically software engineering majors take one or two practical programming classes that help to prepare for "real world" programming jobs
where CS majors don't take any such classes, and instead will take one or two additional math classes
>>
I found a song about lisp guys
https://www.youtube.com/watch?v=Xt8jq_YSyxk
>>
Why the fuck std::vector::push_back() create a temporary object before creating the object in the array?????
the push back only making shit confusing when doing a proper RAII in seppels
for example this code:
class foo{
int * bar;
public:
foo(int i) : bar(new int) { *bar = i;}
~foo() {delete bar;}
};
int main(){
std::vector<foo> ffo;
ffo.push_back(12);
return 0;
}


The value of ffo[0].bar is invalid because the push back create a temporary foo object, and the destructor of the temporary foo delete the bar
this shit is weird
>>
>>64720441
Is the Blow Jon Blow?
>>
>>64720451
Use emplace_back.
>>
>>64720451
Because that's what push_back does. You want emplace_back.
>>
>>64720451
>>64720463
And if you implement a non-trivial destructor you must also implement the copy constructor and assignment operator so you don't end up with double fees.
>>
>>64720480
*frees
>>
>>64720480
Rule of 3 is for C++98, sepplesfags must use the rule of 5 now.
>>
>>64720463
Will that really help here?
>>
>>64720496
Yes, it will.
>>
>>64720492
Rule of 5 is optional (but a good idea).

>>64720496
Yes, it will move instead of copying. The constructor is being called out of place_back (implicit conversion) and place_back takes a copy.
>>
>>64720504
int i is still temporary within the constructor isnt it
>>
>>64720513
But it hasn't been converted to a foo yet.

That's the thing about constructors, they're like cast operators in that they'll convert contextually if they get the opportunity.
struct Foo { };
struct Bar { Bar(Foo); };

void baz(Bar);
void qux()
{
baz(Foo{}}; // works, because Foo implicitly converts to Bar
}

Use the explicit keyword if you don't want this.

With push_back an implicit conversion takes place before entering the function. With emplace_back the argument is simply forwarded to the in-place constructor call.
>>
>>64720492
>rule of 5
What the fuck. People make fun of Java for boilerplate but that's some next level shit.
>>
>>64718614
You cannot have free private repositories on GitHub. GitHub is the subject of conversation.
>>
>>64718088
Indexing
>>
>>64720558
To be fair from C++11 onwards there is very little reason to write that shit yourself.
>>
Currently learning C as a new programmer, why what's the point of using ternary operators when they seem harder to read than using if/else
>>
>>64720601
Ternary EXPRESSION
If STATEMENT
>>
>>64720558
I know, it's fucking retarded.
You need a copy constructor, a move constructor, a copy assignment operator, a move assignment operator and a destructor. if you define one, you probably need to define the other four. In addition to whatever standard constructors you have.
The only sane option is to leave all this shit to be implicitly defined and exploit RAII as much as you can to make it implicit.
>>
>>64720558
You shouldn't be fucking around with manual memory management anyway. And you can always delete the constructions and operators you don't care to implement (yet at least)
>>
>>64720601
Ternary operators are values, whereas if/else statements aren't.

In C it's kinda pointless, but in C++ the ternary operator allows you to conditionally initialize a local const variable or a reference.
>>
>>64720601
that's because
a) you never had to write a dozen if/else statements in a row just to init variables
b) you're not used to reading code.
>>
>>64720601
ternary operators return something. If statements don't return something. You don't necessarily need them but here's where it might be nice:
if(foo(x)
bar(a, b, c, d, e, f);
else
bar(a, b, c, d, e, g);

vs
bar(a, b, c, d, e, foo(x) ? f : g);
>>
>>64720644
>>64720652
>>64720654
thanks anons, the exercise I'm currently doing involves nested ternary operators and it just looks like an absolute clusterfuck to read at the moment
>>
>>64720654
I like
(cond ? foo : bar)(arg1, arg2, arg3);
>>
>>64720678
Th-th-that's valid in C? I've only done that in Scheme.
#include <stdio.h>
char * foo(int x) {
return "foo\n";
}
char * bar(int x) {
return "bar\n";
}
int main() {
printf(((2 % 2) ? foo : bar)(16));
}

Holy fuck it works.
>>
C# (maybe in other languages as well, don't know):
why can't while initiate it's own iterator like a for loop?
int i = 0;
while (i < 5)

vs
for (int i = 0....)
>>
>>64720678
Does anyone ever actually do this?
>>
>>64720558
it's a very advanced use case, most programmers don't need to worry about it
>>
>>64720732
>>64720743
None of you guys ever used callbacks before?
>>
>>64720732
>>64720678
It decays to and invokes a function pointer. The & and * on function pointers are implicit.
>>
>>64720753
I have, just not with the ternary operator of all things.
>>
>>64720753
What makes a callback distinct from just functional programming or continuation passing style? I don't see it on the wikipedia page. Just looks like standard functional programming shit.

I have used function pointers with qsort in C but that's about it.
>>
>>64720785
Function pointers are not closures, you also need to pass around a pointer for the function to interpret as its environment. And callbacks usually imply that they operate through mutation whereas (pure) functions don't mutate.
>>
>>64720785
Function pointers are not closures. They do not capture any scope implicitly.
>>
>>64720785
>what makes functions as first class citizens different from functional programming
I know this will give the Haskell fanboys an aneurism, but in practice treating functions as first class is more than half-way to functional programming.
>>
>>64720811
>whereas (pure) functions don't mutate.
But doesn't monads mutate the state in the burrito or whatever?
>>
>>64720811
Yeah of course function pointers don't close. That's why I don't really use them.

So you'd call the first one functional programming and the second calling back?
(map square '(1 2 3))

(for-each print '(1 2 3))

Seems kinda meaningless desu.
>>
>>64719059
this was meant for someone else right?
>>
>>64720882
If you're calling it a callback, usually you're using it to affect some external state.
A comparator in a sort function isn't really a callback, for example.
I don't think it's functional programming unless you're using first class functions (e.g. closures). But being a first class function or not doesn't mean it can't be a callback. Javascript often uses both at once.
>>
>>64720865
Then you'd pass a monad and not a pure function. Also, it's not that monads mutate anything, they just describe these effects. The effects happen when Haskell runtime starts to eat up the main monad.
>>
>>64720882
Yes. The first one builds up a value and the second one simply executes side effects. Contrast for-each with mapM_ in Haskell. mapM builds up a computation, but does not execute it.
>>
>>64720997
I'm too much of a brainlet to ever understand Haskell I think.
>>
>>64720950
So the second example IS a callback because it's modifying the terminal. But the vocabulary doesn't make any sense to me. I guess I've only really hard javascript programmers talk about callbacks so there ya go.

A continuation really does go (call?) back to its execution environment, so I thought these callbacks might be related to CPS. Some sorta ghetto approximation of call/cc in languages which don't have it (because they don't compile to CPS or whatever.)
(define (call/cc& f k)
(f k k))


Do you have any real world examples of "callbacks" as javascripters use them?
>>
File: lisp-alien.png (20 KB, 256x150)
20 KB
20 KB PNG
>>64720441
>When you're holding me
>We make a pair of parentheses
>There's plenty space to encase
>Whatever weird way my mind goes
> know I'll be safe in these arms
Beautiful.
>>
>>64721012
I think you can do it if you try hard enough, anon. Monads aren't really difficult at all. It's just a way of ordering operations. When I say A >> B >> C, I just mean "do A, then B, then C". Then add some value passing with >>= so that operations A, B and C can actually pass some values between themselves (but still sequentially!) and act depending on these.
>>
>>64718088
it's way worse than octave and maxima
>>
>>64721086
Callbacks are common in other languages too. If you're using OpenGL you'll use a callback to register handlers for various state changes.
>>
>>64720743
I discovered it by looking at some GNU's coreutils code.
>>
>>64721165
Callback to register handles for state changes? You mean like VAOs? Don't see how that's calling back. I was under the impression all the handles were just opaque datatypes not callbacks.

And the actual shaders are functional. Well as long as you're not doing anything too weird. Take data from in fields return data to out fields.
>>
>>64721206
I'm talking about stuff like glutDisplayFunc.
>>
File: 20180214_093032.jpg (1.74 MB, 1588x2823)
1.74 MB
1.74 MB JPG
How important is it to understand the internal, conceptual and external schema and their relation to the E-R model in databases?

I feel like I'm wasting my time learning stuff that will come naturally once I begin making databases.
>>
>>64719783
How about this?
#lang racket

(define (fizzbuzz n)
(match* ((modulo n 3) (modulo n 5))
[(0 0) "FizzBuzz"]
[(0 _) "Fizz"]
[(_ 0) "Buzz"]
[(_ _) (number->string n)]))
>>
>>64721248
I think that's a GLUT thing. I'm not aware of any other window/context libraries that do that. It's certainly not an OpenGL thing.
>>
What have you automated in Python lately /dpt/?
>>
File: 2018-02-14 00-23-05.webm (938 KB, 1920x1080)
938 KB
938 KB WEBM
>>64718458
got some ugly textures form my cube. will try with multiple lights next
>>
>>64721503
>((modulo n 3) (modulo n 5))
That syntax disgusts me. It should be
(list (modulo n 3) (modulo n 5))

because it should be matching against arbitrary data, not some weird syntax.
>>
File: zsuenXp.gif (377 KB, 500x209)
377 KB
377 KB GIF
>>64721610
Why? The entire idea behind extending a language is to reduce repetition - if it were (list ...), one would need to match against a list, not a group of values.

(match (list (modulo n 3) (modulo n 5))
[(list 0 0) ...]
...
[(list _ _) ...])


In addition, what are your thoughts on
(define (f a b)
(+ (* a 2) b))


That is a short form for:
(define f
(lambda (a b)
(+ (* a 2) b)))


And it's not entirely obvious to the unseasoned programmer the former is the same as the latter... Because it isn't obvious doesn't mean it is not useful.

Your argument would fall apart once you start using Racket, or any language that has a macro system.
>>
In C++, if I wanted to "reset" an object after some member function is finished, would it be invalid/a terrible idea to do this?

class MyClass {
void DoShit() {
// Do shit
Reset();
}

void Reset() {
*this = MyClass();
}
}
>>
>>64721725
That's filthy.
>>
>>64721725
Yes, that's bad.
>>
>>64721686
I meant only a list on the input to match. The patterns would obviously be best to be part of the special form. Because you can't do this (made up syntax):
(define (eval expr)
(match expr literals: '(quote lambda)
((quote x) x)
((lambda args . body) (make-lambda args body))
;etc
))
>>
>>64719760
somewhere in the ide interface there must be a menu or button like "add existing files"
>>
>>64721503
Not easily extensible. Imagine what happens if you add Hiss on 7 and Howl on 11.
>>
>>64721725
this->~MyClass();
new (this) MyClass{};
>>
>>64721799
This if you're being serious about it.

But it's pretty horrible and where you begin to understand that sepples has betrayed you.
>>
File: you vs tesla.jpg (48 KB, 1024x389)
48 KB
48 KB JPG
I have a job interview for a position that'll involve being a sort of bridge between testing and software development, essentially I'll be curating a c++ driven automated test framework, not writing new parts of it but ill need to be familiar enough to know what most given chunks of code are doing

any youtube videos or other resources i can go over to brush up on software design for that kind of use case?
>>
>>64717325
Julia is an amazingly nice language. Implementing DSL's with macros is so insanely useful.

I made a PR to differentialequations.jl which basically completely automates my upcoming homework in a graduate class I'm currently taking. It integrates nicely with interact.jl as well which lets me vary parameters with sliders and everything.

Library support is spotty for some other things, but for the things I'm currently doing, it is absolute god mode.
>>
File: chinatoast.gif (1.51 MB, 535x600)
1.51 MB
1.51 MB GIF
>>64721790
That's not enough information to write what you're suggesting - for example what would 33 be, or 21?
>>64721788
Indeed, if you wish to bind the entire expression, you shouldn't be using match*, but that isn't what my example required. It's one form of many - I find myself using match (no star) when matching a single list, as one would expect.
>>
>>64721844
33 would be BuzzHowl and 21 would be BuzzHiss, if I didn't mess it up.
>>
>>64721725
The need to do this looks like bad design to me.
You should split the state that needs resetting into a separate class and have its instance as a member of MyClass.
This way you could just do
void DoShit() {
// Do shit
state = StateClass();
}
>>
>>64721858
this
>>
What is the best learning resource for x86 assembly?
>>
>>64718088
Deprecated by Julia, R, and Python.
>>
>>64721898
The intel manual.
You can also try to compile little program in C or C++ to analyze the compiled code.
>>
>>64717698
Using a compiler isn't metaprogramming, just using someone elses metaprogram.

Writing a compiler to solve a problem you currently have is metaprogramming.
>>
>>64721857
(define (noisefactory noise-table)
(lambda (n)
(let ((noises (filter identity (map (lambda (e) (if (= (remainder n (car e)) 0) (cadr e) #f)) noise-table))))
(if (null? noises) n (apply string-append noises)))))
(define fizzbuzzhisshowl (noisefactory '((3 "Fizz") (5 "Buzz") (7 "Hiss") (11 "Howl"))))
(for-each print (map fizzbuzzhisshowl (iota 100)))

Is it enterprise grade yet?
>>
Can someone create a new thread please?
>>
New thread:
>>64721978
>>64721978
>>64721978
>>
>>64721857
Cool thanks, I suppose i'd omit the match entirely in that case:
#lang racket

(define (fizzbuzz/custom n mapping)
(define ls
(filter-map
(λ (pair)
(match-define (cons m s) pair)
(and (zero? (modulo n m)) s))
mapping))
(if (empty? ls)
(number->string n)
(string-join ls "")))

(define mapping
'((3 . "Fizz") (5 . "Buzz") (7 . "Hiss") (11 . "Howl")))

(for ([i (in-range 1 101)])
(displayln (fizzbuzz/custom i mapping)))
>>
>>64721952
Yeah, if you want me to approve it, then yeah, looks right. Bonus enterprise points for "factory".
>>
>>64719046
>being this new




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

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.