[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

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: 335
Thread images: 47

File: dennis_ritchie.jpg (30KB, 309x400px) Image search: [Google]
dennis_ritchie.jpg
30KB, 309x400px
What are you working on /g/?

old thread -> >>57291269
>>
>>57298229
I just had a bad semester. My GPA went from 3.2 to 2.7.

I was doing really well until the start of last semester. I was getting lots of A's, and I got a high exam mark in a course I was struggling in.

The problem is that university is basically my whole world right now because I am doing it online. I flunked out of SENG in physical university and got banned for 3 years, and my only alternative was to do CS online. One of my friends immediately unfriended me on Facebook when he found out I wasn't coming back the next year. That was a huge blow, because i really liked him and we had similar personalities. The one who stuck with me is a bit of a Chad.

I have pretty much been hold up in my room for a year now, studying and gaming. I know what you are thinking, "He must be gaming all the time, so he's failing," but honestly, from like January to July I didn't touch any games. It wasn't some kind of nofap asceticism, I had just lost interest. Then, August came, and I had booked my first exams, but at the last minute, I backed out of them because I knew I was going to fail. I thought if I put in an extra month of study time it would make a difference, but it didn't. I started gaming again (multiplayer Minecraft autism), probably because of the dread of *knowing* I was going to fail two courses out of three. I also got drunk once, for the first time in like 2 years. I binged on beer after every exam to take the edge off.

I'm doing work experience, but instead of a sexy internship at one of the big 4, I am just doing work for some guy who put up an ad on the internet. He needs a mobile app built, and I'm making it. I've been clueless from day 1, and it's in a language I never used in uni. I am self teaching everything instead of learning from people who know what they are doing. It is nerve wracking, and I hate it.

My advice for /g/ is to not do online CS, ever. Figure out a way to go to a physical school, even if you have the discipline for online.
>>
>>57298229
RIP
>>
>>57298254
The worst part is the asynchronous sleep. It has been bothering me for months. There are rarely two days in a row when I wake up at the same time, and sometimes I get reversals so I wake up when the sun is setting and go to sleep in the morning.
>>
class Node
{
Node next;
int data;

public Node(int d)
{
data = d;
}


class Node
{
Node next;
int data;

public Node(int data)
{
this.data = d;
}



Are these the same thing? I see the latter more but I want to understand the use and styling behind it.
>>
>>57298374
get up every day at 5:30am, eat a light breakfast, shower, and get out to a coffee shop or library
i'm not saying it's easy
>>
>>57298254
i have a 3.9 gpa
>>
>>57298254

Build some impressive projects and understand that internships are about 10x more impactful than GPA. INTERNSHIPS ARE EVERYTHING. People only give a fuck about GPA if you have 0 experience.

I've went way below 2.7 anon, it's really not relevant.
Just make sure you improve your skills and don't fail out.
>>
>>57298534
one advantage of "this" is that you don't have to invent some dumb new name for the parameter to the constructor. this.data = data.
>>
>>57298534
They are the same thing.
The syntactic rule is that if X is not in the local variable scope of the method, but X is a member of the class, then the expression 'X' becomes syntactic sugar for 'this.X'
The rule exists because people are too lazy to write 'this.' each time, but accidentally "shadowing" your members is pretty nasty, so it's a good idea to use 'this.'
A lot of times it is logical for contructor arguments to have the same name as the member variables, so you are required to use 'this.', for instance.
class Point {
float x, y;
public Point (float x, float y) {
this.x = x;
this.y = y;
}
}


The alternative is to rename your constructor arguments

class Point {
float x, y;
public Point (float initX, float initY) {
x = initX;
y = initY;
}
}


Best to just consult the project's style guide to see what is supposed to be used.
>>
>>57298577
good for you
>>
>>57298590
that's what I thought.

so literally 0 difference in the memory aside from storing a different name for the variable?

meant
this.data = data 
for the second block line, just a typo. you are forgiving anon
>>
No matter what, but i will do the logo.
>>
>>57298629
No I will do the logo.
>>
>>57298534
/this/ refers to internal variable defined in the class definition. Not sure if the first example compiles without warnings or errors. Think what would happen if in the first example you had data = data, it would do nothing. Also, in the second example it should read this.data = data.
>>
Are the JetBrains IDEs any good?
>>
>>57298653
yes ,jetbrains really good software company soon to dominate the industry.

you have IDE's for every languag (at least , the important ones)

https://www.jetbrains.com/
>>
>>57298653
Yes, worth the money? Depends on how serious you are.
>>
>>57298670

Students get them all for free or you can just pirate them
>>
>>57298694
This is true, in that case, go for it.
>>
Why would anyone want an IDE that's not VSCODE?
>>
In a job interview for java, will they give a fuck if I do it all in the main class with static methods or will they prefer a separate class with its own object instantiated.

I don't mean complicated OOP implementations either. Just when producing a few functions and fields.
Not sure what's really proper.
>>
>>57298740
>vscode
>ide
>>
>>57298483
less ambiguous if the argument to the function was 'data' rather than d.
>>
>>57298742
Depends. There's a difference between asking you to do fizzbuzz and asking you to implement a linked list with some interface.
>>
>>57298653
yes, worth the money. things like the quick git file diff lookup is invaluable.

>>57298740
1. it's not an ide
2. why spend hours setting it up and downloading all the good plugins and getting them to work with each other just to get a basic ide experience when instead i can just download rubymine and have it all out-of-the-box?
>>
>>57298668
>https://www.jetbrains.com/
i like the part where you felt the need to include a link to their website... shill
>>
lets all just move to bloodshed dev-c++
>>
>>57298694
The Community Editions are great too.
>>
File: 1404399358132.png (170KB, 490x355px) Image search: [Google]
1404399358132.png
170KB, 490x355px
>work using ORM for all queries
>for some reason this ORM can't deal with dates very well
>need to use a raw query and then recreate the object so that the front end doesn't have to be changed
>mfw trying to do the job of an ORM

this is the stuff of nightmares. This object is fucking huge.
>>
File: last.png (104KB, 1920x1080px) Image search: [Google]
last.png
104KB, 1920x1080px
Working on my terminal emulator, today I just switched to using it, so I'm working on my terminal emulator through my terminal emulator.

I'm about to start doing some more extensive profiling to see where I can improve performance.

One thing I know I will have to do is batching full screen renders that happen too fast, which happens when a lot of text is inserted (for example running `yes`).
>>
>>57298861
never reinvent the wheel
if you are using the technology i like and running into a flaw, simply redesign your application to not use the broken part :^)
>>
>>57298778
Kind of what I expected.


I use the .split function on strings in at least half of string manipulation questions.
Do employers give a fuck? Don't know how manual they want the problems to be done.

Split function is so based.
>>
>>57298912
>not solving everything with a shell

pls
>>
>>57298923
>shell
Do explain anon.
>>
Doing a free trial of Mathematica 11 to see if it's worth the price but so far the answer is no. The neural network features are fun but don't really seem extensible enough to do anything new with, you can't even define new activation functions as far as I can tell. Also they're shipping with an outdated version of CUDA that can't handle the 1080's compute version and it doesn't seem like there's a way to change it so I'm CPU bound.

Sucks because as usual they've developed a really nice syntax around nets that makes for really fast prototyping and testing. Maybe 11.1 will be worth another look.
>>
>>57298945
this is always the story with wolfram, it seems to me
what do you think their notebook offers that others don't?
>>
>>57299038
>what do you think their notebook offers that others don't
Basically everything. Jupyter and the like simply do not compare. It's probably the nicest programming environment I've come across.
>>
File: stringcalc.png (10KB, 543x224px) Image search: [Google]
stringcalc.png
10KB, 543x224px
This bullshit took me way too long and is pretty poor in efficiency.

Just a calculator where you input formula through a String and it follows order of operations (just has + and - operators) and obeys parenthesis.

I seriously hate coding when I know their is a much better and faster way to do things. I feel it with every line.
Guess that's how one gets better. Sometimes I just stare at the monitor trying to avoid the shitty code.

How do I become Carmack?
>>
>>57298942
IFS=';' read -ra ADDR <<< "$IN"
for i in "${ADDR[@]}"; do
# process "$i"
done


>splitting strings in bash
BOURNE AGAIN TO DIE \ SHELL IS A FUCK
>>
does using a machine learning framework require programming?
>>
>>57299168
just using a framework? not really
>>
>>57299168
looks like you have some machine learning to do yourself, anon
>>
>>57299168
for anything half good, absolutely.
you should at least know some differential equations too.

you can probably just have a python library hold your hand to create another basic piece of bullshit.
>>
>>57299199
so the research internship i'm doing this summer is useless in terms of my resume
>>
>>57299216
Not at all. Just bullshit like everyone else does on your resume.

Very few people DON'T do it. You'll get a question or two max about your past internships.
>>
>>57299125
So you didn't even use a parser to handle it?
>>
>>57299244
i'm kind of feeling a rising sense of panic. thanks
>>
>>57299125
math that respects order of operations is classically done iwth parse trees.
>>
>>57299255
what do you mean by parser?

I do have a method that will handle the basic arithmetic strings, that's the trivial part. Getting the parenthesis and their scope was tricky for me, especially when trying to be efficient.
>>
>>57299201
Kek
>>
>>57299316
your post contributed a lot anon
we thank you
>>
File: 1389353920635.png (682KB, 522x604px) Image search: [Google]
1389353920635.png
682KB, 522x604px
>>57298229
I made a thing.
http://pastebin.com/GVdL30B1
From the pro/g/ramming challenges, the one where you change numbers to text.
Took me some four days to do it. I spent more than a day figuring out how to add the appropriate number of spaces.

>>57299125
Ooh, what language and how are you going about this?
I've never tried making one of those.
The way I'd do the parentheses is look, from left to right, for a closing parenthesis and then do the arithmetic between that closing parenthesis and the opening parenthesis before before plugging it back in and going to step one... which it looks like you did.
Also, with Java at the very least, because String is immutable, you can use StringBuffer or StringBuilder as mutable versions of String (which cuts down on runtime).
Or something. I helped my sister with her Java homework. That's the only reason I'm aware of that.
>>
>>57299399
Yep that logic is exactly how I did it.
I figure I should be able to apply all of the innermost scoped parenthesis at the same time.

I'm actually using java, and should really get in the habbit of stringbuilder.
>>
>>57299399
Next time use arrays of strings instead of horrible switch cases. Didn't bother to read further, wouldn't hire.
>>
>>57299291
https://en.wikipedia.org/wiki/Shunting-yard_algorithm
>>
>>57299467
If you care for efficiency and getting better, you should look a bit into theory.

In this case into grammars. The whole Term is representable as a tree, with _Term operator Term_ as nodes, where a Term can be either _Term operator Term_ again or just a value, with brackets here and there. A program that transfers the string into such a tree via a grammar is called a parser.
From there you have several options, inline transformation, where you delete a value operator value substring and replace it by its result, or some others, like making a real tree in memory and reduce value operator value pairs to values in a depth first search. Inline transformation is a bit faster.

Also it's normal that you don't really like your first programs, you're not alone there.
>>
>>57299674
>>57299633
This is some fucking crazy shit but it's blatant how it is more effective.
Will study this, thanks.
>>
Hey folks, I'm learning java, why is this piece of code throwing me random bullshit? It should read a csv file line by line and print out each of the lines.
          br = new BufferedReader(new FileReader(csvFile));
while ((line = br.readLine()) != null) {
poleorig = line.split(csvSplitBy);
System.out.println(poleorig);
}


When run, it outputs bunch of lines with "[Ljava.lang.String;@d93 etc"
>>
>>57299870
shan't be reading this
>>
>>57299168
Barely, only enough to load a csv and call a sklearn function. Doing anything worthwhile with ML requires a decent amount of skill though.

>>57299210
>thinks differential equations are required or even useful for machine learning

Linear algebra, differential calculus, statistics are important. What algorithms need diff eq to be understood or implemented? one of the last pieces of undergrad math I think of when I think machine learning.
>>
>>57298897
>cancer-256color.
heh
>>
>>57298897
whats up with the line numbers ?
>>
>>57298229
Someone said yesterday that SIGCHLDs are queued?? Is this true.??
>>
>>57299870
>java.
either this is for college/uni.
if not. for the love of chin chin. switch to c++ or python.
>>
>>57299943
Huh? Differential Equations is calculus. It's literally described in calculus. What country are you in?

They are also very applicable in machine learning. My DFQ course also had eigenvalues, PDEs. I thought that was pretty standard. All useful in machine learning, it's a field wide in scope.

Statistics are important for ANYTHING computers, and yeah of course linear algebra too.
I could see your arguments but I still think differential equations is essential to do anything significant.
>>
I'm writing a textboard in Python, and for the last day I've been replacing all manual SQL queries with SQLAlchemy (ORM library). It's condensed the code a bit, but other than that it's looking a lot more "wordier" and generally more difficult to understand (in my opinion) than plain SQL queries. When should I use one over the other?
>>
I've been half-arsedly messing around on the C++ bits of Codewars.com over the past few weeks, has anyone else used it before? Is it worth sticking with into the higher levels?
>>
anyone have the book tier list? i need to top off an amazon order
>>
>>57299574
>use arrays of strings
Huh. Never occurred to me. Would've solved the problem of the ass-load of switch cases which, although didn't seem to cause delay, bothered me.

>Didn't bother to read further, wouldn't hire
Funny that. That's what every potential employer's said so far.
>>
Is this possible to convert HSL to RGB with the preprocessor in C++?
>>
>>57300191
>C++
constexpr
>>
>>57300213
>constexpr
.. Thanks!
>>
File: 1472926381185.png (441KB, 526x524px) Image search: [Google]
1472926381185.png
441KB, 526x524px
My C process time sharer works
wew
>>
I'm learning how a perspective matrix works.
>>
File: 1426170977317.jpg (12KB, 250x250px) Image search: [Google]
1426170977317.jpg
12KB, 250x250px
Does anyone have trouble getting their head around recursion?

     ##Least Common Ancestor 
public Node getLCA(Node root, int n1, int n2) {
if (root == null) {
return null;
} else {
if (root.data == n1 || root.data == n2) {
return root;
}
Node left = getLCA(root.left, n1, n2);
Node right = getLCA(root.right, n1, n2);

if (left != null && right != null) {

return root;
}
if (left != null) {
return left;
} else if (right != null) {
return right;
}
return null;
}

}


I can BARELY understand how the above works, just a hair of connection where I understand the full process.
I can't ever imagine actually writing a recursive function beyond the 1st year bullshit. Anyone have good advice or tutorials?
>>
File: img_0555.jpg (1MB, 2048x1536px) Image search: [Google]
img_0555.jpg
1MB, 2048x1536px
>mfw another millennial gets btfo by my license

https://ma.tt/2016/10/wix-and-the-gpl/
>>
>>57300530
You just have to train your neural net.
>>
>>57300530
Recursion is literally a function calling itself. What don't you get about that? You can do some neat complicated shit with it but the concept of recursion isn't complicated itself.
>>
>>57300530
Remember the last time you had sex. Some guy had his penis jammed in your ass. Your penis was in another guy's ass. His penis was jammed inside the ass of the man ahead of him and so on.

This is called "tail recursion".
>>
Anyone got a suggestion for a bachelor's project involving medicine?
>>
>>57300530
it creates a new stack frame
>>
>>57300530
Just take a piece of paper and write down what your recursive function does step by step for some small parameters. That helped me to get my head around it.
>>
>>57300604
I understand that I just have trouble coding my own recursive functions from scratch. I can understand almost all of someone else's code but to produce my own will be painfully slow. Need to be ready for interviews if they do ask for something to be done recursively that I haven't seen before.

>>57300575
Will keep this in mind.

>>57300643
This post almost makes me feel like i'm in HS again
>>
>>57299870
What is poleorig's type? What is that type's toString() implementation?
>>
>>57299959
They're relative numbers in vim, they allow you to see clearly how many lines to use for various operations.

>>57299949
Yeah, the license header is hilarious too with that name, I bet I'm gonna get shit on by a bunch of butthurt moralfags.
>>
File: nntpchan.png (275KB, 2508x2043px) Image search: [Google]
nntpchan.png
275KB, 2508x2043px
been working with this since late 2014-ish but it finally has a weebsite's.

https://nntpchan.info/

>tfw someone else made the site because I suk at weeb design

I would seriously sooner kill myself than align divs for 6 hours so that's okay.
>>
i want to run a python script over and over (or every 5 minutes, or etc) that queries a remote database and inserts all new records into an equivalent, local database.

basically i want to know: how dumb of an idea is this? im sure there are design patterns with rigorous do's and dont's for database synchronization. however i need to get this done STAT with the tools i know.

sorry for the vague question
>>
>>57300783
man crontab
>>
>>57300783
why do you want to do this? the best recommendation is streaming replication, assuming your database can support it
>>
>>57300811
or... put this into crontab

*/5 * * * * python /path/to/script.py
>>
>>57300811
how would i know whether or not it supports it?
the remote is Azure, local is SqlLite
host is a Windows tablet
>>
>>57300849
sorry... I'm not asking how to automate the script, that is trivial enough
>>
>>57300871
>i want to run a script ever $interval
>sorry I'm not asking how to automate the script
go beg someone to do your homework in the retarded questions thread
>>
>>57300914
i'm sorry that you can't read or understand things anon
>>
Programming is sexist because it's designed in a way that makes it too hard for womyn to understand.
By writing code you are basically declaring that you hate womyn and most likely people of color too.
You are literally raping me right now, stop raping me.
>>
>>57300980
help is here
http://programming.witheve.com
>>
>>57300811
Okay let me back up and explain the situation.
The app is a UWP mobile app that relies on data from a cloud-hosted database.

In WPF, you could always just write code using SqlDataConnection to connect to a server and query its database. UWP doesnt let you do that, it makes you connect to an external service.

Tried to figure out how to do that, failed.

My workaround was: I can write a python script in like a minute that will just query the Azure and insert into a local sqlite that I DO know how to interface with in UWP.

What I want to know is, what sort of unforeseen bullshit will this workaround land me in? In a sense I like the idea of the local DB because it's not crucial for the data to be 100% up to date to the second, and the app could still function if the internet connection goes out (which I predict it will).
>>
>>57300648
>>57300648
Bump, I've got until December to come up with something, or I've gotta chose one of the boring ass projects the Uni. made.
>>
File: backprop.gif (8KB, 591x256px) Image search: [Google]
backprop.gif
8KB, 591x256px
>>57300000

I'm from nz, but I think our uni courses are structures pretty similar to US colleges?

DEs are *described* with calculus but don't seem to be used much in machine learning themselves..

The main parts of calculus I think are relevant to ML are partial derivatives/gradient operator and the multivariate chain rule, (since you have to apply those for backpropagation), which are typically taught in Calc 2/3 not DE.

I mean, eigenvalues are used for PCA, but that's linear algebra, not DEs. When do you have to solve a PDE to implement/understand a ML algorithm?

The main way I think my PDE course helped me in ML was giving me decent intuition about dynamical systems like RNNs. I'm sure it pops up sometimes, but calling it essential seems like a stretch. Is there something I'm missing?
>>
>>57300648
find a novel way to visual propagation of the seasonal flu
>>
how do i include github work on my resume?
>>
>>57301098
You link to it.
>>
>>57301115
my resume will be very sparse if the only thing i can include for my github work is a link
>>
>>57301098
make a "projects" section
>>
>>57301124
>Title of project
>Short description
>Link to project
>>
I currently have a little thinking problem in C++:

I have a datatype that consists of several values and a pointer to a field of doubles, that I have to allocate on the heap for certain functionalities.

This datatype itself is held in a std::vector. Assuming I use push_back() on this datatype a lot: Is it enough to overload the assigmnet-operator with one that allocates a new field with a new pointer and copies the values into it, or do I have to do something else? using push_back on the datatype as is would just copy the adress, that would all point to the same field on the heap.

I came from a static field as part of the datastructure to a dynamic field, because the static field was not expandable in runtime.
>>
would you hire someone who's resume includes a research internship with deep learning and developing a couple apps for a junior developer position? i feel like this professor kind of fucked me over. he told me this position would be such a great experience and i'd get so much out of it and i already put it down as my senior honors project and now i'm learning it's zero coding required.
>>
How do I make a hierarchy of data in Java that does not instantiate several tens of thousands of maps or other objects? The new-keyword is fucking deadly for the speed at which a hierarchy is built.
>>
what do you winfags use for a terminal? cmd.exe? cygwin? a terminal editor?
>>
>>57301228
>How do I make a hierarchy of data in Java that does not instantiate several tens of thousands of maps or other objects?
you don't
>>
>>57301214
you'll be fine
>>
>>57301238
One of my professors in college (someone who worked on tcp/ip) uses windows/cygwin exclusively.
>>
>>57301238

Not a full fledged winfag but cmder is nice.

http://cmder.net/
>>
>>57301242
Surely there is a way. How else do you parse huge xml files without waiting forever?
>>
>>57301214
Dood.
Nobody of your potential employers will ask "and how many lines of code have you written for that?"
They see: Project something, Buzzword, buzzword, buzzword - awesome! They don't even have the time to check that shit. They will ask you what you did there, if you're lucky. And you can say you learned how to contribute to a friggin software project in a scientific environment under Professor John Doe something
It's never about what you made. It's about that you made it and who you made it with.
>>
Working on a few thousand lines of Python for a new GTM and LTM DNS longevity test harness.
>>
File: 1462585294744.jpg (172KB, 1024x1344px) Image search: [Google]
1462585294744.jpg
172KB, 1024x1344px
Learning TypeScript and Angular 2.
It's kinda fun but I'll have to get into CSS frameworks and building tools such as gulp if I want to get a non-trivial project going and that sounds really dull.
>>
>>57301238
yes.
Depends on what I'll have to do. cmd exe for programs that are unfancy, powershell/cygwin if I need tee, cygwin if i need more linux stuff or make ssh or something.
>>
>>57301214
Code just a little-bit if you can, and make that representative of your entire internship. It's the game everyone plays.

You guys over-think internship pressure so much. I've had four, you can skew anything easily for future jobs. Don't think what you actually do at the internship matters much.

Just learn on your own, don't ever expect people to hold your hand. Go watch some MIT courses for fuck sake. You have all of humanity's knowledge at your fingertips, no excuses.
Oh and get more fucking internships. The more you have, the better. Nothing else is as relevant in school for your career.

Having this many internships opened some crazy doors. My GPA is pretty shit but no one cares because of a packed resume.
>>
>>57301238
Currently: cmd and git-bash

git-bash is a mintty configuration, i guess. being a winfag,i don't really know what i'm talking about on this subject
>>
>>57301238
>>57301259
>>
>>57301238
As a regular linux user I'm trying out windows on my new laptop, and I kind of wish there was a good answer to this question

Most of the time I have like 4 or 5 different terminals open:
* WSL works some of the time, and when I can I just use it + mintty.
* One terminal is dedicated to bash shell that is bundled with git. it works, but _only_ for git.
* One terminal is the visual studio cmd.exe shortcut. Same deal with git, it gets a dedicated terminal.
* and then I have a powershell instance that just does "the tools that don't work in WSL". I haven't bothered learning powershell at all, it just seems like it doesn't give a fuck about anything that isn't written as a C# cmdlet.
>>
>>57301291
>Angular 2

Pretty sure there are enough people pissed enough about Angular 2 that it won't be nearly as popular as Angular. Might want to hold off on that for a bit.
>>
>>57301007
if you update your db schema, all your clients will break. you need to be very careful with such a solution.
>>
>>57301310
>>57301256
what if i made an android app that can ssh as part of the project and say it's so that i can run the machine from my phone
>>
>>57301523
Maybe you should pursue a project that's actually interesting and will teach you something?

Nobody will take that seriously.
>>
>>57301355
I'll eventually have to rewrite a webapp that currently uses angular using a new framework due to performance reason. If not angular 2, what else should I check out?
>>
>>57301550
that was the most promising idea i've had in a long time
>>
>>57301563
Go and find an introduction to machine learning course. Do a simple project with interesting results, which isn't hard.

That alone is going to look way better.
>>
>>57301555
I have written nontrivial webapps using nothing but the native dom tools, and honestly it was probably less work than learning a framework beforehand
I'm also ideologically predisposed to liking react+redux but I'm not willing to actually use until it stops being the cool new framework so there's less pressure on it to change
>>
>>57301589
i'm taking a machine learning course next semester. i'm just trying to come up with ideas of stuff to code since you said i should try to code as much as i can with the research position
>>
>>57300768
Looking interesting senpai
>>
Dropped out of my mechanical engineering program nine months ago. Since then, I published an app and released a library that's gained some decent traction. No internship experience. Am I in good shape to be hunting for a full-time job or should I return for the degree?
>>
>>57301555
react seems to be doing a lot better
can't tell if vue.js is a meme yet
>>
Trying out event streams. They're pretty cool.
>>
>>57301647
>react seems to be doing a lot better
Better in terms of performance?
Any sources for that? I know I could look for that (and I probably will) but I'm asking in case you already have something in mind.
>>
File: larry_wall.jpg (111KB, 1280x924px) Image search: [Google]
larry_wall.jpg
111KB, 1280x924px
Are Haskell and Perl the two most dissimilar programming languages?

>deep in its autistic realm of the λ calculus
>deigns to do basic IO only through an esoteric formalism
>designed by a committee, named after a logician

vs.

>hey comp.sci look what i turned AWK into
>"there's more than one way to do it"
>Let's write poetry!!
>>
so android ssh app is apparently too easy. what about a program that lets you create a finite state machine through a GUI and compile it to an executable that you can run with stdio from the command line?
>>
>>57301646
Go computer engineer/software engineer or even CS.
MechE is still a great degree. You fucked up, go back to school and apply to as many internships as possible.
>>
>>57301555
Facebook, Instagram and Netflix are all using React. It doesn't do as much as Angular does, but I've found that many people picked up Angular just because other people were picking up angular and not because they actually needed it.
>>
>>57301696
>>Let's write poetry!!
What?
I know nothing about Perl
>>
>>57301730
sounds autistic, you're hired!
>>
File: intellectual-feels.jpg (6KB, 164x196px) Image search: [Google]
intellectual-feels.jpg
6KB, 164x196px
>>57301810
i don't care if it's autistic, am i really hired?
>>
Would making a game help you find a job?
>>
>>57301947
Better than not.
>>
>>57301947
I'm sure your local McDonalds manager would approve of you taking such initiative.
>>
How do I meme myself into machine learning jobs

I'm taking a bunch of AI/ML classes but alas, I am but a lowly Master's student, not getting a PhD, nor am I really interesting in pursing one.

Seems like most ML positions only want PhD students
>>
>>57302002
you might have to call yourself a data scientist for a couple years
>>
>>57301735
Honestly I don't have the passion for engineering to do 2+ more years of it. Why do you dismiss the projects I've done?
>>
>>57302028
Can't comment fully on your project without actually seeing it.

I was so fucking close to dropping my engineering degree about 2 years in, and then again 6 months later.
I actually remember some dude on the old /g/ irc convinced me not to. I'm glad as fuck I didn't, feels amazing to have this degree. Paper or not, any good company will demand a degree.

You're already at least close to half way through to having a top tier degree.
Up to you, engineering is hard fucking work but for a reason. It's the last bastion of professional and consistent work.
>>
>>57302002
1. find firmware reverse engineer friend
2. together make ML powered soho router worm that uses dirty cow
3. ???
4. profit
>>
>>57301611
>tfw it will remain memeware for all time
>>
>>57301157
Changing the assignment operator seemed to work.
>>
pic related if you're having trouble getting hired.
>>
>>57301018
Where you studying dood
>>
>>57302504
Time to move out and start a farm.
>>
How do I get ruby to print and use strings as their actual unicode code, instead of what it's encoded to? So, instead of the letter A if it were UTF-8 encoded, U0053
>>
>>57303146
https://ruby-doc.org/core-2.2.0/String.html#method-i-codepoints
something on this page has to be the answer. probably this
>>
Is there a way to bookmark points of special interest in a git commit log, or do i just branch the tree at that point?
>>
>>57303265
https://git-scm.com/book/en/v2/Git-Basics-Tagging
>>
>>57303350
ta
>>
https://news.ycombinator.com/item?id=12827887
>>
Guys, quick I need a RegEx.
What the hell matches any number of repeating lines with any comments?

I need it for a filter.

Say... if there are 1, 2, 3, or even 4 LINES
that all contain similar text repeated several times?
e.g.
>YOU = FAGGOT
>>YOU = FAGGOT
>YOU = FAGGOT
>>YOU = FAGGOT

Basically, how to filter that kind of shitposting?
I was trying this:
/(^.*^>.*$){4,}/i
because my thought was
Any line that begins with some characters, has at least 1 greater than sign, and then has some more characters before the line ends, repeated at least 4 times.
basically, the condition should be

globally match:
any LINE BEGINNING with ">" OR ">>"
repeated multiple times, say at least 4?
>>
>>57303508

Whatever this was, it's been deleted now.
>>
>>57303595
its still there
>>
>>57303549
Anyone know where to go with this?
>>
>>57303706
>>57303549
Is there really no way to match ">" on lines other than the first..?

I'm up to this:
/.*($)*(^>.*).*/i
and originally
/.*(^>.*).*/i
It WILL NOT match anything where ">" is NOT on the first line...
what the FUCK is wrong with this character?
Or is there something fucked about 4chan's RegEx?
I can't get the global OR multi-line mode to run...
>>
File: comfy.jpg (114KB, 600x645px) Image search: [Google]
comfy.jpg
114KB, 600x645px
>tfw emailed the professor and he said that he doesn't expect Caffe to work for the project and that's just an introductory assignment, and i'll actually have to work with him on making a bunch of algorithms or whatever the fuck it is by hand and it'll be very technical and difficult
panic attack was unnecessary lads thanks for subbing to my blog tonight
>>
>>57303871
>>57303706
>>57303549
Ok, so I've come to this conclusion:
4chan's RegEx does NOT counter multiple lines...
/.*(^.*$){2,}.*/
will, instead of highlighting posts that contain AT LEAST TWO lines, it highlights posts that CONTAIN NO TEXT ONLY

Can someone please tell me what the fuck is going on????
There has GOT to be a way to solve this!
>>
reminder that Dennis Ritchie was an AT&T shill
>>
>>57303706
is it so urgent?

>>57303940
i'd be surprised if they were doing anything other than turning your pattern into a standard javascript RegExp and then matching against the post body

regarding your problem with lines: look at the m (multiline) flag
>>
>>57302504
This is what I tell people, religion and gender are unregulated since anyone can say they are whatever they say they are. I don't have anything against people who have psychological problems where they think they are another sex, but the diversity meme is nonsensical when it includes unregulated classifications like gender and religion.
>>
Is ttk's treeview my best bet for a table/chart with tkinter in python?
>>
>>57304119
>is it so urgent?
kinda. The thread I was talking about is constantly getting mass-shitposted.

>regarding your problem with lines: look at the m (multiline) flag
As soon as I change it to like /(pattern)/gi or mi, it doesn't work anymore. No matter what pattern I throw in there.Using the global or multiline flag breaks it.
>>
>>57304182
fuck...
idk what the fuck is wrong with this, but I can't get it to work...

but they've moved onto new shitposting anyway... Now, they're no-text posting numerical pictures.
god damnit...
>>
>>57300643
>This is called "tail recursion".
Depends on whether you cum in his ass.
>>
>>57300718
I'm jealous of your high school experience.
>>
File: ??????????.gif (294KB, 242x333px) Image search: [Google]
??????????.gif
294KB, 242x333px
>>57298229
For the love of fuck somebody please tell me what the IN keyword does in MSVC.
I keep seeing code like this:
LONG JumpShort( IN PCODE_BUFFER Buffer, IN LONG Jump );


Literally impossible to google this shit.
>>
>>57304490
I would really like to know this too. I'm too bad at visual studio to figure it out.
>>
>>57304490
What file?
>>
>>57304490
no guarantees this is it, but

https://msdn.microsoft.com/en-us/library/77e6taeh%28v=vs.90%29.aspx

.net interop uses InAttribute and OutAttribute to specify the way a parameter is passed. these macros might be a way of marking/fulfilling a similar behavior
>>
>>57301018
Since no one else is saying it, you're right anon. You don't need differential equations - at best, multivariate calculus to understand partial derivatives (but partial derivatives should be a pretty intuitive concept if you've taken calculus already). And of course, a lot of linear algebra to actually implement these algorithms well.

Of course it helps, yeah, but you don't strictly need it to understand the material.
>>
>>57300648
make one of those datagram things for the game of life and apply the rulings towards like bacteria or cells,
>>
>>57300947
Guy, that's exactly what you asked for.

If that made you feel dumb then I don't know what to say. You want to know if you should use a custom algorithm or a pivot script?
>>
>>57301268
You run them as background processes and then serialize them as plain text files with a formatting that will suit your style?
>>
>>57304624
>>57304667
>>57304686
It turns out to be defined like this in windef.h:
#define IN
#define OUT


So I'm not even sure how that's valid C to be using it like in the previous post.
Could I just define KEK and then put it everywhere like KEK int x?
>>
>>57304936
Yes, that example means means "IN" and "OUT" are defined as empty, you could write them anywhere and they would have no effect.
>>
>>57296192
not dat guy but the original paper describe quicksort as being in place.

https://comjnl.oxfordjournals.org/content/5/1/10.full.pdf
>>
>>57304936
What's the point? I feel silly even asking that because it seems there is absolutely none.
>>
>>57305131
>>57304936
maybe deprecated feature, may have been used as compiler hint for optimizing reads and writes.
>>
>>57305131
>>57305197
It's actually just designed for programmer aid.
>>
File: 1456358094392.jpg (29KB, 599x335px) Image search: [Google]
1456358094392.jpg
29KB, 599x335px
>tfw it works but you don't know why
>>
>>57305240

Is correct. IN/OUT were hints for programmers looking at function signatures.

Win32 is a minefield.
>>
I need someone who has a little knowledge of graphics programming.

I have a raycast function that is working in a voxel/ cube based environment. Everything is a cube, basically. When the raycast hits a cube, what's the formula for determining what directional face of the cube it hit based on the origin and the direction of the ray?
>>
File: 1391318705526.png (253KB, 471x361px) Image search: [Google]
1391318705526.png
253KB, 471x361px
>>57305669
>I'm making minecraft!
>>
>>57305682
I always wanted to do voxel stuff
>>
>>57305682
What's wrong with that, games of that sort are a good way to get into graphics programming and to understand large data structures and stuff like streamed data.
>>
>>57305707
this. I got into it because of all the cool things I heard about when programming one. Most of all, it really teaches you how to optimize
>>
>>57305707
>things no programmer said ever

Did you hear that on YouTube or something? You can stop samefagging already, btw.
>>
>>57305669
physical intuition would suggest just reversing the ray and clamping to each surfaces normal
so for example say your ray is (-1, -2), then the two candidates would be (0, 1) and (1, 0), which would round closest to (0, 1)
>>
>>57305745
I'm not the person who said they were doing the project, those are conclusions I've come to by myself by doing similar stuff myself. Tile or voxel based games are wonderfully easy to understand yet offer a lot of room for learning about different types of concepts. If you don't agree with that, go ahead and tell us why instead of posting reaction images and acting smug.
>>
>>57305799
mind explaining that a little more? I'm having trouble correlating the concepts. for instance, you say -1, -2, but I dont know the context of that
>>
File: 81MvM5+pRsL.jpg (272KB, 1000x1419px) Image search: [Google]
81MvM5+pRsL.jpg
272KB, 1000x1419px
I'm writing a forex trading bot that uses Oanda's fxTrade REST API

My goal is to make a profitable algorithm, then just leave it on 24/7
>>
File: 1475638966115.jpg (124KB, 1000x840px) Image search: [Google]
1475638966115.jpg
124KB, 1000x840px
>>57305682
the world needs more voxel games
>>
File: 1477063281300.jpg (57KB, 960x540px) Image search: [Google]
1477063281300.jpg
57KB, 960x540px
>>57305669
get the side that has the normal with the least distance from the raycast
>>
Baby code in c.
Trying to fix bug in baby code in C.
Turns out bug is a result of the simple way I am being taught to program and that the workarounds all require 4-5 times as much experience as I have.

Going back to baby coding in C.
>>
>>57305966
Why did you choose C? Do you want to do firmware?
>>
>>57305980

I fell for the "father of modern languages" meme.
>>
>>57305980
Why not, C isn't more complicated than, say, Java or C# for a beginner to grasp their mind around. For somebody without a programming background, something like Python would likely be easier, but C first of all teaches you all major languages at once, being the granddaddy of them, and also lets you build anything you want.
>>
>>57305991
Seriously though unless you have a particular purpose, you're probably better off with Python. C has its uses, but it's overkill for starting off with.

If you just want a challenge, Haskell might be more impressive on a resume. C is good if you want to get a job writing firmware/drivers.
>>
File: goog.png (817KB, 877x493px) Image search: [Google]
goog.png
817KB, 877x493px
>>57306002
Although C is probably good for learning about pointers and strict typing.
>>
>>57305994
My concern is job opportunities and practicality. C is good for learning, sure. But time is precious, and Python is faster to learn and less frustrating.
>>
File: zpTD7yd.jpg (42KB, 516x422px) Image search: [Google]
zpTD7yd.jpg
42KB, 516x422px
>>57301696
>esoteric formalism
>>
>>57301947
anything on GitHub helps
>>
>>57306020
You'll actually learn a lot of useful things, very very fast when learning C since it's so strict and so empty. Should you learn enough to use data structures, pointers, understand dynamic memory, etc, then it's time to move on to a useful-for-job language, imo.
>>
>>57306013

Baby programmer here.
I've gotten too and past (?) pointers in the book I'm following, and it's obvious that they're the whole point of C, along with mixing them with arrays and functions and indirectly fucking with variables and stuff.

But can you explain or can someone direct me to an explanation of ... why? Why are they important, what do they allow you to actually accomplish problem solving wise that you can't do without them? I've heard the quote about being able to solve things with another layer of indirection but...?

I'm just having trouble grasping what its used for? The most I can come up with is that it allows you to change which variable is called in a function, but that does little more for my brain than describe what indirection is in the first place.
>>
>>57306227
As far as I know It's useful for working with raw hardware memory. Which is handy in the context of firmware.

For example, let's say you want to find out how much RAM is unused on your computer. Not by calling some library, of course, but counting each byte yourself.
>>
>>57306227
You want to know why you use pointers and why they're helpful?
>>
File: 0925roribichi2018.jpg (226KB, 1000x1403px) Image search: [Google]
0925roribichi2018.jpg
226KB, 1000x1403px
>>57306255
Or let's say you wanted to implement `dd` yourself.
>>
>>57306262

I want to know why indirection/abstraction is helpful.
>>
File: 2016-10-30-105706_508x944_scrot.png (47KB, 508x944px) Image search: [Google]
2016-10-30-105706_508x944_scrot.png
47KB, 508x944px
I wrote a python script to parse scene files for a simple ray tracing program im going to write later. Im pretty new to python and programming so if theres anything im doing horribly wrong, let me know
>>
>>57306292
It's not, write machine code directly.
>>
>>57306292
logic gates abstract physical wires and electricty

binary abstracts logic gates

machine code abstracts binary

C abstracts machine code

and so on, as high as you want to go. Abstraction saves time. Abstraction is not only useful, it's necessary to get anything done.
>>
>>57306322

Oh.

Then I might be off-track with this and have my terms mixed up.
>>
>>57306307
i guess i should also post the code
class Sphere:
ID = 0
center_point = (0, 0, 0)
radius = 0
color = (0, 0, 0)

def __init__(self, ID, center_point, radius, color):
self.ID = ID
self.center_point = center_point
self.radius = radius
self.color = color

def intersect(self):
pass # do things

def read(filename):
data = []
with open(filename, 'r') as f:
for line in f:
data.append(line)
return data

def parse(data):
result = []
for i in range(len(data)):
if data[i][0] == "#":
pass # ignore comments
elif data[i] == "\n" and data[i-1] == "\n":
pass # if the current line is \n and the previous line is \n, we have finished parsing
elif data[i] == "\n" and data[i+1] != "\n":
# if the current line is \n and the next line is not \n,
#we have finished parsing one sphere, and will begin the next
pass
else:
result.append(data[i].strip())

result.pop() # remove last element because it is [..., ''] for some reason

# https://stackoverflow.com/questions/27371064/converting-a-1d-list-into-a-2d-list-with-a-given-row-length-in-python
n = 4 # row length 4, because sphere has 4 properties
my_list = [result[i:i+n] for i in range(0, len(result), n)]
return my_list

def create_list_of_sphere(sphere_data_list):
sphere_list = []
for sphere in sphere_data_list:
sphere_list.append(Sphere(sphere[0], sphere[1], sphere[2], sphere[3]))
return sphere_list

if __name__=="__main__":
data = read("scene.txt")
result = parse(data)
sphere_list = create_list_of_sphere(result)

for item in sphere_list:
print("ID: \t\t" + item.ID)
print("Center point: \t" + item.center_point)
print("Radius: \t" + item.radius)
print("Color: \t\t" + item.color)
print()


>>
>>57306322
>logic gates abstract physical wires and electricty
it started off good


>binary abstracts logic gates
>machine code abstracts binary
>C abstracts machine code
but neither of these are true
>>
>>57306292
There are way, way too many reasons, but I'll give you a couple of basic ones. Abstraction is a broad term btw, by writing in C you are using it, by writing in any programming language you are using it.

I'll give an example to references and pointers. Say we wanted to change the first 4 characters of a string to "x". We write a function that takes a character array, iterate over the 4 characters and then pass that array as an argument and done. Well, we then have to return that string to the caller, and then the programmer has to set the string to the return value, because the function copies it.

s = fourx(s);

This is inefficient, in some use cases completely stupid, like in OO languages where objects that aren't strings could be absolutely massive and you don't want to copy them. Better idea.

Take a memory address of the object or variable instead. Then simply deference the pointer (memory address) and modify it directly. In this case

fourx(s);

Simple. OO languages like Java generally don't have pointers as that is all done implicitly and behind the scenes.
>>
>>57306335

I want to point out that while everyone else here is bitching about C versus Java, which is what all these threads break down to, you are doing well with your project and I want to see more out of this.

Don't take the fact that your post isn't asking open ended questions and thus attracting controversy as you being ignored. Good on you for accomplishing things.
>>
>>57306335
I didn't read everything, but the four variable declarations at the top are not unique to each instance of the class.

What you have there are four "class variables", and are shared among all instances of the class. You want "instance variables" which are unique to each instance of the `Sphere` class.

When you declare the variables in `__init__()`, you are making instance variables there. So you actually have two `ID` variables, two `center_point` variables, etc.

Get ride of the class variables up top.
>>
>>57306367

So, it's useful because C doesn't know how to change thing byte by byte in any simpler manner (not literally byte by byte, but 4 bytes by 4 bytes for integers etc.) without giving up the ability for it to be changed in the original program as opposed to a function?

Word barg I know, but I'm still trying to wrap my head around this. Now I understand why people suggest having an irl sempai for C/C++.
>>
>>57306307
Neat bro. It might be a little forward thinking at this point but you probably won't be able to render terribly interesting scenes with just colored spheres. If you are working on a parser you should keep in mind you will probably want to extend it for material properties depending on your illumination model.
>>
>>57306401
What? I think you totally misunderstood, or I did. It's useful because when you pass arguments to a function without using a reference, a pointer/the concept of indirection at all, you COPY the object. Even Java does it, you just don't need to use a pointer on objects because it knows you don't want to copy it.

When you say, in Java
String s = new String("Hello world!");
s points at a string object instance. That is, it basically is a pointer. You just don't have to use the pointer type because it's an OO language and it wraps around these things itself.
>>
File: CoeluBPW8AALx7B.jpg (97KB, 640x626px) Image search: [Google]
CoeluBPW8AALx7B.jpg
97KB, 640x626px
>>57306401
Reddit might be a good source of help

https://www.reddit.com/r/learnprogramming/
>>
>>57306335
The attributes you declare in the Sphere class are "static" so there's no need for that, only initialize the members in the __init__ function.
>>
>>57306401
Hmm, okay I'm going to give this another go, simpler this time.

Let's say you wanted a function that checked if a given integer contained some mathematical property. So the programmer could say if (containsMagic(num));

Now, our function needs to subtract, divide, add, and do all sorts of shit to this number to get a result and find its property. But in doing this, we don't want to fuck up the integer itself. So we'd make a COPY of that integer and do our stuff.


int containsMagic(int thisisacopy) {
//do math and return true or false
}

int main(void) {

int i = 2;
if (containsMagic(i))
return 1;
}



That function makes a COPY. This is a reason NOT to use pointers. However, should we have a function that directly that needs to directly modify a variable, we can just make a function that accepts a pointer to it, deference, modify it, and exit without ever needing to copy the whole object like we did above.
>>
File: pl.webm (3MB, 700x394px) Image search: [Google]
pl.webm
3MB, 700x394px
/dpt/-chan, daisuki~

>>57305682
Minecraft is truly an amazing game.

>>57302002
Learn statistics and probabilities
Learn databases
???
profit

>>57301947
Definitively.

>>57301696
declarative logic programming language (Mercury) vs a pure imperative one (x86, basic)

>>57300643
It's not.

>>57300213
Which is not the preprocessor

>>57300191
No

>>57299125
Code?

>>57299125
>How do I become Carmack?
Asperger.

>>57298653
Decent but too much bloat for me; As a code artisan, i prefer crafting my own programming tools.
https://confluence.jetbrains.com/display/CLION/Third-Party+Software+Used+by+CLion

>>57298534
no really the same thing, semantics wise, but the generated bytecode is the same.

>>57298293
I'm not glad he's dead, but I'm glad he's gone

>>57298229
Please use an anime image next time.
>>
>>57306549
>Please use an anime image next time.

Kill yourself.
>>
File: consider suicide.jpg (28KB, 1658x315px) Image search: [Google]
consider suicide.jpg
28KB, 1658x315px
>>57306549
>>
>>57306549
>lol look at me I'm so important I'll reply to every post long after they're posted
Swallow a bullet.
>>
autohell really is hell isn't it

fuck
>>
File: catintears.jpg (11KB, 261x192px) Image search: [Google]
catintears.jpg
11KB, 261x192px
>>57306579
>>57306605
>>57306619
wow, bullies are out today.
>>
File: underageb&.png (96KB, 1011x117px) Image search: [Google]
underageb&.png
96KB, 1011x117px
>>57306681
>>>/gradeschool/
>>
typedef float32_t float;
typedef float64_t double;
typedef float128_t long double;


Is this literally retarded?
>>
>>57306740
Disregard the wrong order, I had them as #define initially
>>
>>57306740
yes because 64-bit float can be 80-bit so the name is misleading
>>
>>57306786
I checked them with sizeof(), it's not like I'm writing portable code anyway
>>
>>57306740
that makes no sense
sizeof float and double are platform dependent
float could be 64bit for all you know
>>
>>57306740
>>57306772
>>57306786
>>57306824
>>57306831

C standard says

The C floating types match the IEC 60559 formats as follows:

The float type matches the IEC 60559 single format.
The double type matches the IEC 60559 double format.
The long double type matches an IEC 60559 extended format
>>
File: 50099912_p0.png (370KB, 500x700px) Image search: [Google]
50099912_p0.png
370KB, 500x700px
>>57306579
>I'm not an autistic superior intelligence
>>
Is there any reason to learn C these days? Would my time be better spent focusing on managed languages?
>>
>>57306960
Actually, you would be wasting your time learning anything else than C or Python.
>>
>>57306579
At least he didn't post Autism Horses.
>>
>>57306975
cute
>>
>>57306960
Pretty much. Nowadays all you want is one high level scripting language like Python or Ruby and one compiled language that provides more abstractions than C (like C++, Rust, or Go).
>>
File: 1360129151600.gif (3MB, 290x189px) Image search: [Google]
1360129151600.gif
3MB, 290x189px
>language syntax is simple
>code is all easy to read
>suddenly error handling
>what was 3 lines of code before is now a 50 line monstrosity
>spaghetti everywhere
>exceptions throwing exceptions
>>
glvalue prvalue xvalue lvalue rvalue
>>
>>57307034
Unless you're writing enterprise code, the extent of your error checking should be along the lines of not crashing because you couldn't open a file or some shit.
>>
>>57307034
M O N A D S
>>
Now that the dust has settled, is it safe to say t hat OOP languages have won the paradigm wars?
>>
>>57307034
Then you start to make a general class and a specific class because you might want to reuse the code some day and suddenly you have twice as many classes as you need, some classes only function is to wrap code together and one class is just a weird way to write a function.
Every class needs operator overloads so you can easily print them in the log, they all need error handling and they all need adapters for the communication as you use different methods for internal and external communication.
Then you get to the point where you spend more time fixing the cmake than you spend on the actual code because all of these problems you are having can be solved by adding this shiny new library.

Fucking hell.
>>
File: yurika dog.jpg (284KB, 720x1280px) Image search: [Google]
yurika dog.jpg
284KB, 720x1280px
>>57307232
functional programming is the new fad
>>
File: 1435101286094.gif (607KB, 800x792px) Image search: [Google]
1435101286094.gif
607KB, 800x792px
>>57307232
>>57307289
>trannies and SJWs infiltrate popular programming circles
>real programmers start switching to functional programming languages to avoid them knowing that these retarded script kiddies will never be able to follow them
>>
>>57307024
>abstractions
How can you fall for a meme knowing it's a meme?
>>
>>57307375
You sound like a guy who solders his own CPUs.
>>
>>57298668
5 rupoos have been transferred to your account pajeet
>>
File: network-topology.jpg (31KB, 437x281px) Image search: [Google]
network-topology.jpg
31KB, 437x281px
I have an idea:
We make an anonymous real life imageboard.
To begin with you have to give your home address to a trusted authority which will manage all physical posts and send copy of every new entries to the subscribed address.
You could also choose which anon would receive the original letter you sent (i.e original creations).

How bad is this?
>>
File: IMG_0238.jpg (685KB, 1080x1920px) Image search: [Google]
IMG_0238.jpg
685KB, 1080x1920px
Creating my own 3D-engine from scratch, right now refactoring my Renderer to be threaded, with RenderMessages containing pointers to Models, Lights, Particles and several different rasterizer, depth and blend-states, also VisualAssist is pure love.

Sorry for no screenshot, happened to have this one lying around.
>>
Is it considered bad practice to use exit in C?

Let's say I have a function that parses command line arguments, if there's anything wrong (e.g. argument that should've been number isn't a number or is missing) the function prints an error message and exits the program. Would I be better off getting the state back to main in form of a flag or something and having main end the program instead?

It feels way cleaner and easier to just use exit for situations like this since I don't have to pass extra shit around, but is it correct?
>>
>>57307567
Who's going to pay the postage for your bandwidth?
>>
>>57307598
I would personally use asserts.

Otherwise it sounds fine to use either, although I'm a C++ user.
>>
Why calling c++ from C is so fucking annoying?
>>
>>57307612
Donations, basically including unused coins in the letters when you feel like it.
>>
>>57307639
because backward compatibility is not forward compatibility.
>>
>>57307598
In the example you gave I would use exit, but most functions shouldn't kill the program if they fail. Errors should propagate back through the call stack until they come to main or another early function.

>>57307615
>using assert to check for user errors

>>57307639
Because you're not using extern "C"? Or maybe the bindings/API you're using/wrote are shitty.
>>
>>57307696
>bindings/API you're using/wrote are shitty.
Every fucking time
>>
File: Screenshot_1.png (72KB, 1699x854px) Image search: [Google]
Screenshot_1.png
72KB, 1699x854px
Been working on my textboard more. I implemented sage, bump limits, changed some styles etc and it's starting to look a bit better. I really hate HTML/CSS so much though.

I've only a few more things to implement before considering it somewhat usable such as pagination, post deletion, alternate themes and a few other bits and bobs.

Here's some screenshots.
>>
File: mobile.png (93KB, 515x846px) Image search: [Google]
mobile.png
93KB, 515x846px
>>57307765
Here's how it looks mobile.
>>
>>57307765
I'm sorry but it's shit actually. Thanks for trying though.
>>
File: dinghy.jpg (503KB, 1618x2158px) Image search: [Google]
dinghy.jpg
503KB, 1618x2158px
>>57307781
There are so many 2ch/4chan clones, why do people keep making them?

Do you have a special niche that your board will serve? Like a specific subculture?
>>
>>57307803
Firstly, I wanted to do it just because it's something that interested me.

Secondly, I wanted to write one with source that was small and easy to read (the Python backend code is only around 350 lines).

That's about it. I'm not trying to replace anything.
>>
File: 2QPf8Ji.jpg (60KB, 625x625px) Image search: [Google]
2QPf8Ji.jpg
60KB, 625x625px
>>57307869
Cool. Do you host it on your own server?
>>
>>57307803
>There are so many 2ch/4chan clones, why do people keep making them?
lack of creativity.
>>
>>57307937
It's not hosted anywhere at the minute, but when it is I'll probably use Pythonanywhere because they could host it for £4 a month which is pretty good.

The only reason it's not hosted at the minute is because I haven't tested the security of it yet fully.
>>
Why is everyone making their own chan
>>
>>57308205
Even the projects /dpt/ does follow some sort of memetic cadence. Don't you remember when everyone was doing a raytracer, than a CHIP8 emulator, then trying to solve "average two ints in C"?
>>
>>57307803
>why do people keep making them?
Mostly webdev practice I'd assume, just like you start off with FizzBuzz, making an imageboard clone is not too huge of a scope but feature rich enough to make for an excellent babby's first website project.
>>
File: 1466006565.png (304KB, 722x768px) Image search: [Google]
1466006565.png
304KB, 722x768px
>>57298229
Can someone spoonfeed me? I'm not a programmer but I'm trying to achieve a miner with hardcoded code.

Basically what i need is in C++ 4 digit random number generator code that i could use the output as a variable

code code code..
std::string user = "Ritchie.<outputOfNumberGen";


I will suck your dick for this.
>>
>>57308397
"Ritchie." + std::to_string(rand()%10000)

You'll need to seed rand
>>
>>57307570
I've tried VisualAssist. It didn't do anything for me, except marginally mess with my work flow.
Why do people love it so much?
>>
File: Untitled.png (124KB, 1366x720px) Image search: [Google]
Untitled.png
124KB, 1366x720px
>>57308432
It worked! Thank very much anon!!!
>>
I dreamt i got shit for not knowing the answer to a programming question, i made a point that was going to find out the answer. But now i can't remember the question.
>>
Possibly stupid question, but are there any decent FLAC codecs for java?
Apparantly the original codec is only cpp, and the ports I found seem outdated and are undocumented.
Is this normal, and should I just learn from their source or is there a good alternative?
>>
What port should networked applications use?
>>
>>57309602
A random port above 1000 that's not that common.
>>
help me /dpt/

I want to add a "-h" flag in all my bash/python scripts. How can I do it?
>>
Im being forced to learn java because I want a program to run on android. Can someone explain to me how adding jar files and importing from them work. Using netbeans right now.
>>
>>57309681
There's like 80 billion books on Java and Android development that you can pirate for free and you expect /g/ to explain it to you personally?
>>
>>57309695
Thats why I paid for a 4chan membership.
>>
File: poll.png (9KB, 688x413px) Image search: [Google]
poll.png
9KB, 688x413px
https://www.strawpoll.me/11537479
>>
>>57309695
i've tried to find books on it and that's actually part of the problem. with C, you know you just read K&R. bit harder to know what books are good and which ones are a waste of time for java and android development since about 50% of them are written by indians
>>
>>57309711
Just "variable", pajeet
>>
>>57309716
>what is google
>what is amazon

Not hard to find the highest rated books.
>>
>>57309745
void method(int var) {
var = var;
}
>>
>>57309746
>He doesn't know about how easy it is to buy reviews
>>
>>57309758
You'll never need to name a variable "variable" ever.

Also, you can't be this retarded. It's mathematically impossible. Everything... Is... A... Lie.
>>
>>57309681
If I wanted a full tutorial on java I would have found one. I just want something minor. My interest in java isnt great enough.
>>
>>57309758
>setters
If I weren't using a mobile right now I'd be uploading a particularly smug anime girl
>>
>>57309811
meant for>>57309695
>>
I have to re-write my Fortran program involving Pythagorean Triples. I originally wrote it so it finds X triples then sorts through them in increasing numerical order to find which ones satisfy several constraints:
c1<c2<c3
c1+c2>c3
a1+a3=a2
b1+b2=b3

Now Im going to rewrite it so that it checks the constraints as it goes. Theoretically increasing the threshold of which i can achieve
>>
>>57309819
do you seriously not have a server runner at home that you can ssh into from your phone and post anime pics from? why?
>>
>Background in Object Oriented Programming (C/C++ preferred)
http://jobview.monster.com/v2/job/View?JobID=174881966&MESCOID=1500127001001&jobPosition=9

what did they mean by this
>>
>>57309819
MyClass(int variable)  : variable{variable} { }
>>
I've been trying to figure out how to make a python script that takes images from a folder, feeds them to iqdb, goes to the matching gelbooru page, grabs the artist and character tags, and moves them to a folder by artist or character.

Any idea how I should start?
>>
>>57306605
>>57307801
>>57307803
What is with people/someone being an asshole to everyone putting effort into this thread?
>>
I don't understand the purpose of function specification and type declarations in Erlang. Is it purely to help debugging with dialyzer and typer?
>>
>>57310258
Start by writing one part that does one of the things you listed, like taking images from a folder.
Remember problems can be broken up into smaller problems or trivial stuff you either know or can search for.
>>
>>57310384
I wasn't trying to be a faggot. I just want webdevs to stop advertise their memesites on this board. Despite being fine with sharing github links.
>>
if I want a data structure that adds elements in sorted position very efficiently and tracks a max do I want a heap? is there something better? I don't remember this stuff it's been awhile
>>
>>57310494
I've already written scripts that sort images into folders, the part I have no idea how to do is send an image to iqdb through python.
>>
>>57310688
See linked list.
>>
>>57310616
>What are you working on /g/?
>posts what he is working on
What the fuck else is he supposed to do? It wasn't an advertisement. He doesn't even link to anything. The source code might not even be anywhere but his computer. He's just making something because he wants to.
>>
>>57310716
Truthfully, you're right. I'll kill myself now.
>>
>>57310704
you're talking past him a little bit but alright, let's send an image to iqdb
do you know how to do that in any other language? when you use the iqdb website and upload a file, do you know what's happening? do you know what a post request is?
if you google something like "python post file" you should find a ton of help and libraries
>>
>>57310823
I don't know what a post request is or how to send one, so maybe this idea is a bit over my head right now. I'm still very new to programming. What knowledge do you think making a script like that would require?
>>
 public class ButtonClickArgs : EventArgs
{
private readonly int _newValue;
public ButtonClickArgs(int NewValue) { _newValue = NewValue; }
public int NewValue { get { return _newValue; } }
}

public delegate void ButtonClickHandlerInControl(object sender, ButtonClickArgs e);

public event ButtonClickHandlerInControl ButtonClick;


private void btnSend_Click(object sender, EventArgs e)
{

var r = new Random();
var randomValue = r.Next(1000);

var eventArgs = new ButtonClickArgs(randomValue);

if (this.ButtonClick != null)
this.ButtonClick(this, eventArgs);
}


On the button click of this UserControl, i need it to update a textbox on the main form. Ive tried everything ive seen on stack overflow but Im not sure I know what im looking for.
>>
>>57310912
guess I should actually ask a question.

What can I search for to find the solution to this? The program runs otherwise it just wont update that one text box so it seems like im missing the link between the two but I dont know how to make that link.

Part of the assignment says "The event will be name ButtonWasClickedEvent" but when I tried to make the top half of the code an event or moved it around Id get errors saying ButtonClick cant be found.
>>
>>57310912
>btnSend_Click
>mixing camel case with underscores
>>
File: 1458083234405.jpg (144KB, 1220x976px) Image search: [Google]
1458083234405.jpg
144KB, 1220x976px
Friendly reminder to masturbate
>>
>>57311018
Im just typing it out how it is in the assignment man
>>
>>57311055
Okay, that just irked me about your code.
Wish I could help, but last time I programmed in c sharp was like 3 years ago.
>>
>>57310688
Will priority queue suffice?
>>
>>57310712
Isn't that less efficient than a heap? https://en.wikipedia.org/wiki/Search_data_structure

I have some tasks and need to complete them lowest processing time to highest processing time. More tasks will be added to the data structure while tasks are being processed. I don't think I need to have a fully sorted list at all times, and I think insertion/findmin in a heap is more efficient than in a linked list? But I'm not super clear on heapify maintenance costs

Doesn't a heap suit this best? I'm a little shaky on this but I think it has the best runtime for insertion and findmin which is most important to me but I'm a little iffy on the heapfiy maintenance stuff
>>
>>57311100
wait this looks perfect cheers
>>
/!\ A L E R T /!\

New thread

>>57311298
>>57311298 >>57311298
>>57311298 >>57311298 >>57311298
>>57311298 >>57311298
>>57311298


/!\ A L E R T /!\
Thread posts: 335
Thread images: 47


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